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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -23,7 +23,7 @@ const di=(...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 Ci(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ri(...e){return n.useCallback(Ci(...e),e)}function zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ti,Li={exports:{}},Ni={};var Mi,Ii,_i={};function Ai(){return Mi||(Mi=1,"production"!==Qe.env.NODE_ENV&&function(){var t=e,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=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(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 v;function b(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&m("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}v=Symbol.for("react.module.reference");var O,x,E,j,k,S,P,C=Object.assign,R=0;function z(){}z.__reactDisabledLog=!0;var T,L=y.ReactCurrentDispatcher;function N(e,t,r){if(void 0===T)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);T=n&&n[1]||""}return"\n"+T+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=L.current,L.current=null,function(){if(0===R){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:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}R++}();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,L.current=o,function(){if(0==--R){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})})}R<0&&m("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?N(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 N(e);switch(e){case u:return N("Suspense");case f:return N("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 m("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]||(m('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,m("%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,m("%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),m('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),m("%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),m("Failed %s type: %s",r,l.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!Q){Q=!0,m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||m("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===v||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,m("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 m("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})),R=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!ce[P+R])m('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} />',R,P,C.length>0?"{"+C.join(": ..., ")+": ...}":"{}",P),ce[P+R]=!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),m("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),m("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)};_i.Fragment=o,_i.jsx=fe,_i.jsxs=de}()),_i}var Di=(Ii||(Ii=1,"production"===Qe.env.NODE_ENV?Li.exports=function(){if(Ti)return Ni;Ti=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__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 Ni.Fragment=n,Ni.jsx=l,Ni.jsxs=l,Ni}():Li.exports=Ai()),Li.exports),Bi=n.forwardRef(((e,t)=>{const{children:r,...o}=e,i=n.Children.toArray(r),a=i.find(Vi);if(a){const e=a.props.children,r=i.map((t=>t===a?n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null:t));return Di.jsx(Fi,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return Di.jsx(Fi,{...o,ref:t,children:r})}));Bi.displayName="Slot";var Fi=n.forwardRef(((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=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}(r);return n.cloneElement(r,{...Hi(o,r.props),ref:t?Ci(t,e):e})}return n.Children.count(r)>1?n.Children.only(null):null}));Fi.displayName="SlotClone";var Wi=({children:e})=>Di.jsx(Di.Fragment,{children:e});function Vi(e){return n.isValidElement(e)&&e.type===Wi}function Hi(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 Ui=go("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"}}),$i=n.forwardRef((function(e,t){var r=e.className,o=e.variant,l=e.size,s=e.asChild,c=void 0!==s&&s,u=a(e,["className","variant","size","asChild"]),f=c?Bi:"button";return n.createElement(f,i({className:li(Ui({variant:o,size:l,className:r})),ref:t},u))}));$i.displayName="Button";var Gi=function(){return Gi=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},Gi.apply(this,arguments)};function Yi(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 qi(e){return"multiple"===e.mode}function Ki(e){return"range"===e.mode}function Xi(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var Ji={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 Zi=Object.freeze({__proto__:null,formatCaption:function(e,t){return we(e,"LLLL y",t)},formatDay:function(e,t){return we(e,"d",t)},formatMonthCaption:function(e,t){return we(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return we(e,"cccccc",t)},formatYearCaption:function(e,t){return we(e,"yyyy",t)}}),Qi=Object.freeze({__proto__:null,labelDay:function(e,t,r){return we(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 we(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var ea=e.createContext(void 0);function ta(e){var t,r,n,o,i,a=e.initialProps,l=(r=Ji,n=Y,o=new Date,{captionLayout:"buttons",classNames:r,formatters:Zi,labels:Qi,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=N(n):t&&(i=new Date(t,0,1)),o?a=L(o):r&&(a=new Date(r,11,31)),{fromDate:i?E(i):void 0,toDate:a?E(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"),(Xi(a)||qi(a)||Ki(a))&&(i=a.onSelect);var d=Gi(Gi(Gi({},l),a),{captionLayout:f,classNames:Gi(Gi({},l.classNames),a.classNames),components:Gi({},a.components),formatters:Gi(Gi({},l.formatters),a.formatters),fromDate:c,labels:Gi(Gi({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:Gi(Gi({},l.modifiers),a.modifiers),modifiersClassNames:Gi(Gi({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:Gi(Gi({},l.styles),a.styles),toDate:u});return Di.jsx(ea.Provider,{value:d,children:e.children})}function ra(){var t=e.useContext(ea);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function na(e){var t=ra(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Di.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 oa(e){return Di.jsx("svg",Gi({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Di.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 ia(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=ra(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:oa;return Di.jsxs("div",{className:l,style:s,children:[Di.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Di.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Di.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Di.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function aa(e){var t,r=ra(),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 Di.jsx(Di.Fragment,{});if(!o)return Di.jsx(Di.Fragment,{});var f=[];if(function(e,t,r){const[n,o]=x(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var d=N(n),p=n.getMonth();p<=o.getMonth();p++)f.push(Pe(d,p));else for(d=N(new Date),p=0;p<=11;p++)f.push(Pe(d,p));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ia;return Di.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=Pe(N(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:f.map((function(e){return Di.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function la(e){var t,r=e.displayMonth,n=ra(),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 Di.jsx(Di.Fragment,{});if(!i)return Di.jsx(Di.Fragment,{});for(var p=o.getFullYear(),g=i.getFullYear(),h=p;h<=g;h++)d.push(Ce(I(new Date),h));var y=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ia;return Di.jsx(y,{name:"years","aria-label":f(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Ce(N(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:d.map((function(e){return Di.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function sa(){var t=ra(),r=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&&T(i,o)<0&&(o=h(i,-1*(s-1))),a&&T(o,a)<0&&(o=a),N(o)}(t),n=function(t,r){var n=e.useState(t),o=n[0];return[void 0===r?o:r,n[1]]}(r,t.month),o=n[0],i=n[1];return[o,function(e){var r;if(!t.disableNavigation){var n=N(e);i(n),null===(r=t.onMonthChange)||void 0===r||r.call(t,n)}}]}var ca=e.createContext(void 0);function ua(e){var t=ra(),r=sa(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=N(e),i=T(N(h(o,n)),o),a=[],l=0;l<i;l++){var s=h(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=N(e);if(!r)return h(l,a);if(!(T(r,e)<i))return h(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=N(e);if(!r)return h(a,-i);if(!(T(a,r)<=0))return h(a,-i)}}(n,t),s=function(e){return i.some((function(t){return ke(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&je(e,r)?o(h(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Di.jsx(ca.Provider,{value:c,children:e.children})}function fa(){var t=e.useContext(ca);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function da(e){var t,r=ra(),n=r.classNames,o=r.styles,i=r.components,a=fa().goToMonth,l=function(t){a(h(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:na,c=Di.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Di.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Di.jsx("div",{className:n.vhidden,children:c}),Di.jsx(aa,{onChange:l,displayMonth:e.displayMonth}),Di.jsx(la,{onChange:l,displayMonth:e.displayMonth})]})}function pa(e){return Di.jsx("svg",Gi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Di.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 ga(e){return Di.jsx("svg",Gi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Di.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 ha=e.forwardRef((function(e,t){var r=ra(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=Gi(Gi({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Di.jsx("button",Gi({},e,{ref:t,type:"button",className:a,style:l}))}));function ya(e){var t,r,n=ra(),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 Di.jsx(Di.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:ga,m=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:pa;return Di.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Di.jsx(ha,{name:"previous-month","aria-label":d,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Di.jsx(y,{className:a.nav_icon,style:l.nav_icon}):Di.jsx(m,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Di.jsx(ha,{name:"next-month","aria-label":g,className:h,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Di.jsx(m,{className:a.nav_icon,style:l.nav_icon}):Di.jsx(y,{className:a.nav_icon,style:l.nav_icon})})]})}function ma(e){var t=ra().numberOfMonths,r=fa(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return ke(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),f=t>1&&(c||!s);return Di.jsx(ya,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function va(e){var t,r,n=ra(),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:na;return r=i?Di.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Di.jsx(da,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Di.jsxs(Di.Fragment,{children:[Di.jsx(da,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Di.jsx(ma,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Di.jsxs(Di.Fragment,{children:[Di.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Di.jsx(ma,{displayMonth:e.displayMonth,id:e.id})]}),Di.jsx("div",{className:o.caption,style:a.caption,children:r})}function ba(e){var t=ra(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Di.jsx("tfoot",{className:o,style:n.tfoot,children:Di.jsx("tr",{children:Di.jsx("td",{colSpan:8,children:r})})}):Di.jsx(Di.Fragment,{})}function wa(){var e=ra(),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?b(new Date):v(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=g(n,i);o.push(a)}return o}(o,i,a);return Di.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Di.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Di.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 Oa(){var e,t=ra(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:wa;return Di.jsx("thead",{style:n.head,className:r.head,children:Di.jsx(i,{})})}function xa(e){var t=ra(),r=t.locale,n=t.formatters.formatDay;return Di.jsx(Di.Fragment,{children:n(e.date,{locale:r})})}var Ea=e.createContext(void 0);function ja(e){if(!qi(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Di.jsx(Ea.Provider,{value:t,children:e.children})}return Di.jsx(ka,{initialProps:e.initialProps,children:e.children})}function ka(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 R(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?Yi([],n):[];if(r.selected){var u=c.findIndex((function(t){return R(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 Di.jsx(Ea.Provider,{value:l,children:r})}function Sa(){var t=e.useContext(Ea);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var Pa,Ca=e.createContext(void 0);function Ra(e){if(!Ki(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Di.jsx(Ca.Provider,{value:t,children:e.children})}return Di.jsx(za,{initialProps:e.initialProps,children:e.children})}function za(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],R(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:Se(i,l-1),before:g(i,l-1)}),i&&a&&c.disabled.push({after:i,before:g(i,l-1)}),!i&&a&&c.disabled.push({after:Se(a,l-1),before:g(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:g(i,1-s)}),c.disabled.push({after:g(i,s-1)})),i&&a){var u=s-(j(a,i)+1);c.disabled.push({before:Se(i,u)}),c.disabled.push({after:g(a,u)})}!i&&a&&(c.disabled.push({before:g(a,1-s)}),c.disabled.push({after:g(a,s-1)}))}return Di.jsx(Ca.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(R(o,e)&&R(n,e))return;if(R(o,e))return{from:o,to:void 0};if(R(n,e))return;return Ee(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Ee(e,o)?{from:o,to:e}:{from:e,to:o}:n?je(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 Ta(){var t=e.useContext(Ca);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function La(e){return Array.isArray(e)?Yi([],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"}(Pa||(Pa={}));var Na=Pa.Selected,Ma=Pa.Disabled,Ia=Pa.Hidden,_a=Pa.Today,Aa=Pa.RangeEnd,Da=Pa.RangeMiddle,Ba=Pa.RangeStart,Fa=Pa.Outside;var Wa=e.createContext(void 0);function Va(e){var t=ra(),r=function(e,t,r){var n,o=((n={})[Na]=La(e.selected),n[Ma]=La(e.disabled),n[Ia]=La(e.hidden),n[_a]=[e.today],n[Aa]=[],n[Da]=[],n[Ba]=[],n[Fa]=[],n);return e.fromDate&&o[Ma].push({before:e.fromDate}),e.toDate&&o[Ma].push({after:e.toDate}),qi(e)?o[Ma]=o[Ma].concat(t.modifiers[Ma]):Ki(e)&&(o[Ma]=o[Ma].concat(r.modifiers[Ma]),o[Ba]=r.modifiers[Ba],o[Da]=r.modifiers[Da],o[Aa]=r.modifiers[Aa]),o}(t,Sa(),Ta()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=La(n)})),t}(t.modifiers),o=Gi(Gi({},r),n);return Di.jsx(Wa.Provider,{value:o,children:e.children})}function Ha(){var t=e.useContext(Wa);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function Ua(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(z(t))return R(e,t);if(function(e){return Array.isArray(e)&&e.every(z)}(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?(j(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),j(e,n)>=0&&j(o,e)>=0):o?R(o,e):!!n&&R(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=j(t.before,e)>0,n=j(t.after,e)<0;return Ee(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?j(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?j(t.before,e)>0:"function"==typeof t&&t(e)}))}function $a(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return Ua(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!ke(e,r)&&(o.outside=!0),o}function Ga(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:g,week:k,month:h,year:S,startOfWeek:function(e){return o.ISOWeek?b(e):v(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?A(e):_(e,{locale:f,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?d=P([c,d]):"after"===n&&u&&(d=C([u,d]));var p=!0;if(i){var y=$a(d,i);p=!y.disabled&&!y.hidden}return p?d:l.count>365?l.lastFocused:Ga(d,{moveBy:r,direction:n,context:o,modifiers:i,retry:Gi(Gi({},l),{count:l.count+1})})}var Ya=e.createContext(void 0);function qa(t){var r=fa(),n=Ha(),o=e.useState(),i=o[0],a=o[1],l=e.useState(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=N(e[0]),i=L(e[e.length-1]),a=o;a<=i;){var l=$a(a,t);if(l.disabled||l.hidden)a=g(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=g(a,1)}}return n||r}(r.displayMonths,n),f=(null!=i?i:s&&r.isDateDisplayed(s))?s:u,d=function(e){a(e)},p=ra(),h=function(e,t){if(i){var o=Ga(i,{moveBy:e,direction:t,context:p,modifiers:n});R(i,o)||(r.goToDate(o,i),d(o))}},y={focusedDay:i,focusTarget:f,blur:function(){c(i),a(void 0)},focus:d,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}};return Di.jsx(Ya.Provider,{value:y,children:t.children})}function Ka(){var t=e.useContext(Ya);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var Xa=e.createContext(void 0);function Ja(e){if(!Xi(e.initialProps)){var t={selected:void 0};return Di.jsx(Xa.Provider,{value:t,children:e.children})}return Di.jsx(Za,{initialProps:e.initialProps,children:e.children})}function Za(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 Di.jsx(Xa.Provider,{value:n,children:r})}function Qa(){var t=e.useContext(Xa);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function el(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(Pa).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function tl(t,r,n){var o,i,a,l=ra(),s=Ka(),c=function(e,t){return $a(e,Ha(),t)}(t,r),u=function(e,t){var r=ra(),n=Qa(),o=Sa(),i=Ta(),a=Ka(),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,m=a.focusStartOfWeek,v=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;Xi(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):qi(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):Ki(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(),m();break;case"End":n.preventDefault(),n.stopPropagation(),v()}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}(t,c),f=function(){var e=ra(),t=Qa(),r=Sa(),n=Ta();return Xi(e)?t.selected:qi(e)?r.selected:Ki(e)?n.selected:void 0}(),d=Boolean(l.onDayClick||"default"!==l.mode);e.useEffect((function(){var e;c.outside||s.focusedDay&&d&&R(s.focusedDay,t)&&(null===(e=n.current)||void 0===e||e.focus())}),[s.focusedDay,t,n,d,c.outside]);var p=el(l,c).join(" "),g=function(e,t){var r=Gi({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=Gi(Gi({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(l,c),h=Boolean(c.outside&&!l.showOutsideDays||c.hidden),y=null!==(a=null===(i=l.components)||void 0===i?void 0:i.DayContent)&&void 0!==a?a:xa,m={style:g,className:p,children:Di.jsx(y,{date:t,displayMonth:r,activeModifiers:c}),role:"gridcell"},v=s.focusTarget&&R(s.focusTarget,t)&&!c.outside,b=s.focusedDay&&R(s.focusedDay,t),w=Gi(Gi(Gi({},m),((o={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,o.tabIndex=b||v?0:-1,o)),u);return{isButton:d,isHidden:h,activeModifiers:c,selectedDays:f,buttonProps:w,divProps:m}}function rl(t){var r=e.useRef(null),n=tl(t.date,t.displayMonth,r);return n.isHidden?Di.jsx("div",{role:"gridcell"}):n.isButton?Di.jsx(ha,Gi({name:"day",ref:r},n.buttonProps)):Di.jsx("div",Gi({},n.divProps))}function nl(e){var t=e.number,r=e.dates,n=ra(),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 Di.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Di.jsx(ha,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function ol(e){var t,r,n,o=ra(),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:rl,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:nl;return l&&(n=Di.jsx("td",{className:a.cell,style:i.cell,children:Di.jsx(u,{number:e.weekNumber,dates:e.dates})})),Di.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Di.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Di.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+p(e)/1e3)}(t))}))]})}function il(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?A(t):_(t,r),o=(null==r?void 0:r.ISOWeek)?b(e):v(e,r),i=j(n,o),a=[],l=0;l<=i;l++)a.push(g(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?q(t):X(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 al(e){var t,r,n,o=ra(),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=il(N(e),L(e),t);if(null==t?void 0:t.useFixedWeeks){var n=xe(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=k(i,6-n),l=il(k(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:Oa,y=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:ol,m=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:ba;return Di.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Di.jsx(h,{}),Di.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Di.jsx(y,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Di.jsx(m,{displayMonth:e.displayMonth})]})}var ll="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,sl=!1,cl=0;function ul(){return"react-day-picker-".concat(++cl)}function fl(t){var r,n,o=ra(),i=o.dir,a=o.classNames,l=o.styles,s=o.components,c=fa().displayMonths,u=function(t){var r,n=null!=t?t:sl?ul():null,o=e.useState(n),i=o[0],a=o[1];return ll((function(){null===i&&a(ul())}),[]),e.useEffect((function(){!1===sl&&(sl=!0)}),[]),null!==(r=null!=t?t:i)&&void 0!==r?r:void 0}(o.id?"".concat(o.id,"-").concat(t.displayIndex):void 0),f=o.id?"".concat(o.id,"-grid-").concat(t.displayIndex):void 0,d=[a.month],p=l.month,g=0===t.displayIndex,h=t.displayIndex===c.length-1,y=!g&&!h;"rtl"===i&&(h=(r=[g,h])[0],g=r[1]),g&&(d.push(a.caption_start),p=Gi(Gi({},p),l.caption_start)),h&&(d.push(a.caption_end),p=Gi(Gi({},p),l.caption_end)),y&&(d.push(a.caption_between),p=Gi(Gi({},p),l.caption_between));var m=null!==(n=null==s?void 0:s.Caption)&&void 0!==n?n:va;return Di.jsxs("div",{className:d.join(" "),style:p,children:[Di.jsx(m,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),Di.jsx(al,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function dl(e){var t=ra(),r=t.classNames,n=t.styles;return Di.jsx("div",{className:r.months,style:n.months,children:e.children})}function pl(t){var r,n,o=t.initialProps,i=ra(),a=Ka(),l=fa(),s=e.useState(!1),c=s[0],u=s[1];e.useEffect((function(){i.initialFocus&&a.focusTarget&&(c||(a.focus(a.focusTarget),u(!0)))}),[i.initialFocus,c,a.focus,a.focusTarget,a]);var f=[i.classNames.root,i.className];i.numberOfMonths>1&&f.push(i.classNames.multiple_months),i.showWeekNumber&&f.push(i.classNames.with_weeknumber);var d=Gi(Gi({},i.styles.root),i.style),p=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return Gi(Gi({},e),((r={})[t]=o[t],r))}),{}),g=null!==(n=null===(r=o.components)||void 0===r?void 0:r.Months)&&void 0!==n?n:dl;return Di.jsx("div",Gi({className:f.join(" "),style:d,dir:i.dir,id:i.id,nonce:o.nonce,title:o.title,lang:o.lang},p,{children:Di.jsx(g,{children:l.displayMonths.map((function(e,t){return Di.jsx(fl,{displayIndex:t,displayMonth:e},t)}))})}))}function gl(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 Di.jsx(ta,{initialProps:r,children:Di.jsx(ua,{children:Di.jsx(Ja,{initialProps:r,children:Di.jsx(ja,{initialProps:r,children:Di.jsx(Ra,{initialProps:r,children:Di.jsx(Va,{children:Di.jsx(qa,{children:t})})})})})})})}function hl(e){return Di.jsx(gl,Gi({},e,{children:Di.jsx(pl,{initialProps:e})}))}function yl(e){var t=e.className,r=e.classNames,o=e.showOutsideDays,l=void 0===o||o,s=a(e,["className","classNames","showOutsideDays"]);return n.createElement(hl,i({showOutsideDays:l,className:li("p-3",t),classNames:i({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:li(Ui({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:li("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"===s.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:li(Ui({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"},r),components:{IconLeft:function(){return n.createElement(bi,{className:"h-4 w-4"})},IconRight:function(){return n.createElement(wi,{className:"h-4 w-4"})}}},s))}function ml(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function vl(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;r=[...r,o];const l=t=>{const{scope:r,children:o,...l}=t,s=r?.[e]?.[a]||i,c=n.useMemo((()=>l),Object.values(l));return Di.jsx(s.Provider,{value:c,children:o})};return l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e]?.[a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},bl(o,...t)]}function bl(...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 o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}yl.displayName="Calendar";var wl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=n.forwardRef(((e,r)=>{const{asChild:n,...o}=e,i=n?Bi:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Di.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Ol(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e})),n.useMemo((()=>(...e)=>t.current?.(...e)),[])}function xl(e,t=globalThis?.document){const r=Ol(e);n.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[r,t])}var El,jl="dismissableLayer.update",kl="dismissableLayer.pointerDownOutside",Sl="dismissableLayer.focusOutside",Pl=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cl=n.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=e,u=n.useContext(Pl),[f,d]=n.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=n.useState({}),h=Ri(t,(e=>d(e))),y=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(m),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=v,x=function(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1),i=n.useRef((()=>{}));return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let n=function(){zl(kl,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{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(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1);return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){zl(Sl,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{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 xl((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),n.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(El=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Rl(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=El)}}),[f,p,r,u]),n.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Rl())}),[f,u]),n.useEffect((()=>{const e=()=>g({});return document.addEventListener(jl,e),()=>document.removeEventListener(jl,e)}),[]),Di.jsx(wl.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...e.style},onFocusCapture:ml(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ml(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ml(e.onPointerDownCapture,x.onPointerDownCapture)})}));Cl.displayName="DismissableLayer";function Rl(){const e=new CustomEvent(jl);document.dispatchEvent(e)}function zl(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?function(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}(i,a):i.dispatchEvent(a)}n.forwardRef(((e,t)=>{const r=n.useContext(Pl),o=n.useRef(null),i=Ri(t,o);return n.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),Di.jsx(wl.div,{...e,ref:i})})).displayName="DismissableLayerBranch";var Tl=0;function Ll(){n.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nl()),document.body.insertAdjacentElement("beforeend",e[1]??Nl()),Tl++,()=>{1===Tl&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Tl--}}),[])}function Nl(){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 Ml="focusScope.autoFocusOnMount",Il="focusScope.autoFocusOnUnmount",_l={bubbles:!1,cancelable:!0},Al=n.forwardRef(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[s,c]=n.useState(null),u=Ol(i),f=Ol(a),d=n.useRef(null),p=Ri(t,(e=>c(e))),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Wl(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Wl(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Wl(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]),n.useEffect((()=>{if(s){Vl.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Ml,_l);s.addEventListener(Ml,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Wl(n,{select:t}),document.activeElement!==r)return}((e=Dl(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Wl(s))}return()=>{s.removeEventListener(Ml,u),setTimeout((()=>{const e=new CustomEvent(Il,_l);s.addEventListener(Il,f),s.dispatchEvent(e),e.defaultPrevented||Wl(t??document.body,{select:!0}),s.removeEventListener(Il,f),Vl.remove(g)}),0)}}var e}),[s,u,f,g]);const h=n.useCallback((e=>{if(!r&&!o)return;if(g.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=Dl(e),r=Bl(t,e),n=Bl(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Wl(i,{select:!0})):(e.preventDefault(),r&&Wl(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,g.paused]);return Di.jsx(wl.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Dl(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 Bl(e,t){for(const r of e)if(!Fl(r,{upTo:t}))return r}function Fl(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 Wl(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()}}Al.displayName="FocusScope";var Vl=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Hl(e,t),e.unshift(t)},remove(t){e=Hl(e,t),e[0]?.resume()}}}();function Hl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Ul=Boolean(globalThis?.document)?n.useLayoutEffect:()=>{},$l=n["useId".toString()]||(()=>{}),Gl=0;function Yl(e){const[t,r]=n.useState($l());return Ul((()=>{r((e=>e??String(Gl++)))}),[e]),t?`radix-${t}`:""}const ql=["top","right","bottom","left"],Kl=Math.min,Xl=Math.max,Jl=Math.round,Zl=Math.floor,Ql=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ts={start:"end",end:"start"};function rs(e,t,r){return Xl(e,Kl(t,r))}function ns(e,t){return"function"==typeof e?e(t):e}function os(e){return e.split("-")[0]}function is(e){return e.split("-")[1]}function as(e){return"x"===e?"y":"x"}function ls(e){return"y"===e?"height":"width"}function ss(e){return["top","bottom"].includes(os(e))?"y":"x"}function cs(e){return as(ss(e))}function us(e){return e.replace(/start|end/g,(e=>ts[e]))}function fs(e){return e.replace(/left|right|bottom|top/g,(e=>es[e]))}function ds(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 ps(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 gs(e,t,r){let{reference:n,floating:o}=e;const i=ss(t),a=cs(t),l=ls(a),s=os(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(is(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1)}return p}async function hs(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}=ns(t,e),g=ds(p),h=l[d?"floating"===f?"reference":"floating":f],y=ps(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})),m="floating"===f?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=ps(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:v,strategy:s}):m);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 ys(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ms(e){return ql.some((t=>e[t]>=0))}function vs(){return"undefined"!=typeof window}function bs(e){return xs(e)?(e.nodeName||"").toLowerCase():"#document"}function ws(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Os(e){var t;return null==(t=(xs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xs(e){return!!vs()&&(e instanceof Node||e instanceof ws(e).Node)}function Es(e){return!!vs()&&(e instanceof Element||e instanceof ws(e).Element)}function js(e){return!!vs()&&(e instanceof HTMLElement||e instanceof ws(e).HTMLElement)}function ks(e){return!(!vs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ws(e).ShadowRoot)}function Ss(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Ls(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Ps(e){return["table","td","th"].includes(bs(e))}function Cs(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Rs(e){const t=zs(),r=Es(e)?Ls(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 zs(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ts(e){return["html","body","#document"].includes(bs(e))}function Ls(e){return ws(e).getComputedStyle(e)}function Ns(e){return Es(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ms(e){if("html"===bs(e))return e;const t=e.assignedSlot||e.parentNode||ks(e)&&e.host||Os(e);return ks(t)?t.host:t}function Is(e){const t=Ms(e);return Ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:js(t)&&Ss(t)?t:Is(t)}function _s(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Is(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ws(o);if(i){const e=As(a);return t.concat(a,a.visualViewport||[],Ss(o)?o:[],e&&r?_s(e):[])}return t.concat(o,_s(o,[],r))}function As(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ds(e){const t=Ls(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=js(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=Jl(r)!==i||Jl(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function Bs(e){return Es(e)?e:e.contextElement}function Fs(e){const t=Bs(e);if(!js(t))return Ql(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Ds(t);let a=(i?Jl(r.width):r.width)/n,l=(i?Jl(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Ws=Ql(0);function Vs(e){const t=ws(e);return zs()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ws}function Hs(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Bs(e);let a=Ql(1);t&&(n?Es(n)&&(a=Fs(n)):a=Fs(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ws(e))&&t}(i,r,n)?Vs(i):Ql(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=ws(i),t=n&&Es(n)?ws(n):n;let r=e,o=As(r);for(;o&&n&&t!==r;){const e=Fs(o),t=o.getBoundingClientRect(),n=Ls(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=ws(o),o=As(r)}}return ps({width:u,height:f,x:s,y:c})}function Us(e,t){const r=Ns(e).scrollLeft;return t?t.left+r:Hs(Os(e)).left+r}function $s(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Us(e,n)),y:n.top+t.scrollTop}}function Gs(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ws(e),n=Os(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=zs();(!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=Os(e),r=Ns(e),n=e.ownerDocument.body,o=Xl(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Xl(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Us(e);const l=-r.scrollTop;return"rtl"===Ls(n).direction&&(a+=Xl(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Os(e));else if(Es(t))n=function(e,t){const r=Hs(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=js(e)?Fs(e):Ql(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=Vs(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ps(n)}function Ys(e,t){const r=Ms(e);return!(r===t||!Es(r)||Ts(r))&&("fixed"===Ls(r).position||Ys(r,t))}function qs(e,t,r){const n=js(t),o=Os(t),i="fixed"===r,a=Hs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Ql(0);if(n||!n&&!i)if(("body"!==bs(t)||Ss(o))&&(l=Ns(t)),n){const e=Hs(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Us(o));const c=!o||n||i?Ql(0):$s(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 Ks(e){return"static"===Ls(e).position}function Xs(e,t){if(!js(e)||"fixed"===Ls(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Os(e)===r&&(r=r.ownerDocument.body),r}function Js(e,t){const r=ws(e);if(Cs(e))return r;if(!js(e)){let t=Ms(e);for(;t&&!Ts(t);){if(Es(t)&&!Ks(t))return t;t=Ms(t)}return r}let n=Xs(e,t);for(;n&&Ps(n)&&Ks(n);)n=Xs(n,t);return n&&Ts(n)&&Ks(n)&&!Rs(n)?r:n||function(e){let t=Ms(e);for(;js(t)&&!Ts(t);){if(Rs(t))return t;if(Cs(t))return null;t=Ms(t)}return null}(e)||r}const Zs={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=Os(n),l=!!t&&Cs(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=Ql(1);const u=Ql(0),f=js(n);if((f||!f&&!i)&&(("body"!==bs(n)||Ss(a))&&(s=Ns(n)),js(n))){const e=Hs(n);c=Fs(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const d=!a||f||i?Ql(0):$s(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:Os,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?Cs(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=_s(e,[],!1).filter((e=>Es(e)&&"body"!==bs(e))),o=null;const i="fixed"===Ls(e).position;let a=i?Ms(e):e;for(;Es(a)&&!Ts(a);){const t=Ls(a),r=Rs(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Ss(a)&&!r&&Ys(e,a))?n=n.filter((e=>e!==a)):o=t,a=Ms(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=Gs(t,r,o);return e.top=Xl(n.top,e.top),e.right=Kl(n.right,e.right),e.bottom=Kl(n.bottom,e.bottom),e.left=Xl(n.left,e.left),e}),Gs(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Js,getElementRects:async function(e){const t=this.getOffsetParent||Js,r=this.getDimensions,n=await r(e.floating);return{reference:qs(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}=Ds(e);return{width:t,height:r}},getScale:Fs,isElement:Es,isRTL:function(e){return"rtl"===Ls(e).direction}};function Qs(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=Bs(e),u=o||i?[...c?_s(c):[],..._s(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=Os(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:-Zl(u)+"px "+-Zl(o.clientWidth-(c+f))+"px "+-Zl(o.clientHeight-(u+d))+"px "+-Zl(c)+"px",threshold:Xl(0,Kl(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?Hs(e):null;return s&&function t(){const n=Hs(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 ec=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=os(r),l=is(r),s="y"===ss(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f=ns(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}}}}},tc=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}=ns(e,t),c={x:r,y:n},u=await hs(t,s),f=ss(os(o)),d=as(f);let p=c[d],g=c[f];if(i){const e="y"===d?"bottom":"right";p=rs(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";g=rs(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}}}}}},rc=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}=ns(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const m=os(o),v=ss(l),b=os(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=d||(b||!h?[fs(l)]:function(e){const t=fs(e);return[us(e),t,us(t)]}(l)),x="none"!==g;!d&&x&&O.push(...function(e,t,r,n){const o=is(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[]}}(os(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(us)))),i}(l,h,g,w));const E=[l,...O],j=await hs(t,y),k=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&k.push(j[m]),f){const e=function(e,t,r){void 0===r&&(r=!1);const n=is(e),o=cs(e),i=ls(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=fs(a)),[a,fs(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 R;const e=null==(R=S.filter((e=>{if(x){const t=ss(e.placement);return t===v||"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:R[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},nc=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}=ns(e,t),u=await hs(t,c),f=os(o),d=is(o),p="y"===ss(o),{width:g,height:h}=i.floating;let y,m;"top"===f||"bottom"===f?(y=f,m=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(m=f,y="end"===d?"top":"bottom");const v=h-u.top-u.bottom,b=g-u.left-u.right,w=Kl(h-u[y],v),O=Kl(g-u[m],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=v),x&&!d){const e=Xl(u.left,0),t=Xl(u.right,0),r=Xl(u.top,0),n=Xl(u.bottom,0);p?j=g-2*(0!==e||0!==t?e+t:Xl(u.left,u.right)):E=h-2*(0!==r||0!==n?r+n:Xl(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}}:{}}}},oc=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ns(e,t);switch(n){case"referenceHidden":{const e=ys(await hs(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ms(e)}}}case"escaped":{const e=ys(await hs(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:ms(e)}}}default:return{}}}}},ic=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}=ns(e,t)||{};if(null==c)return{};const f=ds(u),d={x:r,y:n},p=cs(o),g=ls(p),h=await a.getDimensions(c),y="y"===p,m=y?"top":"left",v=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=Kl(f[m],k),P=Kl(f[v],k),C=S,R=E-h[g]-P,z=E/2-h[g]/2+j,T=rs(C,z,R),L=!s.arrow&&null!=is(o)&&z!==T&&i.reference[g]/2-(z<C?S:P)-h[g]/2<0,N=L?z<C?z-C:z-R:0;return{[p]:d[p]+N,data:{[p]:T,centerOffset:z-T-N,...L&&{alignmentOffset:N}},reset:L}}}),ac=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}=ns(e,t),u={x:r,y:n},f=ss(o),d=as(f);let p=u[d],g=u[f];const h=ns(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 m,v;const e="y"===d?"width":"height",t=["top","left"].includes(os(o)),r=i.reference[f]-i.floating[e]+(t&&(null==(m=a.offset)?void 0:m[f])||0)+(t?0:y.crossAxis),n=i.reference[f]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[f])||0)-(t?y.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[d]:p,[f]:g}}}},lc=(e,t,r)=>{const n=new Map,o={platform:Zs,...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}=gs(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:m,data:v,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!=m?m:f,p={...p,[i]:{...p[i],...v}},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}=gs(c,d,s))),r=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var sc="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function cc(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(!cc(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)&&!cc(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function uc(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fc(e,t){const r=uc(e);return Math.round(t*r)/r}function dc(e){const t=n.useRef(e);return sc((()=>{t.current=e})),t}const pc=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?ic({element:r.current,padding:n}).fn(t):{}:r?ic({element:r,padding:n}).fn(t):{};var o}}),gc=(e,t)=>({...ec(e),options:[e,t]}),hc=(e,t)=>({...tc(e),options:[e,t]}),yc=(e,t)=>({...ac(e),options:[e,t]}),mc=(e,t)=>({...rc(e),options:[e,t]}),vc=(e,t)=>({...nc(e),options:[e,t]}),bc=(e,t)=>({...oc(e),options:[e,t]}),wc=(e,t)=>({...pc(e),options:[e,t]});var Oc=n.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Di.jsx(wl.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Di.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Oc.displayName="Arrow";var xc=Oc;function Ec(...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 o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}var jc="Popper",[kc,Sc]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Di.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},Ec(o,...t)]}(jc),[Pc,Cc]=kc(jc),Rc=e=>{const{__scopePopper:t,children:r}=e,[o,i]=n.useState(null);return Di.jsx(Pc,{scope:t,anchor:o,onAnchorChange:i,children:r})};Rc.displayName=jc;var zc="PopperAnchor",Tc=n.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:o,...i}=e,a=Cc(zc,r),l=n.useRef(null),s=Ri(t,l);return n.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Di.jsx(wl.div,{...i,ref:s})}));Tc.displayName=zc;var Lc="PopperContent",[Nc,Mc]=kc(Lc),Ic=n.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:a=0,align:l="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:y,...m}=e,v=Cc(Lc,r),[b,w]=n.useState(null),O=Ri(t,(e=>w(e))),[x,E]=n.useState(null),j=function(e){const[t,r]=n.useState(void 0);return Ul((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),t}(x),k=j?.width??0,S=j?.height??0,P=i+("center"!==l?"-"+l:""),C="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(f)?f:[f],z=R.length>0,T={padding:C,boundary:R.filter(Bc),altBoundary:z},{refs:L,floatingStyles:N,placement:M,isPositioned:I,middlewareData:_}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:a,elements:{reference:l,floating:s}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[d,p]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=n.useState(i);cc(g,i)||h(i);const[y,m]=n.useState(null),[v,b]=n.useState(null),w=n.useCallback((e=>{e!==j.current&&(j.current=e,m(e))}),[]),O=n.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[]),x=l||y,E=s||v,j=n.useRef(null),k=n.useRef(null),S=n.useRef(d),P=null!=u,C=dc(u),R=dc(a),z=dc(f),T=n.useCallback((()=>{if(!j.current||!k.current)return;const e={placement:t,strategy:r,middleware:g};R.current&&(e.platform=R.current),lc(j.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==z.current};L.current&&!cc(S.current,t)&&(S.current=t,o.flushSync((()=>{p(t)})))}))}),[g,t,r,R,z]);sc((()=>{!1===f&&S.current.isPositioned&&(S.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const L=n.useRef(!1);sc((()=>(L.current=!0,()=>{L.current=!1})),[]),sc((()=>{if(x&&(j.current=x),E&&(k.current=E),x&&E){if(C.current)return C.current(x,E,T);T()}}),[x,E,T,C,P]);const N=n.useMemo((()=>({reference:j,floating:k,setReference:w,setFloating:O})),[w,O]),M=n.useMemo((()=>({reference:x,floating:E})),[x,E]),I=n.useMemo((()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=fc(M.floating,d.x),n=fc(M.floating,d.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...uc(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,M.floating,d.x,d.y]);return n.useMemo((()=>({...d,update:T,refs:N,elements:M,floatingStyles:I})),[d,T,N,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>Qs(...e,{animationFrame:"always"===h}),elements:{reference:v.anchor},middleware:[gc({mainAxis:a+S,alignmentAxis:s}),u&&hc({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?yc():void 0,...T}),u&&mc({...T}),vc({...T,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&&wc({element:x,padding:c}),Fc({arrowWidth:k,arrowHeight:S}),g&&bc({strategy:"referenceHidden",...T})]}),[A,D]=Wc(M),B=Ol(y);Ul((()=>{I&&B?.()}),[I,B]);const F=_.arrow?.x,W=_.arrow?.y,V=0!==_.arrow?.centerOffset,[H,U]=n.useState();return Ul((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Di.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:I?N.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:e.dir,children:Di.jsx(Nc,{scope:r,placedSide:A,onArrowChange:E,arrowX:F,arrowY:W,shouldHideArrow:V,children:Di.jsx(wl.div,{"data-side":A,"data-align":D,...m,ref:O,style:{...m.style,animation:I?void 0:"none"}})})})}));Ic.displayName=Lc;var _c="PopperArrow",Ac={top:"bottom",right:"left",bottom:"top",left:"right"},Dc=n.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Mc(_c,r),i=Ac[o.placedSide];return Di.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:Di.jsx(xc,{...n,ref:t,style:{...n.style,display:"block"}})})}));function Bc(e){return null!==e}Dc.displayName=_c;var Fc=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]=Wc(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 Wc(e){const[t,r="center"]=e.split("-");return[t,r]}var Vc=Rc,Hc=Tc,Uc=Ic,$c=Dc,Gc=n.forwardRef(((e,r)=>{const{container:o,...i}=e,[a,l]=n.useState(!1);Ul((()=>l(!0)),[]);const s=o||a&&globalThis?.document?.body;return s?t.createPortal(Di.jsx(wl.div,{...i,ref:r}),s):null}));Gc.displayName="Portal";var Yc=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef({}),i=n.useRef(e),a=n.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return n.useReducer(((e,r)=>t[e][r]??e),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect((()=>{const e=qc(o.current);a.current="mounted"===s?e:"none"}),[s]),Ul((()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=qc(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),Ul((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=qc(o.current).includes(n.animationName);if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},l=e=>{e.target===t&&(a.current=qc(o.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:n.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=Ri(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 r||o.isPresent?n.cloneElement(i,{ref:a}):null};function qc(e){return e?.animationName||"none"}function Kc({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,i]=function({defaultProp:e,onChange:t}){const r=n.useState(e),[o]=r,i=n.useRef(o),a=Ol(t);return n.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,l=a?e:o,s=Ol(r);return[l,n.useCallback((t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)}),[a,e,i,s])]}Yc.displayName="Presence";var Xc=new WeakMap,Jc=new WeakMap,Zc={},Qc=0,eu=function(e){return e&&(e.host||eu(e.parentNode))},tu=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=eu(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]);Zc[r]||(Zc[r]=new WeakMap);var i=Zc[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=(Xc.get(e)||0)+1,c=(i.get(e)||0)+1;Xc.set(e,s),i.set(e,c),a.push(e),1===s&&o&&Jc.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(),Qc++,function(){a.forEach((function(e){var t=Xc.get(e)-1,o=i.get(e)-1;Xc.set(e,t),i.set(e,o),t||(Jc.has(e)||e.removeAttribute(n),Jc.delete(e)),o||e.removeAttribute(r)})),--Qc||(Xc=new WeakMap,Xc=new WeakMap,Jc=new WeakMap,Zc={})}},ru=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]"))),tu(n,o,r,"aria-hidden")):function(){return null}},nu="right-scroll-bar-position",ou="width-before-scroll-bar";function iu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var au="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,lu=new WeakMap;function su(t,r){var n,o,i,a=(n=null,o=function(e){return t.forEach((function(t){return iu(t,e)}))},(i=e.useState((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return au((function(){var e=lu.get(a);if(e){var r=new Set(e),n=new Set(t),o=a.current;r.forEach((function(e){n.has(e)||iu(e,null)})),n.forEach((function(e){r.has(e)||iu(e,o)}))}lu.set(a,t)}),[t]),a}function cu(e){return e}function uu(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=cu);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=i({async:!0,ssr:!1},e),t}var fu=function(e){var t=e.sideCar,r=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,i({},r))};function du(e,t){return e.useMedium(t),fu}fu.isSideCarExport=!0;var pu=uu(),gu=function(){},hu=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:gu,onWheelCapture:gu,onTouchMoveCapture:gu}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,h=e.sideCar,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=e.gapMode,x=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,j=su([r,t]),k=i(i({},x),l);return n.createElement(n.Fragment,null,p&&n.createElement(E,{sideCar:pu,removeScrollBar:d,shards:g,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:O}),c?n.cloneElement(n.Children.only(u),i(i({},k),{ref:j})):n.createElement(w,i({},k,{className:f,ref:j}),u))}));hu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},hu.classNames={fullWidth:ou,zeroRight:nu};var yu=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__};var mu=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=yu();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)}}},vu=function(){var e,t=(e=mu(),function(t,r){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},bu={left:0,top:0,right:0,gap:0},wu=function(e){return parseInt(e||"",10)||0},Ou=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return bu;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[wu(r),wu(n),wu(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])}},xu=vu(),Eu="data-scroll-locked",ju=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(Eu,"] {\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(nu," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(ou," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(nu," .").concat(nu," {\n right: 0 ").concat(n,";\n }\n \n .").concat(ou," .").concat(ou," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Eu,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},ku=function(){var e=parseInt(document.body.getAttribute(Eu)||"0",10);return isFinite(e)?e:0},Su=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect((function(){return document.body.setAttribute(Eu,(ku()+1).toString()),function(){var e=ku()-1;e<=0?document.body.removeAttribute(Eu):document.body.setAttribute(Eu,e.toString())}}),[]);var a=n.useMemo((function(){return Ou(i)}),[i]);return n.createElement(xu,{styles:ju(a,!t,i,r?"":"!important")})},Pu=!1;if("undefined"!=typeof window)try{var Cu=Object.defineProperty({},"passive",{get:function(){return Pu=!0,!0}});window.addEventListener("test",Cu,Cu),window.removeEventListener("test",Cu,Cu)}catch(e){Pu=!1}var Ru=!!Pu&&{passive:!1},zu=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])},Tu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Lu(e,n)){var o=Nu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Lu=function(e,t){return"v"===e?function(e){return zu(e,"overflowY")}(t):function(e){return zu(e,"overflowX")}(t)},Nu=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},Mu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Iu=function(e){return[e.deltaX,e.deltaY]},_u=function(e){return e&&"current"in e?e.current:e},Au=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Du=0,Bu=[];function Fu(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wu=du(pu,(function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(Du++)[0],a=n.useState(vu)[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(_u),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var n,i=Mu(e),a=r.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=Tu(f,u);if(!d)return!0;if(d?n=f:(n="v"===f?"h":"v",d=Tu(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var p=o.current||n;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=Nu(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&Lu(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)}),[]),u=n.useCallback((function(e){var r=e;if(Bu.length&&Bu[Bu.length-1]===a){var n="deltaY"in r?Iu(r):Mu(r),o=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(_u).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:Fu(n)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=n.useCallback((function(e){r.current=Mu(e),o.current=void 0}),[]),p=n.useCallback((function(t){f(t.type,Iu(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,Mu(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return Bu.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ru),document.addEventListener("touchmove",u,Ru),document.addEventListener("touchstart",d,Ru),function(){Bu=Bu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Ru),document.removeEventListener("touchmove",u,Ru),document.removeEventListener("touchstart",d,Ru)}}),[]);var h=e.removeScrollBar,y=e.inert;return n.createElement(n.Fragment,null,y?n.createElement(a,{styles:Au(i)}):null,h?n.createElement(Su,{gapMode:e.gapMode}):null)})),Vu=n.forwardRef((function(e,t){return n.createElement(hu,i({},e,{ref:t,sideCar:Wu}))}));Vu.classNames=hu.classNames;var Hu="Popover",[Uu,$u]=vl(Hu,[Sc]),Gu=Sc(),[Yu,qu]=Uu(Hu),Ku=e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,s=Gu(t),c=n.useRef(null),[u,f]=n.useState(!1),[d=!1,p]=Kc({prop:o,defaultProp:i,onChange:a});return Di.jsx(Vc,{...s,children:Di.jsx(Yu,{scope:t,contentId:Yl(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:n.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:n.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:n.useCallback((()=>f(!1)),[]),modal:l,children:r})})};Ku.displayName=Hu;var Xu="PopoverAnchor";n.forwardRef(((e,t)=>{const{__scopePopover:r,...o}=e,i=qu(Xu,r),a=Gu(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return n.useEffect((()=>(l(),()=>s())),[l,s]),Di.jsx(Hc,{...a,...o,ref:t})})).displayName=Xu;var Ju="PopoverTrigger",Zu=n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=qu(Ju,r),i=Gu(r),a=Ri(t,o.triggerRef),l=Di.jsx(wl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uf(o.open),...n,ref:a,onClick:ml(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Di.jsx(Hc,{asChild:!0,...i,children:l})}));Zu.displayName=Ju;var Qu="PopoverPortal",[ef,tf]=Uu(Qu,{forceMount:void 0}),rf=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=qu(Qu,t);return Di.jsx(ef,{scope:t,forceMount:r,children:Di.jsx(Yc,{present:r||i.open,children:Di.jsx(Gc,{asChild:!0,container:o,children:n})})})};rf.displayName=Qu;var nf="PopoverContent",of=n.forwardRef(((e,t)=>{const r=tf(nf,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=qu(nf,e.__scopePopover);return Di.jsx(Yc,{present:n||i.open,children:i.modal?Di.jsx(af,{...o,ref:t}):Di.jsx(lf,{...o,ref:t})})}));of.displayName=nf;var af=n.forwardRef(((e,t)=>{const r=qu(nf,e.__scopePopover),o=n.useRef(null),i=Ri(t,o),a=n.useRef(!1);return n.useEffect((()=>{const e=o.current;if(e)return ru(e)}),[]),Di.jsx(Vu,{as:Bi,allowPinchZoom:!0,children:Di.jsx(sf,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ml(e.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:ml(e.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:ml(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),lf=n.forwardRef(((e,t)=>{const r=qu(nf,e.__scopePopover),o=n.useRef(!1),i=n.useRef(!1);return Di.jsx(sf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const n=t.target,a=r.triggerRef.current?.contains(n);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),sf=n.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=qu(nf,r),p=Gu(r);return Ll(),Di.jsx(Al,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Di.jsx(Cl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:Di.jsx(Uc,{"data-state":uf(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)"}})})})})),cf="PopoverClose";n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=qu(cf,r);return Di.jsx(wl.button,{type:"button",...n,ref:t,onClick:ml(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=cf;function uf(e){return e?"open":"closed"}n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Gu(r);return Di.jsx($c,{...o,...n,ref:t})})).displayName="PopoverArrow";var ff=rf,df=of,pf=Ku,gf=Zu,hf=n.forwardRef((function(e,t){var r=e.className,o=e.align,l=void 0===o?"center":o,s=e.sideOffset,c=void 0===s?4:s,u=a(e,["className","align","sideOffset"]);return n.createElement(ff,null,n.createElement(df,i({ref:t,align:l,sideOffset:c,className:li("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",r)},u)))}));function yf(e,[t,r]){return Math.min(r,Math.max(t,e))}function mf(...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 o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}hf.displayName=df.displayName;var vf=n.createContext(void 0);var bf=n.forwardRef(((e,t)=>Di.jsx(wl.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}})));bf.displayName="VisuallyHidden";var wf=[" ","Enter","ArrowUp","ArrowDown"],Of=[" ","Enter"],xf="Select",[Ef,jf,kf]=function(t){const r=t+"CollectionProvider",[o,i]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Di.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},mf(o,...t)]}(r),[a,l]=o(r,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:r,children:n}=t,o=e.useRef(null),i=e.useRef(new Map).current;return Di.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=r;const c=t+"CollectionSlot",u=e.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Ri(t,l(c,r).collectionRef);return Di.jsx(Bi,{ref:o,children:n})}));u.displayName=c;const f=t+"CollectionItemSlot",d="data-radix-collection-item",p=e.forwardRef(((t,r)=>{const{scope:n,children:o,...i}=t,a=e.useRef(null),s=Ri(r,a),c=l(f,n);return e.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Di.jsx(Bi,{[d]:"",ref:s,children:o})}));return p.displayName=f,[{Provider:s,Slot:u,ItemSlot:p},function(r){const n=l(t+"CollectionConsumer",r);return e.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]}(xf),[Sf,Pf]=vl(xf,[kf,Sc]),Cf=Sc(),[Rf,zf]=Sf(xf),[Tf,Lf]=Sf(xf),Nf=e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:g,form:h}=e,y=Cf(t),[m,v]=n.useState(null),[b,w]=n.useState(null),[O,x]=n.useState(!1),E=function(e){const t=n.useContext(vf);return e||t||"ltr"}(u),[j=!1,k]=Kc({prop:o,defaultProp:i,onChange:a}),[S,P]=Kc({prop:l,defaultProp:s,onChange:c}),C=n.useRef(null),R=!m||(h||!!m.closest("form")),[z,T]=n.useState(new Set),L=Array.from(z).map((e=>e.props.value)).join(";");return Di.jsx(Vc,{...y,children:Di.jsxs(Rf,{required:g,scope:t,trigger:m,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:Yl(),value:S,onValueChange:P,open:j,onOpenChange:k,dir:E,triggerPointerDownPosRef:C,disabled:p,children:[Di.jsx(Ef.Provider,{scope:t,children:Di.jsx(Tf,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:n.useCallback((e=>{T((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:r})}),R?Di.jsxs(bd,{"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?Di.jsx("option",{value:""}):null,Array.from(z)]},L):null]})})};Nf.displayName=xf;var Mf="SelectTrigger",If=n.forwardRef(((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,a=Cf(r),l=zf(Mf,r),s=l.disabled||o,c=Ri(t,l.onTriggerChange),u=jf(r),f=n.useRef("touch"),[d,p,g]=wd((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=Od(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 Di.jsx(Hc,{asChild:!0,...a,children:Di.jsx(wl.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":vd(l.value)?"":void 0,...i,ref:c,onClick:ml(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==f.current&&h(e)})),onPointerDown:ml(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:ml(i.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||wf.includes(e.key)&&(h(),e.preventDefault())}))})})}));If.displayName=Mf;var _f="SelectValue",Af=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=zf(_f,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,f=Ri(t,s.onValueNodeChange);return Ul((()=>{c(u)}),[c,u]),Di.jsx(wl.span,{...l,ref:f,style:{pointerEvents:"none"},children:vd(s.value)?Di.jsx(Di.Fragment,{children:a}):i})}));Af.displayName=_f;var Df=n.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Di.jsx(wl.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Df.displayName="SelectIcon";var Bf=e=>Di.jsx(Gc,{asChild:!0,...e});Bf.displayName="SelectPortal";var Ff="SelectContent",Wf=n.forwardRef(((e,t)=>{const r=zf(Ff,e.__scopeSelect),[i,a]=n.useState();if(Ul((()=>{a(new DocumentFragment)}),[]),!r.open){const t=i;return t?o.createPortal(Di.jsx(Hf,{scope:e.__scopeSelect,children:Di.jsx(Ef.Slot,{scope:e.__scopeSelect,children:Di.jsx("div",{children:e.children})})}),t):null}return Di.jsx($f,{...e,ref:t})}));Wf.displayName=Ff;var Vf=10,[Hf,Uf]=Sf(Ff),$f=n.forwardRef(((e,t)=>{const{__scopeSelect:r,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:m,...v}=e,b=zf(Ff,r),[w,O]=n.useState(null),[x,E]=n.useState(null),j=Ri(t,(e=>O(e))),[k,S]=n.useState(null),[P,C]=n.useState(null),R=jf(r),[z,T]=n.useState(!1),L=n.useRef(!1);n.useEffect((()=>{if(w)return ru(w)}),[w]),Ll();const N=n.useCallback((e=>{const[t,...r]=R().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}}),[R,x]),M=n.useCallback((()=>N([k,w])),[N,k,w]);n.useEffect((()=>{z&&M()}),[z,M]);const{onOpenChange:I,triggerPointerDownPosRef:_}=b;n.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,_]),n.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]=wd((e=>{const t=R().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=Od(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(L.current=!0))}),[b.value]),F=n.useCallback((()=>w?.focus()),[w]),W=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?Yf:Gf,H=V===Yf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:h,hideWhenDetached:y,avoidCollisions:m}:{};return Di.jsx(Hf,{scope:r,content:w,viewport:x,onViewportChange:E,itemRefCallback:B,selectedItem:k,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:z,searchRef:A,children:Di.jsx(Vu,{as:Bi,allowPinchZoom:!0,children:Di.jsx(Al,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ml(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Di.jsx(Cl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Di.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...H,onPlaced:()=>T(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ml(v.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=R().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((()=>N(t))),e.preventDefault()}}))})})})})})}));$f.displayName="SelectContentImpl";var Gf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,a=zf(Ff,r),l=Uf(Ff,r),[s,c]=n.useState(null),[u,f]=n.useState(null),d=Ri(t,(e=>f(e))),p=jf(r),g=n.useRef(!1),h=n.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:v,focusSelectedItem:b}=l,w=n.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&u&&y&&m&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),n=v.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-Vf,f=yf(i,[Vf,Math.max(Vf,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-Vf,f=yf(i,[Vf,Math.max(Vf,u-c)]);s.style.minWidth=l+"px",s.style.right=f+"px"}const i=p(),l=window.innerHeight-2*Vf,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*m.offsetHeight,w),x=window.getComputedStyle(y),E=parseInt(x.paddingTop,10),j=parseInt(x.paddingBottom,10),k=e.top+e.height/2-Vf,S=l-k,P=m.offsetHeight/2,C=d+h+(m.offsetTop+P),R=w-C;if(C<=k){const e=i.length>0&&m===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&&m===i[0].ref.current;s.style.top="0px";const t=Math.max(k,d+y.offsetTop+(e?E:0)+P)+R;s.style.height=t+"px",y.scrollTop=C-k+y.offsetTop}s.style.margin=`${Vf}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,m,v,a.dir,o]);Ul((()=>w()),[w]);const[O,x]=n.useState();Ul((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const E=n.useCallback((e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)}),[w,b]);return Di.jsx(qf,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:Di.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Di.jsx(wl.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));Gf.displayName="SelectItemAlignedPosition";var Yf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Vf,...i}=e,a=Cf(r);return Di.jsx(Uc,{...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)"}})}));Yf.displayName="SelectPopperPosition";var[qf,Kf]=Sf(Ff,{}),Xf="SelectViewport",Jf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,nonce:o,...i}=e,a=Uf(Xf,r),l=Kf(Xf,r),s=Ri(t,a.onViewportChange),c=n.useRef(0);return Di.jsxs(Di.Fragment,{children:[Di.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}),Di.jsx(Ef.Slot,{scope:r,children:Di.jsx(wl.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ml(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*Vf,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}))})})]})}));Jf.displayName=Xf;var Zf="SelectGroup",[Qf,ed]=Sf(Zf);n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Yl();return Di.jsx(Qf,{scope:r,id:o,children:Di.jsx(wl.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=Zf;var td="SelectLabel",rd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=ed(td,r);return Di.jsx(wl.div,{id:o.id,...n,ref:t})}));rd.displayName=td;var nd="SelectItem",[od,id]=Sf(nd),ad=n.forwardRef(((e,t)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...l}=e,s=zf(nd,r),c=Uf(nd,r),u=s.value===o,[f,d]=n.useState(a??""),[p,g]=n.useState(!1),h=Ri(t,(e=>c.itemRefCallback?.(e,o,i))),y=Yl(),m=n.useRef("touch"),v=()=>{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 Di.jsx(od,{scope:r,value:o,disabled:i,textId:y,isSelected:u,onItemTextChange:n.useCallback((e=>{d((t=>t||(e?.textContent??"").trim()))}),[]),children:Di.jsx(Ef.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:Di.jsx(wl.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:ml(l.onFocus,(()=>g(!0))),onBlur:ml(l.onBlur,(()=>g(!1))),onClick:ml(l.onClick,(()=>{"mouse"!==m.current&&v()})),onPointerUp:ml(l.onPointerUp,(()=>{"mouse"===m.current&&v()})),onPointerDown:ml(l.onPointerDown,(e=>{m.current=e.pointerType})),onPointerMove:ml(l.onPointerMove,(e=>{m.current=e.pointerType,i?c.onItemLeave?.():"mouse"===m.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ml(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:ml(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(Of.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))})})})}));ad.displayName=nd;var ld="SelectItemText",sd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:i,style:a,...l}=e,s=zf(ld,r),c=Uf(ld,r),u=id(ld,r),f=Lf(ld,r),[d,p]=n.useState(null),g=Ri(t,(e=>p(e)),u.onItemTextChange,(e=>c.itemTextRefCallback?.(e,u.value,u.disabled))),h=d?.textContent,y=n.useMemo((()=>Di.jsx("option",{value:u.value,disabled:u.disabled,children:h},u.value)),[u.disabled,u.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=f;return Ul((()=>(m(y),()=>v(y))),[m,v,y]),Di.jsxs(Di.Fragment,{children:[Di.jsx(wl.span,{id:u.textId,...l,ref:g}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?o.createPortal(l.children,s.valueNode):null]})}));sd.displayName=ld;var cd="SelectItemIndicator",ud=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return id(cd,r).isSelected?Di.jsx(wl.span,{"aria-hidden":!0,...n,ref:t}):null}));ud.displayName=cd;var fd="SelectScrollUpButton",dd=n.forwardRef(((e,t)=>{const r=Uf(fd,e.__scopeSelect),o=Kf(fd,e.__scopeSelect),[i,a]=n.useState(!1),l=Ri(t,o.onScrollButtonChange);return Ul((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Di.jsx(hd,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));dd.displayName=fd;var pd="SelectScrollDownButton",gd=n.forwardRef(((e,t)=>{const r=Uf(pd,e.__scopeSelect),o=Kf(pd,e.__scopeSelect),[i,a]=n.useState(!1),l=Ri(t,o.onScrollButtonChange);return Ul((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Di.jsx(hd,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));gd.displayName=pd;var hd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,a=Uf("SelectScrollButton",r),l=n.useRef(null),s=jf(r),c=n.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return n.useEffect((()=>()=>c()),[c]),Ul((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Di.jsx(wl.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ml(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:ml(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:ml(i.onPointerLeave,(()=>{c()}))})})),yd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Di.jsx(wl.div,{"aria-hidden":!0,...n,ref:t})}));yd.displayName="SelectSeparator";var md="SelectArrow";function vd(e){return""===e||void 0===e}n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Cf(r),i=zf(md,r),a=Uf(md,r);return i.open&&"popper"===a.position?Di.jsx($c,{...o,...n,ref:t}):null})).displayName=md;var bd=n.forwardRef(((e,t)=>{const{value:r,...o}=e,i=n.useRef(null),a=Ri(t,i),l=function(e){const t=n.useRef({value:e,previous:e});return n.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(r);return n.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[l,r]),Di.jsx(bf,{asChild:!0,children:Di.jsx("select",{...o,ref:a,defaultValue:r})})}));function wd(e){const t=Ol(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback((e=>{const n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(n)}),[t]),a=n.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return n.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,a]}function Od(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}bd.displayName="BubbleSelect";var xd=If,Ed=Df,jd=Bf,kd=Wf,Sd=Jf,Pd=rd,Cd=ad,Rd=sd,zd=ud,Td=dd,Ld=gd,Nd=yd,Md=Nf,Id=Af,_d=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(xd,i({ref:t,className:li("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",r)},l),o,n.createElement(Ed,{asChild:!0},n.createElement(vi,{className:"h-4 w-4 opacity-50"})))}));_d.displayName=xd.displayName;var Ad=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Td,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(Oi,{className:"h-4 w-4"}))}));Ad.displayName=Td.displayName;var Dd=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Ld,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(vi,{className:"h-4 w-4"}))}));Dd.displayName=Ld.displayName;var Bd=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=e.position,s=void 0===l?"popper":l,c=a(e,["className","children","position"]);return n.createElement(jd,null,n.createElement(kd,i({ref:t,className:li("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"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:s},c),n.createElement(Ad,null),n.createElement(Sd,{className:li("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),n.createElement(Dd,null)))}));Bd.displayName=kd.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Pd,i({ref:t,className:li("px-2 py-1.5 text-sm font-semibold",r)},o))})).displayName=Pd.displayName;var Fd=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(Cd,i({ref:t,className:li("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",r)},l),n.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},n.createElement(zd,null,n.createElement(mi,{className:"h-4 w-4"}))),n.createElement(Rd,null,o))}));function Wd(e){var t=e.className,r=e.dateFrom,o=e.dateTo,i=e.handleDateChange,a=n.useState({from:r||new Date(2022,0,20),to:o||g(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:v(e),to:_(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:N(e),to:L(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return h(e,-t,r)}(new Date,1);return{from:N(e),to:L(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:I(e),to:M(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return S(e,-t,r)}(new Date,1);return{from:I(e),to:M(e)}}}];return n.createElement("div",{className:li("grid gap-2",t)},n.createElement(pf,null,n.createElement(gf,{asChild:!0},n.createElement($i,{id:"date",variant:"outline",className:li("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},n.createElement(yi,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?n.createElement(n.Fragment,null,we(l.from,"LLL dd, y")," -"," ",we(l.to,"LLL dd, y")):we(l.from,"LLL dd, y"):n.createElement("span",null,"Choisissez une date"))),n.createElement(hf,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},n.createElement(Md,{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)}}},n.createElement(_d,{className:"w-[300px]"},n.createElement(Id,{placeholder:"Sélectionnez un préréglage"})),n.createElement(Bd,{position:"popper"},c.map((function(e){return n.createElement(Fd,{key:e.label,value:e.label},e.label)})))),n.createElement("div",{className:"rounded-md border"},n.createElement(yl,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}Fd.displayName=Cd.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Nd,i({ref:t,className:li("-mx-1 my-1 h-px bg-muted",r)},o))})).displayName=Nd.displayName;var Vd=n.forwardRef((function(e,t){var r=e.className,o=e.type,l=a(e,["className","type"]);return n.createElement("input",i({type:o,className:li("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",r),ref:t},l))}));Vd.displayName="Input";var Hd=.999,Ud=/[\\\/_+.#"@\[\(\{&]/,$d=/[\\\/_+.#"@\[\(\{&]/g,Gd=/[\s-]/,Yd=/[\s-]/g;function qd(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=qd(e,t,r,n,p+1,i+1,a))>g&&(p===o?s*=1:Ud.test(e.charAt(p-1))?(s*=.8,(u=e.slice(o,p-1).match($d))&&o>0&&(s*=Math.pow(Hd,u.length))):Gd.test(e.charAt(p-1))?(s*=.9,(f=e.slice(o,p-1).match(Yd))&&o>0&&(s*=Math.pow(Hd,f.length))):(s*=.17,o>0&&(s*=Math.pow(Hd,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=qd(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 Kd(e){return e.toLowerCase().replace(Yd," ")}function Xd(e,t,r){return qd(e=r&&r.length>0?""+(e+" "+r.join(" ")):e,t,Kd(e),Kd(t),0,0,{})}function Jd(){return Jd=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},Jd.apply(null,arguments)}function Zd(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 Qd(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function ep(...t){return e.useCallback(Qd(...t),t)}function tp(...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}const rp=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},np=n["useId".toString()]||(()=>{});let op=0;function ip(e){const[t,r]=n.useState(np());return rp((()=>{e||r((e=>null!=e?e:String(op++)))}),[e]),e||(t?`radix-${t}`:"")}function ap(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>{var t;return null===(t=r.current)||void 0===t?void 0:t.call(r,...e)}),[])}function lp({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=ap(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=ap(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])]}const sp=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(fp);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 e.createElement(cp,Jd({},o,{ref:r}),e.isValidElement(t)?e.cloneElement(t,void 0,n):null)}return e.createElement(cp,Jd({},o,{ref:r}),n)}));sp.displayName="Slot";const cp=e.forwardRef(((t,r)=>{const{children:n,...o}=t;return e.isValidElement(n)?e.cloneElement(n,{...dp(o,n.props),ref:r?Qd(r,n.ref):n.ref}):e.Children.count(n)>1?e.Children.only(null):null}));cp.displayName="SlotClone";const up=({children:t})=>e.createElement(e.Fragment,null,t);function fp(t){return e.isValidElement(t)&&t.type===up}function dp(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 pp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((t,n)=>{const{asChild:o,...i}=t,a=o?sp:r;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,Jd({},i,{ref:n}))}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});const gp="dismissableLayer.update",hp="dismissableLayer.pointerDownOutside",yp="dismissableLayer.focusOutside";let mp;const vp=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bp=e.forwardRef(((t,r)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:s,onDismiss:c,...u}=t,f=e.useContext(vp),[d,p]=e.useState(null),g=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=e.useState({}),y=ep(r,(e=>p(e))),m=Array.from(f.layers),[v]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=d?m.indexOf(d):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,E=function(t,r=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ap(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){const t={originalEvent:e};function a(){Op(hp,n,t,{discrete:!0})}"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=a,r.addEventListener("click",i.current,{once:!0})):a()}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=[...f.branches].some((e=>e.contains(t)));x&&!r&&(null==a||a(e),null==s||s(e),e.defaultPrevented||null==c||c())}),g),j=function(t,r=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ap(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Op(yp,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;[...f.branches].some((e=>e.contains(t)))||(null==l||l(e),null==s||s(e),e.defaultPrevented||null==c||c())}),g);return function(t,r=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ap(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e),()=>r.removeEventListener("keydown",e)}),[n,r])}((e=>{w===f.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),g),e.useEffect((()=>{if(d)return o&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(mp=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),wp(),()=>{o&&1===f.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=mp)}}),[d,g,o,f]),e.useEffect((()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),wp())}),[d,f]),e.useEffect((()=>{const e=()=>h({});return document.addEventListener(gp,e),()=>document.removeEventListener(gp,e)}),[]),e.createElement(pp.div,Jd({},u,{ref:y,style:{pointerEvents:O?x?"auto":"none":void 0,...t.style},onFocusCapture:Zd(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Zd(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Zd(t.onPointerDownCapture,E.onPointerDownCapture)}))}));function wp(){const e=new CustomEvent(gp);document.dispatchEvent(e)}function Op(e,r,n,{discrete:o}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});r&&i.addEventListener(e,r,{once:!0}),o?function(e,r){e&&t.flushSync((()=>e.dispatchEvent(r)))}(i,a):i.dispatchEvent(a)}const xp="focusScope.autoFocusOnMount",Ep="focusScope.autoFocusOnUnmount",jp={bubbles:!1,cancelable:!0},kp=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=ap(i),f=ap(a),d=e.useRef(null),p=ep(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){function e(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Rp(d.current,{select:!0})}function t(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Rp(d.current,{select:!0}))}function r(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Rp(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){zp.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(xp,jp);s.addEventListener(xp,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Rp(n,{select:t}),document.activeElement!==r)return}((e=Sp(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Rp(s))}return()=>{s.removeEventListener(xp,u),setTimeout((()=>{const e=new CustomEvent(Ep,jp);s.addEventListener(Ep,f),s.dispatchEvent(e),e.defaultPrevented||Rp(null!=t?t:document.body,{select:!0}),s.removeEventListener(Ep,f),zp.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=Sp(e),r=Pp(t,e),n=Pp(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&Rp(i,{select:!0})):(e.preventDefault(),n&&Rp(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return e.createElement(pp.div,Jd({tabIndex:-1},l,{ref:p,onKeyDown:h}))}));function Sp(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 Pp(e,t){for(const r of e)if(!Cp(r,{upTo:t}))return r}function Cp(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 Rp(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 zp=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=Tp(e,t),e.unshift(t)},remove(t){var r;e=Tp(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function Tp(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Lp=e.forwardRef(((r,n)=>{var o;const{container:i=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...a}=r;return i?t.createPortal(e.createElement(pp.div,Jd({},a,{ref:n})),i):null}));const Np=r=>{const{present:n,children:o}=r,i=function(r){const[n,o]=e.useState(),i=e.useRef({}),a=e.useRef(r),l=e.useRef("none"),s=r?"mounted":"unmounted",[c,u]=function(t,r){return e.useReducer(((e,t)=>{const n=r[e][t];return null!=n?n:e}),t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Mp(i.current);l.current="mounted"===c?e:"none"}),[c]),rp((()=>{const e=i.current,t=a.current;if(t!==r){const n=l.current,o=Mp(e);if(r)u("MOUNT");else if("none"===o||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{u(t&&n!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=r}}),[r,u]),rp((()=>{if(n){const e=e=>{const r=Mp(i.current).includes(e.animationName);e.target===n&&r&&t.flushSync((()=>u("ANIMATION_END")))},r=e=>{e.target===n&&(l.current=Mp(i.current))};return n.addEventListener("animationstart",r),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",r),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(n),a="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),l=ep(i.ref,a.ref);return"function"==typeof o||i.isPresent?e.cloneElement(a,{ref:l}):null};function Mp(e){return(null==e?void 0:e.animationName)||"none"}Np.displayName="Presence";let Ip=0;function _p(){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 Ap="right-scroll-bar-position",Dp="width-before-scroll-bar",Bp=uu(),Fp=function(){},Wp=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:Fp,onWheelCapture:Fp,onTouchMoveCapture:Fp}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,h=e.sideCar,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=h,E=su([r,t]),j=i(i({},O),l);return n.createElement(n.Fragment,null,p&&n.createElement(x,{sideCar:Bp,removeScrollBar:d,shards:g,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:r}),c?n.cloneElement(n.Children.only(u),i(i({},j),{ref:E})):n.createElement(w,i({},j,{className:f,ref:E}),u))}));Wp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Wp.classNames={fullWidth:Dp,zeroRight:Ap};var Vp,Hp,Up=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=yu();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)}}},$p={left:0,top:0,right:0,gap:0},Gp=function(e){return parseInt(e||"",10)||0},Yp=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return $p;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[Gp(r),Gp(n),Gp(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])}},qp=(Vp=Up(),Hp=function(e,t){n.useEffect((function(){return Vp.add(e),function(){Vp.remove()}}),[e&&t])},function(e){var t=e.styles,r=e.dynamic;return Hp(t,r),null}),Kp="data-scroll-locked",Xp=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(Kp,"] {\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(Ap," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Dp," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Ap," .").concat(Ap," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Dp," .").concat(Dp," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Kp,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Jp=function(){var e=parseInt(document.body.getAttribute(Kp)||"0",10);return isFinite(e)?e:0},Zp=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect((function(){return document.body.setAttribute(Kp,(Jp()+1).toString()),function(){var e=Jp()-1;e<=0?document.body.removeAttribute(Kp):document.body.setAttribute(Kp,e.toString())}}),[]);var a=n.useMemo((function(){return Yp(i)}),[i]);return n.createElement(qp,{styles:Xp(a,!t,i,r?"":"!important")})},Qp=!1;if("undefined"!=typeof window)try{var eg=Object.defineProperty({},"passive",{get:function(){return Qp=!0,!0}});window.addEventListener("test",eg,eg),window.removeEventListener("test",eg,eg)}catch(e){Qp=!1}var tg=!!Qp&&{passive:!1},rg=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])},ng=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),og(e,r)){var n=ig(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},og=function(e,t){return"v"===e?function(e){return rg(e,"overflowY")}(t):function(e){return rg(e,"overflowX")}(t)},ig=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},ag=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lg=function(e){return[e.deltaX,e.deltaY]},sg=function(e){return e&&"current"in e?e.current:e},cg=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ug=0,fg=[];var dg=du(Bp,(function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(ug++)[0],a=n.useState((function(){return vu()}))[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(sg),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom;var n,i=ag(e),a=r.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=ng(f,u);if(!d)return!0;if(d?n=f:(n="v"===f?"h":"v",d=ng(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var p=o.current||n;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=ig(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&og(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)}),[]),u=n.useCallback((function(e){var r=e;if(fg.length&&fg[fg.length-1]===a){var n="deltaY"in r?lg(r):ag(r),o=t.current.filter((function(e){return e.name===r.type&&e.target===r.target&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(sg).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=n.useCallback((function(e){r.current=ag(e),o.current=void 0}),[]),p=n.useCallback((function(t){f(t.type,lg(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,ag(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return fg.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,tg),document.addEventListener("touchmove",u,tg),document.addEventListener("touchstart",d,tg),function(){fg=fg.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,tg),document.removeEventListener("touchmove",u,tg),document.removeEventListener("touchstart",d,tg)}}),[]);var h=e.removeScrollBar,y=e.inert;return n.createElement(n.Fragment,null,y?n.createElement(a,{styles:cg(i)}):null,h?n.createElement(Zp,{gapMode:"margin"}):null)})),pg=n.forwardRef((function(e,t){return n.createElement(Wp,i({},e,{ref:t,sideCar:dg}))}));pg.classNames=Wp.classNames;const gg="Dialog",[hg,yg]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=(null==n?void 0: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=(null==n?void 0:n[t][a])||i,c=e.useMemo((()=>l),Object.values(l));return e.createElement(s.Provider,{value:c},o)}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=(null==l?void 0: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}\``)}]},tp(o,...r)]}(gg),[mg,vg]=hg(gg),bg="DialogPortal",[wg,Og]=hg(bg,{forceMount:void 0}),xg="DialogOverlay",Eg=e.forwardRef(((t,r)=>{const n=Og(xg,t.__scopeDialog),{forceMount:o=n.forceMount,...i}=t,a=vg(xg,t.__scopeDialog);return a.modal?e.createElement(Np,{present:o||a.open},e.createElement(jg,Jd({},i,{ref:r}))):null})),jg=e.forwardRef(((t,r)=>{const{__scopeDialog:n,...o}=t,i=vg(xg,n);return e.createElement(pg,{as:sp,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(pp.div,Jd({"data-state":zg(i.open)},o,{ref:r,style:{pointerEvents:"auto",...o.style}})))})),kg="DialogContent",Sg=e.forwardRef(((t,r)=>{const n=Og(kg,t.__scopeDialog),{forceMount:o=n.forceMount,...i}=t,a=vg(kg,t.__scopeDialog);return e.createElement(Np,{present:o||a.open},a.modal?e.createElement(Pg,Jd({},i,{ref:r})):e.createElement(Cg,Jd({},i,{ref:r})))})),Pg=e.forwardRef(((t,r)=>{const n=vg(kg,t.__scopeDialog),o=e.useRef(null),i=ep(r,n.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return ru(e)}),[]),e.createElement(Rg,Jd({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Zd(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Zd(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:Zd(t.onFocusOutside,(e=>e.preventDefault()))}))})),Cg=e.forwardRef(((t,r)=>{const n=vg(kg,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(Rg,Jd({},t,{ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var r,a;(null===(r=t.onCloseAutoFocus)||void 0===r||r.call(t,e),e.defaultPrevented)||(o.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),e.preventDefault());o.current=!1,i.current=!1},onInteractOutside:e=>{var r,a;null===(r=t.onInteractOutside)||void 0===r||r.call(t,e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const l=e.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(l))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),Rg=e.forwardRef(((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=vg(kg,n),c=ep(r,e.useRef(null));return e.useEffect((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:_p()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:_p()),Ip++,()=>{1===Ip&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ip--}}),[]),e.createElement(e.Fragment,null,e.createElement(kp,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(bp,Jd({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":zg(s.open)},l,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}));function zg(e){return e?"open":"closed"}const Tg=t=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=t,s=e.useRef(null),c=e.useRef(null),[u=!1,f]=lp({prop:o,defaultProp:i,onChange:a});return e.createElement(mg,{scope:r,triggerRef:s,contentRef:c,contentId:ip(),titleId:ip(),descriptionId:ip(),open:u,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l},n)},Lg=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=vg(bg,r);return e.createElement(wg,{scope:r,forceMount:n},e.Children.map(o,(t=>e.createElement(Np,{present:n||a.open},e.createElement(Lp,{asChild:!0,container:i},t)))))},Ng=Eg,Mg=Sg;var Ig='[cmdk-group=""]',_g='[cmdk-group-items=""]',Ag='[cmdk-item=""]',Dg=`${Ag}:not([aria-disabled="true"])`,Bg="cmdk-item-select",Fg="data-value",Wg=(e,t,r)=>Xd(e,t,r),Vg=n.createContext(void 0),Hg=()=>n.useContext(Vg),Ug=n.createContext(void 0),$g=()=>n.useContext(Ug),Gg=n.createContext(void 0),Yg=n.forwardRef(((e,t)=>{let r=lh((()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",filtered:{count:0,items:new Map,groups:new Set}}})),o=lh((()=>new Set)),i=lh((()=>new Map)),a=lh((()=>new Map)),l=lh((()=>new Set)),s=ih(e),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:g,loop:h,disablePointerSelection:y=!1,vimBindings:m=!0,...v}=e,b=n.useId(),w=n.useId(),O=n.useId(),x=n.useRef(null),E=fh();ah((()=>{if(void 0!==f){let e=f.trim();r.current.value=e,j.emit()}}),[f]),ah((()=>{E(6,z)}),[]);let j=n.useMemo((()=>({subscribe:e=>(l.current.add(e),()=>l.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,i,a;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)R(),P(),E(1,C);else if("value"===e&&(n||E(5,z),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=n.useMemo((()=>({value:(e,t,n)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,S(t,n)),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,(()=>{R(),P(),r.current.value||C(),j.emit()})),()=>{a.current.delete(e),o.current.delete(e),r.current.filtered.items.delete(e);let t=T();E(4,(()=>{R(),(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||e["aria-label"],disablePointerSelection:y,listId:b,inputId:O,labelId:w,listInnerRef:x})),[]);function S(e,t){var n,o;let i=null!=(o=null==(n=s.current)?void 0:n.filter)?o:Wg;return e?i(e,r.current.search,t):0}function P(){if(!r.current.search||!1===s.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.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 n=x.current;L().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(_g);t?t.appendChild(e.parentElement===t?e:e.closest(`${_g} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${_g} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${Ig}[${Fg}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=L().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Fg);j.setState("value",t||void 0)}function R(){var e,t,n,l;if(!r.current.search||!1===s.current.shouldFilter)return void(r.current.filtered.count=o.current.size);r.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==(n=a.current.get(i))?void 0:n.keywords)?l:[]);r.current.filtered.items.set(i,o),o>0&&c++}for(let[e,t]of i.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function z(){var e,t,r;let n=T();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(Ig))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function T(){var e;return null==(e=x.current)?void 0:e.querySelector(`${Ag}[aria-selected="true"]`)}function L(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(Dg))}function N(e){let t=L()[e];t&&j.setState("value",t.getAttribute(Fg))}function M(e){var t;let r=T(),n=L(),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(Fg))}function I(e){let t,r=T(),n=null==r?void 0:r.closest(Ig);for(;n&&!t;)n=e>0?nh(n,Ig):oh(n,Ig),t=null==n?void 0:n.querySelector(Dg);t?j.setState("value",t.getAttribute(Fg)):M(e)}let _=()=>N(L().length-1),A=e=>{e.preventDefault(),e.metaKey?_():e.altKey?I(1):M(1)},D=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?I(-1):M(-1)};return n.createElement(pp.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=v.onKeyDown)||t.call(v,e),!e.defaultPrevented)switch(e.key){case"n":case"j":m&&e.ctrlKey&&A(e);break;case"ArrowDown":A(e);break;case"p":case"k":m&&e.ctrlKey&&D(e);break;case"ArrowUp":D(e);break;case"Home":e.preventDefault(),N(0);break;case"End":e.preventDefault(),_();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=T();if(t){let e=new Event(Bg);t.dispatchEvent(e)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:ph},c),dh(e,(e=>n.createElement(Ug.Provider,{value:j},n.createElement(Vg.Provider,{value:k},e)))))})),qg=n.forwardRef(((e,t)=>{var r,o;let i=n.useId(),a=n.useRef(null),l=n.useContext(Gg),s=Hg(),c=ih(e),u=null!=(o=null==(r=c.current)?void 0:r.forceMount)?o:null==l?void 0:l.forceMount;ah((()=>{if(!u)return s.item(i,null==l?void 0:l.id)}),[u]);let f=uh(i,a,[e.value,e.children,a],e.keywords),d=$g(),p=ch((e=>e.value&&e.value===f.current)),g=ch((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(n.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(Bg,h),()=>t.removeEventListener(Bg,h)}),[g,e.onSelect,e.disabled]),!g)return null;let{disabled:m,value:v,onSelect:b,forceMount:w,keywords:O,...x}=e;return n.createElement(pp.div,{ref:sh([a,t]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!m,"aria-selected":!!p,"data-disabled":!!m,"data-selected":!!p,onPointerMove:m||s.disablePointerSelection?void 0:y,onClick:m?void 0:h},e.children)})),Kg=n.forwardRef(((e,t)=>{let{heading:r,children:o,forceMount:i,...a}=e,l=n.useId(),s=n.useRef(null),c=n.useRef(null),u=n.useId(),f=Hg(),d=ch((e=>!(!i&&!1!==f.filter())||(!e.search||e.filtered.groups.has(l))));ah((()=>f.group(l)),[]),uh(l,s,[e.value,e.heading,c]);let p=n.useMemo((()=>({id:l,forceMount:i})),[i]);return n.createElement(pp.div,{ref:sh([s,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},r&&n.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),dh(e,(e=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},n.createElement(Gg.Provider,{value:p},e)))))})),Xg=n.forwardRef(((e,t)=>{let{alwaysRender:r,...o}=e,i=n.useRef(null),a=ch((e=>!e.search));return r||a?n.createElement(pp.div,{ref:sh([i,t]),...o,"cmdk-separator":"",role:"separator"}):null})),Jg=n.forwardRef(((e,t)=>{let{onValueChange:r,...o}=e,i=null!=e.value,a=$g(),l=ch((e=>e.search)),s=ch((e=>e.value)),c=Hg(),u=n.useMemo((()=>{var e;let t=null==(e=c.listInnerRef.current)?void 0:e.querySelector(`${Ag}[${Fg}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return n.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),n.createElement(pp.input,{ref:t,...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?e.value:l,onChange:e=>{i||a.setState("search",e.target.value),null==r||r(e.target.value)}})})),Zg=n.forwardRef(((e,t)=>{let{children:r,label:o="Suggestions",...i}=e,a=n.useRef(null),l=n.useRef(null),s=Hg();return n.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)}}}),[]),n.createElement(pp.div,{ref:sh([a,t]),...i,"cmdk-list":"",role:"listbox","aria-label":o,id:s.listId},dh(e,(e=>n.createElement("div",{ref:sh([l,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),Qg=n.forwardRef(((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:a,container:l,...s}=e;return n.createElement(Tg,{open:r,onOpenChange:o},n.createElement(Lg,{container:l},n.createElement(Ng,{"cmdk-overlay":"",className:i}),n.createElement(Mg,{"aria-label":e.label,"cmdk-dialog":"",className:a},n.createElement(Yg,{ref:t,...s}))))})),eh=n.forwardRef(((e,t)=>ch((e=>0===e.filtered.count))?n.createElement(pp.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),th=n.forwardRef(((e,t)=>{let{progress:r,children:o,label:i="Loading...",...a}=e;return n.createElement(pp.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},dh(e,(e=>n.createElement("div",{"aria-hidden":!0},e))))})),rh=Object.assign(Yg,{List:Zg,Item:qg,Input:Jg,Group:Kg,Separator:Xg,Dialog:Qg,Empty:eh,Loading:th});function nh(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function oh(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ih(e){let t=n.useRef(e);return ah((()=>{t.current=e})),t}var ah="undefined"==typeof window?n.useEffect:n.useLayoutEffect;function lh(e){let t=n.useRef();return void 0===t.current&&(t.current=e()),t}function sh(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function ch(e){let t=$g(),r=()=>e(t.snapshot());return n.useSyncExternalStore(t.subscribe,r,r)}function uh(e,t,r,o=[]){let i=n.useRef(),a=Hg();return ah((()=>{var n;let l=(()=>{var e;for(let t of r){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(e,l,s),null==(n=t.current)||n.setAttribute(Fg,l),i.current=l})),i}var fh=()=>{let[e,t]=n.useState(),r=lh((()=>new Map));return ah((()=>{r.current.forEach((e=>e())),r.current=new Map}),[e]),(e,n)=>{r.current.set(e,n),t({})}};function dh({asChild:e,children:t},r){return e&&n.isValidElement(t)?n.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},r(t.props.children)):r(t)}var ph={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function gh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function hh(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function yh(...e){return t=>{let r=!1;const n=e.map((e=>{const n=hh(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():hh(e[t],null)}}}}function mh(...e){return n.useCallback(yh(...e),e)}var vh=n.forwardRef(((e,t)=>{const{children:r,...o}=e,i=n.Children.toArray(r),a=i.find(Oh);if(a){const e=a.props.children,r=i.map((t=>t===a?n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null:t));return Di.jsx(bh,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return Di.jsx(bh,{...o,ref:t,children:r})}));vh.displayName="Slot";var bh=n.forwardRef(((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=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}(r),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,r.props);return r.type!==n.Fragment&&(i.ref=t?yh(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null}));bh.displayName="SlotClone";var wh=({children:e})=>Di.jsx(Di.Fragment,{children:e});function Oh(e){return n.isValidElement(e)&&e.type===wh}var xh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=n.forwardRef(((e,r)=>{const{asChild:n,...o}=e,i=n?vh:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Di.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});var Eh,jh="dismissableLayer.update",kh="dismissableLayer.pointerDownOutside",Sh="dismissableLayer.focusOutside",Ph=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ch=n.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=e,u=n.useContext(Ph),[f,d]=n.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=n.useState({}),h=mh(t,(e=>d(e))),y=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(m),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=v,x=function(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1),i=n.useRef((()=>{}));return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let n=function(){zh(kh,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{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(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1);return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){zh(Sh,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{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 xl((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),n.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Eh=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Rh(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Eh)}}),[f,p,r,u]),n.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Rh())}),[f,u]),n.useEffect((()=>{const e=()=>g({});return document.addEventListener(jh,e),()=>document.removeEventListener(jh,e)}),[]),Di.jsx(xh.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...e.style},onFocusCapture:gh(e.onFocusCapture,E.onFocusCapture),onBlurCapture:gh(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:gh(e.onPointerDownCapture,x.onPointerDownCapture)})}));Ch.displayName="DismissableLayer";function Rh(){const e=new CustomEvent(jh);document.dispatchEvent(e)}function zh(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?function(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}(i,a):i.dispatchEvent(a)}n.forwardRef(((e,t)=>{const r=n.useContext(Ph),o=n.useRef(null),i=mh(t,o);return n.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),Di.jsx(xh.div,{...e,ref:i})})).displayName="DismissableLayerBranch";var Th="focusScope.autoFocusOnMount",Lh="focusScope.autoFocusOnUnmount",Nh={bubbles:!1,cancelable:!0},Mh=n.forwardRef(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[s,c]=n.useState(null),u=Ol(i),f=Ol(a),d=n.useRef(null),p=mh(t,(e=>c(e))),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Dh(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Dh(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Dh(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]),n.useEffect((()=>{if(s){Bh.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Th,Nh);s.addEventListener(Th,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Dh(n,{select:t}),document.activeElement!==r)return}((e=Ih(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Dh(s))}return()=>{s.removeEventListener(Th,u),setTimeout((()=>{const e=new CustomEvent(Lh,Nh);s.addEventListener(Lh,f),s.dispatchEvent(e),e.defaultPrevented||Dh(t??document.body,{select:!0}),s.removeEventListener(Lh,f),Bh.remove(g)}),0)}}var e}),[s,u,f,g]);const h=n.useCallback((e=>{if(!r&&!o)return;if(g.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=Ih(e),r=_h(t,e),n=_h(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Dh(i,{select:!0})):(e.preventDefault(),r&&Dh(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,g.paused]);return Di.jsx(xh.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Ih(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 _h(e,t){for(const r of e)if(!Ah(r,{upTo:t}))return r}function Ah(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 Dh(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()}}Mh.displayName="FocusScope";var Bh=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Fh(e,t),e.unshift(t)},remove(t){e=Fh(e,t),e[0]?.resume()}}}();function Fh(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Wh=n.forwardRef(((e,r)=>{const{container:o,...i}=e,[a,l]=n.useState(!1);Ul((()=>l(!0)),[]);const s=o||a&&globalThis?.document?.body;return s?t.createPortal(Di.jsx(xh.div,{...i,ref:r}),s):null}));Wh.displayName="Portal";var Vh=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef({}),i=n.useRef(e),a=n.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return n.useReducer(((e,r)=>t[e][r]??e),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect((()=>{const e=Hh(o.current);a.current="mounted"===s?e:"none"}),[s]),Ul((()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=Hh(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),Ul((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=Hh(o.current).includes(n.animationName);if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},l=e=>{e.target===t&&(a.current=Hh(o.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:n.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=mh(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 r||o.isPresent?n.cloneElement(i,{ref:a}):null};function Hh(e){return e?.animationName||"none"}function Uh(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}Vh.displayName="Presence";var $h="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,Gh=new WeakMap;function Yh(t,r){var n,o,i,a=(n=null,o=function(e){return t.forEach((function(t){return Uh(t,e)}))},(i=e.useState((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return $h((function(){var e=Gh.get(a);if(e){var r=new Set(e),n=new Set(t),o=a.current;r.forEach((function(e){n.has(e)||Uh(e,null)})),n.forEach((function(e){r.has(e)||Uh(e,o)}))}Gh.set(a,t)}),[t]),a}function qh(e){return e}var Kh=function(e){var t=e.sideCar,r=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,i({},r))};Kh.isSideCarExport=!0;var Xh=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=qh);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=i({async:!0,ssr:!1},e),t}(),Jh=function(){},Zh=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:Jh,onWheelCapture:Jh,onTouchMoveCapture:Jh}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,h=e.sideCar,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=e.gapMode,x=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,j=Yh([r,t]),k=i(i({},x),l);return n.createElement(n.Fragment,null,p&&n.createElement(E,{sideCar:Xh,removeScrollBar:d,shards:g,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:O}),c?n.cloneElement(n.Children.only(u),i(i({},k),{ref:j})):n.createElement(w,i({},k,{className:f,ref:j}),u))}));Zh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zh.classNames={fullWidth:Dp,zeroRight:Ap};var Qh=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=yu();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)}}},ey=function(){var e=function(){var e=Qh();return function(t,r){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])}}();return function(t){var r=t.styles,n=t.dynamic;return e(r,n),null}},ty=!1;if("undefined"!=typeof window)try{var ry=Object.defineProperty({},"passive",{get:function(){return ty=!0,!0}});window.addEventListener("test",ry,ry),window.removeEventListener("test",ry,ry)}catch(e){ty=!1}var ny=!!ty&&{passive:!1},oy=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])},iy=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ay(e,n)){var o=ly(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ay=function(e,t){return"v"===e?function(e){return oy(e,"overflowY")}(t):function(e){return oy(e,"overflowX")}(t)},ly=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},sy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cy=function(e){return[e.deltaX,e.deltaY]},uy=function(e){return e&&"current"in e?e.current:e},fy=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},dy=0,py=[];function gy(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var hy,yy=(hy=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(dy++)[0],a=n.useState(ey)[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(uy),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var n,i=sy(e),a=r.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=iy(f,u);if(!d)return!0;if(d?n=f:(n="v"===f?"h":"v",d=iy(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var p=o.current||n;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=ly(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&ay(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)}),[]),u=n.useCallback((function(e){var r=e;if(py.length&&py[py.length-1]===a){var n="deltaY"in r?cy(r):sy(r),o=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(uy).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:gy(n)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=n.useCallback((function(e){r.current=sy(e),o.current=void 0}),[]),p=n.useCallback((function(t){f(t.type,cy(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,sy(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return py.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,ny),document.addEventListener("touchmove",u,ny),document.addEventListener("touchstart",d,ny),function(){py=py.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,ny),document.removeEventListener("touchmove",u,ny),document.removeEventListener("touchstart",d,ny)}}),[]);var h=e.removeScrollBar,y=e.inert;return n.createElement(n.Fragment,null,y?n.createElement(a,{styles:fy(i)}):null,h?n.createElement(Zp,{gapMode:e.gapMode}):null)},Xh.useMedium(hy),Kh),my=n.forwardRef((function(e,t){return n.createElement(Zh,i({},e,{ref:t,sideCar:yy}))}));my.classNames=Zh.classNames;var vy="Dialog",[by,wy]=vl(vy),[Oy,xy]=by(vy),Ey="DialogTrigger";n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Ey,r),i=mh(t,o.triggerRef);return Di.jsx(xh.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Vy(o.open),...n,ref:i,onClick:gh(e.onClick,o.onOpenToggle)})})).displayName=Ey;var jy="DialogPortal",[ky,Sy]=by(jy,{forceMount:void 0}),Py=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:i}=e,a=xy(jy,t);return Di.jsx(ky,{scope:t,forceMount:r,children:n.Children.map(o,(e=>Di.jsx(Vh,{present:r||a.open,children:Di.jsx(Wh,{asChild:!0,container:i,children:e})})))})};Py.displayName=jy;var Cy="DialogOverlay",Ry=n.forwardRef(((e,t)=>{const r=Sy(Cy,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=xy(Cy,e.__scopeDialog);return i.modal?Di.jsx(Vh,{present:n||i.open,children:Di.jsx(zy,{...o,ref:t})}):null}));Ry.displayName=Cy;var zy=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Cy,r);return Di.jsx(my,{as:vh,allowPinchZoom:!0,shards:[o.contentRef],children:Di.jsx(xh.div,{"data-state":Vy(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})})),Ty="DialogContent",Ly=n.forwardRef(((e,t)=>{const r=Sy(Ty,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=xy(Ty,e.__scopeDialog);return Di.jsx(Vh,{present:n||i.open,children:i.modal?Di.jsx(Ny,{...o,ref:t}):Di.jsx(My,{...o,ref:t})})}));Ly.displayName=Ty;var Ny=n.forwardRef(((e,t)=>{const r=xy(Ty,e.__scopeDialog),o=n.useRef(null),i=mh(t,r.contentRef,o);return n.useEffect((()=>{const e=o.current;if(e)return ru(e)}),[]),Di.jsx(Iy,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gh(e.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:gh(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:gh(e.onFocusOutside,(e=>e.preventDefault()))})})),My=n.forwardRef(((e,t)=>{const r=xy(Ty,e.__scopeDialog),o=n.useRef(!1),i=n.useRef(!1);return Di.jsx(Iy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const n=t.target,a=r.triggerRef.current?.contains(n);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),Iy=n.forwardRef(((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=e,s=xy(Ty,r),c=n.useRef(null),u=mh(t,c);return Ll(),Di.jsxs(Di.Fragment,{children:[Di.jsx(Mh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Di.jsx(Ch,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Vy(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),Di.jsxs(Di.Fragment,{children:[Di.jsx(Gy,{titleId:s.titleId}),Di.jsx(Yy,{contentRef:c,descriptionId:s.descriptionId})]})]})})),_y="DialogTitle",Ay=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(_y,r);return Di.jsx(xh.h2,{id:o.titleId,...n,ref:t})}));Ay.displayName=_y;var Dy="DialogDescription",By=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Dy,r);return Di.jsx(xh.p,{id:o.descriptionId,...n,ref:t})}));By.displayName=Dy;var Fy="DialogClose",Wy=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Fy,r);return Di.jsx(xh.button,{type:"button",...n,ref:t,onClick:gh(e.onClick,(()=>o.onOpenChange(!1)))})}));function Vy(e){return e?"open":"closed"}Wy.displayName=Fy;var Hy="DialogTitleWarning",[Uy,$y]=function(e,t){const r=n.createContext(t),o=e=>{const{children:t,...o}=e,i=n.useMemo((()=>o),Object.values(o));return Di.jsx(r.Provider,{value:i,children:t})};return o.displayName=e+"Provider",[o,function(o){const i=n.useContext(r);if(i)return i;if(void 0!==t)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}]}(Hy,{contentName:Ty,titleName:_y,docsSlug:"dialog"}),Gy=({titleId:e})=>{const t=$y(Hy),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return n.useEffect((()=>{if(e){document.getElementById(e)||console.error(r)}}),[r,e]),null},Yy=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$y("DialogDescriptionWarning").contentName}}.`;return n.useEffect((()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)||console.warn(r)}}),[r,e,t]),null},qy=Ry,Ky=Ly,Xy=Ay,Jy=By,Zy=Wy,Qy=Py,em=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(qy,i({ref:t,className:li("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",r)},o))}));em.displayName=qy.displayName,n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(Qy,null,n.createElement(em,null),n.createElement(Ky,i({ref:t,className:li("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",r)},l),o,n.createElement(Zy,{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"},n.createElement(Pi,{className:"h-4 w-4"}),n.createElement("span",{className:"sr-only"},"Close"))))})).displayName=Ky.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Xy,i({ref:t,className:li("text-lg font-semibold leading-none tracking-tight",r)},o))})).displayName=Xy.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Jy,i({ref:t,className:li("text-sm text-muted-foreground",r)},o))})).displayName=Jy.displayName;var tm=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh,i({ref:t,className:li("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",r)},o))}));tm.displayName=rh.displayName;var rm=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},n.createElement(Si,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.createElement(rh.Input,i({ref:t,className:li("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",r)},o)))}));rm.displayName=rh.Input.displayName;var nm=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.List,i({ref:t,className:li("max-h-[300px] overflow-y-auto overflow-x-hidden",r)},o))}));nm.displayName=rh.List.displayName;var om=n.forwardRef((function(e,t){return n.createElement(rh.Empty,i({ref:t,className:"py-6 text-center text-sm"},e))}));om.displayName=rh.Empty.displayName;var im=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.Group,i({ref:t,className:li("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",r)},o))}));im.displayName=rh.Group.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.Separator,i({ref:t,className:li("-mx-1 h-px bg-border",r)},o))})).displayName=rh.Separator.displayName;var am=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.Item,i({ref:t,className:li("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",r)},o))}));function lm(e){var t,r=e.value,o=e.onSearch,i=e.onValueChange,a=e.disabled,l=e.placeholder,s=e.options,c=e.loading,u=n.useState(!1),f=u[0],d=u[1],p=n.useState(""),g=p[0],h=p[1],y=function(e,t){var r=n.useState(e),o=r[0],i=r[1];return n.useEffect((function(){var r=setTimeout((function(){i(e)}),t);return function(){clearTimeout(r)}}),[e,t]),o}(g,400),m=n.useRef("");return n.useEffect((function(){y!==m.current&&(m.current=y,o(y))}),[y,o]),n.createElement("div",{className:"w-full max-w-md mx-auto"},n.createElement(pf,{open:f,onOpenChange:function(e){a||d(e)}},n.createElement(gf,{asChild:!0},n.createElement($i,{variant:"outline",role:"combobox","aria-expanded":f,disabled:a,className:li("w-full justify-between",a&&"opacity-70 cursor-not-allowed")},r?null===(t=s.find((function(e){return e.value===r})))||void 0===t?void 0:t.label:l,n.createElement(xi,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"}))),n.createElement(hf,{className:"w-full p-0"},n.createElement(tm,null,n.createElement(rm,{placeholder:l,onValueChange:function(e){return h(e)}}),c?n.createElement("div",{className:"flex items-center justify-center py-4"},n.createElement("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-primary border-t-transparent"})):n.createElement(nm,null,n.createElement(om,null,"No ",l," found."),n.createElement(im,null,s.map((function(e,t){return n.createElement(am,{key:t,value:e.value,onSelect:function(){console.log("option",e),i(e.value),d(!1)}},n.createElement(mi,{className:li("mr-2 h-4 w-4",r===e.value?"opacity-100":"opacity-0")}),e.label)}))))))))}function sm(t){var r=this,o=t.title,a=t.filters,c=t.setFilters,u=t.configFilters,f=t.onSearch,d=t.count,p=t.isLoading,g=t.setCurrentPage,h=t.handleOptionsSearch,y=t.optionsLoading,m=n.useState(a),v=m[0],b=m[1],w=e.useState(!1),O=w[0],x=w[1],E=n.useMemo((function(){return JSON.stringify(v)!==JSON.stringify(a)}),[v,a]),j=function(){return l(r,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return b(a),E?[4,g(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return f(),[2]}}))}))};return n.createElement("div",{className:"flex flex-col gap-2"},n.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},n.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"},n.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),n.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),n.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),n.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),n.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),n.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),o,n.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},d)),n.createElement("div",{className:"border-b border-gray-100 mb-4"}),n.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},n.createElement(Wd,{dateFrom:a.fromDate,dateTo:a.toDate,handleDateChange:function(e){c(i(i({},a),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),u&&u.map((function(t,r){return n.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&n.createElement(Vd,{type:"text",placeholder:t.placeholder,value:a[t.name],onChange:function(e){var r;e.target.value?c(i(i({},a),((r={})[t.name]=e.target.value,r))):(delete a[t.name],c(i({},a)))},onKeyDown:function(e){"Enter"===e.key&&j()}}),"Select_old"===t.type&&n.createElement(Md,{disabled:t.disabled||0===t.options.length,value:a[t.name],onValueChange:function(e){var r;c(i(i({},a),((r={})[t.name]="_empty"===e?void 0:e,r)))}},n.createElement(_d,null,n.createElement(Id,{placeholder:t.placeholder})),n.createElement(Bd,null,e.useMemo((function(){return t.options.map((function(e,t){return n.createElement(Fd,{key:"".concat(e.VALUE,"-").concat(t),value:e.VALUE||"_empty"},e.NAME)}))}),[t.options]))),"Select"===t.type&&n.createElement(lm,{loading:y,onSearch:function(e){e&&e.length>0&&!0===t.searchable&&h(t,e)},disabled:t.disabled||0===t.options.length,value:a[t.name],placeholder:t.placeholder,options:e.useMemo((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;c(i(i({},a),((r={})[t.name]="_empty"===e?void 0:e,r)))}}))})),n.createElement("div",{className:"flex gap-2 ml-auto"},u.some((function(e){return"Export"===e.type}))&&n.createElement($i,{disabled:O,onClick:function(){return l(r,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:return x(!0),"POST"!==(null==(e=u.find((function(e){return"Export"===e.type})))?void 0:e.method)?[3,2]:[4,(c=null==e?void 0:e.url,f=a,l(r,void 0,void 0,(function(){var e,t,r,n;return s(this,(function(i){switch(i.label){case 0:return[4,fetch(c,{method:"POST",body:JSON.stringify(f)})];case 1:return[4,i.sent().blob()];case 2:return e=i.sent(),t=window.URL.createObjectURL(e),(r=document.createElement("a")).href=t,n="".concat(o.replace(/\s+/g,"_"),"_").concat(a.fromDate,"_").concat(a.toDate,"_.csv"),r.download=n,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(t),document.body.removeChild(r),[2]}}))})))];case 1:return n.sent(),[3,4];case 2:return[4,(i=null==e?void 0:e.ctx,l(r,void 0,void 0,(function(){var e,t,r,n,l,c;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(i),t=0,r=Object.entries(a);t<r.length;t++){var n=r[t],o=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===o||"toDate"===o){var s=new Date(l);e+="&".concat(o,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(o,"=").concat(l)}}return e}())];case 1:if(!(e=s.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=s.sent(),r=window.URL.createObjectURL(t),(n=document.createElement("a")).href=r,l="".concat(o.replace(/\s+/g,"_"),"_").concat(a.fromDate,"_").concat(a.toDate,"_.csv"),n.download=l,document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n),[3,4];case 3:return c=s.sent(),console.error("Export error:",c),[3,4];case 4:return[2]}}))})))];case 3:n.sent(),n.label=4;case 4:return t=setInterval((function(){x(!1),clearInterval(t)}),3e4),[2]}var i,c,f}))}))},size:"sm"},n.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"},n.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.createElement("polyline",{points:"7 10 12 15 17 10"}),n.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),n.createElement($i,{size:"sm",onClick:j,disabled:p},E?n.createElement(n.Fragment,null,n.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"},n.createElement("circle",{cx:"11",cy:"11",r:"8"}),n.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):n.createElement(n.Fragment,null,n.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"},n.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),n.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
|
26
|
+
*/function Ci(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ri(...e){return n.useCallback(Ci(...e),e)}function zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ti,Li={exports:{}},Ni={};var Mi,Ii,_i={};function Ai(){return Mi||(Mi=1,"production"!==Qe.env.NODE_ENV&&function(){var t=e,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=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(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 v;function b(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&m("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}v=Symbol.for("react.module.reference");var O,x,E,j,k,S,P,C=Object.assign,R=0;function z(){}z.__reactDisabledLog=!0;var T,L=y.ReactCurrentDispatcher;function N(e,t,r){if(void 0===T)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);T=n&&n[1]||""}return"\n"+T+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=L.current,L.current=null,function(){if(0===R){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:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}R++}();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,L.current=o,function(){if(0==--R){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})})}R<0&&m("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?N(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 N(e);switch(e){case u:return N("Suspense");case f:return N("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 m("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]||(m('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,m("%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,m("%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),m('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),m("%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),m("Failed %s type: %s",r,l.message),V(null))}}(t,e.props,"prop",n,e)}else if(void 0!==r.PropTypes&&!Q){Q=!0,m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(r)||"Unknown")}"function"!=typeof r.getDefaultProps||r.getDefaultProps.isReactClassApproved||m("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===v||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,m("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 m("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})),R=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!ce[P+R])m('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} />',R,P,C.length>0?"{"+C.join(": ..., ")+": ...}":"{}",P),ce[P+R]=!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),m("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),m("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)};_i.Fragment=o,_i.jsx=fe,_i.jsxs=de}()),_i}var Di=(Ii||(Ii=1,"production"===Qe.env.NODE_ENV?Li.exports=function(){if(Ti)return Ni;Ti=1;var t=e,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=t.__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 Ni.Fragment=n,Ni.jsx=l,Ni.jsxs=l,Ni}():Li.exports=Ai()),Li.exports),Bi=n.forwardRef(((e,t)=>{const{children:r,...o}=e,i=n.Children.toArray(r),a=i.find(Vi);if(a){const e=a.props.children,r=i.map((t=>t===a?n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null:t));return Di.jsx(Fi,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return Di.jsx(Fi,{...o,ref:t,children:r})}));Bi.displayName="Slot";var Fi=n.forwardRef(((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=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}(r);return n.cloneElement(r,{...Hi(o,r.props),ref:t?Ci(t,e):e})}return n.Children.count(r)>1?n.Children.only(null):null}));Fi.displayName="SlotClone";var Wi=({children:e})=>Di.jsx(Di.Fragment,{children:e});function Vi(e){return n.isValidElement(e)&&e.type===Wi}function Hi(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 Ui=go("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"}}),$i=n.forwardRef((function(e,t){var r=e.className,o=e.variant,l=e.size,s=e.asChild,c=void 0!==s&&s,u=a(e,["className","variant","size","asChild"]),f=c?Bi:"button";return n.createElement(f,i({className:li(Ui({variant:o,size:l,className:r})),ref:t},u))}));$i.displayName="Button";var Gi=function(){return Gi=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},Gi.apply(this,arguments)};function Yi(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 qi(e){return"multiple"===e.mode}function Ki(e){return"range"===e.mode}function Xi(e){return"single"===e.mode}"function"==typeof SuppressedError&&SuppressedError;var Ji={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 Zi=Object.freeze({__proto__:null,formatCaption:function(e,t){return we(e,"LLLL y",t)},formatDay:function(e,t){return we(e,"d",t)},formatMonthCaption:function(e,t){return we(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return we(e,"cccccc",t)},formatYearCaption:function(e,t){return we(e,"yyyy",t)}}),Qi=Object.freeze({__proto__:null,labelDay:function(e,t,r){return we(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 we(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var ea=e.createContext(void 0);function ta(e){var t,r,n,o,i,a=e.initialProps,l=(r=Ji,n=Y,o=new Date,{captionLayout:"buttons",classNames:r,formatters:Zi,labels:Qi,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=N(n):t&&(i=new Date(t,0,1)),o?a=L(o):r&&(a=new Date(r,11,31)),{fromDate:i?E(i):void 0,toDate:a?E(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"),(Xi(a)||qi(a)||Ki(a))&&(i=a.onSelect);var d=Gi(Gi(Gi({},l),a),{captionLayout:f,classNames:Gi(Gi({},l.classNames),a.classNames),components:Gi({},a.components),formatters:Gi(Gi({},l.formatters),a.formatters),fromDate:c,labels:Gi(Gi({},l.labels),a.labels),mode:a.mode||l.mode,modifiers:Gi(Gi({},l.modifiers),a.modifiers),modifiersClassNames:Gi(Gi({},l.modifiersClassNames),a.modifiersClassNames),onSelect:i,styles:Gi(Gi({},l.styles),a.styles),toDate:u});return Di.jsx(ea.Provider,{value:d,children:e.children})}function ra(){var t=e.useContext(ea);if(!t)throw new Error("useDayPicker must be used within a DayPickerProvider.");return t}function na(e){var t=ra(),r=t.locale,n=t.classNames,o=t.styles,i=t.formatters.formatCaption;return Di.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 oa(e){return Di.jsx("svg",Gi({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:Di.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 ia(e){var t,r,n=e.onChange,o=e.value,i=e.children,a=e.caption,l=e.className,s=e.style,c=ra(),u=null!==(r=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==r?r:oa;return Di.jsxs("div",{className:l,style:s,children:[Di.jsx("span",{className:c.classNames.vhidden,children:e["aria-label"]}),Di.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:o,onChange:n,children:i}),Di.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[a,Di.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function aa(e){var t,r=ra(),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 Di.jsx(Di.Fragment,{});if(!o)return Di.jsx(Di.Fragment,{});var f=[];if(function(e,t,r){const[n,o]=x(r?.in,e,t);return n.getFullYear()===o.getFullYear()}(n,o))for(var d=N(n),p=n.getMonth();p<=o.getMonth();p++)f.push(Pe(d,p));else for(d=N(new Date),p=0;p<=11;p++)f.push(Pe(d,p));var g=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ia;return Di.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=Pe(N(e.displayMonth),r);e.onChange(n)},value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:a}),children:f.map((function(e){return Di.jsx("option",{value:e.getMonth(),children:l(e,{locale:a})},e.getMonth())}))})}function la(e){var t,r=e.displayMonth,n=ra(),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 Di.jsx(Di.Fragment,{});if(!i)return Di.jsx(Di.Fragment,{});for(var p=o.getFullYear(),g=i.getFullYear(),h=p;h<=g;h++)d.push(Ce(I(new Date),h));var y=null!==(t=null==c?void 0:c.Dropdown)&&void 0!==t?t:ia;return Di.jsx(y,{name:"years","aria-label":f(),className:s.dropdown_year,style:l.dropdown_year,onChange:function(t){var n=Ce(N(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:a}),children:d.map((function(e){return Di.jsx("option",{value:e.getFullYear(),children:u(e,{locale:a})},e.getFullYear())}))})}function sa(){var t=ra(),r=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&&T(i,o)<0&&(o=h(i,-1*(s-1))),a&&T(o,a)<0&&(o=a),N(o)}(t),n=function(t,r){var n=e.useState(t),o=n[0];return[void 0===r?o:r,n[1]]}(r,t.month),o=n[0],i=n[1];return[o,function(e){var r;if(!t.disableNavigation){var n=N(e);i(n),null===(r=t.onMonthChange)||void 0===r||r.call(t,n)}}]}var ca=e.createContext(void 0);function ua(e){var t=ra(),r=sa(),n=r[0],o=r[1],i=function(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,o=N(e),i=T(N(h(o,n)),o),a=[],l=0;l<i;l++){var s=h(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=N(e);if(!r)return h(l,a);if(!(T(r,e)<i))return h(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=N(e);if(!r)return h(a,-i);if(!(T(a,r)<=0))return h(a,-i)}}(n,t),s=function(e){return i.some((function(t){return ke(e,t)}))},c={currentMonth:n,displayMonths:i,goToMonth:o,goToDate:function(e,r){s(e)||(r&&je(e,r)?o(h(e,1+-1*t.numberOfMonths)):o(e))},previousMonth:l,nextMonth:a,isDateDisplayed:s};return Di.jsx(ca.Provider,{value:c,children:e.children})}function fa(){var t=e.useContext(ca);if(!t)throw new Error("useNavigation must be used within a NavigationProvider");return t}function da(e){var t,r=ra(),n=r.classNames,o=r.styles,i=r.components,a=fa().goToMonth,l=function(t){a(h(t,e.displayIndex?-e.displayIndex:0))},s=null!==(t=null==i?void 0:i.CaptionLabel)&&void 0!==t?t:na,c=Di.jsx(s,{id:e.id,displayMonth:e.displayMonth});return Di.jsxs("div",{className:n.caption_dropdowns,style:o.caption_dropdowns,children:[Di.jsx("div",{className:n.vhidden,children:c}),Di.jsx(aa,{onChange:l,displayMonth:e.displayMonth}),Di.jsx(la,{onChange:l,displayMonth:e.displayMonth})]})}function pa(e){return Di.jsx("svg",Gi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Di.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 ga(e){return Di.jsx("svg",Gi({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:Di.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 ha=e.forwardRef((function(e,t){var r=ra(),n=r.classNames,o=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var a=i.join(" "),l=Gi(Gi({},o.button_reset),o.button);return e.style&&Object.assign(l,e.style),Di.jsx("button",Gi({},e,{ref:t,type:"button",className:a,style:l}))}));function ya(e){var t,r,n=ra(),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 Di.jsx(Di.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:ga,m=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:pa;return Di.jsxs("div",{className:a.nav,style:l.nav,children:[!e.hidePrevious&&Di.jsx(ha,{name:"previous-month","aria-label":d,className:p,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===o?Di.jsx(y,{className:a.nav_icon,style:l.nav_icon}):Di.jsx(m,{className:a.nav_icon,style:l.nav_icon})}),!e.hideNext&&Di.jsx(ha,{name:"next-month","aria-label":g,className:h,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===o?Di.jsx(m,{className:a.nav_icon,style:l.nav_icon}):Di.jsx(y,{className:a.nav_icon,style:l.nav_icon})})]})}function ma(e){var t=ra().numberOfMonths,r=fa(),n=r.previousMonth,o=r.nextMonth,i=r.goToMonth,a=r.displayMonths,l=a.findIndex((function(t){return ke(e.displayMonth,t)})),s=0===l,c=l===a.length-1,u=t>1&&(s||!c),f=t>1&&(c||!s);return Di.jsx(ya,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:o,previousMonth:n,onPreviousClick:function(){n&&i(n)},onNextClick:function(){o&&i(o)}})}function va(e){var t,r,n=ra(),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:na;return r=i?Di.jsx(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===l?Di.jsx(da,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===l?Di.jsxs(Di.Fragment,{children:[Di.jsx(da,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),Di.jsx(ma,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):Di.jsxs(Di.Fragment,{children:[Di.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),Di.jsx(ma,{displayMonth:e.displayMonth,id:e.id})]}),Di.jsx("div",{className:o.caption,style:a.caption,children:r})}function ba(e){var t=ra(),r=t.footer,n=t.styles,o=t.classNames.tfoot;return r?Di.jsx("tfoot",{className:o,style:n.tfoot,children:Di.jsx("tr",{children:Di.jsx("td",{colSpan:8,children:r})})}):Di.jsx(Di.Fragment,{})}function wa(){var e=ra(),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?b(new Date):v(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var a=g(n,i);o.push(a)}return o}(o,i,a);return Di.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&Di.jsx("td",{style:r.head_cell,className:t.head_cell}),c.map((function(e,n){return Di.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 Oa(){var e,t=ra(),r=t.classNames,n=t.styles,o=t.components,i=null!==(e=null==o?void 0:o.HeadRow)&&void 0!==e?e:wa;return Di.jsx("thead",{style:n.head,className:r.head,children:Di.jsx(i,{})})}function xa(e){var t=ra(),r=t.locale,n=t.formatters.formatDay;return Di.jsx(Di.Fragment,{children:n(e.date,{locale:r})})}var Ea=e.createContext(void 0);function ja(e){if(!qi(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return Di.jsx(Ea.Provider,{value:t,children:e.children})}return Di.jsx(ka,{initialProps:e.initialProps,children:e.children})}function ka(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 R(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?Yi([],n):[];if(r.selected){var u=c.findIndex((function(t){return R(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 Di.jsx(Ea.Provider,{value:l,children:r})}function Sa(){var t=e.useContext(Ea);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}var Pa,Ca=e.createContext(void 0);function Ra(e){if(!Ki(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return Di.jsx(Ca.Provider,{value:t,children:e.children})}return Di.jsx(za,{initialProps:e.initialProps,children:e.children})}function za(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],R(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:Se(i,l-1),before:g(i,l-1)}),i&&a&&c.disabled.push({after:i,before:g(i,l-1)}),!i&&a&&c.disabled.push({after:Se(a,l-1),before:g(a,l-1)})),s){if(i&&!a&&(c.disabled.push({before:g(i,1-s)}),c.disabled.push({after:g(i,s-1)})),i&&a){var u=s-(j(a,i)+1);c.disabled.push({before:Se(i,u)}),c.disabled.push({after:g(a,u)})}!i&&a&&(c.disabled.push({before:g(a,1-s)}),c.disabled.push({after:g(a,s-1)}))}return Di.jsx(Ca.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(R(o,e)&&R(n,e))return;if(R(o,e))return{from:o,to:void 0};if(R(n,e))return;return Ee(n,e)?{from:e,to:o}:{from:n,to:e}}return o?Ee(e,o)?{from:o,to:e}:{from:e,to:o}:n?je(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 Ta(){var t=e.useContext(Ca);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function La(e){return Array.isArray(e)?Yi([],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"}(Pa||(Pa={}));var Na=Pa.Selected,Ma=Pa.Disabled,Ia=Pa.Hidden,_a=Pa.Today,Aa=Pa.RangeEnd,Da=Pa.RangeMiddle,Ba=Pa.RangeStart,Fa=Pa.Outside;var Wa=e.createContext(void 0);function Va(e){var t=ra(),r=function(e,t,r){var n,o=((n={})[Na]=La(e.selected),n[Ma]=La(e.disabled),n[Ia]=La(e.hidden),n[_a]=[e.today],n[Aa]=[],n[Da]=[],n[Ba]=[],n[Fa]=[],n);return e.fromDate&&o[Ma].push({before:e.fromDate}),e.toDate&&o[Ma].push({after:e.toDate}),qi(e)?o[Ma]=o[Ma].concat(t.modifiers[Ma]):Ki(e)&&(o[Ma]=o[Ma].concat(r.modifiers[Ma]),o[Ba]=r.modifiers[Ba],o[Da]=r.modifiers[Da],o[Aa]=r.modifiers[Aa]),o}(t,Sa(),Ta()),n=function(e){var t={};return Object.entries(e).forEach((function(e){var r=e[0],n=e[1];t[r]=La(n)})),t}(t.modifiers),o=Gi(Gi({},r),n);return Di.jsx(Wa.Provider,{value:o,children:e.children})}function Ha(){var t=e.useContext(Wa);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function Ua(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(z(t))return R(e,t);if(function(e){return Array.isArray(e)&&e.every(z)}(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?(j(o,n)<0&&(n=(r=[o,n])[0],o=r[1]),j(e,n)>=0&&j(o,e)>=0):o?R(o,e):!!n&&R(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=j(t.before,e)>0,n=j(t.after,e)<0;return Ee(t.before,t.after)?n&&r:r||n}return function(e){return Boolean(e&&"object"==typeof e&&"after"in e)}(t)?j(e,t.after)>0:function(e){return Boolean(e&&"object"==typeof e&&"before"in e)}(t)?j(t.before,e)>0:"function"==typeof t&&t(e)}))}function $a(e,t,r){var n=Object.keys(t).reduce((function(r,n){var o=t[n];return Ua(e,o)&&r.push(n),r}),[]),o={};return n.forEach((function(e){return o[e]=!0})),r&&!ke(e,r)&&(o.outside=!0),o}function Ga(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:g,week:k,month:h,year:S,startOfWeek:function(e){return o.ISOWeek?b(e):v(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?A(e):_(e,{locale:f,weekStartsOn:s})}}[r](e,"after"===n?1:-1);"before"===n&&c?d=P([c,d]):"after"===n&&u&&(d=C([u,d]));var p=!0;if(i){var y=$a(d,i);p=!y.disabled&&!y.hidden}return p?d:l.count>365?l.lastFocused:Ga(d,{moveBy:r,direction:n,context:o,modifiers:i,retry:Gi(Gi({},l),{count:l.count+1})})}var Ya=e.createContext(void 0);function qa(t){var r=fa(),n=Ha(),o=e.useState(),i=o[0],a=o[1],l=e.useState(),s=l[0],c=l[1],u=function(e,t){for(var r,n,o=N(e[0]),i=L(e[e.length-1]),a=o;a<=i;){var l=$a(a,t);if(l.disabled||l.hidden)a=g(a,1);else{if(l.selected)return a;l.today&&!n&&(n=a),r||(r=a),a=g(a,1)}}return n||r}(r.displayMonths,n),f=(null!=i?i:s&&r.isDateDisplayed(s))?s:u,d=function(e){a(e)},p=ra(),h=function(e,t){if(i){var o=Ga(i,{moveBy:e,direction:t,context:p,modifiers:n});R(i,o)||(r.goToDate(o,i),d(o))}},y={focusedDay:i,focusTarget:f,blur:function(){c(i),a(void 0)},focus:d,focusDayAfter:function(){return h("day","after")},focusDayBefore:function(){return h("day","before")},focusWeekAfter:function(){return h("week","after")},focusWeekBefore:function(){return h("week","before")},focusMonthBefore:function(){return h("month","before")},focusMonthAfter:function(){return h("month","after")},focusYearBefore:function(){return h("year","before")},focusYearAfter:function(){return h("year","after")},focusStartOfWeek:function(){return h("startOfWeek","before")},focusEndOfWeek:function(){return h("endOfWeek","after")}};return Di.jsx(Ya.Provider,{value:y,children:t.children})}function Ka(){var t=e.useContext(Ya);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}var Xa=e.createContext(void 0);function Ja(e){if(!Xi(e.initialProps)){var t={selected:void 0};return Di.jsx(Xa.Provider,{value:t,children:e.children})}return Di.jsx(Za,{initialProps:e.initialProps,children:e.children})}function Za(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 Di.jsx(Xa.Provider,{value:n,children:r})}function Qa(){var t=e.useContext(Xa);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function el(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(Pa).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&r.push(o)}})),r}function tl(t,r,n){var o,i,a,l=ra(),s=Ka(),c=function(e,t){return $a(e,Ha(),t)}(t,r),u=function(e,t){var r=ra(),n=Qa(),o=Sa(),i=Ta(),a=Ka(),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,m=a.focusStartOfWeek,v=a.focusEndOfWeek,b={onClick:function(a){var l,s,c,u;Xi(r)?null===(l=n.onDayClick)||void 0===l||l.call(n,e,t,a):qi(r)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,a):Ki(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(),m();break;case"End":n.preventDefault(),n.stopPropagation(),v()}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}(t,c),f=function(){var e=ra(),t=Qa(),r=Sa(),n=Ta();return Xi(e)?t.selected:qi(e)?r.selected:Ki(e)?n.selected:void 0}(),d=Boolean(l.onDayClick||"default"!==l.mode);e.useEffect((function(){var e;c.outside||s.focusedDay&&d&&R(s.focusedDay,t)&&(null===(e=n.current)||void 0===e||e.focus())}),[s.focusedDay,t,n,d,c.outside]);var p=el(l,c).join(" "),g=function(e,t){var r=Gi({},e.styles.day);return Object.keys(t).forEach((function(t){var n;r=Gi(Gi({},r),null===(n=e.modifiersStyles)||void 0===n?void 0:n[t])})),r}(l,c),h=Boolean(c.outside&&!l.showOutsideDays||c.hidden),y=null!==(a=null===(i=l.components)||void 0===i?void 0:i.DayContent)&&void 0!==a?a:xa,m={style:g,className:p,children:Di.jsx(y,{date:t,displayMonth:r,activeModifiers:c}),role:"gridcell"},v=s.focusTarget&&R(s.focusTarget,t)&&!c.outside,b=s.focusedDay&&R(s.focusedDay,t),w=Gi(Gi(Gi({},m),((o={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,o.tabIndex=b||v?0:-1,o)),u);return{isButton:d,isHidden:h,activeModifiers:c,selectedDays:f,buttonProps:w,divProps:m}}function rl(t){var r=e.useRef(null),n=tl(t.date,t.displayMonth,r);return n.isHidden?Di.jsx("div",{role:"gridcell"}):n.isButton?Di.jsx(ha,Gi({name:"day",ref:r},n.buttonProps)):Di.jsx("div",Gi({},n.divProps))}function nl(e){var t=e.number,r=e.dates,n=ra(),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 Di.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:c});var u=s(Number(t),{locale:l});return Di.jsx(ha,{name:"week-number","aria-label":u,className:a.weeknumber,style:i.weeknumber,onClick:function(e){o(t,r,e)},children:c})}function ol(e){var t,r,n,o=ra(),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:rl,u=null!==(r=null==s?void 0:s.WeekNumber)&&void 0!==r?r:nl;return l&&(n=Di.jsx("td",{className:a.cell,style:i.cell,children:Di.jsx(u,{number:e.weekNumber,dates:e.dates})})),Di.jsxs("tr",{className:a.row,style:i.row,children:[n,e.dates.map((function(t){return Di.jsx("td",{className:a.cell,style:i.cell,role:"presentation",children:Di.jsx(c,{displayMonth:e.displayMonth,date:t})},function(e){return Math.trunc(+p(e)/1e3)}(t))}))]})}function il(e,t,r){for(var n=(null==r?void 0:r.ISOWeek)?A(t):_(t,r),o=(null==r?void 0:r.ISOWeek)?b(e):v(e,r),i=j(n,o),a=[],l=0;l<=i;l++)a.push(g(o,l));return a.reduce((function(e,t){var n=(null==r?void 0:r.ISOWeek)?q(t):X(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 al(e){var t,r,n,o=ra(),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=il(N(e),L(e),t);if(null==t?void 0:t.useFixedWeeks){var n=xe(e,t);if(n<6){var o=r[r.length-1],i=o.dates[o.dates.length-1],a=k(i,6-n),l=il(k(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:Oa,y=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:ol,m=null!==(n=null==u?void 0:u.Footer)&&void 0!==n?n:ba;return Di.jsxs("table",{id:e.id,className:a.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!s&&Di.jsx(h,{}),Di.jsx("tbody",{className:a.tbody,style:l.tbody,children:g.map((function(t){return Di.jsx(y,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)}))}),Di.jsx(m,{displayMonth:e.displayMonth})]})}var ll="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,sl=!1,cl=0;function ul(){return"react-day-picker-".concat(++cl)}function fl(t){var r,n,o=ra(),i=o.dir,a=o.classNames,l=o.styles,s=o.components,c=fa().displayMonths,u=function(t){var r,n=null!=t?t:sl?ul():null,o=e.useState(n),i=o[0],a=o[1];return ll((function(){null===i&&a(ul())}),[]),e.useEffect((function(){!1===sl&&(sl=!0)}),[]),null!==(r=null!=t?t:i)&&void 0!==r?r:void 0}(o.id?"".concat(o.id,"-").concat(t.displayIndex):void 0),f=o.id?"".concat(o.id,"-grid-").concat(t.displayIndex):void 0,d=[a.month],p=l.month,g=0===t.displayIndex,h=t.displayIndex===c.length-1,y=!g&&!h;"rtl"===i&&(h=(r=[g,h])[0],g=r[1]),g&&(d.push(a.caption_start),p=Gi(Gi({},p),l.caption_start)),h&&(d.push(a.caption_end),p=Gi(Gi({},p),l.caption_end)),y&&(d.push(a.caption_between),p=Gi(Gi({},p),l.caption_between));var m=null!==(n=null==s?void 0:s.Caption)&&void 0!==n?n:va;return Di.jsxs("div",{className:d.join(" "),style:p,children:[Di.jsx(m,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),Di.jsx(al,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function dl(e){var t=ra(),r=t.classNames,n=t.styles;return Di.jsx("div",{className:r.months,style:n.months,children:e.children})}function pl(t){var r,n,o=t.initialProps,i=ra(),a=Ka(),l=fa(),s=e.useState(!1),c=s[0],u=s[1];e.useEffect((function(){i.initialFocus&&a.focusTarget&&(c||(a.focus(a.focusTarget),u(!0)))}),[i.initialFocus,c,a.focus,a.focusTarget,a]);var f=[i.classNames.root,i.className];i.numberOfMonths>1&&f.push(i.classNames.multiple_months),i.showWeekNumber&&f.push(i.classNames.with_weeknumber);var d=Gi(Gi({},i.styles.root),i.style),p=Object.keys(o).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return Gi(Gi({},e),((r={})[t]=o[t],r))}),{}),g=null!==(n=null===(r=o.components)||void 0===r?void 0:r.Months)&&void 0!==n?n:dl;return Di.jsx("div",Gi({className:f.join(" "),style:d,dir:i.dir,id:i.id,nonce:o.nonce,title:o.title,lang:o.lang},p,{children:Di.jsx(g,{children:l.displayMonths.map((function(e,t){return Di.jsx(fl,{displayIndex:t,displayMonth:e},t)}))})}))}function gl(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 Di.jsx(ta,{initialProps:r,children:Di.jsx(ua,{children:Di.jsx(Ja,{initialProps:r,children:Di.jsx(ja,{initialProps:r,children:Di.jsx(Ra,{initialProps:r,children:Di.jsx(Va,{children:Di.jsx(qa,{children:t})})})})})})})}function hl(e){return Di.jsx(gl,Gi({},e,{children:Di.jsx(pl,{initialProps:e})}))}function yl(e){var t=e.className,r=e.classNames,o=e.showOutsideDays,l=void 0===o||o,s=a(e,["className","classNames","showOutsideDays"]);return n.createElement(hl,i({showOutsideDays:l,className:li("p-3",t),classNames:i({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:li(Ui({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:li("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"===s.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:li(Ui({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"},r),components:{IconLeft:function(){return n.createElement(bi,{className:"h-4 w-4"})},IconRight:function(){return n.createElement(wi,{className:"h-4 w-4"})}}},s))}function ml(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function vl(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;r=[...r,o];const l=t=>{const{scope:r,children:o,...l}=t,s=r?.[e]?.[a]||i,c=n.useMemo((()=>l),Object.values(l));return Di.jsx(s.Provider,{value:c,children:o})};return l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e]?.[a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},bl(o,...t)]}function bl(...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 o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}yl.displayName="Calendar";var wl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=n.forwardRef(((e,r)=>{const{asChild:n,...o}=e,i=n?Bi:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Di.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Ol(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e})),n.useMemo((()=>(...e)=>t.current?.(...e)),[])}function xl(e,t=globalThis?.document){const r=Ol(e);n.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[r,t])}var El,jl="dismissableLayer.update",kl="dismissableLayer.pointerDownOutside",Sl="dismissableLayer.focusOutside",Pl=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Cl=n.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=e,u=n.useContext(Pl),[f,d]=n.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=n.useState({}),h=Ri(t,(e=>d(e))),y=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(m),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=v,x=function(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1),i=n.useRef((()=>{}));return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let n=function(){zl(kl,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{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(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1);return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){zl(Sl,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{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 xl((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),n.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(El=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Rl(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=El)}}),[f,p,r,u]),n.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Rl())}),[f,u]),n.useEffect((()=>{const e=()=>g({});return document.addEventListener(jl,e),()=>document.removeEventListener(jl,e)}),[]),Di.jsx(wl.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...e.style},onFocusCapture:ml(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ml(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ml(e.onPointerDownCapture,x.onPointerDownCapture)})}));Cl.displayName="DismissableLayer";function Rl(){const e=new CustomEvent(jl);document.dispatchEvent(e)}function zl(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?function(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}(i,a):i.dispatchEvent(a)}n.forwardRef(((e,t)=>{const r=n.useContext(Pl),o=n.useRef(null),i=Ri(t,o);return n.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),Di.jsx(wl.div,{...e,ref:i})})).displayName="DismissableLayerBranch";var Tl=0;function Ll(){n.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nl()),document.body.insertAdjacentElement("beforeend",e[1]??Nl()),Tl++,()=>{1===Tl&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Tl--}}),[])}function Nl(){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 Ml="focusScope.autoFocusOnMount",Il="focusScope.autoFocusOnUnmount",_l={bubbles:!1,cancelable:!0},Al=n.forwardRef(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[s,c]=n.useState(null),u=Ol(i),f=Ol(a),d=n.useRef(null),p=Ri(t,(e=>c(e))),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Wl(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Wl(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Wl(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]),n.useEffect((()=>{if(s){Vl.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Ml,_l);s.addEventListener(Ml,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Wl(n,{select:t}),document.activeElement!==r)return}((e=Dl(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Wl(s))}return()=>{s.removeEventListener(Ml,u),setTimeout((()=>{const e=new CustomEvent(Il,_l);s.addEventListener(Il,f),s.dispatchEvent(e),e.defaultPrevented||Wl(t??document.body,{select:!0}),s.removeEventListener(Il,f),Vl.remove(g)}),0)}}var e}),[s,u,f,g]);const h=n.useCallback((e=>{if(!r&&!o)return;if(g.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=Dl(e),r=Bl(t,e),n=Bl(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Wl(i,{select:!0})):(e.preventDefault(),r&&Wl(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,g.paused]);return Di.jsx(wl.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Dl(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 Bl(e,t){for(const r of e)if(!Fl(r,{upTo:t}))return r}function Fl(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 Wl(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()}}Al.displayName="FocusScope";var Vl=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Hl(e,t),e.unshift(t)},remove(t){e=Hl(e,t),e[0]?.resume()}}}();function Hl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Ul=Boolean(globalThis?.document)?n.useLayoutEffect:()=>{},$l=n["useId".toString()]||(()=>{}),Gl=0;function Yl(e){const[t,r]=n.useState($l());return Ul((()=>{r((e=>e??String(Gl++)))}),[e]),t?`radix-${t}`:""}const ql=["top","right","bottom","left"],Kl=Math.min,Xl=Math.max,Jl=Math.round,Zl=Math.floor,Ql=e=>({x:e,y:e}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ts={start:"end",end:"start"};function rs(e,t,r){return Xl(e,Kl(t,r))}function ns(e,t){return"function"==typeof e?e(t):e}function os(e){return e.split("-")[0]}function is(e){return e.split("-")[1]}function as(e){return"x"===e?"y":"x"}function ls(e){return"y"===e?"height":"width"}function ss(e){return["top","bottom"].includes(os(e))?"y":"x"}function cs(e){return as(ss(e))}function us(e){return e.replace(/start|end/g,(e=>ts[e]))}function fs(e){return e.replace(/left|right|bottom|top/g,(e=>es[e]))}function ds(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 ps(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 gs(e,t,r){let{reference:n,floating:o}=e;const i=ss(t),a=cs(t),l=ls(a),s=os(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(is(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1)}return p}async function hs(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}=ns(t,e),g=ds(p),h=l[d?"floating"===f?"reference":"floating":f],y=ps(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})),m="floating"===f?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=ps(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:v,strategy:s}):m);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 ys(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ms(e){return ql.some((t=>e[t]>=0))}function vs(){return"undefined"!=typeof window}function bs(e){return xs(e)?(e.nodeName||"").toLowerCase():"#document"}function ws(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Os(e){var t;return null==(t=(xs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xs(e){return!!vs()&&(e instanceof Node||e instanceof ws(e).Node)}function Es(e){return!!vs()&&(e instanceof Element||e instanceof ws(e).Element)}function js(e){return!!vs()&&(e instanceof HTMLElement||e instanceof ws(e).HTMLElement)}function ks(e){return!(!vs()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ws(e).ShadowRoot)}function Ss(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Ls(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Ps(e){return["table","td","th"].includes(bs(e))}function Cs(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Rs(e){const t=zs(),r=Es(e)?Ls(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 zs(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ts(e){return["html","body","#document"].includes(bs(e))}function Ls(e){return ws(e).getComputedStyle(e)}function Ns(e){return Es(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ms(e){if("html"===bs(e))return e;const t=e.assignedSlot||e.parentNode||ks(e)&&e.host||Os(e);return ks(t)?t.host:t}function Is(e){const t=Ms(e);return Ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:js(t)&&Ss(t)?t:Is(t)}function _s(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Is(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=ws(o);if(i){const e=As(a);return t.concat(a,a.visualViewport||[],Ss(o)?o:[],e&&r?_s(e):[])}return t.concat(o,_s(o,[],r))}function As(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ds(e){const t=Ls(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=js(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,l=Jl(r)!==i||Jl(n)!==a;return l&&(r=i,n=a),{width:r,height:n,$:l}}function Bs(e){return Es(e)?e:e.contextElement}function Fs(e){const t=Bs(e);if(!js(t))return Ql(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Ds(t);let a=(i?Jl(r.width):r.width)/n,l=(i?Jl(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Ws=Ql(0);function Vs(e){const t=ws(e);return zs()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ws}function Hs(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Bs(e);let a=Ql(1);t&&(n?Es(n)&&(a=Fs(n)):a=Fs(e));const l=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ws(e))&&t}(i,r,n)?Vs(i):Ql(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=ws(i),t=n&&Es(n)?ws(n):n;let r=e,o=As(r);for(;o&&n&&t!==r;){const e=Fs(o),t=o.getBoundingClientRect(),n=Ls(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=ws(o),o=As(r)}}return ps({width:u,height:f,x:s,y:c})}function Us(e,t){const r=Ns(e).scrollLeft;return t?t.left+r:Hs(Os(e)).left+r}function $s(e,t,r){void 0===r&&(r=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:Us(e,n)),y:n.top+t.scrollTop}}function Gs(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=ws(e),n=Os(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=zs();(!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=Os(e),r=Ns(e),n=e.ownerDocument.body,o=Xl(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Xl(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+Us(e);const l=-r.scrollTop;return"rtl"===Ls(n).direction&&(a+=Xl(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(Os(e));else if(Es(t))n=function(e,t){const r=Hs(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=js(e)?Fs(e):Ql(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=Vs(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ps(n)}function Ys(e,t){const r=Ms(e);return!(r===t||!Es(r)||Ts(r))&&("fixed"===Ls(r).position||Ys(r,t))}function qs(e,t,r){const n=js(t),o=Os(t),i="fixed"===r,a=Hs(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=Ql(0);if(n||!n&&!i)if(("body"!==bs(t)||Ss(o))&&(l=Ns(t)),n){const e=Hs(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=Us(o));const c=!o||n||i?Ql(0):$s(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 Ks(e){return"static"===Ls(e).position}function Xs(e,t){if(!js(e)||"fixed"===Ls(e).position)return null;if(t)return t(e);let r=e.offsetParent;return Os(e)===r&&(r=r.ownerDocument.body),r}function Js(e,t){const r=ws(e);if(Cs(e))return r;if(!js(e)){let t=Ms(e);for(;t&&!Ts(t);){if(Es(t)&&!Ks(t))return t;t=Ms(t)}return r}let n=Xs(e,t);for(;n&&Ps(n)&&Ks(n);)n=Xs(n,t);return n&&Ts(n)&&Ks(n)&&!Rs(n)?r:n||function(e){let t=Ms(e);for(;js(t)&&!Ts(t);){if(Rs(t))return t;if(Cs(t))return null;t=Ms(t)}return null}(e)||r}const Zs={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=Os(n),l=!!t&&Cs(t.floating);if(n===a||l&&i)return r;let s={scrollLeft:0,scrollTop:0},c=Ql(1);const u=Ql(0),f=js(n);if((f||!f&&!i)&&(("body"!==bs(n)||Ss(a))&&(s=Ns(n)),js(n))){const e=Hs(n);c=Fs(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}const d=!a||f||i?Ql(0):$s(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:Os,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i="clippingAncestors"===r?Cs(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let n=_s(e,[],!1).filter((e=>Es(e)&&"body"!==bs(e))),o=null;const i="fixed"===Ls(e).position;let a=i?Ms(e):e;for(;Es(a)&&!Ts(a);){const t=Ls(a),r=Rs(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Ss(a)&&!r&&Ys(e,a))?n=n.filter((e=>e!==a)):o=t,a=Ms(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=Gs(t,r,o);return e.top=Xl(n.top,e.top),e.right=Kl(n.right,e.right),e.bottom=Kl(n.bottom,e.bottom),e.left=Xl(n.left,e.left),e}),Gs(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Js,getElementRects:async function(e){const t=this.getOffsetParent||Js,r=this.getDimensions,n=await r(e.floating);return{reference:qs(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}=Ds(e);return{width:t,height:r}},getScale:Fs,isElement:Es,isRTL:function(e){return"rtl"===Ls(e).direction}};function Qs(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=Bs(e),u=o||i?[...c?_s(c):[],..._s(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=Os(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:-Zl(u)+"px "+-Zl(o.clientWidth-(c+f))+"px "+-Zl(o.clientHeight-(u+d))+"px "+-Zl(c)+"px",threshold:Xl(0,Kl(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?Hs(e):null;return s&&function t(){const n=Hs(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 ec=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=os(r),l=is(r),s="y"===ss(r),c=["left","top"].includes(a)?-1:1,u=i&&s?-1:1,f=ns(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}}}}},tc=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}=ns(e,t),c={x:r,y:n},u=await hs(t,s),f=ss(os(o)),d=as(f);let p=c[d],g=c[f];if(i){const e="y"===d?"bottom":"right";p=rs(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";g=rs(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}}}}}},rc=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}=ns(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const m=os(o),v=ss(l),b=os(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),O=d||(b||!h?[fs(l)]:function(e){const t=fs(e);return[us(e),t,us(t)]}(l)),x="none"!==g;!d&&x&&O.push(...function(e,t,r,n){const o=is(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[]}}(os(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(us)))),i}(l,h,g,w));const E=[l,...O],j=await hs(t,y),k=[];let S=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&k.push(j[m]),f){const e=function(e,t,r){void 0===r&&(r=!1);const n=is(e),o=cs(e),i=ls(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=fs(a)),[a,fs(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 R;const e=null==(R=S.filter((e=>{if(x){const t=ss(e.placement);return t===v||"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:R[0];e&&(r=e);break}case"initialPlacement":r=l}if(o!==r)return{reset:{placement:r}}}return{}}}},nc=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}=ns(e,t),u=await hs(t,c),f=os(o),d=is(o),p="y"===ss(o),{width:g,height:h}=i.floating;let y,m;"top"===f||"bottom"===f?(y=f,m=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(m=f,y="end"===d?"top":"bottom");const v=h-u.top-u.bottom,b=g-u.left-u.right,w=Kl(h-u[y],v),O=Kl(g-u[m],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=v),x&&!d){const e=Xl(u.left,0),t=Xl(u.right,0),r=Xl(u.top,0),n=Xl(u.bottom,0);p?j=g-2*(0!==e||0!==t?e+t:Xl(u.left,u.right)):E=h-2*(0!==r||0!==n?r+n:Xl(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}}:{}}}},oc=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ns(e,t);switch(n){case"referenceHidden":{const e=ys(await hs(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ms(e)}}}case"escaped":{const e=ys(await hs(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:ms(e)}}}default:return{}}}}},ic=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}=ns(e,t)||{};if(null==c)return{};const f=ds(u),d={x:r,y:n},p=cs(o),g=ls(p),h=await a.getDimensions(c),y="y"===p,m=y?"top":"left",v=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=Kl(f[m],k),P=Kl(f[v],k),C=S,R=E-h[g]-P,z=E/2-h[g]/2+j,T=rs(C,z,R),L=!s.arrow&&null!=is(o)&&z!==T&&i.reference[g]/2-(z<C?S:P)-h[g]/2<0,N=L?z<C?z-C:z-R:0;return{[p]:d[p]+N,data:{[p]:T,centerOffset:z-T-N,...L&&{alignmentOffset:N}},reset:L}}}),ac=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}=ns(e,t),u={x:r,y:n},f=ss(o),d=as(f);let p=u[d],g=u[f];const h=ns(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 m,v;const e="y"===d?"width":"height",t=["top","left"].includes(os(o)),r=i.reference[f]-i.floating[e]+(t&&(null==(m=a.offset)?void 0:m[f])||0)+(t?0:y.crossAxis),n=i.reference[f]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[f])||0)-(t?y.crossAxis:0);g<r?g=r:g>n&&(g=n)}return{[d]:p,[f]:g}}}},lc=(e,t,r)=>{const n=new Map,o={platform:Zs,...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}=gs(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:m,data:v,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!=m?m:f,p={...p,[i]:{...p[i],...v}},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}=gs(c,d,s))),r=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var sc="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function cc(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(!cc(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)&&!cc(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function uc(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fc(e,t){const r=uc(e);return Math.round(t*r)/r}function dc(e){const t=n.useRef(e);return sc((()=>{t.current=e})),t}const pc=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?ic({element:r.current,padding:n}).fn(t):{}:r?ic({element:r,padding:n}).fn(t):{};var o}}),gc=(e,t)=>({...ec(e),options:[e,t]}),hc=(e,t)=>({...tc(e),options:[e,t]}),yc=(e,t)=>({...ac(e),options:[e,t]}),mc=(e,t)=>({...rc(e),options:[e,t]}),vc=(e,t)=>({...nc(e),options:[e,t]}),bc=(e,t)=>({...oc(e),options:[e,t]}),wc=(e,t)=>({...pc(e),options:[e,t]});var Oc=n.forwardRef(((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return Di.jsx(wl.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Di.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Oc.displayName="Arrow";var xc=Oc;function Ec(...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 o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}var jc="Popper",[kc,Sc]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Di.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},Ec(o,...t)]}(jc),[Pc,Cc]=kc(jc),Rc=e=>{const{__scopePopper:t,children:r}=e,[o,i]=n.useState(null);return Di.jsx(Pc,{scope:t,anchor:o,onAnchorChange:i,children:r})};Rc.displayName=jc;var zc="PopperAnchor",Tc=n.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:o,...i}=e,a=Cc(zc,r),l=n.useRef(null),s=Ri(t,l);return n.useEffect((()=>{a.onAnchorChange(o?.current||l.current)})),o?null:Di.jsx(wl.div,{...i,ref:s})}));Tc.displayName=zc;var Lc="PopperContent",[Nc,Mc]=kc(Lc),Ic=n.forwardRef(((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:a=0,align:l="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:h="optimized",onPlaced:y,...m}=e,v=Cc(Lc,r),[b,w]=n.useState(null),O=Ri(t,(e=>w(e))),[x,E]=n.useState(null),j=function(e){const[t,r]=n.useState(void 0);return Ul((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),t}(x),k=j?.width??0,S=j?.height??0,P=i+("center"!==l?"-"+l:""),C="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(f)?f:[f],z=R.length>0,T={padding:C,boundary:R.filter(Bc),altBoundary:z},{refs:L,floatingStyles:N,placement:M,isPositioned:I,middlewareData:_}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:a,elements:{reference:l,floating:s}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[d,p]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,h]=n.useState(i);cc(g,i)||h(i);const[y,m]=n.useState(null),[v,b]=n.useState(null),w=n.useCallback((e=>{e!==j.current&&(j.current=e,m(e))}),[]),O=n.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[]),x=l||y,E=s||v,j=n.useRef(null),k=n.useRef(null),S=n.useRef(d),P=null!=u,C=dc(u),R=dc(a),z=dc(f),T=n.useCallback((()=>{if(!j.current||!k.current)return;const e={placement:t,strategy:r,middleware:g};R.current&&(e.platform=R.current),lc(j.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==z.current};L.current&&!cc(S.current,t)&&(S.current=t,o.flushSync((()=>{p(t)})))}))}),[g,t,r,R,z]);sc((()=>{!1===f&&S.current.isPositioned&&(S.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[f]);const L=n.useRef(!1);sc((()=>(L.current=!0,()=>{L.current=!1})),[]),sc((()=>{if(x&&(j.current=x),E&&(k.current=E),x&&E){if(C.current)return C.current(x,E,T);T()}}),[x,E,T,C,P]);const N=n.useMemo((()=>({reference:j,floating:k,setReference:w,setFloating:O})),[w,O]),M=n.useMemo((()=>({reference:x,floating:E})),[x,E]),I=n.useMemo((()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=fc(M.floating,d.x),n=fc(M.floating,d.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...uc(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,c,M.floating,d.x,d.y]);return n.useMemo((()=>({...d,update:T,refs:N,elements:M,floatingStyles:I})),[d,T,N,M,I])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>Qs(...e,{animationFrame:"always"===h}),elements:{reference:v.anchor},middleware:[gc({mainAxis:a+S,alignmentAxis:s}),u&&hc({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?yc():void 0,...T}),u&&mc({...T}),vc({...T,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&&wc({element:x,padding:c}),Fc({arrowWidth:k,arrowHeight:S}),g&&bc({strategy:"referenceHidden",...T})]}),[A,D]=Wc(M),B=Ol(y);Ul((()=>{I&&B?.()}),[I,B]);const F=_.arrow?.x,W=_.arrow?.y,V=0!==_.arrow?.centerOffset,[H,U]=n.useState();return Ul((()=>{b&&U(window.getComputedStyle(b).zIndex)}),[b]),Di.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:I?N.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:e.dir,children:Di.jsx(Nc,{scope:r,placedSide:A,onArrowChange:E,arrowX:F,arrowY:W,shouldHideArrow:V,children:Di.jsx(wl.div,{"data-side":A,"data-align":D,...m,ref:O,style:{...m.style,animation:I?void 0:"none"}})})})}));Ic.displayName=Lc;var _c="PopperArrow",Ac={top:"bottom",right:"left",bottom:"top",left:"right"},Dc=n.forwardRef((function(e,t){const{__scopePopper:r,...n}=e,o=Mc(_c,r),i=Ac[o.placedSide];return Di.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:Di.jsx(xc,{...n,ref:t,style:{...n.style,display:"block"}})})}));function Bc(e){return null!==e}Dc.displayName=_c;var Fc=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]=Wc(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 Wc(e){const[t,r="center"]=e.split("-");return[t,r]}var Vc=Rc,Hc=Tc,Uc=Ic,$c=Dc,Gc=n.forwardRef(((e,r)=>{const{container:o,...i}=e,[a,l]=n.useState(!1);Ul((()=>l(!0)),[]);const s=o||a&&globalThis?.document?.body;return s?t.createPortal(Di.jsx(wl.div,{...i,ref:r}),s):null}));Gc.displayName="Portal";var Yc=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef({}),i=n.useRef(e),a=n.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return n.useReducer(((e,r)=>t[e][r]??e),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect((()=>{const e=qc(o.current);a.current="mounted"===s?e:"none"}),[s]),Ul((()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=qc(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),Ul((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=qc(o.current).includes(n.animationName);if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},l=e=>{e.target===t&&(a.current=qc(o.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:n.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=Ri(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 r||o.isPresent?n.cloneElement(i,{ref:a}):null};function qc(e){return e?.animationName||"none"}function Kc({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,i]=function({defaultProp:e,onChange:t}){const r=n.useState(e),[o]=r,i=n.useRef(o),a=Ol(t);return n.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:t,onChange:r}),a=void 0!==e,l=a?e:o,s=Ol(r);return[l,n.useCallback((t=>{if(a){const r="function"==typeof t?t(e):t;r!==e&&s(r)}else i(t)}),[a,e,i,s])]}Yc.displayName="Presence";var Xc=new WeakMap,Jc=new WeakMap,Zc={},Qc=0,eu=function(e){return e&&(e.host||eu(e.parentNode))},tu=function(e,t,r,n){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=eu(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]);Zc[r]||(Zc[r]=new WeakMap);var i=Zc[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=(Xc.get(e)||0)+1,c=(i.get(e)||0)+1;Xc.set(e,s),i.set(e,c),a.push(e),1===s&&o&&Jc.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(),Qc++,function(){a.forEach((function(e){var t=Xc.get(e)-1,o=i.get(e)-1;Xc.set(e,t),i.set(e,o),t||(Jc.has(e)||e.removeAttribute(n),Jc.delete(e)),o||e.removeAttribute(r)})),--Qc||(Xc=new WeakMap,Xc=new WeakMap,Jc=new WeakMap,Zc={})}},ru=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]"))),tu(n,o,r,"aria-hidden")):function(){return null}},nu="right-scroll-bar-position",ou="width-before-scroll-bar";function iu(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var au="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,lu=new WeakMap;function su(t,r){var n,o,i,a=(n=null,o=function(e){return t.forEach((function(t){return iu(t,e)}))},(i=e.useState((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return au((function(){var e=lu.get(a);if(e){var r=new Set(e),n=new Set(t),o=a.current;r.forEach((function(e){n.has(e)||iu(e,null)})),n.forEach((function(e){r.has(e)||iu(e,o)}))}lu.set(a,t)}),[t]),a}function cu(e){return e}function uu(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=cu);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=i({async:!0,ssr:!1},e),t}var fu=function(e){var t=e.sideCar,r=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,i({},r))};function du(e,t){return e.useMedium(t),fu}fu.isSideCarExport=!0;var pu=uu(),gu=function(){},hu=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:gu,onWheelCapture:gu,onTouchMoveCapture:gu}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,h=e.sideCar,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=e.gapMode,x=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,j=su([r,t]),k=i(i({},x),l);return n.createElement(n.Fragment,null,p&&n.createElement(E,{sideCar:pu,removeScrollBar:d,shards:g,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:O}),c?n.cloneElement(n.Children.only(u),i(i({},k),{ref:j})):n.createElement(w,i({},k,{className:f,ref:j}),u))}));hu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},hu.classNames={fullWidth:ou,zeroRight:nu};var yu=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__};var mu=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=yu();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)}}},vu=function(){var e,t=(e=mu(),function(t,r){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},bu={left:0,top:0,right:0,gap:0},wu=function(e){return parseInt(e||"",10)||0},Ou=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return bu;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[wu(r),wu(n),wu(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])}},xu=vu(),Eu="data-scroll-locked",ju=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(Eu,"] {\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(nu," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(ou," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(nu," .").concat(nu," {\n right: 0 ").concat(n,";\n }\n \n .").concat(ou," .").concat(ou," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Eu,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},ku=function(){var e=parseInt(document.body.getAttribute(Eu)||"0",10);return isFinite(e)?e:0},Su=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect((function(){return document.body.setAttribute(Eu,(ku()+1).toString()),function(){var e=ku()-1;e<=0?document.body.removeAttribute(Eu):document.body.setAttribute(Eu,e.toString())}}),[]);var a=n.useMemo((function(){return Ou(i)}),[i]);return n.createElement(xu,{styles:ju(a,!t,i,r?"":"!important")})},Pu=!1;if("undefined"!=typeof window)try{var Cu=Object.defineProperty({},"passive",{get:function(){return Pu=!0,!0}});window.addEventListener("test",Cu,Cu),window.removeEventListener("test",Cu,Cu)}catch(e){Pu=!1}var Ru=!!Pu&&{passive:!1},zu=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])},Tu=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Lu(e,n)){var o=Nu(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Lu=function(e,t){return"v"===e?function(e){return zu(e,"overflowY")}(t):function(e){return zu(e,"overflowX")}(t)},Nu=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},Mu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Iu=function(e){return[e.deltaX,e.deltaY]},_u=function(e){return e&&"current"in e?e.current:e},Au=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Du=0,Bu=[];function Fu(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Wu=du(pu,(function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(Du++)[0],a=n.useState(vu)[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(_u),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var n,i=Mu(e),a=r.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=Tu(f,u);if(!d)return!0;if(d?n=f:(n="v"===f?"h":"v",d=Tu(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var p=o.current||n;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=Nu(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&Lu(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)}),[]),u=n.useCallback((function(e){var r=e;if(Bu.length&&Bu[Bu.length-1]===a){var n="deltaY"in r?Iu(r):Mu(r),o=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(_u).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:Fu(n)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=n.useCallback((function(e){r.current=Mu(e),o.current=void 0}),[]),p=n.useCallback((function(t){f(t.type,Iu(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,Mu(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return Bu.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Ru),document.addEventListener("touchmove",u,Ru),document.addEventListener("touchstart",d,Ru),function(){Bu=Bu.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,Ru),document.removeEventListener("touchmove",u,Ru),document.removeEventListener("touchstart",d,Ru)}}),[]);var h=e.removeScrollBar,y=e.inert;return n.createElement(n.Fragment,null,y?n.createElement(a,{styles:Au(i)}):null,h?n.createElement(Su,{gapMode:e.gapMode}):null)})),Vu=n.forwardRef((function(e,t){return n.createElement(hu,i({},e,{ref:t,sideCar:Wu}))}));Vu.classNames=hu.classNames;var Hu="Popover",[Uu,$u]=vl(Hu,[Sc]),Gu=Sc(),[Yu,qu]=Uu(Hu),Ku=e=>{const{__scopePopover:t,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:l=!1}=e,s=Gu(t),c=n.useRef(null),[u,f]=n.useState(!1),[d=!1,p]=Kc({prop:o,defaultProp:i,onChange:a});return Di.jsx(Vc,{...s,children:Di.jsx(Yu,{scope:t,contentId:Yl(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:n.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:n.useCallback((()=>f(!0)),[]),onCustomAnchorRemove:n.useCallback((()=>f(!1)),[]),modal:l,children:r})})};Ku.displayName=Hu;var Xu="PopoverAnchor";n.forwardRef(((e,t)=>{const{__scopePopover:r,...o}=e,i=qu(Xu,r),a=Gu(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=i;return n.useEffect((()=>(l(),()=>s())),[l,s]),Di.jsx(Hc,{...a,...o,ref:t})})).displayName=Xu;var Ju="PopoverTrigger",Zu=n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=qu(Ju,r),i=Gu(r),a=Ri(t,o.triggerRef),l=Di.jsx(wl.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uf(o.open),...n,ref:a,onClick:ml(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:Di.jsx(Hc,{asChild:!0,...i,children:l})}));Zu.displayName=Ju;var Qu="PopoverPortal",[ef,tf]=Uu(Qu,{forceMount:void 0}),rf=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=qu(Qu,t);return Di.jsx(ef,{scope:t,forceMount:r,children:Di.jsx(Yc,{present:r||i.open,children:Di.jsx(Gc,{asChild:!0,container:o,children:n})})})};rf.displayName=Qu;var nf="PopoverContent",of=n.forwardRef(((e,t)=>{const r=tf(nf,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=qu(nf,e.__scopePopover);return Di.jsx(Yc,{present:n||i.open,children:i.modal?Di.jsx(af,{...o,ref:t}):Di.jsx(lf,{...o,ref:t})})}));of.displayName=nf;var af=n.forwardRef(((e,t)=>{const r=qu(nf,e.__scopePopover),o=n.useRef(null),i=Ri(t,o),a=n.useRef(!1);return n.useEffect((()=>{const e=o.current;if(e)return ru(e)}),[]),Di.jsx(Vu,{as:Bi,allowPinchZoom:!0,children:Di.jsx(sf,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ml(e.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:ml(e.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:ml(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),lf=n.forwardRef(((e,t)=>{const r=qu(nf,e.__scopePopover),o=n.useRef(!1),i=n.useRef(!1);return Di.jsx(sf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const n=t.target,a=r.triggerRef.current?.contains(n);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),sf=n.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=qu(nf,r),p=Gu(r);return Ll(),Di.jsx(Al,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Di.jsx(Cl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:Di.jsx(Uc,{"data-state":uf(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)"}})})})})),cf="PopoverClose";n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=qu(cf,r);return Di.jsx(wl.button,{type:"button",...n,ref:t,onClick:ml(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=cf;function uf(e){return e?"open":"closed"}n.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,o=Gu(r);return Di.jsx($c,{...o,...n,ref:t})})).displayName="PopoverArrow";var ff=rf,df=of,pf=Ku,gf=Zu,hf=n.forwardRef((function(e,t){var r=e.className,o=e.align,l=void 0===o?"center":o,s=e.sideOffset,c=void 0===s?4:s,u=a(e,["className","align","sideOffset"]);return n.createElement(ff,null,n.createElement(df,i({ref:t,align:l,sideOffset:c,className:li("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",r)},u)))}));function yf(e,[t,r]){return Math.min(r,Math.max(t,e))}function mf(...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 o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}hf.displayName=df.displayName;var vf=n.createContext(void 0);var bf=n.forwardRef(((e,t)=>Di.jsx(wl.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}})));bf.displayName="VisuallyHidden";var wf=[" ","Enter","ArrowUp","ArrowDown"],Of=[" ","Enter"],xf="Select",[Ef,jf,kf]=function(t){const r=t+"CollectionProvider",[o,i]=function(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=r?.[e]||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function l(t){const{scope:r,children:o,...l}=t,s=r?.[e][a]||i,c=n.useMemo((()=>l),Object.values(l));return Di.jsx(s.Provider,{value:c,children:o})}return r=[...r,o],l.displayName=t+"Provider",[l,function(r,l){const s=l?.[e][a]||i,c=n.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},mf(o,...t)]}(r),[a,l]=o(r,{collectionRef:{current:null},itemMap:new Map}),s=t=>{const{scope:r,children:n}=t,o=e.useRef(null),i=e.useRef(new Map).current;return Di.jsx(a,{scope:r,itemMap:i,collectionRef:o,children:n})};s.displayName=r;const c=t+"CollectionSlot",u=e.forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=Ri(t,l(c,r).collectionRef);return Di.jsx(Bi,{ref:o,children:n})}));u.displayName=c;const f=t+"CollectionItemSlot",d="data-radix-collection-item",p=e.forwardRef(((t,r)=>{const{scope:n,children:o,...i}=t,a=e.useRef(null),s=Ri(r,a),c=l(f,n);return e.useEffect((()=>(c.itemMap.set(a,{ref:a,...i}),()=>{c.itemMap.delete(a)}))),Di.jsx(Bi,{[d]:"",ref:s,children:o})}));return p.displayName=f,[{Provider:s,Slot:u,ItemSlot:p},function(r){const n=l(t+"CollectionConsumer",r);return e.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]}(xf),[Sf,Pf]=vl(xf,[kf,Sc]),Cf=Sc(),[Rf,zf]=Sf(xf),[Tf,Lf]=Sf(xf),Nf=e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:i,onOpenChange:a,value:l,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:g,form:h}=e,y=Cf(t),[m,v]=n.useState(null),[b,w]=n.useState(null),[O,x]=n.useState(!1),E=function(e){const t=n.useContext(vf);return e||t||"ltr"}(u),[j=!1,k]=Kc({prop:o,defaultProp:i,onChange:a}),[S,P]=Kc({prop:l,defaultProp:s,onChange:c}),C=n.useRef(null),R=!m||(h||!!m.closest("form")),[z,T]=n.useState(new Set),L=Array.from(z).map((e=>e.props.value)).join(";");return Di.jsx(Vc,{...y,children:Di.jsxs(Rf,{required:g,scope:t,trigger:m,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:O,onValueNodeHasChildrenChange:x,contentId:Yl(),value:S,onValueChange:P,open:j,onOpenChange:k,dir:E,triggerPointerDownPosRef:C,disabled:p,children:[Di.jsx(Ef.Provider,{scope:t,children:Di.jsx(Tf,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:n.useCallback((e=>{T((t=>{const r=new Set(t);return r.delete(e),r}))}),[]),children:r})}),R?Di.jsxs(bd,{"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?Di.jsx("option",{value:""}):null,Array.from(z)]},L):null]})})};Nf.displayName=xf;var Mf="SelectTrigger",If=n.forwardRef(((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,a=Cf(r),l=zf(Mf,r),s=l.disabled||o,c=Ri(t,l.onTriggerChange),u=jf(r),f=n.useRef("touch"),[d,p,g]=wd((e=>{const t=u().filter((e=>!e.disabled)),r=t.find((e=>e.value===l.value)),n=Od(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 Di.jsx(Hc,{asChild:!0,...a,children:Di.jsx(wl.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":vd(l.value)?"":void 0,...i,ref:c,onClick:ml(i.onClick,(e=>{e.currentTarget.focus(),"mouse"!==f.current&&h(e)})),onPointerDown:ml(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:ml(i.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||wf.includes(e.key)&&(h(),e.preventDefault())}))})})}));If.displayName=Mf;var _f="SelectValue",Af=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:a="",...l}=e,s=zf(_f,r),{onValueNodeHasChildrenChange:c}=s,u=void 0!==i,f=Ri(t,s.onValueNodeChange);return Ul((()=>{c(u)}),[c,u]),Di.jsx(wl.span,{...l,ref:f,style:{pointerEvents:"none"},children:vd(s.value)?Di.jsx(Di.Fragment,{children:a}):i})}));Af.displayName=_f;var Df=n.forwardRef(((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return Di.jsx(wl.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})}));Df.displayName="SelectIcon";var Bf=e=>Di.jsx(Gc,{asChild:!0,...e});Bf.displayName="SelectPortal";var Ff="SelectContent",Wf=n.forwardRef(((e,t)=>{const r=zf(Ff,e.__scopeSelect),[i,a]=n.useState();if(Ul((()=>{a(new DocumentFragment)}),[]),!r.open){const t=i;return t?o.createPortal(Di.jsx(Hf,{scope:e.__scopeSelect,children:Di.jsx(Ef.Slot,{scope:e.__scopeSelect,children:Di.jsx("div",{children:e.children})})}),t):null}return Di.jsx($f,{...e,ref:t})}));Wf.displayName=Ff;var Vf=10,[Hf,Uf]=Sf(Ff),$f=n.forwardRef(((e,t)=>{const{__scopeSelect:r,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:m,...v}=e,b=zf(Ff,r),[w,O]=n.useState(null),[x,E]=n.useState(null),j=Ri(t,(e=>O(e))),[k,S]=n.useState(null),[P,C]=n.useState(null),R=jf(r),[z,T]=n.useState(!1),L=n.useRef(!1);n.useEffect((()=>{if(w)return ru(w)}),[w]),Ll();const N=n.useCallback((e=>{const[t,...r]=R().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}}),[R,x]),M=n.useCallback((()=>N([k,w])),[N,k,w]);n.useEffect((()=>{z&&M()}),[z,M]);const{onOpenChange:I,triggerPointerDownPosRef:_}=b;n.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,_]),n.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]=wd((e=>{const t=R().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=Od(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),B=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&(S(e),n&&(L.current=!0))}),[b.value]),F=n.useCallback((()=>w?.focus()),[w]),W=n.useCallback(((e,t,r)=>{const n=!L.current&&!r;(void 0!==b.value&&b.value===t||n)&&C(e)}),[b.value]),V="popper"===o?Yf:Gf,H=V===Yf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:h,hideWhenDetached:y,avoidCollisions:m}:{};return Di.jsx(Hf,{scope:r,content:w,viewport:x,onViewportChange:E,itemRefCallback:B,selectedItem:k,onItemLeave:F,itemTextRefCallback:W,focusSelectedItem:M,selectedItemText:P,position:o,isPositioned:z,searchRef:A,children:Di.jsx(Vu,{as:Bi,allowPinchZoom:!0,children:Di.jsx(Al,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ml(i,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:Di.jsx(Cl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:Di.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...H,onPlaced:()=>T(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ml(v.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=R().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((()=>N(t))),e.preventDefault()}}))})})})})})}));$f.displayName="SelectContentImpl";var Gf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,a=zf(Ff,r),l=Uf(Ff,r),[s,c]=n.useState(null),[u,f]=n.useState(null),d=Ri(t,(e=>f(e))),p=jf(r),g=n.useRef(!1),h=n.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:v,focusSelectedItem:b}=l,w=n.useCallback((()=>{if(a.trigger&&a.valueNode&&s&&u&&y&&m&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),n=v.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-Vf,f=yf(i,[Vf,Math.max(Vf,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-Vf,f=yf(i,[Vf,Math.max(Vf,u-c)]);s.style.minWidth=l+"px",s.style.right=f+"px"}const i=p(),l=window.innerHeight-2*Vf,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*m.offsetHeight,w),x=window.getComputedStyle(y),E=parseInt(x.paddingTop,10),j=parseInt(x.paddingBottom,10),k=e.top+e.height/2-Vf,S=l-k,P=m.offsetHeight/2,C=d+h+(m.offsetTop+P),R=w-C;if(C<=k){const e=i.length>0&&m===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&&m===i[0].ref.current;s.style.top="0px";const t=Math.max(k,d+y.offsetTop+(e?E:0)+P)+R;s.style.height=t+"px",y.scrollTop=C-k+y.offsetTop}s.style.margin=`${Vf}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,m,v,a.dir,o]);Ul((()=>w()),[w]);const[O,x]=n.useState();Ul((()=>{u&&x(window.getComputedStyle(u).zIndex)}),[u]);const E=n.useCallback((e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)}),[w,b]);return Di.jsx(qf,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:E,children:Di.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:Di.jsx(wl.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})}));Gf.displayName="SelectItemAlignedPosition";var Yf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=Vf,...i}=e,a=Cf(r);return Di.jsx(Uc,{...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)"}})}));Yf.displayName="SelectPopperPosition";var[qf,Kf]=Sf(Ff,{}),Xf="SelectViewport",Jf=n.forwardRef(((e,t)=>{const{__scopeSelect:r,nonce:o,...i}=e,a=Uf(Xf,r),l=Kf(Xf,r),s=Ri(t,a.onViewportChange),c=n.useRef(0);return Di.jsxs(Di.Fragment,{children:[Di.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}),Di.jsx(Ef.Slot,{scope:r,children:Di.jsx(wl.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ml(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*Vf,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}))})})]})}));Jf.displayName=Xf;var Zf="SelectGroup",[Qf,ed]=Sf(Zf);n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Yl();return Di.jsx(Qf,{scope:r,id:o,children:Di.jsx(wl.div,{role:"group","aria-labelledby":o,...n,ref:t})})})).displayName=Zf;var td="SelectLabel",rd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=ed(td,r);return Di.jsx(wl.div,{id:o.id,...n,ref:t})}));rd.displayName=td;var nd="SelectItem",[od,id]=Sf(nd),ad=n.forwardRef(((e,t)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...l}=e,s=zf(nd,r),c=Uf(nd,r),u=s.value===o,[f,d]=n.useState(a??""),[p,g]=n.useState(!1),h=Ri(t,(e=>c.itemRefCallback?.(e,o,i))),y=Yl(),m=n.useRef("touch"),v=()=>{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 Di.jsx(od,{scope:r,value:o,disabled:i,textId:y,isSelected:u,onItemTextChange:n.useCallback((e=>{d((t=>t||(e?.textContent??"").trim()))}),[]),children:Di.jsx(Ef.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:Di.jsx(wl.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:ml(l.onFocus,(()=>g(!0))),onBlur:ml(l.onBlur,(()=>g(!1))),onClick:ml(l.onClick,(()=>{"mouse"!==m.current&&v()})),onPointerUp:ml(l.onPointerUp,(()=>{"mouse"===m.current&&v()})),onPointerDown:ml(l.onPointerDown,(e=>{m.current=e.pointerType})),onPointerMove:ml(l.onPointerMove,(e=>{m.current=e.pointerType,i?c.onItemLeave?.():"mouse"===m.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ml(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()})),onKeyDown:ml(l.onKeyDown,(e=>{""!==c.searchRef?.current&&" "===e.key||(Of.includes(e.key)&&v()," "===e.key&&e.preventDefault())}))})})})}));ad.displayName=nd;var ld="SelectItemText",sd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,className:i,style:a,...l}=e,s=zf(ld,r),c=Uf(ld,r),u=id(ld,r),f=Lf(ld,r),[d,p]=n.useState(null),g=Ri(t,(e=>p(e)),u.onItemTextChange,(e=>c.itemTextRefCallback?.(e,u.value,u.disabled))),h=d?.textContent,y=n.useMemo((()=>Di.jsx("option",{value:u.value,disabled:u.disabled,children:h},u.value)),[u.disabled,u.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=f;return Ul((()=>(m(y),()=>v(y))),[m,v,y]),Di.jsxs(Di.Fragment,{children:[Di.jsx(wl.span,{id:u.textId,...l,ref:g}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?o.createPortal(l.children,s.valueNode):null]})}));sd.displayName=ld;var cd="SelectItemIndicator",ud=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return id(cd,r).isSelected?Di.jsx(wl.span,{"aria-hidden":!0,...n,ref:t}):null}));ud.displayName=cd;var fd="SelectScrollUpButton",dd=n.forwardRef(((e,t)=>{const r=Uf(fd,e.__scopeSelect),o=Kf(fd,e.__scopeSelect),[i,a]=n.useState(!1),l=Ri(t,o.onScrollButtonChange);return Ul((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Di.jsx(hd,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));dd.displayName=fd;var pd="SelectScrollDownButton",gd=n.forwardRef(((e,t)=>{const r=Uf(pd,e.__scopeSelect),o=Kf(pd,e.__scopeSelect),[i,a]=n.useState(!1),l=Ri(t,o.onScrollButtonChange);return Ul((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;a(r)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),i?Di.jsx(hd,{...e,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));gd.displayName=pd;var hd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,a=Uf("SelectScrollButton",r),l=n.useRef(null),s=jf(r),c=n.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return n.useEffect((()=>()=>c()),[c]),Ul((()=>{const e=s().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[s]),Di.jsx(wl.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ml(i.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(o,50))})),onPointerMove:ml(i.onPointerMove,(()=>{a.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))})),onPointerLeave:ml(i.onPointerLeave,(()=>{c()}))})})),yd=n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e;return Di.jsx(wl.div,{"aria-hidden":!0,...n,ref:t})}));yd.displayName="SelectSeparator";var md="SelectArrow";function vd(e){return""===e||void 0===e}n.forwardRef(((e,t)=>{const{__scopeSelect:r,...n}=e,o=Cf(r),i=zf(md,r),a=Uf(md,r);return i.open&&"popper"===a.position?Di.jsx($c,{...o,...n,ref:t}):null})).displayName=md;var bd=n.forwardRef(((e,t)=>{const{value:r,...o}=e,i=n.useRef(null),a=Ri(t,i),l=function(e){const t=n.useRef({value:e,previous:e});return n.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(r);return n.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[l,r]),Di.jsx(bf,{asChild:!0,children:Di.jsx("select",{...o,ref:a,defaultValue:r})})}));function wd(e){const t=Ol(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback((e=>{const n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout((()=>e("")),1e3))}(n)}),[t]),a=n.useCallback((()=>{r.current="",window.clearTimeout(o.current)}),[]);return n.useEffect((()=>()=>window.clearTimeout(o.current)),[]),[r,i,a]}function Od(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}bd.displayName="BubbleSelect";var xd=If,Ed=Df,jd=Bf,kd=Wf,Sd=Jf,Pd=rd,Cd=ad,Rd=sd,zd=ud,Td=dd,Ld=gd,Nd=yd,Md=Nf,Id=Af,_d=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(xd,i({ref:t,className:li("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",r)},l),o,n.createElement(Ed,{asChild:!0},n.createElement(vi,{className:"h-4 w-4 opacity-50"})))}));_d.displayName=xd.displayName;var Ad=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Td,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(Oi,{className:"h-4 w-4"}))}));Ad.displayName=Td.displayName;var Dd=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Ld,i({ref:t,className:li("flex cursor-default items-center justify-center py-1",r)},o),n.createElement(vi,{className:"h-4 w-4"}))}));Dd.displayName=Ld.displayName;var Bd=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=e.position,s=void 0===l?"popper":l,c=a(e,["className","children","position"]);return n.createElement(jd,null,n.createElement(kd,i({ref:t,className:li("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"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:s},c),n.createElement(Ad,null),n.createElement(Sd,{className:li("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},o),n.createElement(Dd,null)))}));Bd.displayName=kd.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Pd,i({ref:t,className:li("px-2 py-1.5 text-sm font-semibold",r)},o))})).displayName=Pd.displayName;var Fd=n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(Cd,i({ref:t,className:li("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",r)},l),n.createElement("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},n.createElement(zd,null,n.createElement(mi,{className:"h-4 w-4"}))),n.createElement(Rd,null,o))}));function Wd(e){var t=e.className,r=e.dateFrom,o=e.dateTo,i=e.handleDateChange,a=n.useState({from:r||new Date(2022,0,20),to:o||g(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:v(e),to:_(e)}}},{label:"Ce mois-ci",getValue:function(){var e=new Date;return{from:N(e),to:L(e)}}},{label:"Le mois dernier",getValue:function(){var e=function(e,t,r){return h(e,-t,r)}(new Date,1);return{from:N(e),to:L(e)}}},{label:"Cette année",getValue:function(){var e=new Date;return{from:I(e),to:M(e)}}},{label:"L'année dernière",getValue:function(){var e=function(e,t,r){return S(e,-t,r)}(new Date,1);return{from:I(e),to:M(e)}}}];return n.createElement("div",{className:li("grid gap-2",t)},n.createElement(pf,null,n.createElement(gf,{asChild:!0},n.createElement($i,{id:"date",variant:"outline",className:li("w-[300px] justify-start text-left font-normal",!l&&"text-muted-foreground")},n.createElement(yi,{className:"mr-2 h-4 w-4"}),(null==l?void 0:l.from)?l.to?n.createElement(n.Fragment,null,we(l.from,"LLL dd, y")," -"," ",we(l.to,"LLL dd, y")):we(l.from,"LLL dd, y"):n.createElement("span",null,"Choisissez une date"))),n.createElement(hf,{className:"flex w-auto flex-col space-y-4 p-4",align:"start"},n.createElement(Md,{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)}}},n.createElement(_d,{className:"w-[300px]"},n.createElement(Id,{placeholder:"Sélectionnez un préréglage"})),n.createElement(Bd,{position:"popper"},c.map((function(e){return n.createElement(Fd,{key:e.label,value:e.label},e.label)})))),n.createElement("div",{className:"rounded-md border"},n.createElement(yl,{initialFocus:!0,mode:"range",defaultMonth:null==l?void 0:l.from,selected:l,onSelect:function(e){s(e),null==i||i(e)},numberOfMonths:2})))))}Fd.displayName=Cd.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Nd,i({ref:t,className:li("-mx-1 my-1 h-px bg-muted",r)},o))})).displayName=Nd.displayName;var Vd=n.forwardRef((function(e,t){var r=e.className,o=e.type,l=a(e,["className","type"]);return n.createElement("input",i({type:o,className:li("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",r),ref:t},l))}));Vd.displayName="Input";var Hd=.999,Ud=/[\\\/_+.#"@\[\(\{&]/,$d=/[\\\/_+.#"@\[\(\{&]/g,Gd=/[\s-]/,Yd=/[\s-]/g;function qd(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=qd(e,t,r,n,p+1,i+1,a))>g&&(p===o?s*=1:Ud.test(e.charAt(p-1))?(s*=.8,(u=e.slice(o,p-1).match($d))&&o>0&&(s*=Math.pow(Hd,u.length))):Gd.test(e.charAt(p-1))?(s*=.9,(f=e.slice(o,p-1).match(Yd))&&o>0&&(s*=Math.pow(Hd,f.length))):(s*=.17,o>0&&(s*=Math.pow(Hd,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=qd(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 Kd(e){return e.toLowerCase().replace(Yd," ")}function Xd(e,t,r){return qd(e=r&&r.length>0?""+(e+" "+r.join(" ")):e,t,Kd(e),Kd(t),0,0,{})}function Jd(){return Jd=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},Jd.apply(null,arguments)}function Zd(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 Qd(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function ep(...t){return e.useCallback(Qd(...t),t)}function tp(...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}const rp=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},np=n["useId".toString()]||(()=>{});let op=0;function ip(e){const[t,r]=n.useState(np());return rp((()=>{e||r((e=>null!=e?e:String(op++)))}),[e]),e||(t?`radix-${t}`:"")}function ap(t){const r=e.useRef(t);return e.useEffect((()=>{r.current=t})),e.useMemo((()=>(...e)=>{var t;return null===(t=r.current)||void 0===t?void 0:t.call(r,...e)}),[])}function lp({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=ap(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=ap(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])]}const sp=e.forwardRef(((t,r)=>{const{children:n,...o}=t,i=e.Children.toArray(n),a=i.find(fp);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 e.createElement(cp,Jd({},o,{ref:r}),e.isValidElement(t)?e.cloneElement(t,void 0,n):null)}return e.createElement(cp,Jd({},o,{ref:r}),n)}));sp.displayName="Slot";const cp=e.forwardRef(((t,r)=>{const{children:n,...o}=t;return e.isValidElement(n)?e.cloneElement(n,{...dp(o,n.props),ref:r?Qd(r,n.ref):n.ref}):e.Children.count(n)>1?e.Children.only(null):null}));cp.displayName="SlotClone";const up=({children:t})=>e.createElement(e.Fragment,null,t);function fp(t){return e.isValidElement(t)&&t.type===up}function dp(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 pp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>{const n=e.forwardRef(((t,n)=>{const{asChild:o,...i}=t,a=o?sp:r;return e.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),e.createElement(a,Jd({},i,{ref:n}))}));return n.displayName=`Primitive.${r}`,{...t,[r]:n}}),{});const gp="dismissableLayer.update",hp="dismissableLayer.pointerDownOutside",yp="dismissableLayer.focusOutside";let mp;const vp=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bp=e.forwardRef(((t,r)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:s,onDismiss:c,...u}=t,f=e.useContext(vp),[d,p]=e.useState(null),g=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,h]=e.useState({}),y=ep(r,(e=>p(e))),m=Array.from(f.layers),[v]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=d?m.indexOf(d):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,E=function(t,r=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ap(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){const t={originalEvent:e};function a(){Op(hp,n,t,{discrete:!0})}"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=a,r.addEventListener("click",i.current,{once:!0})):a()}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=[...f.branches].some((e=>e.contains(t)));x&&!r&&(null==a||a(e),null==s||s(e),e.defaultPrevented||null==c||c())}),g),j=function(t,r=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ap(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Op(yp,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;[...f.branches].some((e=>e.contains(t)))||(null==l||l(e),null==s||s(e),e.defaultPrevented||null==c||c())}),g);return function(t,r=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const n=ap(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return r.addEventListener("keydown",e),()=>r.removeEventListener("keydown",e)}),[n,r])}((e=>{w===f.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),g),e.useEffect((()=>{if(d)return o&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(mp=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),wp(),()=>{o&&1===f.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=mp)}}),[d,g,o,f]),e.useEffect((()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),wp())}),[d,f]),e.useEffect((()=>{const e=()=>h({});return document.addEventListener(gp,e),()=>document.removeEventListener(gp,e)}),[]),e.createElement(pp.div,Jd({},u,{ref:y,style:{pointerEvents:O?x?"auto":"none":void 0,...t.style},onFocusCapture:Zd(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Zd(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Zd(t.onPointerDownCapture,E.onPointerDownCapture)}))}));function wp(){const e=new CustomEvent(gp);document.dispatchEvent(e)}function Op(e,r,n,{discrete:o}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});r&&i.addEventListener(e,r,{once:!0}),o?function(e,r){e&&t.flushSync((()=>e.dispatchEvent(r)))}(i,a):i.dispatchEvent(a)}const xp="focusScope.autoFocusOnMount",Ep="focusScope.autoFocusOnUnmount",jp={bubbles:!1,cancelable:!0},kp=e.forwardRef(((t,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=t,[s,c]=e.useState(null),u=ap(i),f=ap(a),d=e.useRef(null),p=ep(r,(e=>c(e))),g=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){function e(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Rp(d.current,{select:!0})}function t(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Rp(d.current,{select:!0}))}function r(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Rp(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){zp.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(xp,jp);s.addEventListener(xp,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Rp(n,{select:t}),document.activeElement!==r)return}((e=Sp(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Rp(s))}return()=>{s.removeEventListener(xp,u),setTimeout((()=>{const e=new CustomEvent(Ep,jp);s.addEventListener(Ep,f),s.dispatchEvent(e),e.defaultPrevented||Rp(null!=t?t:document.body,{select:!0}),s.removeEventListener(Ep,f),zp.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=Sp(e),r=Pp(t,e),n=Pp(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||r!==i?e.shiftKey&&r===o&&(e.preventDefault(),n&&Rp(i,{select:!0})):(e.preventDefault(),n&&Rp(o,{select:!0})):r===t&&e.preventDefault()}}),[n,o,g.paused]);return e.createElement(pp.div,Jd({tabIndex:-1},l,{ref:p,onKeyDown:h}))}));function Sp(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 Pp(e,t){for(const r of e)if(!Cp(r,{upTo:t}))return r}function Cp(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 Rp(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 zp=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=Tp(e,t),e.unshift(t)},remove(t){var r;e=Tp(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function Tp(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Lp=e.forwardRef(((r,n)=>{var o;const{container:i=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...a}=r;return i?t.createPortal(e.createElement(pp.div,Jd({},a,{ref:n})),i):null}));const Np=r=>{const{present:n,children:o}=r,i=function(r){const[n,o]=e.useState(),i=e.useRef({}),a=e.useRef(r),l=e.useRef("none"),s=r?"mounted":"unmounted",[c,u]=function(t,r){return e.useReducer(((e,t)=>{const n=r[e][t];return null!=n?n:e}),t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Mp(i.current);l.current="mounted"===c?e:"none"}),[c]),rp((()=>{const e=i.current,t=a.current;if(t!==r){const n=l.current,o=Mp(e);if(r)u("MOUNT");else if("none"===o||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{u(t&&n!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=r}}),[r,u]),rp((()=>{if(n){const e=e=>{const r=Mp(i.current).includes(e.animationName);e.target===n&&r&&t.flushSync((()=>u("ANIMATION_END")))},r=e=>{e.target===n&&(l.current=Mp(i.current))};return n.addEventListener("animationstart",r),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",r),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(n),a="function"==typeof o?o({present:i.isPresent}):e.Children.only(o),l=ep(i.ref,a.ref);return"function"==typeof o||i.isPresent?e.cloneElement(a,{ref:l}):null};function Mp(e){return(null==e?void 0:e.animationName)||"none"}Np.displayName="Presence";let Ip=0;function _p(){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 Ap="right-scroll-bar-position",Dp="width-before-scroll-bar",Bp=uu(),Fp=function(){},Wp=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:Fp,onWheelCapture:Fp,onTouchMoveCapture:Fp}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,h=e.sideCar,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=h,E=su([r,t]),j=i(i({},O),l);return n.createElement(n.Fragment,null,p&&n.createElement(x,{sideCar:Bp,removeScrollBar:d,shards:g,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:r}),c?n.cloneElement(n.Children.only(u),i(i({},j),{ref:E})):n.createElement(w,i({},j,{className:f,ref:E}),u))}));Wp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Wp.classNames={fullWidth:Dp,zeroRight:Ap};var Vp,Hp,Up=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=yu();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)}}},$p={left:0,top:0,right:0,gap:0},Gp=function(e){return parseInt(e||"",10)||0},Yp=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return $p;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[Gp(r),Gp(n),Gp(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])}},qp=(Vp=Up(),Hp=function(e,t){n.useEffect((function(){return Vp.add(e),function(){Vp.remove()}}),[e&&t])},function(e){var t=e.styles,r=e.dynamic;return Hp(t,r),null}),Kp="data-scroll-locked",Xp=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(Kp,"] {\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(Ap," {\n right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Dp," {\n margin-right: ").concat(l,"px ").concat(n,";\n }\n \n .").concat(Ap," .").concat(Ap," {\n right: 0 ").concat(n,";\n }\n \n .").concat(Dp," .").concat(Dp," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(Kp,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},Jp=function(){var e=parseInt(document.body.getAttribute(Kp)||"0",10);return isFinite(e)?e:0},Zp=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,i=void 0===o?"margin":o;n.useEffect((function(){return document.body.setAttribute(Kp,(Jp()+1).toString()),function(){var e=Jp()-1;e<=0?document.body.removeAttribute(Kp):document.body.setAttribute(Kp,e.toString())}}),[]);var a=n.useMemo((function(){return Yp(i)}),[i]);return n.createElement(qp,{styles:Xp(a,!t,i,r?"":"!important")})},Qp=!1;if("undefined"!=typeof window)try{var eg=Object.defineProperty({},"passive",{get:function(){return Qp=!0,!0}});window.addEventListener("test",eg,eg),window.removeEventListener("test",eg,eg)}catch(e){Qp=!1}var tg=!!Qp&&{passive:!1},rg=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])},ng=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),og(e,r)){var n=ig(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},og=function(e,t){return"v"===e?function(e){return rg(e,"overflowY")}(t):function(e){return rg(e,"overflowX")}(t)},ig=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},ag=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lg=function(e){return[e.deltaX,e.deltaY]},sg=function(e){return e&&"current"in e?e.current:e},cg=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ug=0,fg=[];var dg=du(Bp,(function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(ug++)[0],a=n.useState((function(){return vu()}))[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(sg),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom;var n,i=ag(e),a=r.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=ng(f,u);if(!d)return!0;if(d?n=f:(n="v"===f?"h":"v",d=ng(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var p=o.current||n;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=ig(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&og(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)}),[]),u=n.useCallback((function(e){var r=e;if(fg.length&&fg[fg.length-1]===a){var n="deltaY"in r?lg(r):ag(r),o=t.current.filter((function(e){return e.name===r.type&&e.target===r.target&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(sg).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=n.useCallback((function(e){r.current=ag(e),o.current=void 0}),[]),p=n.useCallback((function(t){f(t.type,lg(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,ag(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return fg.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,tg),document.addEventListener("touchmove",u,tg),document.addEventListener("touchstart",d,tg),function(){fg=fg.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,tg),document.removeEventListener("touchmove",u,tg),document.removeEventListener("touchstart",d,tg)}}),[]);var h=e.removeScrollBar,y=e.inert;return n.createElement(n.Fragment,null,y?n.createElement(a,{styles:cg(i)}):null,h?n.createElement(Zp,{gapMode:"margin"}):null)})),pg=n.forwardRef((function(e,t){return n.createElement(Wp,i({},e,{ref:t,sideCar:dg}))}));pg.classNames=Wp.classNames;const gg="Dialog",[hg,yg]=function(t,r=[]){let n=[];const o=()=>{const r=n.map((t=>e.createContext(t)));return function(n){const o=(null==n?void 0: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=(null==n?void 0:n[t][a])||i,c=e.useMemo((()=>l),Object.values(l));return e.createElement(s.Provider,{value:c},o)}return n=[...n,o],l.displayName=r+"Provider",[l,function(n,l){const s=(null==l?void 0: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}\``)}]},tp(o,...r)]}(gg),[mg,vg]=hg(gg),bg="DialogPortal",[wg,Og]=hg(bg,{forceMount:void 0}),xg="DialogOverlay",Eg=e.forwardRef(((t,r)=>{const n=Og(xg,t.__scopeDialog),{forceMount:o=n.forceMount,...i}=t,a=vg(xg,t.__scopeDialog);return a.modal?e.createElement(Np,{present:o||a.open},e.createElement(jg,Jd({},i,{ref:r}))):null})),jg=e.forwardRef(((t,r)=>{const{__scopeDialog:n,...o}=t,i=vg(xg,n);return e.createElement(pg,{as:sp,allowPinchZoom:!0,shards:[i.contentRef]},e.createElement(pp.div,Jd({"data-state":zg(i.open)},o,{ref:r,style:{pointerEvents:"auto",...o.style}})))})),kg="DialogContent",Sg=e.forwardRef(((t,r)=>{const n=Og(kg,t.__scopeDialog),{forceMount:o=n.forceMount,...i}=t,a=vg(kg,t.__scopeDialog);return e.createElement(Np,{present:o||a.open},a.modal?e.createElement(Pg,Jd({},i,{ref:r})):e.createElement(Cg,Jd({},i,{ref:r})))})),Pg=e.forwardRef(((t,r)=>{const n=vg(kg,t.__scopeDialog),o=e.useRef(null),i=ep(r,n.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return ru(e)}),[]),e.createElement(Rg,Jd({},t,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Zd(t.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:Zd(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:Zd(t.onFocusOutside,(e=>e.preventDefault()))}))})),Cg=e.forwardRef(((t,r)=>{const n=vg(kg,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return e.createElement(Rg,Jd({},t,{ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{var r,a;(null===(r=t.onCloseAutoFocus)||void 0===r||r.call(t,e),e.defaultPrevented)||(o.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),e.preventDefault());o.current=!1,i.current=!1},onInteractOutside:e=>{var r,a;null===(r=t.onInteractOutside)||void 0===r||r.call(t,e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const l=e.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(l))&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}}))})),Rg=e.forwardRef(((t,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=t,s=vg(kg,n),c=ep(r,e.useRef(null));return e.useEffect((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:_p()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:_p()),Ip++,()=>{1===Ip&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Ip--}}),[]),e.createElement(e.Fragment,null,e.createElement(kp,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a},e.createElement(bp,Jd({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":zg(s.open)},l,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}));function zg(e){return e?"open":"closed"}const Tg=t=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:l=!0}=t,s=e.useRef(null),c=e.useRef(null),[u=!1,f]=lp({prop:o,defaultProp:i,onChange:a});return e.createElement(mg,{scope:r,triggerRef:s,contentRef:c,contentId:ip(),titleId:ip(),descriptionId:ip(),open:u,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l},n)},Lg=t=>{const{__scopeDialog:r,forceMount:n,children:o,container:i}=t,a=vg(bg,r);return e.createElement(wg,{scope:r,forceMount:n},e.Children.map(o,(t=>e.createElement(Np,{present:n||a.open},e.createElement(Lp,{asChild:!0,container:i},t)))))},Ng=Eg,Mg=Sg;var Ig='[cmdk-group=""]',_g='[cmdk-group-items=""]',Ag='[cmdk-item=""]',Dg=`${Ag}:not([aria-disabled="true"])`,Bg="cmdk-item-select",Fg="data-value",Wg=(e,t,r)=>Xd(e,t,r),Vg=n.createContext(void 0),Hg=()=>n.useContext(Vg),Ug=n.createContext(void 0),$g=()=>n.useContext(Ug),Gg=n.createContext(void 0),Yg=n.forwardRef(((e,t)=>{let r=lh((()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",filtered:{count:0,items:new Map,groups:new Set}}})),o=lh((()=>new Set)),i=lh((()=>new Map)),a=lh((()=>new Map)),l=lh((()=>new Set)),s=ih(e),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:g,loop:h,disablePointerSelection:y=!1,vimBindings:m=!0,...v}=e,b=n.useId(),w=n.useId(),O=n.useId(),x=n.useRef(null),E=fh();ah((()=>{if(void 0!==f){let e=f.trim();r.current.value=e,j.emit()}}),[f]),ah((()=>{E(6,z)}),[]);let j=n.useMemo((()=>({subscribe:e=>(l.current.add(e),()=>l.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,i,a;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)R(),P(),E(1,C);else if("value"===e&&(n||E(5,z),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=n.useMemo((()=>({value:(e,t,n)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,S(t,n)),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,(()=>{R(),P(),r.current.value||C(),j.emit()})),()=>{a.current.delete(e),o.current.delete(e),r.current.filtered.items.delete(e);let t=T();E(4,(()=>{R(),(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||e["aria-label"],disablePointerSelection:y,listId:b,inputId:O,labelId:w,listInnerRef:x})),[]);function S(e,t){var n,o;let i=null!=(o=null==(n=s.current)?void 0:n.filter)?o:Wg;return e?i(e,r.current.search,t):0}function P(){if(!r.current.search||!1===s.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.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 n=x.current;L().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(_g);t?t.appendChild(e.parentElement===t?e:e.closest(`${_g} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${_g} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${Ig}[${Fg}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=L().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Fg);j.setState("value",t||void 0)}function R(){var e,t,n,l;if(!r.current.search||!1===s.current.shouldFilter)return void(r.current.filtered.count=o.current.size);r.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==(n=a.current.get(i))?void 0:n.keywords)?l:[]);r.current.filtered.items.set(i,o),o>0&&c++}for(let[e,t]of i.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=c}function z(){var e,t,r;let n=T();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(Ig))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function T(){var e;return null==(e=x.current)?void 0:e.querySelector(`${Ag}[aria-selected="true"]`)}function L(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(Dg))}function N(e){let t=L()[e];t&&j.setState("value",t.getAttribute(Fg))}function M(e){var t;let r=T(),n=L(),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(Fg))}function I(e){let t,r=T(),n=null==r?void 0:r.closest(Ig);for(;n&&!t;)n=e>0?nh(n,Ig):oh(n,Ig),t=null==n?void 0:n.querySelector(Dg);t?j.setState("value",t.getAttribute(Fg)):M(e)}let _=()=>N(L().length-1),A=e=>{e.preventDefault(),e.metaKey?_():e.altKey?I(1):M(1)},D=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?I(-1):M(-1)};return n.createElement(pp.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=v.onKeyDown)||t.call(v,e),!e.defaultPrevented)switch(e.key){case"n":case"j":m&&e.ctrlKey&&A(e);break;case"ArrowDown":A(e);break;case"p":case"k":m&&e.ctrlKey&&D(e);break;case"ArrowUp":D(e);break;case"Home":e.preventDefault(),N(0);break;case"End":e.preventDefault(),_();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=T();if(t){let e=new Event(Bg);t.dispatchEvent(e)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:ph},c),dh(e,(e=>n.createElement(Ug.Provider,{value:j},n.createElement(Vg.Provider,{value:k},e)))))})),qg=n.forwardRef(((e,t)=>{var r,o;let i=n.useId(),a=n.useRef(null),l=n.useContext(Gg),s=Hg(),c=ih(e),u=null!=(o=null==(r=c.current)?void 0:r.forceMount)?o:null==l?void 0:l.forceMount;ah((()=>{if(!u)return s.item(i,null==l?void 0:l.id)}),[u]);let f=uh(i,a,[e.value,e.children,a],e.keywords),d=$g(),p=ch((e=>e.value&&e.value===f.current)),g=ch((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(n.useEffect((()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(Bg,h),()=>t.removeEventListener(Bg,h)}),[g,e.onSelect,e.disabled]),!g)return null;let{disabled:m,value:v,onSelect:b,forceMount:w,keywords:O,...x}=e;return n.createElement(pp.div,{ref:sh([a,t]),...x,id:i,"cmdk-item":"",role:"option","aria-disabled":!!m,"aria-selected":!!p,"data-disabled":!!m,"data-selected":!!p,onPointerMove:m||s.disablePointerSelection?void 0:y,onClick:m?void 0:h},e.children)})),Kg=n.forwardRef(((e,t)=>{let{heading:r,children:o,forceMount:i,...a}=e,l=n.useId(),s=n.useRef(null),c=n.useRef(null),u=n.useId(),f=Hg(),d=ch((e=>!(!i&&!1!==f.filter())||(!e.search||e.filtered.groups.has(l))));ah((()=>f.group(l)),[]),uh(l,s,[e.value,e.heading,c]);let p=n.useMemo((()=>({id:l,forceMount:i})),[i]);return n.createElement(pp.div,{ref:sh([s,t]),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},r&&n.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),dh(e,(e=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},n.createElement(Gg.Provider,{value:p},e)))))})),Xg=n.forwardRef(((e,t)=>{let{alwaysRender:r,...o}=e,i=n.useRef(null),a=ch((e=>!e.search));return r||a?n.createElement(pp.div,{ref:sh([i,t]),...o,"cmdk-separator":"",role:"separator"}):null})),Jg=n.forwardRef(((e,t)=>{let{onValueChange:r,...o}=e,i=null!=e.value,a=$g(),l=ch((e=>e.search)),s=ch((e=>e.value)),c=Hg(),u=n.useMemo((()=>{var e;let t=null==(e=c.listInnerRef.current)?void 0:e.querySelector(`${Ag}[${Fg}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return n.useEffect((()=>{null!=e.value&&a.setState("search",e.value)}),[e.value]),n.createElement(pp.input,{ref:t,...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?e.value:l,onChange:e=>{i||a.setState("search",e.target.value),null==r||r(e.target.value)}})})),Zg=n.forwardRef(((e,t)=>{let{children:r,label:o="Suggestions",...i}=e,a=n.useRef(null),l=n.useRef(null),s=Hg();return n.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)}}}),[]),n.createElement(pp.div,{ref:sh([a,t]),...i,"cmdk-list":"",role:"listbox","aria-label":o,id:s.listId},dh(e,(e=>n.createElement("div",{ref:sh([l,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),Qg=n.forwardRef(((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:a,container:l,...s}=e;return n.createElement(Tg,{open:r,onOpenChange:o},n.createElement(Lg,{container:l},n.createElement(Ng,{"cmdk-overlay":"",className:i}),n.createElement(Mg,{"aria-label":e.label,"cmdk-dialog":"",className:a},n.createElement(Yg,{ref:t,...s}))))})),eh=n.forwardRef(((e,t)=>ch((e=>0===e.filtered.count))?n.createElement(pp.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),th=n.forwardRef(((e,t)=>{let{progress:r,children:o,label:i="Loading...",...a}=e;return n.createElement(pp.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},dh(e,(e=>n.createElement("div",{"aria-hidden":!0},e))))})),rh=Object.assign(Yg,{List:Zg,Item:qg,Input:Jg,Group:Kg,Separator:Xg,Dialog:Qg,Empty:eh,Loading:th});function nh(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function oh(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ih(e){let t=n.useRef(e);return ah((()=>{t.current=e})),t}var ah="undefined"==typeof window?n.useEffect:n.useLayoutEffect;function lh(e){let t=n.useRef();return void 0===t.current&&(t.current=e()),t}function sh(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function ch(e){let t=$g(),r=()=>e(t.snapshot());return n.useSyncExternalStore(t.subscribe,r,r)}function uh(e,t,r,o=[]){let i=n.useRef(),a=Hg();return ah((()=>{var n;let l=(()=>{var e;for(let t of r){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(e,l,s),null==(n=t.current)||n.setAttribute(Fg,l),i.current=l})),i}var fh=()=>{let[e,t]=n.useState(),r=lh((()=>new Map));return ah((()=>{r.current.forEach((e=>e())),r.current=new Map}),[e]),(e,n)=>{r.current.set(e,n),t({})}};function dh({asChild:e,children:t},r){return e&&n.isValidElement(t)?n.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},r(t.props.children)):r(t)}var ph={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function gh(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function hh(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function yh(...e){return t=>{let r=!1;const n=e.map((e=>{const n=hh(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():hh(e[t],null)}}}}function mh(...e){return n.useCallback(yh(...e),e)}var vh=n.forwardRef(((e,t)=>{const{children:r,...o}=e,i=n.Children.toArray(r),a=i.find(Oh);if(a){const e=a.props.children,r=i.map((t=>t===a?n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null:t));return Di.jsx(bh,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return Di.jsx(bh,{...o,ref:t,children:r})}));vh.displayName="Slot";var bh=n.forwardRef(((e,t)=>{const{children:r,...o}=e;if(n.isValidElement(r)){const e=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}(r),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,r.props);return r.type!==n.Fragment&&(i.ref=t?yh(t,e):e),n.cloneElement(r,i)}return n.Children.count(r)>1?n.Children.only(null):null}));bh.displayName="SlotClone";var wh=({children:e})=>Di.jsx(Di.Fragment,{children:e});function Oh(e){return n.isValidElement(e)&&e.type===wh}var xh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=n.forwardRef(((e,r)=>{const{asChild:n,...o}=e,i=n?vh:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Di.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});var Eh,jh="dismissableLayer.update",kh="dismissableLayer.pointerDownOutside",Sh="dismissableLayer.focusOutside",Ph=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ch=n.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:l,onDismiss:s,...c}=e,u=n.useContext(Ph),[f,d]=n.useState(null),p=f?.ownerDocument??globalThis?.document,[,g]=n.useState({}),h=mh(t,(e=>d(e))),y=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(m),b=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,O=b>=v,x=function(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1),i=n.useRef((()=>{}));return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let n=function(){zh(kh,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=n,t.addEventListener("click",i.current,{once:!0})):n()}else t.removeEventListener("click",i.current);o.current=!1},n=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(n),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{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(e,t=globalThis?.document){const r=Ol(e),o=n.useRef(!1);return n.useEffect((()=>{const e=e=>{if(e.target&&!o.current){zh(Sh,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{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 xl((e=>{b===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),n.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Eh=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Rh(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Eh)}}),[f,p,r,u]),n.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Rh())}),[f,u]),n.useEffect((()=>{const e=()=>g({});return document.addEventListener(jh,e),()=>document.removeEventListener(jh,e)}),[]),Di.jsx(xh.div,{...c,ref:h,style:{pointerEvents:w?O?"auto":"none":void 0,...e.style},onFocusCapture:gh(e.onFocusCapture,E.onFocusCapture),onBlurCapture:gh(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:gh(e.onPointerDownCapture,x.onPointerDownCapture)})}));Ch.displayName="DismissableLayer";function Rh(){const e=new CustomEvent(jh);document.dispatchEvent(e)}function zh(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?function(e,t){e&&o.flushSync((()=>e.dispatchEvent(t)))}(i,a):i.dispatchEvent(a)}n.forwardRef(((e,t)=>{const r=n.useContext(Ph),o=n.useRef(null),i=mh(t,o);return n.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),Di.jsx(xh.div,{...e,ref:i})})).displayName="DismissableLayerBranch";var Th="focusScope.autoFocusOnMount",Lh="focusScope.autoFocusOnUnmount",Nh={bubbles:!1,cancelable:!0},Mh=n.forwardRef(((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...l}=e,[s,c]=n.useState(null),u=Ol(i),f=Ol(a),d=n.useRef(null),p=mh(t,(e=>c(e))),g=n.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;n.useEffect((()=>{if(o){let e=function(e){if(g.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Dh(d.current,{select:!0})},t=function(e){if(g.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Dh(d.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Dh(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]),n.useEffect((()=>{if(s){Bh.add(g);const t=document.activeElement;if(!s.contains(t)){const r=new CustomEvent(Th,Nh);s.addEventListener(Th,u),s.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Dh(n,{select:t}),document.activeElement!==r)return}((e=Ih(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Dh(s))}return()=>{s.removeEventListener(Th,u),setTimeout((()=>{const e=new CustomEvent(Lh,Nh);s.addEventListener(Lh,f),s.dispatchEvent(e),e.defaultPrevented||Dh(t??document.body,{select:!0}),s.removeEventListener(Lh,f),Bh.remove(g)}),0)}}var e}),[s,u,f,g]);const h=n.useCallback((e=>{if(!r&&!o)return;if(g.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=Ih(e),r=_h(t,e),n=_h(t.reverse(),e);return[r,n]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Dh(i,{select:!0})):(e.preventDefault(),r&&Dh(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,g.paused]);return Di.jsx(xh.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})}));function Ih(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 _h(e,t){for(const r of e)if(!Ah(r,{upTo:t}))return r}function Ah(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 Dh(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()}}Mh.displayName="FocusScope";var Bh=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Fh(e,t),e.unshift(t)},remove(t){e=Fh(e,t),e[0]?.resume()}}}();function Fh(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Wh=n.forwardRef(((e,r)=>{const{container:o,...i}=e,[a,l]=n.useState(!1);Ul((()=>l(!0)),[]);const s=o||a&&globalThis?.document?.body;return s?t.createPortal(Di.jsx(xh.div,{...i,ref:r}),s):null}));Wh.displayName="Portal";var Vh=e=>{const{present:t,children:r}=e,o=function(e){const[t,r]=n.useState(),o=n.useRef({}),i=n.useRef(e),a=n.useRef("none"),l=e?"mounted":"unmounted",[s,c]=function(e,t){return n.useReducer(((e,r)=>t[e][r]??e),e)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect((()=>{const e=Hh(o.current);a.current="mounted"===s?e:"none"}),[s]),Ul((()=>{const t=o.current,r=i.current;if(r!==e){const n=a.current,o=Hh(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),Ul((()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,n=n=>{const a=Hh(o.current).includes(n.animationName);if(n.target===t&&a&&(c("ANIMATION_END"),!i.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)}))}},l=e=>{e.target===t&&(a.current=Hh(o.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",n),t.addEventListener("animationend",n),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",n),t.removeEventListener("animationend",n)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:n.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),i="function"==typeof r?r({present:o.isPresent}):n.Children.only(r),a=mh(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 r||o.isPresent?n.cloneElement(i,{ref:a}):null};function Hh(e){return e?.animationName||"none"}function Uh(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}Vh.displayName="Presence";var $h="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,Gh=new WeakMap;function Yh(t,r){var n,o,i,a=(n=null,o=function(e){return t.forEach((function(t){return Uh(t,e)}))},(i=e.useState((function(){return{value:n,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return $h((function(){var e=Gh.get(a);if(e){var r=new Set(e),n=new Set(t),o=a.current;r.forEach((function(e){n.has(e)||Uh(e,null)})),n.forEach((function(e){r.has(e)||Uh(e,o)}))}Gh.set(a,t)}),[t]),a}function qh(e){return e}var Kh=function(e){var t=e.sideCar,r=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,i({},r))};Kh.isSideCarExport=!0;var Xh=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=qh);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=i({async:!0,ssr:!1},e),t}(),Jh=function(){},Zh=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:Jh,onWheelCapture:Jh,onTouchMoveCapture:Jh}),l=o[0],s=o[1],c=e.forwardProps,u=e.children,f=e.className,d=e.removeScrollBar,p=e.enabled,g=e.shards,h=e.sideCar,y=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,O=e.gapMode,x=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,j=Yh([r,t]),k=i(i({},x),l);return n.createElement(n.Fragment,null,p&&n.createElement(E,{sideCar:Xh,removeScrollBar:d,shards:g,noIsolation:y,inert:m,setCallbacks:s,allowPinchZoom:!!v,lockRef:r,gapMode:O}),c?n.cloneElement(n.Children.only(u),i(i({},k),{ref:j})):n.createElement(w,i({},k,{className:f,ref:j}),u))}));Zh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zh.classNames={fullWidth:Dp,zeroRight:Ap};var Qh=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=yu();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)}}},ey=function(){var e=function(){var e=Qh();return function(t,r){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&r])}}();return function(t){var r=t.styles,n=t.dynamic;return e(r,n),null}},ty=!1;if("undefined"!=typeof window)try{var ry=Object.defineProperty({},"passive",{get:function(){return ty=!0,!0}});window.addEventListener("test",ry,ry),window.removeEventListener("test",ry,ry)}catch(e){ty=!1}var ny=!!ty&&{passive:!1},oy=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])},iy=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ay(e,n)){var o=ly(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},ay=function(e,t){return"v"===e?function(e){return oy(e,"overflowY")}(t):function(e){return oy(e,"overflowX")}(t)},ly=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},sy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cy=function(e){return[e.deltaX,e.deltaY]},uy=function(e){return e&&"current"in e?e.current:e},fy=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},dy=0,py=[];function gy(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var hy,yy=(hy=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),i=n.useState(dy++)[0],a=n.useState(ey)[0],l=n.useRef(e);n.useEffect((function(){l.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=c([e.lockRef.current],(e.shards||[]).map(uy),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=n.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var n,i=sy(e),a=r.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=iy(f,u);if(!d)return!0;if(d?n=f:(n="v"===f?"h":"v",d=iy(f,u)),!d)return!1;if(!o.current&&"changedTouches"in e&&(s||c)&&(o.current=n),!n)return!0;var p=o.current||n;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=ly(e,l),g=p[0],h=p[1]-p[2]-i*g;(g||h)&&ay(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)}),[]),u=n.useCallback((function(e){var r=e;if(py.length&&py[py.length-1]===a){var n="deltaY"in r?cy(r):sy(r),o=t.current.filter((function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&(t=e.delta,o=n,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var i=(l.current.shards||[]).map(uy).filter(Boolean).filter((function(e){return e.contains(r.target)}));(i.length>0?s(r,i[0]):!l.current.noIsolation)&&r.cancelable&&r.preventDefault()}}}),[]),f=n.useCallback((function(e,r,n,o){var i={name:e,delta:r,target:n,should:o,shadowParent:gy(n)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=n.useCallback((function(e){r.current=sy(e),o.current=void 0}),[]),p=n.useCallback((function(t){f(t.type,cy(t),t.target,s(t,e.lockRef.current))}),[]),g=n.useCallback((function(t){f(t.type,sy(t),t.target,s(t,e.lockRef.current))}),[]);n.useEffect((function(){return py.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",u,ny),document.addEventListener("touchmove",u,ny),document.addEventListener("touchstart",d,ny),function(){py=py.filter((function(e){return e!==a})),document.removeEventListener("wheel",u,ny),document.removeEventListener("touchmove",u,ny),document.removeEventListener("touchstart",d,ny)}}),[]);var h=e.removeScrollBar,y=e.inert;return n.createElement(n.Fragment,null,y?n.createElement(a,{styles:fy(i)}):null,h?n.createElement(Zp,{gapMode:e.gapMode}):null)},Xh.useMedium(hy),Kh),my=n.forwardRef((function(e,t){return n.createElement(Zh,i({},e,{ref:t,sideCar:yy}))}));my.classNames=Zh.classNames;var vy="Dialog",[by,wy]=vl(vy),[Oy,xy]=by(vy),Ey="DialogTrigger";n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Ey,r),i=mh(t,o.triggerRef);return Di.jsx(xh.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Vy(o.open),...n,ref:i,onClick:gh(e.onClick,o.onOpenToggle)})})).displayName=Ey;var jy="DialogPortal",[ky,Sy]=by(jy,{forceMount:void 0}),Py=e=>{const{__scopeDialog:t,forceMount:r,children:o,container:i}=e,a=xy(jy,t);return Di.jsx(ky,{scope:t,forceMount:r,children:n.Children.map(o,(e=>Di.jsx(Vh,{present:r||a.open,children:Di.jsx(Wh,{asChild:!0,container:i,children:e})})))})};Py.displayName=jy;var Cy="DialogOverlay",Ry=n.forwardRef(((e,t)=>{const r=Sy(Cy,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=xy(Cy,e.__scopeDialog);return i.modal?Di.jsx(Vh,{present:n||i.open,children:Di.jsx(zy,{...o,ref:t})}):null}));Ry.displayName=Cy;var zy=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Cy,r);return Di.jsx(my,{as:vh,allowPinchZoom:!0,shards:[o.contentRef],children:Di.jsx(xh.div,{"data-state":Vy(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})})),Ty="DialogContent",Ly=n.forwardRef(((e,t)=>{const r=Sy(Ty,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=xy(Ty,e.__scopeDialog);return Di.jsx(Vh,{present:n||i.open,children:i.modal?Di.jsx(Ny,{...o,ref:t}):Di.jsx(My,{...o,ref:t})})}));Ly.displayName=Ty;var Ny=n.forwardRef(((e,t)=>{const r=xy(Ty,e.__scopeDialog),o=n.useRef(null),i=mh(t,r.contentRef,o);return n.useEffect((()=>{const e=o.current;if(e)return ru(e)}),[]),Di.jsx(Iy,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gh(e.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:gh(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:gh(e.onFocusOutside,(e=>e.preventDefault()))})})),My=n.forwardRef(((e,t)=>{const r=xy(Ty,e.__scopeDialog),o=n.useRef(!1),i=n.useRef(!1);return Di.jsx(Iy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||r.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));const n=t.target,a=r.triggerRef.current?.contains(n);a&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})})),Iy=n.forwardRef(((e,t)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...l}=e,s=xy(Ty,r),c=n.useRef(null),u=mh(t,c);return Ll(),Di.jsxs(Di.Fragment,{children:[Di.jsx(Mh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Di.jsx(Ch,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Vy(s.open),...l,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),Di.jsxs(Di.Fragment,{children:[Di.jsx(Gy,{titleId:s.titleId}),Di.jsx(Yy,{contentRef:c,descriptionId:s.descriptionId})]})]})})),_y="DialogTitle",Ay=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(_y,r);return Di.jsx(xh.h2,{id:o.titleId,...n,ref:t})}));Ay.displayName=_y;var Dy="DialogDescription",By=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Dy,r);return Di.jsx(xh.p,{id:o.descriptionId,...n,ref:t})}));By.displayName=Dy;var Fy="DialogClose",Wy=n.forwardRef(((e,t)=>{const{__scopeDialog:r,...n}=e,o=xy(Fy,r);return Di.jsx(xh.button,{type:"button",...n,ref:t,onClick:gh(e.onClick,(()=>o.onOpenChange(!1)))})}));function Vy(e){return e?"open":"closed"}Wy.displayName=Fy;var Hy="DialogTitleWarning",[Uy,$y]=function(e,t){const r=n.createContext(t),o=e=>{const{children:t,...o}=e,i=n.useMemo((()=>o),Object.values(o));return Di.jsx(r.Provider,{value:i,children:t})};return o.displayName=e+"Provider",[o,function(o){const i=n.useContext(r);if(i)return i;if(void 0!==t)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}]}(Hy,{contentName:Ty,titleName:_y,docsSlug:"dialog"}),Gy=({titleId:e})=>{const t=$y(Hy),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return n.useEffect((()=>{if(e){document.getElementById(e)||console.error(r)}}),[r,e]),null},Yy=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$y("DialogDescriptionWarning").contentName}}.`;return n.useEffect((()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)||console.warn(r)}}),[r,e,t]),null},qy=Ry,Ky=Ly,Xy=Ay,Jy=By,Zy=Wy,Qy=Py,em=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(qy,i({ref:t,className:li("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",r)},o))}));em.displayName=qy.displayName,n.forwardRef((function(e,t){var r=e.className,o=e.children,l=a(e,["className","children"]);return n.createElement(Qy,null,n.createElement(em,null),n.createElement(Ky,i({ref:t,className:li("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",r)},l),o,n.createElement(Zy,{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"},n.createElement(Pi,{className:"h-4 w-4"}),n.createElement("span",{className:"sr-only"},"Close"))))})).displayName=Ky.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Xy,i({ref:t,className:li("text-lg font-semibold leading-none tracking-tight",r)},o))})).displayName=Xy.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(Jy,i({ref:t,className:li("text-sm text-muted-foreground",r)},o))})).displayName=Jy.displayName;var tm=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh,i({ref:t,className:li("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",r)},o))}));tm.displayName=rh.displayName;var rm=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},n.createElement(Si,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.createElement(rh.Input,i({ref:t,className:li("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",r)},o)))}));rm.displayName=rh.Input.displayName;var nm=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.List,i({ref:t,className:li("max-h-[300px] overflow-y-auto overflow-x-hidden",r)},o))}));nm.displayName=rh.List.displayName;var om=n.forwardRef((function(e,t){return n.createElement(rh.Empty,i({ref:t,className:"py-6 text-center text-sm"},e))}));om.displayName=rh.Empty.displayName;var im=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.Group,i({ref:t,className:li("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",r)},o))}));im.displayName=rh.Group.displayName,n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.Separator,i({ref:t,className:li("-mx-1 h-px bg-border",r)},o))})).displayName=rh.Separator.displayName;var am=n.forwardRef((function(e,t){var r=e.className,o=a(e,["className"]);return n.createElement(rh.Item,i({ref:t,className:li("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",r)},o))}));function lm(e){var t,r=e.value,o=e.onSearch,i=e.onValueChange,a=e.disabled,l=e.placeholder,s=e.options,c=e.loading,u=n.useState(!1),f=u[0],d=u[1],p=n.useState(""),g=p[0],h=p[1],y=function(e,t){var r=n.useState(e),o=r[0],i=r[1];return n.useEffect((function(){var r=setTimeout((function(){i(e)}),t);return function(){clearTimeout(r)}}),[e,t]),o}(g,400),m=n.useRef("");return n.useEffect((function(){y!==m.current&&(m.current=y,o(y))}),[y,o]),n.createElement("div",{className:"w-full max-w-md mx-auto"},n.createElement(pf,{open:f,onOpenChange:function(e){a||d(e)}},n.createElement(gf,{asChild:!0},n.createElement($i,{variant:"outline",role:"combobox","aria-expanded":f,disabled:a,className:li("w-full justify-between",a&&"opacity-70 cursor-not-allowed")},r?null===(t=s.find((function(e){return e.value===r})))||void 0===t?void 0:t.label:l,n.createElement(xi,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"}))),n.createElement(hf,{className:"w-full p-0"},n.createElement(tm,null,n.createElement(rm,{placeholder:l,onValueChange:function(e){return h(e)}}),c?n.createElement("div",{className:"flex items-center justify-center py-4"},n.createElement("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-primary border-t-transparent"})):n.createElement(nm,null,n.createElement(om,null,"No ",l," found."),n.createElement(im,null,s.map((function(e,t){return n.createElement(am,{key:t,value:e.value,onSelect:function(){console.log("option",e),i(e.value),d(!1)}},n.createElement(mi,{className:li("mr-2 h-4 w-4",r===e.value?"opacity-100":"opacity-0")}),e.label)}))))))))}function sm(t){var r=this,o=t.title,a=t.filters,c=t.setFilters,u=t.configFilters,f=t.onSearch,d=t.count,p=t.isLoading,g=t.setCurrentPage,h=t.handleOptionsSearch,y=t.optionsLoading,m=n.useState(a),v=m[0],b=m[1],w=e.useState(!1),O=w[0],x=w[1],E=n.useMemo((function(){return JSON.stringify(v)!==JSON.stringify(a)}),[v,a]),j=function(){return l(r,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return b(a),E?[4,g(1)]:[3,2];case 1:e.sent(),e.label=2;case 2:return f(),[2]}}))}))};return n.createElement("div",{className:"flex flex-col gap-2"},n.createElement("h1",{className:"text-2xl font-bold text-[rgb(0,137,149)]"},n.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"},n.createElement("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),n.createElement("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),n.createElement("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),n.createElement("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),n.createElement("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),n.createElement("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})),o,n.createElement("span",{className:"ml-2 px-2 py-1 text-sm bg-gray-100 text-[rgb(0,137,149)] rounded-full"},d)),n.createElement("div",{className:"border-b border-gray-100 mb-4"}),n.createElement("div",{className:"flex gap-4 flex-wrap justify-between"},n.createElement(Wd,{dateFrom:a.fromDate,dateTo:a.toDate,handleDateChange:function(e){c(i(i({},a),{fromDate:null==e?void 0:e.from,toDate:null==e?void 0:e.to}))}}),u&&u.map((function(t,r){return n.createElement("div",{key:"".concat(t.name,"-").concat(r)},"Text"===t.type&&n.createElement(Vd,{type:"text",placeholder:t.placeholder,value:a[t.name],onChange:function(e){var r;e.target.value?c(i(i({},a),((r={})[t.name]=e.target.value,r))):(delete a[t.name],c(i({},a)))},onKeyDown:function(e){"Enter"===e.key&&j()}}),"Select_old"===t.type&&n.createElement(Md,{disabled:t.disabled||0===t.options.length,value:a[t.name],onValueChange:function(e){var r;c(i(i({},a),((r={})[t.name]="_empty"===e?void 0:e,r)))}},n.createElement(_d,null,n.createElement(Id,{placeholder:t.placeholder})),n.createElement(Bd,null,e.useMemo((function(){return t.options.map((function(e,t){return n.createElement(Fd,{key:"".concat(e.VALUE,"-").concat(t),value:e.VALUE||"_empty"},e.NAME)}))}),[t.options]))),"Select"===t.type&&n.createElement(lm,{loading:y,onSearch:function(e){e&&e.length>0&&!0===t.searchable&&h(t,e)},disabled:t.disabled||0===t.options.length,value:a[t.name],placeholder:t.placeholder,options:e.useMemo((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;c(i(i({},a),((r={})[t.name]="_empty"===e?void 0:e,r)))}}))})),n.createElement("div",{className:"flex gap-2 ml-auto"},u.some((function(e){return"Export"===e.type}))&&n.createElement($i,{disabled:O,onClick:function(){return l(r,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:return x(!0),"POST"!==(null==(e=u.find((function(e){return"Export"===e.type})))?void 0:e.method)?[3,2]:[4,(c=null==e?void 0:e.url,f=a,l(r,void 0,void 0,(function(){var e,t,r,n;return s(this,(function(i){switch(i.label){case 0:return[4,fetch(c,{method:"POST",body:JSON.stringify({filters:f})})];case 1:return[4,i.sent().blob()];case 2:return e=i.sent(),t=window.URL.createObjectURL(e),(r=document.createElement("a")).href=t,n="".concat(o.replace(/\s+/g,"_"),"_").concat(a.fromDate,"_").concat(a.toDate,"_.csv"),r.download=n,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(t),document.body.removeChild(r),[2]}}))})))];case 1:return n.sent(),[3,4];case 2:return[4,(i=null==e?void 0:e.ctx,l(r,void 0,void 0,(function(){var e,t,r,n,l,c;return s(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),[4,fetch(function(){for(var e="/cashplus/newfront/templates/extract-action.cfm?ctx=".concat(i),t=0,r=Object.entries(a);t<r.length;t++){var n=r[t],o=n[0],l=n[1];if(l&&"object"!=typeof l){if("fromDate"===o||"toDate"===o){var s=new Date(l);e+="&".concat(o,"=").concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"),"-").concat(String(s.getDate()).padStart(2,"0"));continue}e+="&".concat(o,"=").concat(l)}}return e}())];case 1:if(!(e=s.sent()).ok)throw new Error("Export failed");return[4,e.blob()];case 2:return t=s.sent(),r=window.URL.createObjectURL(t),(n=document.createElement("a")).href=r,l="".concat(o.replace(/\s+/g,"_"),"_").concat(a.fromDate,"_").concat(a.toDate,"_.csv"),n.download=l,document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(r),document.body.removeChild(n),[3,4];case 3:return c=s.sent(),console.error("Export error:",c),[3,4];case 4:return[2]}}))})))];case 3:n.sent(),n.label=4;case 4:return t=setInterval((function(){x(!1),clearInterval(t)}),3e4),[2]}var i,c,f}))}))},size:"sm"},n.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"},n.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.createElement("polyline",{points:"7 10 12 15 17 10"}),n.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),"CSV"),n.createElement($i,{size:"sm",onClick:j,disabled:p},E?n.createElement(n.Fragment,null,n.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"},n.createElement("circle",{cx:"11",cy:"11",r:"8"}),n.createElement("path",{d:"m21 21-4.3-4.3"})),"Recherche"):n.createElement(n.Fragment,null,n.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"},n.createElement("path",{d:"M21 12a9 9 0 11-3-6.74"}),n.createElement("path",{d:"M21 3v6h-6"})),"Actualiser")))))}
|
27
27
|
/**
|
28
28
|
* table-core
|
29
29
|
*
|