@companycam/slab-web 2.2.0 → 2.2.1
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/index.js +577 -618
- package/index.mjs +9121 -9368
- package/lib/Spinner/Spinner.d.ts +1 -1
- package/lib/shared/Message/Message.d.ts +3 -3
- package/package.json +1 -1
- package/storybook/TokenDocs/FilterableTokensList.d.ts +1 -0
- package/storybook/TokenDocs/TokenItem.d.ts +6 -0
- package/storybook/TokenDocs/TokenItemLeft.d.ts +7 -0
- package/storybook/TokenDocs/TokenSearchForm.d.ts +10 -0
- package/storybook/TokenDocs/TokenUsage.d.ts +7 -0
- package/storybook/TokenDocs/TokensList.d.ts +6 -0
- package/storybook/TokenDocs/types.d.ts +3 -0
- package/storybook/TokenDocs/utils.d.ts +6 -0
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),R=require("styled-components"),y=require("react"),hr=require("react-dom"),Mf=require("lottie-web/build/player/lottie_light.js"),Dc=e=>e&&e.__esModule?e:{default:e};function Ec(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const S=Dc(R),v=Ec(y),An=Ec(hr),Rf=Dc(Mf),Pf=S.default.span`
|
|
2
2
|
width: 1px;
|
|
3
3
|
height: 1px;
|
|
4
4
|
margin: -1px;
|
|
@@ -10,23 +10,23 @@
|
|
|
10
10
|
clip: rect(0 0 0 0);
|
|
11
11
|
border: 0;
|
|
12
12
|
opacity: 0;
|
|
13
|
-
`;function
|
|
14
|
-
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;`,
|
|
13
|
+
`;function yt({children:e}){return _.jsx(Pf,{children:e})}const Tf="rgba(31, 55, 81, 0.75)",Li="#142334",vo="#ffffff",Dr=8,Mc=16,If=16,zi=24,Rc=32,Pc=40,$e=`font-family: 'Averta', system-ui, -apple-system, BlinkMacSystemFont,
|
|
14
|
+
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;`,et=$e,gn=R.css`
|
|
15
15
|
outline-width: var(--cc_size_border_width_m);
|
|
16
16
|
outline-style: solid;
|
|
17
|
-
`,
|
|
17
|
+
`,tt=R.css`
|
|
18
18
|
opacity: 0.5;
|
|
19
19
|
cursor: not-allowed;
|
|
20
|
-
`,
|
|
21
|
-
${
|
|
20
|
+
`,Ee=e=>{const r=e==="error";return e==="success"&&!r?{accentColor:"var(--cc_color_green_700)",icon:"check-circle-outline",focusStyles:R.css`
|
|
21
|
+
${gn}
|
|
22
22
|
outline-color: var(--cc_color_green_700);
|
|
23
|
-
`}:r?{accentColor:"var(--cc_color_red_600)",icon:"alert-circle-outline",focusStyles:
|
|
24
|
-
${
|
|
23
|
+
`}:r?{accentColor:"var(--cc_color_red_600)",icon:"alert-circle-outline",focusStyles:R.css`
|
|
24
|
+
${gn}
|
|
25
25
|
outline-color: var(--cc_color_red_600);
|
|
26
|
-
`}:{accentColor:"var(--cc_color_utility_info)",icon:"information-outline",focusStyles:
|
|
27
|
-
${
|
|
26
|
+
`}:{accentColor:"var(--cc_color_utility_info)",icon:"information-outline",focusStyles:R.css`
|
|
27
|
+
${gn}
|
|
28
28
|
outline-color: var(--cc_color_border_input_active);
|
|
29
|
-
`}},
|
|
29
|
+
`}},Ge=R.css`
|
|
30
30
|
margin: -1px;
|
|
31
31
|
padding: 0;
|
|
32
32
|
width: 1px;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
clip: rect(0 0 0 0);
|
|
36
36
|
clip: rect(0, 0, 0, 0);
|
|
37
37
|
position: absolute;
|
|
38
|
-
`,
|
|
38
|
+
`,Of=["xxl","xl","l","m","s","xs","xxs"],lt=e=>e.split(/\s+/).map(n=>Of.includes(n)?`var(--cc_size_spacing_${n})`:`${n==="auto"?n:0}`).join(" "),_o={large:Pc,medium:Rc,small:zi,xsmall:If},_e={easeOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",duration:{fast:"200ms",medium:"300ms"}},Ni=({offset:e=Dr,placement:r})=>{const n=`translate3d(${e}px, 0, 0)`,t=`translate3d(-${e}px, 0, 0)`,o=`translate3d(0, ${e}px, 0)`,a=`translate3d(0, -${e}px, 0)`;switch(r){case"top":case"top-start":case"top-end":return o;case"right":case"right-start":case"right-end":return t;case"bottom":case"bottom-start":case"bottom-end":return a;case"left":case"left-start":case"left-end":return n;default:return"translate3d(0, 0, 0)"}},ar={caution:"caution",success:"success",destroy:"destroy",secondary:"secondary"},Ds={[ar.caution]:"var(--cc_color_utility_caution)",[ar.success]:"var(--cc_color_utility_success)",[ar.destroy]:"var(--cc_color_utility_destroy)",[ar.secondary]:"var(--cc_color_button_background_secondary)"},Ai=e=>e?Ds[e]:Ds[ar.secondary],Jn={xxxl:{size:"var(--cc_size_text_xxxl)",family:"heading",weight:800,lineHeight:1.1},xxl:{size:"var(--cc_size_text_xxl)",family:"heading",weight:800,lineHeight:1.1},xl:{size:"var(--cc_size_text_xl)",family:"heading",weight:700,lineHeight:1.1},l:{size:"var(--cc_size_text_l)",family:"system",weight:700,lineHeight:1.2},m:{size:"var(--cc_size_text_m)",family:"system",lineHeight:1.4},s:{size:"var(--cc_size_text_s)",family:"system",lineHeight:1.4},xs:{size:"var(--cc_size_text_xs)",family:"system",lineHeight:1.4},xxs:{size:"var(--cc_size_text_xxs)",family:"system",lineHeight:1.4}},Ff=S.default.span`
|
|
39
39
|
/* unset all global typography styles */
|
|
40
40
|
all: unset;
|
|
41
41
|
|
|
@@ -46,21 +46,21 @@
|
|
|
46
46
|
color: ${e=>e.$color==="inherit"?"inherit":`var(--cc_color_text_${e.$color})`};
|
|
47
47
|
|
|
48
48
|
/* Use either Averta (heading) or system font stack default */
|
|
49
|
-
${e=>e.$family&&e.$family==="heading"||
|
|
49
|
+
${e=>e.$family&&e.$family==="heading"||Jn[e.size].family==="heading"?et:$e}
|
|
50
50
|
|
|
51
|
-
font-size: ${e=>
|
|
52
|
-
line-height: ${e=>
|
|
51
|
+
font-size: ${e=>Jn[e.size].size};
|
|
52
|
+
line-height: ${e=>Jn[e.size].lineHeight};
|
|
53
53
|
|
|
54
54
|
/* if ccMargin is specified in props, convert spacing tokens to CSS variables */
|
|
55
|
-
${e=>e.$ccMargin?
|
|
56
|
-
margin: ${
|
|
55
|
+
${e=>e.$ccMargin?R.css`
|
|
56
|
+
margin: ${lt(e.$ccMargin)};
|
|
57
57
|
`:null}
|
|
58
58
|
|
|
59
59
|
/* if user specifies weight in props OR there is a weight default for the font size, set it in CSS */
|
|
60
|
-
${e=>e.$weight||
|
|
61
|
-
font-weight: ${e.$weight||
|
|
60
|
+
${e=>e.$weight||Jn[e.size].weight?R.css`
|
|
61
|
+
font-weight: ${e.$weight||Jn[e.size].weight};
|
|
62
62
|
`:null}
|
|
63
|
-
`;function
|
|
63
|
+
`;function Ce({as:e,forwardedAs:r,children:n,color:t="default",size:o="s",family:a,ccMargin:i,weight:s,display:l="block",className:c,style:u,...d}){return _.jsx(Ff,{as:e,forwardedAs:r,size:o,$family:a,$ccMargin:i,$color:t,$weight:s,$display:l,className:c,style:u,...d,children:n})}const tn=({disabled:e=!1,readOnly:r=!1})=>`
|
|
64
64
|
all: initial;
|
|
65
65
|
box-sizing: border-box;
|
|
66
66
|
font-family: inherit;
|
|
@@ -80,36 +80,36 @@
|
|
|
80
80
|
-moz-osx-font-smoothing: grayscale;
|
|
81
81
|
|
|
82
82
|
&:focus-visible {
|
|
83
|
-
${
|
|
83
|
+
${gn}
|
|
84
84
|
outline-color: var(--cc_color_border_input_active);
|
|
85
85
|
outline-offset: var(--cc_size_spacing_xxs);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
${e||r?
|
|
88
|
+
${e||r?R.css`
|
|
89
89
|
pointer-events: none;
|
|
90
90
|
`:""}
|
|
91
|
-
${e?
|
|
92
|
-
`,
|
|
93
|
-
${
|
|
91
|
+
${e?tt:""}
|
|
92
|
+
`,Bo={small:"var(--cc_size_avatar_m)",medium:"var(--cc_size_avatar_l)",large:"48px"},Wo={small:"calc(var(--cc_size_text_xs) + 1px)",medium:"calc(var(--cc_size_text_s) + 1px)",large:"calc(var(--cc_size_text_m) + 1px)"},Tc={small:"calc(var(--cc_size_spacing_xs) * 0.75)",medium:"calc(var(--cc_size_spacing_s) * 0.75)",large:"calc(var(--cc_size_spacing_m) * 0.75)"},Ic={small:"0 calc(var(--cc_size_spacing_s) * 1.25)",medium:"0 var(--cc_size_spacing_m)",large:"0 var(--cc_size_spacing_l)"},Es="var(--cc_size_spacing_s)",Oc=S.default.button`
|
|
93
|
+
${tn}
|
|
94
94
|
position: absolute;
|
|
95
95
|
inset: 0;
|
|
96
96
|
aspect-ratio: 1 / 1;
|
|
97
|
-
transition: background-color ${
|
|
97
|
+
transition: background-color ${_e.duration.fast};
|
|
98
98
|
border-radius: var(--cc_size_border_radius_l);
|
|
99
99
|
&:hover {
|
|
100
100
|
background-color: var(--cc_color_background_1_alpha_10);
|
|
101
101
|
}
|
|
102
|
-
`,
|
|
103
|
-
${e=>e.$size&&
|
|
104
|
-
width: ${
|
|
102
|
+
`,Ms={small:130,medium:148,large:500,auto:"auto"},Lf=S.default.div`
|
|
103
|
+
${e=>e.$size&&Ms[e.$size]!=="auto"?R.css`
|
|
104
|
+
width: ${Ms[e.$size]}px;
|
|
105
105
|
`:null}
|
|
106
|
-
`,
|
|
106
|
+
`,zf=S.default.div`
|
|
107
107
|
position: relative;
|
|
108
108
|
aspect-ratio: 1 / 1;
|
|
109
109
|
|
|
110
110
|
@media (hover: hover) {
|
|
111
111
|
.cc-asset-thumb-content-show-on-hover {
|
|
112
|
-
transition: opacity ${
|
|
112
|
+
transition: opacity ${_e.duration.fast};
|
|
113
113
|
opacity: 0;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
`,
|
|
126
|
+
`,Nf=R.keyframes`
|
|
127
127
|
0% {
|
|
128
128
|
transform: scale(1);
|
|
129
129
|
}
|
|
@@ -133,38 +133,38 @@
|
|
|
133
133
|
100% {
|
|
134
134
|
transform: scale(1);
|
|
135
135
|
}
|
|
136
|
-
`,
|
|
136
|
+
`,Af=S.default.span`
|
|
137
137
|
display: block;
|
|
138
138
|
aspect-ratio: 1 / 1;
|
|
139
139
|
overflow: hidden;
|
|
140
140
|
border-radius: var(--cc_size_border_radius_l);
|
|
141
141
|
transition: transform 0.2s;
|
|
142
|
-
&:has(~ ${
|
|
142
|
+
&:has(~ ${Oc}:active) {
|
|
143
143
|
transform: scale(0.97);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
${e=>e.$isSelected?
|
|
147
|
-
animation-name: ${
|
|
148
|
-
animation-duration: ${
|
|
149
|
-
animation-timing-function: ${
|
|
146
|
+
${e=>e.$isSelected?R.css`
|
|
147
|
+
animation-name: ${Nf};
|
|
148
|
+
animation-duration: ${_e.duration.medium};
|
|
149
|
+
animation-timing-function: ${_e.easeOut};
|
|
150
150
|
`:""}
|
|
151
|
-
`,
|
|
151
|
+
`,jf=S.default.img`
|
|
152
152
|
all: initial;
|
|
153
153
|
display: block;
|
|
154
154
|
width: 100%;
|
|
155
155
|
height: 100%;
|
|
156
156
|
object-fit: cover;
|
|
157
157
|
border-radius: var(--cc_size_border_radius_l);
|
|
158
|
-
${e=>e.$shouldBlurImage?
|
|
158
|
+
${e=>e.$shouldBlurImage?R.css`
|
|
159
159
|
filter: blur(16px);
|
|
160
160
|
`:null}
|
|
161
|
-
`,
|
|
161
|
+
`,Hf=S.default.div`
|
|
162
162
|
position: absolute;
|
|
163
163
|
inset: 0;
|
|
164
164
|
border-radius: var(--cc_size_border_radius_l);
|
|
165
165
|
background: var(--cc_color_background_backdrop);
|
|
166
166
|
opacity: 0.75;
|
|
167
|
-
`,
|
|
167
|
+
`,Yf=S.default.span`
|
|
168
168
|
position: absolute;
|
|
169
169
|
inset-block-end: 0;
|
|
170
170
|
inset-inline-start: 0;
|
|
@@ -178,15 +178,15 @@
|
|
|
178
178
|
var(--cc_color_background_backdrop) 100%
|
|
179
179
|
);
|
|
180
180
|
text-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
|
|
181
|
-
`,
|
|
181
|
+
`,Ar=S.default.span`
|
|
182
182
|
position: absolute;
|
|
183
|
-
inset-inline-${e=>e.$inlineVal}: ${
|
|
184
|
-
inset-block-${e=>e.$blockVal}: ${
|
|
185
|
-
`,
|
|
183
|
+
inset-inline-${e=>e.$inlineVal}: ${Es};
|
|
184
|
+
inset-block-${e=>e.$blockVal}: ${Es};
|
|
185
|
+
`,Vf=S.default(Ce)`
|
|
186
186
|
white-space: nowrap;
|
|
187
187
|
overflow: hidden;
|
|
188
188
|
text-overflow: ellipsis;
|
|
189
|
-
`,
|
|
189
|
+
`,Bf=S.default.i`
|
|
190
190
|
font-size: var(--cc_size_text_xxxl);
|
|
191
191
|
position: absolute;
|
|
192
192
|
top: 50%;
|
|
@@ -195,18 +195,15 @@
|
|
|
195
195
|
pointer-events: none;
|
|
196
196
|
/* non-themed photo overlay icon, okay to hardcode color */
|
|
197
197
|
color: rgba(255, 255, 255, 0.8);
|
|
198
|
-
`,Kf=e=>typeof e=="string"?v.jsx(Gf,{forwardedAs:"span",color:"subtle",size:"xs",ccMargin:"s none none",children:e}):e;function Uf({contentAfter:e,contentTopLeft:r,contentTopRight:t,contentBottomLeft:n,contentBottomRight:o,image:a,isSelected:i=!1,isVideo:s=!1,buttonAction:l,shouldBlurImage:c=!1,size:u="auto",...f}){const{accessibilityLabel:p,...d}=l||{};return v.jsxs(Af,{...f,$size:u,children:[v.jsxs(jf,{children:[v.jsxs(Yf,{$isSelected:i,children:[v.jsx(Vf,{src:a.src,alt:a.alt?a.alt:"",$shouldBlurImage:c}),i?v.jsx(Bf,{"data-testid":"selected-asset-overlay"}):null,n||o?v.jsx(Wf,{}):null,s?v.jsxs(v.Fragment,{children:[v.jsx(qf,{className:"mdi mdi-play-circle-outline"}),v.jsx(wt,{children:"Video"})]}):null]}),l?v.jsx(Fc,{type:"button",...d,children:v.jsx(wt,{children:l.accessibilityLabel})}):null,r?v.jsx(jr,{$blockVal:"start",$inlineVal:"start",className:r.shouldShowOnHover?"cc-asset-thumb-content-show-on-hover":"",children:r.content}):null,t?v.jsx(jr,{$blockVal:"start",$inlineVal:"end",className:t.shouldShowOnHover?"cc-asset-thumb-content-show-on-hover":"",children:t.content}):null,n?v.jsx(jr,{$blockVal:"end",$inlineVal:"start",children:n}):null,o?v.jsx(jr,{$blockVal:"end",$inlineVal:"end",children:o}):null]}),e?Kf(e):null]})}function qo(){return typeof window<"u"}function rn(e){return Lc(e)?(e.nodeName||"").toLowerCase():"#document"}function He(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function xt(e){var r;return(r=(Lc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Lc(e){return qo()?e instanceof Node||e instanceof He(e).Node:!1}function ae(e){return qo()?e instanceof Element||e instanceof He(e).Element:!1}function $e(e){return qo()?e instanceof HTMLElement||e instanceof He(e).HTMLElement:!1}function ii(e){return!qo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof He(e).ShadowRoot}const Qf=new Set(["inline","contents"]);function Mr(e){const{overflow:r,overflowX:t,overflowY:n,display:o}=Ye(e);return/auto|scroll|overlay|hidden|clip/.test(r+n+t)&&!Qf.has(o)}const Xf=new Set(["table","td","th"]);function Zf(e){return Xf.has(rn(e))}const Jf=[":popover-open",":modal"];function Ko(e){return Jf.some(r=>{try{return e.matches(r)}catch{return!1}})}const ep=["transform","translate","scale","rotate","perspective"],tp=["transform","translate","scale","rotate","perspective","filter"],np=["paint","layout","strict","content"];function Hi(e){const r=Uo(),t=ae(e)?Ye(e):e;return ep.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!r&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!r&&(t.filter?t.filter!=="none":!1)||tp.some(n=>(t.willChange||"").includes(n))||np.some(n=>(t.contain||"").includes(n))}function rp(e){let r=Ft(e);for(;$e(r)&&!Jt(r);){if(Hi(r))return r;if(Ko(r))return null;r=Ft(r)}return null}function Uo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const op=new Set(["html","body","#document"]);function Jt(e){return op.has(rn(e))}function Ye(e){return He(e).getComputedStyle(e)}function Qo(e){return ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ft(e){if(rn(e)==="html")return e;const r=e.assignedSlot||e.parentNode||ii(e)&&e.host||xt(e);return ii(r)?r.host:r}function zc(e){const r=Ft(e);return Jt(r)?e.ownerDocument?e.ownerDocument.body:e.body:$e(r)&&Mr(r)?r:zc(r)}function Qt(e,r,t){var n;r===void 0&&(r=[]),t===void 0&&(t=!0);const o=zc(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=He(o);if(a){const s=si(i);return r.concat(i,i.visualViewport||[],Mr(o)?o:[],s&&t?Qt(s):[])}return r.concat(o,Qt(o,[],t))}function si(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kt(e){let r=e.activeElement;for(;((t=r)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;r=r.shadowRoot.activeElement}return r}function Te(e,r){if(!e||!r)return!1;const t=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(t&&ii(t)){let n=r;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Yi(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Vi(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:t,version:n}=r;return t+"/"+n}).join(" "):navigator.userAgent}function ap(e){return e.mozInputSource===0&&e.isTrusted?!0:li()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nc(e){return sp()?!1:!li()&&e.width===0&&e.height===0||li()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ac(){return/apple/i.test(navigator.vendor)}function li(){const e=/android/i;return e.test(Yi())||e.test(Vi())}function ip(){return Yi().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function sp(){return Vi().includes("jsdom/")}function _r(e,r){const t=["mouse","pen"];return r||t.push("",void 0),t.includes(e)}function lp(e){return"nativeEvent"in e}function cp(e){return e.matches("html,body")}function Ie(e){return(e==null?void 0:e.ownerDocument)||document}function Ca(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const t=e;return t.target!=null&&r.contains(t.target)}function Wt(e){return"composedPath"in e?e.composedPath()[0]:e.target}const up="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bi(e){return $e(e)&&e.matches(up)}function Da(e){e.preventDefault(),e.stopPropagation()}function dp(e){return e?e.getAttribute("role")==="combobox"&&Bi(e):!1}const Lt=Math.min,Fe=Math.max,br=Math.round,Hr=Math.floor,bt=e=>({x:e,y:e}),fp={left:"right",right:"left",bottom:"top",top:"bottom"},pp={start:"end",end:"start"};function ci(e,r,t){return Fe(e,Lt(r,t))}function zt(e,r){return typeof e=="function"?e(r):e}function Nt(e){return e.split("-")[0]}function Qn(e){return e.split("-")[1]}function Wi(e){return e==="x"?"y":"x"}function Gi(e){return e==="y"?"height":"width"}const gp=new Set(["top","bottom"]);function mt(e){return gp.has(Nt(e))?"y":"x"}function qi(e){return Wi(mt(e))}function mp(e,r,t){t===void 0&&(t=!1);const n=Qn(e),o=qi(e),a=Gi(o);let i=o==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=yo(i)),[i,yo(i)]}function hp(e){const r=yo(e);return[ui(e),r,ui(r)]}function ui(e){return e.replace(/start|end/g,r=>pp[r])}const Ps=["left","right"],Ts=["right","left"],vp=["top","bottom"],_p=["bottom","top"];function bp(e,r,t){switch(e){case"top":case"bottom":return t?r?Ts:Ps:r?Ps:Ts;case"left":case"right":return r?vp:_p;default:return[]}}function yp(e,r,t,n){const o=Qn(e);let a=bp(Nt(e),t==="start",n);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(ui)))),a}function yo(e){return e.replace(/left|right|bottom|top/g,r=>fp[r])}function wp(e){return{top:0,right:0,bottom:0,left:0,...e}}function jc(e){return typeof e!="number"?wp(e):{top:e,right:e,bottom:e,left:e}}function wo(e){const{x:r,y:t,width:n,height:o}=e;return{width:n,height:o,top:t,left:r,right:r+n,bottom:t+o,x:r,y:t}}/*!
|
|
199
|
-
* tabbable 6.2.0
|
|
200
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
201
|
-
*/var xp=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],xo=xp.join(","),Hc=typeof Element>"u",Hn=Hc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,So=!Hc&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e==null?void 0:e.ownerDocument},$o=function e(r,t){var n;t===void 0&&(t=!0);var o=r==null||(n=r.getAttribute)===null||n===void 0?void 0:n.call(r,"inert"),a=o===""||o==="true",i=a||t&&r&&e(r.parentNode);return i},Sp=function(r){var t,n=r==null||(t=r.getAttribute)===null||t===void 0?void 0:t.call(r,"contenteditable");return n===""||n==="true"},$p=function(r,t,n){if($o(r))return[];var o=Array.prototype.slice.apply(r.querySelectorAll(xo));return t&&Hn.call(r,xo)&&o.unshift(r),o=o.filter(n),o},kp=function e(r,t,n){for(var o=[],a=Array.from(r);a.length;){var i=a.shift();if(!$o(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=e(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Hn.call(i,xo);u&&n.filter(i)&&(t||!r.includes(i))&&o.push(i);var f=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),p=!$o(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(f&&p){var d=e(f===!0?i.children:f.children,!0,n);n.flatten?o.push.apply(o,d):o.push({scopeParent:i,candidates:d})}else a.unshift.apply(a,i.children)}}return o},Yc=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},Vc=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||Sp(r))&&!Yc(r)?0:r.tabIndex},Cp=function(r,t){var n=Vc(r);return n<0&&t&&!Yc(r)?0:n},Dp=function(r,t){return r.tabIndex===t.tabIndex?r.documentOrder-t.documentOrder:r.tabIndex-t.tabIndex},Bc=function(r){return r.tagName==="INPUT"},Ep=function(r){return Bc(r)&&r.type==="hidden"},Mp=function(r){var t=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(n){return n.tagName==="SUMMARY"});return t},Rp=function(r,t){for(var n=0;n<r.length;n++)if(r[n].checked&&r[n].form===t)return r[n]},Pp=function(r){if(!r.name)return!0;var t=r.form||So(r),n=function(s){return t.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(r.name));else try{o=n(r.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=Rp(o,r.form);return!a||a===r},Tp=function(r){return Bc(r)&&r.type==="radio"},Ip=function(r){return Tp(r)&&!Pp(r)},Op=function(r){var t,n=r&&So(r),o=(t=n)===null||t===void 0?void 0:t.host,a=!1;if(n&&n!==r){var i,s,l;for(a=!!((i=o)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(o)||r!=null&&(l=r.ownerDocument)!==null&&l!==void 0&&l.contains(r));!a&&o;){var c,u,f;n=So(o),o=(c=n)===null||c===void 0?void 0:c.host,a=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return a},Is=function(r){var t=r.getBoundingClientRect(),n=t.width,o=t.height;return n===0&&o===0},Fp=function(r,t){var n=t.displayCheck,o=t.getShadowRoot;if(getComputedStyle(r).visibility==="hidden")return!0;var a=Hn.call(r,"details>summary:first-of-type"),i=a?r.parentElement:r;if(Hn.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var s=r;r;){var l=r.parentElement,c=So(r);if(l&&!l.shadowRoot&&o(l)===!0)return Is(r);r.assignedSlot?r=r.assignedSlot:!l&&c!==r.ownerDocument?r=c.host:r=l}r=s}if(Op(r))return!r.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Is(r);return!1},Lp=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var t=r.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var o=t.children.item(n);if(o.tagName==="LEGEND")return Hn.call(t,"fieldset[disabled] *")?!0:!o.contains(r)}return!0}t=t.parentElement}return!1},zp=function(r,t){return!(t.disabled||$o(t)||Ep(t)||Fp(t,r)||Mp(t)||Lp(t))},di=function(r,t){return!(Ip(t)||Vc(t)<0||!zp(r,t))},Np=function(r){var t=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ap=function e(r){var t=[],n=[];return r.forEach(function(o,a){var i=!!o.scopeParent,s=i?o.scopeParent:o,l=Cp(s,i),c=i?e(o.candidates):s;l===0?i?t.push.apply(t,c):t.push(s):n.push({documentOrder:a,tabIndex:l,item:o,isScope:i,content:c})}),n.sort(Dp).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(t)},Xo=function(r,t){t=t||{};var n;return t.getShadowRoot?n=kp([r],t.includeContainer,{filter:di.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Np}):n=$p(r,t.includeContainer,di.bind(null,t)),Ap(n)},jp=function(r,t){if(t=t||{},!r)throw new Error("No node provided");return Hn.call(r,xo)===!1?!1:di(t,r)};function Os(e,r,t){let{reference:n,floating:o}=e;const a=mt(r),i=qi(r),s=Gi(i),l=Nt(r),c=a==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let d;switch(l){case"top":d={x:u,y:n.y-o.height};break;case"bottom":d={x:u,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:f};break;case"left":d={x:n.x-o.width,y:f};break;default:d={x:n.x,y:n.y}}switch(Qn(r)){case"start":d[i]-=p*(t&&c?-1:1);break;case"end":d[i]+=p*(t&&c?-1:1);break}return d}const Hp=async(e,r,t)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=t,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let c=await i.getElementRects({reference:e,floating:r,strategy:o}),{x:u,y:f}=Os(c,n,l),p=n,d={},g=0;for(let m=0;m<s.length;m++){const{name:_,fn:y}=s[m],{x,y:w,data:$,reset:C}=await y({x:u,y:f,initialPlacement:n,placement:p,strategy:o,middlewareData:d,rects:c,platform:i,elements:{reference:e,floating:r}});u=x??u,f=w??f,d={...d,[_]:{...d[_],...$}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:e,floating:r,strategy:o}):C.rects),{x:u,y:f}=Os(c,p,l)),m=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function Zo(e,r){var t;r===void 0&&(r={});const{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=zt(r,e),g=jc(d),_=s[p?f==="floating"?"reference":"floating":f],y=wo(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(_)))==null||t?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),$=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=wo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:l}):x);return{top:(y.top-C.top+g.top)/$.y,bottom:(C.bottom-y.bottom+g.bottom)/$.y,left:(y.left-C.left+g.left)/$.x,right:(C.right-y.right+g.right)/$.x}}const Yp=e=>({name:"arrow",options:e,async fn(r){const{x:t,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:c,padding:u=0}=zt(e,r)||{};if(c==null)return{};const f=jc(u),p={x:t,y:n},d=qi(o),g=Gi(d),m=await i.getDimensions(c),_=d==="y",y=_?"top":"left",x=_?"bottom":"right",w=_?"clientHeight":"clientWidth",$=a.reference[g]+a.reference[d]-p[d]-a.floating[g],C=p[d]-a.reference[d],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let M=k?k[w]:0;(!M||!await(i.isElement==null?void 0:i.isElement(k)))&&(M=s.floating[w]||a.floating[g]);const E=$/2-C/2,P=M/2-m[g]/2-1,F=Lt(f[y],P),L=Lt(f[x],P),T=F,O=M-m[g]-L,A=M/2-m[g]/2+E,N=ci(T,A,O),j=!l.arrow&&Qn(o)!=null&&A!==N&&a.reference[g]/2-(A<T?F:L)-m[g]/2<0,z=j?A<T?A-T:A-O:0;return{[d]:p[d]+z,data:{[d]:N,centerOffset:A-N-z,...j&&{alignmentOffset:z}},reset:j}}}),Vp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var t,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=r,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,..._}=zt(e,r);if((t=a.arrow)!=null&&t.alignmentOffset)return{};const y=Nt(o),x=mt(s),w=Nt(s)===s,$=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(w||!m?[yo(s)]:hp(s)),k=g!=="none";!p&&k&&C.push(...yp(s,m,g,$));const M=[s,...C],E=await Zo(r,_),P=[];let F=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&P.push(E[y]),f){const A=mp(o,i,$);P.push(E[A[0]],E[A[1]])}if(F=[...F,{placement:o,overflows:P}],!P.every(A=>A<=0)){var L,T;const A=(((L=a.flip)==null?void 0:L.index)||0)+1,N=M[A];if(N&&(!(f==="alignment"?x!==mt(N):!1)||F.every(D=>mt(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:A,overflows:F},reset:{placement:N}};let j=(T=F.filter(z=>z.overflows[0]<=0).sort((z,D)=>z.overflows[1]-D.overflows[1])[0])==null?void 0:T.placement;if(!j)switch(d){case"bestFit":{var O;const z=(O=F.filter(D=>{if(k){const R=mt(D.placement);return R===x||R==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(R=>R>0).reduce((R,B)=>R+B,0)]).sort((D,R)=>D[1]-R[1])[0])==null?void 0:O[0];z&&(j=z);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}},Wc=new Set(["left","top"]);async function Bp(e,r){const{placement:t,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Nt(t),s=Qn(t),l=mt(t)==="y",c=Wc.has(i)?-1:1,u=a&&l?-1:1,f=zt(r,e);let{mainAxis:p,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(d=s==="end"?g*-1:g),l?{x:d*u,y:p*c}:{x:p*c,y:d*u}}const Wp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var t,n;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await Bp(r,e);return i===((t=s.offset)==null?void 0:t.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Gp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:t,y:n,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:_=>{let{x:y,y:x}=_;return{x:y,y:x}}},...l}=zt(e,r),c={x:t,y:n},u=await Zo(r,l),f=mt(Nt(o)),p=Wi(f);let d=c[p],g=c[f];if(a){const _=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=d+u[_],w=d-u[y];d=ci(x,d,w)}if(i){const _=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=g+u[_],w=g-u[y];g=ci(x,g,w)}const m=s.fn({...r,[p]:d,[f]:g});return{...m,data:{x:m.x-t,y:m.y-n,enabled:{[p]:a,[f]:i}}}}}},qp=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:t,y:n,placement:o,rects:a,middlewareData:i}=r,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=zt(e,r),u={x:t,y:n},f=mt(o),p=Wi(f);let d=u[p],g=u[f];const m=zt(s,r),_=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=p==="y"?"height":"width",$=a.reference[p]-a.floating[w]+_.mainAxis,C=a.reference[p]+a.reference[w]-_.mainAxis;d<$?d=$:d>C&&(d=C)}if(c){var y,x;const w=p==="y"?"width":"height",$=Wc.has(Nt(o)),C=a.reference[f]-a.floating[w]+($&&((y=i.offset)==null?void 0:y[f])||0)+($?0:_.crossAxis),k=a.reference[f]+a.reference[w]+($?0:((x=i.offset)==null?void 0:x[f])||0)-($?_.crossAxis:0);g<C?g=C:g>k&&(g=k)}return{[p]:d,[f]:g}}}},Kp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var t,n;const{placement:o,rects:a,platform:i,elements:s}=r,{apply:l=()=>{},...c}=zt(e,r),u=await Zo(r,c),f=Nt(o),p=Qn(o),d=mt(o)==="y",{width:g,height:m}=a.floating;let _,y;f==="top"||f==="bottom"?(_=f,y=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,_=p==="end"?"top":"bottom");const x=m-u.top-u.bottom,w=g-u.left-u.right,$=Lt(m-u[_],x),C=Lt(g-u[y],w),k=!r.middlewareData.shift;let M=$,E=C;if((t=r.middlewareData.shift)!=null&&t.enabled.x&&(E=w),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(M=x),k&&!p){const F=Fe(u.left,0),L=Fe(u.right,0),T=Fe(u.top,0),O=Fe(u.bottom,0);d?E=g-2*(F!==0||L!==0?F+L:Fe(u.left,u.right)):M=m-2*(T!==0||O!==0?T+O:Fe(u.top,u.bottom))}await l({...r,availableWidth:E,availableHeight:M});const P=await i.getDimensions(s.floating);return g!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function Gc(e){const r=Ye(e);let t=parseFloat(r.width)||0,n=parseFloat(r.height)||0;const o=$e(e),a=o?e.offsetWidth:t,i=o?e.offsetHeight:n,s=br(t)!==a||br(n)!==i;return s&&(t=a,n=i),{width:t,height:n,$:s}}function Ki(e){return ae(e)?e:e.contextElement}function Ln(e){const r=Ki(e);if(!$e(r))return bt(1);const t=r.getBoundingClientRect(),{width:n,height:o,$:a}=Gc(r);let i=(a?br(t.width):t.width)/n,s=(a?br(t.height):t.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Up=bt(0);function qc(e){const r=He(e);return!Uo()||!r.visualViewport?Up:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Qp(e,r,t){return r===void 0&&(r=!1),!t||r&&t!==He(e)?!1:r}function bn(e,r,t,n){r===void 0&&(r=!1),t===void 0&&(t=!1);const o=e.getBoundingClientRect(),a=Ki(e);let i=bt(1);r&&(n?ae(n)&&(i=Ln(n)):i=Ln(e));const s=Qp(a,t,n)?qc(a):bt(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(a){const p=He(a),d=n&&ae(n)?He(n):n;let g=p,m=si(g);for(;m&&n&&d!==g;){const _=Ln(m),y=m.getBoundingClientRect(),x=Ye(m),w=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*_.x,$=y.top+(m.clientTop+parseFloat(x.paddingTop))*_.y;l*=_.x,c*=_.y,u*=_.x,f*=_.y,l+=w,c+=$,g=He(m),m=si(g)}}return wo({width:u,height:f,x:l,y:c})}function Jo(e,r){const t=Qo(e).scrollLeft;return r?r.left+t:bn(xt(e)).left+t}function Kc(e,r){const t=e.getBoundingClientRect(),n=t.left+r.scrollLeft-Jo(e,t),o=t.top+r.scrollTop;return{x:n,y:o}}function Xp(e){let{elements:r,rect:t,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=xt(n),s=r?Ko(r.floating):!1;if(n===i||s&&a)return t;let l={scrollLeft:0,scrollTop:0},c=bt(1);const u=bt(0),f=$e(n);if((f||!f&&!a)&&((rn(n)!=="body"||Mr(i))&&(l=Qo(n)),$e(n))){const d=bn(n);c=Ln(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}const p=i&&!f&&!a?Kc(i,l):bt(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:t.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Zp(e){return Array.from(e.getClientRects())}function Jp(e){const r=xt(e),t=Qo(e),n=e.ownerDocument.body,o=Fe(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=Fe(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+Jo(e);const s=-t.scrollTop;return Ye(n).direction==="rtl"&&(i+=Fe(r.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}const Fs=25;function eg(e,r){const t=He(e),n=xt(e),o=t.visualViewport;let a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const u=Uo();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Jo(n);if(c<=0){const u=n.ownerDocument,f=u.body,p=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-f.clientWidth-d);g<=Fs&&(a-=g)}else c<=Fs&&(a+=c);return{width:a,height:i,x:s,y:l}}const tg=new Set(["absolute","fixed"]);function ng(e,r){const t=bn(e,!0,r==="fixed"),n=t.top+e.clientTop,o=t.left+e.clientLeft,a=$e(e)?Ln(e):bt(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:i,height:s,x:l,y:c}}function Ls(e,r,t){let n;if(r==="viewport")n=eg(e,t);else if(r==="document")n=Jp(xt(e));else if(ae(r))n=ng(r,t);else{const o=qc(e);n={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return wo(n)}function Uc(e,r){const t=Ft(e);return t===r||!ae(t)||Jt(t)?!1:Ye(t).position==="fixed"||Uc(t,r)}function rg(e,r){const t=r.get(e);if(t)return t;let n=Qt(e,[],!1).filter(s=>ae(s)&&rn(s)!=="body"),o=null;const a=Ye(e).position==="fixed";let i=a?Ft(e):e;for(;ae(i)&&!Jt(i);){const s=Ye(i),l=Hi(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&tg.has(o.position)||Mr(i)&&!l&&Uc(e,i))?n=n.filter(u=>u!==i):o=s,i=Ft(i)}return r.set(e,n),n}function og(e){let{element:r,boundary:t,rootBoundary:n,strategy:o}=e;const i=[...t==="clippingAncestors"?Ko(r)?[]:rg(r,this._c):[].concat(t),n],s=i[0],l=i.reduce((c,u)=>{const f=Ls(r,u,o);return c.top=Fe(f.top,c.top),c.right=Lt(f.right,c.right),c.bottom=Lt(f.bottom,c.bottom),c.left=Fe(f.left,c.left),c},Ls(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ag(e){const{width:r,height:t}=Gc(e);return{width:r,height:t}}function ig(e,r,t){const n=$e(r),o=xt(r),a=t==="fixed",i=bn(e,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=bt(0);function c(){l.x=Jo(o)}if(n||!n&&!a)if((rn(r)!=="body"||Mr(o))&&(s=Qo(r)),n){const d=bn(r,!0,a,r);l.x=d.x+r.clientLeft,l.y=d.y+r.clientTop}else o&&c();a&&!n&&o&&c();const u=o&&!n&&!a?Kc(o,s):bt(0),f=i.left+s.scrollLeft-l.x-u.x,p=i.top+s.scrollTop-l.y-u.y;return{x:f,y:p,width:i.width,height:i.height}}function Ea(e){return Ye(e).position==="static"}function zs(e,r){if(!$e(e)||Ye(e).position==="fixed")return null;if(r)return r(e);let t=e.offsetParent;return xt(e)===t&&(t=t.ownerDocument.body),t}function Qc(e,r){const t=He(e);if(Ko(e))return t;if(!$e(e)){let o=Ft(e);for(;o&&!Jt(o);){if(ae(o)&&!Ea(o))return o;o=Ft(o)}return t}let n=zs(e,r);for(;n&&Zf(n)&&Ea(n);)n=zs(n,r);return n&&Jt(n)&&Ea(n)&&!Hi(n)?t:n||rp(e)||t}const sg=async function(e){const r=this.getOffsetParent||Qc,t=this.getDimensions,n=await t(e.floating);return{reference:ig(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function lg(e){return Ye(e).direction==="rtl"}const cg={convertOffsetParentRelativeRectToViewportRelativeRect:Xp,getDocumentElement:xt,getClippingRect:og,getOffsetParent:Qc,getElementRects:sg,getClientRects:Zp,getDimensions:ag,getScale:Ln,isElement:ae,isRTL:lg};function Xc(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function ug(e,r){let t=null,n;const o=xt(e);function a(){var s;clearTimeout(n),(s=t)==null||s.disconnect(),t=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(s||r(),!p||!d)return;const g=Hr(f),m=Hr(o.clientWidth-(u+p)),_=Hr(o.clientHeight-(f+d)),y=Hr(u),w={rootMargin:-g+"px "+-m+"px "+-_+"px "+-y+"px",threshold:Fe(0,Lt(1,l))||1};let $=!0;function C(k){const M=k[0].intersectionRatio;if(M!==l){if(!$)return i();M?i(!1,M):n=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!Xc(c,e.getBoundingClientRect())&&i(),$=!1}try{t=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{t=new IntersectionObserver(C,w)}t.observe(e)}return i(!0),a}function Rr(e,r,t,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ki(e),u=o||a?[...c?Qt(c):[],...Qt(r)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",t,{passive:!0}),a&&y.addEventListener("resize",t)});const f=c&&s?ug(c,t):null;let p=-1,d=null;i&&(d=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&d&&(d.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(r)})),t()}),c&&!l&&d.observe(c),d.observe(r));let g,m=l?bn(e):null;l&&_();function _(){const y=bn(e);m&&!Xc(m,y)&&t(),m=y,g=requestAnimationFrame(_)}return t(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",t),a&&x.removeEventListener("resize",t)}),f==null||f(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(g)}}const Ma=Zo,dg=Wp,fg=Gp,pg=Vp,gg=Kp,Ns=Yp,mg=qp,hg=(e,r,t)=>{const n=new Map,o={platform:cg,...t},a={...o.platform,_c:n};return Hp(e,r,{...o,platform:a})};var vg=typeof document<"u",_g=function(){},lo=vg?b.useLayoutEffect:_g;function ko(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let t,n,o;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==r.length)return!1;for(n=t;n--!==0;)if(!ko(e[n],r[n]))return!1;return!0}if(o=Object.keys(e),t=o.length,t!==Object.keys(r).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(r,o[n]))return!1;for(n=t;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!ko(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}function Zc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function As(e,r){const t=Zc(e);return Math.round(r*t)/t}function Ra(e){const r=h.useRef(e);return lo(()=>{r.current=e}),r}function Jc(e){e===void 0&&(e={});const{placement:r="bottom",strategy:t="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=h.useState({x:0,y:0,strategy:t,placement:r,middlewareData:{},isPositioned:!1}),[p,d]=h.useState(n);ko(p,n)||d(n);const[g,m]=h.useState(null),[_,y]=h.useState(null),x=h.useCallback(D=>{D!==k.current&&(k.current=D,m(D))},[]),w=h.useCallback(D=>{D!==M.current&&(M.current=D,y(D))},[]),$=a||g,C=i||_,k=h.useRef(null),M=h.useRef(null),E=h.useRef(u),P=l!=null,F=Ra(l),L=Ra(o),T=Ra(c),O=h.useCallback(()=>{if(!k.current||!M.current)return;const D={placement:r,strategy:t,middleware:p};L.current&&(D.platform=L.current),hg(k.current,M.current,D).then(R=>{const B={...R,isPositioned:T.current!==!1};A.current&&!ko(E.current,B)&&(E.current=B,jn.flushSync(()=>{f(B)}))})},[p,r,t,L,T]);lo(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(D=>({...D,isPositioned:!1})))},[c]);const A=h.useRef(!1);lo(()=>(A.current=!0,()=>{A.current=!1}),[]),lo(()=>{if($&&(k.current=$),C&&(M.current=C),$&&C){if(F.current)return F.current($,C,O);O()}},[$,C,O,F,P]);const N=h.useMemo(()=>({reference:k,floating:M,setReference:x,setFloating:w}),[x,w]),j=h.useMemo(()=>({reference:$,floating:C}),[$,C]),z=h.useMemo(()=>{const D={position:t,left:0,top:0};if(!j.floating)return D;const R=As(j.floating,u.x),B=As(j.floating,u.y);return s?{...D,transform:"translate("+R+"px, "+B+"px)",...Zc(j.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:R,top:B}},[t,s,j.floating,u.x,u.y]);return h.useMemo(()=>({...u,update:O,refs:N,elements:j,floatingStyles:z}),[u,O,N,j,z])}const bg=e=>{function r(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:n,padding:o}=typeof e=="function"?e(t):e;return n&&r(n)?n.current!=null?Ns({element:n.current,padding:o}).fn(t):{}:n?Ns({element:n,padding:o}).fn(t):{}}}},Xn=(e,r)=>({...dg(e),options:[e,r]}),ea=(e,r)=>({...fg(e),options:[e,r]}),yg=(e,r)=>({...mg(e),options:[e,r]}),Pr=(e,r)=>({...pg(e),options:[e,r]}),wg=(e,r)=>({...gg(e),options:[e,r]}),eu=(e,r)=>({...bg(e),options:[e,r]});function xg(e){return h.useMemo(()=>e.every(r=>r==null)?null:r=>{e.forEach(t=>{typeof t=="function"?t(r):t!=null&&(t.current=r)})},e)}const tu={...h},Sg=tu.useInsertionEffect,$g=Sg||(e=>e());function Je(e){const r=h.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return $g(()=>{r.current=e}),h.useCallback(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.current==null?void 0:r.current(...n)},[])}var ze=typeof document<"u"?b.useLayoutEffect:b.useEffect;function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Yn.apply(this,arguments)}let js=!1,kg=0;const Hs=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+kg++;function Cg(){const[e,r]=h.useState(()=>js?Hs():void 0);return ze(()=>{e==null&&r(Hs())},[]),h.useEffect(()=>{js=!0},[]),e}const Dg=tu.useId,ta=Dg||Cg;let yr;process.env.NODE_ENV!=="production"&&(yr=new Set);function nu(){for(var e,r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];const o="Floating UI: "+t.join(" ");if(!((e=yr)!=null&&e.has(o))){var a;(a=yr)==null||a.add(o),console.warn(o)}}function Eg(){for(var e,r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];const o="Floating UI: "+t.join(" ");if(!((e=yr)!=null&&e.has(o))){var a;(a=yr)==null||a.add(o),console.error(o)}}const Mg=h.forwardRef(function(r,t){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:f,stroke:p,d,style:{transform:g,...m}={},..._}=r;process.env.NODE_ENV!=="production"&&(t||nu("The `ref` prop is required for `FloatingArrow`."));const y=ta(),[x,w]=h.useState(!1);if(ze(()=>{if(!o)return;Ye(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[$,C]=n.split("-"),k=$==="top"||$==="bottom";let M=f;(k&&i!=null&&i.x||!k&&i!=null&&i.y)&&(M=null);const E=u*2,P=E/2,F=s/2*(c/-8+1),L=l/2*c/4,T=!!d,O=M&&C==="end"?"bottom":"top";let A=M&&C==="end"?"right":"left";M&&x&&(A=C==="end"?"left":"right");const N=(a==null?void 0:a.x)!=null?M||a.x:"",j=(a==null?void 0:a.y)!=null?M||a.y:"",z=d||"M0,0"+(" H"+s)+(" L"+(s-F)+","+(l-L))+(" Q"+s/2+","+l+" "+F+","+(l-L))+" Z",D={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[$];return h.createElement("svg",Yn({},_,{"aria-hidden":!0,ref:t,width:T?s:s+E,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[A]:N,[O]:j,[$]:k||T?"100%":"calc(100% - "+E/2+"px)",transform:[D,g].filter(R=>!!R).join(" "),...m}}),E>0&&h.createElement("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:E+(d?0:1),d:z}),h.createElement("path",{stroke:E&&!d?_.fill:"none",d:z}),h.createElement("clipPath",{id:y},h.createElement("rect",{x:-P,y:P*(T?-1:1),width:s+E,height:s})))});function Rg(){const e=new Map;return{emit(r,t){var n;(n=e.get(r))==null||n.forEach(o=>o(t))},on(r,t){e.set(r,[...e.get(r)||[],t])},off(r,t){var n;e.set(r,((n=e.get(r))==null?void 0:n.filter(o=>o!==t))||[])}}}const Pg=h.createContext(null),Tg=h.createContext(null),Ui=()=>{var e;return((e=h.useContext(Pg))==null?void 0:e.id)||null},na=()=>h.useContext(Tg);function yn(e){return"data-floating-ui-"+e}function zn(e){const r=b.useRef(e);return ze(()=>{r.current=e}),r}const Ys=yn("safe-polygon");function Pa(e,r,t){return t&&!_r(t)?0:typeof e=="number"?e:e==null?void 0:e[r]}function Ig(e,r){r===void 0&&(r={});const{open:t,onOpenChange:n,dataRef:o,events:a,elements:i}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:p=!0}=r,d=na(),g=Ui(),m=zn(c),_=zn(l),y=zn(t),x=h.useRef(),w=h.useRef(-1),$=h.useRef(),C=h.useRef(-1),k=h.useRef(!0),M=h.useRef(!1),E=h.useRef(()=>{}),P=h.useRef(!1),F=h.useCallback(()=>{var z;const D=(z=o.current.openEvent)==null?void 0:z.type;return(D==null?void 0:D.includes("mouse"))&&D!=="mousedown"},[o]);h.useEffect(()=>{if(!s)return;function z(D){let{open:R}=D;R||(clearTimeout(w.current),clearTimeout(C.current),k.current=!0,P.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[s,a]),h.useEffect(()=>{if(!s||!m.current||!t)return;function z(R){F()&&n(!1,R,"hover")}const D=Ie(i.floating).documentElement;return D.addEventListener("mouseleave",z),()=>{D.removeEventListener("mouseleave",z)}},[i.floating,t,n,s,m,F]);const L=h.useCallback(function(z,D,R){D===void 0&&(D=!0),R===void 0&&(R="hover");const B=Pa(_.current,"close",x.current);B&&!$.current?(clearTimeout(w.current),w.current=window.setTimeout(()=>n(!1,z,R),B)):D&&(clearTimeout(w.current),n(!1,z,R))},[_,n]),T=Je(()=>{E.current(),$.current=void 0}),O=Je(()=>{if(M.current){const z=Ie(i.floating).body;z.style.pointerEvents="",z.removeAttribute(Ys),M.current=!1}}),A=Je(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);h.useEffect(()=>{if(!s)return;function z(H){if(clearTimeout(w.current),k.current=!1,u&&!_r(x.current)||f>0&&!Pa(_.current,"open"))return;const ne=Pa(_.current,"open",x.current);ne?w.current=window.setTimeout(()=>{y.current||n(!0,H,"hover")},ne):t||n(!0,H,"hover")}function D(H){if(A())return;E.current();const ne=Ie(i.floating);if(clearTimeout(C.current),P.current=!1,m.current&&o.current.floatingContext){t||clearTimeout(w.current),$.current=m.current({...o.current.floatingContext,tree:d,x:H.clientX,y:H.clientY,onClose(){O(),T(),A()||L(H,!0,"safe-polygon")}});const Z=$.current;ne.addEventListener("mousemove",Z),E.current=()=>{ne.removeEventListener("mousemove",Z)};return}(x.current==="touch"?!Te(i.floating,H.relatedTarget):!0)&&L(H)}function R(H){A()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:d,x:H.clientX,y:H.clientY,onClose(){O(),T(),A()||L(H)}})(H))}if(ae(i.domReference)){var B;const H=i.domReference;return t&&H.addEventListener("mouseleave",R),(B=i.floating)==null||B.addEventListener("mouseleave",R),p&&H.addEventListener("mousemove",z,{once:!0}),H.addEventListener("mouseenter",z),H.addEventListener("mouseleave",D),()=>{var ne;t&&H.removeEventListener("mouseleave",R),(ne=i.floating)==null||ne.removeEventListener("mouseleave",R),p&&H.removeEventListener("mousemove",z),H.removeEventListener("mouseenter",z),H.removeEventListener("mouseleave",D)}}},[i,s,e,u,f,p,L,T,O,n,t,y,d,_,m,o,A]),ze(()=>{var z;if(s&&t&&(z=m.current)!=null&&z.__options.blockPointerEvents&&F()){M.current=!0;const R=i.floating;if(ae(i.domReference)&&R){var D;const B=Ie(i.floating).body;B.setAttribute(Ys,"");const H=i.domReference,ne=d==null||(D=d.nodesRef.current.find(X=>X.id===g))==null||(D=D.context)==null?void 0:D.elements.floating;return ne&&(ne.style.pointerEvents=""),B.style.pointerEvents="none",H.style.pointerEvents="auto",R.style.pointerEvents="auto",()=>{B.style.pointerEvents="",H.style.pointerEvents="",R.style.pointerEvents=""}}}},[s,t,g,i,d,m,F]),ze(()=>{t||(x.current=void 0,P.current=!1,T(),O())},[t,T,O]),h.useEffect(()=>()=>{T(),clearTimeout(w.current),clearTimeout(C.current),O()},[s,i.domReference,T,O]);const N=h.useMemo(()=>{function z(D){x.current=D.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(D){const{nativeEvent:R}=D;function B(){!k.current&&!y.current&&n(!0,R,"hover")}u&&!_r(x.current)||t||f===0||P.current&&D.movementX**2+D.movementY**2<2||(clearTimeout(C.current),x.current==="touch"?B():(P.current=!0,C.current=window.setTimeout(B,f)))}}},[u,n,t,y,f]),j=h.useMemo(()=>({onMouseEnter(){clearTimeout(w.current)},onMouseLeave(z){A()||L(z.nativeEvent,!1)}}),[L,A]);return h.useMemo(()=>s?{reference:N,floating:j}:{},[s,N,j])}let Vs=0;function Rn(e,r){r===void 0&&(r={});const{preventScroll:t=!1,cancelPrevious:n=!0,sync:o=!1}=r;n&&cancelAnimationFrame(Vs);const a=()=>e==null?void 0:e.focus({preventScroll:t});o?a():Vs=requestAnimationFrame(a)}function Og(e,r){var t;let n=[],o=(t=e.find(a=>a.id===r))==null?void 0:t.parentId;for(;o;){const a=e.find(i=>i.id===o);o=a==null?void 0:a.parentId,a&&(n=n.concat(a))}return n}function dr(e,r){let t=e.filter(o=>{var a;return o.parentId===r&&((a=o.context)==null?void 0:a.open)}),n=t;for(;n.length;)n=e.filter(o=>{var a;return(a=n)==null?void 0:a.some(i=>{var s;return o.parentId===i.id&&((s=o.context)==null?void 0:s.open)})}),t=t.concat(n);return t}let Pn=new WeakMap,Yr=new WeakSet,Vr={},Ta=0;const Fg=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ru=e=>e&&(e.host||ru(e.parentNode)),Lg=(e,r)=>r.map(t=>{if(e.contains(t))return t;const n=ru(t);return e.contains(n)?n:null}).filter(t=>t!=null);function zg(e,r,t,n){const o="data-floating-ui-inert",a=n?"inert":t?"aria-hidden":null,i=Lg(r,e),s=new Set,l=new Set(i),c=[];Vr[o]||(Vr[o]=new WeakMap);const u=Vr[o];i.forEach(f),p(r),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||[].forEach.call(d.children,g=>{if(rn(g)!=="script")if(s.has(g))p(g);else{const m=a?g.getAttribute(a):null,_=m!==null&&m!=="false",y=(Pn.get(g)||0)+1,x=(u.get(g)||0)+1;Pn.set(g,y),u.set(g,x),c.push(g),y===1&&_&&Yr.add(g),x===1&&g.setAttribute(o,""),!_&&a&&g.setAttribute(a,"true")}})}return Ta++,()=>{c.forEach(d=>{const g=(Pn.get(d)||0)-1,m=(u.get(d)||0)-1;Pn.set(d,g),u.set(d,m),g||(!Yr.has(d)&&a&&d.removeAttribute(a),Yr.delete(d)),m||d.removeAttribute(o)}),Ta--,Ta||(Pn=new WeakMap,Pn=new WeakMap,Yr=new WeakSet,Vr={})}}function Bs(e,r,t){r===void 0&&(r=!1),t===void 0&&(t=!1);const n=Ie(e[0]).body;return zg(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,r,t)}const wr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ou(e,r){const t=Xo(e,wr());r==="prev"&&t.reverse();const n=t.indexOf(kt(Ie(e)));return t.slice(n+1)[0]}function au(){return ou(document.body,"next")}function iu(){return ou(document.body,"prev")}function fr(e,r){const t=r||e.currentTarget,n=e.relatedTarget;return!n||!Te(t,n)}function Ng(e){Xo(e,wr()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function Ws(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const ra={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Ag;function Gs(e){e.key==="Tab"&&(e.target,clearTimeout(Ag))}const Co=h.forwardRef(function(r,t){const[n,o]=h.useState();ze(()=>(Ac()&&o("button"),document.addEventListener("keydown",Gs),()=>{document.removeEventListener("keydown",Gs)}),[]);const a={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[yn("focus-guard")]:"",style:ra};return h.createElement("span",Yn({},r,a))}),su=h.createContext(null),qs=yn("portal");function jg(e){e===void 0&&(e={});const{id:r,root:t}=e,n=ta(),o=lu(),[a,i]=h.useState(null),s=h.useRef(null);return ze(()=>()=>{a==null||a.remove(),queueMicrotask(()=>{s.current=null})},[a]),ze(()=>{if(!n||s.current)return;const l=r?document.getElementById(r):null;if(!l)return;const c=document.createElement("div");c.id=n,c.setAttribute(qs,""),l.appendChild(c),s.current=c,i(c)},[r,n]),ze(()=>{if(t===null||!n||s.current)return;let l=t||(o==null?void 0:o.portalNode);l&&!ae(l)&&(l=l.current),l=l||document.body;let c=null;r&&(c=document.createElement("div"),c.id=r,l.appendChild(c));const u=document.createElement("div");u.id=n,u.setAttribute(qs,""),l=c||l,l.appendChild(u),s.current=u,i(u)},[r,t,n,o]),a}function oa(e){const{children:r,id:t,root:n,preserveTabOrder:o=!0}=e,a=jg({id:t,root:n}),[i,s]=h.useState(null),l=h.useRef(null),c=h.useRef(null),u=h.useRef(null),f=h.useRef(null),p=i==null?void 0:i.modal,d=i==null?void 0:i.open,g=!!i&&!i.modal&&i.open&&o&&!!(n||a);return h.useEffect(()=>{if(!a||!o||p)return;function m(_){a&&fr(_)&&(_.type==="focusin"?Ws:Ng)(a)}return a.addEventListener("focusin",m,!0),a.addEventListener("focusout",m,!0),()=>{a.removeEventListener("focusin",m,!0),a.removeEventListener("focusout",m,!0)}},[a,o,p]),h.useEffect(()=>{a&&(d||Ws(a))},[d,a]),h.createElement(su.Provider,{value:h.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[o,a])},g&&a&&h.createElement(Co,{"data-type":"outside",ref:l,onFocus:m=>{if(fr(m,a)){var _;(_=u.current)==null||_.focus()}else{const y=iu()||(i==null?void 0:i.refs.domReference.current);y==null||y.focus()}}}),g&&a&&h.createElement("span",{"aria-owns":a.id,style:ra}),a&&jn.createPortal(r,a),g&&a&&h.createElement(Co,{"data-type":"outside",ref:c,onFocus:m=>{if(fr(m,a)){var _;(_=f.current)==null||_.focus()}else{const y=au()||(i==null?void 0:i.refs.domReference.current);y==null||y.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,m.nativeEvent,"focus-out"))}}}))}const lu=()=>h.useContext(su),fi="data-floating-ui-focusable";function Hg(e){return e?e.hasAttribute(fi)?e:e.querySelector("["+fi+"]")||e:null}const Ks=20;let sn=[];function Ia(e){sn=sn.filter(t=>t.isConnected);let r=e;if(!(!r||rn(r)==="body")){if(!jp(r,wr())){const t=Xo(r,wr())[0];t&&(r=t)}sn.push(r),sn.length>Ks&&(sn=sn.slice(-Ks))}}function Us(){return sn.slice().reverse().find(e=>e.isConnected)}const Yg=h.forwardRef(function(r,t){return h.createElement("button",Yn({},r,{type:"button",ref:t,tabIndex:-1,style:ra}))});function cu(e){const{context:r,children:t,disabled:n=!1,order:o=["content"],guards:a=!0,initialFocus:i=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:p,refs:d,nodeId:g,onOpenChange:m,events:_,dataRef:y,floatingId:x,elements:{domReference:w,floating:$}}=r,C=typeof i=="number"&&i<0,k=dp(w)&&C,M=Fg()?a:!0,E=zn(o),P=zn(i),F=zn(s),L=na(),T=lu(),O=h.useRef(null),A=h.useRef(null),N=h.useRef(!1),j=h.useRef(!1),z=h.useRef(-1),D=T!=null,R=Hg($),B=Je(function(Z){return Z===void 0&&(Z=R),Z?Xo(Z,wr()):[]}),H=Je(Z=>{const ee=B(Z);return E.current.map(G=>w&&G==="reference"?w:R&&G==="floating"?R:ee).filter(Boolean).flat()});h.useEffect(()=>{if(n||!c)return;function Z(G){if(G.key==="Tab"){Te(R,kt(Ie(R)))&&B().length===0&&!k&&Da(G);const J=H(),q=Wt(G);E.current[0]==="reference"&&q===w&&(Da(G),G.shiftKey?Rn(J[J.length-1]):Rn(J[1])),E.current[1]==="floating"&&q===R&&G.shiftKey&&(Da(G),Rn(J[0]))}}const ee=Ie(R);return ee.addEventListener("keydown",Z),()=>{ee.removeEventListener("keydown",Z)}},[n,w,R,c,E,k,B,H]),h.useEffect(()=>{if(n||!$)return;function Z(ee){const G=Wt(ee),q=B().indexOf(G);q!==-1&&(z.current=q)}return $.addEventListener("focusin",Z),()=>{$.removeEventListener("focusin",Z)}},[n,$,B]),h.useEffect(()=>{if(n||!f)return;function Z(){j.current=!0,setTimeout(()=>{j.current=!1})}function ee(G){const J=G.relatedTarget;queueMicrotask(()=>{const q=!(Te(w,J)||Te($,J)||Te(J,$)||Te(T==null?void 0:T.portalNode,J)||J!=null&&J.hasAttribute(yn("focus-guard"))||L&&(dr(L.nodesRef.current,g).find(ie=>{var me,Be;return Te((me=ie.context)==null?void 0:me.elements.floating,J)||Te((Be=ie.context)==null?void 0:Be.elements.domReference,J)})||Og(L.nodesRef.current,g).find(ie=>{var me,Be;return((me=ie.context)==null?void 0:me.elements.floating)===J||((Be=ie.context)==null?void 0:Be.elements.domReference)===J})));if(l&&q&&kt(Ie(R))===Ie(R).body){$e(R)&&R.focus();const ie=z.current,me=B(),Be=me[ie]||me[me.length-1]||R;$e(Be)&&Be.focus()}(k||!c)&&J&&q&&!j.current&&J!==Us()&&(N.current=!0,m(!1,G,"focus-out"))})}if($&&$e(w))return w.addEventListener("focusout",ee),w.addEventListener("pointerdown",Z),$.addEventListener("focusout",ee),()=>{w.removeEventListener("focusout",ee),w.removeEventListener("pointerdown",Z),$.removeEventListener("focusout",ee)}},[n,w,$,R,c,g,L,T,m,f,l,B,k]),h.useEffect(()=>{var Z;if(n)return;const ee=Array.from((T==null||(Z=T.portalNode)==null?void 0:Z.querySelectorAll("["+yn("portal")+"]"))||[]);if($){const G=[$,...ee,O.current,A.current,E.current.includes("reference")||k?w:null].filter(q=>q!=null),J=c||k?Bs(G,M,!M):Bs(G);return()=>{J()}}},[n,w,$,c,E,T,k,M]),ze(()=>{if(n||!$e(R))return;const Z=Ie(R),ee=kt(Z);queueMicrotask(()=>{const G=H(R),J=P.current,q=(typeof J=="number"?G[J]:J.current)||R,ie=Te(R,ee);!C&&!ie&&p&&Rn(q,{preventScroll:q===R})})},[n,p,R,C,H,P]),ze(()=>{if(n||!R)return;let Z=!1;const ee=Ie(R),G=kt(ee);let q=y.current.openEvent;Ia(G);function ie(Mn){let{open:Nr,reason:Ar,event:Yt,nested:ka}=Mn;Nr&&(q=Yt),Ar==="escape-key"&&d.domReference.current&&Ia(d.domReference.current),Ar==="hover"&&Yt.type==="mouseleave"&&(N.current=!0),Ar==="outside-press"&&(ka?(N.current=!1,Z=!0):N.current=!(ap(Yt)||Nc(Yt)))}_.on("openchange",ie);const me=ee.createElement("span");me.setAttribute("tabindex","-1"),me.setAttribute("aria-hidden","true"),Object.assign(me.style,ra),D&&w&&w.insertAdjacentElement("afterend",me);function Be(){return typeof F.current=="boolean"?Us()||me:F.current.current||me}return()=>{_.off("openchange",ie);const Mn=kt(ee),Nr=Te($,Mn)||L&&dr(L.nodesRef.current,g).some(ka=>{var Ds;return Te((Ds=ka.context)==null?void 0:Ds.elements.floating,Mn)});(Nr||q&&["click","mousedown"].includes(q.type))&&d.domReference.current&&Ia(d.domReference.current);const Yt=Be();queueMicrotask(()=>{F.current&&!N.current&&$e(Yt)&&(!(Yt!==Mn&&Mn!==ee.body)||Nr)&&Yt.focus({preventScroll:Z}),me.remove()})}},[n,$,R,F,y,d,_,L,g,D,w]),h.useEffect(()=>{queueMicrotask(()=>{N.current=!1})},[n]),ze(()=>{if(!n&&T)return T.setFocusManagerState({modal:c,closeOnFocusOut:f,open:p,onOpenChange:m,refs:d}),()=>{T.setFocusManagerState(null)}},[n,T,c,p,m,d,f]),ze(()=>{if(n||!R||typeof MutationObserver!="function"||C)return;const Z=()=>{const G=R.getAttribute("tabindex"),J=B(),q=kt(Ie($)),ie=J.indexOf(q);ie!==-1&&(z.current=ie),E.current.includes("floating")||q!==d.domReference.current&&J.length===0?G!=="0"&&R.setAttribute("tabindex","0"):G!=="-1"&&R.setAttribute("tabindex","-1")};Z();const ee=new MutationObserver(Z);return ee.observe(R,{childList:!0,subtree:!0,attributes:!0}),()=>{ee.disconnect()}},[n,$,R,d,E,B,C]);function ne(Z){return n||!u||!c?null:h.createElement(Yg,{ref:Z==="start"?O:A,onClick:ee=>m(!1,ee.nativeEvent)},typeof u=="string"?u:"Dismiss")}const X=!n&&M&&(c?!k:!0)&&(D||c);return h.createElement(h.Fragment,null,X&&h.createElement(Co,{"data-type":"inside",ref:T==null?void 0:T.beforeInsideRef,onFocus:Z=>{if(c){const G=H();Rn(o[0]==="reference"?G[0]:G[G.length-1])}else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(N.current=!1,fr(Z,T.portalNode)){const G=au()||w;G==null||G.focus()}else{var ee;(ee=T.beforeOutsideRef.current)==null||ee.focus()}}}),!k&&ne("start"),t,ne("end"),X&&h.createElement(Co,{"data-type":"inside",ref:T==null?void 0:T.afterInsideRef,onFocus:Z=>{if(c)Rn(H()[0]);else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(f&&(N.current=!0),fr(Z,T.portalNode)){const G=iu()||w;G==null||G.focus()}else{var ee;(ee=T.afterOutsideRef.current)==null||ee.focus()}}}))}let Br=0;function Vg(){const e=/iP(hone|ad|od)|iOS/.test(Yi()),r=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=r.left?parseFloat(r.left):window.scrollX,i=r.top?parseFloat(r.top):window.scrollY;if(r.overflow="hidden",o&&(r[n]=o+"px"),e){var s,l;const c=((s=window.visualViewport)==null?void 0:s.offsetLeft)||0,u=((l=window.visualViewport)==null?void 0:l.offsetTop)||0;Object.assign(r,{position:"fixed",top:-(i-Math.floor(u))+"px",left:-(a-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(r,{overflow:"",[n]:""}),e&&(Object.assign(r,{position:"",top:"",left:"",right:""}),window.scrollTo(a,i))}}let Qs=()=>{};const Bg=h.forwardRef(function(r,t){const{lockScroll:n=!1,...o}=r;return ze(()=>{if(n)return Br++,Br===1&&(Qs=Vg()),()=>{Br--,Br===0&&Qs()}},[n]),h.createElement("div",Yn({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Xs(e){return $e(e.target)&&e.target.tagName==="BUTTON"}function Zs(e){return Bi(e)}function uu(e,r){r===void 0&&(r={});const{open:t,onOpenChange:n,dataRef:o,elements:{domReference:a}}=e,{enabled:i=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=r,p=h.useRef(),d=h.useRef(!1),g=h.useMemo(()=>({onPointerDown(m){p.current=m.pointerType},onMouseDown(m){const _=p.current;m.button===0&&s!=="click"&&(_r(_,!0)&&c||(t&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="mousedown")?n(!1,m.nativeEvent,"click"):(m.preventDefault(),n(!0,m.nativeEvent,"click"))))},onClick(m){const _=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}_r(_,!0)&&c||(t&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="click")?n(!1,m.nativeEvent,"click"):n(!0,m.nativeEvent,"click"))},onKeyDown(m){p.current=void 0,!(m.defaultPrevented||!u||Xs(m))&&(m.key===" "&&!Zs(a)&&(m.preventDefault(),d.current=!0),m.key==="Enter"&&n(!(t&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Xs(m)||Zs(a)||m.key===" "&&d.current&&(d.current=!1,n(!(t&&l),m.nativeEvent,"click"))}}),[o,a,s,c,u,n,t,f,l]);return h.useMemo(()=>i?{reference:g}:{},[i,g])}const Wg={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Gg={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Js=e=>{var r,t;return{escapeKey:typeof e=="boolean"?e:(r=e==null?void 0:e.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function Qi(e,r){r===void 0&&(r={});const{open:t,onOpenChange:n,elements:o,dataRef:a}=e,{enabled:i=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:d,capture:g}=r,m=na(),_=Je(typeof l=="function"?l:()=>!1),y=typeof l=="function"?_:l,x=h.useRef(!1),w=h.useRef(!1),{escapeKey:$,outsidePress:C}=Js(d),{escapeKey:k,outsidePress:M}=Js(g),E=h.useRef(!1),P=Je(N=>{var j;if(!t||!i||!s||N.key!=="Escape"||E.current)return;const z=(j=a.current.floatingContext)==null?void 0:j.nodeId,D=m?dr(m.nodesRef.current,z):[];if(!$&&(N.stopPropagation(),D.length>0)){let R=!0;if(D.forEach(B=>{var H;if((H=B.context)!=null&&H.open&&!B.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}n(!1,lp(N)?N.nativeEvent:N,"escape-key")}),F=Je(N=>{var j;const z=()=>{var D;P(N),(D=Wt(N))==null||D.removeEventListener("keydown",z)};(j=Wt(N))==null||j.addEventListener("keydown",z)}),L=Je(N=>{var j;const z=x.current;x.current=!1;const D=w.current;if(w.current=!1,c==="click"&&D||z||typeof y=="function"&&!y(N))return;const R=Wt(N),B="["+yn("inert")+"]",H=Ie(o.floating).querySelectorAll(B);let ne=ae(R)?R:null;for(;ne&&!Jt(ne);){const G=Ft(ne);if(Jt(G)||!ae(G))break;ne=G}if(H.length&&ae(R)&&!cp(R)&&!Te(R,o.floating)&&Array.from(H).every(G=>!Te(ne,G)))return;if($e(R)&&A){const G=R.clientWidth>0&&R.scrollWidth>R.clientWidth,J=R.clientHeight>0&&R.scrollHeight>R.clientHeight;let q=J&&N.offsetX>R.clientWidth;if(J&&Ye(R).direction==="rtl"&&(q=N.offsetX<=R.offsetWidth-R.clientWidth),q||G&&N.offsetY>R.clientHeight)return}const X=(j=a.current.floatingContext)==null?void 0:j.nodeId,Z=m&&dr(m.nodesRef.current,X).some(G=>{var J;return Ca(N,(J=G.context)==null?void 0:J.elements.floating)});if(Ca(N,o.floating)||Ca(N,o.domReference)||Z)return;const ee=m?dr(m.nodesRef.current,X):[];if(ee.length>0){let G=!0;if(ee.forEach(J=>{var q;if((q=J.context)!=null&&q.open&&!J.context.dataRef.current.__outsidePressBubbles){G=!1;return}}),!G)return}n(!1,N,"outside-press")}),T=Je(N=>{var j;const z=()=>{var D;L(N),(D=Wt(N))==null||D.removeEventListener(c,z)};(j=Wt(N))==null||j.addEventListener(c,z)});h.useEffect(()=>{if(!t||!i)return;a.current.__escapeKeyBubbles=$,a.current.__outsidePressBubbles=C;let N=-1;function j(H){n(!1,H,"ancestor-scroll")}function z(){window.clearTimeout(N),E.current=!0}function D(){N=window.setTimeout(()=>{E.current=!1},Uo()?5:0)}const R=Ie(o.floating);s&&(R.addEventListener("keydown",k?F:P,k),R.addEventListener("compositionstart",z),R.addEventListener("compositionend",D)),y&&R.addEventListener(c,M?T:L,M);let B=[];return p&&(ae(o.domReference)&&(B=Qt(o.domReference)),ae(o.floating)&&(B=B.concat(Qt(o.floating))),!ae(o.reference)&&o.reference&&o.reference.contextElement&&(B=B.concat(Qt(o.reference.contextElement)))),B=B.filter(H=>{var ne;return H!==((ne=R.defaultView)==null?void 0:ne.visualViewport)}),B.forEach(H=>{H.addEventListener("scroll",j,{passive:!0})}),()=>{s&&(R.removeEventListener("keydown",k?F:P,k),R.removeEventListener("compositionstart",z),R.removeEventListener("compositionend",D)),y&&R.removeEventListener(c,M?T:L,M),B.forEach(H=>{H.removeEventListener("scroll",j)}),window.clearTimeout(N)}},[a,o,s,y,c,t,n,p,i,$,C,P,k,F,L,M,T]),h.useEffect(()=>{x.current=!1},[y,c]);const O=h.useMemo(()=>({onKeyDown:P,[Wg[f]]:N=>{u&&n(!1,N.nativeEvent,"reference-press")}}),[P,n,u,f]),A=h.useMemo(()=>({onKeyDown:P,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Gg[c]]:()=>{x.current=!0}}),[P,c]);return h.useMemo(()=>i?{reference:O,floating:A}:{},[i,O,A])}function qg(e){const{open:r=!1,onOpenChange:t,elements:n}=e,o=ta(),a=h.useRef({}),[i]=h.useState(()=>Rg()),s=Ui()!=null;if(process.env.NODE_ENV!=="production"){const d=n.reference;d&&!ae(d)&&Eg("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=h.useState(n.reference),u=Je((d,g,m)=>{a.current.openEvent=d?g:void 0,i.emit("openchange",{open:d,event:g,reason:m,nested:s}),t==null||t(d,g,m)}),f=h.useMemo(()=>({setPositionReference:c}),[]),p=h.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return h.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:p,events:i,floatingId:o,refs:f}),[r,u,p,i,o,f])}function Tr(e){e===void 0&&(e={});const{nodeId:r}=e,t=qg({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||t,o=n.elements,[a,i]=h.useState(null),[s,l]=h.useState(null),u=(o==null?void 0:o.domReference)||a,f=h.useRef(null),p=na();ze(()=>{u&&(f.current=u)},[u]);const d=Jc({...e,elements:{...o,...s&&{reference:s}}}),g=h.useCallback(w=>{const $=ae(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l($),d.refs.setReference($)},[d.refs]),m=h.useCallback(w=>{(ae(w)||w===null)&&(f.current=w,i(w)),(ae(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!ae(w))&&d.refs.setReference(w)},[d.refs]),_=h.useMemo(()=>({...d.refs,setReference:m,setPositionReference:g,domReference:f}),[d.refs,m,g]),y=h.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),x=h.useMemo(()=>({...d,...n,refs:_,elements:y,nodeId:r}),[d,_,y,r,n]);return ze(()=>{n.dataRef.current.floatingContext=x;const w=p==null?void 0:p.nodesRef.current.find($=>$.id===r);w&&(w.context=x)}),h.useMemo(()=>({...d,context:x,refs:_,elements:y}),[d,_,y,x])}function Kg(e,r){r===void 0&&(r={});const{open:t,onOpenChange:n,events:o,dataRef:a,elements:i}=e,{enabled:s=!0,visibleOnly:l=!0}=r,c=h.useRef(!1),u=h.useRef(),f=h.useRef(!0);h.useEffect(()=>{if(!s)return;const d=He(i.domReference);function g(){!t&&$e(i.domReference)&&i.domReference===kt(Ie(i.domReference))&&(c.current=!0)}function m(){f.current=!0}return d.addEventListener("blur",g),d.addEventListener("keydown",m,!0),()=>{d.removeEventListener("blur",g),d.removeEventListener("keydown",m,!0)}},[i.domReference,t,s]),h.useEffect(()=>{if(!s)return;function d(g){let{reason:m}=g;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,s]),h.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=h.useMemo(()=>({onPointerDown(d){Nc(d.nativeEvent)||(f.current=!1)},onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const g=Wt(d.nativeEvent);if(l&&ae(g))try{if(Ac()&&ip())throw Error();if(!g.matches(":focus-visible"))return}catch{if(!f.current&&!Bi(g))return}n(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const g=d.relatedTarget,m=d.nativeEvent,_=ae(g)&&g.hasAttribute(yn("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=kt(i.domReference?i.domReference.ownerDocument:document);!g&&x===i.domReference||Te((y=a.current.floatingContext)==null?void 0:y.refs.floating.current,x)||Te(i.domReference,x)||_||n(!1,m,"focus")})}}),[a,i.domReference,n,l]);return h.useMemo(()=>s?{reference:p}:{},[s,p])}const el="active",tl="selected";function Oa(e,r,t){const n=new Map,o=t==="item";let a=e;if(o&&e){const{[el]:i,[tl]:s,...l}=e;a=l}return{...t==="floating"&&{tabIndex:-1,[fi]:""},...a,...r.map(i=>{const s=i?i[t]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[el,tl].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof u=="function"){var f;(f=n.get(c))==null||f.push(u),i[c]=function(){for(var p,d=arguments.length,g=new Array(d),m=0;m<d;m++)g[m]=arguments[m];return(p=n.get(c))==null?void 0:p.map(_=>_(...g)).find(_=>_!==void 0)}}}else i[c]=u}),i),{})}}function aa(e){e===void 0&&(e=[]);const r=e.map(s=>s==null?void 0:s.reference),t=e.map(s=>s==null?void 0:s.floating),n=e.map(s=>s==null?void 0:s.item),o=h.useCallback(s=>Oa(s,e,"reference"),r),a=h.useCallback(s=>Oa(s,e,"floating"),t),i=h.useCallback(s=>Oa(s,e,"item"),n);return h.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}const Ug=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Xi(e,r){var t;r===void 0&&(r={});const{open:n,floatingId:o}=e,{enabled:a=!0,role:i="dialog"}=r,s=(t=Ug.get(i))!=null?t:i,l=ta(),u=Ui()!=null,f=h.useMemo(()=>s==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":n?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,n,l,i]),p=h.useMemo(()=>{const g={id:o,...s&&{role:s}};return s==="tooltip"||i==="label"?g:{...g,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,i]),d=h.useCallback(g=>{let{active:m,selected:_}=g;const y={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...y,"aria-selected":m&&_};case"combobox":return{...y,...m&&{"aria-selected":!0}}}return{}},[o,i]);return h.useMemo(()=>a?{reference:f,floating:p,item:d}:{},[a,f,p,d])}function nl(e,r){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:r}}}}const Qg=e=>({name:"inner",options:e,async fn(r){const{listRef:t,overflowRef:n,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=zt(e,r),{rects:f,elements:{floating:p}}=r,d=t.current[i],g=(c==null?void 0:c.current)||p,m=p.clientTop||g.clientTop,_=p.clientTop!==0,y=g.clientTop!==0,x=p===g;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||nu('`placement` side must be "bottom" when using the `inner`',"middleware.")),!d)return{};const w={...r,...await Xn(-d.offsetTop-p.clientTop-f.reference.height/2-d.offsetHeight/2-a).fn(r)},$=await Ma(nl(w,g.scrollHeight+m+p.clientTop),u),C=await Ma(w,{...u,elementContext:"reference"}),k=Fe(0,$.top),M=w.y+k,F=(g.scrollHeight>g.clientHeight?L=>L:br)(Fe(0,g.scrollHeight+(_&&x||y?m*2:0)-k-Fe(0,$.bottom)));if(g.style.maxHeight=F+"px",g.scrollTop=k,o){const L=g.offsetHeight<d.offsetHeight*Lt(s,t.current.length)-1||C.top>=-l||C.bottom>=-l;jn.flushSync(()=>o(L))}return n&&(n.current=await Ma(nl({...w,y:M},g.offsetHeight+m+p.clientTop),u)),{y:M}}});function Xg(e,r){const{open:t,elements:n}=e,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=Je(s),c=h.useRef(!1),u=h.useRef(null),f=h.useRef(null);h.useEffect(()=>{if(!o)return;function d(m){if(m.ctrlKey||!g||a.current==null)return;const _=m.deltaY,y=a.current.top>=-.5,x=a.current.bottom>=-.5,w=g.scrollHeight-g.clientHeight,$=_<0?-1:1,C=_<0?"max":"min";g.scrollHeight<=g.clientHeight||(!y&&_>0||!x&&_<0?(m.preventDefault(),jn.flushSync(()=>{l(k=>k+Math[C](_,w*$))})):/firefox/i.test(Vi())&&(g.scrollTop+=_))}const g=(i==null?void 0:i.current)||n.floating;if(t&&g)return g.addEventListener("wheel",d),requestAnimationFrame(()=>{u.current=g.scrollTop,a.current!=null&&(f.current={...a.current})}),()=>{u.current=null,f.current=null,g.removeEventListener("wheel",d)}},[o,t,n.floating,a,i,l]);const p=h.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const d=(i==null?void 0:i.current)||n.floating;if(!(!a.current||!d||!c.current)){if(u.current!==null){const g=d.scrollTop-u.current;(a.current.bottom<-.5&&g<-1||a.current.top<-.5&&g>1)&&jn.flushSync(()=>l(m=>m+g))}requestAnimationFrame(()=>{u.current=d.scrollTop})}}}),[n.floating,l,a,i]);return h.useMemo(()=>o?{floating:p}:{},[o,p])}const Zg=I.keyframes`
|
|
198
|
+
`,Wf=e=>typeof e=="string"?_.jsx(Vf,{forwardedAs:"span",color:"subtle",size:"xs",ccMargin:"s none none",children:e}):e;function Gf({contentAfter:e,contentTopLeft:r,contentTopRight:n,contentBottomLeft:t,contentBottomRight:o,image:a,isSelected:i=!1,isVideo:s=!1,buttonAction:l,shouldBlurImage:c=!1,size:u="auto",...d}){const{accessibilityLabel:p,...f}=l||{};return _.jsxs(Lf,{...d,$size:u,children:[_.jsxs(zf,{children:[_.jsxs(Af,{$isSelected:i,children:[_.jsx(jf,{src:a.src,alt:a.alt?a.alt:"",$shouldBlurImage:c}),i?_.jsx(Hf,{"data-testid":"selected-asset-overlay"}):null,t||o?_.jsx(Yf,{}):null,s?_.jsxs(_.Fragment,{children:[_.jsx(Bf,{className:"mdi mdi-play-circle-outline"}),_.jsx(yt,{children:"Video"})]}):null]}),l?_.jsx(Oc,{type:"button",...f,children:_.jsx(yt,{children:l.accessibilityLabel})}):null,r?_.jsx(Ar,{$blockVal:"start",$inlineVal:"start",className:r.shouldShowOnHover?"cc-asset-thumb-content-show-on-hover":"",children:r.content}):null,n?_.jsx(Ar,{$blockVal:"start",$inlineVal:"end",className:n.shouldShowOnHover?"cc-asset-thumb-content-show-on-hover":"",children:n.content}):null,t?_.jsx(Ar,{$blockVal:"end",$inlineVal:"start",children:t}):null,o?_.jsx(Ar,{$blockVal:"end",$inlineVal:"end",children:o}):null]}),e?Wf(e):null]})}function Go(){return typeof window<"u"}function nn(e){return Fc(e)?(e.nodeName||"").toLowerCase():"#document"}function je(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function wt(e){var r;return(r=(Fc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Fc(e){return Go()?e instanceof Node||e instanceof je(e).Node:!1}function oe(e){return Go()?e instanceof Element||e instanceof je(e).Element:!1}function Se(e){return Go()?e instanceof HTMLElement||e instanceof je(e).HTMLElement:!1}function ai(e){return!Go()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof je(e).ShadowRoot}const qf=new Set(["inline","contents"]);function Er(e){const{overflow:r,overflowX:n,overflowY:t,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(r+t+n)&&!qf.has(o)}const Kf=new Set(["table","td","th"]);function Uf(e){return Kf.has(nn(e))}const Qf=[":popover-open",":modal"];function qo(e){return Qf.some(r=>{try{return e.matches(r)}catch{return!1}})}const Xf=["transform","translate","scale","rotate","perspective"],Zf=["transform","translate","scale","rotate","perspective","filter"],Jf=["paint","layout","strict","content"];function ji(e){const r=Ko(),n=oe(e)?He(e):e;return Xf.some(t=>n[t]?n[t]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!r&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!r&&(n.filter?n.filter!=="none":!1)||Zf.some(t=>(n.willChange||"").includes(t))||Jf.some(t=>(n.contain||"").includes(t))}function ep(e){let r=Ot(e);for(;Se(r)&&!Zt(r);){if(ji(r))return r;if(qo(r))return null;r=Ot(r)}return null}function Ko(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tp=new Set(["html","body","#document"]);function Zt(e){return tp.has(nn(e))}function He(e){return je(e).getComputedStyle(e)}function Uo(e){return oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ot(e){if(nn(e)==="html")return e;const r=e.assignedSlot||e.parentNode||ai(e)&&e.host||wt(e);return ai(r)?r.host:r}function Lc(e){const r=Ot(e);return Zt(r)?e.ownerDocument?e.ownerDocument.body:e.body:Se(r)&&Er(r)?r:Lc(r)}function Ut(e,r,n){var t;r===void 0&&(r=[]),n===void 0&&(n=!0);const o=Lc(e),a=o===((t=e.ownerDocument)==null?void 0:t.body),i=je(o);if(a){const s=ii(i);return r.concat(i,i.visualViewport||[],Er(o)?o:[],s&&n?Ut(s):[])}return r.concat(o,Ut(o,[],n))}function ii(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $t(e){let r=e.activeElement;for(;((n=r)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;r=r.shadowRoot.activeElement}return r}function Pe(e,r){if(!e||!r)return!1;const n=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(n&&ai(n)){let t=r;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1}function Hi(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Yi(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:n,version:t}=r;return n+"/"+t}).join(" "):navigator.userAgent}function np(e){return e.mozInputSource===0&&e.isTrusted?!0:si()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function zc(e){return op()?!1:!si()&&e.width===0&&e.height===0||si()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Nc(){return/apple/i.test(navigator.vendor)}function si(){const e=/android/i;return e.test(Hi())||e.test(Yi())}function rp(){return Hi().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function op(){return Yi().includes("jsdom/")}function vr(e,r){const n=["mouse","pen"];return r||n.push("",void 0),n.includes(e)}function ap(e){return"nativeEvent"in e}function ip(e){return e.matches("html,body")}function Te(e){return e?.ownerDocument||document}function ka(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const n=e;return n.target!=null&&r.contains(n.target)}function Bt(e){return"composedPath"in e?e.composedPath()[0]:e.target}const sp="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Vi(e){return Se(e)&&e.matches(sp)}function Ca(e){e.preventDefault(),e.stopPropagation()}function lp(e){return e?e.getAttribute("role")==="combobox"&&Vi(e):!1}const Ft=Math.min,Oe=Math.max,_r=Math.round,jr=Math.floor,_t=e=>({x:e,y:e}),cp={left:"right",right:"left",bottom:"top",top:"bottom"},up={start:"end",end:"start"};function li(e,r,n){return Oe(e,Ft(r,n))}function Lt(e,r){return typeof e=="function"?e(r):e}function zt(e){return e.split("-")[0]}function Un(e){return e.split("-")[1]}function Bi(e){return e==="x"?"y":"x"}function Wi(e){return e==="y"?"height":"width"}const dp=new Set(["top","bottom"]);function gt(e){return dp.has(zt(e))?"y":"x"}function Gi(e){return Bi(gt(e))}function fp(e,r,n){n===void 0&&(n=!1);const t=Un(e),o=Gi(e),a=Wi(o);let i=o==="x"?t===(n?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=bo(i)),[i,bo(i)]}function pp(e){const r=bo(e);return[ci(e),r,ci(r)]}function ci(e){return e.replace(/start|end/g,r=>up[r])}const Rs=["left","right"],Ps=["right","left"],gp=["top","bottom"],mp=["bottom","top"];function hp(e,r,n){switch(e){case"top":case"bottom":return n?r?Ps:Rs:r?Rs:Ps;case"left":case"right":return r?gp:mp;default:return[]}}function vp(e,r,n,t){const o=Un(e);let a=hp(zt(e),n==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(ci)))),a}function bo(e){return e.replace(/left|right|bottom|top/g,r=>cp[r])}function _p(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ac(e){return typeof e!="number"?_p(e):{top:e,right:e,bottom:e,left:e}}function yo(e){const{x:r,y:n,width:t,height:o}=e;return{width:t,height:o,top:n,left:r,right:r+t,bottom:n+o,x:r,y:n}}var bp=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],wo=bp.join(","),jc=typeof Element>"u",jn=jc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xo=!jc&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e?.ownerDocument},So=function e(r,n){var t;n===void 0&&(n=!0);var o=r==null||(t=r.getAttribute)===null||t===void 0?void 0:t.call(r,"inert"),a=o===""||o==="true",i=a||n&&r&&e(r.parentNode);return i},yp=function(r){var n,t=r==null||(n=r.getAttribute)===null||n===void 0?void 0:n.call(r,"contenteditable");return t===""||t==="true"},wp=function(r,n,t){if(So(r))return[];var o=Array.prototype.slice.apply(r.querySelectorAll(wo));return n&&jn.call(r,wo)&&o.unshift(r),o=o.filter(t),o},xp=function e(r,n,t){for(var o=[],a=Array.from(r);a.length;){var i=a.shift();if(!So(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),l=s.length?s:i.children,c=e(l,!0,t);t.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=jn.call(i,wo);u&&t.filter(i)&&(n||!r.includes(i))&&o.push(i);var d=i.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(i),p=!So(d,!1)&&(!t.shadowRootFilter||t.shadowRootFilter(i));if(d&&p){var f=e(d===!0?i.children:d.children,!0,t);t.flatten?o.push.apply(o,f):o.push({scopeParent:i,candidates:f})}else a.unshift.apply(a,i.children)}}return o},Hc=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},Yc=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||yp(r))&&!Hc(r)?0:r.tabIndex},Sp=function(r,n){var t=Yc(r);return t<0&&n&&!Hc(r)?0:t},$p=function(r,n){return r.tabIndex===n.tabIndex?r.documentOrder-n.documentOrder:r.tabIndex-n.tabIndex},Vc=function(r){return r.tagName==="INPUT"},kp=function(r){return Vc(r)&&r.type==="hidden"},Cp=function(r){var n=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(t){return t.tagName==="SUMMARY"});return n},Dp=function(r,n){for(var t=0;t<r.length;t++)if(r[t].checked&&r[t].form===n)return r[t]},Ep=function(r){if(!r.name)return!0;var n=r.form||xo(r),t=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=t(window.CSS.escape(r.name));else try{o=t(r.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=Dp(o,r.form);return!a||a===r},Mp=function(r){return Vc(r)&&r.type==="radio"},Rp=function(r){return Mp(r)&&!Ep(r)},Pp=function(r){var n,t=r&&xo(r),o=(n=t)===null||n===void 0?void 0:n.host,a=!1;if(t&&t!==r){var i,s,l;for(a=!!((i=o)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(o)||r!=null&&(l=r.ownerDocument)!==null&&l!==void 0&&l.contains(r));!a&&o;){var c,u,d;t=xo(o),o=(c=t)===null||c===void 0?void 0:c.host,a=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return a},Ts=function(r){var n=r.getBoundingClientRect(),t=n.width,o=n.height;return t===0&&o===0},Tp=function(r,n){var t=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(r).visibility==="hidden")return!0;var a=jn.call(r,"details>summary:first-of-type"),i=a?r.parentElement:r;if(jn.call(i,"details:not([open]) *"))return!0;if(!t||t==="full"||t==="legacy-full"){if(typeof o=="function"){for(var s=r;r;){var l=r.parentElement,c=xo(r);if(l&&!l.shadowRoot&&o(l)===!0)return Ts(r);r.assignedSlot?r=r.assignedSlot:!l&&c!==r.ownerDocument?r=c.host:r=l}r=s}if(Pp(r))return!r.getClientRects().length;if(t!=="legacy-full")return!0}else if(t==="non-zero-area")return Ts(r);return!1},Ip=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var n=r.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var t=0;t<n.children.length;t++){var o=n.children.item(t);if(o.tagName==="LEGEND")return jn.call(n,"fieldset[disabled] *")?!0:!o.contains(r)}return!0}n=n.parentElement}return!1},Op=function(r,n){return!(n.disabled||So(n)||kp(n)||Tp(n,r)||Cp(n)||Ip(n))},ui=function(r,n){return!(Rp(n)||Yc(n)<0||!Op(r,n))},Fp=function(r){var n=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Lp=function e(r){var n=[],t=[];return r.forEach(function(o,a){var i=!!o.scopeParent,s=i?o.scopeParent:o,l=Sp(s,i),c=i?e(o.candidates):s;l===0?i?n.push.apply(n,c):n.push(s):t.push({documentOrder:a,tabIndex:l,item:o,isScope:i,content:c})}),t.sort($p).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(n)},Qo=function(r,n){n=n||{};var t;return n.getShadowRoot?t=xp([r],n.includeContainer,{filter:ui.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Fp}):t=wp(r,n.includeContainer,ui.bind(null,n)),Lp(t)},zp=function(r,n){if(n=n||{},!r)throw new Error("No node provided");return jn.call(r,wo)===!1?!1:ui(n,r)};function Is(e,r,n){let{reference:t,floating:o}=e;const a=gt(r),i=Gi(r),s=Wi(i),l=zt(r),c=a==="y",u=t.x+t.width/2-o.width/2,d=t.y+t.height/2-o.height/2,p=t[s]/2-o[s]/2;let f;switch(l){case"top":f={x:u,y:t.y-o.height};break;case"bottom":f={x:u,y:t.y+t.height};break;case"right":f={x:t.x+t.width,y:d};break;case"left":f={x:t.x-o.width,y:d};break;default:f={x:t.x,y:t.y}}switch(Un(r)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1);break}return f}const Np=async(e,r,n)=>{const{placement:t="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let c=await i.getElementRects({reference:e,floating:r,strategy:o}),{x:u,y:d}=Is(c,t,l),p=t,f={},g=0;for(let m=0;m<s.length;m++){const{name:h,fn:b}=s[m],{x:w,y:x,data:$,reset:C}=await b({x:u,y:d,initialPlacement:t,placement:p,strategy:o,middlewareData:f,rects:c,platform:i,elements:{reference:e,floating:r}});u=w??u,d=x??d,f={...f,[h]:{...f[h],...$}},C&&g<=50&&(g++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:e,floating:r,strategy:o}):C.rects),{x:u,y:d}=Is(c,p,l)),m=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function Xo(e,r){var n;r===void 0&&(r={});const{x:t,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=Lt(r,e),g=Ac(f),h=s[p?d==="floating"?"reference":"floating":d],b=yo(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),$=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},C=yo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:l}):w);return{top:(b.top-C.top+g.top)/$.y,bottom:(C.bottom-b.bottom+g.bottom)/$.y,left:(b.left-C.left+g.left)/$.x,right:(C.right-b.right+g.right)/$.x}}const Ap=e=>({name:"arrow",options:e,async fn(r){const{x:n,y:t,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:c,padding:u=0}=Lt(e,r)||{};if(c==null)return{};const d=Ac(u),p={x:n,y:t},f=Gi(o),g=Wi(f),m=await i.getDimensions(c),h=f==="y",b=h?"top":"left",w=h?"bottom":"right",x=h?"clientHeight":"clientWidth",$=a.reference[g]+a.reference[f]-p[f]-a.floating[g],C=p[f]-a.reference[f],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=k?k[x]:0;(!E||!await(i.isElement==null?void 0:i.isElement(k)))&&(E=s.floating[x]||a.floating[g]);const P=$/2-C/2,z=E/2-m[g]/2-1,L=Ft(d[b],z),O=Ft(d[w],z),T=L,I=E-m[g]-O,j=E/2-m[g]/2+P,N=li(T,j,I),A=!l.arrow&&Un(o)!=null&&j!==N&&a.reference[g]/2-(j<T?L:O)-m[g]/2<0,F=A?j<T?j-T:j-I:0;return{[f]:p[f]+F,data:{[f]:N,centerOffset:j-N-F,...A&&{alignmentOffset:F}},reset:A}}}),jp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var n,t;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=r,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...h}=Lt(e,r);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=zt(o),w=gt(s),x=zt(s)===s,$=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=p||(x||!m?[bo(s)]:pp(s)),k=g!=="none";!p&&k&&C.push(...vp(s,m,g,$));const E=[s,...C],P=await Xo(r,h),z=[];let L=((t=a.flip)==null?void 0:t.overflows)||[];if(u&&z.push(P[b]),d){const j=fp(o,i,$);z.push(P[j[0]],P[j[1]])}if(L=[...L,{placement:o,overflows:z}],!z.every(j=>j<=0)){var O,T;const j=(((O=a.flip)==null?void 0:O.index)||0)+1,N=E[j];if(N&&(!(d==="alignment"?w!==gt(N):!1)||L.every(D=>gt(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:j,overflows:L},reset:{placement:N}};let A=(T=L.filter(F=>F.overflows[0]<=0).sort((F,D)=>F.overflows[1]-D.overflows[1])[0])==null?void 0:T.placement;if(!A)switch(f){case"bestFit":{var I;const F=(I=L.filter(D=>{if(k){const M=gt(D.placement);return M===w||M==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((D,M)=>D[1]-M[1])[0])==null?void 0:I[0];F&&(A=F);break}case"initialPlacement":A=s;break}if(o!==A)return{reset:{placement:A}}}return{}}}},Bc=new Set(["left","top"]);async function Hp(e,r){const{placement:n,platform:t,elements:o}=e,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=zt(n),s=Un(n),l=gt(n)==="y",c=Bc.has(i)?-1:1,u=a&&l?-1:1,d=Lt(r,e);let{mainAxis:p,crossAxis:f,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(f=s==="end"?g*-1:g),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}const Yp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var n,t;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await Hp(r,e);return i===((n=s.offset)==null?void 0:n.placement)&&(t=s.arrow)!=null&&t.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},Vp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:n,y:t,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:h=>{let{x:b,y:w}=h;return{x:b,y:w}}},...l}=Lt(e,r),c={x:n,y:t},u=await Xo(r,l),d=gt(zt(o)),p=Bi(d);let f=c[p],g=c[d];if(a){const h=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=f+u[h],x=f-u[b];f=li(w,f,x)}if(i){const h=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=g+u[h],x=g-u[b];g=li(w,g,x)}const m=s.fn({...r,[p]:f,[d]:g});return{...m,data:{x:m.x-n,y:m.y-t,enabled:{[p]:a,[d]:i}}}}}},Bp=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:n,y:t,placement:o,rects:a,middlewareData:i}=r,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Lt(e,r),u={x:n,y:t},d=gt(o),p=Bi(d);let f=u[p],g=u[d];const m=Lt(s,r),h=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=p==="y"?"height":"width",$=a.reference[p]-a.floating[x]+h.mainAxis,C=a.reference[p]+a.reference[x]-h.mainAxis;f<$?f=$:f>C&&(f=C)}if(c){var b,w;const x=p==="y"?"width":"height",$=Bc.has(zt(o)),C=a.reference[d]-a.floating[x]+($&&((b=i.offset)==null?void 0:b[d])||0)+($?0:h.crossAxis),k=a.reference[d]+a.reference[x]+($?0:((w=i.offset)==null?void 0:w[d])||0)-($?h.crossAxis:0);g<C?g=C:g>k&&(g=k)}return{[p]:f,[d]:g}}}},Wp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var n,t;const{placement:o,rects:a,platform:i,elements:s}=r,{apply:l=()=>{},...c}=Lt(e,r),u=await Xo(r,c),d=zt(o),p=Un(o),f=gt(o)==="y",{width:g,height:m}=a.floating;let h,b;d==="top"||d==="bottom"?(h=d,b=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=d,h=p==="end"?"top":"bottom");const w=m-u.top-u.bottom,x=g-u.left-u.right,$=Ft(m-u[h],w),C=Ft(g-u[b],x),k=!r.middlewareData.shift;let E=$,P=C;if((n=r.middlewareData.shift)!=null&&n.enabled.x&&(P=x),(t=r.middlewareData.shift)!=null&&t.enabled.y&&(E=w),k&&!p){const L=Oe(u.left,0),O=Oe(u.right,0),T=Oe(u.top,0),I=Oe(u.bottom,0);f?P=g-2*(L!==0||O!==0?L+O:Oe(u.left,u.right)):E=m-2*(T!==0||I!==0?T+I:Oe(u.top,u.bottom))}await l({...r,availableWidth:P,availableHeight:E});const z=await i.getDimensions(s.floating);return g!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function Wc(e){const r=He(e);let n=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Se(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:t,s=_r(n)!==a||_r(t)!==i;return s&&(n=a,t=i),{width:n,height:t,$:s}}function qi(e){return oe(e)?e:e.contextElement}function Fn(e){const r=qi(e);if(!Se(r))return _t(1);const n=r.getBoundingClientRect(),{width:t,height:o,$:a}=Wc(r);let i=(a?_r(n.width):n.width)/t,s=(a?_r(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Gp=_t(0);function Gc(e){const r=je(e);return!Ko()||!r.visualViewport?Gp:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function qp(e,r,n){return r===void 0&&(r=!1),!n||r&&n!==je(e)?!1:r}function _n(e,r,n,t){r===void 0&&(r=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=qi(e);let i=_t(1);r&&(t?oe(t)&&(i=Fn(t)):i=Fn(e));const s=qp(a,n,t)?Gc(a):_t(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const p=je(a),f=t&&oe(t)?je(t):t;let g=p,m=ii(g);for(;m&&t&&f!==g;){const h=Fn(m),b=m.getBoundingClientRect(),w=He(m),x=b.left+(m.clientLeft+parseFloat(w.paddingLeft))*h.x,$=b.top+(m.clientTop+parseFloat(w.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=$,g=je(m),m=ii(g)}}return yo({width:u,height:d,x:l,y:c})}function Zo(e,r){const n=Uo(e).scrollLeft;return r?r.left+n:_n(wt(e)).left+n}function qc(e,r){const n=e.getBoundingClientRect(),t=n.left+r.scrollLeft-Zo(e,n),o=n.top+r.scrollTop;return{x:t,y:o}}function Kp(e){let{elements:r,rect:n,offsetParent:t,strategy:o}=e;const a=o==="fixed",i=wt(t),s=r?qo(r.floating):!1;if(t===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=_t(1);const u=_t(0),d=Se(t);if((d||!d&&!a)&&((nn(t)!=="body"||Er(i))&&(l=Uo(t)),Se(t))){const f=_n(t);c=Fn(t),u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}const p=i&&!d&&!a?qc(i,l):_t(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Up(e){return Array.from(e.getClientRects())}function Qp(e){const r=wt(e),n=Uo(e),t=e.ownerDocument.body,o=Oe(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Oe(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-n.scrollLeft+Zo(e);const s=-n.scrollTop;return He(t).direction==="rtl"&&(i+=Oe(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}const Os=25;function Xp(e,r){const n=je(e),t=wt(e),o=n.visualViewport;let a=t.clientWidth,i=t.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const u=Ko();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Zo(t);if(c<=0){const u=t.ownerDocument,d=u.body,p=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(t.clientWidth-d.clientWidth-f);g<=Os&&(a-=g)}else c<=Os&&(a+=c);return{width:a,height:i,x:s,y:l}}const Zp=new Set(["absolute","fixed"]);function Jp(e,r){const n=_n(e,!0,r==="fixed"),t=n.top+e.clientTop,o=n.left+e.clientLeft,a=Se(e)?Fn(e):_t(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,c=t*a.y;return{width:i,height:s,x:l,y:c}}function Fs(e,r,n){let t;if(r==="viewport")t=Xp(e,n);else if(r==="document")t=Qp(wt(e));else if(oe(r))t=Jp(r,n);else{const o=Gc(e);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return yo(t)}function Kc(e,r){const n=Ot(e);return n===r||!oe(n)||Zt(n)?!1:He(n).position==="fixed"||Kc(n,r)}function eg(e,r){const n=r.get(e);if(n)return n;let t=Ut(e,[],!1).filter(s=>oe(s)&&nn(s)!=="body"),o=null;const a=He(e).position==="fixed";let i=a?Ot(e):e;for(;oe(i)&&!Zt(i);){const s=He(i),l=ji(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&Zp.has(o.position)||Er(i)&&!l&&Kc(e,i))?t=t.filter(u=>u!==i):o=s,i=Ot(i)}return r.set(e,t),t}function tg(e){let{element:r,boundary:n,rootBoundary:t,strategy:o}=e;const i=[...n==="clippingAncestors"?qo(r)?[]:eg(r,this._c):[].concat(n),t],s=i[0],l=i.reduce((c,u)=>{const d=Fs(r,u,o);return c.top=Oe(d.top,c.top),c.right=Ft(d.right,c.right),c.bottom=Ft(d.bottom,c.bottom),c.left=Oe(d.left,c.left),c},Fs(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ng(e){const{width:r,height:n}=Wc(e);return{width:r,height:n}}function rg(e,r,n){const t=Se(r),o=wt(r),a=n==="fixed",i=_n(e,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=_t(0);function c(){l.x=Zo(o)}if(t||!t&&!a)if((nn(r)!=="body"||Er(o))&&(s=Uo(r)),t){const f=_n(r,!0,a,r);l.x=f.x+r.clientLeft,l.y=f.y+r.clientTop}else o&&c();a&&!t&&o&&c();const u=o&&!t&&!a?qc(o,s):_t(0),d=i.left+s.scrollLeft-l.x-u.x,p=i.top+s.scrollTop-l.y-u.y;return{x:d,y:p,width:i.width,height:i.height}}function Da(e){return He(e).position==="static"}function Ls(e,r){if(!Se(e)||He(e).position==="fixed")return null;if(r)return r(e);let n=e.offsetParent;return wt(e)===n&&(n=n.ownerDocument.body),n}function Uc(e,r){const n=je(e);if(qo(e))return n;if(!Se(e)){let o=Ot(e);for(;o&&!Zt(o);){if(oe(o)&&!Da(o))return o;o=Ot(o)}return n}let t=Ls(e,r);for(;t&&Uf(t)&&Da(t);)t=Ls(t,r);return t&&Zt(t)&&Da(t)&&!ji(t)?n:t||ep(e)||n}const og=async function(e){const r=this.getOffsetParent||Uc,n=this.getDimensions,t=await n(e.floating);return{reference:rg(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function ag(e){return He(e).direction==="rtl"}const ig={convertOffsetParentRelativeRectToViewportRelativeRect:Kp,getDocumentElement:wt,getClippingRect:tg,getOffsetParent:Uc,getElementRects:og,getClientRects:Up,getDimensions:ng,getScale:Fn,isElement:oe,isRTL:ag};function Qc(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function sg(e,r){let n=null,t;const o=wt(e);function a(){var s;clearTimeout(t),(s=n)==null||s.disconnect(),n=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||r(),!p||!f)return;const g=jr(d),m=jr(o.clientWidth-(u+p)),h=jr(o.clientHeight-(d+f)),b=jr(u),x={rootMargin:-g+"px "+-m+"px "+-h+"px "+-b+"px",threshold:Oe(0,Ft(1,l))||1};let $=!0;function C(k){const E=k[0].intersectionRatio;if(E!==l){if(!$)return i();E?i(!1,E):t=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Qc(c,e.getBoundingClientRect())&&i(),$=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return i(!0),a}function Mr(e,r,n,t){t===void 0&&(t={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=t,c=qi(e),u=o||a?[...c?Ut(c):[],...Ut(r)]:[];u.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const d=c&&s?sg(c,n):null;let p=-1,f=null;i&&(f=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&f&&(f.unobserve(r),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(r)})),n()}),c&&!l&&f.observe(c),f.observe(r));let g,m=l?_n(e):null;l&&h();function h(){const b=_n(e);m&&!Qc(m,b)&&n(),m=b,g=requestAnimationFrame(h)}return n(),()=>{var b;u.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),d?.(),(b=f)==null||b.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const Ea=Xo,lg=Yp,cg=Vp,ug=jp,dg=Wp,zs=Ap,fg=Bp,pg=(e,r,n)=>{const t=new Map,o={platform:ig,...n},a={...o.platform,_c:t};return Np(e,r,{...o,platform:a})};var gg=typeof document<"u",mg=function(){},so=gg?y.useLayoutEffect:mg;function $o(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let n,t,o;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==r.length)return!1;for(t=n;t--!==0;)if(!$o(e[t],r[t]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(t=n;t--!==0;)if(!{}.hasOwnProperty.call(r,o[t]))return!1;for(t=n;t--!==0;){const a=o[t];if(!(a==="_owner"&&e.$$typeof)&&!$o(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}function Xc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ns(e,r){const n=Xc(e);return Math.round(r*n)/n}function Ma(e){const r=v.useRef(e);return so(()=>{r.current=e}),r}function Zc(e){e===void 0&&(e={});const{placement:r="bottom",strategy:n="absolute",middleware:t=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[p,f]=v.useState(t);$o(p,t)||f(t);const[g,m]=v.useState(null),[h,b]=v.useState(null),w=v.useCallback(D=>{D!==k.current&&(k.current=D,m(D))},[]),x=v.useCallback(D=>{D!==E.current&&(E.current=D,b(D))},[]),$=a||g,C=i||h,k=v.useRef(null),E=v.useRef(null),P=v.useRef(u),z=l!=null,L=Ma(l),O=Ma(o),T=Ma(c),I=v.useCallback(()=>{if(!k.current||!E.current)return;const D={placement:r,strategy:n,middleware:p};O.current&&(D.platform=O.current),pg(k.current,E.current,D).then(M=>{const V={...M,isPositioned:T.current!==!1};j.current&&!$o(P.current,V)&&(P.current=V,An.flushSync(()=>{d(V)}))})},[p,r,n,O,T]);so(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(D=>({...D,isPositioned:!1})))},[c]);const j=v.useRef(!1);so(()=>(j.current=!0,()=>{j.current=!1}),[]),so(()=>{if($&&(k.current=$),C&&(E.current=C),$&&C){if(L.current)return L.current($,C,I);I()}},[$,C,I,L,z]);const N=v.useMemo(()=>({reference:k,floating:E,setReference:w,setFloating:x}),[w,x]),A=v.useMemo(()=>({reference:$,floating:C}),[$,C]),F=v.useMemo(()=>{const D={position:n,left:0,top:0};if(!A.floating)return D;const M=Ns(A.floating,u.x),V=Ns(A.floating,u.y);return s?{...D,transform:"translate("+M+"px, "+V+"px)",...Xc(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,s,A.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:I,refs:N,elements:A,floatingStyles:F}),[u,I,N,A,F])}const hg=e=>{function r(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:t,padding:o}=typeof e=="function"?e(n):e;return t&&r(t)?t.current!=null?zs({element:t.current,padding:o}).fn(n):{}:t?zs({element:t,padding:o}).fn(n):{}}}},Qn=(e,r)=>({...lg(e),options:[e,r]}),Jo=(e,r)=>({...cg(e),options:[e,r]}),vg=(e,r)=>({...fg(e),options:[e,r]}),Rr=(e,r)=>({...ug(e),options:[e,r]}),_g=(e,r)=>({...dg(e),options:[e,r]}),Jc=(e,r)=>({...hg(e),options:[e,r]});function bg(e){return v.useMemo(()=>e.every(r=>r==null)?null:r=>{e.forEach(n=>{typeof n=="function"?n(r):n!=null&&(n.current=r)})},e)}const eu={...v},yg=eu.useInsertionEffect,wg=yg||(e=>e());function Ze(e){const r=v.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wg(()=>{r.current=e}),v.useCallback(function(){for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}var Le=typeof document<"u"?y.useLayoutEffect:y.useEffect;function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},Hn.apply(this,arguments)}let As=!1,xg=0;const js=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+xg++;function Sg(){const[e,r]=v.useState(()=>As?js():void 0);return Le(()=>{e==null&&r(js())},[]),v.useEffect(()=>{As=!0},[]),e}const $g=eu.useId,ea=$g||Sg;let br;process.env.NODE_ENV!=="production"&&(br=new Set);function tu(){for(var e,r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];const o="Floating UI: "+n.join(" ");if(!((e=br)!=null&&e.has(o))){var a;(a=br)==null||a.add(o),console.warn(o)}}function kg(){for(var e,r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];const o="Floating UI: "+n.join(" ");if(!((e=br)!=null&&e.has(o))){var a;(a=br)==null||a.add(o),console.error(o)}}const Cg=v.forwardRef(function(r,n){const{context:{placement:t,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:p,d:f,style:{transform:g,...m}={},...h}=r;process.env.NODE_ENV!=="production"&&(n||tu("The `ref` prop is required for `FloatingArrow`."));const b=ea(),[w,x]=v.useState(!1);if(Le(()=>{if(!o)return;He(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[$,C]=t.split("-"),k=$==="top"||$==="bottom";let E=d;(k&&i!=null&&i.x||!k&&i!=null&&i.y)&&(E=null);const P=u*2,z=P/2,L=s/2*(c/-8+1),O=l/2*c/4,T=!!f,I=E&&C==="end"?"bottom":"top";let j=E&&C==="end"?"right":"left";E&&w&&(j=C==="end"?"left":"right");const N=a?.x!=null?E||a.x:"",A=a?.y!=null?E||a.y:"",F=f||"M0,0"+(" H"+s)+(" L"+(s-L)+","+(l-O))+(" Q"+s/2+","+l+" "+L+","+(l-O))+" Z",D={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[$];return v.createElement("svg",Hn({},h,{"aria-hidden":!0,ref:n,width:T?s:s+P,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[j]:N,[I]:A,[$]:k||T?"100%":"calc(100% - "+P/2+"px)",transform:[D,g].filter(M=>!!M).join(" "),...m}}),P>0&&v.createElement("path",{clipPath:"url(#"+b+")",fill:"none",stroke:p,strokeWidth:P+(f?0:1),d:F}),v.createElement("path",{stroke:P&&!f?h.fill:"none",d:F}),v.createElement("clipPath",{id:b},v.createElement("rect",{x:-z,y:z*(T?-1:1),width:s+P,height:s})))});function Dg(){const e=new Map;return{emit(r,n){var t;(t=e.get(r))==null||t.forEach(o=>o(n))},on(r,n){e.set(r,[...e.get(r)||[],n])},off(r,n){var t;e.set(r,((t=e.get(r))==null?void 0:t.filter(o=>o!==n))||[])}}}const Eg=v.createContext(null),Mg=v.createContext(null),Ki=()=>{var e;return((e=v.useContext(Eg))==null?void 0:e.id)||null},ta=()=>v.useContext(Mg);function bn(e){return"data-floating-ui-"+e}function Ln(e){const r=y.useRef(e);return Le(()=>{r.current=e}),r}const Hs=bn("safe-polygon");function Ra(e,r,n){return n&&!vr(n)?0:typeof e=="number"?e:e?.[r]}function Rg(e,r){r===void 0&&(r={});const{open:n,onOpenChange:t,dataRef:o,events:a,elements:i}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=r,f=ta(),g=Ki(),m=Ln(c),h=Ln(l),b=Ln(n),w=v.useRef(),x=v.useRef(-1),$=v.useRef(),C=v.useRef(-1),k=v.useRef(!0),E=v.useRef(!1),P=v.useRef(()=>{}),z=v.useRef(!1),L=v.useCallback(()=>{var F;const D=(F=o.current.openEvent)==null?void 0:F.type;return D?.includes("mouse")&&D!=="mousedown"},[o]);v.useEffect(()=>{if(!s)return;function F(D){let{open:M}=D;M||(clearTimeout(x.current),clearTimeout(C.current),k.current=!0,z.current=!1)}return a.on("openchange",F),()=>{a.off("openchange",F)}},[s,a]),v.useEffect(()=>{if(!s||!m.current||!n)return;function F(M){L()&&t(!1,M,"hover")}const D=Te(i.floating).documentElement;return D.addEventListener("mouseleave",F),()=>{D.removeEventListener("mouseleave",F)}},[i.floating,n,t,s,m,L]);const O=v.useCallback(function(F,D,M){D===void 0&&(D=!0),M===void 0&&(M="hover");const V=Ra(h.current,"close",w.current);V&&!$.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>t(!1,F,M),V)):D&&(clearTimeout(x.current),t(!1,F,M))},[h,t]),T=Ze(()=>{P.current(),$.current=void 0}),I=Ze(()=>{if(E.current){const F=Te(i.floating).body;F.style.pointerEvents="",F.removeAttribute(Hs),E.current=!1}}),j=Ze(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);v.useEffect(()=>{if(!s)return;function F(H){if(clearTimeout(x.current),k.current=!1,u&&!vr(w.current)||d>0&&!Ra(h.current,"open"))return;const te=Ra(h.current,"open",w.current);te?x.current=window.setTimeout(()=>{b.current||t(!0,H,"hover")},te):n||t(!0,H,"hover")}function D(H){if(j())return;P.current();const te=Te(i.floating);if(clearTimeout(C.current),z.current=!1,m.current&&o.current.floatingContext){n||clearTimeout(x.current),$.current=m.current({...o.current.floatingContext,tree:f,x:H.clientX,y:H.clientY,onClose(){I(),T(),j()||O(H,!0,"safe-polygon")}});const X=$.current;te.addEventListener("mousemove",X),P.current=()=>{te.removeEventListener("mousemove",X)};return}(w.current!=="touch"||!Pe(i.floating,H.relatedTarget))&&O(H)}function M(H){j()||o.current.floatingContext&&(m.current==null||m.current({...o.current.floatingContext,tree:f,x:H.clientX,y:H.clientY,onClose(){I(),T(),j()||O(H)}})(H))}if(oe(i.domReference)){var V;const H=i.domReference;return n&&H.addEventListener("mouseleave",M),(V=i.floating)==null||V.addEventListener("mouseleave",M),p&&H.addEventListener("mousemove",F,{once:!0}),H.addEventListener("mouseenter",F),H.addEventListener("mouseleave",D),()=>{var te;n&&H.removeEventListener("mouseleave",M),(te=i.floating)==null||te.removeEventListener("mouseleave",M),p&&H.removeEventListener("mousemove",F),H.removeEventListener("mouseenter",F),H.removeEventListener("mouseleave",D)}}},[i,s,e,u,d,p,O,T,I,t,n,b,f,h,m,o,j]),Le(()=>{var F;if(s&&n&&(F=m.current)!=null&&F.__options.blockPointerEvents&&L()){E.current=!0;const M=i.floating;if(oe(i.domReference)&&M){var D;const V=Te(i.floating).body;V.setAttribute(Hs,"");const H=i.domReference,te=f==null||(D=f.nodesRef.current.find(Q=>Q.id===g))==null||(D=D.context)==null?void 0:D.elements.floating;return te&&(te.style.pointerEvents=""),V.style.pointerEvents="none",H.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{V.style.pointerEvents="",H.style.pointerEvents="",M.style.pointerEvents=""}}}},[s,n,g,i,f,m,L]),Le(()=>{n||(w.current=void 0,z.current=!1,T(),I())},[n,T,I]),v.useEffect(()=>()=>{T(),clearTimeout(x.current),clearTimeout(C.current),I()},[s,i.domReference,T,I]);const N=v.useMemo(()=>{function F(D){w.current=D.pointerType}return{onPointerDown:F,onPointerEnter:F,onMouseMove(D){const{nativeEvent:M}=D;function V(){!k.current&&!b.current&&t(!0,M,"hover")}u&&!vr(w.current)||n||d===0||z.current&&D.movementX**2+D.movementY**2<2||(clearTimeout(C.current),w.current==="touch"?V():(z.current=!0,C.current=window.setTimeout(V,d)))}}},[u,t,n,b,d]),A=v.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(F){j()||O(F.nativeEvent,!1)}}),[O,j]);return v.useMemo(()=>s?{reference:N,floating:A}:{},[s,N,A])}let Ys=0;function Mn(e,r){r===void 0&&(r={});const{preventScroll:n=!1,cancelPrevious:t=!0,sync:o=!1}=r;t&&cancelAnimationFrame(Ys);const a=()=>e?.focus({preventScroll:n});o?a():Ys=requestAnimationFrame(a)}function Pg(e,r){var n;let t=[],o=(n=e.find(a=>a.id===r))==null?void 0:n.parentId;for(;o;){const a=e.find(i=>i.id===o);o=a?.parentId,a&&(t=t.concat(a))}return t}function ur(e,r){let n=e.filter(o=>{var a;return o.parentId===r&&((a=o.context)==null?void 0:a.open)}),t=n;for(;t.length;)t=e.filter(o=>{var a;return(a=t)==null?void 0:a.some(i=>{var s;return o.parentId===i.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(t);return n}let Rn=new WeakMap,Hr=new WeakSet,Yr={},Pa=0;const Tg=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,nu=e=>e&&(e.host||nu(e.parentNode)),Ig=(e,r)=>r.map(n=>{if(e.contains(n))return n;const t=nu(n);return e.contains(t)?t:null}).filter(n=>n!=null);function Og(e,r,n,t){const o="data-floating-ui-inert",a=t?"inert":n?"aria-hidden":null,i=Ig(r,e),s=new Set,l=new Set(i),c=[];Yr[o]||(Yr[o]=new WeakMap);const u=Yr[o];i.forEach(d),p(r),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||l.has(f)||[].forEach.call(f.children,g=>{if(nn(g)!=="script")if(s.has(g))p(g);else{const m=a?g.getAttribute(a):null,h=m!==null&&m!=="false",b=(Rn.get(g)||0)+1,w=(u.get(g)||0)+1;Rn.set(g,b),u.set(g,w),c.push(g),b===1&&h&&Hr.add(g),w===1&&g.setAttribute(o,""),!h&&a&&g.setAttribute(a,"true")}})}return Pa++,()=>{c.forEach(f=>{const g=(Rn.get(f)||0)-1,m=(u.get(f)||0)-1;Rn.set(f,g),u.set(f,m),g||(!Hr.has(f)&&a&&f.removeAttribute(a),Hr.delete(f)),m||f.removeAttribute(o)}),Pa--,Pa||(Rn=new WeakMap,Rn=new WeakMap,Hr=new WeakSet,Yr={})}}function Vs(e,r,n){r===void 0&&(r=!1),n===void 0&&(n=!1);const t=Te(e[0]).body;return Og(e.concat(Array.from(t.querySelectorAll("[aria-live]"))),t,r,n)}const yr=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ru(e,r){const n=Qo(e,yr());r==="prev"&&n.reverse();const t=n.indexOf($t(Te(e)));return n.slice(t+1)[0]}function ou(){return ru(document.body,"next")}function au(){return ru(document.body,"prev")}function dr(e,r){const n=r||e.currentTarget,t=e.relatedTarget;return!t||!Pe(n,t)}function Fg(e){Qo(e,yr()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Bs(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const t=n.dataset.tabindex;delete n.dataset.tabindex,t?n.setAttribute("tabindex",t):n.removeAttribute("tabindex")})}const na={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let Lg;function Ws(e){e.key==="Tab"&&(e.target,clearTimeout(Lg))}const ko=v.forwardRef(function(r,n){const[t,o]=v.useState();Le(()=>(Nc()&&o("button"),document.addEventListener("keydown",Ws),()=>{document.removeEventListener("keydown",Ws)}),[]);const a={ref:n,tabIndex:0,role:t,"aria-hidden":t?void 0:!0,[bn("focus-guard")]:"",style:na};return v.createElement("span",Hn({},r,a))}),iu=v.createContext(null),Gs=bn("portal");function zg(e){e===void 0&&(e={});const{id:r,root:n}=e,t=ea(),o=su(),[a,i]=v.useState(null),s=v.useRef(null);return Le(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),Le(()=>{if(!t||s.current)return;const l=r?document.getElementById(r):null;if(!l)return;const c=document.createElement("div");c.id=t,c.setAttribute(Gs,""),l.appendChild(c),s.current=c,i(c)},[r,t]),Le(()=>{if(n===null||!t||s.current)return;let l=n||o?.portalNode;l&&!oe(l)&&(l=l.current),l=l||document.body;let c=null;r&&(c=document.createElement("div"),c.id=r,l.appendChild(c));const u=document.createElement("div");u.id=t,u.setAttribute(Gs,""),l=c||l,l.appendChild(u),s.current=u,i(u)},[r,n,t,o]),a}function ra(e){const{children:r,id:n,root:t,preserveTabOrder:o=!0}=e,a=zg({id:n,root:t}),[i,s]=v.useState(null),l=v.useRef(null),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),p=i?.modal,f=i?.open,g=!!i&&!i.modal&&i.open&&o&&!!(t||a);return v.useEffect(()=>{if(!a||!o||p)return;function m(h){a&&dr(h)&&(h.type==="focusin"?Bs:Fg)(a)}return a.addEventListener("focusin",m,!0),a.addEventListener("focusout",m,!0),()=>{a.removeEventListener("focusin",m,!0),a.removeEventListener("focusout",m,!0)}},[a,o,p]),v.useEffect(()=>{a&&(f||Bs(a))},[f,a]),v.createElement(iu.Provider,{value:v.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[o,a])},g&&a&&v.createElement(ko,{"data-type":"outside",ref:l,onFocus:m=>{if(dr(m,a)){var h;(h=u.current)==null||h.focus()}else{const b=au()||i?.refs.domReference.current;b?.focus()}}}),g&&a&&v.createElement("span",{"aria-owns":a.id,style:na}),a&&An.createPortal(r,a),g&&a&&v.createElement(ko,{"data-type":"outside",ref:c,onFocus:m=>{if(dr(m,a)){var h;(h=d.current)==null||h.focus()}else{const b=ou()||i?.refs.domReference.current;b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}}))}const su=()=>v.useContext(iu),di="data-floating-ui-focusable";function Ng(e){return e?e.hasAttribute(di)?e:e.querySelector("["+di+"]")||e:null}const qs=20;let an=[];function Ta(e){an=an.filter(n=>n.isConnected);let r=e;if(!(!r||nn(r)==="body")){if(!zp(r,yr())){const n=Qo(r,yr())[0];n&&(r=n)}an.push(r),an.length>qs&&(an=an.slice(-qs))}}function Ks(){return an.slice().reverse().find(e=>e.isConnected)}const Ag=v.forwardRef(function(r,n){return v.createElement("button",Hn({},r,{type:"button",ref:n,tabIndex:-1,style:na}))});function lu(e){const{context:r,children:n,disabled:t=!1,order:o=["content"],guards:a=!0,initialFocus:i=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:f,nodeId:g,onOpenChange:m,events:h,dataRef:b,floatingId:w,elements:{domReference:x,floating:$}}=r,C=typeof i=="number"&&i<0,k=lp(x)&&C,E=Tg()?a:!0,P=Ln(o),z=Ln(i),L=Ln(s),O=ta(),T=su(),I=v.useRef(null),j=v.useRef(null),N=v.useRef(!1),A=v.useRef(!1),F=v.useRef(-1),D=T!=null,M=Ng($),V=Ze(function(X){return X===void 0&&(X=M),X?Qo(X,yr()):[]}),H=Ze(X=>{const J=V(X);return P.current.map(W=>x&&W==="reference"?x:M&&W==="floating"?M:J).filter(Boolean).flat()});v.useEffect(()=>{if(t||!c)return;function X(W){if(W.key==="Tab"){Pe(M,$t(Te(M)))&&V().length===0&&!k&&Ca(W);const Z=H(),G=Bt(W);P.current[0]==="reference"&&G===x&&(Ca(W),W.shiftKey?Mn(Z[Z.length-1]):Mn(Z[1])),P.current[1]==="floating"&&G===M&&W.shiftKey&&(Ca(W),Mn(Z[0]))}}const J=Te(M);return J.addEventListener("keydown",X),()=>{J.removeEventListener("keydown",X)}},[t,x,M,c,P,k,V,H]),v.useEffect(()=>{if(t||!$)return;function X(J){const W=Bt(J),G=V().indexOf(W);G!==-1&&(F.current=G)}return $.addEventListener("focusin",X),()=>{$.removeEventListener("focusin",X)}},[t,$,V]),v.useEffect(()=>{if(t||!d)return;function X(){A.current=!0,setTimeout(()=>{A.current=!1})}function J(W){const Z=W.relatedTarget;queueMicrotask(()=>{const G=!(Pe(x,Z)||Pe($,Z)||Pe(Z,$)||Pe(T?.portalNode,Z)||Z!=null&&Z.hasAttribute(bn("focus-guard"))||O&&(ur(O.nodesRef.current,g).find(ae=>{var ge,Ve;return Pe((ge=ae.context)==null?void 0:ge.elements.floating,Z)||Pe((Ve=ae.context)==null?void 0:Ve.elements.domReference,Z)})||Pg(O.nodesRef.current,g).find(ae=>{var ge,Ve;return((ge=ae.context)==null?void 0:ge.elements.floating)===Z||((Ve=ae.context)==null?void 0:Ve.elements.domReference)===Z})));if(l&&G&&$t(Te(M))===Te(M).body){Se(M)&&M.focus();const ae=F.current,ge=V(),Ve=ge[ae]||ge[ge.length-1]||M;Se(Ve)&&Ve.focus()}(k||!c)&&Z&&G&&!A.current&&Z!==Ks()&&(N.current=!0,m(!1,W,"focus-out"))})}if($&&Se(x))return x.addEventListener("focusout",J),x.addEventListener("pointerdown",X),$.addEventListener("focusout",J),()=>{x.removeEventListener("focusout",J),x.removeEventListener("pointerdown",X),$.removeEventListener("focusout",J)}},[t,x,$,M,c,g,O,T,m,d,l,V,k]),v.useEffect(()=>{var X;if(t)return;const J=Array.from((T==null||(X=T.portalNode)==null?void 0:X.querySelectorAll("["+bn("portal")+"]"))||[]);if($){const W=[$,...J,I.current,j.current,P.current.includes("reference")||k?x:null].filter(G=>G!=null),Z=c||k?Vs(W,E,!E):Vs(W);return()=>{Z()}}},[t,x,$,c,P,T,k,E]),Le(()=>{if(t||!Se(M))return;const X=Te(M),J=$t(X);queueMicrotask(()=>{const W=H(M),Z=z.current,G=(typeof Z=="number"?W[Z]:Z.current)||M,ae=Pe(M,J);!C&&!ae&&p&&Mn(G,{preventScroll:G===M})})},[t,p,M,C,H,z]),Le(()=>{if(t||!M)return;let X=!1;const J=Te(M),W=$t(J);let G=b.current.openEvent;Ta(W);function ae(En){let{open:zr,reason:Nr,event:Ht,nested:$a}=En;zr&&(G=Ht),Nr==="escape-key"&&f.domReference.current&&Ta(f.domReference.current),Nr==="hover"&&Ht.type==="mouseleave"&&(N.current=!0),Nr==="outside-press"&&($a?(N.current=!1,X=!0):N.current=!(np(Ht)||zc(Ht)))}h.on("openchange",ae);const ge=J.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,na),D&&x&&x.insertAdjacentElement("afterend",ge);function Ve(){return typeof L.current=="boolean"?Ks()||ge:L.current.current||ge}return()=>{h.off("openchange",ae);const En=$t(J),zr=Pe($,En)||O&&ur(O.nodesRef.current,g).some($a=>{var Cs;return Pe((Cs=$a.context)==null?void 0:Cs.elements.floating,En)});(zr||G&&["click","mousedown"].includes(G.type))&&f.domReference.current&&Ta(f.domReference.current);const Ht=Ve();queueMicrotask(()=>{L.current&&!N.current&&Se(Ht)&&(!(Ht!==En&&En!==J.body)||zr)&&Ht.focus({preventScroll:X}),ge.remove()})}},[t,$,M,L,b,f,h,O,g,D,x]),v.useEffect(()=>{queueMicrotask(()=>{N.current=!1})},[t]),Le(()=>{if(!t&&T)return T.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:m,refs:f}),()=>{T.setFocusManagerState(null)}},[t,T,c,p,m,f,d]),Le(()=>{if(t||!M||typeof MutationObserver!="function"||C)return;const X=()=>{const W=M.getAttribute("tabindex"),Z=V(),G=$t(Te($)),ae=Z.indexOf(G);ae!==-1&&(F.current=ae),P.current.includes("floating")||G!==f.domReference.current&&Z.length===0?W!=="0"&&M.setAttribute("tabindex","0"):W!=="-1"&&M.setAttribute("tabindex","-1")};X();const J=new MutationObserver(X);return J.observe(M,{childList:!0,subtree:!0,attributes:!0}),()=>{J.disconnect()}},[t,$,M,f,P,V,C]);function te(X){return t||!u||!c?null:v.createElement(Ag,{ref:X==="start"?I:j,onClick:J=>m(!1,J.nativeEvent)},typeof u=="string"?u:"Dismiss")}const Q=!t&&E&&(c?!k:!0)&&(D||c);return v.createElement(v.Fragment,null,Q&&v.createElement(ko,{"data-type":"inside",ref:T?.beforeInsideRef,onFocus:X=>{if(c){const W=H();Mn(o[0]==="reference"?W[0]:W[W.length-1])}else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(N.current=!1,dr(X,T.portalNode)){const W=ou()||x;W?.focus()}else{var J;(J=T.beforeOutsideRef.current)==null||J.focus()}}}),!k&&te("start"),n,te("end"),Q&&v.createElement(ko,{"data-type":"inside",ref:T?.afterInsideRef,onFocus:X=>{if(c)Mn(H()[0]);else if(T!=null&&T.preserveTabOrder&&T.portalNode)if(d&&(N.current=!0),dr(X,T.portalNode)){const W=au()||x;W?.focus()}else{var J;(J=T.afterOutsideRef.current)==null||J.focus()}}}))}let Vr=0;function jg(){const e=/iP(hone|ad|od)|iOS/.test(Hi()),r=document.body.style,t=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=r.left?parseFloat(r.left):window.scrollX,i=r.top?parseFloat(r.top):window.scrollY;if(r.overflow="hidden",o&&(r[t]=o+"px"),e){var s,l;const c=((s=window.visualViewport)==null?void 0:s.offsetLeft)||0,u=((l=window.visualViewport)==null?void 0:l.offsetTop)||0;Object.assign(r,{position:"fixed",top:-(i-Math.floor(u))+"px",left:-(a-Math.floor(c))+"px",right:"0"})}return()=>{Object.assign(r,{overflow:"",[t]:""}),e&&(Object.assign(r,{position:"",top:"",left:"",right:""}),window.scrollTo(a,i))}}let Us=()=>{};const Hg=v.forwardRef(function(r,n){const{lockScroll:t=!1,...o}=r;return Le(()=>{if(t)return Vr++,Vr===1&&(Us=jg()),()=>{Vr--,Vr===0&&Us()}},[t]),v.createElement("div",Hn({ref:n},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))});function Qs(e){return Se(e.target)&&e.target.tagName==="BUTTON"}function Xs(e){return Vi(e)}function cu(e,r){r===void 0&&(r={});const{open:n,onOpenChange:t,dataRef:o,elements:{domReference:a}}=e,{enabled:i=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=r,p=v.useRef(),f=v.useRef(!1),g=v.useMemo(()=>({onPointerDown(m){p.current=m.pointerType},onMouseDown(m){const h=p.current;m.button===0&&s!=="click"&&(vr(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?t(!1,m.nativeEvent,"click"):(m.preventDefault(),t(!0,m.nativeEvent,"click"))))},onClick(m){const h=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}vr(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?t(!1,m.nativeEvent,"click"):t(!0,m.nativeEvent,"click"))},onKeyDown(m){p.current=void 0,!(m.defaultPrevented||!u||Qs(m))&&(m.key===" "&&!Xs(a)&&(m.preventDefault(),f.current=!0),m.key==="Enter"&&t(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||Qs(m)||Xs(a)||m.key===" "&&f.current&&(f.current=!1,t(!(n&&l),m.nativeEvent,"click"))}}),[o,a,s,c,u,t,n,d,l]);return v.useMemo(()=>i?{reference:g}:{},[i,g])}const Yg={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Vg={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Zs=e=>{var r,n;return{escapeKey:typeof e=="boolean"?e:(r=e?.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Ui(e,r){r===void 0&&(r={});const{open:n,onOpenChange:t,elements:o,dataRef:a}=e,{enabled:i=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:g}=r,m=ta(),h=Ze(typeof l=="function"?l:()=>!1),b=typeof l=="function"?h:l,w=v.useRef(!1),x=v.useRef(!1),{escapeKey:$,outsidePress:C}=Zs(f),{escapeKey:k,outsidePress:E}=Zs(g),P=v.useRef(!1),z=Ze(N=>{var A;if(!n||!i||!s||N.key!=="Escape"||P.current)return;const F=(A=a.current.floatingContext)==null?void 0:A.nodeId,D=m?ur(m.nodesRef.current,F):[];if(!$&&(N.stopPropagation(),D.length>0)){let M=!0;if(D.forEach(V=>{var H;if((H=V.context)!=null&&H.open&&!V.context.dataRef.current.__escapeKeyBubbles){M=!1;return}}),!M)return}t(!1,ap(N)?N.nativeEvent:N,"escape-key")}),L=Ze(N=>{var A;const F=()=>{var D;z(N),(D=Bt(N))==null||D.removeEventListener("keydown",F)};(A=Bt(N))==null||A.addEventListener("keydown",F)}),O=Ze(N=>{var A;const F=w.current;w.current=!1;const D=x.current;if(x.current=!1,c==="click"&&D||F||typeof b=="function"&&!b(N))return;const M=Bt(N),V="["+bn("inert")+"]",H=Te(o.floating).querySelectorAll(V);let te=oe(M)?M:null;for(;te&&!Zt(te);){const W=Ot(te);if(Zt(W)||!oe(W))break;te=W}if(H.length&&oe(M)&&!ip(M)&&!Pe(M,o.floating)&&Array.from(H).every(W=>!Pe(te,W)))return;if(Se(M)&&j){const W=M.clientWidth>0&&M.scrollWidth>M.clientWidth,Z=M.clientHeight>0&&M.scrollHeight>M.clientHeight;let G=Z&&N.offsetX>M.clientWidth;if(Z&&He(M).direction==="rtl"&&(G=N.offsetX<=M.offsetWidth-M.clientWidth),G||W&&N.offsetY>M.clientHeight)return}const Q=(A=a.current.floatingContext)==null?void 0:A.nodeId,X=m&&ur(m.nodesRef.current,Q).some(W=>{var Z;return ka(N,(Z=W.context)==null?void 0:Z.elements.floating)});if(ka(N,o.floating)||ka(N,o.domReference)||X)return;const J=m?ur(m.nodesRef.current,Q):[];if(J.length>0){let W=!0;if(J.forEach(Z=>{var G;if((G=Z.context)!=null&&G.open&&!Z.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}t(!1,N,"outside-press")}),T=Ze(N=>{var A;const F=()=>{var D;O(N),(D=Bt(N))==null||D.removeEventListener(c,F)};(A=Bt(N))==null||A.addEventListener(c,F)});v.useEffect(()=>{if(!n||!i)return;a.current.__escapeKeyBubbles=$,a.current.__outsidePressBubbles=C;let N=-1;function A(H){t(!1,H,"ancestor-scroll")}function F(){window.clearTimeout(N),P.current=!0}function D(){N=window.setTimeout(()=>{P.current=!1},Ko()?5:0)}const M=Te(o.floating);s&&(M.addEventListener("keydown",k?L:z,k),M.addEventListener("compositionstart",F),M.addEventListener("compositionend",D)),b&&M.addEventListener(c,E?T:O,E);let V=[];return p&&(oe(o.domReference)&&(V=Ut(o.domReference)),oe(o.floating)&&(V=V.concat(Ut(o.floating))),!oe(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(Ut(o.reference.contextElement)))),V=V.filter(H=>{var te;return H!==((te=M.defaultView)==null?void 0:te.visualViewport)}),V.forEach(H=>{H.addEventListener("scroll",A,{passive:!0})}),()=>{s&&(M.removeEventListener("keydown",k?L:z,k),M.removeEventListener("compositionstart",F),M.removeEventListener("compositionend",D)),b&&M.removeEventListener(c,E?T:O,E),V.forEach(H=>{H.removeEventListener("scroll",A)}),window.clearTimeout(N)}},[a,o,s,b,c,n,t,p,i,$,C,z,k,L,O,E,T]),v.useEffect(()=>{w.current=!1},[b,c]);const I=v.useMemo(()=>({onKeyDown:z,[Yg[d]]:N=>{u&&t(!1,N.nativeEvent,"reference-press")}}),[z,t,u,d]),j=v.useMemo(()=>({onKeyDown:z,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[Vg[c]]:()=>{w.current=!0}}),[z,c]);return v.useMemo(()=>i?{reference:I,floating:j}:{},[i,I,j])}function Bg(e){const{open:r=!1,onOpenChange:n,elements:t}=e,o=ea(),a=v.useRef({}),[i]=v.useState(()=>Dg()),s=Ki()!=null;if(process.env.NODE_ENV!=="production"){const f=t.reference;f&&!oe(f)&&kg("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=v.useState(t.reference),u=Ze((f,g,m)=>{a.current.openEvent=f?g:void 0,i.emit("openchange",{open:f,event:g,reason:m,nested:s}),n?.(f,g,m)}),d=v.useMemo(()=>({setPositionReference:c}),[]),p=v.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return v.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:p,events:i,floatingId:o,refs:d}),[r,u,p,i,o,d])}function Pr(e){e===void 0&&(e={});const{nodeId:r}=e,n=Bg({...e,elements:{reference:null,floating:null,...e.elements}}),t=e.rootContext||n,o=t.elements,[a,i]=v.useState(null),[s,l]=v.useState(null),u=o?.domReference||a,d=v.useRef(null),p=ta();Le(()=>{u&&(d.current=u)},[u]);const f=Zc({...e,elements:{...o,...s&&{reference:s}}}),g=v.useCallback(x=>{const $=oe(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l($),f.refs.setReference($)},[f.refs]),m=v.useCallback(x=>{(oe(x)||x===null)&&(d.current=x,i(x)),(oe(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!oe(x))&&f.refs.setReference(x)},[f.refs]),h=v.useMemo(()=>({...f.refs,setReference:m,setPositionReference:g,domReference:d}),[f.refs,m,g]),b=v.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),w=v.useMemo(()=>({...f,...t,refs:h,elements:b,nodeId:r}),[f,h,b,r,t]);return Le(()=>{t.dataRef.current.floatingContext=w;const x=p?.nodesRef.current.find($=>$.id===r);x&&(x.context=w)}),v.useMemo(()=>({...f,context:w,refs:h,elements:b}),[f,h,b,w])}function Wg(e,r){r===void 0&&(r={});const{open:n,onOpenChange:t,events:o,dataRef:a,elements:i}=e,{enabled:s=!0,visibleOnly:l=!0}=r,c=v.useRef(!1),u=v.useRef(),d=v.useRef(!0);v.useEffect(()=>{if(!s)return;const f=je(i.domReference);function g(){!n&&Se(i.domReference)&&i.domReference===$t(Te(i.domReference))&&(c.current=!0)}function m(){d.current=!0}return f.addEventListener("blur",g),f.addEventListener("keydown",m,!0),()=>{f.removeEventListener("blur",g),f.removeEventListener("keydown",m,!0)}},[i.domReference,n,s]),v.useEffect(()=>{if(!s)return;function f(g){let{reason:m}=g;(m==="reference-press"||m==="escape-key")&&(c.current=!0)}return o.on("openchange",f),()=>{o.off("openchange",f)}},[o,s]),v.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=v.useMemo(()=>({onPointerDown(f){zc(f.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(f){if(c.current)return;const g=Bt(f.nativeEvent);if(l&&oe(g))try{if(Nc()&&rp())throw Error();if(!g.matches(":focus-visible"))return}catch{if(!d.current&&!Vi(g))return}t(!0,f.nativeEvent,"focus")},onBlur(f){c.current=!1;const g=f.relatedTarget,m=f.nativeEvent,h=oe(g)&&g.hasAttribute(bn("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var b;const w=$t(i.domReference?i.domReference.ownerDocument:document);!g&&w===i.domReference||Pe((b=a.current.floatingContext)==null?void 0:b.refs.floating.current,w)||Pe(i.domReference,w)||h||t(!1,m,"focus")})}}),[a,i.domReference,t,l]);return v.useMemo(()=>s?{reference:p}:{},[s,p])}const Js="active",el="selected";function Ia(e,r,n){const t=new Map,o=n==="item";let a=e;if(o&&e){const{[Js]:i,[el]:s,...l}=e;a=l}return{...n==="floating"&&{tabIndex:-1,[di]:""},...a,...r.map(i=>{const s=i?i[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[Js,el].includes(c)))if(c.indexOf("on")===0){if(t.has(c)||t.set(c,[]),typeof u=="function"){var d;(d=t.get(c))==null||d.push(u),i[c]=function(){for(var p,f=arguments.length,g=new Array(f),m=0;m<f;m++)g[m]=arguments[m];return(p=t.get(c))==null?void 0:p.map(h=>h(...g)).find(h=>h!==void 0)}}}else i[c]=u}),i),{})}}function oa(e){e===void 0&&(e=[]);const r=e.map(s=>s?.reference),n=e.map(s=>s?.floating),t=e.map(s=>s?.item),o=v.useCallback(s=>Ia(s,e,"reference"),r),a=v.useCallback(s=>Ia(s,e,"floating"),n),i=v.useCallback(s=>Ia(s,e,"item"),t);return v.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}const Gg=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Qi(e,r){var n;r===void 0&&(r={});const{open:t,floatingId:o}=e,{enabled:a=!0,role:i="dialog"}=r,s=(n=Gg.get(i))!=null?n:i,l=ea(),u=Ki()!=null,d=v.useMemo(()=>s==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:t?o:void 0}:{"aria-expanded":t?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":t?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&u&&{role:"menuitem"},...i==="select"&&{"aria-autocomplete":"none"},...i==="combobox"&&{"aria-autocomplete":"list"}},[s,o,u,t,l,i]),p=v.useMemo(()=>{const g={id:o,...s&&{role:s}};return s==="tooltip"||i==="label"?g:{...g,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,i]),f=v.useCallback(g=>{let{active:m,selected:h}=g;const b={role:"option",...m&&{id:o+"-option"}};switch(i){case"select":return{...b,"aria-selected":m&&h};case"combobox":return{...b,...m&&{"aria-selected":!0}}}return{}},[o,i]);return v.useMemo(()=>a?{reference:d,floating:p,item:f}:{},[a,d,p,f])}function tl(e,r){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:r}}}}const qg=e=>({name:"inner",options:e,async fn(r){const{listRef:n,overflowRef:t,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=Lt(e,r),{rects:d,elements:{floating:p}}=r,f=n.current[i],g=c?.current||p,m=p.clientTop||g.clientTop,h=p.clientTop!==0,b=g.clientTop!==0,w=p===g;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||tu('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const x={...r,...await Qn(-f.offsetTop-p.clientTop-d.reference.height/2-f.offsetHeight/2-a).fn(r)},$=await Ea(tl(x,g.scrollHeight+m+p.clientTop),u),C=await Ea(x,{...u,elementContext:"reference"}),k=Oe(0,$.top),E=x.y+k,L=(g.scrollHeight>g.clientHeight?O=>O:_r)(Oe(0,g.scrollHeight+(h&&w||b?m*2:0)-k-Oe(0,$.bottom)));if(g.style.maxHeight=L+"px",g.scrollTop=k,o){const O=g.offsetHeight<f.offsetHeight*Ft(s,n.current.length)-1||C.top>=-l||C.bottom>=-l;An.flushSync(()=>o(O))}return t&&(t.current=await Ea(tl({...x,y:E},g.offsetHeight+m+p.clientTop),u)),{y:E}}});function Kg(e,r){const{open:n,elements:t}=e,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=Ze(s),c=v.useRef(!1),u=v.useRef(null),d=v.useRef(null);v.useEffect(()=>{if(!o)return;function f(m){if(m.ctrlKey||!g||a.current==null)return;const h=m.deltaY,b=a.current.top>=-.5,w=a.current.bottom>=-.5,x=g.scrollHeight-g.clientHeight,$=h<0?-1:1,C=h<0?"max":"min";g.scrollHeight<=g.clientHeight||(!b&&h>0||!w&&h<0?(m.preventDefault(),An.flushSync(()=>{l(k=>k+Math[C](h,x*$))})):/firefox/i.test(Yi())&&(g.scrollTop+=h))}const g=i?.current||t.floating;if(n&&g)return g.addEventListener("wheel",f),requestAnimationFrame(()=>{u.current=g.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,g.removeEventListener("wheel",f)}},[o,n,t.floating,a,i,l]);const p=v.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const f=i?.current||t.floating;if(!(!a.current||!f||!c.current)){if(u.current!==null){const g=f.scrollTop-u.current;(a.current.bottom<-.5&&g<-1||a.current.top<-.5&&g>1)&&An.flushSync(()=>l(m=>m+g))}requestAnimationFrame(()=>{u.current=f.scrollTop})}}}),[t.floating,l,a,i]);return v.useMemo(()=>o?{floating:p}:{},[o,p])}const Ug=R.keyframes`
|
|
202
199
|
to {
|
|
203
200
|
transform: translate3d(0, 0, 0);
|
|
204
201
|
opacity: 1;
|
|
205
202
|
}
|
|
206
|
-
`,
|
|
203
|
+
`,Qg=S.default.span`
|
|
207
204
|
display: block;
|
|
208
|
-
`,
|
|
209
|
-
${
|
|
205
|
+
`,Xg=S.default.span`
|
|
206
|
+
${et}
|
|
210
207
|
font-size: var(--cc_size_text_xs);
|
|
211
208
|
font-weight: 600;
|
|
212
209
|
box-sizing: border-box;
|
|
@@ -221,31 +218,31 @@
|
|
|
221
218
|
|
|
222
219
|
/* animation */
|
|
223
220
|
opacity: 0;
|
|
224
|
-
transform: ${e=>
|
|
225
|
-
animation: ${
|
|
226
|
-
${
|
|
227
|
-
`,
|
|
221
|
+
transform: ${e=>Ni({placement:e.$placement,offset:Dr})};
|
|
222
|
+
animation: ${Ug} ${_e.duration.medium} forwards
|
|
223
|
+
${_e.easeOut};
|
|
224
|
+
`,Zg=S.default.span`
|
|
228
225
|
display: inline-flex;
|
|
229
|
-
`,
|
|
226
|
+
`,Jg=S.default(Cg)`
|
|
230
227
|
fill: var(--cc_color_button_background_secondary);
|
|
231
|
-
`,
|
|
228
|
+
`,Xi=y.forwardRef(({children:e,title:r,mountNodeId:n,placement:t="top",delay:o=0,showOnFocus:a=!0},i)=>{const[s,l]=y.useState(!1),c=y.useRef(null),{refs:u,floatingStyles:d,context:p}=Pr({open:s,onOpenChange:l,placement:t,whileElementsMounted:Mr,middleware:[Qn(Dr),Rr({fallbackAxisSideDirection:"start"}),Jo(),Jc({element:c})]}),f=Rg(p,{move:!1,delay:{open:o,close:0}}),g=Wg(p,{enabled:a}),m=Ui(p),h=Qi(p,{role:"tooltip"}),{getReferenceProps:b,getFloatingProps:w}=oa([f,g,m,h]),x=bg([u.setReference,i]);return _.jsxs(_.Fragment,{children:[_.jsx(Zg,{ref:x,...b(),children:e}),_.jsx(ra,{id:n||void 0,children:s&&_.jsx(Qg,{ref:u.setFloating,style:d,...w(),children:_.jsxs(Xg,{$placement:p.placement,children:[r,_.jsx(Jg,{tipRadius:2,height:6,width:12,ref:c,context:p})]})})})]})}),em=S.default.span`
|
|
232
229
|
/* if rendering as a button or link, do a style reset and add slab focus styles */
|
|
233
|
-
${e=>e.$href||e.onClick?
|
|
230
|
+
${e=>e.$href||e.onClick?R.css`
|
|
234
231
|
all: initial;
|
|
235
232
|
cursor: pointer;
|
|
236
233
|
text-decoration: none;
|
|
237
234
|
user-select: none;
|
|
238
|
-
transition: transform ${
|
|
235
|
+
transition: transform ${_e.duration.medium};
|
|
239
236
|
&:active {
|
|
240
237
|
transform: scale(0.99);
|
|
241
238
|
}
|
|
242
239
|
&:focus-visible {
|
|
243
|
-
${
|
|
240
|
+
${gn}
|
|
244
241
|
outline-color: var(--cc_color_border_input_active);
|
|
245
242
|
outline-offset: var(--cc_size_spacing_xxs);
|
|
246
243
|
}
|
|
247
244
|
`:null}
|
|
248
|
-
${
|
|
245
|
+
${et};
|
|
249
246
|
box-sizing: border-box;
|
|
250
247
|
position: relative;
|
|
251
248
|
display: inline-flex;
|
|
@@ -258,34 +255,34 @@
|
|
|
258
255
|
font-weight: 600;
|
|
259
256
|
user-select: none;
|
|
260
257
|
|
|
261
|
-
${e=>e.$ccMargin?
|
|
262
|
-
margin: ${
|
|
258
|
+
${e=>e.$ccMargin?R.css`
|
|
259
|
+
margin: ${lt(e.$ccMargin)};
|
|
263
260
|
`:null}
|
|
264
|
-
${e=>e.$design==="group"?
|
|
261
|
+
${e=>e.$design==="group"?R.css`
|
|
265
262
|
box-shadow: 0 0 0
|
|
266
263
|
calc(
|
|
267
264
|
var(--cc_size_spacing_xxs) +
|
|
268
|
-
${e.$avatarSize>=
|
|
265
|
+
${e.$avatarSize>=Rc?"1":"0"}px
|
|
269
266
|
)
|
|
270
267
|
var(--cc_color_background_1);
|
|
271
268
|
`:null}
|
|
272
|
-
`,
|
|
269
|
+
`,tm=S.default.img`
|
|
273
270
|
width: 100%;
|
|
274
271
|
height: 100%;
|
|
275
272
|
border-radius: 100%;
|
|
276
273
|
object-fit: cover;
|
|
277
274
|
object-position: center;
|
|
278
|
-
`,
|
|
275
|
+
`,nl=S.default.span`
|
|
279
276
|
font-size: ${e=>e.$initialsTextSize}px;
|
|
280
277
|
width: 100%;
|
|
281
278
|
height: 100%;
|
|
282
279
|
display: grid;
|
|
283
280
|
place-items: center;
|
|
284
281
|
text-align: center;
|
|
285
|
-
`,
|
|
282
|
+
`,nm=S.default.i`
|
|
286
283
|
// make icon slightly larger than initials
|
|
287
284
|
font-size: ${e=>e.$initialsTextSize+4}px;
|
|
288
|
-
`,
|
|
285
|
+
`,rm=S.default.span`
|
|
289
286
|
position: absolute;
|
|
290
287
|
display: block;
|
|
291
288
|
pointer-events: none;
|
|
@@ -297,43 +294,43 @@
|
|
|
297
294
|
border-style: solid;
|
|
298
295
|
border-color: ${e=>e.$borderColor};
|
|
299
296
|
border-radius: 100%;
|
|
300
|
-
`,
|
|
297
|
+
`,om=({onClick:e,href:r})=>e?"button":r?"a":"span",am={shouldShow:!1,placement:"top"},aa=y.forwardRef(({borderColor:e,ccMargin:r,design:n="normal",href:t,fullName:o,iconName:a,imageSrc:i,initials:s,onClick:l,size:c="medium",testId:u,tooltip:d=am,...p},f)=>{const g=typeof c=="number"?c:_o[c],m=Math.round(g/(g<=zi?2:2.5)),h=o.match(/(\b\S)?/g)?.join("").match(/(^\S|\S$)?/g)?.join("")??"",b=()=>i?_.jsx(tm,{ref:f,src:i,alt:o}):a?_.jsx(nl,{ref:f,$initialsTextSize:m,children:_.jsx(nm,{$initialsTextSize:m,className:`mdi mdi-${a}`,"aria-hidden":"true"})}):_.jsx(nl,{ref:f,$initialsTextSize:m,"aria-hidden":"true",children:s||h}),w=_.jsxs(em,{as:om({onClick:l,href:t}),ref:f,$avatarSize:g,"data-testid":u,$ccMargin:r,$design:n,href:t,$href:t,onClick:l,...p,children:[i?null:_.jsx(yt,{children:o}),b(),e?_.jsx(rm,{$borderColor:e}):null]});return d.shouldShow?_.jsx(Xi,{placement:d.placement,title:o,children:w}):w});var Br=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function im(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oa,rl;function sm(){if(rl)return Oa;rl=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,s=parseInt,l=typeof Br=="object"&&Br&&Br.Object===Object&&Br,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype,p=d.toString,f=Math.max,g=Math.min,m=function(){return u.Date.now()};function h(k,E,P){var z,L,O,T,I,j,N=0,A=!1,F=!1,D=!0;if(typeof k!="function")throw new TypeError(e);E=C(E)||0,w(P)&&(A=!!P.leading,F="maxWait"in P,O=F?f(C(P.maxWait)||0,E):O,D="trailing"in P?!!P.trailing:D);function M(G){var ae=z,ge=L;return z=L=void 0,N=G,T=k.apply(ge,ae),T}function V(G){return N=G,I=setTimeout(Q,E),A?M(G):T}function H(G){var ae=G-j,ge=G-N,Ve=E-ae;return F?g(Ve,O-ge):Ve}function te(G){var ae=G-j,ge=G-N;return j===void 0||ae>=E||ae<0||F&&ge>=O}function Q(){var G=m();if(te(G))return X(G);I=setTimeout(Q,H(G))}function X(G){return I=void 0,D&&z?M(G):(z=L=void 0,T)}function J(){I!==void 0&&clearTimeout(I),N=0,z=j=L=I=void 0}function W(){return I===void 0?T:X(m())}function Z(){var G=m(),ae=te(G);if(z=arguments,L=this,j=G,ae){if(I===void 0)return V(j);if(F)return I=setTimeout(Q,E),M(j)}return I===void 0&&(I=setTimeout(Q,E)),T}return Z.cancel=J,Z.flush=W,Z}function b(k,E,P){var z=!0,L=!0;if(typeof k!="function")throw new TypeError(e);return w(P)&&(z="leading"in P?!!P.leading:z,L="trailing"in P?!!P.trailing:L),h(k,E,{leading:z,maxWait:E,trailing:L})}function w(k){var E=typeof k;return!!k&&(E=="object"||E=="function")}function x(k){return!!k&&typeof k=="object"}function $(k){return typeof k=="symbol"||x(k)&&p.call(k)==n}function C(k){if(typeof k=="number")return k;if($(k))return r;if(w(k)){var E=typeof k.valueOf=="function"?k.valueOf():k;k=w(E)?E+"":E}if(typeof k!="string")return k===0?k:+k;k=k.replace(t,"");var P=a.test(k);return P||i.test(k)?s(k.slice(2),P?2:8):o.test(k)?r:+k}return Oa=b,Oa}var lm=sm();const cm=im(lm),um=S.default.ul`
|
|
301
298
|
all: initial;
|
|
302
299
|
display: flex;
|
|
303
300
|
align-items: center;
|
|
304
301
|
list-style-type: none;
|
|
305
302
|
min-width: 1px;
|
|
306
|
-
`,
|
|
303
|
+
`,dm=S.default.li`
|
|
307
304
|
all: initial;
|
|
308
305
|
position: relative;
|
|
309
306
|
flex-shrink: 0;
|
|
310
307
|
min-width: 1px;
|
|
311
308
|
width: ${e=>e.$avatarSize}px;
|
|
312
309
|
height: ${e=>e.$avatarSize}px;
|
|
313
|
-
`,
|
|
310
|
+
`,fm=S.default.li`
|
|
314
311
|
all: initial;
|
|
315
312
|
flex-shrink: 0;
|
|
316
|
-
`;function
|
|
313
|
+
`;function pm({avatars:e,renderListFooter:r,size:n="medium",...t}){const o=y.useRef(null),a=y.useRef(null),[i,s]=y.useState(e.length),l=typeof n=="number"?n:_o[n],c=l/4;return y.useEffect(()=>{const u=()=>{if(!o.current)return;const p=a.current?a.current?.getBoundingClientRect().width:0,f=o.current.getBoundingClientRect().width-Math.ceil(p),g=typeof n=="number"?n:_o[n],m=g/4,h=g-m,b=Math.floor(f/(h+m/e.length));s(e.length-b)};u();const d=cm(u);return window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[e,r,n,i]),_.jsxs(um,{ref:o,...t,children:[e.slice(0,e.length-i).map((u,d)=>_.jsx(dm,{$avatarSize:l,style:{marginInlineStart:d>0?`-${c}px`:"0"},children:_.jsx(aa,{size:n,tooltip:{shouldShow:!0,placement:"top"},design:"group",...u},d)},d)),r?_.jsx(fm,{ref:a,children:r(i>0?e.slice(e.length-i,e.length):[])}):null]})}const rt={add_on:"add_on",assigned:"assigned",info:"info",upgrade:"upgrade"},wr={small:"small",medium:"medium"},gm=e=>{switch(e){case rt.info:return"var(--cc_color_background_2)";case rt.upgrade:return"var(--cc_color_utility_upgrade_alpha_20)";case rt.assigned:return"var(--cc_color_utility_assigned_alpha_20)";case rt.add_on:return"var(--cc_color_utility_add_on_alpha_20)";default:return`var(--cc_color_utility_${e}_alpha_20)`}},mm=e=>{switch(e){case rt.info:return"var(--cc_color_border_default)";case rt.upgrade:return"var(--cc_color_utility_upgrade_alpha_60)";case rt.assigned:return"var(--cc_color_utility_assigned_alpha_60)";case rt.add_on:return"var(--cc_color_utility_add_on_alpha_60)";default:return`var(--cc_color_utility_${e}_alpha_60)`}},hm=S.default.span`
|
|
317
314
|
display: inline-flex;
|
|
318
315
|
align-items: center;
|
|
319
316
|
justify-content: center;
|
|
320
317
|
gap: var(--cc_size_spacing_xs);
|
|
321
|
-
background-color: ${e=>
|
|
318
|
+
background-color: ${e=>gm(e.color||rt.info)};
|
|
322
319
|
border-radius: var(--cc_size_border_radius_pill);
|
|
323
320
|
border: var(--cc_size_border_width_s) solid
|
|
324
|
-
${e=>
|
|
325
|
-
padding: ${e=>e.size===
|
|
326
|
-
height: ${e=>e.size===
|
|
321
|
+
${e=>mm(e.color||rt.info)};
|
|
322
|
+
padding: ${e=>e.size===wr.small?"6px":"var(--cc_size_spacing_s)"};
|
|
323
|
+
height: ${e=>e.size===wr.small?"var(--cc_size_avatar_xs)":"var(--cc_size_avatar_s)"};
|
|
327
324
|
line-height: 1.5;
|
|
328
|
-
`,
|
|
325
|
+
`,vm=S.default.i`
|
|
329
326
|
color: var(--cc_color_text_default);
|
|
330
|
-
font-size: ${e=>e.size===
|
|
327
|
+
font-size: ${e=>e.size===wr.small?"11px":"14px"};
|
|
331
328
|
line-height: 0;
|
|
332
|
-
`,
|
|
333
|
-
${
|
|
329
|
+
`,_m=S.default.span`
|
|
330
|
+
${et}
|
|
334
331
|
color: var(--cc_color_text_default);
|
|
335
332
|
font-weight: 600;
|
|
336
|
-
font-size: ${e=>e.size===
|
|
333
|
+
font-size: ${e=>e.size===wr.small?"9px":"10px"};
|
|
337
334
|
text-transform: uppercase;
|
|
338
335
|
white-space: nowrap;
|
|
339
336
|
overflow: hidden;
|
|
@@ -343,98 +340,98 @@
|
|
|
343
340
|
&:empty {
|
|
344
341
|
display: none;
|
|
345
342
|
}
|
|
346
|
-
`;function
|
|
343
|
+
`;function bm({children:e,color:r=rt.info,iconName:n,size:t=wr.medium,testId:o,...a}){return _.jsxs(hm,{size:t,color:r,"data-testid":o,...a,children:[n?_.jsx(vm,{size:t,"data-testid":`${n}-icon`,className:`mdi mdi-${n}`}):null,_.jsx(_m,{size:t,children:e})]})}const ym=({component:e,isLoading:r=!1,size:n="medium"})=>{const t=`calc(${Wo[n||"medium"]} + 4px)`;return y.isValidElement(e)&&e.type==="svg"?y.cloneElement(e,{style:{width:t,height:t,fill:"currentColor",flexShrink:0,visibility:r?"hidden":"visible",display:"block"}}):e},wm=S.default.i`
|
|
347
344
|
color: currentColor;
|
|
348
345
|
flex-shrink: 0;
|
|
349
|
-
font-size: ${e=>`calc(${
|
|
346
|
+
font-size: ${e=>`calc(${Wo[e.$size||"medium"]} + 4px)`};
|
|
350
347
|
top: 0;
|
|
351
348
|
line-height: 1;
|
|
352
349
|
|
|
353
|
-
${e=>e.$isLoading?
|
|
350
|
+
${e=>e.$isLoading?R.css`
|
|
354
351
|
visibility: hidden;
|
|
355
352
|
`:null}
|
|
356
|
-
`,
|
|
353
|
+
`,xm=({iconName:e,isLoading:r=!1,size:n="medium"})=>_.jsx(wm,{className:`mdi mdi-${e}`,role:"presentation",$isLoading:r,$size:n,"data-testid":`${e}-icon`}),Co=({icon:e,isLoading:r,size:n})=>e?.component?_.jsx(ym,{size:n,isLoading:r,component:e.component}):e?.name?_.jsx(xm,{size:n,isLoading:r,iconName:e.name}):null,Sm=S.default.span`
|
|
357
354
|
position: relative;
|
|
358
|
-
${
|
|
355
|
+
${et}
|
|
359
356
|
color: currentColor;
|
|
360
|
-
font-size: ${e=>
|
|
357
|
+
font-size: ${e=>Wo[e.$size||"medium"]};
|
|
361
358
|
font-weight: 700;
|
|
362
359
|
white-space: nowrap;
|
|
363
360
|
overflow: hidden;
|
|
364
361
|
text-overflow: ellipsis;
|
|
365
362
|
|
|
366
|
-
${e=>e.$isLoading?
|
|
363
|
+
${e=>e.$isLoading?R.css`
|
|
367
364
|
visibility: hidden;
|
|
368
365
|
`:null}
|
|
369
|
-
`,
|
|
366
|
+
`,uu=({children:e,isLoading:r=!1,size:n="medium"})=>_.jsx(Sm,{$isLoading:r,$size:n,children:e}),$m=R.keyframes`
|
|
370
367
|
to {
|
|
371
368
|
stroke-dashoffset: 200;
|
|
372
369
|
}
|
|
373
|
-
`,
|
|
370
|
+
`,km=R.keyframes`
|
|
374
371
|
to {
|
|
375
372
|
transform: rotate(1turn);
|
|
376
373
|
}
|
|
377
|
-
`,
|
|
374
|
+
`,Cm=S.default.span`
|
|
378
375
|
display: ${e=>e.$isCentered?"flex":"inline-flex"};
|
|
379
376
|
flex-direction: ${e=>e.$layout==="vertical"?"column":"row"};
|
|
380
|
-
${e=>e.$isCentered?
|
|
377
|
+
${e=>e.$isCentered?R.css`
|
|
381
378
|
justify-content: center;
|
|
382
379
|
`:null}
|
|
383
380
|
align-items: center;
|
|
384
381
|
justify-content: center;
|
|
385
382
|
gap: calc(var(--cc_size_spacing_s) * 1.25);
|
|
386
383
|
|
|
387
|
-
${e=>e.$ccMargin?
|
|
388
|
-
margin: ${
|
|
384
|
+
${e=>e.$ccMargin?R.css`
|
|
385
|
+
margin: ${lt(e.$ccMargin)};
|
|
389
386
|
`:null}
|
|
390
|
-
`,
|
|
391
|
-
${
|
|
392
|
-
font-size: ${e=>e.$size>=
|
|
387
|
+
`,Dm=S.default.span`
|
|
388
|
+
${$e}
|
|
389
|
+
font-size: ${e=>e.$size>=Pc?"var(--cc_size_text_s)":"var(--cc_size_text_xs)"};
|
|
393
390
|
color: var(--cc_color_text_subtle);
|
|
394
|
-
`,
|
|
391
|
+
`,Em=S.default.span`
|
|
395
392
|
display: block;
|
|
396
393
|
position: relative;
|
|
397
394
|
width: ${e=>e.$size}px;
|
|
398
395
|
height: ${e=>e.$size}px;
|
|
399
|
-
`,
|
|
396
|
+
`,Mm=S.default.svg`
|
|
400
397
|
position: absolute;
|
|
401
398
|
top: 0;
|
|
402
399
|
bottom: 0;
|
|
403
400
|
left: 0;
|
|
404
401
|
right: 0;
|
|
405
402
|
transform: rotate(0turn);
|
|
406
|
-
animation-name: ${
|
|
403
|
+
animation-name: ${km};
|
|
407
404
|
animation-duration: 0.75s;
|
|
408
405
|
animation-iteration-count: infinite;
|
|
409
406
|
animation-timing-function: linear;
|
|
410
|
-
`,
|
|
407
|
+
`,Rm=S.default.circle`
|
|
411
408
|
stroke: ${e=>e.$trackColor};
|
|
412
409
|
fill: transparent;
|
|
413
410
|
stroke-width: 28;
|
|
414
|
-
`,
|
|
411
|
+
`,Pm=S.default.circle`
|
|
415
412
|
stroke: ${e=>e.$meterColor};
|
|
416
413
|
stroke-width: 28;
|
|
417
414
|
fill: transparent;
|
|
418
415
|
stroke-dasharray: 540;
|
|
419
416
|
stroke-dashoffset: 506;
|
|
420
417
|
stroke-linecap: round;
|
|
421
|
-
animation-name: ${
|
|
418
|
+
animation-name: ${$m};
|
|
422
419
|
animation-duration: 1s;
|
|
423
420
|
animation-iteration-count: infinite;
|
|
424
421
|
animation-direction: alternate;
|
|
425
422
|
animation-timing-function: linear;
|
|
426
|
-
`,
|
|
423
|
+
`,ia=({accessibilityLabel:e,ccMargin:r,"data-testid":n="shared__data-loading-spinner",isCentered:t=!1,label:o,layout:a="horizontal",meterColor:i="var(--cc_color_border_input_inactive)",size:s="medium",trackColor:l="var(--cc_color_background_3)",testId:c,...u})=>{const d=typeof s=="number"?s:_o[s];return _.jsxs(Cm,{$layout:a,$ccMargin:r,$isCentered:t,children:[_.jsx(Em,{$size:d,"data-testid":n||c,role:"status","aria-live":"polite","aria-relevant":"additions removals",...u,children:_.jsxs(Mm,{viewBox:"0 0 200 200",focusable:"false","data-svg-type":"spinner",children:[_.jsx("title",{children:e}),_.jsxs("g",{role:"presentation",children:[_.jsx(Rm,{r:"86",cy:"100",cx:"100",$trackColor:l}),_.jsx(Pm,{r:"86",cy:"100",cx:"100",$meterColor:i})]})]})}),o?_.jsx(Dm,{$layout:a,$size:d,children:o}):null]})},Tm=S.default(ia)`
|
|
427
424
|
position: absolute;
|
|
428
425
|
top: 50%;
|
|
429
426
|
left: 50%;
|
|
430
427
|
transform: translate3d(-50%, -50%, 0);
|
|
431
|
-
`,
|
|
428
|
+
`,du=({size:e="medium"})=>_.jsx(Tm,{accessibilityLabel:"Loading",size:e==="large"?20:"xsmall",trackColor:"rgba(0, 0, 0, 0.2)",meterColor:"currentColor"}),Fa={outline:"outline",minimal:"minimal"},Im=e=>`
|
|
432
429
|
color: var(--cc_color_button_text_${e});
|
|
433
430
|
background: var(--cc_color_button_background_${e});
|
|
434
431
|
&:hover {
|
|
435
432
|
background: var(--cc_color_button_background_${e}_darken_10);
|
|
436
433
|
}
|
|
437
|
-
`,
|
|
434
|
+
`,Om=(e,r)=>e==="destroy"||e==="success"?`
|
|
438
435
|
background: transparent;
|
|
439
436
|
color: var(--cc_color_utility_${e});
|
|
440
437
|
&:hover {
|
|
@@ -460,8 +457,8 @@
|
|
|
460
457
|
border-color: var(${e==="subtle"?"--cc_color_border_default":`--cc_color_button_background_${e}_darken_10`});
|
|
461
458
|
}
|
|
462
459
|
`:null}
|
|
463
|
-
`,
|
|
464
|
-
${e=>
|
|
460
|
+
`,Fm=S.default.button`
|
|
461
|
+
${e=>tn({disabled:e.disabled})}
|
|
465
462
|
-webkit-font-smoothing: antialiased;
|
|
466
463
|
-moz-osx-font-smoothing: grayscale;
|
|
467
464
|
box-sizing: border-box;
|
|
@@ -469,103 +466,103 @@
|
|
|
469
466
|
display: inline-flex;
|
|
470
467
|
align-items: center;
|
|
471
468
|
justify-content: center;
|
|
472
|
-
gap: ${e=>
|
|
469
|
+
gap: ${e=>Tc[e.$size]};
|
|
473
470
|
border: var(--cc_size_border_width_s) solid transparent;
|
|
474
471
|
border-radius: var(--cc_size_border_radius_l);
|
|
475
472
|
transition: transform 0.25s, color 0.25s, background 0.25s;
|
|
476
|
-
${e=>e.$design===
|
|
477
|
-
height: ${e=>
|
|
478
|
-
padding: ${e=>
|
|
473
|
+
${e=>e.$design===Fa.outline||e.$design===Fa.minimal?Om(e.$color,e.$design===Fa.outline):Im(e.$color)};
|
|
474
|
+
height: ${e=>Bo[e.$size]};
|
|
475
|
+
padding: ${e=>Ic[e.$size]};
|
|
479
476
|
font-family: 'Averta', system-ui, -apple-system, BlinkMacSystemFont,
|
|
480
477
|
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
481
|
-
font-size: ${e=>
|
|
482
|
-
${e=>e.$ccMargin?
|
|
483
|
-
margin: ${
|
|
478
|
+
font-size: ${e=>Wo[e.$size]};
|
|
479
|
+
${e=>e.$ccMargin?R.css`
|
|
480
|
+
margin: ${lt(e.$ccMargin)};
|
|
484
481
|
`:null}
|
|
485
482
|
|
|
486
483
|
&:active {
|
|
487
484
|
transform: scale(0.98);
|
|
488
485
|
}
|
|
489
|
-
`;function
|
|
486
|
+
`;function fu({ccMargin:e,children:r,color:n="subtle",component:t,design:o="solid",icon:a={position:"before",name:void 0,component:void 0},loading:i=!1,size:s="medium",...l},c){const u=t||("href"in l?"a":"button"),d=u==="button"?"button":void 0;return _.jsxs(Fm,{ref:c,as:u,$color:n,$design:o,$size:s,$ccMargin:e,className:l.className,style:l.style,type:d,...l,children:[a?.position==="before"?_.jsx(Co,{icon:a,isLoading:i,size:s}):null,_.jsx(uu,{size:s,isLoading:i,children:r}),a?.position==="after"?_.jsx(Co,{icon:a,isLoading:i,size:s}):null,i?_.jsx(du,{size:s}):null]})}fu.displayName="BaseButton";const yn=y.forwardRef(fu);yn.displayName="Button";const Lm={success:"var(--cc_color_utility_success)",caution:"var(--cc_color_utility_caution)",destroy:"var(--cc_color_utility_destroy)",info:"var(--cc_color_utility_info)"},zm=S.default.div`
|
|
490
487
|
height: 100%;
|
|
491
488
|
display: flex;
|
|
492
489
|
align-items: center;
|
|
493
490
|
justify-content: center;
|
|
494
491
|
flex-direction: column;
|
|
495
492
|
|
|
496
|
-
${e=>e.$ccMargin?
|
|
497
|
-
margin: ${
|
|
493
|
+
${e=>e.$ccMargin?R.css`
|
|
494
|
+
margin: ${lt(e.$ccMargin)};
|
|
498
495
|
`:null}
|
|
499
|
-
`,
|
|
496
|
+
`,Nm=S.default.div`
|
|
500
497
|
text-align: center;
|
|
501
|
-
`,
|
|
498
|
+
`,Am=S.default.div`
|
|
502
499
|
height: 128px;
|
|
503
500
|
width: 128px;
|
|
504
501
|
margin-block-end: var(--cc_size_spacing_xs);
|
|
505
|
-
`,
|
|
502
|
+
`,jm=S.default.img`
|
|
506
503
|
width: 100%;
|
|
507
504
|
height: 100%;
|
|
508
505
|
object-fit: contain;
|
|
509
|
-
`,
|
|
506
|
+
`,Hm=S.default.i`
|
|
510
507
|
display: block;
|
|
511
|
-
color: ${e=>
|
|
508
|
+
color: ${e=>Lm[e.$iconColor]};
|
|
512
509
|
font-size: 48px;
|
|
513
510
|
line-height: 1;
|
|
514
511
|
margin-block-end: var(--cc_size_spacing_xs);
|
|
515
|
-
`,
|
|
512
|
+
`,Ym=S.default.div`
|
|
516
513
|
display: flex;
|
|
517
514
|
flex-direction: column;
|
|
518
515
|
gap: var(--cc_size_spacing_s);
|
|
519
516
|
margin-block-start: var(--cc_size_spacing_m);
|
|
520
|
-
`;function
|
|
517
|
+
`;function pu({image:e,ccMargin:r,color:n="info",iconName:t,message:o="",primaryAction:a,secondaryAction:i,title:s,...l}){return _.jsxs(zm,{$ccMargin:r,...l,children:[e?.src?_.jsx(Am,{style:e.imageContainerStyle,children:_.jsx(jm,{src:e.src,alt:e.alt})}):null,t?_.jsx(Hm,{className:`mdi mdi-${t}`,$iconColor:n,"aria-hidden":"true"}):null,_.jsxs(Nm,{children:[s?_.jsx(Ce,{as:"h3",family:"heading",size:"xl",weight:"800",ccMargin:"none none xs",children:s}):null,o?_.jsx(Ce,{as:"p",color:"subtle",children:o}):null]}),a||i?_.jsxs(Ym,{children:[a?_.jsx(yn,{...a,"data-testid":a["data-testid"],color:n==="destroy"?"destroy":"primary",icon:{name:a.icon?.name,position:a.icon?.position},children:a.label}):null,i?_.jsx(yn,{...i,"data-testid":i["data-testid"],color:"subtle",icon:{name:i.icon?.name,position:i.icon?.position},children:i.label}):null]}):null]})}const Vm=S.default(yn)`
|
|
521
518
|
padding: 0 0.25ch; /* If you change this value, update TableColumnSortButton to match */
|
|
522
519
|
border: none;
|
|
523
520
|
height: auto;
|
|
524
521
|
line-height: inherit;
|
|
525
522
|
vertical-align: baseline;
|
|
526
523
|
border-radius: var(--cc_size_border_radius_m);
|
|
527
|
-
`;function
|
|
524
|
+
`;function gu(e,r){return _.jsx(Vm,{design:"minimal",...e,ref:r})}gu.displayName="BaseButtonCondensed";const Zi=y.forwardRef(gu);Zi.displayName="ButtonCondensed";const Bm=e=>{switch(e){case"active":return R.css`
|
|
528
525
|
background-color: var(--cc_color_button_background_secondary);
|
|
529
526
|
color: var(--cc_color_button_text_secondary);
|
|
530
527
|
border-color: var(--cc_color_button_background_secondary);
|
|
531
|
-
`;case"open":return
|
|
528
|
+
`;case"open":return R.css`
|
|
532
529
|
background-color: transparent;
|
|
533
530
|
color: var(--cc_color_link_secondary);
|
|
534
531
|
border-color: var(--cc_color_button_background_secondary);
|
|
535
532
|
box-shadow: inset 0 0 0 var(--cc_size_border_width_s)
|
|
536
533
|
var(--cc_color_button_background_secondary);
|
|
537
|
-
`;default:return
|
|
534
|
+
`;default:return R.css`
|
|
538
535
|
background-color: transparent;
|
|
539
536
|
color: var(--cc_color_link_subtle);
|
|
540
537
|
border-color: var(--cc_color_border_input_inactive);
|
|
541
538
|
&:hover {
|
|
542
539
|
border-color: var(--cc_color_button_background_secondary);
|
|
543
540
|
}
|
|
544
|
-
`}},
|
|
545
|
-
${e=>
|
|
541
|
+
`}},Wm=S.default.button`
|
|
542
|
+
${e=>tn({disabled:e.disabled})}
|
|
546
543
|
-webkit-font-smoothing: antialiased;
|
|
547
544
|
-moz-osx-font-smoothing: grayscale;
|
|
548
545
|
box-sizing: border-box;
|
|
549
|
-
height: ${
|
|
546
|
+
height: ${Bo.medium};
|
|
550
547
|
border-width: var(--cc_size_border_width_s);
|
|
551
548
|
border-style: solid;
|
|
552
549
|
border-radius: var(--cc_size_border_radius_l);
|
|
553
|
-
padding: ${
|
|
550
|
+
padding: ${Ic.medium};
|
|
554
551
|
line-height: 1.2;
|
|
555
552
|
display: inline-flex;
|
|
556
553
|
align-items: center;
|
|
557
554
|
justify-content: center;
|
|
558
|
-
gap: ${
|
|
559
|
-
transition: transform ${
|
|
560
|
-
color ${
|
|
561
|
-
background ${
|
|
555
|
+
gap: ${Tc.medium};
|
|
556
|
+
transition: transform ${_e.duration.fast},
|
|
557
|
+
color ${_e.duration.fast}, border-color ${_e.duration.fast},
|
|
558
|
+
background ${_e.duration.fast};
|
|
562
559
|
&:active {
|
|
563
560
|
transform: scale(0.98);
|
|
564
561
|
}
|
|
565
|
-
${e=>
|
|
566
|
-
`,
|
|
562
|
+
${e=>Bm(e.$status||"normal")}
|
|
563
|
+
`,Gm=S.default.span`
|
|
567
564
|
box-sizing: border-box;
|
|
568
|
-
${
|
|
565
|
+
${et}
|
|
569
566
|
padding: 0 var(--cc_size_spacing_xxs);
|
|
570
567
|
font-size: var(--cc_size_text_xs);
|
|
571
568
|
font-weight: 700;
|
|
@@ -577,23 +574,23 @@
|
|
|
577
574
|
min-width: var(--cc_size_avatar_xs);
|
|
578
575
|
height: var(--cc_size_avatar_xs);
|
|
579
576
|
border-radius: var(--cc_size_border_radius_pill);
|
|
580
|
-
`,
|
|
577
|
+
`,qm=y.forwardRef(({count:e,icon:r,status:n="normal",loading:t,...o},a)=>{const i=n==="active"&&e&&e>=1;return _.jsxs(Wm,{type:o.type||"button",$status:n,ref:a,...o,children:[r?.position==="before"?_.jsx(Co,{icon:r,size:"medium",isLoading:t}):null,_.jsx(uu,{isLoading:t,size:"medium",children:o.children}),r?.position==="after"&&!i?_.jsx(Co,{icon:r,size:"medium",isLoading:t}):null,t?_.jsx(du,{size:"medium"}):null,i?_.jsx(Gm,{children:e}):null]})}),Km=S.default(yn)`
|
|
581
578
|
padding: 0;
|
|
582
579
|
gap: 0;
|
|
583
|
-
width: ${e=>
|
|
584
|
-
${e=>e.$shape==="circle"?
|
|
580
|
+
width: ${e=>Bo[e.size]};
|
|
581
|
+
${e=>e.$shape==="circle"?R.css`
|
|
585
582
|
border-radius: 100%;
|
|
586
583
|
`:null}
|
|
587
|
-
`,
|
|
588
|
-
${
|
|
589
|
-
`;function
|
|
590
|
-
width: ${({size:e})=>
|
|
591
|
-
height: ${({size:e})=>
|
|
584
|
+
`,Um=S.default.span`
|
|
585
|
+
${Ge}
|
|
586
|
+
`;function mu({accessibilityLabel:e,iconComponent:r,iconName:n,shape:t="circle",size:o="medium",design:a="solid",...i},s){return _.jsx(Km,{ref:s,icon:{component:r,name:n,position:"before"},design:a,size:o,$shape:t,...i,children:_.jsx(Um,{children:e})})}mu.displayName="BaseButtonIcon";const sa=y.forwardRef(mu);sa.displayName="ButtonIcon";const fi={medium:"medium"},ol=e=>{switch(e){case"small":return"23px";case"medium":return"25px";case"large":return"27px"}},Qm=S.default(sa)`
|
|
587
|
+
width: ${({size:e})=>ol(e||fi.medium)};
|
|
588
|
+
height: ${({size:e})=>ol(e||fi.medium)};
|
|
592
589
|
border: none;
|
|
593
|
-
`;function
|
|
590
|
+
`;function hu(e,r){return _.jsx(Qm,{ref:r,$size:e.size||fi.medium,design:"minimal",...e})}hu.displayName="BaseButtonIconCondensed";const Yn=y.forwardRef(hu);Yn.displayName="ButtonIconCondensed";const Xm=S.default.div`
|
|
594
591
|
position: relative;
|
|
595
592
|
height: 100%;
|
|
596
|
-
`,
|
|
593
|
+
`,Zm=S.default.div`
|
|
597
594
|
display: flex;
|
|
598
595
|
align-items: flex-start;
|
|
599
596
|
gap: var(--cc_size_spacing_m);
|
|
@@ -603,13 +600,13 @@
|
|
|
603
600
|
border-radius: var(--cc_size_border_radius_l);
|
|
604
601
|
padding: var(--cc_size_spacing_m) var(--cc_size_spacing_xl)
|
|
605
602
|
var(--cc_size_spacing_m) var(--cc_size_spacing_m);
|
|
606
|
-
${e=>e.onClick||e.href?
|
|
603
|
+
${e=>e.onClick||e.href?R.css`
|
|
607
604
|
width: 100%;
|
|
608
605
|
cursor: pointer;
|
|
609
606
|
text-align: start;
|
|
610
607
|
text-decoration: none;
|
|
611
608
|
user-select: none;
|
|
612
|
-
transition: all ${
|
|
609
|
+
transition: all ${_e.duration.medium};
|
|
613
610
|
&:hover {
|
|
614
611
|
border-color: var(--cc_color_button_background_secondary);
|
|
615
612
|
}
|
|
@@ -617,20 +614,20 @@
|
|
|
617
614
|
transform: scale(0.99);
|
|
618
615
|
}
|
|
619
616
|
&:focus-visible {
|
|
620
|
-
${
|
|
617
|
+
${gn}
|
|
621
618
|
outline-color: var(--cc_color_border_input_active);
|
|
622
619
|
outline-offset: var(--cc_size_spacing_xxs);
|
|
623
620
|
}
|
|
624
621
|
`:null}
|
|
625
|
-
`,
|
|
622
|
+
`,Jm=S.default.span`
|
|
626
623
|
position: absolute;
|
|
627
624
|
inset-inline-end: var(--cc_size_spacing_xs);
|
|
628
625
|
inset-block-start: var(--cc_size_spacing_xs);
|
|
629
|
-
`,
|
|
626
|
+
`,eh=S.default.div`
|
|
630
627
|
flex-shrink: 0;
|
|
631
|
-
`,
|
|
628
|
+
`,th=S.default.div`
|
|
632
629
|
flex: 1;
|
|
633
|
-
`,
|
|
630
|
+
`,nh=({onClick:e,href:r})=>e?"button":r?"a":"div",rh=e=>typeof e=="string"?_.jsx(Ce,{as:"h2",size:"m",family:"heading",weight:700,color:"default",children:e}):e;function oh({containerStyle:e,contentAction:r,contentAfter:n,contentBefore:t,contentThumbnail:o,children:a,onClick:i,href:s,title:l,...c}){const{className:u,style:d,...p}=c;return _.jsxs(Xm,{className:u,style:d,children:[_.jsxs(Zm,{as:nh({onClick:i,href:s}),onClick:i,href:s,style:e,type:i?"button":void 0,...p,children:[o?_.jsx(eh,{children:o}):null,_.jsxs(th,{children:[t||null,l?rh(l):null,a||null,n||null]})]}),r?_.jsx(Jm,{children:r}):null]})}const vu=e=>R.css`
|
|
634
631
|
display: inline-flex;
|
|
635
632
|
align-items: center;
|
|
636
633
|
border-width: 1px;
|
|
@@ -641,16 +638,16 @@
|
|
|
641
638
|
color: var(--cc_color_text_subtle);
|
|
642
639
|
line-height: 1.5;
|
|
643
640
|
|
|
644
|
-
${e==="small"?
|
|
641
|
+
${e==="small"?R.css`
|
|
645
642
|
height: 22px;
|
|
646
643
|
font-weight: 400;
|
|
647
644
|
font-size: var(--cc_size_text_xs);
|
|
648
|
-
`:
|
|
645
|
+
`:R.css`
|
|
649
646
|
height: 28px;
|
|
650
647
|
font-weight: 500;
|
|
651
648
|
font-size: var(--cc_size_text_s);
|
|
652
649
|
`}
|
|
653
|
-
`,
|
|
650
|
+
`,ah=S.default.span`
|
|
654
651
|
display: inline-flex;
|
|
655
652
|
align-items: center;
|
|
656
653
|
gap: ${e=>e.$size==="small"?"var(--cc_size_spacing_xs)":"calc(var(--cc_size_spacing_s) * 0.75)"};
|
|
@@ -658,82 +655,82 @@
|
|
|
658
655
|
padding: 0
|
|
659
656
|
${e=>e.$size==="small"?"calc(var(--cc_size_spacing_xs) * 1.5)":"calc(var(--cc_size_spacing_s) * 1.125)"};
|
|
660
657
|
${e=>e.$contentAfter?"padding-right: 0;":null}
|
|
661
|
-
`,
|
|
658
|
+
`,al=S.default.span`
|
|
662
659
|
flex-shrink: 0;
|
|
663
660
|
display: grid;
|
|
664
661
|
place-items: center;
|
|
665
|
-
`,
|
|
662
|
+
`,ih=S.default.i`
|
|
666
663
|
flex-shrink: 0;
|
|
667
664
|
color: inherit;
|
|
668
665
|
line-height: 1;
|
|
669
666
|
font-size: ${e=>e.$size==="small"?"var(--cc_size_text_s)":"var(--cc_size_text_m)"};
|
|
670
|
-
`,
|
|
671
|
-
${
|
|
667
|
+
`,sh=S.default.span`
|
|
668
|
+
${$e}
|
|
672
669
|
white-space: nowrap;
|
|
673
670
|
overflow: hidden;
|
|
674
671
|
text-overflow: ellipsis;
|
|
675
672
|
min-width: 0;
|
|
676
|
-
`;function
|
|
677
|
-
${e=>
|
|
678
|
-
`,
|
|
679
|
-
${
|
|
673
|
+
`;function _u({...e}){return _.jsxs(ah,{$size:e.size,$contentAfter:e.contentAfter,children:[e.contentBefore?_.jsx(al,{children:e.contentBefore}):null,e.iconName?_.jsx(ih,{$size:e.size,className:`mdi mdi-${e.iconName}`}):null,e.children?_.jsx(sh,{children:e.children}):null,e.contentAfter?_.jsx(al,{children:e.contentAfter}):null]})}const lh=S.default.span`
|
|
674
|
+
${e=>vu(e.$size)}
|
|
675
|
+
`,lo="calc(var(--cc_size_spacing_m) * 1.125)",ch=S.default.button`
|
|
676
|
+
${tn}
|
|
680
677
|
cursor: pointer;
|
|
681
678
|
display: grid;
|
|
682
679
|
place-items: center;
|
|
683
680
|
border-radius: 100%;
|
|
684
|
-
width: ${
|
|
685
|
-
height: ${
|
|
686
|
-
line-height: ${
|
|
681
|
+
width: ${lo};
|
|
682
|
+
height: ${lo};
|
|
683
|
+
line-height: ${lo};
|
|
687
684
|
margin-inline-end: ${e=>e.$size==="small"?"var(--cc_size_spacing_xxs)":"var(--cc_size_spacing_xs)"};
|
|
688
685
|
&:hover {
|
|
689
686
|
background: var(--cc_color_button_background_subtle_alpha_70);
|
|
690
687
|
}
|
|
691
688
|
&:disabled {
|
|
692
|
-
${
|
|
689
|
+
${tt}
|
|
693
690
|
}
|
|
694
|
-
`,
|
|
691
|
+
`,uh=S.default.i`
|
|
695
692
|
color: var(--cc_color_link_subtle);
|
|
696
693
|
font-size: var(--cc_size_text_m);
|
|
697
|
-
width: ${
|
|
698
|
-
`;function
|
|
699
|
-
${
|
|
700
|
-
${e=>
|
|
701
|
-
${e=>e.$pressed?
|
|
694
|
+
width: ${lo};
|
|
695
|
+
`;function dh({closeAction:e,...r}){const{children:n,iconName:t,contentBefore:o,size:a="medium",...i}=r;return _.jsx(lh,{$size:a,...i,children:_.jsx(_u,{size:a,contentBefore:o,contentAfter:e?_.jsxs(ch,{type:"button","data-testid":e["data-testid"],$size:a,onClick:e.onClick,children:[_.jsx(yt,{children:e.accessibilityLabel}),_.jsx(uh,{$size:a,className:"mdi mdi-close","aria-hidden":"true"})]}):null,iconName:r.iconName,children:r.children})})}const fh=S.default.button`
|
|
696
|
+
${tn} // add reset and focus styles
|
|
697
|
+
${e=>vu(e.$size)} // add generic chip styles
|
|
698
|
+
${e=>e.$pressed?R.css`
|
|
702
699
|
background: var(--cc_color_button_background_secondary);
|
|
703
700
|
color: var(--cc_color_button_text_secondary);
|
|
704
701
|
`:null}
|
|
705
|
-
${e=>e.disabled?
|
|
706
|
-
`;function
|
|
702
|
+
${e=>e.disabled?tt:null}
|
|
703
|
+
`;function ph({pressed:e=!1,...r}){const{children:n,disabled:t=!1,iconName:o,contentBefore:a,contentAfter:i,size:s="medium",...l}=r;return _.jsx(fh,{$size:s,type:"button",$pressed:e,"aria-pressed":e,disabled:t,...l,children:_.jsx(_u,{size:s,contentBefore:r.contentBefore,contentAfter:r.contentAfter,iconName:r.iconName,children:r.children})})}const gh=S.default.div`
|
|
707
704
|
height: ${e=>e.$resolvedHeight};
|
|
708
705
|
overflow: hidden;
|
|
709
706
|
transition: height ${e=>e.$duration}ms ease;
|
|
710
|
-
`;function
|
|
707
|
+
`;function mh({isOpen:e,collapsedHeight:r="0px",duration:n=300,children:t,...o}){const a=y.useRef(null),[i,s]=y.useState(0);y.useEffect(()=>{if(!a.current)return;const c=new ResizeObserver(()=>{a.current&&s(a.current.scrollHeight)});return c.observe(a.current),()=>{c.disconnect()}},[]);const l=e?`${i}px`:r;return _.jsx(gh,{$duration:n,$resolvedHeight:l,inert:!e&&r==="0px"||void 0,...o,children:_.jsx("div",{ref:a,children:t})})}const hh=S.default.div`
|
|
711
708
|
display: flex;
|
|
712
709
|
gap: var(--cc_size_spacing_s);
|
|
713
710
|
align-items: flex-start;
|
|
714
|
-
${e=>e.$design==="self"?
|
|
711
|
+
${e=>e.$design==="self"?R.css`
|
|
715
712
|
flex-direction: row-reverse;
|
|
716
713
|
`:null}
|
|
717
714
|
|
|
718
715
|
/* if ccMargin is specified in props, convert spacing tokens to CSS variables */
|
|
719
|
-
${e=>e.$ccMargin?
|
|
720
|
-
margin: ${
|
|
716
|
+
${e=>e.$ccMargin?R.css`
|
|
717
|
+
margin: ${lt(e.$ccMargin)};
|
|
721
718
|
`:null}
|
|
722
|
-
`,
|
|
719
|
+
`,vh=S.default.blockquote`
|
|
723
720
|
all: initial;
|
|
724
721
|
display: block;
|
|
725
722
|
min-width: 0;
|
|
726
|
-
${e=>e.$design==="self"?
|
|
723
|
+
${e=>e.$design==="self"?R.css`
|
|
727
724
|
text-align: end;
|
|
728
725
|
`:null}
|
|
729
|
-
`,
|
|
730
|
-
${e=>e.$design==="self"?
|
|
726
|
+
`,il=S.default(Ce)`
|
|
727
|
+
${e=>e.$design==="self"?R.css`
|
|
731
728
|
text-align: end;
|
|
732
729
|
`:null}
|
|
733
|
-
`,
|
|
730
|
+
`,_h=e=>{switch(e){case"self":return"var(--cc_color_button_background_primary)";case"other":return"var(--cc_color_button_background_subtle)";case"guest":return"var(--cc_color_utility_assigned_alpha_20)"}},bh=S.default.p`
|
|
734
731
|
all: initial;
|
|
735
732
|
display: inline-block;
|
|
736
|
-
background-color: ${e=>
|
|
733
|
+
background-color: ${e=>_h(e.$design)};
|
|
737
734
|
border-radius: calc(var(--cc_size_border_radius_l) * 1.25);
|
|
738
735
|
padding: var(--cc_size_spacing_s) calc(var(--cc_size_spacing_s) * 1.25);
|
|
739
736
|
font-size: calc(var(--cc_size_text_xs) * 1.125);
|
|
@@ -744,18 +741,18 @@
|
|
|
744
741
|
overflow-wrap: break-word;
|
|
745
742
|
hyphens: auto;
|
|
746
743
|
color: ${e=>e.$design==="self"?"var(--cc_color_button_text_primary)":"var(--cc_color_button_text_subtle)"};
|
|
747
|
-
${
|
|
748
|
-
${e=>e.$design==="self"?
|
|
744
|
+
${$e}
|
|
745
|
+
${e=>e.$design==="self"?R.css`
|
|
749
746
|
border-start-end-radius: 0;
|
|
750
|
-
`:
|
|
747
|
+
`:R.css`
|
|
751
748
|
border-start-start-radius: 0;
|
|
752
749
|
`}
|
|
753
|
-
`;function
|
|
750
|
+
`;function yh({ccMargin:e,design:r="other",children:n,userNameText:t,timeStampText:o,avatar:a,...i}){return _.jsxs(hh,{$design:r,$ccMargin:e,...i,children:[_.jsx(aa,{...a,size:"medium"}),_.jsxs(vh,{$design:r,children:[t?_.jsx(il,{forwardedAs:"cite",size:"xs",color:"subtle",weight:"500",ccMargin:"none none xxs",$design:r,children:t}):null,_.jsx(bh,{$design:r,children:n}),o?_.jsx(il,{forwardedAs:"time",size:"xs",color:"nonessential",ccMargin:"xxs none none",$design:r,children:o}):null]})]})}const bu=R.keyframes`
|
|
754
751
|
to {
|
|
755
752
|
transform: translate3d(0, 0, 0);
|
|
756
753
|
opacity: 1;
|
|
757
754
|
}
|
|
758
|
-
|
|
755
|
+
`,wh=S.default.div`
|
|
759
756
|
position: absolute;
|
|
760
757
|
inset: 0;
|
|
761
758
|
background: var(--cc_color_background_backdrop);
|
|
@@ -763,35 +760,35 @@
|
|
|
763
760
|
/* animation */
|
|
764
761
|
opacity: 0;
|
|
765
762
|
transform: translate3d(0, 0, 0);
|
|
766
|
-
animation-name: ${
|
|
767
|
-
animation-duration: ${
|
|
763
|
+
animation-name: ${bu};
|
|
764
|
+
animation-duration: ${_e.duration.fast};
|
|
768
765
|
animation-fill-mode: forwards;
|
|
769
766
|
@media (prefers-reduced-motion) {
|
|
770
767
|
animation: none;
|
|
771
768
|
opacity: 1;
|
|
772
769
|
transform: none;
|
|
773
770
|
}
|
|
774
|
-
`,
|
|
771
|
+
`,xh=e=>{const r=e?`var(--cc_size_spacing_${e})`:"0";return{top:R.css`
|
|
775
772
|
left: ${r};
|
|
776
773
|
right: ${r};
|
|
777
774
|
top: ${r};
|
|
778
775
|
bottom: auto;
|
|
779
|
-
`,right:
|
|
776
|
+
`,right:R.css`
|
|
780
777
|
inset-inline-start: auto;
|
|
781
778
|
inset-inline-end: ${r};
|
|
782
779
|
inset-block-start: ${r};
|
|
783
780
|
inset-block-end: ${r};
|
|
784
|
-
`,bottom:
|
|
781
|
+
`,bottom:R.css`
|
|
785
782
|
left: ${r};
|
|
786
783
|
right: ${r};
|
|
787
784
|
top: auto;
|
|
788
785
|
bottom: ${r};
|
|
789
|
-
`,left:
|
|
786
|
+
`,left:R.css`
|
|
790
787
|
inset-inline-start: ${r};
|
|
791
788
|
inset-inline-end: auto;
|
|
792
789
|
inset-block-start: ${r};
|
|
793
790
|
inset-block-end: ${r};
|
|
794
|
-
`}},
|
|
791
|
+
`}},Sh=S.default.div`
|
|
795
792
|
all: initial;
|
|
796
793
|
box-sizing: border-box;
|
|
797
794
|
position: fixed;
|
|
@@ -801,16 +798,16 @@
|
|
|
801
798
|
max-width: 100%;
|
|
802
799
|
max-height: 100%;
|
|
803
800
|
|
|
804
|
-
${e=>
|
|
805
|
-
`,
|
|
806
|
-
transform: translate3d(0, -${
|
|
807
|
-
`,right:
|
|
808
|
-
transform: translate3d(${
|
|
809
|
-
`,bottom:
|
|
810
|
-
transform: translate3d(0, ${
|
|
811
|
-
`,left:
|
|
812
|
-
transform: translate3d(-${
|
|
813
|
-
`},
|
|
801
|
+
${e=>xh(e.$offset)[e.$placement||"right"]};
|
|
802
|
+
`,Wr="50%",$h={top:R.css`
|
|
803
|
+
transform: translate3d(0, -${Wr}, 0);
|
|
804
|
+
`,right:R.css`
|
|
805
|
+
transform: translate3d(${Wr}, 0, 0);
|
|
806
|
+
`,bottom:R.css`
|
|
807
|
+
transform: translate3d(0, ${Wr}, 0);
|
|
808
|
+
`,left:R.css`
|
|
809
|
+
transform: translate3d(-${Wr}, 0, 0);
|
|
810
|
+
`},kh=S.default.div`
|
|
814
811
|
all: initial;
|
|
815
812
|
box-sizing: border-box;
|
|
816
813
|
display: block;
|
|
@@ -822,67 +819,67 @@
|
|
|
822
819
|
box-shadow: 0 0 var(--cc_size_depth_3_blur) var(--cc_color_depth_3);
|
|
823
820
|
|
|
824
821
|
/* animation */
|
|
825
|
-
${e
|
|
822
|
+
${e=>$h[e.$placement||"right"]};
|
|
826
823
|
opacity: 0;
|
|
827
|
-
animation-name: ${
|
|
828
|
-
animation-duration: ${
|
|
824
|
+
animation-name: ${bu};
|
|
825
|
+
animation-duration: ${_e.duration.medium};
|
|
829
826
|
animation-fill-mode: forwards;
|
|
830
|
-
animation-timing-function: ${
|
|
827
|
+
animation-timing-function: ${_e.easeOut};
|
|
831
828
|
animation-delay: 100ms; /* wait a little bit for the backdrop to fade in first */
|
|
832
|
-
`;function
|
|
829
|
+
`;function Ch({as:e,backDropStyle:r,children:n,containerStyle:t,isOpen:o,onOpenChange:a,mountNodeId:i,placement:s,offset:l,shouldShowBackdrop:c=!0,triggerButton:u,...d}){const{refs:p,context:f}=Pr({open:o,onOpenChange:a}),{getReferenceProps:g,getFloatingProps:m}=oa([cu(f),Qi(f,{role:"dialog"}),Ui(f,{enabled:c})]),h=u||void 0,b=_.jsx(Sh,{ref:p.setFloating,$placement:s,$offset:l,...d,...m(),children:_.jsx(kh,{as:e,$placement:s,style:t,children:n})}),w=c?_.jsxs(Hg,{lockScroll:!0,style:r,children:[_.jsx(wh,{}),_.jsx(lu,{context:f,modal:!0,children:b})]}):b;return _.jsxs(_.Fragment,{children:[u&&y.isValidElement(h)?y.cloneElement(h,{type:"button",ref:p.setReference,...g()}):null,_.jsx(ra,{id:i||void 0,children:o?w:null})]})}const yu=S.default.span`
|
|
833
830
|
${e=>e.$debug?"outline: var(--cc_size_border_width_s) dashed var(--cc_color_utility_destroy);":null}
|
|
834
|
-
`,
|
|
831
|
+
`,Dh=e=>{const{minWidth:r,maxWidth:n}=e;return r&&n?`(min-width: ${r}px) and (max-width: ${n}px)`:r&&!n?`(min-width: ${r}px)`:n&&!r?`(max-width: ${n}px)`:"(min-width: 0)"},sl=e=>typeof e=="number"?`${e}px`:`${e==="fill"?"minmax(0, 1fr)":e}`,Eh=(e,r)=>{const n=[];return e?(e.forEach(t=>{const o=t.split(" ").map(a=>a==="0"?".":`${r}-${a}`).join(" ");n.push(`"${o}"`)}),n.join(" ")):null},Mh=S.default.div`
|
|
835
832
|
display: grid;
|
|
836
|
-
${e=>
|
|
837
|
-
@container ${
|
|
838
|
-
${n?null:
|
|
839
|
-
> ${
|
|
833
|
+
${e=>e.$breakpoints?.map(r=>{const{areas:n,colGap:t,colAlign:o,cols:a,rowAlign:i,rowGap:s,rows:l}=r,c=a?.map(d=>sl(d)).join(" "),u=l?.map(d=>sl(d)).join(" ");return R.css`
|
|
834
|
+
@container ${Dh(r)} {
|
|
835
|
+
${n?null:R.css`
|
|
836
|
+
> ${yu} {
|
|
840
837
|
grid-area: auto !important;
|
|
841
838
|
}
|
|
842
839
|
`}
|
|
843
|
-
${
|
|
844
|
-
grid-template-columns: ${
|
|
840
|
+
${a?`
|
|
841
|
+
grid-template-columns: ${c};
|
|
845
842
|
`:null}
|
|
846
|
-
${
|
|
847
|
-
grid-template-rows: ${
|
|
843
|
+
${l?`
|
|
844
|
+
grid-template-rows: ${u};
|
|
848
845
|
`:null}
|
|
849
|
-
${
|
|
850
|
-
${
|
|
851
|
-
${
|
|
852
|
-
${
|
|
853
|
-
${n?`grid-template-areas: ${
|
|
846
|
+
${t?`column-gap: var(--cc_size_spacing_${t});`:null}
|
|
847
|
+
${s?`row-gap: var(--cc_size_spacing_${s});`:null}
|
|
848
|
+
${o?`align-items: ${o};`:null}
|
|
849
|
+
${i?`justify-items: ${i};`:null}
|
|
850
|
+
${n?`grid-template-areas: ${Eh(n,e.id)};`:"grid-template-areas: unset;"}
|
|
854
851
|
}
|
|
855
|
-
`})}
|
|
856
|
-
`;function
|
|
852
|
+
`})}
|
|
853
|
+
`;function Rh({children:e,debug:r=!1,id:n,breakpoints:t,gridContainerStyle:o,gridItemStyle:a,...i}){const{style:s,...l}=i;return _.jsx("div",{style:{containerType:"inline-size",...s},...l,children:_.jsx(Mh,{id:n,$breakpoints:t,style:o,children:y.Children.map(e,(c,u)=>{const d=`${n}-${u+1}`;return _.jsx(yu,{id:`${d}-item`,$debug:r,style:{gridArea:d,...a},children:c},d)})})})}const Ph=S.default.hr`
|
|
857
854
|
all: initial;
|
|
858
855
|
display: block;
|
|
859
856
|
border-block-start: var(--cc_size_border_width_s) solid
|
|
860
857
|
var(--cc_color_border_default);
|
|
861
858
|
|
|
862
859
|
/* if ccMargin, convert spacing tokens to CSS variables */
|
|
863
|
-
${e=>e.$ccMargin?
|
|
864
|
-
margin: ${
|
|
860
|
+
${e=>e.$ccMargin?R.css`
|
|
861
|
+
margin: ${lt(e.$ccMargin)};
|
|
865
862
|
`:null}
|
|
866
|
-
`;function
|
|
863
|
+
`;function Th({ccMargin:e,...r}){return _.jsx(Ph,{$ccMargin:e,...r})}const Ih=S.default.div`
|
|
867
864
|
display: grid; /* kill extra space created by display: inline-flex children (radios, checkboxes) */
|
|
868
865
|
position: relative;
|
|
869
|
-
`,
|
|
866
|
+
`,wu=S.default.div`
|
|
870
867
|
display: flex;
|
|
871
868
|
align-items: center;
|
|
872
869
|
gap: calc(var(--cc_size_spacing_xs) * 1.125);
|
|
873
870
|
font-size: var(--cc_size_text_xs);
|
|
874
871
|
font-weight: 400;
|
|
875
|
-
color: ${e=>
|
|
872
|
+
color: ${e=>Ee(e.$status).accentColor};
|
|
876
873
|
line-height: 1.2;
|
|
877
|
-
`,
|
|
874
|
+
`,xu=S.default.i`
|
|
878
875
|
font-size: 18px;
|
|
879
876
|
flex-shrink: 0;
|
|
880
|
-
|
|
881
|
-
${
|
|
882
|
-
`;function
|
|
877
|
+
`,Su=S.default.span`
|
|
878
|
+
${$e}
|
|
879
|
+
`;function rn({children:e,inputId:r,message:n,...t}){const{status:o="normal",...a}=t;return _.jsxs(Ih,{...a,children:[e,_.jsx("div",{role:o==="error"?"alert":"status",children:n?_.jsxs(wu,{$status:o,children:[_.jsx(xu,{className:`mdi mdi-${Ee(o).icon}`,"aria-hidden":"true"}),_.jsx(Su,{id:`${r}-message`,children:n})]}):null})]})}const $u=e=>{const r=y.useRef(null);return y.useMemo(()=>({get current(){return r.current},set current(n){[r,e].forEach(t=>typeof t=="function"||t===null?t?.(n):t.current=n)}}),[e])},Ct=S.default.input`
|
|
883
880
|
all: initial;
|
|
884
|
-
${
|
|
885
|
-
`,
|
|
881
|
+
${Ge}
|
|
882
|
+
`,xr=S.default.span`
|
|
886
883
|
box-sizing: border-box;
|
|
887
884
|
position: relative;
|
|
888
885
|
flex-shrink: 0;
|
|
@@ -896,56 +893,56 @@
|
|
|
896
893
|
background-color: var(--cc_color_background_1);
|
|
897
894
|
transition: all 0.2s;
|
|
898
895
|
|
|
899
|
-
border-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?
|
|
900
|
-
${e=>{if(!e.$status)return
|
|
896
|
+
border-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?Ee(e.$status).accentColor:"var(--cc_color_border_input_inactive)"};
|
|
897
|
+
${e=>{if(!e.$status)return R.css`
|
|
901
898
|
@supports selector(:user-invalid) {
|
|
902
|
-
${
|
|
899
|
+
${Ct}:user-invalid ~ & {
|
|
903
900
|
border-color: var(--cc_color_utility_destroy);
|
|
904
901
|
}
|
|
905
902
|
}
|
|
906
903
|
`}}
|
|
907
904
|
color: var(--cc_color_link_secondary);
|
|
908
905
|
|
|
909
|
-
${
|
|
906
|
+
${Ct}:checked:not(:indeterminate) ~ & {
|
|
910
907
|
border-color: transparent;
|
|
911
|
-
background-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?
|
|
908
|
+
background-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?Ee(e.$status).accentColor:"var(--cc_color_button_background_secondary)"};
|
|
912
909
|
color: var(--cc_color_button_text_secondary);
|
|
913
910
|
}
|
|
914
|
-
${e=>{if(!e.$status)return
|
|
911
|
+
${e=>{if(!e.$status)return R.css`
|
|
915
912
|
@supports selector(:user-invalid) {
|
|
916
|
-
${
|
|
913
|
+
${Ct}:checked:not(:indeterminate):user-invalid ~ & {
|
|
917
914
|
background-color: var(--cc_color_utility_destroy);
|
|
918
915
|
}
|
|
919
916
|
}
|
|
920
917
|
`}}
|
|
921
|
-
`,
|
|
918
|
+
`,Oh=S.default.i`
|
|
922
919
|
font-size: var(--cc_checkbox_icon_size);
|
|
923
920
|
transition: transform 0.2s;
|
|
924
921
|
|
|
925
922
|
opacity: 0;
|
|
926
923
|
transform: scale(0.1);
|
|
927
|
-
${
|
|
928
|
-
${
|
|
924
|
+
${Ct}:checked ~ ${xr} &,
|
|
925
|
+
${Ct}:indeterminate ~ ${xr} & {
|
|
929
926
|
opacity: 1;
|
|
930
927
|
transform: scale(1);
|
|
931
928
|
}
|
|
932
|
-
`,
|
|
929
|
+
`,Fh=S.default.div`
|
|
933
930
|
align-self: center;
|
|
934
931
|
display: flex;
|
|
935
932
|
flex-direction: column;
|
|
936
933
|
flex: 1;
|
|
937
934
|
min-width: 1px;
|
|
938
|
-
`,
|
|
939
|
-
${
|
|
935
|
+
`,Lh=S.default.span`
|
|
936
|
+
${$e}
|
|
940
937
|
color: var(--cc_color_link_secondary);
|
|
941
938
|
font-size: var(--cc_checkbox_font_size);
|
|
942
939
|
user-select: none;
|
|
943
|
-
`,
|
|
944
|
-
${
|
|
940
|
+
`,zh=S.default.span`
|
|
941
|
+
${$e}
|
|
945
942
|
color: var(--cc_color_text_subtle);
|
|
946
943
|
font-size: var(--cc_size_text_xs);
|
|
947
944
|
user-select: none;
|
|
948
|
-
`,
|
|
945
|
+
`,ku=S.default.label`
|
|
949
946
|
all: initial;
|
|
950
947
|
box-sizing: border-box;
|
|
951
948
|
display: inline-flex;
|
|
@@ -954,7 +951,7 @@
|
|
|
954
951
|
gap: ${e=>e.$hideLabel?"normal":"var(--cc_size_spacing_s)"};
|
|
955
952
|
${e=>e.$message?"margin-block-end: var(--cc_size_spacing_xs);":null}
|
|
956
953
|
cursor: ${e=>e.$disabled?"not-allowed;":"pointer"};
|
|
957
|
-
${e=>e.$disabled?
|
|
954
|
+
${e=>e.$disabled?tt:null}
|
|
958
955
|
|
|
959
956
|
/* CSS custom properties consumed by Facade, Icon, and LabelText */
|
|
960
957
|
--cc_checkbox_facade_size: var(--cc_size_spacing_m);
|
|
@@ -973,65 +970,61 @@
|
|
|
973
970
|
&[data-design='task'] {
|
|
974
971
|
--cc_checkbox_border_radius: 50%;
|
|
975
972
|
}
|
|
976
|
-
&:has(${
|
|
973
|
+
&:has(${Ct}[aria-disabled='true']) {
|
|
977
974
|
--cc_checkbox_border_style: dashed;
|
|
978
975
|
}
|
|
979
976
|
|
|
980
|
-
&:hover ${
|
|
981
|
-
${e=>e.$disabled?null:
|
|
977
|
+
&:hover ${xr} {
|
|
978
|
+
${e=>e.$disabled?null:R.css`
|
|
982
979
|
border-color: var(--cc_color_link_secondary);
|
|
983
980
|
`}
|
|
984
981
|
}
|
|
985
982
|
|
|
986
|
-
&:has(${
|
|
987
|
-
&:hover ${
|
|
988
|
-
${e=>e.$disabled?null:
|
|
983
|
+
&:has(${Ct}:checked) {
|
|
984
|
+
&:hover ${xr} {
|
|
985
|
+
${e=>e.$disabled?null:R.css`
|
|
989
986
|
border-color: var(--cc_color_link_subtle);
|
|
990
987
|
`}
|
|
991
988
|
}
|
|
992
989
|
}
|
|
993
|
-
`,
|
|
990
|
+
`,Nh=S.default(rn)`
|
|
994
991
|
position: relative;
|
|
995
992
|
|
|
996
|
-
&:has(${
|
|
997
|
-
${
|
|
998
|
-
${e=>
|
|
993
|
+
&:has(${Ct}:focus-visible) {
|
|
994
|
+
${ku} {
|
|
995
|
+
${e=>Ee(e.status).focusStyles}
|
|
999
996
|
border-radius: var(--cc_size_border_radius_m);
|
|
1000
997
|
outline-offset: var(--cc_size_spacing_xxs);
|
|
1001
998
|
}
|
|
1002
999
|
}
|
|
1003
|
-
`,
|
|
1000
|
+
`,Cu=y.forwardRef(({"aria-disabled":e,description:r,design:n="default",hideLabel:t=!1,label:o,indeterminate:a,scale:i,testId:s,value:l,...c},u)=>{const d=$u(u),{status:p,disabled:f=!1,checked:g,defaultChecked:m,message:h,...b}=c,w=c["data-testid"]||s,x=n==="assetFeed"?"default":n,$=i??(n==="assetFeed"?"large":"medium");return y.useEffect(()=>{d.current&&(d.current.indeterminate=a??!1)},[a,d]),_.jsx(Nh,{inputId:c.id,message:c.message,status:p,className:c.className,style:c.style,children:_.jsxs(ku,{htmlFor:c.id,$hideLabel:t,$disabled:f,$message:c.message,"data-size":$,"data-design":x,"data-testid":w?`${w}-label`:"",children:[_.jsx(Ct,{"aria-invalid":p==="error"?!0:void 0,"aria-describedby":h?`${c.id}-message`:"","aria-disabled":e,checked:g,defaultChecked:m,"data-testid":w,disabled:f,ref:d,name:c.name||c.id,type:"checkbox",value:l,...b}),_.jsx(xr,{"aria-hidden":"true",$disabled:f,$status:p,children:_.jsx(Oh,{className:`mdi mdi-${a?"minus-thick":"check-bold"}`})}),_.jsxs(Fh,{children:[t?_.jsx(yt,{children:o}):_.jsx(Lh,{children:o}),r?_.jsx(zh,{children:r}):null]})]})})}),Xn=({ccMargin:e,children:r})=>_.jsx(Ce,{as:"span",weight:600,family:"heading",color:"default",ccMargin:e,children:r}),Ah=S.default.fieldset`
|
|
1004
1001
|
all: initial;
|
|
1005
1002
|
position: relative;
|
|
1006
1003
|
display: block;
|
|
1007
|
-
${e=>e.$message?
|
|
1004
|
+
${e=>e.$message?R.css`
|
|
1008
1005
|
margin-block-end: var(--cc_size_spacing_s);
|
|
1009
1006
|
`:null}
|
|
1010
|
-
`,
|
|
1007
|
+
`,jh=S.default.legend`
|
|
1011
1008
|
all: initial;
|
|
1012
1009
|
display: block;
|
|
1013
1010
|
float: left; /* Hack to make the legend appear inside the container */
|
|
1014
|
-
${e=>e.$hideLabel?
|
|
1015
|
-
`,
|
|
1011
|
+
${e=>e.$hideLabel?Ge:null}
|
|
1012
|
+
`,Hh=S.default.div`
|
|
1016
1013
|
clear: left; /* Clear the float from the legend */
|
|
1017
|
-
`,
|
|
1014
|
+
`,Du=({label:e,children:r,hideLabel:n=!1,testId:t,...o})=>{const{status:a="normal",message:i,disabled:s,style:l,className:c,...u}=o;return _.jsx(rn,{status:a,message:o.message,inputId:o.id,style:l,className:c,children:_.jsxs(Ah,{"data-testid":t,"aria-disabled":o.disabled,"aria-invalid":a==="error","aria-describedby":o.message?`${o.id}-message`:"",$message:o.message,...u,children:[_.jsx(jh,{$hideLabel:n,children:e}),r?_.jsx(Hh,{children:r}):null]})})},Yh=S.default.div`
|
|
1018
1015
|
margin-block-start: var(--cc_size_spacing_xxs);
|
|
1019
|
-
${e=>e.$layout==="inline"?
|
|
1016
|
+
${e=>e.$layout==="inline"?R.css`
|
|
1020
1017
|
display: flex;
|
|
1021
1018
|
flex-wrap: wrap;
|
|
1022
1019
|
gap: var(--cc_size_spacing_m);
|
|
1023
|
-
`:
|
|
1020
|
+
`:R.css`
|
|
1024
1021
|
display: grid;
|
|
1025
1022
|
row-gap: var(--cc_size_spacing_s);
|
|
1026
1023
|
column-gap: var(--cc_size_spacing_l);
|
|
1027
1024
|
`}
|
|
1028
|
-
`;function Mu({layout:e="block",...r}){const{label:t,...n}=r;return v.jsx(Eu,{label:v.jsx(Zn,{ccMargin:"none none s",children:t}),...n,children:v.jsx(Wh,{$layout:e,children:r.children})})}function Gh({onChange:e,options:r,selectedValues:t,scale:n,...o}){return v.jsx(Mu,{...o,children:r.map(a=>v.jsx(Du,{id:`${o.id}-${a.value}`,name:o.id,onChange:e,checked:t.includes(a.value),disabled:a.disabled||o.disabled,status:a.status||o.status,scale:a.scale||n,...a},a.value))})}function Ru(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(t=Ru(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ee(){for(var e,r,t=0,n="",o=arguments.length;t<o;t++)(e=arguments[t])&&(r=Ru(e))&&(n&&(n+=" "),n+=r);return n}const Pu=6048e5,qh=864e5,ca=6e4,ua=36e5,Kh=1e3,cl=Symbol.for("constructDateFrom");function ue(e,r){return typeof e=="function"?e(r):e&&typeof e=="object"&&cl in e?e[cl](r):e instanceof Date?new e.constructor(r):new Date(r)}function W(e,r){return ue(r||e,e)}function at(e,r,t){const n=W(e,t==null?void 0:t.in);return isNaN(r)?ue((t==null?void 0:t.in)||e,NaN):(r&&n.setDate(n.getDate()+r),n)}function st(e,r,t){const n=W(e,t==null?void 0:t.in);if(isNaN(r))return ue(e,NaN);if(!r)return n;const o=n.getDate(),a=ue(e,n.getTime());a.setMonth(n.getMonth()+r+1,0);const i=a.getDate();return o>=i?a:(n.setFullYear(a.getFullYear(),a.getMonth(),o),n)}function Tu(e,r,t){return ue(e,+W(e)+r)}function Uh(e,r,t){return Tu(e,r*ua)}let Qh={};function kn(){return Qh}function At(e,r){var s,l,c,u;const t=kn(),n=(r==null?void 0:r.weekStartsOn)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((u=(c=t.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,o=W(e,r==null?void 0:r.in),a=o.getDay(),i=(a<n?7:0)+a-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Bn(e,r){return At(e,{...r,weekStartsOn:1})}function Iu(e,r){const t=W(e,r==null?void 0:r.in),n=t.getFullYear(),o=ue(t,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const a=Bn(o),i=ue(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=Bn(i);return t.getTime()>=a.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Eo(e){const r=W(e),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+e-+t}function jt(e,...r){const t=ue.bind(null,r.find(n=>typeof n=="object"));return r.map(t)}function xn(e,r){const t=W(e,r==null?void 0:r.in);return t.setHours(0,0,0,0),t}function Wn(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r),a=xn(n),i=xn(o),s=+a-Eo(a),l=+i-Eo(i);return Math.round((s-l)/qh)}function Xh(e,r){const t=Iu(e,r),n=ue(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Bn(n)}function gi(e,r,t){const n=W(e,t==null?void 0:t.in);return n.setTime(n.getTime()+r*ca),n}function es(e,r,t){return st(e,r*3,t)}function Zh(e,r,t){return Tu(e,r*1e3)}function Mo(e,r,t){return at(e,r*7,t)}function Et(e,r,t){return st(e,r*12,t)}function ul(e,r){let t,n=r==null?void 0:r.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=ue.bind(null,o));const a=W(o,n);(!t||t<a||isNaN(+a))&&(t=a)}),ue(n,t||NaN)}function dl(e,r){let t,n=r==null?void 0:r.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=ue.bind(null,o));const a=W(o,n);(!t||t>a||isNaN(+a))&&(t=a)}),ue(n,t||NaN)}function Jh(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r);return+xn(n)==+xn(o)}function Mt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ro(e){return!(!Mt(e)&&typeof e!="number"||isNaN(+W(e)))}function Po(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r),a=n.getFullYear()-o.getFullYear(),i=n.getMonth()-o.getMonth();return a*12+i}function hn(e,r){const t=W(e,r==null?void 0:r.in);return Math.trunc(t.getMonth()/3)+1}function To(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r),a=n.getFullYear()-o.getFullYear(),i=hn(n)-hn(o);return a*4+i}function Io(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r);return n.getFullYear()-o.getFullYear()}function ev(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r),a=fl(n,o),i=Math.abs(Wn(n,o));n.setDate(n.getDate()-a*i);const s=+(fl(n,o)===-a),l=a*(i-s);return l===0?0:l}function fl(e,r){const t=e.getFullYear()-r.getFullYear()||e.getMonth()-r.getMonth()||e.getDate()-r.getDate()||e.getHours()-r.getHours()||e.getMinutes()-r.getMinutes()||e.getSeconds()-r.getSeconds()||e.getMilliseconds()-r.getMilliseconds();return t<0?-1:t>0?1:t}function Ou(e,r){const t=W(e,r==null?void 0:r.in);return t.setHours(23,59,59,999),t}function Fu(e,r){const t=W(e,r==null?void 0:r.in),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function mi(e,r){const t=W(e,r==null?void 0:r.in),n=t.getMonth(),o=n-n%3;return t.setMonth(o,1),t.setHours(0,0,0,0),t}function Lu(e,r){const t=W(e,r==null?void 0:r.in);return t.setDate(1),t.setHours(0,0,0,0),t}function zu(e,r){const t=W(e,r==null?void 0:r.in),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function da(e,r){const t=W(e,r==null?void 0:r.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function tv(e,r){var s,l;const t=kn(),n=t.weekStartsOn??((l=(s=t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=W(e,r==null?void 0:r.in),a=o.getDay(),i=(a<n?-7:0)+6-(a-n);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const nv={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"}},rv=(e,r,t)=>{let n;const o=nv[e];return typeof o=="string"?n=o:r===1?n=o.one:n=o.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function za(e){return(r={})=>{const t=r.width?String(r.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const ov={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},av={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},iv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},sv={date:za({formats:ov,defaultWidth:"full"}),time:za({formats:av,defaultWidth:"full"}),dateTime:za({formats:iv,defaultWidth:"full"})},lv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},cv=(e,r,t,n)=>lv[e];function tr(e){return(r,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let o;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=t!=null&&t.width?String(t.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=t!=null&&t.width?String(t.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(r):r;return o[a]}}const uv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},dv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fv={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"]},pv={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"]},gv={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"}},mv={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"}},hv=(e,r)=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},vv={ordinalNumber:hv,era:tr({values:uv,defaultWidth:"wide"}),quarter:tr({values:dv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:tr({values:fv,defaultWidth:"wide"}),day:tr({values:pv,defaultWidth:"wide"}),dayPeriod:tr({values:gv,defaultWidth:"wide",formattingValues:mv,defaultFormattingWidth:"wide"})};function nr(e){return(r,t={})=>{const n=t.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?bv(s,f=>f.test(i)):_v(s,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const u=r.slice(i.length);return{value:c,rest:u}}}function _v(e,r){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&r(e[t]))return t}function bv(e,r){for(let t=0;t<e.length;t++)if(r(e[t]))return t}function yv(e){return(r,t={})=>{const n=r.match(e.matchPattern);if(!n)return null;const o=n[0],a=r.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=t.valueCallback?t.valueCallback(i):i;const s=r.slice(o.length);return{value:i,rest:s}}}const wv=/^(\d+)(th|st|nd|rd)?/i,xv=/\d+/i,Sv={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},$v={any:[/^b/i,/^(a|c)/i]},kv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Cv={any:[/1/i,/2/i,/3/i,/4/i]},Dv={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},Ev={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]},Mv={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},Rv={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]},Pv={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},Tv={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}},Iv={ordinalNumber:yv({matchPattern:wv,parsePattern:xv,valueCallback:e=>parseInt(e,10)}),era:nr({matchPatterns:Sv,defaultMatchWidth:"wide",parsePatterns:$v,defaultParseWidth:"any"}),quarter:nr({matchPatterns:kv,defaultMatchWidth:"wide",parsePatterns:Cv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:nr({matchPatterns:Dv,defaultMatchWidth:"wide",parsePatterns:Ev,defaultParseWidth:"any"}),day:nr({matchPatterns:Mv,defaultMatchWidth:"wide",parsePatterns:Rv,defaultParseWidth:"any"}),dayPeriod:nr({matchPatterns:Pv,defaultMatchWidth:"any",parsePatterns:Tv,defaultParseWidth:"any"})},Nu={code:"en-US",formatDistance:rv,formatLong:sv,formatRelative:cv,localize:vv,match:Iv,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ov(e,r){const t=W(e,r==null?void 0:r.in);return Wn(t,da(t))+1}function ts(e,r){const t=W(e,r==null?void 0:r.in),n=+Bn(t)-+Xh(t);return Math.round(n/Pu)+1}function ns(e,r){var u,f,p,d;const t=W(e,r==null?void 0:r.in),n=t.getFullYear(),o=kn(),a=(r==null?void 0:r.firstWeekContainsDate)??((f=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((d=(p=o.locale)==null?void 0:p.options)==null?void 0:d.firstWeekContainsDate)??1,i=ue((r==null?void 0:r.in)||e,0);i.setFullYear(n+1,0,a),i.setHours(0,0,0,0);const s=At(i,r),l=ue((r==null?void 0:r.in)||e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);const c=At(l,r);return+t>=+s?n+1:+t>=+c?n:n-1}function Fv(e,r){var s,l,c,u;const t=kn(),n=(r==null?void 0:r.firstWeekContainsDate)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((u=(c=t.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,o=ns(e,r),a=ue((r==null?void 0:r.in)||e,0);return a.setFullYear(o,0,n),a.setHours(0,0,0,0),At(a,r)}function Au(e,r){const t=W(e,r==null?void 0:r.in),n=+At(t,r)-+Fv(t,r);return Math.round(n/Pu)+1}function ce(e,r){const t=e<0?"-":"",n=Math.abs(e).toString().padStart(r,"0");return t+n}const Vt={y(e,r){const t=e.getFullYear(),n=t>0?t:1-t;return ce(r==="yy"?n%100:n,r.length)},M(e,r){const t=e.getMonth();return r==="M"?String(t+1):ce(t+1,2)},d(e,r){return ce(e.getDate(),r.length)},a(e,r){const t=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,r){return ce(e.getHours()%12||12,r.length)},H(e,r){return ce(e.getHours(),r.length)},m(e,r){return ce(e.getMinutes(),r.length)},s(e,r){return ce(e.getSeconds(),r.length)},S(e,r){const t=r.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,t-3));return ce(o,r.length)}},Tn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},pl={G:function(e,r,t){const n=e.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(e,r,t){if(r==="yo"){const n=e.getFullYear(),o=n>0?n:1-n;return t.ordinalNumber(o,{unit:"year"})}return Vt.y(e,r)},Y:function(e,r,t,n){const o=ns(e,n),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return ce(i,2)}return r==="Yo"?t.ordinalNumber(a,{unit:"year"}):ce(a,r.length)},R:function(e,r){const t=Iu(e);return ce(t,r.length)},u:function(e,r){const t=e.getFullYear();return ce(t,r.length)},Q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"Q":return String(n);case"QQ":return ce(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,r,t){const n=Math.ceil((e.getMonth()+1)/3);switch(r){case"q":return String(n);case"qq":return ce(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,r,t){const n=e.getMonth();switch(r){case"M":case"MM":return Vt.M(e,r);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(e,r,t){const n=e.getMonth();switch(r){case"L":return String(n+1);case"LL":return ce(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(e,r,t,n){const o=Au(e,n);return r==="wo"?t.ordinalNumber(o,{unit:"week"}):ce(o,r.length)},I:function(e,r,t){const n=ts(e);return r==="Io"?t.ordinalNumber(n,{unit:"week"}):ce(n,r.length)},d:function(e,r,t){return r==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):Vt.d(e,r)},D:function(e,r,t){const n=Ov(e);return r==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):ce(n,r.length)},E:function(e,r,t){const n=e.getDay();switch(r){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(e,r,t,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return ce(a,2);case"eo":return t.ordinalNumber(a,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,t,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return ce(a,r.length);case"co":return t.ordinalNumber(a,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,t){const n=e.getDay(),o=n===0?7:n;switch(r){case"i":return String(o);case"ii":return ce(o,r.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(e,r,t){const o=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,t){const n=e.getHours();let o;switch(n===12?o=Tn.noon:n===0?o=Tn.midnight:o=n/12>=1?"pm":"am",r){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,t){const n=e.getHours();let o;switch(n>=17?o=Tn.evening:n>=12?o=Tn.afternoon:n>=4?o=Tn.morning:o=Tn.night,r){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,t){if(r==="ho"){let n=e.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Vt.h(e,r)},H:function(e,r,t){return r==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):Vt.H(e,r)},K:function(e,r,t){const n=e.getHours()%12;return r==="Ko"?t.ordinalNumber(n,{unit:"hour"}):ce(n,r.length)},k:function(e,r,t){let n=e.getHours();return n===0&&(n=24),r==="ko"?t.ordinalNumber(n,{unit:"hour"}):ce(n,r.length)},m:function(e,r,t){return r==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vt.m(e,r)},s:function(e,r,t){return r==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):Vt.s(e,r)},S:function(e,r){return Vt.S(e,r)},X:function(e,r,t){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(r){case"X":return ml(n);case"XXXX":case"XX":return ln(n);case"XXXXX":case"XXX":default:return ln(n,":")}},x:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"x":return ml(n);case"xxxx":case"xx":return ln(n);case"xxxxx":case"xxx":default:return ln(n,":")}},O:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+gl(n,":");case"OOOO":default:return"GMT"+ln(n,":")}},z:function(e,r,t){const n=e.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+gl(n,":");case"zzzz":default:return"GMT"+ln(n,":")}},t:function(e,r,t){const n=Math.trunc(+e/1e3);return ce(n,r.length)},T:function(e,r,t){return ce(+e,r.length)}};function gl(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),a=n%60;return a===0?t+String(o):t+String(o)+r+ce(a,2)}function ml(e,r){return e%60===0?(e>0?"-":"+")+ce(Math.abs(e)/60,2):ln(e,r)}function ln(e,r=""){const t=e>0?"-":"+",n=Math.abs(e),o=ce(Math.trunc(n/60),2),a=ce(n%60,2);return t+o+r+a}const hl=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},ju=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},Lv=(e,r)=>{const t=e.match(/(P+)(p+)?/)||[],n=t[1],o=t[2];if(!o)return hl(e,r);let a;switch(n){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",hl(n,r)).replace("{{time}}",ju(o,r))},hi={p:ju,P:Lv},zv=/^D+$/,Nv=/^Y+$/,Av=["D","DD","YY","YYYY"];function jv(e){return zv.test(e)}function Hv(e){return Nv.test(e)}function Yv(e,r,t){const n=Vv(e,r,t);if(console.warn(n),Av.includes(e))throw new RangeError(n)}function Vv(e,r,t){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Bv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Wv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gv=/^'([^]*?)'?$/,qv=/''/g,Kv=/[a-zA-Z]/;function vl(e,r,t){var u,f,p,d,g,m,_,y;const n=kn(),o=(t==null?void 0:t.locale)??n.locale??Nu,a=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(p=n.locale)==null?void 0:p.options)==null?void 0:d.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((m=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((y=(_=n.locale)==null?void 0:_.options)==null?void 0:y.weekStartsOn)??0,s=W(e,t==null?void 0:t.in);if(!Ro(s))throw new RangeError("Invalid time value");let l=r.match(Wv).map(x=>{const w=x[0];if(w==="p"||w==="P"){const $=hi[w];return $(x,o.formatLong)}return x}).join("").match(Bv).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:Uv(x)};if(pl[w])return{isToken:!0,value:x};if(w.match(Kv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Hv(w)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&jv(w))&&Yv(w,r,String(e));const $=pl[w[0]];return $(s,w,o.localize,c)}).join("")}function Uv(e){const r=e.match(Gv);return r?r[1].replace(qv,"'"):e}function _l(e,r){return W(e,r==null?void 0:r.in).getDate()}function Qv(e,r){return W(e,r==null?void 0:r.in).getDay()}function Xv(e,r){const t=W(e,r==null?void 0:r.in),n=t.getFullYear(),o=t.getMonth(),a=ue(t,0);return a.setFullYear(n,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Zv(){return Object.assign({},kn())}function Rt(e,r){return W(e,r==null?void 0:r.in).getHours()}function Jv(e,r){const t=W(e,r==null?void 0:r.in).getDay();return t===0?7:t}function Pt(e,r){return W(e,r==null?void 0:r.in).getMinutes()}function Le(e,r){return W(e,r==null?void 0:r.in).getMonth()}function Xt(e){return W(e).getSeconds()}function vi(e){return+W(e)}function te(e,r){return W(e,r==null?void 0:r.in).getFullYear()}function en(e,r){return+W(e)>+W(r)}function ht(e,r){return+W(e)<+W(r)}function e_(e,r){return+W(e)==+W(r)}function t_(e,r){const t=n_(r)?new r(0):ue(r,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}function n_(e){var r;return typeof e=="function"&&((r=e.prototype)==null?void 0:r.constructor)===e}const r_=10;class Hu{constructor(){V(this,"subPriority",0)}validate(r,t){return!0}}class o_ extends Hu{constructor(r,t,n,o,a){super(),this.value=r,this.validateValue=t,this.setValue=n,this.priority=o,a&&(this.subPriority=a)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,n){return this.setValue(r,t,this.value,n)}}class a_ extends Hu{constructor(t,n){super();V(this,"priority",r_);V(this,"subPriority",-1);this.context=t||(o=>ue(n,o))}set(t,n){return n.timestampIsSet?t:ue(t,t_(t,this.context))}}class se{run(r,t,n,o){const a=this.parse(r,t,n,o);return a?{setter:new o_(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,t,n){return!0}}class i_ extends se{constructor(){super(...arguments);V(this,"priority",140);V(this,"incompatibleTokens",["R","u","t","T"])}parse(t,n,o){switch(n){case"G":case"GG":case"GGG":return o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"});case"GGGGG":return o.era(t,{width:"narrow"});case"GGGG":default:return o.era(t,{width:"wide"})||o.era(t,{width:"abbreviated"})||o.era(t,{width:"narrow"})}}set(t,n,o){return n.era=o,t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}const ye={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},pt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function we(e,r){return e&&{value:r(e.value),rest:e.rest}}function he(e,r){const t=r.match(e);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function gt(e,r){const t=r.match(e);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const n=t[1]==="+"?1:-1,o=t[2]?parseInt(t[2],10):0,a=t[3]?parseInt(t[3],10):0,i=t[5]?parseInt(t[5],10):0;return{value:n*(o*ua+a*ca+i*Kh),rest:r.slice(t[0].length)}}function Yu(e){return he(ye.anyDigitsSigned,e)}function ve(e,r){switch(e){case 1:return he(ye.singleDigit,r);case 2:return he(ye.twoDigits,r);case 3:return he(ye.threeDigits,r);case 4:return he(ye.fourDigits,r);default:return he(new RegExp("^\\d{1,"+e+"}"),r)}}function Oo(e,r){switch(e){case 1:return he(ye.singleDigitSigned,r);case 2:return he(ye.twoDigitsSigned,r);case 3:return he(ye.threeDigitsSigned,r);case 4:return he(ye.fourDigitsSigned,r);default:return he(new RegExp("^-?\\d{1,"+e+"}"),r)}}function rs(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Vu(e,r){const t=r>0,n=t?r:1-r;let o;if(n<=50)o=e||100;else{const a=n+50,i=Math.trunc(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return t?o:1-o}function Bu(e){return e%400===0||e%4===0&&e%100!==0}class s_ extends se{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,n,o){const a=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return we(ve(4,t),a);case"yo":return we(o.ordinalNumber(t,{unit:"year"}),a);default:return we(ve(n.length,t),a)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o){const a=t.getFullYear();if(o.isTwoDigitYear){const s=Vu(o.year,a);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class l_ extends se{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,n,o){const a=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return we(ve(4,t),a);case"Yo":return we(o.ordinalNumber(t,{unit:"year"}),a);default:return we(ve(n.length,t),a)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,o,a){const i=ns(t,a);if(o.isTwoDigitYear){const l=Vu(o.year,i);return t.setFullYear(l,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),At(t,a)}const s=!("era"in n)||n.era===1?o.year:1-o.year;return t.setFullYear(s,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),At(t,a)}}class c_ extends se{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,n){return Oo(n==="R"?4:n.length,t)}set(t,n,o){const a=ue(t,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),Bn(a)}}class u_ extends se{constructor(){super(...arguments);V(this,"priority",130);V(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,n){return Oo(n==="u"?4:n.length,t)}set(t,n,o){return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class d_ extends se{constructor(){super(...arguments);V(this,"priority",120);V(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"Q":case"QQ":return ve(n.length,t);case"Qo":return o.ordinalNumber(t,{unit:"quarter"});case"QQQ":return o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(t,{width:"wide",context:"formatting"})||o.quarter(t,{width:"abbreviated",context:"formatting"})||o.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class f_ extends se{constructor(){super(...arguments);V(this,"priority",120);V(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"q":case"qq":return ve(n.length,t);case"qo":return o.ordinalNumber(t,{unit:"quarter"});case"qqq":return o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(t,{width:"wide",context:"standalone"})||o.quarter(t,{width:"abbreviated",context:"standalone"})||o.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class p_ extends se{constructor(){super(...arguments);V(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);V(this,"priority",110)}parse(t,n,o){const a=i=>i-1;switch(n){case"M":return we(he(ye.month,t),a);case"MM":return we(ve(2,t),a);case"Mo":return we(o.ordinalNumber(t,{unit:"month"}),a);case"MMM":return o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(t,{width:"wide",context:"formatting"})||o.month(t,{width:"abbreviated",context:"formatting"})||o.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}class g_ extends se{constructor(){super(...arguments);V(this,"priority",110);V(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,n,o){const a=i=>i-1;switch(n){case"L":return we(he(ye.month,t),a);case"LL":return we(ve(2,t),a);case"Lo":return we(o.ordinalNumber(t,{unit:"month"}),a);case"LLL":return o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(t,{width:"wide",context:"standalone"})||o.month(t,{width:"abbreviated",context:"standalone"})||o.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}function m_(e,r,t){const n=W(e,t==null?void 0:t.in),o=Au(n,t)-r;return n.setDate(n.getDate()-o*7),W(n,t==null?void 0:t.in)}class h_ extends se{constructor(){super(...arguments);V(this,"priority",100);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,n,o){switch(n){case"w":return he(ye.week,t);case"wo":return o.ordinalNumber(t,{unit:"week"});default:return ve(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o,a){return At(m_(t,o,a),a)}}function v_(e,r,t){const n=W(e,t==null?void 0:t.in),o=ts(n,t)-r;return n.setDate(n.getDate()-o*7),n}class __ extends se{constructor(){super(...arguments);V(this,"priority",100);V(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,n,o){switch(n){case"I":return he(ye.week,t);case"Io":return o.ordinalNumber(t,{unit:"week"});default:return ve(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,o){return Bn(v_(t,o))}}const b_=[31,28,31,30,31,30,31,31,30,31,30,31],y_=[31,29,31,30,31,30,31,31,30,31,30,31];class w_ extends se{constructor(){super(...arguments);V(this,"priority",90);V(this,"subPriority",1);V(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"d":return he(ye.date,t);case"do":return o.ordinalNumber(t,{unit:"date"});default:return ve(n.length,t)}}validate(t,n){const o=t.getFullYear(),a=Bu(o),i=t.getMonth();return a?n>=1&&n<=y_[i]:n>=1&&n<=b_[i]}set(t,n,o){return t.setDate(o),t.setHours(0,0,0,0),t}}class x_ extends se{constructor(){super(...arguments);V(this,"priority",90);V(this,"subpriority",1);V(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,n,o){switch(n){case"D":case"DD":return he(ye.dayOfYear,t);case"Do":return o.ordinalNumber(t,{unit:"date"});default:return ve(n.length,t)}}validate(t,n){const o=t.getFullYear();return Bu(o)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,o){return t.setMonth(0,o),t.setHours(0,0,0,0),t}}function os(e,r,t){var f,p,d,g;const n=kn(),o=(t==null?void 0:t.weekStartsOn)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??n.weekStartsOn??((g=(d=n.locale)==null?void 0:d.options)==null?void 0:g.weekStartsOn)??0,a=W(e,t==null?void 0:t.in),i=a.getDay(),l=(r%7+7)%7,c=7-o,u=r<0||r>6?r-(i+c)%7:(l+c)%7-(i+c)%7;return at(a,u,t)}class S_ extends se{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,n,o){switch(n){case"E":case"EE":case"EEE":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,a){return t=os(t,o,a),t.setHours(0,0,0,0),t}}class $_ extends se{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,n,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(n){case"e":case"ee":return we(ve(n.length,t),i);case"eo":return we(o.ordinalNumber(t,{unit:"day"}),i);case"eee":return o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeeee":return o.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,a){return t=os(t,o,a),t.setHours(0,0,0,0),t}}class k_ extends se{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,n,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(n){case"c":case"cc":return we(ve(n.length,t),i);case"co":return we(o.ordinalNumber(t,{unit:"day"}),i);case"ccc":return o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"ccccc":return o.day(t,{width:"narrow",context:"standalone"});case"cccccc":return o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(t,{width:"wide",context:"standalone"})||o.day(t,{width:"abbreviated",context:"standalone"})||o.day(t,{width:"short",context:"standalone"})||o.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,o,a){return t=os(t,o,a),t.setHours(0,0,0,0),t}}function C_(e,r,t){const n=W(e,t==null?void 0:t.in),o=Jv(n,t),a=r-o;return at(n,a,t)}class D_ extends se{constructor(){super(...arguments);V(this,"priority",90);V(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,n,o){const a=i=>i===0?7:i;switch(n){case"i":case"ii":return ve(n.length,t);case"io":return o.ordinalNumber(t,{unit:"day"});case"iii":return we(o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),a);case"iiiii":return we(o.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return we(o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),a);case"iiii":default:return we(o.day(t,{width:"wide",context:"formatting"})||o.day(t,{width:"abbreviated",context:"formatting"})||o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),a)}}validate(t,n){return n>=1&&n<=7}set(t,n,o){return t=C_(t,o),t.setHours(0,0,0,0),t}}class E_ extends se{constructor(){super(...arguments);V(this,"priority",80);V(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,n,o){switch(n){case"a":case"aa":case"aaa":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(rs(o),0,0,0),t}}class M_ extends se{constructor(){super(...arguments);V(this,"priority",80);V(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,n,o){switch(n){case"b":case"bb":case"bbb":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(rs(o),0,0,0),t}}class R_ extends se{constructor(){super(...arguments);V(this,"priority",80);V(this,"incompatibleTokens",["a","b","t","T"])}parse(t,n,o){switch(n){case"B":case"BB":case"BBB":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})||o.dayPeriod(t,{width:"abbreviated",context:"formatting"})||o.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,o){return t.setHours(rs(o),0,0,0),t}}class P_ extends se{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,n,o){switch(n){case"h":return he(ye.hour12h,t);case"ho":return o.ordinalNumber(t,{unit:"hour"});default:return ve(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,o){const a=t.getHours()>=12;return a&&o<12?t.setHours(o+12,0,0,0):!a&&o===12?t.setHours(0,0,0,0):t.setHours(o,0,0,0),t}}class T_ extends se{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,n,o){switch(n){case"H":return he(ye.hour23h,t);case"Ho":return o.ordinalNumber(t,{unit:"hour"});default:return ve(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,o){return t.setHours(o,0,0,0),t}}class I_ extends se{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,n,o){switch(n){case"K":return he(ye.hour11h,t);case"Ko":return o.ordinalNumber(t,{unit:"hour"});default:return ve(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,o){return t.getHours()>=12&&o<12?t.setHours(o+12,0,0,0):t.setHours(o,0,0,0),t}}class O_ extends se{constructor(){super(...arguments);V(this,"priority",70);V(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,n,o){switch(n){case"k":return he(ye.hour24h,t);case"ko":return o.ordinalNumber(t,{unit:"hour"});default:return ve(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,o){const a=o<=24?o%24:o;return t.setHours(a,0,0,0),t}}class F_ extends se{constructor(){super(...arguments);V(this,"priority",60);V(this,"incompatibleTokens",["t","T"])}parse(t,n,o){switch(n){case"m":return he(ye.minute,t);case"mo":return o.ordinalNumber(t,{unit:"minute"});default:return ve(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setMinutes(o,0,0),t}}class L_ extends se{constructor(){super(...arguments);V(this,"priority",50);V(this,"incompatibleTokens",["t","T"])}parse(t,n,o){switch(n){case"s":return he(ye.second,t);case"so":return o.ordinalNumber(t,{unit:"second"});default:return ve(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,o){return t.setSeconds(o,0),t}}class z_ extends se{constructor(){super(...arguments);V(this,"priority",30);V(this,"incompatibleTokens",["t","T"])}parse(t,n){const o=a=>Math.trunc(a*Math.pow(10,-n.length+3));return we(ve(n.length,t),o)}set(t,n,o){return t.setMilliseconds(o),t}}class N_ extends se{constructor(){super(...arguments);V(this,"priority",10);V(this,"incompatibleTokens",["t","T","x"])}parse(t,n){switch(n){case"X":return gt(pt.basicOptionalMinutes,t);case"XX":return gt(pt.basic,t);case"XXXX":return gt(pt.basicOptionalSeconds,t);case"XXXXX":return gt(pt.extendedOptionalSeconds,t);case"XXX":default:return gt(pt.extended,t)}}set(t,n,o){return n.timestampIsSet?t:ue(t,t.getTime()-Eo(t)-o)}}class A_ extends se{constructor(){super(...arguments);V(this,"priority",10);V(this,"incompatibleTokens",["t","T","X"])}parse(t,n){switch(n){case"x":return gt(pt.basicOptionalMinutes,t);case"xx":return gt(pt.basic,t);case"xxxx":return gt(pt.basicOptionalSeconds,t);case"xxxxx":return gt(pt.extendedOptionalSeconds,t);case"xxx":default:return gt(pt.extended,t)}}set(t,n,o){return n.timestampIsSet?t:ue(t,t.getTime()-Eo(t)-o)}}class j_ extends se{constructor(){super(...arguments);V(this,"priority",40);V(this,"incompatibleTokens","*")}parse(t){return Yu(t)}set(t,n,o){return[ue(t,o*1e3),{timestampIsSet:!0}]}}class H_ extends se{constructor(){super(...arguments);V(this,"priority",20);V(this,"incompatibleTokens","*")}parse(t){return Yu(t)}set(t,n,o){return[ue(t,o),{timestampIsSet:!0}]}}const Y_={G:new i_,y:new s_,Y:new l_,R:new c_,u:new u_,Q:new d_,q:new f_,M:new p_,L:new g_,w:new h_,I:new __,d:new w_,D:new x_,E:new S_,e:new $_,c:new k_,i:new D_,a:new E_,b:new M_,B:new R_,h:new P_,H:new T_,K:new I_,k:new O_,m:new F_,s:new L_,S:new z_,X:new N_,x:new A_,t:new j_,T:new H_},V_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,B_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W_=/^'([^]*?)'?$/,G_=/''/g,q_=/\S/,K_=/[a-zA-Z]/;function U_(e,r,t,n){var _,y,x,w,$,C,k,M;const o=()=>ue((n==null?void 0:n.in)||t,NaN),a=Zv(),i=(n==null?void 0:n.locale)??a.locale??Nu,s=(n==null?void 0:n.firstWeekContainsDate)??((y=(_=n==null?void 0:n.locale)==null?void 0:_.options)==null?void 0:y.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(x=a.locale)==null?void 0:x.options)==null?void 0:w.firstWeekContainsDate)??1,l=(n==null?void 0:n.weekStartsOn)??((C=($=n==null?void 0:n.locale)==null?void 0:$.options)==null?void 0:C.weekStartsOn)??a.weekStartsOn??((M=(k=a.locale)==null?void 0:k.options)==null?void 0:M.weekStartsOn)??0;if(!r)return e?o():W(t,n==null?void 0:n.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:i},u=[new a_(n==null?void 0:n.in,t)],f=r.match(B_).map(E=>{const P=E[0];if(P in hi){const F=hi[P];return F(E,i.formatLong)}return E}).join("").match(V_),p=[];for(let E of f){const P=E[0],F=Y_[P];if(F){const{incompatibleTokens:L}=F;if(Array.isArray(L)){const O=p.find(A=>L.includes(A.token)||A.token===P);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${E}\` at the same time`)}else if(F.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${E}\` and any other token at the same time`);p.push({token:P,fullToken:E});const T=F.run(e,E,i.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(P.match(K_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");if(E==="''"?E="'":P==="'"&&(E=Q_(E)),e.indexOf(E)===0)e=e.slice(E.length);else return o()}}if(e.length>0&&q_.test(e))return o();const d=u.map(E=>E.priority).sort((E,P)=>P-E).filter((E,P,F)=>F.indexOf(E)===P).map(E=>u.filter(P=>P.priority===E).sort((P,F)=>F.subPriority-P.subPriority)).map(E=>E[0]);let g=W(t,n==null?void 0:n.in);if(isNaN(+g))return o();const m={};for(const E of d){if(!E.validate(g,c))return o();const P=E.set(g,m,c);Array.isArray(P)?(g=P[0],Object.assign(m,P[1])):g=P}return g}function Q_(e){return e.match(W_)[1].replace(G_,"'")}function X_(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function Z_(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r);return+mi(n)==+mi(o)}function J_(e,r,t){const[n,o]=jt(t==null?void 0:t.in,e,r);return n.getFullYear()===o.getFullYear()}function $r(e,r,t){const n=+W(e,t==null?void 0:t.in),[o,a]=[+W(r.start,t==null?void 0:t.in),+W(r.end,t==null?void 0:t.in)].sort((i,s)=>i-s);return n>=o&&n<=a}function eb(e,r,t){return at(e,-1,t)}function tb(e,r){const t=()=>ue(r==null?void 0:r.in,NaN),o=ab(e);let a;if(o.date){const c=ib(o.date,2);a=sb(c.restDateString,c.year)}if(!a||isNaN(+a))return t();const i=+a;let s=0,l;if(o.time&&(s=lb(o.time),isNaN(s)))return t();if(o.timezone){if(l=cb(o.timezone),isNaN(l))return t()}else{const c=new Date(i+s),u=W(0,r==null?void 0:r.in);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return W(i+s+l,r==null?void 0:r.in)}const qr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},nb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,rb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ob=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ab(e){const r={},t=e.split(qr.dateTimeDelimiter);let n;if(t.length>2)return r;if(/:/.test(t[0])?n=t[0]:(r.date=t[0],n=t[1],qr.timeZoneDelimiter.test(r.date)&&(r.date=e.split(qr.timeZoneDelimiter)[0],n=e.substr(r.date.length,e.length))),n){const o=qr.timezone.exec(n);o?(r.time=n.replace(o[1],""),r.timezone=o[1]):r.time=n}return r}function ib(e,r){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),n=e.match(t);if(!n)return{year:NaN,restDateString:""};const o=n[1]?parseInt(n[1]):null,a=n[2]?parseInt(n[2]):null;return{year:a===null?o:a*100,restDateString:e.slice((n[1]||n[2]).length)}}function sb(e,r){if(r===null)return new Date(NaN);const t=e.match(nb);if(!t)return new Date(NaN);const n=!!t[4],o=rr(t[1]),a=rr(t[2])-1,i=rr(t[3]),s=rr(t[4]),l=rr(t[5])-1;if(n)return gb(r,s,l)?ub(r,s,l):new Date(NaN);{const c=new Date(0);return!fb(r,a,i)||!pb(r,o)?new Date(NaN):(c.setUTCFullYear(r,a,Math.max(o,i)),c)}}function rr(e){return e?parseInt(e):1}function lb(e){const r=e.match(rb);if(!r)return NaN;const t=Na(r[1]),n=Na(r[2]),o=Na(r[3]);return mb(t,n,o)?t*ua+n*ca+o*1e3:NaN}function Na(e){return e&&parseFloat(e.replace(",","."))||0}function cb(e){if(e==="Z")return 0;const r=e.match(ob);if(!r)return 0;const t=r[1]==="+"?-1:1,n=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return hb(n,o)?t*(n*ua+o*ca):NaN}function ub(e,r,t){const n=new Date(0);n.setUTCFullYear(e,0,4);const o=n.getUTCDay()||7,a=(r-1)*7+t+1-o;return n.setUTCDate(n.getUTCDate()+a),n}const db=[31,null,31,30,31,30,31,31,30,31,30,31];function Wu(e){return e%400===0||e%4===0&&e%100!==0}function fb(e,r,t){return r>=0&&r<=11&&t>=1&&t<=(db[r]||(Wu(e)?29:28))}function pb(e,r){return r>=1&&r<=(Wu(e)?366:365)}function gb(e,r,t){return r>=1&&r<=53&&t>=0&&t<=6}function mb(e,r,t){return e===24?r===0&&t===0:t>=0&&t<60&&r>=0&&r<60&&e>=0&&e<25}function hb(e,r){return r>=0&&r<=59}function Qe(e,r,t){const n=W(e,t==null?void 0:t.in),o=n.getFullYear(),a=n.getDate(),i=ue(e,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=Xv(i);return n.setMonth(r,Math.min(a,s)),n}function uo(e,r,t){const n=W(e,t==null?void 0:t.in);return n.setHours(r),n}function fo(e,r,t){const n=W(e,t==null?void 0:t.in);return n.setMinutes(r),n}function In(e,r,t){const n=W(e,t==null?void 0:t.in),o=Math.trunc(n.getMonth()/3)+1,a=r-o;return Qe(n,n.getMonth()+a*3)}function po(e,r,t){const n=W(e,t==null?void 0:t.in);return n.setSeconds(r),n}function dt(e,r,t){const n=W(e,t==null?void 0:t.in);return isNaN(+n)?ue(e,NaN):(n.setFullYear(r),n)}function vn(e,r,t){return st(e,-r,t)}function Gu(e,r,t){return es(e,-1,t)}function bl(e,r,t){return Mo(e,-1,t)}function Gn(e,r,t){return Et(e,-r,t)}var vb=typeof document<"u",_b=function(){},Fo=vb?b.useLayoutEffect:_b;const bb={...h},yb=bb.useInsertionEffect,wb=yb||(e=>e());function xb(e){const r=h.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wb(()=>{r.current=e}),h.useCallback(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.current==null?void 0:r.current(...n)},[])}const Sb={...h};let yl=!1,$b=0;const wl=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$b++;function kb(){const[e,r]=h.useState(()=>yl?wl():void 0);return Fo(()=>{e==null&&r(wl())},[]),h.useEffect(()=>{yl=!0},[]),e}const Cb=Sb.useId,qu=Cb||kb;let kr;process.env.NODE_ENV!=="production"&&(kr=new Set);function Db(){for(var e,r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];const o="Floating UI: "+t.join(" ");if(!((e=kr)!=null&&e.has(o))){var a;(a=kr)==null||a.add(o),console.warn(o)}}function Eb(){for(var e,r=arguments.length,t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];const o="Floating UI: "+t.join(" ");if(!((e=kr)!=null&&e.has(o))){var a;(a=kr)==null||a.add(o),console.error(o)}}const Mb=h.forwardRef(function(r,t){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:f,stroke:p,d,style:{transform:g,...m}={},..._}=r;process.env.NODE_ENV!=="production"&&(t||Db("The `ref` prop is required for `FloatingArrow`."));const y=qu(),[x,w]=h.useState(!1);if(Fo(()=>{if(!o)return;Ye(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[$,C]=n.split("-"),k=$==="top"||$==="bottom";let M=f;(k&&i!=null&&i.x||!k&&i!=null&&i.y)&&(M=null);const E=u*2,P=E/2,F=s/2*(c/-8+1),L=l/2*c/4,T=!!d,O=M&&C==="end"?"bottom":"top";let A=M&&C==="end"?"right":"left";M&&x&&(A=C==="end"?"left":"right");const N=(a==null?void 0:a.x)!=null?M||a.x:"",j=(a==null?void 0:a.y)!=null?M||a.y:"",z=d||"M0,0"+(" H"+s)+(" L"+(s-F)+","+(l-L))+(" Q"+s/2+","+l+" "+F+","+(l-L))+" Z",D={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[$];return v.jsxs("svg",{..._,"aria-hidden":!0,ref:t,width:T?s:s+E,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[A]:N,[O]:j,[$]:k||T?"100%":"calc(100% - "+E/2+"px)",transform:[D,g].filter(R=>!!R).join(" "),...m},children:[E>0&&v.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:p,strokeWidth:E+(d?0:1),d:z}),v.jsx("path",{stroke:E&&!d?_.fill:"none",d:z}),v.jsx("clipPath",{id:y,children:v.jsx("rect",{x:-P,y:P*(T?-1:1),width:s+E,height:s})})]})});function Rb(){const e=new Map;return{emit(r,t){var n;(n=e.get(r))==null||n.forEach(o=>o(t))},on(r,t){e.has(r)||e.set(r,new Set),e.get(r).add(t)},off(r,t){var n;(n=e.get(r))==null||n.delete(t)}}}const Pb=h.createContext(null),Tb=h.createContext(null),Ib=()=>{var e;return((e=h.useContext(Pb))==null?void 0:e.id)||null},Ob=()=>h.useContext(Tb);function Fb(e){const{open:r=!1,onOpenChange:t,elements:n}=e,o=qu(),a=h.useRef({}),[i]=h.useState(()=>Rb()),s=Ib()!=null;if(process.env.NODE_ENV!=="production"){const d=n.reference;d&&!ae(d)&&Eb("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=h.useState(n.reference),u=xb((d,g,m)=>{a.current.openEvent=d?g:void 0,i.emit("openchange",{open:d,event:g,reason:m,nested:s}),t==null||t(d,g,m)}),f=h.useMemo(()=>({setPositionReference:c}),[]),p=h.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return h.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:p,events:i,floatingId:o,refs:f}),[r,u,p,i,o,f])}function Lb(e){e===void 0&&(e={});const{nodeId:r}=e,t=Fb({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||t,o=n.elements,[a,i]=h.useState(null),[s,l]=h.useState(null),u=(o==null?void 0:o.domReference)||a,f=h.useRef(null),p=Ob();Fo(()=>{u&&(f.current=u)},[u]);const d=Jc({...e,elements:{...o,...s&&{reference:s}}}),g=h.useCallback(w=>{const $=ae(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l($),d.refs.setReference($)},[d.refs]),m=h.useCallback(w=>{(ae(w)||w===null)&&(f.current=w,i(w)),(ae(d.refs.reference.current)||d.refs.reference.current===null||w!==null&&!ae(w))&&d.refs.setReference(w)},[d.refs]),_=h.useMemo(()=>({...d.refs,setReference:m,setPositionReference:g,domReference:f}),[d.refs,m,g]),y=h.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),x=h.useMemo(()=>({...d,...n,refs:_,elements:y,nodeId:r}),[d,_,y,r,n]);return Fo(()=>{n.dataRef.current.floatingContext=x;const w=p==null?void 0:p.nodesRef.current.find($=>$.id===r);w&&(w.context=x)}),h.useMemo(()=>({...d,context:x,refs:_,elements:y}),[d,_,y,x])}/*!
|
|
1029
|
-
react-datepicker v8.7.0
|
|
1030
|
-
https://github.com/Hacker0x01/react-datepicker
|
|
1031
|
-
Released under the MIT License.
|
|
1032
|
-
*/var _i=function(r,t){return _i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])},_i(r,t)};function Re(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");_i(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var oe=function(){return oe=Object.assign||function(t){for(var n,o=1,a=arguments.length;o<a;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oe.apply(this,arguments)};function vt(e,r,t){if(t||arguments.length===2)for(var n=0,o=r.length,a;n<o;n++)(a||!(n in r))&&(a||(a=Array.prototype.slice.call(r,0,n)),a[n]=r[n]);return e.concat(a||Array.prototype.slice.call(r))}var zb=function(e){var r=e.showTimeSelectOnly,t=r===void 0?!1:r,n=e.showTime,o=n===void 0?!1:n,a=e.className,i=e.children,s=t?"Choose Time":"Choose Date".concat(o?" and Time":"");return h.default.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},Nb=function(e,r){var t=b.useRef(null),n=b.useRef(e);n.current=e;var o=b.useCallback(function(a){var i,s=a.composed&&a.composedPath&&a.composedPath().find(function(l){return l instanceof Node})||a.target;t.current&&!t.current.contains(s)&&(r&&s instanceof HTMLElement&&s.classList.contains(r)||(i=n.current)===null||i===void 0||i.call(n,a))},[r]);return b.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),t},fa=function(e){var r=e.children,t=e.onClickOutside,n=e.className,o=e.containerRef,a=e.style,i=e.ignoreClass,s=Nb(t,i);return h.default.createElement("div",{className:n,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},Y;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(Y||(Y={}));function Ku(){var e=typeof window<"u"?window:globalThis;return e}var Ir=12;function le(e){if(e==null)return new Date;var r=typeof e=="string"?tb(e):W(e);return pa(r)?r:new Date}function Aa(e,r,t,n,o){o===void 0&&(o=le());for(var a=qn(t)||qn(as()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var c=l[s],u=U_(e,c,o,{locale:a});if(pa(u)&&(!n||e===pe(u,c,t)))return u}return null}function pa(e,r){return Ro(e)&&!ht(e,new Date("1/1/1800"))}function pe(e,r,t){if(t==="en")return vl(e,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=t?qn(t):void 0;return t&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),n=n||qn(as()),vl(e,r,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Ue(e,r){var t=r.dateFormat,n=r.locale,o=Array.isArray(t)&&t.length>0?t[0]:t;return e&&pe(e,o,n)||""}var Uu=" - ";function Ab(e,r,t){if(!e&&!r)return"";var n=e?Ue(e,t):"",o=r?Ue(r,t):"",a=t.rangeSeparator||Uu;return"".concat(n).concat(a).concat(o)}function jb(e,r){if(!(e!=null&&e.length))return"";var t=e[0]?Ue(e[0],r):"";if(e.length===1)return t;if(e.length===2&&e[1]){var n=Ue(e[1],r);return"".concat(t,", ").concat(n)}var o=e.length-1;return"".concat(t," (+").concat(o,")")}function ja(e,r){var t=r.hour,n=t===void 0?0:t,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return uo(fo(po(e,s),a),n)}function Hb(e){return ts(e)}function Yb(e,r){return pe(e,"ddd",r)}function go(e){return xn(e)}function Zt(e,r,t){var n=qn(r||as());return At(e,{locale:n,weekStartsOn:t})}function Tt(e){return Lu(e)}function sr(e){return da(e)}function xl(e){return mi(e)}function Sl(){return xn(le())}function $l(e){return Ou(e)}function Vb(e){return tv(e)}function Bb(e){return Fu(e)}function ft(e,r){return e&&r?J_(e,r):!e&&!r}function Ne(e,r){return e&&r?X_(e,r):!e&&!r}function Lo(e,r){return e&&r?Z_(e,r):!e&&!r}function re(e,r){return e&&r?Jh(e,r):!e&&!r}function fn(e,r){return e&&r?e_(e,r):!e&&!r}function cn(e,r,t){var n,o=xn(r),a=Ou(t);try{n=$r(e,{start:o,end:a})}catch{n=!1}return n}function as(){var e=Ku();return e.__localeId__}function qn(e){if(typeof e=="string"){var r=Ku();return r.__localeData__?r.__localeData__[e]:void 0}else return e}function Wb(e,r,t){return r(pe(e,"EEEE",t))}function Gb(e,r){return pe(e,"EEEEEE",r)}function qb(e,r){return pe(e,"EEE",r)}function is(e,r){return pe(Qe(le(),e),"LLLL",r)}function Qu(e,r){return pe(Qe(le(),e),"LLL",r)}function Kb(e,r){return pe(In(le(),e),"QQQ",r)}function Xe(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.excludeDateIntervals,s=t.includeDates,l=t.includeDateIntervals,c=t.filterDate;return Or(e,{minDate:n,maxDate:o})||a&&a.some(function(u){return u instanceof Date?re(e,u):re(e,u.date)})||i&&i.some(function(u){var f=u.start,p=u.end;return $r(e,{start:f,end:p})})||s&&!s.some(function(u){return re(e,u)})||l&&!l.some(function(u){var f=u.start,p=u.end;return $r(e,{start:f,end:p})})||c&&!c(le(e))||!1}function ss(e,r){var t=r===void 0?{}:r,n=t.excludeDates,o=t.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return $r(e,{start:i,end:s})}):n&&n.some(function(a){var i;return a instanceof Date?re(e,a):re(e,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Xu(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return Or(e,{minDate:n?Lu(n):void 0,maxDate:o?Fu(o):void 0})||(a==null?void 0:a.some(function(l){return Ne(e,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ne(e,l)})||s&&!s(le(e))||!1}function Kr(e,r,t,n){var o=te(e),a=Le(e),i=te(r),s=Le(r),l=te(n);return o===i&&o===l?a<=t&&t<=s:o<i?l===o&&a<=t||l===i&&s>=t||l<i&&l>o:!1}function Ub(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates;return Or(e,{minDate:n,maxDate:o})||a&&a.some(function(s){return Ne(s instanceof Date?s:s.date,e)})||i&&!i.some(function(s){return Ne(s,e)})||!1}function Ur(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return Or(e,{minDate:n,maxDate:o})||(a==null?void 0:a.some(function(l){return Lo(e,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Lo(e,l)})||s&&!s(le(e))||!1}function Qr(e,r,t){if(!r||!t||!Ro(r)||!Ro(t))return!1;var n=te(r),o=te(t);return n<=e&&o>=e}function mo(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate,l=new Date(e,0,1);return Or(l,{minDate:n?da(n):void 0,maxDate:o?zu(o):void 0})||(a==null?void 0:a.some(function(c){return ft(l,c instanceof Date?c:c.date)}))||i&&!i.some(function(c){return ft(l,c)})||s&&!s(le(l))||!1}function Xr(e,r,t,n){var o=te(e),a=hn(e),i=te(r),s=hn(r),l=te(n);return o===i&&o===l?a<=t&&t<=s:o<i?l===o&&a<=t||l===i&&s>=t||l<i&&l>o:!1}function Or(e,r){var t,n=r===void 0?{}:r,o=n.minDate,a=n.maxDate;return(t=o&&Wn(e,o)<0||a&&Wn(e,a)>0)!==null&&t!==void 0?t:!1}function kl(e,r){return r.some(function(t){return Rt(t)===Rt(e)&&Pt(t)===Pt(e)&&Xt(t)===Xt(e)})}function Cl(e,r){var t=r===void 0?{}:r,n=t.excludeTimes,o=t.includeTimes,a=t.filterTime;return n&&kl(e,n)||o&&!kl(e,o)||a&&!a(e)||!1}function Dl(e,r){var t=r.minTime,n=r.maxTime;if(!t||!n)throw new Error("Both minTime and maxTime props required");var o=le();o=uo(o,Rt(e)),o=fo(o,Pt(e)),o=po(o,Xt(e));var a=le();a=uo(a,Rt(t)),a=fo(a,Pt(t)),a=po(a,Xt(t));var i=le();i=uo(i,Rt(n)),i=fo(i,Pt(n)),i=po(i,Xt(n));var s;try{s=!$r(o,{start:a,end:i})}catch{s=!1}return s}function El(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.includeDates,a=vn(e,1);return n&&Po(n,a)>0||o&&o.every(function(i){return Po(i,a)>0})||!1}function Ml(e,r){var t=r===void 0?{}:r,n=t.maxDate,o=t.includeDates,a=st(e,1);return n&&Po(a,n)>0||o&&o.every(function(i){return Po(a,i)>0})||!1}function Qb(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.includeDates,a=da(e),i=Gu(a);return n&&To(n,i)>0||o&&o.every(function(s){return To(s,i)>0})||!1}function Xb(e,r){var t=r===void 0?{}:r,n=t.maxDate,o=t.includeDates,a=zu(e),i=es(a,1);return n&&To(i,n)>0||o&&o.every(function(s){return To(i,s)>0})||!1}function Rl(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.includeDates,a=Gn(e,1);return n&&Io(n,a)>0||o&&o.every(function(i){return Io(i,a)>0})||!1}function Zb(e,r){var t=r===void 0?{}:r,n=t.minDate,o=t.yearItemNumber,a=o===void 0?Ir:o,i=sr(Gn(e,a)),s=Ct(i,a).endPeriod,l=n&&te(n);return l&&l>s||!1}function Pl(e,r){var t=r===void 0?{}:r,n=t.maxDate,o=t.includeDates,a=Et(e,1);return n&&Io(a,n)>0||o&&o.every(function(i){return Io(a,i)>0})||!1}function Jb(e,r){var t=r===void 0?{}:r,n=t.maxDate,o=t.yearItemNumber,a=o===void 0?Ir:o,i=Et(e,a),s=Ct(i,a).startPeriod,l=n&&te(n);return l&&l<s||!1}function Zu(e){var r=e.minDate,t=e.includeDates;if(t&&r){var n=t.filter(function(o){return Wn(o,r)>=0});return dl(n)}else return t?dl(t):r}function Ju(e){var r=e.maxDate,t=e.includeDates;if(t&&r){var n=t.filter(function(o){return Wn(o,r)<=0});return ul(n)}else return t?ul(t):r}function Tl(e,r){var t;e===void 0&&(e=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var n=new Map,o=0,a=e.length;o<a;o++){var i=e[o];if(Mt(i)){var s=pe(i,"MM.dd.yyyy"),l=n.get(s)||[];l.includes(r)||(l.push(r),n.set(s,l))}else if(typeof i=="object"){var c=Object.keys(i),u=(t=c[0])!==null&&t!==void 0?t:"",f=i[u];if(typeof u=="string"&&Array.isArray(f))for(var p=0,d=f.length;p<d;p++){var g=f[p];if(g){var s=pe(g,"MM.dd.yyyy"),l=n.get(s)||[];l.includes(u)||(l.push(u),n.set(s,l))}}}}return n}function ey(e,r){return e.length!==r.length?!1:e.every(function(t,n){return t===r[n]})}function ty(e,r){e===void 0&&(e=[]),r===void 0&&(r="react-datepicker__day--holidays");var t=new Map;return e.forEach(function(n){var o=n.date,a=n.holidayName;if(Mt(o)){var i=pe(o,"MM.dd.yyyy"),s=t.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&ey(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?vt(vt([],l,!0),[a],!1):[a],t.set(i,s)}}}),t}function ny(e,r,t,n,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=e,c=o[s];c&&(l=Uh(l,Rt(c)),l=gi(l,Pt(c)),l=Zh(l,Xt(c)));var u=gi(e,(t+1)*n);en(l,r)&&ht(l,u)&&c!=null&&i.push(c)}return i}function Il(e){return e<10?"0".concat(e):"".concat(e)}function Ct(e,r){r===void 0&&(r=Ir);var t=Math.ceil(te(e)/r)*r,n=t-(r-1);return{startPeriod:n,endPeriod:t}}function ry(e){var r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+t-+r)/36e5)}function Ol(e){var r=e.getSeconds(),t=e.getMilliseconds();return W(e.getTime()-r*1e3-t)}function oy(e,r){return Ol(e).getTime()===Ol(r).getTime()}function Fl(e){if(!Mt(e))throw new Error("Invalid date");var r=new Date(e);return r.setHours(0,0,0,0),r}function Ha(e,r){if(!Mt(e)||!Mt(r))throw new Error("Invalid date received");var t=Fl(e),n=Fl(r);return ht(t,n)}function ed(e){return e.key===Y.Space}var ay=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;return n.inputRef=h.default.createRef(),n.onTimeChange=function(o){var a,i;n.setState({time:o});var s=n.props.date,l=s instanceof Date&&!isNaN(+s),c=l?s:new Date;if(o!=null&&o.includes(":")){var u=o.split(":"),f=u[0],p=u[1];c.setHours(Number(f)),c.setMinutes(Number(p))}(i=(a=n.props).onChange)===null||i===void 0||i.call(a,c)},n.renderTimeInput=function(){var o=n.state.time,a=n.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?b.cloneElement(l,{date:i,value:o,onChange:n.onTimeChange}):h.default.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var c;(c=n.inputRef.current)===null||c===void 0||c.focus()},required:!0,value:o,onChange:function(c){n.onTimeChange(c.target.value||s)}})},n.state={time:n.props.timeString},n}return r.getDerivedStateFromProps=function(t,n){return t.timeString!==n.time?{time:t.timeString}:null},r.prototype.render=function(){return h.default.createElement("div",{className:"react-datepicker__input-time-container"},h.default.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),h.default.createElement("div",{className:"react-datepicker-time__input-container"},h.default.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r})(b.Component),iy=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dayEl=b.createRef(),t.handleClick=function(n){!t.isDisabled()&&t.props.onClick&&t.props.onClick(n)},t.handleMouseEnter=function(n){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(n)},t.handleOnKeyDown=function(n){var o,a,i=n.key;i===Y.Space&&(n.preventDefault(),n.key=Y.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,n)},t.isSameDay=function(n){return re(t.props.day,n)},t.isKeyboardSelected=function(){var n;if(t.props.disabledKeyboardNavigation)return!1;var o=t.props.selectsMultiple?(n=t.props.selectedDates)===null||n===void 0?void 0:n.some(function(i){return t.isSameDayOrWeek(i)}):t.isSameDayOrWeek(t.props.selected),a=t.props.preSelection&&t.isDisabled(t.props.preSelection);return!o&&t.isSameDayOrWeek(t.props.preSelection)&&!a},t.isDisabled=function(n){return n===void 0&&(n=t.props.day),Xe(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(){return ss(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return re(t.props.day,Zt(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(n){return t.props.showWeekPicker&&re(n,Zt(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(n){return t.isSameDay(n)||t.isSameWeek(n)},t.getHighLightedClass=function(){var n=t.props,o=n.day,a=n.highlightDates;if(!a)return!1;var i=pe(o,"MM.dd.yyyy");return a.get(i)},t.getHolidaysClass=function(){var n,o=t.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=pe(a,"MM.dd.yyyy");return i.has(s)?[(n=i.get(s))===null||n===void 0?void 0:n.className]:[void 0]},t.isInRange=function(){var n=t.props,o=n.day,a=n.startDate,i=n.endDate;return!a||!i?!1:cn(o,a,i)},t.isInSelectingRange=function(){var n,o=t.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,c=o.selectsDisabledDaysInRange,u=o.startDate,f=o.swapRange,p=o.endDate,d=(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection;if(!(i||s||l)||!d||!c&&t.isDisabled())return!1;if(i&&p&&(ht(d,p)||fn(d,p)))return cn(a,d,p);if(s&&u&&(en(d,u)||fn(d,u)))return cn(a,u,d);if(l&&u&&!p){if(fn(d,u)||en(d,u))return cn(a,u,d);if(f&&ht(d,u))return cn(a,d,u)}return!1},t.isSelectingRangeStart=function(){var n;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.startDate,s=o.selectsStart,l=o.swapRange,c=o.selectsRange,u=(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection;return s?re(a,u):c&&l&&i&&u?re(a,ht(u,i)?u:i):re(a,i)},t.isSelectingRangeEnd=function(){var n;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,c=o.swapRange,u=o.startDate,f=(n=t.props.selectingDate)!==null&&n!==void 0?n:t.props.preSelection;return s?re(a,f):l&&c&&u&&f?re(a,ht(f,u)?u:f):l?re(a,f):re(a,i)},t.isRangeStart=function(){var n=t.props,o=n.day,a=n.startDate,i=n.endDate;return!a||!i?!1:re(a,o)},t.isRangeEnd=function(){var n=t.props,o=n.day,a=n.startDate,i=n.endDate;return!a||!i?!1:re(i,o)},t.isWeekend=function(){var n=Qv(t.props.day);return n===0||n===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===Le(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(Le(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(le())},t.isSelected=function(){var n;return t.props.selectsMultiple?(n=t.props.selectedDates)===null||n===void 0?void 0:n.some(function(o){return t.isSameDayOrWeek(o)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(n){var o=t.props.dayClassName?t.props.dayClassName(n):void 0;return Ee("react-datepicker__day",o,"react-datepicker__day--"+Yb(t.props.day),{"react-datepicker__day--disabled":t.isDisabled(),"react-datepicker__day--excluded":t.isExcluded(),"react-datepicker__day--selected":t.isSelected(),"react-datepicker__day--keyboard-selected":t.isKeyboardSelected(),"react-datepicker__day--range-start":t.isRangeStart(),"react-datepicker__day--range-end":t.isRangeEnd(),"react-datepicker__day--in-range":t.isInRange(),"react-datepicker__day--in-selecting-range":t.isInSelectingRange(),"react-datepicker__day--selecting-range-start":t.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":t.isSelectingRangeEnd(),"react-datepicker__day--today":t.isCurrentDay(),"react-datepicker__day--weekend":t.isWeekend(),"react-datepicker__day--outside-month":t.isAfterMonth()||t.isBeforeMonth()},t.getHighLightedClass(),t.getHolidaysClass())},t.getAriaLabel=function(){var n=t.props,o=n.day,a=n.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=n.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,c=t.isDisabled()||t.isExcluded()?l:i;return"".concat(c," ").concat(pe(o,"PPPP",t.props.locale))},t.getTitle=function(){var n=t.props,o=n.day,a=n.holidays,i=a===void 0?new Map:a,s=n.excludeDates,l=pe(o,"MM.dd.yyyy"),c=[];return i.has(l)&&c.push.apply(c,i.get(l).holidayNames),t.isExcluded()&&c.push(s==null?void 0:s.filter(function(u){return u instanceof Date?re(u,o):re(u==null?void 0:u.date,o)}).map(function(u){if(!(u instanceof Date))return u==null?void 0:u.message})),c.join(", ")},t.getTabIndex=function(){var n=t.props.selected,o=t.props.preSelection,a=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(n)&&re(o,n))?0:-1;return a},t.handleFocusDay=function(){var n;t.shouldFocusDay()&&((n=t.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},t.renderDayContents=function(){return t.props.monthShowsDuplicateDaysEnd&&t.isAfterMonth()||t.props.monthShowsDuplicateDaysStart&&t.isBeforeMonth()?null:t.props.renderDayContents?t.props.renderDayContents(_l(t.props.day),t.props.day):_l(t.props.day)},t.render=function(){return h.default.createElement("div",{ref:t.dayEl,className:t.getClassNames(t.props.day),onKeyDown:t.handleOnKeyDown,onClick:t.handleClick,onMouseEnter:t.props.usePointerEvent?void 0:t.handleMouseEnter,onPointerEnter:t.props.usePointerEvent?t.handleMouseEnter:void 0,tabIndex:t.getTabIndex(),"aria-label":t.getAriaLabel(),role:"gridcell",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&h.default.createElement("span",{className:"overlay"},t.getTitle()))},t}return r.prototype.componentDidMount=function(){this.handleFocusDay()},r.prototype.componentDidUpdate=function(){this.handleFocusDay()},r.prototype.shouldFocusDay=function(){var t=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(t=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(t=!1),this.isDayActiveElement()&&(t=!0),this.isDuplicateDay()&&(t=!1)),t},r.prototype.isDayActiveElement=function(){var t,n,o;return((n=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},r.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},r})(b.Component),sy=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.weekNumberEl=b.createRef(),t.handleClick=function(n){t.props.onClick&&t.props.onClick(n)},t.handleOnKeyDown=function(n){var o,a,i=n.key;i===Y.Space&&(n.preventDefault(),n.key=Y.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,n)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!re(t.props.date,t.props.selected)&&re(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||re(t.props.date,t.props.selected)&&re(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(n){var o=!1;t.getTabIndex()===0&&!(n!=null&&n.isInputFocused)&&re(t.props.date,t.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),t.props.inline&&!t.props.shouldFocusDayInline&&(o=!1),t.props.containerRef&&t.props.containerRef.current&&t.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&t.weekNumberEl.current&&t.weekNumberEl.current.focus({preventScroll:!0})},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},r.prototype.componentDidUpdate=function(t){this.handleFocusWeekNumber(t)},r.prototype.render=function(){var t=this.props,n=t.weekNumber,o=t.isWeekDisabled,a=t.ariaLabelPrefix,i=a===void 0?r.defaultProps.ariaLabelPrefix:a,s=t.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!o,"react-datepicker__week-number--selected":!!s&&re(this.props.date,this.props.selected)};return h.default.createElement("div",{ref:this.weekNumberEl,className:Ee(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},n)},r})(b.Component),ly=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDisabled=function(n){return Xe(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.handleDayClick=function(n,o){t.props.onDayClick&&t.props.onDayClick(n,o)},t.handleDayMouseEnter=function(n){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(n)},t.handleWeekClick=function(n,o,a){for(var i,s,l,c=new Date(n),u=0;u<7;u++){var f=new Date(n);f.setDate(f.getDate()+u);var p=!t.isDisabled(f);if(p){c=f;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(c,o,a),t.props.showWeekPicker&&t.handleDayClick(c,a),((i=t.props.shouldCloseOnSelect)!==null&&i!==void 0?i:r.defaultProps.shouldCloseOnSelect)&&((l=(s=t.props).setOpen)===null||l===void 0||l.call(s,!1))},t.formatWeekNumber=function(n){return t.props.formatWeekNumber?t.props.formatWeekNumber(n):Hb(n)},t.isWeekDisabled=function(){for(var n=t.startOfWeek(),o=at(n,6),a=new Date(n);a<=o;){if(!t.isDisabled(a))return!1;a=at(a,1)}return!0},t.renderDays=function(){var n=t.startOfWeek(),o=[],a=t.formatWeekNumber(n);if(t.props.showWeekNumber){var i=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,n,a):void 0;o.push(h.default.createElement(sy,oe({key:"W"},r.defaultProps,t.props,{weekNumber:a,isWeekDisabled:t.isWeekDisabled(),date:n,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=at(n,s);return h.default.createElement(iy,oe({},r.defaultProps,t.props,{ariaLabelPrefixWhenEnabled:t.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:t.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:t.handleDayClick.bind(t,l),onMouseEnter:t.handleDayMouseEnter.bind(t,l)}))}))},t.startOfWeek=function(){return Zt(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!re(t.startOfWeek(),t.props.selected)&&re(t.startOfWeek(),t.props.preSelection)},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var t={"react-datepicker__week":!0,"react-datepicker__week--selected":re(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},n=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return h.default.createElement("div",{className:Ee(t,n),role:"row"},this.renderDays())},r})(b.Component),or,cy=6,Nn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Ya=(or={},or[Nn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},or[Nn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},or[Nn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},or),Zr=1;function Ll(e,r){return e?Nn.FOUR_COLUMNS:r?Nn.TWO_COLUMNS:Nn.THREE_COLUMNS}var uy=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.MONTH_REFS=vt([],Array(12),!0).map(function(){return b.createRef()}),t.QUARTER_REFS=vt([],Array(4),!0).map(function(){return b.createRef()}),t.isDisabled=function(n){return Xe(n,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals,includeDateIntervals:t.props.includeDateIntervals,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(n){return ss(n,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(n,o){var a,i;(i=(a=t.props).onDayClick)===null||i===void 0||i.call(a,n,o,t.props.orderInDisplay)},t.handleDayMouseEnter=function(n){var o,a;(a=(o=t.props).onDayMouseEnter)===null||a===void 0||a.call(o,n)},t.handleMouseLeave=function(){var n,o;(o=(n=t.props).onMouseLeave)===null||o===void 0||o.call(n)},t.isRangeStartMonth=function(n){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ne(Qe(a,n),i)},t.isRangeStartQuarter=function(n){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Lo(In(a,n),i)},t.isRangeEndMonth=function(n){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ne(Qe(a,n),s)},t.isRangeEndQuarter=function(n){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Lo(In(a,n),s)},t.isInSelectingRangeMonth=function(n){var o,a=t.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,c=a.selectsRange,u=a.startDate,f=a.endDate,p=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||l||c)||!p?!1:s&&f?Kr(p,f,n,i):l&&u||c&&u&&!f?Kr(u,p,n,i):!1},t.isSelectingMonthRangeStart=function(n){var o;if(!t.isInSelectingRangeMonth(n))return!1;var a=t.props,i=a.day,s=a.startDate,l=a.selectsStart,c=Qe(i,n),u=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return l?Ne(c,u):Ne(c,s)},t.isSelectingMonthRangeEnd=function(n){var o;if(!t.isInSelectingRangeMonth(n))return!1;var a=t.props,i=a.day,s=a.endDate,l=a.selectsEnd,c=a.selectsRange,u=Qe(i,n),f=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return l||c?Ne(u,f):Ne(u,s)},t.isInSelectingRangeQuarter=function(n){var o,a=t.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,c=a.selectsRange,u=a.startDate,f=a.endDate,p=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||l||c)||!p?!1:s&&f?Xr(p,f,n,i):l&&u||c&&u&&!f?Xr(u,p,n,i):!1},t.isWeekInMonth=function(n){var o=t.props.day,a=at(n,6);return Ne(n,o)||Ne(a,o)},t.isCurrentMonth=function(n,o){return te(n)===te(le())&&o===Le(le())},t.isCurrentQuarter=function(n,o){return te(n)===te(le())&&o===hn(le())},t.isSelectedMonth=function(n,o,a){return Le(a)===o&&te(n)===te(a)},t.isSelectMonthInList=function(n,o,a){return a.some(function(i){return t.isSelectedMonth(n,o,i)})},t.isSelectedQuarter=function(n,o,a){return hn(n)===o&&te(n)===te(a)},t.isMonthSelected=function(){var n=t.props,o=n.day,a=n.selected,i=n.selectedDates,s=n.selectsMultiple,l=Le(o);return s?i==null?void 0:i.some(function(c){return t.isSelectedMonth(o,l,c)}):!!a&&t.isSelectedMonth(o,l,a)},t.renderWeeks=function(){for(var n=[],o=t.props.fixedHeight,a=0,i=!1,s=Zt(Tt(t.props.day),t.props.locale,t.props.calendarStartDay),l=function(g){return t.props.showWeekPicker?Zt(g,t.props.locale,t.props.calendarStartDay):t.props.preSelection},c=function(g){return t.props.showWeekPicker?Zt(g,t.props.locale,t.props.calendarStartDay):t.props.selected},u=t.props.selected?c(t.props.selected):void 0,f=t.props.preSelection?l(t.props.preSelection):void 0;n.push(h.default.createElement(ly,oe({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:a,day:s,month:Le(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:u,preSelection:f,showWeekNumber:t.props.showWeekNumbers}))),!i;){a++,s=Mo(s,1);var p=o&&a>=cy,d=!o&&!t.isWeekInMonth(s);if(p||d)if(t.props.peekNextMonth)i=!0;else break}return n},t.onMonthClick=function(n,o){var a=t.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||t.handleDayClick(Tt(s),n)},t.onMonthMouseEnter=function(n){var o=t.isMonthDisabledForLabelDate(n),a=o.isDisabled,i=o.labelDate;a||t.handleDayMouseEnter(Tt(i))},t.handleMonthNavigation=function(n,o){var a,i,s,l;(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=t.MONTH_REFS[n])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},t.handleKeyboardNavigation=function(n,o,a){var i,s=t.props,l=s.selected,c=s.preSelection,u=s.setPreSelection,f=s.minDate,p=s.maxDate,d=s.showFourColumnMonthYearPicker,g=s.showTwoColumnMonthYearPicker;if(c){var m=Ll(d,g),_=t.getVerticalOffset(m),y=(i=Ya[m])===null||i===void 0?void 0:i.grid,x=function(M,E,P){var F,L,T=E,O=P;switch(M){case Y.ArrowRight:T=st(E,Zr),O=P===11?0:P+Zr;break;case Y.ArrowLeft:T=vn(E,Zr),O=P===0?11:P-Zr;break;case Y.ArrowUp:T=vn(E,_),O=!((F=y==null?void 0:y[0])===null||F===void 0)&&F.includes(P)?P+12-_:P-_;break;case Y.ArrowDown:T=st(E,_),O=!((L=y==null?void 0:y[y.length-1])===null||L===void 0)&&L.includes(P)?P-12+_:P+_;break}return{newCalculatedDate:T,newCalculatedMonth:O}},w=function(M,E,P){for(var F=40,L=M,T=!1,O=0,A=x(L,E,P),N=A.newCalculatedDate,j=A.newCalculatedMonth;!T;){if(O>=F){N=E,j=P;break}if(f&&N<f){L=Y.ArrowRight;var z=x(L,N,j);N=z.newCalculatedDate,j=z.newCalculatedMonth}if(p&&N>p){L=Y.ArrowLeft;var z=x(L,N,j);N=z.newCalculatedDate,j=z.newCalculatedMonth}if(Ub(N,t.props)){var z=x(L,N,j);N=z.newCalculatedDate,j=z.newCalculatedMonth}else T=!0;O++}return{newCalculatedDate:N,newCalculatedMonth:j}};if(o===Y.Enter){t.isMonthDisabled(a)||(t.onMonthClick(n,a),u==null||u(l));return}var $=w(o,c,a),C=$.newCalculatedDate,k=$.newCalculatedMonth;switch(o){case Y.ArrowRight:case Y.ArrowLeft:case Y.ArrowUp:case Y.ArrowDown:t.handleMonthNavigation(k,C);break}}},t.getVerticalOffset=function(n){var o,a;return(a=(o=Ya[n])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},t.onMonthKeyDown=function(n,o){var a=t.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=n.key;l!==Y.Tab&&n.preventDefault(),i||t.handleKeyboardNavigation(n,l,o),s&&s(n)},t.onQuarterClick=function(n,o){var a=In(t.props.day,o);Ur(a,t.props)||t.handleDayClick(xl(a),n)},t.onQuarterMouseEnter=function(n){var o=In(t.props.day,n);Ur(o,t.props)||t.handleDayMouseEnter(xl(o))},t.handleQuarterNavigation=function(n,o){var a,i,s,l;t.isDisabled(o)||t.isExcluded(o)||((i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=t.QUARTER_REFS[n-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},t.onQuarterKeyDown=function(n,o){var a,i,s=n.key;if(!t.props.disabledKeyboardNavigation)switch(s){case Y.Enter:t.onQuarterClick(n,o),(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,t.props.selected);break;case Y.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===4?1:o+1,es(t.props.preSelection,1));break;case Y.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===1?4:o-1,Gu(t.props.preSelection));break}},t.isMonthDisabledForLabelDate=function(n){var o,a=t.props,i=a.day,s=a.minDate,l=a.maxDate,c=a.excludeDates,u=a.includeDates,f=Qe(i,n);return{isDisabled:(o=(s||l||c||u)&&Xu(f,t.props))!==null&&o!==void 0?o:!1,labelDate:f}},t.isMonthDisabled=function(n){var o=t.isMonthDisabledForLabelDate(n).isDisabled;return o},t.getMonthClassNames=function(n){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,c=o.monthClassName,u=c?c(Qe(a,n)):void 0,f=t.getSelection();return Ee("react-datepicker__month-text","react-datepicker__month-".concat(n),u,{"react-datepicker__month-text--disabled":t.isMonthDisabled(n),"react-datepicker__month-text--selected":f?t.isSelectMonthInList(a,n,f):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&l&&t.isSelectedMonth(a,n,l)&&!t.isMonthSelected()&&!t.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":i&&s?Kr(i,s,n,a):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(n),"react-datepicker__month-text--range-end":t.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":t.isCurrentMonth(a,n)})},t.getTabIndex=function(n){if(t.props.preSelection==null)return"-1";var o=Le(t.props.preSelection),a=t.isMonthDisabledForLabelDate(o).isDisabled,i=n===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getQuarterTabIndex=function(n){if(t.props.preSelection==null)return"-1";var o=hn(t.props.preSelection),a=Ur(t.props.day,t.props),i=n===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getAriaLabel=function(n){var o=t.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,c=o.day,u=o.locale,f=Qe(c,n),p=t.isDisabled(f)||t.isExcluded(f)?l:i;return"".concat(p," ").concat(pe(f,"MMMM yyyy",u))},t.getQuarterClassNames=function(n){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,c=o.minDate,u=o.maxDate,f=o.excludeDates,p=o.includeDates,d=o.filterDate,g=o.preSelection,m=o.disabledKeyboardNavigation,_=(c||u||f||p||d)&&Ur(In(a,n),t.props);return Ee("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":_,"react-datepicker__quarter-text--selected":l?t.isSelectedQuarter(a,n,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!m&&g&&t.isSelectedQuarter(a,n,g)&&!_,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":i&&s?Xr(i,s,n,a):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":t.isCurrentQuarter(a,n)})},t.getMonthContent=function(n){var o=t.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,c=Qu(n,s),u=is(n,s);return i?i(n,c,u,l):a?u:c},t.getQuarterContent=function(n){var o,a=t.props,i=a.renderQuarterContent,s=a.locale,l=Kb(n,s);return(o=i==null?void 0:i(n,l))!==null&&o!==void 0?o:l},t.renderMonths=function(){var n,o=t.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,c=(n=Ya[Ll(i,a)])===null||n===void 0?void 0:n.grid;return c==null?void 0:c.map(function(u,f){return h.default.createElement("div",{className:"react-datepicker__month-wrapper",key:f},u.map(function(p,d){return h.default.createElement("div",{ref:t.MONTH_REFS[p],key:d,onClick:function(g){t.onMonthClick(g,p)},onKeyDown:function(g){ed(g)&&(g.preventDefault(),g.key=Y.Enter),t.onMonthKeyDown(g,p)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(p)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(p)}:void 0,tabIndex:Number(t.getTabIndex(p)),className:t.getMonthClassNames(p),"aria-disabled":t.isMonthDisabled(p),role:"option","aria-label":t.getAriaLabel(p),"aria-current":t.isCurrentMonth(s,p)?"date":void 0,"aria-selected":l?t.isSelectedMonth(s,p,l):void 0},t.getMonthContent(p))}))})},t.renderQuarters=function(){var n=t.props,o=n.day,a=n.selected,i=[1,2,3,4];return h.default.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return h.default.createElement("div",{key:l,ref:t.QUARTER_REFS[l],role:"option",onClick:function(c){t.onQuarterClick(c,s)},onKeyDown:function(c){t.onQuarterKeyDown(c,s)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onQuarterMouseEnter(s)},onPointerEnter:t.props.usePointerEvent?function(){return t.onQuarterMouseEnter(s)}:void 0,className:t.getQuarterClassNames(s),"aria-selected":a?t.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(t.getQuarterTabIndex(s)),"aria-current":t.isCurrentQuarter(o,s)?"date":void 0},t.getQuarterContent(s))}))},t.getClassNames=function(){var n=t.props,o=n.selectingDate,a=n.selectsStart,i=n.selectsEnd,s=n.showMonthYearPicker,l=n.showQuarterYearPicker,c=n.showWeekPicker;return Ee("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":c})},t}return r.prototype.getSelection=function(){var t=this.props,n=t.selected,o=t.selectedDates,a=t.selectsMultiple;if(a)return o;if(n)return[n]},r.prototype.render=function(){var t=this.props,n=t.showMonthYearPicker,o=t.showQuarterYearPicker,a=t.day,i=t.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"",c=n||o;return c?h.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(pe(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},n?this.renderMonths():this.renderQuarters()):h.default.createElement("div",{role:"table"},this.props.dayNamesHeader&&h.default.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),h.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(pe(a,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},r})(b.Component),dy=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.monthOptionButtonsRef={},t.isSelectedMonth=function(n){return t.props.month===n},t.handleOptionKeyDown=function(n,o){var a;switch(o.key){case"Enter":o.preventDefault(),t.onChange(n);break;case"Escape":o.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var i=(n+(o.key==="ArrowUp"?-1:1)+t.props.monthNames.length)%t.props.monthNames.length;(a=t.monthOptionButtonsRef[i])===null||a===void 0||a.focus();break}}},t.renderOptions=function(){return t.monthOptionButtonsRef={},t.props.monthNames.map(function(n,o){return h.default.createElement("div",{ref:function(a){t.monthOptionButtonsRef[o]=a,t.isSelectedMonth(o)&&(a==null||a.focus())},role:"button",tabIndex:0,className:t.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:t.onChange.bind(t,o),onKeyDown:t.handleOptionKeyDown.bind(t,o),"aria-selected":t.isSelectedMonth(o)?"true":void 0},t.isSelectedMonth(o)?h.default.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",n)})},t.onChange=function(n){return t.props.onChange(n)},t.handleClickOutside=function(){return t.props.onCancel()},t}return r.prototype.render=function(){return h.default.createElement(fa,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r})(b.Component),fy=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(n){return n.map(function(o,a){return h.default.createElement("option",{key:o,value:a},o)})},t.renderSelectMode=function(n){return h.default.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(o){return t.onChange(parseInt(o.target.value))}},t.renderSelectOptions(n))},t.renderReadView=function(n,o){return h.default.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},h.default.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),h.default.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[t.props.month]))},t.renderDropdown=function(n){return h.default.createElement(dy,oe({key:"dropdown"},t.props,{monthNames:n,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(n){var o=t.state.dropdownVisible,a=[t.renderReadView(!o,n)];return o&&a.unshift(t.renderDropdown(n)),a},t.onChange=function(n){t.toggleDropdown(),n!==t.props.month&&t.props.onChange(n)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return r.prototype.render=function(){var t=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return Qu(a,t.props.locale)}:function(a){return is(a,t.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(n);break;case"select":o=this.renderSelectMode(n);break}return h.default.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r})(b.Component);function py(e,r){for(var t=[],n=Tt(e),o=Tt(r);!en(n,o);)t.push(le(n)),n=st(n,1);return t}var gy=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(o){var a=vi(o),i=ft(n.props.date,o)&&Ne(n.props.date,o);return h.default.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:n.onChange.bind(n,a),"aria-selected":i?"true":void 0},i?h.default.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",pe(o,n.props.dateFormat,n.props.locale))})},n.onChange=function(o){return n.props.onChange(o)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:py(n.props.minDate,n.props.maxDate)},n}return r.prototype.render=function(){var t=Ee({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return h.default.createElement(fa,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},r})(b.Component),my=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var n=Tt(t.props.minDate),o=Tt(t.props.maxDate),a=[];!en(n,o);){var i=vi(n);a.push(h.default.createElement("option",{key:i,value:i},pe(n,t.props.dateFormat,t.props.locale))),n=st(n,1)}return a},t.onSelectChange=function(n){t.onChange(parseInt(n.target.value))},t.renderSelectMode=function(){return h.default.createElement("select",{value:vi(Tt(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(n){var o=pe(t.props.date,t.props.dateFormat,t.props.locale);return h.default.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},h.default.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),h.default.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},t.renderDropdown=function(){return h.default.createElement(gy,oe({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var n=t.state.dropdownVisible,o=[t.renderReadView(!n)];return n&&o.unshift(t.renderDropdown()),o},t.onChange=function(n){t.toggleDropdown();var o=le(n);ft(t.props.date,o)&&Ne(t.props.date,o)||t.props.onChange(o)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return r.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return h.default.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},r})(b.Component),hy=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,o,a;t.list&&(t.list.scrollTop=(a=t.centerLi&&r.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((o=(n=t.header)===null||n===void 0?void 0:n.clientHeight)!==null&&o!==void 0?o:0):t.list.clientHeight,t.centerLi))!==null&&a!==void 0?a:0)})},t.handleClick=function(n){var o,a;(t.props.minTime||t.props.maxTime)&&Dl(n,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Cl(n,t.props)||(a=(o=t.props).onChange)===null||a===void 0||a.call(o,n)},t.isSelectedTime=function(n){return t.props.selected&&oy(t.props.selected,n)},t.isDisabledTime=function(n){return(t.props.minTime||t.props.maxTime)&&Dl(n,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&Cl(n,t.props)},t.liClasses=function(n){var o,a=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(n):void 0];return t.isSelectedTime(n)&&a.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(n)&&a.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(Rt(n)*3600+Pt(n)*60+Xt(n))%(((o=t.props.intervals)!==null&&o!==void 0?o:r.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},t.handleOnKeyDown=function(n,o){var a,i;n.key===Y.Space&&(n.preventDefault(),n.key=Y.Enter),(n.key===Y.ArrowUp||n.key===Y.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===Y.ArrowDown||n.key===Y.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===Y.Enter&&t.handleClick(o),(i=(a=t.props).handleOnKeyDown)===null||i===void 0||i.call(a,n)},t.renderTimes=function(){for(var n,o=[],a=typeof t.props.format=="string"?t.props.format:"p",i=(n=t.props.intervals)!==null&&n!==void 0?n:r.defaultProps.intervals,s=t.props.selected||t.props.openToDate||le(),l=go(s),c=t.props.injectTimes&&t.props.injectTimes.sort(function(_,y){return _.getTime()-y.getTime()}),u=60*ry(s),f=u/i,p=0;p<f;p++){var d=gi(l,p*i);if(o.push(d),c){var g=ny(l,d,p,i,c);o=o.concat(g)}}var m=o.reduce(function(_,y){return y.getTime()<=s.getTime()?y:_},o[0]);return o.map(function(_){return h.default.createElement("li",{key:_.valueOf(),onClick:t.handleClick.bind(t,_),className:t.liClasses(_),ref:function(y){_===m&&(t.centerLi=y)},onKeyDown:function(y){t.handleOnKeyDown(y,_)},tabIndex:_===m?0:-1,role:"option","aria-selected":t.isSelectedTime(_)?"true":void 0,"aria-disabled":t.isDisabledTime(_)?"true":void 0},pe(_,a,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?h.default.createElement(h.default.Fragment,null):h.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){t.header=n}},h.default.createElement("div",{className:"react-datepicker-time__header"},t.props.timeCaption))},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},r.prototype.componentWillUnmount=function(){var t;(t=this.resizeObserver)===null||t===void 0||t.disconnect()},r.prototype.observeDatePickerHeightChanges=function(){var t=this,n=this.props.monthRef;this.updateContainerHeight(),n&&(this.resizeObserver=new ResizeObserver(function(){t.updateContainerHeight()}),this.resizeObserver.observe(n))},r.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},r.prototype.render=function(){var t=this,n,o=this.state.height;return h.default.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:r.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),h.default.createElement("div",{className:"react-datepicker__time"},h.default.createElement("div",{className:"react-datepicker__time-box"},h.default.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){t.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},r.calcCenterPosition=function(t,n){return n.offsetTop-(t/2-n.clientHeight/2)},r})(b.Component),zl=3,vy=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;return n.YEAR_REFS=vt([],Array(n.props.yearItemNumber),!0).map(function(){return b.createRef()}),n.isDisabled=function(o){return Xe(o,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(o){return ss(o,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var o;return(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection},n.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=n.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},n.handleYearClick=function(o,a){n.props.onDayClick&&n.props.onDayClick(o,a)},n.handleYearNavigation=function(o,a){var i,s,l,c,u=n.props,f=u.date,p=u.yearItemNumber;if(!(f===void 0||p===void 0)){var d=Ct(f,p).startPeriod;n.isDisabled(a)||n.isExcluded(a)||((s=(i=n.props).setPreSelection)===null||s===void 0||s.call(i,a),o-d<0?n.updateFocusOnPaginate(p-(d-o)):o-d>=p?n.updateFocusOnPaginate(Math.abs(p-(o-d))):(c=(l=n.YEAR_REFS[o-d])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())}},n.isSameDay=function(o,a){return re(o,a)},n.isCurrentYear=function(o){return o===te(le())},n.isRangeStart=function(o){return n.props.startDate&&n.props.endDate&&ft(dt(le(),o),n.props.startDate)},n.isRangeEnd=function(o){return n.props.startDate&&n.props.endDate&&ft(dt(le(),o),n.props.endDate)},n.isInRange=function(o){return Qr(o,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(o){var a=n.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,c=a.startDate,u=a.endDate;return!(i||s||l)||!n.selectingDate()?!1:i&&u?Qr(o,n.selectingDate(),u):s&&c||l&&c&&!u?Qr(o,c,n.selectingDate()):!1},n.isSelectingRangeStart=function(o){var a;if(!n.isInSelectingRange(o))return!1;var i=n.props,s=i.startDate,l=i.selectsStart,c=dt(le(),o);return l?ft(c,(a=n.selectingDate())!==null&&a!==void 0?a:null):ft(c,s??null)},n.isSelectingRangeEnd=function(o){var a;if(!n.isInSelectingRange(o))return!1;var i=n.props,s=i.endDate,l=i.selectsEnd,c=i.selectsRange,u=dt(le(),o);return l||c?ft(u,(a=n.selectingDate())!==null&&a!==void 0?a:null):ft(u,s??null)},n.isKeyboardSelected=function(o){if(!(n.props.disabledKeyboardNavigation||n.props.date===void 0||n.props.preSelection==null)){var a=n.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,c=a.includeDates,u=a.filterDate,f=a.selected,p=sr(dt(n.props.date,o)),d=(i||s||l||c||u)&&mo(o,n.props),g=!!f&&re(p,sr(f)),m=re(p,sr(n.props.preSelection));return!n.props.inline&&!g&&m&&!d}},n.isSelectedYear=function(o){var a=n.props,i=a.selectsMultiple,s=a.selected,l=a.selectedDates;return i?l==null?void 0:l.some(function(c){return o===te(c)}):!!s&&o===te(s)},n.onYearClick=function(o,a){var i=n.props.date;i!==void 0&&n.handleYearClick(sr(dt(i,a)),o)},n.onYearKeyDown=function(o,a){var i,s,l=o.key,c=n.props,u=c.date,f=c.yearItemNumber,p=c.handleOnKeyDown;if(l!==Y.Tab&&o.preventDefault(),!n.props.disabledKeyboardNavigation)switch(l){case Y.Enter:if(n.props.selected==null)break;n.onYearClick(o,a),(s=(i=n.props).setPreSelection)===null||s===void 0||s.call(i,n.props.selected);break;case Y.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(a+1,Et(n.props.preSelection,1));break;case Y.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(a-1,Gn(n.props.preSelection,1));break;case Y.ArrowUp:{if(u===void 0||f===void 0||n.props.preSelection==null)break;var d=Ct(u,f).startPeriod,g=zl,m=a-g;if(m<d){var _=f%g;a>=d&&a<d+_?g=_:g+=_,m=a-g}n.handleYearNavigation(m,Gn(n.props.preSelection,g));break}case Y.ArrowDown:{if(u===void 0||f===void 0||n.props.preSelection==null)break;var y=Ct(u,f).endPeriod,g=zl,m=a+g;if(m>y){var _=f%g;a<=y&&a>y-_?g=_:g+=_,m=a+g}n.handleYearNavigation(m,Et(n.props.preSelection,g));break}}p&&p(o)},n.getYearClassNames=function(o){var a=n.props,i=a.date,s=a.minDate,l=a.maxDate,c=a.excludeDates,u=a.includeDates,f=a.filterDate,p=a.yearClassName;return Ee("react-datepicker__year-text","react-datepicker__year-".concat(o),i?p==null?void 0:p(dt(i,o)):void 0,{"react-datepicker__year-text--selected":n.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||c||u||f)&&mo(o,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(o),"react-datepicker__year-text--range-start":n.isRangeStart(o),"react-datepicker__year-text--range-end":n.isRangeEnd(o),"react-datepicker__year-text--in-range":n.isInRange(o),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(o),"react-datepicker__year-text--today":n.isCurrentYear(o)})},n.getYearTabIndex=function(o){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var a=te(n.props.preSelection),i=mo(o,n.props);return o===a&&!i?"0":"-1"},n.getYearContent=function(o){return n.props.renderYearContent?n.props.renderYearContent(o):o},n}return r.prototype.render=function(){var t=this,n=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,l=o.onYearMouseLeave;if(a===void 0)return null;for(var c=Ct(a,i),u=c.startPeriod,f=c.endPeriod,p=function(m){n.push(h.default.createElement("div",{ref:d.YEAR_REFS[m-u],onClick:function(_){t.onYearClick(_,m)},onKeyDown:function(_){ed(_)&&(_.preventDefault(),_.key=Y.Enter),t.onYearKeyDown(_,m)},tabIndex:Number(d.getYearTabIndex(m)),className:d.getYearClassNames(m),onMouseEnter:d.props.usePointerEvent?void 0:function(_){return s(_,m)},onPointerEnter:d.props.usePointerEvent?function(_){return s(_,m)}:void 0,onMouseLeave:d.props.usePointerEvent?void 0:function(_){return l(_,m)},onPointerLeave:d.props.usePointerEvent?function(_){return l(_,m)}:void 0,key:m,"aria-current":d.isCurrentYear(m)?"date":void 0},d.getYearContent(m)))},d=this,g=u;g<=f;g++)p(g);return h.default.createElement("div",{className:"react-datepicker__year"},h.default.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},n))},r})(b.Component);function _y(e,r,t,n){for(var o=[],a=0;a<2*r+1;a++){var i=e+r-a,s=!0;t&&(s=te(t)<=i),n&&s&&(s=te(n)>=i),s&&o.push(i)}return o}var by=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;n.yearOptionButtonsRef={},n.handleOptionKeyDown=function(s,l){var c;switch(l.key){case"Enter":l.preventDefault(),n.onChange(s);break;case"Escape":l.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{l.preventDefault();var u=s+(l.key==="ArrowUp"?1:-1);n.yearOptionButtonsRef[u]&&((c=n.yearOptionButtonsRef[u])===null||c===void 0||c.focus());break}}},n.renderOptions=function(){n.yearOptionButtonsRef={};var s=n.props.year,l=n.state.yearsList.map(function(f){return h.default.createElement("div",{ref:function(p){n.yearOptionButtonsRef[f]=p,f===s&&(p==null||p.focus())},role:"button",tabIndex:0,className:s===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:n.onChange.bind(n,f),onKeyDown:n.handleOptionKeyDown.bind(n,f),"aria-selected":s===f?"true":void 0},s===f?h.default.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),c=n.props.minDate?te(n.props.minDate):null,u=n.props.maxDate?te(n.props.maxDate):null;return(!u||!n.state.yearsList.find(function(f){return f===u}))&&l.unshift(h.default.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},h.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!c||!n.state.yearsList.find(function(f){return f===c}))&&l.push(h.default.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},h.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},n.onChange=function(s){n.props.onChange(s)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(s){var l=n.state.yearsList.map(function(c){return c+s});n.setState({yearsList:l})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var o=t.yearDropdownItemNumber,a=t.scrollableYearDropdown,i=o||(a?10:5);return n.state={yearsList:_y(n.props.year,i,n.props.minDate,n.props.maxDate)},n.dropdownRef=b.createRef(),n}return r.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var n=t.children?Array.from(t.children):null,o=n?n.find(function(a){return a.ariaSelected}):null;t.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-t.clientHeight)/2:(t.scrollHeight-t.clientHeight)/2}},r.prototype.render=function(){var t=Ee({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return h.default.createElement(fa,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r})(b.Component),yy=(function(e){Re(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var n=t.props.minDate?te(t.props.minDate):1900,o=t.props.maxDate?te(t.props.maxDate):2100,a=[],i=n;i<=o;i++)a.push(h.default.createElement("option",{key:i,value:i},i));return a},t.onSelectChange=function(n){t.onChange(parseInt(n.target.value))},t.renderSelectMode=function(){return h.default.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(n){return h.default.createElement("button",{key:"read",type:"button",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:t.toggleDropdown},h.default.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),h.default.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return h.default.createElement(by,oe({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var n=t.state.dropdownVisible,o=[t.renderReadView(!n)];return n&&o.unshift(t.renderDropdown()),o},t.onChange=function(n){t.toggleDropdown(),n!==t.props.year&&t.props.onChange(n)},t.toggleDropdown=function(n){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,n)})},t.handleYearChange=function(n,o){var a;(a=t.onSelect)===null||a===void 0||a.call(t,n,o),t.setOpen()},t.onSelect=function(n,o){var a,i;(i=(a=t.props).onSelect)===null||i===void 0||i.call(a,n,o)},t.setOpen=function(){var n,o;(o=(n=t.props).setOpen)===null||o===void 0||o.call(n,!0)},t}return r.prototype.render=function(){var t;switch(this.props.dropdownMode){case"scroll":t=this.renderScrollMode();break;case"select":t=this.renderSelectMode();break}return h.default.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},r})(b.Component),wy=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],td="react-datepicker-ignore-onclickoutside",xy=function(e){var r=(e.className||"").split(/\s+/);return wy.some(function(t){return r.indexOf(t)>=0})},Sy=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;return n.monthContainer=void 0,n.handleClickOutside=function(o){n.props.onClickOutside(o)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(o){var a,i;xy(o.target)&&((i=(a=n.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},n.getDateInView=function(){var o=n.props,a=o.preSelection,i=o.selected,s=o.openToDate,l=Zu(n.props),c=Ju(n.props),u=le(),f=s||i||a;return f||(l&&ht(u,l)?l:c&&en(u,c)?c:u)},n.increaseMonth=function(){n.setState(function(o){var a=o.date;return{date:st(a,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(o){var a=o.date;return{date:vn(a,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(o,a,i){n.props.onSelect(o,a,i),n.props.setPreSelection&&n.props.setPreSelection(o)},n.handleDayMouseEnter=function(o){n.setState({selectingDate:o}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(o)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(o,a){n.setState({selectingDate:dt(le(),a)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(o,a)},n.handleYearMouseLeave=function(o,a){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(o,a)},n.handleYearChange=function(o){var a,i,s,l;(i=(a=n.props).onYearChange)===null||i===void 0||i.call(a,o),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(o),(l=(s=n.props).setOpen)===null||l===void 0||l.call(s,!0)),n.props.setPreSelection&&n.props.setPreSelection(o)},n.getEnabledPreSelectionDateForMonth=function(o){if(!Xe(o,n.props))return o;for(var a=Tt(o),i=Bb(o),s=ev(i,a),l=null,c=0;c<=s;c++){var u=at(a,c);if(!Xe(u,n.props)){l=u;break}}return l},n.handleMonthChange=function(o){var a,i,s,l=(a=n.getEnabledPreSelectionDateForMonth(o))!==null&&a!==void 0?a:o;n.handleCustomMonthChange(l),n.props.adjustDateOnChange&&(n.props.onSelect(l),(s=(i=n.props).setOpen)===null||s===void 0||s.call(i,!0)),n.props.setPreSelection&&n.props.setPreSelection(l)},n.handleCustomMonthChange=function(o){var a,i;(i=(a=n.props).onMonthChange)===null||i===void 0||i.call(a,o),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(o){n.handleYearChange(o),n.handleMonthChange(o)},n.changeYear=function(o){n.setState(function(a){var i=a.date;return{date:dt(i,Number(o))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(o){n.setState(function(a){var i=a.date;return{date:Qe(i,Number(o))}},function(){return n.handleMonthChange(n.state.date)})},n.changeMonthYear=function(o){n.setState(function(a){var i=a.date;return{date:dt(Qe(i,Le(o)),te(o))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(o){o===void 0&&(o=n.state.date);var a=Zt(o,n.props.locale,n.props.calendarStartDay),i=[];return n.props.showWeekNumbers&&i.push(h.default.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},h.default.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),h.default.createElement("span",{"aria-hidden":"true"},n.props.weekLabel||"#"))),i.concat([0,1,2,3,4,5,6].map(function(s){var l=at(a,s),c=n.formatWeekday(l,n.props.locale),u=n.props.weekDayClassName?n.props.weekDayClassName(l):void 0;return h.default.createElement("div",{key:s,role:"columnheader",className:Ee("react-datepicker__day-name",u)},h.default.createElement("span",{className:"react-datepicker__sr-only"},pe(l,"EEEE",n.props.locale)),h.default.createElement("span",{"aria-hidden":"true"},c))}))},n.formatWeekday=function(o,a){return n.props.formatWeekDay?Wb(o,n.props.formatWeekDay,a):n.props.useWeekdaysShort?qb(o,a):Gb(o,a)},n.decreaseYear=function(){n.setState(function(o){var a,i=o.date;return{date:Gn(i,n.props.showYearPicker?(a=n.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var o,a,i;if(!n.props.renderCustomHeader){var s=(o=n.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=n.props.showPreviousMonths?s-1:0,c=(a=n.props.monthSelectedIn)!==null&&a!==void 0?a:l,u=vn(n.state.date,c),f;switch(!0){case n.props.showMonthYearPicker:f=Rl(n.state.date,n.props);break;case n.props.showYearPicker:f=Zb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=Qb(n.state.date,n.props);break;default:f=El(u,n.props);break}if(!(!((i=n.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&f||n.props.showTimeSelectOnly)){var p=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],d=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(g=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(d.push("react-datepicker__navigation--previous--disabled"),g=void 0);var m=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,_=n.props,y=_.previousMonthButtonLabel,x=y===void 0?r.defaultProps.previousMonthButtonLabel:y,w=_.previousYearButtonLabel,$=w===void 0?r.defaultProps.previousYearButtonLabel:w,C=n.props,k=C.previousMonthAriaLabel,M=k===void 0?typeof x=="string"?x:"Previous Month":k,E=C.previousYearAriaLabel,P=E===void 0?typeof $=="string"?$:"Previous Year":E;return h.default.createElement("button",{type:"button",className:d.join(" "),onClick:g,onKeyDown:n.props.handleOnKeyDown,"aria-label":m?P:M},h.default.createElement("span",{className:p.join(" ")},m?$:x))}}},n.increaseYear=function(){n.setState(function(o){var a,i=o.date;return{date:Et(i,n.props.showYearPicker?(a=n.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var o;if(!n.props.renderCustomHeader){var a;switch(!0){case n.props.showMonthYearPicker:a=Pl(n.state.date,n.props);break;case n.props.showYearPicker:a=Jb(n.state.date,n.props);break;case n.props.showQuarterYearPicker:a=Xb(n.state.date,n.props);break;default:a=Ml(n.state.date,n.props);break}if(!(!((o=n.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&a||n.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(l=n.increaseYear),a&&n.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var c=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,u=n.props,f=u.nextMonthButtonLabel,p=f===void 0?r.defaultProps.nextMonthButtonLabel:f,d=u.nextYearButtonLabel,g=d===void 0?r.defaultProps.nextYearButtonLabel:d,m=n.props,_=m.nextMonthAriaLabel,y=_===void 0?typeof p=="string"?p:"Next Month":_,x=m.nextYearAriaLabel,w=x===void 0?typeof g=="string"?g:"Next Year":x;return h.default.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:n.props.handleOnKeyDown,"aria-label":c?w:y},h.default.createElement("span",{className:s.join(" ")},c?g:p))}}},n.renderCurrentMonth=function(o){o===void 0&&(o=n.state.date);var a=["react-datepicker__current-month"];return n.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),h.default.createElement("h2",{className:a.join(" ")},pe(o,n.props.dateFormat,n.props.locale))},n.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showYearDropdown||o))return h.default.createElement(yy,oe({},r.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:te(n.state.date)}))},n.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthDropdown||o))return h.default.createElement(fy,oe({},r.defaultProps,n.props,{month:Le(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!n.props.showMonthYearDropdown||o))return h.default.createElement(my,oe({},r.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(o){n.props.onSelect(Sl(),o),n.props.setPreSelection&&n.props.setPreSelection(Sl())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return h.default.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDayNamesHeader=function(o){return h.default.createElement("div",{className:"react-datepicker__day-names",role:"row"},n.header(o))},n.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return h.default.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(a),h.default.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(i!==0),n.renderMonthYearDropdown(i!==0),n.renderYearDropdown(i!==0)))},n.renderCustomHeader=function(o){var a,i,s=o.monthDate,l=o.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var c=n.props,u=c.showYearPicker,f=c.yearItemNumber,p;if(u){var d=Ct(s,f),g=d.startPeriod,m=d.endPeriod;p={startYear:g,endYear:m}}var _=El(n.state.date,n.props),y=Ml(n.state.date,n.props),x=Rl(n.state.date,n.props),w=Pl(n.state.date,n.props);return h.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(i=(a=n.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,oe(oe(oe({},n.state),u&&{visibleYearsRange:p}),{customHeaderCount:l,monthDate:s,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:_,nextMonthButtonDisabled:y,prevYearButtonDisabled:x,nextYearButtonDisabled:w})))},n.renderYearHeader=function(o){var a=o.monthDate,i=n.props,s=i.showYearPicker,l=i.yearItemNumber,c=l===void 0?r.defaultProps.yearItemNumber:l,u=Ct(a,c),f=u.startPeriod,p=u.endPeriod;return h.default.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(p):te(a))},n.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,l={monthDate:a,i:s};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(l);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(l);default:return n.renderDefaultHeader(l)}},n.renderMonths=function(){var o,a;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var i=[],s=(o=n.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=n.props.showPreviousMonths?s-1:0,c=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?Et(n.state.date,l):vn(n.state.date,l),u=(a=n.props.monthSelectedIn)!==null&&a!==void 0?a:l,f=0;f<s;++f){var p=f-u+l,d=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?Et(c,p):st(c,p),g="month-".concat(f),m=f<s-1,_=f>0;i.push(h.default.createElement("div",{key:g,ref:function(y){n.monthContainer=y??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:d,i:f}),h.default.createElement(uy,oe({},r.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:d,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:m,monthShowsDuplicateDaysStart:_,dayNamesHeader:n.renderDayNamesHeader(d)}))))}return i}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return h.default.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),h.default.createElement(vy,oe({},r.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return h.default.createElement(hy,oe({},r.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var o=n.props.selected?new Date(n.props.selected):void 0,a=o&&pa(o)&&!!n.props.selected,i=a?"".concat(Il(o.getHours()),":").concat(Il(o.getMinutes())):"";if(n.props.showTimeInput)return h.default.createElement(ay,oe({},r.defaultProps,n.props,{date:o,timeString:i,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var o,a=Ct(n.state.date,(o=n.props.yearItemNumber)!==null&&o!==void 0?o:r.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,l;return n.props.showYearPicker?l="".concat(i," - ").concat(s):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?l=te(n.state.date):l="".concat(is(Le(n.state.date),n.props.locale)," ").concat(te(n.state.date)),h.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},n.state.isRenderAriaLiveMessage&&l)},n.renderChildren=function(){if(n.props.children)return h.default.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=b.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(r,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:td,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Ir}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){var t=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){t.setState({monthContainer:t.monthContainer})})())},r.prototype.componentDidUpdate=function(t){var n=this;if(this.props.preSelection&&(!re(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var o=!Ne(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!re(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var t=this.props.container||zb;return h.default.createElement(fa,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},h.default.createElement("div",{style:{display:"contents"},ref:this.containerRef},h.default.createElement(t,{className:Ee("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},r})(b.Component),$y=function(e){var r=e.icon,t=e.className,n=t===void 0?"":t,o=e.onClick,a="react-datepicker__calendar-icon";if(typeof r=="string")return h.default.createElement("i",{className:"".concat(a," ").concat(r," ").concat(n),"aria-hidden":"true",onClick:o});if(h.default.isValidElement(r)){var i=r;return h.default.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(a," ").concat(n),onClick:function(s){typeof i.props.onClick=="function"&&i.props.onClick(s),typeof o=="function"&&o(s)}})}return h.default.createElement("svg",{className:"".concat(a," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},h.default.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},nd=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return r.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},r.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},r.prototype.render=function(){return jn.default.createPortal(this.props.children,this.el)},r})(b.Component),ky="[tabindex], a, button, input, select, textarea",Cy=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},rd=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;return n.getTabChildren=function(){var o;return Array.prototype.slice.call((o=n.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(ky),1,-1).filter(Cy)},n.handleFocusStart=function(){var o=n.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},n.handleFocusEnd=function(){var o=n.getTabChildren();o&&o.length>1&&o[0].focus()},n.tabLoopRef=b.createRef(),n}return r.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:r.defaultProps.enableTabLoop)?h.default.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},h.default.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,h.default.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r})(b.Component);function Dy(e){function r(t){var n,o=typeof t.hidePopper=="boolean"?t.hidePopper:!0,a=b.useRef(null),i=Lb(oe({open:!o,whileElementsMounted:Rr,placement:t.popperPlacement,middleware:vt([Pr({padding:15}),Xn(10),eu({element:a})],(n=t.popperModifiers)!==null&&n!==void 0?n:[],!0)},t.popperProps)),s=oe(oe({},t),{hidePopper:o,popperProps:oe(oe({},i),{arrowRef:a})});return h.default.createElement(e,oe({},s))}return r.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),r}var Ey=function(e){var r=e.className,t=e.wrapperClassName,n=e.hidePopper,o=n===void 0?!0:n,a=e.popperComponent,i=e.targetComponent,s=e.enableTabLoop,l=e.popperOnKeyDown,c=e.portalId,u=e.portalHost,f=e.popperProps,p=e.showArrow,d=void 0;if(!o){var g=Ee("react-datepicker-popper",r);d=h.default.createElement(rd,{enableTabLoop:s},h.default.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:g,"data-placement":f.placement,onKeyDown:l},a,p&&h.default.createElement(Mb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(d=b.createElement(e.popperContainer,{},d)),c&&!o&&(d=h.default.createElement(nd,{portalId:c,portalHost:u},d));var m=Ee("react-datepicker-wrapper",t);return h.default.createElement(h.default.Fragment,null,h.default.createElement("div",{ref:f.refs.setReference,className:m},i),d)},My=Dy(Ey);function Ry(e,r){return e&&r?Le(e)!==Le(r)||te(e)!==te(r):e!==r}var Va="Date input not valid.",Py=(function(e){Re(r,e);function r(t){var n=e.call(this,t)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){return n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:le()},n.modifyHolidays=function(){var o;return(o=n.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return pa(s)?vt(vt([],a,!0),[oe(oe({},i),{date:s})],!1):a},[])},n.calcInitialState=function(){var o,a=n.getPreSelection(),i=Zu(n.props),s=Ju(n.props),l=i&&ht(a,go(i))?i:s&&en(a,$l(s))?s:a;return{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=n.props.selectsRange?n.props.startDate:n.props.selected)!==null&&o!==void 0?o:l,highlightDates:Tl(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.getInputValue=function(){var o,a=n.props,i=a.locale,s=a.startDate,l=a.endDate,c=a.rangeSeparator,u=a.selected,f=a.selectedDates,p=a.selectsMultiple,d=a.selectsRange,g=a.value,m=(o=n.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,_=n.state.inputValue;return typeof g=="string"?g:typeof _=="string"?_:d?Ab(s,l,{dateFormat:m,locale:i,rangeSeparator:c}):p?jb(f??[],{dateFormat:m,locale:i}):Ue(u,{dateFormat:m,locale:i})},n.resetHiddenStatus=function(){n.setState(oe(oe({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(oe(oe({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var o,a;(a=(o=n.input)===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o,{preventScroll:!0})},n.setBlur=function(){var o,a;(a=(o=n.input)===null||o===void 0?void 0:o.blur)===null||a===void 0||a.call(o),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(o,a){a===void 0&&(a=!1),n.setState({open:o,preSelection:o&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:Ba},function(){o||n.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return Mt(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(o){var a,i,s=n.state.wasHidden,l=s?n.state.open:!0;s&&n.resetHiddenStatus(),n.state.preventFocus||((i=(a=n.props).onFocus)===null||i===void 0||i.call(a,o),l&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})},n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.resetInputValue=function(){n.setState(oe(oe({},n.state),{inputValue:null}))},n.handleBlur=function(o){var a,i;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((i=(a=n.props).onBlur)===null||i===void 0||i.call(a,o)),n.resetInputValue(),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(o){var a,i;n.props.inline||n.setOpen(!1),(i=(a=n.props).onClickOutside)===null||i===void 0||i.call(a,o),n.props.withPortal&&o.preventDefault()},n.handleChange=function(){for(var o,a,i,s,l,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var f=c[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,c),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:Ty});var p=n.props,d=p.selectsRange,g=p.startDate,m=p.endDate,_=(o=n.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,y=(a=n.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,x=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(d){var w=n.props.rangeSeparator,$=w.trim(),C=x.split(_.includes($)?w:$,2).map(function(O){return O.trim()}),k=C[0],M=C[1],E=Aa(k??"",_,n.props.locale,y),P=E?Aa(M??"",_,n.props.locale,y):null,F=(g==null?void 0:g.getTime())!==(E==null?void 0:E.getTime()),L=(m==null?void 0:m.getTime())!==(P==null?void 0:P.getTime());if(!F&&!L||E&&Xe(E,n.props)||P&&Xe(P,n.props))return;(s=(i=n.props).onChange)===null||s===void 0||s.call(i,[E,P],f)}else{var T=Aa(x,_,n.props.locale,y,(l=n.props.selected)!==null&&l!==void 0?l:void 0);(T||!x)&&n.setSelected(T,f,!0)}}},n.handleSelect=function(o,a,i){if(!n.props.readOnly){var s=n.props,l=s.selectsRange,c=s.startDate,u=s.endDate,f=s.swapRange,p=!l||c&&!u&&(f||!Ha(o,c));n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&p&&n.sendFocusBackToInput(),n.props.onChangeRaw&&n.props.onChangeRaw(a),n.setSelected(o,a,!1,i),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect?n.setPreSelection(o):p&&n.setOpen(!1)}},n.setSelected=function(o,a,i,s){var l,c,u=o;if(n.props.showYearPicker){if(u!==null&&mo(te(u),n.props))return}else if(n.props.showMonthYearPicker){if(u!==null&&Xu(u,n.props))return}else if(u!==null&&Xe(u,n.props))return;var f=n.props,p=f.onChange,d=f.selectsRange,g=f.startDate,m=f.endDate,_=f.selectsMultiple,y=f.selectedDates,x=f.minTime,w=f.swapRange;if(!fn(n.props.selected,u)||n.props.allowSameDay||d||_)if(u!==null&&(n.props.selected&&(!i||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(u=ja(u,{hour:Rt(n.props.selected),minute:Pt(n.props.selected),second:Xt(n.props.selected)})),!i&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&x&&(u=ja(u,{hour:x.getHours(),minute:x.getMinutes(),second:x.getSeconds()})),n.props.inline||n.setState({preSelection:u}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:s})),d){var $=!g&&!m,C=g&&!m,k=!g&&!!m,M=g&&m;$?p==null||p([u,null],a):C?u===null?p==null||p([null,null],a):Ha(u,g)?w?p==null||p([u,g],a):p==null||p([u,null],a):p==null||p([g,u],a):k&&(u&&Ha(u,m)?p==null||p([u,m],a):p==null||p([u,null],a)),M&&(p==null||p([u,null],a))}else if(_){if(u!==null)if(!(y!=null&&y.length))p==null||p([u],a);else{var E=y.some(function(F){return re(F,u)});if(E){var P=y.filter(function(F){return!re(F,u)});p==null||p(P,a)}else p==null||p(vt(vt([],y,!0),[u],!1),a)}}else p==null||p(u,a);i||((c=(l=n.props).onSelect)===null||c===void 0||c.call(l,u,a),n.setState({inputValue:null}))},n.setPreSelection=function(o){if(!n.props.readOnly){var a=Mt(n.props.minDate),i=Mt(n.props.maxDate),s=!0;if(o){var l=go(o);if(a&&i)s=cn(o,n.props.minDate,n.props.maxDate);else if(a){var c=go(n.props.minDate);s=en(o,c)||fn(l,c)}else if(i){var u=$l(n.props.maxDate);s=ht(o,u)||fn(l,u)}}s&&n.setState({preSelection:o})}},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(o){var a,i;if(!(n.props.selectsRange||n.props.selectsMultiple)){var s=n.props.selected?n.props.selected:n.getPreSelection(),l=n.props.selected?o:ja(s,{hour:Rt(o),minute:Pt(o)});n.setState({preSelection:l}),(i=(a=n.props).onChange)===null||i===void 0||i.call(a,l),n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var o,a;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(a=(o=n.props).onInputClick)===null||a===void 0||a.call(o)},n.onInputKeyDown=function(o){var a,i,s,l,c,u;(i=(a=n.props).onKeyDown)===null||i===void 0||i.call(a,o);var f=o.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(f===Y.ArrowDown||f===Y.ArrowUp||f===Y.Enter)&&((s=n.onInputClick)===null||s===void 0||s.call(n));return}if(n.state.open){if(f===Y.ArrowDown||f===Y.ArrowUp){o.preventDefault();var p=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',d=((l=n.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(p);d instanceof HTMLElement&&d.focus({preventScroll:!0});return}var g=le(n.state.preSelection);f===Y.Enter?(o.preventDefault(),o.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===Ba?(n.handleSelect(g,o),!n.props.shouldCloseOnSelect&&n.setPreSelection(g)):n.setOpen(!1)):f===Y.Escape?(o.preventDefault(),o.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===Y.Tab&&n.setOpen(!1),n.inputOk()||(u=(c=n.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Va})}},n.onPortalKeyDown=function(o){var a=o.key;a===Y.Escape&&(o.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(o){var a,i,s,l,c,u,f=n.props,p=f.minDate,d=f.maxDate,g=f.disabledKeyboardNavigation,m=f.showWeekPicker,_=f.shouldCloseOnSelect,y=f.locale,x=f.calendarStartDay,w=f.adjustDateOnChange,$=f.inline;if((i=(a=n.props).onKeyDown)===null||i===void 0||i.call(a,o),!g){var C=o.key,k=o.shiftKey,M=le(n.state.preSelection),E=function(N,j){var z=j;switch(N){case Y.ArrowRight:z=m?Mo(j,1):at(j,1);break;case Y.ArrowLeft:z=m?bl(j):eb(j);break;case Y.ArrowUp:z=bl(j);break;case Y.ArrowDown:z=Mo(j,1);break;case Y.PageUp:z=k?Gn(j,1):vn(j,1);break;case Y.PageDown:z=k?Et(j,1):st(j,1);break;case Y.Home:z=Zt(j,y,x);break;case Y.End:z=Vb(j);break}return z},P=function(N,j){for(var z=40,D=N,R=!1,B=0,H=E(N,j);!R;){if(B>=z){H=j;break}p&&H<p&&(D=Y.ArrowRight,H=Xe(p,n.props)?E(D,H):p),d&&H>d&&(D=Y.ArrowLeft,H=Xe(d,n.props)?E(D,H):d),Xe(H,n.props)?((D===Y.PageUp||D===Y.Home)&&(D=Y.ArrowRight),(D===Y.PageDown||D===Y.End)&&(D=Y.ArrowLeft),H=E(D,H)):R=!0,B++}return H};if(C===Y.Enter){o.preventDefault(),n.handleSelect(M,o),!_&&n.setPreSelection(M);return}else if(C===Y.Escape){o.preventDefault(),n.setOpen(!1),n.inputOk()||(l=(s=n.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Va});return}var F=null;switch(C){case Y.ArrowLeft:case Y.ArrowRight:case Y.ArrowUp:case Y.ArrowDown:case Y.PageUp:case Y.PageDown:case Y.Home:case Y.End:F=P(C,M);break}if(!F){(u=(c=n.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Va});return}if(o.preventDefault(),n.setState({lastPreSelectChange:Ba}),w&&n.setSelected(F),n.setPreSelection(F),$){var L=Le(M),T=Le(F),O=te(M),A=te(F);L!==T||O!==A?n.setState({shouldFocusDayInline:!0}):n.setState({shouldFocusDayInline:!1})}}},n.onPopperKeyDown=function(o){var a=o.key;a===Y.Escape&&(o.preventDefault(),n.sendFocusBackToInput(),n.setOpen(!1))},n.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),n.sendFocusBackToInput();var a=n.props,i=a.selectsRange,s=a.onChange;i?s==null||s([null,null],o):s==null||s(null,o),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(o){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(o)&&n.setOpen(!1)},n.renderCalendar=function(){var o,a;return!n.props.inline&&!n.isCalendarOpen()?null:h.default.createElement(Sy,oe({showMonthYearDropdown:void 0,ref:function(i){n.calendar=i}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(o=n.props.dateFormatCalendar)!==null&&o!==void 0?o:r.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:ty(n.modifyHolidays()),outsideClickIgnoreClass:n.props.outsideClickIgnoreClass,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(a=n.props.dropdownMode)!==null&&a!==void 0?a:r.defaultProps.dropdownMode}),n.props.children)},n.renderAriaLiveRegion=function(){var o,a=n.props.locale,i=(o=n.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,s=n.props.showTimeInput||n.props.showTimeSelect,l=s?"PPPPp":"PPPP",c;return n.props.selectsRange?c="Selected start date: ".concat(Ue(n.props.startDate,{dateFormat:l,locale:a}),". ").concat(n.props.endDate?"End date: "+Ue(n.props.endDate,{dateFormat:l,locale:a}):""):n.props.showTimeSelectOnly?c="Selected time: ".concat(Ue(n.props.selected,{dateFormat:i,locale:a})):n.props.showYearPicker?c="Selected year: ".concat(Ue(n.props.selected,{dateFormat:"yyyy",locale:a})):n.props.showMonthYearPicker?c="Selected month: ".concat(Ue(n.props.selected,{dateFormat:"MMMM yyyy",locale:a})):n.props.showQuarterYearPicker?c="Selected quarter: ".concat(Ue(n.props.selected,{dateFormat:"yyyy, QQQ",locale:a})):c="Selected date: ".concat(Ue(n.props.selected,{dateFormat:l,locale:a})),h.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},n.renderDateInput=function(){var o,a,i=Ee(n.props.className,(o={},o[n.props.outsideClickIgnoreClass||r.defaultProps.outsideClickIgnoreClass]=n.state.open,o)),s=n.props.customInput||h.default.createElement("input",{type:"text"}),l=n.props.customInputRef||"ref";return b.cloneElement(s,(a={},a[l]=function(c){n.input=c},a.value=n.getInputValue(),a.onBlur=n.handleBlur,a.onChange=n.handleChange,a.onClick=n.onInputClick,a.onFocus=n.handleFocus,a.onKeyDown=n.onInputKeyDown,a.id=n.props.id,a.name=n.props.name,a.form=n.props.form,a.autoFocus=n.props.autoFocus,a.placeholder=n.props.placeholderText,a.disabled=n.props.disabled,a.autoComplete=n.props.autoComplete,a.className=Ee(s.props.className,i),a.title=n.props.title,a.readOnly=n.props.readOnly,a.required=n.props.required,a.tabIndex=n.props.tabIndex,a["aria-describedby"]=n.props.ariaDescribedBy,a["aria-invalid"]=n.props.ariaInvalid,a["aria-labelledby"]=n.props.ariaLabelledBy,a["aria-required"]=n.props.ariaRequired,a))},n.renderClearButton=function(){var o=n.props,a=o.isClearable,i=o.disabled,s=o.selected,l=o.startDate,c=o.endDate,u=o.clearButtonTitle,f=o.clearButtonClassName,p=f===void 0?"":f,d=o.ariaLabelClose,g=d===void 0?"Close":d,m=o.selectedDates,_=o.readOnly;return a&&!_&&(s!=null||l!=null||c!=null||m!=null&&m.length)?h.default.createElement("button",{type:"button",className:Ee("react-datepicker__close-icon",p,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":g,onClick:n.onClearClick,title:u,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(r,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:td,readOnly:!1,rangeSeparator:Uu,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Ir,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.componentDidUpdate=function(t,n){var o,a,i,s;t.inline&&Ry(t.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&t.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),t.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Tl(this.props.highlightDates)}),!n.focused&&!fn(t.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),n.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},r.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.renderInputContainer=function(){var t=this.props,n=t.showIcon,o=t.icon,a=t.calendarIconClassname,i=t.calendarIconClassName,s=t.toggleCalendarOnIconClick,l=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),h.default.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&h.default.createElement($y,oe({icon:o,className:Ee(i,!i&&a,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},r.prototype.render=function(){var t=this.renderCalendar();if(this.props.inline)return t;if(this.props.withPortal){var n=this.state.open?h.default.createElement(rd,{enableTabLoop:this.props.enableTabLoop},h.default.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(n=h.default.createElement(nd,oe({portalId:this.props.portalId},this.props),n)),h.default.createElement("div",null,this.renderInputContainer(),n)}return h.default.createElement(My,oe({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r})(b.Component),Ty="input",Ba="navigate";const Iy=S.default.div`
|
|
1025
|
+
`;function Eu({layout:e="block",...r}){const{label:n,...t}=r;return _.jsx(Du,{label:_.jsx(Xn,{ccMargin:"none none s",children:n}),...t,children:_.jsx(Yh,{$layout:e,children:r.children})})}function Vh({onChange:e,options:r,selectedValues:n,scale:t,...o}){return _.jsx(Eu,{...o,children:r.map(a=>_.jsx(Cu,{id:`${o.id}-${a.value}`,name:o.id,onChange:e,checked:n.includes(a.value),disabled:a.disabled||o.disabled,status:a.status||o.status,scale:a.scale||t,...a},a.value))})}function Mu(e){var r,n,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(n=Mu(e[r]))&&(t&&(t+=" "),t+=n)}else for(n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function De(){for(var e,r,n=0,t="",o=arguments.length;n<o;n++)(e=arguments[n])&&(r=Mu(e))&&(t&&(t+=" "),t+=r);return t}const Ru=6048e5,Bh=864e5,la=6e4,ca=36e5,Wh=1e3,ll=Symbol.for("constructDateFrom");function ce(e,r){return typeof e=="function"?e(r):e&&typeof e=="object"&&ll in e?e[ll](r):e instanceof Date?new e.constructor(r):new Date(r)}function B(e,r){return ce(r||e,e)}function ot(e,r,n){const t=B(e,n?.in);return isNaN(r)?ce(n?.in||e,NaN):(r&&t.setDate(t.getDate()+r),t)}function it(e,r,n){const t=B(e,n?.in);if(isNaN(r))return ce(e,NaN);if(!r)return t;const o=t.getDate(),a=ce(e,t.getTime());a.setMonth(t.getMonth()+r+1,0);const i=a.getDate();return o>=i?a:(t.setFullYear(a.getFullYear(),a.getMonth(),o),t)}function Pu(e,r,n){return ce(e,+B(e)+r)}function Gh(e,r,n){return Pu(e,r*ca)}let qh={};function $n(){return qh}function Nt(e,r){const n=$n(),t=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=B(e,r?.in),a=o.getDay(),i=(a<t?7:0)+a-t;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Vn(e,r){return Nt(e,{...r,weekStartsOn:1})}function Tu(e,r){const n=B(e,r?.in),t=n.getFullYear(),o=ce(n,0);o.setFullYear(t+1,0,4),o.setHours(0,0,0,0);const a=Vn(o),i=ce(n,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=Vn(i);return n.getTime()>=a.getTime()?t+1:n.getTime()>=s.getTime()?t:t-1}function Do(e){const r=B(e),n=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return n.setUTCFullYear(r.getFullYear()),+e-+n}function At(e,...r){const n=ce.bind(null,r.find(t=>typeof t=="object"));return r.map(n)}function wn(e,r){const n=B(e,r?.in);return n.setHours(0,0,0,0),n}function Bn(e,r,n){const[t,o]=At(n?.in,e,r),a=wn(t),i=wn(o),s=+a-Do(a),l=+i-Do(i);return Math.round((s-l)/Bh)}function Kh(e,r){const n=Tu(e,r),t=ce(e,0);return t.setFullYear(n,0,4),t.setHours(0,0,0,0),Vn(t)}function pi(e,r,n){const t=B(e,n?.in);return t.setTime(t.getTime()+r*la),t}function Ji(e,r,n){return it(e,r*3,n)}function Uh(e,r,n){return Pu(e,r*1e3)}function Eo(e,r,n){return ot(e,r*7,n)}function Dt(e,r,n){return it(e,r*12,n)}function cl(e,r){let n,t=r?.in;return e.forEach(o=>{!t&&typeof o=="object"&&(t=ce.bind(null,o));const a=B(o,t);(!n||n<a||isNaN(+a))&&(n=a)}),ce(t,n||NaN)}function ul(e,r){let n,t=r?.in;return e.forEach(o=>{!t&&typeof o=="object"&&(t=ce.bind(null,o));const a=B(o,t);(!n||n>a||isNaN(+a))&&(n=a)}),ce(t,n||NaN)}function Qh(e,r,n){const[t,o]=At(n?.in,e,r);return+wn(t)==+wn(o)}function Et(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mo(e){return!(!Et(e)&&typeof e!="number"||isNaN(+B(e)))}function Ro(e,r,n){const[t,o]=At(n?.in,e,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function mn(e,r){const n=B(e,r?.in);return Math.trunc(n.getMonth()/3)+1}function Po(e,r,n){const[t,o]=At(n?.in,e,r),a=t.getFullYear()-o.getFullYear(),i=mn(t)-mn(o);return a*4+i}function To(e,r,n){const[t,o]=At(n?.in,e,r);return t.getFullYear()-o.getFullYear()}function Xh(e,r,n){const[t,o]=At(n?.in,e,r),a=dl(t,o),i=Math.abs(Bn(t,o));t.setDate(t.getDate()-a*i);const s=+(dl(t,o)===-a),l=a*(i-s);return l===0?0:l}function dl(e,r){const n=e.getFullYear()-r.getFullYear()||e.getMonth()-r.getMonth()||e.getDate()-r.getDate()||e.getHours()-r.getHours()||e.getMinutes()-r.getMinutes()||e.getSeconds()-r.getSeconds()||e.getMilliseconds()-r.getMilliseconds();return n<0?-1:n>0?1:n}function Iu(e,r){const n=B(e,r?.in);return n.setHours(23,59,59,999),n}function Ou(e,r){const n=B(e,r?.in),t=n.getMonth();return n.setFullYear(n.getFullYear(),t+1,0),n.setHours(23,59,59,999),n}function gi(e,r){const n=B(e,r?.in),t=n.getMonth(),o=t-t%3;return n.setMonth(o,1),n.setHours(0,0,0,0),n}function Fu(e,r){const n=B(e,r?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Lu(e,r){const n=B(e,r?.in),t=n.getFullYear();return n.setFullYear(t+1,0,0),n.setHours(23,59,59,999),n}function ua(e,r){const n=B(e,r?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Zh(e,r){const n=$n(),t=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=B(e,r?.in),a=o.getDay(),i=(a<t?-7:0)+6-(a-t);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const Jh={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"}},ev=(e,r,n)=>{let t;const o=Jh[e];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+t:t+" ago":t};function La(e){return(r={})=>{const n=r.width?String(r.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ov={date:La({formats:tv,defaultWidth:"full"}),time:La({formats:nv,defaultWidth:"full"}),dateTime:La({formats:rv,defaultWidth:"full"})},av={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iv=(e,r,n,t)=>av[e];function er(e){return(r,n)=>{const t=n?.context?String(n.context):"standalone";let o;if(t==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(r):r;return o[a]}}const sv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cv={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"]},uv={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"]},dv={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"}},fv={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"}},pv=(e,r)=>{const n=Number(e),t=n%100;if(t>20||t<10)switch(t%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},gv={ordinalNumber:pv,era:er({values:sv,defaultWidth:"wide"}),quarter:er({values:lv,defaultWidth:"wide",argumentCallback:e=>e-1}),month:er({values:cv,defaultWidth:"wide"}),day:er({values:uv,defaultWidth:"wide"}),dayPeriod:er({values:dv,defaultWidth:"wide",formattingValues:fv,defaultFormattingWidth:"wide"})};function tr(e){return(r,n={})=>{const t=n.width,o=t&&e.matchPatterns[t]||e.matchPatterns[e.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=t&&e.parsePatterns[t]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?hv(s,d=>d.test(i)):mv(s,d=>d.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=r.slice(i.length);return{value:c,rest:u}}}function mv(e,r){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r(e[n]))return n}function hv(e,r){for(let n=0;n<e.length;n++)if(r(e[n]))return n}function vv(e){return(r,n={})=>{const t=r.match(e.matchPattern);if(!t)return null;const o=t[0],a=r.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=r.slice(o.length);return{value:i,rest:s}}}const _v=/^(\d+)(th|st|nd|rd)?/i,bv=/\d+/i,yv={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},wv={any:[/^b/i,/^(a|c)/i]},xv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sv={any:[/1/i,/2/i,/3/i,/4/i]},$v={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},kv={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]},Cv={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},Dv={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]},Ev={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},Mv={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}},Rv={ordinalNumber:vv({matchPattern:_v,parsePattern:bv,valueCallback:e=>parseInt(e,10)}),era:tr({matchPatterns:yv,defaultMatchWidth:"wide",parsePatterns:wv,defaultParseWidth:"any"}),quarter:tr({matchPatterns:xv,defaultMatchWidth:"wide",parsePatterns:Sv,defaultParseWidth:"any",valueCallback:e=>e+1}),month:tr({matchPatterns:$v,defaultMatchWidth:"wide",parsePatterns:kv,defaultParseWidth:"any"}),day:tr({matchPatterns:Cv,defaultMatchWidth:"wide",parsePatterns:Dv,defaultParseWidth:"any"}),dayPeriod:tr({matchPatterns:Ev,defaultMatchWidth:"any",parsePatterns:Mv,defaultParseWidth:"any"})},zu={code:"en-US",formatDistance:ev,formatLong:ov,formatRelative:iv,localize:gv,match:Rv,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pv(e,r){const n=B(e,r?.in);return Bn(n,ua(n))+1}function es(e,r){const n=B(e,r?.in),t=+Vn(n)-+Kh(n);return Math.round(t/Ru)+1}function ts(e,r){const n=B(e,r?.in),t=n.getFullYear(),o=$n(),a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=ce(r?.in||e,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=Nt(i,r),l=ce(r?.in||e,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const c=Nt(l,r);return+n>=+s?t+1:+n>=+c?t:t-1}function Tv(e,r){const n=$n(),t=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=ts(e,r),a=ce(r?.in||e,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),Nt(a,r)}function Nu(e,r){const n=B(e,r?.in),t=+Nt(n,r)-+Tv(n,r);return Math.round(t/Ru)+1}function le(e,r){const n=e<0?"-":"",t=Math.abs(e).toString().padStart(r,"0");return n+t}const Yt={y(e,r){const n=e.getFullYear(),t=n>0?n:1-n;return le(r==="yy"?t%100:t,r.length)},M(e,r){const n=e.getMonth();return r==="M"?String(n+1):le(n+1,2)},d(e,r){return le(e.getDate(),r.length)},a(e,r){const n=e.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,r){return le(e.getHours()%12||12,r.length)},H(e,r){return le(e.getHours(),r.length)},m(e,r){return le(e.getMinutes(),r.length)},s(e,r){return le(e.getSeconds(),r.length)},S(e,r){const n=r.length,t=e.getMilliseconds(),o=Math.trunc(t*Math.pow(10,n-3));return le(o,r.length)}},Pn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fl={G:function(e,r,n){const t=e.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(t,{width:"abbreviated"});case"GGGGG":return n.era(t,{width:"narrow"});default:return n.era(t,{width:"wide"})}},y:function(e,r,n){if(r==="yo"){const t=e.getFullYear(),o=t>0?t:1-t;return n.ordinalNumber(o,{unit:"year"})}return Yt.y(e,r)},Y:function(e,r,n,t){const o=ts(e,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return le(i,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):le(a,r.length)},R:function(e,r){const n=Tu(e);return le(n,r.length)},u:function(e,r){const n=e.getFullYear();return le(n,r.length)},Q:function(e,r,n){const t=Math.ceil((e.getMonth()+1)/3);switch(r){case"Q":return String(t);case"QQ":return le(t,2);case"Qo":return n.ordinalNumber(t,{unit:"quarter"});case"QQQ":return n.quarter(t,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(t,{width:"narrow",context:"formatting"});default:return n.quarter(t,{width:"wide",context:"formatting"})}},q:function(e,r,n){const t=Math.ceil((e.getMonth()+1)/3);switch(r){case"q":return String(t);case"qq":return le(t,2);case"qo":return n.ordinalNumber(t,{unit:"quarter"});case"qqq":return n.quarter(t,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(t,{width:"narrow",context:"standalone"});default:return n.quarter(t,{width:"wide",context:"standalone"})}},M:function(e,r,n){const t=e.getMonth();switch(r){case"M":case"MM":return Yt.M(e,r);case"Mo":return n.ordinalNumber(t+1,{unit:"month"});case"MMM":return n.month(t,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(t,{width:"narrow",context:"formatting"});default:return n.month(t,{width:"wide",context:"formatting"})}},L:function(e,r,n){const t=e.getMonth();switch(r){case"L":return String(t+1);case"LL":return le(t+1,2);case"Lo":return n.ordinalNumber(t+1,{unit:"month"});case"LLL":return n.month(t,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(t,{width:"narrow",context:"standalone"});default:return n.month(t,{width:"wide",context:"standalone"})}},w:function(e,r,n,t){const o=Nu(e,t);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):le(o,r.length)},I:function(e,r,n){const t=es(e);return r==="Io"?n.ordinalNumber(t,{unit:"week"}):le(t,r.length)},d:function(e,r,n){return r==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Yt.d(e,r)},D:function(e,r,n){const t=Pv(e);return r==="Do"?n.ordinalNumber(t,{unit:"dayOfYear"}):le(t,r.length)},E:function(e,r,n){const t=e.getDay();switch(r){case"E":case"EE":case"EEE":return n.day(t,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(t,{width:"short",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})}},e:function(e,r,n,t){const o=e.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){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"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,r,n,t){const o=e.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return le(a,r.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"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,r,n){const t=e.getDay(),o=t===0?7:t;switch(r){case"i":return String(o);case"ii":return le(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(t,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(t,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(t,{width:"short",context:"formatting"});default:return n.day(t,{width:"wide",context:"formatting"})}},a:function(e,r,n){const o=e.getHours()/12>=1?"pm":"am";switch(r){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"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,r,n){const t=e.getHours();let o;switch(t===12?o=Pn.noon:t===0?o=Pn.midnight:o=t/12>=1?"pm":"am",r){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"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,r,n){const t=e.getHours();let o;switch(t>=17?o=Pn.evening:t>=12?o=Pn.afternoon:t>=4?o=Pn.morning:o=Pn.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,r,n){if(r==="ho"){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Yt.h(e,r)},H:function(e,r,n){return r==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Yt.H(e,r)},K:function(e,r,n){const t=e.getHours()%12;return r==="Ko"?n.ordinalNumber(t,{unit:"hour"}):le(t,r.length)},k:function(e,r,n){let t=e.getHours();return t===0&&(t=24),r==="ko"?n.ordinalNumber(t,{unit:"hour"}):le(t,r.length)},m:function(e,r,n){return r==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Yt.m(e,r)},s:function(e,r,n){return r==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Yt.s(e,r)},S:function(e,r){return Yt.S(e,r)},X:function(e,r,n){const t=e.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return gl(t);case"XXXX":case"XX":return sn(t);default:return sn(t,":")}},x:function(e,r,n){const t=e.getTimezoneOffset();switch(r){case"x":return gl(t);case"xxxx":case"xx":return sn(t);default:return sn(t,":")}},O:function(e,r,n){const t=e.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+pl(t,":");default:return"GMT"+sn(t,":")}},z:function(e,r,n){const t=e.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+pl(t,":");default:return"GMT"+sn(t,":")}},t:function(e,r,n){const t=Math.trunc(+e/1e3);return le(t,r.length)},T:function(e,r,n){return le(+e,r.length)}};function pl(e,r=""){const n=e>0?"-":"+",t=Math.abs(e),o=Math.trunc(t/60),a=t%60;return a===0?n+String(o):n+String(o)+r+le(a,2)}function gl(e,r){return e%60===0?(e>0?"-":"+")+le(Math.abs(e)/60,2):sn(e,r)}function sn(e,r=""){const n=e>0?"-":"+",t=Math.abs(e),o=le(Math.trunc(t/60),2),a=le(t%60,2);return n+o+r+a}const ml=(e,r)=>{switch(e){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});default:return r.date({width:"full"})}},Au=(e,r)=>{switch(e){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});default:return r.time({width:"full"})}},Iv=(e,r)=>{const n=e.match(/(P+)(p+)?/)||[],t=n[1],o=n[2];if(!o)return ml(e,r);let a;switch(t){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",ml(t,r)).replace("{{time}}",Au(o,r))},mi={p:Au,P:Iv},Ov=/^D+$/,Fv=/^Y+$/,Lv=["D","DD","YY","YYYY"];function zv(e){return Ov.test(e)}function Nv(e){return Fv.test(e)}function Av(e,r,n){const t=jv(e,r,n);if(console.warn(t),Lv.includes(e))throw new RangeError(t)}function jv(e,r,n){const t=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${r}\`) for formatting ${t} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Hv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vv=/^'([^]*?)'?$/,Bv=/''/g,Wv=/[a-zA-Z]/;function hl(e,r,n){const t=$n(),o=n?.locale??t.locale??zu,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,s=B(e,n?.in);if(!Mo(s))throw new RangeError("Invalid time value");let l=r.match(Yv).map(u=>{const d=u[0];if(d==="p"||d==="P"){const p=mi[d];return p(u,o.formatLong)}return u}).join("").match(Hv).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Gv(u)};if(fl[d])return{isToken:!0,value:u};if(d.match(Wv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&Nv(d)||!n?.useAdditionalDayOfYearTokens&&zv(d))&&Av(d,r,String(e));const p=fl[d[0]];return p(s,d,o.localize,c)}).join("")}function Gv(e){const r=e.match(Vv);return r?r[1].replace(Bv,"'"):e}function vl(e,r){return B(e,r?.in).getDate()}function qv(e,r){return B(e,r?.in).getDay()}function Kv(e,r){const n=B(e,r?.in),t=n.getFullYear(),o=n.getMonth(),a=ce(n,0);return a.setFullYear(t,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Uv(){return Object.assign({},$n())}function Mt(e,r){return B(e,r?.in).getHours()}function Qv(e,r){const n=B(e,r?.in).getDay();return n===0?7:n}function Rt(e,r){return B(e,r?.in).getMinutes()}function Fe(e,r){return B(e,r?.in).getMonth()}function Qt(e){return B(e).getSeconds()}function hi(e){return+B(e)}function ee(e,r){return B(e,r?.in).getFullYear()}function Jt(e,r){return+B(e)>+B(r)}function mt(e,r){return+B(e)<+B(r)}function Xv(e,r){return+B(e)==+B(r)}function Zv(e,r){const n=Jv(r)?new r(0):ce(r,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Jv(e){return typeof e=="function"&&e.prototype?.constructor===e}const e_=10;class ju{subPriority=0;validate(r,n){return!0}}class t_ extends ju{constructor(r,n,t,o,a){super(),this.value=r,this.validateValue=n,this.setValue=t,this.priority=o,a&&(this.subPriority=a)}validate(r,n){return this.validateValue(r,this.value,n)}set(r,n,t){return this.setValue(r,n,this.value,t)}}class n_ extends ju{priority=e_;subPriority=-1;constructor(r,n){super(),this.context=r||(t=>ce(n,t))}set(r,n){return n.timestampIsSet?r:ce(r,Zv(r,this.context))}}class ie{run(r,n,t,o){const a=this.parse(r,n,t,o);return a?{setter:new t_(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,n,t){return!0}}class r_ extends ie{priority=140;parse(r,n,t){switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"})||t.era(r,{width:"narrow"});case"GGGGG":return t.era(r,{width:"narrow"});default:return t.era(r,{width:"wide"})||t.era(r,{width:"abbreviated"})||t.era(r,{width:"narrow"})}}set(r,n,t){return n.era=t,r.setFullYear(t,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["R","u","t","T"]}const be={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ft={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function ye(e,r){return e&&{value:r(e.value),rest:e.rest}}function me(e,r){const n=r.match(e);return n?{value:parseInt(n[0],10),rest:r.slice(n[0].length)}:null}function pt(e,r){const n=r.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:r.slice(1)};const t=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:t*(o*ca+a*la+i*Wh),rest:r.slice(n[0].length)}}function Hu(e){return me(be.anyDigitsSigned,e)}function he(e,r){switch(e){case 1:return me(be.singleDigit,r);case 2:return me(be.twoDigits,r);case 3:return me(be.threeDigits,r);case 4:return me(be.fourDigits,r);default:return me(new RegExp("^\\d{1,"+e+"}"),r)}}function Io(e,r){switch(e){case 1:return me(be.singleDigitSigned,r);case 2:return me(be.twoDigitsSigned,r);case 3:return me(be.threeDigitsSigned,r);case 4:return me(be.fourDigitsSigned,r);default:return me(new RegExp("^-?\\d{1,"+e+"}"),r)}}function ns(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Yu(e,r){const n=r>0,t=n?r:1-r;let o;if(t<=50)o=e||100;else{const a=t+50,i=Math.trunc(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return n?o:1-o}function Vu(e){return e%400===0||e%4===0&&e%100!==0}class o_ extends ie{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(r,n,t){const o=a=>({year:a,isTwoDigitYear:n==="yy"});switch(n){case"y":return ye(he(4,r),o);case"yo":return ye(t.ordinalNumber(r,{unit:"year"}),o);default:return ye(he(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,t){const o=r.getFullYear();if(t.isTwoDigitYear){const i=Yu(t.year,o);return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}const a=!("era"in n)||n.era===1?t.year:1-t.year;return r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}}class a_ extends ie{priority=130;parse(r,n,t){const o=a=>({year:a,isTwoDigitYear:n==="YY"});switch(n){case"Y":return ye(he(4,r),o);case"Yo":return ye(t.ordinalNumber(r,{unit:"year"}),o);default:return ye(he(n.length,r),o)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,t,o){const a=ts(r,o);if(t.isTwoDigitYear){const s=Yu(t.year,a);return r.setFullYear(s,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),Nt(r,o)}const i=!("era"in n)||n.era===1?t.year:1-t.year;return r.setFullYear(i,0,o.firstWeekContainsDate),r.setHours(0,0,0,0),Nt(r,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class i_ extends ie{priority=130;parse(r,n){return Io(n==="R"?4:n.length,r)}set(r,n,t){const o=ce(r,0);return o.setFullYear(t,0,4),o.setHours(0,0,0,0),Vn(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class s_ extends ie{priority=130;parse(r,n){return Io(n==="u"?4:n.length,r)}set(r,n,t){return r.setFullYear(t,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class l_ extends ie{priority=120;parse(r,n,t){switch(n){case"Q":case"QQ":return he(n.length,r);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"})||t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});default:return t.quarter(r,{width:"wide",context:"formatting"})||t.quarter(r,{width:"abbreviated",context:"formatting"})||t.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,t){return r.setMonth((t-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class c_ extends ie{priority=120;parse(r,n,t){switch(n){case"q":case"qq":return he(n.length,r);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"})||t.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});default:return t.quarter(r,{width:"wide",context:"standalone"})||t.quarter(r,{width:"abbreviated",context:"standalone"})||t.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,t){return r.setMonth((t-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class u_ extends ie{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(r,n,t){const o=a=>a-1;switch(n){case"M":return ye(me(be.month,r),o);case"MM":return ye(he(2,r),o);case"Mo":return ye(t.ordinalNumber(r,{unit:"month"}),o);case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"})||t.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});default:return t.month(r,{width:"wide",context:"formatting"})||t.month(r,{width:"abbreviated",context:"formatting"})||t.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,t){return r.setMonth(t,1),r.setHours(0,0,0,0),r}}class d_ extends ie{priority=110;parse(r,n,t){const o=a=>a-1;switch(n){case"L":return ye(me(be.month,r),o);case"LL":return ye(he(2,r),o);case"Lo":return ye(t.ordinalNumber(r,{unit:"month"}),o);case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"})||t.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});default:return t.month(r,{width:"wide",context:"standalone"})||t.month(r,{width:"abbreviated",context:"standalone"})||t.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,t){return r.setMonth(t,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function f_(e,r,n){const t=B(e,n?.in),o=Nu(t,n)-r;return t.setDate(t.getDate()-o*7),B(t,n?.in)}class p_ extends ie{priority=100;parse(r,n,t){switch(n){case"w":return me(be.week,r);case"wo":return t.ordinalNumber(r,{unit:"week"});default:return he(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,t,o){return Nt(f_(r,t,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function g_(e,r,n){const t=B(e,n?.in),o=es(t,n)-r;return t.setDate(t.getDate()-o*7),t}class m_ extends ie{priority=100;parse(r,n,t){switch(n){case"I":return me(be.week,r);case"Io":return t.ordinalNumber(r,{unit:"week"});default:return he(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,t){return Vn(g_(r,t))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const h_=[31,28,31,30,31,30,31,31,30,31,30,31],v_=[31,29,31,30,31,30,31,31,30,31,30,31];class __ extends ie{priority=90;subPriority=1;parse(r,n,t){switch(n){case"d":return me(be.date,r);case"do":return t.ordinalNumber(r,{unit:"date"});default:return he(n.length,r)}}validate(r,n){const t=r.getFullYear(),o=Vu(t),a=r.getMonth();return o?n>=1&&n<=v_[a]:n>=1&&n<=h_[a]}set(r,n,t){return r.setDate(t),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class b_ extends ie{priority=90;subpriority=1;parse(r,n,t){switch(n){case"D":case"DD":return me(be.dayOfYear,r);case"Do":return t.ordinalNumber(r,{unit:"date"});default:return he(n.length,r)}}validate(r,n){const t=r.getFullYear();return Vu(t)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,t){return r.setMonth(0,t),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function rs(e,r,n){const t=$n(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,a=B(e,n?.in),i=a.getDay(),l=(r%7+7)%7,c=7-o,u=r<0||r>6?r-(i+c)%7:(l+c)%7-(i+c)%7;return ot(a,u,n)}class y_ extends ie{priority=90;parse(r,n,t){switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})||t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,t,o){return r=rs(r,t,o),r.setHours(0,0,0,0),r}incompatibleTokens=["D","i","e","c","t","T"]}class w_ extends ie{priority=90;parse(r,n,t,o){const a=i=>{const s=Math.floor((i-1)/7)*7;return(i+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return ye(he(n.length,r),a);case"eo":return ye(t.ordinalNumber(r,{unit:"day"}),a);case"eee":return t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})||t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,t,o){return r=rs(r,t,o),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class x_ extends ie{priority=90;parse(r,n,t,o){const a=i=>{const s=Math.floor((i-1)/7)*7;return(i+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return ye(he(n.length,r),a);case"co":return ye(t.ordinalNumber(r,{unit:"day"}),a);case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"})||t.day(r,{width:"short",context:"standalone"})||t.day(r,{width:"narrow",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"})||t.day(r,{width:"narrow",context:"standalone"});default:return t.day(r,{width:"wide",context:"standalone"})||t.day(r,{width:"abbreviated",context:"standalone"})||t.day(r,{width:"short",context:"standalone"})||t.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,t,o){return r=rs(r,t,o),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function S_(e,r,n){const t=B(e,n?.in),o=Qv(t,n),a=r-o;return ot(t,a,n)}class $_ extends ie{priority=90;parse(r,n,t){const o=a=>a===0?7:a;switch(n){case"i":case"ii":return he(n.length,r);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return ye(t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return ye(t.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return ye(t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"}),o);default:return ye(t.day(r,{width:"wide",context:"formatting"})||t.day(r,{width:"abbreviated",context:"formatting"})||t.day(r,{width:"short",context:"formatting"})||t.day(r,{width:"narrow",context:"formatting"}),o)}}validate(r,n){return n>=1&&n<=7}set(r,n,t){return r=S_(r,t),r.setHours(0,0,0,0),r}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class k_ extends ie{priority=80;parse(r,n,t){switch(n){case"a":case"aa":case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})||t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,t){return r.setHours(ns(t),0,0,0),r}incompatibleTokens=["b","B","H","k","t","T"]}class C_ extends ie{priority=80;parse(r,n,t){switch(n){case"b":case"bb":case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})||t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,t){return r.setHours(ns(t),0,0,0),r}incompatibleTokens=["a","B","H","k","t","T"]}class D_ extends ie{priority=80;parse(r,n,t){switch(n){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});default:return t.dayPeriod(r,{width:"wide",context:"formatting"})||t.dayPeriod(r,{width:"abbreviated",context:"formatting"})||t.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,t){return r.setHours(ns(t),0,0,0),r}incompatibleTokens=["a","b","t","T"]}class E_ extends ie{priority=70;parse(r,n,t){switch(n){case"h":return me(be.hour12h,r);case"ho":return t.ordinalNumber(r,{unit:"hour"});default:return he(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,t){const o=r.getHours()>=12;return o&&t<12?r.setHours(t+12,0,0,0):!o&&t===12?r.setHours(0,0,0,0):r.setHours(t,0,0,0),r}incompatibleTokens=["H","K","k","t","T"]}class M_ extends ie{priority=70;parse(r,n,t){switch(n){case"H":return me(be.hour23h,r);case"Ho":return t.ordinalNumber(r,{unit:"hour"});default:return he(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,t){return r.setHours(t,0,0,0),r}incompatibleTokens=["a","b","h","K","k","t","T"]}class R_ extends ie{priority=70;parse(r,n,t){switch(n){case"K":return me(be.hour11h,r);case"Ko":return t.ordinalNumber(r,{unit:"hour"});default:return he(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,t){return r.getHours()>=12&&t<12?r.setHours(t+12,0,0,0):r.setHours(t,0,0,0),r}incompatibleTokens=["h","H","k","t","T"]}class P_ extends ie{priority=70;parse(r,n,t){switch(n){case"k":return me(be.hour24h,r);case"ko":return t.ordinalNumber(r,{unit:"hour"});default:return he(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,t){const o=t<=24?t%24:t;return r.setHours(o,0,0,0),r}incompatibleTokens=["a","b","h","H","K","t","T"]}class T_ extends ie{priority=60;parse(r,n,t){switch(n){case"m":return me(be.minute,r);case"mo":return t.ordinalNumber(r,{unit:"minute"});default:return he(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,t){return r.setMinutes(t,0,0),r}incompatibleTokens=["t","T"]}class I_ extends ie{priority=50;parse(r,n,t){switch(n){case"s":return me(be.second,r);case"so":return t.ordinalNumber(r,{unit:"second"});default:return he(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,t){return r.setSeconds(t,0),r}incompatibleTokens=["t","T"]}class O_ extends ie{priority=30;parse(r,n){const t=o=>Math.trunc(o*Math.pow(10,-n.length+3));return ye(he(n.length,r),t)}set(r,n,t){return r.setMilliseconds(t),r}incompatibleTokens=["t","T"]}class F_ extends ie{priority=10;parse(r,n){switch(n){case"X":return pt(ft.basicOptionalMinutes,r);case"XX":return pt(ft.basic,r);case"XXXX":return pt(ft.basicOptionalSeconds,r);case"XXXXX":return pt(ft.extendedOptionalSeconds,r);default:return pt(ft.extended,r)}}set(r,n,t){return n.timestampIsSet?r:ce(r,r.getTime()-Do(r)-t)}incompatibleTokens=["t","T","x"]}class L_ extends ie{priority=10;parse(r,n){switch(n){case"x":return pt(ft.basicOptionalMinutes,r);case"xx":return pt(ft.basic,r);case"xxxx":return pt(ft.basicOptionalSeconds,r);case"xxxxx":return pt(ft.extendedOptionalSeconds,r);default:return pt(ft.extended,r)}}set(r,n,t){return n.timestampIsSet?r:ce(r,r.getTime()-Do(r)-t)}incompatibleTokens=["t","T","X"]}class z_ extends ie{priority=40;parse(r){return Hu(r)}set(r,n,t){return[ce(r,t*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class N_ extends ie{priority=20;parse(r){return Hu(r)}set(r,n,t){return[ce(r,t),{timestampIsSet:!0}]}incompatibleTokens="*"}const A_={G:new r_,y:new o_,Y:new a_,R:new i_,u:new s_,Q:new l_,q:new c_,M:new u_,L:new d_,w:new p_,I:new m_,d:new __,D:new b_,E:new y_,e:new w_,c:new x_,i:new $_,a:new k_,b:new C_,B:new D_,h:new E_,H:new M_,K:new R_,k:new P_,m:new T_,s:new I_,S:new O_,X:new F_,x:new L_,t:new z_,T:new N_},j_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y_=/^'([^]*?)'?$/,V_=/''/g,B_=/\S/,W_=/[a-zA-Z]/;function G_(e,r,n,t){const o=()=>ce(t?.in||n,NaN),a=Uv(),i=t?.locale??a.locale??zu,s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,l=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0;if(!r)return e?o():B(n,t?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:i},u=[new n_(t?.in,n)],d=r.match(H_).map(h=>{const b=h[0];if(b in mi){const w=mi[b];return w(h,i.formatLong)}return h}).join("").match(j_),p=[];for(let h of d){const b=h[0],w=A_[b];if(w){const{incompatibleTokens:x}=w;if(Array.isArray(x)){const C=p.find(k=>x.includes(k.token)||k.token===b);if(C)throw new RangeError(`The format string mustn't contain \`${C.fullToken}\` and \`${h}\` at the same time`)}else if(w.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);p.push({token:b,fullToken:h});const $=w.run(e,h,i.match,c);if(!$)return o();u.push($.setter),e=$.rest}else{if(b.match(W_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");if(h==="''"?h="'":b==="'"&&(h=q_(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&B_.test(e))return o();const f=u.map(h=>h.priority).sort((h,b)=>b-h).filter((h,b,w)=>w.indexOf(h)===b).map(h=>u.filter(b=>b.priority===h).sort((b,w)=>w.subPriority-b.subPriority)).map(h=>h[0]);let g=B(n,t?.in);if(isNaN(+g))return o();const m={};for(const h of f){if(!h.validate(g,c))return o();const b=h.set(g,m,c);Array.isArray(b)?(g=b[0],Object.assign(m,b[1])):g=b}return g}function q_(e){return e.match(Y_)[1].replace(V_,"'")}function K_(e,r,n){const[t,o]=At(n?.in,e,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function U_(e,r,n){const[t,o]=At(n?.in,e,r);return+gi(t)==+gi(o)}function Q_(e,r,n){const[t,o]=At(n?.in,e,r);return t.getFullYear()===o.getFullYear()}function Sr(e,r,n){const t=+B(e,n?.in),[o,a]=[+B(r.start,n?.in),+B(r.end,n?.in)].sort((i,s)=>i-s);return t>=o&&t<=a}function X_(e,r,n){return ot(e,-1,n)}function Z_(e,r){const n=()=>ce(r?.in,NaN),o=nb(e);let a;if(o.date){const c=rb(o.date,2);a=ob(c.restDateString,c.year)}if(!a||isNaN(+a))return n();const i=+a;let s=0,l;if(o.time&&(s=ab(o.time),isNaN(s)))return n();if(o.timezone){if(l=ib(o.timezone),isNaN(l))return n()}else{const c=new Date(i+s),u=B(0,r?.in);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return B(i+s+l,r?.in)}const Gr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},J_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,eb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,tb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nb(e){const r={},n=e.split(Gr.dateTimeDelimiter);let t;if(n.length>2)return r;if(/:/.test(n[0])?t=n[0]:(r.date=n[0],t=n[1],Gr.timeZoneDelimiter.test(r.date)&&(r.date=e.split(Gr.timeZoneDelimiter)[0],t=e.substr(r.date.length,e.length))),t){const o=Gr.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function rb(e,r){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),t=e.match(n);if(!t)return{year:NaN,restDateString:""};const o=t[1]?parseInt(t[1]):null,a=t[2]?parseInt(t[2]):null;return{year:a===null?o:a*100,restDateString:e.slice((t[1]||t[2]).length)}}function ob(e,r){if(r===null)return new Date(NaN);const n=e.match(J_);if(!n)return new Date(NaN);const t=!!n[4],o=nr(n[1]),a=nr(n[2])-1,i=nr(n[3]),s=nr(n[4]),l=nr(n[5])-1;if(t)return db(r,s,l)?sb(r,s,l):new Date(NaN);{const c=new Date(0);return!cb(r,a,i)||!ub(r,o)?new Date(NaN):(c.setUTCFullYear(r,a,Math.max(o,i)),c)}}function nr(e){return e?parseInt(e):1}function ab(e){const r=e.match(eb);if(!r)return NaN;const n=za(r[1]),t=za(r[2]),o=za(r[3]);return fb(n,t,o)?n*ca+t*la+o*1e3:NaN}function za(e){return e&&parseFloat(e.replace(",","."))||0}function ib(e){if(e==="Z")return 0;const r=e.match(tb);if(!r)return 0;const n=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return pb(t,o)?n*(t*ca+o*la):NaN}function sb(e,r,n){const t=new Date(0);t.setUTCFullYear(e,0,4);const o=t.getUTCDay()||7,a=(r-1)*7+n+1-o;return t.setUTCDate(t.getUTCDate()+a),t}const lb=[31,null,31,30,31,30,31,31,30,31,30,31];function Bu(e){return e%400===0||e%4===0&&e%100!==0}function cb(e,r,n){return r>=0&&r<=11&&n>=1&&n<=(lb[r]||(Bu(e)?29:28))}function ub(e,r){return r>=1&&r<=(Bu(e)?366:365)}function db(e,r,n){return r>=1&&r<=53&&n>=0&&n<=6}function fb(e,r,n){return e===24?r===0&&n===0:n>=0&&n<60&&r>=0&&r<60&&e>=0&&e<25}function pb(e,r){return r>=0&&r<=59}function Ue(e,r,n){const t=B(e,n?.in),o=t.getFullYear(),a=t.getDate(),i=ce(e,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=Kv(i);return t.setMonth(r,Math.min(a,s)),t}function co(e,r,n){const t=B(e,n?.in);return t.setHours(r),t}function uo(e,r,n){const t=B(e,n?.in);return t.setMinutes(r),t}function Tn(e,r,n){const t=B(e,n?.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return Ue(t,t.getMonth()+a*3)}function fo(e,r,n){const t=B(e,n?.in);return t.setSeconds(r),t}function ut(e,r,n){const t=B(e,n?.in);return isNaN(+t)?ce(e,NaN):(t.setFullYear(r),t)}function hn(e,r,n){return it(e,-r,n)}function Wu(e,r,n){return Ji(e,-1,n)}function _l(e,r,n){return Eo(e,-1,n)}function Wn(e,r,n){return Dt(e,-r,n)}var gb=typeof document<"u",mb=function(){},Oo=gb?y.useLayoutEffect:mb;const hb={...v},vb=hb.useInsertionEffect,_b=vb||(e=>e());function bb(e){const r=v.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return _b(()=>{r.current=e}),v.useCallback(function(){for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}const yb={...v};let bl=!1,wb=0;const yl=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wb++;function xb(){const[e,r]=v.useState(()=>bl?yl():void 0);return Oo(()=>{e==null&&r(yl())},[]),v.useEffect(()=>{bl=!0},[]),e}const Sb=yb.useId,Gu=Sb||xb;let $r;process.env.NODE_ENV!=="production"&&($r=new Set);function $b(){for(var e,r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];const o="Floating UI: "+n.join(" ");if(!((e=$r)!=null&&e.has(o))){var a;(a=$r)==null||a.add(o),console.warn(o)}}function kb(){for(var e,r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];const o="Floating UI: "+n.join(" ");if(!((e=$r)!=null&&e.has(o))){var a;(a=$r)==null||a.add(o),console.error(o)}}const Cb=v.forwardRef(function(r,n){const{context:{placement:t,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:p,d:f,style:{transform:g,...m}={},...h}=r;process.env.NODE_ENV!=="production"&&(n||$b("The `ref` prop is required for `FloatingArrow`."));const b=Gu(),[w,x]=v.useState(!1);if(Oo(()=>{if(!o)return;He(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[$,C]=t.split("-"),k=$==="top"||$==="bottom";let E=d;(k&&i!=null&&i.x||!k&&i!=null&&i.y)&&(E=null);const P=u*2,z=P/2,L=s/2*(c/-8+1),O=l/2*c/4,T=!!f,I=E&&C==="end"?"bottom":"top";let j=E&&C==="end"?"right":"left";E&&w&&(j=C==="end"?"left":"right");const N=a?.x!=null?E||a.x:"",A=a?.y!=null?E||a.y:"",F=f||"M0,0"+(" H"+s)+(" L"+(s-L)+","+(l-O))+(" Q"+s/2+","+l+" "+L+","+(l-O))+" Z",D={top:T?"rotate(180deg)":"",left:T?"rotate(90deg)":"rotate(-90deg)",bottom:T?"":"rotate(180deg)",right:T?"rotate(-90deg)":"rotate(90deg)"}[$];return _.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:T?s:s+P,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[j]:N,[I]:A,[$]:k||T?"100%":"calc(100% - "+P/2+"px)",transform:[D,g].filter(M=>!!M).join(" "),...m},children:[P>0&&_.jsx("path",{clipPath:"url(#"+b+")",fill:"none",stroke:p,strokeWidth:P+(f?0:1),d:F}),_.jsx("path",{stroke:P&&!f?h.fill:"none",d:F}),_.jsx("clipPath",{id:b,children:_.jsx("rect",{x:-z,y:z*(T?-1:1),width:s+P,height:s})})]})});function Db(){const e=new Map;return{emit(r,n){var t;(t=e.get(r))==null||t.forEach(o=>o(n))},on(r,n){e.has(r)||e.set(r,new Set),e.get(r).add(n)},off(r,n){var t;(t=e.get(r))==null||t.delete(n)}}}const Eb=v.createContext(null),Mb=v.createContext(null),Rb=()=>{var e;return((e=v.useContext(Eb))==null?void 0:e.id)||null},Pb=()=>v.useContext(Mb);function Tb(e){const{open:r=!1,onOpenChange:n,elements:t}=e,o=Gu(),a=v.useRef({}),[i]=v.useState(()=>Db()),s=Rb()!=null;if(process.env.NODE_ENV!=="production"){const f=t.reference;f&&!oe(f)&&kb("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=v.useState(t.reference),u=bb((f,g,m)=>{a.current.openEvent=f?g:void 0,i.emit("openchange",{open:f,event:g,reason:m,nested:s}),n?.(f,g,m)}),d=v.useMemo(()=>({setPositionReference:c}),[]),p=v.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return v.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:p,events:i,floatingId:o,refs:d}),[r,u,p,i,o,d])}function Ib(e){e===void 0&&(e={});const{nodeId:r}=e,n=Tb({...e,elements:{reference:null,floating:null,...e.elements}}),t=e.rootContext||n,o=t.elements,[a,i]=v.useState(null),[s,l]=v.useState(null),u=o?.domReference||a,d=v.useRef(null),p=Pb();Oo(()=>{u&&(d.current=u)},[u]);const f=Zc({...e,elements:{...o,...s&&{reference:s}}}),g=v.useCallback(x=>{const $=oe(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l($),f.refs.setReference($)},[f.refs]),m=v.useCallback(x=>{(oe(x)||x===null)&&(d.current=x,i(x)),(oe(f.refs.reference.current)||f.refs.reference.current===null||x!==null&&!oe(x))&&f.refs.setReference(x)},[f.refs]),h=v.useMemo(()=>({...f.refs,setReference:m,setPositionReference:g,domReference:d}),[f.refs,m,g]),b=v.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),w=v.useMemo(()=>({...f,...t,refs:h,elements:b,nodeId:r}),[f,h,b,r,t]);return Oo(()=>{t.dataRef.current.floatingContext=w;const x=p?.nodesRef.current.find($=>$.id===r);x&&(x.context=w)}),v.useMemo(()=>({...f,context:w,refs:h,elements:b}),[f,h,b,w])}var vi=function(r,n){return vi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])},vi(r,n)};function Me(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");vi(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}var re=function(){return re=Object.assign||function(n){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},re.apply(this,arguments)};function ht(e,r,n){if(n||arguments.length===2)for(var t=0,o=r.length,a;t<o;t++)(a||!(t in r))&&(a||(a=Array.prototype.slice.call(r,0,t)),a[t]=r[t]);return e.concat(a||Array.prototype.slice.call(r))}var Ob=function(e){var r=e.showTimeSelectOnly,n=r===void 0?!1:r,t=e.showTime,o=t===void 0?!1:t,a=e.className,i=e.children,s=n?"Choose Time":"Choose Date".concat(o?" and Time":"");return v.default.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},Fb=function(e,r){var n=y.useRef(null),t=y.useRef(e);t.current=e;var o=y.useCallback(function(a){var i,s=a.composed&&a.composedPath&&a.composedPath().find(function(l){return l instanceof Node})||a.target;n.current&&!n.current.contains(s)&&(r&&s instanceof HTMLElement&&s.classList.contains(r)||(i=t.current)===null||i===void 0||i.call(t,a))},[r]);return y.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),n},da=function(e){var r=e.children,n=e.onClickOutside,t=e.className,o=e.containerRef,a=e.style,i=e.ignoreClass,s=Fb(n,i);return v.default.createElement("div",{className:t,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},Y;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(Y||(Y={}));function qu(){var e=typeof window<"u"?window:globalThis;return e}var Tr=12;function se(e){if(e==null)return new Date;var r=typeof e=="string"?Z_(e):B(e);return fa(r)?r:new Date}function Na(e,r,n,t,o){o===void 0&&(o=se());for(var a=Gn(n)||Gn(os()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var c=l[s],u=G_(e,c,o,{locale:a});if(fa(u)&&(!t||e===fe(u,c,n)))return u}return null}function fa(e,r){return Mo(e)&&!mt(e,new Date("1/1/1800"))}function fe(e,r,n){if(n==="en")return hl(e,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=n?Gn(n):void 0;return n&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),t=t||Gn(os()),hl(e,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Ke(e,r){var n=r.dateFormat,t=r.locale,o=Array.isArray(n)&&n.length>0?n[0]:n;return e&&fe(e,o,t)||""}var Ku=" - ";function Lb(e,r,n){if(!e&&!r)return"";var t=e?Ke(e,n):"",o=r?Ke(r,n):"",a=n.rangeSeparator||Ku;return"".concat(t).concat(a).concat(o)}function zb(e,r){if(!e?.length)return"";var n=e[0]?Ke(e[0],r):"";if(e.length===1)return n;if(e.length===2&&e[1]){var t=Ke(e[1],r);return"".concat(n,", ").concat(t)}var o=e.length-1;return"".concat(n," (+").concat(o,")")}function Aa(e,r){var n=r.hour,t=n===void 0?0:n,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return co(uo(fo(e,s),a),t)}function Nb(e){return es(e)}function Ab(e,r){return fe(e,"ddd",r)}function po(e){return wn(e)}function Xt(e,r,n){var t=Gn(r||os());return Nt(e,{locale:t,weekStartsOn:n})}function Pt(e){return Fu(e)}function ir(e){return ua(e)}function wl(e){return gi(e)}function xl(){return wn(se())}function Sl(e){return Iu(e)}function jb(e){return Zh(e)}function Hb(e){return Ou(e)}function dt(e,r){return e&&r?Q_(e,r):!e&&!r}function ze(e,r){return e&&r?K_(e,r):!e&&!r}function Fo(e,r){return e&&r?U_(e,r):!e&&!r}function ne(e,r){return e&&r?Qh(e,r):!e&&!r}function dn(e,r){return e&&r?Xv(e,r):!e&&!r}function ln(e,r,n){var t,o=wn(r),a=Iu(n);try{t=Sr(e,{start:o,end:a})}catch{t=!1}return t}function os(){var e=qu();return e.__localeId__}function Gn(e){if(typeof e=="string"){var r=qu();return r.__localeData__?r.__localeData__[e]:void 0}else return e}function Yb(e,r,n){return r(fe(e,"EEEE",n))}function Vb(e,r){return fe(e,"EEEEEE",r)}function Bb(e,r){return fe(e,"EEE",r)}function as(e,r){return fe(Ue(se(),e),"LLLL",r)}function Uu(e,r){return fe(Ue(se(),e),"LLL",r)}function Wb(e,r){return fe(Tn(se(),e),"QQQ",r)}function Qe(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.maxDate,a=n.excludeDates,i=n.excludeDateIntervals,s=n.includeDates,l=n.includeDateIntervals,c=n.filterDate;return Ir(e,{minDate:t,maxDate:o})||a&&a.some(function(u){return u instanceof Date?ne(e,u):ne(e,u.date)})||i&&i.some(function(u){var d=u.start,p=u.end;return Sr(e,{start:d,end:p})})||s&&!s.some(function(u){return ne(e,u)})||l&&!l.some(function(u){var d=u.start,p=u.end;return Sr(e,{start:d,end:p})})||c&&!c(se(e))||!1}function is(e,r){var n=r===void 0?{}:r,t=n.excludeDates,o=n.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return Sr(e,{start:i,end:s})}):t&&t.some(function(a){var i;return a instanceof Date?ne(e,a):ne(e,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Qu(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.maxDate,a=n.excludeDates,i=n.includeDates,s=n.filterDate;return Ir(e,{minDate:t?Fu(t):void 0,maxDate:o?Ou(o):void 0})||a?.some(function(l){return ze(e,l instanceof Date?l:l.date)})||i&&!i.some(function(l){return ze(e,l)})||s&&!s(se(e))||!1}function qr(e,r,n,t){var o=ee(e),a=Fe(e),i=ee(r),s=Fe(r),l=ee(t);return o===i&&o===l?a<=n&&n<=s:o<i?l===o&&a<=n||l===i&&s>=n||l<i&&l>o:!1}function Gb(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.maxDate,a=n.excludeDates,i=n.includeDates;return Ir(e,{minDate:t,maxDate:o})||a&&a.some(function(s){return ze(s instanceof Date?s:s.date,e)})||i&&!i.some(function(s){return ze(s,e)})||!1}function Kr(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.maxDate,a=n.excludeDates,i=n.includeDates,s=n.filterDate;return Ir(e,{minDate:t,maxDate:o})||a?.some(function(l){return Fo(e,l instanceof Date?l:l.date)})||i&&!i.some(function(l){return Fo(e,l)})||s&&!s(se(e))||!1}function Ur(e,r,n){if(!r||!n||!Mo(r)||!Mo(n))return!1;var t=ee(r),o=ee(n);return t<=e&&o>=e}function go(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.maxDate,a=n.excludeDates,i=n.includeDates,s=n.filterDate,l=new Date(e,0,1);return Ir(l,{minDate:t?ua(t):void 0,maxDate:o?Lu(o):void 0})||a?.some(function(c){return dt(l,c instanceof Date?c:c.date)})||i&&!i.some(function(c){return dt(l,c)})||s&&!s(se(l))||!1}function Qr(e,r,n,t){var o=ee(e),a=mn(e),i=ee(r),s=mn(r),l=ee(t);return o===i&&o===l?a<=n&&n<=s:o<i?l===o&&a<=n||l===i&&s>=n||l<i&&l>o:!1}function Ir(e,r){var n,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(n=o&&Bn(e,o)<0||a&&Bn(e,a)>0)!==null&&n!==void 0?n:!1}function $l(e,r){return r.some(function(n){return Mt(n)===Mt(e)&&Rt(n)===Rt(e)&&Qt(n)===Qt(e)})}function kl(e,r){var n=r===void 0?{}:r,t=n.excludeTimes,o=n.includeTimes,a=n.filterTime;return t&&$l(e,t)||o&&!$l(e,o)||a&&!a(e)||!1}function Cl(e,r){var n=r.minTime,t=r.maxTime;if(!n||!t)throw new Error("Both minTime and maxTime props required");var o=se();o=co(o,Mt(e)),o=uo(o,Rt(e)),o=fo(o,Qt(e));var a=se();a=co(a,Mt(n)),a=uo(a,Rt(n)),a=fo(a,Qt(n));var i=se();i=co(i,Mt(t)),i=uo(i,Rt(t)),i=fo(i,Qt(t));var s;try{s=!Sr(o,{start:a,end:i})}catch{s=!1}return s}function Dl(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.includeDates,a=hn(e,1);return t&&Ro(t,a)>0||o&&o.every(function(i){return Ro(i,a)>0})||!1}function El(e,r){var n=r===void 0?{}:r,t=n.maxDate,o=n.includeDates,a=it(e,1);return t&&Ro(a,t)>0||o&&o.every(function(i){return Ro(a,i)>0})||!1}function qb(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.includeDates,a=ua(e),i=Wu(a);return t&&Po(t,i)>0||o&&o.every(function(s){return Po(s,i)>0})||!1}function Kb(e,r){var n=r===void 0?{}:r,t=n.maxDate,o=n.includeDates,a=Lu(e),i=Ji(a,1);return t&&Po(i,t)>0||o&&o.every(function(s){return Po(i,s)>0})||!1}function Ml(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.includeDates,a=Wn(e,1);return t&&To(t,a)>0||o&&o.every(function(i){return To(i,a)>0})||!1}function Ub(e,r){var n=r===void 0?{}:r,t=n.minDate,o=n.yearItemNumber,a=o===void 0?Tr:o,i=ir(Wn(e,a)),s=kt(i,a).endPeriod,l=t&&ee(t);return l&&l>s||!1}function Rl(e,r){var n=r===void 0?{}:r,t=n.maxDate,o=n.includeDates,a=Dt(e,1);return t&&To(a,t)>0||o&&o.every(function(i){return To(a,i)>0})||!1}function Qb(e,r){var n=r===void 0?{}:r,t=n.maxDate,o=n.yearItemNumber,a=o===void 0?Tr:o,i=Dt(e,a),s=kt(i,a).startPeriod,l=t&&ee(t);return l&&l<s||!1}function Xu(e){var r=e.minDate,n=e.includeDates;if(n&&r){var t=n.filter(function(o){return Bn(o,r)>=0});return ul(t)}else return n?ul(n):r}function Zu(e){var r=e.maxDate,n=e.includeDates;if(n&&r){var t=n.filter(function(o){return Bn(o,r)<=0});return cl(t)}else return n?cl(n):r}function Pl(e,r){var n;e===void 0&&(e=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var t=new Map,o=0,a=e.length;o<a;o++){var i=e[o];if(Et(i)){var s=fe(i,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(r)||(l.push(r),t.set(s,l))}else if(typeof i=="object"){var c=Object.keys(i),u=(n=c[0])!==null&&n!==void 0?n:"",d=i[u];if(typeof u=="string"&&Array.isArray(d))for(var p=0,f=d.length;p<f;p++){var g=d[p];if(g){var s=fe(g,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(u)||(l.push(u),t.set(s,l))}}}}return t}function Xb(e,r){return e.length!==r.length?!1:e.every(function(n,t){return n===r[t]})}function Zb(e,r){e===void 0&&(e=[]),r===void 0&&(r="react-datepicker__day--holidays");var n=new Map;return e.forEach(function(t){var o=t.date,a=t.holidayName;if(Et(o)){var i=fe(o,"MM.dd.yyyy"),s=n.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&Xb(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?ht(ht([],l,!0),[a],!1):[a],n.set(i,s)}}}),n}function Jb(e,r,n,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=e,c=o[s];c&&(l=Gh(l,Mt(c)),l=pi(l,Rt(c)),l=Uh(l,Qt(c)));var u=pi(e,(n+1)*t);Jt(l,r)&&mt(l,u)&&c!=null&&i.push(c)}return i}function Tl(e){return e<10?"0".concat(e):"".concat(e)}function kt(e,r){r===void 0&&(r=Tr);var n=Math.ceil(ee(e)/r)*r,t=n-(r-1);return{startPeriod:t,endPeriod:n}}function ey(e){var r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+n-+r)/36e5)}function Il(e){var r=e.getSeconds(),n=e.getMilliseconds();return B(e.getTime()-r*1e3-n)}function ty(e,r){return Il(e).getTime()===Il(r).getTime()}function Ol(e){if(!Et(e))throw new Error("Invalid date");var r=new Date(e);return r.setHours(0,0,0,0),r}function ja(e,r){if(!Et(e)||!Et(r))throw new Error("Invalid date received");var n=Ol(e),t=Ol(r);return mt(n,t)}function Ju(e){return e.key===Y.Space}var ny=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;return t.inputRef=v.default.createRef(),t.onTimeChange=function(o){var a,i;t.setState({time:o});var s=t.props.date,l=s instanceof Date&&!isNaN(+s),c=l?s:new Date;if(o?.includes(":")){var u=o.split(":"),d=u[0],p=u[1];c.setHours(Number(d)),c.setMinutes(Number(p))}(i=(a=t.props).onChange)===null||i===void 0||i.call(a,c)},t.renderTimeInput=function(){var o=t.state.time,a=t.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?y.cloneElement(l,{date:i,value:o,onChange:t.onTimeChange}):v.default.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var c;(c=t.inputRef.current)===null||c===void 0||c.focus()},required:!0,value:o,onChange:function(c){t.onTimeChange(c.target.value||s)}})},t.state={time:t.props.timeString},t}return r.getDerivedStateFromProps=function(n,t){return n.timeString!==t.time?{time:n.timeString}:null},r.prototype.render=function(){return v.default.createElement("div",{className:"react-datepicker__input-time-container"},v.default.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),v.default.createElement("div",{className:"react-datepicker-time__input-container"},v.default.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r})(y.Component),ry=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.dayEl=y.createRef(),n.handleClick=function(t){!n.isDisabled()&&n.props.onClick&&n.props.onClick(t)},n.handleMouseEnter=function(t){!n.isDisabled()&&n.props.onMouseEnter&&n.props.onMouseEnter(t)},n.handleOnKeyDown=function(t){var o,a,i=t.key;i===Y.Space&&(t.preventDefault(),t.key=Y.Enter),(a=(o=n.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},n.isSameDay=function(t){return ne(n.props.day,t)},n.isKeyboardSelected=function(){var t;if(n.props.disabledKeyboardNavigation)return!1;var o=n.props.selectsMultiple?(t=n.props.selectedDates)===null||t===void 0?void 0:t.some(function(i){return n.isSameDayOrWeek(i)}):n.isSameDayOrWeek(n.props.selected),a=n.props.preSelection&&n.isDisabled(n.props.preSelection);return!o&&n.isSameDayOrWeek(n.props.preSelection)&&!a},n.isDisabled=function(t){return t===void 0&&(t=n.props.day),Qe(t,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(){return is(n.props.day,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.isStartOfWeek=function(){return ne(n.props.day,Xt(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameWeek=function(t){return n.props.showWeekPicker&&ne(t,Xt(n.props.day,n.props.locale,n.props.calendarStartDay))},n.isSameDayOrWeek=function(t){return n.isSameDay(t)||n.isSameWeek(t)},n.getHighLightedClass=function(){var t=n.props,o=t.day,a=t.highlightDates;if(!a)return!1;var i=fe(o,"MM.dd.yyyy");return a.get(i)},n.getHolidaysClass=function(){var t,o=n.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=fe(a,"MM.dd.yyyy");return i.has(s)?[(t=i.get(s))===null||t===void 0?void 0:t.className]:[void 0]},n.isInRange=function(){var t=n.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ln(o,a,i)},n.isInSelectingRange=function(){var t,o=n.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,c=o.selectsDisabledDaysInRange,u=o.startDate,d=o.swapRange,p=o.endDate,f=(t=n.props.selectingDate)!==null&&t!==void 0?t:n.props.preSelection;if(!(i||s||l)||!f||!c&&n.isDisabled())return!1;if(i&&p&&(mt(f,p)||dn(f,p)))return ln(a,f,p);if(s&&u&&(Jt(f,u)||dn(f,u)))return ln(a,u,f);if(l&&u&&!p){if(dn(f,u)||Jt(f,u))return ln(a,u,f);if(d&&mt(f,u))return ln(a,f,u)}return!1},n.isSelectingRangeStart=function(){var t;if(!n.isInSelectingRange())return!1;var o=n.props,a=o.day,i=o.startDate,s=o.selectsStart,l=o.swapRange,c=o.selectsRange,u=(t=n.props.selectingDate)!==null&&t!==void 0?t:n.props.preSelection;return s?ne(a,u):c&&l&&i&&u?ne(a,mt(u,i)?u:i):ne(a,i)},n.isSelectingRangeEnd=function(){var t;if(!n.isInSelectingRange())return!1;var o=n.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,c=o.swapRange,u=o.startDate,d=(t=n.props.selectingDate)!==null&&t!==void 0?t:n.props.preSelection;return s?ne(a,d):l&&c&&u&&d?ne(a,mt(d,u)?u:d):l?ne(a,d):ne(a,i)},n.isRangeStart=function(){var t=n.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ne(a,o)},n.isRangeEnd=function(){var t=n.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ne(i,o)},n.isWeekend=function(){var t=qv(n.props.day);return t===0||t===6},n.isAfterMonth=function(){return n.props.month!==void 0&&(n.props.month+1)%12===Fe(n.props.day)},n.isBeforeMonth=function(){return n.props.month!==void 0&&(Fe(n.props.day)+1)%12===n.props.month},n.isCurrentDay=function(){return n.isSameDay(se())},n.isSelected=function(){var t;return n.props.selectsMultiple?(t=n.props.selectedDates)===null||t===void 0?void 0:t.some(function(o){return n.isSameDayOrWeek(o)}):n.isSameDayOrWeek(n.props.selected)},n.getClassNames=function(t){var o=n.props.dayClassName?n.props.dayClassName(t):void 0;return De("react-datepicker__day",o,"react-datepicker__day--"+Ab(n.props.day),{"react-datepicker__day--disabled":n.isDisabled(),"react-datepicker__day--excluded":n.isExcluded(),"react-datepicker__day--selected":n.isSelected(),"react-datepicker__day--keyboard-selected":n.isKeyboardSelected(),"react-datepicker__day--range-start":n.isRangeStart(),"react-datepicker__day--range-end":n.isRangeEnd(),"react-datepicker__day--in-range":n.isInRange(),"react-datepicker__day--in-selecting-range":n.isInSelectingRange(),"react-datepicker__day--selecting-range-start":n.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":n.isSelectingRangeEnd(),"react-datepicker__day--today":n.isCurrentDay(),"react-datepicker__day--weekend":n.isWeekend(),"react-datepicker__day--outside-month":n.isAfterMonth()||n.isBeforeMonth()},n.getHighLightedClass(),n.getHolidaysClass())},n.getAriaLabel=function(){var t=n.props,o=t.day,a=t.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=t.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,c=n.isDisabled()||n.isExcluded()?l:i;return"".concat(c," ").concat(fe(o,"PPPP",n.props.locale))},n.getTitle=function(){var t=n.props,o=t.day,a=t.holidays,i=a===void 0?new Map:a,s=t.excludeDates,l=fe(o,"MM.dd.yyyy"),c=[];return i.has(l)&&c.push.apply(c,i.get(l).holidayNames),n.isExcluded()&&c.push(s?.filter(function(u){return u instanceof Date?ne(u,o):ne(u?.date,o)}).map(function(u){if(!(u instanceof Date))return u?.message})),c.join(", ")},n.getTabIndex=function(){var t=n.props.selected,o=n.props.preSelection,a=!(n.props.showWeekPicker&&(n.props.showWeekNumber||!n.isStartOfWeek()))&&(n.isKeyboardSelected()||n.isSameDay(t)&&ne(o,t))?0:-1;return a},n.handleFocusDay=function(){var t;n.shouldFocusDay()&&((t=n.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},n.renderDayContents=function(){return n.props.monthShowsDuplicateDaysEnd&&n.isAfterMonth()||n.props.monthShowsDuplicateDaysStart&&n.isBeforeMonth()?null:n.props.renderDayContents?n.props.renderDayContents(vl(n.props.day),n.props.day):vl(n.props.day)},n.render=function(){return v.default.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.props.usePointerEvent?void 0:n.handleMouseEnter,onPointerEnter:n.props.usePointerEvent?n.handleMouseEnter:void 0,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"gridcell",title:n.getTitle(),"aria-disabled":n.isDisabled(),"aria-current":n.isCurrentDay()?"date":void 0,"aria-selected":n.isSelected()||n.isInRange()},n.renderDayContents(),n.getTitle()!==""&&v.default.createElement("span",{className:"overlay"},n.getTitle()))},n}return r.prototype.componentDidMount=function(){this.handleFocusDay()},r.prototype.componentDidUpdate=function(){this.handleFocusDay()},r.prototype.shouldFocusDay=function(){var n=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(n=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(n=!1),this.isDayActiveElement()&&(n=!0),this.isDuplicateDay()&&(n=!1)),n},r.prototype.isDayActiveElement=function(){var n,t,o;return((t=(n=this.props.containerRef)===null||n===void 0?void 0:n.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((o=document.activeElement)===null||o===void 0?void 0:o.classList.contains("react-datepicker__day"))},r.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},r})(y.Component),oy=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.weekNumberEl=y.createRef(),n.handleClick=function(t){n.props.onClick&&n.props.onClick(t)},n.handleOnKeyDown=function(t){var o,a,i=t.key;i===Y.Space&&(t.preventDefault(),t.key=Y.Enter),(a=(o=n.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!ne(n.props.date,n.props.selected)&&ne(n.props.date,n.props.preSelection)},n.getTabIndex=function(){return n.props.showWeekPicker&&n.props.showWeekNumber&&(n.isKeyboardSelected()||ne(n.props.date,n.props.selected)&&ne(n.props.preSelection,n.props.selected))?0:-1},n.handleFocusWeekNumber=function(t){var o=!1;n.getTabIndex()===0&&!t?.isInputFocused&&ne(n.props.date,n.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),n.props.inline&&!n.props.shouldFocusDayInline&&(o=!1),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&n.weekNumberEl.current&&n.weekNumberEl.current.focus({preventScroll:!0})},n}return Object.defineProperty(r,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},r.prototype.componentDidUpdate=function(n){this.handleFocusWeekNumber(n)},r.prototype.render=function(){var n=this.props,t=n.weekNumber,o=n.isWeekDisabled,a=n.ariaLabelPrefix,i=a===void 0?r.defaultProps.ariaLabelPrefix:a,s=n.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!o,"react-datepicker__week-number--selected":!!s&&ne(this.props.date,this.props.selected)};return v.default.createElement("div",{ref:this.weekNumberEl,className:De(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},t)},r})(y.Component),ay=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.isDisabled=function(t){return Qe(t,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.handleDayClick=function(t,o){n.props.onDayClick&&n.props.onDayClick(t,o)},n.handleDayMouseEnter=function(t){n.props.onDayMouseEnter&&n.props.onDayMouseEnter(t)},n.handleWeekClick=function(t,o,a){for(var i,s,l,c=new Date(t),u=0;u<7;u++){var d=new Date(t);d.setDate(d.getDate()+u);var p=!n.isDisabled(d);if(p){c=d;break}}typeof n.props.onWeekSelect=="function"&&n.props.onWeekSelect(c,o,a),n.props.showWeekPicker&&n.handleDayClick(c,a),((i=n.props.shouldCloseOnSelect)!==null&&i!==void 0?i:r.defaultProps.shouldCloseOnSelect)&&((l=(s=n.props).setOpen)===null||l===void 0||l.call(s,!1))},n.formatWeekNumber=function(t){return n.props.formatWeekNumber?n.props.formatWeekNumber(t):Nb(t)},n.isWeekDisabled=function(){for(var t=n.startOfWeek(),o=ot(t,6),a=new Date(t);a<=o;){if(!n.isDisabled(a))return!1;a=ot(a,1)}return!0},n.renderDays=function(){var t=n.startOfWeek(),o=[],a=n.formatWeekNumber(t);if(n.props.showWeekNumber){var i=n.props.onWeekSelect||n.props.showWeekPicker?n.handleWeekClick.bind(n,t,a):void 0;o.push(v.default.createElement(oy,re({key:"W"},r.defaultProps,n.props,{weekNumber:a,isWeekDisabled:n.isWeekDisabled(),date:t,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=ot(t,s);return v.default.createElement(ry,re({},r.defaultProps,n.props,{ariaLabelPrefixWhenEnabled:n.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:n.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:n.handleDayClick.bind(n,l),onMouseEnter:n.handleDayMouseEnter.bind(n,l)}))}))},n.startOfWeek=function(){return Xt(n.props.day,n.props.locale,n.props.calendarStartDay)},n.isKeyboardSelected=function(){return!n.props.disabledKeyboardNavigation&&!ne(n.startOfWeek(),n.props.selected)&&ne(n.startOfWeek(),n.props.preSelection)},n}return Object.defineProperty(r,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var n={"react-datepicker__week":!0,"react-datepicker__week--selected":ne(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},t=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return v.default.createElement("div",{className:De(n,t),role:"row"},this.renderDays())},r})(y.Component),rr,iy=6,zn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},Ha=(rr={},rr[zn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},rr[zn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},rr[zn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},rr),Xr=1;function Fl(e,r){return e?zn.FOUR_COLUMNS:r?zn.TWO_COLUMNS:zn.THREE_COLUMNS}var sy=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.MONTH_REFS=ht([],Array(12),!0).map(function(){return y.createRef()}),n.QUARTER_REFS=ht([],Array(4),!0).map(function(){return y.createRef()}),n.isDisabled=function(t){return Qe(t,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals,includeDateIntervals:n.props.includeDateIntervals,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(t){return is(t,{excludeDates:n.props.excludeDates,excludeDateIntervals:n.props.excludeDateIntervals})},n.handleDayClick=function(t,o){var a,i;(i=(a=n.props).onDayClick)===null||i===void 0||i.call(a,t,o,n.props.orderInDisplay)},n.handleDayMouseEnter=function(t){var o,a;(a=(o=n.props).onDayMouseEnter)===null||a===void 0||a.call(o,t)},n.handleMouseLeave=function(){var t,o;(o=(t=n.props).onMouseLeave)===null||o===void 0||o.call(t)},n.isRangeStartMonth=function(t){var o=n.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ze(Ue(a,t),i)},n.isRangeStartQuarter=function(t){var o=n.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Fo(Tn(a,t),i)},n.isRangeEndMonth=function(t){var o=n.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ze(Ue(a,t),s)},n.isRangeEndQuarter=function(t){var o=n.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Fo(Tn(a,t),s)},n.isInSelectingRangeMonth=function(t){var o,a=n.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,c=a.selectsRange,u=a.startDate,d=a.endDate,p=(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection;return!(s||l||c)||!p?!1:s&&d?qr(p,d,t,i):l&&u||c&&u&&!d?qr(u,p,t,i):!1},n.isSelectingMonthRangeStart=function(t){var o;if(!n.isInSelectingRangeMonth(t))return!1;var a=n.props,i=a.day,s=a.startDate,l=a.selectsStart,c=Ue(i,t),u=(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection;return l?ze(c,u):ze(c,s)},n.isSelectingMonthRangeEnd=function(t){var o;if(!n.isInSelectingRangeMonth(t))return!1;var a=n.props,i=a.day,s=a.endDate,l=a.selectsEnd,c=a.selectsRange,u=Ue(i,t),d=(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection;return l||c?ze(u,d):ze(u,s)},n.isInSelectingRangeQuarter=function(t){var o,a=n.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,c=a.selectsRange,u=a.startDate,d=a.endDate,p=(o=n.props.selectingDate)!==null&&o!==void 0?o:n.props.preSelection;return!(s||l||c)||!p?!1:s&&d?Qr(p,d,t,i):l&&u||c&&u&&!d?Qr(u,p,t,i):!1},n.isWeekInMonth=function(t){var o=n.props.day,a=ot(t,6);return ze(t,o)||ze(a,o)},n.isCurrentMonth=function(t,o){return ee(t)===ee(se())&&o===Fe(se())},n.isCurrentQuarter=function(t,o){return ee(t)===ee(se())&&o===mn(se())},n.isSelectedMonth=function(t,o,a){return Fe(a)===o&&ee(t)===ee(a)},n.isSelectMonthInList=function(t,o,a){return a.some(function(i){return n.isSelectedMonth(t,o,i)})},n.isSelectedQuarter=function(t,o,a){return mn(t)===o&&ee(t)===ee(a)},n.isMonthSelected=function(){var t=n.props,o=t.day,a=t.selected,i=t.selectedDates,s=t.selectsMultiple,l=Fe(o);return s?i?.some(function(c){return n.isSelectedMonth(o,l,c)}):!!a&&n.isSelectedMonth(o,l,a)},n.renderWeeks=function(){for(var t=[],o=n.props.fixedHeight,a=0,i=!1,s=Xt(Pt(n.props.day),n.props.locale,n.props.calendarStartDay),l=function(g){return n.props.showWeekPicker?Xt(g,n.props.locale,n.props.calendarStartDay):n.props.preSelection},c=function(g){return n.props.showWeekPicker?Xt(g,n.props.locale,n.props.calendarStartDay):n.props.selected},u=n.props.selected?c(n.props.selected):void 0,d=n.props.preSelection?l(n.props.preSelection):void 0;t.push(v.default.createElement(ay,re({},n.props,{ariaLabelPrefix:n.props.weekAriaLabelPrefix,key:a,day:s,month:Fe(n.props.day),onDayClick:n.handleDayClick,onDayMouseEnter:n.handleDayMouseEnter,selected:u,preSelection:d,showWeekNumber:n.props.showWeekNumbers}))),!i;){a++,s=Eo(s,1);var p=o&&a>=iy,f=!o&&!n.isWeekInMonth(s);if(p||f)if(n.props.peekNextMonth)i=!0;else break}return t},n.onMonthClick=function(t,o){var a=n.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||n.handleDayClick(Pt(s),t)},n.onMonthMouseEnter=function(t){var o=n.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||n.handleDayMouseEnter(Pt(i))},n.handleMonthNavigation=function(t,o){var a,i,s,l;(i=(a=n.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=n.MONTH_REFS[t])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},n.handleKeyboardNavigation=function(t,o,a){var i,s=n.props,l=s.selected,c=s.preSelection,u=s.setPreSelection,d=s.minDate,p=s.maxDate,f=s.showFourColumnMonthYearPicker,g=s.showTwoColumnMonthYearPicker;if(c){var m=Fl(f,g),h=n.getVerticalOffset(m),b=(i=Ha[m])===null||i===void 0?void 0:i.grid,w=function(E,P,z){var L,O,T=P,I=z;switch(E){case Y.ArrowRight:T=it(P,Xr),I=z===11?0:z+Xr;break;case Y.ArrowLeft:T=hn(P,Xr),I=z===0?11:z-Xr;break;case Y.ArrowUp:T=hn(P,h),I=!((L=b?.[0])===null||L===void 0)&&L.includes(z)?z+12-h:z-h;break;case Y.ArrowDown:T=it(P,h),I=!((O=b?.[b.length-1])===null||O===void 0)&&O.includes(z)?z-12+h:z+h;break}return{newCalculatedDate:T,newCalculatedMonth:I}},x=function(E,P,z){for(var L=40,O=E,T=!1,I=0,j=w(O,P,z),N=j.newCalculatedDate,A=j.newCalculatedMonth;!T;){if(I>=L){N=P,A=z;break}if(d&&N<d){O=Y.ArrowRight;var F=w(O,N,A);N=F.newCalculatedDate,A=F.newCalculatedMonth}if(p&&N>p){O=Y.ArrowLeft;var F=w(O,N,A);N=F.newCalculatedDate,A=F.newCalculatedMonth}if(Gb(N,n.props)){var F=w(O,N,A);N=F.newCalculatedDate,A=F.newCalculatedMonth}else T=!0;I++}return{newCalculatedDate:N,newCalculatedMonth:A}};if(o===Y.Enter){n.isMonthDisabled(a)||(n.onMonthClick(t,a),u?.(l));return}var $=x(o,c,a),C=$.newCalculatedDate,k=$.newCalculatedMonth;switch(o){case Y.ArrowRight:case Y.ArrowLeft:case Y.ArrowUp:case Y.ArrowDown:n.handleMonthNavigation(k,C);break}}},n.getVerticalOffset=function(t){var o,a;return(a=(o=Ha[t])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},n.onMonthKeyDown=function(t,o){var a=n.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=t.key;l!==Y.Tab&&t.preventDefault(),i||n.handleKeyboardNavigation(t,l,o),s&&s(t)},n.onQuarterClick=function(t,o){var a=Tn(n.props.day,o);Kr(a,n.props)||n.handleDayClick(wl(a),t)},n.onQuarterMouseEnter=function(t){var o=Tn(n.props.day,t);Kr(o,n.props)||n.handleDayMouseEnter(wl(o))},n.handleQuarterNavigation=function(t,o){var a,i,s,l;n.isDisabled(o)||n.isExcluded(o)||((i=(a=n.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=n.QUARTER_REFS[t-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},n.onQuarterKeyDown=function(t,o){var a,i,s=t.key;if(!n.props.disabledKeyboardNavigation)switch(s){case Y.Enter:n.onQuarterClick(t,o),(i=(a=n.props).setPreSelection)===null||i===void 0||i.call(a,n.props.selected);break;case Y.ArrowRight:if(!n.props.preSelection)break;n.handleQuarterNavigation(o===4?1:o+1,Ji(n.props.preSelection,1));break;case Y.ArrowLeft:if(!n.props.preSelection)break;n.handleQuarterNavigation(o===1?4:o-1,Wu(n.props.preSelection));break}},n.isMonthDisabledForLabelDate=function(t){var o,a=n.props,i=a.day,s=a.minDate,l=a.maxDate,c=a.excludeDates,u=a.includeDates,d=Ue(i,t);return{isDisabled:(o=(s||l||c||u)&&Qu(d,n.props))!==null&&o!==void 0?o:!1,labelDate:d}},n.isMonthDisabled=function(t){var o=n.isMonthDisabledForLabelDate(t).isDisabled;return o},n.getMonthClassNames=function(t){var o=n.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,c=o.monthClassName,u=c?c(Ue(a,t)):void 0,d=n.getSelection();return De("react-datepicker__month-text","react-datepicker__month-".concat(t),u,{"react-datepicker__month-text--disabled":n.isMonthDisabled(t),"react-datepicker__month-text--selected":d?n.isSelectMonthInList(a,t,d):void 0,"react-datepicker__month-text--keyboard-selected":!n.props.disabledKeyboardNavigation&&l&&n.isSelectedMonth(a,t,l)&&!n.isMonthSelected()&&!n.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":n.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":i&&s?qr(i,s,t,a):void 0,"react-datepicker__month-text--range-start":n.isRangeStartMonth(t),"react-datepicker__month-text--range-end":n.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":n.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":n.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":n.isCurrentMonth(a,t)})},n.getTabIndex=function(t){if(n.props.preSelection==null)return"-1";var o=Fe(n.props.preSelection),a=n.isMonthDisabledForLabelDate(o).isDisabled,i=t===o&&!(a||n.props.disabledKeyboardNavigation)?"0":"-1";return i},n.getQuarterTabIndex=function(t){if(n.props.preSelection==null)return"-1";var o=mn(n.props.preSelection),a=Kr(n.props.day,n.props),i=t===o&&!(a||n.props.disabledKeyboardNavigation)?"0":"-1";return i},n.getAriaLabel=function(t){var o=n.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,c=o.day,u=o.locale,d=Ue(c,t),p=n.isDisabled(d)||n.isExcluded(d)?l:i;return"".concat(p," ").concat(fe(d,"MMMM yyyy",u))},n.getQuarterClassNames=function(t){var o=n.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,c=o.minDate,u=o.maxDate,d=o.excludeDates,p=o.includeDates,f=o.filterDate,g=o.preSelection,m=o.disabledKeyboardNavigation,h=(c||u||d||p||f)&&Kr(Tn(a,t),n.props);return De("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":h,"react-datepicker__quarter-text--selected":l?n.isSelectedQuarter(a,t,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!m&&g&&n.isSelectedQuarter(a,t,g)&&!h,"react-datepicker__quarter-text--in-selecting-range":n.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":i&&s?Qr(i,s,t,a):void 0,"react-datepicker__quarter-text--range-start":n.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":n.isRangeEndQuarter(t),"react-datepicker__quarter-text--today":n.isCurrentQuarter(a,t)})},n.getMonthContent=function(t){var o=n.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,c=Uu(t,s),u=as(t,s);return i?i(t,c,u,l):a?u:c},n.getQuarterContent=function(t){var o,a=n.props,i=a.renderQuarterContent,s=a.locale,l=Wb(t,s);return(o=i?.(t,l))!==null&&o!==void 0?o:l},n.renderMonths=function(){var t,o=n.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,c=(t=Ha[Fl(i,a)])===null||t===void 0?void 0:t.grid;return c?.map(function(u,d){return v.default.createElement("div",{className:"react-datepicker__month-wrapper",key:d},u.map(function(p,f){return v.default.createElement("div",{ref:n.MONTH_REFS[p],key:f,onClick:function(g){n.onMonthClick(g,p)},onKeyDown:function(g){Ju(g)&&(g.preventDefault(),g.key=Y.Enter),n.onMonthKeyDown(g,p)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onMonthMouseEnter(p)},onPointerEnter:n.props.usePointerEvent?function(){return n.onMonthMouseEnter(p)}:void 0,tabIndex:Number(n.getTabIndex(p)),className:n.getMonthClassNames(p),"aria-disabled":n.isMonthDisabled(p),role:"option","aria-label":n.getAriaLabel(p),"aria-current":n.isCurrentMonth(s,p)?"date":void 0,"aria-selected":l?n.isSelectedMonth(s,p,l):void 0},n.getMonthContent(p))}))})},n.renderQuarters=function(){var t=n.props,o=t.day,a=t.selected,i=[1,2,3,4];return v.default.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return v.default.createElement("div",{key:l,ref:n.QUARTER_REFS[l],role:"option",onClick:function(c){n.onQuarterClick(c,s)},onKeyDown:function(c){n.onQuarterKeyDown(c,s)},onMouseEnter:n.props.usePointerEvent?void 0:function(){return n.onQuarterMouseEnter(s)},onPointerEnter:n.props.usePointerEvent?function(){return n.onQuarterMouseEnter(s)}:void 0,className:n.getQuarterClassNames(s),"aria-selected":a?n.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(n.getQuarterTabIndex(s)),"aria-current":n.isCurrentQuarter(o,s)?"date":void 0},n.getQuarterContent(s))}))},n.getClassNames=function(){var t=n.props,o=t.selectingDate,a=t.selectsStart,i=t.selectsEnd,s=t.showMonthYearPicker,l=t.showQuarterYearPicker,c=t.showWeekPicker;return De("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":c})},n}return r.prototype.getSelection=function(){var n=this.props,t=n.selected,o=n.selectedDates,a=n.selectsMultiple;if(a)return o;if(t)return[t]},r.prototype.render=function(){var n=this.props,t=n.showMonthYearPicker,o=n.showQuarterYearPicker,a=n.day,i=n.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"",c=t||o;return c?v.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(fe(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():this.renderQuarters()):v.default.createElement("div",{role:"table"},this.props.dayNamesHeader&&v.default.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),v.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(l).concat(fe(a,"MMMM, yyyy",this.props.locale)),role:"rowgroup"},this.renderWeeks()))},r})(y.Component),ly=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.monthOptionButtonsRef={},n.isSelectedMonth=function(t){return n.props.month===t},n.handleOptionKeyDown=function(t,o){var a;switch(o.key){case"Enter":o.preventDefault(),n.onChange(t);break;case"Escape":o.preventDefault(),n.props.onCancel();break;case"ArrowUp":case"ArrowDown":{o.preventDefault();var i=(t+(o.key==="ArrowUp"?-1:1)+n.props.monthNames.length)%n.props.monthNames.length;(a=n.monthOptionButtonsRef[i])===null||a===void 0||a.focus();break}}},n.renderOptions=function(){return n.monthOptionButtonsRef={},n.props.monthNames.map(function(t,o){return v.default.createElement("div",{ref:function(a){n.monthOptionButtonsRef[o]=a,n.isSelectedMonth(o)&&a?.focus()},role:"button",tabIndex:0,className:n.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:n.onChange.bind(n,o),onKeyDown:n.handleOptionKeyDown.bind(n,o),"aria-selected":n.isSelectedMonth(o)?"true":void 0},n.isSelectedMonth(o)?v.default.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},n.onChange=function(t){return n.props.onChange(t)},n.handleClickOutside=function(){return n.props.onCancel()},n}return r.prototype.render=function(){return v.default.createElement(da,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r})(y.Component),cy=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(t){return t.map(function(o,a){return v.default.createElement("option",{key:o,value:a},o)})},n.renderSelectMode=function(t){return v.default.createElement("select",{value:n.props.month,className:"react-datepicker__month-select",onChange:function(o){return n.onChange(parseInt(o.target.value))}},n.renderSelectOptions(t))},n.renderReadView=function(t,o){return v.default.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:n.toggleDropdown},v.default.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),v.default.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[n.props.month]))},n.renderDropdown=function(t){return v.default.createElement(ly,re({key:"dropdown"},n.props,{monthNames:t,onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(t){var o=n.state.dropdownVisible,a=[n.renderReadView(!o,t)];return o&&a.unshift(n.renderDropdown(t)),a},n.onChange=function(t){n.toggleDropdown(),t!==n.props.month&&n.props.onChange(t)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return r.prototype.render=function(){var n=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return Uu(a,n.props.locale)}:function(a){return as(a,n.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(t);break;case"select":o=this.renderSelectMode(t);break}return v.default.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r})(y.Component);function uy(e,r){for(var n=[],t=Pt(e),o=Pt(r);!Jt(t,o);)n.push(se(t)),t=it(t,1);return n}var dy=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(o){var a=hi(o),i=dt(t.props.date,o)&&ze(t.props.date,o);return v.default.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:t.onChange.bind(t,a),"aria-selected":i?"true":void 0},i?v.default.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",fe(o,t.props.dateFormat,t.props.locale))})},t.onChange=function(o){return t.props.onChange(o)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:uy(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var n=De({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return v.default.createElement(da,{className:n,onClickOutside:this.handleClickOutside},this.renderOptions())},r})(y.Component),fy=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var t=Pt(n.props.minDate),o=Pt(n.props.maxDate),a=[];!Jt(t,o);){var i=hi(t);a.push(v.default.createElement("option",{key:i,value:i},fe(t,n.props.dateFormat,n.props.locale))),t=it(t,1)}return a},n.onSelectChange=function(t){n.onChange(parseInt(t.target.value))},n.renderSelectMode=function(){return v.default.createElement("select",{value:hi(Pt(n.props.date)),className:"react-datepicker__month-year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(t){var o=fe(n.props.date,n.props.dateFormat,n.props.locale);return v.default.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:n.toggleDropdown},v.default.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),v.default.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},n.renderDropdown=function(){return v.default.createElement(dy,re({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var t=n.state.dropdownVisible,o=[n.renderReadView(!t)];return t&&o.unshift(n.renderDropdown()),o},n.onChange=function(t){n.toggleDropdown();var o=se(t);dt(n.props.date,o)&&ze(n.props.date,o)||n.props.onChange(o)},n.toggleDropdown=function(){return n.setState({dropdownVisible:!n.state.dropdownVisible})},n}return r.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return v.default.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},n)},r})(y.Component),py=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={height:null},n.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,o,a;n.list&&(n.list.scrollTop=(a=n.centerLi&&r.calcCenterPosition(n.props.monthRef?n.props.monthRef.clientHeight-((o=(t=n.header)===null||t===void 0?void 0:t.clientHeight)!==null&&o!==void 0?o:0):n.list.clientHeight,n.centerLi))!==null&&a!==void 0?a:0)})},n.handleClick=function(t){var o,a;(n.props.minTime||n.props.maxTime)&&Cl(t,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&kl(t,n.props)||(a=(o=n.props).onChange)===null||a===void 0||a.call(o,t)},n.isSelectedTime=function(t){return n.props.selected&&ty(n.props.selected,t)},n.isDisabledTime=function(t){return(n.props.minTime||n.props.maxTime)&&Cl(t,n.props)||(n.props.excludeTimes||n.props.includeTimes||n.props.filterTime)&&kl(t,n.props)},n.liClasses=function(t){var o,a=["react-datepicker__time-list-item",n.props.timeClassName?n.props.timeClassName(t):void 0];return n.isSelectedTime(t)&&a.push("react-datepicker__time-list-item--selected"),n.isDisabledTime(t)&&a.push("react-datepicker__time-list-item--disabled"),n.props.injectTimes&&(Mt(t)*3600+Rt(t)*60+Qt(t))%(((o=n.props.intervals)!==null&&o!==void 0?o:r.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},n.handleOnKeyDown=function(t,o){var a,i;t.key===Y.Space&&(t.preventDefault(),t.key=Y.Enter),(t.key===Y.ArrowUp||t.key===Y.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===Y.ArrowDown||t.key===Y.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===Y.Enter&&n.handleClick(o),(i=(a=n.props).handleOnKeyDown)===null||i===void 0||i.call(a,t)},n.renderTimes=function(){for(var t,o=[],a=typeof n.props.format=="string"?n.props.format:"p",i=(t=n.props.intervals)!==null&&t!==void 0?t:r.defaultProps.intervals,s=n.props.selected||n.props.openToDate||se(),l=po(s),c=n.props.injectTimes&&n.props.injectTimes.sort(function(h,b){return h.getTime()-b.getTime()}),u=60*ey(s),d=u/i,p=0;p<d;p++){var f=pi(l,p*i);if(o.push(f),c){var g=Jb(l,f,p,i,c);o=o.concat(g)}}var m=o.reduce(function(h,b){return b.getTime()<=s.getTime()?b:h},o[0]);return o.map(function(h){return v.default.createElement("li",{key:h.valueOf(),onClick:n.handleClick.bind(n,h),className:n.liClasses(h),ref:function(b){h===m&&(n.centerLi=b)},onKeyDown:function(b){n.handleOnKeyDown(b,h)},tabIndex:h===m?0:-1,role:"option","aria-selected":n.isSelectedTime(h)?"true":void 0,"aria-disabled":n.isDisabledTime(h)?"true":void 0},fe(h,a,n.props.locale))})},n.renderTimeCaption=function(){return n.props.showTimeCaption===!1?v.default.createElement(v.default.Fragment,null):v.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(n.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){n.header=t}},v.default.createElement("div",{className:"react-datepicker-time__header"},n.props.timeCaption))},n}return Object.defineProperty(r,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},r.prototype.componentWillUnmount=function(){var n;(n=this.resizeObserver)===null||n===void 0||n.disconnect()},r.prototype.observeDatePickerHeightChanges=function(){var n=this,t=this.props.monthRef;this.updateContainerHeight(),t&&(this.resizeObserver=new ResizeObserver(function(){n.updateContainerHeight()}),this.resizeObserver.observe(t))},r.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},r.prototype.render=function(){var n=this,t,o=this.state.height;return v.default.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:r.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),v.default.createElement("div",{className:"react-datepicker__time"},v.default.createElement("div",{className:"react-datepicker__time-box"},v.default.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){n.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},r.calcCenterPosition=function(n,t){return t.offsetTop-(n/2-t.clientHeight/2)},r})(y.Component),Ll=3,gy=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;return t.YEAR_REFS=ht([],Array(t.props.yearItemNumber),!0).map(function(){return y.createRef()}),t.isDisabled=function(o){return Qe(o,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(o){return is(o,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var o;return(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection},t.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=t.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},t.handleYearClick=function(o,a){t.props.onDayClick&&t.props.onDayClick(o,a)},t.handleYearNavigation=function(o,a){var i,s,l,c,u=t.props,d=u.date,p=u.yearItemNumber;if(!(d===void 0||p===void 0)){var f=kt(d,p).startPeriod;t.isDisabled(a)||t.isExcluded(a)||((s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,a),o-f<0?t.updateFocusOnPaginate(p-(f-o)):o-f>=p?t.updateFocusOnPaginate(Math.abs(p-(o-f))):(c=(l=t.YEAR_REFS[o-f])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())}},t.isSameDay=function(o,a){return ne(o,a)},t.isCurrentYear=function(o){return o===ee(se())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&dt(ut(se(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&dt(ut(se(),o),t.props.endDate)},t.isInRange=function(o){return Ur(o,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(o){var a=t.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,c=a.startDate,u=a.endDate;return!(i||s||l)||!t.selectingDate()?!1:i&&u?Ur(o,t.selectingDate(),u):s&&c||l&&c&&!u?Ur(o,c,t.selectingDate()):!1},t.isSelectingRangeStart=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.startDate,l=i.selectsStart,c=ut(se(),o);return l?dt(c,(a=t.selectingDate())!==null&&a!==void 0?a:null):dt(c,s??null)},t.isSelectingRangeEnd=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.endDate,l=i.selectsEnd,c=i.selectsRange,u=ut(se(),o);return l||c?dt(u,(a=t.selectingDate())!==null&&a!==void 0?a:null):dt(u,s??null)},t.isKeyboardSelected=function(o){if(!(t.props.disabledKeyboardNavigation||t.props.date===void 0||t.props.preSelection==null)){var a=t.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,c=a.includeDates,u=a.filterDate,d=a.selected,p=ir(ut(t.props.date,o)),f=(i||s||l||c||u)&&go(o,t.props),g=!!d&&ne(p,ir(d)),m=ne(p,ir(t.props.preSelection));return!t.props.inline&&!g&&m&&!f}},t.isSelectedYear=function(o){var a=t.props,i=a.selectsMultiple,s=a.selected,l=a.selectedDates;return i?l?.some(function(c){return o===ee(c)}):!!s&&o===ee(s)},t.onYearClick=function(o,a){var i=t.props.date;i!==void 0&&t.handleYearClick(ir(ut(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,c=t.props,u=c.date,d=c.yearItemNumber,p=c.handleOnKeyDown;if(l!==Y.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case Y.Enter:if(t.props.selected==null)break;t.onYearClick(o,a),(s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,t.props.selected);break;case Y.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,Dt(t.props.preSelection,1));break;case Y.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,Wn(t.props.preSelection,1));break;case Y.ArrowUp:{if(u===void 0||d===void 0||t.props.preSelection==null)break;var f=kt(u,d).startPeriod,g=Ll,m=a-g;if(m<f){var h=d%g;a>=f&&a<f+h?g=h:g+=h,m=a-g}t.handleYearNavigation(m,Wn(t.props.preSelection,g));break}case Y.ArrowDown:{if(u===void 0||d===void 0||t.props.preSelection==null)break;var b=kt(u,d).endPeriod,g=Ll,m=a+g;if(m>b){var h=d%g;a<=b&&a>b-h?g=h:g+=h,m=a+g}t.handleYearNavigation(m,Dt(t.props.preSelection,g));break}}p&&p(o)},t.getYearClassNames=function(o){var a=t.props,i=a.date,s=a.minDate,l=a.maxDate,c=a.excludeDates,u=a.includeDates,d=a.filterDate,p=a.yearClassName;return De("react-datepicker__year-text","react-datepicker__year-".concat(o),i?p?.(ut(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||c||u||d)&&go(o,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(o),"react-datepicker__year-text--range-start":t.isRangeStart(o),"react-datepicker__year-text--range-end":t.isRangeEnd(o),"react-datepicker__year-text--in-range":t.isInRange(o),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(o),"react-datepicker__year-text--today":t.isCurrentYear(o)})},t.getYearTabIndex=function(o){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var a=ee(t.props.preSelection),i=go(o,t.props);return o===a&&!i?"0":"-1"},t.getYearContent=function(o){return t.props.renderYearContent?t.props.renderYearContent(o):o},t}return r.prototype.render=function(){var n=this,t=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,l=o.onYearMouseLeave;if(a===void 0)return null;for(var c=kt(a,i),u=c.startPeriod,d=c.endPeriod,p=function(m){t.push(v.default.createElement("div",{ref:f.YEAR_REFS[m-u],onClick:function(h){n.onYearClick(h,m)},onKeyDown:function(h){Ju(h)&&(h.preventDefault(),h.key=Y.Enter),n.onYearKeyDown(h,m)},tabIndex:Number(f.getYearTabIndex(m)),className:f.getYearClassNames(m),onMouseEnter:f.props.usePointerEvent?void 0:function(h){return s(h,m)},onPointerEnter:f.props.usePointerEvent?function(h){return s(h,m)}:void 0,onMouseLeave:f.props.usePointerEvent?void 0:function(h){return l(h,m)},onPointerLeave:f.props.usePointerEvent?function(h){return l(h,m)}:void 0,key:m,"aria-current":f.isCurrentYear(m)?"date":void 0},f.getYearContent(m)))},f=this,g=u;g<=d;g++)p(g);return v.default.createElement("div",{className:"react-datepicker__year"},v.default.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},r})(y.Component);function my(e,r,n,t){for(var o=[],a=0;a<2*r+1;a++){var i=e+r-a,s=!0;n&&(s=ee(n)<=i),t&&s&&(s=ee(t)>=i),s&&o.push(i)}return o}var hy=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;t.yearOptionButtonsRef={},t.handleOptionKeyDown=function(s,l){var c;switch(l.key){case"Enter":l.preventDefault(),t.onChange(s);break;case"Escape":l.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{l.preventDefault();var u=s+(l.key==="ArrowUp"?1:-1);t.yearOptionButtonsRef[u]&&((c=t.yearOptionButtonsRef[u])===null||c===void 0||c.focus());break}}},t.renderOptions=function(){t.yearOptionButtonsRef={};var s=t.props.year,l=t.state.yearsList.map(function(d){return v.default.createElement("div",{ref:function(p){t.yearOptionButtonsRef[d]=p,d===s&&p?.focus()},role:"button",tabIndex:0,className:s===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:t.onChange.bind(t,d),onKeyDown:t.handleOptionKeyDown.bind(t,d),"aria-selected":s===d?"true":void 0},s===d?v.default.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),c=t.props.minDate?ee(t.props.minDate):null,u=t.props.maxDate?ee(t.props.maxDate):null;return(!u||!t.state.yearsList.find(function(d){return d===u}))&&l.unshift(v.default.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},v.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!c||!t.state.yearsList.find(function(d){return d===c}))&&l.push(v.default.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},v.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},t.onChange=function(s){t.props.onChange(s)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(s){var l=t.state.yearsList.map(function(c){return c+s});t.setState({yearsList:l})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var o=n.yearDropdownItemNumber,a=n.scrollableYearDropdown,i=o||(a?10:5);return t.state={yearsList:my(t.props.year,i,t.props.minDate,t.props.maxDate)},t.dropdownRef=y.createRef(),t}return r.prototype.componentDidMount=function(){var n=this.dropdownRef.current;if(n){var t=n.children?Array.from(n.children):null,o=t?t.find(function(a){return a.ariaSelected}):null;n.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-n.clientHeight)/2:(n.scrollHeight-n.clientHeight)/2}},r.prototype.render=function(){var n=De({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return v.default.createElement(da,{className:n,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r})(y.Component),vy=(function(e){Me(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={dropdownVisible:!1},n.renderSelectOptions=function(){for(var t=n.props.minDate?ee(n.props.minDate):1900,o=n.props.maxDate?ee(n.props.maxDate):2100,a=[],i=t;i<=o;i++)a.push(v.default.createElement("option",{key:i,value:i},i));return a},n.onSelectChange=function(t){n.onChange(parseInt(t.target.value))},n.renderSelectMode=function(){return v.default.createElement("select",{value:n.props.year,className:"react-datepicker__year-select",onChange:n.onSelectChange},n.renderSelectOptions())},n.renderReadView=function(t){return v.default.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:n.toggleDropdown},v.default.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),v.default.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},n.props.year))},n.renderDropdown=function(){return v.default.createElement(hy,re({key:"dropdown"},n.props,{onChange:n.onChange,onCancel:n.toggleDropdown}))},n.renderScrollMode=function(){var t=n.state.dropdownVisible,o=[n.renderReadView(!t)];return t&&o.unshift(n.renderDropdown()),o},n.onChange=function(t){n.toggleDropdown(),t!==n.props.year&&n.props.onChange(t)},n.toggleDropdown=function(t){n.setState({dropdownVisible:!n.state.dropdownVisible},function(){n.props.adjustDateOnChange&&n.handleYearChange(n.props.date,t)})},n.handleYearChange=function(t,o){var a;(a=n.onSelect)===null||a===void 0||a.call(n,t,o),n.setOpen()},n.onSelect=function(t,o){var a,i;(i=(a=n.props).onSelect)===null||i===void 0||i.call(a,t,o)},n.setOpen=function(){var t,o;(o=(t=n.props).setOpen)===null||o===void 0||o.call(t,!0)},n}return r.prototype.render=function(){var n;switch(this.props.dropdownMode){case"scroll":n=this.renderScrollMode();break;case"select":n=this.renderSelectMode();break}return v.default.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},n)},r})(y.Component),_y=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],ed="react-datepicker-ignore-onclickoutside",by=function(e){var r=(e.className||"").split(/\s+/);return _y.some(function(n){return r.indexOf(n)>=0})},yy=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;return t.monthContainer=void 0,t.handleClickOutside=function(o){t.props.onClickOutside(o)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(o){var a,i;by(o.target)&&((i=(a=t.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},t.getDateInView=function(){var o=t.props,a=o.preSelection,i=o.selected,s=o.openToDate,l=Xu(t.props),c=Zu(t.props),u=se(),d=s||i||a;return d||(l&&mt(u,l)?l:c&&Jt(u,c)?c:u)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:it(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:hn(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(o,a,i){t.props.onSelect(o,a,i),t.props.setPreSelection&&t.props.setPreSelection(o)},t.handleDayMouseEnter=function(o){t.setState({selectingDate:o}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(o)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(o,a){t.setState({selectingDate:ut(se(),a)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(o,a)},t.handleYearMouseLeave=function(o,a){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(o,a)},t.handleYearChange=function(o){var a,i,s,l;(i=(a=t.props).onYearChange)===null||i===void 0||i.call(a,o),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(o),(l=(s=t.props).setOpen)===null||l===void 0||l.call(s,!0)),t.props.setPreSelection&&t.props.setPreSelection(o)},t.getEnabledPreSelectionDateForMonth=function(o){if(!Qe(o,t.props))return o;for(var a=Pt(o),i=Hb(o),s=Xh(i,a),l=null,c=0;c<=s;c++){var u=ot(a,c);if(!Qe(u,t.props)){l=u;break}}return l},t.handleMonthChange=function(o){var a,i,s,l=(a=t.getEnabledPreSelectionDateForMonth(o))!==null&&a!==void 0?a:o;t.handleCustomMonthChange(l),t.props.adjustDateOnChange&&(t.props.onSelect(l),(s=(i=t.props).setOpen)===null||s===void 0||s.call(i,!0)),t.props.setPreSelection&&t.props.setPreSelection(l)},t.handleCustomMonthChange=function(o){var a,i;(i=(a=t.props).onMonthChange)===null||i===void 0||i.call(a,o),t.setState({isRenderAriaLiveMessage:!0})},t.handleMonthYearChange=function(o){t.handleYearChange(o),t.handleMonthChange(o)},t.changeYear=function(o){t.setState(function(a){var i=a.date;return{date:ut(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:Ue(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:ut(Ue(i,Fe(o)),ee(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=Xt(o,t.props.locale,t.props.calendarStartDay),i=[];return t.props.showWeekNumbers&&i.push(v.default.createElement("div",{key:"W",className:"react-datepicker__day-name",role:"columnheader"},v.default.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),v.default.createElement("span",{"aria-hidden":"true"},t.props.weekLabel||"#"))),i.concat([0,1,2,3,4,5,6].map(function(s){var l=ot(a,s),c=t.formatWeekday(l,t.props.locale),u=t.props.weekDayClassName?t.props.weekDayClassName(l):void 0;return v.default.createElement("div",{key:s,role:"columnheader",className:De("react-datepicker__day-name",u)},v.default.createElement("span",{className:"react-datepicker__sr-only"},fe(l,"EEEE",t.props.locale)),v.default.createElement("span",{"aria-hidden":"true"},c))}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?Yb(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?Bb(o,a):Vb(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Wn(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var o,a,i;if(!t.props.renderCustomHeader){var s=(o=t.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=t.props.showPreviousMonths?s-1:0,c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,u=hn(t.state.date,c),d;switch(!0){case t.props.showMonthYearPicker:d=Ml(t.state.date,t.props);break;case t.props.showYearPicker:d=Ub(t.state.date,t.props);break;case t.props.showQuarterYearPicker:d=qb(t.state.date,t.props);break;default:d=Dl(u,t.props);break}if(!(!((i=t.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&d||t.props.showTimeSelectOnly)){var p=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],f=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(g=t.decreaseYear),d&&t.props.showDisabledMonthNavigation&&(f.push("react-datepicker__navigation--previous--disabled"),g=void 0);var m=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,h=t.props,b=h.previousMonthButtonLabel,w=b===void 0?r.defaultProps.previousMonthButtonLabel:b,x=h.previousYearButtonLabel,$=x===void 0?r.defaultProps.previousYearButtonLabel:x,C=t.props,k=C.previousMonthAriaLabel,E=k===void 0?typeof w=="string"?w:"Previous Month":k,P=C.previousYearAriaLabel,z=P===void 0?typeof $=="string"?$:"Previous Year":P;return v.default.createElement("button",{type:"button",className:f.join(" "),onClick:g,onKeyDown:t.props.handleOnKeyDown,"aria-label":m?z:E},v.default.createElement("span",{className:p.join(" ")},m?$:w))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Dt(i,t.props.showYearPicker?(a=t.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var o;if(!t.props.renderCustomHeader){var a;switch(!0){case t.props.showMonthYearPicker:a=Rl(t.state.date,t.props);break;case t.props.showYearPicker:a=Qb(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=Kb(t.state.date,t.props);break;default:a=El(t.state.date,t.props);break}if(!(!((o=t.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&a||t.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(l=t.increaseYear),a&&t.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var c=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,u=t.props,d=u.nextMonthButtonLabel,p=d===void 0?r.defaultProps.nextMonthButtonLabel:d,f=u.nextYearButtonLabel,g=f===void 0?r.defaultProps.nextYearButtonLabel:f,m=t.props,h=m.nextMonthAriaLabel,b=h===void 0?typeof p=="string"?p:"Next Month":h,w=m.nextYearAriaLabel,x=w===void 0?typeof g=="string"?g:"Next Year":w;return v.default.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":c?x:b},v.default.createElement("span",{className:s.join(" ")},c?g:p))}}},t.renderCurrentMonth=function(o){o===void 0&&(o=t.state.date);var a=["react-datepicker__current-month"];return t.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),v.default.createElement("h2",{className:a.join(" ")},fe(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return v.default.createElement(vy,re({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:ee(t.state.date)}))},t.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthDropdown||o))return v.default.createElement(cy,re({},r.defaultProps,t.props,{month:Fe(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return v.default.createElement(fy,re({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(xl(),o),t.props.setPreSelection&&t.props.setPreSelection(xl())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return v.default.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDayNamesHeader=function(o){return v.default.createElement("div",{className:"react-datepicker__day-names",role:"row"},t.header(o))},t.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return v.default.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(a),v.default.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(i!==0),t.renderMonthYearDropdown(i!==0),t.renderYearDropdown(i!==0)))},t.renderCustomHeader=function(o){var a,i,s=o.monthDate,l=o.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var c=t.props,u=c.showYearPicker,d=c.yearItemNumber,p;if(u){var f=kt(s,d),g=f.startPeriod,m=f.endPeriod;p={startYear:g,endYear:m}}var h=Dl(t.state.date,t.props),b=El(t.state.date,t.props),w=Ml(t.state.date,t.props),x=Rl(t.state.date,t.props);return v.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(i=(a=t.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,re(re(re({},t.state),u&&{visibleYearsRange:p}),{customHeaderCount:l,monthDate:s,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:h,nextMonthButtonDisabled:b,prevYearButtonDisabled:w,nextYearButtonDisabled:x})))},t.renderYearHeader=function(o){var a=o.monthDate,i=t.props,s=i.showYearPicker,l=i.yearItemNumber,c=l===void 0?r.defaultProps.yearItemNumber:l,u=kt(a,c),d=u.startPeriod,p=u.endPeriod;return v.default.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(d," - ").concat(p):ee(a))},t.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,l={monthDate:a,i:s};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(l);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(l);default:return t.renderDefaultHeader(l)}},t.renderMonths=function(){var o,a;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var i=[],s=(o=t.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=t.props.showPreviousMonths?s-1:0,c=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Dt(t.state.date,l):hn(t.state.date,l),u=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,d=0;d<s;++d){var p=d-u+l,f=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Dt(c,p):it(c,p),g="month-".concat(d),m=d<s-1,h=d>0;i.push(v.default.createElement("div",{key:g,ref:function(b){t.monthContainer=b??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:f,i:d}),v.default.createElement(sy,re({},r.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:f,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:d,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:m,monthShowsDuplicateDaysStart:h,dayNamesHeader:t.renderDayNamesHeader(f)}))))}return i}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return v.default.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),v.default.createElement(gy,re({},r.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return v.default.createElement(py,re({},r.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var o=t.props.selected?new Date(t.props.selected):void 0,a=o&&fa(o)&&!!t.props.selected,i=a?"".concat(Tl(o.getHours()),":").concat(Tl(o.getMinutes())):"";if(t.props.showTimeInput)return v.default.createElement(ny,re({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=kt(t.state.date,(o=t.props.yearItemNumber)!==null&&o!==void 0?o:r.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,l;return t.props.showYearPicker?l="".concat(i," - ").concat(s):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?l=ee(t.state.date):l="".concat(as(Fe(t.state.date),t.props.locale)," ").concat(ee(t.state.date)),v.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&l)},t.renderChildren=function(){if(t.props.children)return v.default.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=y.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(r,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:ed,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Tr}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=(function(){n.setState({monthContainer:n.monthContainer})})())},r.prototype.componentDidUpdate=function(n){var t=this;if(this.props.preSelection&&(!ne(this.props.preSelection,n.preSelection)||this.props.monthSelectedIn!==n.monthSelectedIn)){var o=!ze(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!ne(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var n=this.props.container||Ob;return v.default.createElement(da,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},v.default.createElement("div",{style:{display:"contents"},ref:this.containerRef},v.default.createElement(n,{className:De("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},r})(y.Component),wy=function(e){var r=e.icon,n=e.className,t=n===void 0?"":n,o=e.onClick,a="react-datepicker__calendar-icon";if(typeof r=="string")return v.default.createElement("i",{className:"".concat(a," ").concat(r," ").concat(t),"aria-hidden":"true",onClick:o});if(v.default.isValidElement(r)){var i=r;return v.default.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(a," ").concat(t),onClick:function(s){typeof i.props.onClick=="function"&&i.props.onClick(s),typeof o=="function"&&o(s)}})}return v.default.createElement("svg",{className:"".concat(a," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},v.default.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},td=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return r.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},r.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},r.prototype.render=function(){return An.default.createPortal(this.props.children,this.el)},r})(y.Component),xy="[tabindex], a, button, input, select, textarea",Sy=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},nd=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;return t.getTabChildren=function(){var o;return Array.prototype.slice.call((o=t.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(xy),1,-1).filter(Sy)},t.handleFocusStart=function(){var o=t.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},t.handleFocusEnd=function(){var o=t.getTabChildren();o&&o.length>1&&o[0].focus()},t.tabLoopRef=y.createRef(),t}return r.prototype.render=function(){var n;return((n=this.props.enableTabLoop)!==null&&n!==void 0?n:r.defaultProps.enableTabLoop)?v.default.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},v.default.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,v.default.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r})(y.Component);function $y(e){function r(n){var t,o=typeof n.hidePopper=="boolean"?n.hidePopper:!0,a=y.useRef(null),i=Ib(re({open:!o,whileElementsMounted:Mr,placement:n.popperPlacement,middleware:ht([Rr({padding:15}),Qn(10),Jc({element:a})],(t=n.popperModifiers)!==null&&t!==void 0?t:[],!0)},n.popperProps)),s=re(re({},n),{hidePopper:o,popperProps:re(re({},i),{arrowRef:a})});return v.default.createElement(e,re({},s))}return r.displayName="withFloating(".concat(e.displayName||e.name||"Component",")"),r}var ky=function(e){var r=e.className,n=e.wrapperClassName,t=e.hidePopper,o=t===void 0?!0:t,a=e.popperComponent,i=e.targetComponent,s=e.enableTabLoop,l=e.popperOnKeyDown,c=e.portalId,u=e.portalHost,d=e.popperProps,p=e.showArrow,f=void 0;if(!o){var g=De("react-datepicker-popper",r);f=v.default.createElement(nd,{enableTabLoop:s},v.default.createElement("div",{ref:d.refs.setFloating,style:d.floatingStyles,className:g,"data-placement":d.placement,onKeyDown:l},a,p&&v.default.createElement(Cb,{ref:d.arrowRef,context:d.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}e.popperContainer&&(f=y.createElement(e.popperContainer,{},f)),c&&!o&&(f=v.default.createElement(td,{portalId:c,portalHost:u},f));var m=De("react-datepicker-wrapper",n);return v.default.createElement(v.default.Fragment,null,v.default.createElement("div",{ref:d.refs.setReference,className:m},i),f)},Cy=$y(ky);function Dy(e,r){return e&&r?Fe(e)!==Fe(r)||ee(e)!==ee(r):e!==r}var Ya="Date input not valid.",Ey=(function(e){Me(r,e);function r(n){var t=e.call(this,n)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:se()},t.modifyHolidays=function(){var o;return(o=t.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return fa(s)?ht(ht([],a,!0),[re(re({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=Xu(t.props),s=Zu(t.props),l=i&&mt(a,po(i))?i:s&&Jt(a,Sl(s))?s:a;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&o!==void 0?o:l,highlightDates:Pl(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.getInputValue=function(){var o,a=t.props,i=a.locale,s=a.startDate,l=a.endDate,c=a.rangeSeparator,u=a.selected,d=a.selectedDates,p=a.selectsMultiple,f=a.selectsRange,g=a.value,m=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,h=t.state.inputValue;return typeof g=="string"?g:typeof h=="string"?h:f?Lb(s,l,{dateFormat:m,locale:i,rangeSeparator:c}):p?zb(d??[],{dateFormat:m,locale:i}):Ke(u,{dateFormat:m,locale:i})},t.resetHiddenStatus=function(){t.setState(re(re({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(re(re({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.setFocus=function(){var o,a;(a=(o=t.input)===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o,{preventScroll:!0})},t.setBlur=function(){var o,a;(a=(o=t.input)===null||o===void 0?void 0:o.blur)===null||a===void 0||a.call(o),t.cancelFocusInput()},t.deferBlur=function(){requestAnimationFrame(function(){t.setBlur()})},t.setOpen=function(o,a){a===void 0&&(a=!1),t.setState({open:o,preSelection:o&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:Va},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Et(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(o){var a,i,s=t.state.wasHidden,l=s?t.state.open:!0;s&&t.resetHiddenStatus(),t.state.preventFocus||((i=(a=t.props).onFocus)===null||i===void 0||i.call(a,o),l&&!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.resetInputValue=function(){t.setState(re(re({},t.state),{inputValue:null}))},t.handleBlur=function(o){var a,i;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((i=(a=t.props).onBlur)===null||i===void 0||i.call(a,o)),t.resetInputValue(),t.state.open&&t.props.open===!1&&t.setOpen(!1),t.setState({focused:!1})},t.handleCalendarClickOutside=function(o){var a,i;t.props.inline||t.setOpen(!1),(i=(a=t.props).onClickOutside)===null||i===void 0||i.call(a,o),t.props.withPortal&&o.preventDefault()},t.handleChange=function(){for(var o,a,i,s,l,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var d=c[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,c),!d||typeof d.isDefaultPrevented!="function"||d.isDefaultPrevented()))){t.setState({inputValue:d?.target instanceof HTMLInputElement?d.target.value:null,lastPreSelectChange:My});var p=t.props,f=p.selectsRange,g=p.startDate,m=p.endDate,h=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,b=(a=t.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,w=d?.target instanceof HTMLInputElement?d.target.value:"";if(f){var x=t.props.rangeSeparator,$=x.trim(),C=w.split(h.includes($)?x:$,2).map(function(I){return I.trim()}),k=C[0],E=C[1],P=Na(k??"",h,t.props.locale,b),z=P?Na(E??"",h,t.props.locale,b):null,L=g?.getTime()!==P?.getTime(),O=m?.getTime()!==z?.getTime();if(!L&&!O||P&&Qe(P,t.props)||z&&Qe(z,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[P,z],d)}else{var T=Na(w,h,t.props.locale,b,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(T||!w)&&t.setSelected(T,d,!0)}}},t.handleSelect=function(o,a,i){if(!t.props.readOnly){var s=t.props,l=s.selectsRange,c=s.startDate,u=s.endDate,d=s.swapRange,p=!l||c&&!u&&(d||!ja(o,c));t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&p&&t.sendFocusBackToInput(),t.props.onChangeRaw&&t.props.onChangeRaw(a),t.setSelected(o,a,!1,i),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect?t.setPreSelection(o):p&&t.setOpen(!1)}},t.setSelected=function(o,a,i,s){var l,c,u=o;if(t.props.showYearPicker){if(u!==null&&go(ee(u),t.props))return}else if(t.props.showMonthYearPicker){if(u!==null&&Qu(u,t.props))return}else if(u!==null&&Qe(u,t.props))return;var d=t.props,p=d.onChange,f=d.selectsRange,g=d.startDate,m=d.endDate,h=d.selectsMultiple,b=d.selectedDates,w=d.minTime,x=d.swapRange;if(!dn(t.props.selected,u)||t.props.allowSameDay||f||h)if(u!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(u=Aa(u,{hour:Mt(t.props.selected),minute:Rt(t.props.selected),second:Qt(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&w&&(u=Aa(u,{hour:w.getHours(),minute:w.getMinutes(),second:w.getSeconds()})),t.props.inline||t.setState({preSelection:u}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),f){var $=!g&&!m,C=g&&!m,k=!g&&!!m,E=g&&m;$?p?.([u,null],a):C?u===null?p?.([null,null],a):ja(u,g)?p?.(x?[u,g]:[u,null],a):p?.([g,u],a):k&&(u&&ja(u,m)?p?.([u,m],a):p?.([u,null],a)),E&&p?.([u,null],a)}else if(h){if(u!==null)if(!b?.length)p?.([u],a);else{var P=b.some(function(L){return ne(L,u)});if(P){var z=b.filter(function(L){return!ne(L,u)});p?.(z,a)}else p?.(ht(ht([],b,!0),[u],!1),a)}}else p?.(u,a);i||((c=(l=t.props).onSelect)===null||c===void 0||c.call(l,u,a),t.setState({inputValue:null}))},t.setPreSelection=function(o){if(!t.props.readOnly){var a=Et(t.props.minDate),i=Et(t.props.maxDate),s=!0;if(o){var l=po(o);if(a&&i)s=ln(o,t.props.minDate,t.props.maxDate);else if(a){var c=po(t.props.minDate);s=Jt(o,c)||dn(l,c)}else if(i){var u=Sl(t.props.maxDate);s=mt(o,u)||dn(l,u)}}s&&t.setState({preSelection:o})}},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(o){var a,i;if(!(t.props.selectsRange||t.props.selectsMultiple)){var s=t.props.selected?t.props.selected:t.getPreSelection(),l=t.props.selected?o:Aa(s,{hour:Mt(o),minute:Rt(o)});t.setState({preSelection:l}),(i=(a=t.props).onChange)===null||i===void 0||i.call(a,l),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var o,a;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(a=(o=t.props).onInputClick)===null||a===void 0||a.call(o)},t.onInputKeyDown=function(o){var a,i,s,l,c,u;(i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o);var d=o.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(d===Y.ArrowDown||d===Y.ArrowUp||d===Y.Enter)&&((s=t.onInputClick)===null||s===void 0||s.call(t));return}if(t.state.open){if(d===Y.ArrowDown||d===Y.ArrowUp){o.preventDefault();var p=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',f=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(p);f instanceof HTMLElement&&f.focus({preventScroll:!0});return}var g=se(t.state.preSelection);d===Y.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===Va?(t.handleSelect(g,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(g)):t.setOpen(!1)):d===Y.Escape?(o.preventDefault(),o.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):d===Y.Tab&&t.setOpen(!1),t.inputOk()||(u=(c=t.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Ya})}},t.onPortalKeyDown=function(o){var a=o.key;a===Y.Escape&&(o.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(o){var a,i,s,l,c,u,d=t.props,p=d.minDate,f=d.maxDate,g=d.disabledKeyboardNavigation,m=d.showWeekPicker,h=d.shouldCloseOnSelect,b=d.locale,w=d.calendarStartDay,x=d.adjustDateOnChange,$=d.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!g){var C=o.key,k=o.shiftKey,E=se(t.state.preSelection),P=function(N,A){var F=A;switch(N){case Y.ArrowRight:F=m?Eo(A,1):ot(A,1);break;case Y.ArrowLeft:F=m?_l(A):X_(A);break;case Y.ArrowUp:F=_l(A);break;case Y.ArrowDown:F=Eo(A,1);break;case Y.PageUp:F=k?Wn(A,1):hn(A,1);break;case Y.PageDown:F=k?Dt(A,1):it(A,1);break;case Y.Home:F=Xt(A,b,w);break;case Y.End:F=jb(A);break}return F},z=function(N,A){for(var F=40,D=N,M=!1,V=0,H=P(N,A);!M;){if(V>=F){H=A;break}p&&H<p&&(D=Y.ArrowRight,H=Qe(p,t.props)?P(D,H):p),f&&H>f&&(D=Y.ArrowLeft,H=Qe(f,t.props)?P(D,H):f),Qe(H,t.props)?((D===Y.PageUp||D===Y.Home)&&(D=Y.ArrowRight),(D===Y.PageDown||D===Y.End)&&(D=Y.ArrowLeft),H=P(D,H)):M=!0,V++}return H};if(C===Y.Enter){o.preventDefault(),t.handleSelect(E,o),!h&&t.setPreSelection(E);return}else if(C===Y.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Ya});return}var L=null;switch(C){case Y.ArrowLeft:case Y.ArrowRight:case Y.ArrowUp:case Y.ArrowDown:case Y.PageUp:case Y.PageDown:case Y.Home:case Y.End:L=z(C,E);break}if(!L){(u=(c=t.props).onInputError)===null||u===void 0||u.call(c,{code:1,msg:Ya});return}if(o.preventDefault(),t.setState({lastPreSelectChange:Va}),x&&t.setSelected(L),t.setPreSelection(L),$){var O=Fe(E),T=Fe(L),I=ee(E),j=ee(L);O!==T||I!==j?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===Y.Escape&&(o.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1))},t.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),t.sendFocusBackToInput();var a=t.props,i=a.selectsRange,s=a.onChange;s?.(i?[null,null]:null,o),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(o){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(o)&&t.setOpen(!1)},t.renderCalendar=function(){var o,a;return!t.props.inline&&!t.isCalendarOpen()?null:v.default.createElement(yy,re({showMonthYearDropdown:void 0,ref:function(i){t.calendar=i}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(o=t.props.dateFormatCalendar)!==null&&o!==void 0?o:r.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:Zb(t.modifyHolidays()),outsideClickIgnoreClass:t.props.outsideClickIgnoreClass,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(a=t.props.dropdownMode)!==null&&a!==void 0?a:r.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var o,a=t.props.locale,i=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,s=t.props.showTimeInput||t.props.showTimeSelect,l=s?"PPPPp":"PPPP",c;return t.props.selectsRange?c="Selected start date: ".concat(Ke(t.props.startDate,{dateFormat:l,locale:a}),". ").concat(t.props.endDate?"End date: "+Ke(t.props.endDate,{dateFormat:l,locale:a}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(Ke(t.props.selected,{dateFormat:i,locale:a})):t.props.showYearPicker?c="Selected year: ".concat(Ke(t.props.selected,{dateFormat:"yyyy",locale:a})):t.props.showMonthYearPicker?c="Selected month: ".concat(Ke(t.props.selected,{dateFormat:"MMMM yyyy",locale:a})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(Ke(t.props.selected,{dateFormat:"yyyy, QQQ",locale:a})):c="Selected date: ".concat(Ke(t.props.selected,{dateFormat:l,locale:a})),v.default.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},t.renderDateInput=function(){var o,a,i=De(t.props.className,(o={},o[t.props.outsideClickIgnoreClass||r.defaultProps.outsideClickIgnoreClass]=t.state.open,o)),s=t.props.customInput||v.default.createElement("input",{type:"text"}),l=t.props.customInputRef||"ref";return y.cloneElement(s,(a={},a[l]=function(c){t.input=c},a.value=t.getInputValue(),a.onBlur=t.handleBlur,a.onChange=t.handleChange,a.onClick=t.onInputClick,a.onFocus=t.handleFocus,a.onKeyDown=t.onInputKeyDown,a.id=t.props.id,a.name=t.props.name,a.form=t.props.form,a.autoFocus=t.props.autoFocus,a.placeholder=t.props.placeholderText,a.disabled=t.props.disabled,a.autoComplete=t.props.autoComplete,a.className=De(s.props.className,i),a.title=t.props.title,a.readOnly=t.props.readOnly,a.required=t.props.required,a.tabIndex=t.props.tabIndex,a["aria-describedby"]=t.props.ariaDescribedBy,a["aria-invalid"]=t.props.ariaInvalid,a["aria-labelledby"]=t.props.ariaLabelledBy,a["aria-required"]=t.props.ariaRequired,a))},t.renderClearButton=function(){var o=t.props,a=o.isClearable,i=o.disabled,s=o.selected,l=o.startDate,c=o.endDate,u=o.clearButtonTitle,d=o.clearButtonClassName,p=d===void 0?"":d,f=o.ariaLabelClose,g=f===void 0?"Close":f,m=o.selectedDates,h=o.readOnly;return a&&!h&&(s!=null||l!=null||c!=null||m?.length)?v.default.createElement("button",{type:"button",className:De("react-datepicker__close-icon",p,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":g,onClick:t.onClearClick,title:u,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(r,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:ed,readOnly:!1,rangeSeparator:Ku,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Tr,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.componentDidUpdate=function(n,t){var o,a,i,s;n.inline&&Dy(n.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&n.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),n.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Pl(this.props.highlightDates)}),!t.focused&&!dn(n.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),t.open===!0&&this.state.open===!1&&((s=(i=this.props).onCalendarClose)===null||s===void 0||s.call(i)))},r.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},r.prototype.renderInputContainer=function(){var n=this.props,t=n.showIcon,o=n.icon,a=n.calendarIconClassname,i=n.calendarIconClassName,s=n.toggleCalendarOnIconClick,l=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),v.default.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&v.default.createElement(wy,re({icon:o,className:De(i,!i&&a,l&&"react-datepicker-ignore-onclickoutside")},s?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},r.prototype.render=function(){var n=this.renderCalendar();if(this.props.inline)return n;if(this.props.withPortal){var t=this.state.open?v.default.createElement(nd,{enableTabLoop:this.props.enableTabLoop},v.default.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},n)):null;return this.state.open&&this.props.portalId&&(t=v.default.createElement(td,re({portalId:this.props.portalId},this.props),t)),v.default.createElement("div",null,this.renderInputContainer(),t)}return v.default.createElement(Cy,re({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:n,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r})(y.Component),My="input",Va="navigate";const Ry=S.default.div`
|
|
1033
1026
|
position: relative;
|
|
1034
|
-
`,
|
|
1027
|
+
`,Py=S.default.i`
|
|
1035
1028
|
color: var(--cc_color_link_subtle);
|
|
1036
1029
|
font-size: var(--cc_size_text_m);
|
|
1037
1030
|
position: absolute;
|
|
@@ -1039,7 +1032,7 @@
|
|
|
1039
1032
|
inset-block-start: 50%;
|
|
1040
1033
|
transform: translateY(-50%);
|
|
1041
1034
|
pointer-events: none;
|
|
1042
|
-
`,
|
|
1035
|
+
`,Ty=S.default.select`
|
|
1043
1036
|
all: unset;
|
|
1044
1037
|
background: var(--cc_color_background_1);
|
|
1045
1038
|
display: block;
|
|
@@ -1053,38 +1046,38 @@
|
|
|
1053
1046
|
color: var(--cc_color_link_secondary);
|
|
1054
1047
|
font-size: var(--cc_size_text_s);
|
|
1055
1048
|
text-align: start;
|
|
1056
|
-
${
|
|
1049
|
+
${$e};
|
|
1057
1050
|
|
|
1058
1051
|
&:focus-visible {
|
|
1059
1052
|
outline: var(--cc_size_border_width_m) solid
|
|
1060
1053
|
var(--cc_color_border_input_active);
|
|
1061
1054
|
}
|
|
1062
|
-
`;function
|
|
1055
|
+
`;function zl({label:e,onChange:r,options:n,value:t,...o}){return _.jsxs(Ry,{children:[_.jsx(Ty,{value:t,onChange:r,...o,children:n.map(a=>_.jsx("option",{value:a,children:a},a))}),_.jsx(Py,{"aria-hidden":"true",className:"mdi mdi-chevron-down"})]})}const Iy=S.default.div`
|
|
1063
1056
|
display: grid;
|
|
1064
1057
|
grid-template-columns: auto 1fr auto;
|
|
1065
1058
|
align-items: center;
|
|
1066
|
-
`,
|
|
1059
|
+
`,Oy=S.default.div`
|
|
1067
1060
|
display: flex;
|
|
1068
1061
|
align-items: center;
|
|
1069
1062
|
justify-content: center;
|
|
1070
1063
|
gap: var(--cc_size_spacing_xs);
|
|
1071
|
-
`;function
|
|
1064
|
+
`;function Fy({date:e,months:r,changeYear:n,changeMonth:t,decreaseMonth:o,increaseMonth:a,prevMonthButtonDisabled:i,nextMonthButtonDisabled:s}){function l(p){return p.getMonth()}function c(p,f,g=1){const m=[];for(let h=p;h<f;h+=g)m.push(h);return m}function u(p){return p.getFullYear()}const d=c(1990,u(new Date)+1,1);return _.jsxs(Iy,{children:[_.jsx(Yn,{onClick:o,disabled:i,accessibilityLabel:"Previous",iconName:"chevron-left"}),_.jsxs(Oy,{children:[_.jsx(zl,{value:r[l(e)],onChange:({target:{value:p}})=>t(r.indexOf(p)),label:"Month",options:r}),_.jsx(zl,{value:u(e).toString(),onChange:({target:{value:p}})=>n(Number(p)),label:"Year",options:d.map(p=>p.toString())})]}),_.jsx(Yn,{onClick:a,disabled:s,accessibilityLabel:"Next",iconName:"chevron-right"})]})}const Ly=R.css`
|
|
1072
1065
|
background: var(--cc_color_button_background_primary);
|
|
1073
1066
|
color: var(--cc_color_button_text_primary);
|
|
1074
1067
|
border-radius: var(--cc_size_border_radius_l);
|
|
1075
1068
|
&:hover {
|
|
1076
1069
|
background: var(--cc_color_button_background_primary);
|
|
1077
1070
|
}
|
|
1078
|
-
`,
|
|
1071
|
+
`,Ba=R.css`
|
|
1079
1072
|
background: var(--cc_color_button_background_secondary);
|
|
1080
1073
|
color: var(--cc_color_button_text_secondary);
|
|
1081
1074
|
border-radius: var(--cc_size_border_radius_l);
|
|
1082
1075
|
&:hover {
|
|
1083
1076
|
background: var(--cc_color_button_background_secondary);
|
|
1084
1077
|
}
|
|
1085
|
-
`,
|
|
1078
|
+
`,zy=R.createGlobalStyle`
|
|
1086
1079
|
.react-datepicker {
|
|
1087
|
-
${
|
|
1080
|
+
${et};
|
|
1088
1081
|
background: var(--cc_color_background_1);
|
|
1089
1082
|
color: var(--cc_color_link_secondary);
|
|
1090
1083
|
border: none;
|
|
@@ -1124,9 +1117,9 @@
|
|
|
1124
1117
|
.react-datepicker__day--in-range,
|
|
1125
1118
|
.react-datepicker__day--selecting-range-start,
|
|
1126
1119
|
.react-datepicker__day--selecting-range-end {
|
|
1127
|
-
${
|
|
1120
|
+
${Ba}
|
|
1128
1121
|
&.react-datepicker__day--today {
|
|
1129
|
-
${
|
|
1122
|
+
${Ba}
|
|
1130
1123
|
color: var(--cc_color_link_secondary);
|
|
1131
1124
|
}
|
|
1132
1125
|
}
|
|
@@ -1134,7 +1127,7 @@
|
|
|
1134
1127
|
color: var(--cc_color_text_nonessential);
|
|
1135
1128
|
}
|
|
1136
1129
|
.react-datepicker__day--keyboard-selected, .react-datepicker__day--today {
|
|
1137
|
-
${
|
|
1130
|
+
${Ly}
|
|
1138
1131
|
}
|
|
1139
1132
|
.react-datepicker__day--today.react-datepicker__day--in-selecting-range {
|
|
1140
1133
|
color: var(--cc_color_link_secondary);
|
|
@@ -1153,10 +1146,10 @@
|
|
|
1153
1146
|
background: var(--cc_color_button_background_primary_alpha_10);
|
|
1154
1147
|
&.react-datepicker__day--selecting-range-start,
|
|
1155
1148
|
&.react-datepicker__day--selecting-range-end {
|
|
1156
|
-
${
|
|
1149
|
+
${Ba}
|
|
1157
1150
|
}
|
|
1158
1151
|
}
|
|
1159
|
-
`,
|
|
1152
|
+
`,Ny=S.default.div`
|
|
1160
1153
|
.react-datepicker-wrapper {
|
|
1161
1154
|
display: block;
|
|
1162
1155
|
background: var(--cc_color_background_1);
|
|
@@ -1166,10 +1159,10 @@
|
|
|
1166
1159
|
border-radius: var(--cc_size_border_radius_l);
|
|
1167
1160
|
transition: border-color 0.2s;
|
|
1168
1161
|
|
|
1169
|
-
${e=>e.$disabled?
|
|
1170
|
-
${
|
|
1162
|
+
${e=>e.$disabled?R.css`
|
|
1163
|
+
${tt}
|
|
1171
1164
|
background-color: var(--cc_color_background_3);
|
|
1172
|
-
`:
|
|
1165
|
+
`:R.css`
|
|
1173
1166
|
&:hover {
|
|
1174
1167
|
border-color: var(--cc_color_button_background_secondary);
|
|
1175
1168
|
}
|
|
@@ -1178,7 +1171,7 @@
|
|
|
1178
1171
|
${e=>e.$message?"margin-block-end: var(--cc_size_spacing_xs);":null}
|
|
1179
1172
|
|
|
1180
1173
|
&:focus-within {
|
|
1181
|
-
${e=>
|
|
1174
|
+
${e=>Ee(e.$status).focusStyles}
|
|
1182
1175
|
border-color: transparent;
|
|
1183
1176
|
outline-offset: -2px;
|
|
1184
1177
|
}
|
|
@@ -1202,15 +1195,15 @@
|
|
|
1202
1195
|
display: block;
|
|
1203
1196
|
width: 100%;
|
|
1204
1197
|
color: var(--cc_color_text_default);
|
|
1205
|
-
${
|
|
1198
|
+
${$e};
|
|
1206
1199
|
font-size: ${e=>e.$size==="large"?"var(--cc_size_text_m)":"var(--cc_size_text_s)"};
|
|
1207
1200
|
height: ${e=>e.$size==="medium"?38:48}px;
|
|
1208
1201
|
padding: ${e=>e.$size==="large"?"0 var(--cc_size_spacing_m)":"0 calc(var(--cc_size_spacing_m) * 0.75)"};
|
|
1209
|
-
${e=>e.$hideLabel?
|
|
1202
|
+
${e=>e.$hideLabel?R.css`
|
|
1210
1203
|
&::placeholder {
|
|
1211
1204
|
color: var(--cc_color_text_subtle);
|
|
1212
1205
|
}
|
|
1213
|
-
`:
|
|
1206
|
+
`:R.css`
|
|
1214
1207
|
&::placeholder {
|
|
1215
1208
|
color: var(--cc_color_text_nonessential);
|
|
1216
1209
|
}
|
|
@@ -1229,19 +1222,19 @@
|
|
|
1229
1222
|
flex-shrink: 0;
|
|
1230
1223
|
}
|
|
1231
1224
|
}
|
|
1232
|
-
`,
|
|
1233
|
-
${e=>e.$hideLabel?
|
|
1225
|
+
`,Ay=S.default.label`
|
|
1226
|
+
${e=>e.$hideLabel?Ge:R.css`
|
|
1234
1227
|
all: initial;
|
|
1235
1228
|
display: block;
|
|
1236
1229
|
margin-block-end: var(--cc_size_spacing_xs);
|
|
1237
1230
|
`}
|
|
1238
|
-
`;function
|
|
1231
|
+
`;function jy({hideLabel:e,label:r,children:n,placeholder:t,placement:o="bottom-start",size:a="medium",style:i,months:s,...l}){const{status:c="normal",disabled:u=!1,message:d,className:p,...f}=l;return _.jsxs(_.Fragment,{children:[_.jsx(zy,{}),_.jsx(rn,{inputId:l.id,className:p,message:d,style:i,status:c,children:_.jsxs(Ny,{$disabled:u,$size:a,$status:c,$message:d,$hideLabel:e,$isClearable:l.isClearable,children:[_.jsx(Ay,{$hideLabel:e,htmlFor:l.id,children:_.jsx(Xn,{children:r})}),_.jsx(Ey,{...f,disabled:u,"aria-describedby":d?`${l.id}-message`:"","aria-invalid":c==="error",showIcon:!0,showPopperArrow:!1,popperClassName:"react-datepicker__floating",className:"react-datepicker__input",icon:"mdi mdi-calendar",renderCustomHeader:l.selectsRange?void 0:g=>_.jsx(Fy,{...g,months:s}),placeholderText:t,portalId:`react-datepicker-portal-${l.id}`,popperPlacement:o,toggleCalendarOnIconClick:!0,children:n})]})})]})}const Hy=S.default.ul`
|
|
1239
1232
|
list-style-type: none;
|
|
1240
1233
|
margin: var(--cc_size_spacing_s) 0 0;
|
|
1241
1234
|
padding: 0;
|
|
1242
|
-
`,
|
|
1235
|
+
`,Yy=S.default.li`
|
|
1243
1236
|
all: initial;
|
|
1244
|
-
`,
|
|
1237
|
+
`,ss=S.default.label`
|
|
1245
1238
|
all: initial;
|
|
1246
1239
|
box-sizing: border-box;
|
|
1247
1240
|
cursor: pointer;
|
|
@@ -1253,35 +1246,35 @@
|
|
|
1253
1246
|
background: var(--cc_color_background_1);
|
|
1254
1247
|
border-width: var(--cc_size_border_width_s);
|
|
1255
1248
|
border-style: dashed;
|
|
1256
|
-
border-color: ${e=>!e.$status||e.$status==="normal"?"var(--cc_color_border_input_inactive)":
|
|
1249
|
+
border-color: ${e=>!e.$status||e.$status==="normal"?"var(--cc_color_border_input_inactive)":Ee(e.$status).accentColor};
|
|
1257
1250
|
border-radius: var(--cc_size_border_radius_m);
|
|
1258
|
-
`,
|
|
1251
|
+
`,Vy=S.default.div`
|
|
1259
1252
|
position: relative;
|
|
1260
|
-
${e=>e.$isDragOver?
|
|
1261
|
-
${
|
|
1253
|
+
${e=>e.$isDragOver?R.css`
|
|
1254
|
+
${ss} {
|
|
1262
1255
|
border-color: var(--cc_color_border_input_active);
|
|
1263
1256
|
border-style: solid;
|
|
1264
1257
|
box-shadow: inset 0 0 0 var(--cc_size_border_width_s)
|
|
1265
1258
|
var(--cc_color_border_input_active);
|
|
1266
1259
|
}
|
|
1267
1260
|
`:null}
|
|
1268
|
-
`,
|
|
1261
|
+
`,By=S.default.input.attrs({type:"file"})`
|
|
1269
1262
|
height: 100%;
|
|
1270
1263
|
width: 100%;
|
|
1271
1264
|
opacity: 0;
|
|
1272
1265
|
position: absolute;
|
|
1273
1266
|
cursor: pointer;
|
|
1274
|
-
${e=>e.$isDragOver?null:
|
|
1275
|
-
&:hover ~ ${
|
|
1267
|
+
${e=>e.$isDragOver?null:R.css`
|
|
1268
|
+
&:hover ~ ${ss} {
|
|
1276
1269
|
border-color: var(--cc_color_button_background_secondary);
|
|
1277
1270
|
}
|
|
1278
1271
|
`}
|
|
1279
|
-
`,
|
|
1280
|
-
${
|
|
1272
|
+
`,Wy=S.default.span`
|
|
1273
|
+
${et}
|
|
1281
1274
|
font-weight: 600;
|
|
1282
1275
|
display: inline-grid;
|
|
1283
1276
|
place-items: center;
|
|
1284
|
-
height: ${
|
|
1277
|
+
height: ${Bo.medium};
|
|
1285
1278
|
padding-inline: var(--cc_size_spacing_m);
|
|
1286
1279
|
border-radius: var(--cc_size_border_radius_l);
|
|
1287
1280
|
border: var(--cc_size_border_width_m) solid var(--cc_color_link_primary);
|
|
@@ -1290,18 +1283,18 @@
|
|
|
1290
1283
|
&:hover {
|
|
1291
1284
|
background: var(--cc_color_button_background_primary_alpha_10);
|
|
1292
1285
|
}
|
|
1293
|
-
`;function
|
|
1286
|
+
`;function Gy({messages:e,id:r,status:n}){return _.jsx("div",{role:"region","aria-live":"assertive",children:_.jsx(Hy,{id:r,children:e.map((t,o)=>_.jsx(Yy,{children:_.jsxs(wu,{$status:n,children:[_.jsx(xu,{className:`mdi mdi-${Ee(n).icon}`,"aria-hidden":"true"}),_.jsx(Su,{children:t})]})},o))})})}const qy=y.forwardRef(({onDrop:e,onDropAccepted:r,onDropRejected:n,accept:t,billboard:o,dropZoneStyle:a,fileUploadButtonLabel:i,multiple:s=!0,loading:l,messages:c,maxSize:u=1/0,...d},p)=>{const{className:f,message:g,status:m,style:h,...b}=d,[w,x]=y.useState(!1),$=E=>{const P=E.target.files,z=(t??"").split(",").map(T=>T.trim()),[L,O]=Array.from(P??[]).reduce(([T,I],j)=>j.size<=u&&z.includes(j.type)?[[...T,j],I]:[T,[...I,j]],[[],[]]);L.length>0&&r&&r(L),O.length>0&&n&&n(O),e(L,O,E),x(!1)},C=()=>x(!0),k=()=>x(!1);return _.jsxs(Vy,{onDragEnter:C,onDragLeave:k,$isDragOver:w,children:[_.jsx(By,{ref:p,"aria-describedby":g?`${d.id}-message`:"","aria-disabled":l?.isVisible,"aria-invalid":m==="error"?!0:void 0,type:"file",onChange:$,accept:t,multiple:s,$status:m,$isDragOver:w,...b}),_.jsxs(ss,{htmlFor:d.id,$status:m,style:a,children:[l?.isVisible?l.component:null,!l?.isVisible&&o?_.jsx(pu,{title:o.title,iconName:o.iconName,message:o.message,color:o.color,image:o.image}):null,!l?.isVisible&&i?_.jsx(Wy,{children:i}):null]}),c?_.jsx(Gy,{id:g?`${d.id}-message`:"",messages:c,status:m},d.id):null]})}),Ky=S.default.label`
|
|
1294
1287
|
all: initial;
|
|
1295
|
-
${e=>e.$hideLabel?
|
|
1288
|
+
${e=>e.$hideLabel?Ge:R.css`
|
|
1296
1289
|
box-sizing: border-box;
|
|
1297
1290
|
display: block;
|
|
1298
1291
|
margin-block-end: var(--cc_size_spacing_xs);
|
|
1299
1292
|
`}
|
|
1300
|
-
`,
|
|
1293
|
+
`,Uy=S.default.input`
|
|
1301
1294
|
all: initial;
|
|
1302
1295
|
box-sizing: border-box;
|
|
1303
1296
|
background: transparent;
|
|
1304
|
-
${
|
|
1297
|
+
${$e};
|
|
1305
1298
|
font-size: ${e=>e.$inputSize==="large"?"var(--cc_size_text_m)":"var(--cc_size_text_s)"};
|
|
1306
1299
|
color: var(--cc_color_text_default);
|
|
1307
1300
|
padding: ${e=>e.$inputSize==="large"?"0 var(--cc_size_spacing_m)":"0 calc(var(--cc_size_spacing_m) * 0.75)"};
|
|
@@ -1312,14 +1305,14 @@
|
|
|
1312
1305
|
&::placeholder {
|
|
1313
1306
|
color: var(--cc_color_text_nonessential);
|
|
1314
1307
|
}
|
|
1315
|
-
${e=>e.disabled?
|
|
1308
|
+
${e=>e.disabled?R.css`
|
|
1316
1309
|
cursor: not-allowed;
|
|
1317
1310
|
`:null}
|
|
1318
|
-
`,
|
|
1311
|
+
`,Qy=S.default.div`
|
|
1319
1312
|
border-width: var(--cc_size_border_width_s);
|
|
1320
1313
|
border-style: solid;
|
|
1321
1314
|
border-color: ${e=>e.$status==="error"?"var(--cc_color_utility_destroy)":"var(--cc_color_border_input_inactive)"};
|
|
1322
|
-
${e=>{if(!e.$status)return
|
|
1315
|
+
${e=>{if(!e.$status)return R.css`
|
|
1323
1316
|
@supports selector(:user-invalid) {
|
|
1324
1317
|
&:has(input:user-invalid) {
|
|
1325
1318
|
border-color: var(--cc_color_utility_destroy);
|
|
@@ -1333,32 +1326,32 @@
|
|
|
1333
1326
|
border-radius: var(--cc_size_border_radius_l);
|
|
1334
1327
|
background: var(--cc_color_background_1);
|
|
1335
1328
|
${e=>e.$message?"margin-block-end: var(--cc_size_spacing_xs);":null}
|
|
1336
|
-
${e=>e.$disabled?
|
|
1337
|
-
${
|
|
1329
|
+
${e=>e.$disabled?R.css`
|
|
1330
|
+
${tt}
|
|
1338
1331
|
background-color: var(--cc_color_background_3);
|
|
1339
|
-
`:
|
|
1332
|
+
`:R.css`
|
|
1340
1333
|
&:hover {
|
|
1341
1334
|
border-color: var(--cc_color_button_background_secondary);
|
|
1342
1335
|
}
|
|
1343
1336
|
`}
|
|
1344
1337
|
|
|
1345
1338
|
&:focus-within {
|
|
1346
|
-
${e=>
|
|
1339
|
+
${e=>Ee(e.$status).focusStyles}
|
|
1347
1340
|
border-color: transparent;
|
|
1348
1341
|
outline-offset: -2px;
|
|
1349
1342
|
}
|
|
1350
|
-
`,
|
|
1343
|
+
`,Xy=S.default.i`
|
|
1351
1344
|
color: var(--cc_color_text_nonessential);
|
|
1352
1345
|
font-size: ${e=>e.$inputSize==="large"?22:20}px;
|
|
1353
1346
|
margin-inline-start: ${e=>e.$inputSize==="large"?"var(--cc_size_spacing_m)":"calc(var(--cc_size_spacing_m) * 0.5)"};
|
|
1354
1347
|
position: relative;
|
|
1355
1348
|
top: 1px;
|
|
1356
1349
|
line-height: 1;
|
|
1357
|
-
`,
|
|
1350
|
+
`,Nl=S.default.span`
|
|
1358
1351
|
flex-shrink: 0;
|
|
1359
|
-
`,
|
|
1352
|
+
`,Zy=({type:e})=>{switch(e){case"email":return"email-outline";case"tel":return"phone-outline";case"search":return"magnify";case"url":return"web";default:return null}},rd=y.forwardRef(({label:e,onChange:r,contentBefore:n,contentAfter:t,hideLabel:o=!1,inputSize:a="medium",name:i,testId:s,type:l="text",value:c,...u},d)=>{const{status:p,className:f,disabled:g=!1,style:m,message:h,...b}=u,w=Zy({type:l}),x=n||w,$=()=>x?_.jsx(Nl,{children:n||_.jsx(Xy,{className:`mdi mdi-${w}`,$inputSize:a})}):null;return _.jsxs(rn,{inputId:u.id,message:h,className:f,status:p,style:m,children:[_.jsx(Ky,{htmlFor:u.id,$hideLabel:o,children:_.jsx(Xn,{children:e})}),_.jsxs(Qy,{$disabled:u.disabled||!1,$status:p,$type:l,$message:h,children:[$(),_.jsx(Uy,{ref:d,disabled:g,"aria-describedby":h?`${u.id}-message`:"","aria-invalid":p==="error"?!0:void 0,onChange:r,name:i||u.id,$inputSize:a,"data-testid":s,type:l,value:c,...b}),t?_.jsx(Nl,{children:t}):null]})]})}),Jy=S.default(sa)`
|
|
1360
1353
|
margin-inline-end: var(--cc_size_spacing_s);
|
|
1361
|
-
`,
|
|
1354
|
+
`,e0=y.forwardRef((e,r)=>{const[n,t]=y.useState(),o=()=>{t(a=>!a)};return _.jsx(rd,{ref:r,type:n?"text":"password",contentAfter:_.jsx(Jy,{onClick:o,design:"minimal",size:"small",iconName:n?"eye-outline":"eye-off-outline",accessibilityLabel:n?"Hide Password":"Show Password",disabled:e.disabled}),...e})}),mo=S.default.span`
|
|
1362
1355
|
box-sizing: border-box;
|
|
1363
1356
|
position: relative;
|
|
1364
1357
|
flex-shrink: 0;
|
|
@@ -1385,18 +1378,18 @@
|
|
|
1385
1378
|
transition: all 0.2s;
|
|
1386
1379
|
opacity: 0;
|
|
1387
1380
|
}
|
|
1388
|
-
`,
|
|
1381
|
+
`,In=S.default.label`
|
|
1389
1382
|
all: initial;
|
|
1390
1383
|
box-sizing: border-box;
|
|
1391
1384
|
display: flex;
|
|
1392
1385
|
align-items: flex-start;
|
|
1393
1386
|
gap: var(--cc_size_spacing_s);
|
|
1394
1387
|
cursor: pointer;
|
|
1395
|
-
`,
|
|
1388
|
+
`,Vt=S.default.input`
|
|
1396
1389
|
all: initial;
|
|
1397
|
-
${
|
|
1398
|
-
`,
|
|
1399
|
-
${
|
|
1390
|
+
${Ge}
|
|
1391
|
+
`,t0=S.default.span`
|
|
1392
|
+
${$e}
|
|
1400
1393
|
align-self: center;
|
|
1401
1394
|
flex: 1;
|
|
1402
1395
|
min-width: 1px;
|
|
@@ -1405,7 +1398,7 @@
|
|
|
1405
1398
|
color: var(--cc_color_link_secondary);
|
|
1406
1399
|
transform: translateY(-1px);
|
|
1407
1400
|
user-select: none;
|
|
1408
|
-
`,
|
|
1401
|
+
`,n0=S.default.div`
|
|
1409
1402
|
position: relative;
|
|
1410
1403
|
display: flex;
|
|
1411
1404
|
align-items: center;
|
|
@@ -1422,58 +1415,58 @@
|
|
|
1422
1415
|
--cc_radio_font_size: var(--cc_size_text_m);
|
|
1423
1416
|
}
|
|
1424
1417
|
|
|
1425
|
-
&:has(${
|
|
1426
|
-
${
|
|
1427
|
-
${
|
|
1418
|
+
&:has(${Vt}[aria-disabled='true']) {
|
|
1419
|
+
${tt}
|
|
1420
|
+
${In} {
|
|
1428
1421
|
cursor: not-allowed;
|
|
1429
1422
|
}
|
|
1430
1423
|
}
|
|
1431
1424
|
|
|
1432
|
-
&:has(${
|
|
1433
|
-
border-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?
|
|
1425
|
+
&:has(${Vt}:checked) ${In} ${mo} {
|
|
1426
|
+
border-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?Ee(e.$status).accentColor:"var(--cc_color_button_background_secondary)"};
|
|
1434
1427
|
|
|
1435
1428
|
&::after {
|
|
1436
|
-
background-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?
|
|
1429
|
+
background-color: ${e=>e.$status&&e.$status!=="normal"&&!e.$disabled?Ee(e.$status).accentColor:"var(--cc_color_button_background_secondary)"};
|
|
1437
1430
|
opacity: 1;
|
|
1438
1431
|
transform: translateX(-50%) translateY(-50%) scale(1);
|
|
1439
1432
|
}
|
|
1440
1433
|
}
|
|
1441
1434
|
|
|
1442
|
-
&:hover:not(:has(${
|
|
1443
|
-
${
|
|
1444
|
-
${
|
|
1435
|
+
&:hover:not(:has(${Vt}:disabled)):not(:has(${Vt}:checked))
|
|
1436
|
+
${In}
|
|
1437
|
+
${mo} {
|
|
1445
1438
|
border-color: var(--cc_color_link_secondary);
|
|
1446
1439
|
}
|
|
1447
1440
|
|
|
1448
|
-
&:hover:not(:has(${
|
|
1449
|
-
${
|
|
1450
|
-
${
|
|
1441
|
+
&:hover:not(:has(${Vt}:disabled)):has(${Vt}:checked)
|
|
1442
|
+
${In}
|
|
1443
|
+
${mo} {
|
|
1451
1444
|
border-color: var(--cc_color_link_subtle);
|
|
1452
1445
|
}
|
|
1453
1446
|
|
|
1454
1447
|
/* Focus visible styles */
|
|
1455
|
-
&:has(${
|
|
1456
|
-
${
|
|
1457
|
-
${e=>
|
|
1448
|
+
&:has(${Vt}:focus-visible) {
|
|
1449
|
+
${In} {
|
|
1450
|
+
${e=>Ee(e.$status).focusStyles}
|
|
1458
1451
|
border-radius: var(--cc_size_border_radius_m);
|
|
1459
1452
|
outline-offset: var(--cc_size_spacing_xxs);
|
|
1460
1453
|
}
|
|
1461
1454
|
}
|
|
1462
|
-
`,
|
|
1455
|
+
`,od=y.forwardRef(({id:e,label:r,name:n,scale:t="medium",testId:o,value:a,...i},s)=>{const{status:l,className:c,style:u,disabled:d=!1,...p}=i,f=i["data-testid"]||o;return _.jsxs(n0,{$disabled:i.disabled,$status:l,"data-size":t,style:u,className:c,children:[_.jsx(Vt,{ref:s,type:"radio","aria-invalid":l==="error"?!0:void 0,"aria-disabled":d,"data-testid":f,id:e,name:n,value:a,...p}),_.jsxs(In,{htmlFor:e,"data-testid":f?`${f}-label`:"",children:[_.jsx(mo,{}),_.jsx(t0,{children:r})]})]})});function r0({onChange:e,options:r,selectedValue:n,scale:t,...o}){return _.jsx(Eu,{...o,children:r.map(a=>_.jsx(od,{status:a.status||o.status,id:`${o.id}-${a.value}`,name:o.id,onChange:e,checked:n===a.value,disabled:a.disabled||o.disabled,scale:a.scale||t,...a},a.value))})}const o0=S.default.span`
|
|
1463
1456
|
min-height: var(--cc_size_spacing_l);
|
|
1464
1457
|
display: flex;
|
|
1465
1458
|
align-items: center;
|
|
1466
|
-
${e=>e.$disabled?
|
|
1467
|
-
`,
|
|
1459
|
+
${e=>e.$disabled?tt:null}
|
|
1460
|
+
`,Al=S.default.span`
|
|
1468
1461
|
flex-shrink: 0;
|
|
1469
|
-
`,
|
|
1462
|
+
`,a0=S.default.label`
|
|
1470
1463
|
all: initial;
|
|
1471
|
-
${e=>e.$hideLabel?
|
|
1464
|
+
${e=>e.$hideLabel?Ge:R.css`
|
|
1472
1465
|
box-sizing: border-box;
|
|
1473
1466
|
display: block;
|
|
1474
1467
|
margin-block-end: var(--cc_size_spacing_xs);
|
|
1475
1468
|
`}
|
|
1476
|
-
`,
|
|
1469
|
+
`,jl=R.css`
|
|
1477
1470
|
width: 100%;
|
|
1478
1471
|
height: var(--cc_size_spacing_xs);
|
|
1479
1472
|
background: var(--cc_color_button_background_subtle);
|
|
@@ -1481,9 +1474,9 @@
|
|
|
1481
1474
|
&:hover {
|
|
1482
1475
|
border-color: var(--cc_color_link_secondary);
|
|
1483
1476
|
}
|
|
1484
|
-
`,
|
|
1477
|
+
`,Hl=(e,r)=>R.css`
|
|
1485
1478
|
box-sizing: border-box;
|
|
1486
|
-
background: ${e==="error"||e==="success"?
|
|
1479
|
+
background: ${e==="error"||e==="success"?Ee(e).accentColor:"var(--cc_color_button_background_secondary)"};
|
|
1487
1480
|
height: var(--cc_size_spacing_m);
|
|
1488
1481
|
width: var(--cc_size_spacing_m);
|
|
1489
1482
|
border-radius: 100%;
|
|
@@ -1492,7 +1485,7 @@
|
|
|
1492
1485
|
box-shadow: 0 0 0 var(--cc_size_spacing_s)
|
|
1493
1486
|
var(--cc_color_button_background_secondary_alpha_10);
|
|
1494
1487
|
}
|
|
1495
|
-
`,
|
|
1488
|
+
`,i0=S.default.input`
|
|
1496
1489
|
all: initial;
|
|
1497
1490
|
position: relative;
|
|
1498
1491
|
box-sizing: border-box;
|
|
@@ -1505,17 +1498,17 @@
|
|
|
1505
1498
|
flex: 1;
|
|
1506
1499
|
|
|
1507
1500
|
&::-webkit-slider-runnable-track {
|
|
1508
|
-
${
|
|
1501
|
+
${jl}
|
|
1509
1502
|
}
|
|
1510
1503
|
|
|
1511
1504
|
&::-moz-range-track {
|
|
1512
|
-
${
|
|
1505
|
+
${jl}
|
|
1513
1506
|
}
|
|
1514
1507
|
|
|
1515
1508
|
&::-webkit-slider-thumb {
|
|
1516
1509
|
-webkit-appearance: none;
|
|
1517
1510
|
appearance: none;
|
|
1518
|
-
${e=>
|
|
1511
|
+
${e=>Hl(e.$status,e.disabled)}
|
|
1519
1512
|
|
|
1520
1513
|
/*
|
|
1521
1514
|
track height in pixels / 2) - (thumb height in pixels / 2)
|
|
@@ -1526,7 +1519,7 @@
|
|
|
1526
1519
|
);
|
|
1527
1520
|
}
|
|
1528
1521
|
&::-moz-range-thumb {
|
|
1529
|
-
${e=>
|
|
1522
|
+
${e=>Hl(e.$status,e.disabled)}
|
|
1530
1523
|
border: none;
|
|
1531
1524
|
}
|
|
1532
1525
|
|
|
@@ -1535,12 +1528,12 @@
|
|
|
1535
1528
|
}
|
|
1536
1529
|
|
|
1537
1530
|
&:focus-visible {
|
|
1538
|
-
${e=>
|
|
1531
|
+
${e=>Ee(e.$status).focusStyles}
|
|
1539
1532
|
border-radius: var(--cc_size_border_radius_m);
|
|
1540
1533
|
outline-offset: var(--cc_size_spacing_s);
|
|
1541
1534
|
}
|
|
1542
|
-
`,
|
|
1543
|
-
${
|
|
1535
|
+
`,s0=S.default.output`
|
|
1536
|
+
${et}
|
|
1544
1537
|
font-weight: 500;
|
|
1545
1538
|
font-size: calc(var(--cc_size_text_xs) + 1px);
|
|
1546
1539
|
flex-shrink: 0;
|
|
@@ -1551,19 +1544,19 @@
|
|
|
1551
1544
|
min-width: var(--cc_size_spacing_xxl);
|
|
1552
1545
|
text-align: center;
|
|
1553
1546
|
margin-inline-start: var(--cc_size_spacing_m);
|
|
1554
|
-
`,
|
|
1547
|
+
`,l0=(e,r,n)=>Math.round((e-r)/n)*n+r,c0=(e,r,n)=>{const t=n>0?n:1,o=e+(r-e)/2;return l0(o,e,t)},u0=y.forwardRef(({contentBefore:e,contentAfter:r,hideLabel:n=!1,hideValue:t=!1,formatValue:o,label:a,min:i=0,max:s=100,step:l=1,value:c,onChange:u,defaultValue:d,...p},f)=>{const[g,m]=y.useState(d??c0(i,s,l)),h=y.useCallback(P=>{const z=Number(P.target.value);c===void 0&&m(z),u?.(P)},[u,c]),b=c??g,{status:w,className:x,disabled:$=!1,style:C,message:k,...E}=p;return _.jsxs(rn,{inputId:p.id,message:k,className:x,status:w,style:C,children:[_.jsx(a0,{htmlFor:p.id,$hideLabel:n,children:_.jsx(Xn,{children:a})}),_.jsxs(o0,{$disabled:$,children:[e?_.jsx(Al,{children:e}):null,_.jsx(i0,{ref:f,disabled:$,"aria-describedby":k?`${p.id}-message`:"","aria-invalid":w==="error"?!0:void 0,min:i,max:s,onChange:h,step:l,$status:w,type:"range",value:b,...E}),r?_.jsx(Al,{children:r}):null,t?null:_.jsx(s0,{htmlFor:p.id,children:o?o(b):b})]})]})}),d0=S.default.label`
|
|
1555
1548
|
all: initial;
|
|
1556
|
-
${e=>e.$hideLabel?
|
|
1549
|
+
${e=>e.$hideLabel?Ge:R.css`
|
|
1557
1550
|
box-sizing: border-box;
|
|
1558
1551
|
display: block;
|
|
1559
1552
|
margin-block-end: var(--cc_size_spacing_xs);
|
|
1560
1553
|
`}
|
|
1561
|
-
`,
|
|
1554
|
+
`,f0=S.default.div`
|
|
1562
1555
|
position: relative;
|
|
1563
1556
|
border-width: var(--cc_size_border_width_s);
|
|
1564
1557
|
border-style: solid;
|
|
1565
1558
|
border-color: ${e=>e.$status==="error"?"var(--cc_color_utility_destroy)":"var(--cc_color_border_input_inactive)"};
|
|
1566
|
-
${e=>{if(!e.$status)return
|
|
1559
|
+
${e=>{if(!e.$status)return R.css`
|
|
1567
1560
|
@supports selector(:user-invalid) {
|
|
1568
1561
|
&:has(select:user-invalid) {
|
|
1569
1562
|
border-color: var(--cc_color_utility_destroy);
|
|
@@ -1575,24 +1568,24 @@
|
|
|
1575
1568
|
border-radius: var(--cc_size_border_radius_l);
|
|
1576
1569
|
background: var(--cc_color_background_1);
|
|
1577
1570
|
${e=>e.$message?"margin-block-end: var(--cc_size_spacing_xs);":null}
|
|
1578
|
-
${e=>e.$disabled?
|
|
1579
|
-
${
|
|
1571
|
+
${e=>e.$disabled?R.css`
|
|
1572
|
+
${tt}
|
|
1580
1573
|
background-color: var(--cc_color_background_3);
|
|
1581
|
-
`:
|
|
1574
|
+
`:R.css`
|
|
1582
1575
|
&:hover {
|
|
1583
1576
|
border-color: var(--cc_color_button_background_secondary);
|
|
1584
1577
|
}
|
|
1585
1578
|
`}
|
|
1586
1579
|
|
|
1587
1580
|
&:focus-within {
|
|
1588
|
-
${e=>
|
|
1581
|
+
${e=>Ee(e.$status).focusStyles}
|
|
1589
1582
|
border-color: transparent;
|
|
1590
1583
|
outline-offset: -2px;
|
|
1591
1584
|
}
|
|
1592
|
-
`,
|
|
1585
|
+
`,p0=S.default.select`
|
|
1593
1586
|
all: initial;
|
|
1594
1587
|
appearance: none;
|
|
1595
|
-
${
|
|
1588
|
+
${$e};
|
|
1596
1589
|
box-sizing: border-box;
|
|
1597
1590
|
background: transparent;
|
|
1598
1591
|
display: block;
|
|
@@ -1616,7 +1609,7 @@
|
|
|
1616
1609
|
&:focus-visible {
|
|
1617
1610
|
outline: none;
|
|
1618
1611
|
}
|
|
1619
|
-
`,
|
|
1612
|
+
`,g0=S.default.i`
|
|
1620
1613
|
position: absolute;
|
|
1621
1614
|
inset-inline-end: var(--cc_size_spacing_s);
|
|
1622
1615
|
inset-block-start: 50%;
|
|
@@ -1624,7 +1617,7 @@
|
|
|
1624
1617
|
font-size: var(--cc_size_text_l);
|
|
1625
1618
|
color: var(--cc_color_link_subtle);
|
|
1626
1619
|
pointer-events: none;
|
|
1627
|
-
`,
|
|
1620
|
+
`,m0=y.forwardRef(({className:e,style:r,message:n,status:t,label:o,hideLabel:a,options:i,inputSize:s="medium",...l},c)=>_.jsxs(rn,{inputId:l.id,className:e,message:n,style:r,status:t,children:[_.jsx(d0,{htmlFor:l.id,$hideLabel:a,children:_.jsx(Xn,{children:o})}),_.jsxs(f0,{$message:n,$status:t,$disabled:l.disabled,children:[_.jsx(p0,{ref:c,"aria-describedby":n?`${l.id}-message`:"","aria-invalid":t==="error"?!0:void 0,$inputSize:s,...l,children:i.map(u=>_.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value))}),_.jsx(g0,{className:"mdi mdi-chevron-down",role:"presentation"})]})]})),h0=S.default.textarea`
|
|
1628
1621
|
all: initial;
|
|
1629
1622
|
box-sizing: border-box;
|
|
1630
1623
|
display: block;
|
|
@@ -1633,7 +1626,7 @@
|
|
|
1633
1626
|
width: 100%;
|
|
1634
1627
|
max-width: 100%;
|
|
1635
1628
|
height: var(--textarea-height, auto);
|
|
1636
|
-
${
|
|
1629
|
+
${$e};
|
|
1637
1630
|
font-size: ${e=>e.$inputSize==="large"?"var(--cc_size_text_m)":"var(--cc_size_text_s)"};
|
|
1638
1631
|
${e=>e.$message?"margin-block-end: var(--cc_size_spacing_xs);":null}
|
|
1639
1632
|
background: var(--cc_color_background_1);
|
|
@@ -1642,7 +1635,7 @@
|
|
|
1642
1635
|
border-style: solid;
|
|
1643
1636
|
border-radius: var(--cc_size_border_radius_l);
|
|
1644
1637
|
border-color: ${e=>e.$status==="error"?"var(--cc_color_utility_destroy)":"var(--cc_color_border_input_inactive)"};
|
|
1645
|
-
${e=>{if(!e.$status)return
|
|
1638
|
+
${e=>{if(!e.$status)return R.css`
|
|
1646
1639
|
@supports selector(:user-invalid) {
|
|
1647
1640
|
&:user-invalid {
|
|
1648
1641
|
border-color: var(--cc_color_utility_destroy);
|
|
@@ -1657,40 +1650,40 @@
|
|
|
1657
1650
|
}
|
|
1658
1651
|
|
|
1659
1652
|
&:focus-visible {
|
|
1660
|
-
${e=>
|
|
1653
|
+
${e=>Ee(e.$status).focusStyles}
|
|
1661
1654
|
border-color: transparent;
|
|
1662
1655
|
outline-offset: -2px;
|
|
1663
1656
|
}
|
|
1664
1657
|
|
|
1665
|
-
${e=>e.disabled?
|
|
1666
|
-
${
|
|
1658
|
+
${e=>e.disabled?R.css`
|
|
1659
|
+
${tt}
|
|
1667
1660
|
background-color: var(--cc_color_background_3);
|
|
1668
|
-
`:
|
|
1661
|
+
`:R.css`
|
|
1669
1662
|
&:hover {
|
|
1670
1663
|
border-color: var(--cc_color_button_background_secondary);
|
|
1671
1664
|
}
|
|
1672
1665
|
`}
|
|
1673
|
-
`,
|
|
1666
|
+
`,v0=S.default.label`
|
|
1674
1667
|
all: initial;
|
|
1675
|
-
${e=>e.$hideLabel?
|
|
1668
|
+
${e=>e.$hideLabel?Ge:R.css`
|
|
1676
1669
|
box-sizing: border-box;
|
|
1677
1670
|
display: block;
|
|
1678
1671
|
margin-block-end: var(--cc_size_spacing_xs);
|
|
1679
1672
|
`}
|
|
1680
|
-
`,
|
|
1673
|
+
`,Yl=(e,r)=>{if(r||!e.current)return;e.current.style.setProperty("--textarea-height","auto");const n=e.current.scrollHeight;e.current.style.setProperty("--textarea-height",`${n}px`)},_0=y.forwardRef(({hideLabel:e=!1,inputSize:r="medium",label:n,value:t,onChange:o,...a},i)=>{const s=$u(i);y.useEffect(()=>{Yl(s,a.rows)},[t,a.rows,s]);const l=y.useCallback(m=>{t===void 0&&Yl(s,a.rows),o?.(m)},[t,o,s,a.rows]),{status:c,disabled:u=!1,message:d,className:p,style:f,...g}=a;return _.jsxs(rn,{inputId:a.id,className:p,message:d,style:f,status:c,children:[_.jsx(v0,{htmlFor:a.id,$hideLabel:e,children:_.jsx(Xn,{children:n})}),_.jsx(h0,{"aria-describedby":a.message?`${a.id}-message`:"","aria-invalid":c==="error"?!0:void 0,disabled:u,$inputSize:r,$message:d,onChange:l,ref:s,$status:c,value:t,...g})]})}),b0=S.default.span`
|
|
1681
1674
|
display: inline-flex;
|
|
1682
1675
|
align-items: center;
|
|
1683
1676
|
padding: 0 var(--cc_size_spacing_s);
|
|
1684
1677
|
border-radius: var(--cc_size_border_radius_m);
|
|
1685
1678
|
background-color: ${e=>`var(--cc_color_label_${e.$color})`};
|
|
1686
1679
|
height: var(--cc_size_avatar_s);
|
|
1687
|
-
`,
|
|
1680
|
+
`,y0=S.default(Ce)`
|
|
1688
1681
|
white-space: nowrap;
|
|
1689
1682
|
overflow: hidden;
|
|
1690
1683
|
text-overflow: ellipsis;
|
|
1691
1684
|
min-width: 0;
|
|
1692
|
-
color: ${e=>e.$color==="yellow"?
|
|
1693
|
-
`;function
|
|
1685
|
+
color: ${e=>e.$color==="yellow"?Li:vo};
|
|
1686
|
+
`;function w0({color:e,...r}){return _.jsx(b0,{...r,$color:e,children:_.jsx(y0,{forwardedAs:"span",family:"heading",size:"xs",weight:500,$color:e,children:r.children})})}const x0=S.default.a`
|
|
1694
1687
|
all: initial;
|
|
1695
1688
|
display: inline-flex;
|
|
1696
1689
|
align-items: center;
|
|
@@ -1707,44 +1700,28 @@
|
|
|
1707
1700
|
&:hover {
|
|
1708
1701
|
text-decoration-color: var(--cc_color_link_primary);
|
|
1709
1702
|
}
|
|
1710
|
-
`,
|
|
1703
|
+
`,S0=S.default.i`
|
|
1711
1704
|
font-size: inherit;
|
|
1712
1705
|
color: var(--cc_color_text_nonessential);
|
|
1713
|
-
`;function
|
|
1714
|
-
${e=>e.$ccMargin?
|
|
1715
|
-
margin: ${
|
|
1706
|
+
`;function ad({component:e,...r},n){const t=e||"a";return _.jsxs(x0,{as:t,ref:n,...r,children:[r.children,r.target==="_blank"&&_.jsx(S0,{"aria-hidden":"true","data-testid":"link-external-icon",className:"mdi mdi-open-in-new"})]})}ad.displayName="BaseLink";const id=y.forwardRef(ad);id.displayName="Link";const $0=S.default.div`
|
|
1707
|
+
${e=>e.$ccMargin?R.css`
|
|
1708
|
+
margin: ${lt(e.$ccMargin)};
|
|
1716
1709
|
`:null}
|
|
1717
1710
|
> svg {
|
|
1718
1711
|
display: block; /* Lottie SVG will have line-height otherwise */
|
|
1719
1712
|
height: 100%;
|
|
1720
1713
|
width: 100%;
|
|
1721
1714
|
}
|
|
1722
|
-
`,E0={contain:"xMidYMid meet",cover:"xMidYMid slice",fill:"none"};function M0({accessibilityLabel:e,ccMargin:r,className:t,objectFit:n,style:o,"data-testid":a,...i}){const s=b.useRef(null),l=b.useRef(null);return b.useEffect(()=>{var c;if(l.current){const u=(c=i.rendererSettings)==null?void 0:c.preserveAspectRatio;s.current=If.default.loadAnimation({container:l.current,renderer:"svg",rendererSettings:{title:e,viewBoxOnly:!0,preserveAspectRatio:u||E0[n??"contain"]},...i})}return()=>{var u;return(u=s.current)==null?void 0:u.destroy()}},[e,n,i]),v.jsx(D0,{$ccMargin:r,className:t,style:o,"data-testid":a,ref:l})}const R0=typeof document<"u"?h.default.useLayoutEffect:()=>{},an=e=>{var r;return(r=e==null?void 0:e.ownerDocument)!==null&&r!==void 0?r:document},pn=e=>e&&"window"in e&&e.window===e?e:an(e).defaultView||window;function P0(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function T0(e){return P0(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let I0=!1;function cs(){return I0}function ld(e,r){if(!cs())return r&&e?e.contains(r):!1;if(!e||!r)return!1;let t=r;for(;t!==null;){if(t===e)return!0;t.tagName==="SLOT"&&t.assignedSlot?t=t.assignedSlot.parentNode:T0(t)?t=t.host:t=t.parentNode}return!1}const bi=(e=document)=>{var r;if(!cs())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&(!((r=t.shadowRoot)===null||r===void 0)&&r.activeElement);)t=t.shadowRoot.activeElement;return t};function cd(e){return cs()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function O0(e){if(F0())e.focus({preventScroll:!0});else{let r=L0(e);e.focus(),z0(r)}}let Jr=null;function F0(){if(Jr==null){Jr=!1;try{document.createElement("div").focus({get preventScroll(){return Jr=!0,!0}})}catch{}}return Jr}function L0(e){let r=e.parentNode,t=[],n=document.scrollingElement||document.documentElement;for(;r instanceof HTMLElement&&r!==n;)(r.offsetHeight<r.scrollHeight||r.offsetWidth<r.scrollWidth)&&t.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),r=r.parentNode;return n instanceof HTMLElement&&t.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),t}function z0(e){for(let{element:r,scrollTop:t,scrollLeft:n}of e)r.scrollTop=t,r.scrollLeft=n}function ga(e){var r;if(typeof window>"u"||window.navigator==null)return!1;let t=(r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands;return Array.isArray(t)&&t.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function us(e){var r;return typeof window<"u"&&window.navigator!=null?e.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function Ht(e){if(process.env.NODE_ENV==="test")return e;let r=null;return()=>(r==null&&(r=e()),r)}const Cr=Ht(function(){return us(/^Mac/i)}),N0=Ht(function(){return us(/^iPhone/i)}),ud=Ht(function(){return us(/^iPad/i)||Cr()&&navigator.maxTouchPoints>1}),A0=Ht(function(){return N0()||ud()});Ht(function(){return Cr()||A0()});const j0=Ht(function(){return ga(/AppleWebKit/i)&&!H0()}),H0=Ht(function(){return ga(/Chrome/i)}),Y0=Ht(function(){return ga(/Android/i)}),V0=Ht(function(){return ga(/Firefox/i)});function Dr(e,r,t=!0){var n,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=r;V0()&&(!((o=window.event)===null||o===void 0||(n=o.type)===null||n===void 0)&&n.startsWith("key"))&&e.target==="_blank"&&(Cr()?a=!0:i=!0);let c=j0()&&Cr()&&!ud()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Dr.isOpening=t,O0(e),e.dispatchEvent(c),Dr.isOpening=!1}Dr.isOpening=!1;function dd(){let e=b.useRef(new Map),r=b.useCallback((o,a,i,s)=>{let l=s!=null&&s.once?(...c)=>{e.current.delete(i),i(...c)}:i;e.current.set(i,{type:a,eventTarget:o,fn:l,options:s}),o.addEventListener(a,l,s)},[]),t=b.useCallback((o,a,i,s)=>{var l;let c=((l=e.current.get(i))===null||l===void 0?void 0:l.fn)||i;o.removeEventListener(a,c,s),e.current.delete(i)},[]),n=b.useCallback(()=>{e.current.forEach((o,a)=>{t(o.eventTarget,o.type,a,o.options)})},[t]);return b.useEffect(()=>n,[n]),{addGlobalListener:r,removeGlobalListener:t,removeAllGlobalListeners:n}}function B0(e){return e.pointerType===""&&e.isTrusted?!0:Y0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fd(e){let r=e;return r.nativeEvent=e,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function W0(e,r){Object.defineProperty(e,"target",{value:r}),Object.defineProperty(e,"currentTarget",{value:r})}function pd(e){let r=b.useRef({isFocused:!1,observer:null});return R0(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]),b.useCallback(t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){r.current.isFocused=!0;let n=t.target,o=a=>{if(r.current.isFocused=!1,n.disabled){let i=fd(a);e==null||e(i)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};n.addEventListener("focusout",o,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&n.disabled){var a;(a=r.current.observer)===null||a===void 0||a.disconnect();let i=n===document.activeElement?null:document.activeElement;n.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),r.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let G0=!1,Fr=null,yi=new Set,pr=new Map,Sn=!1,wi=!1;const q0={Tab:!0,Escape:!0};function ds(e,r){for(let t of yi)t(e,r)}function K0(e){return!(e.metaKey||!Cr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function zo(e){Sn=!0,!Dr.isOpening&&K0(e)&&(Fr="keyboard",ds("keyboard",e))}function Ze(e){Fr="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(Sn=!0,ds("pointer",e))}function gd(e){!Dr.isOpening&&B0(e)&&(Sn=!0,Fr="virtual")}function md(e){e.target===window||e.target===document||G0||!e.isTrusted||(!Sn&&!wi&&(Fr="virtual",ds("virtual",e)),Sn=!1,wi=!1)}function hd(){Sn=!1,wi=!0}function xi(e){if(typeof window>"u"||typeof document>"u"||pr.get(pn(e)))return;const r=pn(e),t=an(e);let n=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){Sn=!0,n.apply(this,arguments)},t.addEventListener("keydown",zo,!0),t.addEventListener("keyup",zo,!0),t.addEventListener("click",gd,!0),r.addEventListener("focus",md,!0),r.addEventListener("blur",hd,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",Ze,!0),t.addEventListener("pointermove",Ze,!0),t.addEventListener("pointerup",Ze,!0)):process.env.NODE_ENV==="test"&&(t.addEventListener("mousedown",Ze,!0),t.addEventListener("mousemove",Ze,!0),t.addEventListener("mouseup",Ze,!0)),r.addEventListener("beforeunload",()=>{vd(e)},{once:!0}),pr.set(r,{focus:n})}const vd=(e,r)=>{const t=pn(e),n=an(e);r&&n.removeEventListener("DOMContentLoaded",r),pr.has(t)&&(t.HTMLElement.prototype.focus=pr.get(t).focus,n.removeEventListener("keydown",zo,!0),n.removeEventListener("keyup",zo,!0),n.removeEventListener("click",gd,!0),t.removeEventListener("focus",md,!0),t.removeEventListener("blur",hd,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",Ze,!0),n.removeEventListener("pointermove",Ze,!0),n.removeEventListener("pointerup",Ze,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",Ze,!0),n.removeEventListener("mousemove",Ze,!0),n.removeEventListener("mouseup",Ze,!0)),pr.delete(t))};function U0(e){const r=an(e);let t;return r.readyState!=="loading"?xi(e):(t=()=>{xi(e)},r.addEventListener("DOMContentLoaded",t)),()=>vd(e,t)}typeof document<"u"&&U0();function _d(){return Fr!=="pointer"}const Q0=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function X0(e,r,t){let n=an(t==null?void 0:t.target);const o=typeof window<"u"?pn(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?pn(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?pn(t==null?void 0:t.target).HTMLElement:HTMLElement,s=typeof window<"u"?pn(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return e=e||n.activeElement instanceof o&&!Q0.has(n.activeElement.type)||n.activeElement instanceof a||n.activeElement instanceof i&&n.activeElement.isContentEditable,!(e&&r==="keyboard"&&t instanceof s&&!q0[t.key])}function Z0(e,r,t){xi(),b.useEffect(()=>{let n=(o,a)=>{X0(!!(t!=null&&t.isTextInput),o,a)&&e(_d())};return yi.add(n),()=>{yi.delete(n)}},r)}function J0(e){let{isDisabled:r,onFocus:t,onBlur:n,onFocusChange:o}=e;const a=b.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),i=pd(a),s=b.useCallback(l=>{const c=an(l.target),u=c?bi(c):bi();l.target===l.currentTarget&&u===cd(l.nativeEvent)&&(t&&t(l),o&&o(!0),i(l))},[o,t,i]);return{focusProps:{onFocus:!r&&(t||o||n)?s:void 0,onBlur:!r&&(n||o)?a:void 0}}}function ew(e){let{isDisabled:r,onBlurWithin:t,onFocusWithin:n,onFocusWithinChange:o}=e,a=b.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=dd(),l=b.useCallback(f=>{f.currentTarget.contains(f.target)&&a.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(a.current.isFocusWithin=!1,s(),t&&t(f),o&&o(!1))},[t,o,a,s]),c=pd(l),u=b.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const p=an(f.target),d=bi(p);if(!a.current.isFocusWithin&&d===cd(f.nativeEvent)){n&&n(f),o&&o(!0),a.current.isFocusWithin=!0,c(f);let g=f.currentTarget;i(p,"focus",m=>{if(a.current.isFocusWithin&&!ld(g,m.target)){let _=new p.defaultView.FocusEvent("blur",{relatedTarget:m.target});W0(_,g);let y=fd(_);l(y)}},{capture:!0})}},[n,o,c,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let No=!1,eo=0;function Si(){No=!0,setTimeout(()=>{No=!1},50)}function Bl(e){e.pointerType==="touch"&&Si()}function tw(){if(!(typeof document>"u"))return eo===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Bl):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Si)),eo++,()=>{eo--,!(eo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Bl):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Si))}}function nw(e){let{onHoverStart:r,onHoverChange:t,onHoverEnd:n,isDisabled:o}=e,[a,i]=b.useState(!1),s=b.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;b.useEffect(tw,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=dd(),{hoverProps:u,triggerHoverEnd:f}=b.useMemo(()=>{let p=(m,_)=>{if(s.pointerType=_,o||_==="touch"||s.isHovered||!m.currentTarget.contains(m.target))return;s.isHovered=!0;let y=m.currentTarget;s.target=y,l(an(m.target),"pointerover",x=>{s.isHovered&&s.target&&!ld(s.target,x.target)&&d(x,x.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:y,pointerType:_}),t&&t(!0),i(!0)},d=(m,_)=>{let y=s.target;s.pointerType="",s.target=null,!(_==="touch"||!s.isHovered||!y)&&(s.isHovered=!1,c(),n&&n({type:"hoverend",target:y,pointerType:_}),t&&t(!1),i(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=m=>{No&&m.pointerType==="mouse"||p(m,m.pointerType)},g.onPointerLeave=m=>{!o&&m.currentTarget.contains(m.target)&&d(m,m.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=m=>{!s.ignoreEmulatedMouseEvents&&!No&&p(m,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=m=>{!o&&m.currentTarget.contains(m.target)&&d(m,"mouse")}),{hoverProps:g,triggerHoverEnd:d}},[r,t,n,o,s,l,c]);return b.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:u,isHovered:a}}function rw(e={}){let{autoFocus:r=!1,isTextInput:t,within:n}=e,o=b.useRef({isFocused:!1,isFocusVisible:r||_d()}),[a,i]=b.useState(!1),[s,l]=b.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=b.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=b.useCallback(d=>{o.current.isFocused=d,i(d),c()},[c]);Z0(d=>{o.current.isFocusVisible=d,c()},[],{isTextInput:t});let{focusProps:f}=J0({isDisabled:n,onFocusChange:u}),{focusWithinProps:p}=ew({isDisabled:!n,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:n?p:f}}var ow=Object.defineProperty,aw=(e,r,t)=>r in e?ow(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Ga=(e,r,t)=>(aw(e,typeof r!="symbol"?r+"":r,t),t);let iw=class{constructor(){Ga(this,"current",this.detect()),Ga(this,"handoffState","pending"),Ga(this,"currentId",0)}set(r){this.current!==r&&(this.handoffState="pending",this.currentId=0,this.current=r)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},It=new iw;function Cn(e){var r,t;return It.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(t=(r=e.current)==null?void 0:r.ownerDocument)!=null?t:document:null:document}function ma(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(r=>setTimeout(()=>{throw r}))}function Ve(){let e=[],r={addEventListener(t,n,o,a){return t.addEventListener(n,o,a),r.add(()=>t.removeEventListener(n,o,a))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return r.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return r.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return ma(()=>{n.current&&t[0]()}),r.add(()=>{n.current=!1})},style(t,n,o){let a=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:o}),this.add(()=>{Object.assign(t.style,{[n]:a})})},group(t){let n=Ve();return t(n),this.add(()=>n.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let t of e.splice(0))t()}};return r}function Dn(){let[e]=b.useState(Ve);return b.useEffect(()=>()=>e.dispose(),[e]),e}let ge=(e,r)=>{It.isServer?b.useEffect(e,r):b.useLayoutEffect(e,r)};function En(e){let r=b.useRef(e);return ge(()=>{r.current=e},[e]),r}let K=function(e){let r=En(e);return h.default.useCallback((...t)=>r.current(...t),[r])};function sw(e){let r=e.width/2,t=e.height/2;return{top:e.clientY-t,right:e.clientX+r,bottom:e.clientY+t,left:e.clientX-r}}function lw(e,r){return!(!e||!r||e.right<r.left||e.left>r.right||e.bottom<r.top||e.top>r.bottom)}function cw({disabled:e=!1}={}){let r=b.useRef(null),[t,n]=b.useState(!1),o=Dn(),a=K(()=>{r.current=null,n(!1),o.dispose()}),i=K(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,n(!0);{let l=Cn(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",c=>{if(r.current){let u=sw(c);n(lw(u,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:t,pressProps:e?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}function St(e){return b.useMemo(()=>e,Object.values(e))}let uw=b.createContext(void 0);function bd(){return b.useContext(uw)}function $i(...e){return Array.from(new Set(e.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function lt(e,r,...t){if(e in r){let o=r[e];return typeof o=="function"?o(...t):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,lt),n}var Kn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Kn||{}),qt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(qt||{});function Se(){let e=fw();return b.useCallback(r=>dw({mergeRefs:e,...r}),[e])}function dw({ourProps:e,theirProps:r,slot:t,defaultTag:n,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??pw;let l=yd(r,e);if(a)return to(l,t,n,i,s);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return to(f,t,n,i,s)}if(c&1){let{unmount:u=!0,...f}=l;return lt(u?0:1,{0(){return null},1(){return to({...f,hidden:!0,style:{display:"none"}},t,n,i,s)}})}return to(l,t,n,i,s)}function to(e,r={},t,n,o){let{as:a=t,children:i,refName:s="ref",...l}=qa(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},u=typeof i=="function"?i(r):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(r)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(r){let p=!1,d=[];for(let[g,m]of Object.entries(r))typeof m=="boolean"&&(p=!0),m===!0&&d.push(g.replace(/([A-Z])/g,_=>`-${_.toLowerCase()}`));if(p){f["data-headlessui-state"]=d.join(" ");for(let g of d)f[`data-${g}`]=""}}if(gr(a)&&(Object.keys(un(l)).length>0||Object.keys(un(f)).length>0))if(!b.isValidElement(u)||Array.isArray(u)&&u.length>1||mw(u)){if(Object.keys(un(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(un(l)).concat(Object.keys(un(f))).map(p=>` - ${p}`).join(`
|
|
1715
|
+
`,k0={contain:"xMidYMid meet",cover:"xMidYMid slice",fill:"none"};function C0({accessibilityLabel:e,ccMargin:r,className:n,objectFit:t,style:o,"data-testid":a,...i}){const s=y.useRef(null),l=y.useRef(null);return y.useEffect(()=>{if(l.current){const c=i.rendererSettings?.preserveAspectRatio;s.current=Rf.default.loadAnimation({container:l.current,renderer:"svg",rendererSettings:{title:e,viewBoxOnly:!0,preserveAspectRatio:c||k0[t??"contain"]},...i})}return()=>s.current?.destroy()},[e,t,i]),_.jsx($0,{$ccMargin:r,className:n,style:o,"data-testid":a,ref:l})}const D0=typeof document<"u"?v.default.useLayoutEffect:()=>{},on=e=>{var r;return(r=e?.ownerDocument)!==null&&r!==void 0?r:document},fn=e=>e&&"window"in e&&e.window===e?e:on(e).defaultView||window;function E0(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function M0(e){return E0(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let R0=!1;function ls(){return R0}function sd(e,r){if(!ls())return r&&e?e.contains(r):!1;if(!e||!r)return!1;let n=r;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:M0(n)?n=n.host:n=n.parentNode}return!1}const _i=(e=document)=>{var r;if(!ls())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((r=n.shadowRoot)===null||r===void 0)&&r.activeElement);)n=n.shadowRoot.activeElement;return n};function ld(e){return ls()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function P0(e){if(T0())e.focus({preventScroll:!0});else{let r=I0(e);e.focus(),O0(r)}}let Zr=null;function T0(){if(Zr==null){Zr=!1;try{document.createElement("div").focus({get preventScroll(){return Zr=!0,!0}})}catch{}}return Zr}function I0(e){let r=e.parentNode,n=[],t=document.scrollingElement||document.documentElement;for(;r instanceof HTMLElement&&r!==t;)(r.offsetHeight<r.scrollHeight||r.offsetWidth<r.scrollWidth)&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),r=r.parentNode;return t instanceof HTMLElement&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),n}function O0(e){for(let{element:r,scrollTop:n,scrollLeft:t}of e)r.scrollTop=n,r.scrollLeft=t}function pa(e){var r;if(typeof window>"u"||window.navigator==null)return!1;let n=(r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands;return Array.isArray(n)&&n.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function cs(e){var r;return typeof window<"u"&&window.navigator!=null?e.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function jt(e){if(process.env.NODE_ENV==="test")return e;let r=null;return()=>(r==null&&(r=e()),r)}const kr=jt(function(){return cs(/^Mac/i)}),F0=jt(function(){return cs(/^iPhone/i)}),cd=jt(function(){return cs(/^iPad/i)||kr()&&navigator.maxTouchPoints>1}),L0=jt(function(){return F0()||cd()});jt(function(){return kr()||L0()});const z0=jt(function(){return pa(/AppleWebKit/i)&&!N0()}),N0=jt(function(){return pa(/Chrome/i)}),A0=jt(function(){return pa(/Android/i)}),j0=jt(function(){return pa(/Firefox/i)});function Cr(e,r,n=!0){var t,o;let{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}=r;j0()&&(!((o=window.event)===null||o===void 0||(t=o.type)===null||t===void 0)&&t.startsWith("key"))&&e.target==="_blank"&&(kr()?a=!0:i=!0);let c=z0()&&kr()&&!cd()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:i,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:i,altKey:s,shiftKey:l,detail:1,bubbles:!0,cancelable:!0});Cr.isOpening=n,P0(e),e.dispatchEvent(c),Cr.isOpening=!1}Cr.isOpening=!1;function ud(){let e=y.useRef(new Map),r=y.useCallback((o,a,i,s)=>{let l=s?.once?(...c)=>{e.current.delete(i),i(...c)}:i;e.current.set(i,{type:a,eventTarget:o,fn:l,options:s}),o.addEventListener(a,l,s)},[]),n=y.useCallback((o,a,i,s)=>{var l;let c=((l=e.current.get(i))===null||l===void 0?void 0:l.fn)||i;o.removeEventListener(a,c,s),e.current.delete(i)},[]),t=y.useCallback(()=>{e.current.forEach((o,a)=>{n(o.eventTarget,o.type,a,o.options)})},[n]);return y.useEffect(()=>t,[t]),{addGlobalListener:r,removeGlobalListener:n,removeAllGlobalListeners:t}}function H0(e){return e.pointerType===""&&e.isTrusted?!0:A0()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function dd(e){let r=e;return r.nativeEvent=e,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function Y0(e,r){Object.defineProperty(e,"target",{value:r}),Object.defineProperty(e,"currentTarget",{value:r})}function fd(e){let r=y.useRef({isFocused:!1,observer:null});return D0(()=>{const n=r.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),y.useCallback(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){r.current.isFocused=!0;let t=n.target,o=a=>{if(r.current.isFocused=!1,t.disabled){let i=dd(a);e?.(i)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};t.addEventListener("focusout",o,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&t.disabled){var a;(a=r.current.observer)===null||a===void 0||a.disconnect();let i=t===document.activeElement?null:document.activeElement;t.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),r.current.observer.observe(t,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let V0=!1,Or=null,bi=new Set,fr=new Map,xn=!1,yi=!1;const B0={Tab:!0,Escape:!0};function us(e,r){for(let n of bi)n(e,r)}function W0(e){return!(e.metaKey||!kr()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Lo(e){xn=!0,!Cr.isOpening&&W0(e)&&(Or="keyboard",us("keyboard",e))}function Xe(e){Or="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(xn=!0,us("pointer",e))}function pd(e){!Cr.isOpening&&H0(e)&&(xn=!0,Or="virtual")}function gd(e){e.target===window||e.target===document||V0||!e.isTrusted||(!xn&&!yi&&(Or="virtual",us("virtual",e)),xn=!1,yi=!1)}function md(){xn=!1,yi=!0}function wi(e){if(typeof window>"u"||typeof document>"u"||fr.get(fn(e)))return;const r=fn(e),n=on(e);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){xn=!0,t.apply(this,arguments)},n.addEventListener("keydown",Lo,!0),n.addEventListener("keyup",Lo,!0),n.addEventListener("click",pd,!0),r.addEventListener("focus",gd,!0),r.addEventListener("blur",md,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Xe,!0),n.addEventListener("pointermove",Xe,!0),n.addEventListener("pointerup",Xe,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Xe,!0),n.addEventListener("mousemove",Xe,!0),n.addEventListener("mouseup",Xe,!0)),r.addEventListener("beforeunload",()=>{hd(e)},{once:!0}),fr.set(r,{focus:t})}const hd=(e,r)=>{const n=fn(e),t=on(e);r&&t.removeEventListener("DOMContentLoaded",r),fr.has(n)&&(n.HTMLElement.prototype.focus=fr.get(n).focus,t.removeEventListener("keydown",Lo,!0),t.removeEventListener("keyup",Lo,!0),t.removeEventListener("click",pd,!0),n.removeEventListener("focus",gd,!0),n.removeEventListener("blur",md,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",Xe,!0),t.removeEventListener("pointermove",Xe,!0),t.removeEventListener("pointerup",Xe,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",Xe,!0),t.removeEventListener("mousemove",Xe,!0),t.removeEventListener("mouseup",Xe,!0)),fr.delete(n))};function G0(e){const r=on(e);let n;return r.readyState!=="loading"?wi(e):(n=()=>{wi(e)},r.addEventListener("DOMContentLoaded",n)),()=>hd(e,n)}typeof document<"u"&&G0();function vd(){return Or!=="pointer"}const q0=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function K0(e,r,n){let t=on(n?.target);const o=typeof window<"u"?fn(n?.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?fn(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?fn(n?.target).HTMLElement:HTMLElement,s=typeof window<"u"?fn(n?.target).KeyboardEvent:KeyboardEvent;return e=e||t.activeElement instanceof o&&!q0.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(e&&r==="keyboard"&&n instanceof s&&!B0[n.key])}function U0(e,r,n){wi(),y.useEffect(()=>{let t=(o,a)=>{K0(!!n?.isTextInput,o,a)&&e(vd())};return bi.add(t),()=>{bi.delete(t)}},r)}function Q0(e){let{isDisabled:r,onFocus:n,onBlur:t,onFocusChange:o}=e;const a=y.useCallback(l=>{if(l.target===l.currentTarget)return t&&t(l),o&&o(!1),!0},[t,o]),i=fd(a),s=y.useCallback(l=>{const c=on(l.target),u=c?_i(c):_i();l.target===l.currentTarget&&u===ld(l.nativeEvent)&&(n&&n(l),o&&o(!0),i(l))},[o,n,i]);return{focusProps:{onFocus:!r&&(n||o||t)?s:void 0,onBlur:!r&&(t||o)?a:void 0}}}function X0(e){let{isDisabled:r,onBlurWithin:n,onFocusWithin:t,onFocusWithinChange:o}=e,a=y.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=ud(),l=y.useCallback(d=>{d.currentTarget.contains(d.target)&&a.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(d),o&&o(!1))},[n,o,a,s]),c=fd(l),u=y.useCallback(d=>{if(!d.currentTarget.contains(d.target))return;const p=on(d.target),f=_i(p);if(!a.current.isFocusWithin&&f===ld(d.nativeEvent)){t&&t(d),o&&o(!0),a.current.isFocusWithin=!0,c(d);let g=d.currentTarget;i(p,"focus",m=>{if(a.current.isFocusWithin&&!sd(g,m.target)){let h=new p.defaultView.FocusEvent("blur",{relatedTarget:m.target});Y0(h,g);let b=dd(h);l(b)}},{capture:!0})}},[t,o,c,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let zo=!1,Jr=0;function xi(){zo=!0,setTimeout(()=>{zo=!1},50)}function Vl(e){e.pointerType==="touch"&&xi()}function Z0(){if(!(typeof document>"u"))return Jr===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Vl):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",xi)),Jr++,()=>{Jr--,!(Jr>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Vl):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",xi))}}function J0(e){let{onHoverStart:r,onHoverChange:n,onHoverEnd:t,isDisabled:o}=e,[a,i]=y.useState(!1),s=y.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;y.useEffect(Z0,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=ud(),{hoverProps:u,triggerHoverEnd:d}=y.useMemo(()=>{let p=(m,h)=>{if(s.pointerType=h,o||h==="touch"||s.isHovered||!m.currentTarget.contains(m.target))return;s.isHovered=!0;let b=m.currentTarget;s.target=b,l(on(m.target),"pointerover",w=>{s.isHovered&&s.target&&!sd(s.target,w.target)&&f(w,w.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:b,pointerType:h}),n&&n(!0),i(!0)},f=(m,h)=>{let b=s.target;s.pointerType="",s.target=null,!(h==="touch"||!s.isHovered||!b)&&(s.isHovered=!1,c(),t&&t({type:"hoverend",target:b,pointerType:h}),n&&n(!1),i(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=m=>{zo&&m.pointerType==="mouse"||p(m,m.pointerType)},g.onPointerLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,m.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=m=>{!s.ignoreEmulatedMouseEvents&&!zo&&p(m,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=m=>{!o&&m.currentTarget.contains(m.target)&&f(m,"mouse")}),{hoverProps:g,triggerHoverEnd:f}},[r,n,t,o,s,l,c]);return y.useEffect(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:u,isHovered:a}}function ew(e={}){let{autoFocus:r=!1,isTextInput:n,within:t}=e,o=y.useRef({isFocused:!1,isFocusVisible:r||vd()}),[a,i]=y.useState(!1),[s,l]=y.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=y.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=y.useCallback(f=>{o.current.isFocused=f,i(f),c()},[c]);U0(f=>{o.current.isFocusVisible=f,c()},[],{isTextInput:n});let{focusProps:d}=Q0({isDisabled:t,onFocusChange:u}),{focusWithinProps:p}=X0({isDisabled:!t,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:t?p:d}}var tw=Object.defineProperty,nw=(e,r,n)=>r in e?tw(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Wa=(e,r,n)=>(nw(e,typeof r!="symbol"?r+"":r,n),n);let rw=class{constructor(){Wa(this,"current",this.detect()),Wa(this,"handoffState","pending"),Wa(this,"currentId",0)}set(r){this.current!==r&&(this.handoffState="pending",this.currentId=0,this.current=r)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Tt=new rw;function kn(e){var r,n;return Tt.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(n=(r=e.current)==null?void 0:r.ownerDocument)!=null?n:document:null:document}function ga(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(r=>setTimeout(()=>{throw r}))}function Ye(){let e=[],r={addEventListener(n,t,o,a){return n.addEventListener(t,o,a),r.add(()=>n.removeEventListener(t,o,a))},requestAnimationFrame(...n){let t=requestAnimationFrame(...n);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...n){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...n))},setTimeout(...n){let t=setTimeout(...n);return r.add(()=>clearTimeout(t))},microTask(...n){let t={current:!0};return ga(()=>{t.current&&n[0]()}),r.add(()=>{t.current=!1})},style(n,t,o){let a=n.style.getPropertyValue(t);return Object.assign(n.style,{[t]:o}),this.add(()=>{Object.assign(n.style,{[t]:a})})},group(n){let t=Ye();return n(t),this.add(()=>t.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let t=e.indexOf(n);if(t>=0)for(let o of e.splice(t,1))o()}},dispose(){for(let n of e.splice(0))n()}};return r}function Cn(){let[e]=y.useState(Ye);return y.useEffect(()=>()=>e.dispose(),[e]),e}let pe=(e,r)=>{Tt.isServer?y.useEffect(e,r):y.useLayoutEffect(e,r)};function Dn(e){let r=y.useRef(e);return pe(()=>{r.current=e},[e]),r}let q=function(e){let r=Dn(e);return v.default.useCallback((...n)=>r.current(...n),[r])};function ow(e){let r=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+r,bottom:e.clientY+n,left:e.clientX-r}}function aw(e,r){return!(!e||!r||e.right<r.left||e.left>r.right||e.bottom<r.top||e.top>r.bottom)}function iw({disabled:e=!1}={}){let r=y.useRef(null),[n,t]=y.useState(!1),o=Cn(),a=q(()=>{r.current=null,t(!1),o.dispose()}),i=q(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=kn(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",c=>{if(r.current){let u=ow(c);t(aw(u,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}function xt(e){return y.useMemo(()=>e,Object.values(e))}let sw=y.createContext(void 0);function _d(){return y.useContext(sw)}function Si(...e){return Array.from(new Set(e.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function st(e,r,...n){if(e in r){let o=r[e];return typeof o=="function"?o(...n):o}let t=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,st),t}var qn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(qn||{}),Gt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Gt||{});function xe(){let e=cw();return y.useCallback(r=>lw({mergeRefs:e,...r}),[e])}function lw({ourProps:e,theirProps:r,slot:n,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??uw;let l=bd(r,e);if(a)return eo(l,n,t,i,s);let c=o??0;if(c&2){let{static:u=!1,...d}=l;if(u)return eo(d,n,t,i,s)}if(c&1){let{unmount:u=!0,...d}=l;return st(u?0:1,{0(){return null},1(){return eo({...d,hidden:!0,style:{display:"none"}},n,t,i,s)}})}return eo(l,n,t,i,s)}function eo(e,r={},n,t,o){let{as:a=n,children:i,refName:s="ref",...l}=Ga(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},u=typeof i=="function"?i(r):i;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(r)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(r){let p=!1,f=[];for(let[g,m]of Object.entries(r))typeof m=="boolean"&&(p=!0),m===!0&&f.push(g.replace(/([A-Z])/g,h=>`-${h.toLowerCase()}`));if(p){d["data-headlessui-state"]=f.join(" ");for(let g of f)d[`data-${g}`]=""}}if(pr(a)&&(Object.keys(cn(l)).length>0||Object.keys(cn(d)).length>0))if(!y.isValidElement(u)||Array.isArray(u)&&u.length>1||fw(u)){if(Object.keys(cn(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${t} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(cn(l)).concat(Object.keys(cn(d))).map(p=>` - ${p}`).join(`
|
|
1723
1716
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
|
|
1724
1717
|
`)].join(`
|
|
1725
|
-
`))}else{let p=u.props,d=p==null?void 0:p.className,g=typeof d=="function"?(...y)=>$i(d(...y),l.className):$i(d,l.className),m=g?{className:g}:{},_=yd(u.props,un(qa(l,["ref"])));for(let y in f)y in _&&delete f[y];return b.cloneElement(u,Object.assign({},_,f,c,{ref:o(gw(u),c.ref)},m))}return b.createElement(a,Object.assign({},qa(l,["ref"]),!gr(a)&&c,!gr(a)&&f),u)}function fw(){let e=b.useRef([]),r=b.useCallback(t=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(t):n.current=t)},[]);return(...t)=>{if(!t.every(n=>n==null))return e.current=t,r}}function pw(...e){return e.every(r=>r==null)?void 0:r=>{for(let t of e)t!=null&&(typeof t=="function"?t(r):t.current=r)}}function yd(...e){if(e.length===0)return{};if(e.length===1)return e[0];let r={},t={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(n[o])):r[o]=n[o];if(r.disabled||r["aria-disabled"])for(let n in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(t[n]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let n in t)Object.assign(r,{[n](o,...a){let i=t[n];for(let s of i){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;s(o,...a)}}});return r}function wd(...e){if(e.length===0)return{};if(e.length===1)return e[0];let r={},t={};for(let n of e)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(n[o])):r[o]=n[o];for(let n in t)Object.assign(r,{[n](...o){let a=t[n];for(let i of a)i==null||i(...o)}});return r}function _e(e){var r;return Object.assign(b.forwardRef(e),{displayName:(r=e.displayName)!=null?r:e.name})}function un(e){let r=Object.assign({},e);for(let t in r)r[t]===void 0&&delete r[t];return r}function qa(e,r=[]){let t=Object.assign({},e);for(let n of r)n in t&&delete t[n];return t}function gw(e){return h.default.version.split(".")[0]>="19"?e.props.ref:e.ref}function gr(e){return e===b.Fragment||e===Symbol.for("react.fragment")}function mw(e){return gr(e.type)}let hw="span";var Ao=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ao||{});function vw(e,r){var t;let{features:n=1,...o}=e,a={ref:r,"aria-hidden":(n&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Se()({ourProps:a,theirProps:o,slot:{},defaultTag:hw,name:"Hidden"})}let ki=_e(vw),_w=b.createContext(void 0);function bw(){return b.useContext(_w)}function xd(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Ot(e){return xd(e)&&"tagName"in e}function We(e){return Ot(e)&&"accessKey"in e}function _t(e){return Ot(e)&&"tabIndex"in e}function yw(e){return Ot(e)&&"style"in e}function ww(e){return We(e)&&e.nodeName==="IFRAME"}function Sd(e){return We(e)&&e.nodeName==="INPUT"}function Wl(e){return We(e)&&e.nodeName==="LABEL"}function xw(e){return We(e)&&e.nodeName==="FIELDSET"}function $d(e){return We(e)&&e.nodeName==="LEGEND"}function Sw(e){return Ot(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function $w(e){let r=e.parentElement,t=null;for(;r&&!xw(r);)$d(r)&&(t=r),r=r.parentElement;let n=(r==null?void 0:r.getAttribute("disabled"))==="";return n&&kw(t)?!1:n}function kw(e){if(!e)return!1;let r=e.previousElementSibling;for(;r!==null;){if($d(r))return!1;r=r.previousElementSibling}return!0}let kd=Symbol();function Cw(e,r=!0){return Object.assign(e,{[kd]:r})}function je(...e){let r=b.useRef(e);b.useEffect(()=>{r.current=e},[e]);let t=K(n=>{for(let o of r.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||(n==null?void 0:n[kd]))?void 0:t}let fs=b.createContext(null);fs.displayName="DescriptionContext";function Cd(){let e=b.useContext(fs);if(e===null){let r=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Cd),r}return e}function Dd(){let[e,r]=b.useState([]);return[e.length>0?e.join(" "):void 0,b.useMemo(()=>function(t){let n=K(a=>(r(i=>[...i,a]),()=>r(i=>{let s=i.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),o=b.useMemo(()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value}),[n,t.slot,t.name,t.props,t.value]);return h.default.createElement(fs.Provider,{value:o},t.children)},[r])]}let Dw="p";function Ew(e,r){let t=b.useId(),n=bd(),{id:o=`headlessui-description-${t}`,...a}=e,i=Cd(),s=je(r);ge(()=>i.register(o),[o,i.register]);let l=St({...i.slot,disabled:n||!1}),c={ref:s,...i.props,id:o};return Se()({ourProps:c,theirProps:a,slot:l,defaultTag:Dw,name:i.name||"Description"})}let Mw=_e(Ew),Rw=Object.assign(Mw,{});var Ce=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ce||{});let ha=b.createContext(null);ha.displayName="LabelContext";function ps(){let e=b.useContext(ha);if(e===null){let r=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,ps),r}return e}function Pw(e){var r,t,n;let o=(t=(r=b.useContext(ha))==null?void 0:r.value)!=null?t:void 0;return((n=void 0)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ed({inherit:e=!1}={}){let r=Pw(),[t,n]=b.useState([]),o=e?[r,...t].filter(Boolean):t;return[o.length>0?o.join(" "):void 0,b.useMemo(()=>function(a){let i=K(l=>(n(c=>[...c,l]),()=>n(c=>{let u=c.slice(),f=u.indexOf(l);return f!==-1&&u.splice(f,1),u}))),s=b.useMemo(()=>({register:i,slot:a.slot,name:a.name,props:a.props,value:a.value}),[i,a.slot,a.name,a.props,a.value]);return h.default.createElement(ha.Provider,{value:s},a.children)},[n])]}let Tw="label";function Iw(e,r){var t;let n=b.useId(),o=ps(),a=bw(),i=bd(),{id:s=`headlessui-label-${n}`,htmlFor:l=a??((t=o.props)==null?void 0:t.htmlFor),passive:c=!1,...u}=e,f=je(r);ge(()=>o.register(s),[s,o.register]);let p=K(m=>{let _=m.currentTarget;if(!(m.target!==m.currentTarget&&Sw(m.target))&&(Wl(_)&&m.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(m),Wl(_))){let y=document.getElementById(_.htmlFor);if(y){let x=y.getAttribute("disabled");if(x==="true"||x==="")return;let w=y.getAttribute("aria-disabled");if(w==="true"||w==="")return;(Sd(y)&&(y.type==="file"||y.type==="radio"||y.type==="checkbox")||y.role==="radio"||y.role==="checkbox"||y.role==="switch")&&y.click(),y.focus({preventScroll:!0})}}}),d=St({...o.slot,disabled:i||!1}),g={ref:f,...o.props,id:s,htmlFor:l,onClick:p};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),Se()({ourProps:g,theirProps:u,slot:d,defaultTag:l?Tw:"div",name:o.name||"Label"})}let Ow=_e(Iw);Object.assign(Ow,{});let Fw=b.createContext(()=>{});function Lw({value:e,children:r}){return h.default.createElement(Fw.Provider,{value:e},r)}function Gl(e){if(e===null)return{width:0,height:0};let{width:r,height:t}=e.getBoundingClientRect();return{width:r,height:t}}function zw(e,r,t=!1){let[n,o]=b.useState(()=>Gl(r));return ge(()=>{if(!r||!e)return;let a=Ve();return a.requestAnimationFrame(function i(){a.requestAnimationFrame(i),o(s=>{let l=Gl(r);return l.width===s.width&&l.height===s.height?s:l})}),()=>{a.dispose()}},[r,e]),t?{width:`${n.width}px`,height:`${n.height}px`}:n}let Md=class extends Map{constructor(r){super(),this.factory=r}get(r){let t=super.get(r);return t===void 0&&(t=this.factory(r),this.set(r,t)),t}};var Nw=Object.defineProperty,Aw=(e,r,t)=>r in e?Nw(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,jw=(e,r,t)=>(Aw(e,r+"",t),t),Rd=(e,r,t)=>{if(!r.has(e))throw TypeError("Cannot "+t)},Ke=(e,r,t)=>(Rd(e,r,"read from private field"),t?t.call(e):r.get(e)),Ka=(e,r,t)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,t)},ql=(e,r,t,n)=>(Rd(e,r,"write to private field"),r.set(e,t),t),ut,lr,cr;let Pd=class{constructor(r){Ka(this,ut,{}),Ka(this,lr,new Md(()=>new Set)),Ka(this,cr,new Set),jw(this,"disposables",Ve()),ql(this,ut,r),It.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return Ke(this,ut)}subscribe(r,t){if(It.isServer)return()=>{};let n={selector:r,callback:t,current:r(Ke(this,ut))};return Ke(this,cr).add(n),this.disposables.add(()=>{Ke(this,cr).delete(n)})}on(r,t){return It.isServer?()=>{}:(Ke(this,lr).get(r).add(t),this.disposables.add(()=>{Ke(this,lr).get(r).delete(t)}))}send(r){let t=this.reduce(Ke(this,ut),r);if(t!==Ke(this,ut)){ql(this,ut,t);for(let n of Ke(this,cr)){let o=n.selector(Ke(this,ut));Td(n.current,o)||(n.current=o,n.callback(o))}for(let n of Ke(this,lr).get(r.type))n(Ke(this,ut),r)}}};ut=new WeakMap,lr=new WeakMap,cr=new WeakMap;function Td(e,r){return Object.is(e,r)?!0:typeof e!="object"||e===null||typeof r!="object"||r===null?!1:Array.isArray(e)&&Array.isArray(r)?e.length!==r.length?!1:Ua(e[Symbol.iterator](),r[Symbol.iterator]()):e instanceof Map&&r instanceof Map||e instanceof Set&&r instanceof Set?e.size!==r.size?!1:Ua(e.entries(),r.entries()):Kl(e)&&Kl(r)?Ua(Object.entries(e)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function Ua(e,r){do{let t=e.next(),n=r.next();if(t.done&&n.done)return!0;if(t.done||n.done||!Object.is(t.value,n.value))return!1}while(!0)}function Kl(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||Object.getPrototypeOf(r)===null}function Ul(e){let[r,t]=e(),n=Ve();return(...o)=>{r(...o),n.dispose(),n.microTask(t)}}var Hw=Object.defineProperty,Yw=(e,r,t)=>r in e?Hw(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Ql=(e,r,t)=>(Yw(e,typeof r!="symbol"?r+"":r,t),t),Id=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Id||{});let Vw={0(e,r){let t=r.id,n=e.stack,o=e.stack.indexOf(t);if(o!==-1){let a=e.stack.slice();return a.splice(o,1),a.push(t),n=a,{...e,stack:n}}return{...e,stack:[...e.stack,t]}},1(e,r){let t=r.id,n=e.stack.indexOf(t);if(n===-1)return e;let o=e.stack.slice();return o.splice(n,1),{...e,stack:o}}},Bw=class Od extends Pd{constructor(){super(...arguments),Ql(this,"actions",{push:r=>this.send({type:0,id:r}),pop:r=>this.send({type:1,id:r})}),Ql(this,"selectors",{isTop:(r,t)=>r.stack[r.stack.length-1]===t,inStack:(r,t)=>r.stack.includes(t)})}static new(){return new Od({stack:[]})}reduce(r,t){return lt(t.type,Vw,r,t)}};const va=new Md(()=>Bw.new());var no={exports:{}},Qa={};/**
|
|
1726
|
-
* @license React
|
|
1727
|
-
* use-sync-external-store-with-selector.production.js
|
|
1728
|
-
*
|
|
1729
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1730
|
-
*
|
|
1731
|
-
* This source code is licensed under the MIT license found in the
|
|
1732
|
-
* LICENSE file in the root directory of this source tree.
|
|
1733
|
-
*/var Xl;function Ww(){if(Xl)return Qa;Xl=1;var e=h.default;function r(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var t=typeof Object.is=="function"?Object.is:r,n=e.useSyncExternalStore,o=e.useRef,a=e.useEffect,i=e.useMemo,s=e.useDebugValue;return Qa.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=i(function(){function _(C){if(!y){if(y=!0,x=C,C=f(C),p!==void 0&&g.hasValue){var k=g.value;if(p(k,C))return w=k}return w=C}if(k=w,t(x,C))return k;var M=f(C);return p!==void 0&&p(k,M)?(x=C,k):(x=C,w=M)}var y=!1,x,w,$=u===void 0?null:u;return[function(){return _(c())},$===null?void 0:function(){return _($())}]},[c,u,f,p]);var m=n(l,d[0],d[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),s(m),m},Qa}var Xa={};/**
|
|
1734
|
-
* @license React
|
|
1735
|
-
* use-sync-external-store-with-selector.development.js
|
|
1736
|
-
*
|
|
1737
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1738
|
-
*
|
|
1739
|
-
* This source code is licensed under the MIT license found in the
|
|
1740
|
-
* LICENSE file in the root directory of this source tree.
|
|
1741
|
-
*/var Zl;function Gw(){return Zl||(Zl=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=h.default,t=typeof Object.is=="function"?Object.is:e,n=r.useSyncExternalStore,o=r.useRef,a=r.useEffect,i=r.useMemo,s=r.useDebugValue;Xa.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=i(function(){function _(C){if(!y){if(y=!0,x=C,C=f(C),p!==void 0&&g.hasValue){var k=g.value;if(p(k,C))return w=k}return w=C}if(k=w,t(x,C))return k;var M=f(C);return p!==void 0&&p(k,M)?(x=C,k):(x=C,w=M)}var y=!1,x,w,$=u===void 0?null:u;return[function(){return _(c())},$===null?void 0:function(){return _($())}]},[c,u,f,p]);var m=n(l,d[0],d[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),s(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Xa}var Jl;function qw(){return Jl||(Jl=1,process.env.NODE_ENV==="production"?no.exports=Ww():no.exports=Gw()),no.exports}var Kw=qw();function et(e,r,t=Td){return Kw.useSyncExternalStoreWithSelector(K(n=>e.subscribe(Uw,n)),K(()=>e.state),K(()=>e.state),K(r),t)}function Uw(e){return e}function Lr(e,r){let t=b.useId(),n=va.get(r),[o,a]=et(n,b.useCallback(i=>[n.selectors.isTop(i,t),n.selectors.inStack(i,t)],[n,t]));return ge(()=>{if(e)return n.actions.push(t),()=>n.actions.pop(t)},[n,e,t]),e?a?o:!0:!1}let Ci=new Map,mr=new Map;function ec(e){var r;let t=(r=mr.get(e))!=null?r:0;return mr.set(e,t+1),t!==0?()=>tc(e):(Ci.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>tc(e))}function tc(e){var r;let t=(r=mr.get(e))!=null?r:1;if(t===1?mr.delete(e):mr.set(e,t-1),t!==1)return;let n=Ci.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,Ci.delete(e))}function Fd(e,{allowed:r,disallowed:t}={}){let n=Lr(e,"inert-others");ge(()=>{var o,a;if(!n)return;let i=Ve();for(let l of(o=t==null?void 0:t())!=null?o:[])l&&i.add(ec(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let c=Cn(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let f of u.children)s.some(p=>f.contains(p))||i.add(ec(f));u=u.parentElement}}return i.dispose},[n,r,t])}function Ld(e,r,t){let n=En(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});b.useEffect(()=>{if(!e)return;let o=r===null?null:We(r)?r:r.current;if(!o)return;let a=Ve();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>n.current(o));i.observe(o),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>n.current(o));i.observe(o),a.add(()=>i.disconnect())}return()=>a.dispose()},[r,n,e])}let jo=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Qw=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var rt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(rt||{}),Di=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Di||{}),Xw=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Xw||{});function zd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(jo)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function Zw(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Qw)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var gs=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(gs||{});function ms(e,r=0){var t;return e===((t=Cn(e))==null?void 0:t.body)?!1:lt(r,{0(){return e.matches(jo)},1(){let n=e;for(;n!==null;){if(n.matches(jo))return!0;n=n.parentElement}return!1}})}function Nd(e){let r=Cn(e);Ve().nextFrame(()=>{r&&_t(r.activeElement)&&!ms(r.activeElement,0)&&yt(e)})}var Jw=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Jw||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function yt(e){e==null||e.focus({preventScroll:!0})}let ex=["textarea","input"].join(",");function tx(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,ex))!=null?t:!1}function Ad(e,r=t=>t){return e.slice().sort((t,n)=>{let o=r(t),a=r(n);if(o===null||a===null)return 0;let i=o.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function nx(e,r){return An(zd(),r,{relativeTo:e})}function An(e,r,{sorted:t=!0,relativeTo:n=null,skipElements:o=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?t?Ad(e):e:r&64?Zw(e):zd(e);o.length>0&&i.length>1&&(i=i.filter(d=>!o.some(g=>g!=null&&"current"in g?(g==null?void 0:g.current)===d:g===d))),n=n??a.activeElement;let s=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,i.indexOf(n))-1;if(r&4)return Math.max(0,i.indexOf(n))+1;if(r&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=r&32?{preventScroll:!0}:{},u=0,f=i.length,p;do{if(u>=f||u+f<=0)return 0;let d=l+u;if(r&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}p=i[d],p==null||p.focus(c),u+=s}while(p!==a.activeElement);return r&6&&tx(p)&&p.select(),2}function jd(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function rx(){return/Android/gi.test(window.navigator.userAgent)}function nc(){return jd()||rx()}function Fn(e,r,t,n){let o=En(t);b.useEffect(()=>{if(!e)return;function a(i){o.current(i)}return document.addEventListener(r,a,n),()=>document.removeEventListener(r,a,n)},[e,r,n])}function Hd(e,r,t,n){let o=En(t);b.useEffect(()=>{if(!e)return;function a(i){o.current(i)}return window.addEventListener(r,a,n),()=>window.removeEventListener(r,a,n)},[e,r,n])}const rc=30;function Yd(e,r,t){let n=En(t),o=b.useCallback(function(s,l){if(s.defaultPrevented)return;let c=l(s);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=(function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]})(r);for(let f of u)if(f!==null&&(f.contains(c)||s.composed&&s.composedPath().includes(f)))return;return!ms(c,gs.Loose)&&c.tabIndex!==-1&&s.preventDefault(),n.current(s,c)},[n,r]),a=b.useRef(null);Fn(e,"pointerdown",s=>{var l,c;nc()||(a.current=((c=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:c[0])||s.target)},!0),Fn(e,"pointerup",s=>{if(nc()||!a.current)return;let l=a.current;return a.current=null,o(s,()=>l)},!0);let i=b.useRef({x:0,y:0});Fn(e,"touchstart",s=>{i.current.x=s.touches[0].clientX,i.current.y=s.touches[0].clientY},!0),Fn(e,"touchend",s=>{let l={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=rc||Math.abs(l.y-i.current.y)>=rc))return o(s,()=>_t(s.target)?s.target:null)},!0),Hd(e,"blur",s=>o(s,()=>ww(window.document.activeElement)?window.document.activeElement:null),!0)}function Un(...e){return b.useMemo(()=>Cn(...e),[...e])}var ox=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(ox||{});const ro={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},ax=200,oc=5;function ix(e,{trigger:r,action:t,close:n,select:o}){let a=b.useRef(null),i=b.useRef(null),s=b.useRef(null);Fn(e&&r!==null,"pointerdown",l=>{xd(l==null?void 0:l.target)&&r!=null&&r.contains(l.target)&&(i.current=l.x,s.current=l.y,a.current=l.timeStamp)}),Fn(e&&r!==null,"pointerup",l=>{var c,u;let f=a.current;if(f===null||(a.current=null,!_t(l.target))||Math.abs(l.x-((c=i.current)!=null?c:l.x))<oc&&Math.abs(l.y-((u=s.current)!=null?u:l.y))<oc)return;let p=t(l);switch(p.kind){case 0:return;case 1:{l.timeStamp-f>ax&&(o(p.target),n());break}case 2:{n();break}}},{capture:!0})}function Vd(e,r,t,n){let o=En(t);b.useEffect(()=>{e=e??window;function a(i){o.current(i)}return e.addEventListener(r,a,n),()=>e.removeEventListener(r,a,n)},[e,r,n])}function sx(e,r){return b.useMemo(()=>{var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button"||(r==null?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[e.type,e.as,r])}function lx(e){return b.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function cx(e,r){let t=e(),n=new Set;return{getSnapshot(){return t},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...a){let i=r[o].call(t,...a);i&&(t=i,n.forEach(s=>s()))}}}function ux(){let e;return{before({doc:r}){var t;let n=r.documentElement,o=(t=r.defaultView)!=null?t:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:r,d:t}){let n=r.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),a=Math.max(0,e-o);t.style(n,"paddingRight",`${a}px`)}}}function dx(){return jd()?{before({doc:e,d:r,meta:t}){function n(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=Ve();s.style(e.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(e,"click",s=>{if(_t(s.target))try{let l=s.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);_t(u)&&!n(u)&&(i=u)}catch{}},!0),r.addEventListener(e,"touchstart",s=>{if(_t(s.target)&&yw(s.target))if(n(s.target)){let l=s.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(e,"touchmove",s=>{if(_t(s.target)){if(Sd(s.target))return;if(n(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function fx(){return{before({doc:e,d:r}){r.style(e.documentElement,"overflow","hidden")}}}function px(e){let r={};for(let t of e)Object.assign(r,t(r));return r}let gn=cx(()=>new Map,{PUSH(e,r){var t;let n=(t=this.get(e))!=null?t:{doc:e,count:0,d:Ve(),meta:new Set};return n.count++,n.meta.add(r),this.set(e,n),this},POP(e,r){let t=this.get(e);return t&&(t.count--,t.meta.delete(r)),this},SCROLL_PREVENT({doc:e,d:r,meta:t}){let n={doc:e,d:r,meta:px(t)},o=[dx(),ux(),fx()];o.forEach(({before:a})=>a==null?void 0:a(n)),o.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});gn.subscribe(()=>{let e=gn.getSnapshot(),r=new Map;for(let[t]of e)r.set(t,t.documentElement.style.overflow);for(let t of e.values()){let n=r.get(t.doc)==="hidden",o=t.count!==0;(o&&!n||!o&&n)&&gn.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&gn.dispatch("TEARDOWN",t)}});function gx(e,r,t=()=>({containers:[]})){let n=lx(gn),o=r?n.get(r):void 0,a=o?o.count>0:!1;return ge(()=>{if(!(!r||!e))return gn.dispatch("PUSH",r,t),()=>gn.dispatch("POP",r,t)},[e,r]),a}function Bd(e,r,t=()=>[document.body]){let n=Lr(e,"scroll-lock");gx(n,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function ac(e){return[e.screenX,e.screenY]}function mx(){let e=b.useRef([-1,-1]);return{wasMoved(r){let t=ac(r);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(r){e.current=ac(r)}}}function hx(e=0){let[r,t]=b.useState(e),n=b.useCallback(l=>t(l),[]),o=b.useCallback(l=>t(c=>c|l),[]),a=b.useCallback(l=>(r&l)===l,[r]),i=b.useCallback(l=>t(c=>c&~l),[]),s=b.useCallback(l=>t(c=>c^l),[]);return{flags:r,setFlag:n,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var ic,sc;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ic=process==null?void 0:process.env)==null?void 0:ic.NODE_ENV)==="test"&&typeof((sc=Element==null?void 0:Element.prototype)==null?void 0:sc.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
1742
|
-
`)),[]});var vx=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(vx||{});function Wd(e){let r={};for(let t in e)e[t]===!0&&(r[`data-${t}`]="");return r}function Gd(e,r,t,n){let[o,a]=b.useState(t),{hasFlag:i,addFlag:s,removeFlag:l}=hx(e&&o?3:0),c=b.useRef(!1),u=b.useRef(!1),f=Dn();return ge(()=>{var p;if(e){if(t&&a(!0),!r){t&&s(3);return}return(p=n==null?void 0:n.start)==null||p.call(n,t),_x(r,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(t?(s(3),l(4)):(s(4),l(2)))},run(){u.current?t?(l(3),s(4)):(l(4),s(3)):t?l(1):s(1)},done(){var d;u.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(c.current=!1,l(7),t||a(!1),(d=n==null?void 0:n.end)==null||d.call(n,t))}})}},[e,t,r,f]),e?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function _x(e,{prepare:r,run:t,done:n,inFlight:o}){let a=Ve();return yx(e,{prepare:r,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(bx(e,n))})}),a.dispose}function bx(e,r){var t,n;let o=Ve();if(!e)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(n=(t=e.getAnimations)==null?void 0:t.call(e).filter(s=>s instanceof CSSTransition))!=null?n:[];return i.length===0?(r(),o.dispose):(Promise.allSettled(i.map(s=>s.finished)).then(()=>{a||r()}),o.dispose)}function yx(e,{inFlight:r,prepare:t}){if(r!=null&&r.current){t();return}let n=e.style.transition;e.style.transition="none",t(),e.offsetHeight,e.style.transition=n}function wx(e,{container:r,accept:t,walk:n}){let o=b.useRef(t),a=b.useRef(n);b.useEffect(()=>{o.current=t,a.current=n},[t,n]),ge(()=>{if(!r||!e)return;let i=Cn(r);if(!i)return;let s=o.current,l=a.current,c=Object.assign(f=>s(f),{acceptNode:s}),u=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,c,!1);for(;u.nextNode();)l(u.currentNode)},[r,e,o,a])}function hs(e,r){let t=b.useRef([]),n=K(e);b.useEffect(()=>{let o=[...t.current];for(let[a,i]of r.entries())if(t.current[a]!==i){let s=n(r,o);return t.current=r,s}},[n,...r])}let Jn=b.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Jn.displayName="FloatingContext";let vs=b.createContext(null);vs.displayName="PlacementContext";function xx(e){return b.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Sx(){return b.useContext(Jn).setReference}function $x(){return b.useContext(Jn).getReferenceProps}function kx(){let{getFloatingProps:e,slot:r}=b.useContext(Jn);return b.useCallback((...t)=>Object.assign({},e(...t),{"data-anchor":r.anchor}),[e,r])}function Cx(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let r=b.useContext(vs),t=b.useMemo(()=>e,[JSON.stringify(e,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);ge(()=>{r==null||r(t??null)},[r,t]);let n=b.useContext(Jn);return b.useMemo(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}let lc=4;function Dx({children:e,enabled:r=!0}){let[t,n]=b.useState(null),[o,a]=b.useState(0),i=b.useRef(null),[s,l]=b.useState(null);Ex(s);let c=r&&t!==null&&s!==null,{to:u="bottom",gap:f=0,offset:p=0,padding:d=0,inner:g}=Mx(t,s),[m,_="center"]=u.split(" ");ge(()=>{c&&a(0)},[c]);let{refs:y,floatingStyles:x,context:w}=Tr({open:c,placement:m==="selection"?_==="center"?"bottom":`bottom-${_}`:_==="center"?`${m}`:`${m}-${_}`,strategy:"absolute",transform:!1,middleware:[Xn({mainAxis:m==="selection"?0:f,crossAxis:p}),ea({padding:d}),m!=="selection"&&Pr({padding:d}),m==="selection"&&g?Qg({...g,padding:d,overflowRef:i,offset:o,minItemsVisible:lc,referenceOverflowThreshold:d,onFallbackChange(L){var T,O;if(!L)return;let A=w.elements.floating;if(!A)return;let N=parseFloat(getComputedStyle(A).scrollPaddingBottom)||0,j=Math.min(lc,A.childElementCount),z=0,D=0;for(let R of(O=(T=w.elements.floating)==null?void 0:T.childNodes)!=null?O:[])if(We(R)){let B=R.offsetTop,H=B+R.clientHeight+N,ne=A.scrollTop,X=ne+A.clientHeight;if(B>=ne&&H<=X)j--;else{D=Math.max(0,Math.min(H,X)-Math.max(B,ne)),z=R.clientHeight;break}}j>=1&&a(R=>{let B=z*j-D+N;return R>=B?R:B})}}):null,wg({padding:d,apply({availableWidth:L,availableHeight:T,elements:O}){Object.assign(O.floating.style,{overflow:"auto",maxWidth:`${L}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${T}px)`})}})].filter(Boolean),whileElementsMounted:Rr}),[$=m,C=_]=w.placement.split("-");m==="selection"&&($="selection");let k=b.useMemo(()=>({anchor:[$,C].filter(Boolean).join(" ")}),[$,C]),M=Xg(w,{overflowRef:i,onChange:a}),{getReferenceProps:E,getFloatingProps:P}=aa([M]),F=K(L=>{l(L),y.setFloating(L)});return h.createElement(vs.Provider,{value:n},h.createElement(Jn.Provider,{value:{setFloating:F,setReference:y.setReference,styles:x,getReferenceProps:E,getFloatingProps:P,slot:k}},e))}function Ex(e){ge(()=>{if(!e)return;let r=new MutationObserver(()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let o=parseInt(t);isNaN(o)||n!==o&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return r.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[e])}function Mx(e,r){var t,n,o;let a=Za((t=e==null?void 0:e.gap)!=null?t:"var(--anchor-gap, 0)",r),i=Za((n=e==null?void 0:e.offset)!=null?n:"var(--anchor-offset, 0)",r),s=Za((o=e==null?void 0:e.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...e,gap:a,offset:i,padding:s}}function Za(e,r,t=void 0){let n=Dn(),o=K((l,c)=>{if(l==null)return[t,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!c)return[t,null];let u=cc(l,c);return[u,f=>{let p=qd(l);{let d=p.map(g=>window.getComputedStyle(c).getPropertyValue(g));n.requestAnimationFrame(function g(){n.nextFrame(g);let m=!1;for(let[y,x]of p.entries()){let w=window.getComputedStyle(c).getPropertyValue(x);if(d[y]!==w){d[y]=w,m=!0;break}}if(!m)return;let _=cc(l,c);u!==_&&(f(_),u=_)})}return n.dispose}]}return[t,null]}),a=b.useMemo(()=>o(e,r)[0],[e,r]),[i=a,s]=b.useState();return ge(()=>{let[l,c]=o(e,r);if(s(l),!!c)return c(s)},[e,r]),i}function qd(e){let r=/var\((.*)\)/.exec(e);if(r){let t=r[1].indexOf(",");if(t===-1)return[r[1]];let n=r[1].slice(0,t).trim(),o=r[1].slice(t+1).trim();return o?[n,...qd(o)]:[n]}return[]}function cc(e,r){let t=document.createElement("div");r.appendChild(t),t.style.setProperty("margin-top","0px","important"),t.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(t).marginTop)||0;return r.removeChild(t),n}let _a=b.createContext(null);_a.displayName="OpenClosedContext";var Ae=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ae||{});function zr(){return b.useContext(_a)}function Kd({value:e,children:r}){return h.default.createElement(_a.Provider,{value:e},r)}function Rx({children:e}){return h.default.createElement(_a.Provider,{value:null},e)}function Px(e){function r(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let Gt=[];Px(()=>{function e(r){if(!_t(r.target)||r.target===document.body||Gt[0]===r.target)return;let t=r.target;t=t.closest(jo),Gt.unshift(t??r.target),Gt=Gt.filter(n=>n!=null&&n.isConnected),Gt.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Tx(e){throw new Error("Unexpected object: "+e)}var xe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(xe||{});function oo(e,r){let t=r.resolveItems();if(t.length<=0)return null;let n=r.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let a=0;a<t.length;++a)if(!r.resolveDisabled(t[a],a,t))return a;return n}case 1:{o===-1&&(o=t.length);for(let a=o-1;a>=0;--a)if(!r.resolveDisabled(t[a],a,t))return a;return n}case 2:{for(let a=o+1;a<t.length;++a)if(!r.resolveDisabled(t[a],a,t))return a;return n}case 3:{for(let a=t.length-1;a>=0;--a)if(!r.resolveDisabled(t[a],a,t))return a;return n}case 4:{for(let a=0;a<t.length;++a)if(r.resolveId(t[a],a,t)===e.id)return a;return n}case 5:return null;default:Tx(e)}}var Ud=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Ud||{});function _s(e){let r=K(e),t=b.useRef(!1);b.useEffect(()=>(t.current=!1,()=>{t.current=!0,ma(()=>{t.current&&r()})}),[r])}let Qd=b.createContext(!1);function Ix(){return b.useContext(Qd)}function uc(e){return h.default.createElement(Qd.Provider,{value:e.force},e.children)}function Ox(e){let r=Ix(),t=b.useContext(Zd),[n,o]=b.useState(()=>{var a;if(!r&&t!==null)return(a=t.current)!=null?a:null;if(It.isServer)return null;let i=e==null?void 0:e.getElementById("headlessui-portal-root");if(i)return i;if(e===null)return null;let s=e.createElement("div");return s.setAttribute("id","headlessui-portal-root"),e.body.appendChild(s)});return b.useEffect(()=>{n!==null&&(e!=null&&e.body.contains(n)||e==null||e.body.appendChild(n))},[n,e]),b.useEffect(()=>{r||t!==null&&o(t.current)},[t,o,r]),n}let Xd=b.Fragment,Fx=_e(function(e,r){let{ownerDocument:t=null,...n}=e,o=b.useRef(null),a=je(Cw(p=>{o.current=p}),r),i=Un(o),s=t??i,l=Ox(s),c=b.useContext(Ei),u=Dn(),f=Se();return _s(()=>{var p;l&&l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l))}),l?vr.createPortal(h.default.createElement("div",{"data-headlessui-portal":"",ref:p=>{u.dispose(),c&&p&&u.add(c.register(p))}},f({ourProps:{ref:a},theirProps:n,slot:{},defaultTag:Xd,name:"Portal"})),l):null});function Lx(e,r){let t=je(r),{enabled:n=!0,ownerDocument:o,...a}=e,i=Se();return n?h.default.createElement(Fx,{...a,ownerDocument:o,ref:t}):i({ourProps:{ref:t},theirProps:a,slot:{},defaultTag:Xd,name:"Portal"})}let zx=b.Fragment,Zd=b.createContext(null);function Nx(e,r){let{target:t,...n}=e,o={ref:je(r)},a=Se();return h.default.createElement(Zd.Provider,{value:t},a({ourProps:o,theirProps:n,defaultTag:zx,name:"Popover.Group"}))}let Ei=b.createContext(null);function Ax(){let e=b.useContext(Ei),r=b.useRef([]),t=K(a=>(r.current.push(a),e&&e.register(a),()=>n(a))),n=K(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),e&&e.unregister(a)}),o=b.useMemo(()=>({register:t,unregister:n,portals:r}),[t,n,r]);return[r,b.useMemo(()=>function({children:a}){return h.default.createElement(Ei.Provider,{value:o},a)},[o])]}let jx=_e(Lx),Jd=_e(Nx),ef=Object.assign(jx,{Group:Jd});const vo={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function tf(e){let r=e.getBoundingClientRect();return`${r.x},${r.y}`}function Hx(e,r,t){let n=Ve();if(r.kind==="Tracked"){let o=function(){a!==tf(e)&&(n.dispose(),t())},{position:a}=r,i=new ResizeObserver(o);i.observe(e),n.add(()=>i.disconnect()),n.addEventListener(window,"scroll",o,{passive:!0}),n.addEventListener(window,"resize",o)}return()=>n.dispose()}function Yx(e,r=typeof document<"u"?document.defaultView:null,t){let n=Lr(e,"escape");Vd(r,"keydown",o=>{n&&(o.defaultPrevented||o.key===Ce.Escape&&t(o))})}function Vx(){var e;let[r]=b.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,n]=b.useState((e=r==null?void 0:r.matches)!=null?e:!1);return ge(()=>{if(!r)return;function o(a){n(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),t}function Bx({defaultContainers:e=[],portals:r,mainTreeNode:t}={}){let n=Un(t),o=K(()=>{var a,i;let s=[];for(let l of e)l!==null&&(Ot(l)?s.push(l):"current"in l&&Ot(l.current)&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=n==null?void 0:n.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&Ot(l)&&l.id!=="headlessui-portal-root"&&(t&&(l.contains(t)||l.contains((i=t==null?void 0:t.getRootNode())==null?void 0:i.host))||s.some(c=>l.contains(c))||s.push(l));return s});return{resolveContainers:o,contains:K(a=>o().some(i=>i.contains(a)))}}let nf=b.createContext(null);function dc({children:e,node:r}){let[t,n]=b.useState(null),o=rf(r??t);return h.default.createElement(nf.Provider,{value:o},e,o===null&&h.default.createElement(ki,{features:Ao.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=Cn(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&Ot(l)&&l!=null&&l.contains(a)){n(l);break}}}}))}function rf(e=null){var r;return(r=b.useContext(nf))!=null?r:e}function Wx(){let e=typeof document>"u";return"useSyncExternalStore"in h?(r=>r.useSyncExternalStore)(h)(()=>()=>{},()=>!1,()=>!e):!1}function ba(){let e=Wx(),[r,t]=h.useState(It.isHandoffComplete);return r&&It.isHandoffComplete===!1&&t(!1),h.useEffect(()=>{r!==!0&&t(!0)},[r]),h.useEffect(()=>It.handoff(),[]),e?!1:r}function bs(){let e=b.useRef(!1);return ge(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var ur=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ur||{});function Gx(){let e=b.useRef(0);return Hd(!0,"keydown",r=>{r.key==="Tab"&&(e.current=r.shiftKey?1:0)},!0),e}function of(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let r=new Set;for(let t of e.current)Ot(t.current)&&r.add(t.current);return r}let qx="div";var dn=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(dn||{});function Kx(e,r){let t=b.useRef(null),n=je(t,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=e;ba()||(s=0);let c=Un(t);Zx(s,{ownerDocument:c});let u=Jx(s,{ownerDocument:c,container:t,initialFocus:o,initialFocusFallback:a});eS(s,{ownerDocument:c,container:t,containers:i,previousActiveElement:u});let f=Gx(),p=K(x=>{if(!We(t.current))return;let w=t.current;($=>$())(()=>{lt(f.current,{[ur.Forwards]:()=>{An(w,rt.First,{skipElements:[x.relatedTarget,a]})},[ur.Backwards]:()=>{An(w,rt.Last,{skipElements:[x.relatedTarget,a]})}})})}),d=Lr(!!(s&2),"focus-trap#tab-lock"),g=Dn(),m=b.useRef(!1),_={ref:n,onKeyDown(x){x.key=="Tab"&&(m.current=!0,g.requestAnimationFrame(()=>{m.current=!1}))},onBlur(x){if(!(s&4))return;let w=of(i);We(t.current)&&w.add(t.current);let $=x.relatedTarget;_t($)&&$.dataset.headlessuiFocusGuard!=="true"&&(af(w,$)||(m.current?An(t.current,lt(f.current,{[ur.Forwards]:()=>rt.Next,[ur.Backwards]:()=>rt.Previous})|rt.WrapAround,{relativeTo:x.target}):_t(x.target)&&yt(x.target)))}},y=Se();return h.default.createElement(h.default.Fragment,null,d&&h.default.createElement(ki,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ao.Focusable}),y({ourProps:_,theirProps:l,defaultTag:qx,name:"FocusTrap"}),d&&h.default.createElement(ki,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ao.Focusable}))}let Ux=_e(Kx),Qx=Object.assign(Ux,{features:dn});function Xx(e=!0){let r=b.useRef(Gt.slice());return hs(([t],[n])=>{n===!0&&t===!1&&ma(()=>{r.current.splice(0)}),n===!1&&t===!0&&(r.current=Gt.slice())},[e,Gt,r]),K(()=>{var t;return(t=r.current.find(n=>n!=null&&n.isConnected))!=null?t:null})}function Zx(e,{ownerDocument:r}){let t=!!(e&8),n=Xx(t);hs(()=>{t||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&yt(n())},[t]),_s(()=>{t&&yt(n())})}function Jx(e,{ownerDocument:r,container:t,initialFocus:n,initialFocusFallback:o}){let a=b.useRef(null),i=Lr(!!(e&1),"focus-trap#initial-focus"),s=bs();return hs(()=>{if(e===0)return;if(!i){o!=null&&o.current&&yt(o.current);return}let l=t.current;l&&ma(()=>{if(!s.current)return;let c=r==null?void 0:r.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===c){a.current=c;return}}else if(l.contains(c)){a.current=c;return}if(n!=null&&n.current)yt(n.current);else{if(e&16){if(An(l,rt.First|rt.AutoFocus)!==Di.Error)return}else if(An(l,rt.First)!==Di.Error)return;if(o!=null&&o.current&&(yt(o.current),(r==null?void 0:r.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=r==null?void 0:r.activeElement})},[o,i,e]),a}function eS(e,{ownerDocument:r,container:t,containers:n,previousActiveElement:o}){let a=bs(),i=!!(e&4);Vd(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=of(n);We(t.current)&&l.add(t.current);let c=o.current;if(!c)return;let u=s.target;We(u)?af(l,u)?(o.current=u,yt(u)):(s.preventDefault(),s.stopPropagation(),yt(c)):yt(o.current)},!0)}function af(e,r){for(let t of e)if(t.contains(r))return!0;return!1}function sf(e){var r;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!gr((r=e.as)!=null?r:cf)||h.default.Children.count(e.children)===1}let ya=b.createContext(null);ya.displayName="TransitionContext";var tS=(e=>(e.Visible="visible",e.Hidden="hidden",e))(tS||{});function nS(){let e=b.useContext(ya);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function rS(){let e=b.useContext(wa);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let wa=b.createContext(null);wa.displayName="NestingContext";function xa(e){return"children"in e?xa(e.children):e.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function lf(e,r){let t=En(e),n=b.useRef([]),o=bs(),a=Dn(),i=K((d,g=qt.Hidden)=>{let m=n.current.findIndex(({el:_})=>_===d);m!==-1&&(lt(g,{[qt.Unmount](){n.current.splice(m,1)},[qt.Hidden](){n.current[m].state="hidden"}}),a.microTask(()=>{var _;!xa(n)&&o.current&&((_=t.current)==null||_.call(t))}))}),s=K(d=>{let g=n.current.find(({el:m})=>m===d);return g?g.state!=="visible"&&(g.state="visible"):n.current.push({el:d,state:"visible"}),()=>i(d,qt.Unmount)}),l=b.useRef([]),c=b.useRef(Promise.resolve()),u=b.useRef({enter:[],leave:[]}),f=K((d,g,m)=>{l.current.splice(0),r&&(r.chains.current[g]=r.chains.current[g].filter(([_])=>_!==d)),r==null||r.chains.current[g].push([d,new Promise(_=>{l.current.push(_)})]),r==null||r.chains.current[g].push([d,new Promise(_=>{Promise.all(u.current[g].map(([y,x])=>x)).then(()=>_())})]),g==="enter"?c.current=c.current.then(()=>r==null?void 0:r.wait.current).then(()=>m(g)):m(g)}),p=K((d,g,m)=>{Promise.all(u.current[g].splice(0).map(([_,y])=>y)).then(()=>{var _;(_=l.current.shift())==null||_()}).then(()=>m(g))});return b.useMemo(()=>({children:n,register:s,unregister:i,onStart:f,onStop:p,wait:c,chains:u}),[s,i,n,f,p,u,c])}let cf=b.Fragment,uf=Kn.RenderStrategy;function oS(e,r){var t,n;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:c,enterFrom:u,enterTo:f,entered:p,leave:d,leaveFrom:g,leaveTo:m,..._}=e,[y,x]=b.useState(null),w=b.useRef(null),$=sf(e),C=je(...$?[w,r,x]:r===null?[]:[r]),k=(t=_.unmount)==null||t?qt.Unmount:qt.Hidden,{show:M,appear:E,initial:P}=nS(),[F,L]=b.useState(M?"visible":"hidden"),T=rS(),{register:O,unregister:A}=T;ge(()=>O(w),[O,w]),ge(()=>{if(k===qt.Hidden&&w.current){if(M&&F!=="visible"){L("visible");return}return lt(F,{hidden:()=>A(w),visible:()=>O(w)})}},[F,w,O,A,M,k]);let N=ba();ge(()=>{if($&&N&&F==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,F,N,$]);let j=P&&!E,z=E&&M&&P,D=b.useRef(!1),R=lf(()=>{D.current||(L("hidden"),A(w))},T),B=K(J=>{D.current=!0;let q=J?"enter":"leave";R.onStart(w,q,ie=>{ie==="enter"?a==null||a():ie==="leave"&&(s==null||s())})}),H=K(J=>{let q=J?"enter":"leave";D.current=!1,R.onStop(w,q,ie=>{ie==="enter"?i==null||i():ie==="leave"&&(l==null||l())}),q==="leave"&&!xa(R)&&(L("hidden"),A(w))});b.useEffect(()=>{$&&o||(B(M),H(M))},[M,$,o]);let ne=!(!o||!$||!N||j),[,X]=Gd(ne,y,M,{start:B,end:H}),Z=un({ref:C,className:((n=$i(_.className,z&&c,z&&u,X.enter&&c,X.enter&&X.closed&&u,X.enter&&!X.closed&&f,X.leave&&d,X.leave&&!X.closed&&g,X.leave&&X.closed&&m,!X.transition&&M&&p))==null?void 0:n.trim())||void 0,...Wd(X)}),ee=0;F==="visible"&&(ee|=Ae.Open),F==="hidden"&&(ee|=Ae.Closed),M&&F==="hidden"&&(ee|=Ae.Opening),!M&&F==="visible"&&(ee|=Ae.Closing);let G=Se();return h.default.createElement(wa.Provider,{value:R},h.default.createElement(Kd,{value:ee},G({ourProps:Z,theirProps:_,defaultTag:cf,features:uf,visible:F==="visible",name:"Transition.Child"})))}function aS(e,r){let{show:t,appear:n=!1,unmount:o=!0,...a}=e,i=b.useRef(null),s=sf(e),l=je(...s?[i,r]:r===null?[]:[r]);ba();let c=zr();if(t===void 0&&c!==null&&(t=(c&Ae.Open)===Ae.Open),t===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,f]=b.useState(t?"visible":"hidden"),p=lf(()=>{t||f("hidden")}),[d,g]=b.useState(!0),m=b.useRef([t]);ge(()=>{d!==!1&&m.current[m.current.length-1]!==t&&(m.current.push(t),g(!1))},[m,t]);let _=b.useMemo(()=>({show:t,appear:n,initial:d}),[t,n,d]);ge(()=>{t?f("visible"):!xa(p)&&i.current!==null&&f("hidden")},[t,p]);let y={unmount:o},x=K(()=>{var C;d&&g(!1),(C=e.beforeEnter)==null||C.call(e)}),w=K(()=>{var C;d&&g(!1),(C=e.beforeLeave)==null||C.call(e)}),$=Se();return h.default.createElement(wa.Provider,{value:p},h.default.createElement(ya.Provider,{value:_},$({ourProps:{...y,as:b.Fragment,children:h.default.createElement(df,{ref:l,...y,...a,beforeEnter:x,beforeLeave:w})},theirProps:{},defaultTag:b.Fragment,features:uf,visible:u==="visible",name:"Transition"})))}function iS(e,r){let t=b.useContext(ya)!==null,n=zr()!==null;return h.default.createElement(h.default.Fragment,null,!t&&n?h.default.createElement(Mi,{ref:r,...e}):h.default.createElement(df,{ref:r,...e}))}let Mi=_e(aS),df=_e(oS),ys=_e(iS),sS=Object.assign(Mi,{Child:ys,Root:Mi});var lS=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(lS||{}),cS=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(cS||{});let uS={0(e,r){return e.titleId===r.id?e:{...e,titleId:r.id}}},ws=b.createContext(null);ws.displayName="DialogContext";function Sa(e){let r=b.useContext(ws);if(r===null){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Sa),t}return r}function dS(e,r){return lt(r.type,uS,e,r)}let fc=_e(function(e,r){let t=b.useId(),{id:n=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:c=!1,unmount:u=!1,...f}=e,p=b.useRef(!1);s=(function(){return s==="dialog"||s==="alertdialog"?s:(p.current||(p.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let d=zr();o===void 0&&d!==null&&(o=(d&Ae.Open)===Ae.Open);let g=b.useRef(null),m=je(g,r),_=Un(g),y=o?0:1,[x,w]=b.useReducer(dS,{titleId:null,descriptionId:null,panelRef:b.createRef()}),$=K(()=>a(!1)),C=K(X=>w({type:0,id:X})),k=ba()?y===0:!1,[M,E]=Ax(),P={get current(){var X;return(X=x.panelRef.current)!=null?X:g.current}},F=rf(),{resolveContainers:L}=Bx({mainTreeNode:F,portals:M,defaultContainers:[P]}),T=d!==null?(d&Ae.Closing)===Ae.Closing:!1;Fd(c||T?!1:k,{allowed:K(()=>{var X,Z;return[(Z=(X=g.current)==null?void 0:X.closest("[data-headlessui-portal]"))!=null?Z:null]}),disallowed:K(()=>{var X;return[(X=F==null?void 0:F.closest("body > *:not(#headlessui-portal-root)"))!=null?X:null]})});let O=va.get(null);ge(()=>{if(k)return O.actions.push(n),()=>O.actions.pop(n)},[O,n,k]);let A=et(O,b.useCallback(X=>O.selectors.isTop(X,n),[O,n]));Yd(A,L,X=>{X.preventDefault(),$()}),Yx(A,_==null?void 0:_.defaultView,X=>{X.preventDefault(),X.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Bd(c||T?!1:k,_,L),Ld(k,g,$);let[N,j]=Dd(),z=b.useMemo(()=>[{dialogState:y,close:$,setTitleId:C,unmount:u},x],[y,$,C,u,x]),D=St({open:y===0}),R={ref:m,id:n,role:s,tabIndex:-1,"aria-modal":c?void 0:y===0?!0:void 0,"aria-labelledby":x.titleId,"aria-describedby":N,unmount:u},B=!Vx(),H=dn.None;k&&!c&&(H|=dn.RestoreFocus,H|=dn.TabLock,l&&(H|=dn.AutoFocus),B&&(H|=dn.InitialFocus));let ne=Se();return h.default.createElement(Rx,null,h.default.createElement(uc,{force:!0},h.default.createElement(ef,null,h.default.createElement(ws.Provider,{value:z},h.default.createElement(Jd,{target:g},h.default.createElement(uc,{force:!1},h.default.createElement(j,{slot:D},h.default.createElement(E,null,h.default.createElement(Qx,{initialFocus:i,initialFocusFallback:g,containers:L,features:H},h.default.createElement(Lw,{value:$},ne({ourProps:R,theirProps:f,slot:D,defaultTag:fS,features:pS,visible:y===0,name:"Dialog"})))))))))))}),fS="div",pS=Kn.RenderStrategy|Kn.Static;function gS(e,r){let{transition:t=!1,open:n,...o}=e,a=zr(),i=e.hasOwnProperty("open")||a!==null,s=e.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(n!==void 0||t)&&!o.static?h.default.createElement(dc,null,h.default.createElement(sS,{show:n,transition:t,unmount:o.unmount},h.default.createElement(fc,{ref:r,...o}))):h.default.createElement(dc,null,h.default.createElement(fc,{ref:r,open:n,...o}))}let mS="div";function hS(e,r){let t=b.useId(),{id:n=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=e,[{dialogState:i,unmount:s},l]=Sa("Dialog.Panel"),c=je(r,l.panelRef),u=St({open:i===0}),f=K(_=>{_.stopPropagation()}),p={ref:c,id:n,onClick:f},d=o?ys:b.Fragment,g=o?{unmount:s}:{},m=Se();return h.default.createElement(d,{...g},m({ourProps:p,theirProps:a,slot:u,defaultTag:mS,name:"Dialog.Panel"}))}let vS="div";function _S(e,r){let{transition:t=!1,...n}=e,[{dialogState:o,unmount:a}]=Sa("Dialog.Backdrop"),i=St({open:o===0}),s={ref:r,"aria-hidden":!0},l=t?ys:b.Fragment,c=t?{unmount:a}:{},u=Se();return h.default.createElement(l,{...c},u({ourProps:s,theirProps:n,slot:i,defaultTag:vS,name:"Dialog.Backdrop"}))}let bS="h2";function yS(e,r){let t=b.useId(),{id:n=`headlessui-dialog-title-${t}`,...o}=e,[{dialogState:a,setTitleId:i}]=Sa("Dialog.Title"),s=je(r);b.useEffect(()=>(i(n),()=>i(null)),[n,i]);let l=St({open:a===0}),c={ref:s,id:n};return Se()({ourProps:c,theirProps:o,slot:l,defaultTag:bS,name:"Dialog.Title"})}let wS=_e(gS),ff=_e(hS),xS=_e(_S),SS=_e(yS),pf=Object.assign(wS,{Panel:ff,Title:SS,Description:Rw}),pc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function gc(e){var r,t;let n=(r=e.innerText)!=null?r:"",o=e.cloneNode(!0);if(!We(o))return n;let a=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),a=!0;let i=a?(t=o.innerText)!=null?t:"":n;return pc.test(i)&&(i=i.replace(pc,"")),i}function $S(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=e.getAttribute("aria-labelledby");if(t){let n=t.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():gc(a).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return gc(e).trim()}function kS(e){let r=b.useRef(""),t=b.useRef("");return K(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(r.current===o)return t.current;let a=$S(n).trim().toLowerCase();return r.current=o,t.current=a,a})}var CS=Object.defineProperty,DS=(e,r,t)=>r in e?CS(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,mc=(e,r,t)=>(DS(e,typeof r!="symbol"?r+"":r,t),t),Oe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Oe||{}),Ho=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ho||{}),de=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e[e.MarkButtonAsMoved=10]="MarkButtonAsMoved",e))(de||{});function hc(e,r=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=Ad(r(e.items.slice()),a=>a.dataRef.current.domRef.current),o=t?n.indexOf(t):null;return o===-1&&(o=null),{items:n,activeItemIndex:o}}let ES={1(e){if(e.menuState===1)return e;let r=e.buttonElement?vo.Tracked(tf(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:xe.Nothing},menuState:1,buttonPositionState:r}},0(e,r){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:r.focus,menuState:0,buttonPositionState:vo.Idle}},2:(e,r)=>{var t,n,o,a,i;if(e.menuState===1)return e;let s={...e,searchQuery:"",activationTrigger:(t=r.trigger)!=null?t:1,__demoMode:!1};if(r.focus===xe.Nothing)return{...s,activeItemIndex:null};if(r.focus===xe.Specific)return{...s,activeItemIndex:e.items.findIndex(u=>u.id===r.id)};if(r.focus===xe.Previous){let u=e.activeItemIndex;if(u!==null){let f=e.items[u].dataRef.current.domRef,p=oo(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(p!==null){let d=e.items[p].dataRef.current.domRef;if(((n=f.current)==null?void 0:n.previousElementSibling)===d.current||((o=d.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeItemIndex:p}}}}else if(r.focus===xe.Next){let u=e.activeItemIndex;if(u!==null){let f=e.items[u].dataRef.current.domRef,p=oo(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(p!==null){let d=e.items[p].dataRef.current.domRef;if(((a=f.current)==null?void 0:a.nextElementSibling)===d.current||((i=d.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeItemIndex:p}}}}let l=hc(e),c=oo(r,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...s,...l,activeItemIndex:c}},3:(e,r)=>{let t=e.searchQuery!==""?0:1,n=e.searchQuery+r.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(i=>{var s;return((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(n))&&!i.dataRef.current.disabled}),a=o?e.items.indexOf(o):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,r)=>{let t=e.items.concat(r.items.map(o=>o)),n=e.activeItemIndex;return e.pendingFocus.focus!==xe.Nothing&&(n=oo(e.pendingFocus,{resolveItems:()=>t,resolveActiveIndex:()=>e.activeItemIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),{...e,items:t,activeItemIndex:n,pendingFocus:{focus:xe.Nothing},pendingShouldSort:!0}},6:(e,r)=>{let t=e.items,n=[],o=new Set(r.items);for(let[a,i]of t.entries())if(o.has(i.id)&&(n.push(a),o.delete(i.id),o.size===0))break;if(n.length>0){t=t.slice();for(let a of n.reverse())t.splice(a,1)}return{...e,items:t,activationTrigger:1}},7:(e,r)=>e.buttonElement===r.element?e:{...e,buttonElement:r.element},8:(e,r)=>e.itemsElement===r.element?e:{...e,itemsElement:r.element},9:e=>e.pendingShouldSort?{...e,...hc(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:vo.Moved}}};class xs extends Pd{constructor(r){super(r),mc(this,"actions",{registerItem:Ul(()=>{let t=[],n=new Set;return[(o,a)=>{n.has(a)||(n.add(a),t.push({id:o,dataRef:a}))},()=>(n.clear(),this.send({type:5,items:t.splice(0)}))]}),unregisterItem:Ul(()=>{let t=[];return[n=>t.push(n),()=>this.send({type:6,items:t.splice(0)})]})}),mc(this,"selectors",{activeDescendantId(t){var n;let o=t.activeItemIndex,a=t.items;return o===null||(n=a[o])==null?void 0:n.id},isActive(t,n){var o;let a=t.activeItemIndex,i=t.items;return a!==null?((o=i[a])==null?void 0:o.id)===n:!1},shouldScrollIntoView(t,n){return t.__demoMode||t.menuState!==0||t.activationTrigger===0?!1:this.isActive(t,n)},didButtonMove(t){return t.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let t=this.state.id,n=va.get(null);this.disposables.add(n.on(Id.Push,o=>{!n.selectors.isTop(o,t)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>n.actions.push(t)),this.on(1,()=>n.actions.pop(t))}this.disposables.group(t=>{this.on(1,n=>{n.buttonElement&&(t.dispose(),t.add(Hx(n.buttonElement,n.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:r,__demoMode:t=!1}){return new xs({id:r,__demoMode:t,menuState:t?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:xe.Nothing},buttonPositionState:vo.Idle})}reduce(r,t){return lt(t.type,ES,r,t)}}const gf=b.createContext(null);function Ss(e){let r=b.useContext(gf);if(r===null){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,mf),t}return r}function mf({id:e,__demoMode:r=!1}){let t=b.useMemo(()=>xs.new({id:e,__demoMode:r}),[]);return _s(()=>t.dispose()),t}let MS=b.Fragment;function RS(e,r){let t=b.useId(),{__demoMode:n=!1,...o}=e,a=mf({id:t,__demoMode:n}),[i,s,l]=et(a,_=>[_.menuState,_.itemsElement,_.buttonElement]),c=je(r),u=va.get(null),f=et(u,b.useCallback(_=>u.selectors.isTop(_,t),[u,t]));Yd(f,[l,s],(_,y)=>{var x;a.send({type:de.CloseMenu}),ms(y,gs.Loose)||(_.preventDefault(),(x=a.state.buttonElement)==null||x.focus())});let p=K(()=>{a.send({type:de.CloseMenu})}),d=St({open:i===Oe.Open,close:p}),g={ref:c},m=Se();return h.default.createElement(Dx,null,h.default.createElement(gf.Provider,{value:a},h.default.createElement(Kd,{value:lt(i,{[Oe.Open]:Ae.Open,[Oe.Closed]:Ae.Closed})},m({ourProps:g,theirProps:o,slot:d,defaultTag:MS,name:"Menu"}))))}let PS="button";function TS(e,r){let t=Ss("Menu.Button"),n=b.useId(),{id:o=`headlessui-menu-button-${n}`,disabled:a=!1,autoFocus:i=!1,...s}=e,l=b.useRef(null),c=$x(),u=je(r,l,Sx(),K(O=>t.send({type:de.SetButtonElement,element:O}))),f=K(O=>{switch(O.key){case Ce.Space:case Ce.Enter:case Ce.ArrowDown:O.preventDefault(),O.stopPropagation(),t.send({type:de.OpenMenu,focus:{focus:xe.First}});break;case Ce.ArrowUp:O.preventDefault(),O.stopPropagation(),t.send({type:de.OpenMenu,focus:{focus:xe.Last}});break}}),p=K(O=>{switch(O.key){case Ce.Space:O.preventDefault();break}}),[d,g,m]=et(t,O=>[O.menuState,O.buttonElement,O.itemsElement]),_=d===Oe.Open;ix(_,{trigger:g,action:b.useCallback(O=>{if(g!=null&&g.contains(O.target))return ro.Ignore;let A=O.target.closest('[role="menuitem"]:not([data-disabled])');return We(A)?ro.Select(A):m!=null&&m.contains(O.target)?ro.Ignore:ro.Close},[g,m]),close:b.useCallback(()=>t.send({type:de.CloseMenu}),[]),select:b.useCallback(O=>O.click(),[])});let y=K(O=>{var A;if(O.button===Ud.Left){if($w(O.currentTarget))return O.preventDefault();a||(d===Oe.Open?(vr.flushSync(()=>t.send({type:de.CloseMenu})),(A=l.current)==null||A.focus({preventScroll:!0})):(O.preventDefault(),t.send({type:de.OpenMenu,focus:{focus:xe.Nothing},trigger:Ho.Pointer})))}}),x=b.useRef(null),w=K(O=>{x.current=O.pointerType,O.pointerType==="mouse"&&y(O)}),$=K(O=>{x.current!=="mouse"&&y(O)}),{isFocusVisible:C,focusProps:k}=rw({autoFocus:i}),{isHovered:M,hoverProps:E}=nw({isDisabled:a}),{pressed:P,pressProps:F}=cw({disabled:a}),L=St({open:d===Oe.Open,active:P||d===Oe.Open,disabled:a,hover:M,focus:C,autofocus:i}),T=wd(c(),{ref:u,id:o,type:sx(e,l.current),"aria-haspopup":"menu","aria-controls":m==null?void 0:m.id,"aria-expanded":d===Oe.Open,disabled:a||void 0,autoFocus:i,onKeyDown:f,onKeyUp:p,onPointerDown:w,onClick:$},k,E,F);return Se()({ourProps:T,theirProps:s,slot:L,defaultTag:PS,name:"Menu.Button"})}let IS="div",OS=Kn.RenderStrategy|Kn.Static;function FS(e,r){let t=b.useId(),{id:n=`headlessui-menu-items-${t}`,anchor:o,portal:a=!1,modal:i=!0,transition:s=!1,...l}=e,c=xx(o),u=Ss("Menu.Items"),[f,p]=Cx(c),d=kx(),[g,m]=b.useState(null),_=je(r,c?f:null,K(D=>u.send({type:de.SetItemsElement,element:D})),m),[y,x]=et(u,D=>[D.menuState,D.buttonElement]),w=Un(x),$=Un(g);c&&(a=!0);let C=zr(),[k,M]=Gd(s,g,C!==null?(C&Ae.Open)===Ae.Open:y===Oe.Open);Ld(k,x,()=>{u.send({type:de.CloseMenu})});let E=et(u,D=>D.__demoMode),P=E?!1:i&&y===Oe.Open;Bd(P,$);let F=E?!1:i&&y===Oe.Open;Fd(F,{allowed:b.useCallback(()=>[x,g],[x,g])});let L=et(u,u.selectors.didButtonMove)?!1:k;b.useEffect(()=>{let D=g;D&&y===Oe.Open&&D!==($==null?void 0:$.activeElement)&&D.focus({preventScroll:!0})},[y,g,$]),wx(y===Oe.Open,{container:g,accept(D){return D.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:D.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(D){D.setAttribute("role","none")}});let T=Dn(),O=K(D=>{var R,B,H;switch(T.dispose(),D.key){case Ce.Space:if(u.state.searchQuery!=="")return D.preventDefault(),D.stopPropagation(),u.send({type:de.Search,value:D.key});case Ce.Enter:if(D.preventDefault(),D.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:ne}=u.state.items[u.state.activeItemIndex];(B=(R=ne.current)==null?void 0:R.domRef.current)==null||B.click()}u.send({type:de.CloseMenu}),Nd(u.state.buttonElement);break;case Ce.ArrowDown:return D.preventDefault(),D.stopPropagation(),u.send({type:de.GoToItem,focus:xe.Next});case Ce.ArrowUp:return D.preventDefault(),D.stopPropagation(),u.send({type:de.GoToItem,focus:xe.Previous});case Ce.Home:case Ce.PageUp:return D.preventDefault(),D.stopPropagation(),u.send({type:de.GoToItem,focus:xe.First});case Ce.End:case Ce.PageDown:return D.preventDefault(),D.stopPropagation(),u.send({type:de.GoToItem,focus:xe.Last});case Ce.Escape:D.preventDefault(),D.stopPropagation(),vr.flushSync(()=>u.send({type:de.CloseMenu})),(H=u.state.buttonElement)==null||H.focus({preventScroll:!0});break;case Ce.Tab:D.preventDefault(),D.stopPropagation(),vr.flushSync(()=>u.send({type:de.CloseMenu})),nx(u.state.buttonElement,D.shiftKey?rt.Previous:rt.Next);break;default:D.key.length===1&&(u.send({type:de.Search,value:D.key}),T.setTimeout(()=>u.send({type:de.ClearSearch}),350));break}}),A=K(D=>{switch(D.key){case Ce.Space:D.preventDefault();break}}),N=St({open:y===Oe.Open}),j=wd(c?d():{},{"aria-activedescendant":et(u,u.selectors.activeDescendantId),"aria-labelledby":et(u,D=>{var R;return(R=D.buttonElement)==null?void 0:R.id}),id:n,onKeyDown:O,onKeyUp:A,role:"menu",tabIndex:y===Oe.Open?0:void 0,ref:_,style:{...l.style,...p,"--button-width":zw(k,x,!0).width},...Wd(M)}),z=Se();return h.default.createElement(ef,{enabled:a?e.static||k:!1,ownerDocument:w},z({ourProps:j,theirProps:l,slot:N,defaultTag:IS,features:OS,visible:L,name:"Menu.Items"}))}let LS=b.Fragment;function zS(e,r){let t=b.useId(),{id:n=`headlessui-menu-item-${t}`,disabled:o=!1,...a}=e,i=Ss("Menu.Item"),s=et(i,L=>i.selectors.isActive(L,n)),l=b.useRef(null),c=je(r,l),u=et(i,L=>i.selectors.shouldScrollIntoView(L,n));ge(()=>{if(u)return Ve().requestAnimationFrame(()=>{var L,T;(T=(L=l.current)==null?void 0:L.scrollIntoView)==null||T.call(L,{block:"nearest"})})},[u,l]);let f=kS(l),p=b.useRef({disabled:o,domRef:l,get textValue(){return f()}});ge(()=>{p.current.disabled=o},[p,o]),ge(()=>(i.actions.registerItem(n,p),()=>i.actions.unregisterItem(n)),[p,n]);let d=K(()=>{i.send({type:de.CloseMenu})}),g=K(L=>{if(o)return L.preventDefault();i.send({type:de.CloseMenu}),Nd(i.state.buttonElement)}),m=K(()=>{if(o)return i.send({type:de.GoToItem,focus:xe.Nothing});i.send({type:de.GoToItem,focus:xe.Specific,id:n})}),_=mx(),y=K(L=>_.update(L)),x=K(L=>{_.wasMoved(L)&&(o||s||i.send({type:de.GoToItem,focus:xe.Specific,id:n,trigger:Ho.Pointer}))}),w=K(L=>{_.wasMoved(L)&&(o||s&&i.state.activationTrigger===Ho.Pointer&&i.send({type:de.GoToItem,focus:xe.Nothing}))}),[$,C]=Ed(),[k,M]=Dd(),E=St({active:s,focus:s,disabled:o,close:d}),P={id:n,ref:c,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-labelledby":$,"aria-describedby":k,disabled:void 0,onClick:g,onFocus:m,onPointerEnter:y,onMouseEnter:y,onPointerMove:x,onMouseMove:x,onPointerLeave:w,onMouseLeave:w},F=Se();return h.default.createElement(C,null,h.default.createElement(M,null,F({ourProps:P,theirProps:a,slot:E,defaultTag:LS,name:"Menu.Item"})))}let NS="div";function AS(e,r){let[t,n]=Ed(),o=e,a={ref:r,"aria-labelledby":t,role:"group"},i=Se();return h.default.createElement(n,null,i({ourProps:a,theirProps:o,slot:{},defaultTag:NS,name:"Menu.Section"}))}let jS="header";function HS(e,r){let t=b.useId(),{id:n=`headlessui-menu-heading-${t}`,...o}=e,a=ps();ge(()=>a.register(n),[n,a.register]);let i={id:n,ref:r,role:"presentation",...a.props};return Se()({ourProps:i,theirProps:o,slot:{},defaultTag:jS,name:"Menu.Heading"})}let YS="div";function VS(e,r){let t=e,n={ref:r,role:"separator"};return Se()({ourProps:n,theirProps:t,slot:{},defaultTag:YS,name:"Menu.Separator"})}let BS=_e(RS),Ri=_e(TS),hf=_e(FS),WS=_e(zS),GS=_e(AS),qS=_e(HS),KS=_e(VS),vf=Object.assign(BS,{Button:Ri,Items:hf,Item:WS,Section:GS,Heading:qS,Separator:KS});const US=I.keyframes`
|
|
1718
|
+
`))}else{let p=u.props,f=p?.className,g=typeof f=="function"?(...b)=>Si(f(...b),l.className):Si(f,l.className),m=g?{className:g}:{},h=bd(u.props,cn(Ga(l,["ref"])));for(let b in d)b in h&&delete d[b];return y.cloneElement(u,Object.assign({},h,d,c,{ref:o(dw(u),c.ref)},m))}return y.createElement(a,Object.assign({},Ga(l,["ref"]),!pr(a)&&c,!pr(a)&&d),u)}function cw(){let e=y.useRef([]),r=y.useCallback(n=>{for(let t of e.current)t!=null&&(typeof t=="function"?t(n):t.current=n)},[]);return(...n)=>{if(!n.every(t=>t==null))return e.current=n,r}}function uw(...e){return e.every(r=>r==null)?void 0:r=>{for(let n of e)n!=null&&(typeof n=="function"?n(r):n.current=r)}}function bd(...e){if(e.length===0)return{};if(e.length===1)return e[0];let r={},n={};for(let t of e)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(t[o])):r[o]=t[o];if(r.disabled||r["aria-disabled"])for(let t in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(t)&&(n[t]=[o=>{var a;return(a=o?.preventDefault)==null?void 0:a.call(o)}]);for(let t in n)Object.assign(r,{[t](o,...a){let i=n[t];for(let s of i){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;s(o,...a)}}});return r}function yd(...e){if(e.length===0)return{};if(e.length===1)return e[0];let r={},n={};for(let t of e)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(t[o])):r[o]=t[o];for(let t in n)Object.assign(r,{[t](...o){let a=n[t];for(let i of a)i?.(...o)}});return r}function ve(e){var r;return Object.assign(y.forwardRef(e),{displayName:(r=e.displayName)!=null?r:e.name})}function cn(e){let r=Object.assign({},e);for(let n in r)r[n]===void 0&&delete r[n];return r}function Ga(e,r=[]){let n=Object.assign({},e);for(let t of r)t in n&&delete n[t];return n}function dw(e){return v.default.version.split(".")[0]>="19"?e.props.ref:e.ref}function pr(e){return e===y.Fragment||e===Symbol.for("react.fragment")}function fw(e){return pr(e.type)}let pw="span";var No=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(No||{});function gw(e,r){var n;let{features:t=1,...o}=e,a={ref:r,"aria-hidden":(t&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(t&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(t&4)===4&&(t&2)!==2&&{display:"none"}}};return xe()({ourProps:a,theirProps:o,slot:{},defaultTag:pw,name:"Hidden"})}let $i=ve(gw),mw=y.createContext(void 0);function hw(){return y.useContext(mw)}function wd(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function It(e){return wd(e)&&"tagName"in e}function Be(e){return It(e)&&"accessKey"in e}function vt(e){return It(e)&&"tabIndex"in e}function vw(e){return It(e)&&"style"in e}function _w(e){return Be(e)&&e.nodeName==="IFRAME"}function xd(e){return Be(e)&&e.nodeName==="INPUT"}function Bl(e){return Be(e)&&e.nodeName==="LABEL"}function bw(e){return Be(e)&&e.nodeName==="FIELDSET"}function Sd(e){return Be(e)&&e.nodeName==="LEGEND"}function yw(e){return It(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function ww(e){let r=e.parentElement,n=null;for(;r&&!bw(r);)Sd(r)&&(n=r),r=r.parentElement;let t=r?.getAttribute("disabled")==="";return t&&xw(n)?!1:t}function xw(e){if(!e)return!1;let r=e.previousElementSibling;for(;r!==null;){if(Sd(r))return!1;r=r.previousElementSibling}return!0}let $d=Symbol();function Sw(e,r=!0){return Object.assign(e,{[$d]:r})}function Ae(...e){let r=y.useRef(e);y.useEffect(()=>{r.current=e},[e]);let n=q(t=>{for(let o of r.current)o!=null&&(typeof o=="function"?o(t):o.current=t)});return e.every(t=>t==null||t?.[$d])?void 0:n}let ds=y.createContext(null);ds.displayName="DescriptionContext";function kd(){let e=y.useContext(ds);if(e===null){let r=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,kd),r}return e}function Cd(){let[e,r]=y.useState([]);return[e.length>0?e.join(" "):void 0,y.useMemo(()=>function(n){let t=q(a=>(r(i=>[...i,a]),()=>r(i=>{let s=i.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),o=y.useMemo(()=>({register:t,slot:n.slot,name:n.name,props:n.props,value:n.value}),[t,n.slot,n.name,n.props,n.value]);return v.default.createElement(ds.Provider,{value:o},n.children)},[r])]}let $w="p";function kw(e,r){let n=y.useId(),t=_d(),{id:o=`headlessui-description-${n}`,...a}=e,i=kd(),s=Ae(r);pe(()=>i.register(o),[o,i.register]);let l=xt({...i.slot,disabled:t||!1}),c={ref:s,...i.props,id:o};return xe()({ourProps:c,theirProps:a,slot:l,defaultTag:$w,name:i.name||"Description"})}let Cw=ve(kw),Dw=Object.assign(Cw,{});var ke=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(ke||{});let ma=y.createContext(null);ma.displayName="LabelContext";function fs(){let e=y.useContext(ma);if(e===null){let r=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,fs),r}return e}function Ew(e){var r,n,t;let o=(n=(r=y.useContext(ma))==null?void 0:r.value)!=null?n:void 0;return((t=void 0)!=null?t:0)>0?[o,...e].filter(Boolean).join(" "):o}function Dd({inherit:e=!1}={}){let r=Ew(),[n,t]=y.useState([]),o=e?[r,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,y.useMemo(()=>function(a){let i=q(l=>(t(c=>[...c,l]),()=>t(c=>{let u=c.slice(),d=u.indexOf(l);return d!==-1&&u.splice(d,1),u}))),s=y.useMemo(()=>({register:i,slot:a.slot,name:a.name,props:a.props,value:a.value}),[i,a.slot,a.name,a.props,a.value]);return v.default.createElement(ma.Provider,{value:s},a.children)},[t])]}let Mw="label";function Rw(e,r){var n;let t=y.useId(),o=fs(),a=hw(),i=_d(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,d=Ae(r);pe(()=>o.register(s),[s,o.register]);let p=q(m=>{let h=m.currentTarget;if(!(m.target!==m.currentTarget&&yw(m.target))&&(Bl(h)&&m.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(m),Bl(h))){let b=document.getElementById(h.htmlFor);if(b){let w=b.getAttribute("disabled");if(w==="true"||w==="")return;let x=b.getAttribute("aria-disabled");if(x==="true"||x==="")return;(xd(b)&&(b.type==="file"||b.type==="radio"||b.type==="checkbox")||b.role==="radio"||b.role==="checkbox"||b.role==="switch")&&b.click(),b.focus({preventScroll:!0})}}}),f=xt({...o.slot,disabled:i||!1}),g={ref:d,...o.props,id:s,htmlFor:l,onClick:p};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),xe()({ourProps:g,theirProps:u,slot:f,defaultTag:l?Mw:"div",name:o.name||"Label"})}let Pw=ve(Rw);Object.assign(Pw,{});let Tw=y.createContext(()=>{});function Iw({value:e,children:r}){return v.default.createElement(Tw.Provider,{value:e},r)}function Wl(e){if(e===null)return{width:0,height:0};let{width:r,height:n}=e.getBoundingClientRect();return{width:r,height:n}}function Ow(e,r,n=!1){let[t,o]=y.useState(()=>Wl(r));return pe(()=>{if(!r||!e)return;let a=Ye();return a.requestAnimationFrame(function i(){a.requestAnimationFrame(i),o(s=>{let l=Wl(r);return l.width===s.width&&l.height===s.height?s:l})}),()=>{a.dispose()}},[r,e]),n?{width:`${t.width}px`,height:`${t.height}px`}:t}let Ed=class extends Map{constructor(r){super(),this.factory=r}get(r){let n=super.get(r);return n===void 0&&(n=this.factory(r),this.set(r,n)),n}};var Fw=Object.defineProperty,Lw=(e,r,n)=>r in e?Fw(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,zw=(e,r,n)=>(Lw(e,r+"",n),n),Md=(e,r,n)=>{if(!r.has(e))throw TypeError("Cannot "+n)},qe=(e,r,n)=>(Md(e,r,"read from private field"),n?n.call(e):r.get(e)),qa=(e,r,n)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,n)},Gl=(e,r,n,t)=>(Md(e,r,"write to private field"),r.set(e,n),n),ct,sr,lr;let Rd=class{constructor(r){qa(this,ct,{}),qa(this,sr,new Ed(()=>new Set)),qa(this,lr,new Set),zw(this,"disposables",Ye()),Gl(this,ct,r),Tt.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return qe(this,ct)}subscribe(r,n){if(Tt.isServer)return()=>{};let t={selector:r,callback:n,current:r(qe(this,ct))};return qe(this,lr).add(t),this.disposables.add(()=>{qe(this,lr).delete(t)})}on(r,n){return Tt.isServer?()=>{}:(qe(this,sr).get(r).add(n),this.disposables.add(()=>{qe(this,sr).get(r).delete(n)}))}send(r){let n=this.reduce(qe(this,ct),r);if(n!==qe(this,ct)){Gl(this,ct,n);for(let t of qe(this,lr)){let o=t.selector(qe(this,ct));Pd(t.current,o)||(t.current=o,t.callback(o))}for(let t of qe(this,sr).get(r.type))t(qe(this,ct),r)}}};ct=new WeakMap,sr=new WeakMap,lr=new WeakMap;function Pd(e,r){return Object.is(e,r)?!0:typeof e!="object"||e===null||typeof r!="object"||r===null?!1:Array.isArray(e)&&Array.isArray(r)?e.length!==r.length?!1:Ka(e[Symbol.iterator](),r[Symbol.iterator]()):e instanceof Map&&r instanceof Map||e instanceof Set&&r instanceof Set?e.size!==r.size?!1:Ka(e.entries(),r.entries()):ql(e)&&ql(r)?Ka(Object.entries(e)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function Ka(e,r){do{let n=e.next(),t=r.next();if(n.done&&t.done)return!0;if(n.done||t.done||!Object.is(n.value,t.value))return!1}while(!0)}function ql(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||Object.getPrototypeOf(r)===null}function Kl(e){let[r,n]=e(),t=Ye();return(...o)=>{r(...o),t.dispose(),t.microTask(n)}}var Nw=Object.defineProperty,Aw=(e,r,n)=>r in e?Nw(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ul=(e,r,n)=>(Aw(e,typeof r!="symbol"?r+"":r,n),n),Td=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Td||{});let jw={0(e,r){let n=r.id,t=e.stack,o=e.stack.indexOf(n);if(o!==-1){let a=e.stack.slice();return a.splice(o,1),a.push(n),t=a,{...e,stack:t}}return{...e,stack:[...e.stack,n]}},1(e,r){let n=r.id,t=e.stack.indexOf(n);if(t===-1)return e;let o=e.stack.slice();return o.splice(t,1),{...e,stack:o}}},Hw=class Id extends Rd{constructor(){super(...arguments),Ul(this,"actions",{push:r=>this.send({type:0,id:r}),pop:r=>this.send({type:1,id:r})}),Ul(this,"selectors",{isTop:(r,n)=>r.stack[r.stack.length-1]===n,inStack:(r,n)=>r.stack.includes(n)})}static new(){return new Id({stack:[]})}reduce(r,n){return st(n.type,jw,r,n)}};const ha=new Ed(()=>Hw.new());var to={exports:{}},Ua={};var Ql;function Yw(){if(Ql)return Ua;Ql=1;var e=v.default;function r(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:r,t=e.useSyncExternalStore,o=e.useRef,a=e.useEffect,i=e.useMemo,s=e.useDebugValue;return Ua.useSyncExternalStoreWithSelector=function(l,c,u,d,p){var f=o(null);if(f.current===null){var g={hasValue:!1,value:null};f.current=g}else g=f.current;f=i(function(){function h(C){if(!b){if(b=!0,w=C,C=d(C),p!==void 0&&g.hasValue){var k=g.value;if(p(k,C))return x=k}return x=C}if(k=x,n(w,C))return k;var E=d(C);return p!==void 0&&p(k,E)?(w=C,k):(w=C,x=E)}var b=!1,w,x,$=u===void 0?null:u;return[function(){return h(c())},$===null?void 0:function(){return h($())}]},[c,u,d,p]);var m=t(l,f[0],f[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),s(m),m},Ua}var Qa={};var Xl;function Vw(){return Xl||(Xl=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=v.default,n=typeof Object.is=="function"?Object.is:e,t=r.useSyncExternalStore,o=r.useRef,a=r.useEffect,i=r.useMemo,s=r.useDebugValue;Qa.useSyncExternalStoreWithSelector=function(l,c,u,d,p){var f=o(null);if(f.current===null){var g={hasValue:!1,value:null};f.current=g}else g=f.current;f=i(function(){function h(C){if(!b){if(b=!0,w=C,C=d(C),p!==void 0&&g.hasValue){var k=g.value;if(p(k,C))return x=k}return x=C}if(k=x,n(w,C))return k;var E=d(C);return p!==void 0&&p(k,E)?(w=C,k):(w=C,x=E)}var b=!1,w,x,$=u===void 0?null:u;return[function(){return h(c())},$===null?void 0:function(){return h($())}]},[c,u,d,p]);var m=t(l,f[0],f[1]);return a(function(){g.hasValue=!0,g.value=m},[m]),s(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Qa}var Zl;function Bw(){return Zl||(Zl=1,process.env.NODE_ENV==="production"?to.exports=Yw():to.exports=Vw()),to.exports}var Ww=Bw();function Je(e,r,n=Pd){return Ww.useSyncExternalStoreWithSelector(q(t=>e.subscribe(Gw,t)),q(()=>e.state),q(()=>e.state),q(r),n)}function Gw(e){return e}function Fr(e,r){let n=y.useId(),t=ha.get(r),[o,a]=Je(t,y.useCallback(i=>[t.selectors.isTop(i,n),t.selectors.inStack(i,n)],[t,n]));return pe(()=>{if(e)return t.actions.push(n),()=>t.actions.pop(n)},[t,e,n]),e?a?o:!0:!1}let ki=new Map,gr=new Map;function Jl(e){var r;let n=(r=gr.get(e))!=null?r:0;return gr.set(e,n+1),n!==0?()=>ec(e):(ki.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>ec(e))}function ec(e){var r;let n=(r=gr.get(e))!=null?r:1;if(n===1?gr.delete(e):gr.set(e,n-1),n!==1)return;let t=ki.get(e);t&&(t["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert,ki.delete(e))}function Od(e,{allowed:r,disallowed:n}={}){let t=Fr(e,"inert-others");pe(()=>{var o,a;if(!t)return;let i=Ye();for(let l of(o=n?.())!=null?o:[])l&&i.add(Jl(l));let s=(a=r?.())!=null?a:[];for(let l of s){if(!l)continue;let c=kn(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let d of u.children)s.some(p=>d.contains(p))||i.add(Jl(d));u=u.parentElement}}return i.dispose},[t,r,n])}function Fd(e,r,n){let t=Dn(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&n()});y.useEffect(()=>{if(!e)return;let o=r===null?null:Be(r)?r:r.current;if(!o)return;let a=Ye();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>t.current(o));i.observe(o),a.add(()=>i.disconnect())}return()=>a.dispose()},[r,t,e])}let Ao=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),qw=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var nt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(nt||{}),Ci=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ci||{}),Kw=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Kw||{});function Ld(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ao)).sort((r,n)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Uw(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(qw)).sort((r,n)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var ps=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(ps||{});function gs(e,r=0){var n;return e===((n=kn(e))==null?void 0:n.body)?!1:st(r,{0(){return e.matches(Ao)},1(){let t=e;for(;t!==null;){if(t.matches(Ao))return!0;t=t.parentElement}return!1}})}function zd(e){let r=kn(e);Ye().nextFrame(()=>{r&&vt(r.activeElement)&&!gs(r.activeElement,0)&&bt(e)})}var Qw=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Qw||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function bt(e){e?.focus({preventScroll:!0})}let Xw=["textarea","input"].join(",");function Zw(e){var r,n;return(n=(r=e?.matches)==null?void 0:r.call(e,Xw))!=null?n:!1}function Nd(e,r=n=>n){return e.slice().sort((n,t)=>{let o=r(n),a=r(t);if(o===null||a===null)return 0;let i=o.compareDocumentPosition(a);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Jw(e,r){return Nn(Ld(),r,{relativeTo:e})}function Nn(e,r,{sorted:n=!0,relativeTo:t=null,skipElements:o=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?n?Nd(e):e:r&64?Uw(e):Ld(e);o.length>0&&i.length>1&&(i=i.filter(f=>!o.some(g=>g!=null&&"current"in g?g?.current===f:g===f))),t=t??a.activeElement;let s=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,i.indexOf(t))-1;if(r&4)return Math.max(0,i.indexOf(t))+1;if(r&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=r&32?{preventScroll:!0}:{},u=0,d=i.length,p;do{if(u>=d||u+d<=0)return 0;let f=l+u;if(r&16)f=(f+d)%d;else{if(f<0)return 3;if(f>=d)return 1}p=i[f],p?.focus(c),u+=s}while(p!==a.activeElement);return r&6&&Zw(p)&&p.select(),2}function Ad(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ex(){return/Android/gi.test(window.navigator.userAgent)}function tc(){return Ad()||ex()}function On(e,r,n,t){let o=Dn(n);y.useEffect(()=>{if(!e)return;function a(i){o.current(i)}return document.addEventListener(r,a,t),()=>document.removeEventListener(r,a,t)},[e,r,t])}function jd(e,r,n,t){let o=Dn(n);y.useEffect(()=>{if(!e)return;function a(i){o.current(i)}return window.addEventListener(r,a,t),()=>window.removeEventListener(r,a,t)},[e,r,t])}const nc=30;function Hd(e,r,n){let t=Dn(n),o=y.useCallback(function(s,l){if(s.defaultPrevented)return;let c=l(s);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=(function d(p){return typeof p=="function"?d(p()):Array.isArray(p)||p instanceof Set?p:[p]})(r);for(let d of u)if(d!==null&&(d.contains(c)||s.composed&&s.composedPath().includes(d)))return;return!gs(c,ps.Loose)&&c.tabIndex!==-1&&s.preventDefault(),t.current(s,c)},[t,r]),a=y.useRef(null);On(e,"pointerdown",s=>{var l,c;tc()||(a.current=((c=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:c[0])||s.target)},!0),On(e,"pointerup",s=>{if(tc()||!a.current)return;let l=a.current;return a.current=null,o(s,()=>l)},!0);let i=y.useRef({x:0,y:0});On(e,"touchstart",s=>{i.current.x=s.touches[0].clientX,i.current.y=s.touches[0].clientY},!0),On(e,"touchend",s=>{let l={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=nc||Math.abs(l.y-i.current.y)>=nc))return o(s,()=>vt(s.target)?s.target:null)},!0),jd(e,"blur",s=>o(s,()=>_w(window.document.activeElement)?window.document.activeElement:null),!0)}function Kn(...e){return y.useMemo(()=>kn(...e),[...e])}var tx=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(tx||{});const no={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},nx=200,rc=5;function rx(e,{trigger:r,action:n,close:t,select:o}){let a=y.useRef(null),i=y.useRef(null),s=y.useRef(null);On(e&&r!==null,"pointerdown",l=>{wd(l?.target)&&r!=null&&r.contains(l.target)&&(i.current=l.x,s.current=l.y,a.current=l.timeStamp)}),On(e&&r!==null,"pointerup",l=>{var c,u;let d=a.current;if(d===null||(a.current=null,!vt(l.target))||Math.abs(l.x-((c=i.current)!=null?c:l.x))<rc&&Math.abs(l.y-((u=s.current)!=null?u:l.y))<rc)return;let p=n(l);switch(p.kind){case 0:return;case 1:{l.timeStamp-d>nx&&(o(p.target),t());break}case 2:{t();break}}},{capture:!0})}function Yd(e,r,n,t){let o=Dn(n);y.useEffect(()=>{e=e??window;function a(i){o.current(i)}return e.addEventListener(r,a,t),()=>e.removeEventListener(r,a,t)},[e,r,t])}function ox(e,r){return y.useMemo(()=>{var n;if(e.type)return e.type;let t=(n=e.as)!=null?n:"button";if(typeof t=="string"&&t.toLowerCase()==="button"||r?.tagName==="BUTTON"&&!r.hasAttribute("type"))return"button"},[e.type,e.as,r])}function ax(e){return y.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function ix(e,r){let n=e(),t=new Set;return{getSnapshot(){return n},subscribe(o){return t.add(o),()=>t.delete(o)},dispatch(o,...a){let i=r[o].call(n,...a);i&&(n=i,t.forEach(s=>s()))}}}function sx(){let e;return{before({doc:r}){var n;let t=r.documentElement,o=(n=r.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-t.clientWidth)},after({doc:r,d:n}){let t=r.documentElement,o=Math.max(0,t.clientWidth-t.offsetWidth),a=Math.max(0,e-o);n.style(t,"paddingRight",`${a}px`)}}}function lx(){return Ad()?{before({doc:e,d:r,meta:n}){function t(o){return n.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=Ye();s.style(e.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(e,"click",s=>{if(vt(s.target))try{let l=s.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);vt(u)&&!t(u)&&(i=u)}catch{}},!0),r.addEventListener(e,"touchstart",s=>{if(vt(s.target)&&vw(s.target))if(t(s.target)){let l=s.target;for(;l.parentElement&&t(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(e,"touchmove",s=>{if(vt(s.target)){if(xd(s.target))return;if(t(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function cx(){return{before({doc:e,d:r}){r.style(e.documentElement,"overflow","hidden")}}}function ux(e){let r={};for(let n of e)Object.assign(r,n(r));return r}let pn=ix(()=>new Map,{PUSH(e,r){var n;let t=(n=this.get(e))!=null?n:{doc:e,count:0,d:Ye(),meta:new Set};return t.count++,t.meta.add(r),this.set(e,t),this},POP(e,r){let n=this.get(e);return n&&(n.count--,n.meta.delete(r)),this},SCROLL_PREVENT({doc:e,d:r,meta:n}){let t={doc:e,d:r,meta:ux(n)},o=[lx(),sx(),cx()];o.forEach(({before:a})=>a?.(t)),o.forEach(({after:a})=>a?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});pn.subscribe(()=>{let e=pn.getSnapshot(),r=new Map;for(let[n]of e)r.set(n,n.documentElement.style.overflow);for(let n of e.values()){let t=r.get(n.doc)==="hidden",o=n.count!==0;(o&&!t||!o&&t)&&pn.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&pn.dispatch("TEARDOWN",n)}});function dx(e,r,n=()=>({containers:[]})){let t=ax(pn),o=r?t.get(r):void 0,a=o?o.count>0:!1;return pe(()=>{if(!(!r||!e))return pn.dispatch("PUSH",r,n),()=>pn.dispatch("POP",r,n)},[e,r]),a}function Vd(e,r,n=()=>[document.body]){let t=Fr(e,"scroll-lock");dx(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],n]}})}function oc(e){return[e.screenX,e.screenY]}function fx(){let e=y.useRef([-1,-1]);return{wasMoved(r){let n=oc(r);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(r){e.current=oc(r)}}}function px(e=0){let[r,n]=y.useState(e),t=y.useCallback(l=>n(l),[]),o=y.useCallback(l=>n(c=>c|l),[]),a=y.useCallback(l=>(r&l)===l,[r]),i=y.useCallback(l=>n(c=>c&~l),[]),s=y.useCallback(l=>n(c=>c^l),[]);return{flags:r,setFlag:t,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var ac,ic;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ac=process==null?void 0:process.env)==null?void 0:ac.NODE_ENV)==="test"&&typeof((ic=Element?.prototype)==null?void 0:ic.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
1719
|
+
`)),[]});var gx=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(gx||{});function Bd(e){let r={};for(let n in e)e[n]===!0&&(r[`data-${n}`]="");return r}function Wd(e,r,n,t){let[o,a]=y.useState(n),{hasFlag:i,addFlag:s,removeFlag:l}=px(e&&o?3:0),c=y.useRef(!1),u=y.useRef(!1),d=Cn();return pe(()=>{var p;if(e){if(n&&a(!0),!r){n&&s(3);return}return(p=t?.start)==null||p.call(t,n),mx(r,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(s(3),l(4)):(s(4),l(2)))},run(){u.current?n?(l(3),s(4)):(l(4),s(3)):n?l(1):s(1)},done(){var f;u.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(c.current=!1,l(7),n||a(!1),(f=t?.end)==null||f.call(t,n))}})}},[e,n,r,d]),e?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function mx(e,{prepare:r,run:n,done:t,inFlight:o}){let a=Ye();return vx(e,{prepare:r,inFlight:o}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(hx(e,t))})}),a.dispose}function hx(e,r){var n,t;let o=Ye();if(!e)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(t=(n=e.getAnimations)==null?void 0:n.call(e).filter(s=>s instanceof CSSTransition))!=null?t:[];return i.length===0?(r(),o.dispose):(Promise.allSettled(i.map(s=>s.finished)).then(()=>{a||r()}),o.dispose)}function vx(e,{inFlight:r,prepare:n}){if(r!=null&&r.current){n();return}let t=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=t}function _x(e,{container:r,accept:n,walk:t}){let o=y.useRef(n),a=y.useRef(t);y.useEffect(()=>{o.current=n,a.current=t},[n,t]),pe(()=>{if(!r||!e)return;let i=kn(r);if(!i)return;let s=o.current,l=a.current,c=Object.assign(d=>s(d),{acceptNode:s}),u=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,c,!1);for(;u.nextNode();)l(u.currentNode)},[r,e,o,a])}function ms(e,r){let n=y.useRef([]),t=q(e);y.useEffect(()=>{let o=[...n.current];for(let[a,i]of r.entries())if(n.current[a]!==i){let s=t(r,o);return n.current=r,s}},[t,...r])}let Zn=y.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Zn.displayName="FloatingContext";let hs=y.createContext(null);hs.displayName="PlacementContext";function bx(e){return y.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function yx(){return y.useContext(Zn).setReference}function wx(){return y.useContext(Zn).getReferenceProps}function xx(){let{getFloatingProps:e,slot:r}=y.useContext(Zn);return y.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":r.anchor}),[e,r])}function Sx(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let r=y.useContext(hs),n=y.useMemo(()=>e,[JSON.stringify(e,(o,a)=>{var i;return(i=a?.outerHTML)!=null?i:a})]);pe(()=>{r?.(n??null)},[r,n]);let t=y.useContext(Zn);return y.useMemo(()=>[t.setFloating,e?t.styles:{}],[t.setFloating,e,t.styles])}let sc=4;function $x({children:e,enabled:r=!0}){let[n,t]=y.useState(null),[o,a]=y.useState(0),i=y.useRef(null),[s,l]=y.useState(null);kx(s);let c=r&&n!==null&&s!==null,{to:u="bottom",gap:d=0,offset:p=0,padding:f=0,inner:g}=Cx(n,s),[m,h="center"]=u.split(" ");pe(()=>{c&&a(0)},[c]);let{refs:b,floatingStyles:w,context:x}=Pr({open:c,placement:m==="selection"?h==="center"?"bottom":`bottom-${h}`:h==="center"?`${m}`:`${m}-${h}`,strategy:"absolute",transform:!1,middleware:[Qn({mainAxis:m==="selection"?0:d,crossAxis:p}),Jo({padding:f}),m!=="selection"&&Rr({padding:f}),m==="selection"&&g?qg({...g,padding:f,overflowRef:i,offset:o,minItemsVisible:sc,referenceOverflowThreshold:f,onFallbackChange(O){var T,I;if(!O)return;let j=x.elements.floating;if(!j)return;let N=parseFloat(getComputedStyle(j).scrollPaddingBottom)||0,A=Math.min(sc,j.childElementCount),F=0,D=0;for(let M of(I=(T=x.elements.floating)==null?void 0:T.childNodes)!=null?I:[])if(Be(M)){let V=M.offsetTop,H=V+M.clientHeight+N,te=j.scrollTop,Q=te+j.clientHeight;if(V>=te&&H<=Q)A--;else{D=Math.max(0,Math.min(H,Q)-Math.max(V,te)),F=M.clientHeight;break}}A>=1&&a(M=>{let V=F*A-D+N;return M>=V?M:V})}}):null,_g({padding:f,apply({availableWidth:O,availableHeight:T,elements:I}){Object.assign(I.floating.style,{overflow:"auto",maxWidth:`${O}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${T}px)`})}})].filter(Boolean),whileElementsMounted:Mr}),[$=m,C=h]=x.placement.split("-");m==="selection"&&($="selection");let k=y.useMemo(()=>({anchor:[$,C].filter(Boolean).join(" ")}),[$,C]),E=Kg(x,{overflowRef:i,onChange:a}),{getReferenceProps:P,getFloatingProps:z}=oa([E]),L=q(O=>{l(O),b.setFloating(O)});return v.createElement(hs.Provider,{value:t},v.createElement(Zn.Provider,{value:{setFloating:L,setReference:b.setReference,styles:w,getReferenceProps:P,getFloatingProps:z,slot:k}},e))}function kx(e){pe(()=>{if(!e)return;let r=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,t=parseFloat(n);if(isNaN(t))return;let o=parseInt(n);isNaN(o)||t!==o&&(e.style.maxHeight=`${Math.ceil(t)}px`)});return r.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[e])}function Cx(e,r){var n,t,o;let a=Xa((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",r),i=Xa((t=e?.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Xa((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...e,gap:a,offset:i,padding:s}}function Xa(e,r,n=void 0){let t=Cn(),o=q((l,c)=>{if(l==null)return[n,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!c)return[n,null];let u=lc(l,c);return[u,d=>{let p=Gd(l);{let f=p.map(g=>window.getComputedStyle(c).getPropertyValue(g));t.requestAnimationFrame(function g(){t.nextFrame(g);let m=!1;for(let[b,w]of p.entries()){let x=window.getComputedStyle(c).getPropertyValue(w);if(f[b]!==x){f[b]=x,m=!0;break}}if(!m)return;let h=lc(l,c);u!==h&&(d(h),u=h)})}return t.dispose}]}return[n,null]}),a=y.useMemo(()=>o(e,r)[0],[e,r]),[i=a,s]=y.useState();return pe(()=>{let[l,c]=o(e,r);if(s(l),!!c)return c(s)},[e,r]),i}function Gd(e){let r=/var\((.*)\)/.exec(e);if(r){let n=r[1].indexOf(",");if(n===-1)return[r[1]];let t=r[1].slice(0,n).trim(),o=r[1].slice(n+1).trim();return o?[t,...Gd(o)]:[t]}return[]}function lc(e,r){let n=document.createElement("div");r.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let t=parseFloat(window.getComputedStyle(n).marginTop)||0;return r.removeChild(n),t}let va=y.createContext(null);va.displayName="OpenClosedContext";var Ne=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ne||{});function Lr(){return y.useContext(va)}function qd({value:e,children:r}){return v.default.createElement(va.Provider,{value:e},r)}function Dx({children:e}){return v.default.createElement(va.Provider,{value:null},e)}function Ex(e){function r(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let Wt=[];Ex(()=>{function e(r){if(!vt(r.target)||r.target===document.body||Wt[0]===r.target)return;let n=r.target;n=n.closest(Ao),Wt.unshift(n??r.target),Wt=Wt.filter(t=>t!=null&&t.isConnected),Wt.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Mx(e){throw new Error("Unexpected object: "+e)}var we=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(we||{});function ro(e,r){let n=r.resolveItems();if(n.length<=0)return null;let t=r.resolveActiveIndex(),o=t??-1;switch(e.focus){case 0:{for(let a=0;a<n.length;++a)if(!r.resolveDisabled(n[a],a,n))return a;return t}case 1:{o===-1&&(o=n.length);for(let a=o-1;a>=0;--a)if(!r.resolveDisabled(n[a],a,n))return a;return t}case 2:{for(let a=o+1;a<n.length;++a)if(!r.resolveDisabled(n[a],a,n))return a;return t}case 3:{for(let a=n.length-1;a>=0;--a)if(!r.resolveDisabled(n[a],a,n))return a;return t}case 4:{for(let a=0;a<n.length;++a)if(r.resolveId(n[a],a,n)===e.id)return a;return t}case 5:return null;default:Mx(e)}}var Kd=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Kd||{});function vs(e){let r=q(e),n=y.useRef(!1);y.useEffect(()=>(n.current=!1,()=>{n.current=!0,ga(()=>{n.current&&r()})}),[r])}let Ud=y.createContext(!1);function Rx(){return y.useContext(Ud)}function cc(e){return v.default.createElement(Ud.Provider,{value:e.force},e.children)}function Px(e){let r=Rx(),n=y.useContext(Xd),[t,o]=y.useState(()=>{var a;if(!r&&n!==null)return(a=n.current)!=null?a:null;if(Tt.isServer)return null;let i=e?.getElementById("headlessui-portal-root");if(i)return i;if(e===null)return null;let s=e.createElement("div");return s.setAttribute("id","headlessui-portal-root"),e.body.appendChild(s)});return y.useEffect(()=>{t!==null&&(e!=null&&e.body.contains(t)||e==null||e.body.appendChild(t))},[t,e]),y.useEffect(()=>{r||n!==null&&o(n.current)},[n,o,r]),t}let Qd=y.Fragment,Tx=ve(function(e,r){let{ownerDocument:n=null,...t}=e,o=y.useRef(null),a=Ae(Sw(p=>{o.current=p}),r),i=Kn(o),s=n??i,l=Px(s),c=y.useContext(Di),u=Cn(),d=xe();return vs(()=>{var p;l&&l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l))}),l?hr.createPortal(v.default.createElement("div",{"data-headlessui-portal":"",ref:p=>{u.dispose(),c&&p&&u.add(c.register(p))}},d({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:Qd,name:"Portal"})),l):null});function Ix(e,r){let n=Ae(r),{enabled:t=!0,ownerDocument:o,...a}=e,i=xe();return t?v.default.createElement(Tx,{...a,ownerDocument:o,ref:n}):i({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:Qd,name:"Portal"})}let Ox=y.Fragment,Xd=y.createContext(null);function Fx(e,r){let{target:n,...t}=e,o={ref:Ae(r)},a=xe();return v.default.createElement(Xd.Provider,{value:n},a({ourProps:o,theirProps:t,defaultTag:Ox,name:"Popover.Group"}))}let Di=y.createContext(null);function Lx(){let e=y.useContext(Di),r=y.useRef([]),n=q(a=>(r.current.push(a),e&&e.register(a),()=>t(a))),t=q(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),e&&e.unregister(a)}),o=y.useMemo(()=>({register:n,unregister:t,portals:r}),[n,t,r]);return[r,y.useMemo(()=>function({children:a}){return v.default.createElement(Di.Provider,{value:o},a)},[o])]}let zx=ve(Ix),Zd=ve(Fx),Jd=Object.assign(zx,{Group:Zd});const ho={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function ef(e){let r=e.getBoundingClientRect();return`${r.x},${r.y}`}function Nx(e,r,n){let t=Ye();if(r.kind==="Tracked"){let o=function(){a!==ef(e)&&(t.dispose(),n())},{position:a}=r,i=new ResizeObserver(o);i.observe(e),t.add(()=>i.disconnect()),t.addEventListener(window,"scroll",o,{passive:!0}),t.addEventListener(window,"resize",o)}return()=>t.dispose()}function Ax(e,r=typeof document<"u"?document.defaultView:null,n){let t=Fr(e,"escape");Yd(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===ke.Escape&&n(o))})}function jx(){var e;let[r]=y.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,t]=y.useState((e=r?.matches)!=null?e:!1);return pe(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),n}function Hx({defaultContainers:e=[],portals:r,mainTreeNode:n}={}){let t=Kn(n),o=q(()=>{var a,i;let s=[];for(let l of e)l!==null&&(It(l)?s.push(l):"current"in l&&It(l.current)&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=t?.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&It(l)&&l.id!=="headlessui-portal-root"&&(n&&(l.contains(n)||l.contains((i=n?.getRootNode())==null?void 0:i.host))||s.some(c=>l.contains(c))||s.push(l));return s});return{resolveContainers:o,contains:q(a=>o().some(i=>i.contains(a)))}}let tf=y.createContext(null);function uc({children:e,node:r}){let[n,t]=y.useState(null),o=nf(r??n);return v.default.createElement(tf.Provider,{value:o},e,o===null&&v.default.createElement($i,{features:No.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=kn(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&It(l)&&l!=null&&l.contains(a)){t(l);break}}}}))}function nf(e=null){var r;return(r=y.useContext(tf))!=null?r:e}function Yx(){let e=typeof document>"u";return"useSyncExternalStore"in v?(r=>r.useSyncExternalStore)(v)(()=>()=>{},()=>!1,()=>!e):!1}function _a(){let e=Yx(),[r,n]=v.useState(Tt.isHandoffComplete);return r&&Tt.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{r!==!0&&n(!0)},[r]),v.useEffect(()=>Tt.handoff(),[]),e?!1:r}function _s(){let e=y.useRef(!1);return pe(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var cr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(cr||{});function Vx(){let e=y.useRef(0);return jd(!0,"keydown",r=>{r.key==="Tab"&&(e.current=r.shiftKey?1:0)},!0),e}function rf(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let r=new Set;for(let n of e.current)It(n.current)&&r.add(n.current);return r}let Bx="div";var un=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(un||{});function Wx(e,r){let n=y.useRef(null),t=Ae(n,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=e;_a()||(s=0);let c=Kn(n);Ux(s,{ownerDocument:c});let u=Qx(s,{ownerDocument:c,container:n,initialFocus:o,initialFocusFallback:a});Xx(s,{ownerDocument:c,container:n,containers:i,previousActiveElement:u});let d=Vx(),p=q(w=>{if(!Be(n.current))return;let x=n.current;($=>$())(()=>{st(d.current,{[cr.Forwards]:()=>{Nn(x,nt.First,{skipElements:[w.relatedTarget,a]})},[cr.Backwards]:()=>{Nn(x,nt.Last,{skipElements:[w.relatedTarget,a]})}})})}),f=Fr(!!(s&2),"focus-trap#tab-lock"),g=Cn(),m=y.useRef(!1),h={ref:t,onKeyDown(w){w.key=="Tab"&&(m.current=!0,g.requestAnimationFrame(()=>{m.current=!1}))},onBlur(w){if(!(s&4))return;let x=rf(i);Be(n.current)&&x.add(n.current);let $=w.relatedTarget;vt($)&&$.dataset.headlessuiFocusGuard!=="true"&&(of(x,$)||(m.current?Nn(n.current,st(d.current,{[cr.Forwards]:()=>nt.Next,[cr.Backwards]:()=>nt.Previous})|nt.WrapAround,{relativeTo:w.target}):vt(w.target)&&bt(w.target)))}},b=xe();return v.default.createElement(v.default.Fragment,null,f&&v.default.createElement($i,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:No.Focusable}),b({ourProps:h,theirProps:l,defaultTag:Bx,name:"FocusTrap"}),f&&v.default.createElement($i,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:No.Focusable}))}let Gx=ve(Wx),qx=Object.assign(Gx,{features:un});function Kx(e=!0){let r=y.useRef(Wt.slice());return ms(([n],[t])=>{t===!0&&n===!1&&ga(()=>{r.current.splice(0)}),t===!1&&n===!0&&(r.current=Wt.slice())},[e,Wt,r]),q(()=>{var n;return(n=r.current.find(t=>t!=null&&t.isConnected))!=null?n:null})}function Ux(e,{ownerDocument:r}){let n=!!(e&8),t=Kx(n);ms(()=>{n||r?.activeElement===r?.body&&bt(t())},[n]),vs(()=>{n&&bt(t())})}function Qx(e,{ownerDocument:r,container:n,initialFocus:t,initialFocusFallback:o}){let a=y.useRef(null),i=Fr(!!(e&1),"focus-trap#initial-focus"),s=_s();return ms(()=>{if(e===0)return;if(!i){o!=null&&o.current&&bt(o.current);return}let l=n.current;l&&ga(()=>{if(!s.current)return;let c=r?.activeElement;if(t!=null&&t.current){if(t?.current===c){a.current=c;return}}else if(l.contains(c)){a.current=c;return}if(t!=null&&t.current)bt(t.current);else{if(e&16){if(Nn(l,nt.First|nt.AutoFocus)!==Ci.Error)return}else if(Nn(l,nt.First)!==Ci.Error)return;if(o!=null&&o.current&&(bt(o.current),r?.activeElement===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=r?.activeElement})},[o,i,e]),a}function Xx(e,{ownerDocument:r,container:n,containers:t,previousActiveElement:o}){let a=_s(),i=!!(e&4);Yd(r?.defaultView,"focus",s=>{if(!i||!a.current)return;let l=rf(t);Be(n.current)&&l.add(n.current);let c=o.current;if(!c)return;let u=s.target;Be(u)?of(l,u)?(o.current=u,bt(u)):(s.preventDefault(),s.stopPropagation(),bt(c)):bt(o.current)},!0)}function of(e,r){for(let n of e)if(n.contains(r))return!0;return!1}function af(e){var r;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!pr((r=e.as)!=null?r:lf)||v.default.Children.count(e.children)===1}let ba=y.createContext(null);ba.displayName="TransitionContext";var Zx=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Zx||{});function Jx(){let e=y.useContext(ba);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function eS(){let e=y.useContext(ya);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let ya=y.createContext(null);ya.displayName="NestingContext";function wa(e){return"children"in e?wa(e.children):e.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function sf(e,r){let n=Dn(e),t=y.useRef([]),o=_s(),a=Cn(),i=q((f,g=Gt.Hidden)=>{let m=t.current.findIndex(({el:h})=>h===f);m!==-1&&(st(g,{[Gt.Unmount](){t.current.splice(m,1)},[Gt.Hidden](){t.current[m].state="hidden"}}),a.microTask(()=>{var h;!wa(t)&&o.current&&((h=n.current)==null||h.call(n))}))}),s=q(f=>{let g=t.current.find(({el:m})=>m===f);return g?g.state!=="visible"&&(g.state="visible"):t.current.push({el:f,state:"visible"}),()=>i(f,Gt.Unmount)}),l=y.useRef([]),c=y.useRef(Promise.resolve()),u=y.useRef({enter:[],leave:[]}),d=q((f,g,m)=>{l.current.splice(0),r&&(r.chains.current[g]=r.chains.current[g].filter(([h])=>h!==f)),r?.chains.current[g].push([f,new Promise(h=>{l.current.push(h)})]),r?.chains.current[g].push([f,new Promise(h=>{Promise.all(u.current[g].map(([b,w])=>w)).then(()=>h())})]),g==="enter"?c.current=c.current.then(()=>r?.wait.current).then(()=>m(g)):m(g)}),p=q((f,g,m)=>{Promise.all(u.current[g].splice(0).map(([h,b])=>b)).then(()=>{var h;(h=l.current.shift())==null||h()}).then(()=>m(g))});return y.useMemo(()=>({children:t,register:s,unregister:i,onStart:d,onStop:p,wait:c,chains:u}),[s,i,t,d,p,u,c])}let lf=y.Fragment,cf=qn.RenderStrategy;function tS(e,r){var n,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:c,enterFrom:u,enterTo:d,entered:p,leave:f,leaveFrom:g,leaveTo:m,...h}=e,[b,w]=y.useState(null),x=y.useRef(null),$=af(e),C=Ae(...$?[x,r,w]:r===null?[]:[r]),k=(n=h.unmount)==null||n?Gt.Unmount:Gt.Hidden,{show:E,appear:P,initial:z}=Jx(),[L,O]=y.useState(E?"visible":"hidden"),T=eS(),{register:I,unregister:j}=T;pe(()=>I(x),[I,x]),pe(()=>{if(k===Gt.Hidden&&x.current){if(E&&L!=="visible"){O("visible");return}return st(L,{hidden:()=>j(x),visible:()=>I(x)})}},[L,x,I,j,E,k]);let N=_a();pe(()=>{if($&&N&&L==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,L,N,$]);let A=z&&!P,F=P&&E&&z,D=y.useRef(!1),M=sf(()=>{D.current||(O("hidden"),j(x))},T),V=q(Z=>{D.current=!0;let G=Z?"enter":"leave";M.onStart(x,G,ae=>{ae==="enter"?a?.():ae==="leave"&&s?.()})}),H=q(Z=>{let G=Z?"enter":"leave";D.current=!1,M.onStop(x,G,ae=>{ae==="enter"?i?.():ae==="leave"&&l?.()}),G==="leave"&&!wa(M)&&(O("hidden"),j(x))});y.useEffect(()=>{$&&o||(V(E),H(E))},[E,$,o]);let te=!(!o||!$||!N||A),[,Q]=Wd(te,b,E,{start:V,end:H}),X=cn({ref:C,className:((t=Si(h.className,F&&c,F&&u,Q.enter&&c,Q.enter&&Q.closed&&u,Q.enter&&!Q.closed&&d,Q.leave&&f,Q.leave&&!Q.closed&&g,Q.leave&&Q.closed&&m,!Q.transition&&E&&p))==null?void 0:t.trim())||void 0,...Bd(Q)}),J=0;L==="visible"&&(J|=Ne.Open),L==="hidden"&&(J|=Ne.Closed),E&&L==="hidden"&&(J|=Ne.Opening),!E&&L==="visible"&&(J|=Ne.Closing);let W=xe();return v.default.createElement(ya.Provider,{value:M},v.default.createElement(qd,{value:J},W({ourProps:X,theirProps:h,defaultTag:lf,features:cf,visible:L==="visible",name:"Transition.Child"})))}function nS(e,r){let{show:n,appear:t=!1,unmount:o=!0,...a}=e,i=y.useRef(null),s=af(e),l=Ae(...s?[i,r]:r===null?[]:[r]);_a();let c=Lr();if(n===void 0&&c!==null&&(n=(c&Ne.Open)===Ne.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,d]=y.useState(n?"visible":"hidden"),p=sf(()=>{n||d("hidden")}),[f,g]=y.useState(!0),m=y.useRef([n]);pe(()=>{f!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),g(!1))},[m,n]);let h=y.useMemo(()=>({show:n,appear:t,initial:f}),[n,t,f]);pe(()=>{n?d("visible"):!wa(p)&&i.current!==null&&d("hidden")},[n,p]);let b={unmount:o},w=q(()=>{var C;f&&g(!1),(C=e.beforeEnter)==null||C.call(e)}),x=q(()=>{var C;f&&g(!1),(C=e.beforeLeave)==null||C.call(e)}),$=xe();return v.default.createElement(ya.Provider,{value:p},v.default.createElement(ba.Provider,{value:h},$({ourProps:{...b,as:y.Fragment,children:v.default.createElement(uf,{ref:l,...b,...a,beforeEnter:w,beforeLeave:x})},theirProps:{},defaultTag:y.Fragment,features:cf,visible:u==="visible",name:"Transition"})))}function rS(e,r){let n=y.useContext(ba)!==null,t=Lr()!==null;return v.default.createElement(v.default.Fragment,null,!n&&t?v.default.createElement(Ei,{ref:r,...e}):v.default.createElement(uf,{ref:r,...e}))}let Ei=ve(nS),uf=ve(tS),bs=ve(rS),oS=Object.assign(Ei,{Child:bs,Root:Ei});var aS=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(aS||{}),iS=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(iS||{});let sS={0(e,r){return e.titleId===r.id?e:{...e,titleId:r.id}}},ys=y.createContext(null);ys.displayName="DialogContext";function xa(e){let r=y.useContext(ys);if(r===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,xa),n}return r}function lS(e,r){return st(r.type,sS,e,r)}let dc=ve(function(e,r){let n=y.useId(),{id:t=`headlessui-dialog-${n}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:c=!1,unmount:u=!1,...d}=e,p=y.useRef(!1);s=(function(){return s==="dialog"||s==="alertdialog"?s:(p.current||(p.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let f=Lr();o===void 0&&f!==null&&(o=(f&Ne.Open)===Ne.Open);let g=y.useRef(null),m=Ae(g,r),h=Kn(g),b=o?0:1,[w,x]=y.useReducer(lS,{titleId:null,descriptionId:null,panelRef:y.createRef()}),$=q(()=>a(!1)),C=q(Q=>x({type:0,id:Q})),k=_a()?b===0:!1,[E,P]=Lx(),z={get current(){var Q;return(Q=w.panelRef.current)!=null?Q:g.current}},L=nf(),{resolveContainers:O}=Hx({mainTreeNode:L,portals:E,defaultContainers:[z]}),T=f!==null?(f&Ne.Closing)===Ne.Closing:!1;Od(c||T?!1:k,{allowed:q(()=>{var Q,X;return[(X=(Q=g.current)==null?void 0:Q.closest("[data-headlessui-portal]"))!=null?X:null]}),disallowed:q(()=>{var Q;return[(Q=L?.closest("body > *:not(#headlessui-portal-root)"))!=null?Q:null]})});let I=ha.get(null);pe(()=>{if(k)return I.actions.push(t),()=>I.actions.pop(t)},[I,t,k]);let j=Je(I,y.useCallback(Q=>I.selectors.isTop(Q,t),[I,t]));Hd(j,O,Q=>{Q.preventDefault(),$()}),Ax(j,h?.defaultView,Q=>{Q.preventDefault(),Q.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Vd(c||T?!1:k,h,O),Fd(k,g,$);let[N,A]=Cd(),F=y.useMemo(()=>[{dialogState:b,close:$,setTitleId:C,unmount:u},w],[b,$,C,u,w]),D=xt({open:b===0}),M={ref:m,id:t,role:s,tabIndex:-1,"aria-modal":c?void 0:b===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":N,unmount:u},V=!jx(),H=un.None;k&&!c&&(H|=un.RestoreFocus,H|=un.TabLock,l&&(H|=un.AutoFocus),V&&(H|=un.InitialFocus));let te=xe();return v.default.createElement(Dx,null,v.default.createElement(cc,{force:!0},v.default.createElement(Jd,null,v.default.createElement(ys.Provider,{value:F},v.default.createElement(Zd,{target:g},v.default.createElement(cc,{force:!1},v.default.createElement(A,{slot:D},v.default.createElement(P,null,v.default.createElement(qx,{initialFocus:i,initialFocusFallback:g,containers:O,features:H},v.default.createElement(Iw,{value:$},te({ourProps:M,theirProps:d,slot:D,defaultTag:cS,features:uS,visible:b===0,name:"Dialog"})))))))))))}),cS="div",uS=qn.RenderStrategy|qn.Static;function dS(e,r){let{transition:n=!1,open:t,...o}=e,a=Lr(),i=e.hasOwnProperty("open")||a!==null,s=e.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(t!==void 0||n)&&!o.static?v.default.createElement(uc,null,v.default.createElement(oS,{show:t,transition:n,unmount:o.unmount},v.default.createElement(dc,{ref:r,...o}))):v.default.createElement(uc,null,v.default.createElement(dc,{ref:r,open:t,...o}))}let fS="div";function pS(e,r){let n=y.useId(),{id:t=`headlessui-dialog-panel-${n}`,transition:o=!1,...a}=e,[{dialogState:i,unmount:s},l]=xa("Dialog.Panel"),c=Ae(r,l.panelRef),u=xt({open:i===0}),d=q(h=>{h.stopPropagation()}),p={ref:c,id:t,onClick:d},f=o?bs:y.Fragment,g=o?{unmount:s}:{},m=xe();return v.default.createElement(f,{...g},m({ourProps:p,theirProps:a,slot:u,defaultTag:fS,name:"Dialog.Panel"}))}let gS="div";function mS(e,r){let{transition:n=!1,...t}=e,[{dialogState:o,unmount:a}]=xa("Dialog.Backdrop"),i=xt({open:o===0}),s={ref:r,"aria-hidden":!0},l=n?bs:y.Fragment,c=n?{unmount:a}:{},u=xe();return v.default.createElement(l,{...c},u({ourProps:s,theirProps:t,slot:i,defaultTag:gS,name:"Dialog.Backdrop"}))}let hS="h2";function vS(e,r){let n=y.useId(),{id:t=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:a,setTitleId:i}]=xa("Dialog.Title"),s=Ae(r);y.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=xt({open:a===0}),c={ref:s,id:t};return xe()({ourProps:c,theirProps:o,slot:l,defaultTag:hS,name:"Dialog.Title"})}let _S=ve(dS),df=ve(pS),bS=ve(mS),yS=ve(vS),ff=Object.assign(_S,{Panel:df,Title:yS,Description:Dw}),fc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function pc(e){var r,n;let t=(r=e.innerText)!=null?r:"",o=e.cloneNode(!0);if(!Be(o))return t;let a=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),a=!0;let i=a?(n=o.innerText)!=null?n:"":t;return fc.test(i)&&(i=i.replace(fc,"")),i}function wS(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let n=e.getAttribute("aria-labelledby");if(n){let t=n.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():pc(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return pc(e).trim()}function xS(e){let r=y.useRef(""),n=y.useRef("");return q(()=>{let t=e.current;if(!t)return"";let o=t.innerText;if(r.current===o)return n.current;let a=wS(t).trim().toLowerCase();return r.current=o,n.current=a,a})}var SS=Object.defineProperty,$S=(e,r,n)=>r in e?SS(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,gc=(e,r,n)=>($S(e,typeof r!="symbol"?r+"":r,n),n),Ie=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ie||{}),jo=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(jo||{}),ue=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e[e.MarkButtonAsMoved=10]="MarkButtonAsMoved",e))(ue||{});function mc(e,r=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,t=Nd(r(e.items.slice()),a=>a.dataRef.current.domRef.current),o=n?t.indexOf(n):null;return o===-1&&(o=null),{items:t,activeItemIndex:o}}let kS={1(e){if(e.menuState===1)return e;let r=e.buttonElement?ho.Tracked(ef(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:we.Nothing},menuState:1,buttonPositionState:r}},0(e,r){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:r.focus,menuState:0,buttonPositionState:ho.Idle}},2:(e,r)=>{var n,t,o,a,i;if(e.menuState===1)return e;let s={...e,searchQuery:"",activationTrigger:(n=r.trigger)!=null?n:1,__demoMode:!1};if(r.focus===we.Nothing)return{...s,activeItemIndex:null};if(r.focus===we.Specific)return{...s,activeItemIndex:e.items.findIndex(u=>u.id===r.id)};if(r.focus===we.Previous){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,p=ro(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(p!==null){let f=e.items[p].dataRef.current.domRef;if(((t=d.current)==null?void 0:t.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeItemIndex:p}}}}else if(r.focus===we.Next){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,p=ro(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(p!==null){let f=e.items[p].dataRef.current.domRef;if(((a=d.current)==null?void 0:a.nextElementSibling)===f.current||((i=f.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeItemIndex:p}}}}let l=mc(e),c=ro(r,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...s,...l,activeItemIndex:c}},3:(e,r)=>{let n=e.searchQuery!==""?0:1,t=e.searchQuery+r.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(i=>{var s;return((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(t))&&!i.dataRef.current.disabled}),a=o?e.items.indexOf(o):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:t}:{...e,searchQuery:t,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,r)=>{let n=e.items.concat(r.items.map(o=>o)),t=e.activeItemIndex;return e.pendingFocus.focus!==we.Nothing&&(t=ro(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),{...e,items:n,activeItemIndex:t,pendingFocus:{focus:we.Nothing},pendingShouldSort:!0}},6:(e,r)=>{let n=e.items,t=[],o=new Set(r.items);for(let[a,i]of n.entries())if(o.has(i.id)&&(t.push(a),o.delete(i.id),o.size===0))break;if(t.length>0){n=n.slice();for(let a of t.reverse())n.splice(a,1)}return{...e,items:n,activationTrigger:1}},7:(e,r)=>e.buttonElement===r.element?e:{...e,buttonElement:r.element},8:(e,r)=>e.itemsElement===r.element?e:{...e,itemsElement:r.element},9:e=>e.pendingShouldSort?{...e,...mc(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:ho.Moved}}};class ws extends Rd{constructor(r){super(r),gc(this,"actions",{registerItem:Kl(()=>{let n=[],t=new Set;return[(o,a)=>{t.has(a)||(t.add(a),n.push({id:o,dataRef:a}))},()=>(t.clear(),this.send({type:5,items:n.splice(0)}))]}),unregisterItem:Kl(()=>{let n=[];return[t=>n.push(t),()=>this.send({type:6,items:n.splice(0)})]})}),gc(this,"selectors",{activeDescendantId(n){var t;let o=n.activeItemIndex,a=n.items;return o===null||(t=a[o])==null?void 0:t.id},isActive(n,t){var o;let a=n.activeItemIndex,i=n.items;return a!==null?((o=i[a])==null?void 0:o.id)===t:!1},shouldScrollIntoView(n,t){return n.__demoMode||n.menuState!==0||n.activationTrigger===0?!1:this.isActive(n,t)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let n=this.state.id,t=ha.get(null);this.disposables.add(t.on(Td.Push,o=>{!t.selectors.isTop(o,n)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>t.actions.push(n)),this.on(1,()=>t.actions.pop(n))}this.disposables.group(n=>{this.on(1,t=>{t.buttonElement&&(n.dispose(),n.add(Nx(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:r,__demoMode:n=!1}){return new ws({id:r,__demoMode:n,menuState:n?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:we.Nothing},buttonPositionState:ho.Idle})}reduce(r,n){return st(n.type,kS,r,n)}}const pf=y.createContext(null);function xs(e){let r=y.useContext(pf);if(r===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gf),n}return r}function gf({id:e,__demoMode:r=!1}){let n=y.useMemo(()=>ws.new({id:e,__demoMode:r}),[]);return vs(()=>n.dispose()),n}let CS=y.Fragment;function DS(e,r){let n=y.useId(),{__demoMode:t=!1,...o}=e,a=gf({id:n,__demoMode:t}),[i,s,l]=Je(a,h=>[h.menuState,h.itemsElement,h.buttonElement]),c=Ae(r),u=ha.get(null),d=Je(u,y.useCallback(h=>u.selectors.isTop(h,n),[u,n]));Hd(d,[l,s],(h,b)=>{var w;a.send({type:ue.CloseMenu}),gs(b,ps.Loose)||(h.preventDefault(),(w=a.state.buttonElement)==null||w.focus())});let p=q(()=>{a.send({type:ue.CloseMenu})}),f=xt({open:i===Ie.Open,close:p}),g={ref:c},m=xe();return v.default.createElement($x,null,v.default.createElement(pf.Provider,{value:a},v.default.createElement(qd,{value:st(i,{[Ie.Open]:Ne.Open,[Ie.Closed]:Ne.Closed})},m({ourProps:g,theirProps:o,slot:f,defaultTag:CS,name:"Menu"}))))}let ES="button";function MS(e,r){let n=xs("Menu.Button"),t=y.useId(),{id:o=`headlessui-menu-button-${t}`,disabled:a=!1,autoFocus:i=!1,...s}=e,l=y.useRef(null),c=wx(),u=Ae(r,l,yx(),q(I=>n.send({type:ue.SetButtonElement,element:I}))),d=q(I=>{switch(I.key){case ke.Space:case ke.Enter:case ke.ArrowDown:I.preventDefault(),I.stopPropagation(),n.send({type:ue.OpenMenu,focus:{focus:we.First}});break;case ke.ArrowUp:I.preventDefault(),I.stopPropagation(),n.send({type:ue.OpenMenu,focus:{focus:we.Last}});break}}),p=q(I=>{I.key===ke.Space&&I.preventDefault()}),[f,g,m]=Je(n,I=>[I.menuState,I.buttonElement,I.itemsElement]),h=f===Ie.Open;rx(h,{trigger:g,action:y.useCallback(I=>{if(g!=null&&g.contains(I.target))return no.Ignore;let j=I.target.closest('[role="menuitem"]:not([data-disabled])');return Be(j)?no.Select(j):m!=null&&m.contains(I.target)?no.Ignore:no.Close},[g,m]),close:y.useCallback(()=>n.send({type:ue.CloseMenu}),[]),select:y.useCallback(I=>I.click(),[])});let b=q(I=>{var j;if(I.button===Kd.Left){if(ww(I.currentTarget))return I.preventDefault();a||(f===Ie.Open?(hr.flushSync(()=>n.send({type:ue.CloseMenu})),(j=l.current)==null||j.focus({preventScroll:!0})):(I.preventDefault(),n.send({type:ue.OpenMenu,focus:{focus:we.Nothing},trigger:jo.Pointer})))}}),w=y.useRef(null),x=q(I=>{w.current=I.pointerType,I.pointerType==="mouse"&&b(I)}),$=q(I=>{w.current!=="mouse"&&b(I)}),{isFocusVisible:C,focusProps:k}=ew({autoFocus:i}),{isHovered:E,hoverProps:P}=J0({isDisabled:a}),{pressed:z,pressProps:L}=iw({disabled:a}),O=xt({open:f===Ie.Open,active:z||f===Ie.Open,disabled:a,hover:E,focus:C,autofocus:i}),T=yd(c(),{ref:u,id:o,type:ox(e,l.current),"aria-haspopup":"menu","aria-controls":m?.id,"aria-expanded":f===Ie.Open,disabled:a||void 0,autoFocus:i,onKeyDown:d,onKeyUp:p,onPointerDown:x,onClick:$},k,P,L);return xe()({ourProps:T,theirProps:s,slot:O,defaultTag:ES,name:"Menu.Button"})}let RS="div",PS=qn.RenderStrategy|qn.Static;function TS(e,r){let n=y.useId(),{id:t=`headlessui-menu-items-${n}`,anchor:o,portal:a=!1,modal:i=!0,transition:s=!1,...l}=e,c=bx(o),u=xs("Menu.Items"),[d,p]=Sx(c),f=xx(),[g,m]=y.useState(null),h=Ae(r,c?d:null,q(D=>u.send({type:ue.SetItemsElement,element:D})),m),[b,w]=Je(u,D=>[D.menuState,D.buttonElement]),x=Kn(w),$=Kn(g);c&&(a=!0);let C=Lr(),[k,E]=Wd(s,g,C!==null?(C&Ne.Open)===Ne.Open:b===Ie.Open);Fd(k,w,()=>{u.send({type:ue.CloseMenu})});let P=Je(u,D=>D.__demoMode),z=P?!1:i&&b===Ie.Open;Vd(z,$);let L=P?!1:i&&b===Ie.Open;Od(L,{allowed:y.useCallback(()=>[w,g],[w,g])});let O=Je(u,u.selectors.didButtonMove)?!1:k;y.useEffect(()=>{let D=g;D&&b===Ie.Open&&D!==$?.activeElement&&D.focus({preventScroll:!0})},[b,g,$]),_x(b===Ie.Open,{container:g,accept(D){return D.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:D.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(D){D.setAttribute("role","none")}});let T=Cn(),I=q(D=>{var M,V,H;switch(T.dispose(),D.key){case ke.Space:if(u.state.searchQuery!=="")return D.preventDefault(),D.stopPropagation(),u.send({type:ue.Search,value:D.key});case ke.Enter:if(D.preventDefault(),D.stopPropagation(),u.state.activeItemIndex!==null){let{dataRef:te}=u.state.items[u.state.activeItemIndex];(V=(M=te.current)==null?void 0:M.domRef.current)==null||V.click()}u.send({type:ue.CloseMenu}),zd(u.state.buttonElement);break;case ke.ArrowDown:return D.preventDefault(),D.stopPropagation(),u.send({type:ue.GoToItem,focus:we.Next});case ke.ArrowUp:return D.preventDefault(),D.stopPropagation(),u.send({type:ue.GoToItem,focus:we.Previous});case ke.Home:case ke.PageUp:return D.preventDefault(),D.stopPropagation(),u.send({type:ue.GoToItem,focus:we.First});case ke.End:case ke.PageDown:return D.preventDefault(),D.stopPropagation(),u.send({type:ue.GoToItem,focus:we.Last});case ke.Escape:D.preventDefault(),D.stopPropagation(),hr.flushSync(()=>u.send({type:ue.CloseMenu})),(H=u.state.buttonElement)==null||H.focus({preventScroll:!0});break;case ke.Tab:D.preventDefault(),D.stopPropagation(),hr.flushSync(()=>u.send({type:ue.CloseMenu})),Jw(u.state.buttonElement,D.shiftKey?nt.Previous:nt.Next);break;default:D.key.length===1&&(u.send({type:ue.Search,value:D.key}),T.setTimeout(()=>u.send({type:ue.ClearSearch}),350));break}}),j=q(D=>{D.key===ke.Space&&D.preventDefault()}),N=xt({open:b===Ie.Open}),A=yd(c?f():{},{"aria-activedescendant":Je(u,u.selectors.activeDescendantId),"aria-labelledby":Je(u,D=>{var M;return(M=D.buttonElement)==null?void 0:M.id}),id:t,onKeyDown:I,onKeyUp:j,role:"menu",tabIndex:b===Ie.Open?0:void 0,ref:h,style:{...l.style,...p,"--button-width":Ow(k,w,!0).width},...Bd(E)}),F=xe();return v.default.createElement(Jd,{enabled:a?e.static||k:!1,ownerDocument:x},F({ourProps:A,theirProps:l,slot:N,defaultTag:RS,features:PS,visible:O,name:"Menu.Items"}))}let IS=y.Fragment;function OS(e,r){let n=y.useId(),{id:t=`headlessui-menu-item-${n}`,disabled:o=!1,...a}=e,i=xs("Menu.Item"),s=Je(i,O=>i.selectors.isActive(O,t)),l=y.useRef(null),c=Ae(r,l),u=Je(i,O=>i.selectors.shouldScrollIntoView(O,t));pe(()=>{if(u)return Ye().requestAnimationFrame(()=>{var O,T;(T=(O=l.current)==null?void 0:O.scrollIntoView)==null||T.call(O,{block:"nearest"})})},[u,l]);let d=xS(l),p=y.useRef({disabled:o,domRef:l,get textValue(){return d()}});pe(()=>{p.current.disabled=o},[p,o]),pe(()=>(i.actions.registerItem(t,p),()=>i.actions.unregisterItem(t)),[p,t]);let f=q(()=>{i.send({type:ue.CloseMenu})}),g=q(O=>{if(o)return O.preventDefault();i.send({type:ue.CloseMenu}),zd(i.state.buttonElement)}),m=q(()=>{if(o)return i.send({type:ue.GoToItem,focus:we.Nothing});i.send({type:ue.GoToItem,focus:we.Specific,id:t})}),h=fx(),b=q(O=>h.update(O)),w=q(O=>{h.wasMoved(O)&&(o||s||i.send({type:ue.GoToItem,focus:we.Specific,id:t,trigger:jo.Pointer}))}),x=q(O=>{h.wasMoved(O)&&(o||s&&i.state.activationTrigger===jo.Pointer&&i.send({type:ue.GoToItem,focus:we.Nothing}))}),[$,C]=Dd(),[k,E]=Cd(),P=xt({active:s,focus:s,disabled:o,close:f}),z={id:t,ref:c,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-labelledby":$,"aria-describedby":k,disabled:void 0,onClick:g,onFocus:m,onPointerEnter:b,onMouseEnter:b,onPointerMove:w,onMouseMove:w,onPointerLeave:x,onMouseLeave:x},L=xe();return v.default.createElement(C,null,v.default.createElement(E,null,L({ourProps:z,theirProps:a,slot:P,defaultTag:IS,name:"Menu.Item"})))}let FS="div";function LS(e,r){let[n,t]=Dd(),o=e,a={ref:r,"aria-labelledby":n,role:"group"},i=xe();return v.default.createElement(t,null,i({ourProps:a,theirProps:o,slot:{},defaultTag:FS,name:"Menu.Section"}))}let zS="header";function NS(e,r){let n=y.useId(),{id:t=`headlessui-menu-heading-${n}`,...o}=e,a=fs();pe(()=>a.register(t),[t,a.register]);let i={id:t,ref:r,role:"presentation",...a.props};return xe()({ourProps:i,theirProps:o,slot:{},defaultTag:zS,name:"Menu.Heading"})}let AS="div";function jS(e,r){let n=e,t={ref:r,role:"separator"};return xe()({ourProps:t,theirProps:n,slot:{},defaultTag:AS,name:"Menu.Separator"})}let HS=ve(DS),Mi=ve(MS),mf=ve(TS),YS=ve(OS),VS=ve(LS),BS=ve(NS),WS=ve(jS),hf=Object.assign(HS,{Button:Mi,Items:mf,Item:YS,Section:VS,Heading:BS,Separator:WS});const GS=R.keyframes`
|
|
1743
1720
|
to {
|
|
1744
1721
|
opacity: 1;
|
|
1745
1722
|
transform: translate3d(0, 0, 0);
|
|
1746
1723
|
}
|
|
1747
|
-
`,
|
|
1724
|
+
`,qS=S.default.div`
|
|
1748
1725
|
background-color: var(--cc_color_background_1);
|
|
1749
1726
|
padding: var(--cc_size_spacing_s);
|
|
1750
1727
|
border-radius: var(--cc_size_border_radius_l);
|
|
@@ -1756,9 +1733,9 @@
|
|
|
1756
1733
|
|
|
1757
1734
|
/* animation */
|
|
1758
1735
|
opacity: 0;
|
|
1759
|
-
transform: ${e=>
|
|
1760
|
-
animation: ${
|
|
1761
|
-
${
|
|
1736
|
+
transform: ${e=>Ni({placement:e.$placement,offset:Mc})};
|
|
1737
|
+
animation: ${GS} ${_e.duration.fast} forwards
|
|
1738
|
+
${_e.easeOut};
|
|
1762
1739
|
@media (prefers-reduced-motion) {
|
|
1763
1740
|
animation: none;
|
|
1764
1741
|
opacity: 1;
|
|
@@ -1768,24 +1745,24 @@
|
|
|
1768
1745
|
.dark-environment & {
|
|
1769
1746
|
background-color: var(--cc_color_background_2);
|
|
1770
1747
|
}
|
|
1771
|
-
`,
|
|
1748
|
+
`,KS=S.default(mf)`
|
|
1772
1749
|
border-radius: var(--cc_size_border_radius_l);
|
|
1773
1750
|
&:focus-visible {
|
|
1774
1751
|
outline: none;
|
|
1775
1752
|
}
|
|
1776
|
-
`,
|
|
1753
|
+
`,US=({triggerButton:e,children:r,tooltip:n,mountNodeId:t,placement:o="bottom-end",open:a,...i})=>{const{refs:s,floatingStyles:l,context:c}=Pr({whileElementsMounted:Mr,placement:o,middleware:[Qn(Dr),Rr(),Jo({limiter:vg()})]}),[u,d]=y.useState(!0);return y.useEffect(()=>{d(!a)},[a]),_.jsxs(_.Fragment,{children:[n?_.jsx(Xi,{showOnFocus:u,delay:2e3,ref:s.setReference,title:n,children:_.jsx(Mi,{as:y.Fragment,children:e})}):_.jsx(Mi,{as:y.Fragment,ref:s.setReference,children:e}),a&&_.jsx(ra,{id:t||void 0,children:_.jsx(KS,{modal:!1,ref:s.setFloating,style:l,children:_.jsx(qS,{...i,$placement:c.placement,children:r})})})]})},QS=e=>_.jsx(hf,{children:({open:r})=>_.jsx(US,{...e,open:r})}),XS=S.default.h3`
|
|
1777
1754
|
all: initial;
|
|
1778
1755
|
display: block;
|
|
1779
|
-
${
|
|
1756
|
+
${et}
|
|
1780
1757
|
color: var(--cc_color_text_nonessential);
|
|
1781
1758
|
font-size: var(--cc_size_text_xs);
|
|
1782
1759
|
text-transform: uppercase;
|
|
1783
1760
|
font-weight: 600;
|
|
1784
1761
|
margin: calc(var(--cc_size_spacing_s) * 1.25) var(--cc_size_spacing_s)
|
|
1785
1762
|
calc(var(--cc_size_spacing_s) * 0.75);
|
|
1786
|
-
`;function
|
|
1787
|
-
${
|
|
1788
|
-
${
|
|
1763
|
+
`;function ZS({...e}){return _.jsx(XS,{...e,"aria-hidden":"true"})}const JS=S.default.button`
|
|
1764
|
+
${tn}
|
|
1765
|
+
${et}
|
|
1789
1766
|
width: 100%;
|
|
1790
1767
|
display: flex;
|
|
1791
1768
|
align-items: center;
|
|
@@ -1797,34 +1774,34 @@
|
|
|
1797
1774
|
background-color: ${({$active:e})=>e?"var(--cc_color_button_background_subtle)":"transparent"};
|
|
1798
1775
|
color: var(--cc_color_link_secondary);
|
|
1799
1776
|
border-radius: var(--cc_size_border_radius_l);
|
|
1800
|
-
${e=>e.disabled?
|
|
1801
|
-
`,
|
|
1777
|
+
${e=>e.disabled?tt:null}
|
|
1778
|
+
`,e$=S.default.i`
|
|
1802
1779
|
font-size: var(--cc_size_text_m);
|
|
1803
1780
|
line-height: 1;
|
|
1804
|
-
`,
|
|
1781
|
+
`,t$=S.default.span`
|
|
1805
1782
|
flex: 1;
|
|
1806
1783
|
overflow: hidden;
|
|
1807
1784
|
text-overflow: ellipsis;
|
|
1808
1785
|
white-space: nowrap;
|
|
1809
|
-
`,
|
|
1786
|
+
`,n$=S.default.span`
|
|
1810
1787
|
flex: 1;
|
|
1811
1788
|
display: flex;
|
|
1812
1789
|
align-items: center;
|
|
1813
1790
|
min-width: 0;
|
|
1814
1791
|
gap: var(--cc_size_spacing_s);
|
|
1815
|
-
`,
|
|
1792
|
+
`,r$=S.default.span`
|
|
1816
1793
|
flex-shrink: 0;
|
|
1817
1794
|
display: flex;
|
|
1818
1795
|
align-items: center;
|
|
1819
|
-
`;function
|
|
1796
|
+
`;function o$({children:e,iconName:r,contentAfter:n,href:t,disabled:o,...a}){return _.jsx(hf.Item,{disabled:o,children:({active:i,disabled:s})=>_.jsxs(JS,{as:t?"a":"button",href:t,$active:i,disabled:s,...a,children:[_.jsxs(n$,{children:[r?_.jsx(e$,{className:`mdi mdi-${r}`,role:"presentation"}):null,_.jsx(t$,{children:e})]}),n?_.jsx(r$,{children:n}):null]})})}const a$=R.css`
|
|
1820
1797
|
white-space: nowrap;
|
|
1821
1798
|
text-overflow: ellipsis;
|
|
1822
1799
|
overflow: hidden;
|
|
1823
|
-
`,
|
|
1800
|
+
`,hc=S.default.div`
|
|
1824
1801
|
display: flex;
|
|
1825
1802
|
flex-direction: column;
|
|
1826
1803
|
align-items: ${({$isLoading:e})=>e?"center":"flex-start"};
|
|
1827
|
-
${({$isLoading:e})=>e?
|
|
1804
|
+
${({$isLoading:e})=>e?R.css`
|
|
1828
1805
|
justify-content: center;
|
|
1829
1806
|
`:null}
|
|
1830
1807
|
gap: var(--cc_size_spacing_s);
|
|
@@ -1838,69 +1815,69 @@
|
|
|
1838
1815
|
.dark-environment & {
|
|
1839
1816
|
background-color: ${({$color:e})=>{switch(e){case"success":return"var(--cc_color_utility_success_alpha_20)";case"warning":return"var(--cc_color_utility_caution_alpha_20)";case"danger":return"var(--cc_color_utility_destroy_alpha_20)";default:return"var(--cc_color_background_2)"}}};
|
|
1840
1817
|
}
|
|
1841
|
-
`,
|
|
1818
|
+
`,i$=S.default.span`
|
|
1842
1819
|
display: flex;
|
|
1843
1820
|
align-items: center;
|
|
1844
1821
|
justify-content: center;
|
|
1845
1822
|
gap: var(--cc_size_spacing_xs);
|
|
1846
|
-
`,
|
|
1823
|
+
`,s$=S.default.i`
|
|
1847
1824
|
font-size: var(--cc_size_text_m);
|
|
1848
1825
|
color: var(--cc_color_text_nonessential);
|
|
1849
|
-
`,
|
|
1850
|
-
${
|
|
1826
|
+
`,l$=S.default(Ce)`
|
|
1827
|
+
${a$}
|
|
1851
1828
|
line-height: 1.2;
|
|
1852
1829
|
min-width: 1px;
|
|
1853
|
-
`,
|
|
1830
|
+
`,c$=S.default.ul`
|
|
1854
1831
|
display: flex;
|
|
1855
1832
|
flex-direction: column;
|
|
1856
1833
|
align-items: flex-start;
|
|
1857
1834
|
padding: 0;
|
|
1858
1835
|
margin: auto 0 0;
|
|
1859
|
-
`,
|
|
1836
|
+
`,u$=S.default.li`
|
|
1860
1837
|
display: flex;
|
|
1861
1838
|
align-items: center;
|
|
1862
1839
|
gap: var(--cc_size_spacing_xs);
|
|
1863
|
-
`,
|
|
1840
|
+
`,vf=S.default.i`
|
|
1864
1841
|
font-size: 18px;
|
|
1865
1842
|
color: ${({$color:e})=>{switch(e){case"success":return"var(--cc_color_utility_success_darken_10)";case"warning":return"var(--cc_color_utility_caution_darken_15)";case"danger":return"var(--cc_color_utility_destroy)";default:return"var(--cc_color_text_subtle)"}}};
|
|
1866
|
-
`,
|
|
1843
|
+
`,d$=S.default.div`
|
|
1867
1844
|
display: flex;
|
|
1868
1845
|
align-items: center;
|
|
1869
1846
|
gap: var(--cc_size_spacing_xs);
|
|
1870
|
-
`,
|
|
1847
|
+
`,f$=S.default.div`
|
|
1871
1848
|
display: flex;
|
|
1872
1849
|
gap: var(--cc_size_spacing_xs);
|
|
1873
1850
|
position: relative;
|
|
1874
1851
|
inset-block-end: 1px;
|
|
1875
|
-
`,
|
|
1852
|
+
`,vc=({icon:e,text:r,color:n})=>_.jsxs(u$,{children:[e?_.jsx(vf,{className:`mdi mdi-${e}`,"aria-hidden":!0,$color:n}):null,_.jsx(Ce,{as:"span",size:"xs",color:"subtle",children:r})]}),p$=({comparisonText:e,comparisonType:r,comparisonValue:n,comparisonAccessibilityLabel:t})=>{let o,a;switch(r){case"positive":case"positive-down":a="success";break;case"negative":case"negative-up":a="danger";break;default:a="default";break}switch(r){case"positive":case"negative-up":o="arrow-up-bold";break;case"negative":case"positive-down":o="arrow-down-bold";break;default:o="equal";break}return _.jsxs(_.Fragment,{children:[_.jsxs(d$,{"aria-hidden":!0,children:[_.jsx(vf,{className:`mdi mdi-${o}`,"aria-hidden":!0,color:a}),_.jsxs(f$,{children:[_.jsx(Ce,{as:"span",size:"xs",weight:600,color:"subtle",children:n}),_.jsx(Ce,{as:"span",size:"xs",color:"subtle",children:e})]})]}),_.jsx(yt,{children:t})]})};function g$({count:e,title:r,iconName:n,color:t,primaryMetadata:o,primaryMetadataIconName:a,secondaryMetadata:i,secondaryMetadataIconName:s,comparisonType:l,comparisonValue:c,comparisonText:u,comparisonAccessibilityLabel:d,isLoading:p,loadingAccessibilityLabel:f,...g}){return p?_.jsx(hc,{$color:t,$isLoading:!0,...g,children:_.jsx(ia,{accessibilityLabel:f??"Loading..."})}):_.jsxs(hc,{$color:t,...g,children:[_.jsxs(i$,{children:[_.jsx(s$,{className:`mdi mdi-${n}`,"aria-hidden":!0}),_.jsx(l$,{size:"xs",weight:"600",family:"heading",color:"subtle",children:r})]}),_.jsx(Ce,{as:"h3",weight:"700",size:"xxl",children:e}),o||i?_.jsxs(c$,{children:[o&&_.jsx(vc,{icon:a,text:o,color:t}),i&&_.jsx(vc,{icon:s,text:i,color:t})]}):null,l&&c!==null&&u?_.jsx(p$,{comparisonType:l,comparisonValue:c,comparisonText:u,comparisonAccessibilityLabel:d}):null]})}const m$=S.default(ff.Title)`
|
|
1876
1853
|
all: initial;
|
|
1877
1854
|
min-width: 0;
|
|
1878
|
-
`,
|
|
1855
|
+
`,h$=e=>{const r="calc(100% - var(--cc_size_spacing_xl))",n=R.css`
|
|
1879
1856
|
max-width: ${r};
|
|
1880
1857
|
max-height: ${r};
|
|
1881
|
-
`;switch(e){case"small":return
|
|
1858
|
+
`;switch(e){case"small":return R.css`
|
|
1882
1859
|
width: ${r};
|
|
1883
|
-
${
|
|
1860
|
+
${n}
|
|
1884
1861
|
@container (min-width: 600px) {
|
|
1885
1862
|
width: 600px;
|
|
1886
1863
|
}
|
|
1887
|
-
`;case"medium":return
|
|
1864
|
+
`;case"medium":return R.css`
|
|
1888
1865
|
width: ${r};
|
|
1889
|
-
${
|
|
1866
|
+
${n}
|
|
1890
1867
|
@container (min-width: 900px) {
|
|
1891
1868
|
width: 900px;
|
|
1892
|
-
${
|
|
1869
|
+
${n}
|
|
1893
1870
|
}
|
|
1894
1871
|
`;default:return`
|
|
1895
1872
|
width: ${r};
|
|
1896
1873
|
height: ${r};
|
|
1897
|
-
${
|
|
1898
|
-
`}},
|
|
1874
|
+
${n}
|
|
1875
|
+
`}},v$=S.default(df)`
|
|
1899
1876
|
display: grid;
|
|
1900
1877
|
grid-template-rows:
|
|
1901
1878
|
${e=>e.$noHeader?null:"auto"} 1fr
|
|
1902
1879
|
${e=>e.$noFooter?null:"auto"};
|
|
1903
|
-
${e=>
|
|
1880
|
+
${e=>h$(e.$size)}
|
|
1904
1881
|
border-radius: var(--cc_size_border_radius_xl);
|
|
1905
1882
|
box-shadow: 0 var(--cc_size_depth_3_y) var(--cc_size_depth_3_blur)
|
|
1906
1883
|
var(--cc_color_depth_3);
|
|
@@ -1922,7 +1899,7 @@
|
|
|
1922
1899
|
@media (prefers-reduced-motion) {
|
|
1923
1900
|
transition: none !important;
|
|
1924
1901
|
}
|
|
1925
|
-
`,
|
|
1902
|
+
`,_$=S.default(bS)`
|
|
1926
1903
|
position: absolute;
|
|
1927
1904
|
inset: 0;
|
|
1928
1905
|
background: var(--cc_color_background_backdrop);
|
|
@@ -1936,7 +1913,7 @@
|
|
|
1936
1913
|
@media (prefers-reduced-motion) {
|
|
1937
1914
|
transition: none !important;
|
|
1938
1915
|
}
|
|
1939
|
-
`,
|
|
1916
|
+
`,b$=S.default.header`
|
|
1940
1917
|
all: initial;
|
|
1941
1918
|
display: grid;
|
|
1942
1919
|
gap: var(--cc_size_spacing_l);
|
|
@@ -1944,13 +1921,13 @@
|
|
|
1944
1921
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
1945
1922
|
padding: var(--cc_size_spacing_xl) var(--cc_size_spacing_xl)
|
|
1946
1923
|
var(--cc_size_spacing_l);
|
|
1947
|
-
`,
|
|
1924
|
+
`,y$=S.default.div`
|
|
1948
1925
|
display: grid;
|
|
1949
1926
|
gap: var(--cc_size_spacing_xs);
|
|
1950
|
-
|
|
1927
|
+
`,w$=S.default.div`
|
|
1951
1928
|
padding: 0 var(--cc_size_spacing_xl) var(--cc_size_spacing_xl);
|
|
1952
1929
|
overflow-y: auto;
|
|
1953
|
-
`,
|
|
1930
|
+
`,x$=S.default.footer`
|
|
1954
1931
|
all: initial;
|
|
1955
1932
|
position: relative;
|
|
1956
1933
|
display: grid;
|
|
@@ -1962,67 +1939,67 @@
|
|
|
1962
1939
|
@container (min-width: 500px) {
|
|
1963
1940
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
1964
1941
|
}
|
|
1965
|
-
`,
|
|
1942
|
+
`,S$=S.default.div`
|
|
1966
1943
|
min-width: 0;
|
|
1967
|
-
|
|
1944
|
+
`,$$=S.default.div`
|
|
1968
1945
|
flex-shrink: 0;
|
|
1969
1946
|
display: flex;
|
|
1970
1947
|
gap: var(--cc_size_spacing_s);
|
|
1971
1948
|
margin-inline-start: auto;
|
|
1972
|
-
`,
|
|
1949
|
+
`,k$=({dataTestIdCloseButton:e,headerComponent:r,headerContentAfter:n,headerStyle:t,title:o,onClose:a})=>r===null?null:r||_.jsxs(b$,{style:t,children:[_.jsxs(y$,{children:[_.jsx(m$,{as:"h2",children:_.jsx(Ce,{as:"span",size:"l",family:"heading",weight:700,children:o})}),n]}),_.jsx(Yn,{iconName:"close",onClick:a,accessibilityLabel:"Close modal","data-testid":e})]}),C$=({footerComponent:e,footerActions:r,footerContentBefore:n,footerStyle:t})=>e||_.jsxs(x$,{style:t,children:[n?_.jsx(S$,{children:n}):null,r?_.jsx($$,{children:r}):null]});function D$({isOpen:e,onClose:r,as:n,children:t,"data-testid__close-button":o="slab__modal-close-button",bodyStyle:a,containerStyle:i,headerStyle:s,footerStyle:l,headerComponent:c,headerContentAfter:u,footerComponent:d,footerActions:p,footerContentBefore:f,size:g="medium",title:m,...h}){const b=!!(d||p||f),w=c||c===null;return _.jsx(ff,{"aria-label":w?m:"",open:e,onClose:r,as:n,style:{position:"fixed",zIndex:900,inset:0},transition:!0,...h,children:_.jsxs("div",{style:{containerType:"inline-size",width:"100vw",height:"100vh",display:"grid",placeItems:"center",overflow:"hidden",inset:0},children:[_.jsx(_$,{transition:!0}),_.jsxs(v$,{$size:g,$noHeader:c===null,$noFooter:!b,style:i,transition:!0,children:[k$({headerComponent:c,title:m,onClose:r,headerStyle:s,headerContentAfter:u,dataTestIdCloseButton:o}),_.jsx(w$,{style:a,children:t}),b?_.jsx(C$,{footerComponent:d,footerActions:p,footerContentBefore:f,footerStyle:l}):null]})]})})}const E$=S.default.dialog`
|
|
1973
1950
|
border: none;
|
|
1974
1951
|
&::backdrop {
|
|
1975
|
-
background: ${
|
|
1952
|
+
background: ${Tf};
|
|
1976
1953
|
}
|
|
1977
|
-
`,
|
|
1954
|
+
`,M$=(e,r)=>{const n=r.getBoundingClientRect();return!(e.clientX>n.left&&e.clientX<n.right&&e.clientY>n.top&&e.clientY<n.bottom)},R$=({isOpen:e,onClose:r,children:n,...t})=>{const o=y.useRef(null);return y.useEffect(()=>{e?o.current?.showModal():o.current?.close()},[e]),_.jsx(E$,{...t,ref:o,onCancel:r,onClose:r,onClick:a=>o.current&&M$(a,o.current)&&r(),children:n})},de={add_on:"add_on",assigned:"assigned",caution:"caution",destroy:"destroy",info:"info",success:"success",upgrade:"upgrade"},vn={medium:"medium"},P$=e=>{switch(e){case de.add_on:return"var(--cc_color_brand_add_on_alpha_10)";case de.assigned:return"var(--cc_color_utility_assigned_alpha_10)";case de.caution:return"var(--cc_color_utility_caution_alpha_20)";case de.destroy:return"var(--cc_color_utility_destroy_alpha_10)";case de.info:return"var(--cc_color_background_3_alpha_80)";case de.success:return"var(--cc_color_utility_success_alpha_10)";case de.upgrade:return"var(--cc_color_utility_upgrade_alpha_10)";default:return"var(--cc_color_background_3_alpha_80)"}},T$=e=>{switch(e){case de.add_on:return"var(--cc_color_brand_add_on)";case de.assigned:return"var(--cc_color_utility_assigned)";case de.caution:return"var(--cc_color_utility_caution)";case de.destroy:return"var(--cc_color_utility_destroy)";case de.info:return"var(--cc_color_utility_info_alpha_80)";case de.success:return"var(--cc_color_utility_success)";case de.upgrade:return"var(--cc_color_brand_upgrade)";default:return"var(--cc_color_utility_info_alpha_80)"}},I$=e=>{switch(e){case de.add_on:return"var(--cc_color_background_1)";case de.assigned:return"var(--cc_color_background_1)";case de.caution:return Li;case de.destroy:return"var(--cc_color_background_1)";case de.info:return vo;case de.success:return"var(--cc_color_background_1)";case de.upgrade:return"var(--cc_color_brand_secondary)";default:return vo}},O$=(e,r)=>{switch(r){case"add_on":return e||"information-outline";case"assigned":return e||"account-check";case"success":return e||"check";case"caution":return e||"alert-circle-outline";case"destroy":return e||"alert-circle-outline";case"upgrade":return e||"lightning-bolt";default:return e||"information-outline"}},F$=e=>{switch(e){case"small":return"6px 8px";case"medium":return"calc(var(--cc_size_spacing_s) + 2px) var(--cc_size_spacing_m) calc(var(--cc_size_spacing_s) + 2px)";case"large":return"var(--cc_size_spacing_m) var(--cc_size_spacing_l) var(--cc_size_spacing_m) var(--cc_size_spacing_m)"}},_c=e=>{switch(e){case"small":return 24;case"medium":return 28;case"large":return 34}},L$=e=>{switch(e){case"small":return"var(--cc_size_text_xs)";case"medium":return"calc(var(--cc_size_text_s) - 1px)";case"large":return"var(--cc_size_text_s)"}},z$=e=>{switch(e){case"small":return 16;case"medium":return 18;case"large":return 22}},N$=S.default.div`
|
|
1978
1955
|
display: flex;
|
|
1979
1956
|
flex-wrap: wrap;
|
|
1980
1957
|
align-items: ${({$contentAlign:e="center"})=>e};
|
|
1981
|
-
gap: ${({size:e=
|
|
1982
|
-
padding: ${({size:e=
|
|
1983
|
-
background-color: ${({$color:e=
|
|
1958
|
+
gap: ${({size:e=vn.medium})=>e==="small"?"calc(var(--cc_size_spacing_s) + 2px)":"var(--cc_size_spacing_m)"};
|
|
1959
|
+
padding: ${({size:e=vn.medium})=>F$(e)};
|
|
1960
|
+
background-color: ${({$color:e=de.info})=>P$(e)};
|
|
1984
1961
|
border-radius: var(--cc_size_border_radius_l);
|
|
1985
1962
|
color: var(--cc_color_text_subtle);
|
|
1986
|
-
font-size: ${({size:e=
|
|
1987
|
-
${
|
|
1963
|
+
font-size: ${({size:e=vn.medium})=>L$(e)};
|
|
1964
|
+
${$e}
|
|
1988
1965
|
line-height: 1.3;
|
|
1989
1966
|
|
|
1990
1967
|
/* if ccMargin is specified in props, convert spacing tokens to CSS variables */
|
|
1991
|
-
${e=>e.$ccMargin?
|
|
1992
|
-
margin: ${
|
|
1968
|
+
${e=>e.$ccMargin?R.css`
|
|
1969
|
+
margin: ${lt(e.$ccMargin)};
|
|
1993
1970
|
`:null}
|
|
1994
|
-
`,
|
|
1971
|
+
`,A$=S.default.span`
|
|
1995
1972
|
flex: 1;
|
|
1996
|
-
`,
|
|
1973
|
+
`,bc=S.default.span`
|
|
1997
1974
|
flex-shrink: 0;
|
|
1998
|
-
`,
|
|
1975
|
+
`,j$=S.default.span`
|
|
1999
1976
|
flex-shrink: 0;
|
|
2000
1977
|
display: grid;
|
|
2001
1978
|
place-items: center;
|
|
2002
|
-
width: ${({size:e=
|
|
2003
|
-
height: ${({size:e=
|
|
2004
|
-
background-color: ${({color:e=
|
|
1979
|
+
width: ${({size:e=vn.medium})=>_c(e)}px;
|
|
1980
|
+
height: ${({size:e=vn.medium})=>_c(e)}px;
|
|
1981
|
+
background-color: ${({color:e=de.info})=>T$(e)};
|
|
2005
1982
|
border-radius: var(--cc_size_border_radius_l);
|
|
2006
|
-
`,
|
|
2007
|
-
font-size: ${({size:e=
|
|
2008
|
-
color: ${({color:e=
|
|
2009
|
-
`;function
|
|
1983
|
+
`,H$=S.default.i`
|
|
1984
|
+
font-size: ${({size:e=vn.medium})=>z$(e)}px;
|
|
1985
|
+
color: ${({color:e=de.info})=>I$(e)};
|
|
1986
|
+
`;function Y$({children:e,ccMargin:r,color:n=de.info,contentBefore:t,contentAfter:o,contentAlign:a="center",iconName:i="",hideIcon:s,size:l=vn.medium,testId:c,...u}){return _.jsxs(N$,{$color:n,$ccMargin:r,size:l,$contentAlign:a,"data-testid":c,...u,children:[!s&&!t?_.jsx(j$,{color:n,size:l,children:_.jsx(H$,{className:`mdi mdi-${O$(i,n)}`,"aria-hidden":"true",size:l,color:n,"data-testid":"icon"})}):null,t?_.jsx(bc,{children:t}):null,_.jsx(A$,{children:e}),o?_.jsx(bc,{children:o}):null]})}const V$=R.styled.header`
|
|
2010
1987
|
all: initial;
|
|
2011
1988
|
display: block;
|
|
2012
|
-
${e=>e.$hasBottomBorder?
|
|
1989
|
+
${e=>e.$hasBottomBorder?R.css`
|
|
2013
1990
|
padding-block-end: var(--cc_size_spacing_m);
|
|
2014
1991
|
border-block-end: var(--cc_size_border_width_s) solid
|
|
2015
1992
|
var(--cc_color_border_default);
|
|
2016
1993
|
`:null}
|
|
2017
|
-
`,
|
|
1994
|
+
`,B$=R.styled(Zi)`
|
|
2018
1995
|
margin-block-end: var(--cc_size_spacing_s);
|
|
2019
|
-
`,
|
|
1996
|
+
`,W$=R.styled.div`
|
|
2020
1997
|
display: flex;
|
|
2021
1998
|
flex-wrap: wrap;
|
|
2022
1999
|
justify-content: space-between;
|
|
2023
2000
|
align-items: flex-start;
|
|
2024
2001
|
gap: var(--cc_size_spacing_m);
|
|
2025
|
-
`,
|
|
2002
|
+
`,G$=R.styled.div`
|
|
2026
2003
|
display: flex;
|
|
2027
2004
|
flex-wrap: wrap;
|
|
2028
2005
|
align-items: center;
|
|
@@ -2030,26 +2007,26 @@
|
|
|
2030
2007
|
column-gap: var(--cc_size_spacing_l);
|
|
2031
2008
|
width: fit-content;
|
|
2032
2009
|
flex: 1;
|
|
2033
|
-
`,
|
|
2010
|
+
`,q$=R.styled.div`
|
|
2034
2011
|
display: flex;
|
|
2035
2012
|
flex: none;
|
|
2036
2013
|
align-items: flex-end;
|
|
2037
2014
|
gap: var(--cc_size_spacing_s);
|
|
2038
|
-
`,
|
|
2015
|
+
`,K$=R.styled.div`
|
|
2039
2016
|
display: flex;
|
|
2040
2017
|
flex: none;
|
|
2041
2018
|
align-items: flex-end;
|
|
2042
2019
|
gap: var(--cc_size_spacing_s);
|
|
2043
|
-
`;function
|
|
2020
|
+
`;function U$({backAction:e,contentAfter:r,contentAfterHeading:n,hasBottomBorder:t=!1,testId:o,heading:a,...i}){return _.jsxs(V$,{$hasBottomBorder:t,"data-testid":o,...i,children:[e?_.jsx(B$,{...e,"data-testid":e["data-testid"],color:"subtle",icon:{name:"chevron-left",position:"before"},children:e.label}):null,_.jsxs(W$,{children:[_.jsxs(G$,{children:[_.jsx(Ce,{as:"h1",size:"xxl",children:a}),n?_.jsx(K$,{children:n}):null]}),r?_.jsx(q$,{children:r}):null]})]})}const Q$=S.default.div`
|
|
2044
2021
|
max-width: 100%;
|
|
2045
2022
|
max-height: 100%;
|
|
2046
2023
|
box-sizing: border-box;
|
|
2047
|
-
`,
|
|
2024
|
+
`,X$=R.keyframes`
|
|
2048
2025
|
to {
|
|
2049
2026
|
transform: translate3d(0, 0, 0);
|
|
2050
2027
|
opacity: 1;
|
|
2051
2028
|
}
|
|
2052
|
-
`,
|
|
2029
|
+
`,Z$=S.default.div`
|
|
2053
2030
|
all: initial;
|
|
2054
2031
|
box-sizing: border-box;
|
|
2055
2032
|
display: block;
|
|
@@ -2061,106 +2038,106 @@
|
|
|
2061
2038
|
|
|
2062
2039
|
/* animation */
|
|
2063
2040
|
opacity: 0;
|
|
2064
|
-
transform: ${e=>
|
|
2065
|
-
animation: ${
|
|
2066
|
-
${
|
|
2041
|
+
transform: ${e=>Ni({placement:e.$placement,offset:Mc})};
|
|
2042
|
+
animation: ${X$} ${_e.duration.medium} forwards
|
|
2043
|
+
${_e.easeOut};
|
|
2067
2044
|
@media (prefers-reduced-motion) {
|
|
2068
2045
|
animation: none;
|
|
2069
2046
|
opacity: 1;
|
|
2070
2047
|
transform: none;
|
|
2071
2048
|
}
|
|
2072
|
-
`;function
|
|
2049
|
+
`;function J$({as:e,children:r,isOpen:n,onOpenChange:t,mountNodeId:o,placement:a,triggerButton:i,...s}){const{refs:l,floatingStyles:c,context:u}=Pr({open:n,onOpenChange:t,placement:a||"bottom",whileElementsMounted:Mr,middleware:[Qn(Dr),Rr({fallbackAxisSideDirection:"start"}),Jo()]}),d=cu(u),p=Ui(u),f=Qi(u,{role:"dialog"}),{getReferenceProps:g,getFloatingProps:m}=oa([d,p,f]),h=i;return y.isValidElement(h)?_.jsxs(_.Fragment,{children:[y.cloneElement(h,{type:"button",ref:l.setReference,...g()}),_.jsx(ra,{id:o||void 0,children:n&&_.jsx(lu,{context:u,modal:!0,children:_.jsx(Q$,{ref:l.setFloating,style:c,...m(),children:_.jsx(Z$,{as:e,$placement:u.placement,...s,children:r})})})})]}):null}const ek=S.default.div`
|
|
2073
2050
|
position: relative;
|
|
2074
|
-
`,
|
|
2075
|
-
${e=>e.$hideLabel?
|
|
2051
|
+
`,tk=S.default.label`
|
|
2052
|
+
${e=>e.$hideLabel?Ge:R.css`
|
|
2076
2053
|
all: initial;
|
|
2077
2054
|
display: block;
|
|
2078
|
-
${
|
|
2055
|
+
${$e}
|
|
2079
2056
|
color: var(--cc_color_text_subtle);
|
|
2080
2057
|
font-size: ${e.$size==="medium"?"var(--cc_size_text_s)":"var(--cc_size_text_xs)"};
|
|
2081
2058
|
margin-block-end: var(--cc_size_spacing_s);
|
|
2082
2059
|
`}
|
|
2083
|
-
`,
|
|
2060
|
+
`,yc=R.css`
|
|
2084
2061
|
border: none;
|
|
2085
2062
|
background-color: var(--cc_color_background_3);
|
|
2086
2063
|
border-radius: var(--cc_size_border_radius_pill);
|
|
2087
|
-
`,
|
|
2088
|
-
background-color: ${
|
|
2064
|
+
`,wc=(e,r)=>R.css`
|
|
2065
|
+
background-color: ${Ai(e)};
|
|
2089
2066
|
border-radius: var(--cc_size_border_radius_pill) 0 0
|
|
2090
2067
|
var(--cc_size_border_radius_pill);
|
|
2091
2068
|
border-radius: ${r?"var(--cc_size_border_radius_pill)":"var(--cc_size_border_radius_pill) 0 0 var(--cc_size_border_radius_pill)"};
|
|
2092
|
-
`,
|
|
2069
|
+
`,nk=S.default.progress`
|
|
2093
2070
|
display: block;
|
|
2094
2071
|
width: 100%;
|
|
2095
2072
|
min-width: 124px;
|
|
2096
2073
|
appearance: none;
|
|
2097
|
-
${
|
|
2074
|
+
${yc}
|
|
2098
2075
|
height: ${e=>e.$size==="medium"?"var(--cc_size_spacing_s)":"calc(var(--cc_size_spacing_s) * 0.75)"};
|
|
2099
2076
|
|
|
2100
2077
|
/* webkit */
|
|
2101
2078
|
&::-webkit-progress-bar {
|
|
2102
|
-
${
|
|
2079
|
+
${yc}
|
|
2103
2080
|
}
|
|
2104
2081
|
&::-webkit-progress-value {
|
|
2105
|
-
${e=>
|
|
2082
|
+
${e=>wc(e.$color,e.$isCompleted)}
|
|
2106
2083
|
}
|
|
2107
2084
|
&::-moz-progress-bar {
|
|
2108
|
-
${e=>
|
|
2085
|
+
${e=>wc(e.$color,e.$isCompleted)}
|
|
2109
2086
|
}
|
|
2110
|
-
`;function
|
|
2087
|
+
`;function rk({hideLabel:e=!1,labelStyle:r,size:n="small",...t}){const o=()=>t.value&&t.max?t.value>=t.max:!1;return _.jsxs(ek,{children:[_.jsx(tk,{htmlFor:t.id,$size:n,$hideLabel:e,style:r,children:t.label}),_.jsx(nk,{$size:n,$color:t.color||"secondary",$isCompleted:o(),...t})]})}const ok={small:{diameter:24,strokeWidth:3,iconSize:"var(--cc_size_text_xs)"},medium:{diameter:48,strokeWidth:4,iconSize:"var(--cc_size_text_m)"},large:{diameter:60,strokeWidth:6,iconSize:"var(--cc_size_text_l)"}},Ho=(e,r)=>r?{diameter:r,strokeWidth:Math.max(3,Math.floor(r*.1)),iconSize:`${Math.max(12,Math.floor(r*.2))}px`}:ok[e],ak=S.default.div`
|
|
2111
2088
|
position: relative;
|
|
2112
|
-
width: ${e=>
|
|
2113
|
-
height: ${e=>
|
|
2089
|
+
width: ${e=>Ho(e.$size,e.$customDiameter).diameter}px;
|
|
2090
|
+
height: ${e=>Ho(e.$size,e.$customDiameter).diameter}px;
|
|
2114
2091
|
display: grid;
|
|
2115
2092
|
place-items: center;
|
|
2116
2093
|
|
|
2117
|
-
${e=>e.$ccMargin?
|
|
2118
|
-
margin: ${
|
|
2094
|
+
${e=>e.$ccMargin?R.css`
|
|
2095
|
+
margin: ${lt(e.$ccMargin)};
|
|
2119
2096
|
`:null}
|
|
2120
|
-
`,
|
|
2097
|
+
`,_f=R.css`
|
|
2121
2098
|
position: absolute;
|
|
2122
2099
|
width: 100%;
|
|
2123
2100
|
height: 100%;
|
|
2124
2101
|
display: grid;
|
|
2125
2102
|
place-items: center;
|
|
2126
|
-
`,
|
|
2127
|
-
${
|
|
2128
|
-
`,
|
|
2103
|
+
`,ik=S.default.output`
|
|
2104
|
+
${_f}
|
|
2105
|
+
`,sk=S.default.svg`
|
|
2129
2106
|
transform: rotate(-90deg);
|
|
2130
|
-
`,
|
|
2107
|
+
`,lk=S.default.circle`
|
|
2131
2108
|
fill: none;
|
|
2132
2109
|
stroke: var(--cc_color_background_3);
|
|
2133
2110
|
transition: stroke-dashoffset 0.3s ease-out;
|
|
2134
|
-
`,
|
|
2111
|
+
`,ck=S.default.circle`
|
|
2135
2112
|
fill: none;
|
|
2136
2113
|
stroke: blue;
|
|
2137
|
-
`,
|
|
2114
|
+
`,uk=S.default(Ce)`
|
|
2138
2115
|
text-align: center;
|
|
2139
|
-
`,
|
|
2140
|
-
${
|
|
2141
|
-
`,
|
|
2142
|
-
font-size: ${e=>
|
|
2143
|
-
color: ${e=>
|
|
2144
|
-
`,
|
|
2116
|
+
`,dk=S.default.span`
|
|
2117
|
+
${_f}
|
|
2118
|
+
`,fk=S.default.i`
|
|
2119
|
+
font-size: ${e=>Ho(e.$size,e.$customDiameter).iconSize};
|
|
2120
|
+
color: ${e=>Ai(e.$color)};
|
|
2121
|
+
`,pk=(e,r)=>{if(r){const n=r*.2;return`${Math.max(16,Math.floor(n))}px`}return e==="large"?"s":"xs"};function gk({formatValue:e,size:r="medium",customDiameter:n,shouldShowCompleteIcon:t=!1,ccMargin:o,...a}){const{label:i,color:s,style:l,className:c,...u}=a,{diameter:d,strokeWidth:p}=Ho(r,n),f=d/2-p/2,g=2*Math.PI*f,m=a.value>=a.max,h=e?e({value:a.value,max:a.max}):a.value;return _.jsxs(ak,{$size:r,$customDiameter:n,$ccMargin:o,style:l,className:c,"data-testid":a["data-testid"]?`${a["data-testid"]}-container`:"",children:[_.jsx(yt,{children:_.jsx("progress",{"aria-label":i,...u})}),_.jsxs(sk,{viewBox:`0 0 ${d} ${d}`,role:"presentation",$size:r,$customDiameter:n,children:[_.jsx(lk,{cx:d/2,cy:d/2,r:f,style:{strokeWidth:p}}),_.jsx(ck,{cx:d/2,cy:d/2,r:f,style:{strokeWidth:p,strokeDasharray:g,strokeDashoffset:g-(m?a.max:a.value)/a.max*g,stroke:Ai(s)}})]}),r==="small"||t?_.jsx(yt,{children:_.jsx("output",{htmlFor:a.id,children:h})}):_.jsx(ik,{htmlFor:a.id,"data-testid":a["data-testid"]?`${a["data-testid"]}-output`:"",children:_.jsx(uk,{forwardedAs:"span",color:"subtle",family:"heading",style:n?{fontSize:pk(r,n)}:void 0,size:n?void 0:r==="large"?"s":"xs",children:h})}),t?_.jsx(dk,{children:_.jsx(fk,{className:"mdi mdi-check-bold",role:"presentation",$size:r,$customDiameter:n,$color:s,"data-testid":a["data-testid"]?`${a["data-testid"]}-icon`:""})}):null]})}const mk=S.default.svg`
|
|
2145
2122
|
display: block;
|
|
2146
2123
|
fill: ${({$isSelected:e})=>e?"var(--cc_color_utility_caution)":"var(--cc_color_text_nonessential)"};
|
|
2147
2124
|
scale: 0.85;
|
|
2148
|
-
`,
|
|
2125
|
+
`,hk="M7.19883 0.531328C7.49309 -0.177109 8.49343 -0.177109 8.78769 0.531328L10.3376 4.26322C10.4627 4.56437 10.756 4.76055 11.0812 4.76055H15.1571C15.9066 4.76055 16.2819 5.66958 15.7519 6.20123L12.4554 9.50846C12.2485 9.716 12.1701 10.0197 12.2504 10.3019L13.5577 14.8923C13.7785 15.6674 12.917 16.2983 12.2484 15.8512L8.4401 13.304C8.16951 13.1231 7.81701 13.1231 7.54642 13.3041L3.74443 15.847C3.07373 16.2955 2.20941 15.6626 2.43086 14.885L3.73609 10.3019C3.81646 10.0197 3.73801 9.716 3.53115 9.50846L0.250883 6.21757C-0.285057 5.67989 0.0945176 4.76055 0.852458 4.76055H4.90533C5.23053 4.76055 5.52383 4.56437 5.64891 4.26322L7.19883 0.531328Z",vk="M11.2886 10.5756C11.1094 9.94587 11.2839 9.26718 11.7471 8.8025L14.7792 5.76055H11.0812C10.3504 5.76055 9.69353 5.31978 9.41407 4.64664L7.99326 1.22569L6.57243 4.64678C6.29292 5.31976 5.63613 5.76055 4.90533 5.76055H1.20727L4.2394 8.8025C4.70243 9.26704 4.87728 9.94575 4.69785 10.5758L3.49102 14.8134L6.99037 12.473C7.59746 12.0668 8.38895 12.0668 8.99598 12.4728L12.4955 14.8134L11.2886 10.5756ZM12.2484 15.8512L8.4401 13.304C8.16951 13.1231 7.81701 13.1231 7.54642 13.3041L3.74443 15.847C3.07373 16.2955 2.2094 15.6626 2.43086 14.885L3.73609 10.3019C3.81646 10.0197 3.73801 9.716 3.53115 9.50846L0.250883 6.21757C-0.285057 5.67989 0.0945176 4.76055 0.852458 4.76055H4.90533C5.23053 4.76055 5.52383 4.56437 5.64891 4.26322L7.19883 0.531328C7.49309 -0.177109 8.49343 -0.177109 8.78769 0.531328L10.3376 4.26322C10.4627 4.56437 10.756 4.76055 11.0812 4.76055H15.1571C15.9066 4.76055 16.2819 5.66958 15.7519 6.20123L12.4554 9.50846C12.2485 9.716 12.1701 10.0197 12.2504 10.3019L13.5577 14.8923C13.7785 15.6674 12.917 16.2983 12.2484 15.8512ZM15.0437 5.49527C15.0436 5.49532 15.0437 5.49522 15.0437 5.49527Z";function _k({isSelected:e=!1}){return _.jsx(mk,{viewBox:"0 0 16 16","aria-hidden":"true",$isSelected:e,children:_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:e?hk:vk})})}const Yo={xsmall:"xs",small:"s",medium:"m",large:"l"},bk=S.default.div`
|
|
2149
2126
|
all: initial;
|
|
2150
2127
|
display: flex;
|
|
2151
2128
|
align-items: center;
|
|
2152
|
-
`,
|
|
2129
|
+
`,yk=S.default.legend`
|
|
2153
2130
|
all: initial;
|
|
2154
|
-
${
|
|
2155
|
-
|
|
2156
|
-
width: ${e=>`var(--cc_size_avatar_${
|
|
2157
|
-
height: ${e=>`var(--cc_size_avatar_${
|
|
2158
|
-
`,
|
|
2131
|
+
${Ge}
|
|
2132
|
+
`,wk=S.default.div`
|
|
2133
|
+
width: ${e=>`var(--cc_size_avatar_${Yo[e.$size||"small"]})`};
|
|
2134
|
+
height: ${e=>`var(--cc_size_avatar_${Yo[e.$size||"small"]})`};
|
|
2135
|
+
`,xk=S.default.label`
|
|
2159
2136
|
all: initial;
|
|
2160
2137
|
cursor: pointer;
|
|
2161
2138
|
position: relative;
|
|
2162
|
-
width: ${e=>`var(--cc_size_avatar_${
|
|
2163
|
-
height: ${e=>`var(--cc_size_avatar_${
|
|
2139
|
+
width: ${e=>`var(--cc_size_avatar_${Yo[e.$size||"small"]})`};
|
|
2140
|
+
height: ${e=>`var(--cc_size_avatar_${Yo[e.$size||"small"]})`};
|
|
2164
2141
|
transition: scale 0.3s ease-out;
|
|
2165
2142
|
|
|
2166
2143
|
&:active {
|
|
@@ -2170,7 +2147,7 @@
|
|
|
2170
2147
|
&:has(input:focus-visible) {
|
|
2171
2148
|
border-radius: var(--cc_size_border_radius_m);
|
|
2172
2149
|
outline-color: var(--cc_color_border_input_active);
|
|
2173
|
-
${
|
|
2150
|
+
${gn}
|
|
2174
2151
|
}
|
|
2175
2152
|
|
|
2176
2153
|
&:has(input[aria-disabled='true']) {
|
|
@@ -2178,35 +2155,35 @@
|
|
|
2178
2155
|
pointer-events: none;
|
|
2179
2156
|
cursor: not-allowed;
|
|
2180
2157
|
}
|
|
2181
|
-
`,
|
|
2158
|
+
`,Sk=S.default.input`
|
|
2182
2159
|
all: initial;
|
|
2183
|
-
${
|
|
2184
|
-
|
|
2160
|
+
${Ge}
|
|
2161
|
+
`,$k=(e,r,n)=>e>0&&e>=r||e===0&&r<=n;function kk({accessibilityLabel:e,className:r,"data-testid":n,disabled:t=!1,max:o,selectedValue:a,onChange:i,onHover:s,readOnly:l=!1,size:c="small",style:u}){const[d,p]=y.useState(0),f=y.useId(),g=h=>{p(h),s?.(h)},m=()=>{p(0),s?.(0)};return _.jsxs(bk,{"data-testid":n||void 0,as:l?"div":"fieldset","aria-disabled":!l&&t?!0:void 0,style:u,className:r,children:[!l&&_.jsx(yk,{children:e}),Array.from({length:o},(h,b)=>b+1).map(h=>{const b=a===h,w=_.jsxs(_.Fragment,{children:[_.jsx(yt,{children:h}),_.jsx(_k,{isSelected:$k(d,h,a)})]});return l?_.jsx(wk,{$size:c,children:w},h):_.jsxs(xk,{onMouseEnter:()=>g(h),onMouseLeave:m,$size:c,children:[_.jsx(Sk,{type:"radio","data-testid":n?`${n}-${h}`:void 0,name:f,value:h,checked:b,disabled:t&&!b?t:!1,"aria-disabled":t?"true":void 0,onChange:!l&&i?()=>i(h):void 0}),w]},h)})]})}const Ck=(e,r)=>e?Ge:r==="group"?R.css`
|
|
2185
2162
|
flex: 1;
|
|
2186
2163
|
min-width: 1px;
|
|
2187
|
-
`:null,
|
|
2164
|
+
`:null,Vo=zi,Dk=S.default.div`
|
|
2188
2165
|
display: flex;
|
|
2189
2166
|
align-items: center;
|
|
2190
2167
|
gap: var(--cc_size_spacing_s);
|
|
2191
|
-
${e=>e.$message?
|
|
2168
|
+
${e=>e.$message?R.css`
|
|
2192
2169
|
margin-block-end: var(--cc_size_spacing_s);
|
|
2193
2170
|
`:null}
|
|
2194
|
-
`,
|
|
2171
|
+
`,Ek=S.default.label`
|
|
2195
2172
|
all: initial;
|
|
2196
|
-
${e=>
|
|
2197
|
-
`,
|
|
2198
|
-
${
|
|
2173
|
+
${e=>Ck(e.$hideLabel,e.$layout)}
|
|
2174
|
+
`,Mk=S.default.span`
|
|
2175
|
+
${$e}
|
|
2199
2176
|
flex: 1;
|
|
2200
2177
|
min-width: 1px;
|
|
2201
2178
|
font-size: var(--cc_size_text_s);
|
|
2202
2179
|
color: var(--cc_color_text_default);
|
|
2203
2180
|
user-select: none;
|
|
2204
|
-
`,
|
|
2181
|
+
`,bf=S.default.span`
|
|
2205
2182
|
position: absolute;
|
|
2206
2183
|
inset-block-start: 0;
|
|
2207
2184
|
inset-inline-start: 0;
|
|
2208
|
-
height: ${
|
|
2209
|
-
width: ${
|
|
2185
|
+
height: ${Vo}px;
|
|
2186
|
+
width: ${Vo}px;
|
|
2210
2187
|
border-radius: 100%;
|
|
2211
2188
|
transition: transform 0.2s ease-out;
|
|
2212
2189
|
transform: translateX(${e=>e.$isPressed?"100%":"0"});
|
|
@@ -2218,62 +2195,44 @@
|
|
|
2218
2195
|
transition: all 0.2s;
|
|
2219
2196
|
background-color: var(--cc_color_button_text_secondary);
|
|
2220
2197
|
}
|
|
2221
|
-
`,
|
|
2198
|
+
`,Rk=S.default.span`
|
|
2222
2199
|
height: 100%;
|
|
2223
2200
|
display: grid;
|
|
2224
2201
|
grid-template-columns: 1fr 1fr;
|
|
2225
2202
|
place-items: center;
|
|
2226
2203
|
padding: 0 var(--cc_size_spacing_xs);
|
|
2227
|
-
`,
|
|
2204
|
+
`,xc=S.default.i`
|
|
2228
2205
|
font-size: var(--cc_size_text_xs);
|
|
2229
2206
|
transition: all 0.2s;
|
|
2230
2207
|
transition-delay: 0.1s;
|
|
2231
2208
|
color: ${e=>e.$isPressed?"var(--cc_color_button_text_secondary)":"var(--cc_color_button_text_subtle)"};
|
|
2232
|
-
`,
|
|
2209
|
+
`,Pk=S.default.button`
|
|
2233
2210
|
all: initial; /* reset browser styles */
|
|
2234
|
-
${
|
|
2211
|
+
${tn} /* add our shared CoCam button styles */
|
|
2235
2212
|
flex-shrink: 0;
|
|
2236
|
-
width: ${
|
|
2237
|
-
height: ${
|
|
2213
|
+
width: ${Vo*2}px;
|
|
2214
|
+
height: ${Vo}px;
|
|
2238
2215
|
border-radius: var(--cc_size_border_radius_pill);
|
|
2239
2216
|
position: relative;
|
|
2240
2217
|
transition: background-color 0.2s ease-out;
|
|
2241
2218
|
|
|
2242
|
-
&:active ${
|
|
2219
|
+
&:active ${bf}::after {
|
|
2243
2220
|
transform: scale(0.75);
|
|
2244
2221
|
}
|
|
2245
2222
|
&:focus-visible {
|
|
2246
2223
|
outline-offset: var(--cc_size_spacing_xs);
|
|
2247
2224
|
}
|
|
2248
|
-
${e=>e.disabled?
|
|
2249
|
-
${e=>e.$isPressed?
|
|
2250
|
-
background-color: ${e.$status!=="normal"?
|
|
2251
|
-
`:
|
|
2225
|
+
${e=>e.disabled?tt:null}
|
|
2226
|
+
${e=>e.$isPressed?R.css`
|
|
2227
|
+
background-color: ${e.$status!=="normal"?Ee(e.$status).accentColor:"var(--cc_color_button_background_secondary)"};
|
|
2228
|
+
`:R.css`
|
|
2252
2229
|
background-color: var(--cc_color_button_background_subtle);
|
|
2253
2230
|
`}
|
|
2254
|
-
`,
|
|
2255
|
-
* table-core
|
|
2256
|
-
*
|
|
2257
|
-
* Copyright (c) TanStack
|
|
2258
|
-
*
|
|
2259
|
-
* This source code is licensed under the MIT license found in the
|
|
2260
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
2261
|
-
*
|
|
2262
|
-
* @license MIT
|
|
2263
|
-
*/function Kt(e,r){return typeof e=="function"?e(r):e}function Ge(e,r){return t=>{r.setState(n=>({...n,[e]:Kt(t,n[e])}))}}function $a(e){return e instanceof Function}function Lk(e){return Array.isArray(e)&&e.every(r=>typeof r=="number")}function zk(e,r){const t=[],n=o=>{o.forEach(a=>{t.push(a);const i=r(a);i!=null&&i.length&&n(i)})};return n(e),t}function U(e,r,t){let n=[],o;return a=>{let i;t.key&&t.debug&&(i=Date.now());const s=e(a);if(!(s.length!==n.length||s.some((u,f)=>n[f]!==u)))return o;n=s;let c;if(t.key&&t.debug&&(c=Date.now()),o=r(...s),t==null||t.onChange==null||t.onChange(o),t.key&&t.debug&&t!=null&&t.debug()){const u=Math.round((Date.now()-i)*100)/100,f=Math.round((Date.now()-c)*100)/100,p=f/16,d=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c⏱ ${d(f,5)} /${d(u,5)} ms`,`
|
|
2231
|
+
`,Tk=({hideLabel:e,label:r,layout:n="default",onClick:t,pressed:o,...a})=>{const{status:i="normal",className:s,message:l,style:c,...u}=a,d=_.jsx(Ek,{id:`${a.id}-label`,$hideLabel:e,$layout:n,htmlFor:n==="default"?a.id:"",children:_.jsx(Mk,{children:r})});return _.jsx(rn,{inputId:a.id,message:l,className:s,status:i,style:c,children:_.jsxs(Dk,{$layout:n,$message:l,children:[n==="group"?d:null,_.jsxs(Pk,{"aria-labelledby":`${a.id}-label`,"aria-describedby":l?`${a.id}-message`:"","aria-invalid":i==="error",$isPressed:o,$status:i,onClick:t,"aria-pressed":o,...u,children:[_.jsxs(Rk,{children:[_.jsx(xc,{"aria-hidden":"true",className:"mdi mdi-check-bold",$isPressed:o,style:{opacity:o?1:0}}),_.jsx(xc,{"aria-hidden":"true",className:"mdi mdi-close-thick",$isPressed:o,style:{opacity:o?0:1}})]}),_.jsx(bf,{$isPressed:o,"aria-hidden":"true"})]}),n==="default"?d:null]})})};function qt(e,r){return typeof e=="function"?e(r):e}function We(e,r){return n=>{r.setState(t=>({...t,[e]:qt(n,t[e])}))}}function Sa(e){return e instanceof Function}function Ik(e){return Array.isArray(e)&&e.every(r=>typeof r=="number")}function Ok(e,r){const n=[],t=o=>{o.forEach(a=>{n.push(a);const i=r(a);i!=null&&i.length&&t(i)})};return t(e),n}function K(e,r,n){let t=[],o;return a=>{let i;n.key&&n.debug&&(i=Date.now());const s=e(a);if(!(s.length!==t.length||s.some((u,d)=>t[d]!==u)))return o;t=s;let c;if(n.key&&n.debug&&(c=Date.now()),o=r(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-c)*100)/100,p=d/16,f=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c⏱ ${f(d,5)} /${f(u,5)} ms`,`
|
|
2264
2232
|
font-size: .6rem;
|
|
2265
2233
|
font-weight: bold;
|
|
2266
|
-
color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,t==null?void 0:t.key)}return o}}function Q(e,r,t,n){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[r]},key:process.env.NODE_ENV==="development"&&t,onChange:n}}function Nk(e,r,t,n){const o=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${r.id}_${t.id}`,row:r,column:t,getValue:()=>r.getValue(n),renderValue:o,getContext:U(()=>[e,t,r,a],(i,s,l,c)=>({table:i,column:s,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),Q(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,t,r,e)},{}),a}function Ak(e,r,t,n){var o,a;const s={...e._getDefaultColumnDef(),...r},l=s.accessorKey;let c=(o=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,u;if(s.accessorFn?u=s.accessorFn:l&&(l.includes(".")?u=p=>{let d=p;for(const m of l.split(".")){var g;d=(g=d)==null?void 0:g[m],process.env.NODE_ENV!=="production"&&d===void 0&&console.warn(`"${m}" in deeply nested key "${l}" returned undefined.`)}return d}:u=p=>p[s.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:n,depth:t,columnDef:s,columns:[],getFlatColumns:U(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(d=>d.getFlatColumns())]},Q(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:U(()=>[e._getOrderColumnsFn()],p=>{var d;if((d=f.columns)!=null&&d.length){let g=f.columns.flatMap(m=>m.getLeafColumns());return p(g)}return[f]},Q(e.options,"debugColumns","column.getLeafColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(f,e);return f}const Pe="debugHeaders";function $c(e,r,t){var n;let a={id:(n=t.id)!=null?n:r.id,column:r,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l)};return s(a),i},getContext:()=>({table:e,header:a,column:r})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const jk={createTable:e=>{e.getHeaderGroups=U(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(r,t,n,o)=>{var a,i;const s=(a=n==null?void 0:n.map(f=>t.find(p=>p.id===f)).filter(Boolean))!=null?a:[],l=(i=o==null?void 0:o.map(f=>t.find(p=>p.id===f)).filter(Boolean))!=null?i:[],c=t.filter(f=>!(n!=null&&n.includes(f.id))&&!(o!=null&&o.includes(f.id)));return ao(r,[...s,...c,...l],e)},Q(e.options,Pe,"getHeaderGroups")),e.getCenterHeaderGroups=U(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(r,t,n,o)=>(t=t.filter(a=>!(n!=null&&n.includes(a.id))&&!(o!=null&&o.includes(a.id))),ao(r,t,e,"center")),Q(e.options,Pe,"getCenterHeaderGroups")),e.getLeftHeaderGroups=U(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(r,t,n)=>{var o;const a=(o=n==null?void 0:n.map(i=>t.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return ao(r,a,e,"left")},Q(e.options,Pe,"getLeftHeaderGroups")),e.getRightHeaderGroups=U(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(r,t,n)=>{var o;const a=(o=n==null?void 0:n.map(i=>t.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return ao(r,a,e,"right")},Q(e.options,Pe,"getRightHeaderGroups")),e.getFooterGroups=U(()=>[e.getHeaderGroups()],r=>[...r].reverse(),Q(e.options,Pe,"getFooterGroups")),e.getLeftFooterGroups=U(()=>[e.getLeftHeaderGroups()],r=>[...r].reverse(),Q(e.options,Pe,"getLeftFooterGroups")),e.getCenterFooterGroups=U(()=>[e.getCenterHeaderGroups()],r=>[...r].reverse(),Q(e.options,Pe,"getCenterFooterGroups")),e.getRightFooterGroups=U(()=>[e.getRightHeaderGroups()],r=>[...r].reverse(),Q(e.options,Pe,"getRightFooterGroups")),e.getFlatHeaders=U(()=>[e.getHeaderGroups()],r=>r.map(t=>t.headers).flat(),Q(e.options,Pe,"getFlatHeaders")),e.getLeftFlatHeaders=U(()=>[e.getLeftHeaderGroups()],r=>r.map(t=>t.headers).flat(),Q(e.options,Pe,"getLeftFlatHeaders")),e.getCenterFlatHeaders=U(()=>[e.getCenterHeaderGroups()],r=>r.map(t=>t.headers).flat(),Q(e.options,Pe,"getCenterFlatHeaders")),e.getRightFlatHeaders=U(()=>[e.getRightHeaderGroups()],r=>r.map(t=>t.headers).flat(),Q(e.options,Pe,"getRightFlatHeaders")),e.getCenterLeafHeaders=U(()=>[e.getCenterFlatHeaders()],r=>r.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),Q(e.options,Pe,"getCenterLeafHeaders")),e.getLeftLeafHeaders=U(()=>[e.getLeftFlatHeaders()],r=>r.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),Q(e.options,Pe,"getLeftLeafHeaders")),e.getRightLeafHeaders=U(()=>[e.getRightFlatHeaders()],r=>r.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),Q(e.options,Pe,"getRightLeafHeaders")),e.getLeafHeaders=U(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(r,t,n)=>{var o,a,i,s,l,c;return[...(o=(a=r[0])==null?void 0:a.headers)!=null?o:[],...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(l=(c=n[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},Q(e.options,Pe,"getLeafHeaders"))}};function ao(e,r,t,n){var o,a;let i=0;const s=function(p,d){d===void 0&&(d=1),i=Math.max(i,d),p.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&s(g.columns,d+1)},0)};s(e);let l=[];const c=(p,d)=>{const g={depth:d,id:[n,`${d}`].filter(Boolean).join("_"),headers:[]},m=[];p.forEach(_=>{const y=[...m].reverse()[0],x=_.column.depth===g.depth;let w,$=!1;if(x&&_.column.parent?w=_.column.parent:(w=_.column,$=!0),y&&(y==null?void 0:y.column)===w)y.subHeaders.push(_);else{const C=$c(t,w,{id:[n,d,w.id,_==null?void 0:_.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${m.filter(k=>k.column===w).length}`:void 0,depth:d,index:m.length});C.subHeaders.push(_),m.push(C)}g.headers.push(_),_.headerGroup=g}),l.push(g),d>0&&c(m,d-1)},u=r.map((p,d)=>$c(t,p,{depth:i,index:d}));c(u,i-1),l.reverse();const f=p=>p.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,_=0,y=[0];g.subHeaders&&g.subHeaders.length?(y=[],f(g.subHeaders).forEach(w=>{let{colSpan:$,rowSpan:C}=w;m+=$,y.push(C)})):m=1;const x=Math.min(...y);return _=_+x,g.colSpan=m,g.rowSpan=_,{colSpan:m,rowSpan:_}});return f((o=(a=l[0])==null?void 0:a.headers)!=null?o:[]),l}const Hk=(e,r,t,n,o,a,i)=>{let s={id:r,index:n,original:t,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return s._valuesCache[l]=c.accessorFn(s.original,n),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=c.columnDef.getUniqueValues(s.original,n),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=s.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>zk(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],c=s;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:U(()=>[e.getAllLeafColumns()],l=>l.map(c=>Nk(e,s,c,c.id)),Q(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:U(()=>[s.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),Q(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(s,e)}return s},Yk={createColumn:(e,r)=>{e._getFacetedRowModel=r.options.getFacetedRowModel&&r.options.getFacetedRowModel(r,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():r.getPreFilteredRowModel(),e._getFacetedUniqueValues=r.options.getFacetedUniqueValues&&r.options.getFacetedUniqueValues(r,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=r.options.getFacetedMinMaxValues&&r.options.getFacetedMinMaxValues(r,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},wf=(e,r,t)=>{var n,o;const a=t==null||(n=t.toString())==null?void 0:n.toLowerCase();return!!(!((o=e.getValue(r))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};wf.autoRemove=e=>it(e);const xf=(e,r,t)=>{var n;return!!(!((n=e.getValue(r))==null||(n=n.toString())==null)&&n.includes(t))};xf.autoRemove=e=>it(e);const Sf=(e,r,t)=>{var n;return((n=e.getValue(r))==null||(n=n.toString())==null?void 0:n.toLowerCase())===(t==null?void 0:t.toLowerCase())};Sf.autoRemove=e=>it(e);const $f=(e,r,t)=>{var n;return(n=e.getValue(r))==null?void 0:n.includes(t)};$f.autoRemove=e=>it(e);const kf=(e,r,t)=>!t.some(n=>{var o;return!((o=e.getValue(r))!=null&&o.includes(n))});kf.autoRemove=e=>it(e)||!(e!=null&&e.length);const Cf=(e,r,t)=>t.some(n=>{var o;return(o=e.getValue(r))==null?void 0:o.includes(n)});Cf.autoRemove=e=>it(e)||!(e!=null&&e.length);const Df=(e,r,t)=>e.getValue(r)===t;Df.autoRemove=e=>it(e);const Ef=(e,r,t)=>e.getValue(r)==t;Ef.autoRemove=e=>it(e);const $s=(e,r,t)=>{let[n,o]=t;const a=e.getValue(r);return a>=n&&a<=o};$s.resolveFilterValue=e=>{let[r,t]=e,n=typeof r!="number"?parseFloat(r):r,o=typeof t!="number"?parseFloat(t):t,a=r===null||Number.isNaN(n)?-1/0:n,i=t===null||Number.isNaN(o)?1/0:o;if(a>i){const s=a;a=i,i=s}return[a,i]};$s.autoRemove=e=>it(e)||it(e[0])&&it(e[1]);const $t={includesString:wf,includesStringSensitive:xf,equalsString:Sf,arrIncludes:$f,arrIncludesAll:kf,arrIncludesSome:Cf,equals:Df,weakEquals:Ef,inNumberRange:$s};function it(e){return e==null||e===""}const Vk={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ge("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,r)=>{e.getAutoFilterFn=()=>{const t=r.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);return typeof n=="string"?$t.includesString:typeof n=="number"?$t.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?$t.equals:Array.isArray(n)?$t.arrIncludes:$t.weakEquals},e.getFilterFn=()=>{var t,n;return $a(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(n=r.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?t:$t[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,n,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((n=r.options.enableColumnFilters)!=null?n:!0)&&((o=r.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=r.getState().columnFilters)==null||(t=t.find(n=>n.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,n;return(t=(n=r.getState().columnFilters)==null?void 0:n.findIndex(o=>o.id===e.id))!=null?t:-1},e.setFilterValue=t=>{r.setColumnFilters(n=>{const o=e.getFilterFn(),a=n==null?void 0:n.find(u=>u.id===e.id),i=Kt(t,a?a.value:void 0);if(kc(o,i,e)){var s;return(s=n==null?void 0:n.filter(u=>u.id!==e.id))!=null?s:[]}const l={id:e.id,value:i};if(a){var c;return(c=n==null?void 0:n.map(u=>u.id===e.id?l:u))!=null?c:[]}return n!=null&&n.length?[...n,l]:[l]})}},createRow:(e,r)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=r=>{const t=e.getAllLeafColumns(),n=o=>{var a;return(a=Kt(r,o))==null?void 0:a.filter(i=>{const s=t.find(l=>l.id===i.id);if(s){const l=s.getFilterFn();if(kc(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=r=>{var t,n;e.setColumnFilters(r?[]:(t=(n=e.initialState)==null?void 0:n.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function kc(e,r,t){return(e&&e.autoRemove?e.autoRemove(r,t):!1)||typeof r>"u"||typeof r=="string"&&!r}const Bk=(e,r,t)=>t.reduce((n,o)=>{const a=o.getValue(e);return n+(typeof a=="number"?a:0)},0),Wk=(e,r,t)=>{let n;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}),n},Gk=(e,r,t)=>{let n;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(n<a||n===void 0&&a>=a)&&(n=a)}),n},qk=(e,r,t)=>{let n,o;return t.forEach(a=>{const i=a.getValue(e);i!=null&&(n===void 0?i>=i&&(n=o=i):(n>i&&(n=i),o<i&&(o=i)))}),[n,o]},Kk=(e,r)=>{let t=0,n=0;if(r.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++t,n+=a)}),t)return n/t},Uk=(e,r)=>{if(!r.length)return;const t=r.map(a=>a.getValue(e));if(!Lk(t))return;if(t.length===1)return t[0];const n=Math.floor(t.length/2),o=t.sort((a,i)=>a-i);return t.length%2!==0?o[n]:(o[n-1]+o[n])/2},Qk=(e,r)=>Array.from(new Set(r.map(t=>t.getValue(e))).values()),Xk=(e,r)=>new Set(r.map(t=>t.getValue(e))).size,Zk=(e,r)=>r.length,Ja={sum:Bk,min:Wk,max:Gk,extent:qk,mean:Kk,median:Uk,unique:Qk,uniqueCount:Xk,count:Zk},Jk={getDefaultColumnDef:()=>({aggregatedCell:e=>{var r,t;return(r=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?r:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ge("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,r)=>{e.toggleGrouping=()=>{r.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(n=>n!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,n;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((n=r.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=r.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=r.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=r.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);if(typeof n=="number")return Ja.sum;if(Object.prototype.toString.call(n)==="[object Date]")return Ja.extent},e.getAggregationFn=()=>{var t,n;if(!e)throw new Error;return $a(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(n=r.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?t:Ja[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=r=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(r),e.resetGrouping=r=>{var t,n;e.setGrouping(r?[]:(t=(n=e.initialState)==null?void 0:n.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,r)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const n=r.getColumn(t);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[t]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,r,t,n)=>{e.getIsGrouped=()=>r.getIsGrouped()&&r.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&r.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}}};function eC(e,r,t){if(!(r!=null&&r.length)||!t)return e;const n=e.filter(a=>!r.includes(a.id));return t==="remove"?n:[...r.map(a=>e.find(i=>i.id===a)).filter(Boolean),...n]}const tC={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ge("columnOrder",e)}),createColumn:(e,r)=>{e.getIndex=U(t=>[hr(r,t)],t=>t.findIndex(n=>n.id===e.id),Q(r.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var n;return((n=hr(r,t)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=t=>{var n;const o=hr(r,t);return((n=o[o.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=r=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(r),e.resetColumnOrder=r=>{var t;e.setColumnOrder(r?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=U(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(r,t,n)=>o=>{let a=[];if(!(r!=null&&r.length))a=o;else{const i=[...r],s=[...o];for(;s.length&&i.length;){const l=i.shift(),c=s.findIndex(u=>u.id===l);c>-1&&a.push(s.splice(c,1)[0])}a=[...a,...s]}return eC(a,t,n)},Q(e.options,"debugTable","_getOrderColumnsFn"))}},ei=()=>({left:[],right:[]}),nC={getInitialState:e=>({columnPinning:ei(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ge("columnPinning",e)}),createColumn:(e,r)=>{e.pin=t=>{const n=e.getLeafColumns().map(o=>o.id).filter(Boolean);r.setColumnPinning(o=>{var a,i;if(t==="right"){var s,l;return{left:((s=o==null?void 0:o.left)!=null?s:[]).filter(f=>!(n!=null&&n.includes(f))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(f=>!(n!=null&&n.includes(f))),...n]}}if(t==="left"){var c,u;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(f=>!(n!=null&&n.includes(f))),...n],right:((u=o==null?void 0:o.right)!=null?u:[]).filter(f=>!(n!=null&&n.includes(f)))}}return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(f=>!(n!=null&&n.includes(f))),right:((i=o==null?void 0:o.right)!=null?i:[]).filter(f=>!(n!=null&&n.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var o,a,i;return((o=n.columnDef.enablePinning)!=null?o:!0)&&((a=(i=r.options.enableColumnPinning)!=null?i:r.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(s=>s.id),{left:n,right:o}=r.getState().columnPinning,a=t.some(s=>n==null?void 0:n.includes(s)),i=t.some(s=>o==null?void 0:o.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,n;const o=e.getIsPinned();return o?(t=(n=r.getState().columnPinning)==null||(n=n[o])==null?void 0:n.indexOf(e.id))!=null?t:-1:0}},createRow:(e,r)=>{e.getCenterVisibleCells=U(()=>[e._getAllVisibleCells(),r.getState().columnPinning.left,r.getState().columnPinning.right],(t,n,o)=>{const a=[...n??[],...o??[]];return t.filter(i=>!a.includes(i.column.id))},Q(r.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=U(()=>[e._getAllVisibleCells(),r.getState().columnPinning.left],(t,n)=>(n??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),Q(r.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=U(()=>[e._getAllVisibleCells(),r.getState().columnPinning.right],(t,n)=>(n??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),Q(r.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=r=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(r),e.resetColumnPinning=r=>{var t,n;return e.setColumnPinning(r?ei():(t=(n=e.initialState)==null?void 0:n.columnPinning)!=null?t:ei())},e.getIsSomeColumnsPinned=r=>{var t;const n=e.getState().columnPinning;if(!r){var o,a;return!!((o=n.left)!=null&&o.length||(a=n.right)!=null&&a.length)}return!!((t=n[r])!=null&&t.length)},e.getLeftLeafColumns=U(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(r,t)=>(t??[]).map(n=>r.find(o=>o.id===n)).filter(Boolean),Q(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=U(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(r,t)=>(t??[]).map(n=>r.find(o=>o.id===n)).filter(Boolean),Q(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=U(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(r,t,n)=>{const o=[...t??[],...n??[]];return r.filter(a=>!o.includes(a.id))},Q(e.options,"debugColumns","getCenterLeafColumns"))}};function rC(e){return e||(typeof document<"u"?document:null)}const io={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ti=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),oC={getDefaultColumnDef:()=>io,getInitialState:e=>({columnSizing:{},columnSizingInfo:ti(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ge("columnSizing",e),onColumnSizingInfoChange:Ge("columnSizingInfo",e)}),createColumn:(e,r)=>{e.getSize=()=>{var t,n,o;const a=r.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:io.minSize,(n=a??e.columnDef.size)!=null?n:io.size),(o=e.columnDef.maxSize)!=null?o:io.maxSize)},e.getStart=U(t=>[t,hr(r,t),r.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((o,a)=>o+a.getSize(),0),Q(r.options,"debugColumns","getStart")),e.getAfter=U(t=>[t,hr(r,t),r.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((o,a)=>o+a.getSize(),0),Q(r.options,"debugColumns","getAfter")),e.resetSize=()=>{r.setColumnSizing(t=>{let{[e.id]:n,...o}=t;return o})},e.getCanResize=()=>{var t,n;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((n=r.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>r.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,r)=>{e.getSize=()=>{let t=0;const n=o=>{if(o.subHeaders.length)o.subHeaders.forEach(n);else{var a;t+=(a=o.column.getSize())!=null?a:0}};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const n=r.getColumn(e.column.id),o=n==null?void 0:n.getCanResize();return a=>{if(!n||!o||(a.persist==null||a.persist(),ni(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),s=e?e.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[n.id,n.getSize()]],l=ni(a)?Math.round(a.touches[0].clientX):a.clientX,c={},u=(y,x)=>{typeof x=="number"&&(r.setColumnSizingInfo(w=>{var $,C;const k=r.options.columnResizeDirection==="rtl"?-1:1,M=(x-(($=w==null?void 0:w.startOffset)!=null?$:0))*k,E=Math.max(M/((C=w==null?void 0:w.startSize)!=null?C:0),-.999999);return w.columnSizingStart.forEach(P=>{let[F,L]=P;c[F]=Math.round(Math.max(L+L*E,0)*100)/100}),{...w,deltaOffset:M,deltaPercentage:E}}),(r.options.columnResizeMode==="onChange"||y==="end")&&r.setColumnSizing(w=>({...w,...c})))},f=y=>u("move",y),p=y=>{u("end",y),r.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},d=rC(t),g={moveHandler:y=>f(y.clientX),upHandler:y=>{d==null||d.removeEventListener("mousemove",g.moveHandler),d==null||d.removeEventListener("mouseup",g.upHandler),p(y.clientX)}},m={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),f(y.touches[0].clientX),!1),upHandler:y=>{var x;d==null||d.removeEventListener("touchmove",m.moveHandler),d==null||d.removeEventListener("touchend",m.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),p((x=y.touches[0])==null?void 0:x.clientX)}},_=aC()?{passive:!1}:!1;ni(a)?(d==null||d.addEventListener("touchmove",m.moveHandler,_),d==null||d.addEventListener("touchend",m.upHandler,_)):(d==null||d.addEventListener("mousemove",g.moveHandler,_),d==null||d.addEventListener("mouseup",g.upHandler,_)),r.setColumnSizingInfo(y=>({...y,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=r=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(r),e.setColumnSizingInfo=r=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(r),e.resetColumnSizing=r=>{var t;e.setColumnSizing(r?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=r=>{var t;e.setColumnSizingInfo(r?ti():(t=e.initialState.columnSizingInfo)!=null?t:ti())},e.getTotalSize=()=>{var r,t;return(r=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?r:0},e.getLeftTotalSize=()=>{var r,t;return(r=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?r:0},e.getCenterTotalSize=()=>{var r,t;return(r=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?r:0},e.getRightTotalSize=()=>{var r,t;return(r=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((n,o)=>n+o.getSize(),0))!=null?r:0}}};let so=null;function aC(){if(typeof so=="boolean")return so;let e=!1;try{const r={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,r),window.removeEventListener("test",t)}catch{e=!1}return so=e,so}function ni(e){return e.type==="touchstart"}const iC={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ge("columnVisibility",e)}),createColumn:(e,r)=>{e.toggleVisibility=t=>{e.getCanHide()&&r.setColumnVisibility(n=>({...n,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,n;const o=e.columns;return(t=o.length?o.some(a=>a.getIsVisible()):(n=r.getState().columnVisibility)==null?void 0:n[e.id])!=null?t:!0},e.getCanHide=()=>{var t,n;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((n=r.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,r)=>{e._getAllVisibleCells=U(()=>[e.getAllCells(),r.getState().columnVisibility],t=>t.filter(n=>n.column.getIsVisible()),Q(r.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=U(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,n,o)=>[...t,...n,...o],Q(r.options,"debugRows","getVisibleCells"))},createTable:e=>{const r=(t,n)=>U(()=>[n(),n().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Q(e.options,"debugColumns",t));e.getVisibleFlatColumns=r("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=r("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=r("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=r("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=r("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=(n=t)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:t||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible((n=t.target)==null?void 0:n.checked)}}};function hr(e,r){return r?r==="center"?e.getCenterVisibleLeafColumns():r==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const sC={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},lC={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ge("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:r=>{var t;const n=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[r.id])==null?void 0:t.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,r)=>{e.getCanGlobalFilter=()=>{var t,n,o,a;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((n=r.options.enableGlobalFilter)!=null?n:!0)&&((o=r.options.enableFilters)!=null?o:!0)&&((a=r.options.getColumnCanGlobalFilter==null?void 0:r.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>$t.includesString,e.getGlobalFilterFn=()=>{var r,t;const{globalFilterFn:n}=e.options;return $a(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(r=(t=e.options.filterFns)==null?void 0:t[n])!=null?r:$t[n]},e.setGlobalFilter=r=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(r)},e.resetGlobalFilter=r=>{e.setGlobalFilter(r?void 0:e.initialState.globalFilter)}}},cC={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ge("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let r=!1,t=!1;e._autoResetExpanded=()=>{var n,o;if(!r){e._queue(()=>{r=!0});return}if((n=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var o,a;e.setExpanded(n?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");n=Math.max(n,i.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,r)=>{e.toggleExpanded=t=>{r.setExpanded(n=>{var o;const a=n===!0?!0:!!(n!=null&&n[e.id]);let i={};if(n===!0?Object.keys(r.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=n,t=(o=t)!=null?o:!a,!a&&t)return{...i,[e.id]:!0};if(a&&!t){const{[e.id]:s,...l}=i;return l}return n})},e.getIsExpanded=()=>{var t;const n=r.getState().expanded;return!!((t=r.options.getIsRowExpanded==null?void 0:r.options.getIsRowExpanded(e))!=null?t:n===!0||n!=null&&n[e.id])},e.getCanExpand=()=>{var t,n,o;return(t=r.options.getRowCanExpand==null?void 0:r.options.getRowCanExpand(e))!=null?t:((n=r.options.enableExpanding)!=null?n:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let t=!0,n=e;for(;t&&n.parentId;)n=r.getRow(n.parentId,!0),t=n.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Pi=0,Ti=10,ri=()=>({pageIndex:Pi,pageSize:Ti}),uC={getInitialState:e=>({...e,pagination:{...ri(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ge("pagination",e)}),createTable:e=>{let r=!1,t=!1;e._autoResetPageIndex=()=>{var n,o;if(!r){e._queue(()=>{r=!0});return}if((n=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=n=>{const o=a=>Kt(n,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=n=>{var o;e.setPagination(n?ri():(o=e.initialState.pagination)!=null?o:ri())},e.setPageIndex=n=>{e.setPagination(o=>{let a=Kt(n,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...o,pageIndex:a}})},e.resetPageIndex=n=>{var o,a;e.setPageIndex(n?Pi:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:Pi)},e.resetPageSize=n=>{var o,a;e.setPageSize(n?Ti:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:Ti)},e.setPageSize=n=>{e.setPagination(o=>{const a=Math.max(1,Kt(n,o.pageSize)),i=o.pageSize*o.pageIndex,s=Math.floor(i/a);return{...o,pageIndex:s,pageSize:a}})},e.setPageCount=n=>e.setPagination(o=>{var a;let i=Kt(n,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=U(()=>[e.getPageCount()],n=>{let o=[];return n&&n>0&&(o=[...new Array(n)].fill(null).map((a,i)=>i)),o},Q(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:n<o-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},oi=()=>({top:[],bottom:[]}),dC={getInitialState:e=>({rowPinning:oi(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ge("rowPinning",e)}),createRow:(e,r)=>{e.pin=(t,n,o)=>{const a=n?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],i=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],s=new Set([...i,e.id,...a]);r.setRowPinning(l=>{var c,u;if(t==="bottom"){var f,p;return{top:((f=l==null?void 0:l.top)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((p=l==null?void 0:l.bottom)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(t==="top"){var d,g;return{top:[...((d=l==null?void 0:l.top)!=null?d:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((g=l==null?void 0:l.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((u=l==null?void 0:l.bottom)!=null?u:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:n,enablePinning:o}=r.options;return typeof n=="function"?n(e):(t=n??o)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:n,bottom:o}=r.getState().rowPinning,a=t.some(s=>n==null?void 0:n.includes(s)),i=t.some(s=>o==null?void 0:o.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,n;const o=e.getIsPinned();if(!o)return-1;const a=(t=o==="top"?r.getTopRows():r.getBottomRows())==null?void 0:t.map(i=>{let{id:s}=i;return s});return(n=a==null?void 0:a.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=r=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(r),e.resetRowPinning=r=>{var t,n;return e.setRowPinning(r?oi():(t=(n=e.initialState)==null?void 0:n.rowPinning)!=null?t:oi())},e.getIsSomeRowsPinned=r=>{var t;const n=e.getState().rowPinning;if(!r){var o,a;return!!((o=n.top)!=null&&o.length||(a=n.bottom)!=null&&a.length)}return!!((t=n[r])!=null&&t.length)},e._getPinnedRows=(r,t,n)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(t??[]).map(i=>{const s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(t??[]).map(i=>r.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:n}))},e.getTopRows=U(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(r,t)=>e._getPinnedRows(r,t,"top"),Q(e.options,"debugRows","getTopRows")),e.getBottomRows=U(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(r,t)=>e._getPinnedRows(r,t,"bottom"),Q(e.options,"debugRows","getBottomRows")),e.getCenterRows=U(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(r,t,n)=>{const o=new Set([...t??[],...n??[]]);return r.filter(a=>!o.has(a.id))},Q(e.options,"debugRows","getCenterRows"))}},fC={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ge("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=r=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(r),e.resetRowSelection=r=>{var t;return e.setRowSelection(r?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=r=>{e.setRowSelection(t=>{r=typeof r<"u"?r:!e.getIsAllRowsSelected();const n={...t},o=e.getPreGroupedRowModel().flatRows;return r?o.forEach(a=>{a.getCanSelect()&&(n[a.id]=!0)}):o.forEach(a=>{delete n[a.id]}),n})},e.toggleAllPageRowsSelected=r=>e.setRowSelection(t=>{const n=typeof r<"u"?r:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(a=>{Ii(o,a.id,n,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=U(()=>[e.getState().rowSelection,e.getCoreRowModel()],(r,t)=>Object.keys(r).length?ai(e,t):{rows:[],flatRows:[],rowsById:{}},Q(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=U(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(r,t)=>Object.keys(r).length?ai(e,t):{rows:[],flatRows:[],rowsById:{}},Q(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=U(()=>[e.getState().rowSelection,e.getSortedRowModel()],(r,t)=>Object.keys(r).length?ai(e,t):{rows:[],flatRows:[],rowsById:{}},Q(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const r=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let n=!!(r.length&&Object.keys(t).length);return n&&r.some(o=>o.getCanSelect()&&!t[o.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const r=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState();let n=!!r.length;return n&&r.some(o=>!t[o.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var r;const t=Object.keys((r=e.getState().rowSelection)!=null?r:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const r=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:r.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>r=>{e.toggleAllRowsSelected(r.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>r=>{e.toggleAllPageRowsSelected(r.target.checked)}},createRow:(e,r)=>{e.toggleSelected=(t,n)=>{const o=e.getIsSelected();r.setRowSelection(a=>{var i;if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return a;const s={...a};return Ii(s,e.id,t,(i=n==null?void 0:n.selectChildren)!=null?i:!0,r),s})},e.getIsSelected=()=>{const{rowSelection:t}=r.getState();return ks(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=r.getState();return Oi(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=r.getState();return Oi(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof r.options.enableRowSelection=="function"?r.options.enableRowSelection(e):(t=r.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof r.options.enableSubRowSelection=="function"?r.options.enableSubRowSelection(e):(t=r.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof r.options.enableMultiRowSelection=="function"?r.options.enableMultiRowSelection(e):(t=r.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var o;t&&e.toggleSelected((o=n.target)==null?void 0:o.checked)}}}},Ii=(e,r,t,n,o)=>{var a;const i=o.getRow(r,!0);t?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[r]=!0)):delete e[r],n&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>Ii(e,s.id,t,n,o))};function ai(e,r){const t=e.getState().rowSelection,n=[],o={},a=function(i,s){return i.map(l=>{var c;const u=ks(l,t);if(u&&(n.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:a(l.subRows)}),u)return l}).filter(Boolean)};return{rows:a(r.rows),flatRows:n,rowsById:o}}function ks(e,r){var t;return(t=r[e.id])!=null?t:!1}function Oi(e,r,t){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let o=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!o)&&(i.getCanSelect()&&(ks(i,r)?a=!0:o=!1),i.subRows&&i.subRows.length)){const s=Oi(i,r);s==="all"?a=!0:(s==="some"&&(a=!0),o=!1)}}),o?"all":a?"some":!1}const Fi=/([0-9]+)/gm,pC=(e,r,t)=>Mf(tn(e.getValue(t)).toLowerCase(),tn(r.getValue(t)).toLowerCase()),gC=(e,r,t)=>Mf(tn(e.getValue(t)),tn(r.getValue(t))),mC=(e,r,t)=>Cs(tn(e.getValue(t)).toLowerCase(),tn(r.getValue(t)).toLowerCase()),hC=(e,r,t)=>Cs(tn(e.getValue(t)),tn(r.getValue(t))),vC=(e,r,t)=>{const n=e.getValue(t),o=r.getValue(t);return n>o?1:n<o?-1:0},_C=(e,r,t)=>Cs(e.getValue(t),r.getValue(t));function Cs(e,r){return e===r?0:e>r?1:-1}function tn(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Mf(e,r){const t=e.split(Fi).filter(Boolean),n=r.split(Fi).filter(Boolean);for(;t.length&&n.length;){const o=t.shift(),a=n.shift(),i=parseInt(o,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(o>a)return 1;if(a>o)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return t.length-n.length}const ar={alphanumeric:pC,alphanumericCaseSensitive:gC,text:mC,textCaseSensitive:hC,datetime:vC,basic:_C},bC={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ge("sorting",e),isMultiSortEvent:r=>r.shiftKey}),createColumn:(e,r)=>{e.getAutoSortingFn=()=>{const t=r.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const o of t){const a=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return ar.datetime;if(typeof a=="string"&&(n=!0,a.split(Fi).length>1))return ar.alphanumeric}return n?ar.text:ar.basic},e.getAutoSortDir=()=>{const t=r.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,n;if(!e)throw new Error;return $a(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(n=r.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?t:ar[e.columnDef.sortingFn]},e.toggleSorting=(t,n)=>{const o=e.getNextSortingOrder(),a=typeof t<"u"&&t!==null;r.setSorting(i=>{const s=i==null?void 0:i.find(d=>d.id===e.id),l=i==null?void 0:i.findIndex(d=>d.id===e.id);let c=[],u,f=a?t:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&n?s?u="toggle":u="add":i!=null&&i.length&&l!==i.length-1?u="replace":s?u="toggle":u="replace",u==="toggle"&&(a||o||(u="remove")),u==="add"){var p;c=[...i,{id:e.id,desc:f}],c.splice(0,c.length-((p=r.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=i.map(d=>d.id===e.id?{...d,desc:f}:d):u==="remove"?c=i.filter(d=>d.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var t,n;return((t=(n=e.columnDef.sortDescFirst)!=null?n:r.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var n,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((n=r.options.enableSortingRemoval)==null||n)&&(!(t&&(o=r.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var t,n;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((n=r.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,n;return(t=(n=e.columnDef.enableMultiSort)!=null?n:r.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const n=(t=r.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,n;return(t=(n=r.getState().sorting)==null?void 0:n.findIndex(o=>o.id===e.id))!=null?t:-1},e.clearSorting=()=>{r.setSorting(t=>t!=null&&t.length?t.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return n=>{t&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?r.options.isMultiSortEvent==null?void 0:r.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=r=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(r),e.resetSorting=r=>{var t,n;e.setSorting(r?[]:(t=(n=e.initialState)==null?void 0:n.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},yC=[jk,iC,tC,nC,Yk,Vk,sC,lC,bC,Jk,cC,uC,dC,fC,oC];function wC(e){var r,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const n=[...yC,...(r=e._features)!=null?r:[]];let o={_features:n};const a=o._features.reduce((p,d)=>Object.assign(p,d.getDefaultOptions==null?void 0:d.getDefaultOptions(o)),{}),i=p=>o.options.mergeOptions?o.options.mergeOptions(a,p):{...a,...p};let l={...{},...(t=e.initialState)!=null?t:{}};o._features.forEach(p=>{var d;l=(d=p.getInitialState==null?void 0:p.getInitialState(l))!=null?d:l});const c=[];let u=!1;const f={_features:n,options:{...a,...e},initialState:l,_queue:p=>{c.push(p),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(d=>setTimeout(()=>{throw d})))},reset:()=>{o.setState(o.initialState)},setOptions:p=>{const d=Kt(p,o.options);o.options=i(d)},getState:()=>o.options.state,setState:p=>{o.options.onStateChange==null||o.options.onStateChange(p)},_getRowId:(p,d,g)=>{var m;return(m=o.options.getRowId==null?void 0:o.options.getRowId(p,d,g))!=null?m:`${g?[g.id,d].join("."):d}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(p,d)=>{let g=(d?o.getPrePaginationRowModel():o.getRowModel()).rowsById[p];if(!g&&(g=o.getCoreRowModel().rowsById[p],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${p}`):new Error;return g},_getDefaultColumnDef:U(()=>[o.options.defaultColumn],p=>{var d;return p=(d=p)!=null?d:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,_;return(m=(_=g.renderValue())==null||_.toString==null?void 0:_.toString())!=null?m:null},...o._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...p}},Q(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:U(()=>[o._getColumnDefs()],p=>{const d=function(g,m,_){return _===void 0&&(_=0),g.map(y=>{const x=Ak(o,y,_,m),w=y;return x.columns=w.columns?d(w.columns,x,_+1):[],x})};return d(p)},Q(e,"debugColumns","getAllColumns")),getAllFlatColumns:U(()=>[o.getAllColumns()],p=>p.flatMap(d=>d.getFlatColumns()),Q(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:U(()=>[o.getAllFlatColumns()],p=>p.reduce((d,g)=>(d[g.id]=g,d),{}),Q(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:U(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(p,d)=>{let g=p.flatMap(m=>m.getLeafColumns());return d(g)},Q(e,"debugColumns","getAllLeafColumns")),getColumn:p=>{const d=o._getAllFlatColumnsById()[p];return process.env.NODE_ENV!=="production"&&!d&&console.error(`[Table] Column with id '${p}' does not exist.`),d}};Object.assign(o,f);for(let p=0;p<o._features.length;p++){const d=o._features[p];d==null||d.createTable==null||d.createTable(o)}return o}function xC(){return e=>U(()=>[e.options.data],r=>{const t={rows:[],flatRows:[],rowsById:{}},n=function(o,a,i){a===void 0&&(a=0);const s=[];for(let c=0;c<o.length;c++){const u=Hk(e,e._getRowId(o[c],c,i),o[c],c,a,void 0,i==null?void 0:i.id);if(t.flatRows.push(u),t.rowsById[u.id]=u,s.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(o[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=n(u.originalSubRows,a+1,u))}}return s};return t.rows=n(r),t},Q(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function SC(e){const r=[],t=n=>{var o;r.push(n),(o=n.subRows)!=null&&o.length&&n.getIsExpanded()&&n.subRows.forEach(t)};return e.rows.forEach(t),{rows:r,flatRows:e.flatRows,rowsById:e.rowsById}}function $C(e){return r=>U(()=>[r.getState().pagination,r.getPrePaginationRowModel(),r.options.paginateExpandedRows?void 0:r.getState().expanded],(t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:a}=t;let{rows:i,flatRows:s,rowsById:l}=n;const c=o*a,u=c+o;i=i.slice(c,u);let f;r.options.paginateExpandedRows?f={rows:i,flatRows:s,rowsById:l}:f=SC({rows:i,flatRows:s,rowsById:l}),f.flatRows=[];const p=d=>{f.flatRows.push(d),d.subRows.length&&d.subRows.forEach(p)};return f.rows.forEach(p),f},Q(r.options,"debugTable","getPaginationRowModel"))}function kC(){return e=>U(()=>[e.getState().sorting,e.getPreSortedRowModel()],(r,t)=>{if(!t.rows.length||!(r!=null&&r.length))return t;const n=e.getState().sorting,o=[],a=n.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),i={};a.forEach(l=>{const c=e.getColumn(l.id);c&&(i[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const s=l=>{const c=l.map(u=>({...u}));return c.sort((u,f)=>{for(let d=0;d<a.length;d+=1){var p;const g=a[d],m=i[g.id],_=m.sortUndefined,y=(p=g==null?void 0:g.desc)!=null?p:!1;let x=0;if(_){const w=u.getValue(g.id),$=f.getValue(g.id),C=w===void 0,k=$===void 0;if(C||k){if(_==="first")return C?-1:1;if(_==="last")return C?1:-1;x=C&&k?0:C?_:-_}}if(x===0&&(x=m.sortingFn(u,f,g.id)),x!==0)return y&&(x*=-1),m.invertSorting&&(x*=-1),x}return u.index-f.index}),c.forEach(u=>{var f;o.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=s(u.subRows))}),c};return{rows:s(t.rows),flatRows:o,rowsById:t.rowsById}},Q(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
2267
|
-
|
|
2268
|
-
*
|
|
2269
|
-
* Copyright (c) TanStack
|
|
2270
|
-
*
|
|
2271
|
-
* This source code is licensed under the MIT license found in the
|
|
2272
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
2273
|
-
*
|
|
2274
|
-
* @license MIT
|
|
2275
|
-
*/function Li(e,r){return e?CC(e)?h.createElement(e,r):e:null}function CC(e){return DC(e)||typeof e=="function"||EC(e)}function DC(e){return typeof e=="function"&&(()=>{const r=Object.getPrototypeOf(e);return r.prototype&&r.prototype.isReactComponent})()}function EC(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function MC(e){const r={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=h.useState(()=>({current:wC(r)})),[n,o]=h.useState(()=>t.current.initialState);return t.current.setOptions(a=>({...a,...e,state:{...n,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),t.current}const RC=S.default.button`
|
|
2276
|
-
${nn}
|
|
2234
|
+
color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return o}}function U(e,r,n,t){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[r]},key:process.env.NODE_ENV==="development"&&n,onChange:t}}function Fk(e,r,n,t){const o=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${r.id}_${n.id}`,row:r,column:n,getValue:()=>r.getValue(t),renderValue:o,getContext:K(()=>[e,n,r,a],(i,s,l,c)=>({table:i,column:s,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),U(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,n,r,e)},{}),a}function Lk(e,r,n,t){var o,a;const s={...e._getDefaultColumnDef(),...r},l=s.accessorKey;let c=(o=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof s.header=="string"?s.header:void 0,u;if(s.accessorFn?u=s.accessorFn:l&&(l.includes(".")?u=p=>{let f=p;for(const m of l.split(".")){var g;f=(g=f)==null?void 0:g[m],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${m}" in deeply nested key "${l}" returned undefined.`)}return f}:u=p=>p[s.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(s.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(c)}`,accessorFn:u,parent:t,depth:n,columnDef:s,columns:[],getFlatColumns:K(()=>[!0],()=>{var p;return[d,...(p=d.columns)==null?void 0:p.flatMap(f=>f.getFlatColumns())]},U(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:K(()=>[e._getOrderColumnsFn()],p=>{var f;if((f=d.columns)!=null&&f.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return p(g)}return[d]},U(e.options,"debugColumns","column.getLeafColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(d,e);return d}const Re="debugHeaders";function Sc(e,r,n){var t;let a={id:(t=n.id)!=null?t:r.id,column:r,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l)};return s(a),i},getContext:()=>({table:e,header:a,column:r})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const zk={createTable:e=>{e.getHeaderGroups=K(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(r,n,t,o)=>{var a,i;const s=(a=t?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?a:[],l=(i=o?.map(d=>n.find(p=>p.id===d)).filter(Boolean))!=null?i:[],c=n.filter(d=>!(t!=null&&t.includes(d.id))&&!(o!=null&&o.includes(d.id)));return oo(r,[...s,...c,...l],e)},U(e.options,Re,"getHeaderGroups")),e.getCenterHeaderGroups=K(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(r,n,t,o)=>(n=n.filter(a=>!(t!=null&&t.includes(a.id))&&!(o!=null&&o.includes(a.id))),oo(r,n,e,"center")),U(e.options,Re,"getCenterHeaderGroups")),e.getLeftHeaderGroups=K(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(r,n,t)=>{var o;const a=(o=t?.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return oo(r,a,e,"left")},U(e.options,Re,"getLeftHeaderGroups")),e.getRightHeaderGroups=K(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(r,n,t)=>{var o;const a=(o=t?.map(i=>n.find(s=>s.id===i)).filter(Boolean))!=null?o:[];return oo(r,a,e,"right")},U(e.options,Re,"getRightHeaderGroups")),e.getFooterGroups=K(()=>[e.getHeaderGroups()],r=>[...r].reverse(),U(e.options,Re,"getFooterGroups")),e.getLeftFooterGroups=K(()=>[e.getLeftHeaderGroups()],r=>[...r].reverse(),U(e.options,Re,"getLeftFooterGroups")),e.getCenterFooterGroups=K(()=>[e.getCenterHeaderGroups()],r=>[...r].reverse(),U(e.options,Re,"getCenterFooterGroups")),e.getRightFooterGroups=K(()=>[e.getRightHeaderGroups()],r=>[...r].reverse(),U(e.options,Re,"getRightFooterGroups")),e.getFlatHeaders=K(()=>[e.getHeaderGroups()],r=>r.map(n=>n.headers).flat(),U(e.options,Re,"getFlatHeaders")),e.getLeftFlatHeaders=K(()=>[e.getLeftHeaderGroups()],r=>r.map(n=>n.headers).flat(),U(e.options,Re,"getLeftFlatHeaders")),e.getCenterFlatHeaders=K(()=>[e.getCenterHeaderGroups()],r=>r.map(n=>n.headers).flat(),U(e.options,Re,"getCenterFlatHeaders")),e.getRightFlatHeaders=K(()=>[e.getRightHeaderGroups()],r=>r.map(n=>n.headers).flat(),U(e.options,Re,"getRightFlatHeaders")),e.getCenterLeafHeaders=K(()=>[e.getCenterFlatHeaders()],r=>r.filter(n=>{var t;return!((t=n.subHeaders)!=null&&t.length)}),U(e.options,Re,"getCenterLeafHeaders")),e.getLeftLeafHeaders=K(()=>[e.getLeftFlatHeaders()],r=>r.filter(n=>{var t;return!((t=n.subHeaders)!=null&&t.length)}),U(e.options,Re,"getLeftLeafHeaders")),e.getRightLeafHeaders=K(()=>[e.getRightFlatHeaders()],r=>r.filter(n=>{var t;return!((t=n.subHeaders)!=null&&t.length)}),U(e.options,Re,"getRightLeafHeaders")),e.getLeafHeaders=K(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(r,n,t)=>{var o,a,i,s,l,c;return[...(o=(a=r[0])==null?void 0:a.headers)!=null?o:[],...(i=(s=n[0])==null?void 0:s.headers)!=null?i:[],...(l=(c=t[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},U(e.options,Re,"getLeafHeaders"))}};function oo(e,r,n,t){var o,a;let i=0;const s=function(p,f){f===void 0&&(f=1),i=Math.max(i,f),p.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&s(g.columns,f+1)},0)};s(e);let l=[];const c=(p,f)=>{const g={depth:f,id:[t,`${f}`].filter(Boolean).join("_"),headers:[]},m=[];p.forEach(h=>{const b=[...m].reverse()[0],w=h.column.depth===g.depth;let x,$=!1;if(w&&h.column.parent?x=h.column.parent:(x=h.column,$=!0),b&&b?.column===x)b.subHeaders.push(h);else{const C=Sc(n,x,{id:[t,f,x.id,h?.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${m.filter(k=>k.column===x).length}`:void 0,depth:f,index:m.length});C.subHeaders.push(h),m.push(C)}g.headers.push(h),h.headerGroup=g}),l.push(g),f>0&&c(m,f-1)},u=r.map((p,f)=>Sc(n,p,{depth:i,index:f}));c(u,i-1),l.reverse();const d=p=>p.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,h=0,b=[0];g.subHeaders&&g.subHeaders.length?(b=[],d(g.subHeaders).forEach(x=>{let{colSpan:$,rowSpan:C}=x;m+=$,b.push(C)})):m=1;const w=Math.min(...b);return h=h+w,g.colSpan=m,g.rowSpan=h,{colSpan:m,rowSpan:h}});return d((o=(a=l[0])==null?void 0:a.headers)!=null?o:[]),l}const Nk=(e,r,n,t,o,a,i)=>{let s={id:r,index:t,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return s._valuesCache[l]=c.accessorFn(s.original,t),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=c.columnDef.getUniqueValues(s.original,t),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=s.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Ok(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],c=s;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:K(()=>[e.getAllLeafColumns()],l=>l.map(c=>Fk(e,s,c,c.id)),U(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:K(()=>[s.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),U(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(s,e)}return s},Ak={createColumn:(e,r)=>{e._getFacetedRowModel=r.options.getFacetedRowModel&&r.options.getFacetedRowModel(r,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():r.getPreFilteredRowModel(),e._getFacetedUniqueValues=r.options.getFacetedUniqueValues&&r.options.getFacetedUniqueValues(r,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=r.options.getFacetedMinMaxValues&&r.options.getFacetedMinMaxValues(r,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},yf=(e,r,n)=>{var t,o;const a=n==null||(t=n.toString())==null?void 0:t.toLowerCase();return!!(!((o=e.getValue(r))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};yf.autoRemove=e=>at(e);const wf=(e,r,n)=>{var t;return!!(!((t=e.getValue(r))==null||(t=t.toString())==null)&&t.includes(n))};wf.autoRemove=e=>at(e);const xf=(e,r,n)=>{var t;return((t=e.getValue(r))==null||(t=t.toString())==null?void 0:t.toLowerCase())===n?.toLowerCase()};xf.autoRemove=e=>at(e);const Sf=(e,r,n)=>{var t;return(t=e.getValue(r))==null?void 0:t.includes(n)};Sf.autoRemove=e=>at(e);const $f=(e,r,n)=>!n.some(t=>{var o;return!((o=e.getValue(r))!=null&&o.includes(t))});$f.autoRemove=e=>at(e)||!(e!=null&&e.length);const kf=(e,r,n)=>n.some(t=>{var o;return(o=e.getValue(r))==null?void 0:o.includes(t)});kf.autoRemove=e=>at(e)||!(e!=null&&e.length);const Cf=(e,r,n)=>e.getValue(r)===n;Cf.autoRemove=e=>at(e);const Df=(e,r,n)=>e.getValue(r)==n;Df.autoRemove=e=>at(e);const Ss=(e,r,n)=>{let[t,o]=n;const a=e.getValue(r);return a>=t&&a<=o};Ss.resolveFilterValue=e=>{let[r,n]=e,t=typeof r!="number"?parseFloat(r):r,o=typeof n!="number"?parseFloat(n):n,a=r===null||Number.isNaN(t)?-1/0:t,i=n===null||Number.isNaN(o)?1/0:o;if(a>i){const s=a;a=i,i=s}return[a,i]};Ss.autoRemove=e=>at(e)||at(e[0])&&at(e[1]);const St={includesString:yf,includesStringSensitive:wf,equalsString:xf,arrIncludes:Sf,arrIncludesAll:$f,arrIncludesSome:kf,equals:Cf,weakEquals:Df,inNumberRange:Ss};function at(e){return e==null||e===""}const jk={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:We("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,r)=>{e.getAutoFilterFn=()=>{const n=r.getCoreRowModel().flatRows[0],t=n?.getValue(e.id);return typeof t=="string"?St.includesString:typeof t=="number"?St.inNumberRange:typeof t=="boolean"||t!==null&&typeof t=="object"?St.equals:Array.isArray(t)?St.arrIncludes:St.weakEquals},e.getFilterFn=()=>{var n,t;return Sa(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(t=r.options.filterFns)==null?void 0:t[e.columnDef.filterFn])!=null?n:St[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,t,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((t=r.options.enableColumnFilters)!=null?t:!0)&&((o=r.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=r.getState().columnFilters)==null||(n=n.find(t=>t.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,t;return(n=(t=r.getState().columnFilters)==null?void 0:t.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{r.setColumnFilters(t=>{const o=e.getFilterFn(),a=t?.find(u=>u.id===e.id),i=qt(n,a?a.value:void 0);if($c(o,i,e)){var s;return(s=t?.filter(u=>u.id!==e.id))!=null?s:[]}const l={id:e.id,value:i};if(a){var c;return(c=t?.map(u=>u.id===e.id?l:u))!=null?c:[]}return t!=null&&t.length?[...t,l]:[l]})}},createRow:(e,r)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=r=>{const n=e.getAllLeafColumns(),t=o=>{var a;return(a=qt(r,o))==null?void 0:a.filter(i=>{const s=n.find(l=>l.id===i.id);if(s){const l=s.getFilterFn();if($c(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(t)},e.resetColumnFilters=r=>{var n,t;e.setColumnFilters(r?[]:(n=(t=e.initialState)==null?void 0:t.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function $c(e,r,n){return(e&&e.autoRemove?e.autoRemove(r,n):!1)||typeof r>"u"||typeof r=="string"&&!r}const Hk=(e,r,n)=>n.reduce((t,o)=>{const a=o.getValue(e);return t+(typeof a=="number"?a:0)},0),Yk=(e,r,n)=>{let t;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(t>a||t===void 0&&a>=a)&&(t=a)}),t},Vk=(e,r,n)=>{let t;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(t<a||t===void 0&&a>=a)&&(t=a)}),t},Bk=(e,r,n)=>{let t,o;return n.forEach(a=>{const i=a.getValue(e);i!=null&&(t===void 0?i>=i&&(t=o=i):(t>i&&(t=i),o<i&&(o=i)))}),[t,o]},Wk=(e,r)=>{let n=0,t=0;if(r.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++n,t+=a)}),n)return t/n},Gk=(e,r)=>{if(!r.length)return;const n=r.map(a=>a.getValue(e));if(!Ik(n))return;if(n.length===1)return n[0];const t=Math.floor(n.length/2),o=n.sort((a,i)=>a-i);return n.length%2!==0?o[t]:(o[t-1]+o[t])/2},qk=(e,r)=>Array.from(new Set(r.map(n=>n.getValue(e))).values()),Kk=(e,r)=>new Set(r.map(n=>n.getValue(e))).size,Uk=(e,r)=>r.length,Za={sum:Hk,min:Yk,max:Vk,extent:Bk,mean:Wk,median:Gk,unique:qk,uniqueCount:Kk,count:Uk},Qk={getDefaultColumnDef:()=>({aggregatedCell:e=>{var r,n;return(r=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?r:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:We("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,r)=>{e.toggleGrouping=()=>{r.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(t=>t!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,t;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((t=r.options.enableGrouping)!=null?t:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=r.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=r.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=r.getCoreRowModel().flatRows[0],t=n?.getValue(e.id);if(typeof t=="number")return Za.sum;if(Object.prototype.toString.call(t)==="[object Date]")return Za.extent},e.getAggregationFn=()=>{var n,t;if(!e)throw new Error;return Sa(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(t=r.options.aggregationFns)==null?void 0:t[e.columnDef.aggregationFn])!=null?n:Za[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=r=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(r),e.resetGrouping=r=>{var n,t;e.setGrouping(r?[]:(n=(t=e.initialState)==null?void 0:t.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,r)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const t=r.getColumn(n);return t!=null&&t.columnDef.getGroupingValue?(e._groupingValuesCache[n]=t.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,r,n,t)=>{e.getIsGrouped=()=>r.getIsGrouped()&&r.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&r.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function Xk(e,r,n){if(!(r!=null&&r.length)||!n)return e;const t=e.filter(a=>!r.includes(a.id));return n==="remove"?t:[...r.map(a=>e.find(i=>i.id===a)).filter(Boolean),...t]}const Zk={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:We("columnOrder",e)}),createColumn:(e,r)=>{e.getIndex=K(n=>[mr(r,n)],n=>n.findIndex(t=>t.id===e.id),U(r.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var t;return((t=mr(r,n)[0])==null?void 0:t.id)===e.id},e.getIsLastColumn=n=>{var t;const o=mr(r,n);return((t=o[o.length-1])==null?void 0:t.id)===e.id}},createTable:e=>{e.setColumnOrder=r=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(r),e.resetColumnOrder=r=>{var n;e.setColumnOrder(r?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=K(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(r,n,t)=>o=>{let a=[];if(!(r!=null&&r.length))a=o;else{const i=[...r],s=[...o];for(;s.length&&i.length;){const l=i.shift(),c=s.findIndex(u=>u.id===l);c>-1&&a.push(s.splice(c,1)[0])}a=[...a,...s]}return Xk(a,n,t)},U(e.options,"debugTable","_getOrderColumnsFn"))}},Ja=()=>({left:[],right:[]}),Jk={getInitialState:e=>({columnPinning:Ja(),...e}),getDefaultOptions:e=>({onColumnPinningChange:We("columnPinning",e)}),createColumn:(e,r)=>{e.pin=n=>{const t=e.getLeafColumns().map(o=>o.id).filter(Boolean);r.setColumnPinning(o=>{var a,i;if(n==="right"){var s,l;return{left:((s=o?.left)!=null?s:[]).filter(d=>!(t!=null&&t.includes(d))),right:[...((l=o?.right)!=null?l:[]).filter(d=>!(t!=null&&t.includes(d))),...t]}}if(n==="left"){var c,u;return{left:[...((c=o?.left)!=null?c:[]).filter(d=>!(t!=null&&t.includes(d))),...t],right:((u=o?.right)!=null?u:[]).filter(d=>!(t!=null&&t.includes(d)))}}return{left:((a=o?.left)!=null?a:[]).filter(d=>!(t!=null&&t.includes(d))),right:((i=o?.right)!=null?i:[]).filter(d=>!(t!=null&&t.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(t=>{var o,a,i;return((o=t.columnDef.enablePinning)!=null?o:!0)&&((a=(i=r.options.enableColumnPinning)!=null?i:r.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:t,right:o}=r.getState().columnPinning,a=n.some(s=>t?.includes(s)),i=n.some(s=>o?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,t;const o=e.getIsPinned();return o?(n=(t=r.getState().columnPinning)==null||(t=t[o])==null?void 0:t.indexOf(e.id))!=null?n:-1:0}},createRow:(e,r)=>{e.getCenterVisibleCells=K(()=>[e._getAllVisibleCells(),r.getState().columnPinning.left,r.getState().columnPinning.right],(n,t,o)=>{const a=[...t??[],...o??[]];return n.filter(i=>!a.includes(i.column.id))},U(r.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=K(()=>[e._getAllVisibleCells(),r.getState().columnPinning.left],(n,t)=>(t??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),U(r.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=K(()=>[e._getAllVisibleCells(),r.getState().columnPinning.right],(n,t)=>(t??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),U(r.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=r=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(r),e.resetColumnPinning=r=>{var n,t;return e.setColumnPinning(r?Ja():(n=(t=e.initialState)==null?void 0:t.columnPinning)!=null?n:Ja())},e.getIsSomeColumnsPinned=r=>{var n;const t=e.getState().columnPinning;if(!r){var o,a;return!!((o=t.left)!=null&&o.length||(a=t.right)!=null&&a.length)}return!!((n=t[r])!=null&&n.length)},e.getLeftLeafColumns=K(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(r,n)=>(n??[]).map(t=>r.find(o=>o.id===t)).filter(Boolean),U(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=K(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(r,n)=>(n??[]).map(t=>r.find(o=>o.id===t)).filter(Boolean),U(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=K(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(r,n,t)=>{const o=[...n??[],...t??[]];return r.filter(a=>!o.includes(a.id))},U(e.options,"debugColumns","getCenterLeafColumns"))}};function eC(e){return e||(typeof document<"u"?document:null)}const ao={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ei=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),tC={getDefaultColumnDef:()=>ao,getInitialState:e=>({columnSizing:{},columnSizingInfo:ei(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:We("columnSizing",e),onColumnSizingInfoChange:We("columnSizingInfo",e)}),createColumn:(e,r)=>{e.getSize=()=>{var n,t,o;const a=r.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:ao.minSize,(t=a??e.columnDef.size)!=null?t:ao.size),(o=e.columnDef.maxSize)!=null?o:ao.maxSize)},e.getStart=K(n=>[n,mr(r,n),r.getState().columnSizing],(n,t)=>t.slice(0,e.getIndex(n)).reduce((o,a)=>o+a.getSize(),0),U(r.options,"debugColumns","getStart")),e.getAfter=K(n=>[n,mr(r,n),r.getState().columnSizing],(n,t)=>t.slice(e.getIndex(n)+1).reduce((o,a)=>o+a.getSize(),0),U(r.options,"debugColumns","getAfter")),e.resetSize=()=>{r.setColumnSizing(n=>{let{[e.id]:t,...o}=n;return o})},e.getCanResize=()=>{var n,t;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((t=r.options.enableColumnResizing)!=null?t:!0)},e.getIsResizing=()=>r.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,r)=>{e.getSize=()=>{let n=0;const t=o=>{if(o.subHeaders.length)o.subHeaders.forEach(t);else{var a;n+=(a=o.column.getSize())!=null?a:0}};return t(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const t=r.getColumn(e.column.id),o=t?.getCanResize();return a=>{if(!t||!o||(a.persist==null||a.persist(),ti(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),s=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[t.id,t.getSize()]],l=ti(a)?Math.round(a.touches[0].clientX):a.clientX,c={},u=(b,w)=>{typeof w=="number"&&(r.setColumnSizingInfo(x=>{var $,C;const k=r.options.columnResizeDirection==="rtl"?-1:1,E=(w-(($=x?.startOffset)!=null?$:0))*k,P=Math.max(E/((C=x?.startSize)!=null?C:0),-.999999);return x.columnSizingStart.forEach(z=>{let[L,O]=z;c[L]=Math.round(Math.max(O+O*P,0)*100)/100}),{...x,deltaOffset:E,deltaPercentage:P}}),(r.options.columnResizeMode==="onChange"||b==="end")&&r.setColumnSizing(x=>({...x,...c})))},d=b=>u("move",b),p=b=>{u("end",b),r.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=eC(n),g={moveHandler:b=>d(b.clientX),upHandler:b=>{f?.removeEventListener("mousemove",g.moveHandler),f?.removeEventListener("mouseup",g.upHandler),p(b.clientX)}},m={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),d(b.touches[0].clientX),!1),upHandler:b=>{var w;f?.removeEventListener("touchmove",m.moveHandler),f?.removeEventListener("touchend",m.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),p((w=b.touches[0])==null?void 0:w.clientX)}},h=nC()?{passive:!1}:!1;ti(a)?(f?.addEventListener("touchmove",m.moveHandler,h),f?.addEventListener("touchend",m.upHandler,h)):(f?.addEventListener("mousemove",g.moveHandler,h),f?.addEventListener("mouseup",g.upHandler,h)),r.setColumnSizingInfo(b=>({...b,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:t.id}))}}},createTable:e=>{e.setColumnSizing=r=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(r),e.setColumnSizingInfo=r=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(r),e.resetColumnSizing=r=>{var n;e.setColumnSizing(r?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=r=>{var n;e.setColumnSizingInfo(r?ei():(n=e.initialState.columnSizingInfo)!=null?n:ei())},e.getTotalSize=()=>{var r,n;return(r=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((t,o)=>t+o.getSize(),0))!=null?r:0},e.getLeftTotalSize=()=>{var r,n;return(r=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((t,o)=>t+o.getSize(),0))!=null?r:0},e.getCenterTotalSize=()=>{var r,n;return(r=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((t,o)=>t+o.getSize(),0))!=null?r:0},e.getRightTotalSize=()=>{var r,n;return(r=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((t,o)=>t+o.getSize(),0))!=null?r:0}}};let io=null;function nC(){if(typeof io=="boolean")return io;let e=!1;try{const r={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,r),window.removeEventListener("test",n)}catch{e=!1}return io=e,io}function ti(e){return e.type==="touchstart"}const rC={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:We("columnVisibility",e)}),createColumn:(e,r)=>{e.toggleVisibility=n=>{e.getCanHide()&&r.setColumnVisibility(t=>({...t,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,t;const o=e.columns;return(n=o.length?o.some(a=>a.getIsVisible()):(t=r.getState().columnVisibility)==null?void 0:t[e.id])!=null?n:!0},e.getCanHide=()=>{var n,t;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((t=r.options.enableHiding)!=null?t:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,r)=>{e._getAllVisibleCells=K(()=>[e.getAllCells(),r.getState().columnVisibility],n=>n.filter(t=>t.column.getIsVisible()),U(r.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=K(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,t,o)=>[...n,...t,...o],U(r.options,"debugRows","getVisibleCells"))},createTable:e=>{const r=(n,t)=>K(()=>[t(),t().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),U(e.options,"debugColumns",n));e.getVisibleFlatColumns=r("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=r("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=r("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=r("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=r("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var t;e.setColumnVisibility(n?{}:(t=e.initialState.columnVisibility)!=null?t:{})},e.toggleAllColumnsVisible=n=>{var t;n=(t=n)!=null?t:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:n||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var t;e.toggleAllColumnsVisible((t=n.target)==null?void 0:t.checked)}}};function mr(e,r){return r?r==="center"?e.getCenterVisibleLeafColumns():r==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const oC={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},aC={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:We("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:r=>{var n;const t=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[r.id])==null?void 0:n.getValue();return typeof t=="string"||typeof t=="number"}}),createColumn:(e,r)=>{e.getCanGlobalFilter=()=>{var n,t,o,a;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((t=r.options.enableGlobalFilter)!=null?t:!0)&&((o=r.options.enableFilters)!=null?o:!0)&&((a=r.options.getColumnCanGlobalFilter==null?void 0:r.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>St.includesString,e.getGlobalFilterFn=()=>{var r,n;const{globalFilterFn:t}=e.options;return Sa(t)?t:t==="auto"?e.getGlobalAutoFilterFn():(r=(n=e.options.filterFns)==null?void 0:n[t])!=null?r:St[t]},e.setGlobalFilter=r=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(r)},e.resetGlobalFilter=r=>{e.setGlobalFilter(r?void 0:e.initialState.globalFilter)}}},iC={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:We("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let r=!1,n=!1;e._autoResetExpanded=()=>{var t,o;if(!r){e._queue(()=>{r=!0});return}if((t=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?t:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var o,a;e.setExpanded(t?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(t=>t.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{t.persist==null||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return t===!0||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return typeof t=="boolean"?t===!0:!(!Object.keys(t).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");t=Math.max(t,i.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,r)=>{e.toggleExpanded=n=>{r.setExpanded(t=>{var o;const a=t===!0?!0:!!(t!=null&&t[e.id]);let i={};if(t===!0?Object.keys(r.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=t,n=(o=n)!=null?o:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:s,...l}=i;return l}return t})},e.getIsExpanded=()=>{var n;const t=r.getState().expanded;return!!((n=r.options.getIsRowExpanded==null?void 0:r.options.getIsRowExpanded(e))!=null?n:t===!0||t?.[e.id])},e.getCanExpand=()=>{var n,t,o;return(n=r.options.getRowCanExpand==null?void 0:r.options.getRowCanExpand(e))!=null?n:((t=r.options.enableExpanding)!=null?t:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,t=e;for(;n&&t.parentId;)t=r.getRow(t.parentId,!0),n=t.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Ri=0,Pi=10,ni=()=>({pageIndex:Ri,pageSize:Pi}),sC={getInitialState:e=>({...e,pagination:{...ni(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:We("pagination",e)}),createTable:e=>{let r=!1,n=!1;e._autoResetPageIndex=()=>{var t,o;if(!r){e._queue(()=>{r=!0});return}if((t=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?t:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>{const o=a=>qt(t,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=t=>{var o;e.setPagination(t?ni():(o=e.initialState.pagination)!=null?o:ni())},e.setPageIndex=t=>{e.setPagination(o=>{let a=qt(t,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...o,pageIndex:a}})},e.resetPageIndex=t=>{var o,a;e.setPageIndex(t?Ri:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:Ri)},e.resetPageSize=t=>{var o,a;e.setPageSize(t?Pi:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:Pi)},e.setPageSize=t=>{e.setPagination(o=>{const a=Math.max(1,qt(t,o.pageSize)),i=o.pageSize*o.pageIndex,s=Math.floor(i/a);return{...o,pageIndex:s,pageSize:a}})},e.setPageCount=t=>e.setPagination(o=>{var a;let i=qt(t,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=K(()=>[e.getPageCount()],t=>{let o=[];return t&&t>0&&(o=[...new Array(t)].fill(null).map((a,i)=>i)),o},U(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:t<o-1},e.previousPage=()=>e.setPageIndex(t=>t-1),e.nextPage=()=>e.setPageIndex(t=>t+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return(t=e.options.pageCount)!=null?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return(t=e.options.rowCount)!=null?t:e.getPrePaginationRowModel().rows.length}}},ri=()=>({top:[],bottom:[]}),lC={getInitialState:e=>({rowPinning:ri(),...e}),getDefaultOptions:e=>({onRowPinningChange:We("rowPinning",e)}),createRow:(e,r)=>{e.pin=(n,t,o)=>{const a=t?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],i=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],s=new Set([...i,e.id,...a]);r.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,p;return{top:((d=l?.top)!=null?d:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((p=l?.bottom)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(n==="top"){var f,g;return{top:[...((f=l?.top)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((g=l?.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((c=l?.top)!=null?c:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((u=l?.bottom)!=null?u:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:t,enablePinning:o}=r.options;return typeof t=="function"?t(e):(n=t??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:t,bottom:o}=r.getState().rowPinning,a=n.some(s=>t?.includes(s)),i=n.some(s=>o?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,t;const o=e.getIsPinned();if(!o)return-1;const a=(n=o==="top"?r.getTopRows():r.getBottomRows())==null?void 0:n.map(i=>{let{id:s}=i;return s});return(t=a?.indexOf(e.id))!=null?t:-1}},createTable:e=>{e.setRowPinning=r=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(r),e.resetRowPinning=r=>{var n,t;return e.setRowPinning(r?ri():(n=(t=e.initialState)==null?void 0:t.rowPinning)!=null?n:ri())},e.getIsSomeRowsPinned=r=>{var n;const t=e.getState().rowPinning;if(!r){var o,a;return!!((o=t.top)!=null&&o.length||(a=t.bottom)!=null&&a.length)}return!!((n=t[r])!=null&&n.length)},e._getPinnedRows=(r,n,t)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(i=>{const s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(i=>r.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:t}))},e.getTopRows=K(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(r,n)=>e._getPinnedRows(r,n,"top"),U(e.options,"debugRows","getTopRows")),e.getBottomRows=K(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(r,n)=>e._getPinnedRows(r,n,"bottom"),U(e.options,"debugRows","getBottomRows")),e.getCenterRows=K(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(r,n,t)=>{const o=new Set([...n??[],...t??[]]);return r.filter(a=>!o.has(a.id))},U(e.options,"debugRows","getCenterRows"))}},cC={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:We("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=r=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(r),e.resetRowSelection=r=>{var n;return e.setRowSelection(r?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=r=>{e.setRowSelection(n=>{r=typeof r<"u"?r:!e.getIsAllRowsSelected();const t={...n},o=e.getPreGroupedRowModel().flatRows;return r?o.forEach(a=>{a.getCanSelect()&&(t[a.id]=!0)}):o.forEach(a=>{delete t[a.id]}),t})},e.toggleAllPageRowsSelected=r=>e.setRowSelection(n=>{const t=typeof r<"u"?r:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(a=>{Ti(o,a.id,t,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=K(()=>[e.getState().rowSelection,e.getCoreRowModel()],(r,n)=>Object.keys(r).length?oi(e,n):{rows:[],flatRows:[],rowsById:{}},U(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=K(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(r,n)=>Object.keys(r).length?oi(e,n):{rows:[],flatRows:[],rowsById:{}},U(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=K(()=>[e.getState().rowSelection,e.getSortedRowModel()],(r,n)=>Object.keys(r).length?oi(e,n):{rows:[],flatRows:[],rowsById:{}},U(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const r=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let t=!!(r.length&&Object.keys(n).length);return t&&r.some(o=>o.getCanSelect()&&!n[o.id])&&(t=!1),t},e.getIsAllPageRowsSelected=()=>{const r=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let t=!!r.length;return t&&r.some(o=>!n[o.id])&&(t=!1),t},e.getIsSomeRowsSelected=()=>{var r;const n=Object.keys((r=e.getState().rowSelection)!=null?r:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const r=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:r.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>r=>{e.toggleAllRowsSelected(r.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>r=>{e.toggleAllPageRowsSelected(r.target.checked)}},createRow:(e,r)=>{e.toggleSelected=(n,t)=>{const o=e.getIsSelected();r.setRowSelection(a=>{var i;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return a;const s={...a};return Ti(s,e.id,n,(i=t?.selectChildren)!=null?i:!0,r),s})},e.getIsSelected=()=>{const{rowSelection:n}=r.getState();return $s(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=r.getState();return Ii(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=r.getState();return Ii(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof r.options.enableRowSelection=="function"?r.options.enableRowSelection(e):(n=r.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof r.options.enableSubRowSelection=="function"?r.options.enableSubRowSelection(e):(n=r.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof r.options.enableMultiRowSelection=="function"?r.options.enableMultiRowSelection(e):(n=r.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return t=>{var o;n&&e.toggleSelected((o=t.target)==null?void 0:o.checked)}}}},Ti=(e,r,n,t,o)=>{var a;const i=o.getRow(r,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[r]=!0)):delete e[r],t&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>Ti(e,s.id,n,t,o))};function oi(e,r){const n=e.getState().rowSelection,t=[],o={},a=function(i,s){return i.map(l=>{var c;const u=$s(l,n);if(u&&(t.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:a(l.subRows)}),u)return l}).filter(Boolean)};return{rows:a(r.rows),flatRows:t,rowsById:o}}function $s(e,r){var n;return(n=r[e.id])!=null?n:!1}function Ii(e,r,n){var t;if(!((t=e.subRows)!=null&&t.length))return!1;let o=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!o)&&(i.getCanSelect()&&($s(i,r)?a=!0:o=!1),i.subRows&&i.subRows.length)){const s=Ii(i,r);s==="all"?a=!0:(s==="some"&&(a=!0),o=!1)}}),o?"all":a?"some":!1}const Oi=/([0-9]+)/gm,uC=(e,r,n)=>Ef(en(e.getValue(n)).toLowerCase(),en(r.getValue(n)).toLowerCase()),dC=(e,r,n)=>Ef(en(e.getValue(n)),en(r.getValue(n))),fC=(e,r,n)=>ks(en(e.getValue(n)).toLowerCase(),en(r.getValue(n)).toLowerCase()),pC=(e,r,n)=>ks(en(e.getValue(n)),en(r.getValue(n))),gC=(e,r,n)=>{const t=e.getValue(n),o=r.getValue(n);return t>o?1:t<o?-1:0},mC=(e,r,n)=>ks(e.getValue(n),r.getValue(n));function ks(e,r){return e===r?0:e>r?1:-1}function en(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ef(e,r){const n=e.split(Oi).filter(Boolean),t=r.split(Oi).filter(Boolean);for(;n.length&&t.length;){const o=n.shift(),a=t.shift(),i=parseInt(o,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(o>a)return 1;if(a>o)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return n.length-t.length}const or={alphanumeric:uC,alphanumericCaseSensitive:dC,text:fC,textCaseSensitive:pC,datetime:gC,basic:mC},hC={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:We("sorting",e),isMultiSortEvent:r=>r.shiftKey}),createColumn:(e,r)=>{e.getAutoSortingFn=()=>{const n=r.getFilteredRowModel().flatRows.slice(10);let t=!1;for(const o of n){const a=o?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return or.datetime;if(typeof a=="string"&&(t=!0,a.split(Oi).length>1))return or.alphanumeric}return t?or.text:or.basic},e.getAutoSortDir=()=>{const n=r.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,t;if(!e)throw new Error;return Sa(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(t=r.options.sortingFns)==null?void 0:t[e.columnDef.sortingFn])!=null?n:or[e.columnDef.sortingFn]},e.toggleSorting=(n,t)=>{const o=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;r.setSorting(i=>{const s=i?.find(f=>f.id===e.id),l=i?.findIndex(f=>f.id===e.id);let c=[],u,d=a?n:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&t?s?u="toggle":u="add":i!=null&&i.length&&l!==i.length-1?u="replace":s?u="toggle":u="replace",u==="toggle"&&(a||o||(u="remove")),u==="add"){var p;c=[...i,{id:e.id,desc:d}],c.splice(0,c.length-((p=r.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=i.map(f=>f.id===e.id?{...f,desc:d}:f):u==="remove"?c=i.filter(f=>f.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,t;return((n=(t=e.columnDef.sortDescFirst)!=null?t:r.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var t,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((t=r.options.enableSortingRemoval)==null||t)&&(!(n&&(o=r.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,t;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((t=r.options.enableSorting)!=null?t:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,t;return(n=(t=e.columnDef.enableMultiSort)!=null?t:r.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const t=(n=r.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return t?t.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,t;return(n=(t=r.getState().sorting)==null?void 0:t.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{r.setSorting(n=>n!=null&&n.length?n.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return t=>{n&&(t.persist==null||t.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?r.options.isMultiSortEvent==null?void 0:r.options.isMultiSortEvent(t):!1))}}},createTable:e=>{e.setSorting=r=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(r),e.resetSorting=r=>{var n,t;e.setSorting(r?[]:(n=(t=e.initialState)==null?void 0:t.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},vC=[zk,rC,Zk,Jk,Ak,jk,oC,aC,hC,Qk,iC,sC,lC,cC,tC];function _C(e){var r,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const t=[...vC,...(r=e._features)!=null?r:[]];let o={_features:t};const a=o._features.reduce((p,f)=>Object.assign(p,f.getDefaultOptions==null?void 0:f.getDefaultOptions(o)),{}),i=p=>o.options.mergeOptions?o.options.mergeOptions(a,p):{...a,...p};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(p=>{var f;l=(f=p.getInitialState==null?void 0:p.getInitialState(l))!=null?f:l});const c=[];let u=!1;const d={_features:t,options:{...a,...e},initialState:l,_queue:p=>{c.push(p),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{o.setState(o.initialState)},setOptions:p=>{const f=qt(p,o.options);o.options=i(f)},getState:()=>o.options.state,setState:p=>{o.options.onStateChange==null||o.options.onStateChange(p)},_getRowId:(p,f,g)=>{var m;return(m=o.options.getRowId==null?void 0:o.options.getRowId(p,f,g))!=null?m:`${g?[g.id,f].join("."):f}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(p,f)=>{let g=(f?o.getPrePaginationRowModel():o.getRowModel()).rowsById[p];if(!g&&(g=o.getCoreRowModel().rowsById[p],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${p}`):new Error;return g},_getDefaultColumnDef:K(()=>[o.options.defaultColumn],p=>{var f;return p=(f=p)!=null?f:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,h;return(m=(h=g.renderValue())==null||h.toString==null?void 0:h.toString())!=null?m:null},...o._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...p}},U(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:K(()=>[o._getColumnDefs()],p=>{const f=function(g,m,h){return h===void 0&&(h=0),g.map(b=>{const w=Lk(o,b,h,m),x=b;return w.columns=x.columns?f(x.columns,w,h+1):[],w})};return f(p)},U(e,"debugColumns","getAllColumns")),getAllFlatColumns:K(()=>[o.getAllColumns()],p=>p.flatMap(f=>f.getFlatColumns()),U(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:K(()=>[o.getAllFlatColumns()],p=>p.reduce((f,g)=>(f[g.id]=g,f),{}),U(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:K(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(p,f)=>{let g=p.flatMap(m=>m.getLeafColumns());return f(g)},U(e,"debugColumns","getAllLeafColumns")),getColumn:p=>{const f=o._getAllFlatColumnsById()[p];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${p}' does not exist.`),f}};Object.assign(o,d);for(let p=0;p<o._features.length;p++){const f=o._features[p];f==null||f.createTable==null||f.createTable(o)}return o}function bC(){return e=>K(()=>[e.options.data],r=>{const n={rows:[],flatRows:[],rowsById:{}},t=function(o,a,i){a===void 0&&(a=0);const s=[];for(let c=0;c<o.length;c++){const u=Nk(e,e._getRowId(o[c],c,i),o[c],c,a,void 0,i?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,s.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(o[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=t(u.originalSubRows,a+1,u))}}return s};return n.rows=t(r),n},U(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function yC(e){const r=[],n=t=>{var o;r.push(t),(o=t.subRows)!=null&&o.length&&t.getIsExpanded()&&t.subRows.forEach(n)};return e.rows.forEach(n),{rows:r,flatRows:e.flatRows,rowsById:e.rowsById}}function wC(e){return r=>K(()=>[r.getState().pagination,r.getPrePaginationRowModel(),r.options.paginateExpandedRows?void 0:r.getState().expanded],(n,t)=>{if(!t.rows.length)return t;const{pageSize:o,pageIndex:a}=n;let{rows:i,flatRows:s,rowsById:l}=t;const c=o*a,u=c+o;i=i.slice(c,u);let d;r.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=yC({rows:i,flatRows:s,rowsById:l}),d.flatRows=[];const p=f=>{d.flatRows.push(f),f.subRows.length&&f.subRows.forEach(p)};return d.rows.forEach(p),d},U(r.options,"debugTable","getPaginationRowModel"))}function xC(){return e=>K(()=>[e.getState().sorting,e.getPreSortedRowModel()],(r,n)=>{if(!n.rows.length||!(r!=null&&r.length))return n;const t=e.getState().sorting,o=[],a=t.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),i={};a.forEach(l=>{const c=e.getColumn(l.id);c&&(i[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const s=l=>{const c=l.map(u=>({...u}));return c.sort((u,d)=>{for(let f=0;f<a.length;f+=1){var p;const g=a[f],m=i[g.id],h=m.sortUndefined,b=(p=g?.desc)!=null?p:!1;let w=0;if(h){const x=u.getValue(g.id),$=d.getValue(g.id),C=x===void 0,k=$===void 0;if(C||k){if(h==="first")return C?-1:1;if(h==="last")return C?1:-1;w=C&&k?0:C?h:-h}}if(w===0&&(w=m.sortingFn(u,d,g.id)),w!==0)return b&&(w*=-1),m.invertSorting&&(w*=-1),w}return u.index-d.index}),c.forEach(u=>{var d;o.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=s(u.subRows))}),c};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}},U(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Fi(e,r){return e?SC(e)?v.createElement(e,r):e:null}function SC(e){return $C(e)||typeof e=="function"||kC(e)}function $C(e){return typeof e=="function"&&(()=>{const r=Object.getPrototypeOf(e);return r.prototype&&r.prototype.isReactComponent})()}function kC(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function CC(e){const r={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=v.useState(()=>({current:_C(r)})),[t,o]=v.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...t,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const DC=S.default.button`
|
|
2235
|
+
${tn}
|
|
2277
2236
|
display: flex;
|
|
2278
2237
|
align-items: center;
|
|
2279
2238
|
gap: var(--cc_size_spacing_xs);
|
|
@@ -2281,16 +2240,16 @@
|
|
|
2281
2240
|
font-weight: 600;
|
|
2282
2241
|
text-align: start;
|
|
2283
2242
|
color: ${e=>e.$isInactive?"var(--cc_color_link_subtle)":"var(--cc_color_link_secondary)"};
|
|
2284
|
-
`,
|
|
2243
|
+
`,EC=S.default.span`
|
|
2285
2244
|
flex: 1;
|
|
2286
|
-
`,
|
|
2245
|
+
`,MC=S.default.i`
|
|
2287
2246
|
flex-shrink: 0;
|
|
2288
2247
|
font-size: var(--cc_size_text_m);
|
|
2289
|
-
`,
|
|
2248
|
+
`,RC=({header:e})=>{const r=e.column.getIsSorted()||"false",n={asc:"arrow-up-thin",desc:"arrow-down-thin",false:"swap-vertical"};return _.jsxs(DC,{onClick:e.column.getToggleSortingHandler(),$isInactive:r==="false",children:[_.jsx(EC,{children:e.isPlaceholder?null:Fi(e.column.columnDef.header,e.getContext())}),_.jsx(MC,{role:"presentation",className:`mdi mdi-${n[r]}`})]})},PC=e=>typeof e=="number"?`${e}px`:`${e==="fill"?"minmax(100px, 1fr)":e}`,kc=R.css`
|
|
2290
2249
|
white-space: normal;
|
|
2291
2250
|
overflow-wrap: break-word;
|
|
2292
2251
|
hyphens: auto;
|
|
2293
|
-
`,
|
|
2252
|
+
`,TC=S.default.table`
|
|
2294
2253
|
all: unset;
|
|
2295
2254
|
display: block;
|
|
2296
2255
|
min-width: 100%;
|
|
@@ -2299,8 +2258,8 @@
|
|
|
2299
2258
|
white-space: nowrap;
|
|
2300
2259
|
|
|
2301
2260
|
/* if ccMargin is specified in props, convert spacing tokens to CSS variables */
|
|
2302
|
-
${e=>e.$ccMargin?
|
|
2303
|
-
margin: ${
|
|
2261
|
+
${e=>e.$ccMargin?R.css`
|
|
2262
|
+
margin: ${lt(e.$ccMargin)};
|
|
2304
2263
|
`:null}
|
|
2305
2264
|
|
|
2306
2265
|
thead,
|
|
@@ -2315,13 +2274,13 @@
|
|
|
2315
2274
|
tbody tr {
|
|
2316
2275
|
min-width: 100%;
|
|
2317
2276
|
display: grid;
|
|
2318
|
-
${e=>{
|
|
2277
|
+
${e=>{const r=e.$columnSizes?.map(n=>PC(n)).join(" ");return R.css`
|
|
2319
2278
|
grid-template-columns: ${r};
|
|
2320
2279
|
`}}
|
|
2321
2280
|
}
|
|
2322
2281
|
|
|
2323
2282
|
th {
|
|
2324
|
-
${
|
|
2283
|
+
${et};
|
|
2325
2284
|
color: var(--cc_color_text_subtle);
|
|
2326
2285
|
font-weight: 700;
|
|
2327
2286
|
font-size: var(--cc_size_text_s);
|
|
@@ -2330,10 +2289,10 @@
|
|
|
2330
2289
|
border-block-end: var(--cc_size_border_width_m) solid
|
|
2331
2290
|
var(--cc_color_border_default);
|
|
2332
2291
|
align-content: end;
|
|
2333
|
-
${
|
|
2292
|
+
${kc}
|
|
2334
2293
|
}
|
|
2335
2294
|
|
|
2336
|
-
${e=>e.$enableStickyHeaders?
|
|
2295
|
+
${e=>e.$enableStickyHeaders?R.css`
|
|
2337
2296
|
thead th {
|
|
2338
2297
|
position: sticky;
|
|
2339
2298
|
top: 0;
|
|
@@ -2343,40 +2302,40 @@
|
|
|
2343
2302
|
`:null}
|
|
2344
2303
|
|
|
2345
2304
|
td {
|
|
2346
|
-
${
|
|
2305
|
+
${$e}
|
|
2347
2306
|
color: var(--cc_color_text_subtle);
|
|
2348
2307
|
font-size: var(--cc_size_text_s);
|
|
2349
2308
|
padding: var(--cc_size_spacing_m);
|
|
2350
2309
|
border-block-end: var(--cc_size_border_width_s) solid
|
|
2351
2310
|
var(--cc_color_border_default);
|
|
2352
2311
|
align-content: center;
|
|
2353
|
-
${
|
|
2312
|
+
${kc}
|
|
2354
2313
|
}
|
|
2355
2314
|
|
|
2356
2315
|
tr:hover > td {
|
|
2357
2316
|
background: var(--cc_color_background_2);
|
|
2358
2317
|
}
|
|
2359
|
-
`,
|
|
2318
|
+
`,IC=e=>e?e?.desc?"descending":"ascending":"none",OC=({defaultSortedColumns:e,defaultData:r,ccMargin:n,columns:t,columnSizes:o,enableSortingRemoval:a=!1,enableStickyHeaders:i=!1,manualPagination:s=!1,pageCount:l=-1,sorting:c,onSortingChange:u,...d})=>{const[p,f]=y.useState(()=>[...r]),[g,m]=y.useState([]),h=c??g,b=c!==void 0,w=$=>{u&&u($),b||m($)},x=CC({columns:[...t],data:p,state:{sorting:[...h]},onSortingChange:w,getCoreRowModel:bC(),getPaginationRowModel:wC(),getSortedRowModel:b?void 0:xC(),enableSortingRemoval:a,manualPagination:s,manualSorting:b,pageCount:l});return y.useEffect(()=>{e&&x.setSorting(()=>[...e])},[e,x]),y.useEffect(()=>{f([...r])},[r]),_.jsxs(TC,{$ccMargin:n,$enableStickyHeaders:i,$columnSizes:o,...d,children:[_.jsx("thead",{children:x.getHeaderGroups().map($=>_.jsx("tr",{children:$.headers.map(C=>{const k=h[C.column.getSortIndex()],E=IC(k);return _.jsx("th",{"aria-sort":E,scope:"col",children:C.column.getCanSort()?_.jsx(RC,{header:C}):Fi(C.column.columnDef.header,C.getContext())},C.id)})},$.id))}),_.jsx("tbody",{children:x.getRowModel().rows.map($=>_.jsx("tr",{children:$.getVisibleCells().map(C=>_.jsx("td",{children:Fi(C.column.columnDef.cell,C.getContext())},C.id))},$.id))})]})},Sn={small:{fontSize:"var(--cc_size_text_xs)",statusSize:20,iconSize:18},medium:{fontSize:"var(--cc_size_text_s)",statusSize:24,iconSize:22}},FC=S.default.div`
|
|
2360
2319
|
display: flex;
|
|
2361
2320
|
align-items: center;
|
|
2362
2321
|
gap: calc(var(--cc_size_spacing_xs) * 1.25);
|
|
2363
2322
|
min-width: 1px;
|
|
2364
|
-
`,
|
|
2365
|
-
width: ${e
|
|
2366
|
-
height: ${e
|
|
2323
|
+
`,Cc=S.default.span`
|
|
2324
|
+
width: ${e=>Sn[e.$size||"small"].statusSize}px;
|
|
2325
|
+
height: ${e=>Sn[e.$size||"small"].statusSize}px;
|
|
2367
2326
|
flex-shrink: 0;
|
|
2368
2327
|
display: grid;
|
|
2369
2328
|
place-items: center;
|
|
2370
|
-
`,
|
|
2371
|
-
${
|
|
2329
|
+
`,LC=S.default.span`
|
|
2330
|
+
${$e}
|
|
2372
2331
|
color: ${e=>e.$status==="error"?"var(--cc_color_utility_destroy)":"var(--cc_color_text_subtle)"};
|
|
2373
|
-
font-size: ${e
|
|
2374
|
-
line-height: ${e
|
|
2332
|
+
font-size: ${e=>Sn[e.$size||"small"].fontSize};
|
|
2333
|
+
line-height: ${e=>Sn[e.$size||"small"].statusSize}px;
|
|
2375
2334
|
overflow: hidden;
|
|
2376
2335
|
text-overflow: ellipsis;
|
|
2377
2336
|
white-space: nowrap;
|
|
2378
2337
|
min-width: 1px;
|
|
2379
|
-
`,
|
|
2338
|
+
`,zC=R.keyframes`
|
|
2380
2339
|
50% {
|
|
2381
2340
|
transform: scale(1.125);
|
|
2382
2341
|
}
|
|
@@ -2384,23 +2343,23 @@
|
|
|
2384
2343
|
transform: scale(1);
|
|
2385
2344
|
opacity: 1;
|
|
2386
2345
|
}
|
|
2387
|
-
`,
|
|
2388
|
-
font-size: ${e
|
|
2346
|
+
`,NC=S.default.i`
|
|
2347
|
+
font-size: ${e=>Sn[e.$size||"small"].iconSize}px;
|
|
2389
2348
|
color: ${e=>e.$status==="error"?"var(--cc_color_utility_destroy)":"var(--cc_color_utility_success_darken_10)"};
|
|
2390
2349
|
|
|
2391
2350
|
transform: scale(0.5);
|
|
2392
2351
|
opacity: 0;
|
|
2393
|
-
animation-name: ${
|
|
2394
|
-
animation-duration: ${
|
|
2352
|
+
animation-name: ${zC};
|
|
2353
|
+
animation-duration: ${_e.duration.medium};
|
|
2395
2354
|
animation-fill-mode: forwards;
|
|
2396
|
-
animation-timing-function: ${
|
|
2397
|
-
`;function
|
|
2355
|
+
animation-timing-function: ${_e.easeOut};
|
|
2356
|
+
`;function AC({children:e,avatar:r,size:n="small",status:t="none",...o}){return _.jsxs(FC,{...o,children:[r?_.jsx(aa,{size:Sn[n].iconSize,tooltip:{shouldShow:!0,placement:"top"},...r}):null,_.jsx(LC,{$size:n,$status:t,children:e}),t==="saving"?_.jsx(Cc,{$size:n,children:_.jsx(ia,{accessibilityLabel:"Saving",size:Sn[n||"small"].iconSize-2})}):null,t==="success"||t==="error"?_.jsx(Cc,{$size:n,children:_.jsx(NC,{className:`mdi mdi-${t==="error"?"alert-circle-outline":"cloud-check-variant-outline"}`,"aria-hidden":"true",$status:t,$size:n})}):null]})}const Kt={caution:"caution",destroy:"destroy",info:"info",success:"success"},jC=(e,r)=>{switch(r){case"caution":return e||"alert-outline";case"destroy":return e||"alert-circle-outline";case"info":return e||"information-outline";case"success":return e||"check";default:return e||"information-outline"}},HC=e=>{switch(e){case Kt.caution:return"var(--cc_color_utility_caution)";case Kt.destroy:return"var(--cc_color_utility_destroy)";case Kt.info:return"var(--cc_color_utility_info)";case Kt.success:return"var(--cc_color_utility_success)";default:return"var(--cc_color_utility_info)"}},YC=e=>e===Kt.info?vo:Li,VC=S.default.div`
|
|
2398
2357
|
width: 360px;
|
|
2399
2358
|
border-radius: var(--cc_size_border_radius_l);
|
|
2400
2359
|
color: var(--cc_color_text_default);
|
|
2401
2360
|
box-shadow: 0 var(--cc_size_depth_3_y) var(--cc_size_depth_3_blur)
|
|
2402
2361
|
var(--cc_color_depth_3);
|
|
2403
|
-
`,
|
|
2362
|
+
`,BC=S.default.div`
|
|
2404
2363
|
position: relative;
|
|
2405
2364
|
padding: var(--cc_size_spacing_m);
|
|
2406
2365
|
display: flex;
|
|
@@ -2408,7 +2367,7 @@
|
|
|
2408
2367
|
gap: var(--cc_size_spacing_m);
|
|
2409
2368
|
background: var(--cc_color_background_3);
|
|
2410
2369
|
border-radius: var(--cc_size_border_radius_l);
|
|
2411
|
-
`,
|
|
2370
|
+
`,WC=S.default.div`
|
|
2412
2371
|
flex: 1;
|
|
2413
2372
|
min-width: 1px;
|
|
2414
2373
|
display: flex;
|
|
@@ -2416,7 +2375,7 @@
|
|
|
2416
2375
|
align-items: start;
|
|
2417
2376
|
gap: var(--cc_size_spacing_xxs);
|
|
2418
2377
|
padding-inline-end: var(--cc_size_spacing_l);
|
|
2419
|
-
`,
|
|
2378
|
+
`,GC=S.default.div`
|
|
2420
2379
|
display: grid;
|
|
2421
2380
|
place-items: center;
|
|
2422
2381
|
flex-shrink: 0;
|
|
@@ -2424,15 +2383,15 @@
|
|
|
2424
2383
|
height: var(--cc_size_avatar_m);
|
|
2425
2384
|
background: var(--cc_color_utility_success);
|
|
2426
2385
|
border-radius: var(--cc_size_border_radius_l);
|
|
2427
|
-
background-color: ${({color:e=
|
|
2428
|
-
`,
|
|
2386
|
+
background-color: ${({color:e=Kt.success})=>HC(e)};
|
|
2387
|
+
`,qC=S.default.i`
|
|
2429
2388
|
font-size: 20px;
|
|
2430
|
-
color: ${({color:e=
|
|
2431
|
-
`,
|
|
2389
|
+
color: ${({color:e=Kt.success})=>YC(e)};
|
|
2390
|
+
`,KC=S.default(yn)`
|
|
2432
2391
|
margin-block-start: var(--cc_size_spacing_s);
|
|
2433
|
-
`,
|
|
2392
|
+
`,UC=S.default(Yn)`
|
|
2434
2393
|
position: absolute;
|
|
2435
2394
|
top: 6px; /* magic number to account for icon padding */
|
|
2436
2395
|
right: 6px;
|
|
2437
2396
|
display: block;
|
|
2438
|
-
`;function
|
|
2397
|
+
`;function QC({action:e,closeAction:r,color:n=Kt.success,iconName:t="",message:o,title:a,testId:i}){return _.jsx(VC,{"data-testId":i,children:_.jsxs(BC,{$hasAction:!!e,$hasTitle:!!a,className:"dark-environment",children:[_.jsx(GC,{color:n,children:_.jsx(qC,{color:n,className:`mdi mdi-${jC(t,n)}`})}),_.jsxs(WC,{children:[a?_.jsx(Ce,{as:"h4",family:"heading",size:"m",weight:600,children:a}):null,_.jsx(Ce,{as:"p",children:o}),e?_.jsx(KC,{...e,"data-testid":e["data-testid"],color:"secondary",design:"outline",size:"small",icon:{name:e.icon?.name,position:e.icon?.position},children:e.label}):null]}),r?_.jsx(UC,{...r,"data-testid":r["data-testid"],accessibilityLabel:r.accessibilityLabel,iconName:"close",color:"subtle"}):null]})})}exports.AssetThumbnail=Gf;exports.Avatar=aa;exports.AvatarGroup=pm;exports.Badge=bm;exports.Billboard=pu;exports.Button=yn;exports.ButtonCondensed=Zi;exports.ButtonFilter=qm;exports.ButtonIcon=sa;exports.ButtonIconCondensed=Yn;exports.Card=oh;exports.ChipFilter=dh;exports.ChipToggle=ph;exports.Collapse=mh;exports.Comment=yh;exports.Drawer=Ch;exports.Fieldset=Du;exports.Grid=Rh;exports.HorizontalRule=Th;exports.InputCheckbox=Cu;exports.InputCheckboxGroup=Vh;exports.InputDate=jy;exports.InputFile=qy;exports.InputPassword=e0;exports.InputRadio=od;exports.InputRadioGroup=r0;exports.InputRange=u0;exports.InputSelectHTML=m0;exports.InputText=rd;exports.InputTextArea=_0;exports.Label=w0;exports.Link=id;exports.Lottie=C0;exports.Menu=QS;exports.MenuHeading=ZS;exports.MenuItem=o$;exports.Metric=g$;exports.Modal=D$;exports.ModalBase=R$;exports.Notice=Y$;exports.PageHeader=U$;exports.Popover=J$;exports.ProgressBar=rk;exports.ProgressCircle=gk;exports.Rating=kk;exports.ScreenReaderContent=yt;exports.Spinner=ia;exports.Switch=Tk;exports.Table=OC;exports.Text=Ce;exports.TimeStamp=AC;exports.Toast=QC;exports.Tooltip=Xi;
|