buildgrid-ui 1.1.0-dev.18 → 1.1.0-dev.20
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/blocks/month-navigator/month-navigator.d.ts +1 -1
- package/dist/buildgrid-ui.es.js +6141 -5223
- package/dist/buildgrid-ui.umd.js +56 -55
- package/dist/components/index.d.ts +2 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +12 -0
- package/dist/components/toaster/index.d.ts +2 -0
- package/dist/components/toaster/toaster.d.ts +9 -0
- package/package.json +3 -1
package/dist/buildgrid-ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(E=typeof globalThis<"u"?globalThis:E||self,x(E.BuildgridUI={},E.React,E.ReactDOM))})(this,function(E,x,Zn){"use strict";function Ja(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Ja(x),Jn=Ja(Zn);var er={exports:{}},vn={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var es;function uh(){if(es)return vn;es=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var s=null;if(a!==void 0&&(s=""+a),o.key!==void 0&&(s=""+o.key),"key"in o){a={};for(var i in o)i!=="key"&&(a[i]=o[i])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:a}}return vn.Fragment=t,vn.jsx=n,vn.jsxs=n,vn}var yn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,183 +14,184 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
at`)?" (<anonymous>)":-1<
|
|
19
|
-
`+
|
|
20
|
-
`),
|
|
21
|
-
`);for(
|
|
22
|
-
`+
|
|
17
|
+
*/var ts;function dh(){return ts||(ts=1,process.env.NODE_ENV!=="production"&&function(){function e(N){if(N==null)return null;if(typeof N=="function")return N.$$typeof===L?null:N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case k:return"Fragment";case S:return"Portal";case D:return"Profiler";case P:return"StrictMode";case _:return"Suspense";case z:return"SuspenseList"}if(typeof N=="object")switch(typeof N.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),N.$$typeof){case $:return(N.displayName||"Context")+".Provider";case R:return(N._context.displayName||"Context")+".Consumer";case V:var B=N.render;return N=N.displayName,N||(N=B.displayName||B.name||"",N=N!==""?"ForwardRef("+N+")":"ForwardRef"),N;case G:return B=N.displayName||null,B!==null?B:e(N.type)||"Memo";case ee:B=N._payload,N=N._init;try{return e(N(B))}catch{}}return null}function t(N){return""+N}function n(N){try{t(N);var B=!1}catch{B=!0}if(B){B=console;var j=B.error,ae=typeof Symbol=="function"&&Symbol.toStringTag&&N[Symbol.toStringTag]||N.constructor.name||"Object";return j.call(B,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ae),t(N)}}function r(){}function o(){if(Z===0){me=console.log,ge=console.info,I=console.warn,ie=console.error,ce=console.group,oe=console.groupCollapsed,se=console.groupEnd;var N={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}Z++}function a(){if(Z--,Z===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},N,{value:me}),info:q({},N,{value:ge}),warn:q({},N,{value:I}),error:q({},N,{value:ie}),group:q({},N,{value:ce}),groupCollapsed:q({},N,{value:oe}),groupEnd:q({},N,{value:se})})}0>Z&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function s(N){if(le===void 0)try{throw Error()}catch(j){var B=j.stack.trim().match(/\n( *(at )?)/);le=B&&B[1]||"",Me=-1<j.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<j.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+le+N+Me}function i(N,B){if(!N||Re)return"";var j=$e.get(N);if(j!==void 0)return j;Re=!0,j=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var ae=null;ae=T.H,T.H=null,o();try{var Pe={DetermineComponentFrameRoot:function(){try{if(B){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(Se){var de=Se}Reflect.construct(N,[],ue)}else{try{ue.call()}catch(Se){de=Se}N.call(ue.prototype)}}else{try{throw Error()}catch(Se){de=Se}(ue=N())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(Se){if(Se&&de&&typeof Se.stack=="string")return[Se.stack,de.stack]}return[null,null]}};Pe.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var ye=Object.getOwnPropertyDescriptor(Pe.DetermineComponentFrameRoot,"name");ye&&ye.configurable&&Object.defineProperty(Pe.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Q=Pe.DetermineComponentFrameRoot(),Ue=Q[0],Qe=Q[1];if(Ue&&Qe){var Ce=Ue.split(`
|
|
20
|
+
`),Ze=Qe.split(`
|
|
21
|
+
`);for(Q=ye=0;ye<Ce.length&&!Ce[ye].includes("DetermineComponentFrameRoot");)ye++;for(;Q<Ze.length&&!Ze[Q].includes("DetermineComponentFrameRoot");)Q++;if(ye===Ce.length||Q===Ze.length)for(ye=Ce.length-1,Q=Ze.length-1;1<=ye&&0<=Q&&Ce[ye]!==Ze[Q];)Q--;for(;1<=ye&&0<=Q;ye--,Q--)if(Ce[ye]!==Ze[Q]){if(ye!==1||Q!==1)do if(ye--,Q--,0>Q||Ce[ye]!==Ze[Q]){var J=`
|
|
22
|
+
`+Ce[ye].replace(" at new "," at ");return N.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",N.displayName)),typeof N=="function"&&$e.set(N,J),J}while(1<=ye&&0<=Q);break}}}finally{Re=!1,T.H=ae,a(),Error.prepareStackTrace=j}return Ce=(Ce=N?N.displayName||N.name:"")?s(Ce):"",typeof N=="function"&&$e.set(N,Ce),Ce}function c(N){if(N==null)return"";if(typeof N=="function"){var B=N.prototype;return i(N,!(!B||!B.isReactComponent))}if(typeof N=="string")return s(N);switch(N){case _:return s("Suspense");case z:return s("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case V:return N=i(N.render,!1),N;case G:return c(N.type);case ee:B=N._payload,N=N._init;try{return c(N(B))}catch{}}return""}function d(){var N=T.A;return N===null?null:N.getOwner()}function f(N){if(H.call(N,"key")){var B=Object.getOwnPropertyDescriptor(N,"key").get;if(B&&B.isReactWarning)return!1}return N.key!==void 0}function m(N,B){function j(){Be||(Be=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",B))}j.isReactWarning=!0,Object.defineProperty(N,"key",{get:j,configurable:!0})}function p(){var N=e(this.type);return at[N]||(at[N]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),N=this.props.ref,N!==void 0?N:null}function h(N,B,j,ae,Pe,ye){return j=ye.ref,N={$$typeof:M,type:N,key:B,props:ye,_owner:Pe},(j!==void 0?j:null)!==null?Object.defineProperty(N,"ref",{enumerable:!1,get:p}):Object.defineProperty(N,"ref",{enumerable:!1,value:null}),N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(N,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N}function v(N,B,j,ae,Pe,ye){if(typeof N=="string"||typeof N=="function"||N===k||N===D||N===P||N===_||N===z||N===W||typeof N=="object"&&N!==null&&(N.$$typeof===ee||N.$$typeof===G||N.$$typeof===$||N.$$typeof===R||N.$$typeof===V||N.$$typeof===X||N.getModuleId!==void 0)){var Q=B.children;if(Q!==void 0)if(ae)if(K(Q)){for(ae=0;ae<Q.length;ae++)g(Q[ae],N);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(Q,N)}else Q="",(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(Q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),N===null?ae="null":K(N)?ae="array":N!==void 0&&N.$$typeof===M?(ae="<"+(e(N.type)||"Unknown")+" />",Q=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof N,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,Q);if(H.call(B,"key")){Q=e(N);var Ue=Object.keys(B).filter(function(Ce){return Ce!=="key"});ae=0<Ue.length?"{key: someKey, "+Ue.join(": ..., ")+": ...}":"{key: someKey}",Xe[Q+ae]||(Ue=0<Ue.length?"{"+Ue.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,
|
|
27
|
+
<%s key={someKey} {...props} />`,ae,Q,Ue,Q),Xe[Q+ae]=!0)}if(Q=null,j!==void 0&&(n(j),Q=""+j),f(B)&&(n(B.key),Q=""+B.key),"key"in B){j={};for(var Qe in B)Qe!=="key"&&(j[Qe]=B[Qe])}else j=B;return Q&&m(j,typeof N=="function"?N.displayName||N.name||"Unknown":N),h(N,Q,ye,Pe,d(),j)}function g(N,B){if(typeof N=="object"&&N&&N.$$typeof!==ot){if(K(N))for(var j=0;j<N.length;j++){var ae=N[j];y(ae)&&w(ae,B)}else if(y(N))N._store&&(N._store.validated=1);else if(N===null||typeof N!="object"?j=null:(j=Y&&N[Y]||N["@@iterator"],j=typeof j=="function"?j:null),typeof j=="function"&&j!==N.entries&&(j=j.call(N),j!==N))for(;!(N=j.next()).done;)y(N.value)&&w(N.value,B)}}function y(N){return typeof N=="object"&&N!==null&&N.$$typeof===M}function w(N,B){if(N._store&&!N._store.validated&&N.key==null&&(N._store.validated=1,B=b(B),!st[B])){st[B]=!0;var j="";N&&N._owner!=null&&N._owner!==d()&&(j=null,typeof N._owner.tag=="number"?j=e(N._owner.type):typeof N._owner.name=="string"&&(j=N._owner.name),j=" It was passed a child from "+j+".");var ae=T.getCurrentStack;T.getCurrentStack=function(){var Pe=c(N.type);return ae&&(Pe+=ae()||""),Pe},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',B,j),T.getCurrentStack=ae}}function b(N){var B="",j=d();return j&&(j=e(j.type))&&(B=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+
|
|
29
|
+
Check the render method of \``+j+"`."),B||(N=e(N))&&(B=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+x+">."),_}var C=M,S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),L=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),z=Symbol.iterator,F=Symbol.for("react.client.reference"),T=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,U=Object.assign,ve=Symbol.for("react.client.reference"),Me=Array.isArray,pe=0,Oe,he,$,ne,ae,ee,re;r.__reactDisabledLog=!0;var te,we,Pe=!1,Ye=new(typeof WeakMap=="function"?WeakMap:Map),dt=Symbol.for("react.client.reference"),Ge,rn={},ft={},jr={};an.Fragment=D,an.jsx=function(x,_,I,oe,xe){return b(x,_,I,!1,oe,xe)},an.jsxs=function(x,_,I,oe,xe){return b(x,_,I,!0,oe,xe)}}()),an}var Oa;function im(){return Oa||(Oa=1,process.env.NODE_ENV==="production"?$n.exports=am():$n.exports=sm()),$n.exports}var d=im();function Aa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Aa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ra(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Aa(e))&&(r&&(r+=" "),r+=t);return r}const Wr="-",cm=e=>{const t=um(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(Wr);return s[0]===""&&s.length!==1&&s.shift(),_a(s,t)||lm(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},_a=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?_a(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Wr);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ia=/^\[(.+)\]$/,lm=e=>{if(Ia.test(e)){const t=Ia.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},um=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return fm(Object.entries(e.classGroups),n).forEach(([a,i])=>{$r(i,r,a,t)}),r},$r=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:ja(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(dm(o)){$r(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{$r(i,ja(t,a),n,r)})})},ja=(e,t)=>{let n=e;return t.split(Wr).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},dm=e=>e.isThemeGetter,fm=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,o]}):e,mm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},Fa="!",hm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const c=[];let u=0,f=0,m;for(let v=0;v<s.length;v++){let w=s[v];if(u===0){if(w===o&&(r||s.slice(v,v+a)===t)){c.push(s.slice(f,v)),f=v+a;continue}if(w==="/"){m=v;continue}}w==="["?u++:w==="]"&&u--}const h=c.length===0?s:s.substring(f),g=h.startsWith(Fa),b=g?h.substring(1):h,p=m&&m>f?m-f:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:p}};return n?s=>n({className:s,parseClassName:i}):i},pm=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},gm=e=>({cache:mm(e.cacheSize),parseClassName:hm(e),...cm(e)}),vm=/\s+/,ym=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(vm);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:f,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:g}=n(u);let b=!!g,p=r(b?h.substring(0,g):h);if(!p){if(!b){s=u+(s.length>0?" "+s:s);continue}if(p=r(h),!p){s=u+(s.length>0?" "+s:s);continue}b=!1}const v=pm(f).join(":"),w=m?v+Fa:v,y=w+p;if(a.includes(y))continue;a.push(y);const C=o(p,b);for(let S=0;S<C.length;++S){const E=C[S];a.push(w+E)}s=u+(s.length>0?" "+s:s)}return s};function bm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wa(t))&&(r&&(r+=" "),r+=n);return r}const Wa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wa(e[r]))&&(n&&(n+=" "),n+=t);return n};function wm(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((f,m)=>m(f),e());return n=gm(u),r=n.cache.get,o=n.cache.set,a=s,s(c)}function s(c){const u=r(c);if(u)return u;const f=ym(c,n);return o(c,f),f}return function(){return a(bm.apply(null,arguments))}}const fe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$a=/^\[(?:([a-z-]+):)?(.+)\]$/i,xm=/^\d+\/\d+$/,Cm=new Set(["px","full","screen"]),Sm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Nm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Em=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rt=e=>It(e)||Cm.has(e)||xm.test(e),ht=e=>jt(e,"length",Im),It=e=>!!e&&!Number.isNaN(Number(e)),Lr=e=>jt(e,"number",It),sn=e=>!!e&&Number.isInteger(Number(e)),Dm=e=>e.endsWith("%")&&It(e.slice(0,-1)),K=e=>$a.test(e),pt=e=>Sm.test(e),km=new Set(["length","size","percentage"]),Tm=e=>jt(e,km,La),Om=e=>jt(e,"position",La),Am=new Set(["image","url"]),Rm=e=>jt(e,Am,Fm),_m=e=>jt(e,"",jm),cn=()=>!0,jt=(e,t,n)=>{const r=$a.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Im=e=>Mm.test(e)&&!Nm.test(e),La=()=>!1,jm=e=>Em.test(e),Fm=e=>Pm.test(e),Wm=wm(()=>{const e=fe("colors"),t=fe("spacing"),n=fe("blur"),r=fe("brightness"),o=fe("borderColor"),a=fe("borderRadius"),i=fe("borderSpacing"),s=fe("borderWidth"),c=fe("contrast"),u=fe("grayscale"),f=fe("hueRotate"),m=fe("invert"),h=fe("gap"),g=fe("gradientColorStops"),b=fe("gradientColorStopPositions"),p=fe("inset"),v=fe("margin"),w=fe("opacity"),y=fe("padding"),C=fe("saturate"),S=fe("scale"),E=fe("sepia"),D=fe("skew"),P=fe("space"),O=fe("translate"),B=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",K,t],R=()=>[K,t],H=()=>["",rt,ht],G=()=>["auto",It,K],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",K],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[It,K];return{cacheSize:500,separator:":",theme:{colors:[cn],spacing:[rt,ht],blur:["none","",pt,K],brightness:U(),borderColor:[e],borderRadius:["none","","full",pt,K],borderSpacing:R(),borderWidth:H(),contrast:U(),grayscale:T(),hueRotate:U(),invert:T(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[Dm,ht],inset:V(),margin:V(),opacity:U(),padding:R(),saturate:U(),scale:U(),sepia:T(),skew:U(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[pt]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),K]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",sn,K]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",sn,K]}],"grid-cols":[{"grid-cols":[cn]}],"col-start-end":[{col:["auto",{span:["full",sn,K]},K]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[cn]}],"row-start-end":[{row:["auto",{span:[sn,K]},K]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[pt]},pt]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",pt,ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lr]}],"font-family":[{font:[cn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",K]}],"line-clamp":[{"line-clamp":["none",It,Lr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rt,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rt,ht]}],"underline-offset":[{"underline-offset":["auto",rt,K]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Om]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Tm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Rm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[rt,K]}],"outline-w":[{outline:[rt,ht]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[rt,ht]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pt,_m]}],"shadow-color":[{shadow:[cn]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",pt,K]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[m]}],saturate:[{saturate:[C]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[sn,K]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rt,ht,Lr]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function k(...e){return Wm(Ra(e))}const $m=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),Lm=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),Bm=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),Vm=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),Ym=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),Gm=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),Hm=e=>e.slice(0,7),zm=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"}),Ba=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Va=Ra,ln=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Va(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],m=a==null?void 0:a[u];if(f===null)return null;const h=Ba(f)||Ba(m);return o[u][h]}),s=n&&Object.entries(n).reduce((u,f)=>{let[m,h]=f;return h===void 0||(u[m]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:m,className:h,...g}=f;return Object.entries(g).every(b=>{let[p,v]=b;return Array.isArray(v)?v.includes({...a,...s}[p]):{...a,...s}[p]===v})?[...u,m,h]:u},[]);return Va(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Um=ln("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",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),Ln=l.forwardRef(({className:e,sizing:t,type:n,...r},o)=>d.jsx("input",{type:n,className:k(Um({sizing:t,className:e})),ref:o,...r}));Ln.displayName="Input";const qm=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},Bn=l.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},i)=>{const s=c=>{const u=c.target;if(r){const f=qm(u.value,r);u.value=f}o==null||o(c)};return d.jsxs("div",{className:"relative w-full",children:[t&&d.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),d.jsx(Ln,{className:k(t&&"pl-8",n&&"pr-8",e),ref:i,onInput:s,...a}),n&&d.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});Bn.displayName="AdaptiveInput";function Km(e,t){const n=l.createContext(t),r=a=>{const{children:i,...s}=a,c=l.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(a){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ye(e,t=[]){let n=[];function r(a,i){const s=l.createContext(i),c=n.length;n=[...n,i];const u=m=>{var w;const{scope:h,children:g,...b}=m,p=((w=h==null?void 0:h[e])==null?void 0:w[c])||s,v=l.useMemo(()=>b,Object.values(b));return d.jsx(p.Provider,{value:v,children:g})};u.displayName=a+"Provider";function f(m,h){var p;const g=((p=h==null?void 0:h[e])==null?void 0:p[c])||s,b=l.useContext(g);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(i=>l.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Xm(o,...t)]}function Xm(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((s,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...s,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ya(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ya(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ya(e[o],null)}}}}function J(...e){return l.useCallback(Vn(...e),e)}function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Se=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Qm=l.useId||(()=>{}),Zm=0;function Ae(e){const[t,n]=l.useState(Qm());return Se(()=>{n(r=>r??String(Zm++))},[e]),t?`radix-${t}`:""}function Re(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ke({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Jm({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=Re(n),c=l.useCallback(u=>{if(a){const m=typeof u=="function"?u(e):u;m!==e&&s(m)}else o(u)},[a,e,o,s]);return[i,c]}function Jm({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),a=Re(t);return l.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var Ue=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),a=o.find(eh);if(a){const i=a.props.children,s=o.map(c=>c===a?l.Children.count(i)>1?l.Children.only(null):l.isValidElement(i)?i.props.children:null:c);return d.jsx(Br,{...r,ref:t,children:l.isValidElement(i)?l.cloneElement(i,void 0,s):null})}return d.jsx(Br,{...r,ref:t,children:n})});Ue.displayName="Slot";var Br=l.forwardRef((e,t)=>{const{children:n,...r}=e;if(l.isValidElement(n)){const o=nh(n);return l.cloneElement(n,{...th(r,n.props),ref:t?Vn(t,o):o})}return l.Children.count(n)>1?l.Children.only(null):null});Br.displayName="SlotClone";var Vr=({children:e})=>d.jsx(d.Fragment,{children:e});function eh(e){return l.isValidElement(e)&&e.type===Vr}function th(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...s)=>{a(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function nh(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],W=rh.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:a,...i}=r,s=a?Ue:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(s,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ga(e,t){e&&Wn.flushSync(()=>e.dispatchEvent(t))}function oh(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ah="DismissableLayer",Yr="dismissableLayer.update",sh="dismissableLayer.pointerDownOutside",ih="dismissableLayer.focusOutside",Ha,za=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ft=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(za),[f,m]=l.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=l.useState({}),b=J(t,P=>m(P)),p=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(v),y=f?p.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=w,E=uh(P=>{const O=P.target,B=[...u.branches].some(L=>L.contains(O));!S||B||(o==null||o(P),i==null||i(P),P.defaultPrevented||s==null||s())},h),D=dh(P=>{const O=P.target;[...u.branches].some(L=>L.contains(O))||(a==null||a(P),i==null||i(P),P.defaultPrevented||s==null||s())},h);return oh(P=>{y===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&s&&(P.preventDefault(),s()))},h),l.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ha=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ua(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ha)}},[f,h,n,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ua())},[f,u]),l.useEffect(()=>{const P=()=>g({});return document.addEventListener(Yr,P),()=>document.removeEventListener(Yr,P)},[]),d.jsx(W.div,{...c,ref:b,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,D.onFocusCapture),onBlurCapture:A(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,E.onPointerDownCapture)})});Ft.displayName=ah;var ch="DismissableLayerBranch",lh=l.forwardRef((e,t)=>{const n=l.useContext(za),r=l.useRef(null),o=J(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(W.div,{...e,ref:o})});lh.displayName=ch;function uh(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){qa(sh,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dh(e,t=globalThis==null?void 0:globalThis.document){const n=Re(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&qa(ih,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ua(){const e=new CustomEvent(Yr);document.dispatchEvent(e)}function qa(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ga(o,a):o.dispatchEvent(a)}var Gr="focusScope.autoFocusOnMount",Hr="focusScope.autoFocusOnUnmount",Ka={bubbles:!1,cancelable:!0},fh="FocusScope",un=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=l.useState(null),u=Re(o),f=Re(a),m=l.useRef(null),h=J(t,p=>c(p)),g=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let p=function(C){if(g.paused||!s)return;const S=C.target;s.contains(S)?m.current=S:gt(m.current,{select:!0})},v=function(C){if(g.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||gt(m.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&>(s)};document.addEventListener("focusin",p),document.addEventListener("focusout",v);const y=new MutationObserver(w);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),y.disconnect()}}},[r,s,g.paused]),l.useEffect(()=>{if(s){Za.add(g);const p=document.activeElement;if(!s.contains(p)){const w=new CustomEvent(Gr,Ka);s.addEventListener(Gr,u),s.dispatchEvent(w),w.defaultPrevented||(mh(yh(Xa(s)),{select:!0}),document.activeElement===p&>(s))}return()=>{s.removeEventListener(Gr,u),setTimeout(()=>{const w=new CustomEvent(Hr,Ka);s.addEventListener(Hr,f),s.dispatchEvent(w),w.defaultPrevented||gt(p??document.body,{select:!0}),s.removeEventListener(Hr,f),Za.remove(g)},0)}}},[s,u,f,g]);const b=l.useCallback(p=>{if(!n&&!r||g.paused)return;const v=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(v&&w){const y=p.currentTarget,[C,S]=hh(y);C&&S?!p.shiftKey&&w===S?(p.preventDefault(),n&>(C,{select:!0})):p.shiftKey&&w===C&&(p.preventDefault(),n&>(S,{select:!0})):w===y&&p.preventDefault()}},[n,r,g.paused]);return d.jsx(W.div,{tabIndex:-1,...i,ref:h,onKeyDown:b})});un.displayName=fh;function mh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gt(r,{select:t}),document.activeElement!==n)return}function hh(e){const t=Xa(e),n=Qa(t,e),r=Qa(t.reverse(),e);return[n,r]}function Xa(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qa(e,t){for(const n of e)if(!ph(n,{upTo:t}))return n}function ph(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function gh(e){return e instanceof HTMLInputElement&&"select"in e}function gt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&gh(e)&&t&&e.select()}}var Za=vh();function vh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ja(e,t),e.unshift(t)},remove(t){var n;e=Ja(e,t),(n=e[0])==null||n.resume()}}}function Ja(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yh(e){return e.filter(t=>t.tagName!=="A")}var bh="Portal",dn=l.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=l.useState(!1);Se(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Pa.createPortal(d.jsx(W.div,{...r,ref:t}),i):null});dn.displayName=bh;function wh(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Te=e=>{const{present:t,children:n}=e,r=xh(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=J(r.ref,Ch(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Te.displayName="Presence";function xh(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=wh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Yn(r.current);a.current=s==="mounted"?u:"none"},[s]),Se(()=>{const u=r.current,f=o.current;if(f!==e){const h=a.current,g=Yn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Se(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=g=>{const p=Yn(r.current).includes(g.animationName);if(g.target===t&&p&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=g=>{g.target===t&&(a.current=Yn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Yn(e){return(e==null?void 0:e.animationName)||"none"}function Ch(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var zr=0;function Gn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??es()),document.body.insertAdjacentElement("beforeend",e[1]??es()),zr++,()=>{zr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),zr--}},[])}function es(){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 qe=function(){return qe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},qe.apply(this,arguments)};function ts(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Sh(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Hn="right-scroll-bar-position",zn="width-before-scroll-bar",Mh="with-scroll-bars-hidden",Nh="--removed-body-scroll-bar-size";function Ur(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Eh(e,t){var n=M.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ph=typeof window<"u"?l.useLayoutEffect:l.useEffect,ns=new WeakMap;function Dh(e,t){var n=Eh(null,function(r){return e.forEach(function(o){return Ur(o,r)})});return Ph(function(){var r=ns.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||Ur(s,null)}),a.forEach(function(s){o.has(s)||Ur(s,i)})}ns.set(n,e)},[e]),n}function kh(e){return e}function Th(e,t){t===void 0&&(t=kh);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,r);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function Oh(e){e===void 0&&(e={});var t=Th(null);return t.options=qe({async:!0,ssr:!1},e),t}var rs=function(e){var t=e.sideCar,n=ts(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,qe({},n))};rs.isSideCarExport=!0;function Ah(e,t){return e.useMedium(t),rs}var os=Oh(),qr=function(){},Un=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:qr,onWheelCapture:qr,onTouchMoveCapture:qr}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,h=e.sideCar,g=e.noIsolation,b=e.inert,p=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,y=e.gapMode,C=ts(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,E=Dh([n,t]),D=qe(qe({},C),o);return l.createElement(l.Fragment,null,f&&l.createElement(S,{sideCar:os,removeScrollBar:u,shards:m,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!p,lockRef:n,gapMode:y}),i?l.cloneElement(l.Children.only(s),qe(qe({},D),{ref:E})):l.createElement(w,qe({},D,{className:c,ref:E}),s))});Un.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Un.classNames={fullWidth:zn,zeroRight:Hn};var Rh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _h(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rh();return t&&e.setAttribute("nonce",t),e}function Ih(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function jh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Fh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_h())&&(Ih(t,n),jh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wh=function(){var e=Fh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},as=function(){var e=Wh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},$h={left:0,top:0,right:0,gap:0},Kr=function(e){return parseInt(e||"",10)||0},Lh=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Kr(n),Kr(r),Kr(o)]},Bh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $h;var t=Lh(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Vh=as(),Wt="data-scroll-locked",Yh=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
32
|
-
.`.concat(
|
|
31
|
+
Check the top-level render call using <`+N+">."),B}var C=x,M=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),$=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),Y=Symbol.iterator,L=Symbol.for("react.client.reference"),T=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,q=Object.assign,X=Symbol.for("react.client.reference"),K=Array.isArray,Z=0,me,ge,I,ie,ce,oe,se;r.__reactDisabledLog=!0;var le,Me,Re=!1,$e=new(typeof WeakMap=="function"?WeakMap:Map),ot=Symbol.for("react.client.reference"),Be,at={},Xe={},st={};yn.Fragment=k,yn.jsx=function(N,B,j,ae,Pe){return v(N,B,j,!1,ae,Pe)},yn.jsxs=function(N,B,j,ae,Pe){return v(N,B,j,!0,ae,Pe)}}()),yn}var ns;function fh(){return ns||(ns=1,process.env.NODE_ENV==="production"?er.exports=uh():er.exports=dh()),er.exports}var u=fh();function rs(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=rs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function os(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rs(e))&&(r&&(r+=" "),r+=t);return r}const eo="-",mh=e=>{const t=ph(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(eo);return i[0]===""&&i.length!==1&&i.shift(),as(i,t)||hh(s)},getConflictingClassGroupIds:(s,i)=>{const c=n[s]||[];return i&&r[s]?[...c,...r[s]]:c}}},as=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?as(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(eo);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},ss=/^\[(.+)\]$/,hh=e=>{if(ss.test(e)){const t=ss.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ph=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vh(Object.entries(e.classGroups),n).forEach(([a,s])=>{to(s,r,a,t)}),r},to=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:is(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(gh(o)){to(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{to(s,is(t,a),n,r)})})},is=(e,t)=>{let n=e;return t.split(eo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gh=e=>e.isThemeGetter,vh=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,i])=>[t+s,i])):a);return[n,o]}):e,yh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},cs="!",bh=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,s=i=>{const c=[];let d=0,f=0,m;for(let y=0;y<i.length;y++){let w=i[y];if(d===0){if(w===o&&(r||i.slice(y,y+a)===t)){c.push(i.slice(f,y)),f=y+a;continue}if(w==="/"){m=y;continue}}w==="["?d++:w==="]"&&d--}const p=c.length===0?i:i.substring(f),h=p.startsWith(cs),v=h?p.substring(1):p,g=m&&m>f?m-f:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}};return n?i=>n({className:i,parseClassName:s}):s},wh=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},xh=e=>({cache:yh(e.cacheSize),parseClassName:bh(e),...mh(e)}),Ch=/\s+/,Nh=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],s=e.trim().split(Ch);let i="";for(let c=s.length-1;c>=0;c-=1){const d=s[c],{modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}=n(d);let v=!!h,g=r(v?p.substring(0,h):p);if(!g){if(!v){i=d+(i.length>0?" "+i:i);continue}if(g=r(p),!g){i=d+(i.length>0?" "+i:i);continue}v=!1}const y=wh(f).join(":"),w=m?y+cs:y,b=w+g;if(a.includes(b))continue;a.push(b);const C=o(g,v);for(let M=0;M<C.length;++M){const S=C[M];a.push(w+S)}i=d+(i.length>0?" "+i:i)}return i};function Mh(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ls(t))&&(r&&(r+=" "),r+=n);return r}const ls=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ls(e[r]))&&(n&&(n+=" "),n+=t);return n};function Sh(e,...t){let n,r,o,a=s;function s(c){const d=t.reduce((f,m)=>m(f),e());return n=xh(d),r=n.cache.get,o=n.cache.set,a=i,i(c)}function i(c){const d=r(c);if(d)return d;const f=Nh(c,n);return o(c,f),f}return function(){return a(Mh.apply(null,arguments))}}const xe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},us=/^\[(?:([a-z-]+):)?(.+)\]$/i,Eh=/^\d+\/\d+$/,Ph=new Set(["px","full","screen"]),kh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Th=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Oh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ah=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gt=e=>Ht(e)||Ph.has(e)||Eh.test(e),Mt=e=>Ut(e,"length",Lh),Ht=e=>!!e&&!Number.isNaN(Number(e)),no=e=>Ut(e,"number",Ht),bn=e=>!!e&&Number.isInteger(Number(e)),_h=e=>e.endsWith("%")&&Ht(e.slice(0,-1)),re=e=>us.test(e),St=e=>kh.test(e),Rh=new Set(["length","size","percentage"]),Ih=e=>Ut(e,Rh,ds),jh=e=>Ut(e,"position",ds),Fh=new Set(["image","url"]),$h=e=>Ut(e,Fh,Vh),Wh=e=>Ut(e,"",Bh),wn=()=>!0,Ut=(e,t,n)=>{const r=us.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Lh=e=>Th.test(e)&&!Dh.test(e),ds=()=>!1,Bh=e=>Oh.test(e),Vh=e=>Ah.test(e),Yh=Sh(()=>{const e=xe("colors"),t=xe("spacing"),n=xe("blur"),r=xe("brightness"),o=xe("borderColor"),a=xe("borderRadius"),s=xe("borderSpacing"),i=xe("borderWidth"),c=xe("contrast"),d=xe("grayscale"),f=xe("hueRotate"),m=xe("invert"),p=xe("gap"),h=xe("gradientColorStops"),v=xe("gradientColorStopPositions"),g=xe("inset"),y=xe("margin"),w=xe("opacity"),b=xe("padding"),C=xe("saturate"),M=xe("scale"),S=xe("sepia"),k=xe("skew"),P=xe("space"),D=xe("translate"),R=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",re,t],_=()=>[re,t],z=()=>["",gt,Mt],G=()=>["auto",Ht,re],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",re],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Ht,re];return{cacheSize:500,separator:":",theme:{colors:[wn],spacing:[gt,Mt],blur:["none","",St,re],brightness:q(),borderColor:[e],borderRadius:["none","","full",St,re],borderSpacing:_(),borderWidth:z(),contrast:q(),grayscale:T(),hueRotate:q(),invert:T(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[_h,Mt],inset:V(),margin:V(),opacity:q(),padding:_(),saturate:q(),scale:q(),sepia:T(),skew:q(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[St]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ee(),re]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bn,re]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",bn,re]}],"grid-cols":[{"grid-cols":[wn]}],"col-start-end":[{col:["auto",{span:["full",bn,re]},re]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[wn]}],"row-start-end":[{row:["auto",{span:[bn,re]},re]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[St]},St]}],h:[{h:[re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",St,Mt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",no]}],"font-family":[{font:[wn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",Ht,no]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gt,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gt,Mt]}],"underline-offset":[{"underline-offset":["auto",gt,re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),jh]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ih]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$h]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[gt,re]}],"outline-w":[{outline:[gt,Mt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[gt,Mt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",St,Wh]}],"shadow-color":[{shadow:[wn]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",St,re]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[m]}],saturate:[{saturate:[C]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[bn,re]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gt,Mt,no]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function O(...e){return Yh(os(e))}const Gh=(e,t="pt-BR",n="BRL")=>new Intl.NumberFormat(t,{style:"currency",currency:n,minimumFractionDigits:2}).format(e),zh=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long"}).format(new Date(e)),Hh=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long",weekday:"long",year:"numeric"}).format(new Date(e)),Uh=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{day:"2-digit",month:"long"}).format(new Date(e)),Kh=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"long"}).format(typeof e=="string"?new Date(e):e),qh=(e,t="pt-BR")=>new Intl.DateTimeFormat(t,{dateStyle:"short"}).format(e),Xh=e=>e.slice(0,7),Qh=(e,t="pt-BR")=>e.toLocaleDateString(t,{weekday:"short",day:"2-digit",month:"2-digit"}),fs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ms=os,Kt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ms(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],m=a==null?void 0:a[d];if(f===null)return null;const p=fs(f)||fs(m);return o[d][p]}),i=n&&Object.entries(n).reduce((d,f)=>{let[m,p]=f;return p===void 0||(d[m]=p),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:m,className:p,...h}=f;return Object.entries(h).every(v=>{let[g,y]=v;return Array.isArray(y)?y.includes({...a,...i}[g]):{...a,...i}[g]===y})?[...d,m,p]:d},[]);return ms(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},Zh=Kt("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",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),tr=l.forwardRef(({className:e,sizing:t,type:n,...r},o)=>u.jsx("input",{type:n,className:O(Zh({sizing:t,className:e})),ref:o,...r}));tr.displayName="Input";const Jh=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},nr=l.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const i=c=>{const d=c.target;if(r){const f=Jh(d.value,r);d.value=f}o==null||o(c)};return u.jsxs("div",{className:"relative w-full",children:[t&&u.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),u.jsx(tr,{className:O(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:i,...a}),n&&u.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});nr.displayName="AdaptiveInput";function ep(e,t){const n=l.createContext(t),r=a=>{const{children:s,...i}=a,c=l.useMemo(()=>i,Object.values(i));return u.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=l.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Te(e,t=[]){let n=[];function r(a,s){const i=l.createContext(s),c=n.length;n=[...n,s];const d=m=>{var w;const{scope:p,children:h,...v}=m,g=((w=p==null?void 0:p[e])==null?void 0:w[c])||i,y=l.useMemo(()=>v,Object.values(v));return u.jsx(g.Provider,{value:y,children:h})};d.displayName=a+"Provider";function f(m,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[c])||i,v=l.useContext(h);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>l.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,tp(o,...t)]}function tp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:d})=>{const m=c(a)[`__scope${d}`];return{...i,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function hs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=hs(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():hs(e[o],null)}}}}function ne(...e){return l.useCallback(xn(...e),e)}function A(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var Ee=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},np=l.useId||(()=>{}),rp=0;function je(e){const[t,n]=l.useState(np());return Ee(()=>{e||n(r=>r??String(rp++))},[e]),e||(t?`radix-${t}`:"")}function Ne(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ie({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=op({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Ne(n),c=l.useCallback(d=>{if(a){const m=typeof d=="function"?d(e):d;m!==e&&i(m)}else o(d)},[a,e,o,i]);return[s,c]}function op({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),a=Ne(t);return l.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var it=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),a=o.find(ap);if(a){const s=a.props.children,i=o.map(c=>c===a?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:c);return u.jsx(ro,{...r,ref:t,children:l.isValidElement(s)?l.cloneElement(s,void 0,i):null})}return u.jsx(ro,{...r,ref:t,children:n})});it.displayName="Slot";var ro=l.forwardRef((e,t)=>{const{children:n,...r}=e;if(l.isValidElement(n)){const o=ip(n);return l.cloneElement(n,{...sp(r,n.props),ref:t?xn(t,o):o})}return l.Children.count(n)>1?l.Children.only(null):null});ro.displayName="SlotClone";var oo=({children:e})=>u.jsx(u.Fragment,{children:e});function ap(e){return l.isValidElement(e)&&e.type===oo}function sp(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function ip(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],F=cp.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?it:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rr(e,t){e&&Jn.flushSync(()=>e.dispatchEvent(t))}function lp(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var up="DismissableLayer",ao="dismissableLayer.update",dp="dismissableLayer.pointerDownOutside",fp="dismissableLayer.focusOutside",ps,gs=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$t=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,d=l.useContext(gs),[f,m]=l.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),v=ne(t,P=>m(P)),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(y),b=f?g.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,M=b>=w,S=pp(P=>{const D=P.target,R=[...d.branches].some($=>$.contains(D));!M||R||(o==null||o(P),s==null||s(P),P.defaultPrevented||i==null||i())},p),k=gp(P=>{const D=P.target;[...d.branches].some($=>$.contains(D))||(a==null||a(P),s==null||s(P),P.defaultPrevented||i==null||i())},p);return lp(P=>{b===d.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&i&&(P.preventDefault(),i()))},p),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ps=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),vs(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ps)}},[f,p,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),vs())},[f,d]),l.useEffect(()=>{const P=()=>h({});return document.addEventListener(ao,P),()=>document.removeEventListener(ao,P)},[]),u.jsx(F.div,{...c,ref:v,style:{pointerEvents:C?M?"auto":"none":void 0,...e.style},onFocusCapture:A(e.onFocusCapture,k.onFocusCapture),onBlurCapture:A(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:A(e.onPointerDownCapture,S.onPointerDownCapture)})});$t.displayName=up;var mp="DismissableLayerBranch",hp=l.forwardRef((e,t)=>{const n=l.useContext(gs),r=l.useRef(null),o=ne(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(F.div,{...e,ref:o})});hp.displayName=mp;function pp(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let c=function(){ys(dp,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gp(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&ys(fp,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function vs(){const e=new CustomEvent(ao);document.dispatchEvent(e)}function ys(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rr(o,a):o.dispatchEvent(a)}var so="focusScope.autoFocusOnMount",io="focusScope.autoFocusOnUnmount",bs={bubbles:!1,cancelable:!0},vp="FocusScope",Cn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=l.useState(null),d=Ne(o),f=Ne(a),m=l.useRef(null),p=ne(t,g=>c(g)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(C){if(h.paused||!i)return;const M=C.target;i.contains(M)?m.current=M:Et(m.current,{select:!0})},y=function(C){if(h.paused||!i)return;const M=C.relatedTarget;M!==null&&(i.contains(M)||Et(m.current,{select:!0}))},w=function(C){if(document.activeElement===document.body)for(const S of C)S.removedNodes.length>0&&Et(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const b=new MutationObserver(w);return i&&b.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),b.disconnect()}}},[r,i,h.paused]),l.useEffect(()=>{if(i){Cs.add(h);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(so,bs);i.addEventListener(so,d),i.dispatchEvent(w),w.defaultPrevented||(yp(Np(ws(i)),{select:!0}),document.activeElement===g&&Et(i))}return()=>{i.removeEventListener(so,d),setTimeout(()=>{const w=new CustomEvent(io,bs);i.addEventListener(io,f),i.dispatchEvent(w),w.defaultPrevented||Et(g??document.body,{select:!0}),i.removeEventListener(io,f),Cs.remove(h)},0)}}},[i,d,f,h]);const v=l.useCallback(g=>{if(!n&&!r||h.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(y&&w){const b=g.currentTarget,[C,M]=bp(b);C&&M?!g.shiftKey&&w===M?(g.preventDefault(),n&&Et(C,{select:!0})):g.shiftKey&&w===C&&(g.preventDefault(),n&&Et(M,{select:!0})):w===b&&g.preventDefault()}},[n,r,h.paused]);return u.jsx(F.div,{tabIndex:-1,...s,ref:p,onKeyDown:v})});Cn.displayName=vp;function yp(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Et(r,{select:t}),document.activeElement!==n)return}function bp(e){const t=ws(e),n=xs(t,e),r=xs(t.reverse(),e);return[n,r]}function ws(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xs(e,t){for(const n of e)if(!wp(n,{upTo:t}))return n}function wp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xp(e){return e instanceof HTMLInputElement&&"select"in e}function Et(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xp(e)&&t&&e.select()}}var Cs=Cp();function Cp(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ns(e,t),e.unshift(t)},remove(t){var n;e=Ns(e,t),(n=e[0])==null||n.resume()}}}function Ns(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Np(e){return e.filter(t=>t.tagName!=="A")}var Mp="Portal",Nn=l.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=l.useState(!1);Ee(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Zn.createPortal(u.jsx(F.div,{...r,ref:t}),s):null});Nn.displayName=Mp;function Sp(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var De=e=>{const{present:t,children:n}=e,r=Ep(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=ne(r.ref,Pp(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};De.displayName="Presence";function Ep(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),s=e?"mounted":"unmounted",[i,c]=Sp(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=or(r.current);a.current=i==="mounted"?d:"none"},[i]),Ee(()=>{const d=r.current,f=o.current;if(f!==e){const p=a.current,h=or(d);e?c("MOUNT"):h==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ee(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,m=h=>{const g=or(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=h=>{h.target===t&&(a.current=or(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function or(e){return(e==null?void 0:e.animationName)||"none"}function Pp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var co=0;function ar(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ms()),document.body.insertAdjacentElement("beforeend",e[1]??Ms()),co++,()=>{co===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),co--}},[])}function Ms(){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 ct=function(){return ct=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ct.apply(this,arguments)};function Ss(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function kp(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var sr="right-scroll-bar-position",ir="width-before-scroll-bar",Tp="with-scroll-bars-hidden",Dp="--removed-body-scroll-bar-size";function lo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Op(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ap=typeof window<"u"?l.useLayoutEffect:l.useEffect,Es=new WeakMap;function _p(e,t){var n=Op(null,function(r){return e.forEach(function(o){return lo(o,r)})});return Ap(function(){var r=Es.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||lo(i,null)}),a.forEach(function(i){o.has(i)||lo(i,s)})}Es.set(n,e)},[e]),n}function Rp(e){return e}function Ip(e,t){t===void 0&&(t=Rp);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function jp(e){e===void 0&&(e={});var t=Ip(null);return t.options=ct({async:!0,ssr:!1},e),t}var Ps=function(e){var t=e.sideCar,n=Ss(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,ct({},n))};Ps.isSideCarExport=!0;function Fp(e,t){return e.useMedium(t),Ps}var ks=jp(),uo=function(){},cr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:uo,onWheelCapture:uo,onTouchMoveCapture:uo}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,v=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,b=e.gapMode,C=Ss(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=p,S=_p([n,t]),k=ct(ct({},C),o);return l.createElement(l.Fragment,null,f&&l.createElement(M,{sideCar:ks,removeScrollBar:d,shards:m,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),s?l.cloneElement(l.Children.only(i),ct(ct({},k),{ref:S})):l.createElement(w,ct({},k,{className:c,ref:S}),i))});cr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},cr.classNames={fullWidth:ir,zeroRight:sr};var $p=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$p();return t&&e.setAttribute("nonce",t),e}function Lp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Bp(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wp())&&(Lp(t,n),Bp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yp=function(){var e=Vp();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ts=function(){var e=Yp(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gp={left:0,top:0,right:0,gap:0},fo=function(e){return parseInt(e||"",10)||0},zp=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[fo(n),fo(r),fo(o)]},Hp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gp;var t=zp(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Up=Ts(),qt="data-scroll-locked",Kp=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
32
|
+
.`.concat(Tp,` {
|
|
33
33
|
overflow: hidden `).concat(r,`;
|
|
34
|
-
padding-right: `).concat(
|
|
34
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
35
35
|
}
|
|
36
|
-
body[`).concat(
|
|
36
|
+
body[`).concat(qt,`] {
|
|
37
37
|
overflow: hidden `).concat(r,`;
|
|
38
38
|
overscroll-behavior: contain;
|
|
39
39
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
40
40
|
padding-left: `.concat(o,`px;
|
|
41
41
|
padding-top: `).concat(a,`px;
|
|
42
|
-
padding-right: `).concat(
|
|
42
|
+
padding-right: `).concat(s,`px;
|
|
43
43
|
margin-left:0;
|
|
44
44
|
margin-top:0;
|
|
45
|
-
margin-right: `).concat(
|
|
46
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
45
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
46
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.`).concat(
|
|
50
|
-
right: `).concat(
|
|
49
|
+
.`).concat(sr,` {
|
|
50
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.`).concat(
|
|
54
|
-
margin-right: `).concat(
|
|
53
|
+
.`).concat(ir,` {
|
|
54
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.`).concat(
|
|
57
|
+
.`).concat(sr," .").concat(sr,` {
|
|
58
58
|
right: 0 `).concat(r,`;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.`).concat(
|
|
61
|
+
.`).concat(ir," .").concat(ir,` {
|
|
62
62
|
margin-right: 0 `).concat(r,`;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
body[`).concat(
|
|
66
|
-
`).concat(
|
|
65
|
+
body[`).concat(qt,`] {
|
|
66
|
+
`).concat(Dp,": ").concat(i,`px;
|
|
67
67
|
}
|
|
68
|
-
`)},
|
|
68
|
+
`)},Ds=function(){var e=parseInt(document.body.getAttribute(qt)||"0",10);return isFinite(e)?e:0},qp=function(){l.useEffect(function(){return document.body.setAttribute(qt,(Ds()+1).toString()),function(){var e=Ds()-1;e<=0?document.body.removeAttribute(qt):document.body.setAttribute(qt,e.toString())}},[])},Xp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;qp();var a=l.useMemo(function(){return Hp(o)},[o]);return l.createElement(Up,{styles:Kp(a,!t,o,n?"":"!important")})},mo=!1;if(typeof window<"u")try{var lr=Object.defineProperty({},"passive",{get:function(){return mo=!0,!0}});window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{mo=!1}var Xt=mo?{passive:!1}:!1,Qp=function(e){return e.tagName==="TEXTAREA"},Os=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qp(e)&&n[t]==="visible")},Zp=function(e){return Os(e,"overflowY")},Jp=function(e){return Os(e,"overflowX")},As=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=_s(e,r);if(o){var a=Rs(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tg=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_s=function(e,t){return e==="v"?Zp(t):Jp(t)},Rs=function(e,t){return e==="v"?eg(t):tg(t)},ng=function(e,t){return e==="h"&&t==="rtl"?-1:1},rg=function(e,t,n,r,o){var a=ng(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,c=t.contains(i),d=!1,f=s>0,m=0,p=0;do{var h=Rs(e,i),v=h[0],g=h[1],y=h[2],w=g-y-a*v;(v||w)&&_s(e,i)&&(m+=w,p+=v),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(f&&(Math.abs(m)<1||!o)||!f&&(Math.abs(p)<1||!o))&&(d=!0),d},ur=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Is=function(e){return[e.deltaX,e.deltaY]},js=function(e){return e&&"current"in e?e.current:e},og=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ag=function(e){return`
|
|
69
69
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
70
70
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
71
|
-
`)},
|
|
71
|
+
`)},sg=0,Qt=[];function ig(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(sg++)[0],a=l.useState(Ts)[0],s=l.useRef(e);l.useEffect(function(){s.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=kp([e.lockRef.current],(e.shards||[]).map(js),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var w=ur(g),b=n.current,C="deltaX"in g?g.deltaX:b[0]-w[0],M="deltaY"in g?g.deltaY:b[1]-w[1],S,k=g.target,P=Math.abs(C)>Math.abs(M)?"h":"v";if("touches"in g&&P==="h"&&k.type==="range")return!1;var D=As(P,k);if(!D)return!0;if(D?S=P:(S=P==="v"?"h":"v",D=As(P,k)),!D)return!1;if(!r.current&&"changedTouches"in g&&(C||M)&&(r.current=S),!S)return!0;var R=r.current||S;return rg(R,y,g,R==="h"?C:M,!0)},[]),c=l.useCallback(function(g){var y=g;if(!(!Qt.length||Qt[Qt.length-1]!==a)){var w="deltaY"in y?Is(y):ur(y),b=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&og(S.delta,w)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var C=(s.current.shards||[]).map(js).filter(Boolean).filter(function(S){return S.contains(y.target)}),M=C.length>0?i(y,C[0]):!s.current.noIsolation;M&&y.cancelable&&y.preventDefault()}}},[]),d=l.useCallback(function(g,y,w,b){var C={name:g,delta:y,target:w,should:b,shadowParent:cg(w)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(M){return M!==C})},1)},[]),f=l.useCallback(function(g){n.current=ur(g),r.current=void 0},[]),m=l.useCallback(function(g){d(g.type,Is(g),g.target,i(g,e.lockRef.current))},[]),p=l.useCallback(function(g){d(g.type,ur(g),g.target,i(g,e.lockRef.current))},[]);l.useEffect(function(){return Qt.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Xt),document.addEventListener("touchmove",c,Xt),document.addEventListener("touchstart",f,Xt),function(){Qt=Qt.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,Xt),document.removeEventListener("touchmove",c,Xt),document.removeEventListener("touchstart",f,Xt)}},[]);var h=e.removeScrollBar,v=e.inert;return l.createElement(l.Fragment,null,v?l.createElement(a,{styles:ag(o)}):null,h?l.createElement(Xp,{gapMode:e.gapMode}):null)}function cg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const lg=Fp(ks,ig);var Mn=l.forwardRef(function(e,t){return l.createElement(cr,ct({},e,{ref:t,sideCar:lg}))});Mn.classNames=cr.classNames;var ug=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zt=new WeakMap,dr=new WeakMap,fr={},ho=0,Fs=function(e){return e&&(e.host||Fs(e.parentNode))},dg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Fs(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},fg=function(e,t,n,r){var o=dg(t,Array.isArray(e)?e:[e]);fr[n]||(fr[n]=new WeakMap);var a=fr[n],s=[],i=new Set,c=new Set(o),d=function(m){!m||i.has(m)||(i.add(m),d(m.parentNode))};o.forEach(d);var f=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(p){if(i.has(p))f(p);else try{var h=p.getAttribute(r),v=h!==null&&h!=="false",g=(Zt.get(p)||0)+1,y=(a.get(p)||0)+1;Zt.set(p,g),a.set(p,y),s.push(p),g===1&&v&&dr.set(p,!0),y===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return f(t),i.clear(),ho++,function(){s.forEach(function(m){var p=Zt.get(m)-1,h=a.get(m)-1;Zt.set(m,p),a.set(m,h),p||(dr.has(m)||m.removeAttribute(r),dr.delete(m)),h||m.removeAttribute(n)}),ho--,ho||(Zt=new WeakMap,Zt=new WeakMap,dr=new WeakMap,fr={})}},mr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=ug(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),fg(r,o,n,"aria-hidden")):function(){return null}},po="Dialog",[$s,Ws]=Te(po),[mg,Je]=$s(po),Ls=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=l.useRef(null),c=l.useRef(null),[d=!1,f]=Ie({prop:r,defaultProp:o,onChange:a});return u.jsx(mg,{scope:t,triggerRef:i,contentRef:c,contentId:je(),titleId:je(),descriptionId:je(),open:d,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(m=>!m),[f]),modal:s,children:n})};Ls.displayName=po;var Bs="DialogTrigger",Vs=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Je(Bs,n),a=ne(t,o.triggerRef);return u.jsx(F.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yo(o.open),...r,ref:a,onClick:A(e.onClick,o.onOpenToggle)})});Vs.displayName=Bs;var go="DialogPortal",[hg,Ys]=$s(go,{forceMount:void 0}),Gs=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Je(go,t);return u.jsx(hg,{scope:t,forceMount:n,children:l.Children.map(r,s=>u.jsx(De,{present:n||a.open,children:u.jsx(Nn,{asChild:!0,container:o,children:s})}))})};Gs.displayName=go;var hr="DialogOverlay",zs=l.forwardRef((e,t)=>{const n=Ys(hr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Je(hr,e.__scopeDialog);return a.modal?u.jsx(De,{present:r||a.open,children:u.jsx(pg,{...o,ref:t})}):null});zs.displayName=hr;var pg=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Je(hr,n);return u.jsx(Mn,{as:it,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(F.div,{"data-state":yo(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Wt="DialogContent",Hs=l.forwardRef((e,t)=>{const n=Ys(Wt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Je(Wt,e.__scopeDialog);return u.jsx(De,{present:r||a.open,children:a.modal?u.jsx(gg,{...o,ref:t}):u.jsx(vg,{...o,ref:t})})});Hs.displayName=Wt;var gg=l.forwardRef((e,t)=>{const n=Je(Wt,e.__scopeDialog),r=l.useRef(null),o=ne(t,n.contentRef,r);return l.useEffect(()=>{const a=r.current;if(a)return mr(a)},[]),u.jsx(Us,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:A(e.onFocusOutside,a=>a.preventDefault())})}),vg=l.forwardRef((e,t)=>{const n=Je(Wt,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return u.jsx(Us,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Us=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=Je(Wt,n),c=l.useRef(null),d=ne(t,c);return ar(),u.jsxs(u.Fragment,{children:[u.jsx(Cn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:u.jsx($t,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":yo(i.open),...s,ref:d,onDismiss:()=>i.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(bg,{titleId:i.titleId}),u.jsx(xg,{contentRef:c,descriptionId:i.descriptionId})]})]})}),vo="DialogTitle",Ks=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Je(vo,n);return u.jsx(F.h2,{id:o.titleId,...r,ref:t})});Ks.displayName=vo;var qs="DialogDescription",Xs=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Je(qs,n);return u.jsx(F.p,{id:o.descriptionId,...r,ref:t})});Xs.displayName=qs;var Qs="DialogClose",Zs=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Je(Qs,n);return u.jsx(F.button,{type:"button",...r,ref:t,onClick:A(e.onClick,()=>o.onOpenChange(!1))})});Zs.displayName=Qs;function yo(e){return e?"open":"closed"}var Js="DialogTitleWarning",[yg,ei]=ep(Js,{contentName:Wt,titleName:vo,docsSlug:"dialog"}),bg=({titleId:e})=>{const t=ei(Js),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
72
72
|
|
|
73
73
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
74
74
|
|
|
75
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
75
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},wg="DialogDescriptionWarning",xg=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ei(wg).contentName}}.`;return l.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},ti=Ls,ni=Vs,ri=Gs,bo=zs,wo=Hs,xo=Ks,Co=Xs,pr=Zs,oi="AlertDialog",[Cg,CS]=Te(oi,[Ws]),vt=Ws(),ai=e=>{const{__scopeAlertDialog:t,...n}=e,r=vt(t);return u.jsx(ti,{...r,...n,modal:!0})};ai.displayName=oi;var Ng="AlertDialogTrigger",si=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=vt(n);return u.jsx(ni,{...o,...r,ref:t})});si.displayName=Ng;var Mg="AlertDialogPortal",ii=e=>{const{__scopeAlertDialog:t,...n}=e,r=vt(t);return u.jsx(ri,{...r,...n})};ii.displayName=Mg;var Sg="AlertDialogOverlay",ci=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=vt(n);return u.jsx(bo,{...o,...r,ref:t})});ci.displayName=Sg;var Jt="AlertDialogContent",[Eg,Pg]=Cg(Jt),li=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=vt(n),s=l.useRef(null),i=ne(t,s),c=l.useRef(null);return u.jsx(yg,{contentName:Jt,titleName:ui,docsSlug:"alert-dialog",children:u.jsx(Eg,{scope:n,cancelRef:c,children:u.jsxs(wo,{role:"alertdialog",...a,...o,ref:i,onOpenAutoFocus:A(o.onOpenAutoFocus,d=>{var f;d.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[u.jsx(oo,{children:r}),u.jsx(Tg,{contentRef:s})]})})})});li.displayName=Jt;var ui="AlertDialogTitle",di=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=vt(n);return u.jsx(xo,{...o,...r,ref:t})});di.displayName=ui;var fi="AlertDialogDescription",mi=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=vt(n);return u.jsx(Co,{...o,...r,ref:t})});mi.displayName=fi;var kg="AlertDialogAction",hi=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=vt(n);return u.jsx(pr,{...o,...r,ref:t})});hi.displayName=kg;var pi="AlertDialogCancel",gi=l.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=Pg(pi,n),a=vt(n),s=ne(t,o);return u.jsx(pr,{...a,...r,ref:s})});gi.displayName=pi;var Tg=({contentRef:e})=>{const t=`\`${Jt}\` requires a description for the component to be accessible for screen reader users.
|
|
76
76
|
|
|
77
|
-
You can add a description to the \`${
|
|
77
|
+
You can add a description to the \`${Jt}\` by passing a \`${fi}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
78
78
|
|
|
79
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${
|
|
79
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Jt}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
80
80
|
|
|
81
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},
|
|
81
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return l.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Dg=ai,Og=si,Ag=ii,vi=ci,yi=li,bi=hi,wi=gi,xi=di,Ci=mi;const Sn=Kt("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",xl:"h-12 rounded-md px-10 text-xl",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),lt=l.forwardRef(({className:e,variant:t,size:n,isLoading:r=!1,asChild:o=!1,...a},s)=>{const i=o?it:"button";return u.jsxs(i,{className:O(Sn({variant:t,size:n,className:e})),ref:s,...a,disabled:r||a.disabled,children:[r&&u.jsxs("svg",{className:"animate-spin -ml-1 h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a.children]})});lt.displayName="Button";const _g=Dg,Rg=Og,Ni=Ag,No=l.forwardRef(({className:e,...t},n)=>u.jsx(vi,{className:O("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",e),...t,ref:n}));No.displayName=vi.displayName;const Mi=l.forwardRef(({className:e,...t},n)=>u.jsxs(Ni,{children:[u.jsx(No,{}),u.jsx(yi,{ref:n,className:O("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",e),...t})]}));Mi.displayName=yi.displayName;const Si=({className:e,...t})=>u.jsx("div",{className:O("flex flex-col space-y-2 text-center sm:text-left",e),...t});Si.displayName="AlertDialogHeader";const Ei=({className:e,...t})=>u.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ei.displayName="AlertDialogFooter";const Pi=l.forwardRef(({className:e,...t},n)=>u.jsx(xi,{ref:n,className:O("text-lg font-semibold",e),...t}));Pi.displayName=xi.displayName;const ki=l.forwardRef(({className:e,...t},n)=>u.jsx(Ci,{ref:n,className:O("text-sm text-muted-foreground",e),...t}));ki.displayName=Ci.displayName;const Ti=l.forwardRef(({className:e,...t},n)=>u.jsx(bi,{ref:n,className:O(Sn(),e),...t}));Ti.displayName=bi.displayName;const Di=l.forwardRef(({className:e,...t},n)=>u.jsx(wi,{ref:n,className:O(Sn({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Di.displayName=wi.displayName;/**
|
|
82
82
|
* @license lucide-react v0.469.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const Ig=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Oi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
87
87
|
* @license lucide-react v0.469.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var
|
|
91
|
+
*/var jg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
92
92
|
* @license lucide-react v0.469.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const Fg=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},c)=>x.createElement("svg",{ref:c,...jg,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Oi("lucide",o),...i},[...s.map(([d,f])=>x.createElement(d,f)),...Array.isArray(a)?a:[a]]));/**
|
|
97
97
|
* @license lucide-react v0.469.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const _e=(e,t)=>{const n=x.forwardRef(({className:r,...o},a)=>x.createElement(Fg,{ref:a,iconNode:t,className:Oi(`lucide-${Ig(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
102
102
|
* @license lucide-react v0.469.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const $g=_e("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
107
107
|
* @license lucide-react v0.469.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const Wg=_e("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
112
112
|
* @license lucide-react v0.469.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const Mo=_e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
117
117
|
* @license lucide-react v0.469.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const So=_e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
122
122
|
* @license lucide-react v0.469.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const Ai=_e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
127
127
|
* @license lucide-react v0.469.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const Eo=_e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
132
132
|
* @license lucide-react v0.469.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const Lg=_e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
137
137
|
* @license lucide-react v0.469.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const Bg=_e("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
142
142
|
* @license lucide-react v0.469.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const Vg=_e("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
147
147
|
* @license lucide-react v0.469.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const _i=_e("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
152
152
|
* @license lucide-react v0.469.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const Yg=_e("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
157
157
|
* @license lucide-react v0.469.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const Ri=_e("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
162
162
|
* @license lucide-react v0.469.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const
|
|
166
|
+
*/const Gg=_e("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
167
167
|
* @license lucide-react v0.469.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const zg=_e("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
172
172
|
* @license lucide-react v0.469.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const
|
|
176
|
+
*/const Hg=_e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
177
177
|
* @license lucide-react v0.469.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const
|
|
181
|
+
*/const Ug=_e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
182
182
|
* @license lucide-react v0.469.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const
|
|
186
|
+
*/const Kg=_e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
187
187
|
* @license lucide-react v0.469.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const Gp=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Hp=["top","right","bottom","left"],vt=Math.min,Ie=Math.max,tr=Math.round,nr=Math.floor,Xe=e=>({x:e,y:e}),zp={left:"right",right:"left",bottom:"top",top:"bottom"},Up={start:"end",end:"start"};function lo(e,t,n){return Ie(e,vt(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function st(e){return e.split("-")[0]}function Yt(e){return e.split("-")[1]}function uo(e){return e==="x"?"y":"x"}function fo(e){return e==="y"?"height":"width"}function yt(e){return["top","bottom"].includes(st(e))?"y":"x"}function mo(e){return uo(yt(e))}function qp(e,t,n){n===void 0&&(n=!1);const r=Yt(e),o=mo(e),a=fo(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=rr(i)),[i,rr(i)]}function Kp(e){const t=rr(e);return[ho(e),t,ho(t)]}function ho(e){return e.replace(/start|end/g,t=>Up[t])}function Xp(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function Qp(e,t,n,r){const o=Yt(e);let a=Xp(st(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(ho)))),a}function rr(e){return e.replace(/left|right|bottom|top/g,t=>zp[t])}function Zp(e){return{top:0,right:0,bottom:0,left:0,...e}}function fi(e){return typeof e!="number"?Zp(e):{top:e,right:e,bottom:e,left:e}}function or(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function mi(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),i=mo(t),s=fo(i),c=st(t),u=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let g;switch(c){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:m};break;case"left":g={x:r.x-o.width,y:m};break;default:g={x:r.x,y:r.y}}switch(Yt(t)){case"start":g[i]-=h*(n&&u?-1:1);break;case"end":g[i]+=h*(n&&u?-1:1);break}return g}const Jp=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=mi(u,r,c),h=r,g={},b=0;for(let p=0;p<s.length;p++){const{name:v,fn:w}=s[p],{x:y,y:C,data:S,reset:E}=await w({x:f,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:u,platform:i,elements:{reference:e,floating:t}});f=y??f,m=C??m,g={...g,[v]:{...g[v],...S}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:m}=mi(u,h,c)),p=-1)}return{x:f,y:m,placement:h,strategy:o,middlewareData:g}};async function hn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:h=!1,padding:g=0}=at(t,e),b=fi(g),v=s[h?m==="floating"?"reference":"floating":m],w=or(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),y=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=or(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:C,strategy:c}):y);return{top:(w.top-E.top+b.top)/S.y,bottom:(E.bottom-w.bottom+b.bottom)/S.y,left:(w.left-E.left+b.left)/S.x,right:(E.right-w.right+b.right)/S.x}}const eg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:u,padding:f=0}=at(e,t)||{};if(u==null)return{};const m=fi(f),h={x:n,y:r},g=mo(o),b=fo(g),p=await i.getDimensions(u),v=g==="y",w=v?"top":"left",y=v?"bottom":"right",C=v?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[g]-h[g]-a.floating[b],E=h[g]-a.reference[g],D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let P=D?D[C]:0;(!P||!await(i.isElement==null?void 0:i.isElement(D)))&&(P=s.floating[C]||a.floating[b]);const O=S/2-E/2,B=P/2-p[b]/2-1,L=vt(m[w],B),V=vt(m[y],B),R=L,H=P-p[b]-V,G=P/2-p[b]/2+O,X=lo(R,G,H),j=!c.arrow&&Yt(o)!=null&&G!==X&&a.reference[b]/2-(G<R?L:V)-p[b]/2<0,z=j?G<R?G-R:G-H:0;return{[g]:h[g]+z,data:{[g]:X,centerOffset:G-X-z,...j&&{alignmentOffset:z}},reset:j}}}),tg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...v}=at(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=st(o),y=yt(s),C=st(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=h||(C||!p?[rr(s)]:Kp(s)),D=b!=="none";!h&&D&&E.push(...Qp(s,p,b,S));const P=[s,...E],O=await hn(t,v),B=[];let L=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&B.push(O[w]),m){const G=qp(o,i,S);B.push(O[G[0]],O[G[1]])}if(L=[...L,{placement:o,overflows:B}],!B.every(G=>G<=0)){var V,R;const G=(((V=a.flip)==null?void 0:V.index)||0)+1,X=P[G];if(X)return{data:{index:G,overflows:L},reset:{placement:X}};let j=(R=L.filter(z=>z.overflows[0]<=0).sort((z,F)=>z.overflows[1]-F.overflows[1])[0])==null?void 0:R.placement;if(!j)switch(g){case"bestFit":{var H;const z=(H=L.filter(F=>{if(D){const T=yt(F.placement);return T===y||T==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(T=>T>0).reduce((T,Z)=>T+Z,0)]).sort((F,T)=>F[1]-T[1])[0])==null?void 0:H[0];z&&(j=z);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function hi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pi(e){return Hp.some(t=>e[t]>=0)}const ng=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const a=await hn(t,{...o,elementContext:"reference"}),i=hi(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:pi(i)}}}case"escaped":{const a=await hn(t,{...o,altBoundary:!0}),i=hi(a,n.floating);return{data:{escapedOffsets:i,escaped:pi(i)}}}default:return{}}}}};async function rg(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=st(n),s=Yt(n),c=yt(n)==="y",u=["left","top"].includes(i)?-1:1,f=a&&c?-1:1,m=at(t,e);let{mainAxis:h,crossAxis:g,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof b=="number"&&(g=s==="end"?b*-1:b),c?{x:g*f,y:h*u}:{x:h*u,y:g*f}}const og=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,c=await rg(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},ag=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:w,y}=v;return{x:w,y}}},...c}=at(e,t),u={x:n,y:r},f=await hn(t,c),m=yt(st(o)),h=uo(m);let g=u[h],b=u[m];if(a){const v=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=g+f[v],C=g-f[w];g=lo(y,g,C)}if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=b+f[v],C=b-f[w];b=lo(y,b,C)}const p=s.fn({...t,[h]:g,[m]:b});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[h]:a,[m]:i}}}}}},sg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=at(e,t),f={x:n,y:r},m=yt(o),h=uo(m);let g=f[h],b=f[m];const p=at(s,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const C=h==="y"?"height":"width",S=a.reference[h]-a.floating[C]+v.mainAxis,E=a.reference[h]+a.reference[C]-v.mainAxis;g<S?g=S:g>E&&(g=E)}if(u){var w,y;const C=h==="y"?"width":"height",S=["top","left"].includes(st(o)),E=a.reference[m]-a.floating[C]+(S&&((w=i.offset)==null?void 0:w[m])||0)+(S?0:v.crossAxis),D=a.reference[m]+a.reference[C]+(S?0:((y=i.offset)==null?void 0:y[m])||0)-(S?v.crossAxis:0);b<E?b=E:b>D&&(b=D)}return{[h]:g,[m]:b}}}},ig=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...u}=at(e,t),f=await hn(t,u),m=st(o),h=Yt(o),g=yt(o)==="y",{width:b,height:p}=a.floating;let v,w;m==="top"||m==="bottom"?(v=m,w=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=m,v=h==="end"?"top":"bottom");const y=p-f.top-f.bottom,C=b-f.left-f.right,S=vt(p-f[v],y),E=vt(b-f[w],C),D=!t.middlewareData.shift;let P=S,O=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=y),D&&!h){const L=Ie(f.left,0),V=Ie(f.right,0),R=Ie(f.top,0),H=Ie(f.bottom,0);g?O=b-2*(L!==0||V!==0?L+V:Ie(f.left,f.right)):P=p-2*(R!==0||H!==0?R+H:Ie(f.top,f.bottom))}await c({...t,availableWidth:O,availableHeight:P});const B=await i.getDimensions(s.floating);return b!==B.width||p!==B.height?{reset:{rects:!0}}:{}}}};function ar(){return typeof window<"u"}function Gt(e){return gi(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(gi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gi(e){return ar()?e instanceof Node||e instanceof je(e).Node:!1}function $e(e){return ar()?e instanceof Element||e instanceof je(e).Element:!1}function Ze(e){return ar()?e instanceof HTMLElement||e instanceof je(e).HTMLElement:!1}function vi(e){return!ar()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof je(e).ShadowRoot}function pn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cg(e){return["table","td","th"].includes(Gt(e))}function sr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function po(e){const t=go(),n=$e(e)?Le(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function lg(e){let t=bt(e);for(;Ze(t)&&!Ht(t);){if(po(t))return t;if(sr(t))return null;t=bt(t)}return null}function go(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ht(e){return["html","body","#document"].includes(Gt(e))}function Le(e){return je(e).getComputedStyle(e)}function ir(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bt(e){if(Gt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vi(e)&&e.host||Qe(e);return vi(t)?t.host:t}function yi(e){const t=bt(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&pn(t)?t:yi(t)}function gn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yi(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=je(o);if(a){const s=vo(i);return t.concat(i,i.visualViewport||[],pn(o)?o:[],s&&n?gn(s):[])}return t.concat(o,gn(o,[],n))}function vo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bi(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ze(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=tr(n)!==a||tr(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function yo(e){return $e(e)?e:e.contextElement}function zt(e){const t=yo(e);if(!Ze(t))return Xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=bi(t);let i=(a?tr(n.width):n.width)/r,s=(a?tr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const ug=Xe(0);function wi(e){const t=je(e);return!go()||!t.visualViewport?ug:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==je(e)?!1:t}function Tt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=yo(e);let i=Xe(1);t&&(r?$e(r)&&(i=zt(r)):i=zt(e));const s=dg(a,n,r)?wi(a):Xe(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,f=o.width/i.x,m=o.height/i.y;if(a){const h=je(a),g=r&&$e(r)?je(r):r;let b=h,p=vo(b);for(;p&&r&&g!==b;){const v=zt(p),w=p.getBoundingClientRect(),y=Le(p),C=w.left+(p.clientLeft+parseFloat(y.paddingLeft))*v.x,S=w.top+(p.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,m*=v.y,c+=C,u+=S,b=je(p),p=vo(b)}}return or({width:f,height:m,x:c,y:u})}function bo(e,t){const n=ir(e).scrollLeft;return t?t.left+n:Tt(Qe(e)).left+n}function xi(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:bo(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function fg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Qe(r),s=t?sr(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Xe(1);const f=Xe(0),m=Ze(r);if((m||!m&&!a)&&((Gt(r)!=="body"||pn(i))&&(c=ir(r)),Ze(r))){const g=Tt(r);u=zt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const h=i&&!m&&!a?xi(i,c,!0):Xe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-c.scrollTop*u.y+f.y+h.y}}function mg(e){return Array.from(e.getClientRects())}function hg(e){const t=Qe(e),n=ir(e),r=e.ownerDocument.body,o=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+bo(e);const s=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Ie(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function pg(e,t){const n=je(e),r=Qe(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const u=go();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function gg(e,t){const n=Tt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ze(e)?zt(e):Xe(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:i,height:s,x:c,y:u}}function Ci(e,t,n){let r;if(t==="viewport")r=pg(e,n);else if(t==="document")r=hg(Qe(e));else if($e(t))r=gg(t,n);else{const o=wi(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return or(r)}function Si(e,t){const n=bt(e);return n===t||!$e(n)||Ht(n)?!1:Le(n).position==="fixed"||Si(n,t)}function vg(e,t){const n=t.get(e);if(n)return n;let r=gn(e,[],!1).filter(s=>$e(s)&&Gt(s)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?bt(e):e;for(;$e(i)&&!Ht(i);){const s=Le(i),c=po(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||pn(i)&&!c&&Si(e,i))?r=r.filter(f=>f!==i):o=s,i=bt(i)}return t.set(e,r),r}function yg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?sr(t)?[]:vg(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,f)=>{const m=Ci(t,f,o);return u.top=Ie(m.top,u.top),u.right=vt(m.right,u.right),u.bottom=vt(m.bottom,u.bottom),u.left=Ie(m.left,u.left),u},Ci(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function bg(e){const{width:t,height:n}=bi(e);return{width:t,height:n}}function wg(e,t,n){const r=Ze(t),o=Qe(t),a=n==="fixed",i=Tt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Xe(0);if(r||!r&&!a)if((Gt(t)!=="body"||pn(o))&&(s=ir(t)),r){const h=Tt(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&(c.x=bo(o));const u=o&&!r&&!a?xi(o,s):Xe(0),f=i.left+s.scrollLeft-c.x-u.x,m=i.top+s.scrollTop-c.y-u.y;return{x:f,y:m,width:i.width,height:i.height}}function wo(e){return Le(e).position==="static"}function Mi(e,t){if(!Ze(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qe(e)===n&&(n=n.ownerDocument.body),n}function Ni(e,t){const n=je(e);if(sr(e))return n;if(!Ze(e)){let o=bt(e);for(;o&&!Ht(o);){if($e(o)&&!wo(o))return o;o=bt(o)}return n}let r=Mi(e,t);for(;r&&cg(r)&&wo(r);)r=Mi(r,t);return r&&Ht(r)&&wo(r)&&!po(r)?n:r||lg(e)||n}const xg=async function(e){const t=this.getOffsetParent||Ni,n=this.getDimensions,r=await n(e.floating);return{reference:wg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cg(e){return Le(e).direction==="rtl"}const Sg={convertOffsetParentRelativeRectToViewportRelativeRect:fg,getDocumentElement:Qe,getClippingRect:yg,getOffsetParent:Ni,getElementRects:xg,getClientRects:mg,getDimensions:bg,getScale:zt,isElement:$e,isRTL:Cg};function Mg(e,t){let n=null,r;const o=Qe(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const{left:u,top:f,width:m,height:h}=e.getBoundingClientRect();if(s||t(),!m||!h)return;const g=nr(f),b=nr(o.clientWidth-(u+m)),p=nr(o.clientHeight-(f+h)),v=nr(u),y={rootMargin:-g+"px "+-b+"px "+-p+"px "+-v+"px",threshold:Ie(0,vt(1,c))||1};let C=!0;function S(E){const D=E[0].intersectionRatio;if(D!==c){if(!C)return i();D?i(!1,D):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return i(!0),a}function Ng(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=yo(e),f=o||a?[...u?gn(u):[],...gn(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=u&&s?Mg(u,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),u&&!c&&g.observe(u),g.observe(t));let b,p=c?Tt(e):null;c&&v();function v(){const w=Tt(e);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&n(),p=w,b=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),m==null||m(),(w=g)==null||w.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const Eg=og,Pg=ag,Dg=tg,kg=ig,Tg=ng,Ei=eg,Og=sg,Ag=(e,t,n)=>{const r=new Map,o={platform:Sg,...n},a={...o.platform,_c:r};return Jp(e,t,{...o,platform:a})};var cr=typeof document<"u"?M.useLayoutEffect:M.useEffect;function lr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!lr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Pi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Di(e,t){const n=Pi(e);return Math.round(t*n)/n}function xo(e){const t=l.useRef(e);return cr(()=>{t.current=e}),t}function Rg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=l.useState(r);lr(h,r)||g(r);const[b,p]=l.useState(null),[v,w]=l.useState(null),y=l.useCallback(F=>{F!==D.current&&(D.current=F,p(F))},[]),C=l.useCallback(F=>{F!==P.current&&(P.current=F,w(F))},[]),S=a||b,E=i||v,D=l.useRef(null),P=l.useRef(null),O=l.useRef(f),B=c!=null,L=xo(c),V=xo(o),R=xo(u),H=l.useCallback(()=>{if(!D.current||!P.current)return;const F={placement:t,strategy:n,middleware:h};V.current&&(F.platform=V.current),Ag(D.current,P.current,F).then(T=>{const Z={...T,isPositioned:R.current!==!1};G.current&&!lr(O.current,Z)&&(O.current=Z,Wn.flushSync(()=>{m(Z)}))})},[h,t,n,V,R]);cr(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,m(F=>({...F,isPositioned:!1})))},[u]);const G=l.useRef(!1);cr(()=>(G.current=!0,()=>{G.current=!1}),[]),cr(()=>{if(S&&(D.current=S),E&&(P.current=E),S&&E){if(L.current)return L.current(S,E,H);H()}},[S,E,H,L,B]);const X=l.useMemo(()=>({reference:D,floating:P,setReference:y,setFloating:C}),[y,C]),j=l.useMemo(()=>({reference:S,floating:E}),[S,E]),z=l.useMemo(()=>{const F={position:n,left:0,top:0};if(!j.floating)return F;const T=Di(j.floating,f.x),Z=Di(j.floating,f.y);return s?{...F,transform:"translate("+T+"px, "+Z+"px)",...Pi(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:Z}},[n,s,j.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:H,refs:X,elements:j,floatingStyles:z}),[f,H,X,j,z])}const _g=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ei({element:r.current,padding:o}).fn(n):{}:r?Ei({element:r,padding:o}).fn(n):{}}}},Ig=(e,t)=>({...Eg(e),options:[e,t]}),jg=(e,t)=>({...Pg(e),options:[e,t]}),Fg=(e,t)=>({...Og(e),options:[e,t]}),Wg=(e,t)=>({...Dg(e),options:[e,t]}),$g=(e,t)=>({...kg(e),options:[e,t]}),Lg=(e,t)=>({...Tg(e),options:[e,t]}),Bg=(e,t)=>({..._g(e),options:[e,t]});var Vg="Arrow",ki=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(W.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ki.displayName=Vg;var Yg=ki;function ur(e){const[t,n]=l.useState(void 0);return Se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Co="Popper",[Ti,wt]=ye(Co),[Gg,Oi]=Ti(Co),Ai=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return d.jsx(Gg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ai.displayName=Co;var Ri="PopperAnchor",_i=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Oi(Ri,n),i=l.useRef(null),s=J(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(W.div,{...o,ref:s})});_i.displayName=Ri;var So="PopperContent",[Hg,zg]=Ti(So),Ii=l.forwardRef((e,t)=>{var $,ne,ae,ee,re,te;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...p}=e,v=Oi(So,n),[w,y]=l.useState(null),C=J(t,we=>y(we)),[S,E]=l.useState(null),D=ur(S),P=(D==null?void 0:D.width)??0,O=(D==null?void 0:D.height)??0,B=r+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},V=Array.isArray(u)?u:[u],R=V.length>0,H={padding:L,boundary:V.filter(qg),altBoundary:R},{refs:G,floatingStyles:X,placement:j,isPositioned:z,middlewareData:F}=Rg({strategy:"fixed",placement:B,whileElementsMounted:(...we)=>Ng(...we,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Ig({mainAxis:o+O,alignmentAxis:i}),c&&jg({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Fg():void 0,...H}),c&&Wg({...H}),$g({...H,apply:({elements:we,rects:Pe,availableWidth:Ye,availableHeight:dt})=>{const{width:Ge,height:rn}=Pe.reference,ft=we.floating.style;ft.setProperty("--radix-popper-available-width",`${Ye}px`),ft.setProperty("--radix-popper-available-height",`${dt}px`),ft.setProperty("--radix-popper-anchor-width",`${Ge}px`),ft.setProperty("--radix-popper-anchor-height",`${rn}px`)}}),S&&Bg({element:S,padding:s}),Kg({arrowWidth:P,arrowHeight:O}),h&&Lg({strategy:"referenceHidden",...H})]}),[T,Z]=Wi(j),U=Re(b);Se(()=>{z&&(U==null||U())},[z,U]);const ve=($=F.arrow)==null?void 0:$.x,Me=(ne=F.arrow)==null?void 0:ne.y,pe=((ae=F.arrow)==null?void 0:ae.centerOffset)!==0,[Oe,he]=l.useState();return Se(()=>{w&&he(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,"--radix-popper-transform-origin":[(ee=F.transformOrigin)==null?void 0:ee.x,(re=F.transformOrigin)==null?void 0:re.y].join(" "),...((te=F.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Hg,{scope:n,placedSide:T,onArrowChange:E,arrowX:ve,arrowY:Me,shouldHideArrow:pe,children:d.jsx(W.div,{"data-side":T,"data-align":Z,...p,ref:C,style:{...p.style,animation:z?void 0:"none"}})})})});Ii.displayName=So;var ji="PopperArrow",Ug={top:"bottom",right:"left",bottom:"top",left:"right"},Fi=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=zg(ji,r),i=Ug[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Yg,{...o,ref:n,style:{...o.style,display:"block"}})})});Fi.displayName=ji;function qg(e){return e!==null}var Kg=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Wi(n),m={start:"0%",center:"50%",end:"100%"}[f],h=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let b="",p="";return u==="bottom"?(b=i?m:`${h}px`,p=`${-c}px`):u==="top"?(b=i?m:`${h}px`,p=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,p=i?m:`${g}px`):u==="left"&&(b=`${r.floating.width+c}px`,p=i?m:`${g}px`),{data:{x:b,y:p}}}});function Wi(e){const[t,n="center"]=e.split("-");return[t,n]}var vn=Ai,yn=_i,dr=Ii,fr=Fi,Mo="Popover",[$i,TM]=ye(Mo,[wt]),bn=wt(),[Xg,xt]=$i(Mo),Li=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=bn(t),c=l.useRef(null),[u,f]=l.useState(!1),[m=!1,h]=ke({prop:r,defaultProp:o,onChange:a});return d.jsx(vn,{...s,children:d.jsx(Xg,{scope:t,contentId:Ae(),triggerRef:c,open:m,onOpenChange:h,onOpenToggle:l.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:i,children:n})})};Li.displayName=Mo;var Bi="PopoverAnchor",Vi=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Bi,n),a=bn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return l.useEffect(()=>(i(),()=>s()),[i,s]),d.jsx(yn,{...a,...r,ref:t})});Vi.displayName=Bi;var Yi="PopoverTrigger",Gi=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Yi,n),a=bn(n),i=J(t,o.triggerRef),s=d.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ki(o.open),...r,ref:i,onClick:A(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:d.jsx(yn,{asChild:!0,...a,children:s})});Gi.displayName=Yi;var No="PopoverPortal",[Qg,Zg]=$i(No,{forceMount:void 0}),Hi=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=xt(No,t);return d.jsx(Qg,{scope:t,forceMount:n,children:d.jsx(Te,{present:n||a.open,children:d.jsx(dn,{asChild:!0,container:o,children:r})})})};Hi.displayName=No;var Ut="PopoverContent",zi=l.forwardRef((e,t)=>{const n=Zg(Ut,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=xt(Ut,e.__scopePopover);return d.jsx(Te,{present:r||a.open,children:a.modal?d.jsx(Jg,{...o,ref:t}):d.jsx(ev,{...o,ref:t})})});zi.displayName=Ut;var Jg=l.forwardRef((e,t)=>{const n=xt(Ut,e.__scopePopover),r=l.useRef(null),o=J(t,r),a=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return Zn(i)},[]),d.jsx(fn,{as:Ue,allowPinchZoom:!0,children:d.jsx(Ui,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,u=s.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:A(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),ev=l.forwardRef((e,t)=>{const n=xt(Ut,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return d.jsx(Ui,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ui=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...m}=e,h=xt(Ut,n),g=bn(n);return Gn(),d.jsx(un,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Ft,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:d.jsx(dr,{"data-state":Ki(h.open),role:"dialog",id:h.contentId,...g,...m,ref:t,style:{...m.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)"}})})})}),qi="PopoverClose",tv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(qi,n);return d.jsx(W.button,{type:"button",...r,ref:t,onClick:A(e.onClick,()=>o.onOpenChange(!1))})});tv.displayName=qi;var nv="PopoverArrow",rv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=bn(n);return d.jsx(fr,{...o,...r,ref:t})});rv.displayName=nv;function Ki(e){return e?"open":"closed"}var ov=Li,av=Vi,sv=Gi,iv=Hi,Xi=zi;const Qi=ov,Zi=sv,cv=av,Eo=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>d.jsx(iv,{children:d.jsx(Xi,{ref:o,align:t,sideOffset:n,className:k("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",e),...r})}));Eo.displayName=Xi.displayName;function lv(e){const{value:t="",onChange:n,options:r,className:o,placeholder:a="Search...",emptyMessage:i="Nothing found"}=e,[s,c]=M.useState(t),[u,f]=M.useState(r),[m,h]=M.useState(-1),[g,b]=M.useState(!1),p=S=>{const E=S.target.value;c(E),n==null||n(E),h(-1),b(!0),E.trim()===""?f(r):f(r.filter(D=>D.label.toLowerCase().includes(E.toLowerCase())))},v=S=>{if(S.key==="ArrowDown")S.preventDefault(),h(E=>E<u.length-1?E+1:E);else if(S.key==="ArrowUp")S.preventDefault(),h(E=>E>0?E-1:-1);else if(S.key==="Enter"&&m>=0){const E=u[m];c(E.label),n==null||n(E.value),f([]),h(-1),b(!1)}else S.key==="Escape"&&(f([]),h(-1))},w=S=>{b(!1),c(S.label),n==null||n(S.value),f(r),h(-1)},y=()=>{b(!0)},C=()=>{b(!1)};return d.jsxs(Qi,{open:g,children:[d.jsx(Zi,{asChild:!0,children:d.jsx("div",{className:"relative w-full",children:d.jsx(Bn,{type:"text",placeholder:a,value:s,onChange:p,onKeyDown:v,onClick:y,onFocus:y,onBlur:C,className:k("pr-10",o),"aria-label":"Search field","aria-autocomplete":"list","aria-controls":"suggestions-list","aria-expanded":u.length>0,leftIcon:d.jsx(Yp,{className:"w-4 h-4"})})})}),d.jsx(Eo,{className:"p-0 w-[var(--radix-popover-trigger-width)] max-h-96 overflow-y-auto",children:u.length>0?d.jsx("ul",{id:"suggestions-list",role:"listbox",children:u.map((S,E)=>d.jsx("li",{className:`px-4 py-2 cursor-pointer hover:bg-muted ${E===m?"bg-muted":""}`,onClick:()=>w(S),role:"option","aria-selected":E===m,children:S.label},S.value))}):d.jsx("span",{className:"px-4 py-2 block",children:i})})]})}var Po="Avatar",[uv,OM]=ye(Po),[dv,Ji]=uv(Po),ec=l.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=l.useState("idle");return d.jsx(dv,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:d.jsx(W.span,{...r,ref:t})})});ec.displayName=Po;var tc="AvatarImage",nc=l.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,i=Ji(tc,n),s=fv(r,a.referrerPolicy),c=Re(u=>{o(u),i.onImageLoadingStatusChange(u)});return Se(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?d.jsx(W.img,{...a,ref:t,src:r}):null});nc.displayName=tc;var rc="AvatarFallback",oc=l.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Ji(rc,n),[i,s]=l.useState(r===void 0);return l.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),i&&a.imageLoadingStatus!=="loaded"?d.jsx(W.span,{...o,ref:t}):null});oc.displayName=rc;function fv(e,t){const[n,r]=l.useState("idle");return Se(()=>{if(!e){r("error");return}let o=!0;const a=new window.Image,i=s=>()=>{o&&r(s)};return r("loading"),a.onload=i("loaded"),a.onerror=i("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var ac=ec,sc=nc,ic=oc;const cc=l.forwardRef(({className:e,...t},n)=>d.jsx(ac,{ref:n,className:k("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));cc.displayName=ac.displayName;const lc=l.forwardRef(({className:e,...t},n)=>d.jsx(sc,{ref:n,className:k("aspect-square h-full w-full",e),...t}));lc.displayName=sc.displayName;const uc=l.forwardRef(({className:e,...t},n)=>d.jsx(ic,{ref:n,className:k("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));uc.displayName=ic.displayName;const dc=ln("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function mv({className:e,variant:t,...n}){return d.jsx("div",{className:k(dc({variant:t}),e),...n})}function qt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Je(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}function et(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?pv(s,m=>m.test(i)):hv(s,m=>m.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function hv(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function pv(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fc(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const mc=6048e5,gv=864e5,hc=Symbol.for("constructDateFrom");function ge(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&hc in e?e[hc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Kt(e,...t){const n=ge.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let vv={};function wn(){return vv}function ue(e,t){return ge(t||e,e)}function Xt(e,t){var s,c,u,f;const n=wn(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=ue(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}const yv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bv=(e,t,n)=>{let r;const o=yv[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},wv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xv=(e,t,n,r)=>wv[e],Cv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Sv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Nv={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ev={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Pv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Dv={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Je({values:Cv,defaultWidth:"wide"}),quarter:Je({values:Sv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Je({values:Mv,defaultWidth:"wide"}),day:Je({values:Nv,defaultWidth:"wide"}),dayPeriod:Je({values:Ev,defaultWidth:"wide",formattingValues:Pv,defaultFormattingWidth:"wide"})},kv=/^(\d+)(th|st|nd|rd)?/i,Tv=/\d+/i,Ov={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Av={any:[/^b/i,/^(a|c)/i]},Rv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},_v={any:[/1/i,/2/i,/3/i,/4/i]},Iv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},jv={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fv={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Wv={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$v={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Lv={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Bv={ordinalNumber:fc({matchPattern:kv,parsePattern:Tv,valueCallback:e=>parseInt(e,10)}),era:et({matchPatterns:Ov,defaultMatchWidth:"wide",parsePatterns:Av,defaultParseWidth:"any"}),quarter:et({matchPatterns:Rv,defaultMatchWidth:"wide",parsePatterns:_v,defaultParseWidth:"any",valueCallback:e=>e+1}),month:et({matchPatterns:Iv,defaultMatchWidth:"wide",parsePatterns:jv,defaultParseWidth:"any"}),day:et({matchPatterns:Fv,defaultMatchWidth:"wide",parsePatterns:Wv,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:$v,defaultMatchWidth:"any",parsePatterns:Lv,defaultParseWidth:"any"})},Vv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Hv={date:qt({formats:Vv,defaultWidth:"full"}),time:qt({formats:Yv,defaultWidth:"full"}),dateTime:qt({formats:Gv,defaultWidth:"full"})},mr={code:"en-US",formatDistance:bv,formatLong:Hv,formatRelative:xv,localize:Dv,match:Bv,options:{weekStartsOn:0,firstWeekContainsDate:1}},zv={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},Uv=(e,t,n)=>{let r;const o=zv[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},qv={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Kv={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Xv={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Qv={date:qt({formats:qv,defaultWidth:"full"}),time:qt({formats:Kv,defaultWidth:"full"}),dateTime:qt({formats:Xv,defaultWidth:"full"})},Zv={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},Jv=(e,t,n,r)=>{const o=Zv[e];return typeof o=="function"?o(t):o},ey={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},ty={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ny={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},ry={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},oy={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},ay={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},sy={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:Je({values:ey,defaultWidth:"wide"}),quarter:Je({values:ty,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Je({values:ny,defaultWidth:"wide"}),day:Je({values:ry,defaultWidth:"wide"}),dayPeriod:Je({values:oy,defaultWidth:"wide",formattingValues:ay,defaultFormattingWidth:"wide"})},iy=/^(\d+)[ºªo]?/i,cy=/\d+/i,ly={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},uy={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},dy={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},fy={any:[/1/i,/2/i,/3/i,/4/i]},my={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},hy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},py={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},gy={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},vy={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},yy={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},by={ordinalNumber:fc({matchPattern:iy,parsePattern:cy,valueCallback:e=>parseInt(e,10)}),era:et({matchPatterns:ly,defaultMatchWidth:"wide",parsePatterns:uy,defaultParseWidth:"any"}),quarter:et({matchPatterns:dy,defaultMatchWidth:"wide",parsePatterns:fy,defaultParseWidth:"any",valueCallback:e=>e+1}),month:et({matchPatterns:my,defaultMatchWidth:"wide",parsePatterns:hy,defaultParseWidth:"any"}),day:et({matchPatterns:py,defaultMatchWidth:"wide",parsePatterns:gy,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:vy,defaultMatchWidth:"any",parsePatterns:yy,defaultParseWidth:"any"})},wy={code:"pt-BR",formatDistance:Uv,formatLong:Qv,formatRelative:Jv,localize:sy,match:by,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Y;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(Y||(Y={}));var de;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(de||(de={}));var Be;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Be||(Be={}));const Do={},xn={};function Cn(e,t){try{const r=(Do[e]||(Do[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in xn?xn[r]:pc(r,r.split(":"))}catch{if(e in xn)return xn[e];const n=e==null?void 0:e.match(xy);return n?pc(e,n.slice(1)):NaN}}const xy=/([+-]\d\d):?(\d\d)?/;function pc(e,t){const n=+t[0],r=+(t[1]||0);return xn[e]=n>0?n*60+r:n*60-r}class tt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Cn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),vc(this),ko(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new tt(...n,t):new tt(Date.now(),t)}withTimeZone(t){return new tt(+this,t)}getTimezoneOffset(){return-Cn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ko(this),+this}[Symbol.for("constructDateFrom")](t){return new tt(+new Date(t),this.timeZone)}}const gc=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!gc.test(e))return;const t=e.replace(gc,"$1UTC");tt.prototype[t]&&(e.startsWith("get")?tt.prototype[e]=function(){return this.internal[t]()}:(tt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Cy(this),+this},tt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ko(this),+this}))});function ko(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Cy(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),vc(e)}function vc(e){const t=Cn(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=Cn(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-c,m=c!==t,h=f-s;if(m&&h){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+h);const g=Cn(e.timeZone,e),b=c-g;b&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+b),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b))}}class Ot extends tt{static tz(t,...n){return n.length?new Ot(...n,t):new Ot(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Sy(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Ot(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ot(+new Date(t),this.timeZone)}}function Sy(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}function yc(e,t,n){const r=ue(e,n==null?void 0:n.in);return isNaN(t)?ge(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function bc(e,t,n){const r=ue(e,n==null?void 0:n.in);if(isNaN(t))return ge(e,NaN);if(!t)return r;const o=r.getDate(),a=ge(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function Sn(e,t){return Xt(e,{...t,weekStartsOn:1})}function wc(e,t){const n=ue(e,t==null?void 0:t.in),r=n.getFullYear(),o=ge(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Sn(o),i=ge(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Sn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function xc(e){const t=ue(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Mn(e,t){const n=ue(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Cc(e,t,n){const[r,o]=Kt(n==null?void 0:n.in,e,t),a=Mn(r),i=Mn(o),s=+a-xc(a),c=+i-xc(i);return Math.round((s-c)/gv)}function My(e,t){const n=wc(e,t),r=ge(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Sn(r)}function Ny(e,t,n){return yc(e,t*7,n)}function Ey(e,t,n){return bc(e,t*12,n)}function Py(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ge.bind(null,o));const a=ue(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),ge(r,n||NaN)}function Dy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ge.bind(null,o));const a=ue(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),ge(r,n||NaN)}function ky(e,t,n){const[r,o]=Kt(n==null?void 0:n.in,e,t);return+Mn(r)==+Mn(o)}function Sc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ty(e){return!(!Sc(e)&&typeof e!="number"||isNaN(+ue(e)))}function Oy(e,t,n){const[r,o]=Kt(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Ay(e,t){const n=ue(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Ry(e,t){const[n,r]=Kt(e,t.start,t.end);return{start:n,end:r}}function _y(e,t){const{start:n,end:r}=Ry(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(ge(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Iy(e,t){const n=ue(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function jy(e,t){const n=ue(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Mc(e,t){const n=ue(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Nc(e,t){var s,c,u,f;const n=wn(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=ue(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function Fy(e,t){return Nc(e,{...t,weekStartsOn:1})}function Wy(e,t){const n=ue(e,t==null?void 0:t.in);return Cc(n,Mc(n))+1}function Ec(e,t){const n=ue(e,t==null?void 0:t.in),r=+Sn(n)-+My(n);return Math.round(r/mc)+1}function Pc(e,t){var f,m,h,g;const n=ue(e,t==null?void 0:t.in),r=n.getFullYear(),o=wn(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((g=(h=o.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,i=ge((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Xt(i,t),c=ge((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Xt(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function $y(e,t){var s,c,u,f;const n=wn(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,o=Pc(e,t),a=ge((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Xt(a,t)}function Dc(e,t){const n=ue(e,t==null?void 0:t.in),r=+Xt(n,t)-+$y(n,t);return Math.round(r/mc)+1}function le(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ct={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return le(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):le(n+1,2)},d(e,t){return le(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return le(e.getHours()%12||12,t.length)},H(e,t){return le(e.getHours(),t.length)},m(e,t){return le(e.getMinutes(),t.length)},s(e,t){return le(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return le(o,t.length)}},Qt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},kc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ct.y(e,t)},Y:function(e,t,n,r){const o=Pc(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return le(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):le(a,t.length)},R:function(e,t){const n=wc(e);return le(n,t.length)},u:function(e,t){const n=e.getFullYear();return le(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return le(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return le(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ct.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return le(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Dc(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):le(o,t.length)},I:function(e,t,n){const r=Ec(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):le(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ct.d(e,t)},D:function(e,t,n){const r=Wy(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):le(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return le(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return le(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return le(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Qt.noon:r===0?o=Qt.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Qt.evening:r>=12?o=Qt.afternoon:r>=4?o=Qt.morning:o=Qt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ct.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ct.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):le(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):le(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ct.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ct.s(e,t)},S:function(e,t){return Ct.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Oc(r);case"XXXX":case"XX":return At(r);case"XXXXX":case"XXX":default:return At(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Oc(r);case"xxxx":case"xx":return At(r);case"xxxxx":case"xxx":default:return At(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tc(r,":");case"OOOO":default:return"GMT"+At(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tc(r,":");case"zzzz":default:return"GMT"+At(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return le(r,t.length)},T:function(e,t,n){return le(+e,t.length)}};function Tc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+le(a,2)}function Oc(e,t){return e%60===0?(e>0?"-":"+")+le(Math.abs(e)/60,2):At(e,t)}function At(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=le(Math.trunc(r/60),2),a=le(r%60,2);return n+o+t+a}const Ac=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Rc=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ly={p:Rc,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ac(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ac(r,t)).replace("{{time}}",Rc(o,t))}},By=/^D+$/,Vy=/^Y+$/,Yy=["D","DD","YY","YYYY"];function Gy(e){return By.test(e)}function Hy(e){return Vy.test(e)}function zy(e,t,n){const r=Uy(e,t,n);if(console.warn(r),Yy.includes(e))throw new RangeError(r)}function Uy(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ky=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xy=/^'([^]*?)'?$/,Qy=/''/g,Zy=/[a-zA-Z]/;function Jy(e,t,n){var f,m,h,g,b,p,v,w;const r=wn(),o=(n==null?void 0:n.locale)??r.locale??mr,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(h=r.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((p=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((w=(v=r.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0,s=ue(e,n==null?void 0:n.in);if(!Ty(s))throw new RangeError("Invalid time value");let c=t.match(Ky).map(y=>{const C=y[0];if(C==="p"||C==="P"){const S=Ly[C];return S(y,o.formatLong)}return y}).join("").match(qy).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const C=y[0];if(C==="'")return{isToken:!1,value:eb(y)};if(kc[C])return{isToken:!0,value:y};if(C.match(Zy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(y=>{if(!y.isToken)return y.value;const C=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Hy(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Gy(C))&&zy(C,t,String(e));const S=kc[C[0]];return S(s,C,o.localize,u)}).join("")}function eb(e){const t=e.match(Xy);return t?t[1].replace(Qy,"'"):e}function tb(e,t){const n=ue(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ge(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function nb(e,t){return ue(e,t==null?void 0:t.in).getMonth()}function rb(e,t){return ue(e,t==null?void 0:t.in).getFullYear()}function ob(e,t){return+ue(e)>+ue(t)}function ab(e,t){return+ue(e)<+ue(t)}function sb(e,t,n){const[r,o]=Kt(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function ib(e,t,n){const[r,o]=Kt(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function cb(e,t,n){const r=ue(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=ge(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=tb(i);return r.setMonth(t,Math.min(a,s)),r}function lb(e,t,n){const r=ue(e,n==null?void 0:n.in);return isNaN(+r)?ge(e,NaN):(r.setFullYear(t),r)}const _c=5,ub=4;function db(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,_c*7-1);return t.getMonth(e)===t.getMonth(a)?_c:ub}function Ic(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function fb(e,t){const n=Ic(e,t),r=db(e,t);return t.addDays(n,r*7-1)}class it{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ot.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Ot(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):yc(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):bc(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Ny(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Ey(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Cc(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Oy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):_y(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r,this):fb(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Fy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Ay(r)},this.endOfWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfWeek?this.overrides.endOfWeek(r,this.options):Nc(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):jy(r)},this.format=(r,o)=>{var i;const a=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Jy(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Ec(r)},this.getMonth=r=>{var o;return(o=this.overrides)!=null&&o.getMonth?this.overrides.getMonth(r,this.options):nb(r,this.options)},this.getYear=r=>{var o;return(o=this.overrides)!=null&&o.getYear?this.overrides.getYear(r,this.options):rb(r,this.options)},this.getWeek=r=>{var o;return(o=this.overrides)!=null&&o.getWeek?this.overrides.getWeek(r,this.options):Dc(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):ob(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):ab(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Sc(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):ky(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):sb(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):ib(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Py(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Dy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):cb(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):lb(r,o)},this.startOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Ic(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Mn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Sn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Iy(r)},this.startOfWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfWeek?this.overrides.startOfWeek(r,this.options):Xt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Mc(r)},this.options={locale:mr,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const ct=new it;function mb(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[de[a]]?o.push(t[de[a]]):t[Be[a]]&&o.push(t[Be[a]]),o),[t[Y.Day]])}function hb(e){return M.createElement("button",{...e})}function pb(e){return M.createElement("span",{...e})}function gb(e){const{size:t=24,orientation:n="left",className:r}=e;return M.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&M.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&M.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&M.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&M.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))}function vb(e){const{day:t,modifiers:n,...r}=e;return M.createElement("td",{...r})}function yb(e){const{day:t,modifiers:n,...r}=e,o=M.useRef(null);return M.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),M.createElement("button",{ref:o,...r})}function bb(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[Y.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:c})=>c===a.value);return M.createElement("span",{"data-disabled":a.disabled,className:o[Y.DropdownRoot]},M.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:f})=>M.createElement(r.Option,{key:c,value:c,disabled:f},u))),M.createElement("span",{className:o[Y.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,M.createElement(r.Chevron,{orientation:"down",size:18,className:o[Y.Chevron]})))}function wb(e){return M.createElement("div",{...e})}function xb(e){return M.createElement("div",{...e})}function Cb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r},e.children)}function Sb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return M.createElement("div",{...r})}function Mb(e){return M.createElement("table",{...e})}function Nb(e){return M.createElement("div",{...e})}const jc=M.createContext(void 0);function Nn(){const e=M.useContext(jc);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Eb(e){const{components:t}=Nn();return M.createElement(t.Dropdown,{...e})}function Pb(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=Nn();return M.createElement("nav",{...a},M.createElement(i.PreviousMonthButton,{type:"button",className:s[Y.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:r?void 0:!0,"aria-label":c(r),onClick:e.onPreviousClick},M.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[Y.Chevron],orientation:"left"})),M.createElement(i.NextMonthButton,{type:"button",className:s[Y.NextMonthButton],tabIndex:o?void 0:-1,disabled:o?void 0:!0,"aria-label":u(o),onClick:e.onNextClick},M.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[Y.Chevron]})))}function Db(e){const{components:t}=Nn();return M.createElement(t.Button,{...e})}function kb(e){return M.createElement("option",{...e})}function Tb(e){const{components:t}=Nn();return M.createElement(t.Button,{...e})}function Ob(e){return M.createElement("div",{...e})}function Ab(e){return M.createElement("select",{...e})}function Rb(e){const{week:t,...n}=e;return M.createElement("tr",{...n})}function _b(e){return M.createElement("th",{...e})}function Ib(e){return M.createElement("thead",{"aria-hidden":!0},M.createElement("tr",{...e}))}function jb(e){const{week:t,...n}=e;return M.createElement("th",{...n})}function Fb(e){return M.createElement("th",{...e})}function Wb(e){return M.createElement("tbody",{...e})}function $b(e){const{components:t}=Nn();return M.createElement(t.Dropdown,{...e})}const Lb=Object.freeze(Object.defineProperty({__proto__:null,Button:hb,CaptionLabel:pb,Chevron:gb,Day:vb,DayButton:yb,Dropdown:bb,DropdownNav:wb,Footer:xb,Month:Cb,MonthCaption:Sb,MonthGrid:Mb,Months:Nb,MonthsDropdown:Eb,Nav:Pb,NextMonthButton:Db,Option:kb,PreviousMonthButton:Tb,Root:Ob,Select:Ab,Week:Rb,WeekNumber:jb,WeekNumberHeader:Fb,Weekday:_b,Weekdays:Ib,Weeks:Wb,YearsDropdown:$b},Symbol.toStringTag,{value:"Module"}));function Bb(e){return{...Lb,...e}}function Vb(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Yb(){const e={};for(const t in Y)e[Y[t]]=`rdp-${Y[t]}`;for(const t in de)e[de[t]]=`rdp-${de[t]}`;for(const t in Be)e[Be[t]]=`rdp-${Be[t]}`;return e}function Fc(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const Gb=Fc;function Hb(e,t,n){return(n??new it(t)).format(e,"d")}function zb(e,t=ct){return t.format(e,"LLLL")}function Ub(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function qb(){return""}function Kb(e,t,n){return(n??new it(t)).format(e,"cccccc")}function Wc(e,t=ct){return t.format(e,"yyyy")}const Xb=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Fc,formatDay:Hb,formatMonthCaption:Gb,formatMonthDropdown:zb,formatWeekNumber:Ub,formatWeekNumberHeader:qb,formatWeekdayName:Kb,formatYearCaption:Wc,formatYearDropdown:Wc},Symbol.toStringTag,{value:"Module"}));function Qb(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Xb,...e}}function Zb(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:s(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),b=u(h),p=t&&h<a(t)||n&&h>a(n)||!1;return{value:b,label:g,disabled:p}})}function Jb(e,t={},n={}){let r={...t==null?void 0:t[Y.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function ew(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function tw(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:u}=r,f=o(e),m=a(t),h=[];let g=f;for(;c(g,m)||u(g,m);)h.push(g),g=i(g,1);return h.map(b=>{const p=n.formatYearDropdown(b,r);return{value:s(b),label:p,disabled:!1}})}function $c(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const nw=$c;function rw(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Lc(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const ow=Lc;function aw(){return""}function sw(e){return"Choose the Month"}function iw(e){return"Go to the Next Month"}function cw(e){return"Go to the Previous Month"}function lw(e,t,n){return(n??new it(t)).format(e,"cccc")}function uw(e,t){return`Week ${e}`}function dw(e){return"Week Number"}function fw(e){return"Choose the Year"}const mw=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:nw,labelDay:ow,labelDayButton:Lc,labelGrid:$c,labelGridcell:rw,labelMonthDropdown:sw,labelNav:aw,labelNext:iw,labelPrevious:cw,labelWeekNumber:uw,labelWeekNumberHeader:dw,labelWeekday:lw,labelYearDropdown:fw},Symbol.toStringTag,{value:"Module"}));function hw(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:f,differenceInCalendarMonths:m,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:b,endOfWeek:p,isAfter:v,startOfBroadcastWeek:w,startOfISOWeek:y,startOfWeek:C}=r,S=c?w(o,r):i?y(o):C(o),E=c?h(a,r):i?g(b(a)):p(b(a)),D=f(E,S),P=m(a,o)+1,O=[];for(let V=0;V<=D;V++){const R=u(S,V);if(t&&v(R,t))break;O.push(R)}const L=(c?35:42)*P;if(s&&O.length<L){const V=L-O.length;for(let R=0;R<V;R++){const H=u(O[O.length-1],1);O.push(H)}}return O}function pw(e){const t=[];return e.reduce((n,r)=>{const o=[],a=r.weeks.reduce((i,s)=>[...i,...s.days],o);return[...n,...a]},t)}function gw(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function Bc(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:a=1,endMonth:i,startMonth:s}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:m}=t;if(i&&u(i,c)<0){const h=-1*(a-1);c=f(i,h)}return s&&u(c,s)<0&&(c=s),m(c)}class Vc{constructor(t,n,r=ct){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class vw{constructor(t,n){this.date=t,this.weeks=n}}class yw{constructor(t,n){this.days=n,this.weekNumber=t}}function bw(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:f,startOfBroadcastWeek:m,startOfISOWeek:h,startOfWeek:g}=r,b=e.reduce((p,v)=>{const w=n.broadcastCalendar?m(v,r):n.ISOWeek?h(v):g(v),y=n.broadcastCalendar?a(v,r):n.ISOWeek?i(s(v)):c(s(v)),C=t.filter(P=>P>=w&&P<=y),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<S){const P=t.filter(O=>{const B=S-C.length;return O>y&&O<=o(y,B)});C.push(...P)}const E=C.reduce((P,O)=>{const B=n.ISOWeek?u(O):f(O),L=P.find(R=>R.weekNumber===B),V=new Vc(O,v,r);return L?L.days.push(V):P.push(new yw(B,[V])),P},[]),D=new vw(v,E);return p.push(D),p},[]);return n.reverseMonths?b.reverse():b}function ww(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:f,today:m}=t,{fromYear:h,toYear:g,fromMonth:b,toMonth:p}=e;!n&&b&&(n=b),!n&&h&&(n=t.newDate(h,0,1)),!r&&p&&(r=p),!r&&g&&(r=f(g,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):h?n=f(h,0,1):!n&&v&&(n=o(c(e.today??m(),-100))),r?r=s(r):g?r=f(g,11,31):!r&&v&&(r=u(e.today??m())),[n&&a(n),r&&a(r)]}function xw(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a:1,f=i(e);if(!t)return s(f,u);if(!(c(t,e)<a))return s(f,u)}function Cw(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a??1:1,f=i(e);if(!t)return s(f,-u);if(!(c(f,t)<=0))return s(f,-u)}function Sw(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function hr(e,t){const[n,r]=M.useState(e);return[t===void 0?n:t,r]}function Mw(e,t){const[n,r]=ww(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Bc(e,t),[s,c]=hr(i,e.month?o(e.month):void 0);M.useEffect(()=>{const D=Bc(e,t);c(D)},[e.timeZone]);const u=gw(s,r,e,t),f=hw(u,e.endMonth?a(e.endMonth):void 0,e,t),m=bw(u,f,e,t),h=Sw(m),g=pw(m),b=Cw(s,n,e,t),p=xw(s,r,e,t),{disableNavigation:v,onMonthChange:w}=e,y=D=>h.some(P=>P.days.some(O=>O.isEqualTo(D))),C=D=>{if(v)return;let P=o(D);n&&P<o(n)&&(P=o(n)),r&&P>o(r)&&(P=o(r)),c(P),w==null||w(P)};return{months:m,weeks:h,days:g,navStart:n,navEnd:r,previousMonth:b,nextMonth:p,goToMonth:C,goToDay:D=>{y(D)||C(D.date)}}}function Nw(e,t,n,r){let o,a=0,i=!1;for(;a<e.length&&!i;){const s=e[a],c=t(s);!c[de.disabled]&&!c[de.hidden]&&!c[de.outside]&&(c[de.focused]||r!=null&&r.isEqualTo(s)||n(s.date)||c[de.today])&&(o=s,i=!0),a++}return o||(o=e.find(s=>{const c=t(s);return!c[de.disabled]&&!c[de.hidden]&&!c[de.outside]})),o}function lt(e,t,n=!1,r=ct){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function Yc(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function To(e){return!!(e&&typeof e=="object"&&"from"in e)}function Gc(e){return!!(e&&typeof e=="object"&&"after"in e)}function Hc(e){return!!(e&&typeof e=="object"&&"before"in e)}function zc(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Uc(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ut(e,t,n=ct){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Uc(s,n))return s.includes(e);if(To(s))return lt(s,e,!1,n);if(zc(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(Yc(s)){const c=a(s.before,e),u=a(s.after,e),f=c>0,m=u<0;return i(s.before,s.after)?m&&f:f||m}return Gc(s)?a(e,s.after)>0:Hc(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Ew(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:f,addWeeks:m,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:b,endOfWeek:p,max:v,min:w,startOfBroadcastWeek:y,startOfISOWeek:C,startOfWeek:S}=i;let D={day:u,week:m,month:f,year:h,startOfWeek:P=>c?y(P,i):s?C(P):S(P),endOfWeek:P=>c?g(P,i):s?b(P):p(P)}[e](n,t==="after"?1:-1);return t==="before"&&r?D=v([r,D]):t==="after"&&o&&(D=w([o,D])),D}function qc(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=Ew(e,t,n.date,r,o,a,i),u=!!(a.disabled&&ut(c,a.disabled,i)),f=!!(a.hidden&&ut(c,a.hidden,i)),m=c,h=new Vc(c,m,i);return!u&&!f?h:qc(e,t,h,r,o,a,i,s+1)}function Pw(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=M.useState(),c=Nw(t.days,n,r||(()=>!1),i),[u,f]=M.useState(a?c:void 0);return{isFocusTarget:p=>!!(c!=null&&c.isEqualTo(p)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(p,v)=>{if(!u)return;const w=qc(p,v,u,t.navStart,t.navEnd,e,o);w&&(t.goToDay(w),f(w))}}}function Dw(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:c}=t,{isSameDay:u,isSameMonth:f,startOfMonth:m,isBefore:h,endOfMonth:g,isAfter:b}=n,p=t.startMonth&&m(t.startMonth),v=t.endMonth&&g(t.endMonth),w={[de.focused]:[],[de.outside]:[],[de.disabled]:[],[de.hidden]:[],[de.today]:[]},y={};for(const C of e){const{date:S,displayMonth:E}=C,D=!!(E&&!f(S,E)),P=!!(p&&h(S,p)),O=!!(v&&b(S,v)),B=!!(r&&ut(S,r,n)),L=!!(o&&ut(S,o,n))||P||O||!s&&!i&&D||s&&i===!1&&D,V=u(S,c??n.today());D&&w.outside.push(C),B&&w.disabled.push(C),L&&w.hidden.push(C),V&&w.today.push(C),a&&Object.keys(a).forEach(R=>{const H=a==null?void 0:a[R];H&&ut(S,H,n)&&(y[R]?y[R].push(C):y[R]=[C])})}return C=>{const S={[de.focused]:!1,[de.disabled]:!1,[de.hidden]:!1,[de.outside]:!1,[de.today]:!1},E={};for(const D in w){const P=w[D];S[D]=P.some(O=>O===C)}for(const D in y)E[D]=y[D].some(P=>P===C);return{...S,...E}}}function kw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=hr(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,u=g=>(s==null?void 0:s.some(b=>c(b,g)))??!1,{min:f,max:m}=e;return{selected:s,select:(g,b,p)=>{let v=[...s??[]];if(u(g)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(w=>!c(w,g))}else(s==null?void 0:s.length)===m?v=[g]:v=[...v,g];return o||i(v),o==null||o(v,g,b,p),v},isSelected:u}}function Tw(e,t,n=0,r=0,o=!1,a=ct){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:f}=a;let m;if(!i&&!s)m={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?m={from:i,to:void 0}:m=void 0:f(e,i)?m={from:e,to:i}:m={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?m={from:i,to:s}:m=void 0;else if(c(i,e))m={from:i,to:n>0?void 0:e};else if(c(s,e))m={from:e,to:n>0?void 0:e};else if(f(e,i))m={from:e,to:s};else if(u(e,i))m={from:i,to:e};else if(u(e,s))m={from:i,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const h=a.differenceInCalendarDays(m.to,m.from);r>0&&h>r?m={from:e,to:void 0}:n>1&&h<n&&(m={from:e,to:void 0})}return m}function Ow(e,t,n=ct){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Kc(e,t,n=ct){return lt(e,t.from,!1,n)||lt(e,t.to,!1,n)||lt(t,e.from,!1,n)||lt(t,e.to,!1,n)}function Aw(e,t,n=ct){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?lt(e,s,!1,n):Uc(s,n)?s.some(c=>lt(e,c,!1,n)):To(s)?s.from&&s.to?Kc(e,{from:s.from,to:s.to},n):!1:zc(s)?Ow(e,s.dayOfWeek,n):Yc(s)?n.isAfter(s.before,s.after)?Kc(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):ut(e.from,s,n)||ut(e.to,s,n):Gc(s)||Hc(s)?ut(e.from,s,n)||ut(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(f=>f(s)))return!0;s=n.addDays(s,1)}}return!1}function Rw(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=hr(o,i?o:void 0),u=i?o:s;return{selected:u,select:(h,g,b)=>{const{min:p,max:v}=e,w=h?Tw(h,u,p,v,a,t):void 0;return r&&n&&(w!=null&&w.from)&&w.to&&Aw({from:w.from,to:w.to},n,t)&&(w.from=h,w.to=void 0),i||c(w),i==null||i(w,h,g,b),w},isSelected:h=>u&<(u,h,!1,t)}}function _w(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=hr(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(m,h,g)=>{let b=m;return!r&&s&&s&&c(m,s)&&(b=void 0),o||i(b),o==null||o(b,m,h,g),b},isSelected:m=>s?c(s,m):!1}}function Iw(e,t){const n=_w(e,t),r=kw(e,t),o=Rw(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function jw(e){const{components:t,formatters:n,labels:r,dateLib:o,locale:a,classNames:i}=M.useMemo(()=>{const Q={...mr,...e.locale};return{dateLib:new it({locale:Q,weekStartsOn:e.broadcastCalendar?1:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens,timeZone:e.timeZone,numerals:e.numerals},e.dateLib),components:Bb(e.components),formatters:Qb(e.formatters),labels:{...mw,...e.labels},locale:Q,classNames:{...Yb(),...e.classNames}}},[e.locale,e.broadcastCalendar,e.weekStartsOn,e.firstWeekContainsDate,e.useAdditionalWeekYearTokens,e.useAdditionalDayOfYearTokens,e.timeZone,e.numerals,e.dateLib,e.components,e.formatters,e.labels,e.classNames]),{captionLayout:s,mode:c,onDayBlur:u,onDayClick:f,onDayFocus:m,onDayKeyDown:h,onDayMouseEnter:g,onDayMouseLeave:b,onNextClick:p,onPrevClick:v,showWeekNumber:w,styles:y}=e,{formatCaption:C,formatDay:S,formatMonthDropdown:E,formatWeekNumber:D,formatWeekNumberHeader:P,formatWeekdayName:O,formatYearDropdown:B}=n,L=Mw(e,o),{days:V,months:R,navStart:H,navEnd:G,previousMonth:X,nextMonth:j,goToMonth:z}=L,F=Dw(V,e,o),{isSelected:T,select:Z,selected:U}=Iw(e,o)??{},{blur:ve,focused:Me,isFocusTarget:pe,moveFocus:Oe,setFocused:he}=Pw(e,L,F,T??(()=>!1),o),{labelDayButton:$,labelGridcell:ne,labelGrid:ae,labelMonthDropdown:ee,labelNav:re,labelWeekday:te,labelWeekNumber:we,labelWeekNumberHeader:Pe,labelYearDropdown:Ye}=r,dt=M.useMemo(()=>ew(o,e.ISOWeek),[o,e.ISOWeek]),Ge=c!==void 0||f!==void 0,rn=M.useCallback(()=>{X&&(z(X),v==null||v(X))},[X,z,v]),ft=M.useCallback(()=>{j&&(z(j),p==null||p(j))},[z,j,p]),jr=M.useCallback((Q,ie)=>se=>{se.preventDefault(),se.stopPropagation(),he(Q),Z==null||Z(Q.date,ie,se),f==null||f(Q.date,ie,se)},[Z,f,he]),x=M.useCallback((Q,ie)=>se=>{he(Q),m==null||m(Q.date,ie,se)},[m,he]),_=M.useCallback((Q,ie)=>se=>{ve(),u==null||u(Q.date,ie,se)},[ve,u]),I=M.useCallback((Q,ie)=>se=>{const Ce={ArrowLeft:["day",e.dir==="rtl"?"after":"before"],ArrowRight:["day",e.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[se.shiftKey?"year":"month","before"],PageDown:[se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Ce[se.key]){se.preventDefault(),se.stopPropagation();const[ze,Fr]=Ce[se.key];Oe(ze,Fr)}h==null||h(Q.date,ie,se)},[Oe,h,e.dir]),oe=M.useCallback((Q,ie)=>se=>{g==null||g(Q.date,ie,se)},[g]),xe=M.useCallback((Q,ie)=>se=>{b==null||b(Q.date,ie,se)},[b]),me=M.useCallback(Q=>ie=>{const se=Number(ie.target.value),Ce=o.setMonth(o.startOfMonth(Q),se);z(Ce)},[o,z]),q=M.useCallback(Q=>ie=>{const se=Number(ie.target.value),Ce=o.setYear(o.startOfMonth(Q),se);z(Ce)},[o,z]),{className:He,style:Dt}=M.useMemo(()=>({className:[i[Y.Root],e.className].filter(Boolean).join(" "),style:{...y==null?void 0:y[Y.Root],...e.style}}),[i,e.className,e.style,y]),Ne=Vb(e),mt={dayPickerProps:e,selected:U,select:Z,isSelected:T,months:R,nextMonth:j,previousMonth:X,goToMonth:z,getModifiers:F,components:t,classNames:i,styles:y,labels:r,formatters:n};return M.createElement(jc.Provider,{value:mt},M.createElement(t.Root,{className:He,style:Dt,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,role:e.role,"aria-label":e["aria-label"],...Ne},M.createElement(t.Months,{className:i[Y.Months],style:y==null?void 0:y[Y.Months]},!e.hideNavigation&&M.createElement(t.Nav,{className:i[Y.Nav],style:y==null?void 0:y[Y.Nav],"aria-label":re(),onPreviousClick:rn,onNextClick:ft,previousMonth:X,nextMonth:j}),R.map((Q,ie)=>{const se=Zb(Q.date,H,G,n,o),Ce=tw(H,G,n,o);return M.createElement(t.Month,{className:i[Y.Month],style:y==null?void 0:y[Y.Month],key:ie,displayIndex:ie,calendarMonth:Q},M.createElement(t.MonthCaption,{className:i[Y.MonthCaption],style:y==null?void 0:y[Y.MonthCaption],calendarMonth:Q,displayIndex:ie},s!=null&&s.startsWith("dropdown")?M.createElement(t.DropdownNav,{className:i[Y.Dropdowns],style:y==null?void 0:y[Y.Dropdowns]},s==="dropdown"||s==="dropdown-months"?M.createElement(t.MonthsDropdown,{className:i[Y.MonthsDropdown],"aria-label":ee(),classNames:i,components:t,disabled:!!e.disableNavigation,onChange:me(Q.date),options:se,style:y==null?void 0:y[Y.Dropdown],value:o.getMonth(Q.date)}):M.createElement("span",{role:"status","aria-live":"polite"},E(Q.date,o)),s==="dropdown"||s==="dropdown-years"?M.createElement(t.YearsDropdown,{className:i[Y.YearsDropdown],"aria-label":Ye(o.options),classNames:i,components:t,disabled:!!e.disableNavigation,onChange:q(Q.date),options:Ce,style:y==null?void 0:y[Y.Dropdown],value:o.getYear(Q.date)}):M.createElement("span",{role:"status","aria-live":"polite"},B(Q.date,o))):M.createElement(t.CaptionLabel,{className:i[Y.CaptionLabel],role:"status","aria-live":"polite"},C(Q.date,o.options,o))),M.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":c==="multiple"||c==="range","aria-label":ae(Q.date,o.options,o)||void 0,className:i[Y.MonthGrid],style:y==null?void 0:y[Y.MonthGrid]},!e.hideWeekdays&&M.createElement(t.Weekdays,{className:i[Y.Weekdays],style:y==null?void 0:y[Y.Weekdays]},w&&M.createElement(t.WeekNumberHeader,{"aria-label":Pe(o.options),className:i[Y.WeekNumberHeader],style:y==null?void 0:y[Y.WeekNumberHeader],scope:"col"},P()),dt.map((ze,Fr)=>M.createElement(t.Weekday,{"aria-label":te(ze,o.options,o),className:i[Y.Weekday],key:Fr,style:y==null?void 0:y[Y.Weekday],scope:"col"},O(ze,o.options,o)))),M.createElement(t.Weeks,{className:i[Y.Weeks],style:y==null?void 0:y[Y.Weeks]},Q.weeks.map((ze,Fr)=>M.createElement(t.Week,{className:i[Y.Week],key:ze.weekNumber,style:y==null?void 0:y[Y.Week],week:ze},w&&M.createElement(t.WeekNumber,{week:ze,style:y==null?void 0:y[Y.WeekNumber],"aria-label":we(ze.weekNumber,{locale:a}),className:i[Y.WeekNumber],scope:"row",role:"rowheader"},D(ze.weekNumber)),ze.days.map(De=>{const{date:nt}=De,ce=F(De);if(ce[de.focused]=!ce.hidden&&!!(Me!=null&&Me.isEqualTo(De)),ce[Be.selected]=!ce.disabled&&((T==null?void 0:T(nt))||ce.selected),To(U)){const{from:Na,to:Ea}=U;ce[Be.range_start]=!!(Na&&Ea&&o.isSameDay(nt,Na)),ce[Be.range_end]=!!(Na&&Ea&&o.isSameDay(nt,Ea)),ce[Be.range_middle]=lt(U,nt,!0,o)}const NM=Jb(ce,y,e.modifiersStyles),EM=mb(ce,i,e.modifiersClassNames),PM=!Ge&&!ce.hidden?ne(nt,ce,o.options,o):void 0;return M.createElement(t.Day,{key:`${o.format(nt,"yyyy-MM-dd")}_${o.format(De.displayMonth,"yyyy-MM")}`,day:De,modifiers:ce,className:EM.join(" "),style:NM,role:"gridcell","aria-selected":ce.selected||void 0,"aria-label":PM,"data-day":o.format(nt,"yyyy-MM-dd"),"data-month":De.outside?o.format(nt,"yyyy-MM"):void 0,"data-selected":ce.selected||void 0,"data-disabled":ce.disabled||void 0,"data-hidden":ce.hidden||void 0,"data-outside":De.outside||void 0,"data-focused":ce.focused||void 0,"data-today":ce.today||void 0},!ce.hidden&&Ge?M.createElement(t.DayButton,{className:i[Y.DayButton],style:y==null?void 0:y[Y.DayButton],type:"button",day:De,modifiers:ce,disabled:ce.disabled||void 0,tabIndex:pe(De)?0:-1,"aria-label":$(nt,ce,o.options,o),onClick:jr(De,ce),onBlur:_(De,ce),onFocus:x(De,ce),onKeyDown:I(De,ce),onMouseEnter:oe(De,ce),onMouseLeave:xe(De,ce)},S(nt,o.options,o)):!ce.hidden&&S(De.date,o.options,o))}))))))})),e.footer&&M.createElement(t.Footer,{className:i[Y.Footer],style:y==null?void 0:y[Y.Footer],role:"status","aria-live":"polite"},e.footer)))}function Xc(e){const{className:t,classNames:n,showOutsideDays:r=!0,...o}=e;return d.jsx(jw,{showOutsideDays:r,className:k("p-3",t),classNames:{...n},locale:wy,...o})}Xc.displayName="Calendar";const Qc=l.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:k("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Qc.displayName="Card";const Zc=l.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:k("flex flex-col space-y-1.5 p-6",e),...t}));Zc.displayName="CardHeader";const Jc=l.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:k("font-semibold leading-none tracking-tight pb-4",e),...t}));Jc.displayName="CardTitle";const el=l.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:k("text-sm text-muted-foreground",e),...t}));el.displayName="CardDescription";const tl=l.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:k("p-6 py-0",e),...t}));tl.displayName="CardContent";const nl=l.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:k("flex items-center p-6 pt-6",e),...t}));nl.displayName="CardFooter";function pr(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Oo="Checkbox",[Fw,jM]=ye(Oo),[Ww,$w]=Fw(Oo),rl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:f,...m}=e,[h,g]=l.useState(null),b=J(t,S=>g(S)),p=l.useRef(!1),v=h?f||!!h.closest("form"):!0,[w=!1,y]=ke({prop:o,defaultProp:a,onChange:u}),C=l.useRef(w);return l.useEffect(()=>{const S=h==null?void 0:h.form;if(S){const E=()=>y(C.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[h,y]),d.jsxs(Ww,{scope:n,state:w,disabled:s,children:[d.jsx(W.button,{type:"button",role:"checkbox","aria-checked":St(w)?"mixed":w,"aria-required":i,"data-state":sl(w),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:b,onKeyDown:A(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:A(e.onClick,S=>{y(E=>St(E)?!0:!E),v&&(p.current=S.isPropagationStopped(),p.current||S.stopPropagation())})}),v&&d.jsx(Lw,{control:h,bubbles:!p.current,name:r,value:c,checked:w,required:i,disabled:s,form:f,style:{transform:"translateX(-100%)"},defaultChecked:St(a)?!1:a})]})});rl.displayName=Oo;var ol="CheckboxIndicator",al=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=$w(ol,n);return d.jsx(Te,{present:r||St(a.state)||a.state===!0,children:d.jsx(W.span,{"data-state":sl(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});al.displayName=ol;var Lw=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,i=l.useRef(null),s=pr(n),c=ur(t);l.useEffect(()=>{const f=i.current,m=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(m,"checked").set;if(s!==n&&g){const b=new Event("click",{bubbles:r});f.indeterminate=St(n),g.call(f,St(n)?!1:n),f.dispatchEvent(b)}},[s,n,r]);const u=l.useRef(St(n)?!1:n);return d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??u.current,...a,tabIndex:-1,ref:i,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function St(e){return e==="indeterminate"}function sl(e){return St(e)?"indeterminate":e?"checked":"unchecked"}var il=rl,Bw=al;const cl=l.forwardRef(({className:e,...t},n)=>d.jsx(il,{ref:n,className:k("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:d.jsx(Bw,{className:k("flex items-center justify-center text-current"),children:d.jsx(io,{className:"h-4 w-4"})})}));cl.displayName=il.displayName;const ll=M.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:i,value:s=0,...c}=e,u=M.useRef(null);M.useImperativeHandle(t,()=>u.current);const[f,m]=M.useState(""),h=p=>{const v=p.toFixed(2).split("."),w=v[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${w}${r}${v[1]}`},g=p=>{const v=p.target.value,w=parseFloat(v.replace(/\D/g,""))/100;m(h(w)),a(w),u.current&&window.requestAnimationFrame(()=>{var y;(y=u.current)==null||y.setSelectionRange(u.current.value.length,u.current.value.length)})},b=()=>{u.current&&u.current.setSelectionRange(u.current.value.length,u.current.value.length)};return M.useEffect(()=>{m(h(+s))},[s]),d.jsx(Bn,{type:"text",inputMode:"numeric",value:f,ref:u,onChange:g,onFocus:b,onClick:b,placeholder:`${n} 0${r}00`,className:i,...c})});ll.displayName="CurrencyInput";const Ao=Os,ul=As,dl=Rs,Vw=er,Ro=l.forwardRef(({className:e,...t},n)=>d.jsx(no,{ref:n,className:k("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",e),...t}));Ro.displayName=no.displayName;const gr=l.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(dl,{children:[d.jsx(Ro,{}),d.jsxs(ro,{ref:r,className:k("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 max-h-[100dvh] overflow-y-auto",e),...n,children:[t,d.jsxs(er,{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",children:[d.jsx(Gp,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gr.displayName=ro.displayName;const vr=({className:e,...t})=>d.jsx("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});vr.displayName="DialogHeader";const fl=({className:e,...t})=>d.jsx("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fl.displayName="DialogFooter";const yr=l.forwardRef(({className:e,...t},n)=>d.jsx(oo,{ref:n,className:k("text-lg font-semibold leading-none tracking-tight",e),...t}));yr.displayName=oo.displayName;const br=l.forwardRef(({className:e,...t},n)=>d.jsx(ao,{ref:n,className:k("text-sm text-muted-foreground",e),...t}));br.displayName=ao.displayName;function _o(e){const t=e+"CollectionProvider",[n,r]=ye(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:b,children:p}=g,v=M.useRef(null),w=M.useRef(new Map).current;return d.jsx(o,{scope:b,itemMap:w,collectionRef:v,children:p})};i.displayName=t;const s=e+"CollectionSlot",c=M.forwardRef((g,b)=>{const{scope:p,children:v}=g,w=a(s,p),y=J(b,w.collectionRef);return d.jsx(Ue,{ref:y,children:v})});c.displayName=s;const u=e+"CollectionItemSlot",f="data-radix-collection-item",m=M.forwardRef((g,b)=>{const{scope:p,children:v,...w}=g,y=M.useRef(null),C=J(b,y),S=a(u,p);return M.useEffect(()=>(S.itemMap.set(y,{ref:y,...w}),()=>void S.itemMap.delete(y))),d.jsx(Ue,{[f]:"",ref:C,children:v})});m.displayName=u;function h(g){const b=a(e+"CollectionConsumer",g);return M.useCallback(()=>{const v=b.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((S,E)=>w.indexOf(S.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:c,ItemSlot:m},h,r]}var Yw=l.createContext(void 0);function Zt(e){const t=l.useContext(Yw);return e||t||"ltr"}var Io="rovingFocusGroup.onEntryFocus",Gw={bubbles:!1,cancelable:!0},wr="RovingFocusGroup",[jo,ml,Hw]=_o(wr),[zw,Mt]=ye(wr,[Hw]),[Uw,qw]=zw(wr),hl=l.forwardRef((e,t)=>d.jsx(jo.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(jo.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Kw,{...e,ref:t})})}));hl.displayName=wr;var Kw=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,h=l.useRef(null),g=J(t,h),b=Zt(a),[p=null,v]=ke({prop:i,defaultProp:s,onChange:c}),[w,y]=l.useState(!1),C=Re(u),S=ml(n),E=l.useRef(!1),[D,P]=l.useState(0);return l.useEffect(()=>{const O=h.current;if(O)return O.addEventListener(Io,C),()=>O.removeEventListener(Io,C)},[C]),d.jsx(Uw,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:p,onItemFocus:l.useCallback(O=>v(O),[v]),onItemShiftTab:l.useCallback(()=>y(!0),[]),onFocusableItemAdd:l.useCallback(()=>P(O=>O+1),[]),onFocusableItemRemove:l.useCallback(()=>P(O=>O-1),[]),children:d.jsx(W.div,{tabIndex:w||D===0?-1:0,"data-orientation":r,...m,ref:g,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{E.current=!0}),onFocus:A(e.onFocus,O=>{const B=!E.current;if(O.target===O.currentTarget&&B&&!w){const L=new CustomEvent(Io,Gw);if(O.currentTarget.dispatchEvent(L),!L.defaultPrevented){const V=S().filter(j=>j.focusable),R=V.find(j=>j.active),H=V.find(j=>j.id===p),X=[R,H,...V].filter(Boolean).map(j=>j.ref.current);vl(X,f)}}E.current=!1}),onBlur:A(e.onBlur,()=>y(!1))})})}),pl="RovingFocusGroupItem",gl=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...i}=e,s=Ae(),c=a||s,u=qw(pl,n),f=u.currentTabStopId===c,m=ml(n),{onFocusableItemAdd:h,onFocusableItemRemove:g}=u;return l.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),d.jsx(jo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:d.jsx(W.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:A(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:A(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:A(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const p=Zw(b,u.orientation,u.dir);if(p!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=m().filter(y=>y.focusable).map(y=>y.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const y=w.indexOf(b.currentTarget);w=u.loop?Jw(w,y+1):w.slice(y+1)}setTimeout(()=>vl(w))}})})})});gl.displayName=pl;var Xw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Qw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Zw(e,t,n){const r=Qw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Xw[r]}function vl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Jw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var xr=hl,Cr=gl,Fo=["Enter"," "],ex=["ArrowDown","PageUp","Home"],yl=["ArrowUp","PageDown","End"],tx=[...ex,...yl],nx={ltr:[...Fo,"ArrowRight"],rtl:[...Fo,"ArrowLeft"]},rx={ltr:["ArrowLeft"],rtl:["ArrowRight"]},En="Menu",[Pn,ox,ax]=_o(En),[Rt,bl]=ye(En,[ax,wt,Mt]),Dn=wt(),wl=Mt(),[xl,Nt]=Rt(En),[sx,kn]=Rt(En),Cl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=Dn(t),[c,u]=l.useState(null),f=l.useRef(!1),m=Re(a),h=Zt(o);return l.useEffect(()=>{const g=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),d.jsx(vn,{...s,children:d.jsx(xl,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:d.jsx(sx,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:h,modal:i,children:r})})})};Cl.displayName=En;var ix="MenuAnchor",Wo=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Dn(n);return d.jsx(yn,{...o,...r,ref:t})});Wo.displayName=ix;var $o="MenuPortal",[cx,Sl]=Rt($o,{forceMount:void 0}),Ml=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Nt($o,t);return d.jsx(cx,{scope:t,forceMount:n,children:d.jsx(Te,{present:n||a.open,children:d.jsx(dn,{asChild:!0,container:o,children:r})})})};Ml.displayName=$o;var Fe="MenuContent",[lx,Lo]=Rt(Fe),Nl=l.forwardRef((e,t)=>{const n=Sl(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Nt(Fe,e.__scopeMenu),i=kn(Fe,e.__scopeMenu);return d.jsx(Pn.Provider,{scope:e.__scopeMenu,children:d.jsx(Te,{present:r||a.open,children:d.jsx(Pn.Slot,{scope:e.__scopeMenu,children:i.modal?d.jsx(ux,{...o,ref:t}):d.jsx(dx,{...o,ref:t})})})})}),ux=l.forwardRef((e,t)=>{const n=Nt(Fe,e.__scopeMenu),r=l.useRef(null),o=J(t,r);return l.useEffect(()=>{const a=r.current;if(a)return Zn(a)},[]),d.jsx(Bo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),dx=l.forwardRef((e,t)=>{const n=Nt(Fe,e.__scopeMenu);return d.jsx(Bo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Bo=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:b,...p}=e,v=Nt(Fe,n),w=kn(Fe,n),y=Dn(n),C=wl(n),S=ox(n),[E,D]=l.useState(null),P=l.useRef(null),O=J(t,P,v.onContentChange),B=l.useRef(0),L=l.useRef(""),V=l.useRef(0),R=l.useRef(null),H=l.useRef("right"),G=l.useRef(0),X=b?fn:l.Fragment,j=b?{as:Ue,allowPinchZoom:!0}:void 0,z=T=>{var $,ne;const Z=L.current+T,U=S().filter(ae=>!ae.disabled),ve=document.activeElement,Me=($=U.find(ae=>ae.ref.current===ve))==null?void 0:$.textValue,pe=U.map(ae=>ae.textValue),Oe=Sx(pe,Z,Me),he=(ne=U.find(ae=>ae.textValue===Oe))==null?void 0:ne.ref.current;(function ae(ee){L.current=ee,window.clearTimeout(B.current),ee!==""&&(B.current=window.setTimeout(()=>ae(""),1e3))})(Z),he&&setTimeout(()=>he.focus())};l.useEffect(()=>()=>window.clearTimeout(B.current),[]),Gn();const F=l.useCallback(T=>{var U,ve;return H.current===((U=R.current)==null?void 0:U.side)&&Nx(T,(ve=R.current)==null?void 0:ve.area)},[]);return d.jsx(lx,{scope:n,searchRef:L,onItemEnter:l.useCallback(T=>{F(T)&&T.preventDefault()},[F]),onItemLeave:l.useCallback(T=>{var Z;F(T)||((Z=P.current)==null||Z.focus(),D(null))},[F]),onTriggerLeave:l.useCallback(T=>{F(T)&&T.preventDefault()},[F]),pointerGraceTimerRef:V,onPointerGraceIntentChange:l.useCallback(T=>{R.current=T},[]),children:d.jsx(X,{...j,children:d.jsx(un,{asChild:!0,trapped:o,onMountAutoFocus:A(a,T=>{var Z;T.preventDefault(),(Z=P.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:d.jsx(Ft,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:d.jsx(xr,{asChild:!0,...C,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:D,onEntryFocus:A(c,T=>{w.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(dr,{role:"menu","aria-orientation":"vertical","data-state":Yl(v.open),"data-radix-menu-content":"",dir:w.dir,...y,...p,ref:O,style:{outline:"none",...p.style},onKeyDown:A(p.onKeyDown,T=>{const U=T.target.closest("[data-radix-menu-content]")===T.currentTarget,ve=T.ctrlKey||T.altKey||T.metaKey,Me=T.key.length===1;U&&(T.key==="Tab"&&T.preventDefault(),!ve&&Me&&z(T.key));const pe=P.current;if(T.target!==pe||!tx.includes(T.key))return;T.preventDefault();const he=S().filter($=>!$.disabled).map($=>$.ref.current);yl.includes(T.key)&&he.reverse(),xx(he)}),onBlur:A(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(B.current),L.current="")}),onPointerMove:A(e.onPointerMove,On(T=>{const Z=T.target,U=G.current!==T.clientX;if(T.currentTarget.contains(Z)&&U){const ve=T.clientX>G.current?"right":"left";H.current=ve,G.current=T.clientX}}))})})})})})})});Nl.displayName=Fe;var fx="MenuGroup",Vo=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(W.div,{role:"group",...r,ref:t})});Vo.displayName=fx;var mx="MenuLabel",El=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(W.div,{...r,ref:t})});El.displayName=mx;var Sr="MenuItem",Pl="menu.itemSelect",Mr=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),i=kn(Sr,e.__scopeMenu),s=Lo(Sr,e.__scopeMenu),c=J(t,a),u=l.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const h=new CustomEvent(Pl,{bubbles:!0,cancelable:!0});m.addEventListener(Pl,g=>r==null?void 0:r(g),{once:!0}),Ga(m,h),h.defaultPrevented?u.current=!1:i.onClose()}};return d.jsx(Dl,{...o,ref:c,disabled:n,onClick:A(e.onClick,f),onPointerDown:m=>{var h;(h=e.onPointerDown)==null||h.call(e,m),u.current=!0},onPointerUp:A(e.onPointerUp,m=>{var h;u.current||(h=m.currentTarget)==null||h.click()}),onKeyDown:A(e.onKeyDown,m=>{const h=s.searchRef.current!=="";n||h&&m.key===" "||Fo.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Mr.displayName=Sr;var Dl=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Lo(Sr,n),s=wl(n),c=l.useRef(null),u=J(t,c),[f,m]=l.useState(!1),[h,g]=l.useState("");return l.useEffect(()=>{const b=c.current;b&&g((b.textContent??"").trim())},[a.children]),d.jsx(Pn.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:d.jsx(Cr,{asChild:!0,...s,focusable:!r,children:d.jsx(W.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:A(e.onPointerMove,On(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:A(e.onPointerLeave,On(b=>i.onItemLeave(b))),onFocus:A(e.onFocus,()=>m(!0)),onBlur:A(e.onBlur,()=>m(!1))})})})}),hx="MenuCheckboxItem",kl=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(_l,{scope:e.__scopeMenu,checked:n,children:d.jsx(Mr,{role:"menuitemcheckbox","aria-checked":Nr(n)?"mixed":n,...o,ref:t,"data-state":Ho(n),onSelect:A(o.onSelect,()=>r==null?void 0:r(Nr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});kl.displayName=hx;var Tl="MenuRadioGroup",[px,gx]=Rt(Tl,{value:void 0,onValueChange:()=>{}}),Ol=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Re(r);return d.jsx(px,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(Vo,{...o,ref:t})})});Ol.displayName=Tl;var Al="MenuRadioItem",Rl=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=gx(Al,e.__scopeMenu),a=n===o.value;return d.jsx(_l,{scope:e.__scopeMenu,checked:a,children:d.jsx(Mr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ho(a),onSelect:A(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});Rl.displayName=Al;var Yo="MenuItemIndicator",[_l,vx]=Rt(Yo,{checked:!1}),Il=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=vx(Yo,n);return d.jsx(Te,{present:r||Nr(a.checked)||a.checked===!0,children:d.jsx(W.span,{...o,ref:t,"data-state":Ho(a.checked)})})});Il.displayName=Yo;var yx="MenuSeparator",jl=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(W.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});jl.displayName=yx;var bx="MenuArrow",Fl=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Dn(n);return d.jsx(fr,{...o,...r,ref:t})});Fl.displayName=bx;var Go="MenuSub",[wx,Wl]=Rt(Go),$l=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Nt(Go,t),i=Dn(t),[s,c]=l.useState(null),[u,f]=l.useState(null),m=Re(o);return l.useEffect(()=>(a.open===!1&&m(!1),()=>m(!1)),[a.open,m]),d.jsx(vn,{...i,children:d.jsx(xl,{scope:t,open:r,onOpenChange:m,content:u,onContentChange:f,children:d.jsx(wx,{scope:t,contentId:Ae(),triggerId:Ae(),trigger:s,onTriggerChange:c,children:n})})})};$l.displayName=Go;var Tn="MenuSubTrigger",Ll=l.forwardRef((e,t)=>{const n=Nt(Tn,e.__scopeMenu),r=kn(Tn,e.__scopeMenu),o=Wl(Tn,e.__scopeMenu),a=Lo(Tn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),d.jsx(Wo,{asChild:!0,...u,children:d.jsx(Dl,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Yl(n.open),...e,ref:Vn(t,o.onTriggerChange),onClick:m=>{var h;(h=e.onClick)==null||h.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,On(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:A(e.onPointerLeave,On(m=>{var g,b;f();const h=(g=n.content)==null?void 0:g.getBoundingClientRect();if(h){const p=(b=n.content)==null?void 0:b.dataset.side,v=p==="right",w=v?-5:5,y=h[v?"left":"right"],C=h[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+w,y:m.clientY},{x:y,y:h.top},{x:C,y:h.top},{x:C,y:h.bottom},{x:y,y:h.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,m=>{var g;const h=a.searchRef.current!=="";e.disabled||h&&m.key===" "||nx[r.dir].includes(m.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),m.preventDefault())})})})});Ll.displayName=Tn;var Bl="MenuSubContent",Vl=l.forwardRef((e,t)=>{const n=Sl(Fe,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Nt(Fe,e.__scopeMenu),i=kn(Fe,e.__scopeMenu),s=Wl(Bl,e.__scopeMenu),c=l.useRef(null),u=J(t,c);return d.jsx(Pn.Provider,{scope:e.__scopeMenu,children:d.jsx(Te,{present:r||a.open,children:d.jsx(Pn.Slot,{scope:e.__scopeMenu,children:d.jsx(Bo,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:A(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:A(e.onKeyDown,f=>{var g;const m=f.currentTarget.contains(f.target),h=rx[i.dir].includes(f.key);m&&h&&(a.onOpenChange(!1),(g=s.trigger)==null||g.focus(),f.preventDefault())})})})})})});Vl.displayName=Bl;function Yl(e){return e?"open":"closed"}function Nr(e){return e==="indeterminate"}function Ho(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}function xx(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Cx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Sx(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=Cx(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Mx(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a].x,c=t[a].y,u=t[i].x,f=t[i].y;c>r!=f>r&&n<(u-s)*(r-c)/(f-c)+s&&(o=!o)}return o}function Nx(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Mx(n,t)}function On(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ex=Cl,Px=Wo,Dx=Ml,kx=Nl,Tx=Vo,Ox=El,Ax=Mr,Rx=kl,_x=Ol,Ix=Rl,jx=Il,Fx=jl,Wx=Fl,$x=$l,Lx=Ll,Bx=Vl,zo="DropdownMenu",[Vx,FM]=ye(zo,[bl]),Ee=bl(),[Yx,Gl]=Vx(zo),Hl=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Ee(t),u=l.useRef(null),[f=!1,m]=ke({prop:o,defaultProp:a,onChange:i});return d.jsx(Yx,{scope:t,triggerId:Ae(),triggerRef:u,contentId:Ae(),open:f,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(h=>!h),[m]),modal:s,children:d.jsx(Ex,{...c,open:f,onOpenChange:m,dir:r,modal:s,children:n})})};Hl.displayName=zo;var zl="DropdownMenuTrigger",Ul=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Gl(zl,n),i=Ee(n);return d.jsx(Px,{asChild:!0,...i,children:d.jsx(W.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Vn(t,a.triggerRef),onPointerDown:A(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:A(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Ul.displayName=zl;var Gx="DropdownMenuPortal",ql=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return d.jsx(Dx,{...r,...n})};ql.displayName=Gx;var Kl="DropdownMenuContent",Xl=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Gl(Kl,n),a=Ee(n),i=l.useRef(!1);return d.jsx(kx,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:A(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!o.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xl.displayName=Kl;var Hx="DropdownMenuGroup",Ql=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Tx,{...o,...r,ref:t})});Ql.displayName=Hx;var zx="DropdownMenuLabel",Zl=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Ox,{...o,...r,ref:t})});Zl.displayName=zx;var Ux="DropdownMenuItem",Jl=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Ax,{...o,...r,ref:t})});Jl.displayName=Ux;var qx="DropdownMenuCheckboxItem",eu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Rx,{...o,...r,ref:t})});eu.displayName=qx;var Kx="DropdownMenuRadioGroup",tu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(_x,{...o,...r,ref:t})});tu.displayName=Kx;var Xx="DropdownMenuRadioItem",nu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Ix,{...o,...r,ref:t})});nu.displayName=Xx;var Qx="DropdownMenuItemIndicator",ru=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(jx,{...o,...r,ref:t})});ru.displayName=Qx;var Zx="DropdownMenuSeparator",ou=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Fx,{...o,...r,ref:t})});ou.displayName=Zx;var Jx="DropdownMenuArrow",eC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Wx,{...o,...r,ref:t})});eC.displayName=Jx;var tC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Ee(t),[s=!1,c]=ke({prop:r,defaultProp:a,onChange:o});return d.jsx($x,{...i,open:s,onOpenChange:c,children:n})},nC="DropdownMenuSubTrigger",au=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Lx,{...o,...r,ref:t})});au.displayName=nC;var rC="DropdownMenuSubContent",su=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(Bx,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});su.displayName=rC;var oC=Hl,aC=Ul,iu=ql,cu=Xl,sC=Ql,lu=Zl,uu=Jl,du=eu,iC=tu,fu=nu,mu=ru,hu=ou,cC=tC,pu=au,gu=su;const lC=oC,uC=aC,dC=sC,fC=iu,mC=cC,hC=iC,vu=l.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(pu,{ref:o,className:k("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,d.jsx(co,{className:"ml-auto"})]}));vu.displayName=pu.displayName;const yu=l.forwardRef(({className:e,...t},n)=>d.jsx(gu,{ref:n,className:k("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));yu.displayName=gu.displayName;const bu=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(iu,{children:d.jsx(cu,{ref:r,sideOffset:t,className:k("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",e),...n})}));bu.displayName=cu.displayName;const wu=l.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(uu,{ref:r,className:k("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));wu.displayName=uu.displayName;const xu=l.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs(du,{ref:o,className:k("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(mu,{children:d.jsx(io,{className:"h-4 w-4"})})}),t]}));xu.displayName=du.displayName;const Cu=l.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(fu,{ref:r,className:k("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(mu,{children:d.jsx(di,{className:"h-2 w-2 fill-current"})})}),t]}));Cu.displayName=fu.displayName;const Su=l.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(lu,{ref:r,className:k("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Su.displayName=lu.displayName;const Mu=l.forwardRef(({className:e,...t},n)=>d.jsx(hu,{ref:n,className:k("-mx-1 my-1 h-px bg-muted",e),...t}));Mu.displayName=hu.displayName;const Nu=({className:e,...t})=>d.jsx("span",{className:k("ml-auto text-xs tracking-widest opacity-60",e),...t});Nu.displayName="DropdownMenuShortcut";var pC=e=>e.type==="checkbox",gC=e=>e instanceof Date,Eu=e=>e==null;const vC=e=>typeof e=="object";var Jt=e=>!Eu(e)&&!Array.isArray(e)&&vC(e)&&!gC(e),yC=e=>Jt(e)&&e.target?pC(e.target)?e.target.checked:e.target.value:e,bC=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,wC=(e,t)=>e.has(bC(t)),xC=e=>{const t=e.constructor&&e.constructor.prototype;return Jt(t)&&t.hasOwnProperty("isPrototypeOf")},CC=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Uo(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(CC&&(e instanceof Blob||r))&&(n||Jt(e)))if(t=n?[]:{},!n&&!xC(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=Uo(e[o]));else return e;return t}var Pu=e=>Array.isArray(e)?e.filter(Boolean):[],qo=e=>e===void 0,_e=(e,t,n)=>{if(!t||!Jt(e))return n;const r=Pu(t.split(/[,[\].]+?/)).reduce((o,a)=>Eu(o)?o:o[a],e);return qo(r)||r===e?qo(e[t])?n:e[t]:r},Du=e=>typeof e=="boolean",SC=e=>/^\w*$/.test(e),MC=e=>Pu(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ku=(e,t,n)=>{let r=-1;const o=SC(t)?[t]:MC(t),a=o.length,i=a-1;for(;++r<a;){const s=o[r];let c=n;if(r!==i){const u=e[s];c=Jt(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(s==="__proto__"||s==="constructor"||s==="prototype")return;e[s]=c,e=e[s]}return e};const Tu={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ou={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Au=M.createContext(null),Er=()=>M.useContext(Au),NC=e=>{const{children:t,...n}=e;return M.createElement(Au.Provider,{value:n},t)};var EC=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==Ou.all&&(t._proxyFormState[i]=!r||Ou.all),n&&(n[i]=!0),e[i]}});return o},PC=e=>Jt(e)&&!Object.keys(e).length,DC=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return PC(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(i=>t[i]===!r)},kC=e=>Array.isArray(e)?e:[e],Ru=(e,t,n)=>!e||!t||e===t||kC(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function _u(e){const t=M.useRef(e);t.current=e,M.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function TC(e){const t=Er(),{control:n=t.control,disabled:r,name:o,exact:a}=e,[i,s]=M.useState(n._formState),c=M.useRef(!0),u=M.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=M.useRef(o);return f.current=o,_u({disabled:r,next:m=>c.current&&Ru(f.current,m.name,a)&&DC(m,u.current,n._updateFormState)&&s({...n._formState,...m}),subject:n._subjects.state}),M.useEffect(()=>(c.current=!0,u.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),M.useMemo(()=>EC(i,n,u.current,!1),[i,n])}var OC=e=>typeof e=="string",AC=(e,t,n,r,o)=>OC(e)?_e(n,e,o):Array.isArray(e)?e.map(a=>_e(n,a)):n;function RC(e){const t=Er(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:i}=e,s=M.useRef(r);s.current=r,_u({disabled:a,subject:n._subjects.values,next:f=>{Ru(s.current,f.name,i)&&u(Uo(AC(s.current,n._names,f.values||n._formValues,!1,o)))}});const[c,u]=M.useState(n._getWatch(r,o));return M.useEffect(()=>n._removeUnmounted()),c}function _C(e){const t=Er(),{name:n,disabled:r,control:o=t.control,shouldUnregister:a}=e,i=wC(o._names.array,n),s=RC({control:o,name:n,defaultValue:_e(o._formValues,n,_e(o._defaultValues,n,e.defaultValue)),exact:!0}),c=TC({control:o,name:n,exact:!0}),u=M.useRef(o.register(n,{...e.rules,value:s,...Du(e.disabled)?{disabled:e.disabled}:{}})),f=M.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!_e(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!_e(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!_e(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!_e(c.validatingFields,n)},error:{enumerable:!0,get:()=>_e(c.errors,n)}}),[c,n]),m=M.useMemo(()=>({name:n,value:s,...Du(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:h=>u.current.onChange({target:{value:yC(h),name:n},type:Tu.CHANGE}),onBlur:()=>u.current.onBlur({target:{value:_e(o._formValues,n),name:n},type:Tu.BLUR}),ref:h=>{const g=_e(o._fields,n);g&&h&&(g._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:b=>h.setCustomValidity(b),reportValidity:()=>h.reportValidity()})}}),[n,o._formValues,r,c.disabled,s,o._fields]);return M.useEffect(()=>{const h=o._options.shouldUnregister||a,g=(b,p)=>{const v=_e(o._fields,b);v&&v._f&&(v._f.mount=p)};if(g(n,!0),h){const b=Uo(_e(o._options.defaultValues,n));ku(o._defaultValues,n,b),qo(_e(o._formValues,n))&&ku(o._formValues,n,b)}return!i&&o.register(n),()=>{(i?h&&!o._state.action:h)?o.unregister(n):g(n,!1)}},[n,o,i,a]),M.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),M.useMemo(()=>({field:m,formState:c,fieldState:f}),[m,c,f])}const IC=e=>e.render(_C(e));var jC="Label",Iu=l.forwardRef((e,t)=>d.jsx(W.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Iu.displayName=jC;var ju=Iu;const FC=ln("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ko=l.forwardRef(({className:e,...t},n)=>d.jsx(ju,{ref:n,className:k(FC(),e),...t}));Ko.displayName=ju.displayName;const WC=NC,Fu=l.createContext({}),$C=({...e})=>d.jsx(Fu.Provider,{value:{name:e.name},children:d.jsx(IC,{...e})}),An=()=>{const e=l.useContext(Fu),t=l.useContext(Wu),{getFieldState:n,formState:r}=Er(),o=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},Wu=l.createContext({}),$u=l.forwardRef(({className:e,...t},n)=>{const r=l.useId();return d.jsx(Wu.Provider,{value:{id:r},children:d.jsx("div",{ref:n,className:k("space-y-2",e),...t})})});$u.displayName="FormItem";const Lu=l.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:o}=An();return d.jsx(Ko,{ref:n,className:k(r&&"text-destructive",e),htmlFor:o,...t})});Lu.displayName="FormLabel";const Bu=l.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=An();return d.jsx(Ue,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})});Bu.displayName="FormControl";const Vu=l.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=An();return d.jsx("p",{ref:n,id:r,className:k("text-[0.8rem] text-muted-foreground",e),...t})});Vu.displayName="FormDescription";const Yu=l.forwardRef(({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=An(),i=o?String(o==null?void 0:o.message):t;return i?d.jsx("p",{ref:r,id:a,className:k("text-[0.8rem] font-medium text-destructive",e),...n,children:i}):null});Yu.displayName="FormMessage";const Xo=({className:e,...t})=>d.jsx("nav",{role:"navigation","aria-label":"pagination",className:k("mx-auto flex w-full justify-center",e),...t});Xo.displayName="Pagination";const Qo=l.forwardRef(({className:e,...t},n)=>d.jsx("ul",{ref:n,className:k("flex flex-row items-center gap-1",e),...t}));Qo.displayName="PaginationContent";const Rn=l.forwardRef(({className:e,...t},n)=>d.jsx("li",{ref:n,className:k("",e),...t}));Rn.displayName="PaginationItem";const _n=({className:e,isActive:t,size:n="icon",...r})=>d.jsx(Ke,{"aria-current":t?"page":void 0,className:k(mn({variant:t?"default":"outline",size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});_n.displayName="PaginationLink";const Zo=({className:e,...t})=>d.jsx(_n,{"aria-label":"Previous page",size:"default",className:k("gap-1",e),...t,children:d.jsx(li,{className:"h-4 w-4"})});Zo.displayName="PaginationPrevious";const Jo=({className:e,...t})=>d.jsx(_n,{"aria-label":"Next page",size:"default",className:k("gap-1",e),...t,children:d.jsx(co,{className:"h-4 w-4"})});Jo.displayName="PaginationNext";const Gu=({className:e,...t})=>d.jsxs("span",{"aria-hidden":!0,className:k("flex h-9 w-9 items-center justify-center",e),...t,children:[d.jsx($p,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"More pages"})]});Gu.displayName="PaginationEllipsis";var ea="Progress",ta=100,[LC,WM]=ye(ea),[BC,VC]=LC(ea),Hu=l.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=YC,...i}=e;(o||o===0)&&!Ku(o)&&console.error(GC(`${o}`,"Progress"));const s=Ku(o)?o:ta;r!==null&&!Xu(r,s)&&console.error(HC(`${r}`,"Progress"));const c=Xu(r,s)?r:null,u=Pr(c)?a(c,s):void 0;return d.jsx(BC,{scope:n,value:c,max:s,children:d.jsx(W.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Pr(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":qu(c,s),"data-value":c??void 0,"data-max":s,...i,ref:t})})});Hu.displayName=ea;var zu="ProgressIndicator",Uu=l.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=VC(zu,n);return d.jsx(W.div,{"data-state":qu(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Uu.displayName=zu;function YC(e,t){return`${Math.round(e/t*100)}%`}function qu(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Pr(e){return typeof e=="number"}function Ku(e){return Pr(e)&&!isNaN(e)&&e>0}function Xu(e,t){return Pr(e)&&!isNaN(e)&&e<=t&&e>=0}function GC(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ta}\`.`}function HC(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
191
|
+
*/const qg=_e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Xg=["top","right","bottom","left"],Pt=Math.min,Ge=Math.max,gr=Math.round,vr=Math.floor,ut=e=>({x:e,y:e}),Qg={left:"right",right:"left",bottom:"top",top:"bottom"},Zg={start:"end",end:"start"};function Po(e,t,n){return Ge(e,Pt(t,n))}function yt(e,t){return typeof e=="function"?e(t):e}function bt(e){return e.split("-")[0]}function en(e){return e.split("-")[1]}function ko(e){return e==="x"?"y":"x"}function To(e){return e==="y"?"height":"width"}function kt(e){return["top","bottom"].includes(bt(e))?"y":"x"}function Do(e){return ko(kt(e))}function Jg(e,t,n){n===void 0&&(n=!1);const r=en(e),o=Do(e),a=To(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=yr(s)),[s,yr(s)]}function ev(e){const t=yr(e);return[Oo(e),t,Oo(t)]}function Oo(e){return e.replace(/start|end/g,t=>Zg[t])}function tv(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:s;default:return[]}}function nv(e,t,n,r){const o=en(e);let a=tv(bt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(Oo)))),a}function yr(e){return e.replace(/left|right|bottom|top/g,t=>Qg[t])}function rv(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ii(e){return typeof e!="number"?rv(e):{top:e,right:e,bottom:e,left:e}}function br(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ji(e,t,n){let{reference:r,floating:o}=e;const a=kt(t),s=Do(t),i=To(s),c=bt(t),d=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:m};break;case"left":h={x:r.x-o.width,y:m};break;default:h={x:r.x,y:r.y}}switch(en(t)){case"start":h[s]-=p*(n&&d?-1:1);break;case"end":h[s]+=p*(n&&d?-1:1);break}return h}const ov=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=ji(d,r,c),p=r,h={},v=0;for(let g=0;g<i.length;g++){const{name:y,fn:w}=i[g],{x:b,y:C,data:M,reset:S}=await w({x:f,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:d,platform:s,elements:{reference:e,floating:t}});f=b??f,m=C??m,h={...h,[y]:{...h[y],...M}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(d=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:f,y:m}=ji(d,p,c)),g=-1)}return{x:f,y:m,placement:p,strategy:o,middlewareData:h}};async function En(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:p=!1,padding:h=0}=yt(t,e),v=Ii(h),y=i[p?m==="floating"?"reference":"floating":m],w=br(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:c})),b=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),M=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},S=br(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:C,strategy:c}):b);return{top:(w.top-S.top+v.top)/M.y,bottom:(S.bottom-w.bottom+v.bottom)/M.y,left:(w.left-S.left+v.left)/M.x,right:(S.right-w.right+v.right)/M.x}}const av=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:d,padding:f=0}=yt(e,t)||{};if(d==null)return{};const m=Ii(f),p={x:n,y:r},h=Do(o),v=To(h),g=await s.getDimensions(d),y=h==="y",w=y?"top":"left",b=y?"bottom":"right",C=y?"clientHeight":"clientWidth",M=a.reference[v]+a.reference[h]-p[h]-a.floating[v],S=p[h]-a.reference[h],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let P=k?k[C]:0;(!P||!await(s.isElement==null?void 0:s.isElement(k)))&&(P=i.floating[C]||a.floating[v]);const D=M/2-S/2,R=P/2-g[v]/2-1,$=Pt(m[w],R),V=Pt(m[b],R),_=$,z=P-g[v]-V,G=P/2-g[v]/2+D,ee=Po(_,G,z),W=!c.arrow&&en(o)!=null&&G!==ee&&a.reference[v]/2-(G<_?$:V)-g[v]/2<0,Y=W?G<_?G-_:G-z:0;return{[h]:p[h]+Y,data:{[h]:ee,centerOffset:G-ee-Y,...W&&{alignmentOffset:Y}},reset:W}}}),sv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:d}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...y}=yt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=bt(o),b=kt(i),C=bt(i)===i,M=await(c.isRTL==null?void 0:c.isRTL(d.floating)),S=p||(C||!g?[yr(i)]:ev(i)),k=v!=="none";!p&&k&&S.push(...nv(i,g,v,M));const P=[i,...S],D=await En(t,y),R=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&R.push(D[w]),m){const G=Jg(o,s,M);R.push(D[G[0]],D[G[1]])}if($=[...$,{placement:o,overflows:R}],!R.every(G=>G<=0)){var V,_;const G=(((V=a.flip)==null?void 0:V.index)||0)+1,ee=P[G];if(ee)return{data:{index:G,overflows:$},reset:{placement:ee}};let W=(_=$.filter(Y=>Y.overflows[0]<=0).sort((Y,L)=>Y.overflows[1]-L.overflows[1])[0])==null?void 0:_.placement;if(!W)switch(h){case"bestFit":{var z;const Y=(z=$.filter(L=>{if(k){const T=kt(L.placement);return T===b||T==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(T=>T>0).reduce((T,H)=>T+H,0)]).sort((L,T)=>L[1]-T[1])[0])==null?void 0:z[0];Y&&(W=Y);break}case"initialPlacement":W=i;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Fi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $i(e){return Xg.some(t=>e[t]>=0)}const iv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=yt(e,t);switch(r){case"referenceHidden":{const a=await En(t,{...o,elementContext:"reference"}),s=Fi(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$i(s)}}}case"escaped":{const a=await En(t,{...o,altBoundary:!0}),s=Fi(a,n.floating);return{data:{escapedOffsets:s,escaped:$i(s)}}}default:return{}}}}};async function cv(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=bt(n),i=en(n),c=kt(n)==="y",d=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,m=yt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return i&&typeof v=="number"&&(h=i==="end"?v*-1:v),c?{x:h*f,y:p*d}:{x:p*d,y:h*f}}const lv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await cv(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},uv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:y=>{let{x:w,y:b}=y;return{x:w,y:b}}},...c}=yt(e,t),d={x:n,y:r},f=await En(t,c),m=kt(bt(o)),p=ko(m);let h=d[p],v=d[m];if(a){const y=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=h+f[y],C=h-f[w];h=Po(b,h,C)}if(s){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=v+f[y],C=v-f[w];v=Po(b,v,C)}const g=i.fn({...t,[p]:h,[m]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[m]:s}}}}}},dv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:d=!0}=yt(e,t),f={x:n,y:r},m=kt(o),p=ko(m);let h=f[p],v=f[m];const g=yt(i,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const C=p==="y"?"height":"width",M=a.reference[p]-a.floating[C]+y.mainAxis,S=a.reference[p]+a.reference[C]-y.mainAxis;h<M?h=M:h>S&&(h=S)}if(d){var w,b;const C=p==="y"?"width":"height",M=["top","left"].includes(bt(o)),S=a.reference[m]-a.floating[C]+(M&&((w=s.offset)==null?void 0:w[m])||0)+(M?0:y.crossAxis),k=a.reference[m]+a.reference[C]+(M?0:((b=s.offset)==null?void 0:b[m])||0)-(M?y.crossAxis:0);v<S?v=S:v>k&&(v=k)}return{[p]:h,[m]:v}}}},fv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...d}=yt(e,t),f=await En(t,d),m=bt(o),p=en(o),h=kt(o)==="y",{width:v,height:g}=a.floating;let y,w;m==="top"||m==="bottom"?(y=m,w=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=m,y=p==="end"?"top":"bottom");const b=g-f.top-f.bottom,C=v-f.left-f.right,M=Pt(g-f[y],b),S=Pt(v-f[w],C),k=!t.middlewareData.shift;let P=M,D=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=b),k&&!p){const $=Ge(f.left,0),V=Ge(f.right,0),_=Ge(f.top,0),z=Ge(f.bottom,0);h?D=v-2*($!==0||V!==0?$+V:Ge(f.left,f.right)):P=g-2*(_!==0||z!==0?_+z:Ge(f.top,f.bottom))}await c({...t,availableWidth:D,availableHeight:P});const R=await s.getDimensions(i.floating);return v!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function wr(){return typeof window<"u"}function tn(e){return Wi(e)?(e.nodeName||"").toLowerCase():"#document"}function ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dt(e){var t;return(t=(Wi(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wi(e){return wr()?e instanceof Node||e instanceof ze(e).Node:!1}function et(e){return wr()?e instanceof Element||e instanceof ze(e).Element:!1}function ft(e){return wr()?e instanceof HTMLElement||e instanceof ze(e).HTMLElement:!1}function Li(e){return!wr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ze(e).ShadowRoot}function Pn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=tt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function mv(e){return["table","td","th"].includes(tn(e))}function xr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ao(e){const t=_o(),n=et(e)?tt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function hv(e){let t=Tt(e);for(;ft(t)&&!nn(t);){if(Ao(t))return t;if(xr(t))return null;t=Tt(t)}return null}function _o(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nn(e){return["html","body","#document"].includes(tn(e))}function tt(e){return ze(e).getComputedStyle(e)}function Cr(e){return et(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tt(e){if(tn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Li(e)&&e.host||dt(e);return Li(t)?t.host:t}function Bi(e){const t=Tt(e);return nn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ft(t)&&Pn(t)?t:Bi(t)}function kn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bi(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=ze(o);if(a){const i=Ro(s);return t.concat(s,s.visualViewport||[],Pn(o)?o:[],i&&n?kn(i):[])}return t.concat(o,kn(o,[],n))}function Ro(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vi(e){const t=tt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ft(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=gr(n)!==a||gr(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Io(e){return et(e)?e:e.contextElement}function rn(e){const t=Io(e);if(!ft(t))return ut(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Vi(t);let s=(a?gr(n.width):n.width)/r,i=(a?gr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const pv=ut(0);function Yi(e){const t=ze(e);return!_o()||!t.visualViewport?pv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ze(e)?!1:t}function Lt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Io(e);let s=ut(1);t&&(r?et(r)&&(s=rn(r)):s=rn(e));const i=gv(a,n,r)?Yi(a):ut(0);let c=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,m=o.height/s.y;if(a){const p=ze(a),h=r&&et(r)?ze(r):r;let v=p,g=Ro(v);for(;g&&r&&h!==v;){const y=rn(g),w=g.getBoundingClientRect(),b=tt(g),C=w.left+(g.clientLeft+parseFloat(b.paddingLeft))*y.x,M=w.top+(g.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,d*=y.y,f*=y.x,m*=y.y,c+=C,d+=M,v=ze(g),g=Ro(v)}}return br({width:f,height:m,x:c,y:d})}function jo(e,t){const n=Cr(e).scrollLeft;return t?t.left+n:Lt(dt(e)).left+n}function Gi(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:jo(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function vv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=dt(r),i=t?xr(t.floating):!1;if(r===s||i&&a)return n;let c={scrollLeft:0,scrollTop:0},d=ut(1);const f=ut(0),m=ft(r);if((m||!m&&!a)&&((tn(r)!=="body"||Pn(s))&&(c=Cr(r)),ft(r))){const h=Lt(r);d=rn(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=s&&!m&&!a?Gi(s,c,!0):ut(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-c.scrollTop*d.y+f.y+p.y}}function yv(e){return Array.from(e.getClientRects())}function bv(e){const t=dt(e),n=Cr(e),r=e.ownerDocument.body,o=Ge(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ge(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+jo(e);const i=-n.scrollTop;return tt(r).direction==="rtl"&&(s+=Ge(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function wv(e,t){const n=ze(e),r=dt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const d=_o();(!d||d&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}return{width:a,height:s,x:i,y:c}}function xv(e,t){const n=Lt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ft(e)?rn(e):ut(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,d=r*a.y;return{width:s,height:i,x:c,y:d}}function zi(e,t,n){let r;if(t==="viewport")r=wv(e,n);else if(t==="document")r=bv(dt(e));else if(et(t))r=xv(t,n);else{const o=Yi(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return br(r)}function Hi(e,t){const n=Tt(e);return n===t||!et(n)||nn(n)?!1:tt(n).position==="fixed"||Hi(n,t)}function Cv(e,t){const n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(i=>et(i)&&tn(i)!=="body"),o=null;const a=tt(e).position==="fixed";let s=a?Tt(e):e;for(;et(s)&&!nn(s);){const i=tt(s),c=Ao(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Pn(s)&&!c&&Hi(e,s))?r=r.filter(f=>f!==s):o=i,s=Tt(s)}return t.set(e,r),r}function Nv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?xr(t)?[]:Cv(t,this._c):[].concat(n),r],i=s[0],c=s.reduce((d,f)=>{const m=zi(t,f,o);return d.top=Ge(m.top,d.top),d.right=Pt(m.right,d.right),d.bottom=Pt(m.bottom,d.bottom),d.left=Ge(m.left,d.left),d},zi(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Mv(e){const{width:t,height:n}=Vi(e);return{width:t,height:n}}function Sv(e,t,n){const r=ft(t),o=dt(t),a=n==="fixed",s=Lt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=ut(0);if(r||!r&&!a)if((tn(t)!=="body"||Pn(o))&&(i=Cr(t)),r){const p=Lt(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=jo(o));const d=o&&!r&&!a?Gi(o,i):ut(0),f=s.left+i.scrollLeft-c.x-d.x,m=s.top+i.scrollTop-c.y-d.y;return{x:f,y:m,width:s.width,height:s.height}}function Fo(e){return tt(e).position==="static"}function Ui(e,t){if(!ft(e)||tt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dt(e)===n&&(n=n.ownerDocument.body),n}function Ki(e,t){const n=ze(e);if(xr(e))return n;if(!ft(e)){let o=Tt(e);for(;o&&!nn(o);){if(et(o)&&!Fo(o))return o;o=Tt(o)}return n}let r=Ui(e,t);for(;r&&mv(r)&&Fo(r);)r=Ui(r,t);return r&&nn(r)&&Fo(r)&&!Ao(r)?n:r||hv(e)||n}const Ev=async function(e){const t=this.getOffsetParent||Ki,n=this.getDimensions,r=await n(e.floating);return{reference:Sv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pv(e){return tt(e).direction==="rtl"}const kv={convertOffsetParentRelativeRectToViewportRelativeRect:vv,getDocumentElement:dt,getClippingRect:Nv,getOffsetParent:Ki,getElementRects:Ev,getClientRects:yv,getDimensions:Mv,getScale:rn,isElement:et,isRTL:Pv};function Tv(e,t){let n=null,r;const o=dt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const{left:d,top:f,width:m,height:p}=e.getBoundingClientRect();if(i||t(),!m||!p)return;const h=vr(f),v=vr(o.clientWidth-(d+m)),g=vr(o.clientHeight-(f+p)),y=vr(d),b={rootMargin:-h+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ge(0,Pt(1,c))||1};let C=!0;function M(S){const k=S[0].intersectionRatio;if(k!==c){if(!C)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(M,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(M,b)}n.observe(e)}return s(!0),a}function Dv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Io(e),f=o||a?[...d?kn(d):[],...kn(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=d&&i?Tv(d,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(w=>{let[b]=w;b&&b.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),d&&!c&&h.observe(d),h.observe(t));let v,g=c?Lt(e):null;c&&y();function y(){const w=Lt(e);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&n(),g=w,v=requestAnimationFrame(y)}return n(),()=>{var w;f.forEach(b=>{o&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),m==null||m(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(v)}}const Ov=lv,Av=uv,_v=sv,Rv=fv,Iv=iv,qi=av,jv=dv,Fv=(e,t,n)=>{const r=new Map,o={platform:kv,...n},a={...o.platform,_c:r};return ov(e,t,{...o,platform:a})};var Nr=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Mr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Mr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Mr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Xi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qi(e,t){const n=Xi(e);return Math.round(t*n)/n}function $o(e){const t=l.useRef(e);return Nr(()=>{t.current=e}),t}function $v(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:d}=e,[f,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);Mr(p,r)||h(r);const[v,g]=l.useState(null),[y,w]=l.useState(null),b=l.useCallback(L=>{L!==k.current&&(k.current=L,g(L))},[]),C=l.useCallback(L=>{L!==P.current&&(P.current=L,w(L))},[]),M=a||v,S=s||y,k=l.useRef(null),P=l.useRef(null),D=l.useRef(f),R=c!=null,$=$o(c),V=$o(o),_=$o(d),z=l.useCallback(()=>{if(!k.current||!P.current)return;const L={placement:t,strategy:n,middleware:p};V.current&&(L.platform=V.current),Fv(k.current,P.current,L).then(T=>{const H={...T,isPositioned:_.current!==!1};G.current&&!Mr(D.current,H)&&(D.current=H,Jn.flushSync(()=>{m(H)}))})},[p,t,n,V,_]);Nr(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,m(L=>({...L,isPositioned:!1})))},[d]);const G=l.useRef(!1);Nr(()=>(G.current=!0,()=>{G.current=!1}),[]),Nr(()=>{if(M&&(k.current=M),S&&(P.current=S),M&&S){if($.current)return $.current(M,S,z);z()}},[M,S,z,$,R]);const ee=l.useMemo(()=>({reference:k,floating:P,setReference:b,setFloating:C}),[b,C]),W=l.useMemo(()=>({reference:M,floating:S}),[M,S]),Y=l.useMemo(()=>{const L={position:n,left:0,top:0};if(!W.floating)return L;const T=Qi(W.floating,f.x),H=Qi(W.floating,f.y);return i?{...L,transform:"translate("+T+"px, "+H+"px)",...Xi(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:H}},[n,i,W.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:z,refs:ee,elements:W,floatingStyles:Y}),[f,z,ee,W,Y])}const Wv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qi({element:r.current,padding:o}).fn(n):{}:r?qi({element:r,padding:o}).fn(n):{}}}},Lv=(e,t)=>({...Ov(e),options:[e,t]}),Bv=(e,t)=>({...Av(e),options:[e,t]}),Vv=(e,t)=>({...jv(e),options:[e,t]}),Yv=(e,t)=>({..._v(e),options:[e,t]}),Gv=(e,t)=>({...Rv(e),options:[e,t]}),zv=(e,t)=>({...Iv(e),options:[e,t]}),Hv=(e,t)=>({...Wv(e),options:[e,t]});var Uv="Arrow",Zi=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return u.jsx(F.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Zi.displayName=Uv;var Kv=Zi;function Sr(e){const[t,n]=l.useState(void 0);return Ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;s=d.inlineSize,i=d.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Wo="Popper",[Ji,Dt]=Te(Wo),[qv,ec]=Ji(Wo),tc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return u.jsx(qv,{scope:t,anchor:r,onAnchorChange:o,children:n})};tc.displayName=Wo;var nc="PopperAnchor",rc=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=ec(nc,n),s=l.useRef(null),i=ne(t,s);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:u.jsx(F.div,{...o,ref:i})});rc.displayName=nc;var Lo="PopperContent",[Xv,Qv]=Ji(Lo),oc=l.forwardRef((e,t)=>{var I,ie,ce,oe,se,le;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:v,...g}=e,y=ec(Lo,n),[w,b]=l.useState(null),C=ne(t,Me=>b(Me)),[M,S]=l.useState(null),k=Sr(M),P=(k==null?void 0:k.width)??0,D=(k==null?void 0:k.height)??0,R=r+(a!=="center"?"-"+a:""),$=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},V=Array.isArray(d)?d:[d],_=V.length>0,z={padding:$,boundary:V.filter(Jv),altBoundary:_},{refs:G,floatingStyles:ee,placement:W,isPositioned:Y,middlewareData:L}=$v({strategy:"fixed",placement:R,whileElementsMounted:(...Me)=>Dv(...Me,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[Lv({mainAxis:o+D,alignmentAxis:s}),c&&Bv({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Vv():void 0,...z}),c&&Yv({...z}),Gv({...z,apply:({elements:Me,rects:Re,availableWidth:$e,availableHeight:ot})=>{const{width:Be,height:at}=Re.reference,Xe=Me.floating.style;Xe.setProperty("--radix-popper-available-width",`${$e}px`),Xe.setProperty("--radix-popper-available-height",`${ot}px`),Xe.setProperty("--radix-popper-anchor-width",`${Be}px`),Xe.setProperty("--radix-popper-anchor-height",`${at}px`)}}),M&&Hv({element:M,padding:i}),ey({arrowWidth:P,arrowHeight:D}),p&&zv({strategy:"referenceHidden",...z})]}),[T,H]=ic(W),q=Ne(v);Ee(()=>{Y&&(q==null||q())},[Y,q]);const X=(I=L.arrow)==null?void 0:I.x,K=(ie=L.arrow)==null?void 0:ie.y,Z=((ce=L.arrow)==null?void 0:ce.centerOffset)!==0,[me,ge]=l.useState();return Ee(()=>{w&&ge(window.getComputedStyle(w).zIndex)},[w]),u.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:Y?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(oe=L.transformOrigin)==null?void 0:oe.x,(se=L.transformOrigin)==null?void 0:se.y].join(" "),...((le=L.hide)==null?void 0:le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Xv,{scope:n,placedSide:T,onArrowChange:S,arrowX:X,arrowY:K,shouldHideArrow:Z,children:u.jsx(F.div,{"data-side":T,"data-align":H,...g,ref:C,style:{...g.style,animation:Y?void 0:"none"}})})})});oc.displayName=Lo;var ac="PopperArrow",Zv={top:"bottom",right:"left",bottom:"top",left:"right"},sc=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Qv(ac,r),s=Zv[a.placedSide];return u.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:u.jsx(Kv,{...o,ref:n,style:{...o.style,display:"block"}})})});sc.displayName=ac;function Jv(e){return e!==null}var ey=e=>({name:"transformOrigin",options:e,fn(t){var y,w,b;const{placement:n,rects:r,middlewareData:o}=t,s=((y=o.arrow)==null?void 0:y.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[d,f]=ic(n),m={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,h=(((b=o.arrow)==null?void 0:b.y)??0)+c/2;let v="",g="";return d==="bottom"?(v=s?m:`${p}px`,g=`${-c}px`):d==="top"?(v=s?m:`${p}px`,g=`${r.floating.height+c}px`):d==="right"?(v=`${-c}px`,g=s?m:`${h}px`):d==="left"&&(v=`${r.floating.width+c}px`,g=s?m:`${h}px`),{data:{x:v,y:g}}}});function ic(e){const[t,n="center"]=e.split("-");return[t,n]}var Tn=tc,Dn=rc,Er=oc,Pr=sc,Bo="Popover",[cc,NS]=Te(Bo,[Dt]),On=Dt(),[ty,Ot]=cc(Bo),lc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=On(t),c=l.useRef(null),[d,f]=l.useState(!1),[m=!1,p]=Ie({prop:r,defaultProp:o,onChange:a});return u.jsx(Tn,{...i,children:u.jsx(ty,{scope:t,contentId:je(),triggerRef:c,open:m,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:d,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:s,children:n})})};lc.displayName=Bo;var uc="PopoverAnchor",dc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ot(uc,n),a=On(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return l.useEffect(()=>(s(),()=>i()),[s,i]),u.jsx(Dn,{...a,...r,ref:t})});dc.displayName=uc;var fc="PopoverTrigger",mc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ot(fc,n),a=On(n),s=ne(t,o.triggerRef),i=u.jsx(F.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yc(o.open),...r,ref:s,onClick:A(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:u.jsx(Dn,{asChild:!0,...a,children:i})});mc.displayName=fc;var Vo="PopoverPortal",[ny,ry]=cc(Vo,{forceMount:void 0}),hc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Ot(Vo,t);return u.jsx(ny,{scope:t,forceMount:n,children:u.jsx(De,{present:n||a.open,children:u.jsx(Nn,{asChild:!0,container:o,children:r})})})};hc.displayName=Vo;var on="PopoverContent",pc=l.forwardRef((e,t)=>{const n=ry(on,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Ot(on,e.__scopePopover);return u.jsx(De,{present:r||a.open,children:a.modal?u.jsx(oy,{...o,ref:t}):u.jsx(ay,{...o,ref:t})})});pc.displayName=on;var oy=l.forwardRef((e,t)=>{const n=Ot(on,e.__scopePopover),r=l.useRef(null),o=ne(t,r),a=l.useRef(!1);return l.useEffect(()=>{const s=r.current;if(s)return mr(s)},[]),u.jsx(Mn,{as:it,allowPinchZoom:!0,children:u.jsx(gc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,d=i.button===2||c;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:A(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),ay=l.forwardRef((e,t)=>{const n=Ot(on,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return u.jsx(gc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),gc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,...m}=e,p=Ot(on,n),h=On(n);return ar(),u.jsx(Cn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:u.jsx($t,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:u.jsx(Er,{"data-state":yc(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.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)"}})})})}),vc="PopoverClose",sy=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ot(vc,n);return u.jsx(F.button,{type:"button",...r,ref:t,onClick:A(e.onClick,()=>o.onOpenChange(!1))})});sy.displayName=vc;var iy="PopoverArrow",cy=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=On(n);return u.jsx(Pr,{...o,...r,ref:t})});cy.displayName=iy;function yc(e){return e?"open":"closed"}var ly=lc,uy=dc,dy=mc,fy=hc,bc=pc;const wc=ly,xc=dy,my=uy,Yo=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>u.jsx(fy,{children:u.jsx(bc,{ref:o,align:t,sideOffset:n,className:O("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",e),...r})}));Yo.displayName=bc.displayName;function hy(e){const{value:t="",onChange:n,options:r,className:o,placeholder:a="Search...",emptyMessage:s="Nothing found"}=e,[i,c]=x.useState(t),[d,f]=x.useState(r),[m,p]=x.useState(-1),[h,v]=x.useState(!1),g=M=>{const S=M.target.value;c(S),n==null||n(S),p(-1),v(!0),S.trim()===""?f(r):f(r.filter(k=>k.label.toLowerCase().includes(S.toLowerCase())))},y=M=>{if(M.key==="ArrowDown")M.preventDefault(),p(S=>S<d.length-1?S+1:S);else if(M.key==="ArrowUp")M.preventDefault(),p(S=>S>0?S-1:-1);else if(M.key==="Enter"&&m>=0){const S=d[m];c(S.label),n==null||n(S.value),f([]),p(-1),v(!1)}else M.key==="Escape"&&(f([]),p(-1))},w=M=>{v(!1),c(M.label),n==null||n(M.value),f(r),p(-1)},b=()=>{v(!0)},C=()=>{v(!1)};return u.jsxs(wc,{open:h,children:[u.jsx(xc,{asChild:!0,children:u.jsx("div",{className:"relative w-full",children:u.jsx(nr,{type:"text",placeholder:a,value:i,onChange:g,onKeyDown:y,onClick:b,onFocus:b,onBlur:C,className:O("pr-10",o),"aria-label":"Search field","aria-autocomplete":"list","aria-controls":"suggestions-list","aria-expanded":d.length>0,leftIcon:u.jsx(Kg,{className:"w-4 h-4"})})})}),u.jsx(Yo,{className:"p-0 w-[var(--radix-popover-trigger-width)] max-h-96 overflow-y-auto",children:d.length>0?u.jsx("ul",{id:"suggestions-list",role:"listbox",children:d.map((M,S)=>u.jsx("li",{className:`px-4 py-2 cursor-pointer hover:bg-muted ${S===m?"bg-muted":""}`,onClick:()=>w(M),role:"option","aria-selected":S===m,children:M.label},M.value))}):u.jsx("span",{className:"px-4 py-2 block",children:s})})]})}var Go="Avatar",[py,MS]=Te(Go),[gy,Cc]=py(Go),Nc=l.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=l.useState("idle");return u.jsx(gy,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:u.jsx(F.span,{...r,ref:t})})});Nc.displayName=Go;var Mc="AvatarImage",Sc=l.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=Cc(Mc,n),i=vy(r,a.referrerPolicy),c=Ne(d=>{o(d),s.onImageLoadingStatusChange(d)});return Ee(()=>{i!=="idle"&&c(i)},[i,c]),i==="loaded"?u.jsx(F.img,{...a,ref:t,src:r}):null});Sc.displayName=Mc;var Ec="AvatarFallback",Pc=l.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Cc(Ec,n),[s,i]=l.useState(r===void 0);return l.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&a.imageLoadingStatus!=="loaded"?u.jsx(F.span,{...o,ref:t}):null});Pc.displayName=Ec;function vy(e,t){const[n,r]=l.useState("idle");return Ee(()=>{if(!e){r("error");return}let o=!0;const a=new window.Image,s=i=>()=>{o&&r(i)};return r("loading"),a.onload=s("loaded"),a.onerror=s("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{o=!1}},[e,t]),n}var kc=Nc,Tc=Sc,Dc=Pc;const Oc=l.forwardRef(({className:e,...t},n)=>u.jsx(kc,{ref:n,className:O("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Oc.displayName=kc.displayName;const Ac=l.forwardRef(({className:e,...t},n)=>u.jsx(Tc,{ref:n,className:O("aspect-square h-full w-full",e),...t}));Ac.displayName=Tc.displayName;const _c=l.forwardRef(({className:e,...t},n)=>u.jsx(Dc,{ref:n,className:O("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));_c.displayName=Dc.displayName;const Rc=Kt("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function yy({className:e,variant:t,...n}){return u.jsx("div",{className:O(Rc({variant:t}),e),...n})}function an(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function mt(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}function ht(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?wy(i,m=>m.test(s)):by(i,m=>m.test(s));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(s.length);return{value:d,rest:f}}}function by(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function wy(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ic(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const jc=6048e5,xy=864e5,Fc=Symbol.for("constructDateFrom");function Oe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Fc in e?e[Fc](t):e instanceof Date?new e.constructor(t):new Date(t)}function sn(e,...t){const n=Oe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let Cy={};function An(){return Cy}function ve(e,t){return Oe(t||e,e)}function cn(e,t){var i,c,d,f;const n=An(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,o=ve(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}const Ny={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},My=(e,t,n)=>{let r;const o=Ny[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},Sy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ey=(e,t,n,r)=>Sy[e],Py={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ky={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ty={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Dy={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Oy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ay={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},_y={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:mt({values:Py,defaultWidth:"wide"}),quarter:mt({values:ky,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mt({values:Ty,defaultWidth:"wide"}),day:mt({values:Dy,defaultWidth:"wide"}),dayPeriod:mt({values:Oy,defaultWidth:"wide",formattingValues:Ay,defaultFormattingWidth:"wide"})},Ry=/^(\d+)(th|st|nd|rd)?/i,Iy=/\d+/i,jy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Fy={any:[/^b/i,/^(a|c)/i]},$y={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Wy={any:[/1/i,/2/i,/3/i,/4/i]},Ly={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},By={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vy={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Gy={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zy={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Hy={ordinalNumber:Ic({matchPattern:Ry,parsePattern:Iy,valueCallback:e=>parseInt(e,10)}),era:ht({matchPatterns:jy,defaultMatchWidth:"wide",parsePatterns:Fy,defaultParseWidth:"any"}),quarter:ht({matchPatterns:$y,defaultMatchWidth:"wide",parsePatterns:Wy,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ht({matchPatterns:Ly,defaultMatchWidth:"wide",parsePatterns:By,defaultParseWidth:"any"}),day:ht({matchPatterns:Vy,defaultMatchWidth:"wide",parsePatterns:Yy,defaultParseWidth:"any"}),dayPeriod:ht({matchPatterns:Gy,defaultMatchWidth:"any",parsePatterns:zy,defaultParseWidth:"any"})},Uy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ky={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xy={date:an({formats:Uy,defaultWidth:"full"}),time:an({formats:Ky,defaultWidth:"full"}),dateTime:an({formats:qy,defaultWidth:"full"})},kr={code:"en-US",formatDistance:My,formatLong:Xy,formatRelative:Ey,localize:_y,match:Hy,options:{weekStartsOn:0,firstWeekContainsDate:1}},Qy={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},Zy=(e,t,n)=>{let r;const o=Qy[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"em "+r:"há "+r:r},Jy={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},eb={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},tb={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nb={date:an({formats:Jy,defaultWidth:"full"}),time:an({formats:eb,defaultWidth:"full"}),dateTime:an({formats:tb,defaultWidth:"full"})},rb={lastWeek:e=>{const t=e.getDay();return"'"+(t===0||t===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},ob=(e,t,n,r)=>{const o=rb[e];return typeof o=="function"?o(t):o},ab={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},sb={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ib={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},cb={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},lb={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},ub={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},db={ordinalNumber:(e,t)=>{const n=Number(e);return(t==null?void 0:t.unit)==="week"?n+"ª":n+"º"},era:mt({values:ab,defaultWidth:"wide"}),quarter:mt({values:sb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mt({values:ib,defaultWidth:"wide"}),day:mt({values:cb,defaultWidth:"wide"}),dayPeriod:mt({values:lb,defaultWidth:"wide",formattingValues:ub,defaultFormattingWidth:"wide"})},fb=/^(\d+)[ºªo]?/i,mb=/\d+/i,hb={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},pb={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},gb={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},vb={any:[/1/i,/2/i,/3/i,/4/i]},yb={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},bb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},wb={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},xb={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},Cb={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},Nb={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},Mb={ordinalNumber:Ic({matchPattern:fb,parsePattern:mb,valueCallback:e=>parseInt(e,10)}),era:ht({matchPatterns:hb,defaultMatchWidth:"wide",parsePatterns:pb,defaultParseWidth:"any"}),quarter:ht({matchPatterns:gb,defaultMatchWidth:"wide",parsePatterns:vb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ht({matchPatterns:yb,defaultMatchWidth:"wide",parsePatterns:bb,defaultParseWidth:"any"}),day:ht({matchPatterns:wb,defaultMatchWidth:"wide",parsePatterns:xb,defaultParseWidth:"any"}),dayPeriod:ht({matchPatterns:Cb,defaultMatchWidth:"any",parsePatterns:Nb,defaultParseWidth:"any"})},Sb={code:"pt-BR",formatDistance:Zy,formatLong:nb,formatRelative:ob,localize:db,match:Mb,options:{weekStartsOn:0,firstWeekContainsDate:1}};var U;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(U||(U={}));var be;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(be||(be={}));var nt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(nt||(nt={}));const zo={},_n={};function Rn(e,t){try{const r=(zo[e]||(zo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in _n?_n[r]:$c(r,r.split(":"))}catch{if(e in _n)return _n[e];const n=e==null?void 0:e.match(Eb);return n?$c(e,n.slice(1)):NaN}}const Eb=/([+-]\d\d):?(\d\d)?/;function $c(e,t){const n=+t[0],r=+(t[1]||0);return _n[e]=n>0?n*60+r:n*60-r}class pt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Rn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Lc(this),Ho(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new pt(...n,t):new pt(Date.now(),t)}withTimeZone(t){return new pt(+this,t)}getTimezoneOffset(){return-Rn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ho(this),+this}[Symbol.for("constructDateFrom")](t){return new pt(+new Date(t),this.timeZone)}}const Wc=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Wc.test(e))return;const t=e.replace(Wc,"$1UTC");pt.prototype[t]&&(e.startsWith("get")?pt.prototype[e]=function(){return this.internal[t]()}:(pt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Pb(this),+this},pt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ho(this),+this}))});function Ho(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Pb(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Lc(e)}function Lc(e){const t=Rn(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const i=r-t;i&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i);const c=Rn(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-c,m=c!==t,p=f-i;if(m&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Rn(e.timeZone,e),v=c-h;v&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+v),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v))}}class Bt extends pt{static tz(t,...n){return n.length?new Bt(...n,t):new Bt(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${kb(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Bt(+this,t)}[Symbol.for("constructDateFrom")](t){return new Bt(+new Date(t),this.timeZone)}}function kb(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}function Bc(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(t)?Oe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Vc(e,t,n){const r=ve(e,n==null?void 0:n.in);if(isNaN(t))return Oe(e,NaN);if(!t)return r;const o=r.getDate(),a=Oe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function In(e,t){return cn(e,{...t,weekStartsOn:1})}function Yc(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=Oe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=In(o),s=Oe(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=In(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Gc(e){const t=ve(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function jn(e,t){const n=ve(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function zc(e,t,n){const[r,o]=sn(n==null?void 0:n.in,e,t),a=jn(r),s=jn(o),i=+a-Gc(a),c=+s-Gc(s);return Math.round((i-c)/xy)}function Tb(e,t){const n=Yc(e,t),r=Oe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),In(r)}function Db(e,t,n){return Bc(e,t*7,n)}function Ob(e,t,n){return Vc(e,t*12,n)}function Ab(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const a=ve(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Oe(r,n||NaN)}function _b(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const a=ve(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Oe(r,n||NaN)}function Rb(e,t,n){const[r,o]=sn(n==null?void 0:n.in,e,t);return+jn(r)==+jn(o)}function Hc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ib(e){return!(!Hc(e)&&typeof e!="number"||isNaN(+ve(e)))}function jb(e,t,n){const[r,o]=sn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function Fb(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function $b(e,t){const[n,r]=sn(e,t.start,t.end);return{start:n,end:r}}function Wb(e,t){const{start:n,end:r}=$b(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const c=[];for(;+s<=a;)c.push(Oe(n,s)),s.setMonth(s.getMonth()+i);return o?c.reverse():c}function Lb(e,t){const n=ve(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Bb(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Uc(e,t){const n=ve(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Kc(e,t){var i,c,d,f;const n=An(),r=(t==null?void 0:t.weekStartsOn)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,o=ve(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function Vb(e,t){return Kc(e,{...t,weekStartsOn:1})}function Yb(e,t){const n=ve(e,t==null?void 0:t.in);return zc(n,Uc(n))+1}function qc(e,t){const n=ve(e,t==null?void 0:t.in),r=+In(n)-+Tb(n);return Math.round(r/jc)+1}function Xc(e,t){var f,m,p,h;const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=An(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=Oe((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=cn(s,t),c=Oe((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const d=cn(c,t);return+n>=+i?r+1:+n>=+d?r:r-1}function Gb(e,t){var i,c,d,f;const n=An(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=Xc(e,t),a=Oe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),cn(a,t)}function Qc(e,t){const n=ve(e,t==null?void 0:t.in),r=+cn(n,t)-+Gb(n,t);return Math.round(r/jc)+1}function pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const At={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pe(n+1,2)},d(e,t){return pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pe(e.getHours()%12||12,t.length)},H(e,t){return pe(e.getHours(),t.length)},m(e,t){return pe(e.getMinutes(),t.length)},s(e,t){return pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return pe(o,t.length)}},ln={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Zc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return At.y(e,t)},Y:function(e,t,n,r){const o=Xc(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return pe(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):pe(a,t.length)},R:function(e,t){const n=Yc(e);return pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return At.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Qc(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):pe(o,t.length)},I:function(e,t,n){const r=qc(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):At.d(e,t)},D:function(e,t,n){const r=Yb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return pe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return pe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return pe(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=ln.noon:r===0?o=ln.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=ln.evening:r>=12?o=ln.afternoon:r>=4?o=ln.morning:o=ln.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return At.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):At.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):At.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):At.s(e,t)},S:function(e,t){return At.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return el(r);case"XXXX":case"XX":return Vt(r);case"XXXXX":case"XXX":default:return Vt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return el(r);case"xxxx":case"xx":return Vt(r);case"xxxxx":case"xxx":default:return Vt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Jc(r,":");case"OOOO":default:return"GMT"+Vt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Jc(r,":");case"zzzz":default:return"GMT"+Vt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return pe(r,t.length)},T:function(e,t,n){return pe(+e,t.length)}};function Jc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+pe(a,2)}function el(e,t){return e%60===0?(e>0?"-":"+")+pe(Math.abs(e)/60,2):Vt(e,t)}function Vt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=pe(Math.trunc(r/60),2),a=pe(r%60,2);return n+o+t+a}const tl=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},nl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},zb={p:nl,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return tl(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",tl(r,t)).replace("{{time}}",nl(o,t))}},Hb=/^D+$/,Ub=/^Y+$/,Kb=["D","DD","YY","YYYY"];function qb(e){return Hb.test(e)}function Xb(e){return Ub.test(e)}function Qb(e,t,n){const r=Zb(e,t,n);if(console.warn(r),Kb.includes(e))throw new RangeError(r)}function Zb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Jb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ew=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tw=/^'([^]*?)'?$/,nw=/''/g,rw=/[a-zA-Z]/;function ow(e,t,n){var f,m,p,h,v,g,y,w;const r=An(),o=(n==null?void 0:n.locale)??r.locale??kr,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((w=(y=r.locale)==null?void 0:y.options)==null?void 0:w.weekStartsOn)??0,i=ve(e,n==null?void 0:n.in);if(!Ib(i))throw new RangeError("Invalid time value");let c=t.match(ew).map(b=>{const C=b[0];if(C==="p"||C==="P"){const M=zb[C];return M(b,o.formatLong)}return b}).join("").match(Jb).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const C=b[0];if(C==="'")return{isToken:!1,value:aw(b)};if(Zc[C])return{isToken:!0,value:b};if(C.match(rw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:b}});o.localize.preprocessor&&(c=o.localize.preprocessor(i,c));const d={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(b=>{if(!b.isToken)return b.value;const C=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Xb(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&qb(C))&&Qb(C,t,String(e));const M=Zc[C[0]];return M(i,C,o.localize,d)}).join("")}function aw(e){const t=e.match(tw);return t?t[1].replace(nw,"'"):e}function sw(e,t){const n=ve(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Oe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function iw(e,t){return ve(e,t==null?void 0:t.in).getMonth()}function cw(e,t){return ve(e,t==null?void 0:t.in).getFullYear()}function lw(e,t){return+ve(e)>+ve(t)}function uw(e,t){return+ve(e)<+ve(t)}function dw(e,t,n){const[r,o]=sn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function fw(e,t,n){const[r,o]=sn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function mw(e,t,n){const r=ve(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Oe(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=sw(s);return r.setMonth(t,Math.min(a,i)),r}function hw(e,t,n){const r=ve(e,n==null?void 0:n.in);return isNaN(+r)?Oe(e,NaN):(r.setFullYear(t),r)}const rl=5,pw=4;function gw(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,rl*7-1);return t.getMonth(e)===t.getMonth(a)?rl:pw}function ol(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function vw(e,t){const n=ol(e,t),r=gw(e,t);return t.addDays(n,r*7-1)}class wt{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Bt.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Bt(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):Bc(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Vc(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Db(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Ob(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):zc(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):jb(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Wb(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r,this):vw(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Vb(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Fb(r)},this.endOfWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfWeek?this.overrides.endOfWeek(r,this.options):Kc(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Bb(r)},this.format=(r,o)=>{var s;const a=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):ow(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):qc(r)},this.getMonth=r=>{var o;return(o=this.overrides)!=null&&o.getMonth?this.overrides.getMonth(r,this.options):iw(r,this.options)},this.getYear=r=>{var o;return(o=this.overrides)!=null&&o.getYear?this.overrides.getYear(r,this.options):cw(r,this.options)},this.getWeek=r=>{var o;return(o=this.overrides)!=null&&o.getWeek?this.overrides.getWeek(r,this.options):Qc(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):lw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):uw(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Hc(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Rb(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):dw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):fw(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Ab(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):_b(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):mw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):hw(r,o)},this.startOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ol(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):jn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):In(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Lb(r)},this.startOfWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfWeek?this.overrides.startOfWeek(r,this.options):cn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Uc(r)},this.options={locale:kr,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const xt=new wt;function yw(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[be[a]]?o.push(t[be[a]]):t[nt[a]]&&o.push(t[nt[a]]),o),[t[U.Day]])}function bw(e){return x.createElement("button",{...e})}function ww(e){return x.createElement("span",{...e})}function xw(e){const{size:t=24,orientation:n="left",className:r}=e;return x.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&x.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&x.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&x.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&x.createElement("polygon",{points:"8 18.612 14.1888889 12.5 8 6.37733333 9.91111111 4.5 18 12.5 9.91111111 20.5"}))}function Cw(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function Nw(e){const{day:t,modifiers:n,...r}=e,o=x.useRef(null);return x.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),x.createElement("button",{ref:o,...r})}function Mw(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[U.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:c})=>c===a.value);return x.createElement("span",{"data-disabled":a.disabled,className:o[U.DropdownRoot]},x.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:c,label:d,disabled:f})=>x.createElement(r.Option,{key:c,value:c,disabled:f},d))),x.createElement("span",{className:o[U.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[U.Chevron]})))}function Sw(e){return x.createElement("div",{...e})}function Ew(e){return x.createElement("div",{...e})}function Pw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function kw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function Tw(e){return x.createElement("table",{...e})}function Dw(e){return x.createElement("div",{...e})}const al=x.createContext(void 0);function Fn(){const e=x.useContext(al);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Ow(e){const{components:t}=Fn();return x.createElement(t.Dropdown,{...e})}function Aw(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:c,labelNext:d}}=Fn();return x.createElement("nav",{...a},x.createElement(s.PreviousMonthButton,{type:"button",className:i[U.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:r?void 0:!0,"aria-label":c(r),onClick:e.onPreviousClick},x.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[U.Chevron],orientation:"left"})),x.createElement(s.NextMonthButton,{type:"button",className:i[U.NextMonthButton],tabIndex:o?void 0:-1,disabled:o?void 0:!0,"aria-label":d(o),onClick:e.onNextClick},x.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[U.Chevron]})))}function _w(e){const{components:t}=Fn();return x.createElement(t.Button,{...e})}function Rw(e){return x.createElement("option",{...e})}function Iw(e){const{components:t}=Fn();return x.createElement(t.Button,{...e})}function jw(e){return x.createElement("div",{...e})}function Fw(e){return x.createElement("select",{...e})}function $w(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function Ww(e){return x.createElement("th",{...e})}function Lw(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function Bw(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function Vw(e){return x.createElement("th",{...e})}function Yw(e){return x.createElement("tbody",{...e})}function Gw(e){const{components:t}=Fn();return x.createElement(t.Dropdown,{...e})}const zw=Object.freeze(Object.defineProperty({__proto__:null,Button:bw,CaptionLabel:ww,Chevron:xw,Day:Cw,DayButton:Nw,Dropdown:Mw,DropdownNav:Sw,Footer:Ew,Month:Pw,MonthCaption:kw,MonthGrid:Tw,Months:Dw,MonthsDropdown:Ow,Nav:Aw,NextMonthButton:_w,Option:Rw,PreviousMonthButton:Iw,Root:jw,Select:Fw,Week:$w,WeekNumber:Bw,WeekNumberHeader:Vw,Weekday:Ww,Weekdays:Lw,Weeks:Yw,YearsDropdown:Gw},Symbol.toStringTag,{value:"Module"}));function Hw(e){return{...zw,...e}}function Uw(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Kw(){const e={};for(const t in U)e[U[t]]=`rdp-${U[t]}`;for(const t in be)e[be[t]]=`rdp-${be[t]}`;for(const t in nt)e[nt[t]]=`rdp-${nt[t]}`;return e}function sl(e,t,n){return(n??new wt(t)).format(e,"LLLL y")}const qw=sl;function Xw(e,t,n){return(n??new wt(t)).format(e,"d")}function Qw(e,t=xt){return t.format(e,"LLLL")}function Zw(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function Jw(){return""}function ex(e,t,n){return(n??new wt(t)).format(e,"cccccc")}function il(e,t=xt){return t.format(e,"yyyy")}const tx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:sl,formatDay:Xw,formatMonthCaption:qw,formatMonthDropdown:Qw,formatWeekNumber:Zw,formatWeekNumberHeader:Jw,formatWeekdayName:ex,formatYearCaption:il,formatYearDropdown:il},Symbol.toStringTag,{value:"Module"}));function nx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...tx,...e}}function rx(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:c,getMonth:d}=o;return c({start:s(e),end:i(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),v=d(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:v,label:h,disabled:g}})}function ox(e,t={},n={}){let r={...t==null?void 0:t[U.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function ax(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let s=0;s<7;s++){const i=e.addDays(o,s);a.push(i)}return a}function sx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:s,getYear:i,isBefore:c,isSameYear:d}=r,f=o(e),m=a(t),p=[];let h=f;for(;c(h,m)||d(h,m);)p.push(h),h=s(h,1);return p.map(v=>{const g=n.formatYearDropdown(v,r);return{value:i(v),label:g,disabled:!1}})}function cl(e,t,n){return(n??new wt(t)).format(e,"LLLL y")}const ix=cl;function cx(e,t,n,r){let o=(r??new wt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ll(e,t,n,r){let o=(r??new wt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const lx=ll;function ux(){return""}function dx(e){return"Choose the Month"}function fx(e){return"Go to the Next Month"}function mx(e){return"Go to the Previous Month"}function hx(e,t,n){return(n??new wt(t)).format(e,"cccc")}function px(e,t){return`Week ${e}`}function gx(e){return"Week Number"}function vx(e){return"Choose the Year"}const yx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:ix,labelDay:lx,labelDayButton:ll,labelGrid:cl,labelGridcell:cx,labelMonthDropdown:dx,labelNav:ux,labelNext:fx,labelPrevious:mx,labelWeekNumber:px,labelWeekNumberHeader:gx,labelWeekday:hx,labelYearDropdown:vx},Symbol.toStringTag,{value:"Module"}));function bx(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:c}=n??{},{addDays:d,differenceInCalendarDays:f,differenceInCalendarMonths:m,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:v,endOfWeek:g,isAfter:y,startOfBroadcastWeek:w,startOfISOWeek:b,startOfWeek:C}=r,M=c?w(o,r):s?b(o):C(o),S=c?p(a,r):s?h(v(a)):g(v(a)),k=f(S,M),P=m(a,o)+1,D=[];for(let V=0;V<=k;V++){const _=d(M,V);if(t&&y(_,t))break;D.push(_)}const $=(c?35:42)*P;if(i&&D.length<$){const V=$-D.length;for(let _=0;_<V;_++){const z=d(D[D.length-1],1);D.push(z)}}return D}function wx(e){const t=[];return e.reduce((n,r)=>{const o=[],a=r.weeks.reduce((s,i)=>[...s,...i.days],o);return[...n,...a]},t)}function xx(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function ul(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:a=1,endMonth:s,startMonth:i}=e;let c=n||r||o;const{differenceInCalendarMonths:d,addMonths:f,startOfMonth:m}=t;if(s&&d(s,c)<0){const p=-1*(a-1);c=f(s,p)}return i&&d(c,i)<0&&(c=i),m(c)}class dl{constructor(t,n,r=xt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Cx{constructor(t,n){this.date=t,this.weeks=n}}class Nx{constructor(t,n){this.days=n,this.weekNumber=t}}function Mx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:c,getISOWeek:d,getWeek:f,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:h}=r,v=e.reduce((g,y)=>{const w=n.broadcastCalendar?m(y,r):n.ISOWeek?p(y):h(y),b=n.broadcastCalendar?a(y,r):n.ISOWeek?s(i(y)):c(i(y)),C=t.filter(P=>P>=w&&P<=b),M=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<M){const P=t.filter(D=>{const R=M-C.length;return D>b&&D<=o(b,R)});C.push(...P)}const S=C.reduce((P,D)=>{const R=n.ISOWeek?d(D):f(D),$=P.find(_=>_.weekNumber===R),V=new dl(D,y,r);return $?$.days.push(V):P.push(new Nx(R,[V])),P},[]),k=new Cx(y,S);return g.push(k),g},[]);return n.reverseMonths?v.reverse():v}function Sx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:c,endOfYear:d,newDate:f,today:m}=t,{fromYear:p,toYear:h,fromMonth:v,toMonth:g}=e;!n&&v&&(n=v),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=f(h,11,31));const y=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):p?n=f(p,0,1):!n&&y&&(n=o(c(e.today??m(),-100))),r?r=i(r):h?r=f(h,11,31):!r&&y&&(r=d(e.today??m())),[n&&a(n),r&&a(r)]}function Ex(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:c}=r,d=o?a:1,f=s(e);if(!t)return i(f,d);if(!(c(t,e)<a))return i(f,d)}function Px(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:c}=r,d=o?a??1:1,f=s(e);if(!t)return i(f,-d);if(!(c(f,t)<=0))return i(f,-d)}function kx(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function Tr(e,t){const[n,r]=x.useState(e);return[t===void 0?n:t,r]}function Tx(e,t){const[n,r]=Sx(e,t),{startOfMonth:o,endOfMonth:a}=t,s=ul(e,t),[i,c]=Tr(s,e.month?o(e.month):void 0);x.useEffect(()=>{const k=ul(e,t);c(k)},[e.timeZone]);const d=xx(i,r,e,t),f=bx(d,e.endMonth?a(e.endMonth):void 0,e,t),m=Mx(d,f,e,t),p=kx(m),h=wx(m),v=Px(i,n,e,t),g=Ex(i,r,e,t),{disableNavigation:y,onMonthChange:w}=e,b=k=>p.some(P=>P.days.some(D=>D.isEqualTo(k))),C=k=>{if(y)return;let P=o(k);n&&P<o(n)&&(P=o(n)),r&&P>o(r)&&(P=o(r)),c(P),w==null||w(P)};return{months:m,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:v,nextMonth:g,goToMonth:C,goToDay:k=>{b(k)||C(k.date)}}}function Dx(e,t,n,r){let o,a=0,s=!1;for(;a<e.length&&!s;){const i=e[a],c=t(i);!c[be.disabled]&&!c[be.hidden]&&!c[be.outside]&&(c[be.focused]||r!=null&&r.isEqualTo(i)||n(i.date)||c[be.today])&&(o=i,s=!0),a++}return o||(o=e.find(i=>{const c=t(i);return!c[be.disabled]&&!c[be.hidden]&&!c[be.outside]})),o}function Ct(e,t,n=!1,r=xt){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function fl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Uo(e){return!!(e&&typeof e=="object"&&"from"in e)}function ml(e){return!!(e&&typeof e=="object"&&"after"in e)}function hl(e){return!!(e&&typeof e=="object"&&"before"in e)}function pl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function gl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Nt(e,t,n=xt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(gl(i,n))return i.includes(e);if(Uo(i))return Ct(i,e,!1,n);if(pl(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(fl(i)){const c=a(i.before,e),d=a(i.after,e),f=c>0,m=d<0;return s(i.before,i.after)?m&&f:f||m}return ml(i)?a(e,i.after)>0:hl(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function Ox(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:c}=a,{addDays:d,addMonths:f,addWeeks:m,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:v,endOfWeek:g,max:y,min:w,startOfBroadcastWeek:b,startOfISOWeek:C,startOfWeek:M}=s;let k={day:d,week:m,month:f,year:p,startOfWeek:P=>c?b(P,s):i?C(P):M(P),endOfWeek:P=>c?h(P,s):i?v(P):g(P)}[e](n,t==="after"?1:-1);return t==="before"&&r?k=y([r,k]):t==="after"&&o&&(k=w([o,k])),k}function vl(e,t,n,r,o,a,s,i=0){if(i>365)return;const c=Ox(e,t,n.date,r,o,a,s),d=!!(a.disabled&&Nt(c,a.disabled,s)),f=!!(a.hidden&&Nt(c,a.hidden,s)),m=c,p=new dl(c,m,s);return!d&&!f?p:vl(e,t,p,r,o,a,s,i+1)}function Ax(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=x.useState(),c=Dx(t.days,n,r||(()=>!1),s),[d,f]=x.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:f,focused:d,blur:()=>{i(d),f(void 0)},moveFocus:(g,y)=>{if(!d)return;const w=vl(g,y,d,t.navStart,t.navEnd,e,o);w&&(t.goToDay(w),f(w))}}}function _x(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:s,broadcastCalendar:i,today:c}=t,{isSameDay:d,isSameMonth:f,startOfMonth:m,isBefore:p,endOfMonth:h,isAfter:v}=n,g=t.startMonth&&m(t.startMonth),y=t.endMonth&&h(t.endMonth),w={[be.focused]:[],[be.outside]:[],[be.disabled]:[],[be.hidden]:[],[be.today]:[]},b={};for(const C of e){const{date:M,displayMonth:S}=C,k=!!(S&&!f(M,S)),P=!!(g&&p(M,g)),D=!!(y&&v(M,y)),R=!!(r&&Nt(M,r,n)),$=!!(o&&Nt(M,o,n))||P||D||!i&&!s&&k||i&&s===!1&&k,V=d(M,c??n.today());k&&w.outside.push(C),R&&w.disabled.push(C),$&&w.hidden.push(C),V&&w.today.push(C),a&&Object.keys(a).forEach(_=>{const z=a==null?void 0:a[_];z&&Nt(M,z,n)&&(b[_]?b[_].push(C):b[_]=[C])})}return C=>{const M={[be.focused]:!1,[be.disabled]:!1,[be.hidden]:!1,[be.outside]:!1,[be.today]:!1},S={};for(const k in w){const P=w[k];M[k]=P.some(D=>D===C)}for(const k in b)S[k]=b[k].some(P=>P===C);return{...M,...S}}}function Rx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Tr(n,o?n:void 0),i=o?n:a,{isSameDay:c}=t,d=h=>(i==null?void 0:i.some(v=>c(v,h)))??!1,{min:f,max:m}=e;return{selected:i,select:(h,v,g)=>{let y=[...i??[]];if(d(h)){if((i==null?void 0:i.length)===f||r&&(i==null?void 0:i.length)===1)return;y=i==null?void 0:i.filter(w=>!c(w,h))}else(i==null?void 0:i.length)===m?y=[h]:y=[...y,h];return o||s(y),o==null||o(y,h,v,g),y},isSelected:d}}function Ix(e,t,n=0,r=0,o=!1,a=xt){const{from:s,to:i}=t||{},{isSameDay:c,isAfter:d,isBefore:f}=a;let m;if(!s&&!i)m={from:e,to:n>0?void 0:e};else if(s&&!i)c(s,e)?o?m={from:s,to:void 0}:m=void 0:f(e,s)?m={from:e,to:s}:m={from:s,to:e};else if(s&&i)if(c(s,e)&&c(i,e))o?m={from:s,to:i}:m=void 0;else if(c(s,e))m={from:s,to:n>0?void 0:e};else if(c(i,e))m={from:e,to:n>0?void 0:e};else if(f(e,s))m={from:e,to:i};else if(d(e,s))m={from:s,to:e};else if(d(e,i))m={from:s,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const p=a.differenceInCalendarDays(m.to,m.from);r>0&&p>r?m={from:e,to:void 0}:n>1&&p<n&&(m={from:e,to:void 0})}return m}function jx(e,t,n=xt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function yl(e,t,n=xt){return Ct(e,t.from,!1,n)||Ct(e,t.to,!1,n)||Ct(t,e.from,!1,n)||Ct(t,e.to,!1,n)}function Fx(e,t,n=xt){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?Ct(e,i,!1,n):gl(i,n)?i.some(c=>Ct(e,c,!1,n)):Uo(i)?i.from&&i.to?yl(e,{from:i.from,to:i.to},n):!1:pl(i)?jx(e,i.dayOfWeek,n):fl(i)?n.isAfter(i.before,i.after)?yl(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):Nt(e.from,i,n)||Nt(e.to,i,n):ml(i)||hl(i)?Nt(e.from,i,n)||Nt(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=c;d++){if(s.some(f=>f(i)))return!0;i=n.addDays(i,1)}}return!1}function $x(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:s}=e,[i,c]=Tr(o,s?o:void 0),d=s?o:i;return{selected:d,select:(p,h,v)=>{const{min:g,max:y}=e,w=p?Ix(p,d,g,y,a,t):void 0;return r&&n&&(w!=null&&w.from)&&w.to&&Fx({from:w.from,to:w.to},n,t)&&(w.from=p,w.to=void 0),s||c(w),s==null||s(w,p,h,v),w},isSelected:p=>d&&Ct(d,p,!1,t)}}function Wx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=Tr(n,o?n:void 0),i=o?n:a,{isSameDay:c}=t;return{selected:i,select:(m,p,h)=>{let v=m;return!r&&i&&i&&c(m,i)&&(v=void 0),o||s(v),o==null||o(v,m,p,h),v},isSelected:m=>i?c(i,m):!1}}function Lx(e,t){const n=Wx(e,t),r=Rx(e,t),o=$x(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Bx(e){const{components:t,formatters:n,labels:r,dateLib:o,locale:a,classNames:s}=x.useMemo(()=>{const J={...kr,...e.locale};return{dateLib:new wt({locale:J,weekStartsOn:e.broadcastCalendar?1:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens,timeZone:e.timeZone,numerals:e.numerals},e.dateLib),components:Hw(e.components),formatters:nx(e.formatters),labels:{...yx,...e.labels},locale:J,classNames:{...Kw(),...e.classNames}}},[e.locale,e.broadcastCalendar,e.weekStartsOn,e.firstWeekContainsDate,e.useAdditionalWeekYearTokens,e.useAdditionalDayOfYearTokens,e.timeZone,e.numerals,e.dateLib,e.components,e.formatters,e.labels,e.classNames]),{captionLayout:i,mode:c,onDayBlur:d,onDayClick:f,onDayFocus:m,onDayKeyDown:p,onDayMouseEnter:h,onDayMouseLeave:v,onNextClick:g,onPrevClick:y,showWeekNumber:w,styles:b}=e,{formatCaption:C,formatDay:M,formatMonthDropdown:S,formatWeekNumber:k,formatWeekNumberHeader:P,formatWeekdayName:D,formatYearDropdown:R}=n,$=Tx(e,o),{days:V,months:_,navStart:z,navEnd:G,previousMonth:ee,nextMonth:W,goToMonth:Y}=$,L=_x(V,e,o),{isSelected:T,select:H,selected:q}=Lx(e,o)??{},{blur:X,focused:K,isFocusTarget:Z,moveFocus:me,setFocused:ge}=Ax(e,$,L,T??(()=>!1),o),{labelDayButton:I,labelGridcell:ie,labelGrid:ce,labelMonthDropdown:oe,labelNav:se,labelWeekday:le,labelWeekNumber:Me,labelWeekNumberHeader:Re,labelYearDropdown:$e}=r,ot=x.useMemo(()=>ax(o,e.ISOWeek),[o,e.ISOWeek]),Be=c!==void 0||f!==void 0,at=x.useCallback(()=>{ee&&(Y(ee),y==null||y(ee))},[ee,Y,y]),Xe=x.useCallback(()=>{W&&(Y(W),g==null||g(W))},[Y,W,g]),st=x.useCallback((J,ue)=>de=>{de.preventDefault(),de.stopPropagation(),ge(J),H==null||H(J.date,ue,de),f==null||f(J.date,ue,de)},[H,f,ge]),N=x.useCallback((J,ue)=>de=>{ge(J),m==null||m(J.date,ue,de)},[m,ge]),B=x.useCallback((J,ue)=>de=>{X(),d==null||d(J.date,ue,de)},[X,d]),j=x.useCallback((J,ue)=>de=>{const Se={ArrowLeft:["day",e.dir==="rtl"?"after":"before"],ArrowRight:["day",e.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[de.shiftKey?"year":"month","before"],PageDown:[de.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Se[de.key]){de.preventDefault(),de.stopPropagation();const[Ve,gn]=Se[de.key];me(Ve,gn)}p==null||p(J.date,ue,de)},[me,p,e.dir]),ae=x.useCallback((J,ue)=>de=>{h==null||h(J.date,ue,de)},[h]),Pe=x.useCallback((J,ue)=>de=>{v==null||v(J.date,ue,de)},[v]),ye=x.useCallback(J=>ue=>{const de=Number(ue.target.value),Se=o.setMonth(o.startOfMonth(J),de);Y(Se)},[o,Y]),Q=x.useCallback(J=>ue=>{const de=Number(ue.target.value),Se=o.setYear(o.startOfMonth(J),de);Y(Se)},[o,Y]),{className:Ue,style:Qe}=x.useMemo(()=>({className:[s[U.Root],e.className].filter(Boolean).join(" "),style:{...b==null?void 0:b[U.Root],...e.style}}),[s,e.className,e.style,b]),Ce=Uw(e),Ze={dayPickerProps:e,selected:q,select:H,isSelected:T,months:_,nextMonth:W,previousMonth:ee,goToMonth:Y,getModifiers:L,components:t,classNames:s,styles:b,labels:r,formatters:n};return x.createElement(al.Provider,{value:Ze},x.createElement(t.Root,{className:Ue,style:Qe,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,role:e.role,"aria-label":e["aria-label"],...Ce},x.createElement(t.Months,{className:s[U.Months],style:b==null?void 0:b[U.Months]},!e.hideNavigation&&x.createElement(t.Nav,{className:s[U.Nav],style:b==null?void 0:b[U.Nav],"aria-label":se(),onPreviousClick:at,onNextClick:Xe,previousMonth:ee,nextMonth:W}),_.map((J,ue)=>{const de=rx(J.date,z,G,n,o),Se=sx(z,G,n,o);return x.createElement(t.Month,{className:s[U.Month],style:b==null?void 0:b[U.Month],key:ue,displayIndex:ue,calendarMonth:J},x.createElement(t.MonthCaption,{className:s[U.MonthCaption],style:b==null?void 0:b[U.MonthCaption],calendarMonth:J,displayIndex:ue},i!=null&&i.startsWith("dropdown")?x.createElement(t.DropdownNav,{className:s[U.Dropdowns],style:b==null?void 0:b[U.Dropdowns]},i==="dropdown"||i==="dropdown-months"?x.createElement(t.MonthsDropdown,{className:s[U.MonthsDropdown],"aria-label":oe(),classNames:s,components:t,disabled:!!e.disableNavigation,onChange:ye(J.date),options:de,style:b==null?void 0:b[U.Dropdown],value:o.getMonth(J.date)}):x.createElement("span",{role:"status","aria-live":"polite"},S(J.date,o)),i==="dropdown"||i==="dropdown-years"?x.createElement(t.YearsDropdown,{className:s[U.YearsDropdown],"aria-label":$e(o.options),classNames:s,components:t,disabled:!!e.disableNavigation,onChange:Q(J.date),options:Se,style:b==null?void 0:b[U.Dropdown],value:o.getYear(J.date)}):x.createElement("span",{role:"status","aria-live":"polite"},R(J.date,o))):x.createElement(t.CaptionLabel,{className:s[U.CaptionLabel],role:"status","aria-live":"polite"},C(J.date,o.options,o))),x.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":c==="multiple"||c==="range","aria-label":ce(J.date,o.options,o)||void 0,className:s[U.MonthGrid],style:b==null?void 0:b[U.MonthGrid]},!e.hideWeekdays&&x.createElement(t.Weekdays,{className:s[U.Weekdays],style:b==null?void 0:b[U.Weekdays]},w&&x.createElement(t.WeekNumberHeader,{"aria-label":Re(o.options),className:s[U.WeekNumberHeader],style:b==null?void 0:b[U.WeekNumberHeader],scope:"col"},P()),ot.map((Ve,gn)=>x.createElement(t.Weekday,{"aria-label":le(Ve,o.options,o),className:s[U.Weekday],key:gn,style:b==null?void 0:b[U.Weekday],scope:"col"},D(Ve,o.options,o)))),x.createElement(t.Weeks,{className:s[U.Weeks],style:b==null?void 0:b[U.Weeks]},J.weeks.map((Ve,gn)=>x.createElement(t.Week,{className:s[U.Week],key:Ve.weekNumber,style:b==null?void 0:b[U.Week],week:Ve},w&&x.createElement(t.WeekNumber,{week:Ve,style:b==null?void 0:b[U.WeekNumber],"aria-label":Me(Ve.weekNumber,{locale:a}),className:s[U.WeekNumber],scope:"row",role:"rowheader"},k(Ve.weekNumber)),Ve.days.map(ke=>{const{date:Ae}=ke,fe=L(ke);if(fe[be.focused]=!fe.hidden&&!!(K!=null&&K.isEqualTo(ke)),fe[nt.selected]=!fe.disabled&&((T==null?void 0:T(Ae))||fe.selected),Uo(q)){const{from:We,to:Ye}=q;fe[nt.range_start]=!!(We&&Ye&&o.isSameDay(Ae,We)),fe[nt.range_end]=!!(We&&Ye&&o.isSameDay(Ae,Ye)),fe[nt.range_middle]=Ct(q,Ae,!0,o)}const te=ox(fe,b,e.modifiersStyles),he=yw(fe,s,e.modifiersClassNames),we=!Be&&!fe.hidden?ie(Ae,fe,o.options,o):void 0;return x.createElement(t.Day,{key:`${o.format(Ae,"yyyy-MM-dd")}_${o.format(ke.displayMonth,"yyyy-MM")}`,day:ke,modifiers:fe,className:he.join(" "),style:te,role:"gridcell","aria-selected":fe.selected||void 0,"aria-label":we,"data-day":o.format(Ae,"yyyy-MM-dd"),"data-month":ke.outside?o.format(Ae,"yyyy-MM"):void 0,"data-selected":fe.selected||void 0,"data-disabled":fe.disabled||void 0,"data-hidden":fe.hidden||void 0,"data-outside":ke.outside||void 0,"data-focused":fe.focused||void 0,"data-today":fe.today||void 0},!fe.hidden&&Be?x.createElement(t.DayButton,{className:s[U.DayButton],style:b==null?void 0:b[U.DayButton],type:"button",day:ke,modifiers:fe,disabled:fe.disabled||void 0,tabIndex:Z(ke)?0:-1,"aria-label":I(Ae,fe,o.options,o),onClick:st(ke,fe),onBlur:B(ke,fe),onFocus:N(ke,fe),onKeyDown:j(ke,fe),onMouseEnter:ae(ke,fe),onMouseLeave:Pe(ke,fe)},M(Ae,o.options,o)):!fe.hidden&&M(ke.date,o.options,o))}))))))})),e.footer&&x.createElement(t.Footer,{className:s[U.Footer],style:b==null?void 0:b[U.Footer],role:"status","aria-live":"polite"},e.footer)))}function bl(e){const{className:t,classNames:n,showOutsideDays:r=!0,...o}=e;return u.jsx(Bx,{showOutsideDays:r,className:O("p-3",t),classNames:{...n},locale:Sb,...o})}bl.displayName="Calendar";const wl=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:O("rounded-xl border bg-card text-card-foreground shadow",e),...t}));wl.displayName="Card";const xl=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:O("flex flex-col space-y-1.5 p-6",e),...t}));xl.displayName="CardHeader";const Cl=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:O("font-semibold leading-none tracking-tight pb-4",e),...t}));Cl.displayName="CardTitle";const Nl=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:O("text-sm text-muted-foreground",e),...t}));Nl.displayName="CardDescription";const Ml=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:O("p-6 py-0",e),...t}));Ml.displayName="CardContent";const Sl=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:O("flex items-center p-6 pt-6",e),...t}));Sl.displayName="CardFooter";function $n(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ko="Checkbox",[Vx,TS]=Te(Ko),[Yx,Gx]=Vx(Ko),El=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:d,form:f,...m}=e,[p,h]=l.useState(null),v=ne(t,M=>h(M)),g=l.useRef(!1),y=p?f||!!p.closest("form"):!0,[w=!1,b]=Ie({prop:o,defaultProp:a,onChange:d}),C=l.useRef(w);return l.useEffect(()=>{const M=p==null?void 0:p.form;if(M){const S=()=>b(C.current);return M.addEventListener("reset",S),()=>M.removeEventListener("reset",S)}},[p,b]),u.jsxs(Yx,{scope:n,state:w,disabled:i,children:[u.jsx(F.button,{type:"button",role:"checkbox","aria-checked":_t(w)?"mixed":w,"aria-required":s,"data-state":Tl(w),"data-disabled":i?"":void 0,disabled:i,value:c,...m,ref:v,onKeyDown:A(e.onKeyDown,M=>{M.key==="Enter"&&M.preventDefault()}),onClick:A(e.onClick,M=>{b(S=>_t(S)?!0:!S),y&&(g.current=M.isPropagationStopped(),g.current||M.stopPropagation())})}),y&&u.jsx(zx,{control:p,bubbles:!g.current,name:r,value:c,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"},defaultChecked:_t(a)?!1:a})]})});El.displayName=Ko;var Pl="CheckboxIndicator",kl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Gx(Pl,n);return u.jsx(De,{present:r||_t(a.state)||a.state===!0,children:u.jsx(F.span,{"data-state":Tl(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});kl.displayName=Pl;var zx=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a}=e,s=l.useRef(null),i=$n(n),c=Sr(t);l.useEffect(()=>{const f=s.current,m=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(m,"checked").set;if(i!==n&&h){const v=new Event("click",{bubbles:r});f.indeterminate=_t(n),h.call(f,_t(n)?!1:n),f.dispatchEvent(v)}},[i,n,r]);const d=l.useRef(_t(n)?!1:n);return u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o??d.current,...a,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function _t(e){return e==="indeterminate"}function Tl(e){return _t(e)?"indeterminate":e?"checked":"unchecked"}var Dl=El,Hx=kl;const Ol=l.forwardRef(({className:e,...t},n)=>u.jsx(Dl,{ref:n,className:O("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:u.jsx(Hx,{className:O("flex items-center justify-center text-current"),children:u.jsx(Mo,{className:"h-4 w-4"})})}));Ol.displayName=Dl.displayName;const Al=x.forwardRef((e,t)=>{const{currencySymbol:n="$",decimalSeparator:r=".",thousandSeparator:o=",",onValueChange:a,className:s,value:i=0,...c}=e,d=x.useRef(null);x.useImperativeHandle(t,()=>d.current);const[f,m]=x.useState(""),p=g=>{const y=g.toFixed(2).split("."),w=y[0].replace(/\B(?=(\d{3})+(?!\d))/g,o);return`${n} ${w}${r}${y[1]}`},h=g=>{const y=g.target.value,w=parseFloat(y.replace(/\D/g,""))/100;m(p(w)),a(w),d.current&&window.requestAnimationFrame(()=>{var b;(b=d.current)==null||b.setSelectionRange(d.current.value.length,d.current.value.length)})},v=()=>{d.current&&d.current.setSelectionRange(d.current.value.length,d.current.value.length)};return x.useEffect(()=>{m(p(+i))},[i]),u.jsx(nr,{type:"text",inputMode:"numeric",value:f,ref:d,onChange:h,onFocus:v,onClick:v,placeholder:`${n} 0${r}00`,className:s,...c})});Al.displayName="CurrencyInput";const qo=ti,_l=ni,Rl=ri,Ux=pr,Xo=l.forwardRef(({className:e,...t},n)=>u.jsx(bo,{ref:n,className:O("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",e),...t}));Xo.displayName=bo.displayName;const Dr=l.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Rl,{children:[u.jsx(Xo,{}),u.jsxs(wo,{ref:r,className:O("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 max-h-[100dvh] overflow-y-auto",e),...n,children:[t,u.jsxs(pr,{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",children:[u.jsx(qg,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Dr.displayName=wo.displayName;const Or=({className:e,...t})=>u.jsx("div",{className:O("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Or.displayName="DialogHeader";const Il=({className:e,...t})=>u.jsx("div",{className:O("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Il.displayName="DialogFooter";const Ar=l.forwardRef(({className:e,...t},n)=>u.jsx(xo,{ref:n,className:O("text-lg font-semibold leading-none tracking-tight",e),...t}));Ar.displayName=xo.displayName;const _r=l.forwardRef(({className:e,...t},n)=>u.jsx(Co,{ref:n,className:O("text-sm text-muted-foreground",e),...t}));_r.displayName=Co.displayName;function Wn(e){const t=e+"CollectionProvider",[n,r]=Te(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:v,children:g}=h,y=x.useRef(null),w=x.useRef(new Map).current;return u.jsx(o,{scope:v,itemMap:w,collectionRef:y,children:g})};s.displayName=t;const i=e+"CollectionSlot",c=x.forwardRef((h,v)=>{const{scope:g,children:y}=h,w=a(i,g),b=ne(v,w.collectionRef);return u.jsx(it,{ref:b,children:y})});c.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=x.forwardRef((h,v)=>{const{scope:g,children:y,...w}=h,b=x.useRef(null),C=ne(v,b),M=a(d,g);return x.useEffect(()=>(M.itemMap.set(b,{ref:b,...w}),()=>void M.itemMap.delete(b))),u.jsx(it,{[f]:"",ref:C,children:y})});m.displayName=d;function p(h){const v=a(e+"CollectionConsumer",h);return x.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((M,S)=>w.indexOf(M.ref.current)-w.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:c,ItemSlot:m},p,r]}var Kx=l.createContext(void 0);function Yt(e){const t=l.useContext(Kx);return e||t||"ltr"}var Qo="rovingFocusGroup.onEntryFocus",qx={bubbles:!1,cancelable:!0},Rr="RovingFocusGroup",[Zo,jl,Xx]=Wn(Rr),[Qx,Rt]=Te(Rr,[Xx]),[Zx,Jx]=Qx(Rr),Fl=l.forwardRef((e,t)=>u.jsx(Zo.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Zo.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(e0,{...e,ref:t})})}));Fl.displayName=Rr;var e0=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...m}=e,p=l.useRef(null),h=ne(t,p),v=Yt(a),[g=null,y]=Ie({prop:s,defaultProp:i,onChange:c}),[w,b]=l.useState(!1),C=Ne(d),M=jl(n),S=l.useRef(!1),[k,P]=l.useState(0);return l.useEffect(()=>{const D=p.current;if(D)return D.addEventListener(Qo,C),()=>D.removeEventListener(Qo,C)},[C]),u.jsx(Zx,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(D=>y(D),[y]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>P(D=>D+1),[]),onFocusableItemRemove:l.useCallback(()=>P(D=>D-1),[]),children:u.jsx(F.div,{tabIndex:w||k===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:A(e.onMouseDown,()=>{S.current=!0}),onFocus:A(e.onFocus,D=>{const R=!S.current;if(D.target===D.currentTarget&&R&&!w){const $=new CustomEvent(Qo,qx);if(D.currentTarget.dispatchEvent($),!$.defaultPrevented){const V=M().filter(W=>W.focusable),_=V.find(W=>W.active),z=V.find(W=>W.id===g),ee=[_,z,...V].filter(Boolean).map(W=>W.ref.current);Ll(ee,f)}}S.current=!1}),onBlur:A(e.onBlur,()=>b(!1))})})}),$l="RovingFocusGroupItem",Wl=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,...s}=e,i=je(),c=a||i,d=Jx($l,n),f=d.currentTabStopId===c,m=jl(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=d;return l.useEffect(()=>{if(r)return p(),()=>h()},[r,p,h]),u.jsx(Zo.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:u.jsx(F.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:A(e.onMouseDown,v=>{r?d.onItemFocus(c):v.preventDefault()}),onFocus:A(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:A(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const g=r0(v,d.orientation,d.dir);if(g!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=m().filter(b=>b.focusable).map(b=>b.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const b=w.indexOf(v.currentTarget);w=d.loop?o0(w,b+1):w.slice(b+1)}setTimeout(()=>Ll(w))}})})})});Wl.displayName=$l;var t0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function n0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function r0(e,t,n){const r=n0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return t0[r]}function Ll(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function o0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ir=Fl,jr=Wl,Jo=["Enter"," "],a0=["ArrowDown","PageUp","Home"],Bl=["ArrowUp","PageDown","End"],s0=[...a0,...Bl],i0={ltr:[...Jo,"ArrowRight"],rtl:[...Jo,"ArrowLeft"]},c0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[Bn,l0,u0]=Wn(Ln),[Gt,Vl]=Te(Ln,[u0,Dt,Rt]),Vn=Dt(),Yl=Rt(),[Gl,It]=Gt(Ln),[d0,Yn]=Gt(Ln),zl=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=Vn(t),[c,d]=l.useState(null),f=l.useRef(!1),m=Ne(a),p=Yt(o);return l.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),u.jsx(Tn,{...i,children:u.jsx(Gl,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:d,children:u.jsx(d0,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:p,modal:s,children:r})})})};zl.displayName=Ln;var f0="MenuAnchor",ea=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Vn(n);return u.jsx(Dn,{...o,...r,ref:t})});ea.displayName=f0;var ta="MenuPortal",[m0,Hl]=Gt(ta,{forceMount:void 0}),Ul=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=It(ta,t);return u.jsx(m0,{scope:t,forceMount:n,children:u.jsx(De,{present:n||a.open,children:u.jsx(Nn,{asChild:!0,container:o,children:r})})})};Ul.displayName=ta;var Ke="MenuContent",[h0,na]=Gt(Ke),Kl=l.forwardRef((e,t)=>{const n=Hl(Ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=It(Ke,e.__scopeMenu),s=Yn(Ke,e.__scopeMenu);return u.jsx(Bn.Provider,{scope:e.__scopeMenu,children:u.jsx(De,{present:r||a.open,children:u.jsx(Bn.Slot,{scope:e.__scopeMenu,children:s.modal?u.jsx(p0,{...o,ref:t}):u.jsx(g0,{...o,ref:t})})})})}),p0=l.forwardRef((e,t)=>{const n=It(Ke,e.__scopeMenu),r=l.useRef(null),o=ne(t,r);return l.useEffect(()=>{const a=r.current;if(a)return mr(a)},[]),u.jsx(ra,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),g0=l.forwardRef((e,t)=>{const n=It(Ke,e.__scopeMenu);return u.jsx(ra,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ra=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:v,...g}=e,y=It(Ke,n),w=Yn(Ke,n),b=Vn(n),C=Yl(n),M=l0(n),[S,k]=l.useState(null),P=l.useRef(null),D=ne(t,P,y.onContentChange),R=l.useRef(0),$=l.useRef(""),V=l.useRef(0),_=l.useRef(null),z=l.useRef("right"),G=l.useRef(0),ee=v?Mn:l.Fragment,W=v?{as:it,allowPinchZoom:!0}:void 0,Y=T=>{var I,ie;const H=$.current+T,q=M().filter(ce=>!ce.disabled),X=document.activeElement,K=(I=q.find(ce=>ce.ref.current===X))==null?void 0:I.textValue,Z=q.map(ce=>ce.textValue),me=k0(Z,H,K),ge=(ie=q.find(ce=>ce.textValue===me))==null?void 0:ie.ref.current;(function ce(oe){$.current=oe,window.clearTimeout(R.current),oe!==""&&(R.current=window.setTimeout(()=>ce(""),1e3))})(H),ge&&setTimeout(()=>ge.focus())};l.useEffect(()=>()=>window.clearTimeout(R.current),[]),ar();const L=l.useCallback(T=>{var q,X;return z.current===((q=_.current)==null?void 0:q.side)&&D0(T,(X=_.current)==null?void 0:X.area)},[]);return u.jsx(h0,{scope:n,searchRef:$,onItemEnter:l.useCallback(T=>{L(T)&&T.preventDefault()},[L]),onItemLeave:l.useCallback(T=>{var H;L(T)||((H=P.current)==null||H.focus(),k(null))},[L]),onTriggerLeave:l.useCallback(T=>{L(T)&&T.preventDefault()},[L]),pointerGraceTimerRef:V,onPointerGraceIntentChange:l.useCallback(T=>{_.current=T},[]),children:u.jsx(ee,{...W,children:u.jsx(Cn,{asChild:!0,trapped:o,onMountAutoFocus:A(a,T=>{var H;T.preventDefault(),(H=P.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:u.jsx($t,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:u.jsx(Ir,{asChild:!0,...C,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:k,onEntryFocus:A(c,T=>{w.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(Er,{role:"menu","aria-orientation":"vertical","data-state":fu(y.open),"data-radix-menu-content":"",dir:w.dir,...b,...g,ref:D,style:{outline:"none",...g.style},onKeyDown:A(g.onKeyDown,T=>{const q=T.target.closest("[data-radix-menu-content]")===T.currentTarget,X=T.ctrlKey||T.altKey||T.metaKey,K=T.key.length===1;q&&(T.key==="Tab"&&T.preventDefault(),!X&&K&&Y(T.key));const Z=P.current;if(T.target!==Z||!s0.includes(T.key))return;T.preventDefault();const ge=M().filter(I=>!I.disabled).map(I=>I.ref.current);Bl.includes(T.key)&&ge.reverse(),E0(ge)}),onBlur:A(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(R.current),$.current="")}),onPointerMove:A(e.onPointerMove,zn(T=>{const H=T.target,q=G.current!==T.clientX;if(T.currentTarget.contains(H)&&q){const X=T.clientX>G.current?"right":"left";z.current=X,G.current=T.clientX}}))})})})})})})});Kl.displayName=Ke;var v0="MenuGroup",oa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(F.div,{role:"group",...r,ref:t})});oa.displayName=v0;var y0="MenuLabel",ql=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(F.div,{...r,ref:t})});ql.displayName=y0;var Fr="MenuItem",Xl="menu.itemSelect",$r=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),s=Yn(Fr,e.__scopeMenu),i=na(Fr,e.__scopeMenu),c=ne(t,a),d=l.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const p=new CustomEvent(Xl,{bubbles:!0,cancelable:!0});m.addEventListener(Xl,h=>r==null?void 0:r(h),{once:!0}),rr(m,p),p.defaultPrevented?d.current=!1:s.onClose()}};return u.jsx(Ql,{...o,ref:c,disabled:n,onClick:A(e.onClick,f),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),d.current=!0},onPointerUp:A(e.onPointerUp,m=>{var p;d.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:A(e.onKeyDown,m=>{const p=i.searchRef.current!=="";n||p&&m.key===" "||Jo.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});$r.displayName=Fr;var Ql=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=na(Fr,n),i=Yl(n),c=l.useRef(null),d=ne(t,c),[f,m]=l.useState(!1),[p,h]=l.useState("");return l.useEffect(()=>{const v=c.current;v&&h((v.textContent??"").trim())},[a.children]),u.jsx(Bn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:u.jsx(jr,{asChild:!0,...i,focusable:!r,children:u.jsx(F.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:A(e.onPointerMove,zn(v=>{r?s.onItemLeave(v):(s.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:A(e.onPointerLeave,zn(v=>s.onItemLeave(v))),onFocus:A(e.onFocus,()=>m(!0)),onBlur:A(e.onBlur,()=>m(!1))})})})}),b0="MenuCheckboxItem",Zl=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return u.jsx(ru,{scope:e.__scopeMenu,checked:n,children:u.jsx($r,{role:"menuitemcheckbox","aria-checked":Wr(n)?"mixed":n,...o,ref:t,"data-state":ia(n),onSelect:A(o.onSelect,()=>r==null?void 0:r(Wr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Zl.displayName=b0;var Jl="MenuRadioGroup",[w0,x0]=Gt(Jl,{value:void 0,onValueChange:()=>{}}),eu=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ne(r);return u.jsx(w0,{scope:e.__scopeMenu,value:n,onValueChange:a,children:u.jsx(oa,{...o,ref:t})})});eu.displayName=Jl;var tu="MenuRadioItem",nu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=x0(tu,e.__scopeMenu),a=n===o.value;return u.jsx(ru,{scope:e.__scopeMenu,checked:a,children:u.jsx($r,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":ia(a),onSelect:A(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});nu.displayName=tu;var aa="MenuItemIndicator",[ru,C0]=Gt(aa,{checked:!1}),ou=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=C0(aa,n);return u.jsx(De,{present:r||Wr(a.checked)||a.checked===!0,children:u.jsx(F.span,{...o,ref:t,"data-state":ia(a.checked)})})});ou.displayName=aa;var N0="MenuSeparator",au=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(F.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});au.displayName=N0;var M0="MenuArrow",su=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Vn(n);return u.jsx(Pr,{...o,...r,ref:t})});su.displayName=M0;var sa="MenuSub",[S0,iu]=Gt(sa),cu=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=It(sa,t),s=Vn(t),[i,c]=l.useState(null),[d,f]=l.useState(null),m=Ne(o);return l.useEffect(()=>(a.open===!1&&m(!1),()=>m(!1)),[a.open,m]),u.jsx(Tn,{...s,children:u.jsx(Gl,{scope:t,open:r,onOpenChange:m,content:d,onContentChange:f,children:u.jsx(S0,{scope:t,contentId:je(),triggerId:je(),trigger:i,onTriggerChange:c,children:n})})})};cu.displayName=sa;var Gn="MenuSubTrigger",lu=l.forwardRef((e,t)=>{const n=It(Gn,e.__scopeMenu),r=Yn(Gn,e.__scopeMenu),o=iu(Gn,e.__scopeMenu),a=na(Gn,e.__scopeMenu),s=l.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=a,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const m=i.current;return()=>{window.clearTimeout(m),c(null)}},[i,c]),u.jsx(ea,{asChild:!0,...d,children:u.jsx(Ql,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":fu(n.open),...e,ref:xn(t,o.onTriggerChange),onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,zn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:A(e.onPointerLeave,zn(m=>{var h,v;f();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(v=n.content)==null?void 0:v.dataset.side,y=g==="right",w=y?-5:5,b=p[y?"left":"right"],C=p[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+w,y:m.clientY},{x:b,y:p.top},{x:C,y:p.top},{x:C,y:p.bottom},{x:b,y:p.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,m=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||i0[r.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});lu.displayName=Gn;var uu="MenuSubContent",du=l.forwardRef((e,t)=>{const n=Hl(Ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=It(Ke,e.__scopeMenu),s=Yn(Ke,e.__scopeMenu),i=iu(uu,e.__scopeMenu),c=l.useRef(null),d=ne(t,c);return u.jsx(Bn.Provider,{scope:e.__scopeMenu,children:u.jsx(De,{present:r||a.open,children:u.jsx(Bn.Slot,{scope:e.__scopeMenu,children:u.jsx(ra,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:d,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var m;s.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:A(e.onFocusOutside,f=>{f.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,f=>{s.onClose(),f.preventDefault()}),onKeyDown:A(e.onKeyDown,f=>{var h;const m=f.currentTarget.contains(f.target),p=c0[s.dir].includes(f.key);m&&p&&(a.onOpenChange(!1),(h=i.trigger)==null||h.focus(),f.preventDefault())})})})})})});du.displayName=uu;function fu(e){return e?"open":"closed"}function Wr(e){return e==="indeterminate"}function ia(e){return Wr(e)?"indeterminate":e?"checked":"unchecked"}function E0(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function P0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function k0(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=P0(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function T0(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,c=t[a].y,d=t[s].x,f=t[s].y;c>r!=f>r&&n<(d-i)*(r-c)/(f-c)+i&&(o=!o)}return o}function D0(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return T0(n,t)}function zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var O0=zl,A0=ea,_0=Ul,R0=Kl,I0=oa,j0=ql,F0=$r,$0=Zl,W0=eu,L0=nu,B0=ou,V0=au,Y0=su,G0=cu,z0=lu,H0=du,ca="DropdownMenu",[U0,DS]=Te(ca,[Vl]),Fe=Vl(),[K0,mu]=U0(ca),hu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,c=Fe(t),d=l.useRef(null),[f=!1,m]=Ie({prop:o,defaultProp:a,onChange:s});return u.jsx(K0,{scope:t,triggerId:je(),triggerRef:d,contentId:je(),open:f,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),modal:i,children:u.jsx(O0,{...c,open:f,onOpenChange:m,dir:r,modal:i,children:n})})};hu.displayName=ca;var pu="DropdownMenuTrigger",gu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=mu(pu,n),s=Fe(n);return u.jsx(A0,{asChild:!0,...s,children:u.jsx(F.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:xn(t,a.triggerRef),onPointerDown:A(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:A(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});gu.displayName=pu;var q0="DropdownMenuPortal",vu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Fe(t);return u.jsx(_0,{...r,...n})};vu.displayName=q0;var yu="DropdownMenuContent",bu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mu(yu,n),a=Fe(n),s=l.useRef(!1);return u.jsx(R0,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,i=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:A(e.onInteractOutside,i=>{const c=i.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;(!o.modal||f)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bu.displayName=yu;var X0="DropdownMenuGroup",wu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(I0,{...o,...r,ref:t})});wu.displayName=X0;var Q0="DropdownMenuLabel",xu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(j0,{...o,...r,ref:t})});xu.displayName=Q0;var Z0="DropdownMenuItem",Cu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(F0,{...o,...r,ref:t})});Cu.displayName=Z0;var J0="DropdownMenuCheckboxItem",Nu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx($0,{...o,...r,ref:t})});Nu.displayName=J0;var eC="DropdownMenuRadioGroup",Mu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(W0,{...o,...r,ref:t})});Mu.displayName=eC;var tC="DropdownMenuRadioItem",Su=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(L0,{...o,...r,ref:t})});Su.displayName=tC;var nC="DropdownMenuItemIndicator",Eu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(B0,{...o,...r,ref:t})});Eu.displayName=nC;var rC="DropdownMenuSeparator",Pu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(V0,{...o,...r,ref:t})});Pu.displayName=rC;var oC="DropdownMenuArrow",aC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(Y0,{...o,...r,ref:t})});aC.displayName=oC;var sC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Fe(t),[i=!1,c]=Ie({prop:r,defaultProp:a,onChange:o});return u.jsx(G0,{...s,open:i,onOpenChange:c,children:n})},iC="DropdownMenuSubTrigger",ku=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(z0,{...o,...r,ref:t})});ku.displayName=iC;var cC="DropdownMenuSubContent",Tu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return u.jsx(H0,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Tu.displayName=cC;var lC=hu,uC=gu,Du=vu,Ou=bu,dC=wu,Au=xu,_u=Cu,Ru=Nu,fC=Mu,Iu=Su,ju=Eu,Fu=Pu,mC=sC,$u=ku,Wu=Tu;const hC=lC,pC=uC,gC=dC,vC=Du,yC=mC,bC=fC,Lu=l.forwardRef(({className:e,inset:t,children:n,...r},o)=>u.jsxs($u,{ref:o,className:O("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,u.jsx(Eo,{className:"ml-auto"})]}));Lu.displayName=$u.displayName;const Bu=l.forwardRef(({className:e,...t},n)=>u.jsx(Wu,{ref:n,className:O("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",e),...t}));Bu.displayName=Wu.displayName;const Vu=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(Du,{children:u.jsx(Ou,{ref:r,sideOffset:t,className:O("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",e),...n})}));Vu.displayName=Ou.displayName;const Yu=l.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(_u,{ref:r,className:O("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Yu.displayName=_u.displayName;const Gu=l.forwardRef(({className:e,children:t,checked:n,...r},o)=>u.jsxs(Ru,{ref:o,className:O("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(ju,{children:u.jsx(Mo,{className:"h-4 w-4"})})}),t]}));Gu.displayName=Ru.displayName;const zu=l.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Iu,{ref:r,className:O("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(ju,{children:u.jsx(Ri,{className:"h-2 w-2 fill-current"})})}),t]}));zu.displayName=Iu.displayName;const Hu=l.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(Au,{ref:r,className:O("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Hu.displayName=Au.displayName;const Uu=l.forwardRef(({className:e,...t},n)=>u.jsx(Fu,{ref:n,className:O("-mx-1 my-1 h-px bg-muted",e),...t}));Uu.displayName=Fu.displayName;const Ku=({className:e,...t})=>u.jsx("span",{className:O("ml-auto text-xs tracking-widest opacity-60",e),...t});Ku.displayName="DropdownMenuShortcut";var wC=e=>e.type==="checkbox",xC=e=>e instanceof Date,qu=e=>e==null;const CC=e=>typeof e=="object";var un=e=>!qu(e)&&!Array.isArray(e)&&CC(e)&&!xC(e),NC=e=>un(e)&&e.target?wC(e.target)?e.target.checked:e.target.value:e,MC=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,SC=(e,t)=>e.has(MC(t)),EC=e=>{const t=e.constructor&&e.constructor.prototype;return un(t)&&t.hasOwnProperty("isPrototypeOf")},PC=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function la(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(PC&&(e instanceof Blob||r))&&(n||un(e)))if(t=n?[]:{},!n&&!EC(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=la(e[o]));else return e;return t}var Xu=e=>Array.isArray(e)?e.filter(Boolean):[],ua=e=>e===void 0,Le=(e,t,n)=>{if(!t||!un(e))return n;const r=Xu(t.split(/[,[\].]+?/)).reduce((o,a)=>qu(o)?o:o[a],e);return ua(r)||r===e?ua(e[t])?n:e[t]:r},Qu=e=>typeof e=="boolean",kC=e=>/^\w*$/.test(e),TC=e=>Xu(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Zu=(e,t,n)=>{let r=-1;const o=kC(t)?[t]:TC(t),a=o.length,s=a-1;for(;++r<a;){const i=o[r];let c=n;if(r!==s){const d=e[i];c=un(d)||Array.isArray(d)?d:isNaN(+o[r+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}return e};const Ju={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ed={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},td=x.createContext(null),Lr=()=>x.useContext(td),DC=e=>{const{children:t,...n}=e;return x.createElement(td.Provider,{value:n},t)};var OC=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const s=a;return t._proxyFormState[s]!==ed.all&&(t._proxyFormState[s]=!r||ed.all),n&&(n[s]=!0),e[s]}});return o},AC=e=>un(e)&&!Object.keys(e).length,_C=(e,t,n,r)=>{n(e);const{name:o,...a}=e;return AC(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===!r)},RC=e=>Array.isArray(e)?e:[e],nd=(e,t,n)=>!e||!t||e===t||RC(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function rd(e){const t=x.useRef(e);t.current=e,x.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function IC(e){const t=Lr(),{control:n=t.control,disabled:r,name:o,exact:a}=e,[s,i]=x.useState(n._formState),c=x.useRef(!0),d=x.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=x.useRef(o);return f.current=o,rd({disabled:r,next:m=>c.current&&nd(f.current,m.name,a)&&_C(m,d.current,n._updateFormState)&&i({...n._formState,...m}),subject:n._subjects.state}),x.useEffect(()=>(c.current=!0,d.current.isValid&&n._updateValid(!0),()=>{c.current=!1}),[n]),x.useMemo(()=>OC(s,n,d.current,!1),[s,n])}var jC=e=>typeof e=="string",FC=(e,t,n,r,o)=>jC(e)?Le(n,e,o):Array.isArray(e)?e.map(a=>Le(n,a)):n;function $C(e){const t=Lr(),{control:n=t.control,name:r,defaultValue:o,disabled:a,exact:s}=e,i=x.useRef(r);i.current=r,rd({disabled:a,subject:n._subjects.values,next:f=>{nd(i.current,f.name,s)&&d(la(FC(i.current,n._names,f.values||n._formValues,!1,o)))}});const[c,d]=x.useState(n._getWatch(r,o));return x.useEffect(()=>n._removeUnmounted()),c}function WC(e){const t=Lr(),{name:n,disabled:r,control:o=t.control,shouldUnregister:a}=e,s=SC(o._names.array,n),i=$C({control:o,name:n,defaultValue:Le(o._formValues,n,Le(o._defaultValues,n,e.defaultValue)),exact:!0}),c=IC({control:o,name:n,exact:!0}),d=x.useRef(o.register(n,{...e.rules,value:i,...Qu(e.disabled)?{disabled:e.disabled}:{}})),f=x.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Le(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!Le(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Le(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Le(c.validatingFields,n)},error:{enumerable:!0,get:()=>Le(c.errors,n)}}),[c,n]),m=x.useMemo(()=>({name:n,value:i,...Qu(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:p=>d.current.onChange({target:{value:NC(p),name:n},type:Ju.CHANGE}),onBlur:()=>d.current.onBlur({target:{value:Le(o._formValues,n),name:n},type:Ju.BLUR}),ref:p=>{const h=Le(o._fields,n);h&&p&&(h._f.ref={focus:()=>p.focus(),select:()=>p.select(),setCustomValidity:v=>p.setCustomValidity(v),reportValidity:()=>p.reportValidity()})}}),[n,o._formValues,r,c.disabled,i,o._fields]);return x.useEffect(()=>{const p=o._options.shouldUnregister||a,h=(v,g)=>{const y=Le(o._fields,v);y&&y._f&&(y._f.mount=g)};if(h(n,!0),p){const v=la(Le(o._options.defaultValues,n));Zu(o._defaultValues,n,v),ua(Le(o._formValues,n))&&Zu(o._formValues,n,v)}return!s&&o.register(n),()=>{(s?p&&!o._state.action:p)?o.unregister(n):h(n,!1)}},[n,o,s,a]),x.useEffect(()=>{o._updateDisabledField({disabled:r,fields:o._fields,name:n})},[r,n,o]),x.useMemo(()=>({field:m,formState:c,fieldState:f}),[m,c,f])}const LC=e=>e.render(WC(e));var BC="Label",od=l.forwardRef((e,t)=>u.jsx(F.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));od.displayName=BC;var ad=od;const VC=Kt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),da=l.forwardRef(({className:e,...t},n)=>u.jsx(ad,{ref:n,className:O(VC(),e),...t}));da.displayName=ad.displayName;const YC=DC,sd=l.createContext({}),GC=({...e})=>u.jsx(sd.Provider,{value:{name:e.name},children:u.jsx(LC,{...e})}),Hn=()=>{const e=l.useContext(sd),t=l.useContext(id),{getFieldState:n,formState:r}=Lr(),o=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},id=l.createContext({}),cd=l.forwardRef(({className:e,...t},n)=>{const r=l.useId();return u.jsx(id.Provider,{value:{id:r},children:u.jsx("div",{ref:n,className:O("space-y-2",e),...t})})});cd.displayName="FormItem";const ld=l.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:o}=Hn();return u.jsx(da,{ref:n,className:O(r&&"text-destructive",e),htmlFor:o,...t})});ld.displayName="FormLabel";const ud=l.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:a}=Hn();return u.jsx(it,{ref:t,id:r,"aria-describedby":n?`${o} ${a}`:`${o}`,"aria-invalid":!!n,...e})});ud.displayName="FormControl";const dd=l.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Hn();return u.jsx("p",{ref:n,id:r,className:O("text-[0.8rem] text-muted-foreground",e),...t})});dd.displayName="FormDescription";const fd=l.forwardRef(({className:e,children:t,...n},r)=>{const{error:o,formMessageId:a}=Hn(),s=o?String(o==null?void 0:o.message):t;return s?u.jsx("p",{ref:r,id:a,className:O("text-[0.8rem] font-medium text-destructive",e),...n,children:s}):null});fd.displayName="FormMessage";var zC="VisuallyHidden",fa=l.forwardRef((e,t)=>u.jsx(F.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));fa.displayName=zC;var md=fa,dn="NavigationMenu",[ma,hd,HC]=Wn(dn),[ha,UC,KC]=Wn(dn),[pa,OS]=Te(dn,[HC,KC]),[qC,qe]=pa(dn),[XC,QC]=pa(dn),pd=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:s=200,skipDelayDuration:i=300,orientation:c="horizontal",dir:d,...f}=e,[m,p]=l.useState(null),h=ne(t,R=>p(R)),v=Yt(d),g=l.useRef(0),y=l.useRef(0),w=l.useRef(0),[b,C]=l.useState(!0),[M="",S]=Ie({prop:r,onChange:R=>{const $=R!=="",V=i>0;$?(window.clearTimeout(w.current),V&&C(!1)):(window.clearTimeout(w.current),w.current=window.setTimeout(()=>C(!0),i)),o==null||o(R)},defaultProp:a}),k=l.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>S(""),150)},[S]),P=l.useCallback(R=>{window.clearTimeout(y.current),S(R)},[S]),D=l.useCallback(R=>{M===R?window.clearTimeout(y.current):g.current=window.setTimeout(()=>{window.clearTimeout(y.current),S(R)},s)},[M,S,s]);return l.useEffect(()=>()=>{window.clearTimeout(g.current),window.clearTimeout(y.current),window.clearTimeout(w.current)},[]),u.jsx(vd,{scope:n,isRootMenu:!0,value:M,dir:v,orientation:c,rootNavigationMenu:m,onTriggerEnter:R=>{window.clearTimeout(g.current),b?D(R):P(R)},onTriggerLeave:()=>{window.clearTimeout(g.current),k()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:k,onItemSelect:R=>{S($=>$===R?"":R)},onItemDismiss:()=>S(""),children:u.jsx(F.nav,{"aria-label":"Main","data-orientation":c,dir:v,...f,ref:h})})});pd.displayName=dn;var gd="NavigationMenuSub",ZC=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",...i}=e,c=qe(gd,n),[d="",f]=Ie({prop:r,onChange:o,defaultProp:a});return u.jsx(vd,{scope:n,isRootMenu:!1,value:d,dir:c.dir,orientation:s,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:m=>f(m),onItemSelect:m=>f(m),onItemDismiss:()=>f(""),children:u.jsx(F.div,{"data-orientation":s,...i,ref:t})})});ZC.displayName=gd;var vd=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:s,value:i,onItemSelect:c,onItemDismiss:d,onTriggerEnter:f,onTriggerLeave:m,onContentEnter:p,onContentLeave:h}=e,[v,g]=l.useState(null),[y,w]=l.useState(new Map),[b,C]=l.useState(null);return u.jsx(qC,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:i,previousValue:$n(i),baseId:je(),dir:o,orientation:a,viewport:v,onViewportChange:g,indicatorTrack:b,onIndicatorTrackChange:C,onTriggerEnter:Ne(f),onTriggerLeave:Ne(m),onContentEnter:Ne(p),onContentLeave:Ne(h),onItemSelect:Ne(c),onItemDismiss:Ne(d),onViewportContentChange:l.useCallback((M,S)=>{w(k=>(k.set(M,S),new Map(k)))},[]),onViewportContentRemove:l.useCallback(M=>{w(S=>S.has(M)?(S.delete(M),new Map(S)):S)},[]),children:u.jsx(ma.Provider,{scope:t,children:u.jsx(XC,{scope:t,items:y,children:s})})})},yd="NavigationMenuList",bd=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=qe(yd,n),a=u.jsx(F.ul,{"data-orientation":o.orientation,...r,ref:t});return u.jsx(F.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:u.jsx(ma.Slot,{scope:n,children:o.isRootMenu?u.jsx(Dd,{asChild:!0,children:a}):a})})});bd.displayName=yd;var wd="NavigationMenuItem",[JC,xd]=pa(wd),Cd=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=je(),s=r||a||"LEGACY_REACT_AUTO_VALUE",i=l.useRef(null),c=l.useRef(null),d=l.useRef(null),f=l.useRef(()=>{}),m=l.useRef(!1),p=l.useCallback((v="start")=>{if(i.current){f.current();const g=ba(i.current);g.length&&wa(v==="start"?g:g.reverse())}},[]),h=l.useCallback(()=>{if(i.current){const v=ba(i.current);v.length&&(f.current=sN(v))}},[]);return u.jsx(JC,{scope:n,value:s,triggerRef:c,contentRef:i,focusProxyRef:d,wasEscapeCloseRef:m,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:h,onContentFocusOutside:h,children:u.jsx(F.li,{...o,ref:t})})});Cd.displayName=wd;var ga="NavigationMenuTrigger",Nd=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=qe(ga,e.__scopeNavigationMenu),s=xd(ga,e.__scopeNavigationMenu),i=l.useRef(null),c=ne(i,s.triggerRef,t),d=_d(a.baseId,s.value),f=Rd(a.baseId,s.value),m=l.useRef(!1),p=l.useRef(!1),h=s.value===a.value;return u.jsxs(u.Fragment,{children:[u.jsx(ma.ItemSlot,{scope:n,value:s.value,children:u.jsx(Ad,{asChild:!0,children:u.jsx(F.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":Ca(h),"aria-expanded":h,"aria-controls":f,...o,ref:c,onPointerEnter:A(e.onPointerEnter,()=>{p.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:A(e.onPointerMove,Vr(()=>{r||p.current||s.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(s.value),m.current=!0)})),onPointerLeave:A(e.onPointerLeave,Vr(()=>{r||(a.onTriggerLeave(),m.current=!1)})),onClick:A(e.onClick,()=>{a.onItemSelect(s.value),p.current=h}),onKeyDown:A(e.onKeyDown,v=>{const y={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];h&&v.key===y&&(s.onEntryKeyDown(),v.preventDefault())})})})}),h&&u.jsxs(u.Fragment,{children:[u.jsx(md,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:v=>{const g=s.contentRef.current,y=v.relatedTarget,w=y===i.current,b=g==null?void 0:g.contains(y);(w||!b)&&s.onFocusProxyEnter(w?"start":"end")}}),a.viewport&&u.jsx("span",{"aria-owns":f})]})]})});Nd.displayName=ga;var eN="NavigationMenuLink",Md="navigationMenu.linkSelect",Sd=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return u.jsx(Ad,{asChild:!0,children:u.jsx(F.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:A(e.onClick,s=>{const i=s.target,c=new CustomEvent(Md,{bubbles:!0,cancelable:!0});if(i.addEventListener(Md,d=>o==null?void 0:o(d),{once:!0}),rr(i,c),!c.defaultPrevented&&!s.metaKey){const d=new CustomEvent(Br,{bubbles:!0,cancelable:!0});rr(i,d)}},{checkForDefaultPrevented:!1})})})});Sd.displayName=eN;var va="NavigationMenuIndicator",Ed=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=qe(va,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Zn.createPortal(u.jsx(De,{present:n||a,children:u.jsx(tN,{...r,ref:t})}),o.indicatorTrack):null});Ed.displayName=va;var tN=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=qe(va,n),a=hd(n),[s,i]=l.useState(null),[c,d]=l.useState(null),f=o.orientation==="horizontal",m=!!o.value;l.useEffect(()=>{var g;const v=(g=a().find(y=>y.value===o.value))==null?void 0:g.ref.current;v&&i(v)},[a,o.value]);const p=()=>{s&&d({size:f?s.offsetWidth:s.offsetHeight,offset:f?s.offsetLeft:s.offsetTop})};return xa(s,p),xa(o.indicatorTrack,p),c?u.jsx(F.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),fn="NavigationMenuContent",Pd=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=qe(fn,e.__scopeNavigationMenu),a=xd(fn,e.__scopeNavigationMenu),s=ne(a.contentRef,t),i=a.value===o.value,c={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?u.jsx(nN,{forceMount:n,...c,ref:s}):u.jsx(De,{present:n||i,children:u.jsx(kd,{"data-state":Ca(i),...c,ref:s,onPointerEnter:A(e.onPointerEnter,o.onContentEnter),onPointerLeave:A(e.onPointerLeave,Vr(o.onContentLeave)),style:{pointerEvents:!i&&o.isRootMenu?"none":void 0,...c.style}})})});Pd.displayName=fn;var nN=l.forwardRef((e,t)=>{const n=qe(fn,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return Ee(()=>{r(e.value,{ref:t,...e})},[e,t,r]),Ee(()=>()=>o(e.value),[e.value,o]),null}),Br="navigationMenu.rootContentDismiss",kd=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:s,onRootContentClose:i,onContentFocusOutside:c,...d}=e,f=qe(fn,n),m=l.useRef(null),p=ne(m,t),h=_d(f.baseId,r),v=Rd(f.baseId,r),g=hd(n),y=l.useRef(null),{onItemDismiss:w}=f;l.useEffect(()=>{const C=m.current;if(f.isRootMenu&&C){const M=()=>{var S;w(),i(),C.contains(document.activeElement)&&((S=o.current)==null||S.focus())};return C.addEventListener(Br,M),()=>C.removeEventListener(Br,M)}},[f.isRootMenu,e.value,o,w,i]);const b=l.useMemo(()=>{const M=g().map($=>$.value);f.dir==="rtl"&&M.reverse();const S=M.indexOf(f.value),k=M.indexOf(f.previousValue),P=r===f.value,D=k===M.indexOf(r);if(!P&&!D)return y.current;const R=(()=>{if(S!==k){if(P&&k!==-1)return S>k?"from-end":"from-start";if(D&&S!==-1)return S>k?"to-start":"to-end"}return null})();return y.current=R,R},[f.previousValue,f.value,f.dir,g,r]);return u.jsx(Dd,{asChild:!0,children:u.jsx($t,{id:v,"aria-labelledby":h,"data-motion":b,"data-orientation":f.orientation,...d,ref:p,disableOutsidePointerEvents:!1,onDismiss:()=>{var M;const C=new Event(Br,{bubbles:!0,cancelable:!0});(M=m.current)==null||M.dispatchEvent(C)},onFocusOutside:A(e.onFocusOutside,C=>{var S;c();const M=C.target;(S=f.rootNavigationMenu)!=null&&S.contains(M)&&C.preventDefault()}),onPointerDownOutside:A(e.onPointerDownOutside,C=>{var P;const M=C.target,S=g().some(D=>{var R;return(R=D.ref.current)==null?void 0:R.contains(M)}),k=f.isRootMenu&&((P=f.viewport)==null?void 0:P.contains(M));(S||k||!f.isRootMenu)&&C.preventDefault()}),onKeyDown:A(e.onKeyDown,C=>{var k;const M=C.altKey||C.ctrlKey||C.metaKey;if(C.key==="Tab"&&!M){const P=ba(C.currentTarget),D=document.activeElement,R=P.findIndex(_=>_===D),V=C.shiftKey?P.slice(0,R).reverse():P.slice(R+1,P.length);wa(V)?C.preventDefault():(k=a.current)==null||k.focus()}}),onEscapeKeyDown:A(e.onEscapeKeyDown,C=>{s.current=!0})})})}),ya="NavigationMenuViewport",Td=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!qe(ya,e.__scopeNavigationMenu).value;return u.jsx(De,{present:n||a,children:u.jsx(rN,{...r,ref:t})})});Td.displayName=ya;var rN=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=qe(ya,n),s=ne(t,a.onViewportChange),i=QC(fn,e.__scopeNavigationMenu),[c,d]=l.useState(null),[f,m]=l.useState(null),p=c?(c==null?void 0:c.width)+"px":void 0,h=c?(c==null?void 0:c.height)+"px":void 0,v=!!a.value,g=v?a.value:a.previousValue;return xa(f,()=>{f&&d({width:f.offsetWidth,height:f.offsetHeight})}),u.jsx(F.div,{"data-state":Ca(v),"data-orientation":a.orientation,...o,ref:s,style:{pointerEvents:!v&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":p,"--radix-navigation-menu-viewport-height":h,...o.style},onPointerEnter:A(e.onPointerEnter,a.onContentEnter),onPointerLeave:A(e.onPointerLeave,Vr(a.onContentLeave)),children:Array.from(i.items).map(([w,{ref:b,forceMount:C,...M}])=>{const S=g===w;return u.jsx(De,{present:C||S,children:u.jsx(kd,{...M,ref:xn(b,k=>{S&&k&&m(k)})})},w)})})}),oN="FocusGroup",Dd=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=qe(oN,n);return u.jsx(ha.Provider,{scope:n,children:u.jsx(ha.Slot,{scope:n,children:u.jsx(F.div,{dir:o.dir,...r,ref:t})})})}),Od=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],aN="FocusGroupItem",Ad=l.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=UC(n),a=qe(aN,n);return u.jsx(ha.ItemSlot,{scope:n,children:u.jsx(F.button,{...r,ref:t,onKeyDown:A(e.onKeyDown,s=>{if(["Home","End",...Od].includes(s.key)){let c=o().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&c.reverse(),Od.includes(s.key)){const m=c.indexOf(s.currentTarget);c=c.slice(m+1)}setTimeout(()=>wa(c)),s.preventDefault()}})})})});function ba(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wa(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function sN(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function xa(e,t){const n=Ne(t);Ee(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function Ca(e){return e?"open":"closed"}function _d(e,t){return`${e}-trigger-${t}`}function Rd(e,t){return`${e}-content-${t}`}function Vr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Id=pd,jd=bd,iN=Cd,Fd=Nd,cN=Sd,$d=Ed,Wd=Pd,Ld=Td;const Bd=l.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Id,{ref:r,className:O("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,u.jsx(Na,{})]}));Bd.displayName=Id.displayName;const Vd=l.forwardRef(({className:e,...t},n)=>u.jsx(jd,{ref:n,className:O("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Vd.displayName=jd.displayName;const lN=iN,Yd=Kt("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Gd=l.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Fd,{ref:r,className:O(Yd(),"group",e),...n,children:[t," ",u.jsx(So,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Gd.displayName=Fd.displayName;const zd=l.forwardRef(({className:e,...t},n)=>u.jsx(Wd,{ref:n,className:O("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));zd.displayName=Wd.displayName;const uN=cN,Na=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{className:O("absolute left-0 top-full flex justify-center"),children:u.jsx(Ld,{className:O("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));Na.displayName=Ld.displayName;const Hd=l.forwardRef(({className:e,...t},n)=>u.jsx($d,{ref:n,className:O("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:u.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Hd.displayName=$d.displayName;const Ma=({className:e,...t})=>u.jsx("nav",{role:"navigation","aria-label":"pagination",className:O("mx-auto flex w-full justify-center",e),...t});Ma.displayName="Pagination";const Sa=l.forwardRef(({className:e,...t},n)=>u.jsx("ul",{ref:n,className:O("flex flex-row items-center gap-1",e),...t}));Sa.displayName="PaginationContent";const Un=l.forwardRef(({className:e,...t},n)=>u.jsx("li",{ref:n,className:O("",e),...t}));Un.displayName="PaginationItem";const Kn=({className:e,isActive:t,size:n="icon",...r})=>u.jsx(lt,{"aria-current":t?"page":void 0,className:O(Sn({variant:t?"default":"outline",size:n}),t?"text-primary-foreground":"text-foreground",e),...r,children:r.children});Kn.displayName="PaginationLink";const Ea=({className:e,...t})=>u.jsx(Kn,{"aria-label":"Previous page",size:"default",className:O("gap-1",e),...t,children:u.jsx(Ai,{className:"h-4 w-4"})});Ea.displayName="PaginationPrevious";const Pa=({className:e,...t})=>u.jsx(Kn,{"aria-label":"Next page",size:"default",className:O("gap-1",e),...t,children:u.jsx(Eo,{className:"h-4 w-4"})});Pa.displayName="PaginationNext";const Ud=({className:e,...t})=>u.jsxs("span",{"aria-hidden":!0,className:O("flex h-9 w-9 items-center justify-center",e),...t,children:[u.jsx(Gg,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"More pages"})]});Ud.displayName="PaginationEllipsis";var ka="Progress",Ta=100,[dN,AS]=Te(ka),[fN,mN]=dN(ka),Kd=l.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=hN,...s}=e;(o||o===0)&&!Zd(o)&&console.error(pN(`${o}`,"Progress"));const i=Zd(o)?o:Ta;r!==null&&!Jd(r,i)&&console.error(gN(`${r}`,"Progress"));const c=Jd(r,i)?r:null,d=Yr(c)?a(c,i):void 0;return u.jsx(fN,{scope:n,value:c,max:i,children:u.jsx(F.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Yr(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":Qd(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});Kd.displayName=ka;var qd="ProgressIndicator",Xd=l.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=mN(qd,n);return u.jsx(F.div,{"data-state":Qd(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Xd.displayName=qd;function hN(e,t){return`${Math.round(e/t*100)}%`}function Qd(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Yr(e){return typeof e=="number"}function Zd(e){return Yr(e)&&!isNaN(e)&&e>0}function Jd(e,t){return Yr(e)&&!isNaN(e)&&e<=t&&e>=0}function pN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ta}\`.`}function gN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
192
192
|
- a positive number
|
|
193
|
-
- less than the value passed to \`max\` (or ${
|
|
193
|
+
- less than the value passed to \`max\` (or ${Ta} if no \`max\` prop is set)
|
|
194
194
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
195
195
|
|
|
196
|
-
Defaulting to \`null\`.`}var Qu=Hu,zC=Uu;const na=l.forwardRef(({className:e,value:t,...n},r)=>d.jsx(Qu,{ref:r,className:k("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:d.jsx(zC,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));na.displayName=Qu.displayName;function UC(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:r={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:o="Show password",hidePasswordLabel:a="Hide password",strengthTitle:i="Password strength",...s}=e,[c,u]=M.useState(""),[f,m]=M.useState(!1),h=w=>{let y=0;return w.length>=8&&(y+=25),w.match(/[a-z]/)&&(y+=25),w.match(/[A-Z]/)&&(y+=25),w.match(/[0-9]/)&&(y+=25),y},g=w=>w===0?r.veryWeak:w<=25?r.weak:w<=50?r.medium:w<=75?r.strong:r.veryStrong,b=h(c),p=g(b),v=w=>{var y;u(w.target.value),(y=e.onChange)==null||y.call(e,w)};return d.jsxs("div",{className:"w-full space-y-4",children:[d.jsxs("div",{className:"relative",children:[d.jsx(Ln,{...s,type:f?"text":"password",value:c,onChange:v,className:`pr-10 ${n||""}`}),d.jsx(Ke,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>m(!f),"aria-label":f?a:o,children:f?d.jsx(Lp,{className:"h-4 w-4"}):d.jsx(Bp,{className:"h-4 w-4"})})]}),t&&d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex justify-between text-sm",children:[d.jsxs("span",{children:[i,":"]}),d.jsx("span",{children:p})]}),d.jsx(na,{value:b,className:"h-2"})]})]})}var ra="Radio",[qC,Zu]=ye(ra),[KC,XC]=qC(ra),Ju=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...f}=e,[m,h]=l.useState(null),g=J(t,v=>h(v)),b=l.useRef(!1),p=m?u||!!m.closest("form"):!0;return d.jsxs(KC,{scope:n,checked:o,disabled:i,children:[d.jsx(W.button,{type:"button",role:"radio","aria-checked":o,"data-state":nd(o),"data-disabled":i?"":void 0,disabled:i,value:s,...f,ref:g,onClick:A(e.onClick,v=>{o||c==null||c(),p&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),p&&d.jsx(QC,{control:m,bubbles:!b.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Ju.displayName=ra;var ed="RadioIndicator",td=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=XC(ed,n);return d.jsx(Te,{present:r||a.checked,children:d.jsx(W.span,{"data-state":nd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});td.displayName=ed;var QC=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=l.useRef(null),i=pr(n),s=ur(t);return l.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&m){const h=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(h)}},[i,n,r]),d.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function nd(e){return e?"checked":"unchecked"}var ZC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oa="RadioGroup",[JC,$M]=ye(oa,[Mt,Zu]),rd=Mt(),od=Zu(),[eS,tS]=JC(oa),ad=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:m,...h}=e,g=rd(n),b=Zt(u),[p,v]=ke({prop:a,defaultProp:o,onChange:m});return d.jsx(eS,{scope:n,name:r,required:i,disabled:s,value:p,onValueChange:v,children:d.jsx(xr,{asChild:!0,...g,orientation:c,dir:b,loop:f,children:d.jsx(W.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b,...h,ref:t})})})});ad.displayName=oa;var sd="RadioGroupItem",id=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=tS(sd,n),i=a.disabled||r,s=rd(n),c=od(n),u=l.useRef(null),f=J(t,u),m=a.value===o.value,h=l.useRef(!1);return l.useEffect(()=>{const g=p=>{ZC.includes(p.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",b)}},[]),d.jsx(Cr,{asChild:!0,...s,focusable:!i,active:m,children:d.jsx(Ju,{disabled:i,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:A(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:A(o.onFocus,()=>{var g;h.current&&((g=u.current)==null||g.click())})})})});id.displayName=sd;var nS="RadioGroupIndicator",cd=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=od(n);return d.jsx(td,{...o,...r,ref:t})});cd.displayName=nS;var ld=ad,ud=id,rS=cd;const dd=l.forwardRef(({className:e,...t},n)=>d.jsx(ld,{className:k("grid gap-2",e),...t,ref:n}));dd.displayName=ld.displayName;const fd=l.forwardRef(({className:e,...t},n)=>d.jsx(ud,{ref:n,className:k("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(rS,{className:"flex items-center justify-center",children:d.jsx(di,{className:"h-3.5 w-3.5 fill-primary"})})}));fd.displayName=ud.displayName;function md(e,[t,n]){return Math.min(n,Math.max(t,e))}var oS="VisuallyHidden",aa=l.forwardRef((e,t)=>d.jsx(W.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}}));aa.displayName=oS;var aS=aa,sS=[" ","Enter","ArrowUp","ArrowDown"],iS=[" ","Enter"],In="Select",[Dr,kr,cS]=_o(In),[en,LM]=ye(In,[cS,wt]),Tr=wt(),[lS,Et]=en(In),[uS,dS]=en(In),hd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:m,disabled:h,required:g,form:b}=e,p=Tr(t),[v,w]=l.useState(null),[y,C]=l.useState(null),[S,E]=l.useState(!1),D=Zt(u),[P=!1,O]=ke({prop:r,defaultProp:o,onChange:a}),[B,L]=ke({prop:i,defaultProp:s,onChange:c}),V=l.useRef(null),R=v?b||!!v.closest("form"):!0,[H,G]=l.useState(new Set),X=Array.from(H).map(j=>j.props.value).join(";");return d.jsx(vn,{...p,children:d.jsxs(lS,{required:g,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:C,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:Ae(),value:B,onValueChange:L,open:P,onOpenChange:O,dir:D,triggerPointerDownPosRef:V,disabled:h,children:[d.jsx(Dr.Provider,{scope:t,children:d.jsx(uS,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(j=>{G(z=>new Set(z).add(j))},[]),onNativeOptionRemove:l.useCallback(j=>{G(z=>{const F=new Set(z);return F.delete(j),F})},[]),children:n})}),R?d.jsxs($d,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:m,value:B,onChange:j=>L(j.target.value),disabled:h,form:b,children:[B===void 0?d.jsx("option",{value:""}):null,Array.from(H)]},X):null]})})};hd.displayName=In;var pd="SelectTrigger",gd=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Tr(n),i=Et(pd,n),s=i.disabled||r,c=J(t,i.onTriggerChange),u=kr(n),f=l.useRef("touch"),[m,h,g]=Ld(p=>{const v=u().filter(C=>!C.disabled),w=v.find(C=>C.value===i.value),y=Bd(v,p,w);y!==void 0&&i.onValueChange(y.value)}),b=p=>{s||(i.onOpenChange(!0),g()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(yn,{asChild:!0,...a,children:d.jsx(W.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Wd(i.value)?"":void 0,...o,ref:c,onClick:A(o.onClick,p=>{p.currentTarget.focus(),f.current!=="mouse"&&b(p)}),onPointerDown:A(o.onPointerDown,p=>{f.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(b(p),p.preventDefault())}),onKeyDown:A(o.onKeyDown,p=>{const v=m.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&h(p.key),!(v&&p.key===" ")&&sS.includes(p.key)&&(b(),p.preventDefault())})})})});gd.displayName=pd;var vd="SelectValue",yd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=Et(vd,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,m=J(t,c.onValueNodeChange);return Se(()=>{u(f)},[u,f]),d.jsx(W.span,{...s,ref:m,style:{pointerEvents:"none"},children:Wd(c.value)?d.jsx(d.Fragment,{children:i}):a})});yd.displayName=vd;var fS="SelectIcon",bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(W.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});bd.displayName=fS;var _t="SelectContent",wd=l.forwardRef((e,t)=>{const n=Et(_t,e.__scopeSelect),[r,o]=l.useState();if(Se(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Wn.createPortal(d.jsx(xd,{scope:e.__scopeSelect,children:d.jsx(Dr.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(Cd,{...e,ref:t})});wd.displayName=_t;var Ve=10,[xd,Pt]=en(_t),mS="SelectContentImpl",Cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:p,avoidCollisions:v,...w}=e,y=Et(_t,n),[C,S]=l.useState(null),[E,D]=l.useState(null),P=J(t,$=>S($)),[O,B]=l.useState(null),[L,V]=l.useState(null),R=kr(n),[H,G]=l.useState(!1),X=l.useRef(!1);l.useEffect(()=>{if(C)return Zn(C)},[C]),Gn();const j=l.useCallback($=>{const[ne,...ae]=R().map(te=>te.ref.current),[ee]=ae.slice(-1),re=document.activeElement;for(const te of $)if(te===re||(te==null||te.scrollIntoView({block:"nearest"}),te===ne&&E&&(E.scrollTop=0),te===ee&&E&&(E.scrollTop=E.scrollHeight),te==null||te.focus(),document.activeElement!==re))return},[R,E]),z=l.useCallback(()=>j([O,C]),[j,O,C]);l.useEffect(()=>{H&&z()},[H,z]);const{onOpenChange:F,triggerPointerDownPosRef:T}=y;l.useEffect(()=>{if(C){let $={x:0,y:0};const ne=ee=>{var re,te;$={x:Math.abs(Math.round(ee.pageX)-(((re=T.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((te=T.current)==null?void 0:te.y)??0))}},ae=ee=>{$.x<=10&&$.y<=10?ee.preventDefault():C.contains(ee.target)||F(!1),document.removeEventListener("pointermove",ne),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",ae,{capture:!0})}}},[C,F,T]),l.useEffect(()=>{const $=()=>F(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[F]);const[Z,U]=Ld($=>{const ne=R().filter(re=>!re.disabled),ae=ne.find(re=>re.ref.current===document.activeElement),ee=Bd(ne,$,ae);ee&&setTimeout(()=>ee.ref.current.focus())}),ve=l.useCallback(($,ne,ae)=>{const ee=!X.current&&!ae;(y.value!==void 0&&y.value===ne||ee)&&(B($),ee&&(X.current=!0))},[y.value]),Me=l.useCallback(()=>C==null?void 0:C.focus(),[C]),pe=l.useCallback(($,ne,ae)=>{const ee=!X.current&&!ae;(y.value!==void 0&&y.value===ne||ee)&&V($)},[y.value]),Oe=r==="popper"?sa:Sd,he=Oe===sa?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(xd,{scope:n,content:C,viewport:E,onViewportChange:D,itemRefCallback:ve,selectedItem:O,onItemLeave:Me,itemTextRefCallback:pe,focusSelectedItem:z,selectedItemText:L,position:r,isPositioned:H,searchRef:Z,children:d.jsx(fn,{as:Ue,allowPinchZoom:!0,children:d.jsx(un,{asChild:!0,trapped:y.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:A(o,$=>{var ne;(ne=y.trigger)==null||ne.focus({preventScroll:!0}),$.preventDefault()}),children:d.jsx(Ft,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(Oe,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:$=>$.preventDefault(),...w,...he,onPlaced:()=>G(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:A(w.onKeyDown,$=>{const ne=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!ne&&$.key.length===1&&U($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let ee=R().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes($.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const re=$.target,te=ee.indexOf(re);ee=ee.slice(te+1)}setTimeout(()=>j(ee)),$.preventDefault()}})})})})})})});Cd.displayName=mS;var hS="SelectItemAlignedPosition",Sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Et(_t,n),i=Pt(_t,n),[s,c]=l.useState(null),[u,f]=l.useState(null),m=J(t,P=>f(P)),h=kr(n),g=l.useRef(!1),b=l.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:w,focusSelectedItem:y}=i,C=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&p&&v&&w){const P=a.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),B=a.valueNode.getBoundingClientRect(),L=w.getBoundingClientRect();if(a.dir!=="rtl"){const re=L.left-O.left,te=B.left-re,we=P.left-te,Pe=P.width+we,Ye=Math.max(Pe,O.width),dt=window.innerWidth-Ve,Ge=md(te,[Ve,Math.max(Ve,dt-Ye)]);s.style.minWidth=Pe+"px",s.style.left=Ge+"px"}else{const re=O.right-L.right,te=window.innerWidth-B.right-re,we=window.innerWidth-P.right-te,Pe=P.width+we,Ye=Math.max(Pe,O.width),dt=window.innerWidth-Ve,Ge=md(te,[Ve,Math.max(Ve,dt-Ye)]);s.style.minWidth=Pe+"px",s.style.right=Ge+"px"}const V=h(),R=window.innerHeight-Ve*2,H=p.scrollHeight,G=window.getComputedStyle(u),X=parseInt(G.borderTopWidth,10),j=parseInt(G.paddingTop,10),z=parseInt(G.borderBottomWidth,10),F=parseInt(G.paddingBottom,10),T=X+j+H+F+z,Z=Math.min(v.offsetHeight*5,T),U=window.getComputedStyle(p),ve=parseInt(U.paddingTop,10),Me=parseInt(U.paddingBottom,10),pe=P.top+P.height/2-Ve,Oe=R-pe,he=v.offsetHeight/2,$=v.offsetTop+he,ne=X+j+$,ae=T-ne;if(ne<=pe){const re=V.length>0&&v===V[V.length-1].ref.current;s.style.bottom="0px";const te=u.clientHeight-p.offsetTop-p.offsetHeight,we=Math.max(Oe,he+(re?Me:0)+te+z),Pe=ne+we;s.style.height=Pe+"px"}else{const re=V.length>0&&v===V[0].ref.current;s.style.top="0px";const we=Math.max(pe,X+p.offsetTop+(re?ve:0)+he)+ae;s.style.height=we+"px",p.scrollTop=ne-pe+p.offsetTop}s.style.margin=`${Ve}px 0`,s.style.minHeight=Z+"px",s.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[h,a.trigger,a.valueNode,s,u,p,v,w,a.dir,r]);Se(()=>C(),[C]);const[S,E]=l.useState();Se(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(P=>{P&&b.current===!0&&(C(),y==null||y(),b.current=!1)},[C,y]);return d.jsx(gS,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:D,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(W.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Sd.displayName=hS;var pS="SelectPopperPosition",sa=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ve,...a}=e,i=Tr(n);return d.jsx(dr,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});sa.displayName=pS;var[gS,ia]=en(_t,{}),ca="SelectViewport",Md=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Pt(ca,n),i=ia(ca,n),s=J(t,a.onViewportChange),c=l.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(Dr.Slot,{scope:n,children:d.jsx(W.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:A(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&m){const g=Math.abs(c.current-f.scrollTop);if(g>0){const b=window.innerHeight-Ve*2,p=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),w=Math.max(p,v);if(w<b){const y=w+g,C=Math.min(b,y),S=y-C;m.style.height=C+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Md.displayName=ca;var Nd="SelectGroup",[vS,yS]=en(Nd),Ed=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ae();return d.jsx(vS,{scope:n,id:o,children:d.jsx(W.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ed.displayName=Nd;var Pd="SelectLabel",Dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=yS(Pd,n);return d.jsx(W.div,{id:o.id,...r,ref:t})});Dd.displayName=Pd;var Or="SelectItem",[bS,kd]=en(Or),Td=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Et(Or,n),c=Pt(Or,n),u=s.value===r,[f,m]=l.useState(a??""),[h,g]=l.useState(!1),b=J(t,y=>{var C;return(C=c.itemRefCallback)==null?void 0:C.call(c,y,r,o)}),p=Ae(),v=l.useRef("touch"),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(bS,{scope:n,value:r,disabled:o,textId:p,isSelected:u,onItemTextChange:l.useCallback(y=>{m(C=>C||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(Dr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:d.jsx(W.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:A(i.onFocus,()=>g(!0)),onBlur:A(i.onBlur,()=>g(!1)),onClick:A(i.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:A(i.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:A(i.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:A(i.onPointerMove,y=>{var C;v.current=y.pointerType,o?(C=c.onItemLeave)==null||C.call(c):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:A(i.onPointerLeave,y=>{var C;y.currentTarget===document.activeElement&&((C=c.onItemLeave)==null||C.call(c))}),onKeyDown:A(i.onKeyDown,y=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(iS.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Td.displayName=Or;var jn="SelectItemText",Od=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Et(jn,n),s=Pt(jn,n),c=kd(jn,n),u=dS(jn,n),[f,m]=l.useState(null),h=J(t,w=>m(w),c.onItemTextChange,w=>{var y;return(y=s.itemTextRefCallback)==null?void 0:y.call(s,w,c.value,c.disabled)}),g=f==null?void 0:f.textContent,b=l.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return Se(()=>(p(b),()=>v(b)),[p,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(W.span,{id:c.textId,...a,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Wn.createPortal(a.children,i.valueNode):null]})});Od.displayName=jn;var Ad="SelectItemIndicator",Rd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kd(Ad,n).isSelected?d.jsx(W.span,{"aria-hidden":!0,...r,ref:t}):null});Rd.displayName=Ad;var la="SelectScrollUpButton",_d=l.forwardRef((e,t)=>{const n=Pt(la,e.__scopeSelect),r=ia(la,e.__scopeSelect),[o,a]=l.useState(!1),i=J(t,r.onScrollButtonChange);return Se(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?d.jsx(jd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});_d.displayName=la;var ua="SelectScrollDownButton",Id=l.forwardRef((e,t)=>{const n=Pt(ua,e.__scopeSelect),r=ia(ua,e.__scopeSelect),[o,a]=l.useState(!1),i=J(t,r.onScrollButtonChange);return Se(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?d.jsx(jd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});Id.displayName=ua;var jd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Pt("SelectScrollButton",n),i=l.useRef(null),s=kr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Se(()=>{var f;const u=s().find(m=>m.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),d.jsx(W.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:A(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:A(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:A(o.onPointerLeave,()=>{c()})})}),wS="SelectSeparator",Fd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(W.div,{"aria-hidden":!0,...r,ref:t})});Fd.displayName=wS;var da="SelectArrow",xS=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Tr(n),a=Et(da,n),i=Pt(da,n);return a.open&&i.position==="popper"?d.jsx(fr,{...o,...r,ref:t}):null});xS.displayName=da;function Wd(e){return e===""||e===void 0}var $d=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),a=J(t,o),i=pr(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&f){const m=new Event("change",{bubbles:!0});f.call(s,n),s.dispatchEvent(m)}},[i,n]),d.jsx(aa,{asChild:!0,children:d.jsx("select",{...r,ref:a,defaultValue:n})})});$d.displayName="BubbleSelect";function Ld(e){const t=Re(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const s=n.current+i;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Bd(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=CS(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function CS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SS=hd,Vd=gd,MS=yd,NS=bd,Yd=wd,ES=Md,PS=Ed,Gd=Dd,Hd=Td,DS=Od,kS=Rd,zd=_d,Ud=Id,qd=Fd;const TS=SS,OS=PS,AS=MS,Kd=l.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Vd,{ref:r,className:k("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",e),...n,children:[t,d.jsx(NS,{asChild:!0,children:d.jsx(ci,{className:"h-4 w-4 opacity-50"})})]}));Kd.displayName=Vd.displayName;const fa=l.forwardRef(({className:e,...t},n)=>d.jsx(zd,{ref:n,className:k("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Ip,{className:"h-4 w-4"})}));fa.displayName=zd.displayName;const ma=l.forwardRef(({className:e,...t},n)=>d.jsx(Ud,{ref:n,className:k("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(ci,{className:"h-4 w-4"})}));ma.displayName=Ud.displayName;const Xd=l.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsxs(Yd,{ref:o,className:k("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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(fa,{}),d.jsx(ES,{className:k("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(ma,{})]}));Xd.displayName=Yd.displayName;const Qd=l.forwardRef(({className:e,...t},n)=>d.jsx(Gd,{ref:n,className:k("px-2 py-1.5 text-sm font-semibold",e),...t}));Qd.displayName=Gd.displayName;const Zd=l.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Hd,{ref:r,className:k("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",e),...n,children:[d.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(kS,{children:d.jsx(io,{className:"h-4 w-4"})})}),d.jsx(DS,{children:t})]}));Zd.displayName=Hd.displayName;const Jd=l.forwardRef(({className:e,...t},n)=>d.jsx(qd,{ref:n,className:k("-mx-1 my-1 h-px bg-muted",e),...t}));Jd.displayName=qd.displayName;const RS=({className:e,repeat:t=1,...n})=>d.jsx(d.Fragment,{children:Array.from({length:t??1}).map((r,o)=>d.jsx("div",{className:k("animate-pulse rounded-md bg-gray-700/10",e),...n},o))});var ha="Switch",[_S,BM]=ye(ha),[IS,jS]=_S(ha),ef=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:f,...m}=e,[h,g]=l.useState(null),b=J(t,C=>g(C)),p=l.useRef(!1),v=h?f||!!h.closest("form"):!0,[w=!1,y]=ke({prop:o,defaultProp:a,onChange:u});return d.jsxs(IS,{scope:n,checked:w,disabled:s,children:[d.jsx(W.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":rf(w),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:b,onClick:A(e.onClick,C=>{y(S=>!S),v&&(p.current=C.isPropagationStopped(),p.current||C.stopPropagation())})}),v&&d.jsx(FS,{control:h,bubbles:!p.current,name:r,value:c,checked:w,required:i,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});ef.displayName=ha;var tf="SwitchThumb",nf=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=jS(tf,n);return d.jsx(W.span,{"data-state":rf(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});nf.displayName=tf;var FS=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=l.useRef(null),i=pr(n),s=ur(t);return l.useEffect(()=>{const c=a.current,u=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(u,"checked").set;if(i!==n&&m){const h=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(h)}},[i,n,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function rf(e){return e?"checked":"unchecked"}var of=ef,WS=nf;const af=l.forwardRef(({className:e,...t},n)=>d.jsx(of,{className:k("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:d.jsx(WS,{className:k("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));af.displayName=of.displayName;const sf=l.forwardRef(({className:e,...t},n)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx("table",{ref:n,className:k("w-full caption-bottom text-sm",e),...t})}));sf.displayName="Table";const cf=l.forwardRef(({className:e,...t},n)=>d.jsx("thead",{ref:n,className:k("[&_tr]:border-b",e),...t}));cf.displayName="TableHeader";const lf=l.forwardRef(({className:e,...t},n)=>d.jsx("tbody",{ref:n,className:k("[&_tr:last-child]:border-0",e),...t}));lf.displayName="TableBody";const uf=l.forwardRef(({className:e,...t},n)=>d.jsx("tfoot",{ref:n,className:k("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));uf.displayName="TableFooter";const df=l.forwardRef(({className:e,...t},n)=>d.jsx("tr",{ref:n,className:k("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));df.displayName="TableRow";const ff=l.forwardRef(({className:e,...t},n)=>d.jsx("th",{ref:n,className:k("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));ff.displayName="TableHead";const mf=l.forwardRef(({className:e,...t},n)=>d.jsx("td",{ref:n,className:k("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));mf.displayName="TableCell";const hf=l.forwardRef(({className:e,...t},n)=>d.jsx("caption",{ref:n,className:k("mt-4 text-sm text-muted-foreground",e),...t}));hf.displayName="TableCaption";var pa="Tabs",[$S,VM]=ye(pa,[Mt]),pf=Mt(),[LS,ga]=$S(pa),gf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,f=Zt(s),[m,h]=ke({prop:r,onChange:o,defaultProp:a});return d.jsx(LS,{scope:n,baseId:Ae(),value:m,onValueChange:h,orientation:i,dir:f,activationMode:c,children:d.jsx(W.div,{dir:f,"data-orientation":i,...u,ref:t})})});gf.displayName=pa;var vf="TabsList",yf=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=ga(vf,n),i=pf(n);return d.jsx(xr,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(W.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});yf.displayName=vf;var bf="TabsTrigger",wf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=ga(bf,n),s=pf(n),c=Sf(i.baseId,r),u=Mf(i.baseId,r),f=r===i.value;return d.jsx(Cr,{asChild:!0,...s,focusable:!o,active:f,children:d.jsx(W.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:A(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:A(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:A(e.onFocus,()=>{const m=i.activationMode!=="manual";!f&&!o&&m&&i.onValueChange(r)})})})});wf.displayName=bf;var xf="TabsContent",Cf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=ga(xf,n),c=Sf(s.baseId,r),u=Mf(s.baseId,r),f=r===s.value,m=l.useRef(f);return l.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Te,{present:o||f,children:({present:h})=>d.jsx(W.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:h&&a})})});Cf.displayName=xf;function Sf(e,t){return`${e}-trigger-${t}`}function Mf(e,t){return`${e}-content-${t}`}var BS=gf,Nf=yf,Ef=wf,Pf=Cf;const VS=BS,Df=l.forwardRef(({className:e,...t},n)=>d.jsx(Nf,{ref:n,className:k("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Df.displayName=Nf.displayName;const kf=l.forwardRef(({className:e,...t},n)=>d.jsx(Ef,{ref:n,className:k("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));kf.displayName=Ef.displayName;const Tf=l.forwardRef(({className:e,...t},n)=>d.jsx(Pf,{ref:n,className:k("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Tf.displayName=Pf.displayName;const Of=l.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:k("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm 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",e),ref:n,...t}));Of.displayName="Textarea";var YS="Toggle",va=l.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[i=!1,s]=ke({prop:n,onChange:o,defaultProp:r});return d.jsx(W.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:A(e.onClick,()=>{e.disabled||s(!i)})})});va.displayName=YS;var Af=va;const ya=ln("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Rf=l.forwardRef(({className:e,variant:t,size:n,...r},o)=>d.jsx(Af,{ref:o,className:k(ya({variant:t,size:n,className:e})),...r}));Rf.displayName=Af.displayName;var tn="ToggleGroup",[_f,YM]=ye(tn,[Mt]),If=Mt(),ba=M.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return d.jsx(GS,{...o,ref:t})}if(n==="multiple"){const o=r;return d.jsx(HS,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${tn}\``)});ba.displayName=tn;var[jf,Ff]=_f(tn),GS=M.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=ke({prop:n,defaultProp:r,onChange:o});return d.jsx(jf,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:s,onItemDeactivate:M.useCallback(()=>s(""),[s]),children:d.jsx(Wf,{...a,ref:t})})}),HS=M.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i=[],s]=ke({prop:n,defaultProp:r,onChange:o}),c=M.useCallback(f=>s((m=[])=>[...m,f]),[s]),u=M.useCallback(f=>s((m=[])=>m.filter(h=>h!==f)),[s]);return d.jsx(jf,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:c,onItemDeactivate:u,children:d.jsx(Wf,{...a,ref:t})})});ba.displayName=tn;var[zS,US]=_f(tn),Wf=M.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:s=!0,...c}=e,u=If(n),f=Zt(i),m={role:"group",dir:f,...c};return d.jsx(zS,{scope:n,rovingFocus:o,disabled:r,children:o?d.jsx(xr,{asChild:!0,...u,orientation:a,dir:f,loop:s,children:d.jsx(W.div,{...m,ref:t})}):d.jsx(W.div,{...m,ref:t})})}),Ar="ToggleGroupItem",$f=M.forwardRef((e,t)=>{const n=Ff(Ar,e.__scopeToggleGroup),r=US(Ar,e.__scopeToggleGroup),o=If(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,s={...e,pressed:a,disabled:i},c=M.useRef(null);return r.rovingFocus?d.jsx(Cr,{asChild:!0,...o,focusable:!i,active:a,ref:c,children:d.jsx(Lf,{...s,ref:t})}):d.jsx(Lf,{...s,ref:t})});$f.displayName=Ar;var Lf=M.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Ff(Ar,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},s=a.type==="single"?i:void 0;return d.jsx(va,{...s,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Bf=ba,Vf=$f;const Yf=l.createContext({size:"default",variant:"default"}),Gf=l.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>d.jsx(Bf,{ref:a,className:k("flex items-center justify-center gap-1",e),...o,children:d.jsx(Yf.Provider,{value:{variant:t,size:n},children:r})}));Gf.displayName=Bf.displayName;const Hf=l.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const i=l.useContext(Yf);return d.jsx(Vf,{ref:a,className:k(ya({variant:i.variant||n,size:i.size||r}),e),...o,children:t})});Hf.displayName=Vf.displayName;var[Rr,GM]=ye("Tooltip",[wt]),_r=wt(),zf="TooltipProvider",qS=700,wa="tooltip.open",[KS,xa]=Rr(zf),Uf=e=>{const{__scopeTooltip:t,delayDuration:n=qS,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[i,s]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),d.jsx(KS,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:a})};Uf.displayName=zf;var Ir="Tooltip",[XS,Fn]=Rr(Ir),qf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=xa(Ir,e.__scopeTooltip),u=_r(t),[f,m]=l.useState(null),h=Ae(),g=l.useRef(0),b=i??c.disableHoverableContent,p=s??c.delayDuration,v=l.useRef(!1),[w=!1,y]=ke({prop:r,defaultProp:o,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(wa))):c.onClose(),a==null||a(P)}}),C=l.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),S=l.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),E=l.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),D=l.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},p)},[p,y]);return l.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),d.jsx(vn,{...u,children:d.jsx(XS,{scope:t,contentId:h,open:w,stateAttribute:C,trigger:f,onTriggerChange:m,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():S()},[c.isOpenDelayed,D,S]),onTriggerLeave:l.useCallback(()=>{b?E():(window.clearTimeout(g.current),g.current=0)},[E,b]),onOpen:S,onClose:E,disableHoverableContent:b,children:n})})};qf.displayName=Ir;var Ca="TooltipTrigger",Kf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Fn(Ca,n),a=xa(Ca,n),i=_r(n),s=l.useRef(null),c=J(t,s,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),m=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),d.jsx(yn,{asChild:!0,...i,children:d.jsx(W.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:A(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:A(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:A(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:A(e.onBlur,o.onClose),onClick:A(e.onClick,o.onClose)})})});Kf.displayName=Ca;var Sa="TooltipPortal",[QS,ZS]=Rr(Sa,{forceMount:void 0}),Xf=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Fn(Sa,t);return d.jsx(QS,{scope:t,forceMount:n,children:d.jsx(Te,{present:n||a.open,children:d.jsx(dn,{asChild:!0,container:o,children:r})})})};Xf.displayName=Sa;var nn="TooltipContent",Qf=l.forwardRef((e,t)=>{const n=ZS(nn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Fn(nn,e.__scopeTooltip);return d.jsx(Te,{present:r||i.open,children:i.disableHoverableContent?d.jsx(Zf,{side:o,...a,ref:t}):d.jsx(JS,{side:o,...a,ref:t})})}),JS=l.forwardRef((e,t)=>{const n=Fn(nn,e.__scopeTooltip),r=xa(nn,e.__scopeTooltip),o=l.useRef(null),a=J(t,o),[i,s]=l.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:m}=r,h=l.useCallback(()=>{s(null),m(!1)},[m]),g=l.useCallback((b,p)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},y=rM(w,v.getBoundingClientRect()),C=oM(w,y),S=aM(p.getBoundingClientRect()),E=iM([...C,...S]);s(E),m(!0)},[m]);return l.useEffect(()=>()=>h(),[h]),l.useEffect(()=>{if(c&&f){const b=v=>g(v,f),p=v=>g(v,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",p)}}},[c,f,g,h]),l.useEffect(()=>{if(i){const b=p=>{const v=p.target,w={x:p.clientX,y:p.clientY},y=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),C=!sM(w,i);y?h():C&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,h]),d.jsx(Zf,{...e,ref:a})}),[eM,tM]=Rr(Ir,{isInside:!1}),Zf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Fn(nn,n),u=_r(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(wa,f),()=>document.removeEventListener(wa,f)),[f]),l.useEffect(()=>{if(c.trigger){const m=h=>{const g=h.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),d.jsx(Ft,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:d.jsxs(dr,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Vr,{children:r}),d.jsx(eM,{scope:n,isInside:!0,children:d.jsx(aS,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Qf.displayName=nn;var Jf="TooltipArrow",nM=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=_r(n);return tM(Jf,n).isInside?null:d.jsx(fr,{...o,...r,ref:t})});nM.displayName=Jf;function rM(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function oM(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function aM(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sM(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a].x,c=t[a].y,u=t[i].x,f=t[i].y;c>r!=f>r&&n<(u-s)*(r-c)/(f-c)+s&&(o=!o)}return o}function iM(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),cM(t)}function cM(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var lM=Uf,uM=qf,dM=Kf,fM=Xf,em=Qf;const mM=lM,hM=uM,pM=dM,tm=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(fM,{children:d.jsx(em,{ref:r,sideOffset:t,className:k("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...n})}));tm.displayName=em.displayName;function gM(e){const{triggerElement:t,steps:n}=e,[r,o]=M.useState(!1),[a,i]=M.useState(0),s=()=>{i(u=>u<n.length-1?u+1:u)},c=()=>{i(u=>u>0?u-1:u)};return d.jsxs(Ao,{open:r,onOpenChange:o,children:[d.jsx(ul,{asChild:!0,children:t}),d.jsxs(gr,{className:"sm:max-w-[425px]",children:[d.jsxs(vr,{className:k(n[a].title===""&&"sr-only"),children:[d.jsx(yr,{children:n[a].title}),d.jsx(br,{className:"sr-only",children:n[a].title})]}),d.jsx("div",{children:n[a].description}),d.jsxs("div",{className:"flex items-center justify-between mt-4",children:[d.jsx(Ke,{variant:"ghost",size:"icon",onClick:c,disabled:a===0,children:d.jsx(li,{className:"h-4 w-4"})}),d.jsx("div",{className:"flex justify-center gap-1",children:n.map((u,f)=>d.jsx("div",{className:k("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),d.jsx(Ke,{variant:"ghost",size:"icon",onClick:s,disabled:a===n.length-1,children:d.jsx(co,{className:"h-4 w-4"})})]})]})]})}function vM(e){const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=mr}=e,a=i=>{let s=t,c=n;i==="prev"?s===0?(s=11,c--):s--:s===11?(s=0,c++):s++,r(s,c)};return d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(Ke,{variant:"ghost",size:"icon",onClick:()=>a("prev"),"aria-label":"Previous month",children:d.jsx(Rp,{className:"!h-8 !w-8"})}),d.jsxs("div",{className:"text-center",children:[d.jsx("h2",{className:"text-2xl font-bold capitalize",children:o.localize.month(t,{width:"wide"})}),d.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),d.jsx(Ke,{variant:"ghost",size:"icon",onClick:()=>a("next"),"aria-label":"Next month",children:d.jsx(_p,{className:"!h-8 !w-8"})})]})}function yM({currentPage:e,totalPages:t,onPageChange:n}){const r=Array.from({length:t},(o,a)=>a+1);return d.jsx(Xo,{children:d.jsxs(Qo,{children:[d.jsx(Rn,{children:d.jsx(Zo,{onClick:()=>n(Math.max(1,e-1)),disabled:e===1})}),r.map(o=>d.jsx(Rn,{children:d.jsx(_n,{onClick:()=>n(o),isActive:e===o,children:o})},o)),d.jsx(Rn,{children:d.jsx(Jo,{onClick:()=>n(Math.min(t,e+1)),disabled:e===t})})]})})}function bM(e,t=250){const[n,r]=M.useState(e);return M.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const nm=l.createContext(void 0),rm={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},om={info:{icon:Vp,className:"text-blue-500"},success:{icon:Fp,className:"text-green-500"},error:{icon:Wp,className:"text-red-500"},warning:{icon:jp,className:"text-yellow-500"},confirm:{icon:ui,className:"text-blue-500"},custom:{icon:ui,className:"text-gray-500"}};function wM({children:e}){var g,b,p;const[t,n]=l.useState({isOpen:!1,options:null}),r=l.useCallback(v=>{n({isOpen:!0,options:v})},[]),o=l.useCallback(()=>{n(v=>({...v,isOpen:!1}))},[]),a=l.useCallback(v=>{r({...v,type:"info"})},[r]),i=l.useCallback(v=>{r({...v,type:"success"})},[r]),s=l.useCallback(v=>{r({...v,type:"error"})},[r]),c=l.useCallback(v=>{r({...v,type:"warning"})},[r]),u=l.useCallback(v=>{r({...v,type:"custom"})},[r]),f=l.useCallback(v=>{r({...v,type:"confirm"})},[r]),m=(v,w)=>{let y=om[v].icon;return w&&(y=w),d.jsx(y,{className:k("h-24 w-24",om[v].className)})},h=l.useMemo(()=>({open:r,close:o,info:a,success:i,error:s,warning:c,custom:u,confirm:f}),[r,o,a,i,s,c,u,f]);return d.jsxs(nm.Provider,{value:h,children:[e,d.jsx(Ao,{open:t.isOpen,onOpenChange:v=>!v&&o(),modal:!0,children:d.jsxs(gr,{className:k((g=t.options)!=null&&g.size?rm[t.options.size]:rm.sm,(b=t.options)==null?void 0:b.className),children:[t.options&&d.jsxs(vr,{children:[d.jsx("div",{className:"mx-auto mb-6",children:m(t.options.type,t.options.icon)}),t.options.title&&d.jsx(yr,{className:"text-center",children:t.options.title}),d.jsx(br,{className:"text-center",children:t.options.message})]}),((p=t.options)==null?void 0:p.type)==="confirm"&&d.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[d.jsx(Ke,{onClick:()=>{var v,w;(w=(v=t.options)==null?void 0:v.onConfirm)==null||w.call(v),o()},children:t.options.confirmLabel||"Confirm"}),t.options.displayCancel&&d.jsx(Ke,{variant:"outline",onClick:o,children:t.options.cancelLabel||"Cancel"})]})]})})]})}function xM(){const e=l.useContext(nm);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}function CM(e){const[t,n]=M.useState(!1);return M.useEffect(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const o=()=>n(r.matches);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t}const Ma=768;function SM(){const[e,t]=l.useState(void 0);return l.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Ma-1}px)`),r=()=>{t(window.innerWidth<Ma)};return n.addEventListener("change",r),t(window.innerWidth<Ma),()=>n.removeEventListener("change",r)},[]),!!e}const MM=()=>{const[e,t]=M.useState(null),[n,r]=M.useState(!1);return M.useEffect(()=>((()=>{const i=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;r(i)})(),window.addEventListener("beforeinstallprompt",i=>{i.preventDefault(),t(i)}),window.addEventListener("appinstalled",()=>{r(!0)}),()=>{window.removeEventListener("appinstalled",()=>r(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}};N.AdaptiveInput=Bn,N.AlertDialog=Dp,N.AlertDialogAction=ai,N.AlertDialogCancel=si,N.AlertDialogContent=ei,N.AlertDialogDescription=oi,N.AlertDialogFooter=ni,N.AlertDialogHeader=ti,N.AlertDialogOverlay=so,N.AlertDialogPortal=Js,N.AlertDialogTitle=ri,N.AlertDialogTrigger=kp,N.Autocomplete=lv,N.Avatar=cc,N.AvatarFallback=uc,N.AvatarImage=lc,N.Badge=mv,N.Button=Ke,N.Calendar=Xc,N.Card=Qc,N.CardContent=tl,N.CardDescription=el,N.CardFooter=nl,N.CardHeader=Zc,N.CardTitle=Jc,N.Checkbox=cl,N.CurrencyInput=ll,N.Dialog=Ao,N.DialogClose=Vw,N.DialogContent=gr,N.DialogDescription=br,N.DialogFooter=fl,N.DialogHeader=vr,N.DialogOverlay=Ro,N.DialogPortal=dl,N.DialogProvider=wM,N.DialogTitle=yr,N.DialogTrigger=ul,N.DropdownMenu=lC,N.DropdownMenuCheckboxItem=xu,N.DropdownMenuContent=bu,N.DropdownMenuGroup=dC,N.DropdownMenuItem=wu,N.DropdownMenuLabel=Su,N.DropdownMenuPortal=fC,N.DropdownMenuRadioGroup=hC,N.DropdownMenuRadioItem=Cu,N.DropdownMenuSeparator=Mu,N.DropdownMenuShortcut=Nu,N.DropdownMenuSub=mC,N.DropdownMenuSubContent=yu,N.DropdownMenuSubTrigger=vu,N.DropdownMenuTrigger=uC,N.Form=WC,N.FormControl=Bu,N.FormDescription=Vu,N.FormField=$C,N.FormItem=$u,N.FormLabel=Lu,N.FormMessage=Yu,N.HelpCarousel=gM,N.Input=Ln,N.Label=Ko,N.MonthNavigatorComponent=vM,N.Pagination=Xo,N.PaginationContent=Qo,N.PaginationControls=yM,N.PaginationEllipsis=Gu,N.PaginationItem=Rn,N.PaginationLink=_n,N.PaginationNext=Jo,N.PaginationPrevious=Zo,N.PasswordInput=UC,N.Popover=Qi,N.PopoverAnchor=cv,N.PopoverContent=Eo,N.PopoverTrigger=Zi,N.Progress=na,N.RadioGroup=dd,N.RadioGroupItem=fd,N.Select=TS,N.SelectContent=Xd,N.SelectGroup=OS,N.SelectItem=Zd,N.SelectLabel=Qd,N.SelectScrollDownButton=ma,N.SelectScrollUpButton=fa,N.SelectSeparator=Jd,N.SelectTrigger=Kd,N.SelectValue=AS,N.Skeleton=RS,N.Switch=af,N.Table=sf,N.TableBody=lf,N.TableCaption=hf,N.TableCell=mf,N.TableFooter=uf,N.TableHead=ff,N.TableHeader=cf,N.TableRow=df,N.Tabs=VS,N.TabsContent=Tf,N.TabsList=Df,N.TabsTrigger=kf,N.Textarea=Of,N.Toggle=Rf,N.ToggleGroup=Gf,N.ToggleGroupItem=Hf,N.Tooltip=hM,N.TooltipContent=tm,N.TooltipProvider=mM,N.TooltipTrigger=pM,N.badgeVariants=dc,N.buttonVariants=mn,N.cn=k,N.formatCurrency=$m,N.formatDateAndMonth=Vm,N.formatDateAndWeekday=Lm,N.formatDateAndWeekdayAndYear=Bm,N.formatLongDate=Ym,N.formatShortDate=Gm,N.formatWeekDayAndShortDate=zm,N.getMonthYearFromISODate=Hm,N.toggleVariants=ya,N.useDebounce=bM,N.useDialog=xM,N.useFormField=An,N.useIsMobile=SM,N.useMediaQuery=CM,N.usePWAInstall=MM,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
196
|
+
Defaulting to \`null\`.`}var ef=Kd,vN=Xd;const Da=l.forwardRef(({className:e,value:t,...n},r)=>u.jsx(ef,{ref:r,className:O("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:u.jsx(vN,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Da.displayName=ef.displayName;function yN(e){const{showStrengthMeter:t=!0,className:n,strengthLabels:r={veryWeak:"Very weak",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very strong"},showPasswordLabel:o="Show password",hidePasswordLabel:a="Hide password",strengthTitle:s="Password strength",...i}=e,[c,d]=x.useState(""),[f,m]=x.useState(!1),p=w=>{let b=0;return w.length>=8&&(b+=25),w.match(/[a-z]/)&&(b+=25),w.match(/[A-Z]/)&&(b+=25),w.match(/[0-9]/)&&(b+=25),b},h=w=>w===0?r.veryWeak:w<=25?r.weak:w<=50?r.medium:w<=75?r.strong:r.veryStrong,v=p(c),g=h(v),y=w=>{var b;d(w.target.value),(b=e.onChange)==null||b.call(e,w)};return u.jsxs("div",{className:"w-full space-y-4",children:[u.jsxs("div",{className:"relative",children:[u.jsx(tr,{...i,type:f?"text":"password",value:c,onChange:y,className:`pr-10 ${n||""}`}),u.jsx(lt,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full",onClick:()=>m(!f),"aria-label":f?a:o,children:f?u.jsx(zg,{className:"h-4 w-4"}):u.jsx(Hg,{className:"h-4 w-4"})})]}),t&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex justify-between text-sm",children:[u.jsxs("span",{children:[s,":"]}),u.jsx("span",{children:g})]}),u.jsx(Da,{value:v,className:"h-2"})]})]})}var Oa="Radio",[bN,tf]=Te(Oa),[wN,xN]=bN(Oa),nf=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:c,form:d,...f}=e,[m,p]=l.useState(null),h=ne(t,y=>p(y)),v=l.useRef(!1),g=m?d||!!m.closest("form"):!0;return u.jsxs(wN,{scope:n,checked:o,disabled:s,children:[u.jsx(F.button,{type:"button",role:"radio","aria-checked":o,"data-state":af(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:h,onClick:A(e.onClick,y=>{o||c==null||c(),g&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})}),g&&u.jsx(CN,{control:m,bubbles:!v.current,name:r,value:i,checked:o,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});nf.displayName=Oa;var rf="RadioIndicator",of=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=xN(rf,n);return u.jsx(De,{present:r||a.checked,children:u.jsx(F.span,{"data-state":af(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});of.displayName=rf;var CN=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=l.useRef(null),s=$n(n),i=Sr(t);return l.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&m){const p=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(p)}},[s,n,r]),u.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function af(e){return e?"checked":"unchecked"}var NN=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Aa="RadioGroup",[MN,_S]=Te(Aa,[Rt,tf]),sf=Rt(),cf=tf(),[SN,EN]=MN(Aa),lf=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:c,dir:d,loop:f=!0,onValueChange:m,...p}=e,h=sf(n),v=Yt(d),[g,y]=Ie({prop:a,defaultProp:o,onChange:m});return u.jsx(SN,{scope:n,name:r,required:s,disabled:i,value:g,onValueChange:y,children:u.jsx(Ir,{asChild:!0,...h,orientation:c,dir:v,loop:f,children:u.jsx(F.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:v,...p,ref:t})})})});lf.displayName=Aa;var uf="RadioGroupItem",df=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=EN(uf,n),s=a.disabled||r,i=sf(n),c=cf(n),d=l.useRef(null),f=ne(t,d),m=a.value===o.value,p=l.useRef(!1);return l.useEffect(()=>{const h=g=>{NN.includes(g.key)&&(p.current=!0)},v=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),u.jsx(jr,{asChild:!0,...i,focusable:!s,active:m,children:u.jsx(nf,{disabled:s,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:A(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:A(o.onFocus,()=>{var h;p.current&&((h=d.current)==null||h.click())})})})});df.displayName=uf;var PN="RadioGroupIndicator",ff=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=cf(n);return u.jsx(of,{...o,...r,ref:t})});ff.displayName=PN;var mf=lf,hf=df,kN=ff;const pf=l.forwardRef(({className:e,...t},n)=>u.jsx(mf,{className:O("grid gap-2",e),...t,ref:n}));pf.displayName=mf.displayName;const gf=l.forwardRef(({className:e,...t},n)=>u.jsx(hf,{ref:n,className:O("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(kN,{className:"flex items-center justify-center",children:u.jsx(Ri,{className:"h-3.5 w-3.5 fill-primary"})})}));gf.displayName=hf.displayName;function vf(e,[t,n]){return Math.min(n,Math.max(t,e))}var TN=[" ","Enter","ArrowUp","ArrowDown"],DN=[" ","Enter"],qn="Select",[Gr,zr,ON]=Wn(qn),[mn,RS]=Te(qn,[ON,Dt]),Hr=Dt(),[AN,jt]=mn(qn),[_N,RN]=mn(qn),yf=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:c,dir:d,name:f,autoComplete:m,disabled:p,required:h,form:v}=e,g=Hr(t),[y,w]=l.useState(null),[b,C]=l.useState(null),[M,S]=l.useState(!1),k=Yt(d),[P=!1,D]=Ie({prop:r,defaultProp:o,onChange:a}),[R,$]=Ie({prop:s,defaultProp:i,onChange:c}),V=l.useRef(null),_=y?v||!!y.closest("form"):!0,[z,G]=l.useState(new Set),ee=Array.from(z).map(W=>W.props.value).join(";");return u.jsx(Tn,{...g,children:u.jsxs(AN,{required:h,scope:t,trigger:y,onTriggerChange:w,valueNode:b,onValueNodeChange:C,valueNodeHasChildren:M,onValueNodeHasChildrenChange:S,contentId:je(),value:R,onValueChange:$,open:P,onOpenChange:D,dir:k,triggerPointerDownPosRef:V,disabled:p,children:[u.jsx(Gr.Provider,{scope:t,children:u.jsx(_N,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(W=>{G(Y=>new Set(Y).add(W))},[]),onNativeOptionRemove:l.useCallback(W=>{G(Y=>{const L=new Set(Y);return L.delete(W),L})},[]),children:n})}),_?u.jsxs(Yf,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:m,value:R,onChange:W=>$(W.target.value),disabled:p,form:v,children:[R===void 0?u.jsx("option",{value:""}):null,Array.from(z)]},ee):null]})})};yf.displayName=qn;var bf="SelectTrigger",wf=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Hr(n),s=jt(bf,n),i=s.disabled||r,c=ne(t,s.onTriggerChange),d=zr(n),f=l.useRef("touch"),[m,p,h]=Gf(g=>{const y=d().filter(C=>!C.disabled),w=y.find(C=>C.value===s.value),b=zf(y,g,w);b!==void 0&&s.onValueChange(b.value)}),v=g=>{i||(s.onOpenChange(!0),h()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return u.jsx(Dn,{asChild:!0,...a,children:u.jsx(F.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Vf(s.value)?"":void 0,...o,ref:c,onClick:A(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&v(g)}),onPointerDown:A(o.onPointerDown,g=>{f.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:A(o.onKeyDown,g=>{const y=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(y&&g.key===" ")&&TN.includes(g.key)&&(v(),g.preventDefault())})})})});wf.displayName=bf;var xf="SelectValue",Cf=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,c=jt(xf,n),{onValueNodeHasChildrenChange:d}=c,f=a!==void 0,m=ne(t,c.onValueNodeChange);return Ee(()=>{d(f)},[d,f]),u.jsx(F.span,{...i,ref:m,style:{pointerEvents:"none"},children:Vf(c.value)?u.jsx(u.Fragment,{children:s}):a})});Cf.displayName=xf;var IN="SelectIcon",Nf=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return u.jsx(F.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Nf.displayName=IN;var zt="SelectContent",Mf=l.forwardRef((e,t)=>{const n=jt(zt,e.__scopeSelect),[r,o]=l.useState();if(Ee(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Jn.createPortal(u.jsx(Sf,{scope:e.__scopeSelect,children:u.jsx(Gr.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),a):null}return u.jsx(Ef,{...e,ref:t})});Mf.displayName=zt;var rt=10,[Sf,Ft]=mn(zt),jN="SelectContentImpl",Ef=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:c,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:y,...w}=e,b=jt(zt,n),[C,M]=l.useState(null),[S,k]=l.useState(null),P=ne(t,I=>M(I)),[D,R]=l.useState(null),[$,V]=l.useState(null),_=zr(n),[z,G]=l.useState(!1),ee=l.useRef(!1);l.useEffect(()=>{if(C)return mr(C)},[C]),ar();const W=l.useCallback(I=>{const[ie,...ce]=_().map(le=>le.ref.current),[oe]=ce.slice(-1),se=document.activeElement;for(const le of I)if(le===se||(le==null||le.scrollIntoView({block:"nearest"}),le===ie&&S&&(S.scrollTop=0),le===oe&&S&&(S.scrollTop=S.scrollHeight),le==null||le.focus(),document.activeElement!==se))return},[_,S]),Y=l.useCallback(()=>W([D,C]),[W,D,C]);l.useEffect(()=>{z&&Y()},[z,Y]);const{onOpenChange:L,triggerPointerDownPosRef:T}=b;l.useEffect(()=>{if(C){let I={x:0,y:0};const ie=oe=>{var se,le;I={x:Math.abs(Math.round(oe.pageX)-(((se=T.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((le=T.current)==null?void 0:le.y)??0))}},ce=oe=>{I.x<=10&&I.y<=10?oe.preventDefault():C.contains(oe.target)||L(!1),document.removeEventListener("pointermove",ie),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",ce,{capture:!0})}}},[C,L,T]),l.useEffect(()=>{const I=()=>L(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[L]);const[H,q]=Gf(I=>{const ie=_().filter(se=>!se.disabled),ce=ie.find(se=>se.ref.current===document.activeElement),oe=zf(ie,I,ce);oe&&setTimeout(()=>oe.ref.current.focus())}),X=l.useCallback((I,ie,ce)=>{const oe=!ee.current&&!ce;(b.value!==void 0&&b.value===ie||oe)&&(R(I),oe&&(ee.current=!0))},[b.value]),K=l.useCallback(()=>C==null?void 0:C.focus(),[C]),Z=l.useCallback((I,ie,ce)=>{const oe=!ee.current&&!ce;(b.value!==void 0&&b.value===ie||oe)&&V(I)},[b.value]),me=r==="popper"?_a:Pf,ge=me===_a?{side:i,sideOffset:c,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:v,hideWhenDetached:g,avoidCollisions:y}:{};return u.jsx(Sf,{scope:n,content:C,viewport:S,onViewportChange:k,itemRefCallback:X,selectedItem:D,onItemLeave:K,itemTextRefCallback:Z,focusSelectedItem:Y,selectedItemText:$,position:r,isPositioned:z,searchRef:H,children:u.jsx(Mn,{as:it,allowPinchZoom:!0,children:u.jsx(Cn,{asChild:!0,trapped:b.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:A(o,I=>{var ie;(ie=b.trigger)==null||ie.focus({preventScroll:!0}),I.preventDefault()}),children:u.jsx($t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:u.jsx(me,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:I=>I.preventDefault(),...w,...ge,onPlaced:()=>G(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:A(w.onKeyDown,I=>{const ie=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!ie&&I.key.length===1&&q(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let oe=_().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(I.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){const se=I.target,le=oe.indexOf(se);oe=oe.slice(le+1)}setTimeout(()=>W(oe)),I.preventDefault()}})})})})})})});Ef.displayName=jN;var FN="SelectItemAlignedPosition",Pf=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=jt(zt,n),s=Ft(zt,n),[i,c]=l.useState(null),[d,f]=l.useState(null),m=ne(t,P=>f(P)),p=zr(n),h=l.useRef(!1),v=l.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:w,focusSelectedItem:b}=s,C=l.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&g&&y&&w){const P=a.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),$=w.getBoundingClientRect();if(a.dir!=="rtl"){const se=$.left-D.left,le=R.left-se,Me=P.left-le,Re=P.width+Me,$e=Math.max(Re,D.width),ot=window.innerWidth-rt,Be=vf(le,[rt,Math.max(rt,ot-$e)]);i.style.minWidth=Re+"px",i.style.left=Be+"px"}else{const se=D.right-$.right,le=window.innerWidth-R.right-se,Me=window.innerWidth-P.right-le,Re=P.width+Me,$e=Math.max(Re,D.width),ot=window.innerWidth-rt,Be=vf(le,[rt,Math.max(rt,ot-$e)]);i.style.minWidth=Re+"px",i.style.right=Be+"px"}const V=p(),_=window.innerHeight-rt*2,z=g.scrollHeight,G=window.getComputedStyle(d),ee=parseInt(G.borderTopWidth,10),W=parseInt(G.paddingTop,10),Y=parseInt(G.borderBottomWidth,10),L=parseInt(G.paddingBottom,10),T=ee+W+z+L+Y,H=Math.min(y.offsetHeight*5,T),q=window.getComputedStyle(g),X=parseInt(q.paddingTop,10),K=parseInt(q.paddingBottom,10),Z=P.top+P.height/2-rt,me=_-Z,ge=y.offsetHeight/2,I=y.offsetTop+ge,ie=ee+W+I,ce=T-ie;if(ie<=Z){const se=V.length>0&&y===V[V.length-1].ref.current;i.style.bottom="0px";const le=d.clientHeight-g.offsetTop-g.offsetHeight,Me=Math.max(me,ge+(se?K:0)+le+Y),Re=ie+Me;i.style.height=Re+"px"}else{const se=V.length>0&&y===V[0].ref.current;i.style.top="0px";const Me=Math.max(Z,ee+g.offsetTop+(se?X:0)+ge)+ce;i.style.height=Me+"px",g.scrollTop=ie-Z+g.offsetTop}i.style.margin=`${rt}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=_+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,i,d,g,y,w,a.dir,r]);Ee(()=>C(),[C]);const[M,S]=l.useState();Ee(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const k=l.useCallback(P=>{P&&v.current===!0&&(C(),b==null||b(),v.current=!1)},[C,b]);return u.jsx(WN,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:u.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:u.jsx(F.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Pf.displayName=FN;var $N="SelectPopperPosition",_a=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=rt,...a}=e,s=Hr(n);return u.jsx(Er,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});_a.displayName=$N;var[WN,Ra]=mn(zt,{}),Ia="SelectViewport",kf=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ft(Ia,n),s=Ra(Ia,n),i=ne(t,a.onViewportChange),c=l.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),u.jsx(Gr.Slot,{scope:n,children:u.jsx(F.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:A(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&m){const h=Math.abs(c.current-f.scrollTop);if(h>0){const v=window.innerHeight-rt*2,g=parseFloat(m.style.minHeight),y=parseFloat(m.style.height),w=Math.max(g,y);if(w<v){const b=w+h,C=Math.min(v,b),M=b-C;m.style.height=C+"px",m.style.bottom==="0px"&&(f.scrollTop=M>0?M:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});kf.displayName=Ia;var Tf="SelectGroup",[LN,BN]=mn(Tf),Df=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=je();return u.jsx(LN,{scope:n,id:o,children:u.jsx(F.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Df.displayName=Tf;var Of="SelectLabel",Af=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=BN(Of,n);return u.jsx(F.div,{id:o.id,...r,ref:t})});Af.displayName=Of;var Ur="SelectItem",[VN,_f]=mn(Ur),Rf=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=jt(Ur,n),c=Ft(Ur,n),d=i.value===r,[f,m]=l.useState(a??""),[p,h]=l.useState(!1),v=ne(t,b=>{var C;return(C=c.itemRefCallback)==null?void 0:C.call(c,b,r,o)}),g=je(),y=l.useRef("touch"),w=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(VN,{scope:n,value:r,disabled:o,textId:g,isSelected:d,onItemTextChange:l.useCallback(b=>{m(C=>C||((b==null?void 0:b.textContent)??"").trim())},[]),children:u.jsx(Gr.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:u.jsx(F.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:A(s.onFocus,()=>h(!0)),onBlur:A(s.onBlur,()=>h(!1)),onClick:A(s.onClick,()=>{y.current!=="mouse"&&w()}),onPointerUp:A(s.onPointerUp,()=>{y.current==="mouse"&&w()}),onPointerDown:A(s.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:A(s.onPointerMove,b=>{var C;y.current=b.pointerType,o?(C=c.onItemLeave)==null||C.call(c):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:A(s.onPointerLeave,b=>{var C;b.currentTarget===document.activeElement&&((C=c.onItemLeave)==null||C.call(c))}),onKeyDown:A(s.onKeyDown,b=>{var M;((M=c.searchRef)==null?void 0:M.current)!==""&&b.key===" "||(DN.includes(b.key)&&w(),b.key===" "&&b.preventDefault())})})})})});Rf.displayName=Ur;var Xn="SelectItemText",If=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=jt(Xn,n),i=Ft(Xn,n),c=_f(Xn,n),d=RN(Xn,n),[f,m]=l.useState(null),p=ne(t,w=>m(w),c.onItemTextChange,w=>{var b;return(b=i.itemTextRefCallback)==null?void 0:b.call(i,w,c.value,c.disabled)}),h=f==null?void 0:f.textContent,v=l.useMemo(()=>u.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=d;return Ee(()=>(g(v),()=>y(v)),[g,y,v]),u.jsxs(u.Fragment,{children:[u.jsx(F.span,{id:c.textId,...a,ref:p}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Jn.createPortal(a.children,s.valueNode):null]})});If.displayName=Xn;var jf="SelectItemIndicator",Ff=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _f(jf,n).isSelected?u.jsx(F.span,{"aria-hidden":!0,...r,ref:t}):null});Ff.displayName=jf;var ja="SelectScrollUpButton",$f=l.forwardRef((e,t)=>{const n=Ft(ja,e.__scopeSelect),r=Ra(ja,e.__scopeSelect),[o,a]=l.useState(!1),s=ne(t,r.onScrollButtonChange);return Ee(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollTop>0;a(d)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(Lf,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});$f.displayName=ja;var Fa="SelectScrollDownButton",Wf=l.forwardRef((e,t)=>{const n=Ft(Fa,e.__scopeSelect),r=Ra(Fa,e.__scopeSelect),[o,a]=l.useState(!1),s=ne(t,r.onScrollButtonChange);return Ee(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<d;a(f)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?u.jsx(Lf,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});Wf.displayName=Fa;var Lf=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ft("SelectScrollButton",n),s=l.useRef(null),i=zr(n),c=l.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Ee(()=>{var f;const d=i().find(m=>m.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),u.jsx(F.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:A(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:A(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:A(o.onPointerLeave,()=>{c()})})}),YN="SelectSeparator",Bf=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(F.div,{"aria-hidden":!0,...r,ref:t})});Bf.displayName=YN;var $a="SelectArrow",GN=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(n),a=jt($a,n),s=Ft($a,n);return a.open&&s.position==="popper"?u.jsx(Pr,{...o,...r,ref:t}):null});GN.displayName=$a;function Vf(e){return e===""||e===void 0}var Yf=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),a=ne(t,o),s=$n(n);return l.useEffect(()=>{const i=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==n&&f){const m=new Event("change",{bubbles:!0});f.call(i,n),i.dispatchEvent(m)}},[s,n]),u.jsx(fa,{asChild:!0,children:u.jsx("select",{...r,ref:a,defaultValue:n})})});Yf.displayName="BubbleSelect";function Gf(e){const t=Ne(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(s=>{const i=n.current+s;t(i),function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(i)},[t]),a=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function zf(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=zN(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const c=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function zN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var HN=yf,Hf=wf,UN=Cf,KN=Nf,Uf=Mf,qN=kf,XN=Df,Kf=Af,qf=Rf,QN=If,ZN=Ff,Xf=$f,Qf=Wf,Zf=Bf;const JN=HN,eM=XN,tM=UN,Jf=l.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(Hf,{ref:r,className:O("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",e),...n,children:[t,u.jsx(KN,{asChild:!0,children:u.jsx(So,{className:"h-4 w-4 opacity-50"})})]}));Jf.displayName=Hf.displayName;const Wa=l.forwardRef(({className:e,...t},n)=>u.jsx(Xf,{ref:n,className:O("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(Lg,{className:"h-4 w-4"})}));Wa.displayName=Xf.displayName;const La=l.forwardRef(({className:e,...t},n)=>u.jsx(Qf,{ref:n,className:O("flex cursor-default items-center justify-center py-1",e),...t,children:u.jsx(So,{className:"h-4 w-4"})}));La.displayName=Qf.displayName;const em=l.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>u.jsxs(Uf,{ref:o,className:O("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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[u.jsx(Wa,{}),u.jsx(qN,{className:O("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),u.jsx(La,{})]}));em.displayName=Uf.displayName;const tm=l.forwardRef(({className:e,...t},n)=>u.jsx(Kf,{ref:n,className:O("px-2 py-1.5 text-sm font-semibold",e),...t}));tm.displayName=Kf.displayName;const nm=l.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(qf,{ref:r,className:O("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",e),...n,children:[u.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(ZN,{children:u.jsx(Mo,{className:"h-4 w-4"})})}),u.jsx(QN,{children:t})]}));nm.displayName=qf.displayName;const rm=l.forwardRef(({className:e,...t},n)=>u.jsx(Zf,{ref:n,className:O("-mx-1 my-1 h-px bg-muted",e),...t}));rm.displayName=Zf.displayName;const nM=({className:e,repeat:t=1,...n})=>u.jsx(u.Fragment,{children:Array.from({length:t??1}).map((r,o)=>u.jsx("div",{className:O("animate-pulse rounded-md bg-gray-700/10",e),...n},o))});var Ba="Switch",[rM,IS]=Te(Ba),[oM,aM]=rM(Ba),om=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:d,form:f,...m}=e,[p,h]=l.useState(null),v=ne(t,C=>h(C)),g=l.useRef(!1),y=p?f||!!p.closest("form"):!0,[w=!1,b]=Ie({prop:o,defaultProp:a,onChange:d});return u.jsxs(oM,{scope:n,checked:w,disabled:i,children:[u.jsx(F.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":im(w),"data-disabled":i?"":void 0,disabled:i,value:c,...m,ref:v,onClick:A(e.onClick,C=>{b(M=>!M),y&&(g.current=C.isPropagationStopped(),g.current||C.stopPropagation())})}),y&&u.jsx(sM,{control:p,bubbles:!g.current,name:r,value:c,checked:w,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});om.displayName=Ba;var am="SwitchThumb",sm=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=aM(am,n);return u.jsx(F.span,{"data-state":im(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});sm.displayName=am;var sM=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,a=l.useRef(null),s=$n(n),i=Sr(t);return l.useEffect(()=>{const c=a.current,d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(s!==n&&m){const p=new Event("click",{bubbles:r});m.call(c,n),c.dispatchEvent(p)}},[s,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...e.style,...i,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function im(e){return e?"checked":"unchecked"}var cm=om,iM=sm;const lm=l.forwardRef(({className:e,...t},n)=>u.jsx(cm,{className:O("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:u.jsx(iM,{className:O("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));lm.displayName=cm.displayName;const um=l.forwardRef(({className:e,...t},n)=>u.jsx("div",{className:"relative w-full overflow-auto",children:u.jsx("table",{ref:n,className:O("w-full caption-bottom text-sm",e),...t})}));um.displayName="Table";const dm=l.forwardRef(({className:e,...t},n)=>u.jsx("thead",{ref:n,className:O("[&_tr]:border-b",e),...t}));dm.displayName="TableHeader";const fm=l.forwardRef(({className:e,...t},n)=>u.jsx("tbody",{ref:n,className:O("[&_tr:last-child]:border-0",e),...t}));fm.displayName="TableBody";const mm=l.forwardRef(({className:e,...t},n)=>u.jsx("tfoot",{ref:n,className:O("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));mm.displayName="TableFooter";const hm=l.forwardRef(({className:e,...t},n)=>u.jsx("tr",{ref:n,className:O("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));hm.displayName="TableRow";const pm=l.forwardRef(({className:e,...t},n)=>u.jsx("th",{ref:n,className:O("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));pm.displayName="TableHead";const gm=l.forwardRef(({className:e,...t},n)=>u.jsx("td",{ref:n,className:O("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));gm.displayName="TableCell";const vm=l.forwardRef(({className:e,...t},n)=>u.jsx("caption",{ref:n,className:O("mt-4 text-sm text-muted-foreground",e),...t}));vm.displayName="TableCaption";var Va="Tabs",[cM,jS]=Te(Va,[Rt]),ym=Rt(),[lM,Ya]=cM(Va),bm=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:c="automatic",...d}=e,f=Yt(i),[m,p]=Ie({prop:r,onChange:o,defaultProp:a});return u.jsx(lM,{scope:n,baseId:je(),value:m,onValueChange:p,orientation:s,dir:f,activationMode:c,children:u.jsx(F.div,{dir:f,"data-orientation":s,...d,ref:t})})});bm.displayName=Va;var wm="TabsList",xm=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ya(wm,n),s=ym(n);return u.jsx(Ir,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:u.jsx(F.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});xm.displayName=wm;var Cm="TabsTrigger",Nm=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ya(Cm,n),i=ym(n),c=Em(s.baseId,r),d=Pm(s.baseId,r),f=r===s.value;return u.jsx(jr,{asChild:!0,...i,focusable:!o,active:f,children:u.jsx(F.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":d,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:A(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?s.onValueChange(r):m.preventDefault()}),onKeyDown:A(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&s.onValueChange(r)}),onFocus:A(e.onFocus,()=>{const m=s.activationMode!=="manual";!f&&!o&&m&&s.onValueChange(r)})})})});Nm.displayName=Cm;var Mm="TabsContent",Sm=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Ya(Mm,n),c=Em(i.baseId,r),d=Pm(i.baseId,r),f=r===i.value,m=l.useRef(f);return l.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),u.jsx(De,{present:o||f,children:({present:p})=>u.jsx(F.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:p&&a})})});Sm.displayName=Mm;function Em(e,t){return`${e}-trigger-${t}`}function Pm(e,t){return`${e}-content-${t}`}var uM=bm,km=xm,Tm=Nm,Dm=Sm;const dM=uM,Om=l.forwardRef(({className:e,...t},n)=>u.jsx(km,{ref:n,className:O("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Om.displayName=km.displayName;const Am=l.forwardRef(({className:e,...t},n)=>u.jsx(Tm,{ref:n,className:O("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Am.displayName=Tm.displayName;const _m=l.forwardRef(({className:e,...t},n)=>u.jsx(Dm,{ref:n,className:O("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));_m.displayName=Dm.displayName;const Rm=l.forwardRef(({className:e,...t},n)=>u.jsx("textarea",{className:O("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm 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",e),ref:n,...t}));Rm.displayName="Textarea";var fM=e=>{switch(e){case"success":return pM;case"info":return vM;case"warning":return gM;case"error":return yM;default:return null}},mM=Array(12).fill(0),hM=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},mM.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),vM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),bM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),wM=()=>{let[e,t]=x.useState(document.hidden);return x.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ga=1,xM=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ga++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async c=>{if(a=["resolve",c],x.isValidElement(c))o=!1,this.create({id:n,type:"default",message:c});else if(NM(c)&&!c.ok){o=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){o=!1;let d=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){o=!1;let d=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var c;o&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),i=()=>new Promise((c,d)=>s.then(()=>a[0]==="reject"?d(a[1]):c(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ga++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},He=new xM,CM=(e,t)=>{let n=(t==null?void 0:t.id)||Ga++;return He.addToast({title:e,...t,id:n}),n},NM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",MM=CM,SM=()=>He.toasts,EM=Object.assign(MM,{success:He.success,info:He.info,warning:He.warning,error:He.error,custom:He.custom,message:He.message,promise:He.promise,dismiss:He.dismiss,loading:He.loading},{getHistory:SM});function PM(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}PM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
197
|
+
`);function Kr(e){return e.label!==void 0}var kM=3,TM="32px",Im=4e3,DM=356,OM=14,AM=20,_M=200;function RM(...e){return e.filter(Boolean).join(" ")}var IM=e=>{var t,n,r,o,a,s,i,c,d,f,m;let{invert:p,toast:h,unstyled:v,interacting:g,setHeights:y,visibleToasts:w,heights:b,index:C,toasts:M,expanded:S,removeToast:k,defaultRichColors:P,closeButton:D,style:R,cancelButtonStyle:$,actionButtonStyle:V,className:_="",descriptionClassName:z="",duration:G,position:ee,gap:W,loadingIcon:Y,expandByDefault:L,classNames:T,icons:H,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:X,cn:K}=e,[Z,me]=x.useState(!1),[ge,I]=x.useState(!1),[ie,ce]=x.useState(!1),[oe,se]=x.useState(!1),[le,Me]=x.useState(!1),[Re,$e]=x.useState(0),[ot,Be]=x.useState(0),at=x.useRef(h.duration||G||Im),Xe=x.useRef(null),st=x.useRef(null),N=C===0,B=C+1<=w,j=h.type,ae=h.dismissible!==!1,Pe=h.className||"",ye=h.descriptionClassName||"",Q=x.useMemo(()=>b.findIndex(te=>te.toastId===h.id)||0,[b,h.id]),Ue=x.useMemo(()=>{var te;return(te=h.closeButton)!=null?te:D},[h.closeButton,D]);x.useMemo(()=>h.duration||G||Im,[h.duration,G]);let Qe=x.useRef(0),Ce=x.useRef(0),Ze=x.useRef(0),J=x.useRef(null),[ue,de]=ee.split("-"),Se=x.useMemo(()=>b.reduce((te,he,we)=>we>=Q?te:te+he.height,0),[b,Q]),Ve=wM(),gn=h.invert||p,ke=j==="loading";Ce.current=x.useMemo(()=>Q*W+Se,[Q,Se]),x.useEffect(()=>{me(!0)},[]),x.useEffect(()=>{let te=st.current;if(te){let he=te.getBoundingClientRect().height;return Be(he),y(we=>[{toastId:h.id,height:he,position:h.position},...we]),()=>y(we=>we.filter(We=>We.toastId!==h.id))}},[y,h.id]),x.useLayoutEffect(()=>{if(!Z)return;let te=st.current,he=te.style.height;te.style.height="auto";let we=te.getBoundingClientRect().height;te.style.height=he,Be(we),y(We=>We.find(Ye=>Ye.toastId===h.id)?We.map(Ye=>Ye.toastId===h.id?{...Ye,height:we}:Ye):[{toastId:h.id,height:we,position:h.position},...We])},[Z,h.title,h.description,y,h.id]);let Ae=x.useCallback(()=>{I(!0),$e(Ce.current),y(te=>te.filter(he=>he.toastId!==h.id)),setTimeout(()=>{k(h)},_M)},[h,k,y,Ce]);x.useEffect(()=>{if(h.promise&&j==="loading"||h.duration===1/0||h.type==="loading")return;let te;return S||g||X&&Ve?(()=>{if(Ze.current<Qe.current){let he=new Date().getTime()-Qe.current;at.current=at.current-he}Ze.current=new Date().getTime()})():at.current!==1/0&&(Qe.current=new Date().getTime(),te=setTimeout(()=>{var he;(he=h.onAutoClose)==null||he.call(h,h),Ae()},at.current)),()=>clearTimeout(te)},[S,g,h,j,X,Ve,Ae]),x.useEffect(()=>{h.delete&&Ae()},[Ae,h.delete]);function fe(){var te,he,we;return H!=null&&H.loading?x.createElement("div",{className:K(T==null?void 0:T.loader,(te=h==null?void 0:h.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":j==="loading"},H.loading):Y?x.createElement("div",{className:K(T==null?void 0:T.loader,(he=h==null?void 0:h.classNames)==null?void 0:he.loader,"sonner-loader"),"data-visible":j==="loading"},Y):x.createElement(hM,{className:K(T==null?void 0:T.loader,(we=h==null?void 0:h.classNames)==null?void 0:we.loader),visible:j==="loading"})}return x.createElement("li",{tabIndex:0,ref:st,className:K(_,Pe,T==null?void 0:T.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[j],(n=h==null?void 0:h.classNames)==null?void 0:n[j]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:P,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":Z,"data-promise":!!h.promise,"data-swiped":le,"data-removed":ge,"data-visible":B,"data-y-position":ue,"data-x-position":de,"data-index":C,"data-front":N,"data-swiping":ie,"data-dismissible":ae,"data-type":j,"data-invert":gn,"data-swipe-out":oe,"data-expanded":!!(S||L&&Z),style:{"--index":C,"--toasts-before":C,"--z-index":M.length-C,"--offset":`${ge?Re:Ce.current}px`,"--initial-height":L?"auto":`${ot}px`,...R,...h.style},onPointerDown:te=>{ke||!ae||(Xe.current=new Date,$e(Ce.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(ce(!0),J.current={x:te.clientX,y:te.clientY}))},onPointerUp:()=>{var te,he,we,We;if(oe||!ae)return;J.current=null;let Ye=Number(((te=st.current)==null?void 0:te.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Jr=new Date().getTime()-((he=Xe.current)==null?void 0:he.getTime()),wS=Math.abs(Ye)/Jr;if(Math.abs(Ye)>=AM||wS>.11){$e(Ce.current),(we=h.onDismiss)==null||we.call(h,h),Ae(),se(!0),Me(!1);return}(We=st.current)==null||We.style.setProperty("--swipe-amount","0px"),ce(!1)},onPointerMove:te=>{var he,we;if(!J.current||!ae)return;let We=te.clientY-J.current.y,Ye=((he=window.getSelection())==null?void 0:he.toString().length)>0,Jr=ue==="top"?Math.min(0,We):Math.max(0,We);Math.abs(Jr)>0&&Me(!0),!Ye&&((we=st.current)==null||we.style.setProperty("--swipe-amount",`${Jr}px`))}},Ue&&!h.jsx?x.createElement("button",{"aria-label":q,"data-disabled":ke,"data-close-button":!0,onClick:ke||!ae?()=>{}:()=>{var te;Ae(),(te=h.onDismiss)==null||te.call(h,h)},className:K(T==null?void 0:T.closeButton,(o=h==null?void 0:h.classNames)==null?void 0:o.closeButton)},(a=H==null?void 0:H.close)!=null?a:bM):null,h.jsx||x.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:x.createElement(x.Fragment,null,j||h.icon||h.promise?x.createElement("div",{"data-icon":"",className:K(T==null?void 0:T.icon,(s=h==null?void 0:h.classNames)==null?void 0:s.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||fe():null,h.type!=="loading"?h.icon||(H==null?void 0:H[j])||fM(j):null):null,x.createElement("div",{"data-content":"",className:K(T==null?void 0:T.content,(i=h==null?void 0:h.classNames)==null?void 0:i.content)},x.createElement("div",{"data-title":"",className:K(T==null?void 0:T.title,(c=h==null?void 0:h.classNames)==null?void 0:c.title)},typeof h.title=="function"?h.title():h.title),h.description?x.createElement("div",{"data-description":"",className:K(z,ye,T==null?void 0:T.description,(d=h==null?void 0:h.classNames)==null?void 0:d.description)},typeof h.description=="function"?h.description():h.description):null),x.isValidElement(h.cancel)?h.cancel:h.cancel&&Kr(h.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||$,onClick:te=>{var he,we;Kr(h.cancel)&&ae&&((we=(he=h.cancel).onClick)==null||we.call(he,te),Ae())},className:K(T==null?void 0:T.cancelButton,(f=h==null?void 0:h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,x.isValidElement(h.action)?h.action:h.action&&Kr(h.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||V,onClick:te=>{var he,we;Kr(h.action)&&((we=(he=h.action).onClick)==null||we.call(he,te),!te.defaultPrevented&&Ae())},className:K(T==null?void 0:T.actionButton,(m=h==null?void 0:h.classNames)==null?void 0:m.actionButton)},h.action.label):null))};function jm(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var jM=x.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:c,theme:d="light",richColors:f,duration:m,style:p,visibleToasts:h=kM,toastOptions:v,dir:g=jm(),gap:y=OM,loadingIcon:w,icons:b,containerAriaLabel:C="Notifications",pauseWhenPageIsHidden:M,cn:S=RM}=e,[k,P]=x.useState([]),D=x.useMemo(()=>Array.from(new Set([r].concat(k.filter(X=>X.position).map(X=>X.position)))),[k,r]),[R,$]=x.useState([]),[V,_]=x.useState(!1),[z,G]=x.useState(!1),[ee,W]=x.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=x.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=x.useRef(null),H=x.useRef(!1),q=x.useCallback(X=>{P(K=>{var Z;return(Z=K.find(me=>me.id===X.id))!=null&&Z.delete||He.dismiss(X.id),K.filter(({id:me})=>me!==X.id)})},[]);return x.useEffect(()=>He.subscribe(X=>{if(X.dismiss){P(K=>K.map(Z=>Z.id===X.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{Zn.flushSync(()=>{P(K=>{let Z=K.findIndex(me=>me.id===X.id);return Z!==-1?[...K.slice(0,Z),{...K[Z],...X},...K.slice(Z+1)]:[X,...K]})})})}),[]),x.useEffect(()=>{if(d!=="system"){W(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;let X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:K})=>{W(K?"dark":"light")})}catch{X.addListener(({matches:Z})=>{try{W(Z?"dark":"light")}catch(me){console.error(me)}})}},[d]),x.useEffect(()=>{k.length<=1&&_(!1)},[k]),x.useEffect(()=>{let X=K=>{var Z,me;o.every(ge=>K[ge]||K.code===ge)&&(_(!0),(Z=Y.current)==null||Z.focus()),K.code==="Escape"&&(document.activeElement===Y.current||(me=Y.current)!=null&&me.contains(document.activeElement))&&_(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[o]),x.useEffect(()=>{if(Y.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,H.current=!1)}},[Y.current]),x.createElement("section",{"aria-label":`${C} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},D.map((X,K)=>{var Z;let[me,ge]=X.split("-");return k.length?x.createElement("ol",{key:X,dir:g==="auto"?jm():g,tabIndex:-1,ref:Y,className:i,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":me,"data-lifted":V&&k.length>1&&!a,"data-x-position":ge,style:{"--front-toast-height":`${((Z=R[0])==null?void 0:Z.height)||0}px`,"--offset":typeof c=="number"?`${c}px`:c||TM,"--width":`${DM}px`,"--gap":`${y}px`,...p},onBlur:I=>{H.current&&!I.currentTarget.contains(I.relatedTarget)&&(H.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||H.current||(H.current=!0,T.current=I.relatedTarget)},onMouseEnter:()=>_(!0),onMouseMove:()=>_(!0),onMouseLeave:()=>{z||_(!1)},onPointerDown:I=>{I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||G(!0)},onPointerUp:()=>G(!1)},k.filter(I=>!I.position&&K===0||I.position===X).map((I,ie)=>{var ce,oe;return x.createElement(IM,{key:I.id,icons:b,index:ie,toast:I,defaultRichColors:f,duration:(ce=v==null?void 0:v.duration)!=null?ce:m,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:h,closeButton:(oe=v==null?void 0:v.closeButton)!=null?oe:s,interacting:z,position:X,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:q,toasts:k.filter(se=>se.position==I.position),heights:R.filter(se=>se.position==I.position),setHeights:$,expandByDefault:a,gap:y,loadingIcon:w,expanded:V,pauseWhenPageIsHidden:M,cn:S})})):null}))});const FM=({...e})=>u.jsx(jM,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e});var $M="Toggle",za=l.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...a}=e,[s=!1,i]=Ie({prop:n,onChange:o,defaultProp:r});return u.jsx(F.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:A(e.onClick,()=>{e.disabled||i(!s)})})});za.displayName=$M;var Fm=za;const Ha=Kt("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),$m=l.forwardRef(({className:e,variant:t,size:n,...r},o)=>u.jsx(Fm,{ref:o,className:O(Ha({variant:t,size:n,className:e})),...r}));$m.displayName=Fm.displayName;var hn="ToggleGroup",[Wm,FS]=Te(hn,[Rt]),Lm=Rt(),Ua=x.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return u.jsx(WM,{...o,ref:t})}if(n==="multiple"){const o=r;return u.jsx(LM,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${hn}\``)});Ua.displayName=hn;var[Bm,Vm]=Wm(hn),WM=x.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s,i]=Ie({prop:n,defaultProp:r,onChange:o});return u.jsx(Bm,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:i,onItemDeactivate:x.useCallback(()=>i(""),[i]),children:u.jsx(Ym,{...a,ref:t})})}),LM=x.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=Ie({prop:n,defaultProp:r,onChange:o}),c=x.useCallback(f=>i((m=[])=>[...m,f]),[i]),d=x.useCallback(f=>i((m=[])=>m.filter(p=>p!==f)),[i]);return u.jsx(Bm,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:d,children:u.jsx(Ym,{...a,ref:t})})});Ua.displayName=hn;var[BM,VM]=Wm(hn),Ym=x.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...c}=e,d=Lm(n),f=Yt(s),m={role:"group",dir:f,...c};return u.jsx(BM,{scope:n,rovingFocus:o,disabled:r,children:o?u.jsx(Ir,{asChild:!0,...d,orientation:a,dir:f,loop:i,children:u.jsx(F.div,{...m,ref:t})}):u.jsx(F.div,{...m,ref:t})})}),qr="ToggleGroupItem",Gm=x.forwardRef((e,t)=>{const n=Vm(qr,e.__scopeToggleGroup),r=VM(qr,e.__scopeToggleGroup),o=Lm(e.__scopeToggleGroup),a=n.value.includes(e.value),s=r.disabled||e.disabled,i={...e,pressed:a,disabled:s},c=x.useRef(null);return r.rovingFocus?u.jsx(jr,{asChild:!0,...o,focusable:!s,active:a,ref:c,children:u.jsx(zm,{...i,ref:t})}):u.jsx(zm,{...i,ref:t})});Gm.displayName=qr;var zm=x.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=Vm(qr,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return u.jsx(za,{...i,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Hm=Ua,Um=Gm;const Km=l.createContext({size:"default",variant:"default"}),qm=l.forwardRef(({className:e,variant:t,size:n,children:r,...o},a)=>u.jsx(Hm,{ref:a,className:O("flex items-center justify-center gap-1",e),...o,children:u.jsx(Km.Provider,{value:{variant:t,size:n},children:r})}));qm.displayName=Hm.displayName;const Xm=l.forwardRef(({className:e,children:t,variant:n,size:r,...o},a)=>{const s=l.useContext(Km);return u.jsx(Um,{ref:a,className:O(Ha({variant:s.variant||n,size:s.size||r}),e),...o,children:t})});Xm.displayName=Um.displayName;var[Xr,$S]=Te("Tooltip",[Dt]),Qr=Dt(),Qm="TooltipProvider",YM=700,Ka="tooltip.open",[GM,qa]=Xr(Qm),Zm=e=>{const{__scopeTooltip:t,delayDuration:n=YM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,[s,i]=l.useState(!0),c=l.useRef(!1),d=l.useRef(0);return l.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),u.jsx(GM,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(d.current),i(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:a})};Zm.displayName=Qm;var Zr="Tooltip",[zM,Qn]=Xr(Zr),Jm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=qa(Zr,e.__scopeTooltip),d=Qr(t),[f,m]=l.useState(null),p=je(),h=l.useRef(0),v=s??c.disableHoverableContent,g=i??c.delayDuration,y=l.useRef(!1),[w=!1,b]=Ie({prop:r,defaultProp:o,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ka))):c.onClose(),a==null||a(P)}}),C=l.useMemo(()=>w?y.current?"delayed-open":"instant-open":"closed",[w]),M=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,b(!0)},[b]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),k=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,b(!0),h.current=0},g)},[g,b]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(Tn,{...d,children:u.jsx(zM,{scope:t,contentId:p,open:w,stateAttribute:C,trigger:f,onTriggerChange:m,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?k():M()},[c.isOpenDelayed,k,M]),onTriggerLeave:l.useCallback(()=>{v?S():(window.clearTimeout(h.current),h.current=0)},[S,v]),onOpen:M,onClose:S,disableHoverableContent:v,children:n})})};Jm.displayName=Zr;var Xa="TooltipTrigger",eh=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qn(Xa,n),a=qa(Xa,n),s=Qr(n),i=l.useRef(null),c=ne(t,i,o.onTriggerChange),d=l.useRef(!1),f=l.useRef(!1),m=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),u.jsx(Dn,{asChild:!0,...s,children:u.jsx(F.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:A(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:A(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:A(e.onPointerDown,()=>{d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:A(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:A(e.onBlur,o.onClose),onClick:A(e.onClick,o.onClose)})})});eh.displayName=Xa;var Qa="TooltipPortal",[HM,UM]=Xr(Qa,{forceMount:void 0}),th=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Qn(Qa,t);return u.jsx(HM,{scope:t,forceMount:n,children:u.jsx(De,{present:n||a.open,children:u.jsx(Nn,{asChild:!0,container:o,children:r})})})};th.displayName=Qa;var pn="TooltipContent",nh=l.forwardRef((e,t)=>{const n=UM(pn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Qn(pn,e.__scopeTooltip);return u.jsx(De,{present:r||s.open,children:s.disableHoverableContent?u.jsx(rh,{side:o,...a,ref:t}):u.jsx(KM,{side:o,...a,ref:t})})}),KM=l.forwardRef((e,t)=>{const n=Qn(pn,e.__scopeTooltip),r=qa(pn,e.__scopeTooltip),o=l.useRef(null),a=ne(t,o),[s,i]=l.useState(null),{trigger:c,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,p=l.useCallback(()=>{i(null),m(!1)},[m]),h=l.useCallback((v,g)=>{const y=v.currentTarget,w={x:v.clientX,y:v.clientY},b=ZM(w,y.getBoundingClientRect()),C=JM(w,b),M=eS(g.getBoundingClientRect()),S=nS([...C,...M]);i(S),m(!0)},[m]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(c&&f){const v=y=>h(y,f),g=y=>h(y,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[c,f,h,p]),l.useEffect(()=>{if(s){const v=g=>{const y=g.target,w={x:g.clientX,y:g.clientY},b=(c==null?void 0:c.contains(y))||(f==null?void 0:f.contains(y)),C=!tS(w,s);b?p():C&&(p(),d())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,s,d,p]),u.jsx(rh,{...e,ref:a})}),[qM,XM]=Xr(Zr,{isInside:!1}),rh=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=Qn(pn,n),d=Qr(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Ka,f),()=>document.removeEventListener(Ka,f)),[f]),l.useEffect(()=>{if(c.trigger){const m=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),u.jsx($t,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:u.jsxs(Er,{"data-state":c.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(oo,{children:r}),u.jsx(qM,{scope:n,isInside:!0,children:u.jsx(md,{id:c.contentId,role:"tooltip",children:o||r})})]})})});nh.displayName=pn;var oh="TooltipArrow",QM=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Qr(n);return XM(oh,n).isInside?null:u.jsx(Pr,{...o,...r,ref:t})});QM.displayName=oh;function ZM(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function JM(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function eS(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function tS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a].x,c=t[a].y,d=t[s].x,f=t[s].y;c>r!=f>r&&n<(d-i)*(r-c)/(f-c)+i&&(o=!o)}return o}function nS(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),rS(t)}function rS(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oS=Zm,aS=Jm,sS=eh,iS=th,ah=nh;const cS=oS,lS=aS,uS=sS,sh=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(iS,{children:u.jsx(ah,{ref:r,sideOffset:t,className:O("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...n})}));sh.displayName=ah.displayName;function dS(e){const{triggerElement:t,steps:n}=e,[r,o]=x.useState(!1),[a,s]=x.useState(0),i=()=>{s(d=>d<n.length-1?d+1:d)},c=()=>{s(d=>d>0?d-1:d)};return u.jsxs(qo,{open:r,onOpenChange:o,children:[u.jsx(_l,{asChild:!0,children:t}),u.jsxs(Dr,{className:"sm:max-w-[425px]",children:[u.jsxs(Or,{className:O(n[a].title===""&&"sr-only"),children:[u.jsx(Ar,{children:n[a].title}),u.jsx(_r,{className:"sr-only",children:n[a].title})]}),u.jsx("div",{children:n[a].description}),u.jsxs("div",{className:"flex items-center justify-between mt-4",children:[u.jsx(lt,{variant:"ghost",size:"icon",onClick:c,disabled:a===0,children:u.jsx(Ai,{className:"h-4 w-4"})}),u.jsx("div",{className:"flex justify-center gap-1",children:n.map((d,f)=>u.jsx("div",{className:O("h-3 w-3 rounded-full",f===a?"bg-primary":"bg-gray-200")},f))}),u.jsx(lt,{variant:"ghost",size:"icon",onClick:i,disabled:a===n.length-1,children:u.jsx(Eo,{className:"h-4 w-4"})})]})]})]})}const fS=e=>{const{currentMonth:t,currentYear:n,onChangeMonthYear:r,locale:o=kr}=e,a=s=>{let i=t,c=n;s==="prev"?i===0?(i=11,c--):i--:i===11?(i=0,c++):i++,r(i,c)};return u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(lt,{variant:"ghost",size:"icon",onClick:()=>a("prev"),"aria-label":"Previous month",children:u.jsx($g,{className:"!h-8 !w-8"})}),u.jsxs("div",{className:"text-center",children:[u.jsx("h2",{className:"text-2xl font-bold capitalize",children:o.localize.month(t,{width:"wide"})}),u.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),u.jsx(lt,{variant:"ghost",size:"icon",onClick:()=>a("next"),"aria-label":"Next month",children:u.jsx(Wg,{className:"!h-8 !w-8"})})]})};function mS({currentPage:e,totalPages:t,onPageChange:n}){const r=Array.from({length:t},(o,a)=>a+1);return u.jsx(Ma,{children:u.jsxs(Sa,{children:[u.jsx(Un,{children:u.jsx(Ea,{onClick:()=>n(Math.max(1,e-1)),disabled:e===1})}),r.map(o=>u.jsx(Un,{children:u.jsx(Kn,{onClick:()=>n(o),isActive:e===o,children:o})},o)),u.jsx(Un,{children:u.jsx(Pa,{onClick:()=>n(Math.min(t,e+1)),disabled:e===t})})]})})}function hS(e,t=250){const[n,r]=x.useState(e);return x.useEffect(()=>{const o=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(o)}},[e,t]),n}const ih=l.createContext(void 0),ch={sm:"sm:max-w-[425px]",md:"sm:max-w-[550px]",lg:"sm:max-w-[700px]",xl:"sm:max-w-[900px]"},lh={info:{icon:Ug,className:"text-blue-500"},success:{icon:Vg,className:"text-green-500"},error:{icon:Yg,className:"text-red-500"},warning:{icon:Bg,className:"text-yellow-500"},confirm:{icon:_i,className:"text-blue-500"},custom:{icon:_i,className:"text-gray-500"}};function pS({children:e}){var h,v,g;const[t,n]=l.useState({isOpen:!1,options:null}),r=l.useCallback(y=>{n({isOpen:!0,options:y})},[]),o=l.useCallback(()=>{n(y=>({...y,isOpen:!1}))},[]),a=l.useCallback(y=>{r({...y,type:"info"})},[r]),s=l.useCallback(y=>{r({...y,type:"success"})},[r]),i=l.useCallback(y=>{r({...y,type:"error"})},[r]),c=l.useCallback(y=>{r({...y,type:"warning"})},[r]),d=l.useCallback(y=>{r({...y,type:"custom"})},[r]),f=l.useCallback(y=>{r({...y,type:"confirm"})},[r]),m=(y,w)=>{let b=lh[y].icon;return w&&(b=w),u.jsx(b,{className:O("h-24 w-24",lh[y].className)})},p=l.useMemo(()=>({open:r,close:o,info:a,success:s,error:i,warning:c,custom:d,confirm:f}),[r,o,a,s,i,c,d,f]);return u.jsxs(ih.Provider,{value:p,children:[e,u.jsx(qo,{open:t.isOpen,onOpenChange:y=>!y&&o(),modal:!0,children:u.jsxs(Dr,{className:O((h=t.options)!=null&&h.size?ch[t.options.size]:ch.sm,(v=t.options)==null?void 0:v.className),children:[t.options&&u.jsxs(Or,{children:[u.jsx("div",{className:"mx-auto mb-6",children:m(t.options.type,t.options.icon)}),t.options.title&&u.jsx(Ar,{className:"text-center",children:t.options.title}),u.jsx(_r,{className:"text-center",children:t.options.message})]}),((g=t.options)==null?void 0:g.type)==="confirm"&&u.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[u.jsx(lt,{onClick:()=>{var y,w;(w=(y=t.options)==null?void 0:y.onConfirm)==null||w.call(y),o()},children:t.options.confirmLabel||"Confirm"}),t.options.displayCancel&&u.jsx(lt,{variant:"outline",onClick:o,children:t.options.cancelLabel||"Cancel"})]})]})})]})}function gS(){const e=l.useContext(ih);if(e===void 0)throw new Error("useDialog must be used within a DialogProvider");return e}function vS(e){const[t,n]=x.useState(!1);return x.useEffect(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const o=()=>n(r.matches);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[t,e]),t}const Za=768;function yS(){const[e,t]=l.useState(void 0);return l.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Za-1}px)`),r=()=>{t(window.innerWidth<Za)};return n.addEventListener("change",r),t(window.innerWidth<Za),()=>n.removeEventListener("change",r)},[]),!!e}const bS=()=>{const[e,t]=x.useState(null),[n,r]=x.useState(!1);return x.useEffect(()=>((()=>{const s=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;r(s)})(),window.addEventListener("beforeinstallprompt",s=>{s.preventDefault(),t(s)}),window.addEventListener("appinstalled",()=>{r(!0)}),()=>{window.removeEventListener("appinstalled",()=>r(!0))}),[]),{isPromptReady:!!e,isInstalled:n,showInstallPrompt:()=>{e&&(e.prompt(),e.userChoice.then(a=>{console.log(`User choice: ${a.outcome}`),t(null)}))}}};E.AdaptiveInput=nr,E.AlertDialog=_g,E.AlertDialogAction=Ti,E.AlertDialogCancel=Di,E.AlertDialogContent=Mi,E.AlertDialogDescription=ki,E.AlertDialogFooter=Ei,E.AlertDialogHeader=Si,E.AlertDialogOverlay=No,E.AlertDialogPortal=Ni,E.AlertDialogTitle=Pi,E.AlertDialogTrigger=Rg,E.Autocomplete=hy,E.Avatar=Oc,E.AvatarFallback=_c,E.AvatarImage=Ac,E.Badge=yy,E.Button=lt,E.Calendar=bl,E.Card=wl,E.CardContent=Ml,E.CardDescription=Nl,E.CardFooter=Sl,E.CardHeader=xl,E.CardTitle=Cl,E.Checkbox=Ol,E.CurrencyInput=Al,E.Dialog=qo,E.DialogClose=Ux,E.DialogContent=Dr,E.DialogDescription=_r,E.DialogFooter=Il,E.DialogHeader=Or,E.DialogOverlay=Xo,E.DialogPortal=Rl,E.DialogProvider=pS,E.DialogTitle=Ar,E.DialogTrigger=_l,E.DropdownMenu=hC,E.DropdownMenuCheckboxItem=Gu,E.DropdownMenuContent=Vu,E.DropdownMenuGroup=gC,E.DropdownMenuItem=Yu,E.DropdownMenuLabel=Hu,E.DropdownMenuPortal=vC,E.DropdownMenuRadioGroup=bC,E.DropdownMenuRadioItem=zu,E.DropdownMenuSeparator=Uu,E.DropdownMenuShortcut=Ku,E.DropdownMenuSub=yC,E.DropdownMenuSubContent=Bu,E.DropdownMenuSubTrigger=Lu,E.DropdownMenuTrigger=pC,E.Form=YC,E.FormControl=ud,E.FormDescription=dd,E.FormField=GC,E.FormItem=cd,E.FormLabel=ld,E.FormMessage=fd,E.HelpCarousel=dS,E.Input=tr,E.Label=da,E.MonthNavigator=fS,E.NavigationMenu=Bd,E.NavigationMenuContent=zd,E.NavigationMenuIndicator=Hd,E.NavigationMenuItem=lN,E.NavigationMenuLink=uN,E.NavigationMenuList=Vd,E.NavigationMenuTrigger=Gd,E.NavigationMenuViewport=Na,E.Pagination=Ma,E.PaginationContent=Sa,E.PaginationControls=mS,E.PaginationEllipsis=Ud,E.PaginationItem=Un,E.PaginationLink=Kn,E.PaginationNext=Pa,E.PaginationPrevious=Ea,E.PasswordInput=yN,E.Popover=wc,E.PopoverAnchor=my,E.PopoverContent=Yo,E.PopoverTrigger=xc,E.Progress=Da,E.RadioGroup=pf,E.RadioGroupItem=gf,E.Select=JN,E.SelectContent=em,E.SelectGroup=eM,E.SelectItem=nm,E.SelectLabel=tm,E.SelectScrollDownButton=La,E.SelectScrollUpButton=Wa,E.SelectSeparator=rm,E.SelectTrigger=Jf,E.SelectValue=tM,E.Skeleton=nM,E.Switch=lm,E.Table=um,E.TableBody=fm,E.TableCaption=vm,E.TableCell=gm,E.TableFooter=mm,E.TableHead=pm,E.TableHeader=dm,E.TableRow=hm,E.Tabs=dM,E.TabsContent=_m,E.TabsList=Om,E.TabsTrigger=Am,E.Textarea=Rm,E.Toaster=FM,E.Toggle=$m,E.ToggleGroup=qm,E.ToggleGroupItem=Xm,E.Tooltip=lS,E.TooltipContent=sh,E.TooltipProvider=cS,E.TooltipTrigger=uS,E.badgeVariants=Rc,E.buttonVariants=Sn,E.cn=O,E.formatCurrency=Gh,E.formatDateAndMonth=Uh,E.formatDateAndWeekday=zh,E.formatDateAndWeekdayAndYear=Hh,E.formatLongDate=Kh,E.formatShortDate=qh,E.formatWeekDayAndShortDate=Qh,E.getMonthYearFromISODate=Xh,E.navigationMenuTriggerStyle=Yd,E.toast=EM,E.toggleVariants=Ha,E.useDebounce=hS,E.useDialog=gS,E.useFormField=Hn,E.useIsMobile=yS,E.useMediaQuery=vS,E.usePWAInstall=bS,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|