@petnow/ui 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +2 -2
- package/dist/index.es.js +6507 -6161
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +33 -20
- package/dist/index.umd.js.map +1 -1
- package/package.json +23 -23
package/dist/index.umd.js
CHANGED
|
@@ -1,37 +1,50 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ge,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],d):(ge=typeof globalThis<"u"?globalThis:ge||self,d(ge["@petnow/ui"]={},ge.React,ge.ReactDOM))})(this,function(ge,d,be){"use strict";var Sy=Object.defineProperty;var Cy=(ge,d,be)=>d in ge?Sy(ge,d,{enumerable:!0,configurable:!0,writable:!0,value:be}):ge[d]=be;var R=(ge,d,be)=>Cy(ge,typeof d!="symbol"?d+"":d,be);function Ba(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const I=Ba(d),er=Ba(be);var tr={exports:{}},wn={};/**
|
|
2
2
|
* @license React
|
|
3
|
-
* react-jsx-runtime.production.
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Va;function Ru(){if(Va)return wn;Va=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function e(t,o,a){var i=null;if(a!==void 0&&(i=""+a),o.key!==void 0&&(i=""+o.key),"key"in o){a={};for(var s in o)s!=="key"&&(a[s]=o[s])}else a=o;return o=a.ref,{$$typeof:n,type:t,key:i,ref:o!==void 0?o:null,props:a}}return wn.Fragment=r,wn.jsx=e,wn.jsxs=e,wn}var xn={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
13
|
-
* Copyright (c)
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+R+">.")}return F}}function Mu(v,F){{if(!v._store||v._store.validated||v.key!=null)return;v._store.validated=!0;var R=Ty(F);if(_u[R])return;_u[R]=!0;var X="";v&&v._owner&&v._owner!==Ba.current&&(X=" It was passed a child from "+H(v._owner.type)+"."),On(v),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R,X),On(null)}}function Ou(v,F){{if(typeof v!="object")return;if(Ra(v))for(var R=0;R<v.length;R++){var X=v[R];za(X)&&Mu(X,F)}else if(za(v))v._store&&(v._store.validated=!0);else if(v){var me=b(v);if(typeof me=="function"&&me!==v.entries)for(var we=me.call(v),le;!(le=we.next()).done;)za(le.value)&&Mu(le.value,F)}}}function Ny(v){{var F=v.type;if(F==null||typeof F=="string")return;var R;if(typeof F=="function")R=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===l||F.$$typeof===f))R=F.propTypes;else return;if(R){var X=H(F);vy(R,v.props,"prop",X,v)}else if(F.PropTypes!==void 0&&!Va){Va=!0;var me=H(F);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",me||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Iy(v){{for(var F=Object.keys(v.props),R=0;R<F.length;R++){var X=F[R];if(X!=="children"&&X!=="key"){On(v),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",X),On(null);break}}v.ref!==null&&(On(v),x("Invalid attribute `ref` supplied to `React.Fragment`."),On(null))}}function Pu(v,F,R,X,me,we){{var le=I(v);if(!le){var re="";(v===void 0||typeof v=="object"&&v!==null&&Object.keys(v).length===0)&&(re+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ue=Py();Ue?re+=Ue:re+=Cu();var Ie;v===null?Ie="null":Ra(v)?Ie="array":v!==void 0&&v.$$typeof===r?(Ie="<"+(H(v.type)||"Unknown")+" />",re=" Did you accidentally export a JSX literal instead of a component?"):Ie=typeof v,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ie,re)}var $e=Oy(v,F,R,me,we);if($e==null)return $e;if(le){var Ze=F.children;if(Ze!==void 0)if(X)if(Ra(Ze)){for(var Pn=0;Pn<Ze.length;Pn++)Ou(Ze[Pn],v);Object.freeze&&Object.freeze(Ze)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ou(Ze,v)}return v===e?Iy($e):Ny($e),$e}}function Fy(v,F,R){return Pu(v,F,R,!0)}function Ly(v,F,R){return Pu(v,F,R,!1)}var $y=Ly,Ay=Fy;Nn.Fragment=e,Nn.jsx=$y,Nn.jsxs=Ay}()),Nn}var qa;function Fu(){return qa||(qa=1,process.env.NODE_ENV==="production"?dr.exports=Nu():dr.exports=Iu()),dr.exports}var M=Fu();function Ga(n){var r,t,e="";if(typeof n=="string"||typeof n=="number")e+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(r=0;r<o;r++)n[r]&&(t=Ga(n[r]))&&(e&&(e+=" "),e+=t)}else for(t in n)n[t]&&(e&&(e+=" "),e+=t);return e}function je(){for(var n,r,t=0,e="",o=arguments.length;t<o;t++)(n=arguments[t])&&(r=Ga(n))&&(e&&(e+=" "),e+=r);return e}const mo="-",Lu=n=>{const r=Au(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:e}=n;return{getClassGroupId:i=>{const s=i.split(mo);return s[0]===""&&s.length!==1&&s.shift(),Xa(s,r)||$u(i)},getConflictingClassGroupIds:(i,s)=>{const l=t[i]||[];return s&&e[i]?[...l,...e[i]]:l}}},Xa=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const t=n[0],e=r.nextPart.get(t),o=e?Xa(n.slice(1),e):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(mo);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ja=/^\[(.+)\]$/,$u=n=>{if(Ja.test(n)){const r=Ja.exec(n)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},Au=n=>{const{theme:r,classGroups:t}=n,e={nextPart:new Map,validators:[]};for(const o in t)go(t[o],e,o,r);return e},go=(n,r,t,e)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:Za(r,o);a.classGroupId=t;return}if(typeof o=="function"){if(Yu(o)){go(o(e),r,t,e);return}r.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([a,i])=>{go(i,Za(r,a),t,e)})})},Za=(n,r)=>{let t=n;return r.split(mo).forEach(e=>{t.nextPart.has(e)||t.nextPart.set(e,{nextPart:new Map,validators:[]}),t=t.nextPart.get(e)}),t},Yu=n=>n.isThemeGetter,ju=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,e=new Map;const o=(a,i)=>{t.set(a,i),r++,r>n&&(r=0,e=t,t=new Map)};return{get(a){let i=t.get(a);if(i!==void 0)return i;if((i=e.get(a))!==void 0)return o(a,i),i},set(a,i){t.has(a)?t.set(a,i):o(a,i)}}},bo="!",vo=":",Hu=vo.length,Wu=n=>{const{prefix:r,experimentalParseClassName:t}=n;let e=o=>{const a=[];let i=0,s=0,l=0,d;for(let m=0;m<o.length;m++){let g=o[m];if(i===0&&s===0){if(g===vo){a.push(o.slice(l,m)),l=m+Hu;continue}if(g==="/"){d=m;continue}}g==="["?i++:g==="]"?i--:g==="("?s++:g===")"&&s--}const u=a.length===0?o:o.substring(l),f=Ru(u),h=f!==u,p=d&&d>l?d-l:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}};if(r){const o=r+vo,a=e;e=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(t){const o=e;e=a=>t({className:a,parseClassName:o})}return e},Ru=n=>n.endsWith(bo)?n.substring(0,n.length-1):n.startsWith(bo)?n.substring(1):n,Bu=n=>{const r=Object.fromEntries(n.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const o=[];let a=[];return e.forEach(i=>{i[0]==="["||r[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},Vu=n=>({cache:ju(n.cacheSize),parseClassName:Wu(n),sortModifiers:Bu(n),...Lu(n)}),zu=/\s+/,Uu=(n,r)=>{const{parseClassName:t,getClassGroupId:e,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(zu);let l="";for(let d=s.length-1;d>=0;d-=1){const u=s[d],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}=t(u);if(f){l=u+(l.length>0?" "+l:l);continue}let b=!!g,y=e(b?m.substring(0,g):m);if(!y){if(!b){l=u+(l.length>0?" "+l:l);continue}if(y=e(m),!y){l=u+(l.length>0?" "+l:l);continue}b=!1}const x=a(h).join(":"),w=p?x+bo:x,E=w+y;if(i.includes(E))continue;i.push(E);const _=o(y,b);for(let D=0;D<_.length;++D){const k=_[D];i.push(w+k)}l=u+(l.length>0?" "+l:l)}return l};function Qu(){let n=0,r,t,e="";for(;n<arguments.length;)(r=arguments[n++])&&(t=ei(r))&&(e&&(e+=" "),e+=t);return e}const ei=n=>{if(typeof n=="string")return n;let r,t="";for(let e=0;e<n.length;e++)n[e]&&(r=ei(n[e]))&&(t&&(t+=" "),t+=r);return t};function Ku(n,...r){let t,e,o,a=i;function i(l){const d=r.reduce((u,f)=>f(u),n());return t=Vu(d),e=t.cache.get,o=t.cache.set,a=s,s(l)}function s(l){const d=e(l);if(d)return d;const u=Uu(l,t);return o(l,u),u}return function(){return a(Qu.apply(null,arguments))}}const He=n=>{const r=t=>t[n]||[];return r.isThemeGetter=!0,r},ti=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ni=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qu=/^\d+\/\d+$/,Gu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ju=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Zu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ec=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,an=n=>qu.test(n),ne=n=>!!n&&!Number.isNaN(Number(n)),Ht=n=>!!n&&Number.isInteger(Number(n)),ri=n=>n.endsWith("%")&&ne(n.slice(0,-1)),_t=n=>Gu.test(n),tc=()=>!0,nc=n=>Xu.test(n)&&!Ju.test(n),yo=()=>!1,rc=n=>Zu.test(n),oc=n=>ec.test(n),ac=n=>!U(n)&&!Q(n),ic=n=>sn(n,ii,yo),U=n=>ti.test(n),Wt=n=>sn(n,si,nc),wo=n=>sn(n,bc,ne),sc=n=>sn(n,oi,yo),lc=n=>sn(n,ai,oc),uc=n=>sn(n,yo,rc),Q=n=>ni.test(n),fr=n=>ln(n,si),cc=n=>ln(n,vc),dc=n=>ln(n,oi),fc=n=>ln(n,ii),pc=n=>ln(n,ai),hc=n=>ln(n,yc,!0),sn=(n,r,t)=>{const e=ti.exec(n);return e?e[1]?r(e[1]):t(e[2]):!1},ln=(n,r,t=!1)=>{const e=ni.exec(n);return e?e[1]?r(e[1]):t:!1},oi=n=>n==="position",mc=new Set(["image","url"]),ai=n=>mc.has(n),gc=new Set(["length","size","percentage"]),ii=n=>gc.has(n),si=n=>n==="length",bc=n=>n==="number",vc=n=>n==="family-name",yc=n=>n==="shadow",wc=Ku(()=>{const n=He("color"),r=He("font"),t=He("text"),e=He("font-weight"),o=He("tracking"),a=He("leading"),i=He("breakpoint"),s=He("container"),l=He("spacing"),d=He("radius"),u=He("shadow"),f=He("inset-shadow"),h=He("drop-shadow"),p=He("blur"),m=He("perspective"),g=He("aspect"),b=He("ease"),y=He("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],D=()=>[Q,U,l],k=()=>[an,"full","auto",...D()],S=()=>[Ht,"none","subgrid",Q,U],C=()=>["auto",{span:["full",Ht,Q,U]},Q,U],I=()=>[Ht,"auto",Q,U],O=()=>["auto","min","max","fr",Q,U],W=()=>["start","end","center","between","around","evenly","stretch","baseline"],H=()=>["start","end","center","stretch"],P=()=>["auto",...D()],Y=()=>[an,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],N=()=>[n,Q,U],V=()=>[ri,Wt],A=()=>["","none","full",d,Q,U],z=()=>["",ne,fr,Wt],J=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["","none",p,Q,U],T=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q,U],oe=()=>["none",ne,Q,U],te=()=>["none",ne,Q,U],De=()=>[ne,Q,U],se=()=>[an,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_t],breakpoint:[_t],color:[tc],container:[_t],"drop-shadow":[_t],ease:["in","out","in-out"],font:[ac],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_t],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_t],shadow:[_t],spacing:["px",ne],text:[_t],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",an,U,Q,g]}],container:["container"],columns:[{columns:[ne,U,Q,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...w(),U,Q]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Ht,"auto",Q,U]}],basis:[{basis:[an,"full","auto",s,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,an,"auto","initial","none",U]}],grow:[{grow:["",ne,Q,U]}],shrink:[{shrink:["",ne,Q,U]}],order:[{order:[Ht,"first","last","none",Q,U]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...H(),"baseline"]}],"align-self":[{self:["auto",...H(),"baseline"]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[s,"screen",...Y()]}],"min-w":[{"min-w":[s,"screen","none",...Y()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...Y()]}],h:[{h:["screen",...Y()]}],"min-h":[{"min-h":["screen","none",...Y()]}],"max-h":[{"max-h":["screen",...Y()]}],"font-size":[{text:["base",t,fr,Wt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[e,Q,wo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ri,U]}],"font-family":[{font:[cc,U,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Q,U]}],"line-clamp":[{"line-clamp":[ne,"none",Q,wo]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",Q,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Q,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",Q,Wt]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[ne,"auto",Q,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...w(),dc,sc]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",fc,ic]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ht,Q,U],radial:["",Q,U],conic:[Ht,Q,U]},pc,lc]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,Q,U]}],"outline-w":[{outline:["",ne,fr,Wt]}],"outline-color":[{outline:[n]}],shadow:[{shadow:["","none",u,hc,uc]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",Q,U,f]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[ne,Wt]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":N()}],opacity:[{opacity:[ne,Q,U]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none",Q,U]}],blur:[{blur:ie()}],brightness:[{brightness:[ne,Q,U]}],contrast:[{contrast:[ne,Q,U]}],"drop-shadow":[{"drop-shadow":["","none",h,Q,U]}],grayscale:[{grayscale:["",ne,Q,U]}],"hue-rotate":[{"hue-rotate":[ne,Q,U]}],invert:[{invert:["",ne,Q,U]}],saturate:[{saturate:[ne,Q,U]}],sepia:[{sepia:["",ne,Q,U]}],"backdrop-filter":[{"backdrop-filter":["","none",Q,U]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ne,Q,U]}],"backdrop-contrast":[{"backdrop-contrast":[ne,Q,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,Q,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,Q,U]}],"backdrop-invert":[{"backdrop-invert":["",ne,Q,U]}],"backdrop-opacity":[{"backdrop-opacity":[ne,Q,U]}],"backdrop-saturate":[{"backdrop-saturate":[ne,Q,U]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,Q,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Q,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",Q,U]}],ease:[{ease:["linear","initial",b,Q,U]}],delay:[{delay:[ne,Q,U]}],animate:[{animate:["none",y,Q,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Q,U]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:De()}],"skew-x":[{"skew-x":De()}],"skew-y":[{"skew-y":De()}],transform:[{transform:[Q,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q,U]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[ne,fr,Wt,wo]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}});function pr(...n){return wc(je(n))}const li=({className:n,text:r,onClick:t,disabled:e})=>M.jsx("button",{disabled:e,onClick:t,className:pr("bg-petnow-orange-primary disabled:bg-petnow-grey-primary sm:hover:bg-petnow-orange-40 sm:disabled:hover:bg-petnow-grey-primary w-full cursor-pointer rounded-xl py-5 text-2xl font-bold text-white transition-colors duration-200",n),children:r}),ui=typeof document<"u"?c.useLayoutEffect:()=>{};function xc(n){const r=c.useRef(null);return ui(()=>{r.current=n},[n]),c.useCallback((...t)=>{const e=r.current;return e==null?void 0:e(...t)},[])}const In=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},Rt=n=>n&&"window"in n&&n.window===n?n:In(n).defaultView||window;function Dc(n){var r;return typeof window>"u"||window.navigator==null?!1:((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands.some(t=>n.test(t.brand)))||n.test(window.navigator.userAgent)}function Ec(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function ci(n){let r=null;return()=>(r==null&&(r=n()),r)}const kc=ci(function(){return Ec(/^Mac/i)}),Sc=ci(function(){return Dc(/Android/i)});function Cc(n){return n.mozInputSource===0&&n.isTrusted?!0:Sc()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}class _c{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(r,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=r}}function di(n){let r=c.useRef({isFocused:!1,observer:null});ui(()=>{const e=r.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let t=xc(e=>{n==null||n(e)});return c.useCallback(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){r.current.isFocused=!0;let o=e.target,a=i=>{r.current.isFocused=!1,o.disabled&&t(new _c("blur",i)),r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&o.disabled){var i;(i=r.current.observer)===null||i===void 0||i.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),r.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}function Mc(n){let{isDisabled:r,onFocus:t,onBlur:e,onFocusChange:o}=n;const a=c.useCallback(l=>{if(l.target===l.currentTarget)return e&&e(l),o&&o(!1),!0},[e,o]),i=di(a),s=c.useCallback(l=>{const d=In(l.target);l.target===l.currentTarget&&d.activeElement===l.target&&(t&&t(l),o&&o(!0),i(l))},[o,t,i]);return{focusProps:{onFocus:!r&&(t||o||e)?s:void 0,onBlur:!r&&(e||o)?a:void 0}}}let Fn=null,xo=new Set,Ln=new Map,Bt=!1,Do=!1;const Oc={Tab:!0,Escape:!0};function Eo(n,r){for(let t of xo)t(n,r)}function Pc(n){return!(n.metaKey||!kc()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function hr(n){Bt=!0,Pc(n)&&(Fn="keyboard",Eo("keyboard",n))}function Ke(n){Fn="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(Bt=!0,Eo("pointer",n))}function fi(n){Cc(n)&&(Bt=!0,Fn="virtual")}function pi(n){n.target===window||n.target===document||(!Bt&&!Do&&(Fn="virtual",Eo("virtual",n)),Bt=!1,Do=!1)}function hi(){Bt=!1,Do=!0}function ko(n){if(typeof window>"u"||Ln.get(Rt(n)))return;const r=Rt(n),t=In(n);let e=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){Bt=!0,e.apply(this,arguments)},t.addEventListener("keydown",hr,!0),t.addEventListener("keyup",hr,!0),t.addEventListener("click",fi,!0),r.addEventListener("focus",pi,!0),r.addEventListener("blur",hi,!1),typeof PointerEvent<"u"?(t.addEventListener("pointerdown",Ke,!0),t.addEventListener("pointermove",Ke,!0),t.addEventListener("pointerup",Ke,!0)):(t.addEventListener("mousedown",Ke,!0),t.addEventListener("mousemove",Ke,!0),t.addEventListener("mouseup",Ke,!0)),r.addEventListener("beforeunload",()=>{mi(n)},{once:!0}),Ln.set(r,{focus:e})}const mi=(n,r)=>{const t=Rt(n),e=In(n);r&&e.removeEventListener("DOMContentLoaded",r),Ln.has(t)&&(t.HTMLElement.prototype.focus=Ln.get(t).focus,e.removeEventListener("keydown",hr,!0),e.removeEventListener("keyup",hr,!0),e.removeEventListener("click",fi,!0),t.removeEventListener("focus",pi,!0),t.removeEventListener("blur",hi,!1),typeof PointerEvent<"u"?(e.removeEventListener("pointerdown",Ke,!0),e.removeEventListener("pointermove",Ke,!0),e.removeEventListener("pointerup",Ke,!0)):(e.removeEventListener("mousedown",Ke,!0),e.removeEventListener("mousemove",Ke,!0),e.removeEventListener("mouseup",Ke,!0)),Ln.delete(t))};function Tc(n){const r=In(n);let t;return r.readyState!=="loading"?ko(n):(t=()=>{ko(n)},r.addEventListener("DOMContentLoaded",t)),()=>mi(n,t)}typeof document<"u"&&Tc();function gi(){return Fn!=="pointer"}const Nc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ic(n,r,t){var e;const o=typeof window<"u"?Rt(t==null?void 0:t.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Rt(t==null?void 0:t.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Rt(t==null?void 0:t.target).HTMLElement:HTMLElement,s=typeof window<"u"?Rt(t==null?void 0:t.target).KeyboardEvent:KeyboardEvent;return n=n||(t==null?void 0:t.target)instanceof o&&!Nc.has(t==null||(e=t.target)===null||e===void 0?void 0:e.type)||(t==null?void 0:t.target)instanceof a||(t==null?void 0:t.target)instanceof i&&(t==null?void 0:t.target.isContentEditable),!(n&&r==="keyboard"&&t instanceof s&&!Oc[t.key])}function Fc(n,r,t){ko(),c.useEffect(()=>{let e=(o,a)=>{Ic(!!(t!=null&&t.isTextInput),o,a)&&n(gi())};return xo.add(e),()=>{xo.delete(e)}},r)}function Lc(n){let{isDisabled:r,onBlurWithin:t,onFocusWithin:e,onFocusWithinChange:o}=n,a=c.useRef({isFocusWithin:!1}),i=c.useCallback(d=>{a.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(a.current.isFocusWithin=!1,t&&t(d),o&&o(!1))},[t,o,a]),s=di(i),l=c.useCallback(d=>{!a.current.isFocusWithin&&document.activeElement===d.target&&(e&&e(d),o&&o(!0),a.current.isFocusWithin=!0,s(d))},[e,o,s]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:i}}}let mr=!1,So=0;function Co(){mr=!0,setTimeout(()=>{mr=!1},50)}function bi(n){n.pointerType==="touch"&&Co()}function $c(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",bi):document.addEventListener("touchend",Co),So++,()=>{So--,!(So>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",bi):document.removeEventListener("touchend",Co))}}function _o(n){let{onHoverStart:r,onHoverChange:t,onHoverEnd:e,isDisabled:o}=n,[a,i]=c.useState(!1),s=c.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;c.useEffect($c,[]);let{hoverProps:l,triggerHoverEnd:d}=c.useMemo(()=>{let u=(p,m)=>{if(s.pointerType=m,o||m==="touch"||s.isHovered||!p.currentTarget.contains(p.target))return;s.isHovered=!0;let g=p.currentTarget;s.target=g,r&&r({type:"hoverstart",target:g,pointerType:m}),t&&t(!0),i(!0)},f=(p,m)=>{if(s.pointerType="",s.target=null,m==="touch"||!s.isHovered)return;s.isHovered=!1;let g=p.currentTarget;e&&e({type:"hoverend",target:g,pointerType:m}),t&&t(!1),i(!1)},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=p=>{mr&&p.pointerType==="mouse"||u(p,p.pointerType)},h.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,p.pointerType)}):(h.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=p=>{!s.ignoreEmulatedMouseEvents&&!mr&&u(p,"mouse"),s.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&f(p,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[r,t,e,o,s]);return c.useEffect(()=>{o&&d({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:l,isHovered:a}}function Mo(n={}){let{autoFocus:r=!1,isTextInput:t,within:e}=n,o=c.useRef({isFocused:!1,isFocusVisible:r||gi()}),[a,i]=c.useState(!1),[s,l]=c.useState(()=>o.current.isFocused&&o.current.isFocusVisible),d=c.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=c.useCallback(p=>{o.current.isFocused=p,i(p),d()},[d]);Fc(p=>{o.current.isFocusVisible=p,d()},[],{isTextInput:t});let{focusProps:f}=Mc({isDisabled:e,onFocusChange:u}),{focusWithinProps:h}=Lc({isDisabled:!e,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:e?h:f}}var Ac=Object.defineProperty,Yc=(n,r,t)=>r in n?Ac(n,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[r]=t,Oo=(n,r,t)=>(Yc(n,typeof r!="symbol"?r+"":r,t),t);let jc=class{constructor(){Oo(this,"current",this.detect()),Oo(this,"handoffState","pending"),Oo(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"}},Vt=new jc;function zt(n){return Vt.isServer?null:n instanceof Node?n.ownerDocument:n!=null&&n.hasOwnProperty("current")&&n.current instanceof Node?n.current.ownerDocument:document}function gr(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function et(){let n=[],r={addEventListener(t,e,o,a){return t.addEventListener(e,o,a),r.add(()=>t.removeEventListener(e,o,a))},requestAnimationFrame(...t){let e=requestAnimationFrame(...t);return r.add(()=>cancelAnimationFrame(e))},nextFrame(...t){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...t))},setTimeout(...t){let e=setTimeout(...t);return r.add(()=>clearTimeout(e))},microTask(...t){let e={current:!0};return gr(()=>{e.current&&t[0]()}),r.add(()=>{e.current=!1})},style(t,e,o){let a=t.style.getPropertyValue(e);return Object.assign(t.style,{[e]:o}),this.add(()=>{Object.assign(t.style,{[e]:a})})},group(t){let e=et();return t(e),this.add(()=>e.dispose())},add(t){return n.includes(t)||n.push(t),()=>{let e=n.indexOf(t);if(e>=0)for(let o of n.splice(e,1))o()}},dispose(){for(let t of n.splice(0))t()}};return r}function mt(){let[n]=c.useState(et);return c.useEffect(()=>()=>n.dispose(),[n]),n}let ae=(n,r)=>{Vt.isServer?c.useEffect(n,r):c.useLayoutEffect(n,r)};function gt(n){let r=c.useRef(n);return ae(()=>{r.current=n},[n]),r}let $=function(n){let r=gt(n);return c.useCallback((...t)=>r.current(...t),[r])};function Hc(n){let r=n.width/2,t=n.height/2;return{top:n.clientY-t,right:n.clientX+r,bottom:n.clientY+t,left:n.clientX-r}}function Wc(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function vi({disabled:n=!1}={}){let r=c.useRef(null),[t,e]=c.useState(!1),o=mt(),a=$(()=>{r.current=null,e(!1),o.dispose()}),i=$(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,e(!0);{let l=zt(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",d=>{if(r.current){let u=Hc(d);e(Wc(u,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:t,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Rc=c.createContext(void 0);function br(){return c.useContext(Rc)}function Po(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Fe(n,r,...t){if(n in r){let o=r[n];return typeof o=="function"?o(...t):o}let e=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Fe),e}var Mt=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(Mt||{}),Ot=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(Ot||{});function Ce(){let n=Vc();return c.useCallback(r=>Bc({mergeRefs:n,...r}),[n])}function Bc({ourProps:n,theirProps:r,slot:t,defaultTag:e,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??zc;let l=yi(r,n);if(a)return vr(l,t,e,i,s);let d=o??0;if(d&2){let{static:u=!1,...f}=l;if(u)return vr(f,t,e,i,s)}if(d&1){let{unmount:u=!0,...f}=l;return Fe(u?0:1,{0(){return null},1(){return vr({...f,hidden:!0,style:{display:"none"}},t,e,i,s)}})}return vr(l,t,e,i,s)}function vr(n,r={},t,e,o){let{as:a=t,children:i,refName:s="ref",...l}=To(n,["unmount","static"]),d=n.ref!==void 0?{[s]:n.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 h=!1,p=[];for(let[m,g]of Object.entries(r))typeof g=="boolean"&&(h=!0),g===!0&&p.push(m.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let m of p)f[`data-${m}`]=""}}if(a===c.Fragment&&(Object.keys(Pt(l)).length>0||Object.keys(Pt(f)).length>0))if(!c.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(Pt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${e} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Pt(l)).concat(Object.keys(Pt(f))).map(h=>` - ${h}`).join(`
|
|
26
|
-
`),"","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(h=>` - ${h}`).join(`
|
|
17
|
+
*/var za;function Bu(){return za||(za=1,process.env.NODE_ENV!=="production"&&function(){function n(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===M?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case v:return"Fragment";case y:return"Profiler";case g:return"StrictMode";case E:return"Suspense";case C:return"SuspenseList";case _:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case h:return"Portal";case b:return(k.displayName||"Context")+".Provider";case w:return(k._context.displayName||"Context")+".Consumer";case D:var F=k.render;return k=k.displayName,k||(k=F.displayName||F.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case S:return F=k.displayName||null,F!==null?F:n(k.type)||"Memo";case x:F=k._payload,k=k._init;try{return n(k(F))}catch{}}return null}function r(k){return""+k}function e(k){try{r(k);var F=!1}catch{F=!0}if(F){F=console;var J=F.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return J.call(F,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),r(k)}}function t(k){if(k===v)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===x)return"<...>";try{var F=n(k);return F?"<"+F+">":"<...>"}catch{return"<...>"}}function o(){var k=P.A;return k===null?null:k.getOwner()}function a(){return Error("react-stack-top-frame")}function i(k){if(Y.call(k,"key")){var F=Object.getOwnPropertyDescriptor(k,"key").get;if(F&&F.isReactWarning)return!1}return k.key!==void 0}function s(k,F){function J(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",F))}J.isReactWarning=!0,Object.defineProperty(k,"key",{get:J,configurable:!0})}function l(){var k=n(this.type);return $[k]||($[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function u(k,F,J,G,W,te,X,A){return J=te.ref,k={$$typeof:f,type:k,key:F,props:te,_owner:W},(J!==void 0?J:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:l}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function c(k,F,J,G,W,te,X,A){var K=F.children;if(K!==void 0)if(G)if(H(K)){for(G=0;G<K.length;G++)p(K[G]);Object.freeze&&Object.freeze(K)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(K);if(Y.call(F,"key")){K=n(k);var ne=Object.keys(F).filter(function(Zn){return Zn!=="key"});G=0<ne.length?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}",q[K+G]||(ne=0<ne.length?"{"+ne.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,G,K,ne,K),q[K+G]=!0)}if(K=null,J!==void 0&&(e(J),K=""+J),i(F)&&(e(F.key),K=""+F.key),"key"in F){J={};for(var re in F)re!=="key"&&(J[re]=F[re])}else J=F;return K&&s(J,typeof k=="function"?k.displayName||k.name||"Unknown":k),u(k,K,te,W,o(),J,X,A)}function p(k){typeof k=="object"&&k!==null&&k.$$typeof===f&&k._store&&(k._store.validated=1)}var m=d,f=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),b=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),P=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,H=Array.isArray,N=console.createTask?console.createTask:function(){return null};m={"react-stack-bottom-frame":function(k){return k()}};var L,$={},V=m["react-stack-bottom-frame"].bind(m,a)(),T=N(t(a)),q={};xn.Fragment=v,xn.jsx=function(k,F,J,G,W){var te=1e4>P.recentlyCreatedOwnerStacks++;return c(k,F,J,!1,G,W,te?Error("react-stack-top-frame"):V,te?N(t(k)):T)},xn.jsxs=function(k,F,J,G,W){var te=1e4>P.recentlyCreatedOwnerStacks++;return c(k,F,J,!0,G,W,te?Error("react-stack-top-frame"):V,te?N(t(k)):T)}}()),xn}var Ua;function Vu(){return Ua||(Ua=1,process.env.NODE_ENV==="production"?tr.exports=Ru():tr.exports=Bu()),tr.exports}var O=Vu();function Qa(n){var r,e,t="";if(typeof n=="string"||typeof n=="number")t+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(r=0;r<o;r++)n[r]&&(e=Qa(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function Oe(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=Qa(n))&&(t&&(t+=" "),t+=r);return t}const io="-",zu=n=>{const r=Qu(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(io);return s[0]===""&&s.length!==1&&s.shift(),Ka(s,r)||Uu(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},Ka=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?Ka(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(io);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},qa=/^\[(.+)\]$/,Uu=n=>{if(qa.test(n)){const r=qa.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},Qu=n=>{const{theme:r,classGroups:e}=n,t={nextPart:new Map,validators:[]};for(const o in e)so(e[o],t,o,r);return t},so=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:Ga(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(Ku(o)){so(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{so(i,Ga(r,a),e,t)})})},Ga=(n,r)=>{let e=n;return r.split(io).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},Ku=n=>n.isThemeGetter,qu=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,e=new Map,t=new Map;const o=(a,i)=>{e.set(a,i),r++,r>n&&(r=0,t=e,e=new Map)};return{get(a){let i=e.get(a);if(i!==void 0)return i;if((i=t.get(a))!==void 0)return o(a,i),i},set(a,i){e.has(a)?e.set(a,i):o(a,i)}}},lo="!",uo=":",Gu=uo.length,Xu=n=>{const{prefix:r,experimentalParseClassName:e}=n;let t=o=>{const a=[];let i=0,s=0,l=0,u;for(let h=0;h<o.length;h++){let v=o[h];if(i===0&&s===0){if(v===uo){a.push(o.slice(l,h)),l=h+Gu;continue}if(v==="/"){u=h;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const c=a.length===0?o:o.substring(l),p=Ju(c),m=p!==c,f=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:f}};if(r){const o=r+uo,a=t;t=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(e){const o=t;t=a=>e({className:a,parseClassName:o})}return t},Ju=n=>n.endsWith(lo)?n.substring(0,n.length-1):n.startsWith(lo)?n.substring(1):n,Zu=n=>{const r=Object.fromEntries(n.orderSensitiveModifiers.map(t=>[t,!0]));return t=>{if(t.length<=1)return t;const o=[];let a=[];return t.forEach(i=>{i[0]==="["||r[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},ec=n=>({cache:qu(n.cacheSize),parseClassName:Xu(n),sortModifiers:Zu(n),...zu(n)}),tc=/\s+/,nc=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(tc);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:p,modifiers:m,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:v}=e(c);if(p){l=c+(l.length>0?" "+l:l);continue}let g=!!v,y=t(g?h.substring(0,v):h);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=t(h),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const w=a(m).join(":"),b=f?w+lo:w,D=b+y;if(i.includes(D))continue;i.push(D);const E=o(y,g);for(let C=0;C<E.length;++C){const S=E[C];i.push(b+S)}l=c+(l.length>0?" "+l:l)}return l};function rc(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=Xa(r))&&(t&&(t+=" "),t+=e);return t}const Xa=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=Xa(n[t]))&&(e&&(e+=" "),e+=r);return e};function oc(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,p)=>p(c),n());return e=ec(u),t=e.cache.get,o=e.cache.set,a=s,s(l)}function s(l){const u=t(l);if(u)return u;const c=nc(l,e);return o(l,c),c}return function(){return a(rc.apply(null,arguments))}}const _e=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},Ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Za=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ac=/^\d+\/\d+$/,ic=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=n=>ac.test(n),ee=n=>!!n&&!Number.isNaN(Number(n)),yt=n=>!!n&&Number.isInteger(Number(n)),co=n=>n.endsWith("%")&&ee(n.slice(0,-1)),at=n=>ic.test(n),dc=()=>!0,fc=n=>sc.test(n)&&!lc.test(n),ei=()=>!1,pc=n=>uc.test(n),mc=n=>cc.test(n),hc=n=>!z(n)&&!U(n),vc=n=>Xt(n,ai,ei),z=n=>Ja.test(n),It=n=>Xt(n,ii,fc),fo=n=>Xt(n,xc,ee),ti=n=>Xt(n,ri,ei),gc=n=>Xt(n,oi,mc),nr=n=>Xt(n,si,pc),U=n=>Za.test(n),Dn=n=>Jt(n,ii),bc=n=>Jt(n,Dc),ni=n=>Jt(n,ri),yc=n=>Jt(n,ai),wc=n=>Jt(n,oi),rr=n=>Jt(n,si,!0),Xt=(n,r,e)=>{const t=Ja.exec(n);return t?t[1]?r(t[1]):e(t[2]):!1},Jt=(n,r,e=!1)=>{const t=Za.exec(n);return t?t[1]?r(t[1]):e:!1},ri=n=>n==="position"||n==="percentage",oi=n=>n==="image"||n==="url",ai=n=>n==="length"||n==="size"||n==="bg-size",ii=n=>n==="length",xc=n=>n==="number",Dc=n=>n==="family-name",si=n=>n==="shadow",Ec=oc(()=>{const n=_e("color"),r=_e("font"),e=_e("text"),t=_e("font-weight"),o=_e("tracking"),a=_e("leading"),i=_e("breakpoint"),s=_e("container"),l=_e("spacing"),u=_e("radius"),c=_e("shadow"),p=_e("inset-shadow"),m=_e("text-shadow"),f=_e("drop-shadow"),h=_e("blur"),v=_e("perspective"),g=_e("aspect"),y=_e("ease"),w=_e("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...D(),U,z],C=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],x=()=>[U,z,l],_=()=>[Gt,"full","auto",...x()],M=()=>[yt,"none","subgrid",U,z],P=()=>["auto",{span:["full",yt,U,z]},yt,U,z],Y=()=>[yt,"auto",U,z],H=()=>["auto","min","max","fr",U,z],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...x()],V=()=>[Gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],T=()=>[n,U,z],q=()=>[...D(),ni,ti,{position:[U,z]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",yc,vc,{size:[U,z]}],J=()=>[co,Dn,It],G=()=>["","none","full",u,U,z],W=()=>["",ee,Dn,It],te=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[ee,co,ni,ti],K=()=>["","none",h,U,z],ne=()=>["none",ee,U,z],re=()=>["none",ee,U,z],Zn=()=>[ee,U,z],ao=()=>[Gt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[at],breakpoint:[at],color:[dc],container:[at],"drop-shadow":[at],ease:["in","out","in-out"],font:[hc],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[at],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[at],shadow:[at],spacing:["px",ee],text:[at],"text-shadow":[at],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gt,z,U,g]}],container:["container"],columns:[{columns:[ee,z,U,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[yt,"auto",U,z]}],basis:[{basis:[Gt,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,Gt,"auto","initial","none",z]}],grow:[{grow:["",ee,U,z]}],shrink:[{shrink:["",ee,U,z]}],order:[{order:[yt,"first","last","none",U,z]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[s,"screen",...V()]}],"min-w":[{"min-w":[s,"screen","none",...V()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...V()]}],h:[{h:["screen",...V()]}],"min-h":[{"min-h":["screen","none",...V()]}],"max-h":[{"max-h":["screen",...V()]}],"font-size":[{text:["base",e,Dn,It]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,U,fo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",co,z]}],"font-family":[{font:[bc,z,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,U,z]}],"line-clamp":[{"line-clamp":[ee,"none",U,fo]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",U,z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",U,It]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[ee,"auto",U,z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U,z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U,z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yt,U,z],radial:["",U,z],conic:[yt,U,z]},wc,gc]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,U,z]}],"outline-w":[{outline:["",ee,Dn,It]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",c,rr,nr]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",p,rr,nr]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[ee,It]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",m,rr,nr]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[ee,U,z]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[U,z]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,z]}],filter:[{filter:["","none",U,z]}],blur:[{blur:K()}],brightness:[{brightness:[ee,U,z]}],contrast:[{contrast:[ee,U,z]}],"drop-shadow":[{"drop-shadow":["","none",f,rr,nr]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",ee,U,z]}],"hue-rotate":[{"hue-rotate":[ee,U,z]}],invert:[{invert:["",ee,U,z]}],saturate:[{saturate:[ee,U,z]}],sepia:[{sepia:["",ee,U,z]}],"backdrop-filter":[{"backdrop-filter":["","none",U,z]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[ee,U,z]}],"backdrop-contrast":[{"backdrop-contrast":[ee,U,z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,U,z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,U,z]}],"backdrop-invert":[{"backdrop-invert":["",ee,U,z]}],"backdrop-opacity":[{"backdrop-opacity":[ee,U,z]}],"backdrop-saturate":[{"backdrop-saturate":[ee,U,z]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,U,z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",U,z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",U,z]}],ease:[{ease:["linear","initial",y,U,z]}],delay:[{delay:[ee,U,z]}],animate:[{animate:["none",w,U,z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,U,z]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:Zn()}],"skew-x":[{"skew-x":Zn()}],"skew-y":[{"skew-y":Zn()}],transform:[{transform:[U,z,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ao()}],"translate-x":[{"translate-x":ao()}],"translate-y":[{"translate-y":ao()}],"translate-z":[{"translate-z":ao()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U,z]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U,z]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[ee,Dn,It,fo]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function or(...n){return Ec(Oe(n))}const li=({className:n,text:r,onClick:e,disabled:t})=>O.jsx("button",{disabled:t,onClick:e,className:or("bg-petnow-orange-primary disabled:bg-petnow-grey-primary sm:hover:bg-petnow-orange-40 sm:disabled:hover:bg-petnow-grey-primary w-full cursor-pointer rounded-xl py-5 text-2xl font-bold text-white transition-colors duration-200",n),children:r}),ui=typeof document<"u"?d.useLayoutEffect:()=>{};function kc(n){const r=d.useRef(null);return ui(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const wt=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},Ft=n=>n&&"window"in n&&n.window===n?n:wt(n).defaultView||window;function Sc(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function Cc(n){return Sc(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let _c=!1;function po(){return _c}function ci(n,r){if(!po())return r&&n?n.contains(r):!1;if(!n||!r)return!1;let e=r;for(;e!==null;){if(e===n)return!0;e.tagName==="SLOT"&&e.assignedSlot?e=e.assignedSlot.parentNode:Cc(e)?e=e.host:e=e.parentNode}return!1}const mo=(n=document)=>{var r;if(!po())return n.activeElement;let e=n.activeElement;for(;e&&"shadowRoot"in e&&(!((r=e.shadowRoot)===null||r===void 0)&&r.activeElement);)e=e.shadowRoot.activeElement;return e};function di(n){return po()&&n.target.shadowRoot&&n.composedPath?n.composedPath()[0]:n.target}function ar(n){var r;return typeof window>"u"||window.navigator==null?!1:((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands.some(e=>n.test(e.brand)))||n.test(window.navigator.userAgent)}function ho(n){var r;return typeof window<"u"&&window.navigator!=null?n.test(((r=window.navigator.userAgentData)===null||r===void 0?void 0:r.platform)||window.navigator.platform):!1}function it(n){if(process.env.NODE_ENV==="test")return n;let r=null;return()=>(r==null&&(r=n()),r)}const vo=it(function(){return ho(/^Mac/i)}),Mc=it(function(){return ho(/^iPhone/i)}),Oc=it(function(){return ho(/^iPad/i)||vo()&&navigator.maxTouchPoints>1}),Tc=it(function(){return Mc()||Oc()});it(function(){return vo()||Tc()}),it(function(){return ar(/AppleWebKit/i)&&!Pc()});const Pc=it(function(){return ar(/Chrome/i)}),Nc=it(function(){return ar(/Android/i)});it(function(){return ar(/Firefox/i)});function fi(){let n=d.useRef(new Map),r=d.useCallback((o,a,i,s)=>{let l=s!=null&&s.once?(...u)=>{n.current.delete(i),i(...u)}:i;n.current.set(i,{type:a,eventTarget:o,fn:l,options:s}),o.addEventListener(a,l,s)},[]),e=d.useCallback((o,a,i,s)=>{var l;let u=((l=n.current.get(i))===null||l===void 0?void 0:l.fn)||i;o.removeEventListener(a,u,s),n.current.delete(i)},[]),t=d.useCallback(()=>{n.current.forEach((o,a)=>{e(o.eventTarget,o.type,a,o.options)})},[e]);return d.useEffect(()=>t,[t]),{addGlobalListener:r,removeGlobalListener:e,removeAllGlobalListeners:t}}function Ic(n){return n.mozInputSource===0&&n.isTrusted?!0:Nc()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function pi(n){let r=n;return r.nativeEvent=n,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function Fc(n,r){Object.defineProperty(n,"target",{value:r}),Object.defineProperty(n,"currentTarget",{value:r})}function mi(n){let r=d.useRef({isFocused:!1,observer:null});ui(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=kc(t=>{n==null||n(t)});return d.useCallback(t=>{if(t.target instanceof HTMLButtonElement||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement){r.current.isFocused=!0;let o=t.target,a=i=>{if(r.current.isFocused=!1,o.disabled){let s=pi(i);e(s)}r.current.observer&&(r.current.observer.disconnect(),r.current.observer=null)};o.addEventListener("focusout",a,{once:!0}),r.current.observer=new MutationObserver(()=>{if(r.current.isFocused&&o.disabled){var i;(i=r.current.observer)===null||i===void 0||i.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),r.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let Lc=!1,En=null,go=new Set,kn=new Map,Lt=!1,bo=!1;const $c={Tab:!0,Escape:!0};function yo(n,r){for(let e of go)e(n,r)}function Ac(n){return!(n.metaKey||!vo()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function ir(n){Lt=!0,Ac(n)&&(En="keyboard",yo("keyboard",n))}function Ae(n){En="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(Lt=!0,yo("pointer",n))}function hi(n){Ic(n)&&(Lt=!0,En="virtual")}function vi(n){n.target===window||n.target===document||Lc||!n.isTrusted||(!Lt&&!bo&&(En="virtual",yo("virtual",n)),Lt=!1,bo=!1)}function gi(){Lt=!1,bo=!0}function wo(n){if(typeof window>"u"||kn.get(Ft(n)))return;const r=Ft(n),e=wt(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){Lt=!0,t.apply(this,arguments)},e.addEventListener("keydown",ir,!0),e.addEventListener("keyup",ir,!0),e.addEventListener("click",hi,!0),r.addEventListener("focus",vi,!0),r.addEventListener("blur",gi,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",Ae,!0),e.addEventListener("pointermove",Ae,!0),e.addEventListener("pointerup",Ae,!0)):process.env.NODE_ENV==="test"&&(e.addEventListener("mousedown",Ae,!0),e.addEventListener("mousemove",Ae,!0),e.addEventListener("mouseup",Ae,!0)),r.addEventListener("beforeunload",()=>{bi(n)},{once:!0}),kn.set(r,{focus:t})}const bi=(n,r)=>{const e=Ft(n),t=wt(n);r&&t.removeEventListener("DOMContentLoaded",r),kn.has(e)&&(e.HTMLElement.prototype.focus=kn.get(e).focus,t.removeEventListener("keydown",ir,!0),t.removeEventListener("keyup",ir,!0),t.removeEventListener("click",hi,!0),e.removeEventListener("focus",vi,!0),e.removeEventListener("blur",gi,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",Ae,!0),t.removeEventListener("pointermove",Ae,!0),t.removeEventListener("pointerup",Ae,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",Ae,!0),t.removeEventListener("mousemove",Ae,!0),t.removeEventListener("mouseup",Ae,!0)),kn.delete(e))};function Yc(n){const r=wt(n);let e;return r.readyState!=="loading"?wo(n):(e=()=>{wo(n)},r.addEventListener("DOMContentLoaded",e)),()=>bi(n,e)}typeof document<"u"&&Yc();function yi(){return En!=="pointer"}const Wc=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function jc(n,r,e){let t=wt(e==null?void 0:e.target);const o=typeof window<"u"?Ft(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Ft(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?Ft(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?Ft(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||t.activeElement instanceof o&&!Wc.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(n&&r==="keyboard"&&e instanceof s&&!$c[e.key])}function Hc(n,r,e){wo(),d.useEffect(()=>{let t=(o,a)=>{jc(!!(e!=null&&e.isTextInput),o,a)&&n(yi())};return go.add(t),()=>{go.delete(t)}},r)}function Rc(n){let{isDisabled:r,onFocus:e,onBlur:t,onFocusChange:o}=n;const a=d.useCallback(l=>{if(l.target===l.currentTarget)return t&&t(l),o&&o(!1),!0},[t,o]),i=mi(a),s=d.useCallback(l=>{const u=wt(l.target),c=u?mo(u):mo();l.target===l.currentTarget&&c===di(l.nativeEvent)&&(e&&e(l),o&&o(!0),i(l))},[o,e,i]);return{focusProps:{onFocus:!r&&(e||o||t)?s:void 0,onBlur:!r&&(t||o)?a:void 0}}}function Bc(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=fi(),l=d.useCallback(p=>{p.currentTarget.contains(p.target)&&a.current.isFocusWithin&&!p.currentTarget.contains(p.relatedTarget)&&(a.current.isFocusWithin=!1,s(),e&&e(p),o&&o(!1))},[e,o,a,s]),u=mi(l),c=d.useCallback(p=>{if(!p.currentTarget.contains(p.target))return;const m=wt(p.target),f=mo(m);if(!a.current.isFocusWithin&&f===di(p.nativeEvent)){t&&t(p),o&&o(!0),a.current.isFocusWithin=!0,u(p);let h=p.currentTarget;i(m,"focus",v=>{if(a.current.isFocusWithin&&!ci(h,v.target)){let g=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});Fc(g,h);let y=pi(g);l(y)}},{capture:!0})}},[t,o,u,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}let sr=!1,xo=0;function Do(){sr=!0,setTimeout(()=>{sr=!1},50)}function wi(n){n.pointerType==="touch"&&Do()}function Vc(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",wi):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Do),xo++,()=>{xo--,!(xo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",wi):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Do))}}function Eo(n){let{onHoverStart:r,onHoverChange:e,onHoverEnd:t,isDisabled:o}=n,[a,i]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(Vc,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=fi(),{hoverProps:c,triggerHoverEnd:p}=d.useMemo(()=>{let m=(v,g)=>{if(s.pointerType=g,o||g==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let y=v.currentTarget;s.target=y,l(wt(v.target),"pointerover",w=>{s.isHovered&&s.target&&!ci(s.target,w.target)&&f(w,w.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:y,pointerType:g}),e&&e(!0),i(!0)},f=(v,g)=>{let y=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!y)&&(s.isHovered=!1,u(),t&&t({type:"hoverend",target:y,pointerType:g}),e&&e(!1),i(!1))},h={};return typeof PointerEvent<"u"?(h.onPointerEnter=v=>{sr&&v.pointerType==="mouse"||m(v,v.pointerType)},h.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&f(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(h.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},h.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!sr&&m(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},h.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&f(v,"mouse")}),{hoverProps:h,triggerHoverEnd:f}},[r,e,t,o,s,l,u]);return d.useEffect(()=>{o&&p({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}function ko(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||yi()}),[a,i]=d.useState(!1),[s,l]=d.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=d.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=d.useCallback(f=>{o.current.isFocused=f,i(f),u()},[u]);Hc(f=>{o.current.isFocusVisible=f,u()},[],{isTextInput:e});let{focusProps:p}=Rc({isDisabled:t,onFocusChange:c}),{focusWithinProps:m}=Bc({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?m:p}}var zc=Object.defineProperty,Uc=(n,r,e)=>r in n?zc(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,So=(n,r,e)=>(Uc(n,typeof r!="symbol"?r+"":r,e),e);let Qc=class{constructor(){So(this,"current",this.detect()),So(this,"handoffState","pending"),So(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"}},$t=new Qc;function At(n){var r,e;return $t.isServer?null:n?"ownerDocument"in n?n.ownerDocument:"current"in n?(e=(r=n.current)==null?void 0:r.ownerDocument)!=null?e:document:null:document}function lr(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function Re(){let n=[],r={addEventListener(e,t,o,a){return e.addEventListener(t,o,a),r.add(()=>e.removeEventListener(t,o,a))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return lr(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,o){let a=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:o}),this.add(()=>{Object.assign(e.style,{[t]:a})})},group(e){let t=Re();return e(t),this.add(()=>t.dispose())},add(e){return n.includes(e)||n.push(e),()=>{let t=n.indexOf(e);if(t>=0)for(let o of n.splice(t,1))o()}},dispose(){for(let e of n.splice(0))e()}};return r}function xt(){let[n]=d.useState(Re);return d.useEffect(()=>()=>n.dispose(),[n]),n}let ie=(n,r)=>{$t.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function st(n){let r=d.useRef(n);return ie(()=>{r.current=n},[n]),r}let B=function(n){let r=st(n);return d.useCallback((...e)=>r.current(...e),[r])};function Kc(n){let r=n.width/2,e=n.height/2;return{top:n.clientY-e,right:n.clientX+r,bottom:n.clientY+e,left:n.clientX-r}}function qc(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function xi({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=xt(),a=B(()=>{r.current=null,t(!1),o.dispose()}),i=B(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=At(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",u=>{if(r.current){let c=Kc(u);t(qc(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Gc=d.createContext(void 0);function ur(){return d.useContext(Gc)}function Co(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Se(n,r,...e){if(n in r){let o=r[n];return typeof o=="function"?o(...e):o}let t=new Error(`Tried to handle "${n}" but there is no handler defined. Only defined handlers are: ${Object.keys(r).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Se),t}var Dt=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(Dt||{}),Et=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(Et||{});function ye(){let n=Jc();return d.useCallback(r=>Xc({mergeRefs:n,...r}),[n])}function Xc({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??Zc;let l=Di(r,n);if(a)return cr(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...p}=l;if(c)return cr(p,e,t,i,s)}if(u&1){let{unmount:c=!0,...p}=l;return Se(c?0:1,{0(){return null},1(){return cr({...p,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return cr(l,e,t,i,s)}function cr(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=_o(n,["unmount","static"]),u=n.ref!==void 0?{[s]:n.ref}:{},c=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 p={};if(r){let m=!1,f=[];for(let[h,v]of Object.entries(r))typeof v=="boolean"&&(m=!0),v===!0&&f.push(h.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(m){p["data-headlessui-state"]=f.join(" ");for(let h of f)p[`data-${h}`]=""}}if(a===d.Fragment&&(Object.keys(kt(l)).length>0||Object.keys(kt(p)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(kt(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(kt(l)).concat(Object.keys(kt(p))).map(m=>` - ${m}`).join(`
|
|
23
|
+
`),"","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(m=>` - ${m}`).join(`
|
|
27
24
|
`)].join(`
|
|
28
|
-
`))}else{let
|
|
25
|
+
`))}else{let m=c.props,f=m==null?void 0:m.className,h=typeof f=="function"?(...y)=>Co(f(...y),l.className):Co(f,l.className),v=h?{className:h}:{},g=Di(c.props,kt(_o(l,["ref"])));for(let y in p)y in g&&delete p[y];return d.cloneElement(c,Object.assign({},g,p,u,{ref:o(ed(c),u.ref)},v))}return d.createElement(a,Object.assign({},_o(l,["ref"]),a!==d.Fragment&&u,a!==d.Fragment&&p),c)}function Jc(){let n=d.useRef([]),r=d.useCallback(e=>{for(let t of n.current)t!=null&&(typeof t=="function"?t(e):t.current=e)},[]);return(...e)=>{if(!e.every(t=>t==null))return n.current=e,r}}function Zc(...n){return n.every(r=>r==null)?void 0:r=>{for(let e of n)e!=null&&(typeof e=="function"?e(r):e.current=r)}}function Di(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let t of n)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(e[o]!=null||(e[o]=[]),e[o].push(t[o])):r[o]=t[o];if(r.disabled||r["aria-disabled"])for(let t in e)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(t)&&(e[t]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let t in e)Object.assign(r,{[t](o,...a){let i=e[t];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 Sn(...n){if(n.length===0)return{};if(n.length===1)return n[0];let r={},e={};for(let t of n)for(let o in t)o.startsWith("on")&&typeof t[o]=="function"?(e[o]!=null||(e[o]=[]),e[o].push(t[o])):r[o]=t[o];for(let t in e)Object.assign(r,{[t](...o){let a=e[t];for(let i of a)i==null||i(...o)}});return r}function he(n){var r;return Object.assign(d.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function kt(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function _o(n,r=[]){let e=Object.assign({},n);for(let t of r)t in e&&delete e[t];return e}function ed(n){return d.version.split(".")[0]>="19"?n.props.ref:n.ref}function Ei(n,r,e){let[t,o]=d.useState(e),a=n!==void 0,i=d.useRef(a),s=d.useRef(!1),l=d.useRef(!1);return a&&!i.current&&!s.current?(s.current=!0,i.current=a,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!a&&i.current&&!l.current&&(l.current=!0,i.current=a,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[a?n:t,B(u=>(a||o(u),r==null?void 0:r(u)))]}function ki(n){let[r]=d.useState(n);return r}function Si(n={},r=null,e=[]){for(let[t,o]of Object.entries(n))_i(e,Ci(r,t),o);return e}function Ci(n,r){return n?n+"["+r+"]":r}function _i(n,r,e){if(Array.isArray(e))for(let[t,o]of e.entries())_i(n,Ci(r,t.toString()),o);else e instanceof Date?n.push([r,e.toISOString()]):typeof e=="boolean"?n.push([r,e?"1":"0"]):typeof e=="string"?n.push([r,e]):typeof e=="number"?n.push([r,`${e}`]):e==null?n.push([r,""]):Si(e,r,n)}function td(n){var r,e;let t=(r=n==null?void 0:n.form)!=null?r:n.closest("form");if(t){for(let o of t.elements)if(o!==n&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(e=t.requestSubmit)==null||e.call(t)}}let nd="span";var Zt=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(Zt||{});function rd(n,r){var e;let{features:t=1,...o}=n,a={ref:r,"aria-hidden":(t&2)===2?!0:(e=o["aria-hidden"])!=null?e: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 ye()({ourProps:a,theirProps:o,slot:{},defaultTag:nd,name:"Hidden"})}let Cn=he(rd),od=d.createContext(null);function ad({children:n}){let r=d.useContext(od);if(!r)return d.createElement(d.Fragment,null,n);let{target:e}=r;return e?be.createPortal(d.createElement(d.Fragment,null,n),e):null}function Mi({data:n,form:r,disabled:e,onReset:t,overrides:o}){let[a,i]=d.useState(null),s=xt();return d.useEffect(()=>{if(t&&a)return s.addEventListener(a,"reset",t)},[a,r,t]),d.createElement(ad,null,d.createElement(id,{setForm:i,formId:r}),Si(n).map(([l,u])=>d.createElement(Cn,{features:Zt.Hidden,...kt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:e,name:l,value:u,...o})})))}function id({setForm:n,formId:r}){return d.useEffect(()=>{if(r){let e=document.getElementById(r);e&&n(e)}},[n,r]),r?null:d.createElement(Cn,{features:Zt.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&n(t)}})}let sd=d.createContext(void 0);function Mo(){return d.useContext(sd)}function Oi(n){let r=n.parentElement,e=null;for(;r&&!(r instanceof HTMLFieldSetElement);)r instanceof HTMLLegendElement&&(e=r),r=r.parentElement;let t=(r==null?void 0:r.getAttribute("disabled"))==="";return t&&ld(e)?!1:t}function ld(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(r instanceof HTMLLegendElement)return!1;r=r.previousElementSibling}return!0}let Ti=Symbol();function ud(n,r=!0){return Object.assign(n,{[Ti]:r})}function Ce(...n){let r=d.useRef(n);d.useEffect(()=>{r.current=n},[n]);let e=B(t=>{for(let o of r.current)o!=null&&(typeof o=="function"?o(t):o.current=t)});return n.every(t=>t==null||(t==null?void 0:t[Ti]))?void 0:e}let dr=d.createContext(null);dr.displayName="DescriptionContext";function Pi(){let n=d.useContext(dr);if(n===null){let r=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Pi),r}return n}function Ni(){var n,r;return(r=(n=d.useContext(dr))==null?void 0:n.value)!=null?r:void 0}function cd(){let[n,r]=d.useState([]);return[n.length>0?n.join(" "):void 0,d.useMemo(()=>function(e){let t=B(a=>(r(i=>[...i,a]),()=>r(i=>{let s=i.slice(),l=s.indexOf(a);return l!==-1&&s.splice(l,1),s}))),o=d.useMemo(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return d.createElement(dr.Provider,{value:o},e.children)},[r])]}let dd="p";function fd(n,r){let e=d.useId(),t=ur(),{id:o=`headlessui-description-${e}`,...a}=n,i=Pi(),s=Ce(r);ie(()=>i.register(o),[o,i.register]);let l=t||!1,u=d.useMemo(()=>({...i.slot,disabled:l}),[i.slot,l]),c={ref:s,...i.props,id:o};return ye()({ourProps:c,theirProps:a,slot:u,defaultTag:dd,name:i.name||"Description"})}let pd=he(fd),Ii=Object.assign(pd,{});var se=(n=>(n.Space=" ",n.Enter="Enter",n.Escape="Escape",n.Backspace="Backspace",n.Delete="Delete",n.ArrowLeft="ArrowLeft",n.ArrowUp="ArrowUp",n.ArrowRight="ArrowRight",n.ArrowDown="ArrowDown",n.Home="Home",n.End="End",n.PageUp="PageUp",n.PageDown="PageDown",n.Tab="Tab",n))(se||{});let fr=d.createContext(null);fr.displayName="LabelContext";function Fi(){let n=d.useContext(fr);if(n===null){let r=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(r,Fi),r}return n}function _n(n){var r,e,t;let o=(e=(r=d.useContext(fr))==null?void 0:r.value)!=null?e:void 0;return((t=n==null?void 0:n.length)!=null?t:0)>0?[o,...n].filter(Boolean).join(" "):o}function Li({inherit:n=!1}={}){let r=_n(),[e,t]=d.useState([]),o=n?[r,...e].filter(Boolean):e;return[o.length>0?o.join(" "):void 0,d.useMemo(()=>function(a){let i=B(l=>(t(u=>[...u,l]),()=>t(u=>{let c=u.slice(),p=c.indexOf(l);return p!==-1&&c.splice(p,1),c}))),s=d.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 d.createElement(fr.Provider,{value:s},a.children)},[t])]}let md="label";function hd(n,r){var e;let t=d.useId(),o=Fi(),a=Mo(),i=ur(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((e=o.props)==null?void 0:e.htmlFor),passive:u=!1,...c}=n,p=Ce(r);ie(()=>o.register(s),[s,o.register]);let m=B(g=>{let y=g.currentTarget;if(y instanceof HTMLLabelElement&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),y instanceof HTMLLabelElement){let w=document.getElementById(y.htmlFor);if(w){let b=w.getAttribute("disabled");if(b==="true"||b==="")return;let D=w.getAttribute("aria-disabled");if(D==="true"||D==="")return;(w instanceof HTMLInputElement&&(w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),f=i||!1,h=d.useMemo(()=>({...o.slot,disabled:f}),[o.slot,f]),v={ref:p,...o.props,id:s,htmlFor:l,onClick:m};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in c&&delete c.onClick),ye()({ourProps:v,theirProps:c,slot:h,defaultTag:l?md:"div",name:o.name||"Label"})}let vd=he(hd),pr=Object.assign(vd,{}),gd=d.createContext(()=>{});function bd({value:n,children:r}){return d.createElement(gd.Provider,{value:n},r)}function en(n,r,e){let t=e.initialDeps??[],o;function a(){var i,s,l,u;let c;e.key&&((i=e.debug)!=null&&i.call(e))&&(c=Date.now());const p=n();if(!(p.length!==t.length||p.some((h,v)=>t[v]!==h)))return o;t=p;let f;if(e.key&&((s=e.debug)!=null&&s.call(e))&&(f=Date.now()),o=r(...p),e.key&&((l=e.debug)!=null&&l.call(e))){const h=Math.round((Date.now()-c)*100)/100,v=Math.round((Date.now()-f)*100)/100,g=v/16,y=(w,b)=>{for(w=String(w);w.length<b;)w=" "+w;return w};console.info(`%c⏱ ${y(v,5)} /${y(h,5)} ms`,`
|
|
29
26
|
font-size: .6rem;
|
|
30
27
|
font-weight: bold;
|
|
31
|
-
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(l=t==null?void 0:t.onChange)==null||l.call(t,o),o}}function Io(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const dd=(n,r)=>Math.abs(n-r)<1,fd=(n,r,t)=>{let e;return function(...o){n.clearTimeout(e),e=n.setTimeout(()=>r.apply(this,o),t)}},pd=n=>n,hd=n=>{const r=Math.max(n.startIndex-n.overscan,0),t=Math.min(n.endIndex+n.overscan,n.count-1),e=[];for(let o=r;o<=t;o++)e.push(o);return e},md=(n,r)=>{const t=n.scrollElement;if(!t)return;const e=n.targetWindow;if(!e)return;const o=i=>{const{width:s,height:l}=i;r({width:Math.round(s),height:Math.round(l)})};if(o(t.getBoundingClientRect()),!e.ResizeObserver)return()=>{};const a=new e.ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const l=s.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(t.getBoundingClientRect())});return a.observe(t,{box:"border-box"}),()=>{a.unobserve(t)}},Ii={passive:!0},gd=typeof window>"u"?!0:"onscrollend"in window,bd=(n,r)=>{const t=n.scrollElement;if(!t)return;const e=n.targetWindow;if(!e)return;let o=0;const a=n.options.useScrollendEvent&&gd?()=>{}:fd(e,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:u,isRtl:f}=n.options;o=u?t.scrollLeft*(f&&-1||1):t.scrollTop,a(),r(o,d)},s=i(!0),l=i(!1);return l(),t.addEventListener("scroll",s,Ii),t.addEventListener("scrollend",l,Ii),()=>{t.removeEventListener("scroll",s),t.removeEventListener("scrollend",l)}},vd=(n,r,t)=>{if(r!=null&&r.borderBoxSize){const e=r.borderBoxSize[0];if(e)return Math.round(e[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[t.options.horizontal?"width":"height"])},yd=(n,{adjustments:r=0,behavior:t},e)=>{var o,a;const i=n+r;(a=(o=e.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[e.options.horizontal?"left":"top"]:i,behavior:t})};class wd{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const e=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var o;(o=e())==null||o.disconnect(),t=null},observe:o=>{var a;return(a=e())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=e())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([e,o])=>{typeof o>"u"&&delete t[e]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:pd,rangeExtractor:hd,onChange:()=>{},measureElement:vd,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...t}},this.notify=t=>{var e,o;(o=(e=this.options).onChange)==null||o.call(e,this,t)},this.maybeNotify=cn(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,e)=>{const o=new Map,a=new Map;for(let i=e-1;i>=0;i--){const s=t[i];if(o.has(s.lane))continue;const l=a.get(s.lane);if(l==null||s.end>l.end?a.set(s.lane,s):s.end<l.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=cn(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,e,o,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:e,scrollMargin:o,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=cn(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:e,scrollMargin:o,getItemKey:a,enabled:i},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const d=this.measurementsCache.slice(0,l);for(let u=l;u<t;u++){const f=a(u),h=this.options.lanes===1?d[u-1]:this.getFurthestMeasurement(d,u),p=h?h.end+this.options.gap:e+o,m=s.get(f),g=typeof m=="number"?m:this.options.estimateSize(u),b=p+g,y=h?h.lane:u%this.options.lanes;d[u]={index:u,start:p,size:g,end:b,key:f,lane:y}}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=cn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(t,e,o)=>this.range=t.length>0&&e>0?xd({measurements:t,outerSize:e,scrollOffset:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getIndexes=cn(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,e,o,a)=>e===null?[]:t({startIndex:e.startIndex,endIndex:e.endIndex,overscan:o,count:a}),{key:process.env.NODE_ENV!=="production"&&"getIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,o=t.getAttribute(e);return o?parseInt(o,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(t,e)=>{const o=this.indexFromElement(t),a=this.measurementsCache[o];if(!a)return;const i=a.key,s=this.elementsCache.get(i);s!==t&&(s&&this.observer.unobserve(s),this.observer.observe(t),this.elementsCache.set(i,t)),t.isConnected&&this.resizeItem(o,this.options.measureElement(t,e,this))},this.resizeItem=(t,e)=>{const o=this.measurementsCache[t];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=e-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,e)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((e,o)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(o))});return}this._measureElement(t,void 0)},this.getVirtualItems=cn(()=>[this.getIndexes(),this.getMeasurements()],(t,e)=>{const o=[];for(let a=0,i=t.length;a<i;a++){const s=t[a],l=e[s];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements();if(e.length!==0)return Io(e[Fi(0,e.length-1,o=>Io(e[o]).start,t)])},this.getOffsetForAlignment=(t,e)=>{const o=this.getSize(),a=this.getScrollOffset();e==="auto"&&t>=a+o&&(e="end"),e==="end"&&(t-=o);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const o=this.measurementsCache[t];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(e==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)e="end";else if(o.start<=i+this.options.scrollPaddingStart)e="start";else return[i,e];const s=o.start-this.options.scrollPaddingStart+(o.size-a)/2;switch(e){case"center":return[this.getOffsetForAlignment(s,e),e];case"end":return[this.getOffsetForAlignment(o.end+this.options.scrollPaddingEnd,e),e];default:return[this.getOffsetForAlignment(o.start-this.options.scrollPaddingStart,e),e]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:e="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,e),{adjustments:void 0,behavior:o})},this.scrollToIndex=(t,{align:e="auto",behavior:o}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(t,e);if(!a)return;const[i,s]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[d]=Io(this.getOffsetForIndex(t,s));dd(d,this.getScrollOffset())||this.scrollToIndex(t,{align:s,behavior:o})}else this.scrollToIndex(t,{align:s,behavior:o})}))},this.scrollBy=(t,{behavior:e}={})=>{this.cancelScrollToIndex(),e==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:e})},this.getTotalSize=()=>{var t;const e=this.getMeasurements();let o;return e.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((t=e[e.length-1])==null?void 0:t.end)??0:Math.max(...e.slice(-this.options.lanes).map(a=>a.end)),Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:e,behavior:o})=>{this.options.scrollToFn(t,{behavior:o,adjustments:e},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(r)}}const Fi=(n,r,t,e)=>{for(;n<=r;){const o=(n+r)/2|0,a=t(o);if(a<e)n=o+1;else if(a>e)r=o-1;else return o}return n>0?n-1:0};function xd({measurements:n,outerSize:r,scrollOffset:t}){const e=n.length-1,a=Fi(0,e,s=>n[s].start,t);let i=a;for(;i<e&&n[i].end<t+r;)i++;return{startIndex:a,endIndex:i}}const Li=typeof document<"u"?L.useLayoutEffect:L.useEffect;function Dd(n){const r=L.useReducer(()=>({}),{})[1],t={...n,onChange:(o,a)=>{var i;a?Se.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[e]=L.useState(()=>new wd(t));return e.setOptions(t),Li(()=>e._didMount(),[]),Li(()=>e._willUpdate()),e}function Ed(n){return Dd({observeElementRect:md,observeElementOffset:bd,scrollToFn:yd,...n})}function kd(n,r){return n!==null&&r!==null&&typeof n=="object"&&typeof r=="object"&&"id"in n&&"id"in r?n.id===r.id:n===r}function $i(n=kd){return c.useCallback((r,t)=>{if(typeof n=="string"){let e=n;return(r==null?void 0:r[e])===(t==null?void 0:t[e])}return n(r,t)},[n])}function Sd(n){if(n===null)return{width:0,height:0};let{width:r,height:t}=n.getBoundingClientRect();return{width:r,height:t}}function Fo(n,r=!1){let[t,e]=c.useReducer(()=>({}),{}),o=c.useMemo(()=>Sd(n),[n,t]);return ae(()=>{if(!n)return;let a=new ResizeObserver(e);return a.observe(n),()=>{a.disconnect()}},[n]),r?{width:`${o.width}px`,height:`${o.height}px`}:o}let Cd=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}};function Ai(n,r){let t=n(),e=new Set;return{getSnapshot(){return t},subscribe(o){return e.add(o),()=>e.delete(o)},dispatch(o,...a){let i=r[o].call(t,...a);i&&(t=i,e.forEach(s=>s()))}}}function Yi(n){return c.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}let _d=new Cd(()=>Ai(()=>[],{ADD(n){return this.includes(n)?this:[...this,n]},REMOVE(n){let r=this.indexOf(n);if(r===-1)return this;let t=this.slice();return t.splice(r,1),t}}));function dn(n,r){let t=_d.get(r),e=c.useId(),o=Yi(t);if(ae(()=>{if(n)return t.dispatch("ADD",e),()=>t.dispatch("REMOVE",e)},[t,n]),!n)return!1;let a=o.indexOf(e),i=o.length;return a===-1&&(a=i,i+=1),a===i-1}let Lo=new Map,jn=new Map;function ji(n){var r;let t=(r=jn.get(n))!=null?r:0;return jn.set(n,t+1),t!==0?()=>Hi(n):(Lo.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>Hi(n))}function Hi(n){var r;let t=(r=jn.get(n))!=null?r:1;if(t===1?jn.delete(n):jn.set(n,t-1),t!==1)return;let e=Lo.get(n);e&&(e["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",e["aria-hidden"]),n.inert=e.inert,Lo.delete(n))}function $o(n,{allowed:r,disallowed:t}={}){let e=dn(n,"inert-others");ae(()=>{var o,a;if(!e)return;let i=et();for(let l of(o=t==null?void 0:t())!=null?o:[])l&&i.add(ji(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let d=zt(l);if(!d)continue;let u=l.parentElement;for(;u&&u!==d.body;){for(let f of u.children)s.some(h=>f.contains(h))||i.add(ji(f));u=u.parentElement}}return i.dispose},[e,r,t])}function Ao(n,r,t){let e=gt(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});c.useEffect(()=>{if(!n)return;let o=r===null?null:r instanceof HTMLElement?r:r.current;if(!o)return;let a=et();if(typeof ResizeObserver<"u"){let i=new ResizeObserver(()=>e.current(o));i.observe(o),a.add(()=>i.disconnect())}if(typeof IntersectionObserver<"u"){let i=new IntersectionObserver(()=>e.current(o));i.observe(o),a.add(()=>i.disconnect())}return()=>a.dispose()},[r,e,n])}let Dr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),Md=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var tt=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(tt||{}),Yo=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Yo||{}),Od=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Od||{});function Wi(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Dr)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function Pd(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Md)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var jo=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(jo||{});function Ri(n,r=0){var t;return n===((t=zt(n))==null?void 0:t.body)?!1:Fe(r,{0(){return n.matches(Dr)},1(){let e=n;for(;e!==null;){if(e.matches(Dr))return!0;e=e.parentElement}return!1}})}var Td=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Td||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function bt(n){n==null||n.focus({preventScroll:!0})}let Nd=["textarea","input"].join(",");function Id(n){var r,t;return(t=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,Nd))!=null?t:!1}function Ho(n,r=t=>t){return n.slice().sort((t,e)=>{let o=r(t),a=r(e);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 Fd(n,r){return fn(Wi(),r,{relativeTo:n})}function fn(n,r,{sorted:t=!0,relativeTo:e=null,skipElements:o=[]}={}){let a=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,i=Array.isArray(n)?t?Ho(n):n:r&64?Pd(n):Wi(n);o.length>0&&i.length>1&&(i=i.filter(p=>!o.some(m=>m!=null&&"current"in m?(m==null?void 0:m.current)===p:m===p))),e=e??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(e))-1;if(r&4)return Math.max(0,i.indexOf(e))+1;if(r&8)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=r&32?{preventScroll:!0}:{},u=0,f=i.length,h;do{if(u>=f||u+f<=0)return 0;let p=l+u;if(r&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}h=i[p],h==null||h.focus(d),u+=s}while(h!==a.activeElement);return r&6&&Id(h)&&h.select(),2}function Bi(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ld(){return/Android/gi.test(window.navigator.userAgent)}function Vi(){return Bi()||Ld()}function Hn(n,r,t,e){let o=gt(t);c.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return document.addEventListener(r,a,e),()=>document.removeEventListener(r,a,e)},[n,r,e])}function zi(n,r,t,e){let o=gt(t);c.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return window.addEventListener(r,a,e),()=>window.removeEventListener(r,a,e)},[n,r,e])}const Ui=30;function Wo(n,r,t){let e=dn(n,"outside-click"),o=gt(t),a=c.useCallback(function(l,d){if(l.defaultPrevented)return;let u=d(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let f=function h(p){return typeof p=="function"?h(p()):Array.isArray(p)||p instanceof Set?p:[p]}(r);for(let h of f)if(h!==null&&(h.contains(u)||l.composed&&l.composedPath().includes(h)))return;return!Ri(u,jo.Loose)&&u.tabIndex!==-1&&l.preventDefault(),o.current(l,u)},[o,r]),i=c.useRef(null);Hn(e,"pointerdown",l=>{var d,u;i.current=((u=(d=l.composedPath)==null?void 0:d.call(l))==null?void 0:u[0])||l.target},!0),Hn(e,"mousedown",l=>{var d,u;i.current=((u=(d=l.composedPath)==null?void 0:d.call(l))==null?void 0:u[0])||l.target},!0),Hn(e,"click",l=>{Vi()||i.current&&(a(l,()=>i.current),i.current=null)},!0);let s=c.useRef({x:0,y:0});Hn(e,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),Hn(e,"touchend",l=>{let d={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(d.x-s.current.x)>=Ui||Math.abs(d.y-s.current.y)>=Ui))return a(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),zi(e,"blur",l=>a(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Tt(...n){return c.useMemo(()=>zt(...n),[...n])}function Ro(n,r,t,e){let o=gt(t);c.useEffect(()=>{n=n??window;function a(i){o.current(i)}return n.addEventListener(r,a,e),()=>n.removeEventListener(r,a,e)},[n,r,e])}function Qi(n){let r=c.useRef({value:"",selectionStart:null,selectionEnd:null});return Ro(n,"blur",t=>{let e=t.target;e instanceof HTMLInputElement&&(r.current={value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd})}),$(()=>{if(document.activeElement!==n&&n instanceof HTMLInputElement&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==r.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:t,selectionEnd:e}=r.current;t!==null&&e!==null&&n.setSelectionRange(t,e)}r.current={value:"",selectionStart:null,selectionEnd:null}}})}function Ki(n,r){return c.useMemo(()=>{var t;if(n.type)return n.type;let e=(t=n.as)!=null?t:"button";if(typeof e=="string"&&e.toLowerCase()==="button"||(r==null?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[n.type,n.as,r])}function $d(){let n;return{before({doc:r}){var t;let e=r.documentElement,o=(t=r.defaultView)!=null?t:window;n=Math.max(0,o.innerWidth-e.clientWidth)},after({doc:r,d:t}){let e=r.documentElement,o=Math.max(0,e.clientWidth-e.offsetWidth),a=Math.max(0,n-o);t.style(e,"paddingRight",`${a}px`)}}}function Ad(){return Bi()?{before({doc:n,d:r,meta:t}){function e(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let s=et();s.style(n.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(n,"click",s=>{if(s.target instanceof HTMLElement)try{let l=s.target.closest("a");if(!l)return;let{hash:d}=new URL(l.href),u=n.querySelector(d);u&&!e(u)&&(i=u)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(s.target instanceof HTMLElement)if(e(s.target)){let l=s.target;for(;l.parentElement&&e(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(n,"touchmove",s=>{if(s.target instanceof HTMLElement){if(s.target.tagName==="INPUT")return;if(e(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 Yd(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function jd(n){let r={};for(let t of n)Object.assign(r,t(r));return r}let Ut=Ai(()=>new Map,{PUSH(n,r){var t;let e=(t=this.get(n))!=null?t:{doc:n,count:0,d:et(),meta:new Set};return e.count++,e.meta.add(r),this.set(n,e),this},POP(n,r){let t=this.get(n);return t&&(t.count--,t.meta.delete(r)),this},SCROLL_PREVENT({doc:n,d:r,meta:t}){let e={doc:n,d:r,meta:jd(t)},o=[Ad(),$d(),Yd()];o.forEach(({before:a})=>a==null?void 0:a(e)),o.forEach(({after:a})=>a==null?void 0:a(e))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Ut.subscribe(()=>{let n=Ut.getSnapshot(),r=new Map;for(let[t]of n)r.set(t,t.documentElement.style.overflow);for(let t of n.values()){let e=r.get(t.doc)==="hidden",o=t.count!==0;(o&&!e||!o&&e)&&Ut.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&Ut.dispatch("TEARDOWN",t)}});function Hd(n,r,t=()=>({containers:[]})){let e=Yi(Ut),o=r?e.get(r):void 0,a=o?o.count>0:!1;return ae(()=>{if(!(!r||!n))return Ut.dispatch("PUSH",r,t),()=>Ut.dispatch("POP",r,t)},[n,r]),a}function Bo(n,r,t=()=>[document.body]){let e=dn(n,"scroll-lock");Hd(e,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function qi(n){return[n.screenX,n.screenY]}function Gi(){let n=c.useRef([-1,-1]);return{wasMoved(r){let t=qi(r);return n.current[0]===t[0]&&n.current[1]===t[1]?!1:(n.current=t,!0)},update(r){n.current=qi(r)}}}function Wd(n=0){let[r,t]=c.useState(n),e=c.useCallback(l=>t(l),[r]),o=c.useCallback(l=>t(d=>d|l),[r]),a=c.useCallback(l=>(r&l)===l,[r]),i=c.useCallback(l=>t(d=>d&~l),[t]),s=c.useCallback(l=>t(d=>d^l),[t]);return{flags:r,setFlag:e,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var Xi,Ji;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Xi=process==null?void 0:process.env)==null?void 0:Xi.NODE_ENV)==="test"&&typeof((Ji=Element==null?void 0:Element.prototype)==null?void 0:Ji.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(`
|
|
32
|
-
`)),[]});var Rd=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(Rd||{});function Vo(n){let r={};for(let t in n)n[t]===!0&&(r[`data-${t}`]="");return r}function zo(n,r,t,e){let[o,a]=c.useState(t),{hasFlag:i,addFlag:s,removeFlag:l}=Wd(n&&o?3:0),d=c.useRef(!1),u=c.useRef(!1),f=mt();return ae(()=>{var h;if(n){if(t&&a(!0),!r){t&&s(3);return}return(h=e==null?void 0:e.start)==null||h.call(e,t),Bd(r,{inFlight:d,prepare(){u.current?u.current=!1:u.current=d.current,d.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 p;u.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(d.current=!1,l(7),t||a(!1),(p=e==null?void 0:e.end)==null||p.call(e,t))}})}},[n,t,r,f]),n?[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 Bd(n,{prepare:r,run:t,done:e,inFlight:o}){let a=et();return zd(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(Vd(n,e))})}),a.dispose}function Vd(n,r){var t,e;let o=et();if(!n)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(e=(t=n.getAnimations)==null?void 0:t.call(n).filter(s=>s instanceof CSSTransition))!=null?e:[];return i.length===0?(r(),o.dispose):(Promise.allSettled(i.map(s=>s.finished)).then(()=>{a||r()}),o.dispose)}function zd(n,{inFlight:r,prepare:t}){if(r!=null&&r.current){t();return}let e=n.style.transition;n.style.transition="none",t(),n.offsetHeight,n.style.transition=e}function Ud(n,{container:r,accept:t,walk:e}){let o=c.useRef(t),a=c.useRef(e);c.useEffect(()=>{o.current=t,a.current=e},[t,e]),ae(()=>{if(!r||!n)return;let i=zt(r);if(!i)return;let s=o.current,l=a.current,d=Object.assign(f=>s(f),{acceptNode:s}),u=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,d,!1);for(;u.nextNode();)l(u.currentNode)},[r,n,o,a])}function Wn(n,r){let t=c.useRef([]),e=$(n);c.useEffect(()=>{let o=[...t.current];for(let[a,i]of r.entries())if(t.current[a]!==i){let s=e(r,o);return t.current=r,s}},[e,...r])}function Er(){return typeof window<"u"}function pn(n){return Zi(n)?(n.nodeName||"").toLowerCase():"#document"}function Qe(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function ot(n){var r;return(r=(Zi(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Zi(n){return Er()?n instanceof Node||n instanceof Qe(n).Node:!1}function Oe(n){return Er()?n instanceof Element||n instanceof Qe(n).Element:!1}function at(n){return Er()?n instanceof HTMLElement||n instanceof Qe(n).HTMLElement:!1}function es(n){return!Er()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Qe(n).ShadowRoot}function Rn(n){const{overflow:r,overflowX:t,overflowY:e,display:o}=qe(n);return/auto|scroll|overlay|hidden|clip/.test(r+e+t)&&!["inline","contents"].includes(o)}function Qd(n){return["table","td","th"].includes(pn(n))}function kr(n){return[":popover-open",":modal"].some(r=>{try{return n.matches(r)}catch{return!1}})}function Uo(n){const r=Qo(),t=Oe(n)?qe(n):n;return["transform","translate","scale","rotate","perspective"].some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!r&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!r&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(e=>(t.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(t.contain||"").includes(e))}function Kd(n){let r=Nt(n);for(;at(r)&&!hn(r);){if(Uo(r))return r;if(kr(r))return null;r=Nt(r)}return null}function Qo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function hn(n){return["html","body","#document"].includes(pn(n))}function qe(n){return Qe(n).getComputedStyle(n)}function Sr(n){return Oe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Nt(n){if(pn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||es(n)&&n.host||ot(n);return es(r)?r.host:r}function ts(n){const r=Nt(n);return hn(r)?n.ownerDocument?n.ownerDocument.body:n.body:at(r)&&Rn(r)?r:ts(r)}function Bn(n,r,t){var e;r===void 0&&(r=[]),t===void 0&&(t=!0);const o=ts(n),a=o===((e=n.ownerDocument)==null?void 0:e.body),i=Qe(o);if(a){const s=Ko(i);return r.concat(i,i.visualViewport||[],Rn(o)?o:[],s&&t?Bn(s):[])}return r.concat(o,Bn(o,[],t))}function Ko(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function qd(){const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(r=>{let{brand:t,version:e}=r;return t+"/"+e}).join(" "):navigator.userAgent}const vt=Math.min,Re=Math.max,Vn=Math.round,Cr=Math.floor,it=n=>({x:n,y:n}),Gd={left:"right",right:"left",bottom:"top",top:"bottom"},Xd={start:"end",end:"start"};function qo(n,r,t){return Re(n,vt(r,t))}function Qt(n,r){return typeof n=="function"?n(r):n}function It(n){return n.split("-")[0]}function mn(n){return n.split("-")[1]}function ns(n){return n==="x"?"y":"x"}function Go(n){return n==="y"?"height":"width"}function Kt(n){return["top","bottom"].includes(It(n))?"y":"x"}function Xo(n){return ns(Kt(n))}function Jd(n,r,t){t===void 0&&(t=!1);const e=mn(n),o=Xo(n),a=Go(o);let i=o==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=_r(i)),[i,_r(i)]}function Zd(n){const r=_r(n);return[Jo(n),r,Jo(r)]}function Jo(n){return n.replace(/start|end/g,r=>Xd[r])}function ef(n,r,t){const e=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(n){case"top":case"bottom":return t?r?o:e:r?e:o;case"left":case"right":return r?a:i;default:return[]}}function tf(n,r,t,e){const o=mn(n);let a=ef(It(n),t==="start",e);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(Jo)))),a}function _r(n){return n.replace(/left|right|bottom|top/g,r=>Gd[r])}function nf(n){return{top:0,right:0,bottom:0,left:0,...n}}function rs(n){return typeof n!="number"?nf(n):{top:n,right:n,bottom:n,left:n}}function Mr(n){const{x:r,y:t,width:e,height:o}=n;return{width:e,height:o,top:t,left:r,right:r+e,bottom:t+o,x:r,y:t}}function os(n,r,t){let{reference:e,floating:o}=n;const a=Kt(r),i=Xo(r),s=Go(i),l=It(r),d=a==="y",u=e.x+e.width/2-o.width/2,f=e.y+e.height/2-o.height/2,h=e[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:e.y-o.height};break;case"bottom":p={x:u,y:e.y+e.height};break;case"right":p={x:e.x+e.width,y:f};break;case"left":p={x:e.x-o.width,y:f};break;default:p={x:e.x,y:e.y}}switch(mn(r)){case"start":p[i]-=h*(t&&d?-1:1);break;case"end":p[i]+=h*(t&&d?-1:1);break}return p}const rf=async(n,r,t)=>{const{placement:e="bottom",strategy:o="absolute",middleware:a=[],platform:i}=t,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let d=await i.getElementRects({reference:n,floating:r,strategy:o}),{x:u,y:f}=os(d,e,l),h=e,p={},m=0;for(let g=0;g<s.length;g++){const{name:b,fn:y}=s[g],{x,y:w,data:E,reset:_}=await y({x:u,y:f,initialPlacement:e,placement:h,strategy:o,middlewareData:p,rects:d,platform:i,elements:{reference:n,floating:r}});u=x??u,f=w??f,p={...p,[b]:{...p[b],...E}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(d=_.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):_.rects),{x:u,y:f}=os(d,h,l)),g=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:p}};async function Or(n,r){var t;r===void 0&&(r={});const{x:e,y:o,platform:a,rects:i,elements:s,strategy:l}=n,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Qt(r,n),m=rs(p),b=s[h?f==="floating"?"reference":"floating":f],y=Mr(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(b)))==null||t?b:b.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:d,rootBoundary:u,strategy:l})),x=f==="floating"?{x:e,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),E=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},_=Mr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:l}):x);return{top:(y.top-_.top+m.top)/E.y,bottom:(_.bottom-y.bottom+m.bottom)/E.y,left:(y.left-_.left+m.left)/E.x,right:(_.right-y.right+m.right)/E.x}}const of=n=>({name:"arrow",options:n,async fn(r){const{x:t,y:e,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:d,padding:u=0}=Qt(n,r)||{};if(d==null)return{};const f=rs(u),h={x:t,y:e},p=Xo(o),m=Go(p),g=await i.getDimensions(d),b=p==="y",y=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",E=a.reference[m]+a.reference[p]-h[p]-a.floating[m],_=h[p]-a.reference[p],D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let k=D?D[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(D)))&&(k=s.floating[w]||a.floating[m]);const S=E/2-_/2,C=k/2-g[m]/2-1,I=vt(f[y],C),O=vt(f[x],C),W=I,H=k-g[m]-O,P=k/2-g[m]/2+S,Y=qo(W,P,H),N=!l.arrow&&mn(o)!=null&&P!==Y&&a.reference[m]/2-(P<W?I:O)-g[m]/2<0,V=N?P<W?P-W:P-H:0;return{[p]:h[p]+V,data:{[p]:Y,centerOffset:P-Y-V,...N&&{alignmentOffset:V}},reset:N}}}),af=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var t,e;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:d}=r,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=Qt(n,r);if((t=a.arrow)!=null&&t.alignmentOffset)return{};const y=It(o),x=Kt(s),w=It(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(d.floating)),_=h||(w||!g?[_r(s)]:Zd(s)),D=m!=="none";!h&&D&&_.push(...tf(s,g,m,E));const k=[s,..._],S=await Or(r,b),C=[];let I=((e=a.flip)==null?void 0:e.overflows)||[];if(u&&C.push(S[y]),f){const P=Jd(o,i,E);C.push(S[P[0]],S[P[1]])}if(I=[...I,{placement:o,overflows:C}],!C.every(P=>P<=0)){var O,W;const P=(((O=a.flip)==null?void 0:O.index)||0)+1,Y=k[P];if(Y)return{data:{index:P,overflows:I},reset:{placement:Y}};let N=(W=I.filter(V=>V.overflows[0]<=0).sort((V,A)=>V.overflows[1]-A.overflows[1])[0])==null?void 0:W.placement;if(!N)switch(p){case"bestFit":{var H;const V=(H=I.filter(A=>{if(D){const z=Kt(A.placement);return z===x||z==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(z=>z>0).reduce((z,J)=>z+J,0)]).sort((A,z)=>A[1]-z[1])[0])==null?void 0:H[0];V&&(N=V);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function sf(n,r){const{placement:t,platform:e,elements:o}=n,a=await(e.isRTL==null?void 0:e.isRTL(o.floating)),i=It(t),s=mn(t),l=Kt(t)==="y",d=["left","top"].includes(i)?-1:1,u=a&&l?-1:1,f=Qt(r,n);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const lf=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var t,e;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await sf(r,n);return i===((t=s.offset)==null?void 0:t.placement)&&(e=s.arrow)!=null&&e.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},uf=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:t,y:e,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:b=>{let{x:y,y:x}=b;return{x:y,y:x}}},...l}=Qt(n,r),d={x:t,y:e},u=await Or(r,l),f=Kt(It(o)),h=ns(f);let p=d[h],m=d[f];if(a){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=p+u[b],w=p-u[y];p=qo(x,p,w)}if(i){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=m+u[b],w=m-u[y];m=qo(x,m,w)}const g=s.fn({...r,[h]:p,[f]:m});return{...g,data:{x:g.x-t,y:g.y-e,enabled:{[h]:a,[f]:i}}}}}},cf=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var t,e;const{placement:o,rects:a,platform:i,elements:s}=r,{apply:l=()=>{},...d}=Qt(n,r),u=await Or(r,d),f=It(o),h=mn(o),p=Kt(o)==="y",{width:m,height:g}=a.floating;let b,y;f==="top"||f==="bottom"?(b=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,b=h==="end"?"top":"bottom");const x=g-u.top-u.bottom,w=m-u.left-u.right,E=vt(g-u[b],x),_=vt(m-u[y],w),D=!r.middlewareData.shift;let k=E,S=_;if((t=r.middlewareData.shift)!=null&&t.enabled.x&&(S=w),(e=r.middlewareData.shift)!=null&&e.enabled.y&&(k=x),D&&!h){const I=Re(u.left,0),O=Re(u.right,0),W=Re(u.top,0),H=Re(u.bottom,0);p?S=m-2*(I!==0||O!==0?I+O:Re(u.left,u.right)):k=g-2*(W!==0||H!==0?W+H:Re(u.top,u.bottom))}await l({...r,availableWidth:S,availableHeight:k});const C=await i.getDimensions(s.floating);return m!==C.width||g!==C.height?{reset:{rects:!0}}:{}}}};function as(n){const r=qe(n);let t=parseFloat(r.width)||0,e=parseFloat(r.height)||0;const o=at(n),a=o?n.offsetWidth:t,i=o?n.offsetHeight:e,s=Vn(t)!==a||Vn(e)!==i;return s&&(t=a,e=i),{width:t,height:e,$:s}}function Zo(n){return Oe(n)?n:n.contextElement}function gn(n){const r=Zo(n);if(!at(r))return it(1);const t=r.getBoundingClientRect(),{width:e,height:o,$:a}=as(r);let i=(a?Vn(t.width):t.width)/e,s=(a?Vn(t.height):t.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const df=it(0);function is(n){const r=Qe(n);return!Qo()||!r.visualViewport?df:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function ff(n,r,t){return r===void 0&&(r=!1),!t||r&&t!==Qe(n)?!1:r}function qt(n,r,t,e){r===void 0&&(r=!1),t===void 0&&(t=!1);const o=n.getBoundingClientRect(),a=Zo(n);let i=it(1);r&&(e?Oe(e)&&(i=gn(e)):i=gn(n));const s=ff(a,t,e)?is(a):it(0);let l=(o.left+s.x)/i.x,d=(o.top+s.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(a){const h=Qe(a),p=e&&Oe(e)?Qe(e):e;let m=h,g=Ko(m);for(;g&&e&&p!==m;){const b=gn(g),y=g.getBoundingClientRect(),x=qe(g),w=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*b.x,E=y.top+(g.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,d*=b.y,u*=b.x,f*=b.y,l+=w,d+=E,m=Qe(g),g=Ko(m)}}return Mr({width:u,height:f,x:l,y:d})}function ea(n,r){const t=Sr(n).scrollLeft;return r?r.left+t:qt(ot(n)).left+t}function ss(n,r,t){t===void 0&&(t=!1);const e=n.getBoundingClientRect(),o=e.left+r.scrollLeft-(t?0:ea(n,e)),a=e.top+r.scrollTop;return{x:o,y:a}}function pf(n){let{elements:r,rect:t,offsetParent:e,strategy:o}=n;const a=o==="fixed",i=ot(e),s=r?kr(r.floating):!1;if(e===i||s&&a)return t;let l={scrollLeft:0,scrollTop:0},d=it(1);const u=it(0),f=at(e);if((f||!f&&!a)&&((pn(e)!=="body"||Rn(i))&&(l=Sr(e)),at(e))){const p=qt(e);d=gn(e),u.x=p.x+e.clientLeft,u.y=p.y+e.clientTop}const h=i&&!f&&!a?ss(i,l,!0):it(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+u.x+h.x,y:t.y*d.y-l.scrollTop*d.y+u.y+h.y}}function hf(n){return Array.from(n.getClientRects())}function mf(n){const r=ot(n),t=Sr(n),e=n.ownerDocument.body,o=Re(r.scrollWidth,r.clientWidth,e.scrollWidth,e.clientWidth),a=Re(r.scrollHeight,r.clientHeight,e.scrollHeight,e.clientHeight);let i=-t.scrollLeft+ea(n);const s=-t.scrollTop;return qe(e).direction==="rtl"&&(i+=Re(r.clientWidth,e.clientWidth)-o),{width:o,height:a,x:i,y:s}}function gf(n,r){const t=Qe(n),e=ot(n),o=t.visualViewport;let a=e.clientWidth,i=e.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const d=Qo();(!d||d&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function bf(n,r){const t=qt(n,!0,r==="fixed"),e=t.top+n.clientTop,o=t.left+n.clientLeft,a=at(n)?gn(n):it(1),i=n.clientWidth*a.x,s=n.clientHeight*a.y,l=o*a.x,d=e*a.y;return{width:i,height:s,x:l,y:d}}function ls(n,r,t){let e;if(r==="viewport")e=gf(n,t);else if(r==="document")e=mf(ot(n));else if(Oe(r))e=bf(r,t);else{const o=is(n);e={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Mr(e)}function us(n,r){const t=Nt(n);return t===r||!Oe(t)||hn(t)?!1:qe(t).position==="fixed"||us(t,r)}function vf(n,r){const t=r.get(n);if(t)return t;let e=Bn(n,[],!1).filter(s=>Oe(s)&&pn(s)!=="body"),o=null;const a=qe(n).position==="fixed";let i=a?Nt(n):n;for(;Oe(i)&&!hn(i);){const s=qe(i),l=Uo(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Rn(i)&&!l&&us(n,i))?e=e.filter(u=>u!==i):o=s,i=Nt(i)}return r.set(n,e),e}function yf(n){let{element:r,boundary:t,rootBoundary:e,strategy:o}=n;const i=[...t==="clippingAncestors"?kr(r)?[]:vf(r,this._c):[].concat(t),e],s=i[0],l=i.reduce((d,u)=>{const f=ls(r,u,o);return d.top=Re(f.top,d.top),d.right=vt(f.right,d.right),d.bottom=vt(f.bottom,d.bottom),d.left=Re(f.left,d.left),d},ls(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wf(n){const{width:r,height:t}=as(n);return{width:r,height:t}}function xf(n,r,t){const e=at(r),o=ot(r),a=t==="fixed",i=qt(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=it(0);if(e||!e&&!a)if((pn(r)!=="body"||Rn(o))&&(s=Sr(r)),e){const h=qt(r,!0,a,r);l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}else o&&(l.x=ea(o));const d=o&&!e&&!a?ss(o,s):it(0),u=i.left+s.scrollLeft-l.x-d.x,f=i.top+s.scrollTop-l.y-d.y;return{x:u,y:f,width:i.width,height:i.height}}function ta(n){return qe(n).position==="static"}function cs(n,r){if(!at(n)||qe(n).position==="fixed")return null;if(r)return r(n);let t=n.offsetParent;return ot(n)===t&&(t=t.ownerDocument.body),t}function ds(n,r){const t=Qe(n);if(kr(n))return t;if(!at(n)){let o=Nt(n);for(;o&&!hn(o);){if(Oe(o)&&!ta(o))return o;o=Nt(o)}return t}let e=cs(n,r);for(;e&&Qd(e)&&ta(e);)e=cs(e,r);return e&&hn(e)&&ta(e)&&!Uo(e)?t:e||Kd(n)||t}const Df=async function(n){const r=this.getOffsetParent||ds,t=this.getDimensions,e=await t(n.floating);return{reference:xf(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Ef(n){return qe(n).direction==="rtl"}const kf={convertOffsetParentRelativeRectToViewportRelativeRect:pf,getDocumentElement:ot,getClippingRect:yf,getOffsetParent:ds,getElementRects:Df,getClientRects:hf,getDimensions:wf,getScale:gn,isElement:Oe,isRTL:Ef};function fs(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function Sf(n,r){let t=null,e;const o=ot(n);function a(){var s;clearTimeout(e),(s=t)==null||s.disconnect(),t=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const d=n.getBoundingClientRect(),{left:u,top:f,width:h,height:p}=d;if(s||r(),!h||!p)return;const m=Cr(f),g=Cr(o.clientWidth-(u+h)),b=Cr(o.clientHeight-(f+p)),y=Cr(u),w={rootMargin:-m+"px "+-g+"px "+-b+"px "+-y+"px",threshold:Re(0,vt(1,l))||1};let E=!0;function _(D){const k=D[0].intersectionRatio;if(k!==l){if(!E)return i();k?i(!1,k):e=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!fs(d,n.getBoundingClientRect())&&i(),E=!1}try{t=new IntersectionObserver(_,{...w,root:o.ownerDocument})}catch{t=new IntersectionObserver(_,w)}t.observe(n)}return i(!0),a}function ps(n,r,t,e){e===void 0&&(e={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=e,d=Zo(n),u=o||a?[...d?Bn(d):[],...Bn(r)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",t,{passive:!0}),a&&y.addEventListener("resize",t)});const f=d&&s?Sf(d,t):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===d&&p&&(p.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),t()}),d&&!l&&p.observe(d),p.observe(r));let m,g=l?qt(n):null;l&&b();function b(){const y=qt(n);g&&!fs(g,y)&&t(),g=y,m=requestAnimationFrame(b)}return t(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",t),a&&x.removeEventListener("resize",t)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const na=Or,Cf=lf,_f=uf,Mf=af,Of=cf,hs=of,Pf=(n,r,t)=>{const e=new Map,o={platform:kf,...t},a={...o.platform,_c:e};return rf(n,r,{...o,platform:a})};var Pr=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Tr(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let t,e,o;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==r.length)return!1;for(e=t;e--!==0;)if(!Tr(n[e],r[e]))return!1;return!0}if(o=Object.keys(n),t=o.length,t!==Object.keys(r).length)return!1;for(e=t;e--!==0;)if(!{}.hasOwnProperty.call(r,o[e]))return!1;for(e=t;e--!==0;){const a=o[e];if(!(a==="_owner"&&n.$$typeof)&&!Tr(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function ms(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function gs(n,r){const t=ms(n);return Math.round(r*t)/t}function ra(n){const r=L.useRef(n);return Pr(()=>{r.current=n}),r}function bs(n){n===void 0&&(n={});const{placement:r="bottom",strategy:t="absolute",middleware:e=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:d}=n,[u,f]=L.useState({x:0,y:0,strategy:t,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=L.useState(e);Tr(h,e)||p(e);const[m,g]=L.useState(null),[b,y]=L.useState(null),x=L.useCallback(A=>{A!==D.current&&(D.current=A,g(A))},[]),w=L.useCallback(A=>{A!==k.current&&(k.current=A,y(A))},[]),E=a||m,_=i||b,D=L.useRef(null),k=L.useRef(null),S=L.useRef(u),C=l!=null,I=ra(l),O=ra(o),W=ra(d),H=L.useCallback(()=>{if(!D.current||!k.current)return;const A={placement:r,strategy:t,middleware:h};O.current&&(A.platform=O.current),Pf(D.current,k.current,A).then(z=>{const J={...z,isPositioned:W.current!==!1};P.current&&!Tr(S.current,J)&&(S.current=J,cr.flushSync(()=>{f(J)}))})},[h,r,t,O,W]);Pr(()=>{d===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[d]);const P=L.useRef(!1);Pr(()=>(P.current=!0,()=>{P.current=!1}),[]),Pr(()=>{if(E&&(D.current=E),_&&(k.current=_),E&&_){if(I.current)return I.current(E,_,H);H()}},[E,_,H,I,C]);const Y=L.useMemo(()=>({reference:D,floating:k,setReference:x,setFloating:w}),[x,w]),N=L.useMemo(()=>({reference:E,floating:_}),[E,_]),V=L.useMemo(()=>{const A={position:t,left:0,top:0};if(!N.floating)return A;const z=gs(N.floating,u.x),J=gs(N.floating,u.y);return s?{...A,transform:"translate("+z+"px, "+J+"px)",...ms(N.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:z,top:J}},[t,s,N.floating,u.x,u.y]);return L.useMemo(()=>({...u,update:H,refs:Y,elements:N,floatingStyles:V}),[u,H,Y,N,V])}const Tf=n=>{function r(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:e,padding:o}=typeof n=="function"?n(t):n;return e&&r(e)?e.current!=null?hs({element:e.current,padding:o}).fn(t):{}:e?hs({element:e,padding:o}).fn(t):{}}}},oa=(n,r)=>({...Cf(n),options:[n,r]}),Nf=(n,r)=>({..._f(n),options:[n,r]}),vs=(n,r)=>({...Mf(n),options:[n,r]}),If=(n,r)=>({...Of(n),options:[n,r]}),Ff=(n,r)=>({...Tf(n),options:[n,r]}),ys={...L},Lf=ys.useInsertionEffect||(n=>n());function ws(n){const r=L.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Lf(()=>{r.current=n}),L.useCallback(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return r.current==null?void 0:r.current(...e)},[])}var aa=typeof document<"u"?c.useLayoutEffect:c.useEffect;let xs=!1,$f=0;const Ds=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$f++;function Af(){const[n,r]=L.useState(()=>xs?Ds():void 0);return aa(()=>{n==null&&r(Ds())},[]),L.useEffect(()=>{xs=!0},[]),n}const Yf=ys.useId||Af;let zn;process.env.NODE_ENV!=="production"&&(zn=new Set);function jf(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=zn)!=null&&n.has(o))){var a;(a=zn)==null||a.add(o),console.warn(o)}}function Hf(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=zn)!=null&&n.has(o))){var a;(a=zn)==null||a.add(o),console.error(o)}}function Wf(){const n=new Map;return{emit(r,t){var e;(e=n.get(r))==null||e.forEach(o=>o(t))},on(r,t){n.set(r,[...n.get(r)||[],t])},off(r,t){var e;n.set(r,((e=n.get(r))==null?void 0:e.filter(o=>o!==t))||[])}}}const Rf=L.createContext(null),Bf=L.createContext(null),Vf=()=>{var n;return((n=L.useContext(Rf))==null?void 0:n.id)||null},zf=()=>L.useContext(Bf),Uf="data-floating-ui-focusable";function Qf(n){const{open:r=!1,onOpenChange:t,elements:e}=n,o=Yf(),a=L.useRef({}),[i]=L.useState(()=>Wf()),s=Vf()!=null;if(process.env.NODE_ENV!=="production"){const p=e.reference;p&&!Oe(p)&&Hf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,d]=L.useState(e.reference),u=ws((p,m,g)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:g,nested:s}),t==null||t(p,m,g)}),f=L.useMemo(()=>({setPositionReference:d}),[]),h=L.useMemo(()=>({reference:l||e.reference||null,floating:e.floating||null,domReference:e.reference}),[l,e.reference,e.floating]);return L.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:h,events:i,floatingId:o,refs:f}),[r,u,h,i,o,f])}function Kf(n){n===void 0&&(n={});const{nodeId:r}=n,t=Qf({...n,elements:{reference:null,floating:null,...n.elements}}),e=n.rootContext||t,o=e.elements,[a,i]=L.useState(null),[s,l]=L.useState(null),u=(o==null?void 0:o.domReference)||a,f=L.useRef(null),h=zf();aa(()=>{u&&(f.current=u)},[u]);const p=bs({...n,elements:{...o,...s&&{reference:s}}}),m=L.useCallback(w=>{const E=Oe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(E),p.refs.setReference(E)},[p.refs]),g=L.useCallback(w=>{(Oe(w)||w===null)&&(f.current=w,i(w)),(Oe(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Oe(w))&&p.refs.setReference(w)},[p.refs]),b=L.useMemo(()=>({...p.refs,setReference:g,setPositionReference:m,domReference:f}),[p.refs,g,m]),y=L.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),x=L.useMemo(()=>({...p,...e,refs:b,elements:y,nodeId:r}),[p,b,y,r,e]);return aa(()=>{e.dataRef.current.floatingContext=x;const w=h==null?void 0:h.nodesRef.current.find(E=>E.id===r);w&&(w.context=x)}),L.useMemo(()=>({...p,context:x,refs:b,elements:y}),[p,b,y,x])}const Es="active",ks="selected";function ia(n,r,t){const e=new Map,o=t==="item";let a=n;if(o&&n){const{[Es]:i,[ks]:s,...l}=n;a=l}return{...t==="floating"&&{tabIndex:-1,[Uf]:""},...a,...r.map(i=>{const s=i?i[t]:null;return typeof s=="function"?n?s(n):null:s}).concat(n).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[d,u]=l;if(!(o&&[Es,ks].includes(d)))if(d.indexOf("on")===0){if(e.has(d)||e.set(d,[]),typeof u=="function"){var f;(f=e.get(d))==null||f.push(u),i[d]=function(){for(var h,p=arguments.length,m=new Array(p),g=0;g<p;g++)m[g]=arguments[g];return(h=e.get(d))==null?void 0:h.map(b=>b(...m)).find(b=>b!==void 0)}}}else i[d]=u}),i),{})}}function qf(n){n===void 0&&(n=[]);const r=n.map(s=>s==null?void 0:s.reference),t=n.map(s=>s==null?void 0:s.floating),e=n.map(s=>s==null?void 0:s.item),o=L.useCallback(s=>ia(s,n,"reference"),r),a=L.useCallback(s=>ia(s,n,"floating"),t),i=L.useCallback(s=>ia(s,n,"item"),e);return L.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function Ss(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const Gf=n=>({name:"inner",options:n,async fn(r){const{listRef:t,overflowRef:e,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:d,...u}=Qt(n,r),{rects:f,elements:{floating:h}}=r,p=t.current[i],m=(d==null?void 0:d.current)||h,g=h.clientTop||m.clientTop,b=h.clientTop!==0,y=m.clientTop!==0,x=h===m;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||jf('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...r,...await oa(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-a).fn(r)},E=await na(Ss(w,m.scrollHeight+g+h.clientTop),u),_=await na(w,{...u,elementContext:"reference"}),D=Re(0,E.top),k=w.y+D,I=(m.scrollHeight>m.clientHeight?O=>O:Vn)(Re(0,m.scrollHeight+(b&&x||y?g*2:0)-D-Re(0,E.bottom)));if(m.style.maxHeight=I+"px",m.scrollTop=D,o){const O=m.offsetHeight<p.offsetHeight*vt(s,t.current.length)-1||_.top>=-l||_.bottom>=-l;cr.flushSync(()=>o(O))}return e&&(e.current=await na(Ss({...w,y:k},m.offsetHeight+g+h.clientTop),u)),{y:k}}});function Xf(n,r){const{open:t,elements:e}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=ws(s),d=L.useRef(!1),u=L.useRef(null),f=L.useRef(null);L.useEffect(()=>{if(!o)return;function p(g){if(g.ctrlKey||!m||a.current==null)return;const b=g.deltaY,y=a.current.top>=-.5,x=a.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,E=b<0?-1:1,_=b<0?"max":"min";m.scrollHeight<=m.clientHeight||(!y&&b>0||!x&&b<0?(g.preventDefault(),cr.flushSync(()=>{l(D=>D+Math[_](b,w*E))})):/firefox/i.test(qd())&&(m.scrollTop+=b))}const m=(i==null?void 0:i.current)||e.floating;if(t&&m)return m.addEventListener("wheel",p),requestAnimationFrame(()=>{u.current=m.scrollTop,a.current!=null&&(f.current={...a.current})}),()=>{u.current=null,f.current=null,m.removeEventListener("wheel",p)}},[o,t,e.floating,a,i,l]);const h=L.useMemo(()=>({onKeyDown(){d.current=!0},onWheel(){d.current=!1},onPointerMove(){d.current=!1},onScroll(){const p=(i==null?void 0:i.current)||e.floating;if(!(!a.current||!p||!d.current)){if(u.current!==null){const m=p.scrollTop-u.current;(a.current.bottom<-.5&&m<-1||a.current.top<-.5&&m>1)&&cr.flushSync(()=>l(g=>g+m))}requestAnimationFrame(()=>{u.current=p.scrollTop})}}}),[e.floating,l,a,i]);return L.useMemo(()=>o?{floating:h}:{},[o,h])}let bn=c.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});bn.displayName="FloatingContext";let sa=c.createContext(null);sa.displayName="PlacementContext";function Cs(n){return c.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function _s(){return c.useContext(bn).setReference}function Jf(){return c.useContext(bn).getReferenceProps}function Ms(){let{getFloatingProps:n,slot:r}=c.useContext(bn);return c.useCallback((...t)=>Object.assign({},n(...t),{"data-anchor":r.anchor}),[n,r])}function Os(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=c.useContext(sa),t=c.useMemo(()=>n,[JSON.stringify(n,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);ae(()=>{r==null||r(t??null)},[r,t]);let e=c.useContext(bn);return c.useMemo(()=>[e.setFloating,n?e.styles:{}],[e.setFloating,n,e.styles])}let Ps=4;function Ts({children:n,enabled:r=!0}){let[t,e]=c.useState(null),[o,a]=c.useState(0),i=c.useRef(null),[s,l]=c.useState(null);Zf(s);let d=r&&t!==null&&s!==null,{to:u="bottom",gap:f=0,offset:h=0,padding:p=0,inner:m}=ep(t,s),[g,b="center"]=u.split(" ");ae(()=>{d&&a(0)},[d]);let{refs:y,floatingStyles:x,context:w}=Kf({open:d,placement:g==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${g}`:`${g}-${b}`,strategy:"absolute",transform:!1,middleware:[oa({mainAxis:g==="selection"?0:f,crossAxis:h}),Nf({padding:p}),g!=="selection"&&vs({padding:p}),g==="selection"&&m?Gf({...m,padding:p,overflowRef:i,offset:o,minItemsVisible:Ps,referenceOverflowThreshold:p,onFallbackChange(O){var W,H;if(!O)return;let P=w.elements.floating;if(!P)return;let Y=parseFloat(getComputedStyle(P).scrollPaddingBottom)||0,N=Math.min(Ps,P.childElementCount),V=0,A=0;for(let z of(H=(W=w.elements.floating)==null?void 0:W.childNodes)!=null?H:[])if(z instanceof HTMLElement){let J=z.offsetTop,G=J+z.clientHeight+Y,ie=P.scrollTop,T=ie+P.clientHeight;if(J>=ie&&G<=T)N--;else{A=Math.max(0,Math.min(G,T)-Math.max(J,ie)),V=z.clientHeight;break}}N>=1&&a(z=>{let J=V*N-A+Y;return z>=J?z:J})}}):null,If({padding:p,apply({availableWidth:O,availableHeight:W,elements:H}){Object.assign(H.floating.style,{overflow:"auto",maxWidth:`${O}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${W}px)`})}})].filter(Boolean),whileElementsMounted:ps}),[E=g,_=b]=w.placement.split("-");g==="selection"&&(E="selection");let D=c.useMemo(()=>({anchor:[E,_].filter(Boolean).join(" ")}),[E,_]),k=Xf(w,{overflowRef:i,onChange:a}),{getReferenceProps:S,getFloatingProps:C}=qf([k]),I=$(O=>{l(O),y.setFloating(O)});return L.createElement(sa.Provider,{value:e},L.createElement(bn.Provider,{value:{setFloating:I,setReference:y.setReference,styles:x,getReferenceProps:S,getFloatingProps:C,slot:D}},n))}function Zf(n){ae(()=>{if(!n)return;let r=new MutationObserver(()=>{let t=window.getComputedStyle(n).maxHeight,e=parseFloat(t);if(isNaN(e))return;let o=parseInt(t);isNaN(o)||e!==o&&(n.style.maxHeight=`${Math.ceil(e)}px`)});return r.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[n])}function ep(n,r){var t,e,o;let a=la((t=n==null?void 0:n.gap)!=null?t:"var(--anchor-gap, 0)",r),i=la((e=n==null?void 0:n.offset)!=null?e:"var(--anchor-offset, 0)",r),s=la((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function la(n,r,t=void 0){let e=mt(),o=$((l,d)=>{if(l==null)return[t,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!d)return[t,null];let u=Is(l,d);return[u,f=>{let h=Ns(l);{let p=h.map(m=>window.getComputedStyle(d).getPropertyValue(m));e.requestAnimationFrame(function m(){e.nextFrame(m);let g=!1;for(let[y,x]of h.entries()){let w=window.getComputedStyle(d).getPropertyValue(x);if(p[y]!==w){p[y]=w,g=!0;break}}if(!g)return;let b=Is(l,d);u!==b&&(f(b),u=b)})}return e.dispose}]}return[t,null]}),a=c.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=c.useState();return ae(()=>{let[l,d]=o(n,r);if(s(l),!!d)return d(s)},[n,r]),i}function Ns(n){let r=/var\((.*)\)/.exec(n);if(r){let t=r[1].indexOf(",");if(t===-1)return[r[1]];let e=r[1].slice(0,t).trim(),o=r[1].slice(t+1).trim();return o?[e,...Ns(o)]:[e]}return[]}function Is(n,r){let t=document.createElement("div");r.appendChild(t),t.style.setProperty("margin-top","0px","important"),t.style.setProperty("margin-top",n,"important");let e=parseFloat(window.getComputedStyle(t).marginTop)||0;return r.removeChild(t),e}function tp({children:n,freeze:r}){let t=Nr(r,n);return c.createElement(c.Fragment,null,t)}function Nr(n,r){let[t,e]=c.useState(r);return!n&&t!==r&&e(r),n?t:r}let Ir=c.createContext(null);Ir.displayName="OpenClosedContext";var Ae=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(Ae||{});function vn(){return c.useContext(Ir)}function ua({value:n,children:r}){return c.createElement(Ir.Provider,{value:n},r)}function np({children:n}){return c.createElement(Ir.Provider,{value:null},n)}function rp(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let st=[];rp(()=>{function n(r){if(!(r.target instanceof HTMLElement)||r.target===document.body||st[0]===r.target)return;let t=r.target;t=t.closest(Dr),st.unshift(t??r.target),st=st.filter(e=>e!=null&&e.isConnected),st.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function op(n){throw new Error("Unexpected object: "+n)}var ee=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(ee||{});function Un(n,r){let t=r.resolveItems();if(t.length<=0)return null;let e=r.resolveActiveIndex(),o=e??-1;switch(n.focus){case 0:{for(let a=0;a<t.length;++a)if(!r.resolveDisabled(t[a],a,t))return a;return e}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 e}case 2:{for(let a=o+1;a<t.length;++a)if(!r.resolveDisabled(t[a],a,t))return a;return e}case 3:{for(let a=t.length-1;a>=0;--a)if(!r.resolveDisabled(t[a],a,t))return a;return e}case 4:{for(let a=0;a<t.length;++a)if(r.resolveId(t[a],a,t)===n.id)return a;return e}case 5:return null;default:op(n)}}var ca=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(ca||{});function Fs(n){let r=$(n),t=c.useRef(!1);c.useEffect(()=>(t.current=!1,()=>{t.current=!0,gr(()=>{t.current&&r()})}),[r])}function ap(){let n=typeof document>"u";return"useSyncExternalStore"in L?(r=>r.useSyncExternalStore)(L)(()=>()=>{},()=>!1,()=>!n):!1}function Qn(){let n=ap(),[r,t]=L.useState(Vt.isHandoffComplete);return r&&Vt.isHandoffComplete===!1&&t(!1),L.useEffect(()=>{r!==!0&&t(!0)},[r]),L.useEffect(()=>Vt.handoff(),[]),n?!1:r}let Ls=c.createContext(!1);function ip(){return c.useContext(Ls)}function $s(n){return c.createElement(Ls.Provider,{value:n.force},n.children)}function sp(n){let r=ip(),t=c.useContext(Ys),e=Tt(n),[o,a]=c.useState(()=>{var i;if(!r&&t!==null)return(i=t.current)!=null?i:null;if(Vt.isServer)return null;let s=e==null?void 0:e.getElementById("headlessui-portal-root");if(s)return s;if(e===null)return null;let l=e.createElement("div");return l.setAttribute("id","headlessui-portal-root"),e.body.appendChild(l)});return c.useEffect(()=>{o!==null&&(e!=null&&e.body.contains(o)||e==null||e.body.appendChild(o))},[o,e]),c.useEffect(()=>{r||t!==null&&a(t.current)},[t,a,r]),o}let As=c.Fragment,lp=xe(function(n,r){let t=n,e=c.useRef(null),o=Le(td(f=>{e.current=f}),r),a=Tt(e),i=sp(e),[s]=c.useState(()=>{var f;return Vt.isServer?null:(f=a==null?void 0:a.createElement("div"))!=null?f:null}),l=c.useContext(da),d=Qn();ae(()=>{!i||!s||i.contains(s)||(s.setAttribute("data-headlessui-portal",""),i.appendChild(s))},[i,s]),ae(()=>{if(s&&l)return l.register(s)},[l,s]),Fs(()=>{var f;!i||!s||(s instanceof Node&&i.contains(s)&&i.removeChild(s),i.childNodes.length<=0&&((f=i.parentElement)==null||f.removeChild(i)))});let u=Ce();return d?!i||!s?null:Se.createPortal(u({ourProps:{ref:o},theirProps:t,slot:{},defaultTag:As,name:"Portal"}),s):null});function up(n,r){let t=Le(r),{enabled:e=!0,...o}=n,a=Ce();return e?c.createElement(lp,{...o,ref:t}):a({ourProps:{ref:t},theirProps:o,slot:{},defaultTag:As,name:"Portal"})}let cp=c.Fragment,Ys=c.createContext(null);function dp(n,r){let{target:t,...e}=n,o={ref:Le(r)},a=Ce();return c.createElement(Ys.Provider,{value:t},a({ourProps:o,theirProps:e,defaultTag:cp,name:"Popover.Group"}))}let da=c.createContext(null);function fp(){let n=c.useContext(da),r=c.useRef([]),t=$(a=>(r.current.push(a),n&&n.register(a),()=>e(a))),e=$(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),n&&n.unregister(a)}),o=c.useMemo(()=>({register:t,unregister:e,portals:r}),[t,e,r]);return[r,c.useMemo(()=>function({children:a}){return c.createElement(da.Provider,{value:o},a)},[o])]}let pp=xe(up),js=xe(dp),fa=Object.assign(pp,{Group:js});var hp=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(hp||{}),mp=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(mp||{}),gp=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(gp||{}),bp=(n=>(n[n.OpenCombobox=0]="OpenCombobox",n[n.CloseCombobox=1]="CloseCombobox",n[n.GoToOption=2]="GoToOption",n[n.SetTyping=3]="SetTyping",n[n.RegisterOption=4]="RegisterOption",n[n.UnregisterOption=5]="UnregisterOption",n[n.SetActivationTrigger=6]="SetActivationTrigger",n[n.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",n[n.SetInputElement=8]="SetInputElement",n[n.SetButtonElement=9]="SetButtonElement",n[n.SetOptionsElement=10]="SetOptionsElement",n))(bp||{});function pa(n,r=t=>t){let t=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,e=r(n.options.slice()),o=e.length>0&&e[0].dataRef.current.order!==null?e.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):Ho(e,i=>i.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let vp={1(n){var r;return(r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===1?n:{...n,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(n){var r,t;if((r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===0)return n;if((t=n.dataRef.current)!=null&&t.value){let e=n.dataRef.current.calculateIndex(n.dataRef.current.value);if(e!==-1)return{...n,activeOptionIndex:e,comboboxState:0,__demoMode:!1}}return{...n,comboboxState:0,__demoMode:!1}},3(n,r){return n.isTyping===r.isTyping?n:{...n,isTyping:r.isTyping}},2(n,r){var t,e,o,a;if((t=n.dataRef.current)!=null&&t.disabled||n.optionsElement&&!((e=n.dataRef.current)!=null&&e.optionsPropsRef.current.static)&&n.comboboxState===1)return n;if(n.virtual){let{options:d,disabled:u}=n.virtual,f=r.focus===ee.Specific?r.idx:Un(r,{resolveItems:()=>d,resolveActiveIndex:()=>{var p,m;return(m=(p=n.activeOptionIndex)!=null?p:d.findIndex(g=>!u(g)))!=null?m:null},resolveDisabled:u,resolveId(){throw new Error("Function not implemented.")}}),h=(o=r.trigger)!=null?o:2;return n.activeOptionIndex===f&&n.activationTrigger===h?n:{...n,activeOptionIndex:f,activationTrigger:h,isTyping:!1,__demoMode:!1}}let i=pa(n);if(i.activeOptionIndex===null){let d=i.options.findIndex(u=>!u.dataRef.current.disabled);d!==-1&&(i.activeOptionIndex=d)}let s=r.focus===ee.Specific?r.idx:Un(r,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),l=(a=r.trigger)!=null?a:2;return n.activeOptionIndex===s&&n.activationTrigger===l?n:{...n,...i,isTyping:!1,activeOptionIndex:s,activationTrigger:l,__demoMode:!1}},4:(n,r)=>{var t,e,o;if((t=n.dataRef.current)!=null&&t.virtual)return{...n,options:[...n.options,r.payload]};let a=r.payload,i=pa(n,l=>(l.push(a),l));n.activeOptionIndex===null&&(e=n.dataRef.current)!=null&&e.isSelected(r.payload.dataRef.current.value)&&(i.activeOptionIndex=i.options.indexOf(a));let s={...n,...i,activationTrigger:2};return(o=n.dataRef.current)!=null&&o.__demoMode&&n.dataRef.current.value===void 0&&(s.activeOptionIndex=0),s},5:(n,r)=>{var t;if((t=n.dataRef.current)!=null&&t.virtual)return{...n,options:n.options.filter(o=>o.id!==r.id)};let e=pa(n,o=>{let a=o.findIndex(i=>i.id===r.id);return a!==-1&&o.splice(a,1),o});return{...n,...e,activationTrigger:2}},6:(n,r)=>n.activationTrigger===r.trigger?n:{...n,activationTrigger:r.trigger},7:(n,r)=>{var t,e;if(n.virtual===null)return{...n,virtual:{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}};if(n.virtual.options===r.options&&n.virtual.disabled===r.disabled)return n;let o=n.activeOptionIndex;if(n.activeOptionIndex!==null){let a=r.options.indexOf(n.virtual.options[n.activeOptionIndex]);a!==-1?o=a:o=null}return{...n,activeOptionIndex:o,virtual:{options:r.options,disabled:(e=r.disabled)!=null?e:()=>!1}}},8:(n,r)=>n.inputElement===r.element?n:{...n,inputElement:r.element},9:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},10:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},ha=c.createContext(null);ha.displayName="ComboboxActionsContext";function Kn(n){let r=c.useContext(ha);if(r===null){let t=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Kn),t}return r}let Hs=c.createContext(null);function yp(n){let r=yn("VirtualProvider"),{options:t}=r.virtual,[e,o]=c.useMemo(()=>{let d=r.optionsElement;if(!d)return[0,0];let u=window.getComputedStyle(d);return[parseFloat(u.paddingBlockStart||u.paddingTop),parseFloat(u.paddingBlockEnd||u.paddingBottom)]},[r.optionsElement]),a=Ed({enabled:t.length!==0,scrollPaddingStart:e,scrollPaddingEnd:o,count:t.length,estimateSize(){return 40},getScrollElement(){return r.optionsElement},overscan:12}),[i,s]=c.useState(0);ae(()=>{s(d=>d+1)},[t]);let l=a.getVirtualItems();return l.length===0?null:c.createElement(Hs.Provider,{value:a},c.createElement("div",{style:{position:"relative",width:"100%",height:`${a.getTotalSize()}px`},ref:d=>{d&&r.activationTrigger!==0&&r.activeOptionIndex!==null&&t.length>r.activeOptionIndex&&a.scrollToIndex(r.activeOptionIndex)}},l.map(d=>{var u;return c.createElement(c.Fragment,{key:d.key},c.cloneElement((u=n.children)==null?void 0:u.call(n,{...n.slot,option:t[d.index]}),{key:`${i}-${d.key}`,"data-index":d.index,"aria-setsize":t.length,"aria-posinset":d.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${d.start}px)`,overflowAnchor:"none"}}))})))}let qn=c.createContext(null);qn.displayName="ComboboxDataContext";function yn(n){let r=c.useContext(qn);if(r===null){let t=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,yn),t}return r}function wp(n,r){return Fe(r.type,vp,n,r)}let xp=c.Fragment;function Dp(n,r){var t,e;let o=br(),{value:a,defaultValue:i,onChange:s,form:l,name:d,by:u,disabled:f=o||!1,onClose:h,__demoMode:p=!1,multiple:m=!1,immediate:g=!1,virtual:b=null,nullable:y,...x}=n,w=xi(i),[E=m?[]:void 0,_]=wi(a,s,w),[D,k]=c.useReducer(wp,{dataRef:c.createRef(),comboboxState:p?0:1,isTyping:!1,options:[],virtual:b?{options:b.options,disabled:(t=b.disabled)!=null?t:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:p}),S=c.useRef(!1),C=c.useRef({static:!1,hold:!1}),I=$i(u),O=$(q=>b?u===null?b.options.indexOf(q):b.options.findIndex(he=>I(he,q)):D.options.findIndex(he=>I(he.dataRef.current.value,q))),W=c.useCallback(q=>Fe(P.mode,{1:()=>E.some(he=>I(he,q)),0:()=>I(E,q)}),[E]),H=$(q=>D.activeOptionIndex===O(q)),P=c.useMemo(()=>({...D,immediate:g,optionsPropsRef:C,value:E,defaultValue:w,disabled:f,mode:m?1:0,virtual:b?D.virtual:null,get activeOptionIndex(){if(S.current&&D.activeOptionIndex===null&&(b?b.options.length>0:D.options.length>0)){if(b){let he=b.options.findIndex(ze=>{var on,ur;return!((ur=(on=b.disabled)==null?void 0:on.call(b,ze))!=null&&ur)});if(he!==-1)return he}let q=D.options.findIndex(he=>!he.dataRef.current.disabled);if(q!==-1)return q}return D.activeOptionIndex},calculateIndex:O,compare:I,isSelected:W,isActive:H}),[E,w,f,m,p,D,b]);ae(()=>{var q;b&&k({type:7,options:b.options,disabled:(q=b.disabled)!=null?q:null})},[b,b==null?void 0:b.options,b==null?void 0:b.disabled]),ae(()=>{D.dataRef.current=P},[P]);let Y=P.comboboxState===0;Wo(Y,[P.buttonElement,P.inputElement,P.optionsElement],()=>ye.closeCombobox());let N=c.useMemo(()=>{var q,he,ze;return{open:P.comboboxState===0,disabled:f,activeIndex:P.activeOptionIndex,activeOption:P.activeOptionIndex===null?null:P.virtual?P.virtual.options[(q=P.activeOptionIndex)!=null?q:0]:(ze=(he=P.options[P.activeOptionIndex])==null?void 0:he.dataRef.current.value)!=null?ze:null,value:E}},[P,f,E]),V=$(()=>{if(P.activeOptionIndex!==null){if(ye.setIsTyping(!1),P.virtual)T(P.virtual.options[P.activeOptionIndex]);else{let{dataRef:q}=P.options[P.activeOptionIndex];T(q.current.value)}ye.goToOption(ee.Specific,P.activeOptionIndex)}}),A=$(()=>{k({type:0}),S.current=!0}),z=$(()=>{k({type:1}),S.current=!1,h==null||h()}),J=$(q=>{k({type:3,isTyping:q})}),G=$((q,he,ze)=>(S.current=!1,q===ee.Specific?k({type:2,focus:ee.Specific,idx:he,trigger:ze}):k({type:2,focus:q,trigger:ze}))),ie=$((q,he)=>(k({type:4,payload:{id:q,dataRef:he}}),()=>{P.isActive(he.current.value)&&(S.current=!0),k({type:5,id:q})})),T=$(q=>Fe(P.mode,{0(){return _==null?void 0:_(q)},1(){let he=P.value.slice(),ze=he.findIndex(on=>I(on,q));return ze===-1?he.push(q):he.splice(ze,1),_==null?void 0:_(he)}})),oe=$(q=>{k({type:6,trigger:q})}),te=$(q=>{k({type:8,element:q})}),De=$(q=>{k({type:9,element:q})}),se=$(q=>{k({type:10,element:q})}),ye=c.useMemo(()=>({onChange:T,registerOption:ie,goToOption:G,setIsTyping:J,closeCombobox:z,openCombobox:A,setActivationTrigger:oe,selectActiveOption:V,setInputElement:te,setButtonElement:De,setOptionsElement:se}),[]),[Ye,jt]=Ni(),lr=r===null?{}:{ref:r},ve=c.useCallback(()=>{if(w!==void 0)return _==null?void 0:_(w)},[_,w]),Ne=Ce();return c.createElement(jt,{value:Ye,props:{htmlFor:(e=P.inputElement)==null?void 0:e.id},slot:{open:P.comboboxState===0,disabled:f}},c.createElement(Ts,null,c.createElement(ha.Provider,{value:ye},c.createElement(qn.Provider,{value:P},c.createElement(ua,{value:Fe(P.comboboxState,{0:Ae.Open,1:Ae.Closed})},d!=null&&c.createElement(Si,{disabled:f,data:E!=null?{[d]:E}:{},form:l,onReset:ve}),Ne({ourProps:lr,theirProps:x,slot:N,defaultTag:xp,name:"Combobox"}))))))}let Ep="input";function kp(n,r){var t,e,o,a,i;let s=yn("Combobox.Input"),l=Kn("Combobox.Input"),d=c.useId(),u=No(),{id:f=u||`headlessui-combobox-input-${d}`,onChange:h,displayValue:p,disabled:m=s.disabled||!1,autoFocus:g=!1,type:b="text",...y}=n,x=c.useRef(null),w=Le(x,r,_s(),l.setInputElement),E=Tt(s.inputElement),_=mt(),D=$(()=>{l.onChange(null),s.optionsElement&&(s.optionsElement.scrollTop=0),l.goToOption(ee.Nothing)}),k=c.useMemo(()=>{var T;return typeof p=="function"&&s.value!==void 0?(T=p(s.value))!=null?T:"":typeof s.value=="string"?s.value:""},[s.value,p]);Wn(([T,oe],[te,De])=>{if(s.isTyping)return;let se=x.current;se&&((De===0&&oe===1||T!==te)&&(se.value=T),requestAnimationFrame(()=>{if(s.isTyping||!se||(E==null?void 0:E.activeElement)!==se)return;let{selectionStart:ye,selectionEnd:Ye}=se;Math.abs((Ye??0)-(ye??0))===0&&ye===0&&se.setSelectionRange(se.value.length,se.value.length)}))},[k,s.comboboxState,E,s.isTyping]),Wn(([T],[oe])=>{if(T===0&&oe===1){if(s.isTyping)return;let te=x.current;if(!te)return;let De=te.value,{selectionStart:se,selectionEnd:ye,selectionDirection:Ye}=te;te.value="",te.value=De,Ye!==null?te.setSelectionRange(se,ye,Ye):te.setSelectionRange(se,ye)}},[s.comboboxState]);let S=c.useRef(!1),C=$(()=>{S.current=!0}),I=$(()=>{_.nextFrame(()=>{S.current=!1})}),O=$(T=>{switch(l.setIsTyping(!0),T.key){case ue.Enter:if(s.comboboxState!==0||S.current)return;if(T.preventDefault(),T.stopPropagation(),s.activeOptionIndex===null){l.closeCombobox();return}l.selectActiveOption(),s.mode===0&&l.closeCombobox();break;case ue.ArrowDown:return T.preventDefault(),T.stopPropagation(),Fe(s.comboboxState,{0:()=>l.goToOption(ee.Next),1:()=>l.openCombobox()});case ue.ArrowUp:return T.preventDefault(),T.stopPropagation(),Fe(s.comboboxState,{0:()=>l.goToOption(ee.Previous),1:()=>{Se.flushSync(()=>l.openCombobox()),s.value||l.goToOption(ee.Last)}});case ue.Home:if(T.shiftKey)break;return T.preventDefault(),T.stopPropagation(),l.goToOption(ee.First);case ue.PageUp:return T.preventDefault(),T.stopPropagation(),l.goToOption(ee.First);case ue.End:if(T.shiftKey)break;return T.preventDefault(),T.stopPropagation(),l.goToOption(ee.Last);case ue.PageDown:return T.preventDefault(),T.stopPropagation(),l.goToOption(ee.Last);case ue.Escape:return s.comboboxState!==0?void 0:(T.preventDefault(),s.optionsElement&&!s.optionsPropsRef.current.static&&T.stopPropagation(),s.mode===0&&s.value===null&&D(),l.closeCombobox());case ue.Tab:if(s.comboboxState!==0)return;s.mode===0&&s.activationTrigger!==1&&l.selectActiveOption(),l.closeCombobox();break}}),W=$(T=>{h==null||h(T),s.mode===0&&T.target.value===""&&D(),l.openCombobox()}),H=$(T=>{var oe,te,De;let se=(oe=T.relatedTarget)!=null?oe:st.find(ye=>ye!==T.currentTarget);if(!((te=s.optionsElement)!=null&&te.contains(se))&&!((De=s.buttonElement)!=null&&De.contains(se))&&s.comboboxState===0)return T.preventDefault(),s.mode===0&&s.value===null&&D(),l.closeCombobox()}),P=$(T=>{var oe,te,De;let se=(oe=T.relatedTarget)!=null?oe:st.find(ye=>ye!==T.currentTarget);(te=s.buttonElement)!=null&&te.contains(se)||(De=s.optionsElement)!=null&&De.contains(se)||s.disabled||s.immediate&&s.comboboxState!==0&&_.microTask(()=>{Se.flushSync(()=>l.openCombobox()),l.setActivationTrigger(1)})}),Y=Yn(),N=Oi(),{isFocused:V,focusProps:A}=Mo({autoFocus:g}),{isHovered:z,hoverProps:J}=_o({isDisabled:m}),G=c.useMemo(()=>({open:s.comboboxState===0,disabled:m,hover:z,focus:V,autofocus:g}),[s,z,V,g,m]),ie=$n({ref:w,id:f,role:"combobox",type:b,"aria-controls":(t=s.optionsElement)==null?void 0:t.id,"aria-expanded":s.comboboxState===0,"aria-activedescendant":s.activeOptionIndex===null?void 0:s.virtual?(e=s.options.find(T=>!T.dataRef.current.disabled&&s.compare(T.dataRef.current.value,s.virtual.options[s.activeOptionIndex])))==null?void 0:e.id:(o=s.options[s.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":Y,"aria-describedby":N,"aria-autocomplete":"list",defaultValue:(i=(a=n.defaultValue)!=null?a:s.defaultValue!==void 0?p==null?void 0:p(s.defaultValue):null)!=null?i:s.defaultValue,disabled:m||void 0,autoFocus:g,onCompositionStart:C,onCompositionEnd:I,onKeyDown:O,onChange:W,onFocus:P,onBlur:H},A,J);return Ce()({ourProps:ie,theirProps:y,slot:G,defaultTag:Ep,name:"Combobox.Input"})}let Sp="button";function Cp(n,r){var t;let e=yn("Combobox.Button"),o=Kn("Combobox.Button"),a=Le(r,o.setButtonElement),i=c.useId(),{id:s=`headlessui-combobox-button-${i}`,disabled:l=e.disabled||!1,autoFocus:d=!1,...u}=n,f=Qi(e.inputElement),h=$(k=>{switch(k.key){case ue.Space:case ue.Enter:k.preventDefault(),k.stopPropagation(),e.comboboxState===1&&Se.flushSync(()=>o.openCombobox()),f();return;case ue.ArrowDown:k.preventDefault(),k.stopPropagation(),e.comboboxState===1&&(Se.flushSync(()=>o.openCombobox()),e.value||o.goToOption(ee.First)),f();return;case ue.ArrowUp:k.preventDefault(),k.stopPropagation(),e.comboboxState===1&&(Se.flushSync(()=>o.openCombobox()),e.value||o.goToOption(ee.Last)),f();return;case ue.Escape:if(e.comboboxState!==0)return;k.preventDefault(),e.optionsElement&&!e.optionsPropsRef.current.static&&k.stopPropagation(),Se.flushSync(()=>o.closeCombobox()),f();return;default:return}}),p=$(k=>{k.preventDefault(),!Ci(k.currentTarget)&&(k.button===ca.Left&&(e.comboboxState===0?o.closeCombobox():o.openCombobox()),f())}),m=Yn([s]),{isFocusVisible:g,focusProps:b}=Mo({autoFocus:d}),{isHovered:y,hoverProps:x}=_o({isDisabled:l}),{pressed:w,pressProps:E}=vi({disabled:l}),_=c.useMemo(()=>({open:e.comboboxState===0,active:w||e.comboboxState===0,disabled:l,value:e.value,hover:y,focus:g}),[e,y,g,w,l]),D=$n({ref:a,id:s,type:Ki(n,e.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(t=e.optionsElement)==null?void 0:t.id,"aria-expanded":e.comboboxState===0,"aria-labelledby":m,disabled:l||void 0,autoFocus:d,onMouseDown:p,onKeyDown:h},b,x,E);return Ce()({ourProps:D,theirProps:u,slot:_,defaultTag:Sp,name:"Combobox.Button"})}let _p="div",Mp=Mt.RenderStrategy|Mt.Static;function Op(n,r){var t,e,o;let a=c.useId(),{id:i=`headlessui-combobox-options-${a}`,hold:s=!1,anchor:l,portal:d=!1,modal:u=!0,transition:f=!1,...h}=n,p=yn("Combobox.Options"),m=Kn("Combobox.Options"),g=Cs(l);g&&(d=!0);let[b,y]=Os(g),[x,w]=c.useState(null),E=Ms(),_=Le(r,g?b:null,m.setOptionsElement,w),D=Tt(p.optionsElement),k=vn(),[S,C]=zo(f,x,k!==null?(k&Ae.Open)===Ae.Open:p.comboboxState===0);Ao(S,p.inputElement,m.closeCombobox);let I=p.__demoMode?!1:u&&p.comboboxState===0;Bo(I,D);let O=p.__demoMode?!1:u&&p.comboboxState===0;$o(O,{allowed:c.useCallback(()=>[p.inputElement,p.buttonElement,p.optionsElement],[p.inputElement,p.buttonElement,p.optionsElement])}),ae(()=>{var ie;p.optionsPropsRef.current.static=(ie=n.static)!=null?ie:!1},[p.optionsPropsRef,n.static]),ae(()=>{p.optionsPropsRef.current.hold=s},[p.optionsPropsRef,s]),Ud(p.comboboxState===0,{container:p.optionsElement,accept(ie){return ie.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:ie.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(ie){ie.setAttribute("role","none")}});let W=Yn([(t=p.buttonElement)==null?void 0:t.id]),H=c.useMemo(()=>({open:p.comboboxState===0,option:void 0}),[p.comboboxState]),P=$(()=>{m.setActivationTrigger(0)}),Y=$(ie=>{ie.preventDefault(),m.setActivationTrigger(0)}),N=$n(g?E():{},{"aria-labelledby":W,role:"listbox","aria-multiselectable":p.mode===1?!0:void 0,id:i,ref:_,style:{...h.style,...y,"--input-width":Fo(p.inputElement,!0).width,"--button-width":Fo(p.buttonElement,!0).width},onWheel:p.activationTrigger===0?void 0:P,onMouseDown:Y,...Vo(C)}),V=S&&p.comboboxState===1,A=Nr(V,(e=p.virtual)==null?void 0:e.options),z=Nr(V,p.value),J=$(ie=>p.compare(z,ie));if(p.virtual){if(A===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(h,{children:c.createElement(qn.Provider,{value:A!==p.virtual.options?{...p,virtual:{...p.virtual,options:A}}:p},c.createElement(yp,{slot:H},h.children))})}let G=Ce();return c.createElement(fa,{enabled:d?n.static||S:!1},c.createElement(qn.Provider,{value:p.mode===1?p:{...p,isSelected:J}},G({ourProps:N,theirProps:{...h,children:c.createElement(tp,{freeze:V},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,H):h.children)},slot:H,defaultTag:_p,features:Mp,visible:S,name:"Combobox.Options"})))}let Pp="div";function Tp(n,r){var t,e,o,a;let i=yn("Combobox.Option"),s=Kn("Combobox.Option"),l=c.useId(),{id:d=`headlessui-combobox-option-${l}`,value:u,disabled:f=(o=(e=(t=i.virtual)==null?void 0:t.disabled)==null?void 0:e.call(t,u))!=null?o:!1,order:h=null,...p}=n,m=Qi(i.inputElement),g=i.virtual?i.activeOptionIndex===i.calculateIndex(u):i.activeOptionIndex===null?!1:((a=i.options[i.activeOptionIndex])==null?void 0:a.id)===d,b=i.isSelected(u),y=c.useRef(null),x=gt({disabled:f,value:u,domRef:y,order:h}),w=c.useContext(Hs),E=Le(r,y,w?w.measureElement:null),_=$(()=>{s.setIsTyping(!1),s.onChange(u)});ae(()=>s.registerOption(d,x),[x,d]);let D=c.useRef(!(i.virtual||i.__demoMode));ae(()=>{if(!i.virtual&&!i.__demoMode)return et().requestAnimationFrame(()=>{D.current=!0})},[i.virtual,i.__demoMode]),ae(()=>{if(D.current&&i.comboboxState===0&&g&&i.activationTrigger!==0)return et().requestAnimationFrame(()=>{var Y,N;(N=(Y=y.current)==null?void 0:Y.scrollIntoView)==null||N.call(Y,{block:"nearest"})})},[y,g,i.comboboxState,i.activationTrigger,i.activeOptionIndex]);let k=$(Y=>{Y.preventDefault(),Y.button===ca.Left&&(f||(_(),Vi()||requestAnimationFrame(()=>m()),i.mode===0&&s.closeCombobox()))}),S=$(()=>{if(f)return s.goToOption(ee.Nothing);let Y=i.calculateIndex(u);s.goToOption(ee.Specific,Y)}),C=Gi(),I=$(Y=>C.update(Y)),O=$(Y=>{if(!C.wasMoved(Y)||f||g)return;let N=i.calculateIndex(u);s.goToOption(ee.Specific,N,0)}),W=$(Y=>{C.wasMoved(Y)&&(f||g&&(i.optionsPropsRef.current.hold||s.goToOption(ee.Nothing)))}),H=c.useMemo(()=>({active:g,focus:g,selected:b,disabled:f}),[g,b,f]),P={id:d,ref:E,role:"option",tabIndex:f===!0?void 0:-1,"aria-disabled":f===!0?!0:void 0,"aria-selected":b,disabled:void 0,onMouseDown:k,onFocus:S,onPointerEnter:I,onMouseEnter:I,onPointerMove:O,onMouseMove:O,onPointerLeave:W,onMouseLeave:W};return Ce()({ourProps:P,theirProps:p,slot:H,defaultTag:Pp,name:"Combobox.Option"})}let Np=xe(Dp),Ip=xe(Cp),Ws=xe(kp),Fp=xr,Rs=xe(Op),Bs=xe(Tp),Lp=Object.assign(Np,{Input:Ws,Button:Ip,Label:Fp,Options:Rs,Option:Bs});function $p(n,r=typeof document<"u"?document.defaultView:null,t){let e=dn(n,"escape");Ro(r,"keydown",o=>{e&&(o.defaultPrevented||o.key===ue.Escape&&t(o))})}function Ap(){var n;let[r]=c.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,e]=c.useState((n=r==null?void 0:r.matches)!=null?n:!1);return ae(()=>{if(!r)return;function o(a){e(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),t}function Yp({defaultContainers:n=[],portals:r,mainTreeNode:t}={}){let e=Tt(t),o=$(()=>{var a,i;let s=[];for(let l of n)l!==null&&(l instanceof HTMLElement?s.push(l):"current"in l&&l.current instanceof HTMLElement&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=e==null?void 0:e.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&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(d=>l.contains(d))||s.push(l));return s});return{resolveContainers:o,contains:$(a=>o().some(i=>i.contains(a)))}}let Vs=c.createContext(null);function zs({children:n,node:r}){let[t,e]=c.useState(null),o=Us(r??t);return c.createElement(Vs.Provider,{value:o},n,o===null&&c.createElement(An,{features:un.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=zt(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l!=null&&l.contains(a)){e(l);break}}}}))}function Us(n=null){var r;return(r=c.useContext(Vs))!=null?r:n}function ma(){let n=c.useRef(!1);return ae(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Gn=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Gn||{});function jp(){let n=c.useRef(0);return zi(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function Qs(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let t of n.current)t.current instanceof HTMLElement&&r.add(t.current);return r}let Hp="div";var Gt=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Gt||{});function Wp(n,r){let t=c.useRef(null),e=Le(t,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;Qn()||(s=0);let d=Tt(t);zp(s,{ownerDocument:d});let u=Up(s,{ownerDocument:d,container:t,initialFocus:o,initialFocusFallback:a});Qp(s,{ownerDocument:d,container:t,containers:i,previousActiveElement:u});let f=jp(),h=$(x=>{let w=t.current;w&&(E=>E())(()=>{Fe(f.current,{[Gn.Forwards]:()=>{fn(w,tt.First,{skipElements:[x.relatedTarget,a]})},[Gn.Backwards]:()=>{fn(w,tt.Last,{skipElements:[x.relatedTarget,a]})}})})}),p=dn(!!(s&2),"focus-trap#tab-lock"),m=mt(),g=c.useRef(!1),b={ref:e,onKeyDown(x){x.key=="Tab"&&(g.current=!0,m.requestAnimationFrame(()=>{g.current=!1}))},onBlur(x){if(!(s&4))return;let w=Qs(i);t.current instanceof HTMLElement&&w.add(t.current);let E=x.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(Ks(w,E)||(g.current?fn(t.current,Fe(f.current,{[Gn.Forwards]:()=>tt.Next,[Gn.Backwards]:()=>tt.Previous})|tt.WrapAround,{relativeTo:x.target}):x.target instanceof HTMLElement&&bt(x.target)))}},y=Ce();return c.createElement(c.Fragment,null,p&&c.createElement(An,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:un.Focusable}),y({ourProps:b,theirProps:l,defaultTag:Hp,name:"FocusTrap"}),p&&c.createElement(An,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:un.Focusable}))}let Rp=xe(Wp),Bp=Object.assign(Rp,{features:Gt});function Vp(n=!0){let r=c.useRef(st.slice());return Wn(([t],[e])=>{e===!0&&t===!1&&gr(()=>{r.current.splice(0)}),e===!1&&t===!0&&(r.current=st.slice())},[n,st,r]),$(()=>{var t;return(t=r.current.find(e=>e!=null&&e.isConnected))!=null?t:null})}function zp(n,{ownerDocument:r}){let t=!!(n&8),e=Vp(t);Wn(()=>{t||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&bt(e())},[t]),Fs(()=>{t&&bt(e())})}function Up(n,{ownerDocument:r,container:t,initialFocus:e,initialFocusFallback:o}){let a=c.useRef(null),i=dn(!!(n&1),"focus-trap#initial-focus"),s=ma();return Wn(()=>{if(n===0)return;if(!i){o!=null&&o.current&&bt(o.current);return}let l=t.current;l&&gr(()=>{if(!s.current)return;let d=r==null?void 0:r.activeElement;if(e!=null&&e.current){if((e==null?void 0:e.current)===d){a.current=d;return}}else if(l.contains(d)){a.current=d;return}if(e!=null&&e.current)bt(e.current);else{if(n&16){if(fn(l,tt.First|tt.AutoFocus)!==Yo.Error)return}else if(fn(l,tt.First)!==Yo.Error)return;if(o!=null&&o.current&&(bt(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,n]),a}function Qp(n,{ownerDocument:r,container:t,containers:e,previousActiveElement:o}){let a=ma(),i=!!(n&4);Ro(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=Qs(e);t.current instanceof HTMLElement&&l.add(t.current);let d=o.current;if(!d)return;let u=s.target;u&&u instanceof HTMLElement?Ks(l,u)?(o.current=u,bt(u)):(s.preventDefault(),s.stopPropagation(),bt(d)):bt(o.current)},!0)}function Ks(n,r){for(let t of n)if(t.contains(r))return!0;return!1}function qs(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:Xs)!==c.Fragment||c.Children.count(n.children)===1}let Fr=c.createContext(null);Fr.displayName="TransitionContext";var Kp=(n=>(n.Visible="visible",n.Hidden="hidden",n))(Kp||{});function qp(){let n=c.useContext(Fr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function Gp(){let n=c.useContext(Lr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Lr=c.createContext(null);Lr.displayName="NestingContext";function $r(n){return"children"in n?$r(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Gs(n,r){let t=gt(n),e=c.useRef([]),o=ma(),a=mt(),i=$((p,m=Ot.Hidden)=>{let g=e.current.findIndex(({el:b})=>b===p);g!==-1&&(Fe(m,{[Ot.Unmount](){e.current.splice(g,1)},[Ot.Hidden](){e.current[g].state="hidden"}}),a.microTask(()=>{var b;!$r(e)&&o.current&&((b=t.current)==null||b.call(t))}))}),s=$(p=>{let m=e.current.find(({el:g})=>g===p);return m?m.state!=="visible"&&(m.state="visible"):e.current.push({el:p,state:"visible"}),()=>i(p,Ot.Unmount)}),l=c.useRef([]),d=c.useRef(Promise.resolve()),u=c.useRef({enter:[],leave:[]}),f=$((p,m,g)=>{l.current.splice(0),r&&(r.chains.current[m]=r.chains.current[m].filter(([b])=>b!==p)),r==null||r.chains.current[m].push([p,new Promise(b=>{l.current.push(b)})]),r==null||r.chains.current[m].push([p,new Promise(b=>{Promise.all(u.current[m].map(([y,x])=>x)).then(()=>b())})]),m==="enter"?d.current=d.current.then(()=>r==null?void 0:r.wait.current).then(()=>g(m)):g(m)}),h=$((p,m,g)=>{Promise.all(u.current[m].splice(0).map(([b,y])=>y)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>g(m))});return c.useMemo(()=>({children:e,register:s,unregister:i,onStart:f,onStop:h,wait:d,chains:u}),[s,i,e,f,h,u,d])}let Xs=c.Fragment,Js=Mt.RenderStrategy;function Xp(n,r){var t,e;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:d,enterFrom:u,enterTo:f,entered:h,leave:p,leaveFrom:m,leaveTo:g,...b}=n,[y,x]=c.useState(null),w=c.useRef(null),E=qs(n),_=Le(...E?[w,r,x]:r===null?[]:[r]),D=(t=b.unmount)==null||t?Ot.Unmount:Ot.Hidden,{show:k,appear:S,initial:C}=qp(),[I,O]=c.useState(k?"visible":"hidden"),W=Gp(),{register:H,unregister:P}=W;ae(()=>H(w),[H,w]),ae(()=>{if(D===Ot.Hidden&&w.current){if(k&&I!=="visible"){O("visible");return}return Fe(I,{hidden:()=>P(w),visible:()=>H(w)})}},[I,w,H,P,k,D]);let Y=Qn();ae(()=>{if(E&&Y&&I==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,I,Y,E]);let N=C&&!S,V=S&&k&&C,A=c.useRef(!1),z=Gs(()=>{A.current||(O("hidden"),P(w))},W),J=$(se=>{A.current=!0;let ye=se?"enter":"leave";z.onStart(w,ye,Ye=>{Ye==="enter"?a==null||a():Ye==="leave"&&(s==null||s())})}),G=$(se=>{let ye=se?"enter":"leave";A.current=!1,z.onStop(w,ye,Ye=>{Ye==="enter"?i==null||i():Ye==="leave"&&(l==null||l())}),ye==="leave"&&!$r(z)&&(O("hidden"),P(w))});c.useEffect(()=>{E&&o||(J(k),G(k))},[k,E,o]);let ie=!(!o||!E||!Y||N),[,T]=zo(ie,y,k,{start:J,end:G}),oe=Pt({ref:_,className:((e=Po(b.className,V&&d,V&&u,T.enter&&d,T.enter&&T.closed&&u,T.enter&&!T.closed&&f,T.leave&&p,T.leave&&!T.closed&&m,T.leave&&T.closed&&g,!T.transition&&k&&h))==null?void 0:e.trim())||void 0,...Vo(T)}),te=0;I==="visible"&&(te|=Ae.Open),I==="hidden"&&(te|=Ae.Closed),T.enter&&(te|=Ae.Opening),T.leave&&(te|=Ae.Closing);let De=Ce();return c.createElement(Lr.Provider,{value:z},c.createElement(ua,{value:te},De({ourProps:oe,theirProps:b,defaultTag:Xs,features:Js,visible:I==="visible",name:"Transition.Child"})))}function Jp(n,r){let{show:t,appear:e=!1,unmount:o=!0,...a}=n,i=c.useRef(null),s=qs(n),l=Le(...s?[i,r]:r===null?[]:[r]);Qn();let d=vn();if(t===void 0&&d!==null&&(t=(d&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]=c.useState(t?"visible":"hidden"),h=Gs(()=>{t||f("hidden")}),[p,m]=c.useState(!0),g=c.useRef([t]);ae(()=>{p!==!1&&g.current[g.current.length-1]!==t&&(g.current.push(t),m(!1))},[g,t]);let b=c.useMemo(()=>({show:t,appear:e,initial:p}),[t,e,p]);ae(()=>{t?f("visible"):!$r(h)&&i.current!==null&&f("hidden")},[t,h]);let y={unmount:o},x=$(()=>{var _;p&&m(!1),(_=n.beforeEnter)==null||_.call(n)}),w=$(()=>{var _;p&&m(!1),(_=n.beforeLeave)==null||_.call(n)}),E=Ce();return c.createElement(Lr.Provider,{value:h},c.createElement(Fr.Provider,{value:b},E({ourProps:{...y,as:c.Fragment,children:c.createElement(Zs,{ref:l,...y,...a,beforeEnter:x,beforeLeave:w})},theirProps:{},defaultTag:c.Fragment,features:Js,visible:u==="visible",name:"Transition"})))}function Zp(n,r){let t=c.useContext(Fr)!==null,e=vn()!==null;return c.createElement(c.Fragment,null,!t&&e?c.createElement(ga,{ref:r,...n}):c.createElement(Zs,{ref:r,...n}))}let ga=xe(Jp),Zs=xe(Xp),ba=xe(Zp),el=Object.assign(ga,{Child:ba,Root:ga});var eh=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(eh||{}),th=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(th||{});let nh={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},va=c.createContext(null);va.displayName="DialogContext";function Ar(n){let r=c.useContext(va);if(r===null){let t=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ar),t}return r}function rh(n,r){return Fe(r.type,nh,n,r)}let tl=xe(function(n,r){let t=c.useId(),{id:e=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:d=!1,unmount:u=!1,...f}=n,h=c.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(h.current||(h.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=vn();o===void 0&&p!==null&&(o=(p&Ae.Open)===Ae.Open);let m=c.useRef(null),g=Le(m,r),b=Tt(m),y=o?0:1,[x,w]=c.useReducer(rh,{titleId:null,descriptionId:null,panelRef:c.createRef()}),E=$(()=>a(!1)),_=$(G=>w({type:0,id:G})),D=Qn()?y===0:!1,[k,S]=fp(),C={get current(){var G;return(G=x.panelRef.current)!=null?G:m.current}},I=Us(),{resolveContainers:O}=Yp({mainTreeNode:I,portals:k,defaultContainers:[C]}),W=p!==null?(p&Ae.Closing)===Ae.Closing:!1;$o(d||W?!1:D,{allowed:$(()=>{var G,ie;return[(ie=(G=m.current)==null?void 0:G.closest("[data-headlessui-portal]"))!=null?ie:null]}),disallowed:$(()=>{var G;return[(G=I==null?void 0:I.closest("body > *:not(#headlessui-portal-root)"))!=null?G:null]})}),Wo(D,O,G=>{G.preventDefault(),E()}),$p(D,b==null?void 0:b.defaultView,G=>{G.preventDefault(),G.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),Bo(d||W?!1:D,b,O),Ao(D,m,E);let[H,P]=nd(),Y=c.useMemo(()=>[{dialogState:y,close:E,setTitleId:_,unmount:u},x],[y,x,E,_,u]),N=c.useMemo(()=>({open:y===0}),[y]),V={ref:g,id:e,role:s,tabIndex:-1,"aria-modal":d?void 0:y===0?!0:void 0,"aria-labelledby":x.titleId,"aria-describedby":H,unmount:u},A=!Ap(),z=Gt.None;D&&!d&&(z|=Gt.RestoreFocus,z|=Gt.TabLock,l&&(z|=Gt.AutoFocus),A&&(z|=Gt.InitialFocus));let J=Ce();return c.createElement(np,null,c.createElement($s,{force:!0},c.createElement(fa,null,c.createElement(va.Provider,{value:Y},c.createElement(js,{target:m},c.createElement($s,{force:!1},c.createElement(P,{slot:N},c.createElement(S,null,c.createElement(Bp,{initialFocus:i,initialFocusFallback:m,containers:O,features:z},c.createElement(cd,{value:E},J({ourProps:V,theirProps:f,slot:N,defaultTag:oh,features:ah,visible:y===0,name:"Dialog"})))))))))))}),oh="div",ah=Mt.RenderStrategy|Mt.Static;function ih(n,r){let{transition:t=!1,open:e,...o}=n,a=vn(),i=n.hasOwnProperty("open")||a!==null,s=n.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 n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(e!==void 0||t)&&!o.static?c.createElement(zs,null,c.createElement(el,{show:e,transition:t,unmount:o.unmount},c.createElement(tl,{ref:r,...o}))):c.createElement(zs,null,c.createElement(tl,{ref:r,open:e,...o}))}let sh="div";function lh(n,r){let t=c.useId(),{id:e=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Ar("Dialog.Panel"),d=Le(r,l.panelRef),u=c.useMemo(()=>({open:i===0}),[i]),f=$(b=>{b.stopPropagation()}),h={ref:d,id:e,onClick:f},p=o?ba:c.Fragment,m=o?{unmount:s}:{},g=Ce();return c.createElement(p,{...m},g({ourProps:h,theirProps:a,slot:u,defaultTag:sh,name:"Dialog.Panel"}))}let uh="div";function ch(n,r){let{transition:t=!1,...e}=n,[{dialogState:o,unmount:a}]=Ar("Dialog.Backdrop"),i=c.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0},l=t?ba:c.Fragment,d=t?{unmount:a}:{},u=Ce();return c.createElement(l,{...d},u({ourProps:s,theirProps:e,slot:i,defaultTag:uh,name:"Dialog.Backdrop"}))}let dh="h2";function fh(n,r){let t=c.useId(),{id:e=`headlessui-dialog-title-${t}`,...o}=n,[{dialogState:a,setTitleId:i}]=Ar("Dialog.Title"),s=Le(r);c.useEffect(()=>(i(e),()=>i(null)),[e,i]);let l=c.useMemo(()=>({open:a===0}),[a]),d={ref:s,id:e};return Ce()({ourProps:d,theirProps:o,slot:l,defaultTag:dh,name:"Dialog.Title"})}let ph=xe(ih),nl=xe(lh);xe(ch);let rl=xe(fh),Xn=Object.assign(ph,{Panel:nl,Title:rl,Description:Pi});function hh(n,r){let t=c.useRef({left:0,top:0});if(ae(()=>{if(!r)return;let o=r.getBoundingClientRect();o&&(t.current=o)},[n,r]),r==null||!n||r===document.activeElement)return!1;let e=r.getBoundingClientRect();return e.top!==t.current.top||e.left!==t.current.left}let ol=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function al(n){var r,t;let e=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!(o instanceof HTMLElement))return e;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:"":e;return ol.test(i)&&(i=i.replace(ol,"")),i}function mh(n){let r=n.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=n.getAttribute("aria-labelledby");if(t){let e=t.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():al(a).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return al(n).trim()}function gh(n){let r=c.useRef(""),t=c.useRef("");return $(()=>{let e=n.current;if(!e)return"";let o=e.innerText;if(r.current===o)return t.current;let a=mh(e).trim().toLowerCase();return r.current=o,t.current=a,a})}var bh=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(bh||{}),vh=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(vh||{}),yh=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(yh||{}),wh=(n=>(n[n.OpenListbox=0]="OpenListbox",n[n.CloseListbox=1]="CloseListbox",n[n.GoToOption=2]="GoToOption",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterOption=5]="RegisterOption",n[n.UnregisterOption=6]="UnregisterOption",n[n.SetButtonElement=7]="SetButtonElement",n[n.SetOptionsElement=8]="SetOptionsElement",n))(wh||{});function ya(n,r=t=>t){let t=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,e=Ho(r(n.options.slice()),a=>a.dataRef.current.domRef.current),o=t?e.indexOf(t):null;return o===-1&&(o=null),{options:e,activeOptionIndex:o}}let xh={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(n){if(n.dataRef.current.disabled||n.listboxState===0)return n;let r=n.activeOptionIndex,{isSelected:t}=n.dataRef.current,e=n.options.findIndex(o=>t(o.dataRef.current.value));return e!==-1&&(r=e),{...n,listboxState:0,activeOptionIndex:r,__demoMode:!1}},2(n,r){var t,e,o,a,i;if(n.dataRef.current.disabled||n.listboxState===1)return n;let s={...n,searchQuery:"",activationTrigger:(t=r.trigger)!=null?t:1,__demoMode:!1};if(r.focus===ee.Nothing)return{...s,activeOptionIndex:null};if(r.focus===ee.Specific)return{...s,activeOptionIndex:n.options.findIndex(u=>u.id===r.id)};if(r.focus===ee.Previous){let u=n.activeOptionIndex;if(u!==null){let f=n.options[u].dataRef.current.domRef,h=Un(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=n.options[h].dataRef.current.domRef;if(((e=f.current)==null?void 0:e.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:h}}}}else if(r.focus===ee.Next){let u=n.activeOptionIndex;if(u!==null){let f=n.options[u].dataRef.current.domRef,h=Un(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(h!==null){let p=n.options[h].dataRef.current.domRef;if(((a=f.current)==null?void 0:a.nextElementSibling)===p.current||((i=p.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeOptionIndex:h}}}}let l=ya(n),d=Un(r,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...s,...l,activeOptionIndex:d}},3:(n,r)=>{if(n.dataRef.current.disabled||n.listboxState===1)return n;let t=n.searchQuery!==""?0:1,e=n.searchQuery+r.value.toLowerCase(),o=(n.activeOptionIndex!==null?n.options.slice(n.activeOptionIndex+t).concat(n.options.slice(0,n.activeOptionIndex+t)):n.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(e))}),a=o?n.options.indexOf(o):-1;return a===-1||a===n.activeOptionIndex?{...n,searchQuery:e}:{...n,searchQuery:e,activeOptionIndex:a,activationTrigger:1}},4(n){return n.dataRef.current.disabled||n.listboxState===1||n.searchQuery===""?n:{...n,searchQuery:""}},5:(n,r)=>{let t={id:r.id,dataRef:r.dataRef},e=ya(n,o=>[...o,t]);return n.activeOptionIndex===null&&n.dataRef.current.isSelected(r.dataRef.current.value)&&(e.activeOptionIndex=e.options.indexOf(t)),{...n,...e}},6:(n,r)=>{let t=ya(n,e=>{let o=e.findIndex(a=>a.id===r.id);return o!==-1&&e.splice(o,1),e});return{...n,...t,activationTrigger:1}},7:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},8:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},wa=c.createContext(null);wa.displayName="ListboxActionsContext";function Yr(n){let r=c.useContext(wa);if(r===null){let t=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Yr),t}return r}let jr=c.createContext(null);jr.displayName="ListboxDataContext";function Jn(n){let r=c.useContext(jr);if(r===null){let t=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Jn),t}return r}function Dh(n,r){return Fe(r.type,xh,n,r)}let Eh=c.Fragment;function kh(n,r){var t;let e=br(),{value:o,defaultValue:a,form:i,name:s,onChange:l,by:d,invalid:u=!1,disabled:f=e||!1,horizontal:h=!1,multiple:p=!1,__demoMode:m=!1,...g}=n;const b=h?"horizontal":"vertical";let y=Le(r),x=xi(a),[w=p?[]:void 0,E]=wi(o,l,x),[_,D]=c.useReducer(Dh,{dataRef:c.createRef(),listboxState:m?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:m}),k=c.useRef({static:!1,hold:!1}),S=c.useRef(new Map),C=$i(d),I=c.useCallback(ve=>Fe(O.mode,{1:()=>w.some(Ne=>C(Ne,ve)),0:()=>C(w,ve)}),[w]),O=c.useMemo(()=>({..._,value:w,disabled:f,invalid:u,mode:p?1:0,orientation:b,compare:C,isSelected:I,optionsPropsRef:k,listRef:S}),[w,f,u,p,_,S]);ae(()=>{_.dataRef.current=O},[O]);let W=O.listboxState===0;Wo(W,[O.buttonElement,O.optionsElement],(ve,Ne)=>{var q;D({type:1}),Ri(Ne,jo.Loose)||(ve.preventDefault(),(q=O.buttonElement)==null||q.focus())});let H=c.useMemo(()=>({open:O.listboxState===0,disabled:f,invalid:u,value:w}),[O,f,w,u]),P=$(ve=>{let Ne=O.options.find(q=>q.id===ve);Ne&&G(Ne.dataRef.current.value)}),Y=$(()=>{if(O.activeOptionIndex!==null){let{dataRef:ve,id:Ne}=O.options[O.activeOptionIndex];G(ve.current.value),D({type:2,focus:ee.Specific,id:Ne})}}),N=$(()=>D({type:0})),V=$(()=>D({type:1})),A=mt(),z=$((ve,Ne,q)=>{A.dispose(),A.microTask(()=>ve===ee.Specific?D({type:2,focus:ee.Specific,id:Ne,trigger:q}):D({type:2,focus:ve,trigger:q}))}),J=$((ve,Ne)=>(D({type:5,id:ve,dataRef:Ne}),()=>D({type:6,id:ve}))),G=$(ve=>Fe(O.mode,{0(){return E==null?void 0:E(ve)},1(){let Ne=O.value.slice(),q=Ne.findIndex(he=>C(he,ve));return q===-1?Ne.push(ve):Ne.splice(q,1),E==null?void 0:E(Ne)}})),ie=$(ve=>D({type:3,value:ve})),T=$(()=>D({type:4})),oe=$(ve=>{D({type:7,element:ve})}),te=$(ve=>{D({type:8,element:ve})}),De=c.useMemo(()=>({onChange:G,registerOption:J,goToOption:z,closeListbox:V,openListbox:N,selectActiveOption:Y,selectOption:P,search:ie,clearSearch:T,setButtonElement:oe,setOptionsElement:te}),[]),[se,ye]=Ni({inherit:!0}),Ye={ref:y},jt=c.useCallback(()=>{if(x!==void 0)return E==null?void 0:E(x)},[E,x]),lr=Ce();return c.createElement(ye,{value:se,props:{htmlFor:(t=O.buttonElement)==null?void 0:t.id},slot:{open:O.listboxState===0,disabled:f}},c.createElement(Ts,null,c.createElement(wa.Provider,{value:De},c.createElement(jr.Provider,{value:O},c.createElement(ua,{value:Fe(O.listboxState,{0:Ae.Open,1:Ae.Closed})},s!=null&&w!=null&&c.createElement(Si,{disabled:f,data:{[s]:w},form:i,onReset:jt}),lr({ourProps:Ye,theirProps:g,slot:H,defaultTag:Eh,name:"Listbox"}))))))}let Sh="button";function Ch(n,r){var t;let e=Jn("Listbox.Button"),o=Yr("Listbox.Button"),a=c.useId(),i=No(),{id:s=i||`headlessui-listbox-button-${a}`,disabled:l=e.disabled||!1,autoFocus:d=!1,...u}=n,f=Le(r,_s(),o.setButtonElement),h=Jf(),p=$(O=>{switch(O.key){case ue.Enter:Qc(O.currentTarget);break;case ue.Space:case ue.ArrowDown:O.preventDefault(),Se.flushSync(()=>o.openListbox()),e.value||o.goToOption(ee.First);break;case ue.ArrowUp:O.preventDefault(),Se.flushSync(()=>o.openListbox()),e.value||o.goToOption(ee.Last);break}}),m=$(O=>{switch(O.key){case ue.Space:O.preventDefault();break}}),g=$(O=>{var W;if(Ci(O.currentTarget))return O.preventDefault();e.listboxState===0?(Se.flushSync(()=>o.closeListbox()),(W=e.buttonElement)==null||W.focus({preventScroll:!0})):(O.preventDefault(),o.openListbox())}),b=$(O=>O.preventDefault()),y=Yn([s]),x=Oi(),{isFocusVisible:w,focusProps:E}=Mo({autoFocus:d}),{isHovered:_,hoverProps:D}=_o({isDisabled:l}),{pressed:k,pressProps:S}=vi({disabled:l}),C=c.useMemo(()=>({open:e.listboxState===0,active:k||e.listboxState===0,disabled:l,invalid:e.invalid,value:e.value,hover:_,focus:w,autofocus:d}),[e.listboxState,e.value,l,_,w,k,e.invalid,d]),I=$n(h(),{ref:f,id:s,type:Ki(n,e.buttonElement),"aria-haspopup":"listbox","aria-controls":(t=e.optionsElement)==null?void 0:t.id,"aria-expanded":e.listboxState===0,"aria-labelledby":y,"aria-describedby":x,disabled:l||void 0,autoFocus:d,onKeyDown:p,onKeyUp:m,onKeyPress:b,onClick:g},E,D,S);return Ce()({ourProps:I,theirProps:u,slot:C,defaultTag:Sh,name:"Listbox.Button"})}let il=c.createContext(!1),_h="div",Mh=Mt.RenderStrategy|Mt.Static;function Oh(n,r){var t,e;let o=c.useId(),{id:a=`headlessui-listbox-options-${o}`,anchor:i,portal:s=!1,modal:l=!0,transition:d=!1,...u}=n,f=Cs(i),[h,p]=c.useState(null);f&&(s=!0);let m=Jn("Listbox.Options"),g=Yr("Listbox.Options"),b=Tt(m.optionsElement),y=vn(),[x,w]=zo(d,h,y!==null?(y&Ae.Open)===Ae.Open:m.listboxState===0);Ao(x,m.buttonElement,g.closeListbox);let E=m.__demoMode?!1:l&&m.listboxState===0;Bo(E,b);let _=m.__demoMode?!1:l&&m.listboxState===0;$o(_,{allowed:c.useCallback(()=>[m.buttonElement,m.optionsElement],[m.buttonElement,m.optionsElement])});let D=m.listboxState!==0,k=hh(D,m.buttonElement)?!1:x,S=x&&m.listboxState===1,C=Nr(S,m.value),I=$(T=>m.compare(C,T)),O=c.useMemo(()=>{var T;if(f==null||!((T=f==null?void 0:f.to)!=null&&T.includes("selection")))return null;let oe=m.options.findIndex(te=>I(te.dataRef.current.value));return oe===-1&&(oe=0),oe},[f,m.options]),W=(()=>{if(f==null)return;if(O===null)return{...f,inner:void 0};let T=Array.from(m.listRef.current.values());return{...f,inner:{listRef:{current:T},index:O}}})(),[H,P]=Os(W),Y=Ms(),N=Le(r,f?H:null,g.setOptionsElement,p),V=mt();c.useEffect(()=>{var T;let oe=m.optionsElement;oe&&m.listboxState===0&&oe!==((T=zt(oe))==null?void 0:T.activeElement)&&(oe==null||oe.focus({preventScroll:!0}))},[m.listboxState,m.optionsElement]);let A=$(T=>{var oe,te;switch(V.dispose(),T.key){case ue.Space:if(m.searchQuery!=="")return T.preventDefault(),T.stopPropagation(),g.search(T.key);case ue.Enter:if(T.preventDefault(),T.stopPropagation(),m.activeOptionIndex!==null){let{dataRef:De}=m.options[m.activeOptionIndex];g.onChange(De.current.value)}m.mode===0&&(Se.flushSync(()=>g.closeListbox()),(oe=m.buttonElement)==null||oe.focus({preventScroll:!0}));break;case Fe(m.orientation,{vertical:ue.ArrowDown,horizontal:ue.ArrowRight}):return T.preventDefault(),T.stopPropagation(),g.goToOption(ee.Next);case Fe(m.orientation,{vertical:ue.ArrowUp,horizontal:ue.ArrowLeft}):return T.preventDefault(),T.stopPropagation(),g.goToOption(ee.Previous);case ue.Home:case ue.PageUp:return T.preventDefault(),T.stopPropagation(),g.goToOption(ee.First);case ue.End:case ue.PageDown:return T.preventDefault(),T.stopPropagation(),g.goToOption(ee.Last);case ue.Escape:T.preventDefault(),T.stopPropagation(),Se.flushSync(()=>g.closeListbox()),(te=m.buttonElement)==null||te.focus({preventScroll:!0});return;case ue.Tab:T.preventDefault(),T.stopPropagation(),Se.flushSync(()=>g.closeListbox()),Fd(m.buttonElement,T.shiftKey?tt.Previous:tt.Next);break;default:T.key.length===1&&(g.search(T.key),V.setTimeout(()=>g.clearSearch(),350));break}}),z=(t=m.buttonElement)==null?void 0:t.id,J=c.useMemo(()=>({open:m.listboxState===0}),[m.listboxState]),G=$n(f?Y():{},{id:a,ref:N,"aria-activedescendant":m.activeOptionIndex===null||(e=m.options[m.activeOptionIndex])==null?void 0:e.id,"aria-multiselectable":m.mode===1?!0:void 0,"aria-labelledby":z,"aria-orientation":m.orientation,onKeyDown:A,role:"listbox",tabIndex:m.listboxState===0?0:void 0,style:{...u.style,...P,"--button-width":Fo(m.buttonElement,!0).width},...Vo(w)}),ie=Ce();return c.createElement(fa,{enabled:s?n.static||x:!1},c.createElement(jr.Provider,{value:m.mode===1?m:{...m,isSelected:I}},ie({ourProps:G,theirProps:u,slot:J,defaultTag:_h,features:Mh,visible:k,name:"Listbox.Options"})))}let Ph="div";function Th(n,r){let t=c.useId(),{id:e=`headlessui-listbox-option-${t}`,disabled:o=!1,value:a,...i}=n,s=c.useContext(il)===!0,l=Jn("Listbox.Option"),d=Yr("Listbox.Option"),u=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===e:!1,f=l.isSelected(a),h=c.useRef(null),p=gh(h),m=gt({disabled:o,value:a,domRef:h,get textValue(){return p()}}),g=Le(r,h,C=>{C?l.listRef.current.set(e,C):l.listRef.current.delete(e)});ae(()=>{if(!l.__demoMode&&l.listboxState===0&&u&&l.activationTrigger!==0)return et().requestAnimationFrame(()=>{var C,I;(I=(C=h.current)==null?void 0:C.scrollIntoView)==null||I.call(C,{block:"nearest"})})},[h,u,l.__demoMode,l.listboxState,l.activationTrigger,l.activeOptionIndex]),ae(()=>{if(!s)return d.registerOption(e,m)},[m,e,s]);let b=$(C=>{var I;if(o)return C.preventDefault();d.onChange(a),l.mode===0&&(Se.flushSync(()=>d.closeListbox()),(I=l.buttonElement)==null||I.focus({preventScroll:!0}))}),y=$(()=>{if(o)return d.goToOption(ee.Nothing);d.goToOption(ee.Specific,e)}),x=Gi(),w=$(C=>{x.update(C),!o&&(u||d.goToOption(ee.Specific,e,0))}),E=$(C=>{x.wasMoved(C)&&(o||u||d.goToOption(ee.Specific,e,0))}),_=$(C=>{x.wasMoved(C)&&(o||u&&d.goToOption(ee.Nothing))}),D=c.useMemo(()=>({active:u,focus:u,selected:f,disabled:o,selectedOption:f&&s}),[u,f,o,s]),k=s?{}:{id:e,ref:g,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:b,onFocus:y,onPointerEnter:w,onMouseEnter:w,onPointerMove:E,onMouseMove:E,onPointerLeave:_,onMouseLeave:_},S=Ce();return!f&&s?null:S({ourProps:k,theirProps:i,slot:D,defaultTag:Ph,name:"Listbox.Option"})}let Nh=c.Fragment;function Ih(n,r){let{options:t,placeholder:e,...o}=n,a={ref:Le(r)},i=Jn("ListboxSelectedOption"),s=c.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===1&&Array.isArray(i.value)&&i.value.length===0,d=Ce();return c.createElement(il.Provider,{value:!0},d({ourProps:a,theirProps:{...o,children:c.createElement(c.Fragment,null,e&&l?e:t)},slot:s,defaultTag:Nh,name:"ListboxSelectedOption"}))}let Fh=xe(kh),sl=xe(Ch),Lh=xr,ll=xe(Oh),ul=xe(Th),$h=xe(Ih),Ah=Object.assign(Fh,{Button:sl,Label:Lh,Options:ll,Option:ul,SelectedOption:$h});var cl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dl=c.createContext&&c.createContext(cl),Yh=["attr","size","title"];function jh(n,r){if(n==null)return{};var t=Hh(n,r),e,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)e=a[o],!(r.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(n,e)&&(t[e]=n[e])}return t}function Hh(n,r){if(n==null)return{};var t={};for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)){if(r.indexOf(e)>=0)continue;t[e]=n[e]}return t}function Hr(){return Hr=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}return n},Hr.apply(this,arguments)}function fl(n,r){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);r&&(e=e.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,e)}return t}function Wr(n){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?fl(Object(t),!0).forEach(function(e){Wh(n,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):fl(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))})}return n}function Wh(n,r,t){return r=Rh(r),r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}function Rh(n){var r=Bh(n,"string");return typeof r=="symbol"?r:r+""}function Bh(n,r){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var e=t.call(n,r);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function pl(n){return n&&n.map((r,t)=>c.createElement(r.tag,Wr({key:t},r.attr),pl(r.child)))}function Zn(n){return r=>c.createElement(Vh,Hr({attr:Wr({},n.attr)},r),pl(n.child))}function Vh(n){var r=t=>{var{attr:e,size:o,title:a}=n,i=jh(n,Yh),s=o||t.size||"1em",l;return t.className&&(l=t.className),n.className&&(l=(l?l+" ":"")+n.className),c.createElement("svg",Hr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,e,i,{className:l,style:Wr(Wr({color:n.color||t.color},t.style),n.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&c.createElement("title",null,a),n.children)};return dl!==void 0?c.createElement(dl.Consumer,null,t=>r(t)):r(cl)}function zh(n){return Zn({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"},child:[]}]})(n)}function hl(n){return Zn({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}const Uh=({checked:n,label:r,onChange:t,termImageUrl:e})=>{const[o,a]=c.useState(!1);return M.jsxs(M.Fragment,{children:[M.jsx(Qh,{isOpen:o,setIsOpen:a,termImageUrl:e}),M.jsxs("div",{className:"inline-flex items-center",children:[M.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[M.jsx("input",{type:"checkbox",className:"before:content[''] border-blue-gray-200 before:bg-blue-gray-500 peer bg-petnow-grey-primary checked:border-petnow-orange-primary checked:bg-petnow-orange-primary checked:before:bg-petnow-orange-primary relative size-6 cursor-pointer appearance-none rounded-xl border transition-all before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity",id:r,checked:n,onChange:i=>{t(i.target.checked)}}),M.jsx("span",{className:"text-petnow-grey-secondary pointer-events-none absolute top-2/4 left-2/4 -translate-x-2/4 -translate-y-2/4 transition peer-checked:text-white",children:M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:M.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),r&&M.jsxs("div",{className:"flex items-center",children:[M.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),M.jsx(zh,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},Qh=({isOpen:n,setIsOpen:r,termImageUrl:t})=>M.jsxs(Xn,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[M.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),M.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:M.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:M.jsxs(Xn.Panel,{className:"mx-auto flex max-w-sm flex-col items-center gap-8 rounded-sm bg-white",children:[M.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:M.jsx(hl,{size:20,className:"mr-2",onClick:()=>r(!1)})}),M.jsx("img",{src:t,alt:"약관동의 이미지"}),M.jsx(li,{text:"닫기",className:"mb-4 w-[90%] text-base focus:outline-hidden",onClick:()=>r(!1)})]})})})]});var xa=function(n,r){return xa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},xa(n,r)},wn=function(){return wn=Object.assign||function(n){for(var r,t=1,e=arguments.length;t<e;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},wn.apply(this,arguments)};function Kh(n,r){var t={};for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&r.indexOf(e)<0&&(t[e]=n[e]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(e=Object.getOwnPropertySymbols(n);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(n,e[o])&&(t[e[o]]=n[e[o]])}return t}var Da,ml="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",qh=(Da=null,function(n){return n===void 0&&(n=ml),Da||(Da=new Promise(function(r,t){var e=document.createElement("script");e.src=n,e.onload=function(){var o;if(!((o=window==null?void 0:window.daum)===null||o===void 0)&&o.Postcode)return r(window.daum.Postcode);t(new Error("Script is loaded successfully, but cannot find Postcode module. Check your scriptURL property."))},e.onerror=function(o){return t(o)},e.id="daum_postcode_script",document.body.appendChild(e)}))}),Gh=c.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),Xh={width:"100%",height:400},Jh={scriptUrl:ml,errorMessage:Gh,autoClose:!0},Zh=function(n){function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.mounted=!1,t.wrap=c.createRef(),t.state={hasError:!1,completed:!1},t.initiate=function(e){if(t.wrap.current){var o=t.props;o.scriptUrl,o.className,o.style;var a=o.defaultQuery,i=o.autoClose;o.errorMessage;var s=o.onComplete,l=o.onClose,d=o.onResize,u=o.onSearch,f=Kh(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new e(wn(wn({},f),{oncomplete:function(h){s&&s(h),t.setState({completed:!0})},onsearch:u,onresize:d,onclose:l,width:"100%",height:"100%"})).embed(t.wrap.current,{q:a,autoClose:i})}},t.onError=function(e){console.error(e),t.setState({hasError:!0})},t}return function(t,e){function o(){this.constructor=t}xa(t,e),t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}(r,n),r.prototype.componentDidMount=function(){var t=this.initiate,e=this.onError,o=this.props.scriptUrl;o&&(this.mounted||(qh(o).then(t).catch(e),this.mounted=!0))},r.prototype.render=function(){var t=this.props,e=t.className,o=t.style,a=t.errorMessage,i=t.autoClose,s=this.state,l=s.hasError,d=s.completed;return i===!0&&d===!0?null:c.createElement("div",{ref:this.wrap,className:e,style:wn(wn({},Xh),o)},l&&a)},r.defaultProps=Jh,r}(c.Component);const em=({label:n,value:r,onFrontChange:t,onBackChange:e,onPostalCodeChange:o,disabled:a})=>{const[i,s]=c.useState(!1),l=f=>{let h=f.address,p="";f.addressType==="R"&&(f.bname!==""&&(p+=f.bname),f.buildingName!==""&&(p+=p!==""?`, ${f.buildingName}`:f.buildingName),h+=p!==""?` (${p})`:""),t(h),o&&o(f.zonecode),s(!1)},d=()=>{s(!0)},u=()=>r.front?r.front:M.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return M.jsxs(M.Fragment,{children:[M.jsx(tm,{isOpen:i,setIsOpen:s,handleComplete:l}),M.jsxs("div",{className:"text-petnow-grey-tertiary",children:[M.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),M.jsxs("div",{className:"relative flex flex-col",children:[M.jsx("div",{className:`bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full cursor-pointer overflow-hidden rounded-xl p-4 text-base whitespace-nowrap focus:outline-hidden ${a&&"opacity-50"}`,onClick:d,children:u()}),M.jsx("input",{disabled:!r.front||a,value:r.back,type:"text",name:n,id:n,placeholder:"상세 주소를 입력해주세요.",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full rounded-xl p-4 text-base focus:outline-hidden disabled:opacity-50",autoComplete:"off",onChange:f=>e(f.target.value)})]})]})]})},tm=n=>{const{isOpen:r,setIsOpen:t,handleComplete:e}=n;return M.jsx(Xn,{open:r,onClose:()=>t(!1),className:"relateive z-50",children:M.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:M.jsx(Xn.Panel,{children:M.jsxs("div",{children:[M.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>t(!1),children:M.jsx(hl,{size:24,onClick:()=>t(!1)})}),M.jsx(Zh,{onComplete:e,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})},nm=n=>{const{isOpen:r,setIsOpen:t}=n;return M.jsx(el,{show:r,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:M.jsxs(Xn,{onClose:()=>t(!1),className:"relative z-50 focus:outline-hidden",children:[M.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),M.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:M.jsxs(nl,{className:"flex w-[260px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]",children:[M.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.title&&M.jsx(rl,{className:"text-[18px] leading-[26px] font-bold whitespace-pre-wrap text-black",children:n.title}),n.image&&M.jsx("img",{src:n.image.url,alt:n.image.alt}),n.description&&n.description!==""&&M.jsx(Pi,{className:"text-petnow-grey-tertiary text-[16px] leading-[24px] break-all",children:n.description})]}),M.jsxs("div",{className:"flex flex-col gap-[8px]",children:[M.jsx("button",{className:"bg-petnow-orange-primary sm:hover:bg-petnow-orange-40 w-full cursor-pointer rounded-[12px] px-[12px] py-[14px] text-[14px] leading-[22px] font-bold text-white transition duration-200",onClick:n.confirm.onClick,children:n.confirm.text}),n.cancel&&M.jsx("button",{onClick:()=>t(!1),className:"bg-background-tertiary sm:hover:bg-petnow-grey-90 text-petnow-grey-tertiary w-full cursor-pointer rounded-[12px] px-[12px] py-[14px] text-[14px] leading-[22px] font-bold transition duration-200",children:n.cancel.text})]})]})})]})})};function rm(n){return Zn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(n)}function om(n){return Zn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z"},child:[]}]})(n)}const am=({title:n,description:r,titleTextClassName:t,descriptionTextClassName:e})=>{const[o,a]=c.useState(!1);return M.jsxs("div",{className:"my-2.5 flex w-full cursor-pointer flex-col justify-center rounded-xl px-4 pt-8 shadow-[0_2px_8px_0_rgba(0,0,0,0.08)] md:rounded-2xl md:pt-10",onClick:()=>a(i=>!i),children:[M.jsxs("div",{className:"flex w-full items-center justify-between px-2 pb-8 transition-all duration-300 md:px-4 md:pb-10",children:[M.jsxs("p",{className:pr("mr-4 text-lg font-medium md:text-xl",t),children:[M.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?M.jsx(om,{className:"text-petnow-orange-primary min-w-6",size:24}):M.jsx(rm,{className:"text-petnow-orange-primary min-w-6",size:24})]}),M.jsx("p",{className:pr(`text-petnow-grey-secondary w-full overflow-hidden px-2 text-base leading-6 whitespace-pre-wrap transition-all duration-300 md:px-4 md:text-lg ${o?"max-h-[24rem] pb-8 sm:max-h-60 md:pb-10":"max-h-0"}`,e),children:r})]})},gl=6048e5,im=864e5,Rr=6e4,Br=36e5,sm=1e3,bl=Symbol.for("constructDateFrom");function ge(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&bl in n?n[bl](r):n instanceof Date?new n.constructor(r):new Date(r)}function K(n,r){return ge(r||n,n)}function nt(n,r,t){const e=K(n,t==null?void 0:t.in);return isNaN(r)?ge((t==null?void 0:t.in)||n,NaN):(r&&e.setDate(e.getDate()+r),e)}function rt(n,r,t){const e=K(n,t==null?void 0:t.in);if(isNaN(r))return ge(n,NaN);if(!r)return e;const o=e.getDate(),a=ge(n,e.getTime());a.setMonth(e.getMonth()+r+1,0);const i=a.getDate();return o>=i?a:(e.setFullYear(a.getFullYear(),a.getMonth(),o),e)}function vl(n,r,t){return ge(n,+K(n)+r)}function lm(n,r,t){return vl(n,r*Br)}let um={};function Xt(){return um}function yt(n,r){var s,l,d,u;const t=Xt(),e=(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=(d=t.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=K(n,r==null?void 0:r.in),a=o.getDay(),i=(a<e?7:0)+a-e;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function xn(n,r){return yt(n,{...r,weekStartsOn:1})}function yl(n,r){const t=K(n,r==null?void 0:r.in),e=t.getFullYear(),o=ge(t,0);o.setFullYear(e+1,0,4),o.setHours(0,0,0,0);const a=xn(o),i=ge(t,0);i.setFullYear(e,0,4),i.setHours(0,0,0,0);const s=xn(i);return t.getTime()>=a.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function Vr(n){const r=K(n),t=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return t.setUTCFullYear(r.getFullYear()),+n-+t}function wt(n,...r){const t=ge.bind(null,r.find(e=>typeof e=="object"));return r.map(t)}function Jt(n,r){const t=K(n,r==null?void 0:r.in);return t.setHours(0,0,0,0),t}function Dn(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r),a=Jt(e),i=Jt(o),s=+a-Vr(a),l=+i-Vr(i);return Math.round((s-l)/im)}function cm(n,r){const t=yl(n,r),e=ge(n,0);return e.setFullYear(t,0,4),e.setHours(0,0,0,0),xn(e)}function Ea(n,r,t){const e=K(n,t==null?void 0:t.in);return e.setTime(e.getTime()+r*Rr),e}function ka(n,r,t){return rt(n,r*3,t)}function dm(n,r,t){return vl(n,r*1e3)}function zr(n,r,t){return nt(n,r*7,t)}function xt(n,r,t){return rt(n,r*12,t)}function wl(n,r){let t,e=r==null?void 0:r.in;return n.forEach(o=>{!e&&typeof o=="object"&&(e=ge.bind(null,o));const a=K(o,e);(!t||t<a||isNaN(+a))&&(t=a)}),ge(e,t||NaN)}function xl(n,r){let t,e=r==null?void 0:r.in;return n.forEach(o=>{!e&&typeof o=="object"&&(e=ge.bind(null,o));const a=K(o,e);(!t||t>a||isNaN(+a))&&(t=a)}),ge(e,t||NaN)}function fm(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r);return+Jt(e)==+Jt(o)}function Dt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Ur(n){return!(!Dt(n)&&typeof n!="number"||isNaN(+K(n)))}function Qr(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r),a=e.getFullYear()-o.getFullYear(),i=e.getMonth()-o.getMonth();return a*12+i}function Zt(n,r){const t=K(n,r==null?void 0:r.in);return Math.trunc(t.getMonth()/3)+1}function Kr(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r),a=e.getFullYear()-o.getFullYear(),i=Zt(e)-Zt(o);return a*4+i}function qr(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r);return e.getFullYear()-o.getFullYear()}function pm(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r),a=Dl(e,o),i=Math.abs(Dn(e,o));e.setDate(e.getDate()-a*i);const s=+(Dl(e,o)===-a),l=a*(i-s);return l===0?0:l}function Dl(n,r){const t=n.getFullYear()-r.getFullYear()||n.getMonth()-r.getMonth()||n.getDate()-r.getDate()||n.getHours()-r.getHours()||n.getMinutes()-r.getMinutes()||n.getSeconds()-r.getSeconds()||n.getMilliseconds()-r.getMilliseconds();return t<0?-1:t>0?1:t}function El(n,r){const t=K(n,r==null?void 0:r.in);return t.setHours(23,59,59,999),t}function kl(n,r){const t=K(n,r==null?void 0:r.in),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Sa(n,r){const t=K(n,r==null?void 0:r.in),e=t.getMonth(),o=e-e%3;return t.setMonth(o,1),t.setHours(0,0,0,0),t}function Sl(n,r){const t=K(n,r==null?void 0:r.in);return t.setDate(1),t.setHours(0,0,0,0),t}function Cl(n,r){const t=K(n,r==null?void 0:r.in),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function Gr(n,r){const t=K(n,r==null?void 0:r.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function hm(n,r){var s,l;const t=Xt(),e=t.weekStartsOn??((l=(s=t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=K(n,r==null?void 0:r.in),a=o.getDay(),i=(a<e?-7:0)+6-(a-e);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}const mm={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"}},gm=(n,r,t)=>{let e;const o=mm[n];return typeof o=="string"?e=o:r===1?e=o.one:e=o.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+e:e+" ago":e};function En(n){return(r={})=>{const t=r.width?String(r.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const bm={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},vm={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ym={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wm={date:En({formats:bm,defaultWidth:"full"}),time:En({formats:vm,defaultWidth:"full"}),dateTime:En({formats:ym,defaultWidth:"full"})},xm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dm=(n,r,t,e)=>xm[n];function lt(n){return(r,t)=>{const e=t!=null&&t.context?String(t.context):"standalone";let o;if(e==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,s=t!=null&&t.width?String(t.width):i;o=n.formattingValues[s]||n.formattingValues[i]}else{const i=n.defaultWidth,s=t!=null&&t.width?String(t.width):n.defaultWidth;o=n.values[s]||n.values[i]}const a=n.argumentCallback?n.argumentCallback(r):r;return o[a]}}const Em={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},km={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Sm={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"]},Cm={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"]},_m={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"}},Mm={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"}},Om={ordinalNumber:(n,r)=>{const t=Number(n),e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:lt({values:Em,defaultWidth:"wide"}),quarter:lt({values:km,defaultWidth:"wide",argumentCallback:n=>n-1}),month:lt({values:Sm,defaultWidth:"wide"}),day:lt({values:Cm,defaultWidth:"wide"}),dayPeriod:lt({values:_m,defaultWidth:"wide",formattingValues:Mm,defaultFormattingWidth:"wide"})};function ut(n){return(r,t={})=>{const e=t.width,o=e&&n.matchPatterns[e]||n.matchPatterns[n.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=e&&n.parsePatterns[e]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?Tm(s,f=>f.test(i)):Pm(s,f=>f.test(i));let d;d=n.valueCallback?n.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;const u=r.slice(i.length);return{value:d,rest:u}}}function Pm(n,r){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&r(n[t]))return t}function Tm(n,r){for(let t=0;t<n.length;t++)if(r(n[t]))return t}function _l(n){return(r,t={})=>{const e=r.match(n.matchPattern);if(!e)return null;const o=e[0],a=r.match(n.parsePattern);if(!a)return null;let i=n.valueCallback?n.valueCallback(a[0]):a[0];i=t.valueCallback?t.valueCallback(i):i;const s=r.slice(o.length);return{value:i,rest:s}}}const Nm=/^(\d+)(th|st|nd|rd)?/i,Im=/\d+/i,Fm={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},Lm={any:[/^b/i,/^(a|c)/i]},$m={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Am={any:[/1/i,/2/i,/3/i,/4/i]},Ym={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},jm={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]},Hm={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},Wm={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]},Rm={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},Bm={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}},Vm={ordinalNumber:_l({matchPattern:Nm,parsePattern:Im,valueCallback:n=>parseInt(n,10)}),era:ut({matchPatterns:Fm,defaultMatchWidth:"wide",parsePatterns:Lm,defaultParseWidth:"any"}),quarter:ut({matchPatterns:$m,defaultMatchWidth:"wide",parsePatterns:Am,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ut({matchPatterns:Ym,defaultMatchWidth:"wide",parsePatterns:jm,defaultParseWidth:"any"}),day:ut({matchPatterns:Hm,defaultMatchWidth:"wide",parsePatterns:Wm,defaultParseWidth:"any"}),dayPeriod:ut({matchPatterns:Rm,defaultMatchWidth:"any",parsePatterns:Bm,defaultParseWidth:"any"})},Ml={code:"en-US",formatDistance:gm,formatLong:wm,formatRelative:Dm,localize:Om,match:Vm,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zm(n,r){const t=K(n,r==null?void 0:r.in);return Dn(t,Gr(t))+1}function Ca(n,r){const t=K(n,r==null?void 0:r.in),e=+xn(t)-+cm(t);return Math.round(e/gl)+1}function _a(n,r){var u,f,h,p;const t=K(n,r==null?void 0:r.in),e=t.getFullYear(),o=Xt(),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??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=ge((r==null?void 0:r.in)||n,0);i.setFullYear(e+1,0,a),i.setHours(0,0,0,0);const s=yt(i,r),l=ge((r==null?void 0:r.in)||n,0);l.setFullYear(e,0,a),l.setHours(0,0,0,0);const d=yt(l,r);return+t>=+s?e+1:+t>=+d?e:e-1}function Um(n,r){var s,l,d,u;const t=Xt(),e=(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=(d=t.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=_a(n,r),a=ge((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,e),a.setHours(0,0,0,0),yt(a,r)}function Ol(n,r){const t=K(n,r==null?void 0:r.in),e=+yt(t,r)-+Um(t,r);return Math.round(e/gl)+1}function be(n,r){const t=n<0?"-":"",e=Math.abs(n).toString().padStart(r,"0");return t+e}const Ft={y(n,r){const t=n.getFullYear(),e=t>0?t:1-t;return be(r==="yy"?e%100:e,r.length)},M(n,r){const t=n.getMonth();return r==="M"?String(t+1):be(t+1,2)},d(n,r){return be(n.getDate(),r.length)},a(n,r){const t=n.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(n,r){return be(n.getHours()%12||12,r.length)},H(n,r){return be(n.getHours(),r.length)},m(n,r){return be(n.getMinutes(),r.length)},s(n,r){return be(n.getSeconds(),r.length)},S(n,r){const t=r.length,e=n.getMilliseconds(),o=Math.trunc(e*Math.pow(10,t-3));return be(o,r.length)}},kn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pl={G:function(n,r,t){const e=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"});case"GGGGG":return t.era(e,{width:"narrow"});case"GGGG":default:return t.era(e,{width:"wide"})}},y:function(n,r,t){if(r==="yo"){const e=n.getFullYear(),o=e>0?e:1-e;return t.ordinalNumber(o,{unit:"year"})}return Ft.y(n,r)},Y:function(n,r,t,e){const o=_a(n,e),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return be(i,2)}return r==="Yo"?t.ordinalNumber(a,{unit:"year"}):be(a,r.length)},R:function(n,r){const t=yl(n);return be(t,r.length)},u:function(n,r){const t=n.getFullYear();return be(t,r.length)},Q:function(n,r,t){const e=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(e);case"QQ":return be(e,2);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,r,t){const e=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(e);case"qq":return be(e,2);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,r,t){const e=n.getMonth();switch(r){case"M":case"MM":return Ft.M(n,r);case"Mo":return t.ordinalNumber(e+1,{unit:"month"});case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(e,{width:"wide",context:"formatting"})}},L:function(n,r,t){const e=n.getMonth();switch(r){case"L":return String(e+1);case"LL":return be(e+1,2);case"Lo":return t.ordinalNumber(e+1,{unit:"month"});case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(e,{width:"wide",context:"standalone"})}},w:function(n,r,t,e){const o=Ol(n,e);return r==="wo"?t.ordinalNumber(o,{unit:"week"}):be(o,r.length)},I:function(n,r,t){const e=Ca(n);return r==="Io"?t.ordinalNumber(e,{unit:"week"}):be(e,r.length)},d:function(n,r,t){return r==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Ft.d(n,r)},D:function(n,r,t){const e=zm(n);return r==="Do"?t.ordinalNumber(e,{unit:"dayOfYear"}):be(e,r.length)},E:function(n,r,t){const e=n.getDay();switch(r){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"});case"EEEE":default:return t.day(e,{width:"wide",context:"formatting"})}},e:function(n,r,t,e){const o=n.getDay(),a=(o-e.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return be(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(n,r,t,e){const o=n.getDay(),a=(o-e.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return be(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(n,r,t){const e=n.getDay(),o=e===0?7:e;switch(r){case"i":return String(o);case"ii":return be(o,r.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(e,{width:"short",context:"formatting"});case"iiii":default:return t.day(e,{width:"wide",context:"formatting"})}},a:function(n,r,t){const o=n.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(n,r,t){const e=n.getHours();let o;switch(e===12?o=kn.noon:e===0?o=kn.midnight:o=e/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(n,r,t){const e=n.getHours();let o;switch(e>=17?o=kn.evening:e>=12?o=kn.afternoon:e>=4?o=kn.morning:o=kn.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(n,r,t){if(r==="ho"){let e=n.getHours()%12;return e===0&&(e=12),t.ordinalNumber(e,{unit:"hour"})}return Ft.h(n,r)},H:function(n,r,t){return r==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Ft.H(n,r)},K:function(n,r,t){const e=n.getHours()%12;return r==="Ko"?t.ordinalNumber(e,{unit:"hour"}):be(e,r.length)},k:function(n,r,t){let e=n.getHours();return e===0&&(e=24),r==="ko"?t.ordinalNumber(e,{unit:"hour"}):be(e,r.length)},m:function(n,r,t){return r==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ft.m(n,r)},s:function(n,r,t){return r==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Ft.s(n,r)},S:function(n,r){return Ft.S(n,r)},X:function(n,r,t){const e=n.getTimezoneOffset();if(e===0)return"Z";switch(r){case"X":return Nl(e);case"XXXX":case"XX":return en(e);case"XXXXX":case"XXX":default:return en(e,":")}},x:function(n,r,t){const e=n.getTimezoneOffset();switch(r){case"x":return Nl(e);case"xxxx":case"xx":return en(e);case"xxxxx":case"xxx":default:return en(e,":")}},O:function(n,r,t){const e=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Tl(e,":");case"OOOO":default:return"GMT"+en(e,":")}},z:function(n,r,t){const e=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Tl(e,":");case"zzzz":default:return"GMT"+en(e,":")}},t:function(n,r,t){const e=Math.trunc(+n/1e3);return be(e,r.length)},T:function(n,r,t){return be(+n,r.length)}};function Tl(n,r=""){const t=n>0?"-":"+",e=Math.abs(n),o=Math.trunc(e/60),a=e%60;return a===0?t+String(o):t+String(o)+r+be(a,2)}function Nl(n,r){return n%60===0?(n>0?"-":"+")+be(Math.abs(n)/60,2):en(n,r)}function en(n,r=""){const t=n>0?"-":"+",e=Math.abs(n),o=be(Math.trunc(e/60),2),a=be(e%60,2);return t+o+r+a}const Il=(n,r)=>{switch(n){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"})}},Fl=(n,r)=>{switch(n){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"})}},Ma={p:Fl,P:(n,r)=>{const t=n.match(/(P+)(p+)?/)||[],e=t[1],o=t[2];if(!o)return Il(n,r);let a;switch(e){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}}",Il(e,r)).replace("{{time}}",Fl(o,r))}},Qm=/^D+$/,Km=/^Y+$/,qm=["D","DD","YY","YYYY"];function Gm(n){return Qm.test(n)}function Xm(n){return Km.test(n)}function Jm(n,r,t){const e=Zm(n,r,t);if(console.warn(e),qm.includes(n))throw new RangeError(e)}function Zm(n,r,t){const e=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${e} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const eg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ng=/^'([^]*?)'?$/,rg=/''/g,og=/[a-zA-Z]/;function Ll(n,r,t){var u,f,h,p,m,g,b,y;const e=Xt(),o=(t==null?void 0:t.locale)??e.locale??Ml,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)??e.firstWeekContainsDate??((p=(h=e.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=(t==null?void 0:t.weekStartsOn)??((g=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??e.weekStartsOn??((y=(b=e.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,s=K(n,t==null?void 0:t.in);if(!Ur(s))throw new RangeError("Invalid time value");let l=r.match(tg).map(x=>{const w=x[0];if(w==="p"||w==="P"){const E=Ma[w];return E(x,o.formatLong)}return x}).join("").match(eg).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:ag(x)};if(Pl[w])return{isToken:!0,value:x};if(w.match(og))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 d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const w=x.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&Xm(w)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&Gm(w))&&Jm(w,r,String(n));const E=Pl[w[0]];return E(s,w,o.localize,d)}).join("")}function ag(n){const r=n.match(ng);return r?r[1].replace(rg,"'"):n}function $l(n,r){return K(n,r==null?void 0:r.in).getDate()}function ig(n,r){return K(n,r==null?void 0:r.in).getDay()}function sg(n,r){const t=K(n,r==null?void 0:r.in),e=t.getFullYear(),o=t.getMonth(),a=ge(t,0);return a.setFullYear(e,o+1,0),a.setHours(0,0,0,0),a.getDate()}function lg(){return Object.assign({},Xt())}function Et(n,r){return K(n,r==null?void 0:r.in).getHours()}function ug(n,r){const t=K(n,r==null?void 0:r.in).getDay();return t===0?7:t}function kt(n,r){return K(n,r==null?void 0:r.in).getMinutes()}function Be(n,r){return K(n,r==null?void 0:r.in).getMonth()}function Lt(n){return K(n).getSeconds()}function Oa(n){return+K(n)}function Z(n,r){return K(n,r==null?void 0:r.in).getFullYear()}function $t(n,r){return+K(n)>+K(r)}function tn(n,r){return+K(n)<+K(r)}function cg(n,r){return+K(n)==+K(r)}function dg(n,r){const t=fg(r)?new r(0):ge(r,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function fg(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const pg=10;class Al{constructor(){B(this,"subPriority",0)}validate(r,t){return!0}}class hg extends Al{constructor(r,t,e,o,a){super(),this.value=r,this.validateValue=t,this.setValue=e,this.priority=o,a&&(this.subPriority=a)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,e){return this.setValue(r,t,this.value,e)}}class mg extends Al{constructor(t,e){super();B(this,"priority",pg);B(this,"subPriority",-1);this.context=t||(o=>ge(e,o))}set(t,e){return e.timestampIsSet?t:ge(t,dg(t,this.context))}}class fe{run(r,t,e,o){const a=this.parse(r,t,e,o);return a?{setter:new hg(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,t,e){return!0}}class gg extends fe{constructor(){super(...arguments);B(this,"priority",140);B(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,o){switch(e){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,e,o){return e.era=o,t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}const Pe={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}/},ct={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 Te(n,r){return n&&{value:r(n.value),rest:n.rest}}function _e(n,r){const t=r.match(n);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function dt(n,r){const t=r.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};const e=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:e*(o*Br+a*Rr+i*sm),rest:r.slice(t[0].length)}}function Yl(n){return _e(Pe.anyDigitsSigned,n)}function Me(n,r){switch(n){case 1:return _e(Pe.singleDigit,r);case 2:return _e(Pe.twoDigits,r);case 3:return _e(Pe.threeDigits,r);case 4:return _e(Pe.fourDigits,r);default:return _e(new RegExp("^\\d{1,"+n+"}"),r)}}function Xr(n,r){switch(n){case 1:return _e(Pe.singleDigitSigned,r);case 2:return _e(Pe.twoDigitsSigned,r);case 3:return _e(Pe.threeDigitsSigned,r);case 4:return _e(Pe.fourDigitsSigned,r);default:return _e(new RegExp("^-?\\d{1,"+n+"}"),r)}}function Pa(n){switch(n){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 jl(n,r){const t=r>0,e=t?r:1-r;let o;if(e<=50)o=n||100;else{const a=e+50,i=Math.trunc(a/100)*100,s=n>=a%100;o=n+i-(s?100:0)}return t?o:1-o}function Hl(n){return n%400===0||n%4===0&&n%100!==0}class bg extends fe{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,o){const a=i=>({year:i,isTwoDigitYear:e==="yy"});switch(e){case"y":return Te(Me(4,t),a);case"yo":return Te(o.ordinalNumber(t,{unit:"year"}),a);default:return Te(Me(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,o){const a=t.getFullYear();if(o.isTwoDigitYear){const s=jl(o.year,a);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in e)||e.era===1?o.year:1-o.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class vg extends fe{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,o){const a=i=>({year:i,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Te(Me(4,t),a);case"Yo":return Te(o.ordinalNumber(t,{unit:"year"}),a);default:return Te(Me(e.length,t),a)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,o,a){const i=_a(t,a);if(o.isTwoDigitYear){const l=jl(o.year,i);return t.setFullYear(l,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),yt(t,a)}const s=!("era"in e)||e.era===1?o.year:1-o.year;return t.setFullYear(s,0,a.firstWeekContainsDate),t.setHours(0,0,0,0),yt(t,a)}}class yg extends fe{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return Xr(e==="R"?4:e.length,t)}set(t,e,o){const a=ge(t,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),xn(a)}}class wg extends fe{constructor(){super(...arguments);B(this,"priority",130);B(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return Xr(e==="u"?4:e.length,t)}set(t,e,o){return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class xg extends fe{constructor(){super(...arguments);B(this,"priority",120);B(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,o){switch(e){case"Q":case"QQ":return Me(e.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,e){return e>=1&&e<=4}set(t,e,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class Dg extends fe{constructor(){super(...arguments);B(this,"priority",120);B(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,o){switch(e){case"q":case"qq":return Me(e.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,e){return e>=1&&e<=4}set(t,e,o){return t.setMonth((o-1)*3,1),t.setHours(0,0,0,0),t}}class Eg extends fe{constructor(){super(...arguments);B(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);B(this,"priority",110)}parse(t,e,o){const a=i=>i-1;switch(e){case"M":return Te(_e(Pe.month,t),a);case"MM":return Te(Me(2,t),a);case"Mo":return Te(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,e){return e>=0&&e<=11}set(t,e,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}class kg extends fe{constructor(){super(...arguments);B(this,"priority",110);B(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,o){const a=i=>i-1;switch(e){case"L":return Te(_e(Pe.month,t),a);case"LL":return Te(Me(2,t),a);case"Lo":return Te(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,e){return e>=0&&e<=11}set(t,e,o){return t.setMonth(o,1),t.setHours(0,0,0,0),t}}function Sg(n,r,t){const e=K(n,t==null?void 0:t.in),o=Ol(e,t)-r;return e.setDate(e.getDate()-o*7),K(e,t==null?void 0:t.in)}class Cg extends fe{constructor(){super(...arguments);B(this,"priority",100);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,o){switch(e){case"w":return _e(Pe.week,t);case"wo":return o.ordinalNumber(t,{unit:"week"});default:return Me(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,o,a){return yt(Sg(t,o,a),a)}}function _g(n,r,t){const e=K(n,t==null?void 0:t.in),o=Ca(e,t)-r;return e.setDate(e.getDate()-o*7),e}class Mg extends fe{constructor(){super(...arguments);B(this,"priority",100);B(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,o){switch(e){case"I":return _e(Pe.week,t);case"Io":return o.ordinalNumber(t,{unit:"week"});default:return Me(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,o){return xn(_g(t,o))}}const Og=[31,28,31,30,31,30,31,31,30,31,30,31],Pg=[31,29,31,30,31,30,31,31,30,31,30,31];class Tg extends fe{constructor(){super(...arguments);B(this,"priority",90);B(this,"subPriority",1);B(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,o){switch(e){case"d":return _e(Pe.date,t);case"do":return o.ordinalNumber(t,{unit:"date"});default:return Me(e.length,t)}}validate(t,e){const o=t.getFullYear(),a=Hl(o),i=t.getMonth();return a?e>=1&&e<=Pg[i]:e>=1&&e<=Og[i]}set(t,e,o){return t.setDate(o),t.setHours(0,0,0,0),t}}class Ng extends fe{constructor(){super(...arguments);B(this,"priority",90);B(this,"subpriority",1);B(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,o){switch(e){case"D":case"DD":return _e(Pe.dayOfYear,t);case"Do":return o.ordinalNumber(t,{unit:"date"});default:return Me(e.length,t)}}validate(t,e){const o=t.getFullYear();return Hl(o)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,o){return t.setMonth(0,o),t.setHours(0,0,0,0),t}}function Ta(n,r,t){var f,h,p,m;const e=Xt(),o=(t==null?void 0:t.weekStartsOn)??((h=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??e.weekStartsOn??((m=(p=e.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,a=K(n,t==null?void 0:t.in),i=a.getDay(),l=(r%7+7)%7,d=7-o,u=r<0||r>6?r-(i+d)%7:(l+d)%7-(i+d)%7;return nt(a,u,t)}class Ig extends fe{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,o){switch(e){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,e){return e>=0&&e<=6}set(t,e,o,a){return t=Ta(t,o,a),t.setHours(0,0,0,0),t}}class Fg extends fe{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(e){case"e":case"ee":return Te(Me(e.length,t),i);case"eo":return Te(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,e){return e>=0&&e<=6}set(t,e,o,a){return t=Ta(t,o,a),t.setHours(0,0,0,0),t}}class Lg extends fe{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(e){case"c":case"cc":return Te(Me(e.length,t),i);case"co":return Te(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,e){return e>=0&&e<=6}set(t,e,o,a){return t=Ta(t,o,a),t.setHours(0,0,0,0),t}}function $g(n,r,t){const e=K(n,t==null?void 0:t.in),o=ug(e,t),a=r-o;return nt(e,a,t)}class Ag extends fe{constructor(){super(...arguments);B(this,"priority",90);B(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,o){const a=i=>i===0?7:i;switch(e){case"i":case"ii":return Me(e.length,t);case"io":return o.ordinalNumber(t,{unit:"day"});case"iii":return Te(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 Te(o.day(t,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Te(o.day(t,{width:"short",context:"formatting"})||o.day(t,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Te(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,e){return e>=1&&e<=7}set(t,e,o){return t=$g(t,o),t.setHours(0,0,0,0),t}}class Yg extends fe{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,o){switch(e){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,e,o){return t.setHours(Pa(o),0,0,0),t}}class jg extends fe{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,o){switch(e){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,e,o){return t.setHours(Pa(o),0,0,0),t}}class Hg extends fe{constructor(){super(...arguments);B(this,"priority",80);B(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,o){switch(e){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,e,o){return t.setHours(Pa(o),0,0,0),t}}class Wg extends fe{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,o){switch(e){case"h":return _e(Pe.hour12h,t);case"ho":return o.ordinalNumber(t,{unit:"hour"});default:return Me(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,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 Rg extends fe{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,o){switch(e){case"H":return _e(Pe.hour23h,t);case"Ho":return o.ordinalNumber(t,{unit:"hour"});default:return Me(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,o){return t.setHours(o,0,0,0),t}}class Bg extends fe{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,o){switch(e){case"K":return _e(Pe.hour11h,t);case"Ko":return o.ordinalNumber(t,{unit:"hour"});default:return Me(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,o){return t.getHours()>=12&&o<12?t.setHours(o+12,0,0,0):t.setHours(o,0,0,0),t}}class Vg extends fe{constructor(){super(...arguments);B(this,"priority",70);B(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,o){switch(e){case"k":return _e(Pe.hour24h,t);case"ko":return o.ordinalNumber(t,{unit:"hour"});default:return Me(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,o){const a=o<=24?o%24:o;return t.setHours(a,0,0,0),t}}class zg extends fe{constructor(){super(...arguments);B(this,"priority",60);B(this,"incompatibleTokens",["t","T"])}parse(t,e,o){switch(e){case"m":return _e(Pe.minute,t);case"mo":return o.ordinalNumber(t,{unit:"minute"});default:return Me(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,o){return t.setMinutes(o,0,0),t}}class Ug extends fe{constructor(){super(...arguments);B(this,"priority",50);B(this,"incompatibleTokens",["t","T"])}parse(t,e,o){switch(e){case"s":return _e(Pe.second,t);case"so":return o.ordinalNumber(t,{unit:"second"});default:return Me(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,o){return t.setSeconds(o,0),t}}class Qg extends fe{constructor(){super(...arguments);B(this,"priority",30);B(this,"incompatibleTokens",["t","T"])}parse(t,e){const o=a=>Math.trunc(a*Math.pow(10,-e.length+3));return Te(Me(e.length,t),o)}set(t,e,o){return t.setMilliseconds(o),t}}class Kg extends fe{constructor(){super(...arguments);B(this,"priority",10);B(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return dt(ct.basicOptionalMinutes,t);case"XX":return dt(ct.basic,t);case"XXXX":return dt(ct.basicOptionalSeconds,t);case"XXXXX":return dt(ct.extendedOptionalSeconds,t);case"XXX":default:return dt(ct.extended,t)}}set(t,e,o){return e.timestampIsSet?t:ge(t,t.getTime()-Vr(t)-o)}}class qg extends fe{constructor(){super(...arguments);B(this,"priority",10);B(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return dt(ct.basicOptionalMinutes,t);case"xx":return dt(ct.basic,t);case"xxxx":return dt(ct.basicOptionalSeconds,t);case"xxxxx":return dt(ct.extendedOptionalSeconds,t);case"xxx":default:return dt(ct.extended,t)}}set(t,e,o){return e.timestampIsSet?t:ge(t,t.getTime()-Vr(t)-o)}}class Gg extends fe{constructor(){super(...arguments);B(this,"priority",40);B(this,"incompatibleTokens","*")}parse(t){return Yl(t)}set(t,e,o){return[ge(t,o*1e3),{timestampIsSet:!0}]}}class Xg extends fe{constructor(){super(...arguments);B(this,"priority",20);B(this,"incompatibleTokens","*")}parse(t){return Yl(t)}set(t,e,o){return[ge(t,o),{timestampIsSet:!0}]}}const Jg={G:new gg,y:new bg,Y:new vg,R:new yg,u:new wg,Q:new xg,q:new Dg,M:new Eg,L:new kg,w:new Cg,I:new Mg,d:new Tg,D:new Ng,E:new Ig,e:new Fg,c:new Lg,i:new Ag,a:new Yg,b:new jg,B:new Hg,h:new Wg,H:new Rg,K:new Bg,k:new Vg,m:new zg,s:new Ug,S:new Qg,X:new Kg,x:new qg,t:new Gg,T:new Xg},Zg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tb=/^'([^]*?)'?$/,nb=/''/g,rb=/\S/,ob=/[a-zA-Z]/;function ab(n,r,t,e){var b,y,x,w,E,_,D,k;const o=()=>ge((e==null?void 0:e.in)||t,NaN),a=lg(),i=(e==null?void 0:e.locale)??a.locale??Ml,s=(e==null?void 0:e.firstWeekContainsDate)??((y=(b=e==null?void 0:e.locale)==null?void 0:b.options)==null?void 0:y.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(x=a.locale)==null?void 0:x.options)==null?void 0:w.firstWeekContainsDate)??1,l=(e==null?void 0:e.weekStartsOn)??((_=(E=e==null?void 0:e.locale)==null?void 0:E.options)==null?void 0:_.weekStartsOn)??a.weekStartsOn??((k=(D=a.locale)==null?void 0:D.options)==null?void 0:k.weekStartsOn)??0;if(!r)return n?o():K(t,e==null?void 0:e.in);const d={firstWeekContainsDate:s,weekStartsOn:l,locale:i},u=[new mg(e==null?void 0:e.in,t)],f=r.match(eb).map(S=>{const C=S[0];if(C in Ma){const I=Ma[C];return I(S,i.formatLong)}return S}).join("").match(Zg),h=[];for(let S of f){const C=S[0],I=Jg[C];if(I){const{incompatibleTokens:O}=I;if(Array.isArray(O)){const H=h.find(P=>O.includes(P.token)||P.token===C);if(H)throw new RangeError(`The format string mustn't contain \`${H.fullToken}\` and \`${S}\` at the same time`)}else if(I.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${S}\` and any other token at the same time`);h.push({token:C,fullToken:S});const W=I.run(n,S,i.match,d);if(!W)return o();u.push(W.setter),n=W.rest}else{if(C.match(ob))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");if(S==="''"?S="'":C==="'"&&(S=ib(S)),n.indexOf(S)===0)n=n.slice(S.length);else return o()}}if(n.length>0&&rb.test(n))return o();const p=u.map(S=>S.priority).sort((S,C)=>C-S).filter((S,C,I)=>I.indexOf(S)===C).map(S=>u.filter(C=>C.priority===S).sort((C,I)=>I.subPriority-C.subPriority)).map(S=>S[0]);let m=K(t,e==null?void 0:e.in);if(isNaN(+m))return o();const g={};for(const S of p){if(!S.validate(m,d))return o();const C=S.set(m,g,d);Array.isArray(C)?(m=C[0],Object.assign(g,C[1])):m=C}return m}function ib(n){return n.match(tb)[1].replace(nb,"'")}function sb(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r);return e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()}function lb(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r);return+Sa(e)==+Sa(o)}function ub(n,r,t){const[e,o]=wt(t==null?void 0:t.in,n,r);return e.getFullYear()===o.getFullYear()}function er(n,r,t){const e=+K(n,t==null?void 0:t.in),[o,a]=[+K(r.start,t==null?void 0:t.in),+K(r.end,t==null?void 0:t.in)].sort((i,s)=>i-s);return e>=o&&e<=a}function cb(n,r,t){return nt(n,-1,t)}function db(n,r){const t=()=>ge(r==null?void 0:r.in,NaN),o=mb(n);let a;if(o.date){const d=gb(o.date,2);a=bb(d.restDateString,d.year)}if(!a||isNaN(+a))return t();const i=+a;let s=0,l;if(o.time&&(s=vb(o.time),isNaN(s)))return t();if(o.timezone){if(l=yb(o.timezone),isNaN(l))return t()}else{const d=new Date(i+s),u=K(0,r==null?void 0:r.in);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return K(i+s+l,r==null?void 0:r.in)}const Jr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},fb=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,pb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,hb=/^([+-])(\d{2})(?::?(\d{2}))?$/;function mb(n){const r={},t=n.split(Jr.dateTimeDelimiter);let e;if(t.length>2)return r;if(/:/.test(t[0])?e=t[0]:(r.date=t[0],e=t[1],Jr.timeZoneDelimiter.test(r.date)&&(r.date=n.split(Jr.timeZoneDelimiter)[0],e=n.substr(r.date.length,n.length))),e){const o=Jr.timezone.exec(e);o?(r.time=e.replace(o[1],""),r.timezone=o[1]):r.time=e}return r}function gb(n,r){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),e=n.match(t);if(!e)return{year:NaN,restDateString:""};const o=e[1]?parseInt(e[1]):null,a=e[2]?parseInt(e[2]):null;return{year:a===null?o:a*100,restDateString:n.slice((e[1]||e[2]).length)}}function bb(n,r){if(r===null)return new Date(NaN);const t=n.match(fb);if(!t)return new Date(NaN);const e=!!t[4],o=tr(t[1]),a=tr(t[2])-1,i=tr(t[3]),s=tr(t[4]),l=tr(t[5])-1;if(e)return kb(r,s,l)?wb(r,s,l):new Date(NaN);{const d=new Date(0);return!Db(r,a,i)||!Eb(r,o)?new Date(NaN):(d.setUTCFullYear(r,a,Math.max(o,i)),d)}}function tr(n){return n?parseInt(n):1}function vb(n){const r=n.match(pb);if(!r)return NaN;const t=Na(r[1]),e=Na(r[2]),o=Na(r[3]);return Sb(t,e,o)?t*Br+e*Rr+o*1e3:NaN}function Na(n){return n&&parseFloat(n.replace(",","."))||0}function yb(n){if(n==="Z")return 0;const r=n.match(hb);if(!r)return 0;const t=r[1]==="+"?-1:1,e=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return Cb(e,o)?t*(e*Br+o*Rr):NaN}function wb(n,r,t){const e=new Date(0);e.setUTCFullYear(n,0,4);const o=e.getUTCDay()||7,a=(r-1)*7+t+1-o;return e.setUTCDate(e.getUTCDate()+a),e}const xb=[31,null,31,30,31,30,31,31,30,31,30,31];function Wl(n){return n%400===0||n%4===0&&n%100!==0}function Db(n,r,t){return r>=0&&r<=11&&t>=1&&t<=(xb[r]||(Wl(n)?29:28))}function Eb(n,r){return r>=1&&r<=(Wl(n)?366:365)}function kb(n,r,t){return r>=1&&r<=53&&t>=0&&t<=6}function Sb(n,r,t){return n===24?r===0&&t===0:t>=0&&t<60&&r>=0&&r<60&&n>=0&&n<25}function Cb(n,r){return r>=0&&r<=59}function Ge(n,r,t){const e=K(n,t==null?void 0:t.in),o=e.getFullYear(),a=e.getDate(),i=ge(n,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=sg(i);return e.setMonth(r,Math.min(a,s)),e}function Zr(n,r,t){const e=K(n,t==null?void 0:t.in);return e.setHours(r),e}function eo(n,r,t){const e=K(n,t==null?void 0:t.in);return e.setMinutes(r),e}function Sn(n,r,t){const e=K(n,t==null?void 0:t.in),o=Math.trunc(e.getMonth()/3)+1,a=r-o;return Ge(e,e.getMonth()+a*3)}function to(n,r,t){const e=K(n,t==null?void 0:t.in);return e.setSeconds(r),e}function ft(n,r,t){const e=K(n,t==null?void 0:t.in);return isNaN(+e)?ge(n,NaN):(e.setFullYear(r),e)}function nn(n,r,t){return rt(n,-r,t)}function Rl(n,r,t){return ka(n,-1,t)}function Bl(n,r,t){return zr(n,-1,t)}function Cn(n,r,t){return xt(n,-r,t)}const _b={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},Mb=(n,r,t)=>{let e;const o=_b[n];return typeof o=="string"?e=o:r===1?e=o.one:e=o.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?e+" 후":e+" 전":e},Ob={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},Pb={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Tb={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Nb={date:En({formats:Ob,defaultWidth:"full"}),time:En({formats:Pb,defaultWidth:"full"}),dateTime:En({formats:Tb,defaultWidth:"full"})},Ib={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},Fb=(n,r,t,e)=>Ib[n],Lb={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},$b={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},Ab={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},Yb={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},jb={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Hb={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Wb={ordinalNumber:(n,r)=>{const t=Number(n);switch(String(r==null?void 0:r.unit)){case"minute":case"second":return String(t);case"date":return t+"일";default:return t+"번째"}},era:lt({values:Lb,defaultWidth:"wide"}),quarter:lt({values:$b,defaultWidth:"wide",argumentCallback:n=>n-1}),month:lt({values:Ab,defaultWidth:"wide"}),day:lt({values:Yb,defaultWidth:"wide"}),dayPeriod:lt({values:jb,defaultWidth:"wide",formattingValues:Hb,defaultFormattingWidth:"wide"})},Rb=/^(\d+)(일|번째)?/i,Bb=/\d+/i,Vb={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},zb={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},Ub={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},Qb={any:[/1/i,/2/i,/3/i,/4/i]},Kb={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},qb={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},Gb={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},Xb={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},Jb={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},Zb={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},ev={ordinalNumber:_l({matchPattern:Rb,parsePattern:Bb,valueCallback:n=>parseInt(n,10)}),era:ut({matchPatterns:Vb,defaultMatchWidth:"wide",parsePatterns:zb,defaultParseWidth:"any"}),quarter:ut({matchPatterns:Ub,defaultMatchWidth:"wide",parsePatterns:Qb,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ut({matchPatterns:Kb,defaultMatchWidth:"wide",parsePatterns:qb,defaultParseWidth:"any"}),day:ut({matchPatterns:Gb,defaultMatchWidth:"wide",parsePatterns:Xb,defaultParseWidth:"any"}),dayPeriod:ut({matchPatterns:Jb,defaultMatchWidth:"any",parsePatterns:Zb,defaultParseWidth:"any"})},tv={code:"ko",formatDistance:Mb,formatLong:Nb,formatRelative:Fb,localize:Wb,match:ev,options:{weekStartsOn:0,firstWeekContainsDate:1}},Vl={...L},nv=Vl.useInsertionEffect||(n=>n());function rv(n){const r=L.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return nv(()=>{r.current=n}),L.useCallback(function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return r.current==null?void 0:r.current(...e)},[])}var no=typeof document<"u"?c.useLayoutEffect:c.useEffect;let zl=!1,ov=0;const Ul=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ov++;function av(){const[n,r]=L.useState(()=>zl?Ul():void 0);return no(()=>{n==null&&r(Ul())},[]),L.useEffect(()=>{zl=!0},[]),n}const Ql=Vl.useId||av;let nr;process.env.NODE_ENV!=="production"&&(nr=new Set);function iv(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=nr)!=null&&n.has(o))){var a;(a=nr)==null||a.add(o),console.warn(o)}}function sv(){for(var n,r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];const o="Floating UI: "+t.join(" ");if(!((n=nr)!=null&&n.has(o))){var a;(a=nr)==null||a.add(o),console.error(o)}}const lv=L.forwardRef(function(r,t){const{context:{placement:e,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:d=0,strokeWidth:u=0,staticOffset:f,stroke:h,d:p,style:{transform:m,...g}={},...b}=r;process.env.NODE_ENV!=="production"&&(t||iv("The `ref` prop is required for `FloatingArrow`."));const y=Ql(),[x,w]=L.useState(!1);if(no(()=>{if(!o)return;qe(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[E,_]=e.split("-"),D=E==="top"||E==="bottom";let k=f;(D&&i!=null&&i.x||!D&&i!=null&&i.y)&&(k=null);const S=u*2,C=S/2,I=s/2*(d/-8+1),O=l/2*d/4,W=!!p,H=k&&_==="end"?"bottom":"top";let P=k&&_==="end"?"right":"left";k&&x&&(P=_==="end"?"left":"right");const Y=(a==null?void 0:a.x)!=null?k||a.x:"",N=(a==null?void 0:a.y)!=null?k||a.y:"",V=p||"M0,0"+(" H"+s)+(" L"+(s-I)+","+(l-O))+(" Q"+s/2+","+l+" "+I+","+(l-O))+" Z",A={top:W?"rotate(180deg)":"",left:W?"rotate(90deg)":"rotate(-90deg)",bottom:W?"":"rotate(180deg)",right:W?"rotate(-90deg)":"rotate(90deg)"}[E];return M.jsxs("svg",{...b,"aria-hidden":!0,ref:t,width:W?s:s+S,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[P]:Y,[H]:N,[E]:D||W?"100%":"calc(100% - "+S/2+"px)",transform:[A,m].filter(z=>!!z).join(" "),...g},children:[S>0&&M.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:h,strokeWidth:S+(p?0:1),d:V}),M.jsx("path",{stroke:S&&!p?b.fill:"none",d:V}),M.jsx("clipPath",{id:y,children:M.jsx("rect",{x:-C,y:C*(W?-1:1),width:s+S,height:s})})]})});function uv(){const n=new Map;return{emit(r,t){var e;(e=n.get(r))==null||e.forEach(o=>o(t))},on(r,t){n.set(r,[...n.get(r)||[],t])},off(r,t){var e;n.set(r,((e=n.get(r))==null?void 0:e.filter(o=>o!==t))||[])}}}const cv=L.createContext(null),dv=L.createContext(null),fv=()=>{var n;return((n=L.useContext(cv))==null?void 0:n.id)||null},pv=()=>L.useContext(dv);function hv(n){const{open:r=!1,onOpenChange:t,elements:e}=n,o=Ql(),a=L.useRef({}),[i]=L.useState(()=>uv()),s=fv()!=null;if(process.env.NODE_ENV!=="production"){const p=e.reference;p&&!Oe(p)&&sv("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,d]=L.useState(e.reference),u=rv((p,m,g)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:g,nested:s}),t==null||t(p,m,g)}),f=L.useMemo(()=>({setPositionReference:d}),[]),h=L.useMemo(()=>({reference:l||e.reference||null,floating:e.floating||null,domReference:e.reference}),[l,e.reference,e.floating]);return L.useMemo(()=>({dataRef:a,open:r,onOpenChange:u,elements:h,events:i,floatingId:o,refs:f}),[r,u,h,i,o,f])}function mv(n){n===void 0&&(n={});const{nodeId:r}=n,t=hv({...n,elements:{reference:null,floating:null,...n.elements}}),e=n.rootContext||t,o=e.elements,[a,i]=L.useState(null),[s,l]=L.useState(null),u=(o==null?void 0:o.domReference)||a,f=L.useRef(null),h=pv();no(()=>{u&&(f.current=u)},[u]);const p=bs({...n,elements:{...o,...s&&{reference:s}}}),m=L.useCallback(w=>{const E=Oe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(E),p.refs.setReference(E)},[p.refs]),g=L.useCallback(w=>{(Oe(w)||w===null)&&(f.current=w,i(w)),(Oe(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Oe(w))&&p.refs.setReference(w)},[p.refs]),b=L.useMemo(()=>({...p.refs,setReference:g,setPositionReference:m,domReference:f}),[p.refs,g,m]),y=L.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),x=L.useMemo(()=>({...p,...e,refs:b,elements:y,nodeId:r}),[p,b,y,r,e]);return no(()=>{e.dataRef.current.floatingContext=x;const w=h==null?void 0:h.nodesRef.current.find(E=>E.id===r);w&&(w.context=x)}),L.useMemo(()=>({...p,context:x,refs:b,elements:y}),[p,b,y,x])}/*!
|
|
33
|
-
|
|
28
|
+
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(u=e==null?void 0:e.onChange)==null||u.call(e,o),o}return a.updateDeps=i=>{t=i},a}function Oo(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const yd=(n,r)=>Math.abs(n-r)<1,wd=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},xd=n=>n,Dd=n=>{const r=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),t=[];for(let o=r;o<=e;o++)t.push(o);return t},Ed=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;const o=i=>{const{width:s,height:l}=i;r({width:Math.round(s),height:Math.round(l)})};if(o(e.getBoundingClientRect()),!t.ResizeObserver)return()=>{};const a=new t.ResizeObserver(i=>{const s=()=>{const l=i[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(e.getBoundingClientRect())};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},$i={passive:!0},Ai=typeof window>"u"?!0:"onscrollend"in window,kd=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=n.options.useScrollendEvent&&Ai?()=>{}:wd(t,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:p,isRtl:m}=n.options;o=p?e.scrollLeft*(m&&-1||1):e.scrollTop,a(),r(o,c)},s=i(!0),l=i(!1);l(),e.addEventListener("scroll",s,$i);const u=n.options.useScrollendEvent&&Ai;return u&&e.addEventListener("scrollend",l,$i),()=>{e.removeEventListener("scroll",s),u&&e.removeEventListener("scrollend",l)}},Sd=(n,r,e)=>{if(r!=null&&r.borderBoxSize){const t=r.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[e.options.horizontal?"width":"height"])},Cd=(n,{adjustments:r=0,behavior:e},t)=>{var o,a;const i=n+r;(a=(o=t.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[t.options.horizontal?"left":"top"]:i,behavior:e})};class _d{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const i=()=>{this._measureElement(a.target,a)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var o;(o=t())==null||o.disconnect(),e=null},observe:o=>{var a;return(a=t())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=t())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,o])=>{typeof o>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:xd,rangeExtractor:Dd,onChange:()=>{},measureElement:Sd,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,o;(o=(t=this.options).onChange)==null||o.call(t,this,e)},this.maybeNotify=en(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const o=new Map,a=new Map;for(let i=t-1;i>=0;i--){const s=e[i];if(o.has(s.lane))continue;const l=a.get(s.lane);if(l==null||s.end>l.end?a.set(s.lane,s):s.end<l.end&&o.set(s.lane,!0),o.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((i,s)=>i.end===s.end?i.index-s.index:i.end-s.end)[0]:void 0},this.getMeasurementOptions=en(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,o,a,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i}),{key:!1}),this.getMeasurements=en(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:o,getItemKey:a,enabled:i},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<e;c++){const p=a(c),m=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),f=m?m.end+this.options.gap:t+o,h=s.get(p),v=typeof h=="number"?h:this.options.estimateSize(c),g=f+v,y=m?m.lane:c%this.options.lanes;u[c]={index:c,start:f,size:v,end:g,key:p,lane:y}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=en(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,o,a)=>this.range=e.length>0&&t>0?Md({measurements:e,outerSize:t,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=en(()=>{let e=null,t=null;const o=this.calculateRange();return o&&(e=o.startIndex,t=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,o,a,i)=>a===null||i===null?[]:e({startIndex:a,endIndex:i,overscan:t,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,o=e.getAttribute(t);return o?parseInt(o,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const o=this.indexFromElement(e),a=this.measurementsCache[o];if(!a)return;const i=a.key,s=this.elementsCache.get(i);s!==e&&(s&&this.observer.unobserve(s),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(o,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const o=this.measurementsCache[e];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,i=t-a;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,i,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((t,o)=>{t.isConnected||(this.observer.unobserve(t),this.elementsCache.delete(o))});return}this._measureElement(e,void 0)},this.getVirtualItems=en(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const o=[];for(let a=0,i=e.length;a<i;a++){const s=e[a],l=t[s];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return Oo(t[Yi(0,t.length-1,o=>Oo(t[o]).start,e)])},this.getOffsetForAlignment=(e,t,o=0)=>{const a=this.getSize(),i=this.getScrollOffset();t==="auto"&&(t=e>=i+a?"end":"start"),t==="center"?e+=(o-a)/2:t==="end"&&(e-=a);const s=this.options.horizontal?"scrollWidth":"scrollHeight",u=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-a;return Math.max(Math.min(u,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const o=this.measurementsCache[e];if(!o)return;const a=this.getSize(),i=this.getScrollOffset();if(t==="auto")if(o.end>=i+a-this.options.scrollPaddingEnd)t="end";else if(o.start<=i+this.options.scrollPaddingStart)t="start";else return[i,t];const s=t==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,o.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:o})},this.scrollToIndex=(e,{align:t="auto",behavior:o}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const a=this.getOffsetForIndex(e,t);if(!a)return;const[i,s]=a;this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[u]=Oo(this.getOffsetForIndex(e,s));yd(u,this.getScrollOffset())||this.scrollToIndex(e,{align:s,behavior:o})}else this.scrollToIndex(e,{align:s,behavior:o})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let o;if(t.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((e=t[t.length-1])==null?void 0:e.end)??0;else{const a=Array(this.options.lanes).fill(null);let i=t.length-1;for(;i>=0&&a.some(s=>s===null);){const s=t[i];a[s.lane]===null&&(a[s.lane]=s.end),i--}o=Math.max(...a.filter(s=>s!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:o})=>{this.options.scrollToFn(e,{behavior:o,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(r)}}const Yi=(n,r,e,t)=>{for(;n<=r;){const o=(n+r)/2|0,a=e(o);if(a<t)n=o+1;else if(a>t)r=o-1;else return o}return n>0?n-1:0};function Md({measurements:n,outerSize:r,scrollOffset:e,lanes:t}){const o=n.length-1,a=l=>n[l].start;if(n.length<=t)return{startIndex:0,endIndex:o};let i=Yi(0,o,a,e),s=i;if(t===1)for(;s<o&&n[s].end<e+r;)s++;else if(t>1){const l=Array(t).fill(0);for(;s<o&&l.some(c=>c<e+r);){const c=n[s];l[c.lane]=c.end,s++}const u=Array(t).fill(e+r);for(;i>=0&&u.some(c=>c>=e);){const c=n[i];u[c.lane]=c.start,i--}i=Math.max(0,i-i%t),s=Math.min(o,s+(t-1-s%t))}return{startIndex:i,endIndex:s}}const Wi=typeof document<"u"?I.useLayoutEffect:I.useEffect;function Od(n){const r=I.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?be.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=I.useState(()=>new _d(e));return t.setOptions(e),Wi(()=>t._didMount(),[]),Wi(()=>t._willUpdate()),t}function Td(n){return Od({observeElementRect:Ed,observeElementOffset:kd,scrollToFn:Cd,...n})}function Pd(n,r){return n!==null&&r!==null&&typeof n=="object"&&typeof r=="object"&&"id"in n&&"id"in r?n.id===r.id:n===r}function ji(n=Pd){return d.useCallback((r,e)=>{if(typeof n=="string"){let t=n;return(r==null?void 0:r[t])===(e==null?void 0:e[t])}return n(r,e)},[n])}function Nd(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function To(n,r=!1){let[e,t]=d.useReducer(()=>({}),{}),o=d.useMemo(()=>Nd(n),[n,e]);return ie(()=>{if(!n)return;let a=new ResizeObserver(t);return a.observe(n),()=>{a.disconnect()}},[n]),r?{width:`${o.width}px`,height:`${o.height}px`}:o}let Hi=class extends Map{constructor(r){super(),this.factory=r}get(r){let e=super.get(r);return e===void 0&&(e=this.factory(r),this.set(r,e)),e}};function Ri(n,r){let e=n(),t=new Set;return{getSnapshot(){return e},subscribe(o){return t.add(o),()=>t.delete(o)},dispatch(o,...a){let i=r[o].call(e,...a);i&&(e=i,t.forEach(s=>s()))}}}function Bi(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}let Id=new Hi(()=>Ri(()=>[],{ADD(n){return this.includes(n)?this:[...this,n]},REMOVE(n){let r=this.indexOf(n);if(r===-1)return this;let e=this.slice();return e.splice(r,1),e}}));function tn(n,r){let e=Id.get(r),t=d.useId(),o=Bi(e);if(ie(()=>{if(n)return e.dispatch("ADD",t),()=>e.dispatch("REMOVE",t)},[e,n]),!n)return!1;let a=o.indexOf(t),i=o.length;return a===-1&&(a=i,i+=1),a===i-1}let Po=new Map,Mn=new Map;function Vi(n){var r;let e=(r=Mn.get(n))!=null?r:0;return Mn.set(n,e+1),e!==0?()=>zi(n):(Po.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>zi(n))}function zi(n){var r;let e=(r=Mn.get(n))!=null?r:1;if(e===1?Mn.delete(n):Mn.set(n,e-1),e!==1)return;let t=Po.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,Po.delete(n))}function No(n,{allowed:r,disallowed:e}={}){let t=tn(n,"inert-others");ie(()=>{var o,a;if(!t)return;let i=Re();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(Vi(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let u=At(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let p of c.children)s.some(m=>p.contains(m))||i.add(Vi(p));c=c.parentElement}}return i.dispose},[t,r,e])}function Io(n,r,e){let t=st(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&e()});d.useEffect(()=>{if(!n)return;let o=r===null?null:r instanceof HTMLElement?r:r.current;if(!o)return;let a=Re();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,n])}let mr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(n=>`${n}:not([tabindex='-1'])`).join(","),Fd=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var Be=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n[n.AutoFocus=64]="AutoFocus",n))(Be||{}),Fo=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(Fo||{}),Ld=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Ld||{});function Ui(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(mr)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function $d(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Fd)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var Lo=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(Lo||{});function Qi(n,r=0){var e;return n===((e=At(n))==null?void 0:e.body)?!1:Se(r,{0(){return n.matches(mr)},1(){let t=n;for(;t!==null;){if(t.matches(mr))return!0;t=t.parentElement}return!1}})}var Ad=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Ad||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",n=>{n.metaKey||n.altKey||n.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",n=>{n.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:n.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function lt(n){n==null||n.focus({preventScroll:!0})}let Yd=["textarea","input"].join(",");function Wd(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,Yd))!=null?e:!1}function $o(n,r=e=>e){return n.slice().sort((e,t)=>{let o=r(e),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 jd(n,r){return nn(Ui(),r,{relativeTo:n})}function nn(n,r,{sorted:e=!0,relativeTo:t=null,skipElements:o=[]}={}){let a=Array.isArray(n)?n.length>0?n[0].ownerDocument:document:n.ownerDocument,i=Array.isArray(n)?e?$o(n):n:r&64?$d(n):Ui(n);o.length>0&&i.length>1&&(i=i.filter(f=>!o.some(h=>h!=null&&"current"in h?(h==null?void 0:h.current)===f:h===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")})(),u=r&32?{preventScroll:!0}:{},c=0,p=i.length,m;do{if(c>=p||c+p<=0)return 0;let f=l+c;if(r&16)f=(f+p)%p;else{if(f<0)return 3;if(f>=p)return 1}m=i[f],m==null||m.focus(u),c+=s}while(m!==a.activeElement);return r&6&&Wd(m)&&m.select(),2}function Ki(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Hd(){return/Android/gi.test(window.navigator.userAgent)}function qi(){return Ki()||Hd()}function On(n,r,e,t){let o=st(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return document.addEventListener(r,a,t),()=>document.removeEventListener(r,a,t)},[n,r,t])}function Gi(n,r,e,t){let o=st(e);d.useEffect(()=>{if(!n)return;function a(i){o.current(i)}return window.addEventListener(r,a,t),()=>window.removeEventListener(r,a,t)},[n,r,t])}const Xi=30;function Ao(n,r,e){let t=tn(n,"outside-click"),o=st(e),a=d.useCallback(function(l,u){if(l.defaultPrevented)return;let c=u(l);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let p=function m(f){return typeof f=="function"?m(f()):Array.isArray(f)||f instanceof Set?f:[f]}(r);for(let m of p)if(m!==null&&(m.contains(c)||l.composed&&l.composedPath().includes(m)))return;return!Qi(c,Lo.Loose)&&c.tabIndex!==-1&&l.preventDefault(),o.current(l,c)},[o,r]),i=d.useRef(null);On(t,"pointerdown",l=>{var u,c;i.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),On(t,"mousedown",l=>{var u,c;i.current=((c=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:c[0])||l.target},!0),On(t,"click",l=>{qi()||i.current&&(a(l,()=>i.current),i.current=null)},!0);let s=d.useRef({x:0,y:0});On(t,"touchstart",l=>{s.current.x=l.touches[0].clientX,s.current.y=l.touches[0].clientY},!0),On(t,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-s.current.x)>=Xi||Math.abs(u.y-s.current.y)>=Xi))return a(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),Gi(t,"blur",l=>a(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function ut(...n){return d.useMemo(()=>At(...n),[...n])}function Yo(n,r,e,t){let o=st(e);d.useEffect(()=>{n=n??window;function a(i){o.current(i)}return n.addEventListener(r,a,t),()=>n.removeEventListener(r,a,t)},[n,r,t])}function Ji(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Yo(n,"blur",e=>{let t=e.target;t instanceof HTMLInputElement&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),B(()=>{if(document.activeElement!==n&&n instanceof HTMLInputElement&&n.isConnected){if(n.focus({preventScroll:!0}),n.value!==r.current.value)n.setSelectionRange(n.value.length,n.value.length);else{let{selectionStart:e,selectionEnd:t}=r.current;e!==null&&t!==null&&n.setSelectionRange(e,t)}r.current={value:"",selectionStart:null,selectionEnd:null}}})}function Zi(n,r){return d.useMemo(()=>{var e;if(n.type)return n.type;let t=(e=n.as)!=null?e:"button";if(typeof t=="string"&&t.toLowerCase()==="button"||(r==null?void 0:r.tagName)==="BUTTON"&&!r.hasAttribute("type"))return"button"},[n.type,n.as,r])}function Rd(){let n;return{before({doc:r}){var e;let t=r.documentElement,o=(e=r.defaultView)!=null?e:window;n=Math.max(0,o.innerWidth-t.clientWidth)},after({doc:r,d:e}){let t=r.documentElement,o=Math.max(0,t.clientWidth-t.offsetWidth),a=Math.max(0,n-o);e.style(t,"paddingRight",`${a}px`)}}}function Bd(){return Ki()?{before({doc:n,d:r,meta:e}){function t(o){return e.containers.flatMap(a=>a()).some(a=>a.contains(o))}r.microTask(()=>{var o;if(window.getComputedStyle(n.documentElement).scrollBehavior!=="auto"){let s=Re();s.style(n.documentElement,"scrollBehavior","auto"),r.add(()=>r.microTask(()=>s.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,i=null;r.addEventListener(n,"click",s=>{if(s.target instanceof HTMLElement)try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);c&&!t(c)&&(i=c)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(s.target instanceof HTMLElement)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(n,"touchmove",s=>{if(s.target instanceof HTMLElement){if(s.target.tagName==="INPUT")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 Vd(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function zd(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let Yt=Ri(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:Re(),meta:new Set};return t.count++,t.meta.add(r),this.set(n,t),this},POP(n,r){let e=this.get(n);return e&&(e.count--,e.meta.delete(r)),this},SCROLL_PREVENT({doc:n,d:r,meta:e}){let t={doc:n,d:r,meta:zd(e)},o=[Bd(),Rd(),Vd()];o.forEach(({before:a})=>a==null?void 0:a(t)),o.forEach(({after:a})=>a==null?void 0:a(t))},SCROLL_ALLOW({d:n}){n.dispose()},TEARDOWN({doc:n}){this.delete(n)}});Yt.subscribe(()=>{let n=Yt.getSnapshot(),r=new Map;for(let[e]of n)r.set(e,e.documentElement.style.overflow);for(let e of n.values()){let t=r.get(e.doc)==="hidden",o=e.count!==0;(o&&!t||!o&&t)&&Yt.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&Yt.dispatch("TEARDOWN",e)}});function Ud(n,r,e=()=>({containers:[]})){let t=Bi(Yt),o=r?t.get(r):void 0,a=o?o.count>0:!1;return ie(()=>{if(!(!r||!n))return Yt.dispatch("PUSH",r,e),()=>Yt.dispatch("POP",r,e)},[n,r]),a}function Wo(n,r,e=()=>[document.body]){let t=tn(n,"scroll-lock");Ud(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function es(n){return[n.screenX,n.screenY]}function ts(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=es(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=es(r)}}}function Qd(n=0){let[r,e]=d.useState(n),t=d.useCallback(l=>e(l),[r]),o=d.useCallback(l=>e(u=>u|l),[r]),a=d.useCallback(l=>(r&l)===l,[r]),i=d.useCallback(l=>e(u=>u&~l),[e]),s=d.useCallback(l=>e(u=>u^l),[e]);return{flags:r,setFlag:t,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}var ns,rs;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((ns=process==null?void 0:process.env)==null?void 0:ns.NODE_ENV)==="test"&&typeof((rs=Element==null?void 0:Element.prototype)==null?void 0:rs.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(`
|
|
29
|
+
`)),[]});var Kd=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(Kd||{});function jo(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function Ho(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=Qd(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),p=xt();return ie(()=>{var m;if(n){if(e&&a(!0),!r){e&&s(3);return}return(m=t==null?void 0:t.start)==null||m.call(t,e),qd(r,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(e?(s(3),l(4)):(s(4),l(2)))},run(){c.current?e?(l(3),s(4)):(l(4),s(3)):e?l(1):s(1)},done(){var f;c.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(u.current=!1,l(7),e||a(!1),(f=t==null?void 0:t.end)==null||f.call(t,e))}})}},[n,e,r,p]),n?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[e,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function qd(n,{prepare:r,run:e,done:t,inFlight:o}){let a=Re();return Xd(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(Gd(n,t))})}),a.dispose}function Gd(n,r){var e,t;let o=Re();if(!n)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=(t=(e=n.getAnimations)==null?void 0:e.call(n).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 Xd(n,{inFlight:r,prepare:e}){if(r!=null&&r.current){e();return}let t=n.style.transition;n.style.transition="none",e(),n.offsetHeight,n.style.transition=t}function Jd(n,{container:r,accept:e,walk:t}){let o=d.useRef(e),a=d.useRef(t);d.useEffect(()=>{o.current=e,a.current=t},[e,t]),ie(()=>{if(!r||!n)return;let i=At(r);if(!i)return;let s=o.current,l=a.current,u=Object.assign(p=>s(p),{acceptNode:s}),c=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[r,n,o,a])}function Tn(n,r){let e=d.useRef([]),t=B(n);d.useEffect(()=>{let o=[...e.current];for(let[a,i]of r.entries())if(e.current[a]!==i){let s=t(r,o);return e.current=r,s}},[t,...r])}function hr(){return typeof window<"u"}function rn(n){return os(n)?(n.nodeName||"").toLowerCase():"#document"}function Le(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function Qe(n){var r;return(r=(os(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function os(n){return hr()?n instanceof Node||n instanceof Le(n).Node:!1}function De(n){return hr()?n instanceof Element||n instanceof Le(n).Element:!1}function Ke(n){return hr()?n instanceof HTMLElement||n instanceof Le(n).HTMLElement:!1}function as(n){return!hr()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Le(n).ShadowRoot}function Pn(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=Ye(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!["inline","contents"].includes(o)}function Zd(n){return["table","td","th"].includes(rn(n))}function vr(n){return[":popover-open",":modal"].some(r=>{try{return n.matches(r)}catch{return!1}})}function Ro(n){const r=Bo(),e=De(n)?Ye(n):n;return["transform","translate","scale","rotate","perspective"].some(t=>e[t]?e[t]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!r&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!r&&(e.filter?e.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(t=>(e.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(e.contain||"").includes(t))}function ef(n){let r=St(n);for(;Ke(r)&&!on(r);){if(Ro(r))return r;if(vr(r))return null;r=St(r)}return null}function Bo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function on(n){return["html","body","#document"].includes(rn(n))}function Ye(n){return Le(n).getComputedStyle(n)}function gr(n){return De(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function St(n){if(rn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||as(n)&&n.host||Qe(n);return as(r)?r.host:r}function is(n){const r=St(n);return on(r)?n.ownerDocument?n.ownerDocument.body:n.body:Ke(r)&&Pn(r)?r:is(r)}function Nn(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=is(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=Le(o);if(a){const s=Vo(i);return r.concat(i,i.visualViewport||[],Pn(o)?o:[],s&&e?Nn(s):[])}return r.concat(o,Nn(o,[],e))}function Vo(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function tf(){const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(r=>{let{brand:e,version:t}=r;return e+"/"+t}).join(" "):navigator.userAgent}const ct=Math.min,Ne=Math.max,In=Math.round,br=Math.floor,qe=n=>({x:n,y:n}),nf={left:"right",right:"left",bottom:"top",top:"bottom"},rf={start:"end",end:"start"};function zo(n,r,e){return Ne(n,ct(r,e))}function Wt(n,r){return typeof n=="function"?n(r):n}function Ct(n){return n.split("-")[0]}function an(n){return n.split("-")[1]}function ss(n){return n==="x"?"y":"x"}function Uo(n){return n==="y"?"height":"width"}function jt(n){return["top","bottom"].includes(Ct(n))?"y":"x"}function Qo(n){return ss(jt(n))}function of(n,r,e){e===void 0&&(e=!1);const t=an(n),o=Qo(n),a=Uo(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=yr(i)),[i,yr(i)]}function af(n){const r=yr(n);return[Ko(n),r,Ko(r)]}function Ko(n){return n.replace(/start|end/g,r=>rf[r])}function sf(n,r,e){const t=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(n){case"top":case"bottom":return e?r?o:t:r?t:o;case"left":case"right":return r?a:i;default:return[]}}function lf(n,r,e,t){const o=an(n);let a=sf(Ct(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(Ko)))),a}function yr(n){return n.replace(/left|right|bottom|top/g,r=>nf[r])}function uf(n){return{top:0,right:0,bottom:0,left:0,...n}}function ls(n){return typeof n!="number"?uf(n):{top:n,right:n,bottom:n,left:n}}function wr(n){const{x:r,y:e,width:t,height:o}=n;return{width:t,height:o,top:e,left:r,right:r+t,bottom:e+o,x:r,y:e}}function us(n,r,e){let{reference:t,floating:o}=n;const a=jt(r),i=Qo(r),s=Uo(i),l=Ct(r),u=a==="y",c=t.x+t.width/2-o.width/2,p=t.y+t.height/2-o.height/2,m=t[s]/2-o[s]/2;let f;switch(l){case"top":f={x:c,y:t.y-o.height};break;case"bottom":f={x:c,y:t.y+t.height};break;case"right":f={x:t.x+t.width,y:p};break;case"left":f={x:t.x-o.width,y:p};break;default:f={x:t.x,y:t.y}}switch(an(r)){case"start":f[i]-=m*(e&&u?-1:1);break;case"end":f[i]+=m*(e&&u?-1:1);break}return f}const cf=async(n,r,e)=>{const{placement:t="bottom",strategy:o="absolute",middleware:a=[],platform:i}=e,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(r));let u=await i.getElementRects({reference:n,floating:r,strategy:o}),{x:c,y:p}=us(u,t,l),m=t,f={},h=0;for(let v=0;v<s.length;v++){const{name:g,fn:y}=s[v],{x:w,y:b,data:D,reset:E}=await y({x:c,y:p,initialPlacement:t,placement:m,strategy:o,middlewareData:f,rects:u,platform:i,elements:{reference:n,floating:r}});c=w??c,p=b??p,f={...f,[g]:{...f[g],...D}},E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):E.rects),{x:c,y:p}=us(u,m,l)),v=-1)}return{x:c,y:p,placement:m,strategy:o,middlewareData:f}};async function xr(n,r){var e;r===void 0&&(r={});const{x:t,y:o,platform:a,rects:i,elements:s,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:m=!1,padding:f=0}=Wt(r,n),h=ls(f),g=s[m?p==="floating"?"reference":"floating":p],y=wr(await a.getClippingRect({element:(e=await(a.isElement==null?void 0:a.isElement(g)))==null||e?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),w=p==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),D=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},E=wr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:b,strategy:l}):w);return{top:(y.top-E.top+h.top)/D.y,bottom:(E.bottom-y.bottom+h.bottom)/D.y,left:(y.left-E.left+h.left)/D.x,right:(E.right-y.right+h.right)/D.x}}const df=n=>({name:"arrow",options:n,async fn(r){const{x:e,y:t,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=r,{element:u,padding:c=0}=Wt(n,r)||{};if(u==null)return{};const p=ls(c),m={x:e,y:t},f=Qo(o),h=Uo(f),v=await i.getDimensions(u),g=f==="y",y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",D=a.reference[h]+a.reference[f]-m[f]-a.floating[h],E=m[f]-a.reference[f],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=C?C[b]:0;(!S||!await(i.isElement==null?void 0:i.isElement(C)))&&(S=s.floating[b]||a.floating[h]);const x=D/2-E/2,_=S/2-v[h]/2-1,M=ct(p[y],_),P=ct(p[w],_),Y=M,H=S-v[h]-P,N=S/2-v[h]/2+x,L=zo(Y,N,H),$=!l.arrow&&an(o)!=null&&N!==L&&a.reference[h]/2-(N<Y?M:P)-v[h]/2<0,V=$?N<Y?N-Y:N-H:0;return{[f]:m[f]+V,data:{[f]:L,centerOffset:N-L-V,...$&&{alignmentOffset:V}},reset:$}}}),ff=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var e,t;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=r,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...g}=Wt(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=Ct(o),w=jt(s),b=Ct(s)===s,D=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=m||(b||!v?[yr(s)]:af(s)),C=h!=="none";!m&&C&&E.push(...lf(s,v,h,D));const S=[s,...E],x=await xr(r,g),_=[];let M=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&_.push(x[y]),p){const N=of(o,i,D);_.push(x[N[0]],x[N[1]])}if(M=[...M,{placement:o,overflows:_}],!_.every(N=>N<=0)){var P,Y;const N=(((P=a.flip)==null?void 0:P.index)||0)+1,L=S[N];if(L)return{data:{index:N,overflows:M},reset:{placement:L}};let $=(Y=M.filter(V=>V.overflows[0]<=0).sort((V,T)=>V.overflows[1]-T.overflows[1])[0])==null?void 0:Y.placement;if(!$)switch(f){case"bestFit":{var H;const V=(H=M.filter(T=>{if(C){const q=jt(T.placement);return q===w||q==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(q=>q>0).reduce((q,k)=>q+k,0)]).sort((T,q)=>T[1]-q[1])[0])==null?void 0:H[0];V&&($=V);break}case"initialPlacement":$=s;break}if(o!==$)return{reset:{placement:$}}}return{}}}};async function pf(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=Ct(e),s=an(e),l=jt(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,p=Wt(r,n);let{mainAxis:m,crossAxis:f,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),l?{x:f*c,y:m*u}:{x:m*u,y:f*c}}const mf=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var e,t;const{x:o,y:a,placement:i,middlewareData:s}=r,l=await pf(r,n);return i===((e=s.offset)==null?void 0:e.placement)&&(t=s.arrow)!=null&&t.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},hf=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:e,y:t,placement:o}=r,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:g=>{let{x:y,y:w}=g;return{x:y,y:w}}},...l}=Wt(n,r),u={x:e,y:t},c=await xr(r,l),p=jt(Ct(o)),m=ss(p);let f=u[m],h=u[p];if(a){const g=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=f+c[g],b=f-c[y];f=zo(w,f,b)}if(i){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=h+c[g],b=h-c[y];h=zo(w,h,b)}const v=s.fn({...r,[m]:f,[p]:h});return{...v,data:{x:v.x-e,y:v.y-t,enabled:{[m]:a,[p]:i}}}}}},vf=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var e,t;const{placement:o,rects:a,platform:i,elements:s}=r,{apply:l=()=>{},...u}=Wt(n,r),c=await xr(r,u),p=Ct(o),m=an(o),f=jt(o)==="y",{width:h,height:v}=a.floating;let g,y;p==="top"||p==="bottom"?(g=p,y=m===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=p,g=m==="end"?"top":"bottom");const w=v-c.top-c.bottom,b=h-c.left-c.right,D=ct(v-c[g],w),E=ct(h-c[y],b),C=!r.middlewareData.shift;let S=D,x=E;if((e=r.middlewareData.shift)!=null&&e.enabled.x&&(x=b),(t=r.middlewareData.shift)!=null&&t.enabled.y&&(S=w),C&&!m){const M=Ne(c.left,0),P=Ne(c.right,0),Y=Ne(c.top,0),H=Ne(c.bottom,0);f?x=h-2*(M!==0||P!==0?M+P:Ne(c.left,c.right)):S=v-2*(Y!==0||H!==0?Y+H:Ne(c.top,c.bottom))}await l({...r,availableWidth:x,availableHeight:S});const _=await i.getDimensions(s.floating);return h!==_.width||v!==_.height?{reset:{rects:!0}}:{}}}};function cs(n){const r=Ye(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Ke(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=In(e)!==a||In(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function qo(n){return De(n)?n:n.contextElement}function sn(n){const r=qo(n);if(!Ke(r))return qe(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=cs(r);let i=(a?In(e.width):e.width)/t,s=(a?In(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const gf=qe(0);function ds(n){const r=Le(n);return!Bo()||!r.visualViewport?gf:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function bf(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==Le(n)?!1:r}function Ht(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=qo(n);let i=qe(1);r&&(t?De(t)&&(i=sn(t)):i=sn(n));const s=bf(a,e,t)?ds(a):qe(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,p=o.height/i.y;if(a){const m=Le(a),f=t&&De(t)?Le(t):t;let h=m,v=Vo(h);for(;v&&t&&f!==h;){const g=sn(v),y=v.getBoundingClientRect(),w=Ye(v),b=y.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,D=y.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,p*=g.y,l+=b,u+=D,h=Le(v),v=Vo(h)}}return wr({width:c,height:p,x:l,y:u})}function Go(n,r){const e=gr(n).scrollLeft;return r?r.left+e:Ht(Qe(n)).left+e}function fs(n,r,e){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=t.left+r.scrollLeft-(e?0:Go(n,t)),a=t.top+r.scrollTop;return{x:o,y:a}}function yf(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=Qe(t),s=r?vr(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=qe(1);const c=qe(0),p=Ke(t);if((p||!p&&!a)&&((rn(t)!=="body"||Pn(i))&&(l=gr(t)),Ke(t))){const f=Ht(t);u=sn(t),c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}const m=i&&!p&&!a?fs(i,l,!0):qe(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+m.x,y:e.y*u.y-l.scrollTop*u.y+c.y+m.y}}function wf(n){return Array.from(n.getClientRects())}function xf(n){const r=Qe(n),e=gr(n),t=n.ownerDocument.body,o=Ne(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Ne(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+Go(n);const s=-e.scrollTop;return Ye(t).direction==="rtl"&&(i+=Ne(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Df(n,r){const e=Le(n),t=Qe(n),o=e.visualViewport;let a=t.clientWidth,i=t.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const u=Bo();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function Ef(n,r){const e=Ht(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=Ke(n)?sn(n):qe(1),i=n.clientWidth*a.x,s=n.clientHeight*a.y,l=o*a.x,u=t*a.y;return{width:i,height:s,x:l,y:u}}function ps(n,r,e){let t;if(r==="viewport")t=Df(n,e);else if(r==="document")t=xf(Qe(n));else if(De(r))t=Ef(r,e);else{const o=ds(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return wr(t)}function ms(n,r){const e=St(n);return e===r||!De(e)||on(e)?!1:Ye(e).position==="fixed"||ms(e,r)}function kf(n,r){const e=r.get(n);if(e)return e;let t=Nn(n,[],!1).filter(s=>De(s)&&rn(s)!=="body"),o=null;const a=Ye(n).position==="fixed";let i=a?St(n):n;for(;De(i)&&!on(i);){const s=Ye(i),l=Ro(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Pn(i)&&!l&&ms(n,i))?t=t.filter(c=>c!==i):o=s,i=St(i)}return r.set(n,t),t}function Sf(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?vr(r)?[]:kf(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const p=ps(r,c,o);return u.top=Ne(p.top,u.top),u.right=ct(p.right,u.right),u.bottom=ct(p.bottom,u.bottom),u.left=Ne(p.left,u.left),u},ps(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Cf(n){const{width:r,height:e}=cs(n);return{width:r,height:e}}function _f(n,r,e){const t=Ke(r),o=Qe(r),a=e==="fixed",i=Ht(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=qe(0);if(t||!t&&!a)if((rn(r)!=="body"||Pn(o))&&(s=gr(r)),t){const m=Ht(r,!0,a,r);l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}else o&&(l.x=Go(o));const u=o&&!t&&!a?fs(o,s):qe(0),c=i.left+s.scrollLeft-l.x-u.x,p=i.top+s.scrollTop-l.y-u.y;return{x:c,y:p,width:i.width,height:i.height}}function Xo(n){return Ye(n).position==="static"}function hs(n,r){if(!Ke(n)||Ye(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return Qe(n)===e&&(e=e.ownerDocument.body),e}function vs(n,r){const e=Le(n);if(vr(n))return e;if(!Ke(n)){let o=St(n);for(;o&&!on(o);){if(De(o)&&!Xo(o))return o;o=St(o)}return e}let t=hs(n,r);for(;t&&Zd(t)&&Xo(t);)t=hs(t,r);return t&&on(t)&&Xo(t)&&!Ro(t)?e:t||ef(n)||e}const Mf=async function(n){const r=this.getOffsetParent||vs,e=this.getDimensions,t=await e(n.floating);return{reference:_f(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Of(n){return Ye(n).direction==="rtl"}const Tf={convertOffsetParentRelativeRectToViewportRelativeRect:yf,getDocumentElement:Qe,getClippingRect:Sf,getOffsetParent:vs,getElementRects:Mf,getClientRects:wf,getDimensions:Cf,getScale:sn,isElement:De,isRTL:Of};function gs(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function Pf(n,r){let e=null,t;const o=Qe(n);function a(){var s;clearTimeout(t),(s=e)==null||s.disconnect(),e=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=n.getBoundingClientRect(),{left:c,top:p,width:m,height:f}=u;if(s||r(),!m||!f)return;const h=br(p),v=br(o.clientWidth-(c+m)),g=br(o.clientHeight-(p+f)),y=br(c),b={rootMargin:-h+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ne(0,ct(1,l))||1};let D=!0;function E(C){const S=C[0].intersectionRatio;if(S!==l){if(!D)return i();S?i(!1,S):t=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!gs(u,n.getBoundingClientRect())&&i(),D=!1}try{e=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{e=new IntersectionObserver(E,b)}e.observe(n)}return i(!0),a}function bs(n,r,e,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,u=qo(n),c=o||a?[...u?Nn(u):[],...Nn(r)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const p=u&&s?Pf(u,e):null;let m=-1,f=null;i&&(f=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&f&&(f.unobserve(r),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(r)})),e()}),u&&!l&&f.observe(u),f.observe(r));let h,v=l?Ht(n):null;l&&g();function g(){const y=Ht(n);v&&!gs(v,y)&&e(),v=y,h=requestAnimationFrame(g)}return e(),()=>{var y;c.forEach(w=>{o&&w.removeEventListener("scroll",e),a&&w.removeEventListener("resize",e)}),p==null||p(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const Jo=xr,Nf=mf,If=hf,Ff=ff,Lf=vf,ys=df,$f=(n,r,e)=>{const t=new Map,o={platform:Tf,...e},a={...o.platform,_c:t};return cf(n,r,{...o,platform:a})};var Dr=typeof document<"u"?d.useLayoutEffect:d.useEffect;function Er(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let e,t,o;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(e=n.length,e!==r.length)return!1;for(t=e;t--!==0;)if(!Er(n[t],r[t]))return!1;return!0}if(o=Object.keys(n),e=o.length,e!==Object.keys(r).length)return!1;for(t=e;t--!==0;)if(!{}.hasOwnProperty.call(r,o[t]))return!1;for(t=e;t--!==0;){const a=o[t];if(!(a==="_owner"&&n.$$typeof)&&!Er(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function ws(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function xs(n,r){const e=ws(n);return Math.round(r*e)/e}function Zo(n){const r=I.useRef(n);return Dr(()=>{r.current=n}),r}function Ds(n){n===void 0&&(n={});const{placement:r="bottom",strategy:e="absolute",middleware:t=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=n,[c,p]=I.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[m,f]=I.useState(t);Er(m,t)||f(t);const[h,v]=I.useState(null),[g,y]=I.useState(null),w=I.useCallback(T=>{T!==C.current&&(C.current=T,v(T))},[]),b=I.useCallback(T=>{T!==S.current&&(S.current=T,y(T))},[]),D=a||h,E=i||g,C=I.useRef(null),S=I.useRef(null),x=I.useRef(c),_=l!=null,M=Zo(l),P=Zo(o),Y=Zo(u),H=I.useCallback(()=>{if(!C.current||!S.current)return;const T={placement:r,strategy:e,middleware:m};P.current&&(T.platform=P.current),$f(C.current,S.current,T).then(q=>{const k={...q,isPositioned:Y.current!==!1};N.current&&!Er(x.current,k)&&(x.current=k,er.flushSync(()=>{p(k)}))})},[m,r,e,P,Y]);Dr(()=>{u===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const N=I.useRef(!1);Dr(()=>(N.current=!0,()=>{N.current=!1}),[]),Dr(()=>{if(D&&(C.current=D),E&&(S.current=E),D&&E){if(M.current)return M.current(D,E,H);H()}},[D,E,H,M,_]);const L=I.useMemo(()=>({reference:C,floating:S,setReference:w,setFloating:b}),[w,b]),$=I.useMemo(()=>({reference:D,floating:E}),[D,E]),V=I.useMemo(()=>{const T={position:e,left:0,top:0};if(!$.floating)return T;const q=xs($.floating,c.x),k=xs($.floating,c.y);return s?{...T,transform:"translate("+q+"px, "+k+"px)",...ws($.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:q,top:k}},[e,s,$.floating,c.x,c.y]);return I.useMemo(()=>({...c,update:H,refs:L,elements:$,floatingStyles:V}),[c,H,L,$,V])}const Af=n=>{function r(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:n,fn(e){const{element:t,padding:o}=typeof n=="function"?n(e):n;return t&&r(t)?t.current!=null?ys({element:t.current,padding:o}).fn(e):{}:t?ys({element:t,padding:o}).fn(e):{}}}},ea=(n,r)=>({...Nf(n),options:[n,r]}),Yf=(n,r)=>({...If(n),options:[n,r]}),Es=(n,r)=>({...Ff(n),options:[n,r]}),Wf=(n,r)=>({...Lf(n),options:[n,r]}),jf=(n,r)=>({...Af(n),options:[n,r]}),ks={...I},Hf=ks.useInsertionEffect||(n=>n());function Ss(n){const r=I.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Hf(()=>{r.current=n}),I.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}var ta=typeof document<"u"?d.useLayoutEffect:d.useEffect;let Cs=!1,Rf=0;const _s=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Rf++;function Bf(){const[n,r]=I.useState(()=>Cs?_s():void 0);return ta(()=>{n==null&&r(_s())},[]),I.useEffect(()=>{Cs=!0},[]),n}const Vf=ks.useId||Bf;let Fn;process.env.NODE_ENV!=="production"&&(Fn=new Set);function zf(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Fn)!=null&&n.has(o))){var a;(a=Fn)==null||a.add(o),console.warn(o)}}function Uf(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Fn)!=null&&n.has(o))){var a;(a=Fn)==null||a.add(o),console.error(o)}}function Qf(){const n=new Map;return{emit(r,e){var t;(t=n.get(r))==null||t.forEach(o=>o(e))},on(r,e){n.set(r,[...n.get(r)||[],e])},off(r,e){var t;n.set(r,((t=n.get(r))==null?void 0:t.filter(o=>o!==e))||[])}}}const Kf=I.createContext(null),qf=I.createContext(null),Gf=()=>{var n;return((n=I.useContext(Kf))==null?void 0:n.id)||null},Xf=()=>I.useContext(qf),Jf="data-floating-ui-focusable";function Zf(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Vf(),a=I.useRef({}),[i]=I.useState(()=>Qf()),s=Gf()!=null;if(process.env.NODE_ENV!=="production"){const f=t.reference;f&&!De(f)&&Uf("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=I.useState(t.reference),c=Ss((f,h,v)=>{a.current.openEvent=f?h:void 0,i.emit("openchange",{open:f,event:h,reason:v,nested:s}),e==null||e(f,h,v)}),p=I.useMemo(()=>({setPositionReference:u}),[]),m=I.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return I.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:m,events:i,floatingId:o,refs:p}),[r,c,m,i,o,p])}function ep(n){n===void 0&&(n={});const{nodeId:r}=n,e=Zf({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=I.useState(null),[s,l]=I.useState(null),c=(o==null?void 0:o.domReference)||a,p=I.useRef(null),m=Xf();ta(()=>{c&&(p.current=c)},[c]);const f=Ds({...n,elements:{...o,...s&&{reference:s}}}),h=I.useCallback(b=>{const D=De(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),contextElement:b}:b;l(D),f.refs.setReference(D)},[f.refs]),v=I.useCallback(b=>{(De(b)||b===null)&&(p.current=b,i(b)),(De(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!De(b))&&f.refs.setReference(b)},[f.refs]),g=I.useMemo(()=>({...f.refs,setReference:v,setPositionReference:h,domReference:p}),[f.refs,v,h]),y=I.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),w=I.useMemo(()=>({...f,...t,refs:g,elements:y,nodeId:r}),[f,g,y,r,t]);return ta(()=>{t.dataRef.current.floatingContext=w;const b=m==null?void 0:m.nodesRef.current.find(D=>D.id===r);b&&(b.context=w)}),I.useMemo(()=>({...f,context:w,refs:g,elements:y}),[f,g,y,w])}const Ms="active",Os="selected";function na(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[Ms]:i,[Os]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1,[Jf]:""},...a,...r.map(i=>{const s=i?i[e]:null;return typeof s=="function"?n?s(n):null:s}).concat(n).reduce((i,s)=>(s&&Object.entries(s).forEach(l=>{let[u,c]=l;if(!(o&&[Ms,Os].includes(u)))if(u.indexOf("on")===0){if(t.has(u)||t.set(u,[]),typeof c=="function"){var p;(p=t.get(u))==null||p.push(c),i[u]=function(){for(var m,f=arguments.length,h=new Array(f),v=0;v<f;v++)h[v]=arguments[v];return(m=t.get(u))==null?void 0:m.map(g=>g(...h)).find(g=>g!==void 0)}}}else i[u]=c}),i),{})}}function tp(n){n===void 0&&(n=[]);const r=n.map(s=>s==null?void 0:s.reference),e=n.map(s=>s==null?void 0:s.floating),t=n.map(s=>s==null?void 0:s.item),o=I.useCallback(s=>na(s,n,"reference"),r),a=I.useCallback(s=>na(s,n,"floating"),e),i=I.useCallback(s=>na(s,n,"item"),t);return I.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function Ts(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const np=n=>({name:"inner",options:n,async fn(r){const{listRef:e,overflowRef:t,onFallbackChange:o,offset:a=0,index:i=0,minItemsVisible:s=4,referenceOverflowThreshold:l=0,scrollRef:u,...c}=Wt(n,r),{rects:p,elements:{floating:m}}=r,f=e.current[i],h=(u==null?void 0:u.current)||m,v=m.clientTop||h.clientTop,g=m.clientTop!==0,y=h.clientTop!==0,w=m===h;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||zf('`placement` side must be "bottom" when using the `inner`',"middleware.")),!f)return{};const b={...r,...await ea(-f.offsetTop-m.clientTop-p.reference.height/2-f.offsetHeight/2-a).fn(r)},D=await Jo(Ts(b,h.scrollHeight+v+m.clientTop),c),E=await Jo(b,{...c,elementContext:"reference"}),C=Ne(0,D.top),S=b.y+C,M=(h.scrollHeight>h.clientHeight?P=>P:In)(Ne(0,h.scrollHeight+(g&&w||y?v*2:0)-C-Ne(0,D.bottom)));if(h.style.maxHeight=M+"px",h.scrollTop=C,o){const P=h.offsetHeight<f.offsetHeight*ct(s,e.current.length)-1||E.top>=-l||E.bottom>=-l;er.flushSync(()=>o(P))}return t&&(t.current=await Jo(Ts({...b,y:S},h.offsetHeight+v+m.clientTop),c)),{y:S}}});function rp(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=Ss(s),u=I.useRef(!1),c=I.useRef(null),p=I.useRef(null);I.useEffect(()=>{if(!o)return;function f(v){if(v.ctrlKey||!h||a.current==null)return;const g=v.deltaY,y=a.current.top>=-.5,w=a.current.bottom>=-.5,b=h.scrollHeight-h.clientHeight,D=g<0?-1:1,E=g<0?"max":"min";h.scrollHeight<=h.clientHeight||(!y&&g>0||!w&&g<0?(v.preventDefault(),er.flushSync(()=>{l(C=>C+Math[E](g,b*D))})):/firefox/i.test(tf())&&(h.scrollTop+=g))}const h=(i==null?void 0:i.current)||t.floating;if(e&&h)return h.addEventListener("wheel",f),requestAnimationFrame(()=>{c.current=h.scrollTop,a.current!=null&&(p.current={...a.current})}),()=>{c.current=null,p.current=null,h.removeEventListener("wheel",f)}},[o,e,t.floating,a,i,l]);const m=I.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const f=(i==null?void 0:i.current)||t.floating;if(!(!a.current||!f||!u.current)){if(c.current!==null){const h=f.scrollTop-c.current;(a.current.bottom<-.5&&h<-1||a.current.top<-.5&&h>1)&&er.flushSync(()=>l(v=>v+h))}requestAnimationFrame(()=>{c.current=f.scrollTop})}}}),[t.floating,l,a,i]);return I.useMemo(()=>o?{floating:m}:{},[o,m])}let ln=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});ln.displayName="FloatingContext";let ra=d.createContext(null);ra.displayName="PlacementContext";function Ps(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function Ns(){return d.useContext(ln).setReference}function op(){return d.useContext(ln).getReferenceProps}function Is(){let{getFloatingProps:n,slot:r}=d.useContext(ln);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function Fs(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(ra),e=d.useMemo(()=>n,[JSON.stringify(n,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);ie(()=>{r==null||r(e??null)},[r,e]);let t=d.useContext(ln);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let Ls=4;function $s({children:n,enabled:r=!0}){let[e,t]=d.useState(null),[o,a]=d.useState(0),i=d.useRef(null),[s,l]=d.useState(null);ap(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:p=0,offset:m=0,padding:f=0,inner:h}=ip(e,s),[v,g="center"]=c.split(" ");ie(()=>{u&&a(0)},[u]);let{refs:y,floatingStyles:w,context:b}=ep({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[ea({mainAxis:v==="selection"?0:p,crossAxis:m}),Yf({padding:f}),v!=="selection"&&Es({padding:f}),v==="selection"&&h?np({...h,padding:f,overflowRef:i,offset:o,minItemsVisible:Ls,referenceOverflowThreshold:f,onFallbackChange(P){var Y,H;if(!P)return;let N=b.elements.floating;if(!N)return;let L=parseFloat(getComputedStyle(N).scrollPaddingBottom)||0,$=Math.min(Ls,N.childElementCount),V=0,T=0;for(let q of(H=(Y=b.elements.floating)==null?void 0:Y.childNodes)!=null?H:[])if(q instanceof HTMLElement){let k=q.offsetTop,F=k+q.clientHeight+L,J=N.scrollTop,G=J+N.clientHeight;if(k>=J&&F<=G)$--;else{T=Math.max(0,Math.min(F,G)-Math.max(k,J)),V=q.clientHeight;break}}$>=1&&a(q=>{let k=V*$-T+L;return q>=k?q:k})}}):null,Wf({padding:f,apply({availableWidth:P,availableHeight:Y,elements:H}){Object.assign(H.floating.style,{overflow:"auto",maxWidth:`${P}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${Y}px)`})}})].filter(Boolean),whileElementsMounted:bs}),[D=v,E=g]=b.placement.split("-");v==="selection"&&(D="selection");let C=d.useMemo(()=>({anchor:[D,E].filter(Boolean).join(" ")}),[D,E]),S=rp(b,{overflowRef:i,onChange:a}),{getReferenceProps:x,getFloatingProps:_}=tp([S]),M=B(P=>{l(P),y.setFloating(P)});return I.createElement(ra.Provider,{value:t},I.createElement(ln.Provider,{value:{setFloating:M,setReference:y.setReference,styles:w,getReferenceProps:x,getFloatingProps:_,slot:C}},n))}function ap(n){ie(()=>{if(!n)return;let r=new MutationObserver(()=>{let e=window.getComputedStyle(n).maxHeight,t=parseFloat(e);if(isNaN(t))return;let o=parseInt(e);isNaN(o)||t!==o&&(n.style.maxHeight=`${Math.ceil(t)}px`)});return r.observe(n,{attributes:!0,attributeFilter:["style"]}),()=>{r.disconnect()}},[n])}function ip(n,r){var e,t,o;let a=oa((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=oa((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=oa((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function oa(n,r,e=void 0){let t=xt(),o=B((l,u)=>{if(l==null)return[e,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!u)return[e,null];let c=Ys(l,u);return[c,p=>{let m=As(l);{let f=m.map(h=>window.getComputedStyle(u).getPropertyValue(h));t.requestAnimationFrame(function h(){t.nextFrame(h);let v=!1;for(let[y,w]of m.entries()){let b=window.getComputedStyle(u).getPropertyValue(w);if(f[y]!==b){f[y]=b,v=!0;break}}if(!v)return;let g=Ys(l,u);c!==g&&(p(g),c=g)})}return t.dispose}]}return[e,null]}),a=d.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=d.useState();return ie(()=>{let[l,u]=o(n,r);if(s(l),!!u)return u(s)},[n,r]),i}function As(n){let r=/var\((.*)\)/.exec(n);if(r){let e=r[1].indexOf(",");if(e===-1)return[r[1]];let t=r[1].slice(0,e).trim(),o=r[1].slice(e+1).trim();return o?[t,...As(o)]:[t]}return[]}function Ys(n,r){let e=document.createElement("div");r.appendChild(e),e.style.setProperty("margin-top","0px","important"),e.style.setProperty("margin-top",n,"important");let t=parseFloat(window.getComputedStyle(e).marginTop)||0;return r.removeChild(e),t}function sp({children:n,freeze:r}){let e=kr(r,n);return d.createElement(d.Fragment,null,e)}function kr(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let Sr=d.createContext(null);Sr.displayName="OpenClosedContext";var Me=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(Me||{});function un(){return d.useContext(Sr)}function aa({value:n,children:r}){return d.createElement(Sr.Provider,{value:n},r)}function lp({children:n}){return d.createElement(Sr.Provider,{value:null},n)}var Cr={exports:{}},ia={};/**
|
|
30
|
+
* @license React
|
|
31
|
+
* use-sync-external-store-with-selector.production.js
|
|
32
|
+
*
|
|
33
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license found in the
|
|
36
|
+
* LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/var Ws;function up(){if(Ws)return ia;Ws=1;var n=d;function r(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var e=typeof Object.is=="function"?Object.is:r,t=n.useSyncExternalStore,o=n.useRef,a=n.useEffect,i=n.useMemo,s=n.useDebugValue;return ia.useSyncExternalStoreWithSelector=function(l,u,c,p,m){var f=o(null);if(f.current===null){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=i(function(){function g(E){if(!y){if(y=!0,w=E,E=p(E),m!==void 0&&h.hasValue){var C=h.value;if(m(C,E))return b=C}return b=E}if(C=b,e(w,E))return C;var S=p(E);return m!==void 0&&m(C,S)?(w=E,C):(w=E,b=S)}var y=!1,w,b,D=c===void 0?null:c;return[function(){return g(u())},D===null?void 0:function(){return g(D())}]},[u,c,p,m]);var v=t(l,f[0],f[1]);return a(function(){h.hasValue=!0,h.value=v},[v]),s(v),v},ia}var sa={};/**
|
|
38
|
+
* @license React
|
|
39
|
+
* use-sync-external-store-with-selector.development.js
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the MIT license found in the
|
|
44
|
+
* LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/var js;function cp(){return js||(js=1,process.env.NODE_ENV!=="production"&&function(){function n(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=d,e=typeof Object.is=="function"?Object.is:n,t=r.useSyncExternalStore,o=r.useRef,a=r.useEffect,i=r.useMemo,s=r.useDebugValue;sa.useSyncExternalStoreWithSelector=function(l,u,c,p,m){var f=o(null);if(f.current===null){var h={hasValue:!1,value:null};f.current=h}else h=f.current;f=i(function(){function g(E){if(!y){if(y=!0,w=E,E=p(E),m!==void 0&&h.hasValue){var C=h.value;if(m(C,E))return b=C}return b=E}if(C=b,e(w,E))return C;var S=p(E);return m!==void 0&&m(C,S)?(w=E,C):(w=E,b=S)}var y=!1,w,b,D=c===void 0?null:c;return[function(){return g(u())},D===null?void 0:function(){return g(D())}]},[u,c,p,m]);var v=t(l,f[0],f[1]);return a(function(){h.hasValue=!0,h.value=v},[v]),s(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),sa}var Hs;function dp(){return Hs||(Hs=1,process.env.NODE_ENV==="production"?Cr.exports=up():Cr.exports=cp()),Cr.exports}var fp=dp(),Rs=(n,r,e)=>{if(!r.has(n))throw TypeError("Cannot "+e)},Ve=(n,r,e)=>(Rs(n,r,"read from private field"),e?e.call(n):r.get(n)),la=(n,r,e)=>{if(r.has(n))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(n):r.set(n,e)},Bs=(n,r,e,t)=>(Rs(n,r,"write to private field"),r.set(n,e),e),dt,Ln,$n;let Vs=class{constructor(r){la(this,dt,{}),la(this,Ln,new Hi(()=>new Set)),la(this,$n,new Set),Bs(this,dt,r)}get state(){return Ve(this,dt)}subscribe(r,e){let t={selector:r,callback:e,current:r(Ve(this,dt))};return Ve(this,$n).add(t),()=>{Ve(this,$n).delete(t)}}on(r,e){return Ve(this,Ln).get(r).add(e),()=>{Ve(this,Ln).get(r).delete(e)}}send(r){Bs(this,dt,this.reduce(Ve(this,dt),r));for(let e of Ve(this,$n)){let t=e.selector(Ve(this,dt));zs(e.current,t)||(e.current=t,e.callback(t))}for(let e of Ve(this,Ln).get(r.type))e(Ve(this,dt),r)}};dt=new WeakMap,Ln=new WeakMap,$n=new WeakMap;function zs(n,r){return Object.is(n,r)?!0:typeof n!="object"||n===null||typeof r!="object"||r===null?!1:Array.isArray(n)&&Array.isArray(r)?n.length!==r.length?!1:ua(n[Symbol.iterator](),r[Symbol.iterator]()):n instanceof Map&&r instanceof Map||n instanceof Set&&r instanceof Set?n.size!==r.size?!1:ua(n.entries(),r.entries()):Us(n)&&Us(r)?ua(Object.entries(n)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function ua(n,r){do{let e=n.next(),t=r.next();if(e.done&&t.done)return!0;if(e.done||t.done||!Object.is(e.value,t.value))return!1}while(!0)}function Us(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}function ca(n){let[r,e]=n(),t=Re();return(...o)=>{r(...o),t.dispose(),t.microTask(e)}}function me(n,r,e=zs){return fp.useSyncExternalStoreWithSelector(B(t=>n.subscribe(pp,t)),B(()=>n.state),B(()=>n.state),B(r),e)}function pp(n){return n}function mp(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let Ge=[];mp(()=>{function n(r){if(!(r.target instanceof HTMLElement)||r.target===document.body||Ge[0]===r.target)return;let e=r.target;e=e.closest(mr),Ge.unshift(e??r.target),Ge=Ge.filter(t=>t!=null&&t.isConnected),Ge.splice(10)}window.addEventListener("click",n,{capture:!0}),window.addEventListener("mousedown",n,{capture:!0}),window.addEventListener("focus",n,{capture:!0}),document.body.addEventListener("click",n,{capture:!0}),document.body.addEventListener("mousedown",n,{capture:!0}),document.body.addEventListener("focus",n,{capture:!0})});function hp(n){throw new Error("Unexpected object: "+n)}var ae=(n=>(n[n.First=0]="First",n[n.Previous=1]="Previous",n[n.Next=2]="Next",n[n.Last=3]="Last",n[n.Specific=4]="Specific",n[n.Nothing=5]="Nothing",n))(ae||{});function An(n,r){let e=r.resolveItems();if(e.length<=0)return null;let t=r.resolveActiveIndex(),o=t??-1;switch(n.focus){case 0:{for(let a=0;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 1:{o===-1&&(o=e.length);for(let a=o-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 2:{for(let a=o+1;a<e.length;++a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 3:{for(let a=e.length-1;a>=0;--a)if(!r.resolveDisabled(e[a],a,e))return a;return t}case 4:{for(let a=0;a<e.length;++a)if(r.resolveId(e[a],a,e)===n.id)return a;return t}case 5:return null;default:hp(n)}}var da=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(da||{});function Qs(n){let r=B(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,lr(()=>{e.current&&r()})}),[r])}function vp(){let n=typeof document>"u";return"useSyncExternalStore"in I?(r=>r.useSyncExternalStore)(I)(()=>()=>{},()=>!1,()=>!n):!1}function Yn(){let n=vp(),[r,e]=I.useState($t.isHandoffComplete);return r&&$t.isHandoffComplete===!1&&e(!1),I.useEffect(()=>{r!==!0&&e(!0)},[r]),I.useEffect(()=>$t.handoff(),[]),n?!1:r}let Ks=d.createContext(!1);function gp(){return d.useContext(Ks)}function qs(n){return d.createElement(Ks.Provider,{value:n.force},n.children)}function bp(n){let r=gp(),e=d.useContext(Xs),[t,o]=d.useState(()=>{var a;if(!r&&e!==null)return(a=e.current)!=null?a:null;if($t.isServer)return null;let i=n==null?void 0:n.getElementById("headlessui-portal-root");if(i)return i;if(n===null)return null;let s=n.createElement("div");return s.setAttribute("id","headlessui-portal-root"),n.body.appendChild(s)});return d.useEffect(()=>{t!==null&&(n!=null&&n.body.contains(t)||n==null||n.body.appendChild(t))},[t,n]),d.useEffect(()=>{r||e!==null&&o(e.current)},[e,o,r]),t}let Gs=d.Fragment,yp=he(function(n,r){let{ownerDocument:e=null,...t}=n,o=d.useRef(null),a=Ce(ud(f=>{o.current=f}),r),i=ut(o),s=e??i,l=bp(s),[u]=d.useState(()=>{var f;return $t.isServer?null:(f=s==null?void 0:s.createElement("div"))!=null?f:null}),c=d.useContext(fa),p=Yn();ie(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ie(()=>{if(u&&c)return c.register(u)},[c,u]),Qs(()=>{var f;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((f=l.parentElement)==null||f.removeChild(l)))});let m=ye();return p?!l||!u?null:be.createPortal(m({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:Gs,name:"Portal"}),u):null});function wp(n,r){let e=Ce(r),{enabled:t=!0,ownerDocument:o,...a}=n,i=ye();return t?d.createElement(yp,{...a,ownerDocument:o,ref:e}):i({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:Gs,name:"Portal"})}let xp=d.Fragment,Xs=d.createContext(null);function Dp(n,r){let{target:e,...t}=n,o={ref:Ce(r)},a=ye();return d.createElement(Xs.Provider,{value:e},a({ourProps:o,theirProps:t,defaultTag:xp,name:"Popover.Group"}))}let fa=d.createContext(null);function Ep(){let n=d.useContext(fa),r=d.useRef([]),e=B(a=>(r.current.push(a),n&&n.register(a),()=>t(a))),t=B(a=>{let i=r.current.indexOf(a);i!==-1&&r.current.splice(i,1),n&&n.unregister(a)}),o=d.useMemo(()=>({register:e,unregister:t,portals:r}),[e,t,r]);return[r,d.useMemo(()=>function({children:a}){return d.createElement(fa.Provider,{value:o},a)},[o])]}let kp=he(wp),Js=he(Dp),pa=Object.assign(kp,{Group:Js});var Sp=Object.defineProperty,Cp=(n,r,e)=>r in n?Sp(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Zs=(n,r,e)=>(Cp(n,typeof r!="symbol"?r+"":r,e),e),oe=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(oe||{}),$e=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))($e||{}),_t=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(_t||{}),el=(n=>(n[n.OpenCombobox=0]="OpenCombobox",n[n.CloseCombobox=1]="CloseCombobox",n[n.GoToOption=2]="GoToOption",n[n.SetTyping=3]="SetTyping",n[n.RegisterOption=4]="RegisterOption",n[n.UnregisterOption=5]="UnregisterOption",n[n.DefaultToFirstOption=6]="DefaultToFirstOption",n[n.SetActivationTrigger=7]="SetActivationTrigger",n[n.UpdateVirtualConfiguration=8]="UpdateVirtualConfiguration",n[n.SetInputElement=9]="SetInputElement",n[n.SetButtonElement=10]="SetButtonElement",n[n.SetOptionsElement=11]="SetOptionsElement",n))(el||{});function ma(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=r(n.options.slice()),o=t.length>0&&t[0].dataRef.current.order!==null?t.sort((i,s)=>i.dataRef.current.order-s.dataRef.current.order):$o(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let _p={1(n){var r;return(r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===1?n:{...n,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(n){var r,e;if((r=n.dataRef.current)!=null&&r.disabled||n.comboboxState===0)return n;if((e=n.dataRef.current)!=null&&e.value){let t=n.dataRef.current.calculateIndex(n.dataRef.current.value);if(t!==-1)return{...n,activeOptionIndex:t,comboboxState:0,__demoMode:!1}}return{...n,comboboxState:0,__demoMode:!1}},3(n,r){return n.isTyping===r.isTyping?n:{...n,isTyping:r.isTyping}},2(n,r){var e,t,o,a;if((e=n.dataRef.current)!=null&&e.disabled||n.optionsElement&&!((t=n.dataRef.current)!=null&&t.optionsPropsRef.current.static)&&n.comboboxState===1)return n;if(n.virtual){let{options:u,disabled:c}=n.virtual,p=r.focus===ae.Specific?r.idx:An(r,{resolveItems:()=>u,resolveActiveIndex:()=>{var f,h;return(h=(f=n.activeOptionIndex)!=null?f:u.findIndex(v=>!c(v)))!=null?h:null},resolveDisabled:c,resolveId(){throw new Error("Function not implemented.")}}),m=(o=r.trigger)!=null?o:2;return n.activeOptionIndex===p&&n.activationTrigger===m?n:{...n,activeOptionIndex:p,activationTrigger:m,isTyping:!1,__demoMode:!1}}let i=ma(n);if(i.activeOptionIndex===null){let u=i.options.findIndex(c=>!c.dataRef.current.disabled);u!==-1&&(i.activeOptionIndex=u)}let s=r.focus===ae.Specific?r.idx:An(r,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled}),l=(a=r.trigger)!=null?a:2;return n.activeOptionIndex===s&&n.activationTrigger===l?n:{...n,...i,isTyping:!1,activeOptionIndex:s,activationTrigger:l,__demoMode:!1}},4:(n,r)=>{var e,t,o,a;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:[...n.options,r.payload]};let i=r.payload,s=ma(n,u=>(u.push(i),u));n.activeOptionIndex===null&&(o=(t=n.dataRef.current).isSelected)!=null&&o.call(t,r.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let l={...n,...s,activationTrigger:2};return(a=n.dataRef.current)!=null&&a.__demoMode&&n.dataRef.current.value===void 0&&(l.activeOptionIndex=0),l},5:(n,r)=>{var e;if((e=n.dataRef.current)!=null&&e.virtual)return{...n,options:n.options.filter(o=>o.id!==r.id)};let t=ma(n,o=>{let a=o.findIndex(i=>i.id===r.id);return a!==-1&&o.splice(a,1),o});return{...n,...t,activationTrigger:2}},6:(n,r)=>n.defaultToFirstOption===r.value?n:{...n,defaultToFirstOption:r.value},7:(n,r)=>n.activationTrigger===r.trigger?n:{...n,activationTrigger:r.trigger},8:(n,r)=>{var e,t;if(n.virtual===null)return{...n,virtual:{options:r.options,disabled:(e=r.disabled)!=null?e:()=>!1}};if(n.virtual.options===r.options&&n.virtual.disabled===r.disabled)return n;let o=n.activeOptionIndex;if(n.activeOptionIndex!==null){let a=r.options.indexOf(n.virtual.options[n.activeOptionIndex]);a!==-1?o=a:o=null}return{...n,activeOptionIndex:o,virtual:{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}}},9:(n,r)=>n.inputElement===r.element?n:{...n,inputElement:r.element},10:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},11:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element}},Mp=class Hu extends Vs{constructor(){super(...arguments),Zs(this,"actions",{onChange:r=>{let{onChange:e,compare:t,mode:o,value:a}=this.state.dataRef.current;return Se(o,{0:()=>e==null?void 0:e(r),1:()=>{let i=a.slice(),s=i.findIndex(l=>t(l,r));return s===-1?i.push(r):i.splice(s,1),e==null?void 0:e(i)}})},registerOption:(r,e)=>(this.send({type:4,payload:{id:r,dataRef:e}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(e.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:r})}),goToOption:(r,e)=>(this.send({type:6,value:!1}),this.send({type:2,...r,trigger:e})),setIsTyping:r=>{this.send({type:3,isTyping:r})},closeCombobox:()=>{var r,e;this.send({type:1}),this.send({type:6,value:!1}),(e=(r=this.state.dataRef.current).onClose)==null||e.call(r)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:r=>{this.send({type:7,trigger:r})},selectActiveOption:()=>{let r=this.selectors.activeOptionIndex(this.state);if(r!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[r]);else{let{dataRef:e}=this.state.options[r];this.actions.onChange(e.current.value)}this.actions.goToOption({focus:ae.Specific,idx:r})}},setInputElement:r=>{this.send({type:9,element:r})},setButtonElement:r=>{this.send({type:10,element:r})},setOptionsElement:r=>{this.send({type:11,element:r})}}),Zs(this,"selectors",{activeDescendantId:r=>{var e,t;let o=this.selectors.activeOptionIndex(r);if(o!==null)return r.virtual?(t=r.options.find(a=>!a.dataRef.current.disabled&&r.dataRef.current.compare(a.dataRef.current.value,r.virtual.options[o])))==null?void 0:t.id:(e=r.options[o])==null?void 0:e.id},activeOptionIndex:r=>{if(r.defaultToFirstOption&&r.activeOptionIndex===null&&(r.virtual?r.virtual.options.length>0:r.options.length>0)){if(r.virtual){let{options:t,disabled:o}=r.virtual,a=t.findIndex(i=>{var s;return!((s=o==null?void 0:o(i))!=null&&s)});if(a!==-1)return a}let e=r.options.findIndex(t=>!t.dataRef.current.disabled);if(e!==-1)return e}return r.activeOptionIndex},activeOption:r=>{var e,t;let o=this.selectors.activeOptionIndex(r);return o===null?null:r.virtual?r.virtual.options[o??0]:(t=(e=r.options[o])==null?void 0:e.dataRef.current.value)!=null?t:null},isActive:(r,e,t)=>{var o;let a=this.selectors.activeOptionIndex(r);return a===null?!1:r.virtual?a===r.dataRef.current.calculateIndex(e):((o=r.options[a])==null?void 0:o.id)===t},shouldScrollIntoView:(r,e,t)=>!(r.virtual||r.__demoMode||r.comboboxState!==0||r.activationTrigger===0||!this.selectors.isActive(r,e,t))})}static new({virtual:r=null,__demoMode:e=!1}={}){var t;return new Hu({dataRef:{current:{}},comboboxState:e?0:1,isTyping:!1,options:[],virtual:r?{options:r.options,disabled:(t=r.disabled)!=null?t:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:e})}reduce(r,e){return Se(e.type,_p,r,e)}};const tl=d.createContext(null);function Wn(n){let r=d.useContext(tl);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,nl),e}return r}function nl({virtual:n=null,__demoMode:r=!1}={}){return d.useMemo(()=>Mp.new({virtual:n,__demoMode:r}),[])}let jn=d.createContext(null);jn.displayName="ComboboxDataContext";function cn(n){let r=d.useContext(jn);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,cn),e}return r}let rl=d.createContext(null);function Op(n){let r=Wn("VirtualProvider"),e=cn("VirtualProvider"),{options:t}=e.virtual,o=me(r,f=>f.optionsElement),[a,i]=d.useMemo(()=>{let f=o;if(!f)return[0,0];let h=window.getComputedStyle(f);return[parseFloat(h.paddingBlockStart||h.paddingTop),parseFloat(h.paddingBlockEnd||h.paddingBottom)]},[o]),s=Td({enabled:t.length!==0,scrollPaddingStart:a,scrollPaddingEnd:i,count:t.length,estimateSize(){return 40},getScrollElement(){return r.state.optionsElement},overscan:12}),[l,u]=d.useState(0);ie(()=>{u(f=>f+1)},[t]);let c=s.getVirtualItems(),p=me(r,f=>f.activationTrigger===_t.Pointer),m=me(r,r.selectors.activeOptionIndex);return c.length===0?null:d.createElement(rl.Provider,{value:s},d.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:f=>{f&&(p||m!==null&&t.length>m&&s.scrollToIndex(m))}},c.map(f=>{var h;return d.createElement(d.Fragment,{key:f.key},d.cloneElement((h=n.children)==null?void 0:h.call(n,{...n.slot,option:t[f.index]}),{key:`${l}-${f.key}`,"data-index":f.index,"aria-setsize":t.length,"aria-posinset":f.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${f.start}px)`,overflowAnchor:"none"}}))})))}let Tp=d.Fragment;function Pp(n,r){let e=ur(),{value:t,defaultValue:o,onChange:a,form:i,name:s,by:l,invalid:u=!1,disabled:c=e||!1,onClose:p,__demoMode:m=!1,multiple:f=!1,immediate:h=!1,virtual:v=null,nullable:g,...y}=n,w=ki(o),[b=f?[]:void 0,D]=Ei(t,a,w),E=nl({virtual:v,__demoMode:m}),C=d.useRef({static:!1,hold:!1}),S=ji(l),x=B(X=>v?l===null?v.options.indexOf(X):v.options.findIndex(A=>S(A,X)):E.state.options.findIndex(A=>S(A.dataRef.current.value,X))),_=d.useCallback(X=>Se(Y.mode,{[$e.Multi]:()=>b.some(A=>S(A,X)),[$e.Single]:()=>S(b,X)}),[b]),M=me(E,X=>X.virtual),P=B(()=>p==null?void 0:p()),Y=d.useMemo(()=>({__demoMode:m,immediate:h,optionsPropsRef:C,value:b,defaultValue:w,disabled:c,invalid:u,mode:f?$e.Multi:$e.Single,virtual:v?M:null,onChange:D,isSelected:_,calculateIndex:x,compare:S,onClose:P}),[b,w,c,u,f,D,_,m,E,v,M,P]);ie(()=>{var X;v&&E.send({type:el.UpdateVirtualConfiguration,options:v.options,disabled:(X=v.disabled)!=null?X:null})},[v,v==null?void 0:v.options,v==null?void 0:v.disabled]),ie(()=>{E.state.dataRef.current=Y},[Y]);let[H,N,L,$]=me(E,X=>[X.comboboxState,X.buttonElement,X.inputElement,X.optionsElement]),V=H===oe.Open;Ao(V,[N,L,$],()=>E.actions.closeCombobox());let T=me(E,E.selectors.activeOptionIndex),q=me(E,E.selectors.activeOption),k=d.useMemo(()=>({open:H===oe.Open,disabled:c,invalid:u,activeIndex:T,activeOption:q,value:b}),[Y,c,b,u,q,H]),[F,J]=Li(),G=r===null?{}:{ref:r},W=d.useCallback(()=>{if(w!==void 0)return D==null?void 0:D(w)},[D,w]),te=ye();return d.createElement(J,{value:F,props:{htmlFor:L==null?void 0:L.id},slot:{open:H===oe.Open,disabled:c}},d.createElement($s,null,d.createElement(jn.Provider,{value:Y},d.createElement(tl.Provider,{value:E},d.createElement(aa,{value:Se(H,{[oe.Open]:Me.Open,[oe.Closed]:Me.Closed})},s!=null&&d.createElement(Mi,{disabled:c,data:b!=null?{[s]:b}:{},form:i,onReset:W}),te({ourProps:G,theirProps:y,slot:k,defaultTag:Tp,name:"Combobox"}))))))}let Np="input";function Ip(n,r){var e,t;let o=Wn("Combobox.Input"),a=cn("Combobox.Input"),i=d.useId(),s=Mo(),{id:l=s||`headlessui-combobox-input-${i}`,onChange:u,displayValue:c,disabled:p=a.disabled||!1,autoFocus:m=!1,type:f="text",...h}=n,[v]=me(o,W=>[W.inputElement]),g=d.useRef(null),y=Ce(g,r,Ns(),o.actions.setInputElement),w=ut(v),[b,D]=me(o,W=>[W.comboboxState,W.isTyping]),E=xt(),C=B(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:ae.Nothing})}),S=d.useMemo(()=>{var W;return typeof c=="function"&&a.value!==void 0?(W=c(a.value))!=null?W:"":typeof a.value=="string"?a.value:""},[a.value,c]);Tn(([W,te],[X,A])=>{if(o.state.isTyping)return;let K=g.current;K&&((A===oe.Open&&te===oe.Closed||W!==X)&&(K.value=W),requestAnimationFrame(()=>{if(o.state.isTyping||!K||(w==null?void 0:w.activeElement)!==K)return;let{selectionStart:ne,selectionEnd:re}=K;Math.abs((re??0)-(ne??0))===0&&ne===0&&K.setSelectionRange(K.value.length,K.value.length)}))},[S,b,w,D]),Tn(([W],[te])=>{if(W===oe.Open&&te===oe.Closed){if(o.state.isTyping)return;let X=g.current;if(!X)return;let A=X.value,{selectionStart:K,selectionEnd:ne,selectionDirection:re}=X;X.value="",X.value=A,re!==null?X.setSelectionRange(K,ne,re):X.setSelectionRange(K,ne)}},[b]);let x=d.useRef(!1),_=B(()=>{x.current=!0}),M=B(()=>{E.nextFrame(()=>{x.current=!1})}),P=B(W=>{switch(o.actions.setIsTyping(!0),W.key){case se.Enter:if(o.state.comboboxState!==oe.Open||x.current)return;if(W.preventDefault(),W.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),a.mode===$e.Single&&o.actions.closeCombobox();break;case se.ArrowDown:return W.preventDefault(),W.stopPropagation(),Se(o.state.comboboxState,{[oe.Open]:()=>o.actions.goToOption({focus:ae.Next}),[oe.Closed]:()=>o.actions.openCombobox()});case se.ArrowUp:return W.preventDefault(),W.stopPropagation(),Se(o.state.comboboxState,{[oe.Open]:()=>o.actions.goToOption({focus:ae.Previous}),[oe.Closed]:()=>{be.flushSync(()=>o.actions.openCombobox()),a.value||o.actions.goToOption({focus:ae.Last})}});case se.Home:if(W.shiftKey)break;return W.preventDefault(),W.stopPropagation(),o.actions.goToOption({focus:ae.First});case se.PageUp:return W.preventDefault(),W.stopPropagation(),o.actions.goToOption({focus:ae.First});case se.End:if(W.shiftKey)break;return W.preventDefault(),W.stopPropagation(),o.actions.goToOption({focus:ae.Last});case se.PageDown:return W.preventDefault(),W.stopPropagation(),o.actions.goToOption({focus:ae.Last});case se.Escape:return o.state.comboboxState!==oe.Open?void 0:(W.preventDefault(),o.state.optionsElement&&!a.optionsPropsRef.current.static&&W.stopPropagation(),a.mode===$e.Single&&a.value===null&&C(),o.actions.closeCombobox());case se.Tab:if(o.state.comboboxState!==oe.Open)return;a.mode===$e.Single&&o.state.activationTrigger!==_t.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),Y=B(W=>{u==null||u(W),a.mode===$e.Single&&W.target.value===""&&C(),o.actions.openCombobox()}),H=B(W=>{var te,X,A;let K=(te=W.relatedTarget)!=null?te:Ge.find(ne=>ne!==W.currentTarget);if(!((X=o.state.optionsElement)!=null&&X.contains(K))&&!((A=o.state.buttonElement)!=null&&A.contains(K))&&o.state.comboboxState===oe.Open)return W.preventDefault(),a.mode===$e.Single&&a.value===null&&C(),o.actions.closeCombobox()}),N=B(W=>{var te,X,A;let K=(te=W.relatedTarget)!=null?te:Ge.find(ne=>ne!==W.currentTarget);(X=o.state.buttonElement)!=null&&X.contains(K)||(A=o.state.optionsElement)!=null&&A.contains(K)||a.disabled||a.immediate&&o.state.comboboxState!==oe.Open&&E.microTask(()=>{be.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(_t.Focus)})}),L=_n(),$=Ni(),{isFocused:V,focusProps:T}=ko({autoFocus:m}),{isHovered:q,hoverProps:k}=Eo({isDisabled:p}),F=me(o,W=>W.optionsElement),J=d.useMemo(()=>({open:b===oe.Open,disabled:p,invalid:a.invalid,hover:q,focus:V,autofocus:m}),[a,q,V,m,p,a.invalid]),G=Sn({ref:y,id:l,role:"combobox",type:f,"aria-controls":F==null?void 0:F.id,"aria-expanded":b===oe.Open,"aria-activedescendant":me(o,o.selectors.activeDescendantId),"aria-labelledby":L,"aria-describedby":$,"aria-autocomplete":"list",defaultValue:(t=(e=n.defaultValue)!=null?e:a.defaultValue!==void 0?c==null?void 0:c(a.defaultValue):null)!=null?t:a.defaultValue,disabled:p||void 0,autoFocus:m,onCompositionStart:_,onCompositionEnd:M,onKeyDown:P,onChange:Y,onFocus:N,onBlur:H},T,k);return ye()({ourProps:G,theirProps:h,slot:J,defaultTag:Np,name:"Combobox.Input"})}let Fp="button";function Lp(n,r){let e=Wn("Combobox.Button"),t=cn("Combobox.Button"),[o,a]=d.useState(null),i=Ce(r,a,e.actions.setButtonElement),s=d.useId(),{id:l=`headlessui-combobox-button-${s}`,disabled:u=t.disabled||!1,autoFocus:c=!1,...p}=n,m=me(e,P=>P.inputElement),f=Ji(m),h=B(P=>{switch(P.key){case se.Space:case se.Enter:P.preventDefault(),P.stopPropagation(),e.state.comboboxState===oe.Closed&&be.flushSync(()=>e.actions.openCombobox()),f();return;case se.ArrowDown:P.preventDefault(),P.stopPropagation(),e.state.comboboxState===oe.Closed&&(be.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:ae.First})),f();return;case se.ArrowUp:P.preventDefault(),P.stopPropagation(),e.state.comboboxState===oe.Closed&&(be.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:ae.Last})),f();return;case se.Escape:if(e.state.comboboxState!==oe.Open)return;P.preventDefault(),e.state.optionsElement&&!t.optionsPropsRef.current.static&&P.stopPropagation(),be.flushSync(()=>e.actions.closeCombobox()),f();return;default:return}}),v=B(P=>{P.preventDefault(),!Oi(P.currentTarget)&&(P.button===da.Left&&(e.state.comboboxState===oe.Open?e.actions.closeCombobox():e.actions.openCombobox()),f())}),g=_n([l]),{isFocusVisible:y,focusProps:w}=ko({autoFocus:c}),{isHovered:b,hoverProps:D}=Eo({isDisabled:u}),{pressed:E,pressProps:C}=xi({disabled:u}),[S,x]=me(e,P=>[P.comboboxState,P.optionsElement]),_=d.useMemo(()=>({open:S===oe.Open,active:E||S===oe.Open,disabled:u,invalid:t.invalid,value:t.value,hover:b,focus:y}),[t,b,y,E,u,S]),M=Sn({ref:i,id:l,type:Zi(n,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":x==null?void 0:x.id,"aria-expanded":S===oe.Open,"aria-labelledby":g,disabled:u||void 0,autoFocus:c,onMouseDown:v,onKeyDown:h},w,D,C);return ye()({ourProps:M,theirProps:p,slot:_,defaultTag:Fp,name:"Combobox.Button"})}let $p="div",Ap=Dt.RenderStrategy|Dt.Static;function Yp(n,r){var e,t,o;let a=d.useId(),{id:i=`headlessui-combobox-options-${a}`,hold:s=!1,anchor:l,portal:u=!1,modal:c=!0,transition:p=!1,...m}=n,f=Wn("Combobox.Options"),h=cn("Combobox.Options"),v=Ps(l);v&&(u=!0);let[g,y]=Fs(v),[w,b]=d.useState(null),D=Is(),E=Ce(r,v?g:null,f.actions.setOptionsElement,b),[C,S,x,_,M]=me(f,re=>[re.comboboxState,re.inputElement,re.buttonElement,re.optionsElement,re.activationTrigger]),P=ut(S||x),Y=ut(_),H=un(),[N,L]=Ho(p,w,H!==null?(H&Me.Open)===Me.Open:C===oe.Open);Io(N,S,f.actions.closeCombobox);let $=h.__demoMode?!1:c&&C===oe.Open;Wo($,Y);let V=h.__demoMode?!1:c&&C===oe.Open;No(V,{allowed:d.useCallback(()=>[S,x,_],[S,x,_])}),ie(()=>{var re;h.optionsPropsRef.current.static=(re=n.static)!=null?re:!1},[h.optionsPropsRef,n.static]),ie(()=>{h.optionsPropsRef.current.hold=s},[h.optionsPropsRef,s]),Jd(C===oe.Open,{container:_,accept(re){return re.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:re.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(re){re.setAttribute("role","none")}});let T=_n([x==null?void 0:x.id]),q=d.useMemo(()=>({open:C===oe.Open,option:void 0}),[C]),k=B(()=>{f.actions.setActivationTrigger(_t.Pointer)}),F=B(re=>{re.preventDefault(),f.actions.setActivationTrigger(_t.Pointer)}),J=Sn(v?D():{},{"aria-labelledby":T,role:"listbox","aria-multiselectable":h.mode===$e.Multi?!0:void 0,id:i,ref:E,style:{...m.style,...y,"--input-width":To(S,!0).width,"--button-width":To(x,!0).width},onWheel:M===_t.Pointer?void 0:k,onMouseDown:F,...jo(L)}),G=N&&C===oe.Closed,W=kr(G,(e=h.virtual)==null?void 0:e.options),te=kr(G,h.value),X=B(re=>h.compare(te,re)),A=d.useMemo(()=>{if(!h.virtual)return h;if(W===void 0)throw new Error("Missing `options` in virtual mode");return W!==h.virtual.options?{...h,virtual:{...h.virtual,options:W}}:h},[h,W,(t=h.virtual)==null?void 0:t.options]);h.virtual&&Object.assign(m,{children:d.createElement(jn.Provider,{value:A},d.createElement(Op,{slot:q},m.children))});let K=ye(),ne=d.useMemo(()=>h.mode===$e.Multi?h:{...h,isSelected:X},[h,X]);return d.createElement(pa,{enabled:u?n.static||N:!1,ownerDocument:P},d.createElement(jn.Provider,{value:ne},K({ourProps:J,theirProps:{...m,children:d.createElement(sp,{freeze:G},typeof m.children=="function"?(o=m.children)==null?void 0:o.call(m,q):m.children)},slot:q,defaultTag:$p,features:Ap,visible:N,name:"Combobox.Options"})))}let Wp="div";function jp(n,r){var e,t,o;let a=cn("Combobox.Option"),i=Wn("Combobox.Option"),s=d.useId(),{id:l=`headlessui-combobox-option-${s}`,value:u,disabled:c=(o=(t=(e=a.virtual)==null?void 0:e.disabled)==null?void 0:t.call(e,u))!=null?o:!1,order:p=null,...m}=n,[f]=me(i,L=>[L.inputElement]),h=Ji(f),v=me(i,d.useCallback(L=>i.selectors.isActive(L,u,l),[u,l])),g=a.isSelected(u),y=d.useRef(null),w=st({disabled:c,value:u,domRef:y,order:p}),b=d.useContext(rl),D=Ce(r,y,b?b.measureElement:null),E=B(()=>{i.actions.setIsTyping(!1),i.actions.onChange(u)});ie(()=>i.actions.registerOption(l,w),[w,l]);let C=me(i,d.useCallback(L=>i.selectors.shouldScrollIntoView(L,u,l),[u,l]));ie(()=>{if(C)return Re().requestAnimationFrame(()=>{var L,$;($=(L=y.current)==null?void 0:L.scrollIntoView)==null||$.call(L,{block:"nearest"})})},[C,y]);let S=B(L=>{L.preventDefault(),L.button===da.Left&&(c||(E(),qi()||requestAnimationFrame(()=>h()),a.mode===$e.Single&&i.actions.closeCombobox()))}),x=B(()=>{if(c)return i.actions.goToOption({focus:ae.Nothing});let L=a.calculateIndex(u);i.actions.goToOption({focus:ae.Specific,idx:L})}),_=ts(),M=B(L=>_.update(L)),P=B(L=>{if(!_.wasMoved(L)||c||v)return;let $=a.calculateIndex(u);i.actions.goToOption({focus:ae.Specific,idx:$},_t.Pointer)}),Y=B(L=>{_.wasMoved(L)&&(c||v&&(a.optionsPropsRef.current.hold||i.actions.goToOption({focus:ae.Nothing})))}),H=d.useMemo(()=>({active:v,focus:v,selected:g,disabled:c}),[v,g,c]),N={id:l,ref:D,role:"option",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:S,onFocus:x,onPointerEnter:M,onMouseEnter:M,onPointerMove:P,onMouseMove:P,onPointerLeave:Y,onMouseLeave:Y};return ye()({ourProps:N,theirProps:m,slot:H,defaultTag:Wp,name:"Combobox.Option"})}let Hp=he(Pp),Rp=he(Lp),ol=he(Ip),Bp=pr,al=he(Yp),il=he(jp),Vp=Object.assign(Hp,{Input:ol,Button:Rp,Label:Bp,Options:al,Option:il});function zp(n,r=typeof document<"u"?document.defaultView:null,e){let t=tn(n,"escape");Yo(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===se.Escape&&e(o))})}function Up(){var n;let[r]=d.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[e,t]=d.useState((n=r==null?void 0:r.matches)!=null?n:!1);return ie(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),e}function Qp({defaultContainers:n=[],portals:r,mainTreeNode:e}={}){let t=ut(e),o=B(()=>{var a,i;let s=[];for(let l of n)l!==null&&(l instanceof HTMLElement?s.push(l):"current"in l&&l.current instanceof HTMLElement&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=t==null?void 0:t.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(e&&(l.contains(e)||l.contains((i=e==null?void 0:e.getRootNode())==null?void 0:i.host))||s.some(u=>l.contains(u))||s.push(l));return s});return{resolveContainers:o,contains:B(a=>o().some(i=>i.contains(a)))}}let sl=d.createContext(null);function ll({children:n,node:r}){let[e,t]=d.useState(null),o=ul(r??e);return d.createElement(sl.Provider,{value:o},n,o===null&&d.createElement(Cn,{features:Zt.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=At(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l!=null&&l.contains(a)){t(l);break}}}}))}function ul(n=null){var r;return(r=d.useContext(sl))!=null?r:n}function ha(){let n=d.useRef(!1);return ie(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Hn=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Hn||{});function Kp(){let n=d.useRef(0);return Gi(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function cl(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)e.current instanceof HTMLElement&&r.add(e.current);return r}let qp="div";var Rt=(n=>(n[n.None=0]="None",n[n.InitialFocus=1]="InitialFocus",n[n.TabLock=2]="TabLock",n[n.FocusLock=4]="FocusLock",n[n.RestoreFocus=8]="RestoreFocus",n[n.AutoFocus=16]="AutoFocus",n))(Rt||{});function Gp(n,r){let e=d.useRef(null),t=Ce(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;Yn()||(s=0);let u=ut(e);em(s,{ownerDocument:u});let c=tm(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});nm(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let p=Kp(),m=B(w=>{let b=e.current;b&&(D=>D())(()=>{Se(p.current,{[Hn.Forwards]:()=>{nn(b,Be.First,{skipElements:[w.relatedTarget,a]})},[Hn.Backwards]:()=>{nn(b,Be.Last,{skipElements:[w.relatedTarget,a]})}})})}),f=tn(!!(s&2),"focus-trap#tab-lock"),h=xt(),v=d.useRef(!1),g={ref:t,onKeyDown(w){w.key=="Tab"&&(v.current=!0,h.requestAnimationFrame(()=>{v.current=!1}))},onBlur(w){if(!(s&4))return;let b=cl(i);e.current instanceof HTMLElement&&b.add(e.current);let D=w.relatedTarget;D instanceof HTMLElement&&D.dataset.headlessuiFocusGuard!=="true"&&(dl(b,D)||(v.current?nn(e.current,Se(p.current,{[Hn.Forwards]:()=>Be.Next,[Hn.Backwards]:()=>Be.Previous})|Be.WrapAround,{relativeTo:w.target}):w.target instanceof HTMLElement&<(w.target)))}},y=ye();return d.createElement(d.Fragment,null,f&&d.createElement(Cn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:Zt.Focusable}),y({ourProps:g,theirProps:l,defaultTag:qp,name:"FocusTrap"}),f&&d.createElement(Cn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:m,features:Zt.Focusable}))}let Xp=he(Gp),Jp=Object.assign(Xp,{features:Rt});function Zp(n=!0){let r=d.useRef(Ge.slice());return Tn(([e],[t])=>{t===!0&&e===!1&&lr(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=Ge.slice())},[n,Ge,r]),B(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function em(n,{ownerDocument:r}){let e=!!(n&8),t=Zp(e);Tn(()=>{e||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&<(t())},[e]),Qs(()=>{e&<(t())})}function tm(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=tn(!!(n&1),"focus-trap#initial-focus"),s=ha();return Tn(()=>{if(n===0)return;if(!i){o!=null&&o.current&<(o.current);return}let l=e.current;l&&lr(()=>{if(!s.current)return;let u=r==null?void 0:r.activeElement;if(t!=null&&t.current){if((t==null?void 0:t.current)===u){a.current=u;return}}else if(l.contains(u)){a.current=u;return}if(t!=null&&t.current)lt(t.current);else{if(n&16){if(nn(l,Be.First|Be.AutoFocus)!==Fo.Error)return}else if(nn(l,Be.First)!==Fo.Error)return;if(o!=null&&o.current&&(lt(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,n]),a}function nm(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=ha(),i=!!(n&4);Yo(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=cl(t);e.current instanceof HTMLElement&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;c&&c instanceof HTMLElement?dl(l,c)?(o.current=c,lt(c)):(s.preventDefault(),s.stopPropagation(),lt(u)):lt(o.current)},!0)}function dl(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function fl(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:ml)!==d.Fragment||d.Children.count(n.children)===1}let _r=d.createContext(null);_r.displayName="TransitionContext";var rm=(n=>(n.Visible="visible",n.Hidden="hidden",n))(rm||{});function om(){let n=d.useContext(_r);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function am(){let n=d.useContext(Mr);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Mr=d.createContext(null);Mr.displayName="NestingContext";function Or(n){return"children"in n?Or(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function pl(n,r){let e=st(n),t=d.useRef([]),o=ha(),a=xt(),i=B((f,h=Et.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===f);v!==-1&&(Se(h,{[Et.Unmount](){t.current.splice(v,1)},[Et.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!Or(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=B(f=>{let h=t.current.find(({el:v})=>v===f);return h?h.state!=="visible"&&(h.state="visible"):t.current.push({el:f,state:"visible"}),()=>i(f,Et.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),p=B((f,h,v)=>{l.current.splice(0),r&&(r.chains.current[h]=r.chains.current[h].filter(([g])=>g!==f)),r==null||r.chains.current[h].push([f,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[h].push([f,new Promise(g=>{Promise.all(c.current[h].map(([y,w])=>w)).then(()=>g())})]),h==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(h)):v(h)}),m=B((f,h,v)=>{Promise.all(c.current[h].splice(0).map(([g,y])=>y)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(h))});return d.useMemo(()=>({children:t,register:s,unregister:i,onStart:p,onStop:m,wait:u,chains:c}),[s,i,t,p,m,c,u])}let ml=d.Fragment,hl=Dt.RenderStrategy;function im(n,r){var e,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:u,enterFrom:c,enterTo:p,entered:m,leave:f,leaveFrom:h,leaveTo:v,...g}=n,[y,w]=d.useState(null),b=d.useRef(null),D=fl(n),E=Ce(...D?[b,r,w]:r===null?[]:[r]),C=(e=g.unmount)==null||e?Et.Unmount:Et.Hidden,{show:S,appear:x,initial:_}=om(),[M,P]=d.useState(S?"visible":"hidden"),Y=am(),{register:H,unregister:N}=Y;ie(()=>H(b),[H,b]),ie(()=>{if(C===Et.Hidden&&b.current){if(S&&M!=="visible"){P("visible");return}return Se(M,{hidden:()=>N(b),visible:()=>H(b)})}},[M,b,H,N,S,C]);let L=Yn();ie(()=>{if(D&&L&&M==="visible"&&b.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[b,M,L,D]);let $=_&&!x,V=x&&S&&_,T=d.useRef(!1),q=pl(()=>{T.current||(P("hidden"),N(b))},Y),k=B(A=>{T.current=!0;let K=A?"enter":"leave";q.onStart(b,K,ne=>{ne==="enter"?a==null||a():ne==="leave"&&(s==null||s())})}),F=B(A=>{let K=A?"enter":"leave";T.current=!1,q.onStop(b,K,ne=>{ne==="enter"?i==null||i():ne==="leave"&&(l==null||l())}),K==="leave"&&!Or(q)&&(P("hidden"),N(b))});d.useEffect(()=>{D&&o||(k(S),F(S))},[S,D,o]);let J=!(!o||!D||!L||$),[,G]=Ho(J,y,S,{start:k,end:F}),W=kt({ref:E,className:((t=Co(g.className,V&&u,V&&c,G.enter&&u,G.enter&&G.closed&&c,G.enter&&!G.closed&&p,G.leave&&f,G.leave&&!G.closed&&h,G.leave&&G.closed&&v,!G.transition&&S&&m))==null?void 0:t.trim())||void 0,...jo(G)}),te=0;M==="visible"&&(te|=Me.Open),M==="hidden"&&(te|=Me.Closed),S&&M==="hidden"&&(te|=Me.Opening),!S&&M==="visible"&&(te|=Me.Closing);let X=ye();return d.createElement(Mr.Provider,{value:q},d.createElement(aa,{value:te},X({ourProps:W,theirProps:g,defaultTag:ml,features:hl,visible:M==="visible",name:"Transition.Child"})))}function sm(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=fl(n),l=Ce(...s?[i,r]:r===null?[]:[r]);Yn();let u=un();if(e===void 0&&u!==null&&(e=(u&Me.Open)===Me.Open),e===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,p]=d.useState(e?"visible":"hidden"),m=pl(()=>{e||p("hidden")}),[f,h]=d.useState(!0),v=d.useRef([e]);ie(()=>{f!==!1&&v.current[v.current.length-1]!==e&&(v.current.push(e),h(!1))},[v,e]);let g=d.useMemo(()=>({show:e,appear:t,initial:f}),[e,t,f]);ie(()=>{e?p("visible"):!Or(m)&&i.current!==null&&p("hidden")},[e,m]);let y={unmount:o},w=B(()=>{var E;f&&h(!1),(E=n.beforeEnter)==null||E.call(n)}),b=B(()=>{var E;f&&h(!1),(E=n.beforeLeave)==null||E.call(n)}),D=ye();return d.createElement(Mr.Provider,{value:m},d.createElement(_r.Provider,{value:g},D({ourProps:{...y,as:d.Fragment,children:d.createElement(vl,{ref:l,...y,...a,beforeEnter:w,beforeLeave:b})},theirProps:{},defaultTag:d.Fragment,features:hl,visible:c==="visible",name:"Transition"})))}function lm(n,r){let e=d.useContext(_r)!==null,t=un()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement(va,{ref:r,...n}):d.createElement(vl,{ref:r,...n}))}let va=he(sm),vl=he(im),ga=he(lm),gl=Object.assign(va,{Child:ga,Root:va});var um=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(um||{}),cm=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(cm||{});let dm={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},ba=d.createContext(null);ba.displayName="DialogContext";function Tr(n){let r=d.useContext(ba);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Tr),e}return r}function fm(n,r){return Se(r.type,dm,n,r)}let bl=he(function(n,r){let e=d.useId(),{id:t=`headlessui-dialog-${e}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:u=!1,unmount:c=!1,...p}=n,m=d.useRef(!1);s=function(){return s==="dialog"||s==="alertdialog"?s:(m.current||(m.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=un();o===void 0&&f!==null&&(o=(f&Me.Open)===Me.Open);let h=d.useRef(null),v=Ce(h,r),g=ut(h),y=o?0:1,[w,b]=d.useReducer(fm,{titleId:null,descriptionId:null,panelRef:d.createRef()}),D=B(()=>a(!1)),E=B(F=>b({type:0,id:F})),C=Yn()?y===0:!1,[S,x]=Ep(),_={get current(){var F;return(F=w.panelRef.current)!=null?F:h.current}},M=ul(),{resolveContainers:P}=Qp({mainTreeNode:M,portals:S,defaultContainers:[_]}),Y=f!==null?(f&Me.Closing)===Me.Closing:!1;No(u||Y?!1:C,{allowed:B(()=>{var F,J;return[(J=(F=h.current)==null?void 0:F.closest("[data-headlessui-portal]"))!=null?J:null]}),disallowed:B(()=>{var F;return[(F=M==null?void 0:M.closest("body > *:not(#headlessui-portal-root)"))!=null?F:null]})}),Ao(C,P,F=>{F.preventDefault(),D()}),zp(C,g==null?void 0:g.defaultView,F=>{F.preventDefault(),F.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),D()}),Wo(u||Y?!1:C,g,P),Io(C,h,D);let[H,N]=cd(),L=d.useMemo(()=>[{dialogState:y,close:D,setTitleId:E,unmount:c},w],[y,w,D,E,c]),$=d.useMemo(()=>({open:y===0}),[y]),V={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:y===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":H,unmount:c},T=!Up(),q=Rt.None;C&&!u&&(q|=Rt.RestoreFocus,q|=Rt.TabLock,l&&(q|=Rt.AutoFocus),T&&(q|=Rt.InitialFocus));let k=ye();return d.createElement(lp,null,d.createElement(qs,{force:!0},d.createElement(pa,null,d.createElement(ba.Provider,{value:L},d.createElement(Js,{target:h},d.createElement(qs,{force:!1},d.createElement(N,{slot:$},d.createElement(x,null,d.createElement(Jp,{initialFocus:i,initialFocusFallback:h,containers:P,features:q},d.createElement(bd,{value:D},k({ourProps:V,theirProps:p,slot:$,defaultTag:pm,features:mm,visible:y===0,name:"Dialog"})))))))))))}),pm="div",mm=Dt.RenderStrategy|Dt.Static;function hm(n,r){let{transition:e=!1,open:t,...o}=n,a=un(),i=n.hasOwnProperty("open")||a!==null,s=n.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 n.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n.open}`);if(typeof n.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n.onClose}`);return(t!==void 0||e)&&!o.static?d.createElement(ll,null,d.createElement(gl,{show:t,transition:e,unmount:o.unmount},d.createElement(bl,{ref:r,...o}))):d.createElement(ll,null,d.createElement(bl,{ref:r,open:t,...o}))}let vm="div";function gm(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Tr("Dialog.Panel"),u=Ce(r,l.panelRef),c=d.useMemo(()=>({open:i===0}),[i]),p=B(g=>{g.stopPropagation()}),m={ref:u,id:t,onClick:p},f=o?ga:d.Fragment,h=o?{unmount:s}:{},v=ye();return d.createElement(f,{...h},v({ourProps:m,theirProps:a,slot:c,defaultTag:vm,name:"Dialog.Panel"}))}let bm="div";function ym(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Tr("Dialog.Backdrop"),i=d.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0},l=e?ga:d.Fragment,u=e?{unmount:a}:{},c=ye();return d.createElement(l,{...u},c({ourProps:s,theirProps:t,slot:i,defaultTag:bm,name:"Dialog.Backdrop"}))}let wm="h2";function xm(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Tr("Dialog.Title"),s=Ce(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=d.useMemo(()=>({open:a===0}),[a]),u={ref:s,id:t};return ye()({ourProps:u,theirProps:o,slot:l,defaultTag:wm,name:"Dialog.Title"})}let Dm=he(hm),yl=he(gm);he(ym);let wl=he(xm),Rn=Object.assign(Dm,{Panel:yl,Title:wl,Description:Ii});function Em(n,r){let e=d.useRef({left:0,top:0});if(ie(()=>{if(!r)return;let o=r.getBoundingClientRect();o&&(e.current=o)},[n,r]),r==null||!n||r===document.activeElement)return!1;let t=r.getBoundingClientRect();return t.top!==e.current.top||t.left!==e.current.left}let xl=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Dl(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!(o instanceof HTMLElement))return t;let a=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),a=!0;let i=a?(e=o.innerText)!=null?e:"":t;return xl.test(i)&&(i=i.replace(xl,"")),i}function km(n){let r=n.getAttribute("aria-label");if(typeof r=="string")return r.trim();let e=n.getAttribute("aria-labelledby");if(e){let t=e.split(" ").map(o=>{let a=document.getElementById(o);if(a){let i=a.getAttribute("aria-label");return typeof i=="string"?i.trim():Dl(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return Dl(n).trim()}function Sm(n){let r=d.useRef(""),e=d.useRef("");return B(()=>{let t=n.current;if(!t)return"";let o=t.innerText;if(r.current===o)return e.current;let a=km(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var Cm=Object.defineProperty,_m=(n,r,e)=>r in n?Cm(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,El=(n,r,e)=>(_m(n,typeof r!="symbol"?r+"":r,e),e),Te=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Te||{}),Xe=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(Xe||{}),ya=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(ya||{}),kl=(n=>(n[n.OpenListbox=0]="OpenListbox",n[n.CloseListbox=1]="CloseListbox",n[n.GoToOption=2]="GoToOption",n[n.Search=3]="Search",n[n.ClearSearch=4]="ClearSearch",n[n.RegisterOptions=5]="RegisterOptions",n[n.UnregisterOptions=6]="UnregisterOptions",n[n.SetButtonElement=7]="SetButtonElement",n[n.SetOptionsElement=8]="SetOptionsElement",n[n.SortOptions=9]="SortOptions",n))(kl||{});function Sl(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=$o(r(n.options.slice()),a=>a.dataRef.current.domRef.current),o=e?t.indexOf(e):null;return o===-1&&(o=null),{options:t,activeOptionIndex:o}}let Mm={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(n){if(n.dataRef.current.disabled||n.listboxState===0)return n;let r=n.activeOptionIndex,{isSelected:e}=n.dataRef.current,t=n.options.findIndex(o=>e(o.dataRef.current.value));return t!==-1&&(r=t),{...n,listboxState:0,activeOptionIndex:r,__demoMode:!1}},2(n,r){var e,t,o,a,i;if(n.dataRef.current.disabled||n.listboxState===1)return n;let s={...n,searchQuery:"",activationTrigger:(e=r.trigger)!=null?e:1,__demoMode:!1};if(r.focus===ae.Nothing)return{...s,activeOptionIndex:null};if(r.focus===ae.Specific)return{...s,activeOptionIndex:n.options.findIndex(c=>c.id===r.id)};if(r.focus===ae.Previous){let c=n.activeOptionIndex;if(c!==null){let p=n.options[c].dataRef.current.domRef,m=An(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=n.options[m].dataRef.current.domRef;if(((t=p.current)==null?void 0:t.previousElementSibling)===f.current||((o=f.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:m}}}}else if(r.focus===ae.Next){let c=n.activeOptionIndex;if(c!==null){let p=n.options[c].dataRef.current.domRef,m=An(r,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:f=>f.id,resolveDisabled:f=>f.dataRef.current.disabled});if(m!==null){let f=n.options[m].dataRef.current.domRef;if(((a=p.current)==null?void 0:a.nextElementSibling)===f.current||((i=f.current)==null?void 0:i.nextElementSibling)===null)return{...s,activeOptionIndex:m}}}}let l=Sl(n),u=An(r,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...s,...l,activeOptionIndex:u}},3:(n,r)=>{if(n.dataRef.current.disabled||n.listboxState===1)return n;let e=n.searchQuery!==""?0:1,t=n.searchQuery+r.value.toLowerCase(),o=(n.activeOptionIndex!==null?n.options.slice(n.activeOptionIndex+e).concat(n.options.slice(0,n.activeOptionIndex+e)):n.options).find(i=>{var s;return!i.dataRef.current.disabled&&((s=i.dataRef.current.textValue)==null?void 0:s.startsWith(t))}),a=o?n.options.indexOf(o):-1;return a===-1||a===n.activeOptionIndex?{...n,searchQuery:t}:{...n,searchQuery:t,activeOptionIndex:a,activationTrigger:1}},4(n){return n.dataRef.current.disabled||n.listboxState===1||n.searchQuery===""?n:{...n,searchQuery:""}},5:(n,r)=>{let e=n.options.concat(r.options),t=n.activeOptionIndex;if(n.activeOptionIndex===null){let{isSelected:o}=n.dataRef.current;if(o){let a=e.findIndex(i=>o==null?void 0:o(i.dataRef.current.value));a!==-1&&(t=a)}}return{...n,options:e,activeOptionIndex:t,pendingShouldSort:!0}},6:(n,r)=>{let e=n.options,t=[],o=new Set(r.options);for(let[a,i]of e.entries())if(o.has(i.id)&&(t.push(a),o.delete(i.id),o.size===0))break;if(t.length>0){e=e.slice();for(let a of t.reverse())e.splice(a,1)}return{...n,options:e,activationTrigger:1}},7:(n,r)=>n.buttonElement===r.element?n:{...n,buttonElement:r.element},8:(n,r)=>n.optionsElement===r.element?n:{...n,optionsElement:r.element},9:n=>n.pendingShouldSort?{...n,...Sl(n),pendingShouldSort:!1}:n};class wa extends Vs{constructor(r){super(r),El(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Se(a,{0:()=>t==null?void 0:t(e),1:()=>{let s=i.slice(),l=s.findIndex(u=>o(u,e));return l===-1?s.push(e):s.splice(l,1),t==null?void 0:t(s)}})},registerOption:ca(()=>{let e=[],t=new Set;return[(o,a)=>{t.has(a)||(t.add(a),e.push({id:o,dataRef:a}))},()=>(t.clear(),this.send({type:5,options:e.splice(0)}))]}),unregisterOption:ca(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:6,options:e.splice(0)})}]}),goToOption:ca(()=>{let e=null;return[(t,o)=>{e={type:2,...t,trigger:o}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:()=>{this.send({type:0})},selectActiveOption:()=>{if(this.state.activeOptionIndex!==null){let{dataRef:e,id:t}=this.state.options[this.state.activeOptionIndex];this.actions.onChange(e.current.value),this.send({type:2,focus:ae.Specific,id:t})}},selectOption:e=>{let t=this.state.options.find(o=>o.id===e);t&&this.actions.onChange(t.dataRef.current.value)},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:7,element:e})},setOptionsElement:e=>{this.send({type:8,element:e})}}),El(this,"selectors",{activeDescendantId(e){var t;let o=e.activeOptionIndex,a=e.options;return o===null||(t=a[o])==null?void 0:t.id},isActive(e,t){var o;let a=e.activeOptionIndex,i=e.options;return a!==null?((o=i[a])==null?void 0:o.id)===t:!1},shouldScrollIntoView(e,t){return e.__demoMode||e.listboxState!==0||e.activationTrigger===0?!1:this.isActive(e,t)}}),this.on(5,()=>{requestAnimationFrame(()=>{this.send({type:9})})})}static new({__demoMode:r=!1}={}){return new wa({dataRef:{current:{}},listboxState:r?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,__demoMode:r})}reduce(r,e){return Se(e.type,Mm,r,e)}}const Cl=d.createContext(null);function xa(n){let r=d.useContext(Cl);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,_l),e}return r}function _l({__demoMode:n=!1}={}){return d.useMemo(()=>wa.new({__demoMode:n}),[])}let Pr=d.createContext(null);Pr.displayName="ListboxDataContext";function Bn(n){let r=d.useContext(Pr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Bn),e}return r}let Om=d.Fragment;function Tm(n,r){let e=ur(),{value:t,defaultValue:o,form:a,name:i,onChange:s,by:l,invalid:u=!1,disabled:c=e||!1,horizontal:p=!1,multiple:m=!1,__demoMode:f=!1,...h}=n;const v=p?"horizontal":"vertical";let g=Ce(r),y=ki(o),[w=m?[]:void 0,b]=Ei(t,s,y),D=_l({__demoMode:f}),E=d.useRef({static:!1,hold:!1}),C=d.useRef(new Map),S=ji(l),x=d.useCallback(k=>Se(_.mode,{[Xe.Multi]:()=>w.some(F=>S(F,k)),[Xe.Single]:()=>S(w,k)}),[w]),_=d.useMemo(()=>({value:w,disabled:c,invalid:u,mode:m?Xe.Multi:Xe.Single,orientation:v,onChange:b,compare:S,isSelected:x,optionsPropsRef:E,listRef:C}),[w,c,u,m,v,b,S,x,E,C]);ie(()=>{D.state.dataRef.current=_},[_]);let M=me(D,k=>k.listboxState),P=M===Te.Open,[Y,H]=me(D,k=>[k.buttonElement,k.optionsElement]);Ao(P,[Y,H],(k,F)=>{D.send({type:kl.CloseListbox}),Qi(F,Lo.Loose)||(k.preventDefault(),Y==null||Y.focus())});let N=d.useMemo(()=>({open:M===Te.Open,disabled:c,invalid:u,value:w}),[M,c,u,w]),[L,$]=Li({inherit:!0}),V={ref:g},T=d.useCallback(()=>{if(y!==void 0)return b==null?void 0:b(y)},[b,y]),q=ye();return d.createElement($,{value:L,props:{htmlFor:Y==null?void 0:Y.id},slot:{open:M===Te.Open,disabled:c}},d.createElement($s,null,d.createElement(Cl.Provider,{value:D},d.createElement(Pr.Provider,{value:_},d.createElement(aa,{value:Se(M,{[Te.Open]:Me.Open,[Te.Closed]:Me.Closed})},i!=null&&w!=null&&d.createElement(Mi,{disabled:c,data:{[i]:w},form:a,onReset:T}),q({ourProps:V,theirProps:h,slot:N,defaultTag:Om,name:"Listbox"}))))))}let Pm="button";function Nm(n,r){let e=d.useId(),t=Mo(),o=Bn("Listbox.Button"),a=xa("Listbox.Button"),{id:i=t||`headlessui-listbox-button-${e}`,disabled:s=o.disabled||!1,autoFocus:l=!1,...u}=n,c=Ce(r,Ns(),a.actions.setButtonElement),p=op(),m=B(N=>{switch(N.key){case se.Enter:td(N.currentTarget);break;case se.Space:case se.ArrowDown:N.preventDefault(),be.flushSync(()=>a.actions.openListbox()),o.value||a.actions.goToOption({focus:ae.First});break;case se.ArrowUp:N.preventDefault(),be.flushSync(()=>a.actions.openListbox()),o.value||a.actions.goToOption({focus:ae.Last});break}}),f=B(N=>{switch(N.key){case se.Space:N.preventDefault();break}}),h=B(N=>{var L;if(N.button===0){if(Oi(N.currentTarget))return N.preventDefault();a.state.listboxState===Te.Open?(be.flushSync(()=>a.actions.closeListbox()),(L=a.state.buttonElement)==null||L.focus({preventScroll:!0})):(N.preventDefault(),a.actions.openListbox())}}),v=B(N=>N.preventDefault()),g=_n([i]),y=Ni(),{isFocusVisible:w,focusProps:b}=ko({autoFocus:l}),{isHovered:D,hoverProps:E}=Eo({isDisabled:s}),{pressed:C,pressProps:S}=xi({disabled:s}),x=me(a,N=>N.listboxState),_=d.useMemo(()=>({open:x===Te.Open,active:C||x===Te.Open,disabled:s,invalid:o.invalid,value:o.value,hover:D,focus:w,autofocus:l}),[x,o.value,s,D,w,C,o.invalid,l]),M=me(a,N=>N.listboxState===Te.Open),[P,Y]=me(a,N=>[N.buttonElement,N.optionsElement]),H=Sn(p(),{ref:c,id:i,type:Zi(n,P),"aria-haspopup":"listbox","aria-controls":Y==null?void 0:Y.id,"aria-expanded":M,"aria-labelledby":g,"aria-describedby":y,disabled:s||void 0,autoFocus:l,onKeyDown:m,onKeyUp:f,onKeyPress:v,onMouseDown:h},b,E,S);return ye()({ourProps:H,theirProps:u,slot:_,defaultTag:Pm,name:"Listbox.Button"})}let Ml=d.createContext(!1),Im="div",Fm=Dt.RenderStrategy|Dt.Static;function Lm(n,r){let e=d.useId(),{id:t=`headlessui-listbox-options-${e}`,anchor:o,portal:a=!1,modal:i=!0,transition:s=!1,...l}=n,u=Ps(o),[c,p]=d.useState(null);u&&(a=!0);let m=Bn("Listbox.Options"),f=xa("Listbox.Options"),[h,v,g,y]=me(f,A=>[A.listboxState,A.buttonElement,A.optionsElement,A.__demoMode]),w=ut(v),b=ut(g),D=un(),[E,C]=Ho(s,c,D!==null?(D&Me.Open)===Me.Open:h===Te.Open);Io(E,v,f.actions.closeListbox);let S=y?!1:i&&h===Te.Open;Wo(S,b);let x=y?!1:i&&h===Te.Open;No(x,{allowed:d.useCallback(()=>[v,g],[v,g])});let _=h!==Te.Open,M=Em(_,v)?!1:E,P=E&&h===Te.Closed,Y=kr(P,m.value),H=B(A=>m.compare(Y,A)),N=me(f,A=>{var K;if(u==null||!((K=u==null?void 0:u.to)!=null&&K.includes("selection")))return null;let ne=A.options.findIndex(re=>H(re.dataRef.current.value));return ne===-1&&(ne=0),ne}),L=(()=>{if(u==null)return;if(N===null)return{...u,inner:void 0};let A=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:A},index:N}}})(),[$,V]=Fs(L),T=Is(),q=Ce(r,u?$:null,f.actions.setOptionsElement,p),k=xt();d.useEffect(()=>{var A;let K=g;K&&h===Te.Open&&K!==((A=At(K))==null?void 0:A.activeElement)&&(K==null||K.focus({preventScroll:!0}))},[h,g]);let F=B(A=>{var K,ne;switch(k.dispose(),A.key){case se.Space:if(f.state.searchQuery!=="")return A.preventDefault(),A.stopPropagation(),f.actions.search(A.key);case se.Enter:if(A.preventDefault(),A.stopPropagation(),f.state.activeOptionIndex!==null){let{dataRef:re}=f.state.options[f.state.activeOptionIndex];f.actions.onChange(re.current.value)}m.mode===Xe.Single&&(be.flushSync(()=>f.actions.closeListbox()),(K=f.state.buttonElement)==null||K.focus({preventScroll:!0}));break;case Se(m.orientation,{vertical:se.ArrowDown,horizontal:se.ArrowRight}):return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:ae.Next});case Se(m.orientation,{vertical:se.ArrowUp,horizontal:se.ArrowLeft}):return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:ae.Previous});case se.Home:case se.PageUp:return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:ae.First});case se.End:case se.PageDown:return A.preventDefault(),A.stopPropagation(),f.actions.goToOption({focus:ae.Last});case se.Escape:A.preventDefault(),A.stopPropagation(),be.flushSync(()=>f.actions.closeListbox()),(ne=f.state.buttonElement)==null||ne.focus({preventScroll:!0});return;case se.Tab:A.preventDefault(),A.stopPropagation(),be.flushSync(()=>f.actions.closeListbox()),jd(f.state.buttonElement,A.shiftKey?Be.Previous:Be.Next);break;default:A.key.length===1&&(f.actions.search(A.key),k.setTimeout(()=>f.actions.clearSearch(),350));break}}),J=me(f,A=>{var K;return(K=A.buttonElement)==null?void 0:K.id}),G=d.useMemo(()=>({open:h===Te.Open}),[h]),W=Sn(u?T():{},{id:t,ref:q,"aria-activedescendant":me(f,f.selectors.activeDescendantId),"aria-multiselectable":m.mode===Xe.Multi?!0:void 0,"aria-labelledby":J,"aria-orientation":m.orientation,onKeyDown:F,role:"listbox",tabIndex:h===Te.Open?0:void 0,style:{...l.style,...V,"--button-width":To(v,!0).width},...jo(C)}),te=ye(),X=d.useMemo(()=>m.mode===Xe.Multi?m:{...m,isSelected:H},[m,H]);return d.createElement(pa,{enabled:a?n.static||E:!1,ownerDocument:w},d.createElement(Pr.Provider,{value:X},te({ourProps:W,theirProps:l,slot:G,defaultTag:Im,features:Fm,visible:M,name:"Listbox.Options"})))}let $m="div";function Am(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(Ml)===!0,l=Bn("Listbox.Option"),u=xa("Listbox.Option"),c=me(u,M=>u.selectors.isActive(M,t)),p=l.isSelected(a),m=d.useRef(null),f=Sm(m),h=st({disabled:o,value:a,domRef:m,get textValue(){return f()}}),v=Ce(r,m,M=>{M?l.listRef.current.set(t,M):l.listRef.current.delete(t)}),g=me(u,M=>u.selectors.shouldScrollIntoView(M,t));ie(()=>{if(g)return Re().requestAnimationFrame(()=>{var M,P;(P=(M=m.current)==null?void 0:M.scrollIntoView)==null||P.call(M,{block:"nearest"})})},[g,m]),ie(()=>{if(!s)return u.actions.registerOption(t,h),()=>u.actions.unregisterOption(t)},[h,t,s]);let y=B(M=>{var P;if(o)return M.preventDefault();u.actions.onChange(a),l.mode===Xe.Single&&(be.flushSync(()=>u.actions.closeListbox()),(P=u.state.buttonElement)==null||P.focus({preventScroll:!0}))}),w=B(()=>{if(o)return u.actions.goToOption({focus:ae.Nothing});u.actions.goToOption({focus:ae.Specific,id:t})}),b=ts(),D=B(M=>{b.update(M),!o&&(c||u.actions.goToOption({focus:ae.Specific,id:t},ya.Pointer))}),E=B(M=>{b.wasMoved(M)&&(o||c||u.actions.goToOption({focus:ae.Specific,id:t},ya.Pointer))}),C=B(M=>{b.wasMoved(M)&&(o||c&&u.actions.goToOption({focus:ae.Nothing}))}),S=d.useMemo(()=>({active:c,focus:c,selected:p,disabled:o,selectedOption:p&&s}),[c,p,o,s]),x=s?{}:{id:t,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":p,disabled:void 0,onClick:y,onFocus:w,onPointerEnter:D,onMouseEnter:D,onPointerMove:E,onMouseMove:E,onPointerLeave:C,onMouseLeave:C},_=ye();return!p&&s?null:_({ourProps:x,theirProps:i,slot:S,defaultTag:$m,name:"Listbox.Option"})}let Ym=d.Fragment;function Wm(n,r){let{options:e,placeholder:t,...o}=n,a={ref:Ce(r)},i=Bn("ListboxSelectedOption"),s=d.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===Xe.Multi&&Array.isArray(i.value)&&i.value.length===0,u=ye();return d.createElement(Ml.Provider,{value:!0},u({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:Ym,name:"ListboxSelectedOption"}))}let jm=he(Tm),Ol=he(Nm),Hm=pr,Tl=he(Lm),Pl=he(Am),Rm=he(Wm),Bm=Object.assign(jm,{Button:Ol,Label:Hm,Options:Tl,Option:Pl,SelectedOption:Rm});var Nl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Il=d.createContext&&d.createContext(Nl),Vm=["attr","size","title"];function zm(n,r){if(n==null)return{};var e=Um(n,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(e[t]=n[t])}return e}function Um(n,r){if(n==null)return{};var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){if(r.indexOf(t)>=0)continue;e[t]=n[t]}return e}function Nr(){return Nr=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},Nr.apply(this,arguments)}function Fl(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,t)}return e}function Ir(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?Fl(Object(e),!0).forEach(function(t){Qm(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Fl(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function Qm(n,r,e){return r=Km(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function Km(n){var r=qm(n,"string");return typeof r=="symbol"?r:r+""}function qm(n,r){if(typeof n!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,r);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}function Ll(n){return n&&n.map((r,e)=>d.createElement(r.tag,Ir({key:e},r.attr),Ll(r.child)))}function Vn(n){return r=>d.createElement(Gm,Nr({attr:Ir({},n.attr)},r),Ll(n.child))}function Gm(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=zm(n,Vm),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",Nr({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:Ir(Ir({color:n.color||e.color},e.style),n.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&d.createElement("title",null,a),n.children)};return Il!==void 0?d.createElement(Il.Consumer,null,e=>r(e)):r(Nl)}function Xm(n){return Vn({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"},child:[]}]})(n)}function $l(n){return Vn({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}const Jm=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return O.jsxs(O.Fragment,{children:[O.jsx(Zm,{isOpen:o,setIsOpen:a,termImageUrl:t}),O.jsxs("div",{className:"inline-flex items-center",children:[O.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[O.jsx("input",{type:"checkbox",className:"before:content[''] border-blue-gray-200 before:bg-blue-gray-500 peer bg-petnow-grey-primary checked:border-petnow-orange-primary checked:bg-petnow-orange-primary checked:before:bg-petnow-orange-primary relative size-6 cursor-pointer appearance-none rounded-xl border transition-all before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity",id:r,checked:n,onChange:i=>{e(i.target.checked)}}),O.jsx("span",{className:"text-petnow-grey-secondary pointer-events-none absolute top-2/4 left-2/4 -translate-x-2/4 -translate-y-2/4 transition peer-checked:text-white",children:O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor",strokeWidth:"1",children:O.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),r&&O.jsxs("div",{className:"flex items-center",children:[O.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),O.jsx(Xm,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},Zm=({isOpen:n,setIsOpen:r,termImageUrl:e})=>O.jsxs(Rn,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[O.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),O.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:O.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:O.jsxs(Rn.Panel,{className:"mx-auto flex max-w-sm flex-col items-center gap-8 rounded-sm bg-white",children:[O.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:O.jsx($l,{size:20,className:"mr-2",onClick:()=>r(!1)})}),O.jsx("img",{src:e,alt:"약관동의 이미지"}),O.jsx(li,{text:"닫기",className:"mb-4 w-[90%] text-base focus:outline-hidden",onClick:()=>r(!1)})]})})})]});var Da=function(n,r){return Da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},Da(n,r)},dn=function(){return dn=Object.assign||function(n){for(var r,e=1,t=arguments.length;e<t;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o]);return n},dn.apply(this,arguments)};function eh(n,r){var e={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0&&(e[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(t=Object.getOwnPropertySymbols(n);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(e[t[o]]=n[t[o]])}return e}var Ea,Al="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",th=(Ea=null,function(n){return n===void 0&&(n=Al),Ea||(Ea=new Promise(function(r,e){var t=document.createElement("script");t.src=n,t.onload=function(){var o;if(!((o=window==null?void 0:window.daum)===null||o===void 0)&&o.Postcode)return r(window.daum.Postcode);e(new Error("Script is loaded successfully, but cannot find Postcode module. Check your scriptURL property."))},t.onerror=function(o){return e(o)},t.id="daum_postcode_script",document.body.appendChild(t)}))}),nh=d.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),rh={width:"100%",height:400},oh={scriptUrl:Al,errorMessage:nh,autoClose:!0},ah=function(n){function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.mounted=!1,e.wrap=d.createRef(),e.state={hasError:!1,completed:!1},e.initiate=function(t){if(e.wrap.current){var o=e.props;o.scriptUrl,o.className,o.style;var a=o.defaultQuery,i=o.autoClose;o.errorMessage;var s=o.onComplete,l=o.onClose,u=o.onResize,c=o.onSearch,p=eh(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new t(dn(dn({},p),{oncomplete:function(m){s&&s(m),e.setState({completed:!0})},onsearch:c,onresize:u,onclose:l,width:"100%",height:"100%"})).embed(e.wrap.current,{q:a,autoClose:i})}},e.onError=function(t){console.error(t),e.setState({hasError:!0})},e}return function(e,t){function o(){this.constructor=e}Da(e,t),e.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}(r,n),r.prototype.componentDidMount=function(){var e=this.initiate,t=this.onError,o=this.props.scriptUrl;o&&(this.mounted||(th(o).then(e).catch(t),this.mounted=!0))},r.prototype.render=function(){var e=this.props,t=e.className,o=e.style,a=e.errorMessage,i=e.autoClose,s=this.state,l=s.hasError,u=s.completed;return i===!0&&u===!0?null:d.createElement("div",{ref:this.wrap,className:t,style:dn(dn({},rh),o)},l&&a)},r.defaultProps=oh,r}(d.Component);const ih=({label:n,value:r,onFrontChange:e,onBackChange:t,onPostalCodeChange:o,disabled:a})=>{const[i,s]=d.useState(!1),l=p=>{let m=p.address,f="";p.addressType==="R"&&(p.bname!==""&&(f+=p.bname),p.buildingName!==""&&(f+=f!==""?`, ${p.buildingName}`:p.buildingName),m+=f!==""?` (${f})`:""),e(m),o&&o(p.zonecode),s(!1)},u=()=>{s(!0)},c=()=>r.front?r.front:O.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return O.jsxs(O.Fragment,{children:[O.jsx(sh,{isOpen:i,setIsOpen:s,handleComplete:l}),O.jsxs("div",{className:"text-petnow-grey-tertiary",children:[O.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),O.jsxs("div",{className:"relative flex flex-col",children:[O.jsx("div",{className:`bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full cursor-pointer overflow-hidden rounded-xl p-4 text-base whitespace-nowrap focus:outline-hidden ${a&&"opacity-50"}`,onClick:u,children:c()}),O.jsx("input",{disabled:!r.front||a,value:r.back,type:"text",name:n,id:n,placeholder:"상세 주소를 입력해주세요.",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 h-[60px] w-full rounded-xl p-4 text-base focus:outline-hidden disabled:opacity-50",autoComplete:"off",onChange:p=>t(p.target.value)})]})]})]})},sh=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return O.jsx(Rn,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:O.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:O.jsx(Rn.Panel,{children:O.jsxs("div",{children:[O.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>e(!1),children:O.jsx($l,{size:24,onClick:()=>e(!1)})}),O.jsx(ah,{onComplete:t,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})},lh=n=>{const{isOpen:r,setIsOpen:e}=n;return O.jsx(gl,{show:r,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:O.jsxs(Rn,{onClose:()=>e(!1),className:"relative z-50 focus:outline-hidden",children:[O.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),O.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:O.jsxs(yl,{className:"flex w-[260px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]",children:[O.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.title&&O.jsx(wl,{className:"text-[18px] leading-[26px] font-bold whitespace-pre-wrap text-black",children:n.title}),n.image&&O.jsx("img",{src:n.image.url,alt:n.image.alt}),n.description&&n.description!==""&&O.jsx(Ii,{className:"text-petnow-grey-tertiary text-[16px] leading-[24px] break-all",children:n.description})]}),O.jsxs("div",{className:"flex flex-col gap-[8px]",children:[O.jsx("button",{className:"bg-petnow-orange-primary sm:hover:bg-petnow-orange-40 w-full cursor-pointer rounded-[12px] px-[12px] py-[14px] text-[14px] leading-[22px] font-bold text-white transition duration-200",onClick:n.confirm.onClick,children:n.confirm.text}),n.cancel&&O.jsx("button",{onClick:()=>e(!1),className:"bg-background-tertiary sm:hover:bg-petnow-grey-90 text-petnow-grey-tertiary w-full cursor-pointer rounded-[12px] px-[12px] py-[14px] text-[14px] leading-[22px] font-bold transition duration-200",children:n.cancel.text})]})]})})]})})};function uh(n){return Vn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"},child:[]}]})(n)}function ch(n){return Vn({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z"},child:[]}]})(n)}const dh=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return O.jsxs("div",{className:"my-2.5 flex w-full cursor-pointer flex-col justify-center rounded-xl px-4 pt-8 shadow-[0_2px_8px_0_rgba(0,0,0,0.08)] md:rounded-2xl md:pt-10",onClick:()=>a(i=>!i),children:[O.jsxs("div",{className:"flex w-full items-center justify-between px-2 pb-8 transition-all duration-300 md:px-4 md:pb-10",children:[O.jsxs("p",{className:or("mr-4 text-lg font-medium md:text-xl",e),children:[O.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?O.jsx(ch,{className:"text-petnow-orange-primary min-w-6",size:24}):O.jsx(uh,{className:"text-petnow-orange-primary min-w-6",size:24})]}),O.jsx("p",{className:or(`text-petnow-grey-secondary w-full overflow-hidden px-2 text-base leading-6 whitespace-pre-wrap transition-all duration-300 md:px-4 md:text-lg ${o?"max-h-[24rem] pb-8 sm:max-h-60 md:pb-10":"max-h-0"}`,t),children:r})]})},Yl=6048e5,fh=864e5,Fr=6e4,Lr=36e5,ph=1e3,Wl=Symbol.for("constructDateFrom");function fe(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&Wl in n?n[Wl](r):n instanceof Date?new n.constructor(r):new Date(r)}function Q(n,r){return fe(r||n,n)}function ze(n,r,e){const t=Q(n,e==null?void 0:e.in);return isNaN(r)?fe((e==null?void 0:e.in)||n,NaN):(r&&t.setDate(t.getDate()+r),t)}function Ue(n,r,e){const t=Q(n,e==null?void 0:e.in);if(isNaN(r))return fe(n,NaN);if(!r)return t;const o=t.getDate(),a=fe(n,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 jl(n,r,e){return fe(n,+Q(n)+r)}function mh(n,r,e){return jl(n,r*Lr)}let hh={};function Bt(){return hh}function ft(n,r){var s,l,u,c;const e=Bt(),t=(r==null?void 0:r.weekStartsOn)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=Q(n,r==null?void 0: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 fn(n,r){return ft(n,{...r,weekStartsOn:1})}function Hl(n,r){const e=Q(n,r==null?void 0:r.in),t=e.getFullYear(),o=fe(e,0);o.setFullYear(t+1,0,4),o.setHours(0,0,0,0);const a=fn(o),i=fe(e,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=fn(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function $r(n){const r=Q(n),e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),+n-+e}function pt(n,...r){const e=fe.bind(null,r.find(t=>typeof t=="object"));return r.map(e)}function Vt(n,r){const e=Q(n,r==null?void 0:r.in);return e.setHours(0,0,0,0),e}function pn(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r),a=Vt(t),i=Vt(o),s=+a-$r(a),l=+i-$r(i);return Math.round((s-l)/fh)}function vh(n,r){const e=Hl(n,r),t=fe(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),fn(t)}function ka(n,r,e){const t=Q(n,e==null?void 0:e.in);return t.setTime(t.getTime()+r*Fr),t}function Sa(n,r,e){return Ue(n,r*3,e)}function gh(n,r,e){return jl(n,r*1e3)}function Ar(n,r,e){return ze(n,r*7,e)}function mt(n,r,e){return Ue(n,r*12,e)}function Rl(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=fe.bind(null,o));const a=Q(o,t);(!e||e<a||isNaN(+a))&&(e=a)}),fe(t,e||NaN)}function Bl(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=fe.bind(null,o));const a=Q(o,t);(!e||e>a||isNaN(+a))&&(e=a)}),fe(t,e||NaN)}function bh(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r);return+Vt(t)==+Vt(o)}function ht(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Yr(n){return!(!ht(n)&&typeof n!="number"||isNaN(+Q(n)))}function Wr(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function zt(n,r){const e=Q(n,r==null?void 0:r.in);return Math.trunc(e.getMonth()/3)+1}function jr(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=zt(t)-zt(o);return a*4+i}function Hr(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r);return t.getFullYear()-o.getFullYear()}function yh(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r),a=Vl(t,o),i=Math.abs(pn(t,o));t.setDate(t.getDate()-a*i);const s=+(Vl(t,o)===-a),l=a*(i-s);return l===0?0:l}function Vl(n,r){const e=n.getFullYear()-r.getFullYear()||n.getMonth()-r.getMonth()||n.getDate()-r.getDate()||n.getHours()-r.getHours()||n.getMinutes()-r.getMinutes()||n.getSeconds()-r.getSeconds()||n.getMilliseconds()-r.getMilliseconds();return e<0?-1:e>0?1:e}function zl(n,r){const e=Q(n,r==null?void 0:r.in);return e.setHours(23,59,59,999),e}function Ul(n,r){const e=Q(n,r==null?void 0:r.in),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function Ca(n,r){const e=Q(n,r==null?void 0:r.in),t=e.getMonth(),o=t-t%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}function Ql(n,r){const e=Q(n,r==null?void 0:r.in);return e.setDate(1),e.setHours(0,0,0,0),e}function Kl(n,r){const e=Q(n,r==null?void 0:r.in),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function Rr(n,r){const e=Q(n,r==null?void 0:r.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function wh(n,r){var s,l;const e=Bt(),t=e.weekStartsOn??((l=(s=e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=Q(n,r==null?void 0: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 xh={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"}},Dh=(n,r,e)=>{let t;const o=xh[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+t:t+" ago":t};function mn(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Eh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Sh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ch={date:mn({formats:Eh,defaultWidth:"full"}),time:mn({formats:kh,defaultWidth:"full"}),dateTime:mn({formats:Sh,defaultWidth:"full"})},_h={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Mh=(n,r,e,t)=>_h[n];function Je(n){return(r,e)=>{const t=e!=null&&e.context?String(e.context):"standalone";let o;if(t==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,s=e!=null&&e.width?String(e.width):i;o=n.formattingValues[s]||n.formattingValues[i]}else{const i=n.defaultWidth,s=e!=null&&e.width?String(e.width):n.defaultWidth;o=n.values[s]||n.values[i]}const a=n.argumentCallback?n.argumentCallback(r):r;return o[a]}}const Oh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Th={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ph={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"]},Nh={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"]},Ih={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"}},Fh={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"}},Lh={ordinalNumber:(n,r)=>{const e=Number(n),t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Je({values:Oh,defaultWidth:"wide"}),quarter:Je({values:Th,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Je({values:Ph,defaultWidth:"wide"}),day:Je({values:Nh,defaultWidth:"wide"}),dayPeriod:Je({values:Ih,defaultWidth:"wide",formattingValues:Fh,defaultFormattingWidth:"wide"})};function Ze(n){return(r,e={})=>{const t=e.width,o=t&&n.matchPatterns[t]||n.matchPatterns[n.defaultMatchWidth],a=r.match(o);if(!a)return null;const i=a[0],s=t&&n.parsePatterns[t]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(s)?Ah(s,p=>p.test(i)):$h(s,p=>p.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=r.slice(i.length);return{value:u,rest:c}}}function $h(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function Ah(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function ql(n){return(r,e={})=>{const t=r.match(n.matchPattern);if(!t)return null;const o=t[0],a=r.match(n.parsePattern);if(!a)return null;let i=n.valueCallback?n.valueCallback(a[0]):a[0];i=e.valueCallback?e.valueCallback(i):i;const s=r.slice(o.length);return{value:i,rest:s}}}const Yh=/^(\d+)(th|st|nd|rd)?/i,Wh=/\d+/i,jh={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},Hh={any:[/^b/i,/^(a|c)/i]},Rh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Bh={any:[/1/i,/2/i,/3/i,/4/i]},Vh={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},zh={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]},Uh={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},Qh={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]},Kh={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},qh={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}},Gh={ordinalNumber:ql({matchPattern:Yh,parsePattern:Wh,valueCallback:n=>parseInt(n,10)}),era:Ze({matchPatterns:jh,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Rh,defaultMatchWidth:"wide",parsePatterns:Bh,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ze({matchPatterns:Vh,defaultMatchWidth:"wide",parsePatterns:zh,defaultParseWidth:"any"}),day:Ze({matchPatterns:Uh,defaultMatchWidth:"wide",parsePatterns:Qh,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Kh,defaultMatchWidth:"any",parsePatterns:qh,defaultParseWidth:"any"})},Gl={code:"en-US",formatDistance:Dh,formatLong:Ch,formatRelative:Mh,localize:Lh,match:Gh,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xh(n,r){const e=Q(n,r==null?void 0:r.in);return pn(e,Rr(e))+1}function _a(n,r){const e=Q(n,r==null?void 0:r.in),t=+fn(e)-+vh(e);return Math.round(t/Yl)+1}function Ma(n,r){var c,p,m,f;const e=Q(n,r==null?void 0:r.in),t=e.getFullYear(),o=Bt(),a=(r==null?void 0:r.firstWeekContainsDate)??((p=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:p.firstWeekContainsDate)??o.firstWeekContainsDate??((f=(m=o.locale)==null?void 0:m.options)==null?void 0:f.firstWeekContainsDate)??1,i=fe((r==null?void 0:r.in)||n,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=ft(i,r),l=fe((r==null?void 0:r.in)||n,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const u=ft(l,r);return+e>=+s?t+1:+e>=+u?t:t-1}function Jh(n,r){var s,l,u,c;const e=Bt(),t=(r==null?void 0:r.firstWeekContainsDate)??((l=(s=r==null?void 0:r.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=Ma(n,r),a=fe((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),ft(a,r)}function Xl(n,r){const e=Q(n,r==null?void 0:r.in),t=+ft(e,r)-+Jh(e,r);return Math.round(t/Yl)+1}function pe(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const Mt={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return pe(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):pe(e+1,2)},d(n,r){return pe(n.getDate(),r.length)},a(n,r){const e=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,r){return pe(n.getHours()%12||12,r.length)},H(n,r){return pe(n.getHours(),r.length)},m(n,r){return pe(n.getMinutes(),r.length)},s(n,r){return pe(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),o=Math.trunc(t*Math.pow(10,e-3));return pe(o,r.length)}},hn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jl={G:function(n,r,e){const t=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return e.era(t,{width:"abbreviated"});case"GGGGG":return e.era(t,{width:"narrow"});case"GGGG":default:return e.era(t,{width:"wide"})}},y:function(n,r,e){if(r==="yo"){const t=n.getFullYear(),o=t>0?t:1-t;return e.ordinalNumber(o,{unit:"year"})}return Mt.y(n,r)},Y:function(n,r,e,t){const o=Ma(n,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return pe(i,2)}return r==="Yo"?e.ordinalNumber(a,{unit:"year"}):pe(a,r.length)},R:function(n,r){const e=Hl(n);return pe(e,r.length)},u:function(n,r){const e=n.getFullYear();return pe(e,r.length)},Q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(t);case"QQ":return pe(t,2);case"Qo":return e.ordinalNumber(t,{unit:"quarter"});case"QQQ":return e.quarter(t,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(t,{width:"wide",context:"formatting"})}},q:function(n,r,e){const t=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(t);case"qq":return pe(t,2);case"qo":return e.ordinalNumber(t,{unit:"quarter"});case"qqq":return e.quarter(t,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(t,{width:"wide",context:"standalone"})}},M:function(n,r,e){const t=n.getMonth();switch(r){case"M":case"MM":return Mt.M(n,r);case"Mo":return e.ordinalNumber(t+1,{unit:"month"});case"MMM":return e.month(t,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(t,{width:"wide",context:"formatting"})}},L:function(n,r,e){const t=n.getMonth();switch(r){case"L":return String(t+1);case"LL":return pe(t+1,2);case"Lo":return e.ordinalNumber(t+1,{unit:"month"});case"LLL":return e.month(t,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(t,{width:"wide",context:"standalone"})}},w:function(n,r,e,t){const o=Xl(n,t);return r==="wo"?e.ordinalNumber(o,{unit:"week"}):pe(o,r.length)},I:function(n,r,e){const t=_a(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):pe(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Mt.d(n,r)},D:function(n,r,e){const t=Xh(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):pe(t,r.length)},E:function(n,r,e){const t=n.getDay();switch(r){case"E":case"EE":case"EEE":return e.day(t,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(t,{width:"short",context:"formatting"});case"EEEE":default:return e.day(t,{width:"wide",context:"formatting"})}},e:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return pe(a,2);case"eo":return e.ordinalNumber(a,{unit:"day"});case"eee":return e.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(o,{width:"short",context:"formatting"});case"eeee":default:return e.day(o,{width:"wide",context:"formatting"})}},c:function(n,r,e,t){const o=n.getDay(),a=(o-t.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return pe(a,r.length);case"co":return e.ordinalNumber(a,{unit:"day"});case"ccc":return e.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(o,{width:"narrow",context:"standalone"});case"cccccc":return e.day(o,{width:"short",context:"standalone"});case"cccc":default:return e.day(o,{width:"wide",context:"standalone"})}},i:function(n,r,e){const t=n.getDay(),o=t===0?7:t;switch(r){case"i":return String(o);case"ii":return pe(o,r.length);case"io":return e.ordinalNumber(o,{unit:"day"});case"iii":return e.day(t,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(t,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(t,{width:"short",context:"formatting"});case"iiii":default:return e.day(t,{width:"wide",context:"formatting"})}},a:function(n,r,e){const o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,r,e){const t=n.getHours();let o;switch(t===12?o=hn.noon:t===0?o=hn.midnight:o=t/12>=1?"pm":"am",r){case"b":case"bb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,r,e){const t=n.getHours();let o;switch(t>=17?o=hn.evening:t>=12?o=hn.afternoon:t>=4?o=hn.morning:o=hn.night,r){case"B":case"BB":case"BBB":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,r,e){if(r==="ho"){let t=n.getHours()%12;return t===0&&(t=12),e.ordinalNumber(t,{unit:"hour"})}return Mt.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Mt.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):pe(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):pe(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Mt.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Mt.s(n,r)},S:function(n,r){return Mt.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return eu(t);case"XXXX":case"XX":return Ut(t);case"XXXXX":case"XXX":default:return Ut(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return eu(t);case"xxxx":case"xx":return Ut(t);case"xxxxx":case"xxx":default:return Ut(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Zl(t,":");case"OOOO":default:return"GMT"+Ut(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Zl(t,":");case"zzzz":default:return"GMT"+Ut(t,":")}},t:function(n,r,e){const t=Math.trunc(+n/1e3);return pe(t,r.length)},T:function(n,r,e){return pe(+n,r.length)}};function Zl(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=Math.trunc(t/60),a=t%60;return a===0?e+String(o):e+String(o)+r+pe(a,2)}function eu(n,r){return n%60===0?(n>0?"-":"+")+pe(Math.abs(n)/60,2):Ut(n,r)}function Ut(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=pe(Math.trunc(t/60),2),a=pe(t%60,2);return e+o+r+a}const tu=(n,r)=>{switch(n){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"})}},nu=(n,r)=>{switch(n){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"})}},Oa={p:nu,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return tu(n,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;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",tu(t,r)).replace("{{time}}",nu(o,r))}},Zh=/^D+$/,ev=/^Y+$/,tv=["D","DD","YY","YYYY"];function nv(n){return Zh.test(n)}function rv(n){return ev.test(n)}function ov(n,r,e){const t=av(n,r,e);if(console.warn(t),tv.includes(n))throw new RangeError(t)}function av(n,r,e){const t=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${t} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const iv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lv=/^'([^]*?)'?$/,uv=/''/g,cv=/[a-zA-Z]/;function ru(n,r,e){var c,p,m,f,h,v,g,y;const t=Bt(),o=(e==null?void 0:e.locale)??t.locale??Gl,a=(e==null?void 0:e.firstWeekContainsDate)??((p=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:p.firstWeekContainsDate)??t.firstWeekContainsDate??((f=(m=t.locale)==null?void 0:m.options)==null?void 0:f.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((v=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:v.weekStartsOn)??t.weekStartsOn??((y=(g=t.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=Q(n,e==null?void 0:e.in);if(!Yr(s))throw new RangeError("Invalid time value");let l=r.match(sv).map(w=>{const b=w[0];if(b==="p"||b==="P"){const D=Oa[b];return D(w,o.formatLong)}return w}).join("").match(iv).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const b=w[0];if(b==="'")return{isToken:!1,value:dv(w)};if(Jl[b])return{isToken:!0,value:w};if(b.match(cv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const b=w.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&rv(b)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&nv(b))&&ov(b,r,String(n));const D=Jl[b[0]];return D(s,b,o.localize,u)}).join("")}function dv(n){const r=n.match(lv);return r?r[1].replace(uv,"'"):n}function ou(n,r){return Q(n,r==null?void 0:r.in).getDate()}function fv(n,r){return Q(n,r==null?void 0:r.in).getDay()}function pv(n,r){const e=Q(n,r==null?void 0:r.in),t=e.getFullYear(),o=e.getMonth(),a=fe(e,0);return a.setFullYear(t,o+1,0),a.setHours(0,0,0,0),a.getDate()}function mv(){return Object.assign({},Bt())}function vt(n,r){return Q(n,r==null?void 0:r.in).getHours()}function hv(n,r){const e=Q(n,r==null?void 0:r.in).getDay();return e===0?7:e}function gt(n,r){return Q(n,r==null?void 0:r.in).getMinutes()}function Ie(n,r){return Q(n,r==null?void 0:r.in).getMonth()}function Ot(n){return Q(n).getSeconds()}function Ta(n){return+Q(n)}function Z(n,r){return Q(n,r==null?void 0:r.in).getFullYear()}function Tt(n,r){return+Q(n)>+Q(r)}function Qt(n,r){return+Q(n)<+Q(r)}function vv(n,r){return+Q(n)==+Q(r)}function gv(n,r){const e=bv(r)?new r(0):fe(r,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function bv(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const yv=10;class au{constructor(){R(this,"subPriority",0)}validate(r,e){return!0}}class wv extends au{constructor(r,e,t,o,a){super(),this.value=r,this.validateValue=e,this.setValue=t,this.priority=o,a&&(this.subPriority=a)}validate(r,e){return this.validateValue(r,this.value,e)}set(r,e,t){return this.setValue(r,e,this.value,t)}}class xv extends au{constructor(e,t){super();R(this,"priority",yv);R(this,"subPriority",-1);this.context=e||(o=>fe(t,o))}set(e,t){return t.timestampIsSet?e:fe(e,gv(e,this.context))}}class ce{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new wv(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class Dv extends ce{constructor(){super(...arguments);R(this,"priority",140);R(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,o){switch(t){case"G":case"GG":case"GGG":return o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"});case"GGGGG":return o.era(e,{width:"narrow"});case"GGGG":default:return o.era(e,{width:"wide"})||o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"})}}set(e,t,o){return t.era=o,e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}const Ee={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}/},et={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 ke(n,r){return n&&{value:r(n.value),rest:n.rest}}function we(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function tt(n,r){const e=r.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:r.slice(1)};const t=e[1]==="+"?1:-1,o=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,i=e[5]?parseInt(e[5],10):0;return{value:t*(o*Lr+a*Fr+i*ph),rest:r.slice(e[0].length)}}function iu(n){return we(Ee.anyDigitsSigned,n)}function xe(n,r){switch(n){case 1:return we(Ee.singleDigit,r);case 2:return we(Ee.twoDigits,r);case 3:return we(Ee.threeDigits,r);case 4:return we(Ee.fourDigits,r);default:return we(new RegExp("^\\d{1,"+n+"}"),r)}}function Br(n,r){switch(n){case 1:return we(Ee.singleDigitSigned,r);case 2:return we(Ee.twoDigitsSigned,r);case 3:return we(Ee.threeDigitsSigned,r);case 4:return we(Ee.fourDigitsSigned,r);default:return we(new RegExp("^-?\\d{1,"+n+"}"),r)}}function Pa(n){switch(n){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 su(n,r){const e=r>0,t=e?r:1-r;let o;if(t<=50)o=n||100;else{const a=t+50,i=Math.trunc(a/100)*100,s=n>=a%100;o=n+i-(s?100:0)}return e?o:1-o}function lu(n){return n%400===0||n%4===0&&n%100!==0}class Ev extends ce{constructor(){super(...arguments);R(this,"priority",130);R(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return ke(xe(4,e),a);case"yo":return ke(o.ordinalNumber(e,{unit:"year"}),a);default:return ke(xe(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o){const a=e.getFullYear();if(o.isTwoDigitYear){const s=su(o.year,a);return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}const i=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class kv extends ce{constructor(){super(...arguments);R(this,"priority",130);R(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,t,o){const a=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return ke(xe(4,e),a);case"Yo":return ke(o.ordinalNumber(e,{unit:"year"}),a);default:return ke(xe(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=Ma(e,a);if(o.isTwoDigitYear){const l=su(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),ft(e,a)}const s=!("era"in t)||t.era===1?o.year:1-o.year;return e.setFullYear(s,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),ft(e,a)}}class Sv extends ce{constructor(){super(...arguments);R(this,"priority",130);R(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return Br(t==="R"?4:t.length,e)}set(e,t,o){const a=fe(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),fn(a)}}class Cv extends ce{constructor(){super(...arguments);R(this,"priority",130);R(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return Br(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class _v extends ce{constructor(){super(...arguments);R(this,"priority",120);R(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"Q":case"QQ":return xe(t.length,e);case"Qo":return o.ordinalNumber(e,{unit:"quarter"});case"QQQ":return o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(e,{width:"wide",context:"formatting"})||o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class Mv extends ce{constructor(){super(...arguments);R(this,"priority",120);R(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"q":case"qq":return xe(t.length,e);case"qo":return o.ordinalNumber(e,{unit:"quarter"});case"qqq":return o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(e,{width:"wide",context:"standalone"})||o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class Ov extends ce{constructor(){super(...arguments);R(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);R(this,"priority",110)}parse(e,t,o){const a=i=>i-1;switch(t){case"M":return ke(we(Ee.month,e),a);case"MM":return ke(xe(2,e),a);case"Mo":return ke(o.ordinalNumber(e,{unit:"month"}),a);case"MMM":return o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(e,{width:"wide",context:"formatting"})||o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}class Tv extends ce{constructor(){super(...arguments);R(this,"priority",110);R(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,t,o){const a=i=>i-1;switch(t){case"L":return ke(we(Ee.month,e),a);case"LL":return ke(xe(2,e),a);case"Lo":return ke(o.ordinalNumber(e,{unit:"month"}),a);case"LLL":return o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(e,{width:"wide",context:"standalone"})||o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}function Pv(n,r,e){const t=Q(n,e==null?void 0:e.in),o=Xl(t,e)-r;return t.setDate(t.getDate()-o*7),Q(t,e==null?void 0:e.in)}class Nv extends ce{constructor(){super(...arguments);R(this,"priority",100);R(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,o){switch(t){case"w":return we(Ee.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return xe(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return ft(Pv(e,o,a),a)}}function Iv(n,r,e){const t=Q(n,e==null?void 0:e.in),o=_a(t,e)-r;return t.setDate(t.getDate()-o*7),t}class Fv extends ce{constructor(){super(...arguments);R(this,"priority",100);R(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,t,o){switch(t){case"I":return we(Ee.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return xe(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return fn(Iv(e,o))}}const Lv=[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 Av extends ce{constructor(){super(...arguments);R(this,"priority",90);R(this,"subPriority",1);R(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"d":return we(Ee.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return xe(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=lu(o),i=e.getMonth();return a?t>=1&&t<=$v[i]:t>=1&&t<=Lv[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class Yv extends ce{constructor(){super(...arguments);R(this,"priority",90);R(this,"subpriority",1);R(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,t,o){switch(t){case"D":case"DD":return we(Ee.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return xe(t.length,e)}}validate(e,t){const o=e.getFullYear();return lu(o)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,o){return e.setMonth(0,o),e.setHours(0,0,0,0),e}}function Na(n,r,e){var p,m,f,h;const t=Bt(),o=(e==null?void 0:e.weekStartsOn)??((m=(p=e==null?void 0:e.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??t.weekStartsOn??((h=(f=t.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Q(n,e==null?void 0:e.in),i=a.getDay(),l=(r%7+7)%7,u=7-o,c=r<0||r>6?r-(i+u)%7:(l+u)%7-(i+u)%7;return ze(a,c,e)}class Wv extends ce{constructor(){super(...arguments);R(this,"priority",90);R(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"E":case"EE":case"EEE":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Na(e,o,a),e.setHours(0,0,0,0),e}}class jv extends ce{constructor(){super(...arguments);R(this,"priority",90);R(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"e":case"ee":return ke(xe(t.length,e),i);case"eo":return ke(o.ordinalNumber(e,{unit:"day"}),i);case"eee":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeeee":return o.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Na(e,o,a),e.setHours(0,0,0,0),e}}class Hv extends ce{constructor(){super(...arguments);R(this,"priority",90);R(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,t,o,a){const i=s=>{const l=Math.floor((s-1)/7)*7;return(s+a.weekStartsOn+6)%7+l};switch(t){case"c":case"cc":return ke(xe(t.length,e),i);case"co":return ke(o.ordinalNumber(e,{unit:"day"}),i);case"ccc":return o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"ccccc":return o.day(e,{width:"narrow",context:"standalone"});case"cccccc":return o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(e,{width:"wide",context:"standalone"})||o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,o,a){return e=Na(e,o,a),e.setHours(0,0,0,0),e}}function Rv(n,r,e){const t=Q(n,e==null?void 0:e.in),o=hv(t,e),a=r-o;return ze(t,a,e)}class Bv extends ce{constructor(){super(...arguments);R(this,"priority",90);R(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,t,o){const a=i=>i===0?7:i;switch(t){case"i":case"ii":return xe(t.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return ke(o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return ke(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return ke(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return ke(o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,t){return t>=1&&t<=7}set(e,t,o){return e=Rv(e,o),e.setHours(0,0,0,0),e}}class Vv extends ce{constructor(){super(...arguments);R(this,"priority",80);R(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,o){switch(t){case"a":case"aa":case"aaa":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Pa(o),0,0,0),e}}class zv extends ce{constructor(){super(...arguments);R(this,"priority",80);R(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,o){switch(t){case"b":case"bb":case"bbb":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Pa(o),0,0,0),e}}class Uv extends ce{constructor(){super(...arguments);R(this,"priority",80);R(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,o){switch(t){case"B":case"BB":case"BBB":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,o){return e.setHours(Pa(o),0,0,0),e}}class Qv extends ce{constructor(){super(...arguments);R(this,"priority",70);R(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return we(Ee.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return xe(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,o){const a=e.getHours()>=12;return a&&o<12?e.setHours(o+12,0,0,0):!a&&o===12?e.setHours(0,0,0,0):e.setHours(o,0,0,0),e}}class Kv extends ce{constructor(){super(...arguments);R(this,"priority",70);R(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,o){switch(t){case"H":return we(Ee.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return xe(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class qv extends ce{constructor(){super(...arguments);R(this,"priority",70);R(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return we(Ee.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return xe(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,o){return e.getHours()>=12&&o<12?e.setHours(o+12,0,0,0):e.setHours(o,0,0,0),e}}class Gv extends ce{constructor(){super(...arguments);R(this,"priority",70);R(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,o){switch(t){case"k":return we(Ee.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return xe(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,o){const a=o<=24?o%24:o;return e.setHours(a,0,0,0),e}}class Xv extends ce{constructor(){super(...arguments);R(this,"priority",60);R(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return we(Ee.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return xe(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class Jv extends ce{constructor(){super(...arguments);R(this,"priority",50);R(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return we(Ee.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return xe(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class Zv extends ce{constructor(){super(...arguments);R(this,"priority",30);R(this,"incompatibleTokens",["t","T"])}parse(e,t){const o=a=>Math.trunc(a*Math.pow(10,-t.length+3));return ke(xe(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class eg extends ce{constructor(){super(...arguments);R(this,"priority",10);R(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return tt(et.basicOptionalMinutes,e);case"XX":return tt(et.basic,e);case"XXXX":return tt(et.basicOptionalSeconds,e);case"XXXXX":return tt(et.extendedOptionalSeconds,e);case"XXX":default:return tt(et.extended,e)}}set(e,t,o){return t.timestampIsSet?e:fe(e,e.getTime()-$r(e)-o)}}class tg extends ce{constructor(){super(...arguments);R(this,"priority",10);R(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return tt(et.basicOptionalMinutes,e);case"xx":return tt(et.basic,e);case"xxxx":return tt(et.basicOptionalSeconds,e);case"xxxxx":return tt(et.extendedOptionalSeconds,e);case"xxx":default:return tt(et.extended,e)}}set(e,t,o){return t.timestampIsSet?e:fe(e,e.getTime()-$r(e)-o)}}class ng extends ce{constructor(){super(...arguments);R(this,"priority",40);R(this,"incompatibleTokens","*")}parse(e){return iu(e)}set(e,t,o){return[fe(e,o*1e3),{timestampIsSet:!0}]}}class rg extends ce{constructor(){super(...arguments);R(this,"priority",20);R(this,"incompatibleTokens","*")}parse(e){return iu(e)}set(e,t,o){return[fe(e,o),{timestampIsSet:!0}]}}const og={G:new Dv,y:new Ev,Y:new kv,R:new Sv,u:new Cv,Q:new _v,q:new Mv,M:new Ov,L:new Tv,w:new Nv,I:new Fv,d:new Av,D:new Yv,E:new Wv,e:new jv,c:new Hv,i:new Bv,a:new Vv,b:new zv,B:new Uv,h:new Qv,H:new Kv,K:new qv,k:new Gv,m:new Xv,s:new Jv,S:new Zv,X:new eg,x:new tg,t:new ng,T:new rg},ag=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ig=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sg=/^'([^]*?)'?$/,lg=/''/g,ug=/\S/,cg=/[a-zA-Z]/;function dg(n,r,e,t){var g,y,w,b,D,E,C,S;const o=()=>fe((t==null?void 0:t.in)||e,NaN),a=mv(),i=(t==null?void 0:t.locale)??a.locale??Gl,s=(t==null?void 0:t.firstWeekContainsDate)??((y=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:y.firstWeekContainsDate)??a.firstWeekContainsDate??((b=(w=a.locale)==null?void 0:w.options)==null?void 0:b.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((E=(D=t==null?void 0:t.locale)==null?void 0:D.options)==null?void 0:E.weekStartsOn)??a.weekStartsOn??((S=(C=a.locale)==null?void 0:C.options)==null?void 0:S.weekStartsOn)??0;if(!r)return n?o():Q(e,t==null?void 0:t.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:i},c=[new xv(t==null?void 0:t.in,e)],p=r.match(ig).map(x=>{const _=x[0];if(_ in Oa){const M=Oa[_];return M(x,i.formatLong)}return x}).join("").match(ag),m=[];for(let x of p){const _=x[0],M=og[_];if(M){const{incompatibleTokens:P}=M;if(Array.isArray(P)){const H=m.find(N=>P.includes(N.token)||N.token===_);if(H)throw new RangeError(`The format string mustn't contain \`${H.fullToken}\` and \`${x}\` at the same time`)}else if(M.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${x}\` and any other token at the same time`);m.push({token:_,fullToken:x});const Y=M.run(n,x,i.match,u);if(!Y)return o();c.push(Y.setter),n=Y.rest}else{if(_.match(cg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(x==="''"?x="'":_==="'"&&(x=fg(x)),n.indexOf(x)===0)n=n.slice(x.length);else return o()}}if(n.length>0&&ug.test(n))return o();const f=c.map(x=>x.priority).sort((x,_)=>_-x).filter((x,_,M)=>M.indexOf(x)===_).map(x=>c.filter(_=>_.priority===x).sort((_,M)=>M.subPriority-_.subPriority)).map(x=>x[0]);let h=Q(e,t==null?void 0:t.in);if(isNaN(+h))return o();const v={};for(const x of f){if(!x.validate(h,u))return o();const _=x.set(h,v,u);Array.isArray(_)?(h=_[0],Object.assign(v,_[1])):h=_}return h}function fg(n){return n.match(sg)[1].replace(lg,"'")}function pg(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function mg(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r);return+Ca(t)==+Ca(o)}function hg(n,r,e){const[t,o]=pt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()}function zn(n,r,e){const t=+Q(n,e==null?void 0:e.in),[o,a]=[+Q(r.start,e==null?void 0:e.in),+Q(r.end,e==null?void 0:e.in)].sort((i,s)=>i-s);return t>=o&&t<=a}function vg(n,r,e){return ze(n,-1,e)}function gg(n,r){const e=()=>fe(r==null?void 0:r.in,NaN),o=xg(n);let a;if(o.date){const u=Dg(o.date,2);a=Eg(u.restDateString,u.year)}if(!a||isNaN(+a))return e();const i=+a;let s=0,l;if(o.time&&(s=kg(o.time),isNaN(s)))return e();if(o.timezone){if(l=Sg(o.timezone),isNaN(l))return e()}else{const u=new Date(i+s),c=Q(0,r==null?void 0:r.in);return c.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),c.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),c}return Q(i+s+l,r==null?void 0:r.in)}const Vr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bg=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,yg=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,wg=/^([+-])(\d{2})(?::?(\d{2}))?$/;function xg(n){const r={},e=n.split(Vr.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],Vr.timeZoneDelimiter.test(r.date)&&(r.date=n.split(Vr.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=Vr.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function Dg(n,r){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+r)+"})|(\\d{2}|[+-]\\d{"+(2+r)+"})$)"),t=n.match(e);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:n.slice((t[1]||t[2]).length)}}function Eg(n,r){if(r===null)return new Date(NaN);const e=n.match(bg);if(!e)return new Date(NaN);const t=!!e[4],o=Un(e[1]),a=Un(e[2])-1,i=Un(e[3]),s=Un(e[4]),l=Un(e[5])-1;if(t)return Tg(r,s,l)?Cg(r,s,l):new Date(NaN);{const u=new Date(0);return!Mg(r,a,i)||!Og(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function Un(n){return n?parseInt(n):1}function kg(n){const r=n.match(yg);if(!r)return NaN;const e=Ia(r[1]),t=Ia(r[2]),o=Ia(r[3]);return Pg(e,t,o)?e*Lr+t*Fr+o*1e3:NaN}function Ia(n){return n&&parseFloat(n.replace(",","."))||0}function Sg(n){if(n==="Z")return 0;const r=n.match(wg);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return Ng(t,o)?e*(t*Lr+o*Fr):NaN}function Cg(n,r,e){const t=new Date(0);t.setUTCFullYear(n,0,4);const o=t.getUTCDay()||7,a=(r-1)*7+e+1-o;return t.setUTCDate(t.getUTCDate()+a),t}const _g=[31,null,31,30,31,30,31,31,30,31,30,31];function uu(n){return n%400===0||n%4===0&&n%100!==0}function Mg(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(_g[r]||(uu(n)?29:28))}function Og(n,r){return r>=1&&r<=(uu(n)?366:365)}function Tg(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function Pg(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function Ng(n,r){return r>=0&&r<=59}function We(n,r,e){const t=Q(n,e==null?void 0:e.in),o=t.getFullYear(),a=t.getDate(),i=fe(n,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=pv(i);return t.setMonth(r,Math.min(a,s)),t}function zr(n,r,e){const t=Q(n,e==null?void 0:e.in);return t.setHours(r),t}function Ur(n,r,e){const t=Q(n,e==null?void 0:e.in);return t.setMinutes(r),t}function vn(n,r,e){const t=Q(n,e==null?void 0:e.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return We(t,t.getMonth()+a*3)}function Qr(n,r,e){const t=Q(n,e==null?void 0:e.in);return t.setSeconds(r),t}function nt(n,r,e){const t=Q(n,e==null?void 0:e.in);return isNaN(+t)?fe(n,NaN):(t.setFullYear(r),t)}function Kt(n,r,e){return Ue(n,-r,e)}function cu(n,r,e){return Sa(n,-1,e)}function du(n,r,e){return Ar(n,-1,e)}function gn(n,r,e){return mt(n,-r,e)}const Ig={lessThanXSeconds:{one:"1초 미만",other:"{{count}}초 미만"},xSeconds:{one:"1초",other:"{{count}}초"},halfAMinute:"30초",lessThanXMinutes:{one:"1분 미만",other:"{{count}}분 미만"},xMinutes:{one:"1분",other:"{{count}}분"},aboutXHours:{one:"약 1시간",other:"약 {{count}}시간"},xHours:{one:"1시간",other:"{{count}}시간"},xDays:{one:"1일",other:"{{count}}일"},aboutXWeeks:{one:"약 1주",other:"약 {{count}}주"},xWeeks:{one:"1주",other:"{{count}}주"},aboutXMonths:{one:"약 1개월",other:"약 {{count}}개월"},xMonths:{one:"1개월",other:"{{count}}개월"},aboutXYears:{one:"약 1년",other:"약 {{count}}년"},xYears:{one:"1년",other:"{{count}}년"},overXYears:{one:"1년 이상",other:"{{count}}년 이상"},almostXYears:{one:"거의 1년",other:"거의 {{count}}년"}},Fg=(n,r,e)=>{let t;const o=Ig[n];return typeof o=="string"?t=o:r===1?t=o.one:t=o.other.replace("{{count}}",r.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?t+" 후":t+" 전":t},Lg={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},$g={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ag={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Yg={date:mn({formats:Lg,defaultWidth:"full"}),time:mn({formats:$g,defaultWidth:"full"}),dateTime:mn({formats:Ag,defaultWidth:"full"})},Wg={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},jg=(n,r,e,t)=>Wg[n],Hg={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},Rg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},Bg={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],wide:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},Vg={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},zg={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Ug={narrow:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},abbreviated:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"},wide:{am:"오전",pm:"오후",midnight:"자정",noon:"정오",morning:"아침",afternoon:"오후",evening:"저녁",night:"밤"}},Qg={ordinalNumber:(n,r)=>{const e=Number(n);switch(String(r==null?void 0:r.unit)){case"minute":case"second":return String(e);case"date":return e+"일";default:return e+"번째"}},era:Je({values:Hg,defaultWidth:"wide"}),quarter:Je({values:Rg,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Je({values:Bg,defaultWidth:"wide"}),day:Je({values:Vg,defaultWidth:"wide"}),dayPeriod:Je({values:zg,defaultWidth:"wide",formattingValues:Ug,defaultFormattingWidth:"wide"})},Kg=/^(\d+)(일|번째)?/i,qg=/\d+/i,Gg={narrow:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(기원전|서기)/i},Xg={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},Jg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},Zg={any:[/1/i,/2/i,/3/i,/4/i]},eb={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},tb={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},nb={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},rb={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},ob={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},ab={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},ib={ordinalNumber:ql({matchPattern:Kg,parsePattern:qg,valueCallback:n=>parseInt(n,10)}),era:Ze({matchPatterns:Gg,defaultMatchWidth:"wide",parsePatterns:Xg,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Jg,defaultMatchWidth:"wide",parsePatterns:Zg,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ze({matchPatterns:eb,defaultMatchWidth:"wide",parsePatterns:tb,defaultParseWidth:"any"}),day:Ze({matchPatterns:nb,defaultMatchWidth:"wide",parsePatterns:rb,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:ob,defaultMatchWidth:"any",parsePatterns:ab,defaultParseWidth:"any"})},sb={code:"ko",formatDistance:Fg,formatLong:Yg,formatRelative:jg,localize:Qg,match:ib,options:{weekStartsOn:0,firstWeekContainsDate:1}};var Kr=typeof document<"u"?d.useLayoutEffect:d.useEffect;const lb={...I}.useInsertionEffect||(n=>n());function ub(n){const r=I.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return lb(()=>{r.current=n}),I.useCallback(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return r.current==null?void 0:r.current(...t)},[])}const cb={...I};let fu=!1,db=0;const pu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+db++;function fb(){const[n,r]=I.useState(()=>fu?pu():void 0);return Kr(()=>{n==null&&r(pu())},[]),I.useEffect(()=>{fu=!0},[]),n}const mu=cb.useId||fb;let Qn;process.env.NODE_ENV!=="production"&&(Qn=new Set);function pb(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Qn)!=null&&n.has(o))){var a;(a=Qn)==null||a.add(o),console.warn(o)}}function mb(){for(var n,r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];const o="Floating UI: "+e.join(" ");if(!((n=Qn)!=null&&n.has(o))){var a;(a=Qn)==null||a.add(o),console.error(o)}}const hb=I.forwardRef(function(r,e){const{context:{placement:t,elements:{floating:o},middlewareData:{arrow:a,shift:i}},width:s=14,height:l=7,tipRadius:u=0,strokeWidth:c=0,staticOffset:p,stroke:m,d:f,style:{transform:h,...v}={},...g}=r;process.env.NODE_ENV!=="production"&&(e||pb("The `ref` prop is required for `FloatingArrow`."));const y=mu(),[w,b]=I.useState(!1);if(Kr(()=>{if(!o)return;Ye(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const[D,E]=t.split("-"),C=D==="top"||D==="bottom";let S=p;(C&&i!=null&&i.x||!C&&i!=null&&i.y)&&(S=null);const x=c*2,_=x/2,M=s/2*(u/-8+1),P=l/2*u/4,Y=!!f,H=S&&E==="end"?"bottom":"top";let N=S&&E==="end"?"right":"left";S&&w&&(N=E==="end"?"left":"right");const L=(a==null?void 0:a.x)!=null?S||a.x:"",$=(a==null?void 0:a.y)!=null?S||a.y:"",V=f||"M0,0"+(" H"+s)+(" L"+(s-M)+","+(l-P))+(" Q"+s/2+","+l+" "+M+","+(l-P))+" Z",T={top:Y?"rotate(180deg)":"",left:Y?"rotate(90deg)":"rotate(-90deg)",bottom:Y?"":"rotate(180deg)",right:Y?"rotate(-90deg)":"rotate(90deg)"}[D];return O.jsxs("svg",{...g,"aria-hidden":!0,ref:e,width:Y?s:s+x,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[N]:L,[H]:$,[D]:C||Y?"100%":"calc(100% - "+x/2+"px)",transform:[T,h].filter(q=>!!q).join(" "),...v},children:[x>0&&O.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:m,strokeWidth:x+(f?0:1),d:V}),O.jsx("path",{stroke:x&&!f?g.fill:"none",d:V}),O.jsx("clipPath",{id:y,children:O.jsx("rect",{x:-_,y:_*(Y?-1:1),width:s+x,height:s})})]})});function vb(){const n=new Map;return{emit(r,e){var t;(t=n.get(r))==null||t.forEach(o=>o(e))},on(r,e){n.has(r)||n.set(r,new Set),n.get(r).add(e)},off(r,e){var t;(t=n.get(r))==null||t.delete(e)}}}const gb=I.createContext(null),bb=I.createContext(null),yb=()=>{var n;return((n=I.useContext(gb))==null?void 0:n.id)||null},wb=()=>I.useContext(bb);function xb(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=mu(),a=I.useRef({}),[i]=I.useState(()=>vb()),s=yb()!=null;if(process.env.NODE_ENV!=="production"){const f=t.reference;f&&!De(f)&&mb("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=I.useState(t.reference),c=ub((f,h,v)=>{a.current.openEvent=f?h:void 0,i.emit("openchange",{open:f,event:h,reason:v,nested:s}),e==null||e(f,h,v)}),p=I.useMemo(()=>({setPositionReference:u}),[]),m=I.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return I.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:m,events:i,floatingId:o,refs:p}),[r,c,m,i,o,p])}function Db(n){n===void 0&&(n={});const{nodeId:r}=n,e=xb({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=I.useState(null),[s,l]=I.useState(null),c=(o==null?void 0:o.domReference)||a,p=I.useRef(null),m=wb();Kr(()=>{c&&(p.current=c)},[c]);const f=Ds({...n,elements:{...o,...s&&{reference:s}}}),h=I.useCallback(b=>{const D=De(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(D),f.refs.setReference(D)},[f.refs]),v=I.useCallback(b=>{(De(b)||b===null)&&(p.current=b,i(b)),(De(f.refs.reference.current)||f.refs.reference.current===null||b!==null&&!De(b))&&f.refs.setReference(b)},[f.refs]),g=I.useMemo(()=>({...f.refs,setReference:v,setPositionReference:h,domReference:p}),[f.refs,v,h]),y=I.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),w=I.useMemo(()=>({...f,...t,refs:g,elements:y,nodeId:r}),[f,g,y,r,t]);return Kr(()=>{t.dataRef.current.floatingContext=w;const b=m==null?void 0:m.nodesRef.current.find(D=>D.id===r);b&&(b.context=w)}),I.useMemo(()=>({...f,context:w,refs:g,elements:y}),[f,g,y,w])}/*!
|
|
46
|
+
react-datepicker v8.3.0
|
|
34
47
|
https://github.com/Hacker0x01/react-datepicker
|
|
35
48
|
Released under the MIT License.
|
|
36
|
-
*/var Ia=function(r,t){return Ia=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])},Ia(r,t)};function We(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Ia(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var ce=function(){return ce=Object.assign||function(t){for(var e,o=1,a=arguments.length;o<a;o++){e=arguments[o];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ce.apply(this,arguments)};function pt(n,r,t){if(t||arguments.length===2)for(var e=0,o=r.length,a;e<o;e++)(a||!(e in r))&&(a||(a=Array.prototype.slice.call(r,0,e)),a[e]=r[e]);return n.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var gv=function(n){var r=n.showTimeSelectOnly,t=r===void 0?!1:r,e=n.showTime,o=e===void 0?!1:e,a=n.className,i=n.children,s=t?"Choose Time":"Choose Date".concat(o?" and Time":"");return c.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},bv=function(n,r){var t=c.useRef(null),e=c.useRef(n);e.current=n;var o=c.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=e.current)===null||i===void 0||i.call(e,a))},[r]);return c.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),t},ro=function(n){var r=n.children,t=n.onClickOutside,e=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=bv(t,i);return c.createElement("div",{className:e,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},j;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(j||(j={}));function Kl(){var n=typeof window<"u"?window:globalThis;return n}var rr=12;function pe(n){if(n==null)return new Date;var r=typeof n=="string"?db(n):K(n);return oo(r)?r:new Date}function Fa(n,r,t,e,o){o===void 0&&(o=pe());for(var a=_n(t)||_n($a()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var d=l[s],u=ab(n,d,o,{locale:a});if(oo(u)&&(!e||n===Ee(u,d,t)))return u}return null}function oo(n,r){return Ur(n)&&!tn(n,new Date("1/1/1800"))}function Ee(n,r,t){if(t==="en")return Ll(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var e=t?_n(t):void 0;return t&&!e&&console.warn('A locale object was not found for the provided string ["'.concat(t,'"].')),e=e||_n($a()),Ll(n,r,{locale:e,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Xe(n,r){var t=r.dateFormat,e=r.locale,o=Array.isArray(t)&&t.length>0?t[0]:t;return n&&Ee(n,o,e)||""}function vv(n,r,t){if(!n)return"";var e=Xe(n,t),o=r?Xe(r,t):"";return"".concat(e," - ").concat(o)}function yv(n,r){if(!(n!=null&&n.length))return"";var t=n[0]?Xe(n[0],r):"";if(n.length===1)return t;if(n.length===2&&n[1]){var e=Xe(n[1],r);return"".concat(t,", ").concat(e)}var o=n.length-1;return"".concat(t," (+").concat(o,")")}function La(n,r){var t=r.hour,e=t===void 0?0:t,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return Zr(eo(to(n,s),a),e)}function wv(n){return Ca(n)}function xv(n,r){return Ee(n,"ddd",r)}function ao(n){return Jt(n)}function At(n,r,t){var e=_n(r||$a());return yt(n,{locale:e,weekStartsOn:t})}function St(n){return Sl(n)}function or(n){return Gr(n)}function ql(n){return Sa(n)}function Gl(){return Jt(pe())}function Xl(n){return El(n)}function Dv(n){return hm(n)}function Ev(n){return kl(n)}function ht(n,r){return n&&r?ub(n,r):!n&&!r}function Ve(n,r){return n&&r?sb(n,r):!n&&!r}function io(n,r){return n&&r?lb(n,r):!n&&!r}function de(n,r){return n&&r?fm(n,r):!n&&!r}function rn(n,r){return n&&r?cg(n,r):!n&&!r}function ar(n,r,t){var e,o=Jt(r),a=El(t);try{e=er(n,{start:o,end:a})}catch{e=!1}return e}function $a(){var n=Kl();return n.__localeId__}function _n(n){if(typeof n=="string"){var r=Kl();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function kv(n,r,t){return r(Ee(n,"EEEE",t))}function Sv(n,r){return Ee(n,"EEEEEE",r)}function Cv(n,r){return Ee(n,"EEE",r)}function Aa(n,r){return Ee(Ge(pe(),n),"LLLL",r)}function Jl(n,r){return Ee(Ge(pe(),n),"LLL",r)}function _v(n,r){return Ee(Sn(pe(),n),"QQQ",r)}function Je(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.excludeDateIntervals,s=t.includeDates,l=t.includeDateIntervals,d=t.filterDate;return ir(n,{minDate:e,maxDate:o})||a&&a.some(function(u){return u instanceof Date?de(n,u):de(n,u.date)})||i&&i.some(function(u){var f=u.start,h=u.end;return er(n,{start:f,end:h})})||s&&!s.some(function(u){return de(n,u)})||l&&!l.some(function(u){var f=u.start,h=u.end;return er(n,{start:f,end:h})})||d&&!d(pe(n))||!1}function Ya(n,r){var t=r===void 0?{}:r,e=t.excludeDates,o=t.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return er(n,{start:i,end:s})}):e&&e.some(function(a){var i;return a instanceof Date?de(n,a):de(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Zl(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return ir(n,{minDate:e?Sl(e):void 0,maxDate:o?kl(o):void 0})||(a==null?void 0:a.some(function(l){return Ve(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ve(n,l)})||s&&!s(pe(n))||!1}function so(n,r,t,e){var o=Z(n),a=Be(n),i=Z(r),s=Be(r),l=Z(e);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 Mv(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates;return ir(n,{minDate:e,maxDate:o})||a&&a.some(function(s){return Ve(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return Ve(s,n)})||!1}function lo(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate;return ir(n,{minDate:e,maxDate:o})||(a==null?void 0:a.some(function(l){return io(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return io(n,l)})||s&&!s(pe(n))||!1}function uo(n,r,t){if(!r||!t||!Ur(r)||!Ur(t))return!1;var e=Z(r),o=Z(t);return e<=n&&o>=n}function co(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.maxDate,a=t.excludeDates,i=t.includeDates,s=t.filterDate,l=new Date(n,0,1);return ir(l,{minDate:e?Gr(e):void 0,maxDate:o?Cl(o):void 0})||(a==null?void 0:a.some(function(d){return ht(l,d instanceof Date?d:d.date)}))||i&&!i.some(function(d){return ht(l,d)})||s&&!s(pe(l))||!1}function fo(n,r,t,e){var o=Z(n),a=Zt(n),i=Z(r),s=Zt(r),l=Z(e);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 ir(n,r){var t,e=r===void 0?{}:r,o=e.minDate,a=e.maxDate;return(t=o&&Dn(n,o)<0||a&&Dn(n,a)>0)!==null&&t!==void 0?t:!1}function eu(n,r){return r.some(function(t){return Et(t)===Et(n)&&kt(t)===kt(n)&&Lt(t)===Lt(n)})}function tu(n,r){var t=r===void 0?{}:r,e=t.excludeTimes,o=t.includeTimes,a=t.filterTime;return e&&eu(n,e)||o&&!eu(n,o)||a&&!a(n)||!1}function nu(n,r){var t=r.minTime,e=r.maxTime;if(!t||!e)throw new Error("Both minTime and maxTime props required");var o=pe();o=Zr(o,Et(n)),o=eo(o,kt(n)),o=to(o,Lt(n));var a=pe();a=Zr(a,Et(t)),a=eo(a,kt(t)),a=to(a,Lt(t));var i=pe();i=Zr(i,Et(e)),i=eo(i,kt(e)),i=to(i,Lt(e));var s;try{s=!er(o,{start:a,end:i})}catch{s=!1}return s}function ru(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.includeDates,a=nn(n,1);return e&&Qr(e,a)>0||o&&o.every(function(i){return Qr(i,a)>0})||!1}function ou(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.includeDates,a=rt(n,1);return e&&Qr(a,e)>0||o&&o.every(function(i){return Qr(a,i)>0})||!1}function Ov(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.includeDates,a=Gr(n),i=Rl(a);return e&&Kr(e,i)>0||o&&o.every(function(s){return Kr(s,i)>0})||!1}function Pv(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.includeDates,a=Cl(n),i=ka(a,1);return e&&Kr(i,e)>0||o&&o.every(function(s){return Kr(i,s)>0})||!1}function au(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.includeDates,a=Cn(n,1);return e&&qr(e,a)>0||o&&o.every(function(i){return qr(i,a)>0})||!1}function Tv(n,r){var t=r===void 0?{}:r,e=t.minDate,o=t.yearItemNumber,a=o===void 0?rr:o,i=or(Cn(n,a)),s=Yt(i,a).endPeriod,l=e&&Z(e);return l&&l>s||!1}function iu(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.includeDates,a=xt(n,1);return e&&qr(a,e)>0||o&&o.every(function(i){return qr(a,i)>0})||!1}function Nv(n,r){var t=r===void 0?{}:r,e=t.maxDate,o=t.yearItemNumber,a=o===void 0?rr:o,i=xt(n,a),s=Yt(i,a).startPeriod,l=e&&Z(e);return l&&l<s||!1}function su(n){var r=n.minDate,t=n.includeDates;if(t&&r){var e=t.filter(function(o){return Dn(o,r)>=0});return xl(e)}else return t?xl(t):r}function lu(n){var r=n.maxDate,t=n.includeDates;if(t&&r){var e=t.filter(function(o){return Dn(o,r)<=0});return wl(e)}else return t?wl(t):r}function uu(n,r){var t;n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var e=new Map,o=0,a=n.length;o<a;o++){var i=n[o];if(Dt(i)){var s=Ee(i,"MM.dd.yyyy"),l=e.get(s)||[];l.includes(r)||(l.push(r),e.set(s,l))}else if(typeof i=="object"){var d=Object.keys(i),u=(t=d[0])!==null&&t!==void 0?t:"",f=i[u];if(typeof u=="string"&&Array.isArray(f))for(var h=0,p=f.length;h<p;h++){var m=f[h];if(m){var s=Ee(m,"MM.dd.yyyy"),l=e.get(s)||[];l.includes(u)||(l.push(u),e.set(s,l))}}}}return e}function Iv(n,r){return n.length!==r.length?!1:n.every(function(t,e){return t===r[e]})}function Fv(n,r){n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--holidays");var t=new Map;return n.forEach(function(e){var o=e.date,a=e.holidayName;if(Dt(o)){var i=Ee(o,"MM.dd.yyyy"),s=t.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&Iv(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?pt(pt([],l,!0),[a],!1):[a],t.set(i,s)}}}),t}function Lv(n,r,t,e,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,d=o[s];d&&(l=lm(l,Et(d)),l=Ea(l,kt(d)),l=dm(l,Lt(d)));var u=Ea(n,(t+1)*e);$t(l,r)&&tn(l,u)&&d!=null&&i.push(d)}return i}function cu(n){return n<10?"0".concat(n):"".concat(n)}function Yt(n,r){r===void 0&&(r=rr);var t=Math.ceil(Z(n)/r)*r,e=t-(r-1);return{startPeriod:e,endPeriod:t}}function $v(n){var r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+t-+r)/36e5)}function du(n){var r=n.getSeconds(),t=n.getMilliseconds();return K(n.getTime()-r*1e3-t)}function Av(n,r){return du(n).getTime()===du(r).getTime()}function fu(n){if(!Dt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function pu(n,r){if(!Dt(n)||!Dt(r))throw new Error("Invalid date received");var t=fu(n),e=fu(r);return tn(t,e)}function hu(n){return n.key===j.Space}var Yv=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;return e.inputRef=c.createRef(),e.onTimeChange=function(o){var a,i;e.setState({time:o});var s=e.props.date,l=s instanceof Date&&!isNaN(+s),d=l?s:new Date;if(o!=null&&o.includes(":")){var u=o.split(":"),f=u[0],h=u[1];d.setHours(Number(f)),d.setMinutes(Number(h))}(i=(a=e.props).onChange)===null||i===void 0||i.call(a,d)},e.renderTimeInput=function(){var o=e.state.time,a=e.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?c.cloneElement(l,{date:i,value:o,onChange:e.onTimeChange}):c.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:e.inputRef,onClick:function(){var d;(d=e.inputRef.current)===null||d===void 0||d.focus()},required:!0,value:o,onChange:function(d){e.onTimeChange(d.target.value||s)}})},e.state={time:e.props.timeString},e}return r.getDerivedStateFromProps=function(t,e){return t.timeString!==e.time?{time:t.timeString}:null},r.prototype.render=function(){return c.createElement("div",{className:"react-datepicker__input-time-container"},c.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),c.createElement("div",{className:"react-datepicker-time__input-container"},c.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r}(c.Component),jv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.dayEl=c.createRef(),t.handleClick=function(e){!t.isDisabled()&&t.props.onClick&&t.props.onClick(e)},t.handleMouseEnter=function(e){!t.isDisabled()&&t.props.onMouseEnter&&t.props.onMouseEnter(e)},t.handleOnKeyDown=function(e){var o,a,i=e.key;i===j.Space&&(e.preventDefault(),e.key=j.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,e)},t.isSameDay=function(e){return de(t.props.day,e)},t.isKeyboardSelected=function(){var e;if(t.props.disabledKeyboardNavigation)return!1;var o=t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.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(e){return e===void 0&&(e=t.props.day),Je(e,{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 Ya(t.props.day,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.isStartOfWeek=function(){return de(t.props.day,At(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameWeek=function(e){return t.props.showWeekPicker&&de(e,At(t.props.day,t.props.locale,t.props.calendarStartDay))},t.isSameDayOrWeek=function(e){return t.isSameDay(e)||t.isSameWeek(e)},t.getHighLightedClass=function(){var e=t.props,o=e.day,a=e.highlightDates;if(!a)return!1;var i=Ee(o,"MM.dd.yyyy");return a.get(i)},t.getHolidaysClass=function(){var e,o=t.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=Ee(a,"MM.dd.yyyy");return i.has(s)?[(e=i.get(s))===null||e===void 0?void 0:e.className]:[void 0]},t.isInRange=function(){var e=t.props,o=e.day,a=e.startDate,i=e.endDate;return!a||!i?!1:ar(o,a,i)},t.isInSelectingRange=function(){var e,o=t.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,d=o.selectsDisabledDaysInRange,u=o.startDate,f=o.endDate,h=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return!(i||s||l)||!h||!d&&t.isDisabled()?!1:i&&f&&(tn(h,f)||rn(h,f))?ar(a,h,f):s&&u&&($t(h,u)||rn(h,u))||l&&u&&!f&&($t(h,u)||rn(h,u))?ar(a,u,h):!1},t.isSelectingRangeStart=function(){var e;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.startDate,s=o.selectsStart,l=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return s?de(a,l):de(a,i)},t.isSelectingRangeEnd=function(){var e;if(!t.isInSelectingRange())return!1;var o=t.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,d=(e=t.props.selectingDate)!==null&&e!==void 0?e:t.props.preSelection;return s||l?de(a,d):de(a,i)},t.isRangeStart=function(){var e=t.props,o=e.day,a=e.startDate,i=e.endDate;return!a||!i?!1:de(a,o)},t.isRangeEnd=function(){var e=t.props,o=e.day,a=e.startDate,i=e.endDate;return!a||!i?!1:de(i,o)},t.isWeekend=function(){var e=ig(t.props.day);return e===0||e===6},t.isAfterMonth=function(){return t.props.month!==void 0&&(t.props.month+1)%12===Be(t.props.day)},t.isBeforeMonth=function(){return t.props.month!==void 0&&(Be(t.props.day)+1)%12===t.props.month},t.isCurrentDay=function(){return t.isSameDay(pe())},t.isSelected=function(){var e;return t.props.selectsMultiple?(e=t.props.selectedDates)===null||e===void 0?void 0:e.some(function(o){return t.isSameDayOrWeek(o)}):t.isSameDayOrWeek(t.props.selected)},t.getClassNames=function(e){var o=t.props.dayClassName?t.props.dayClassName(e):void 0;return je("react-datepicker__day",o,"react-datepicker__day--"+xv(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 e=t.props,o=e.day,a=e.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=e.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,d=t.isDisabled()||t.isExcluded()?l:i;return"".concat(d," ").concat(Ee(o,"PPPP",t.props.locale))},t.getTitle=function(){var e=t.props,o=e.day,a=e.holidays,i=a===void 0?new Map:a,s=e.excludeDates,l=Ee(o,"MM.dd.yyyy"),d=[];return i.has(l)&&d.push.apply(d,i.get(l).holidayNames),t.isExcluded()&&d.push(s==null?void 0:s.filter(function(u){return u instanceof Date?de(u,o):de(u==null?void 0:u.date,o)}).map(function(u){if(!(u instanceof Date))return u==null?void 0:u.message})),d.join(", ")},t.getTabIndex=function(){var e=t.props.selected,o=t.props.preSelection,a=!(t.props.showWeekPicker&&(t.props.showWeekNumber||!t.isStartOfWeek()))&&(t.isKeyboardSelected()||t.isSameDay(e)&&de(o,e))?0:-1;return a},t.handleFocusDay=function(){var e;t.shouldFocusDay()&&((e=t.dayEl.current)===null||e===void 0||e.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 c.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:"option",title:t.getTitle(),"aria-disabled":t.isDisabled(),"aria-current":t.isCurrentDay()?"date":void 0,"aria-selected":t.isSelected()||t.isInRange()},t.renderDayContents(),t.getTitle()!==""&&c.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,e,o;return((e=(t=this.props.containerRef)===null||t===void 0?void 0:t.current)===null||e===void 0?void 0:e.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}(c.Component),Hv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.weekNumberEl=c.createRef(),t.handleClick=function(e){t.props.onClick&&t.props.onClick(e)},t.handleOnKeyDown=function(e){var o,a,i=e.key;i===j.Space&&(e.preventDefault(),e.key=j.Enter),(a=(o=t.props).handleOnKeyDown)===null||a===void 0||a.call(o,e)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!de(t.props.date,t.props.selected)&&de(t.props.date,t.props.preSelection)},t.getTabIndex=function(){return t.props.showWeekPicker&&t.props.showWeekNumber&&(t.isKeyboardSelected()||de(t.props.date,t.props.selected)&&de(t.props.preSelection,t.props.selected))?0:-1},t.handleFocusWeekNumber=function(e){var o=!1;t.getTabIndex()===0&&!(e!=null&&e.isInputFocused)&&de(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,e=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&&de(this.props.date,this.props.selected)};return c.createElement("div",{ref:this.weekNumberEl,className:je(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},e)},r}(c.Component),Wv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.isDisabled=function(e){return Je(e,{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(e,o){t.props.onDayClick&&t.props.onDayClick(e,o)},t.handleDayMouseEnter=function(e){t.props.onDayMouseEnter&&t.props.onDayMouseEnter(e)},t.handleWeekClick=function(e,o,a){for(var i,s,l,d=new Date(e),u=0;u<7;u++){var f=new Date(e);f.setDate(f.getDate()+u);var h=!t.isDisabled(f);if(h){d=f;break}}typeof t.props.onWeekSelect=="function"&&t.props.onWeekSelect(d,o,a),t.props.showWeekPicker&&t.handleDayClick(d,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(e){return t.props.formatWeekNumber?t.props.formatWeekNumber(e):wv(e)},t.isWeekDisabled=function(){for(var e=t.startOfWeek(),o=nt(e,6),a=new Date(e);a<=o;){if(!t.isDisabled(a))return!1;a=nt(a,1)}return!0},t.renderDays=function(){var e=t.startOfWeek(),o=[],a=t.formatWeekNumber(e);if(t.props.showWeekNumber){var i=t.props.onWeekSelect||t.props.showWeekPicker?t.handleWeekClick.bind(t,e,a):void 0;o.push(c.createElement(Hv,ce({key:"W"},r.defaultProps,t.props,{weekNumber:a,isWeekDisabled:t.isWeekDisabled(),date:e,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=nt(e,s);return c.createElement(jv,ce({},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 At(t.props.day,t.props.locale,t.props.calendarStartDay)},t.isKeyboardSelected=function(){return!t.props.disabledKeyboardNavigation&&!de(t.startOfWeek(),t.props.selected)&&de(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":de(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return c.createElement("div",{className:je(t)},this.renderDays())},r}(c.Component),sr,Rv=6,Mn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ja=(sr={},sr[Mn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},sr[Mn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},sr[Mn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},sr),po=1;function mu(n,r){return n?Mn.FOUR_COLUMNS:r?Mn.TWO_COLUMNS:Mn.THREE_COLUMNS}var Bv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.MONTH_REFS=pt([],Array(12),!0).map(function(){return c.createRef()}),t.QUARTER_REFS=pt([],Array(4),!0).map(function(){return c.createRef()}),t.isDisabled=function(e){return Je(e,{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(e){return Ya(e,{excludeDates:t.props.excludeDates,excludeDateIntervals:t.props.excludeDateIntervals})},t.handleDayClick=function(e,o){var a,i;(i=(a=t.props).onDayClick)===null||i===void 0||i.call(a,e,o,t.props.orderInDisplay)},t.handleDayMouseEnter=function(e){var o,a;(a=(o=t.props).onDayMouseEnter)===null||a===void 0||a.call(o,e)},t.handleMouseLeave=function(){var e,o;(o=(e=t.props).onMouseLeave)===null||o===void 0||o.call(e)},t.isRangeStartMonth=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ve(Ge(a,e),i)},t.isRangeStartQuarter=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:io(Sn(a,e),i)},t.isRangeEndMonth=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ve(Ge(a,e),s)},t.isRangeEndQuarter=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:io(Sn(a,e),s)},t.isInSelectingRangeMonth=function(e){var o,a=t.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,d=a.selectsRange,u=a.startDate,f=a.endDate,h=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||l||d)||!h?!1:s&&f?so(h,f,e,i):l&&u||d&&u&&!f?so(u,h,e,i):!1},t.isSelectingMonthRangeStart=function(e){var o;if(!t.isInSelectingRangeMonth(e))return!1;var a=t.props,i=a.day,s=a.startDate,l=a.selectsStart,d=Ge(i,e),u=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return l?Ve(d,u):Ve(d,s)},t.isSelectingMonthRangeEnd=function(e){var o;if(!t.isInSelectingRangeMonth(e))return!1;var a=t.props,i=a.day,s=a.endDate,l=a.selectsEnd,d=a.selectsRange,u=Ge(i,e),f=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return l||d?Ve(u,f):Ve(u,s)},t.isInSelectingRangeQuarter=function(e){var o,a=t.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,d=a.selectsRange,u=a.startDate,f=a.endDate,h=(o=t.props.selectingDate)!==null&&o!==void 0?o:t.props.preSelection;return!(s||l||d)||!h?!1:s&&f?fo(h,f,e,i):l&&u||d&&u&&!f?fo(u,h,e,i):!1},t.isWeekInMonth=function(e){var o=t.props.day,a=nt(e,6);return Ve(e,o)||Ve(a,o)},t.isCurrentMonth=function(e,o){return Z(e)===Z(pe())&&o===Be(pe())},t.isCurrentQuarter=function(e,o){return Z(e)===Z(pe())&&o===Zt(pe())},t.isSelectedMonth=function(e,o,a){return Be(a)===o&&Z(e)===Z(a)},t.isSelectMonthInList=function(e,o,a){return a.some(function(i){return t.isSelectedMonth(e,o,i)})},t.isSelectedQuarter=function(e,o,a){return Zt(e)===o&&Z(e)===Z(a)},t.renderWeeks=function(){for(var e=[],o=t.props.fixedHeight,a=0,i=!1,s=At(St(t.props.day),t.props.locale,t.props.calendarStartDay),l=function(m){return t.props.showWeekPicker?At(m,t.props.locale,t.props.calendarStartDay):t.props.preSelection},d=function(m){return t.props.showWeekPicker?At(m,t.props.locale,t.props.calendarStartDay):t.props.selected},u=t.props.selected?d(t.props.selected):void 0,f=t.props.preSelection?l(t.props.preSelection):void 0;e.push(c.createElement(Wv,ce({},t.props,{ariaLabelPrefix:t.props.weekAriaLabelPrefix,key:a,day:s,month:Be(t.props.day),onDayClick:t.handleDayClick,onDayMouseEnter:t.handleDayMouseEnter,selected:u,preSelection:f,showWeekNumber:t.props.showWeekNumbers}))),!i;){a++,s=zr(s,1);var h=o&&a>=Rv,p=!o&&!t.isWeekInMonth(s);if(h||p)if(t.props.peekNextMonth)i=!0;else break}return e},t.onMonthClick=function(e,o){var a=t.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||t.handleDayClick(St(s),e)},t.onMonthMouseEnter=function(e){var o=t.isMonthDisabledForLabelDate(e),a=o.isDisabled,i=o.labelDate;a||t.handleDayMouseEnter(St(i))},t.handleMonthNavigation=function(e,o){var a,i,s,l;(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=t.MONTH_REFS[e])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},t.handleKeyboardNavigation=function(e,o,a){var i,s=t.props,l=s.selected,d=s.preSelection,u=s.setPreSelection,f=s.minDate,h=s.maxDate,p=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(d){var g=mu(p,m),b=t.getVerticalOffset(g),y=(i=ja[g])===null||i===void 0?void 0:i.grid,x=function(k,S,C){var I,O,W=S,H=C;switch(k){case j.ArrowRight:W=rt(S,po),H=C===11?0:C+po;break;case j.ArrowLeft:W=nn(S,po),H=C===0?11:C-po;break;case j.ArrowUp:W=nn(S,b),H=!((I=y==null?void 0:y[0])===null||I===void 0)&&I.includes(C)?C+12-b:C-b;break;case j.ArrowDown:W=rt(S,b),H=!((O=y==null?void 0:y[y.length-1])===null||O===void 0)&&O.includes(C)?C-12+b:C+b;break}return{newCalculatedDate:W,newCalculatedMonth:H}},w=function(k,S,C){for(var I=40,O=k,W=!1,H=0,P=x(O,S,C),Y=P.newCalculatedDate,N=P.newCalculatedMonth;!W;){if(H>=I){Y=S,N=C;break}if(f&&Y<f){O=j.ArrowRight;var V=x(O,Y,N);Y=V.newCalculatedDate,N=V.newCalculatedMonth}if(h&&Y>h){O=j.ArrowLeft;var V=x(O,Y,N);Y=V.newCalculatedDate,N=V.newCalculatedMonth}if(Mv(Y,t.props)){var V=x(O,Y,N);Y=V.newCalculatedDate,N=V.newCalculatedMonth}else W=!0;H++}return{newCalculatedDate:Y,newCalculatedMonth:N}};if(o===j.Enter){t.isMonthDisabled(a)||(t.onMonthClick(e,a),u==null||u(l));return}var E=w(o,d,a),_=E.newCalculatedDate,D=E.newCalculatedMonth;switch(o){case j.ArrowRight:case j.ArrowLeft:case j.ArrowUp:case j.ArrowDown:t.handleMonthNavigation(D,_);break}}},t.getVerticalOffset=function(e){var o,a;return(a=(o=ja[e])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},t.onMonthKeyDown=function(e,o){var a=t.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=e.key;l!==j.Tab&&e.preventDefault(),i||t.handleKeyboardNavigation(e,l,o),s&&s(e)},t.onQuarterClick=function(e,o){var a=Sn(t.props.day,o);lo(a,t.props)||t.handleDayClick(ql(a),e)},t.onQuarterMouseEnter=function(e){var o=Sn(t.props.day,e);lo(o,t.props)||t.handleDayMouseEnter(ql(o))},t.handleQuarterNavigation=function(e,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[e-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},t.onQuarterKeyDown=function(e,o){var a,i,s=e.key;if(!t.props.disabledKeyboardNavigation)switch(s){case j.Enter:t.onQuarterClick(e,o),(i=(a=t.props).setPreSelection)===null||i===void 0||i.call(a,t.props.selected);break;case j.ArrowRight:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===4?1:o+1,ka(t.props.preSelection,1));break;case j.ArrowLeft:if(!t.props.preSelection)break;t.handleQuarterNavigation(o===1?4:o-1,Rl(t.props.preSelection));break}},t.isMonthDisabledForLabelDate=function(e){var o,a=t.props,i=a.day,s=a.minDate,l=a.maxDate,d=a.excludeDates,u=a.includeDates,f=Ge(i,e);return{isDisabled:(o=(s||l||d||u)&&Zl(f,t.props))!==null&&o!==void 0?o:!1,labelDate:f}},t.isMonthDisabled=function(e){var o=t.isMonthDisabledForLabelDate(e).isDisabled;return o},t.getMonthClassNames=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,d=o.monthClassName,u=d?d(Ge(a,e)):void 0,f=t.getSelection();return je("react-datepicker__month-text","react-datepicker__month-".concat(e),u,{"react-datepicker__month-text--disabled":t.isMonthDisabled(e),"react-datepicker__month-text--selected":f?t.isSelectMonthInList(a,e,f):void 0,"react-datepicker__month-text--keyboard-selected":!t.props.disabledKeyboardNavigation&&l&&t.isSelectedMonth(a,e,l)&&!t.isMonthDisabled(e),"react-datepicker__month-text--in-selecting-range":t.isInSelectingRangeMonth(e),"react-datepicker__month-text--in-range":i&&s?so(i,s,e,a):void 0,"react-datepicker__month-text--range-start":t.isRangeStartMonth(e),"react-datepicker__month-text--range-end":t.isRangeEndMonth(e),"react-datepicker__month-text--selecting-range-start":t.isSelectingMonthRangeStart(e),"react-datepicker__month-text--selecting-range-end":t.isSelectingMonthRangeEnd(e),"react-datepicker__month-text--today":t.isCurrentMonth(a,e)})},t.getTabIndex=function(e){if(t.props.preSelection==null)return"-1";var o=Be(t.props.preSelection),a=t.isMonthDisabledForLabelDate(o).isDisabled,i=e===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getQuarterTabIndex=function(e){if(t.props.preSelection==null)return"-1";var o=Zt(t.props.preSelection),a=lo(t.props.day,t.props),i=e===o&&!(a||t.props.disabledKeyboardNavigation)?"0":"-1";return i},t.getAriaLabel=function(e){var o=t.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,d=o.day,u=o.locale,f=Ge(d,e),h=t.isDisabled(f)||t.isExcluded(f)?l:i;return"".concat(h," ").concat(Ee(f,"MMMM yyyy",u))},t.getQuarterClassNames=function(e){var o=t.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,d=o.minDate,u=o.maxDate,f=o.excludeDates,h=o.includeDates,p=o.filterDate,m=o.preSelection,g=o.disabledKeyboardNavigation,b=(d||u||f||h||p)&&lo(Sn(a,e),t.props);return je("react-datepicker__quarter-text","react-datepicker__quarter-".concat(e),{"react-datepicker__quarter-text--disabled":b,"react-datepicker__quarter-text--selected":l?t.isSelectedQuarter(a,e,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!g&&m&&t.isSelectedQuarter(a,e,m)&&!b,"react-datepicker__quarter-text--in-selecting-range":t.isInSelectingRangeQuarter(e),"react-datepicker__quarter-text--in-range":i&&s?fo(i,s,e,a):void 0,"react-datepicker__quarter-text--range-start":t.isRangeStartQuarter(e),"react-datepicker__quarter-text--range-end":t.isRangeEndQuarter(e)})},t.getMonthContent=function(e){var o=t.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,d=Jl(e,s),u=Aa(e,s);return i?i(e,d,u,l):a?u:d},t.getQuarterContent=function(e){var o,a=t.props,i=a.renderQuarterContent,s=a.locale,l=_v(e,s);return(o=i==null?void 0:i(e,l))!==null&&o!==void 0?o:l},t.renderMonths=function(){var e,o=t.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,d=(e=ja[mu(i,a)])===null||e===void 0?void 0:e.grid;return d==null?void 0:d.map(function(u,f){return c.createElement("div",{className:"react-datepicker__month-wrapper",key:f},u.map(function(h,p){return c.createElement("div",{ref:t.MONTH_REFS[h],key:p,onClick:function(m){t.onMonthClick(m,h)},onKeyDown:function(m){hu(m)&&(m.preventDefault(),m.key=j.Enter),t.onMonthKeyDown(m,h)},onMouseEnter:t.props.usePointerEvent?void 0:function(){return t.onMonthMouseEnter(h)},onPointerEnter:t.props.usePointerEvent?function(){return t.onMonthMouseEnter(h)}:void 0,tabIndex:Number(t.getTabIndex(h)),className:t.getMonthClassNames(h),"aria-disabled":t.isMonthDisabled(h),role:"option","aria-label":t.getAriaLabel(h),"aria-current":t.isCurrentMonth(s,h)?"date":void 0,"aria-selected":l?t.isSelectedMonth(s,h,l):void 0},t.getMonthContent(h))}))})},t.renderQuarters=function(){var e=t.props,o=e.day,a=e.selected,i=[1,2,3,4];return c.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return c.createElement("div",{key:l,ref:t.QUARTER_REFS[l],role:"option",onClick:function(d){t.onQuarterClick(d,s)},onKeyDown:function(d){t.onQuarterKeyDown(d,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 e=t.props,o=e.selectingDate,a=e.selectsStart,i=e.selectsEnd,s=e.showMonthYearPicker,l=e.showQuarterYearPicker,d=e.showWeekPicker;return je("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":d})},t}return r.prototype.getSelection=function(){var t=this.props,e=t.selected,o=t.selectedDates,a=t.selectsMultiple;if(a)return o;if(e)return[e]},r.prototype.render=function(){var t=this.props,e=t.showMonthYearPicker,o=t.showQuarterYearPicker,a=t.day,i=t.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"";return c.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(Ee(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},e?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(c.Component),Vv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.isSelectedMonth=function(e){return t.props.month===e},t.renderOptions=function(){return t.props.monthNames.map(function(e,o){return c.createElement("div",{className:t.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:e,onClick:t.onChange.bind(t,o),"aria-selected":t.isSelectedMonth(o)?"true":void 0},t.isSelectedMonth(o)?c.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",e)})},t.onChange=function(e){return t.props.onChange(e)},t.handleClickOutside=function(){return t.props.onCancel()},t}return r.prototype.render=function(){return c.createElement(ro,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(c.Component),zv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(e){return e.map(function(o,a){return c.createElement("option",{key:o,value:a},o)})},t.renderSelectMode=function(e){return c.createElement("select",{value:t.props.month,className:"react-datepicker__month-select",onChange:function(o){return t.onChange(parseInt(o.target.value))}},t.renderSelectOptions(e))},t.renderReadView=function(e,o){return c.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:t.toggleDropdown},c.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),c.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[t.props.month]))},t.renderDropdown=function(e){return c.createElement(Vv,ce({key:"dropdown"},t.props,{monthNames:e,onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(e){var o=t.state.dropdownVisible,a=[t.renderReadView(!o,e)];return o&&a.unshift(t.renderDropdown(e)),a},t.onChange=function(e){t.toggleDropdown(),e!==t.props.month&&t.props.onChange(e)},t.toggleDropdown=function(){return t.setState({dropdownVisible:!t.state.dropdownVisible})},t}return r.prototype.render=function(){var t=this,e=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return Jl(a,t.props.locale)}:function(a){return Aa(a,t.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(e);break;case"select":o=this.renderSelectMode(e);break}return c.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r}(c.Component);function Uv(n,r){for(var t=[],e=St(n),o=St(r);!$t(e,o);)t.push(pe(e)),e=rt(e,1);return t}var Qv=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;return e.renderOptions=function(){return e.state.monthYearsList.map(function(o){var a=Oa(o),i=ht(e.props.date,o)&&Ve(e.props.date,o);return c.createElement("div",{className:i?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:a,onClick:e.onChange.bind(e,a),"aria-selected":i?"true":void 0},i?c.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Ee(o,e.props.dateFormat,e.props.locale))})},e.onChange=function(o){return e.props.onChange(o)},e.handleClickOutside=function(){e.props.onCancel()},e.state={monthYearsList:Uv(e.props.minDate,e.props.maxDate)},e}return r.prototype.render=function(){var t=je({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return c.createElement(ro,{className:t,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(c.Component),Kv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=St(t.props.minDate),o=St(t.props.maxDate),a=[];!$t(e,o);){var i=Oa(e);a.push(c.createElement("option",{key:i,value:i},Ee(e,t.props.dateFormat,t.props.locale))),e=rt(e,1)}return a},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return c.createElement("select",{value:Oa(St(t.props.date)),className:"react-datepicker__month-year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){var o=Ee(t.props.date,t.props.dateFormat,t.props.locale);return c.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:t.toggleDropdown},c.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),c.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},t.renderDropdown=function(){return c.createElement(Qv,ce({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,o=[t.renderReadView(!e)];return e&&o.unshift(t.renderDropdown()),o},t.onChange=function(e){t.toggleDropdown();var o=pe(e);ht(t.props.date,o)&&Ve(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 c.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},t)},r}(c.Component),qv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={height:null},t.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var e,o,a;t.list&&(t.list.scrollTop=(a=t.centerLi&&r.calcCenterPosition(t.props.monthRef?t.props.monthRef.clientHeight-((o=(e=t.header)===null||e===void 0?void 0:e.clientHeight)!==null&&o!==void 0?o:0):t.list.clientHeight,t.centerLi))!==null&&a!==void 0?a:0)})},t.handleClick=function(e){var o,a;(t.props.minTime||t.props.maxTime)&&nu(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&tu(e,t.props)||(a=(o=t.props).onChange)===null||a===void 0||a.call(o,e)},t.isSelectedTime=function(e){return t.props.selected&&Av(t.props.selected,e)},t.isDisabledTime=function(e){return(t.props.minTime||t.props.maxTime)&&nu(e,t.props)||(t.props.excludeTimes||t.props.includeTimes||t.props.filterTime)&&tu(e,t.props)},t.liClasses=function(e){var o,a=["react-datepicker__time-list-item",t.props.timeClassName?t.props.timeClassName(e):void 0];return t.isSelectedTime(e)&&a.push("react-datepicker__time-list-item--selected"),t.isDisabledTime(e)&&a.push("react-datepicker__time-list-item--disabled"),t.props.injectTimes&&(Et(e)*3600+kt(e)*60+Lt(e))%(((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(e,o){var a,i;e.key===j.Space&&(e.preventDefault(),e.key=j.Enter),(e.key===j.ArrowUp||e.key===j.ArrowLeft)&&e.target instanceof HTMLElement&&e.target.previousSibling&&(e.preventDefault(),e.target.previousSibling instanceof HTMLElement&&e.target.previousSibling.focus()),(e.key===j.ArrowDown||e.key===j.ArrowRight)&&e.target instanceof HTMLElement&&e.target.nextSibling&&(e.preventDefault(),e.target.nextSibling instanceof HTMLElement&&e.target.nextSibling.focus()),e.key===j.Enter&&t.handleClick(o),(i=(a=t.props).handleOnKeyDown)===null||i===void 0||i.call(a,e)},t.renderTimes=function(){for(var e,o=[],a=typeof t.props.format=="string"?t.props.format:"p",i=(e=t.props.intervals)!==null&&e!==void 0?e:r.defaultProps.intervals,s=t.props.selected||t.props.openToDate||pe(),l=ao(s),d=t.props.injectTimes&&t.props.injectTimes.sort(function(b,y){return b.getTime()-y.getTime()}),u=60*$v(s),f=u/i,h=0;h<f;h++){var p=Ea(l,h*i);if(o.push(p),d){var m=Lv(l,p,h,i,d);o=o.concat(m)}}var g=o.reduce(function(b,y){return y.getTime()<=s.getTime()?y:b},o[0]);return o.map(function(b){return c.createElement("li",{key:b.valueOf(),onClick:t.handleClick.bind(t,b),className:t.liClasses(b),ref:function(y){b===g&&(t.centerLi=y)},onKeyDown:function(y){t.handleOnKeyDown(y,b)},tabIndex:b===g?0:-1,role:"option","aria-selected":t.isSelectedTime(b)?"true":void 0,"aria-disabled":t.isDisabledTime(b)?"true":void 0},Ee(b,a,t.props.locale))})},t.renderTimeCaption=function(){return t.props.showTimeCaption===!1?c.createElement(c.Fragment,null):c.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(t.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(e){t.header=e}},c.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.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},r.prototype.render=function(){var t=this,e,o=this.state.height;return c.createElement("div",{className:"react-datepicker__time-container ".concat(((e=this.props.todayButton)!==null&&e!==void 0?e:r.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),c.createElement("div",{className:"react-datepicker__time"},c.createElement("div",{className:"react-datepicker__time-box"},c.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,e){return e.offsetTop-(t/2-e.clientHeight/2)},r}(c.Component),gu=3,Gv=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;return e.YEAR_REFS=pt([],Array(e.props.yearItemNumber),!0).map(function(){return c.createRef()}),e.isDisabled=function(o){return Je(o,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(o){return Ya(o,{excludeDates:e.props.excludeDates})},e.selectingDate=function(){var o;return(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection},e.updateFocusOnPaginate=function(o){var a=function(){var i,s;(s=(i=e.YEAR_REFS[o])===null||i===void 0?void 0:i.current)===null||s===void 0||s.focus()};window.requestAnimationFrame(a)},e.handleYearClick=function(o,a){e.props.onDayClick&&e.props.onDayClick(o,a)},e.handleYearNavigation=function(o,a){var i,s,l,d,u=e.props,f=u.date,h=u.yearItemNumber;if(!(f===void 0||h===void 0)){var p=Yt(f,h).startPeriod;e.isDisabled(a)||e.isExcluded(a)||((s=(i=e.props).setPreSelection)===null||s===void 0||s.call(i,a),o-p<0?e.updateFocusOnPaginate(h-(p-o)):o-p>=h?e.updateFocusOnPaginate(Math.abs(h-(o-p))):(d=(l=e.YEAR_REFS[o-p])===null||l===void 0?void 0:l.current)===null||d===void 0||d.focus())}},e.isSameDay=function(o,a){return de(o,a)},e.isCurrentYear=function(o){return o===Z(pe())},e.isRangeStart=function(o){return e.props.startDate&&e.props.endDate&&ht(ft(pe(),o),e.props.startDate)},e.isRangeEnd=function(o){return e.props.startDate&&e.props.endDate&&ht(ft(pe(),o),e.props.endDate)},e.isInRange=function(o){return uo(o,e.props.startDate,e.props.endDate)},e.isInSelectingRange=function(o){var a=e.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,d=a.startDate,u=a.endDate;return!(i||s||l)||!e.selectingDate()?!1:i&&u?uo(o,e.selectingDate(),u):s&&d||l&&d&&!u?uo(o,d,e.selectingDate()):!1},e.isSelectingRangeStart=function(o){var a;if(!e.isInSelectingRange(o))return!1;var i=e.props,s=i.startDate,l=i.selectsStart,d=ft(pe(),o);return l?ht(d,(a=e.selectingDate())!==null&&a!==void 0?a:null):ht(d,s??null)},e.isSelectingRangeEnd=function(o){var a;if(!e.isInSelectingRange(o))return!1;var i=e.props,s=i.endDate,l=i.selectsEnd,d=i.selectsRange,u=ft(pe(),o);return l||d?ht(u,(a=e.selectingDate())!==null&&a!==void 0?a:null):ht(u,s??null)},e.isKeyboardSelected=function(o){if(!(e.props.date===void 0||e.props.selected==null||e.props.preSelection==null)){var a=e.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,d=a.includeDates,u=a.filterDate,f=or(ft(e.props.date,o)),h=(i||s||l||d||u)&&co(o,e.props);return!e.props.disabledKeyboardNavigation&&!e.props.inline&&!de(f,or(e.props.selected))&&de(f,or(e.props.preSelection))&&!h}},e.onYearClick=function(o,a){var i=e.props.date;i!==void 0&&e.handleYearClick(or(ft(i,a)),o)},e.onYearKeyDown=function(o,a){var i,s,l=o.key,d=e.props,u=d.date,f=d.yearItemNumber,h=d.handleOnKeyDown;if(l!==j.Tab&&o.preventDefault(),!e.props.disabledKeyboardNavigation)switch(l){case j.Enter:if(e.props.selected==null)break;e.onYearClick(o,a),(s=(i=e.props).setPreSelection)===null||s===void 0||s.call(i,e.props.selected);break;case j.ArrowRight:if(e.props.preSelection==null)break;e.handleYearNavigation(a+1,xt(e.props.preSelection,1));break;case j.ArrowLeft:if(e.props.preSelection==null)break;e.handleYearNavigation(a-1,Cn(e.props.preSelection,1));break;case j.ArrowUp:{if(u===void 0||f===void 0||e.props.preSelection==null)break;var p=Yt(u,f).startPeriod,m=gu,g=a-m;if(g<p){var b=f%m;a>=p&&a<p+b?m=b:m+=b,g=a-m}e.handleYearNavigation(g,Cn(e.props.preSelection,m));break}case j.ArrowDown:{if(u===void 0||f===void 0||e.props.preSelection==null)break;var y=Yt(u,f).endPeriod,m=gu,g=a+m;if(g>y){var b=f%m;a<=y&&a>y-b?m=b:m+=b,g=a+m}e.handleYearNavigation(g,xt(e.props.preSelection,m));break}}h&&h(o)},e.getYearClassNames=function(o){var a=e.props,i=a.date,s=a.minDate,l=a.maxDate,d=a.selected,u=a.excludeDates,f=a.includeDates,h=a.filterDate,p=a.yearClassName;return je("react-datepicker__year-text","react-datepicker__year-".concat(o),i?p==null?void 0:p(ft(i,o)):void 0,{"react-datepicker__year-text--selected":d?o===Z(d):void 0,"react-datepicker__year-text--disabled":(s||l||u||f||h)&&co(o,e.props),"react-datepicker__year-text--keyboard-selected":e.isKeyboardSelected(o),"react-datepicker__year-text--range-start":e.isRangeStart(o),"react-datepicker__year-text--range-end":e.isRangeEnd(o),"react-datepicker__year-text--in-range":e.isInRange(o),"react-datepicker__year-text--in-selecting-range":e.isInSelectingRange(o),"react-datepicker__year-text--selecting-range-start":e.isSelectingRangeStart(o),"react-datepicker__year-text--selecting-range-end":e.isSelectingRangeEnd(o),"react-datepicker__year-text--today":e.isCurrentYear(o)})},e.getYearTabIndex=function(o){if(e.props.disabledKeyboardNavigation||e.props.preSelection==null)return"-1";var a=Z(e.props.preSelection),i=co(o,e.props);return o===a&&!i?"0":"-1"},e.getYearContent=function(o){return e.props.renderYearContent?e.props.renderYearContent(o):o},e}return r.prototype.render=function(){var t=this,e=[],o=this.props,a=o.date,i=o.yearItemNumber,s=o.onYearMouseEnter,l=o.onYearMouseLeave;if(a===void 0)return null;for(var d=Yt(a,i),u=d.startPeriod,f=d.endPeriod,h=function(g){e.push(c.createElement("div",{ref:p.YEAR_REFS[g-u],onClick:function(b){t.onYearClick(b,g)},onKeyDown:function(b){hu(b)&&(b.preventDefault(),b.key=j.Enter),t.onYearKeyDown(b,g)},tabIndex:Number(p.getYearTabIndex(g)),className:p.getYearClassNames(g),onMouseEnter:p.props.usePointerEvent?void 0:function(b){return s(b,g)},onPointerEnter:p.props.usePointerEvent?function(b){return s(b,g)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(b){return l(b,g)},onPointerLeave:p.props.usePointerEvent?function(b){return l(b,g)}:void 0,key:g,"aria-current":p.isCurrentYear(g)?"date":void 0},p.getYearContent(g)))},p=this,m=u;m<=f;m++)h(m);return c.createElement("div",{className:"react-datepicker__year"},c.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},e))},r}(c.Component);function Xv(n,r,t,e){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;t&&(s=Z(t)<=i),e&&s&&(s=Z(e)>=i),s&&o.push(i)}return o}var Jv=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;e.renderOptions=function(){var s=e.props.year,l=e.state.yearsList.map(function(f){return c.createElement("div",{className:s===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:e.onChange.bind(e,f),"aria-selected":s===f?"true":void 0},s===f?c.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),d=e.props.minDate?Z(e.props.minDate):null,u=e.props.maxDate?Z(e.props.maxDate):null;return(!u||!e.state.yearsList.find(function(f){return f===u}))&&l.unshift(c.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:e.incrementYears},c.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!d||!e.state.yearsList.find(function(f){return f===d}))&&l.push(c.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:e.decrementYears},c.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),l},e.onChange=function(s){e.props.onChange(s)},e.handleClickOutside=function(){e.props.onCancel()},e.shiftYears=function(s){var l=e.state.yearsList.map(function(d){return d+s});e.setState({yearsList:l})},e.incrementYears=function(){return e.shiftYears(1)},e.decrementYears=function(){return e.shiftYears(-1)};var o=t.yearDropdownItemNumber,a=t.scrollableYearDropdown,i=o||(a?10:5);return e.state={yearsList:Xv(e.props.year,i,e.props.minDate,e.props.maxDate)},e.dropdownRef=c.createRef(),e}return r.prototype.componentDidMount=function(){var t=this.dropdownRef.current;if(t){var e=t.children?Array.from(t.children):null,o=e?e.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=je({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return c.createElement(ro,{className:t,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(c.Component),Zv=function(n){We(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.state={dropdownVisible:!1},t.renderSelectOptions=function(){for(var e=t.props.minDate?Z(t.props.minDate):1900,o=t.props.maxDate?Z(t.props.maxDate):2100,a=[],i=e;i<=o;i++)a.push(c.createElement("option",{key:i,value:i},i));return a},t.onSelectChange=function(e){t.onChange(parseInt(e.target.value))},t.renderSelectMode=function(){return c.createElement("select",{value:t.props.year,className:"react-datepicker__year-select",onChange:t.onSelectChange},t.renderSelectOptions())},t.renderReadView=function(e){return c.createElement("div",{key:"read",style:{visibility:e?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(o){return t.toggleDropdown(o)}},c.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),c.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},t.props.year))},t.renderDropdown=function(){return c.createElement(Jv,ce({key:"dropdown"},t.props,{onChange:t.onChange,onCancel:t.toggleDropdown}))},t.renderScrollMode=function(){var e=t.state.dropdownVisible,o=[t.renderReadView(!e)];return e&&o.unshift(t.renderDropdown()),o},t.onChange=function(e){t.toggleDropdown(),e!==t.props.year&&t.props.onChange(e)},t.toggleDropdown=function(e){t.setState({dropdownVisible:!t.state.dropdownVisible},function(){t.props.adjustDateOnChange&&t.handleYearChange(t.props.date,e)})},t.handleYearChange=function(e,o){var a;(a=t.onSelect)===null||a===void 0||a.call(t,e,o),t.setOpen()},t.onSelect=function(e,o){var a,i;(i=(a=t.props).onSelect)===null||i===void 0||i.call(a,e,o)},t.setOpen=function(){var e,o;(o=(e=t.props).setOpen)===null||o===void 0||o.call(e,!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 c.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},t)},r}(c.Component),ey=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],ty=function(n){var r=(n.className||"").split(/\s+/);return ey.some(function(t){return r.indexOf(t)>=0})},ny=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;return e.monthContainer=void 0,e.handleClickOutside=function(o){e.props.onClickOutside(o)},e.setClickOutsideRef=function(){return e.containerRef.current},e.handleDropdownFocus=function(o){var a,i;ty(o.target)&&((i=(a=e.props).onDropdownFocus)===null||i===void 0||i.call(a,o))},e.getDateInView=function(){var o=e.props,a=o.preSelection,i=o.selected,s=o.openToDate,l=su(e.props),d=lu(e.props),u=pe(),f=s||i||a;return f||(l&&tn(u,l)?l:d&&$t(u,d)?d:u)},e.increaseMonth=function(){e.setState(function(o){var a=o.date;return{date:rt(a,1)}},function(){return e.handleMonthChange(e.state.date)})},e.decreaseMonth=function(){e.setState(function(o){var a=o.date;return{date:nn(a,1)}},function(){return e.handleMonthChange(e.state.date)})},e.handleDayClick=function(o,a,i){e.props.onSelect(o,a,i),e.props.setPreSelection&&e.props.setPreSelection(o)},e.handleDayMouseEnter=function(o){e.setState({selectingDate:o}),e.props.onDayMouseEnter&&e.props.onDayMouseEnter(o)},e.handleMonthMouseLeave=function(){e.setState({selectingDate:void 0}),e.props.onMonthMouseLeave&&e.props.onMonthMouseLeave()},e.handleYearMouseEnter=function(o,a){e.setState({selectingDate:ft(pe(),a)}),e.props.onYearMouseEnter&&e.props.onYearMouseEnter(o,a)},e.handleYearMouseLeave=function(o,a){e.props.onYearMouseLeave&&e.props.onYearMouseLeave(o,a)},e.handleYearChange=function(o){var a,i,s,l;(i=(a=e.props).onYearChange)===null||i===void 0||i.call(a,o),e.setState({isRenderAriaLiveMessage:!0}),e.props.adjustDateOnChange&&(e.props.onSelect(o),(l=(s=e.props).setOpen)===null||l===void 0||l.call(s,!0)),e.props.setPreSelection&&e.props.setPreSelection(o)},e.getEnabledPreSelectionDateForMonth=function(o){if(!Je(o,e.props))return o;for(var a=St(o),i=Ev(o),s=pm(i,a),l=null,d=0;d<=s;d++){var u=nt(a,d);if(!Je(u,e.props)){l=u;break}}return l},e.handleMonthChange=function(o){var a,i,s,l=(a=e.getEnabledPreSelectionDateForMonth(o))!==null&&a!==void 0?a:o;e.handleCustomMonthChange(l),e.props.adjustDateOnChange&&(e.props.onSelect(l),(s=(i=e.props).setOpen)===null||s===void 0||s.call(i,!0)),e.props.setPreSelection&&e.props.setPreSelection(l)},e.handleCustomMonthChange=function(o){var a,i;(i=(a=e.props).onMonthChange)===null||i===void 0||i.call(a,o),e.setState({isRenderAriaLiveMessage:!0})},e.handleMonthYearChange=function(o){e.handleYearChange(o),e.handleMonthChange(o)},e.changeYear=function(o){e.setState(function(a){var i=a.date;return{date:ft(i,Number(o))}},function(){return e.handleYearChange(e.state.date)})},e.changeMonth=function(o){e.setState(function(a){var i=a.date;return{date:Ge(i,Number(o))}},function(){return e.handleMonthChange(e.state.date)})},e.changeMonthYear=function(o){e.setState(function(a){var i=a.date;return{date:ft(Ge(i,Be(o)),Z(o))}},function(){return e.handleMonthYearChange(e.state.date)})},e.header=function(o){o===void 0&&(o=e.state.date);var a=At(o,e.props.locale,e.props.calendarStartDay),i=[];return e.props.showWeekNumbers&&i.push(c.createElement("div",{key:"W",className:"react-datepicker__day-name"},e.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(s){var l=nt(a,s),d=e.formatWeekday(l,e.props.locale),u=e.props.weekDayClassName?e.props.weekDayClassName(l):void 0;return c.createElement("div",{key:s,"aria-label":Ee(l,"EEEE",e.props.locale),className:je("react-datepicker__day-name",u)},d)}))},e.formatWeekday=function(o,a){return e.props.formatWeekDay?kv(o,e.props.formatWeekDay,a):e.props.useWeekdaysShort?Cv(o,a):Sv(o,a)},e.decreaseYear=function(){e.setState(function(o){var a,i=o.date;return{date:Cn(i,e.props.showYearPicker?(a=e.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.clearSelectingDate=function(){e.setState({selectingDate:void 0})},e.renderPreviousButton=function(){var o,a,i;if(!e.props.renderCustomHeader){var s=(o=e.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=e.props.showPreviousMonths?s-1:0,d=(a=e.props.monthSelectedIn)!==null&&a!==void 0?a:l,u=nn(e.state.date,d),f;switch(!0){case e.props.showMonthYearPicker:f=au(e.state.date,e.props);break;case e.props.showYearPicker:f=Tv(e.state.date,e.props);break;case e.props.showQuarterYearPicker:f=Ov(e.state.date,e.props);break;default:f=ru(u,e.props);break}if(!(!((i=e.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&f||e.props.showTimeSelectOnly)){var h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],p=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=e.decreaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(m=e.decreaseYear),f&&e.props.showDisabledMonthNavigation&&(p.push("react-datepicker__navigation--previous--disabled"),m=void 0);var g=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,b=e.props,y=b.previousMonthButtonLabel,x=y===void 0?r.defaultProps.previousMonthButtonLabel:y,w=b.previousYearButtonLabel,E=w===void 0?r.defaultProps.previousYearButtonLabel:w,_=e.props,D=_.previousMonthAriaLabel,k=D===void 0?typeof x=="string"?x:"Previous Month":D,S=_.previousYearAriaLabel,C=S===void 0?typeof E=="string"?E:"Previous Year":S;return c.createElement("button",{type:"button",className:p.join(" "),onClick:m,onKeyDown:e.props.handleOnKeyDown,"aria-label":g?C:k},c.createElement("span",{className:h.join(" ")},g?E:x))}}},e.increaseYear=function(){e.setState(function(o){var a,i=o.date;return{date:xt(i,e.props.showYearPicker?(a=e.props.yearItemNumber)!==null&&a!==void 0?a:r.defaultProps.yearItemNumber:1)}},function(){return e.handleYearChange(e.state.date)})},e.renderNextButton=function(){var o;if(!e.props.renderCustomHeader){var a;switch(!0){case e.props.showMonthYearPicker:a=iu(e.state.date,e.props);break;case e.props.showYearPicker:a=Nv(e.state.date,e.props);break;case e.props.showQuarterYearPicker:a=Pv(e.state.date,e.props);break;default:a=ou(e.state.date,e.props);break}if(!(!((o=e.props.forceShowMonthNavigation)!==null&&o!==void 0?o:r.defaultProps.forceShowMonthNavigation)&&!e.props.showDisabledMonthNavigation&&a||e.props.showTimeSelectOnly)){var i=["react-datepicker__navigation","react-datepicker__navigation--next"],s=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];e.props.showTimeSelect&&i.push("react-datepicker__navigation--next--with-time"),e.props.todayButton&&i.push("react-datepicker__navigation--next--with-today-button");var l=e.increaseMonth;(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker)&&(l=e.increaseYear),a&&e.props.showDisabledMonthNavigation&&(i.push("react-datepicker__navigation--next--disabled"),l=void 0);var d=e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker,u=e.props,f=u.nextMonthButtonLabel,h=f===void 0?r.defaultProps.nextMonthButtonLabel:f,p=u.nextYearButtonLabel,m=p===void 0?r.defaultProps.nextYearButtonLabel:p,g=e.props,b=g.nextMonthAriaLabel,y=b===void 0?typeof h=="string"?h:"Next Month":b,x=g.nextYearAriaLabel,w=x===void 0?typeof m=="string"?m:"Next Year":x;return c.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:e.props.handleOnKeyDown,"aria-label":d?w:y},c.createElement("span",{className:s.join(" ")},d?m:h))}}},e.renderCurrentMonth=function(o){o===void 0&&(o=e.state.date);var a=["react-datepicker__current-month"];return e.props.showYearDropdown&&a.push("react-datepicker__current-month--hasYearDropdown"),e.props.showMonthDropdown&&a.push("react-datepicker__current-month--hasMonthDropdown"),e.props.showMonthYearDropdown&&a.push("react-datepicker__current-month--hasMonthYearDropdown"),c.createElement("h2",{className:a.join(" ")},Ee(o,e.props.dateFormat,e.props.locale))},e.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!e.props.showYearDropdown||o))return c.createElement(Zv,ce({},r.defaultProps,e.props,{date:e.state.date,onChange:e.changeYear,year:Z(e.state.date)}))},e.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!e.props.showMonthDropdown||o))return c.createElement(zv,ce({},r.defaultProps,e.props,{month:Be(e.state.date),onChange:e.changeMonth}))},e.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!e.props.showMonthYearDropdown||o))return c.createElement(Kv,ce({},r.defaultProps,e.props,{date:e.state.date,onChange:e.changeMonthYear}))},e.handleTodayButtonClick=function(o){e.props.onSelect(Gl(),o),e.props.setPreSelection&&e.props.setPreSelection(Gl())},e.renderTodayButton=function(){if(!(!e.props.todayButton||e.props.showTimeSelectOnly))return c.createElement("div",{className:"react-datepicker__today-button",onClick:e.handleTodayButtonClick},e.props.todayButton)},e.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return c.createElement("div",{className:"react-datepicker__header ".concat(e.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},e.renderCurrentMonth(a),c.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(e.props.dropdownMode),onFocus:e.handleDropdownFocus},e.renderMonthDropdown(i!==0),e.renderMonthYearDropdown(i!==0),e.renderYearDropdown(i!==0)),c.createElement("div",{className:"react-datepicker__day-names"},e.header(a)))},e.renderCustomHeader=function(o){var a,i,s=o.monthDate,l=o.i;if(e.props.showTimeSelect&&!e.state.monthContainer||e.props.showTimeSelectOnly)return null;var d=ru(e.state.date,e.props),u=ou(e.state.date,e.props),f=au(e.state.date,e.props),h=iu(e.state.date,e.props),p=!e.props.showMonthYearPicker&&!e.props.showQuarterYearPicker&&!e.props.showYearPicker;return c.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:e.props.onDropdownFocus},(i=(a=e.props).renderCustomHeader)===null||i===void 0?void 0:i.call(a,ce(ce({},e.state),{customHeaderCount:l,monthDate:s,changeMonth:e.changeMonth,changeYear:e.changeYear,decreaseMonth:e.decreaseMonth,increaseMonth:e.increaseMonth,decreaseYear:e.decreaseYear,increaseYear:e.increaseYear,prevMonthButtonDisabled:d,nextMonthButtonDisabled:u,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),p&&c.createElement("div",{className:"react-datepicker__day-names"},e.header(s)))},e.renderYearHeader=function(o){var a=o.monthDate,i=e.props,s=i.showYearPicker,l=i.yearItemNumber,d=l===void 0?r.defaultProps.yearItemNumber:l,u=Yt(a,d),f=u.startPeriod,h=u.endPeriod;return c.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(h):Z(a))},e.renderHeader=function(o){var a=o.monthDate,i=o.i,s=i===void 0?0:i,l={monthDate:a,i:s};switch(!0){case e.props.renderCustomHeader!==void 0:return e.renderCustomHeader(l);case(e.props.showMonthYearPicker||e.props.showQuarterYearPicker||e.props.showYearPicker):return e.renderYearHeader(l);default:return e.renderDefaultHeader(l)}},e.renderMonths=function(){var o,a;if(!(e.props.showTimeSelectOnly||e.props.showYearPicker)){for(var i=[],s=(o=e.props.monthsShown)!==null&&o!==void 0?o:r.defaultProps.monthsShown,l=e.props.showPreviousMonths?s-1:0,d=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?xt(e.state.date,l):nn(e.state.date,l),u=(a=e.props.monthSelectedIn)!==null&&a!==void 0?a:l,f=0;f<s;++f){var h=f-u+l,p=e.props.showMonthYearPicker||e.props.showQuarterYearPicker?xt(d,h):rt(d,h),m="month-".concat(f),g=f<s-1,b=f>0;i.push(c.createElement("div",{key:m,ref:function(y){e.monthContainer=y??void 0},className:"react-datepicker__month-container"},e.renderHeader({monthDate:p,i:f}),c.createElement(Bv,ce({},r.defaultProps,e.props,{ariaLabelPrefix:e.props.monthAriaLabelPrefix,day:p,onDayClick:e.handleDayClick,handleOnKeyDown:e.props.handleOnDayKeyDown,handleOnMonthKeyDown:e.props.handleOnKeyDown,onDayMouseEnter:e.handleDayMouseEnter,onMouseLeave:e.handleMonthMouseLeave,orderInDisplay:f,selectingDate:e.state.selectingDate,monthShowsDuplicateDaysEnd:g,monthShowsDuplicateDaysStart:b}))))}return i}},e.renderYears=function(){if(!e.props.showTimeSelectOnly&&e.props.showYearPicker)return c.createElement("div",{className:"react-datepicker__year--container"},e.renderHeader({monthDate:e.state.date}),c.createElement(Gv,ce({},r.defaultProps,e.props,{selectingDate:e.state.selectingDate,date:e.state.date,onDayClick:e.handleDayClick,clearSelectingDate:e.clearSelectingDate,onYearMouseEnter:e.handleYearMouseEnter,onYearMouseLeave:e.handleYearMouseLeave})))},e.renderTimeSection=function(){if(e.props.showTimeSelect&&(e.state.monthContainer||e.props.showTimeSelectOnly))return c.createElement(qv,ce({},r.defaultProps,e.props,{onChange:e.props.onTimeChange,format:e.props.timeFormat,intervals:e.props.timeIntervals,monthRef:e.state.monthContainer}))},e.renderInputTimeSection=function(){var o=e.props.selected?new Date(e.props.selected):void 0,a=o&&oo(o)&&!!e.props.selected,i=a?"".concat(cu(o.getHours()),":").concat(cu(o.getMinutes())):"";if(e.props.showTimeInput)return c.createElement(Yv,ce({},r.defaultProps,e.props,{date:o,timeString:i,onChange:e.props.onTimeChange}))},e.renderAriaLiveRegion=function(){var o,a=Yt(e.state.date,(o=e.props.yearItemNumber)!==null&&o!==void 0?o:r.defaultProps.yearItemNumber),i=a.startPeriod,s=a.endPeriod,l;return e.props.showYearPicker?l="".concat(i," - ").concat(s):e.props.showMonthYearPicker||e.props.showQuarterYearPicker?l=Z(e.state.date):l="".concat(Aa(Be(e.state.date),e.props.locale)," ").concat(Z(e.state.date)),c.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},e.state.isRenderAriaLiveMessage&&l)},e.renderChildren=function(){if(e.props.children)return c.createElement("div",{className:"react-datepicker__children-container"},e.props.children)},e.containerRef=c.createRef(),e.state={date:e.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:rr}},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 e=this;if(this.props.preSelection&&(!de(this.props.preSelection,t.preSelection)||this.props.monthSelectedIn!==t.monthSelectedIn)){var o=!Ve(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&e.handleCustomMonthChange(e.state.date)})}else this.props.openToDate&&!de(this.props.openToDate,t.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var t=this.props.container||gv;return c.createElement(ro,{onClickOutside:this.handleClickOutside,style:{display:"contents"},containerRef:this.containerRef,ignoreClass:this.props.outsideClickIgnoreClass},c.createElement(t,{className:je("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}(c.Component),ry=function(n){var r=n.icon,t=n.className,e=t===void 0?"":t,o=n.onClick,a="react-datepicker__calendar-icon";if(typeof r=="string")return c.createElement("i",{className:"".concat(a," ").concat(r," ").concat(e),"aria-hidden":"true",onClick:o});if(c.isValidElement(r)){var i=r;return c.cloneElement(i,{className:"".concat(i.props.className||""," ").concat(a," ").concat(e),onClick:function(s){typeof i.props.onClick=="function"&&i.props.onClick(s),typeof o=="function"&&o(s)}})}return c.createElement("svg",{className:"".concat(a," ").concat(e),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},c.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"}))},bu=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;return e.portalRoot=null,e.el=document.createElement("div"),e}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 Se.createPortal(this.props.children,this.el)},r}(c.Component),oy="[tabindex], a, button, input, select, textarea",ay=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},vu=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;return e.getTabChildren=function(){var o;return Array.prototype.slice.call((o=e.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(oy),1,-1).filter(ay)},e.handleFocusStart=function(){var o=e.getTabChildren();o&&o.length>1&&o[o.length-1].focus()},e.handleFocusEnd=function(){var o=e.getTabChildren();o&&o.length>1&&o[0].focus()},e.tabLoopRef=c.createRef(),e}return r.prototype.render=function(){var t;return((t=this.props.enableTabLoop)!==null&&t!==void 0?t:r.defaultProps.enableTabLoop)?c.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},c.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,c.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r}(c.Component);function iy(n){var r=function(t){var e,o=typeof t.hidePopper=="boolean"?t.hidePopper:!0,a=c.useRef(null),i=mv(ce({open:!o,whileElementsMounted:ps,placement:t.popperPlacement,middleware:pt([vs({padding:15}),oa(10),Ff({element:a})],(e=t.popperModifiers)!==null&&e!==void 0?e:[],!0)},t.popperProps)),s=ce(ce({},t),{hidePopper:o,popperProps:ce(ce({},i),{arrowRef:a})});return c.createElement(n,ce({},s))};return r}var sy=function(n){We(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(r,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var t=this.props,e=t.className,o=t.wrapperClassName,a=t.hidePopper,i=a===void 0?r.defaultProps.hidePopper:a,s=t.popperComponent,l=t.targetComponent,d=t.enableTabLoop,u=t.popperOnKeyDown,f=t.portalId,h=t.portalHost,p=t.popperProps,m=t.showArrow,g=void 0;if(!i){var b=je("react-datepicker-popper",e);g=c.createElement(vu,{enableTabLoop:d},c.createElement("div",{ref:p.refs.setFloating,style:p.floatingStyles,className:b,"data-placement":p.placement,onKeyDown:u},s,m&&c.createElement(lv,{ref:p.arrowRef,context:p.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(g=c.createElement(this.props.popperContainer,{},g)),f&&!i&&(g=c.createElement(bu,{portalId:f,portalHost:h},g));var y=je("react-datepicker-wrapper",o);return c.createElement(c.Fragment,null,c.createElement("div",{ref:p.refs.setReference,className:y},l),g)},r}(c.Component),ly=iy(sy),yu="react-datepicker-ignore-onclickoutside";function uy(n,r){return n&&r?Be(n)!==Be(r)||Z(n)!==Z(r):n!==r}var Ha="Date input not valid.",cy=function(n){We(r,n);function r(t){var e=n.call(this,t)||this;return e.calendar=null,e.input=null,e.getPreSelection=function(){return e.props.openToDate?e.props.openToDate:e.props.selectsEnd&&e.props.startDate?e.props.startDate:e.props.selectsStart&&e.props.endDate?e.props.endDate:pe()},e.modifyHolidays=function(){var o;return(o=e.props.holidays)===null||o===void 0?void 0:o.reduce(function(a,i){var s=new Date(i.date);return oo(s)?pt(pt([],a,!0),[ce(ce({},i),{date:s})],!1):a},[])},e.calcInitialState=function(){var o,a=e.getPreSelection(),i=su(e.props),s=lu(e.props),l=i&&tn(a,ao(i))?i:s&&$t(a,Xl(s))?s:a;return{open:e.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(o=e.props.selectsRange?e.props.startDate:e.props.selected)!==null&&o!==void 0?o:l,highlightDates:uu(e.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},e.resetHiddenStatus=function(){e.setState(ce(ce({},e.state),{wasHidden:!1}))},e.setHiddenStatus=function(){e.setState(ce(ce({},e.state),{wasHidden:!0}))},e.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&e.setHiddenStatus()},e.clearPreventFocusTimeout=function(){e.preventFocusTimeout&&clearTimeout(e.preventFocusTimeout)},e.safeFocus=function(){setTimeout(function(){var o,a;(a=(o=e.input)===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o,{preventScroll:!0})},0)},e.safeBlur=function(){setTimeout(function(){var o,a;(a=(o=e.input)===null||o===void 0?void 0:o.blur)===null||a===void 0||a.call(o)},0)},e.setFocus=function(){e.safeFocus()},e.setBlur=function(){e.safeBlur(),e.cancelFocusInput()},e.setOpen=function(o,a){a===void 0&&(a=!1),e.setState({open:o,preSelection:o&&e.state.open?e.state.preSelection:e.calcInitialState().preSelection,lastPreSelectChange:Wa},function(){o||e.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&e.setBlur(),e.setState({inputValue:null})})})},e.inputOk=function(){return Dt(e.state.preSelection)},e.isCalendarOpen=function(){return e.props.open===void 0?e.state.open&&!e.props.disabled&&!e.props.readOnly:e.props.open},e.handleFocus=function(o){var a,i,s=e.state.wasHidden,l=s?e.state.open:!0;s&&e.resetHiddenStatus(),e.state.preventFocus||((i=(a=e.props).onFocus)===null||i===void 0||i.call(a,o),l&&!e.props.preventOpenOnFocus&&!e.props.readOnly&&e.setOpen(!0)),e.setState({focused:!0})},e.sendFocusBackToInput=function(){e.preventFocusTimeout&&e.clearPreventFocusTimeout(),e.setState({preventFocus:!0},function(){e.preventFocusTimeout=setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})})},e.cancelFocusInput=function(){clearTimeout(e.inputFocusTimeout),e.inputFocusTimeout=void 0},e.deferFocusInput=function(){e.cancelFocusInput(),e.inputFocusTimeout=setTimeout(function(){return e.setFocus()},1)},e.handleDropdownFocus=function(){e.cancelFocusInput()},e.handleBlur=function(o){var a,i;(!e.state.open||e.props.withPortal||e.props.showTimeInput)&&((i=(a=e.props).onBlur)===null||i===void 0||i.call(a,o)),e.setState({focused:!1})},e.handleCalendarClickOutside=function(o){var a,i;e.props.inline||e.setOpen(!1),(i=(a=e.props).onClickOutside)===null||i===void 0||i.call(a,o),e.props.withPortal&&o.preventDefault()},e.handleChange=function(){for(var o,a,i,s,l,d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var f=d[0];if(!(e.props.onChangeRaw&&(e.props.onChangeRaw.apply(e,d),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){e.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:dy});var h=e.props,p=h.selectsRange,m=h.startDate,g=h.endDate,b=(o=e.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,y=(a=e.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,x=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(p){var w=x.split("-",2).map(function(O){return O.trim()}),E=w[0],_=w[1],D=Fa(E??"",b,e.props.locale,y),k=Fa(_??"",b,e.props.locale,y),S=(m==null?void 0:m.getTime())!==(D==null?void 0:D.getTime()),C=(g==null?void 0:g.getTime())!==(k==null?void 0:k.getTime());if(!S&&!C||D&&Je(D,e.props)||k&&Je(k,e.props))return;(s=(i=e.props).onChange)===null||s===void 0||s.call(i,[D,k],f)}else{var I=Fa(x,b,e.props.locale,y,(l=e.props.selected)!==null&&l!==void 0?l:void 0);(I||!x)&&e.setSelected(I,f,!0)}}},e.handleSelect=function(o,a,i){if(e.props.shouldCloseOnSelect&&!e.props.showTimeSelect&&e.sendFocusBackToInput(),e.props.onChangeRaw&&e.props.onChangeRaw(a),e.setSelected(o,a,!1,i),e.props.showDateSelect&&e.setState({isRenderAriaLiveMessage:!0}),!e.props.shouldCloseOnSelect||e.props.showTimeSelect)e.setPreSelection(o);else if(!e.props.inline){e.props.selectsRange||e.setOpen(!1);var s=e.props,l=s.startDate,d=s.endDate;l&&!d&&(e.props.swapRange||!pu(o,l))&&e.setOpen(!1)}},e.setSelected=function(o,a,i,s){var l,d,u=o;if(e.props.showYearPicker){if(u!==null&&co(Z(u),e.props))return}else if(e.props.showMonthYearPicker){if(u!==null&&Zl(u,e.props))return}else if(u!==null&&Je(u,e.props))return;var f=e.props,h=f.onChange,p=f.selectsRange,m=f.startDate,g=f.endDate,b=f.selectsMultiple,y=f.selectedDates,x=f.minTime,w=f.swapRange;if(!rn(e.props.selected,u)||e.props.allowSameDay||p||b)if(u!==null&&(e.props.selected&&(!i||!e.props.showTimeSelect&&!e.props.showTimeSelectOnly&&!e.props.showTimeInput)&&(u=La(u,{hour:Et(e.props.selected),minute:kt(e.props.selected),second:Lt(e.props.selected)})),!i&&(e.props.showTimeSelect||e.props.showTimeSelectOnly)&&x&&(u=La(u,{hour:x.getHours(),minute:x.getMinutes(),second:x.getSeconds()})),e.props.inline||e.setState({preSelection:u}),e.props.focusSelectedMonth||e.setState({monthSelectedIn:s})),p){var E=!m&&!g,_=m&&!g,D=m&&g;E?h==null||h([u,null],a):_&&(u===null?h==null||h([null,null],a):pu(u,m)?w?h==null||h([u,m],a):h==null||h([u,null],a):h==null||h([m,u],a)),D&&(h==null||h([u,null],a))}else if(b){if(u!==null)if(!(y!=null&&y.length))h==null||h([u],a);else{var k=y.some(function(C){return de(C,u)});if(k){var S=y.filter(function(C){return!de(C,u)});h==null||h(S,a)}else h==null||h(pt(pt([],y,!0),[u],!1),a)}}else h==null||h(u,a);i||((d=(l=e.props).onSelect)===null||d===void 0||d.call(l,u,a),e.setState({inputValue:null}))},e.setPreSelection=function(o){var a=Dt(e.props.minDate),i=Dt(e.props.maxDate),s=!0;if(o){var l=ao(o);if(a&&i)s=ar(o,e.props.minDate,e.props.maxDate);else if(a){var d=ao(e.props.minDate);s=$t(o,d)||rn(l,d)}else if(i){var u=Xl(e.props.maxDate);s=tn(o,u)||rn(l,u)}}s&&e.setState({preSelection:o})},e.toggleCalendar=function(){e.setOpen(!e.state.open)},e.handleTimeChange=function(o){var a,i;if(!(e.props.selectsRange||e.props.selectsMultiple)){var s=e.props.selected?e.props.selected:e.getPreSelection(),l=e.props.selected?o:La(s,{hour:Et(o),minute:kt(o)});e.setState({preSelection:l}),(i=(a=e.props).onChange)===null||i===void 0||i.call(a,l),e.props.shouldCloseOnSelect&&!e.props.showTimeInput&&(e.sendFocusBackToInput(),e.setOpen(!1)),e.props.showTimeInput&&e.setOpen(!0),(e.props.showTimeSelectOnly||e.props.showTimeSelect)&&e.setState({isRenderAriaLiveMessage:!0}),e.setState({inputValue:null})}},e.onInputClick=function(){var o,a;!e.props.disabled&&!e.props.readOnly&&e.setOpen(!0),(a=(o=e.props).onInputClick)===null||a===void 0||a.call(o)},e.onInputKeyDown=function(o){var a,i,s,l,d,u;(i=(a=e.props).onKeyDown)===null||i===void 0||i.call(a,o);var f=o.key;if(!e.state.open&&!e.props.inline&&!e.props.preventOpenOnFocus){(f===j.ArrowDown||f===j.ArrowUp||f===j.Enter)&&((s=e.onInputClick)===null||s===void 0||s.call(e));return}if(e.state.open){if(f===j.ArrowDown||f===j.ArrowUp){o.preventDefault();var h=e.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":e.props.showWeekPicker&&e.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':e.props.showFullMonthYearPicker||e.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',p=((l=e.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&e.calendar.containerRef.current.querySelector(h);p instanceof HTMLElement&&p.focus({preventScroll:!0});return}var m=pe(e.state.preSelection);f===j.Enter?(o.preventDefault(),o.target.blur(),e.inputOk()&&e.state.lastPreSelectChange===Wa?(e.handleSelect(m,o),!e.props.shouldCloseOnSelect&&e.setPreSelection(m)):e.setOpen(!1)):f===j.Escape?(o.preventDefault(),o.target.blur(),e.sendFocusBackToInput(),e.setOpen(!1)):f===j.Tab&&e.setOpen(!1),e.inputOk()||(u=(d=e.props).onInputError)===null||u===void 0||u.call(d,{code:1,msg:Ha})}},e.onPortalKeyDown=function(o){var a=o.key;a===j.Escape&&(o.preventDefault(),e.setState({preventFocus:!0},function(){e.setOpen(!1),setTimeout(function(){e.setFocus(),e.setState({preventFocus:!1})})}))},e.onDayKeyDown=function(o){var a,i,s,l,d,u,f=e.props,h=f.minDate,p=f.maxDate,m=f.disabledKeyboardNavigation,g=f.showWeekPicker,b=f.shouldCloseOnSelect,y=f.locale,x=f.calendarStartDay,w=f.adjustDateOnChange,E=f.inline;if((i=(a=e.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var _=o.key,D=o.shiftKey,k=pe(e.state.preSelection),S=function(Y,N){var V=N;switch(Y){case j.ArrowRight:V=g?zr(N,1):nt(N,1);break;case j.ArrowLeft:V=g?Bl(N):cb(N);break;case j.ArrowUp:V=Bl(N);break;case j.ArrowDown:V=zr(N,1);break;case j.PageUp:V=D?Cn(N,1):nn(N,1);break;case j.PageDown:V=D?xt(N,1):rt(N,1);break;case j.Home:V=At(N,y,x);break;case j.End:V=Dv(N);break}return V},C=function(Y,N){for(var V=40,A=Y,z=!1,J=0,G=S(Y,N);!z;){if(J>=V){G=N;break}h&&G<h&&(A=j.ArrowRight,G=Je(h,e.props)?S(A,G):h),p&&G>p&&(A=j.ArrowLeft,G=Je(p,e.props)?S(A,G):p),Je(G,e.props)?((A===j.PageUp||A===j.Home)&&(A=j.ArrowRight),(A===j.PageDown||A===j.End)&&(A=j.ArrowLeft),G=S(A,G)):z=!0,J++}return G};if(_===j.Enter){o.preventDefault(),e.handleSelect(k,o),!b&&e.setPreSelection(k);return}else if(_===j.Escape){o.preventDefault(),e.setOpen(!1),e.inputOk()||(l=(s=e.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Ha});return}var I=null;switch(_){case j.ArrowLeft:case j.ArrowRight:case j.ArrowUp:case j.ArrowDown:case j.PageUp:case j.PageDown:case j.Home:case j.End:I=C(_,k);break}if(!I){(u=(d=e.props).onInputError)===null||u===void 0||u.call(d,{code:1,msg:Ha});return}if(o.preventDefault(),e.setState({lastPreSelectChange:Wa}),w&&e.setSelected(I),e.setPreSelection(I),E){var O=Be(k),W=Be(I),H=Z(k),P=Z(I);O!==W||H!==P?e.setState({shouldFocusDayInline:!0}):e.setState({shouldFocusDayInline:!1})}}},e.onPopperKeyDown=function(o){var a=o.key;a===j.Escape&&(o.preventDefault(),e.sendFocusBackToInput())},e.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),e.sendFocusBackToInput();var a=e.props,i=a.selectsRange,s=a.onChange;i?s==null||s([null,null],o):s==null||s(null,o),e.setState({inputValue:null})},e.clear=function(){e.onClearClick()},e.onScroll=function(o){typeof e.props.closeOnScroll=="boolean"&&e.props.closeOnScroll?(o.target===document||o.target===document.documentElement||o.target===document.body)&&e.setOpen(!1):typeof e.props.closeOnScroll=="function"&&e.props.closeOnScroll(o)&&e.setOpen(!1)},e.renderCalendar=function(){var o,a;return!e.props.inline&&!e.isCalendarOpen()?null:c.createElement(ny,ce({showMonthYearDropdown:void 0,ref:function(i){e.calendar=i}},e.props,e.state,{setOpen:e.setOpen,dateFormat:(o=e.props.dateFormatCalendar)!==null&&o!==void 0?o:r.defaultProps.dateFormatCalendar,onSelect:e.handleSelect,onClickOutside:e.handleCalendarClickOutside,holidays:Fv(e.modifyHolidays()),outsideClickIgnoreClass:yu,onDropdownFocus:e.handleDropdownFocus,onTimeChange:e.handleTimeChange,className:e.props.calendarClassName,container:e.props.calendarContainer,handleOnKeyDown:e.props.onKeyDown,handleOnDayKeyDown:e.onDayKeyDown,setPreSelection:e.setPreSelection,dropdownMode:(a=e.props.dropdownMode)!==null&&a!==void 0?a:r.defaultProps.dropdownMode}),e.props.children)},e.renderAriaLiveRegion=function(){var o=e.props,a=o.dateFormat,i=a===void 0?r.defaultProps.dateFormat:a,s=o.locale,l=e.props.showTimeInput||e.props.showTimeSelect,d=l?"PPPPp":"PPPP",u;return e.props.selectsRange?u="Selected start date: ".concat(Xe(e.props.startDate,{dateFormat:d,locale:s}),". ").concat(e.props.endDate?"End date: "+Xe(e.props.endDate,{dateFormat:d,locale:s}):""):e.props.showTimeSelectOnly?u="Selected time: ".concat(Xe(e.props.selected,{dateFormat:i,locale:s})):e.props.showYearPicker?u="Selected year: ".concat(Xe(e.props.selected,{dateFormat:"yyyy",locale:s})):e.props.showMonthYearPicker?u="Selected month: ".concat(Xe(e.props.selected,{dateFormat:"MMMM yyyy",locale:s})):e.props.showQuarterYearPicker?u="Selected quarter: ".concat(Xe(e.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):u="Selected date: ".concat(Xe(e.props.selected,{dateFormat:d,locale:s})),c.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},u)},e.renderDateInput=function(){var o,a,i,s=je(e.props.className,(o={},o[yu]=e.state.open,o)),l=e.props.customInput||c.createElement("input",{type:"text"}),d=e.props.customInputRef||"ref",u=e.props,f=u.dateFormat,h=f===void 0?r.defaultProps.dateFormat:f,p=u.locale,m=typeof e.props.value=="string"?e.props.value:typeof e.state.inputValue=="string"?e.state.inputValue:e.props.selectsRange?vv(e.props.startDate,e.props.endDate,{dateFormat:h,locale:p}):e.props.selectsMultiple?yv((i=e.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:h,locale:p}):Xe(e.props.selected,{dateFormat:h,locale:p});return c.cloneElement(l,(a={},a[d]=function(g){e.input=g},a.value=m,a.onBlur=e.handleBlur,a.onChange=e.handleChange,a.onClick=e.onInputClick,a.onFocus=e.handleFocus,a.onKeyDown=e.onInputKeyDown,a.id=e.props.id,a.name=e.props.name,a.form=e.props.form,a.autoFocus=e.props.autoFocus,a.placeholder=e.props.placeholderText,a.disabled=e.props.disabled,a.autoComplete=e.props.autoComplete,a.className=je(l.props.className,s),a.title=e.props.title,a.readOnly=e.props.readOnly,a.required=e.props.required,a.tabIndex=e.props.tabIndex,a["aria-describedby"]=e.props.ariaDescribedBy,a["aria-invalid"]=e.props.ariaInvalid,a["aria-labelledby"]=e.props.ariaLabelledBy,a["aria-required"]=e.props.ariaRequired,a))},e.renderClearButton=function(){var o=e.props,a=o.isClearable,i=o.disabled,s=o.selected,l=o.startDate,d=o.endDate,u=o.clearButtonTitle,f=o.clearButtonClassName,h=f===void 0?"":f,p=o.ariaLabelClose,m=p===void 0?"Close":p,g=o.selectedDates;return a&&(s!=null||l!=null||d!=null||g!=null&&g.length)?c.createElement("button",{type:"button",className:je("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,onClick:e.onClearClick,title:u,tabIndex:-1}):null},e.state=e.calcInitialState(),e.preventFocusTimeout=void 0,e}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,readOnly:!1,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:rr,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,e){var o,a,i,s;t.inline&&uy(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:uu(this.props.highlightDates)}),!e.focused&&!rn(t.selected,this.props.selected)&&this.setState({inputValue:null}),e.open!==this.state.open&&(e.open===!1&&this.state.open===!0&&((a=(o=this.props).onCalendarOpen)===null||a===void 0||a.call(o)),e.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,e=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."),c.createElement("div",{className:"react-datepicker__input-container".concat(e?" react-datepicker__view-calendar-icon":"")},e&&c.createElement(ry,ce({icon:o,className:je(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 e=this.state.open?c.createElement(vu,{enableTabLoop:this.props.enableTabLoop},c.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},t)):null;return this.state.open&&this.props.portalId&&(e=c.createElement(bu,ce({portalId:this.props.portalId},this.props),e)),c.createElement("div",null,this.renderInputContainer(),e)}return c.createElement(ly,ce({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:t,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(c.Component),dy="input",Wa="navigate";const fy=({label:n,placeholder:r,value:t,onChange:e,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(u,f)=>1990+f),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=c.forwardRef(({value:u,onClick:f},h)=>M.jsx("button",{"aria-label":"inputButton",type:"button",id:n,className:"bg-background-secondary placeholder:text-petnow-grey-primary h-[60px] w-full cursor-pointer rounded-xl p-4 text-left text-xl focus:outline-hidden disabled:opacity-50",onClick:f,ref:h,children:u||M.jsx("p",{className:"text-petnow-grey-primary",children:r})}));l.displayName="CustomInput";function d(u){const f=u.substring(0,4),h=u.substring(5,7),p=u.substring(8,10);return new Date(Number(f),Number(h)-1,Number(p))}return M.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[M.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),M.jsx(cy,{disabledKeyboardNavigation:!0,locale:tv,id:n,name:"출생일",placeholderText:r,onChange:u=>u&&e(u),selected:t?d(t):void 0,value:t,dateFormat:"yyyy-MM-dd",autoComplete:"off",maxDate:new Date,customInput:M.jsx(l,{}),renderCustomHeader:({date:u,changeYear:f,changeMonth:h,decreaseMonth:p,increaseMonth:m})=>M.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[M.jsx("button",{onClick:p,disabled:u.getFullYear()<=1990&&u.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:M.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),M.jsxs("div",{className:"text-lg",children:[M.jsx("select",{"aria-label":"yearsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 w-auto cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:Z(u),onChange:({target:{value:g}})=>f(Number(g)),children:i.map(g=>M.jsx("option",{value:g,children:g},g))}),M.jsx("span",{className:"mr-2 ml-1",children:"년"}),M.jsx("select",{"aria-label":"monthsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:s[Be(u)],onChange:({target:{value:g}})=>h(s.indexOf(g)),children:s.map(g=>M.jsx("option",{value:g,children:g},g))}),M.jsx("span",{className:"mx-1",children:"월"})]}),M.jsx("button",{onClick:m,disabled:u.getFullYear()>=new Date().getFullYear()&&u.getMonth()>=new Date().getMonth(),type:"button",className:"react-datepicker__navigation react-datepicker__navigation--next","aria-label":"Next Month",children:M.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&M.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function py(n){return Zn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},child:[]}]})(n)}const hy=({label:n,placeholder:r,value:t,options:e,onChange:o,disabled:a})=>M.jsx("div",{className:"text-petnow-grey-tertiary relative",children:M.jsxs(Ah,{disabled:a,onChange:o,children:[M.jsx(xr,{className:"text-xl font-bold text-black",children:n}),M.jsxs(sl,{className:"bg-background-secondary placeholder:text-petnow-grey-primary relative mt-4 h-[60px] w-full cursor-pointer rounded-xl p-4 text-start text-xl focus:outline-hidden disabled:opacity-50",children:[t.name?M.jsx("p",{children:t.name}):M.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",M.jsx(py,{className:"absolute right-4 bottom-5"})]}),M.jsx(ll,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:e.map(i=>M.jsx(ul,{value:i,as:M.Fragment,children:({focus:s,selected:l})=>M.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${s?"bg-background-tertiary":"bg-background-secondary"} ${l&&"bg-background-tertiary"}`,children:i.name})},i.name))})]})}),my=({className:n,id:r,name:t,onChange:e,disabled:o,checked:a})=>M.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:t,className:pr("petnowRadio size-[3.5vw]",n),onChange:e}),gy=({label:n,placeholder:r,value:t,options:e,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,d]=c.useState("");let u;const f=m=>{u&&clearTimeout(u),u=setTimeout(async()=>{d(m.target.value)},200)},h=m=>{d(m.target.value)},p=l===""?e.slice(0,4):e.filter(m=>{var g;return(g=m.name)==null?void 0:g.replace(/ /g,"").includes(l.replace(/ /g,""))}).slice(0,4);return M.jsxs("div",{children:[M.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:M.jsxs(Lp,{onChange:m=>{o(m)},disabled:a,children:[M.jsx(xr,{className:"text-xl font-bold text-black",children:n}),M.jsx(Ws,{"aria-label":"comboboxInput",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 flex w-full items-center justify-between rounded-xl p-4 text-xl focus:outline-hidden disabled:opacity-50",value:t,onChange:s?h:f,onKeyDown:m=>{m.key==="Backspace"&&o({name:void 0,value:void 0})},placeholder:r,autoComplete:"off"}),M.jsx(Rs,{className:"absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",style:{bottom:-p.length*60},children:p.map(m=>M.jsx(Bs,{value:m,as:c.Fragment,children:({focus:g,selected:b})=>M.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${g?"bg-background-tertiary":"bg-background-secondary"} ${b&&"bg-background-tertiary"}`,children:m.name})},m.name))})]})}),i&&M.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})},by=({tabList:n,onTabChange:r})=>{const[t,e]=c.useState(n[0]),o=a=>{if(a<=1||a>4)throw new Error("[@petnow/ui/Tabs] Tab에 들어갈 수 있는 길이는 2~4개입니다.");return a===2?`absolute h-[2px] w-[50%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(t)===JSON.stringify(n[0])?"translate-x-[0%]":"translate-x-[100%]"}`:a===3?`absolute h-[2px] w-[33.3%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(t)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(t)===JSON.stringify(n[1])?"translate-x-[100%]":"translate-x-[200%]"}`:`absolute h-[2px] w-[25%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(t)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(t)===JSON.stringify(n[1])?"translate-x-[100%]":JSON.stringify(t)===JSON.stringify(n[2])?"translate-x-[200%]":"translate-x-[300%]"}`};return M.jsxs("div",{className:"flex flex-col text-2xl font-bold",children:[M.jsx("div",{className:"flex",children:n.map(a=>M.jsx("div",{className:"flex flex-1 flex-col",children:M.jsx("button",{className:`cursor-pointer py-5 hover:text-black ${JSON.stringify(a)===JSON.stringify(t)?"text-black":"text-petnow-grey-secondary"}`,onClick:()=>{e(a),r(a)},children:a.displayName})},a.key))}),M.jsx("div",{className:"bg-petnow-grey-primary relative h-[2px] w-full",children:M.jsx("div",{className:o(n.length)})})]})};ke.AccordionCard=am,ke.Checkbox=Uh,ke.CtaButton=li,ke.LabeledAddressInput=em,ke.LabeledAutocomplete=gy,ke.LabeledDatepicker=fy,ke.LabeledSelect=hy,ke.Modal=nm,ke.Radio=my,ke.Tabs=by,Object.defineProperty(ke,Symbol.toStringTag,{value:"Module"})});
|
|
49
|
+
*/var Fa=function(r,e){return Fa=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])},Fa(r,e)};function Pe(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Fa(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var le=function(){return le=Object.assign||function(e){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)&&(e[i]=t[i])}return e},le.apply(this,arguments)};function rt(n,r,e){if(e||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 n.concat(a||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var Eb=function(n){var r=n.showTimeSelectOnly,e=r===void 0?!1:r,t=n.showTime,o=t===void 0?!1:t,a=n.className,i=n.children,s=e?"Choose Time":"Choose Date".concat(o?" and Time":"");return d.createElement("div",{className:a,role:"dialog","aria-label":s,"aria-modal":"true"},i)},kb=function(n,r){var e=d.useRef(null),t=d.useRef(n);t.current=n;var o=d.useCallback(function(a){var i,s=a.composed&&a.composedPath&&a.composedPath().find(function(l){return l instanceof Node})||a.target;e.current&&!e.current.contains(s)&&(r&&s instanceof HTMLElement&&s.classList.contains(r)||(i=t.current)===null||i===void 0||i.call(t,a))},[r]);return d.useEffect(function(){return document.addEventListener("mousedown",o),function(){document.removeEventListener("mousedown",o)}},[o]),e},qr=function(n){var r=n.children,e=n.onClickOutside,t=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=kb(e,i);return d.createElement("div",{className:t,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},j;(function(n){n.ArrowUp="ArrowUp",n.ArrowDown="ArrowDown",n.ArrowLeft="ArrowLeft",n.ArrowRight="ArrowRight",n.PageUp="PageUp",n.PageDown="PageDown",n.Home="Home",n.End="End",n.Enter="Enter",n.Space=" ",n.Tab="Tab",n.Escape="Escape",n.Backspace="Backspace",n.X="x"})(j||(j={}));function hu(){var n=typeof window<"u"?window:globalThis;return n}var Kn=12;function de(n){if(n==null)return new Date;var r=typeof n=="string"?gg(n):Q(n);return Gr(r)?r:new Date}function La(n,r,e,t,o){o===void 0&&(o=de());for(var a=bn(e)||bn(Aa()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var u=l[s],c=dg(n,u,o,{locale:a});if(Gr(c)&&(!t||n===ve(c,u,e)))return c}return null}function Gr(n,r){return Yr(n)&&!Qt(n,new Date("1/1/1800"))}function ve(n,r,e){if(e==="en")return ru(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?bn(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||bn(Aa()),ru(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function je(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&ve(n,o,t)||""}function Sb(n,r,e){if(!n)return"";var t=je(n,e),o=r?je(r,e):"";return"".concat(t," - ").concat(o)}function Cb(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?je(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=je(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function $a(n,r){var e=r.hour,t=e===void 0?0:e,o=r.minute,a=o===void 0?0:o,i=r.second,s=i===void 0?0:i;return zr(Ur(Qr(n,s),a),t)}function _b(n){return _a(n)}function Mb(n,r){return ve(n,"ddd",r)}function Xr(n){return Vt(n)}function Pt(n,r,e){var t=bn(r||Aa());return ft(n,{locale:t,weekStartsOn:e})}function bt(n){return Ql(n)}function qn(n){return Rr(n)}function vu(n){return Ca(n)}function gu(){return Vt(de())}function bu(n){return zl(n)}function Ob(n){return wh(n)}function Tb(n){return Ul(n)}function ot(n,r){return n&&r?hg(n,r):!n&&!r}function Fe(n,r){return n&&r?pg(n,r):!n&&!r}function Jr(n,r){return n&&r?mg(n,r):!n&&!r}function ue(n,r){return n&&r?bh(n,r):!n&&!r}function qt(n,r){return n&&r?vv(n,r):!n&&!r}function Gn(n,r,e){var t,o=Vt(r),a=zl(e);try{t=zn(n,{start:o,end:a})}catch{t=!1}return t}function Aa(){var n=hu();return n.__localeId__}function bn(n){if(typeof n=="string"){var r=hu();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function Pb(n,r,e){return r(ve(n,"EEEE",e))}function Nb(n,r){return ve(n,"EEEEEE",r)}function Ib(n,r){return ve(n,"EEE",r)}function Ya(n,r){return ve(We(de(),n),"LLLL",r)}function yu(n,r){return ve(We(de(),n),"LLL",r)}function Fb(n,r){return ve(vn(de(),n),"QQQ",r)}function He(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.excludeDateIntervals,s=e.includeDates,l=e.includeDateIntervals,u=e.filterDate;return Xn(n,{minDate:t,maxDate:o})||a&&a.some(function(c){return c instanceof Date?ue(n,c):ue(n,c.date)})||i&&i.some(function(c){var p=c.start,m=c.end;return zn(n,{start:p,end:m})})||s&&!s.some(function(c){return ue(n,c)})||l&&!l.some(function(c){var p=c.start,m=c.end;return zn(n,{start:p,end:m})})||u&&!u(de(n))||!1}function Wa(n,r){var e=r===void 0?{}:r,t=e.excludeDates,o=e.excludeDateIntervals;return o&&o.length>0?o.some(function(a){var i=a.start,s=a.end;return zn(n,{start:i,end:s})}):t&&t.some(function(a){var i;return a instanceof Date?ue(n,a):ue(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function wu(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Xn(n,{minDate:t?Ql(t):void 0,maxDate:o?Ul(o):void 0})||(a==null?void 0:a.some(function(l){return Fe(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Fe(n,l)})||s&&!s(de(n))||!1}function Zr(n,r,e,t){var o=Z(n),a=Ie(n),i=Z(r),s=Ie(r),l=Z(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function Lb(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return Xn(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return Fe(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return Fe(s,n)})||!1}function eo(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Xn(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return Jr(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Jr(n,l)})||s&&!s(de(n))||!1}function to(n,r,e){if(!r||!e||!Yr(r)||!Yr(e))return!1;var t=Z(r),o=Z(e);return t<=n&&o>=n}function no(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate,l=new Date(n,0,1);return Xn(l,{minDate:t?Rr(t):void 0,maxDate:o?Kl(o):void 0})||(a==null?void 0:a.some(function(u){return ot(l,u instanceof Date?u:u.date)}))||i&&!i.some(function(u){return ot(l,u)})||s&&!s(de(l))||!1}function ro(n,r,e,t){var o=Z(n),a=zt(n),i=Z(r),s=zt(r),l=Z(t);return o===i&&o===l?a<=e&&e<=s:o<i?l===o&&a<=e||l===i&&s>=e||l<i&&l>o:!1}function Xn(n,r){var e,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(e=o&&pn(n,o)<0||a&&pn(n,a)>0)!==null&&e!==void 0?e:!1}function xu(n,r){return r.some(function(e){return vt(e)===vt(n)&>(e)===gt(n)&&Ot(e)===Ot(n)})}function Du(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&xu(n,t)||o&&!xu(n,o)||a&&!a(n)||!1}function Eu(n,r){var e=r.minTime,t=r.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var o=de();o=zr(o,vt(n)),o=Ur(o,gt(n)),o=Qr(o,Ot(n));var a=de();a=zr(a,vt(e)),a=Ur(a,gt(e)),a=Qr(a,Ot(e));var i=de();i=zr(i,vt(t)),i=Ur(i,gt(t)),i=Qr(i,Ot(t));var s;try{s=!zn(o,{start:a,end:i})}catch{s=!1}return s}function ku(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Kt(n,1);return t&&Wr(t,a)>0||o&&o.every(function(i){return Wr(i,a)>0})||!1}function Su(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=Ue(n,1);return t&&Wr(a,t)>0||o&&o.every(function(i){return Wr(a,i)>0})||!1}function $b(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Rr(n),i=cu(a);return t&&jr(t,i)>0||o&&o.every(function(s){return jr(s,i)>0})||!1}function Ab(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=Kl(n),i=Sa(a,1);return t&&jr(i,t)>0||o&&o.every(function(s){return jr(i,s)>0})||!1}function Cu(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=gn(n,1);return t&&Hr(t,a)>0||o&&o.every(function(i){return Hr(i,a)>0})||!1}function Yb(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?Kn:o,i=qn(gn(n,a)),s=Nt(i,a).endPeriod,l=t&&Z(t);return l&&l>s||!1}function _u(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=mt(n,1);return t&&Hr(a,t)>0||o&&o.every(function(i){return Hr(a,i)>0})||!1}function Wb(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?Kn:o,i=mt(n,a),s=Nt(i,a).startPeriod,l=t&&Z(t);return l&&l<s||!1}function Mu(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return pn(o,r)>=0});return Bl(t)}else return e?Bl(e):r}function Ou(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return pn(o,r)<=0});return Rl(t)}else return e?Rl(e):r}function Tu(n,r){var e;n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--highlighted");for(var t=new Map,o=0,a=n.length;o<a;o++){var i=n[o];if(ht(i)){var s=ve(i,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(r)||(l.push(r),t.set(s,l))}else if(typeof i=="object"){var u=Object.keys(i),c=(e=u[0])!==null&&e!==void 0?e:"",p=i[c];if(typeof c=="string"&&Array.isArray(p))for(var m=0,f=p.length;m<f;m++){var h=p[m];if(h){var s=ve(h,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function jb(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function Hb(n,r){n===void 0&&(n=[]),r===void 0&&(r="react-datepicker__day--holidays");var e=new Map;return n.forEach(function(t){var o=t.date,a=t.holidayName;if(ht(o)){var i=ve(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&jb(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?rt(rt([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function Rb(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=mh(l,vt(u)),l=ka(l,gt(u)),l=gh(l,Ot(u)));var c=ka(n,(e+1)*t);Tt(l,r)&&Qt(l,c)&&u!=null&&i.push(u)}return i}function Pu(n){return n<10?"0".concat(n):"".concat(n)}function Nt(n,r){r===void 0&&(r=Kn);var e=Math.ceil(Z(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function Bb(n){var r=new Date(n.getFullYear(),n.getMonth(),n.getDate()),e=new Date(n.getFullYear(),n.getMonth(),n.getDate(),24);return Math.round((+e-+r)/36e5)}function Nu(n){var r=n.getSeconds(),e=n.getMilliseconds();return Q(n.getTime()-r*1e3-e)}function Vb(n,r){return Nu(n).getTime()===Nu(r).getTime()}function Iu(n){if(!ht(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function Fu(n,r){if(!ht(n)||!ht(r))throw new Error("Invalid date received");var e=Iu(n),t=Iu(r);return Qt(e,t)}function Lu(n){return n.key===j.Space}var zb=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||this;return t.inputRef=d.createRef(),t.onTimeChange=function(o){var a,i;t.setState({time:o});var s=t.props.date,l=s instanceof Date&&!isNaN(+s),u=l?s:new Date;if(o!=null&&o.includes(":")){var c=o.split(":"),p=c[0],m=c[1];u.setHours(Number(p)),u.setMinutes(Number(m))}(i=(a=t.props).onChange)===null||i===void 0||i.call(a,u)},t.renderTimeInput=function(){var o=t.state.time,a=t.props,i=a.date,s=a.timeString,l=a.customTimeInput;return l?d.cloneElement(l,{date:i,value:o,onChange:t.onTimeChange}):d.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var u;(u=t.inputRef.current)===null||u===void 0||u.focus()},required:!0,value:o,onChange:function(u){t.onTimeChange(u.target.value||s)}})},t.state={time:t.props.timeString},t}return r.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},r.prototype.render=function(){return d.createElement("div",{className:"react-datepicker__input-time-container"},d.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),d.createElement("div",{className:"react-datepicker-time__input-container"},d.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},r}(d.Component),Ub=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.dayEl=d.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===j.Space&&(t.preventDefault(),t.key=j.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isSameDay=function(t){return ue(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var o=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(i){return e.isSameDayOrWeek(i)}):e.isSameDayOrWeek(e.props.selected),a=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!o&&e.isSameDayOrWeek(e.props.preSelection)&&!a},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),He(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(){return Wa(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return ue(e.props.day,Pt(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&ue(t,Pt(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,o=t.day,a=t.highlightDates;if(!a)return!1;var i=ve(o,"MM.dd.yyyy");return a.get(i)},e.getHolidaysClass=function(){var t,o=e.props,a=o.day,i=o.holidays;if(!i)return[void 0];var s=ve(a,"MM.dd.yyyy");return i.has(s)?[(t=i.get(s))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:Gn(o,a,i)},e.isInSelectingRange=function(){var t,o=e.props,a=o.day,i=o.selectsStart,s=o.selectsEnd,l=o.selectsRange,u=o.selectsDisabledDaysInRange,c=o.startDate,p=o.endDate,m=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(i||s||l)||!m||!u&&e.isDisabled()?!1:i&&p&&(Qt(m,p)||qt(m,p))?Gn(a,m,p):s&&c&&!p&&(Tt(m,c)||qt(m,c))||l&&c&&!p&&(Tt(m,c)||qt(m,c))?Gn(a,c,m):!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.startDate,s=o.selectsStart,l=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s?ue(a,l):ue(a,i)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var o=e.props,a=o.day,i=o.endDate,s=o.selectsEnd,l=o.selectsRange,u=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return s||l?ue(a,u):ue(a,i)},e.isRangeStart=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ue(a,o)},e.isRangeEnd=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ue(i,o)},e.isWeekend=function(){var t=fv(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===Ie(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(Ie(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(de())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(o){return e.isSameDayOrWeek(o)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var o=e.props.dayClassName?e.props.dayClassName(t):void 0;return Oe("react-datepicker__day",o,"react-datepicker__day--"+Mb(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,o=t.day,a=t.ariaLabelPrefixWhenEnabled,i=a===void 0?"Choose":a,s=t.ariaLabelPrefixWhenDisabled,l=s===void 0?"Not available":s,u=e.isDisabled()||e.isExcluded()?l:i;return"".concat(u," ").concat(ve(o,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,o=t.day,a=t.holidays,i=a===void 0?new Map:a,s=t.excludeDates,l=ve(o,"MM.dd.yyyy"),u=[];return i.has(l)&&u.push.apply(u,i.get(l).holidayNames),e.isExcluded()&&u.push(s==null?void 0:s.filter(function(c){return c instanceof Date?ue(c,o):ue(c==null?void 0:c.date,o)}).map(function(c){if(!(c instanceof Date))return c==null?void 0:c.message})),u.join(", ")},e.getTabIndex=function(){var t=e.props.selected,o=e.props.preSelection,a=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&ue(o,t))?0:-1;return a},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(ou(e.props.day),e.props.day):ou(e.props.day)},e.render=function(){return d.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"option",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&d.createElement("span",{className:"overlay"},e.getTitle()))},e}return r.prototype.componentDidMount=function(){this.handleFocusDay()},r.prototype.componentDidUpdate=function(){this.handleFocusDay()},r.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},r.prototype.isDayActiveElement=function(){var e,t,o;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.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}(d.Component),Qb=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.weekNumberEl=d.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var o,a,i=t.key;i===j.Space&&(t.preventDefault(),t.key=j.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ue(e.props.date,e.props.selected)&&ue(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||ue(e.props.date,e.props.selected)&&ue(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var o=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&ue(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(o=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(o=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(o=!0)),o&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},r.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},r.prototype.render=function(){var e=this.props,t=e.weekNumber,o=e.isWeekDisabled,a=e.ariaLabelPrefix,i=a===void 0?r.defaultProps.ariaLabelPrefix:a,s=e.onClick,l={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!s&&!o,"react-datepicker__week-number--selected":!!s&&ue(this.props.date,this.props.selected)};return d.createElement("div",{ref:this.weekNumberEl,className:Oe(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),Kb=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return He(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,o){e.props.onDayClick&&e.props.onDayClick(t,o)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,o,a){for(var i,s,l,u=new Date(t),c=0;c<7;c++){var p=new Date(t);p.setDate(p.getDate()+c);var m=!e.isDisabled(p);if(m){u=p;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(u,o,a),e.props.showWeekPicker&&e.handleDayClick(u,a),((i=e.props.shouldCloseOnSelect)!==null&&i!==void 0?i:r.defaultProps.shouldCloseOnSelect)&&((l=(s=e.props).setOpen)===null||l===void 0||l.call(s,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):_b(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),o=ze(t,6),a=new Date(t);a<=o;){if(!e.isDisabled(a))return!1;a=ze(a,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),o=[],a=e.formatWeekNumber(t);if(e.props.showWeekNumber){var i=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,a):void 0;o.push(d.createElement(Qb,le({key:"W"},r.defaultProps,e.props,{weekNumber:a,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:i})))}return o.concat([0,1,2,3,4,5,6].map(function(s){var l=ze(t,s);return d.createElement(Ub,le({},r.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:l.valueOf(),day:l,onClick:e.handleDayClick.bind(e,l),onMouseEnter:e.handleDayMouseEnter.bind(e,l)}))}))},e.startOfWeek=function(){return Pt(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ue(e.startOfWeek(),e.props.selected)&&ue(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(r,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":ue(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return d.createElement("div",{className:Oe(e)},this.renderDays())},r}(d.Component),Jn,qb=6,yn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ja=(Jn={},Jn[yn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Jn[yn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Jn[yn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Jn),oo=1;function $u(n,r){return n?yn.FOUR_COLUMNS:r?yn.TWO_COLUMNS:yn.THREE_COLUMNS}var Gb=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=rt([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=rt([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return He(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.isExcluded=function(t){return Wa(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,o){var a,i;(i=(a=e.props).onDayClick)===null||i===void 0||i.call(a,t,o,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var o,a;(a=(o=e.props).onDayMouseEnter)===null||a===void 0||a.call(o,t)},e.handleMouseLeave=function(){var t,o;(o=(t=e.props).onMouseLeave)===null||o===void 0||o.call(t)},e.isRangeStartMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Fe(We(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Jr(vn(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Fe(We(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Jr(vn(a,t),s)},e.isInSelectingRangeMonth=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,p=a.endDate,m=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!m?!1:s&&p?Zr(m,p,t,i):l&&c||u&&c&&!p?Zr(c,m,t,i):!1},e.isSelectingMonthRangeStart=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.startDate,l=a.selectsStart,u=We(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?Fe(u,c):Fe(u,s)},e.isSelectingMonthRangeEnd=function(t){var o;if(!e.isInSelectingRangeMonth(t))return!1;var a=e.props,i=a.day,s=a.endDate,l=a.selectsEnd,u=a.selectsRange,c=We(i,t),p=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?Fe(c,p):Fe(c,s)},e.isInSelectingRangeQuarter=function(t){var o,a=e.props,i=a.day,s=a.selectsStart,l=a.selectsEnd,u=a.selectsRange,c=a.startDate,p=a.endDate,m=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!m?!1:s&&p?ro(m,p,t,i):l&&c||u&&c&&!p?ro(c,m,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=ze(t,6);return Fe(t,o)||Fe(a,o)},e.isCurrentMonth=function(t,o){return Z(t)===Z(de())&&o===Ie(de())},e.isCurrentQuarter=function(t,o){return Z(t)===Z(de())&&o===zt(de())},e.isSelectedMonth=function(t,o,a){return Ie(a)===o&&Z(t)===Z(a)},e.isSelectMonthInList=function(t,o,a){return a.some(function(i){return e.isSelectedMonth(t,o,i)})},e.isSelectedQuarter=function(t,o,a){return zt(t)===o&&Z(t)===Z(a)},e.renderWeeks=function(){for(var t=[],o=e.props.fixedHeight,a=0,i=!1,s=Pt(bt(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(h){return e.props.showWeekPicker?Pt(h,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(h){return e.props.showWeekPicker?Pt(h,e.props.locale,e.props.calendarStartDay):e.props.selected},c=e.props.selected?u(e.props.selected):void 0,p=e.props.preSelection?l(e.props.preSelection):void 0;t.push(d.createElement(Kb,le({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:Ie(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:p,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Ar(s,1);var m=o&&a>=qb,f=!o&&!e.isWeekInMonth(s);if(m||f)if(e.props.peekNextMonth)i=!0;else break}return t},e.onMonthClick=function(t,o){var a=e.isMonthDisabledForLabelDate(o),i=a.isDisabled,s=a.labelDate;i||e.handleDayClick(bt(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter(bt(i))},e.handleMonthNavigation=function(t,o){var a,i,s,l;(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.MONTH_REFS[t])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus()},e.handleKeyboardNavigation=function(t,o,a){var i,s=e.props,l=s.selected,u=s.preSelection,c=s.setPreSelection,p=s.minDate,m=s.maxDate,f=s.showFourColumnMonthYearPicker,h=s.showTwoColumnMonthYearPicker;if(u){var v=$u(f,h),g=e.getVerticalOffset(v),y=(i=ja[v])===null||i===void 0?void 0:i.grid,w=function(S,x,_){var M,P,Y=x,H=_;switch(S){case j.ArrowRight:Y=Ue(x,oo),H=_===11?0:_+oo;break;case j.ArrowLeft:Y=Kt(x,oo),H=_===0?11:_-oo;break;case j.ArrowUp:Y=Kt(x,g),H=!((M=y==null?void 0:y[0])===null||M===void 0)&&M.includes(_)?_+12-g:_-g;break;case j.ArrowDown:Y=Ue(x,g),H=!((P=y==null?void 0:y[y.length-1])===null||P===void 0)&&P.includes(_)?_-12+g:_+g;break}return{newCalculatedDate:Y,newCalculatedMonth:H}},b=function(S,x,_){for(var M=40,P=S,Y=!1,H=0,N=w(P,x,_),L=N.newCalculatedDate,$=N.newCalculatedMonth;!Y;){if(H>=M){L=x,$=_;break}if(p&&L<p){P=j.ArrowRight;var V=w(P,L,$);L=V.newCalculatedDate,$=V.newCalculatedMonth}if(m&&L>m){P=j.ArrowLeft;var V=w(P,L,$);L=V.newCalculatedDate,$=V.newCalculatedMonth}if(Lb(L,e.props)){var V=w(P,L,$);L=V.newCalculatedDate,$=V.newCalculatedMonth}else Y=!0;H++}return{newCalculatedDate:L,newCalculatedMonth:$}};if(o===j.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var D=b(o,u,a),E=D.newCalculatedDate,C=D.newCalculatedMonth;switch(o){case j.ArrowRight:case j.ArrowLeft:case j.ArrowUp:case j.ArrowDown:e.handleMonthNavigation(C,E);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=ja[t])===null||o===void 0?void 0:o.verticalNavigationOffset)!==null&&a!==void 0?a:0},e.onMonthKeyDown=function(t,o){var a=e.props,i=a.disabledKeyboardNavigation,s=a.handleOnMonthKeyDown,l=t.key;l!==j.Tab&&t.preventDefault(),i||e.handleKeyboardNavigation(t,l,o),s&&s(t)},e.onQuarterClick=function(t,o){var a=vn(e.props.day,o);eo(a,e.props)||e.handleDayClick(vu(a),t)},e.onQuarterMouseEnter=function(t){var o=vn(e.props.day,t);eo(o,e.props)||e.handleDayMouseEnter(vu(o))},e.handleQuarterNavigation=function(t,o){var a,i,s,l;e.isDisabled(o)||e.isExcluded(o)||((i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,o),(l=(s=e.QUARTER_REFS[t-1])===null||s===void 0?void 0:s.current)===null||l===void 0||l.focus())},e.onQuarterKeyDown=function(t,o){var a,i,s=t.key;if(!e.props.disabledKeyboardNavigation)switch(s){case j.Enter:e.onQuarterClick(t,o),(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,e.props.selected);break;case j.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===4?1:o+1,Sa(e.props.preSelection,1));break;case j.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,cu(e.props.preSelection));break}},e.isMonthDisabledForLabelDate=function(t){var o,a=e.props,i=a.day,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,p=We(i,t);return{isDisabled:(o=(s||l||u||c)&&wu(p,e.props))!==null&&o!==void 0?o:!1,labelDate:p}},e.isMonthDisabled=function(t){var o=e.isMonthDisabledForLabelDate(t).isDisabled;return o},e.getMonthClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.preSelection,u=o.monthClassName,c=u?u(We(a,t)):void 0,p=e.getSelection();return Oe("react-datepicker__month-text","react-datepicker__month-".concat(t),c,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":p?e.isSelectMonthInList(a,t,p):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&l&&e.isSelectedMonth(a,t,l)&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":i&&s?Zr(i,s,t,a):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(a,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=Ie(e.props.preSelection),a=e.isMonthDisabledForLabelDate(o).isDisabled,i=t===o&&!(a||e.props.disabledKeyboardNavigation)?"0":"-1";return i},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var o=zt(e.props.preSelection),a=eo(e.props.day,e.props),i=t===o&&!(a||e.props.disabledKeyboardNavigation)?"0":"-1";return i},e.getAriaLabel=function(t){var o=e.props,a=o.chooseDayAriaLabelPrefix,i=a===void 0?"Choose":a,s=o.disabledDayAriaLabelPrefix,l=s===void 0?"Not available":s,u=o.day,c=o.locale,p=We(u,t),m=e.isDisabled(p)||e.isExcluded(p)?l:i;return"".concat(m," ").concat(ve(p,"MMMM yyyy",c))},e.getQuarterClassNames=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate,l=o.selected,u=o.minDate,c=o.maxDate,p=o.excludeDates,m=o.includeDates,f=o.filterDate,h=o.preSelection,v=o.disabledKeyboardNavigation,g=(u||c||p||m||f)&&eo(vn(a,t),e.props);return Oe("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":g,"react-datepicker__quarter-text--selected":l?e.isSelectedQuarter(a,t,l):void 0,"react-datepicker__quarter-text--keyboard-selected":!v&&h&&e.isSelectedQuarter(a,t,h)&&!g,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":i&&s?ro(i,s,t,a):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t),"react-datepicker__quarter-text--today":e.isCurrentQuarter(a,t)})},e.getMonthContent=function(t){var o=e.props,a=o.showFullMonthYearPicker,i=o.renderMonthContent,s=o.locale,l=o.day,u=yu(t,s),c=Ya(t,s);return i?i(t,u,c,l):a?c:u},e.getQuarterContent=function(t){var o,a=e.props,i=a.renderQuarterContent,s=a.locale,l=Fb(t,s);return(o=i==null?void 0:i(t,l))!==null&&o!==void 0?o:l},e.renderMonths=function(){var t,o=e.props,a=o.showTwoColumnMonthYearPicker,i=o.showFourColumnMonthYearPicker,s=o.day,l=o.selected,u=(t=ja[$u(i,a)])===null||t===void 0?void 0:t.grid;return u==null?void 0:u.map(function(c,p){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:p},c.map(function(m,f){return d.createElement("div",{ref:e.MONTH_REFS[m],key:f,onClick:function(h){e.onMonthClick(h,m)},onKeyDown:function(h){Lu(h)&&(h.preventDefault(),h.key=j.Enter),e.onMonthKeyDown(h,m)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(m)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(m)}:void 0,tabIndex:Number(e.getTabIndex(m)),className:e.getMonthClassNames(m),"aria-disabled":e.isMonthDisabled(m),role:"option","aria-label":e.getAriaLabel(m),"aria-current":e.isCurrentMonth(s,m)?"date":void 0,"aria-selected":l?e.isSelectedMonth(s,m,l):void 0},e.getMonthContent(m))}))})},e.renderQuarters=function(){var t=e.props,o=t.day,a=t.selected,i=[1,2,3,4];return d.createElement("div",{className:"react-datepicker__quarter-wrapper"},i.map(function(s,l){return d.createElement("div",{key:l,ref:e.QUARTER_REFS[l],role:"option",onClick:function(u){e.onQuarterClick(u,s)},onKeyDown:function(u){e.onQuarterKeyDown(u,s)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(s)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(s)}:void 0,className:e.getQuarterClassNames(s),"aria-selected":a?e.isSelectedQuarter(o,s,a):void 0,tabIndex:Number(e.getQuarterTabIndex(s)),"aria-current":e.isCurrentQuarter(o,s)?"date":void 0},e.getQuarterContent(s))}))},e.getClassNames=function(){var t=e.props,o=t.selectingDate,a=t.selectsStart,i=t.selectsEnd,s=t.showMonthYearPicker,l=t.showQuarterYearPicker,u=t.showWeekPicker;return Oe("react-datepicker__month",{"react-datepicker__month--selecting-range":o&&(a||i)},{"react-datepicker__monthPicker":s},{"react-datepicker__quarterPicker":l},{"react-datepicker__weekPicker":u})},e}return r.prototype.getSelection=function(){var e=this.props,t=e.selected,o=e.selectedDates,a=e.selectsMultiple;if(a)return o;if(t)return[t]},r.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,o=e.showQuarterYearPicker,a=e.day,i=e.ariaLabelPrefix,s=i===void 0?"Month ":i,l=s?s.trim()+" ":"";return d.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(ve(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),Xb=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isSelectedMonth=function(t){return e.props.month===t},e.renderOptions=function(){return e.props.monthNames.map(function(t,o){return d.createElement("div",{className:e.isSelectedMonth(o)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,o),"aria-selected":e.isSelectedMonth(o)?"true":void 0},e.isSelectedMonth(o)?d.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return r.prototype.render=function(){return d.createElement(qr,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),Jb=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(o,a){return d.createElement("option",{key:o,value:a},o)})},e.renderSelectMode=function(t){return d.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(o){return e.onChange(parseInt(o.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,o){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},o[e.props.month]))},e.renderDropdown=function(t){return d.createElement(Xb,le({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var o=e.state.dropdownVisible,a=[e.renderReadView(!o,t)];return o&&a.unshift(e.renderDropdown(t)),a},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(a){return yu(a,e.props.locale)}:function(a){return Ya(a,e.props.locale)}),o;switch(this.props.dropdownMode){case"scroll":o=this.renderScrollMode(t);break;case"select":o=this.renderSelectMode(t);break}return d.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},o)},r}(d.Component);function Zb(n,r){for(var e=[],t=bt(n),o=bt(r);!Tt(t,o);)e.push(de(t)),t=Ue(t,1);return e}var ey=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(o){var a=Ta(o),i=ot(t.props.date,o)&&Fe(t.props.date,o);return d.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?d.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",ve(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:Zb(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=Oe({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(qr,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),ty=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=bt(e.props.minDate),o=bt(e.props.maxDate),a=[];!Tt(t,o);){var i=Ta(t);a.push(d.createElement("option",{key:i,value:i},ve(t,e.props.dateFormat,e.props.locale))),t=Ue(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:Ta(bt(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=ve(e.props.date,e.props.dateFormat,e.props.locale);return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},o))},e.renderDropdown=function(){return d.createElement(ey,le({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown();var o=de(t);ot(e.props.date,o)&&Fe(e.props.date,o)||e.props.onChange(o)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),ny=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,o,a;e.list&&(e.list.scrollTop=(a=e.centerLi&&r.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((o=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&o!==void 0?o:0):e.list.clientHeight,e.centerLi))!==null&&a!==void 0?a:0)})},e.handleClick=function(t){var o,a;(e.props.minTime||e.props.maxTime)&&Eu(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Du(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&Vb(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&Eu(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Du(t,e.props)},e.liClasses=function(t){var o,a=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&a.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&a.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(vt(t)*3600+gt(t)*60+Ot(t))%(((o=e.props.intervals)!==null&&o!==void 0?o:r.defaultProps.intervals)*60)!==0&&a.push("react-datepicker__time-list-item--injected"),a.join(" ")},e.handleOnKeyDown=function(t,o){var a,i;t.key===j.Space&&(t.preventDefault(),t.key=j.Enter),(t.key===j.ArrowUp||t.key===j.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===j.ArrowDown||t.key===j.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===j.Enter&&e.handleClick(o),(i=(a=e.props).handleOnKeyDown)===null||i===void 0||i.call(a,t)},e.renderTimes=function(){for(var t,o=[],a=typeof e.props.format=="string"?e.props.format:"p",i=(t=e.props.intervals)!==null&&t!==void 0?t:r.defaultProps.intervals,s=e.props.selected||e.props.openToDate||de(),l=Xr(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,y){return g.getTime()-y.getTime()}),c=60*Bb(s),p=c/i,m=0;m<p;m++){var f=ka(l,m*i);if(o.push(f),u){var h=Rb(l,f,m,i,u);o=o.concat(h)}}var v=o.reduce(function(g,y){return y.getTime()<=s.getTime()?y:g},o[0]);return o.map(function(g){return d.createElement("li",{key:g.valueOf(),onClick:e.handleClick.bind(e,g),className:e.liClasses(g),ref:function(y){g===v&&(e.centerLi=y)},onKeyDown:function(y){e.handleOnKeyDown(y,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},ve(g,a,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?d.createElement(d.Fragment,null):d.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(e.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},d.createElement("div",{className:"react-datepicker-time__header"},e.props.timeCaption))},e}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 e;(e=this.resizeObserver)===null||e===void 0||e.disconnect()},r.prototype.observeDatePickerHeightChanges=function(){var e=this,t=this.props.monthRef;this.updateContainerHeight(),t&&(this.resizeObserver=new ResizeObserver(function(){e.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 e=this,t,o=this.state.height;return d.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(),d.createElement("div",{className:"react-datepicker__time"},d.createElement("div",{className:"react-datepicker__time-box"},d.createElement("ul",{className:"react-datepicker__time-list",ref:function(a){e.list=a},style:o?{height:o}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},r.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},r}(d.Component),Au=3,ry=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=rt([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return He(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 Wa(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,u,c=t.props,p=c.date,m=c.yearItemNumber;if(!(p===void 0||m===void 0)){var f=Nt(p,m).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(m-(f-o)):o-f>=m?t.updateFocusOnPaginate(Math.abs(m-(o-f))):(u=(l=t.YEAR_REFS[o-f])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())}},t.isSameDay=function(o,a){return ue(o,a)},t.isCurrentYear=function(o){return o===Z(de())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&ot(nt(de(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&ot(nt(de(),o),t.props.endDate)},t.isInRange=function(o){return to(o,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(o){var a=t.props,i=a.selectsStart,s=a.selectsEnd,l=a.selectsRange,u=a.startDate,c=a.endDate;return!(i||s||l)||!t.selectingDate()?!1:i&&c?to(o,t.selectingDate(),c):s&&u||l&&u&&!c?to(o,u,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,u=nt(de(),o);return l?ot(u,(a=t.selectingDate())!==null&&a!==void 0?a:null):ot(u,s??null)},t.isSelectingRangeEnd=function(o){var a;if(!t.isInSelectingRange(o))return!1;var i=t.props,s=i.endDate,l=i.selectsEnd,u=i.selectsRange,c=nt(de(),o);return l||u?ot(c,(a=t.selectingDate())!==null&&a!==void 0?a:null):ot(c,s??null)},t.isKeyboardSelected=function(o){if(!(t.props.date===void 0||t.props.selected==null||t.props.preSelection==null)){var a=t.props,i=a.minDate,s=a.maxDate,l=a.excludeDates,u=a.includeDates,c=a.filterDate,p=qn(nt(t.props.date,o)),m=(i||s||l||u||c)&&no(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!ue(p,qn(t.props.selected))&&ue(p,qn(t.props.preSelection))&&!m}},t.isSelectedYear=function(o){var a=t.props,i=a.selectsMultiple,s=a.selected,l=a.selectedDates;return i?l==null?void 0:l.some(function(u){return o===Z(u)}):!s||o===Z(s)},t.onYearClick=function(o,a){var i=t.props.date;i!==void 0&&t.handleYearClick(qn(nt(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,u=t.props,c=u.date,p=u.yearItemNumber,m=u.handleOnKeyDown;if(l!==j.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case j.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 j.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,mt(t.props.preSelection,1));break;case j.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,gn(t.props.preSelection,1));break;case j.ArrowUp:{if(c===void 0||p===void 0||t.props.preSelection==null)break;var f=Nt(c,p).startPeriod,h=Au,v=a-h;if(v<f){var g=p%h;a>=f&&a<f+g?h=g:h+=g,v=a-h}t.handleYearNavigation(v,gn(t.props.preSelection,h));break}case j.ArrowDown:{if(c===void 0||p===void 0||t.props.preSelection==null)break;var y=Nt(c,p).endPeriod,h=Au,v=a+h;if(v>y){var g=p%h;a<=y&&a>y-g?h=g:h+=g,v=a+h}t.handleYearNavigation(v,mt(t.props.preSelection,h));break}}m&&m(o)},t.getYearClassNames=function(o){var a=t.props,i=a.date,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,p=a.filterDate,m=a.yearClassName;return Oe("react-datepicker__year-text","react-datepicker__year-".concat(o),i?m==null?void 0:m(nt(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||u||c||p)&&no(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=Z(t.props.preSelection),i=no(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 e=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 u=Nt(a,i),c=u.startPeriod,p=u.endPeriod,m=function(v){t.push(d.createElement("div",{ref:f.YEAR_REFS[v-c],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){Lu(g)&&(g.preventDefault(),g.key=j.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(f.getYearTabIndex(v)),className:f.getYearClassNames(v),onMouseEnter:f.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:f.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:f.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:f.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":f.isCurrentYear(v)?"date":void 0},f.getYearContent(v)))},f=this,h=c;h<=p;h++)m(h);return d.createElement("div",{className:"react-datepicker__year"},d.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}(d.Component);function oy(n,r,e,t){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;e&&(s=Z(e)<=i),t&&s&&(s=Z(t)>=i),s&&o.push(i)}return o}var ay=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||this;t.renderOptions=function(){var s=t.props.year,l=t.state.yearsList.map(function(p){return d.createElement("div",{className:s===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:t.onChange.bind(t,p),"aria-selected":s===p?"true":void 0},s===p?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),u=t.props.minDate?Z(t.props.minDate):null,c=t.props.maxDate?Z(t.props.maxDate):null;return(!c||!t.state.yearsList.find(function(p){return p===c}))&&l.unshift(d.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!u||!t.state.yearsList.find(function(p){return p===u}))&&l.push(d.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},d.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(u){return u+s});t.setState({yearsList:l})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var o=e.yearDropdownItemNumber,a=e.scrollableYearDropdown,i=o||(a?10:5);return t.state={yearsList:oy(t.props.year,i,t.props.minDate,t.props.maxDate)},t.dropdownRef=d.createRef(),t}return r.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,o=t?t.find(function(a){return a.ariaSelected}):null;e.scrollTop=o&&o instanceof HTMLElement?o.offsetTop+(o.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},r.prototype.render=function(){var e=Oe({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(qr,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),iy=function(n){Pe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?Z(e.props.minDate):1900,o=e.props.maxDate?Z(e.props.maxDate):2100,a=[],i=t;i<=o;i++)a.push(d.createElement("option",{key:i,value:i},i));return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(o){return e.toggleDropdown(o)}},d.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return d.createElement(ay,le({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,o=[e.renderReadView(!t)];return t&&o.unshift(e.renderDropdown()),o},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,o){var a;(a=e.onSelect)===null||a===void 0||a.call(e,t,o),e.setOpen()},e.onSelect=function(t,o){var a,i;(i=(a=e.props).onSelect)===null||i===void 0||i.call(a,t,o)},e.setOpen=function(){var t,o;(o=(t=e.props).setOpen)===null||o===void 0||o.call(t,!0)},e}return r.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},r}(d.Component),sy=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],ly=function(n){var r=(n.className||"").split(/\s+/);return sy.some(function(e){return r.indexOf(e)>=0})},uy=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||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;ly(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=Mu(t.props),u=Ou(t.props),c=de(),p=s||i||a;return p||(l&&Qt(c,l)?l:u&&Tt(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:Ue(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:Kt(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:nt(de(),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(!He(o,t.props))return o;for(var a=bt(o),i=Tb(o),s=yh(i,a),l=null,u=0;u<=s;u++){var c=ze(a,u);if(!He(c,t.props)){l=c;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:nt(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:We(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:nt(We(i,Ie(o)),Z(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=Pt(o,t.props.locale,t.props.calendarStartDay),i=[];return t.props.showWeekNumbers&&i.push(d.createElement("div",{key:"W",className:"react-datepicker__day-name"},t.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map(function(s){var l=ze(a,s),u=t.formatWeekday(l,t.props.locale),c=t.props.weekDayClassName?t.props.weekDayClassName(l):void 0;return d.createElement("div",{key:s,"aria-label":ve(l,"EEEE",t.props.locale),className:Oe("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?Pb(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?Ib(o,a):Nb(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:gn(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,u=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,c=Kt(t.state.date,u),p;switch(!0){case t.props.showMonthYearPicker:p=Cu(t.state.date,t.props);break;case t.props.showYearPicker:p=Yb(t.state.date,t.props);break;case t.props.showQuarterYearPicker:p=$b(t.state.date,t.props);break;default:p=ku(c,t.props);break}if(!(!((i=t.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&p||t.props.showTimeSelectOnly)){var m=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],f=["react-datepicker__navigation","react-datepicker__navigation--previous"],h=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(h=t.decreaseYear),p&&t.props.showDisabledMonthNavigation&&(f.push("react-datepicker__navigation--previous--disabled"),h=void 0);var v=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,g=t.props,y=g.previousMonthButtonLabel,w=y===void 0?r.defaultProps.previousMonthButtonLabel:y,b=g.previousYearButtonLabel,D=b===void 0?r.defaultProps.previousYearButtonLabel:b,E=t.props,C=E.previousMonthAriaLabel,S=C===void 0?typeof w=="string"?w:"Previous Month":C,x=E.previousYearAriaLabel,_=x===void 0?typeof D=="string"?D:"Previous Year":x;return d.createElement("button",{type:"button",className:f.join(" "),onClick:h,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?_:S},d.createElement("span",{className:m.join(" ")},v?D:w))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:mt(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=_u(t.state.date,t.props);break;case t.props.showYearPicker:a=Wb(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=Ab(t.state.date,t.props);break;default:a=Su(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 u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,c=t.props,p=c.nextMonthButtonLabel,m=p===void 0?r.defaultProps.nextMonthButtonLabel:p,f=c.nextYearButtonLabel,h=f===void 0?r.defaultProps.nextYearButtonLabel:f,v=t.props,g=v.nextMonthAriaLabel,y=g===void 0?typeof m=="string"?m:"Next Month":g,w=v.nextYearAriaLabel,b=w===void 0?typeof h=="string"?h:"Next Year":w;return d.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?b:y},d.createElement("span",{className:s.join(" ")},u?h:m))}}},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"),d.createElement("h2",{className:a.join(" ")},ve(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(iy,le({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:Z(t.state.date)}))},t.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthDropdown||o))return d.createElement(Jb,le({},r.defaultProps,t.props,{month:Ie(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(ty,le({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(gu(),o),t.props.setPreSelection&&t.props.setPreSelection(gu())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return d.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDefaultHeader=function(o){var a=o.monthDate,i=o.i;return d.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(a),d.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)),d.createElement("div",{className:"react-datepicker__day-names"},t.header(a)))},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 u=ku(t.state.date,t.props),c=Su(t.state.date,t.props),p=Cu(t.state.date,t.props),m=_u(t.state.date,t.props),f=!t.props.showMonthYearPicker&&!t.props.showQuarterYearPicker&&!t.props.showYearPicker;return d.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,le(le({},t.state),{customHeaderCount:l,monthDate:s,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:u,nextMonthButtonDisabled:c,prevYearButtonDisabled:p,nextYearButtonDisabled:m})),f&&d.createElement("div",{className:"react-datepicker__day-names"},t.header(s)))},t.renderYearHeader=function(o){var a=o.monthDate,i=t.props,s=i.showYearPicker,l=i.yearItemNumber,u=l===void 0?r.defaultProps.yearItemNumber:l,c=Nt(a,u),p=c.startPeriod,m=c.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(p," - ").concat(m):Z(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,u=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?mt(t.state.date,l):Kt(t.state.date,l),c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,p=0;p<s;++p){var m=p-c+l,f=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?mt(u,m):Ue(u,m),h="month-".concat(p),v=p<s-1,g=p>0;i.push(d.createElement("div",{key:h,ref:function(y){t.monthContainer=y??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:f,i:p}),d.createElement(Gb,le({},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:p,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:v,monthShowsDuplicateDaysStart:g}))))}return i}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return d.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),d.createElement(ry,le({},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 d.createElement(ny,le({},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&&Gr(o)&&!!t.props.selected,i=a?"".concat(Pu(o.getHours()),":").concat(Pu(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(zb,le({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=Nt(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=Z(t.state.date):l="".concat(Ya(Ie(t.state.date),t.props.locale)," ").concat(Z(t.state.date)),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&l)},t.renderChildren=function(){if(t.props.children)return d.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=d.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,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Kn}},enumerable:!1,configurable:!0}),r.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){e.setState({monthContainer:e.monthContainer})}())},r.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&(!ue(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var o=!Fe(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!ue(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var e=this.props.container||Eb;return d.createElement(qr,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:Oe("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}(d.Component),cy=function(n){var r=n.icon,e=n.className,t=e===void 0?"":e,o=n.onClick,a="react-datepicker__calendar-icon";if(typeof r=="string")return d.createElement("i",{className:"".concat(a," ").concat(r," ").concat(t),"aria-hidden":"true",onClick:o});if(d.isValidElement(r)){var i=r;return d.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 d.createElement("svg",{className:"".concat(a," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:o},d.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"}))},Yu=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||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 be.createPortal(this.props.children,this.el)},r}(d.Component),dy="[tabindex], a, button, input, select, textarea",fy=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},Wu=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||this;return t.getTabChildren=function(){var o;return Array.prototype.slice.call((o=t.tabLoopRef.current)===null||o===void 0?void 0:o.querySelectorAll(dy),1,-1).filter(fy)},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=d.createRef(),t}return r.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:r.defaultProps.enableTabLoop)?d.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},d.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,d.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},r.defaultProps={enableTabLoop:!0},r}(d.Component);function py(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=Db(le({open:!o,whileElementsMounted:bs,placement:e.popperPlacement,middleware:rt([Es({padding:15}),ea(10),jf({element:a})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),s=le(le({},e),{hidePopper:o,popperProps:le(le({},i),{arrowRef:a})});return d.createElement(n,le({},s))};return r}var my=function(n){Pe(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(r,"defaultProps",{get:function(){return{hidePopper:!0}},enumerable:!1,configurable:!0}),r.prototype.render=function(){var e=this.props,t=e.className,o=e.wrapperClassName,a=e.hidePopper,i=a===void 0?r.defaultProps.hidePopper:a,s=e.popperComponent,l=e.targetComponent,u=e.enableTabLoop,c=e.popperOnKeyDown,p=e.portalId,m=e.portalHost,f=e.popperProps,h=e.showArrow,v=void 0;if(!i){var g=Oe("react-datepicker-popper",t);v=d.createElement(Wu,{enableTabLoop:u},d.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:g,"data-placement":f.placement,onKeyDown:c},s,h&&d.createElement(hb,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(v=d.createElement(this.props.popperContainer,{},v)),p&&!i&&(v=d.createElement(Yu,{portalId:p,portalHost:m},v));var y=Oe("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:f.refs.setReference,className:y},l),v)},r}(d.Component),hy=py(my),ju="react-datepicker-ignore-onclickoutside";function vy(n,r){return n&&r?Ie(n)!==Ie(r)||Z(n)!==Z(r):n!==r}var Ha="Date input not valid.",gy=function(n){Pe(r,n);function r(e){var t=n.call(this,e)||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:de()},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 Gr(s)?rt(rt([],a,!0),[le(le({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=Mu(t.props),s=Ou(t.props),l=i&&Qt(a,Xr(i))?i:s&&Tt(a,bu(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:Tu(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(le(le({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(le(le({},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:Ra},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return ht(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.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.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,u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];var p=u[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,u),!p||typeof p.isDefaultPrevented!="function"||p.isDefaultPrevented()))){t.setState({inputValue:(p==null?void 0:p.target)instanceof HTMLInputElement?p.target.value:null,lastPreSelectChange:by});var m=t.props,f=m.selectsRange,h=m.startDate,v=m.endDate,g=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,y=(a=t.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,w=(p==null?void 0:p.target)instanceof HTMLInputElement?p.target.value:"";if(f){var b=w.split("-",2).map(function(P){return P.trim()}),D=b[0],E=b[1],C=La(D??"",g,t.props.locale,y),S=La(E??"",g,t.props.locale,y),x=(h==null?void 0:h.getTime())!==(C==null?void 0:C.getTime()),_=(v==null?void 0:v.getTime())!==(S==null?void 0:S.getTime());if(!x&&!_||C&&He(C,t.props)||S&&He(S,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[C,S],p)}else{var M=La(w,g,t.props.locale,y,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(M||!w)&&t.setSelected(M,p,!0)}}},t.handleSelect=function(o,a,i){if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&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);else if(!t.props.inline){t.props.selectsRange||t.setOpen(!1);var s=t.props,l=s.startDate,u=s.endDate;l&&!u&&(t.props.swapRange||!Fu(o,l))&&t.setOpen(!1)}},t.setSelected=function(o,a,i,s){var l,u,c=o;if(t.props.showYearPicker){if(c!==null&&no(Z(c),t.props))return}else if(t.props.showMonthYearPicker){if(c!==null&&wu(c,t.props))return}else if(c!==null&&He(c,t.props))return;var p=t.props,m=p.onChange,f=p.selectsRange,h=p.startDate,v=p.endDate,g=p.selectsMultiple,y=p.selectedDates,w=p.minTime,b=p.swapRange;if(!qt(t.props.selected,c)||t.props.allowSameDay||f||g)if(c!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(c=$a(c,{hour:vt(t.props.selected),minute:gt(t.props.selected),second:Ot(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&w&&(c=$a(c,{hour:w.getHours(),minute:w.getMinutes(),second:w.getSeconds()})),t.props.inline||t.setState({preSelection:c}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),f){var D=!h&&!v,E=h&&!v,C=h&&v;D?m==null||m([c,null],a):E&&(c===null?m==null||m([null,null],a):Fu(c,h)?b?m==null||m([c,h],a):m==null||m([c,null],a):m==null||m([h,c],a)),C&&(m==null||m([c,null],a))}else if(g){if(c!==null)if(!(y!=null&&y.length))m==null||m([c],a);else{var S=y.some(function(_){return ue(_,c)});if(S){var x=y.filter(function(_){return!ue(_,c)});m==null||m(x,a)}else m==null||m(rt(rt([],y,!0),[c],!1),a)}}else m==null||m(c,a);i||((u=(l=t.props).onSelect)===null||u===void 0||u.call(l,c,a),t.setState({inputValue:null}))},t.setPreSelection=function(o){var a=ht(t.props.minDate),i=ht(t.props.maxDate),s=!0;if(o){var l=Xr(o);if(a&&i)s=Gn(o,t.props.minDate,t.props.maxDate);else if(a){var u=Xr(t.props.minDate);s=Tt(o,u)||qt(l,u)}else if(i){var c=bu(t.props.maxDate);s=Qt(o,c)||qt(l,c)}}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:$a(s,{hour:vt(o),minute:gt(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,u,c;(i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o);var p=o.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(p===j.ArrowDown||p===j.ArrowUp||p===j.Enter)&&((s=t.onInputClick)===null||s===void 0||s.call(t));return}if(t.state.open){if(p===j.ArrowDown||p===j.ArrowUp){o.preventDefault();var m=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(m);f instanceof HTMLElement&&f.focus({preventScroll:!0});return}var h=de(t.state.preSelection);p===j.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===Ra?(t.handleSelect(h,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(h)):t.setOpen(!1)):p===j.Escape?(o.preventDefault(),o.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):p===j.Tab&&t.setOpen(!1),t.inputOk()||(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:Ha})}},t.onPortalKeyDown=function(o){var a=o.key;a===j.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,u,c,p=t.props,m=p.minDate,f=p.maxDate,h=p.disabledKeyboardNavigation,v=p.showWeekPicker,g=p.shouldCloseOnSelect,y=p.locale,w=p.calendarStartDay,b=p.adjustDateOnChange,D=p.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!h){var E=o.key,C=o.shiftKey,S=de(t.state.preSelection),x=function(L,$){var V=$;switch(L){case j.ArrowRight:V=v?Ar($,1):ze($,1);break;case j.ArrowLeft:V=v?du($):vg($);break;case j.ArrowUp:V=du($);break;case j.ArrowDown:V=Ar($,1);break;case j.PageUp:V=C?gn($,1):Kt($,1);break;case j.PageDown:V=C?mt($,1):Ue($,1);break;case j.Home:V=Pt($,y,w);break;case j.End:V=Ob($);break}return V},_=function(L,$){for(var V=40,T=L,q=!1,k=0,F=x(L,$);!q;){if(k>=V){F=$;break}m&&F<m&&(T=j.ArrowRight,F=He(m,t.props)?x(T,F):m),f&&F>f&&(T=j.ArrowLeft,F=He(f,t.props)?x(T,F):f),He(F,t.props)?((T===j.PageUp||T===j.Home)&&(T=j.ArrowRight),(T===j.PageDown||T===j.End)&&(T=j.ArrowLeft),F=x(T,F)):q=!0,k++}return F};if(E===j.Enter){o.preventDefault(),t.handleSelect(S,o),!g&&t.setPreSelection(S);return}else if(E===j.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:Ha});return}var M=null;switch(E){case j.ArrowLeft:case j.ArrowRight:case j.ArrowUp:case j.ArrowDown:case j.PageUp:case j.PageDown:case j.Home:case j.End:M=_(E,S);break}if(!M){(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:Ha});return}if(o.preventDefault(),t.setState({lastPreSelectChange:Ra}),b&&t.setSelected(M),t.setPreSelection(M),D){var P=Ie(S),Y=Ie(M),H=Z(S),N=Z(M);P!==Y||H!==N?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===j.Escape&&(o.preventDefault(),t.sendFocusBackToInput())},t.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),t.sendFocusBackToInput();var a=t.props,i=a.selectsRange,s=a.onChange;i?s==null||s([null,null],o):s==null||s(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:d.createElement(uy,le({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:Hb(t.modifyHolidays()),outsideClickIgnoreClass:ju,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=t.props,a=o.dateFormat,i=a===void 0?r.defaultProps.dateFormat:a,s=o.locale,l=t.props.showTimeInput||t.props.showTimeSelect,u=l?"PPPPp":"PPPP",c;return t.props.selectsRange?c="Selected start date: ".concat(je(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+je(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(je(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(je(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(je(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(je(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(je(t.props.selected,{dateFormat:u,locale:s})),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},c)},t.renderDateInput=function(){var o,a,i,s=Oe(t.props.className,(o={},o[ju]=t.state.open,o)),l=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",c=t.props,p=c.dateFormat,m=p===void 0?r.defaultProps.dateFormat:p,f=c.locale,h=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?Sb(t.props.startDate,t.props.endDate,{dateFormat:m,locale:f}):t.props.selectsMultiple?Cb((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:m,locale:f}):je(t.props.selected,{dateFormat:m,locale:f});return d.cloneElement(l,(a={},a[u]=function(v){t.input=v},a.value=h,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=Oe(l.props.className,s),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,u=o.endDate,c=o.clearButtonTitle,p=o.clearButtonClassName,m=p===void 0?"":p,f=o.ariaLabelClose,h=f===void 0?"Close":f,v=o.selectedDates;return a&&(s!=null||l!=null||u!=null||v!=null&&v.length)?d.createElement("button",{type:"button",className:Oe("react-datepicker__close-icon",m,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":h,onClick:t.onClearClick,title:c,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,readOnly:!1,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:Kn,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(e,t){var o,a,i,s;e.inline&&vy(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Tu(this.props.highlightDates)}),!t.focused&&!qt(e.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 e=this.props,t=e.showIcon,o=e.icon,a=e.calendarIconClassname,i=e.calendarIconClassName,s=e.toggleCalendarOnIconClick,l=this.state.open;return a&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),d.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&d.createElement(cy,le({icon:o,className:Oe(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 e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?d.createElement(Wu,{enableTabLoop:this.props.enableTabLoop},d.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=d.createElement(Yu,le({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(hy,le({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(d.Component),by="input",Ra="navigate";const yy=({label:n,placeholder:r,value:e,onChange:t,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(c,p)=>1990+p),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=d.forwardRef(({value:c,onClick:p},m)=>O.jsx("button",{"aria-label":"inputButton",type:"button",id:n,className:"bg-background-secondary placeholder:text-petnow-grey-primary h-[60px] w-full cursor-pointer rounded-xl p-4 text-left text-xl focus:outline-hidden disabled:opacity-50",onClick:p,ref:m,children:c||O.jsx("p",{className:"text-petnow-grey-primary",children:r})}));l.displayName="CustomInput";function u(c){const p=c.substring(0,4),m=c.substring(5,7),f=c.substring(8,10);return new Date(Number(p),Number(m)-1,Number(f))}return O.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[O.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),O.jsx(gy,{disabledKeyboardNavigation:!0,locale:sb,id:n,name:"출생일",placeholderText:r,onChange:c=>c&&t(c),selected:e?u(e):void 0,value:e,dateFormat:"yyyy-MM-dd",autoComplete:"off",maxDate:new Date,customInput:O.jsx(l,{}),renderCustomHeader:({date:c,changeYear:p,changeMonth:m,decreaseMonth:f,increaseMonth:h})=>O.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[O.jsx("button",{onClick:f,disabled:c.getFullYear()<=1990&&c.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:O.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),O.jsxs("div",{className:"text-lg",children:[O.jsx("select",{"aria-label":"yearsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 w-auto cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:Z(c),onChange:({target:{value:v}})=>p(Number(v)),children:i.map(v=>O.jsx("option",{value:v,children:v},v))}),O.jsx("span",{className:"mr-2 ml-1",children:"년"}),O.jsx("select",{"aria-label":"monthsSelect",dir:"rtl",className:"datepicker-select bg-petnow-grey-90 cursor-pointer rounded-md px-2 py-1 text-center focus:outline-hidden",value:s[Ie(c)],onChange:({target:{value:v}})=>m(s.indexOf(v)),children:s.map(v=>O.jsx("option",{value:v,children:v},v))}),O.jsx("span",{className:"mx-1",children:"월"})]}),O.jsx("button",{onClick:h,disabled:c.getFullYear()>=new Date().getFullYear()&&c.getMonth()>=new Date().getMonth(),type:"button",className:"react-datepicker__navigation react-datepicker__navigation--next","aria-label":"Next Month",children:O.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&O.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function wy(n){return Vn({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"},child:[]}]})(n)}const xy=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>O.jsx("div",{className:"text-petnow-grey-tertiary relative",children:O.jsxs(Bm,{disabled:a,onChange:o,children:[O.jsx(pr,{className:"text-xl font-bold text-black",children:n}),O.jsxs(Ol,{className:"bg-background-secondary placeholder:text-petnow-grey-primary relative mt-4 h-[60px] w-full cursor-pointer rounded-xl p-4 text-start text-xl focus:outline-hidden disabled:opacity-50",children:[e.name?O.jsx("p",{children:e.name}):O.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",O.jsx(wy,{className:"absolute right-4 bottom-5"})]}),O.jsx(Tl,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>O.jsx(Pl,{value:i,as:O.Fragment,children:({focus:s,selected:l})=>O.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${s?"bg-background-tertiary":"bg-background-secondary"} ${l&&"bg-background-tertiary"}`,children:i.name})},i.name))})]})}),Dy=({className:n,id:r,name:e,onChange:t,disabled:o,checked:a})=>O.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:or("petnowRadio size-[3.5vw]",n),onChange:t}),Ey=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,u]=d.useState("");let c;const p=h=>{c&&clearTimeout(c),c=setTimeout(async()=>{u(h.target.value)},200)},m=h=>{u(h.target.value)},f=l===""?t.slice(0,4):t.filter(h=>{var v;return(v=h.name)==null?void 0:v.replace(/ /g,"").includes(l.replace(/ /g,""))}).slice(0,4);return O.jsxs("div",{children:[O.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:O.jsxs(Vp,{onChange:h=>{o(h)},disabled:a,children:[O.jsx(pr,{className:"text-xl font-bold text-black",children:n}),O.jsx(ol,{"aria-label":"comboboxInput",className:"bg-background-secondary placeholder:text-petnow-grey-primary mt-4 flex w-full items-center justify-between rounded-xl p-4 text-xl focus:outline-hidden disabled:opacity-50",value:e,onChange:s?m:p,onKeyDown:h=>{h.key==="Backspace"&&o({name:void 0,value:void 0})},placeholder:r,autoComplete:"off"}),O.jsx(al,{className:"absolute top-[104px] z-10 max-h-60 w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",style:{bottom:-f.length*60},children:f.map(h=>O.jsx(il,{value:h,as:d.Fragment,children:({focus:v,selected:g})=>O.jsx("li",{className:`placeholder:text-petnow-grey-primary flex w-full cursor-pointer justify-between p-4 text-start text-xl focus:outline-hidden disabled:opacity-50 ${v?"bg-background-tertiary":"bg-background-secondary"} ${g&&"bg-background-tertiary"}`,children:h.name})},h.name))})]})}),i&&O.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})},ky=({tabList:n,onTabChange:r})=>{const[e,t]=d.useState(n[0]),o=a=>{if(a<=1||a>4)throw new Error("[@petnow/ui/Tabs] Tab에 들어갈 수 있는 길이는 2~4개입니다.");return a===2?`absolute h-[2px] w-[50%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":"translate-x-[100%]"}`:a===3?`absolute h-[2px] w-[33.3%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(e)===JSON.stringify(n[1])?"translate-x-[100%]":"translate-x-[200%]"}`:`absolute h-[2px] w-[25%] bg-petnow-orange-primary transition-all duration-200 ${JSON.stringify(e)===JSON.stringify(n[0])?"translate-x-[0%]":JSON.stringify(e)===JSON.stringify(n[1])?"translate-x-[100%]":JSON.stringify(e)===JSON.stringify(n[2])?"translate-x-[200%]":"translate-x-[300%]"}`};return O.jsxs("div",{className:"flex flex-col text-2xl font-bold",children:[O.jsx("div",{className:"flex",children:n.map(a=>O.jsx("div",{className:"flex flex-1 flex-col",children:O.jsx("button",{className:`cursor-pointer py-5 hover:text-black ${JSON.stringify(a)===JSON.stringify(e)?"text-black":"text-petnow-grey-secondary"}`,onClick:()=>{t(a),r(a)},children:a.displayName})},a.key))}),O.jsx("div",{className:"bg-petnow-grey-primary relative h-[2px] w-full",children:O.jsx("div",{className:o(n.length)})})]})};ge.AccordionCard=dh,ge.Checkbox=Jm,ge.CtaButton=li,ge.LabeledAddressInput=ih,ge.LabeledAutocomplete=Ey,ge.LabeledDatepicker=yy,ge.LabeledSelect=xy,ge.Modal=lh,ge.Radio=Dy,ge.Tabs=ky,Object.defineProperty(ge,Symbol.toStringTag,{value:"Module"})});
|
|
37
50
|
//# sourceMappingURL=index.umd.js.map
|