@petnow/ui 2.3.1 → 2.3.2
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 +1 -1
- package/dist/index.es.js +7200 -6336
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +22 -22
- package/dist/index.umd.js.map +1 -1
- package/package.json +11 -11
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Ce,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):(Ce=typeof globalThis<"u"?globalThis:Ce||self,d(Ce["@petnow/ui"]={},Ce.React,Ce.ReactDOM))})(this,function(Ce,d,Le){"use strict";var ED=Object.defineProperty;var DD=(Ce,d,Le)=>d in Ce?ED(Ce,d,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ce[d]=Le;var te=(Ce,d,Le)=>DD(Ce,typeof d!="symbol"?d+"":d,Le);function Es(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 H=Es(d),cr=Es(Le);function jf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var eo={exports:{}},dr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Ds;function Hf(){if(Ds)return dr;Ds=1;var n=d,r=Symbol.for("react.element"),e=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,u){var c,f={},h=null,p=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(p=l.ref);for(c in l)t.call(l,c)&&!a.hasOwnProperty(c)&&(f[c]=l[c]);if(s&&s.defaultProps)for(c in l=s.defaultProps,l)f[c]===void 0&&(f[c]=l[c]);return{$$typeof:r,type:s,key:h,ref:p,props:f,_owner:o.current}}return dr.Fragment=e,dr.jsx=i,dr.jsxs=i,dr}var fr={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,49 +14,49 @@
|
|
|
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
|
-
`+A+
|
|
19
|
-
`),
|
|
20
|
-
`),Ye=ce.length-1,
|
|
21
|
-
`+ce[Ye].replace(" at new "," at ");return
|
|
17
|
+
*/var Ss;function Bf(){return Ss||(Ss=1,process.env.NODE_ENV!=="production"&&function(){var n=d,r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,v="@@iterator";function g(D){if(D===null||typeof D!="object")return null;var z=m&&D[m]||D[v];return typeof z=="function"?z:null}var y=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(D){{for(var z=arguments.length,ee=new Array(z>1?z-1:0),ie=1;ie<z;ie++)ee[ie-1]=arguments[ie];w("error",D,ee)}}function w(D,z,ee){{var ie=y.ReactDebugCurrentFrame,Ee=ie.getStackAddendum();Ee!==""&&(z+="%s",ee=ee.concat([Ee]));var ke=ee.map(function(pe){return String(pe)});ke.unshift("Warning: "+z),Function.prototype.apply.call(console[D],console,ke)}}var S=!1,x=!1,T=!1,N=!1,_=!1,O;O=Symbol.for("react.module.reference");function M(D){return!!(typeof D=="string"||typeof D=="function"||D===t||D===a||_||D===o||D===u||D===c||N||D===p||S||x||T||typeof D=="object"&&D!==null&&(D.$$typeof===h||D.$$typeof===f||D.$$typeof===i||D.$$typeof===s||D.$$typeof===l||D.$$typeof===O||D.getModuleId!==void 0))}function L(D,z,ee){var ie=D.displayName;if(ie)return ie;var Ee=z.displayName||z.name||"";return Ee!==""?ee+"("+Ee+")":ee}function b(D){return D.displayName||"Context"}function k(D){if(D==null)return null;if(typeof D.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof D=="function")return D.displayName||D.name||null;if(typeof D=="string")return D;switch(D){case t:return"Fragment";case e:return"Portal";case a:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof D=="object")switch(D.$$typeof){case s:var z=D;return b(z)+".Consumer";case i:var ee=D;return b(ee._context)+".Provider";case l:return L(D,D.render,"ForwardRef");case f:var ie=D.displayName||null;return ie!==null?ie:k(D.type)||"Memo";case h:{var Ee=D,ke=Ee._payload,pe=Ee._init;try{return k(pe(ke))}catch{return null}}}return null}var $=Object.assign,Y=0,I,V,C,q,P,W,G;function j(){}j.__reactDisabledLog=!0;function F(){{if(Y===0){I=console.log,V=console.info,C=console.warn,q=console.error,P=console.group,W=console.groupCollapsed,G=console.groupEnd;var D={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:D,log:D,warn:D,error:D,group:D,groupCollapsed:D,groupEnd:D})}Y++}}function ne(){{if(Y--,Y===0){var D={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},D,{value:I}),info:$({},D,{value:V}),warn:$({},D,{value:C}),error:$({},D,{value:q}),group:$({},D,{value:P}),groupCollapsed:$({},D,{value:W}),groupEnd:$({},D,{value:G})})}Y<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=y.ReactCurrentDispatcher,A;function B(D,z,ee){{if(A===void 0)try{throw Error()}catch(Ee){var ie=Ee.stack.trim().match(/\n( *(at )?)/);A=ie&&ie[1]||""}return`
|
|
18
|
+
`+A+D}}var K=!1,J;{var Ie=typeof WeakMap=="function"?WeakMap:Map;J=new Ie}function Q(D,z){if(!D||K)return"";{var ee=J.get(D);if(ee!==void 0)return ee}var ie;K=!0;var Ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ke;ke=U.current,U.current=null,F();try{if(z){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(rt){ie=rt}Reflect.construct(D,[],pe)}else{try{pe.call()}catch(rt){ie=rt}D.call(pe.prototype)}}else{try{throw Error()}catch(rt){ie=rt}D()}}catch(rt){if(rt&&ie&&typeof rt.stack=="string"){for(var ce=rt.stack.split(`
|
|
19
|
+
`),et=ie.stack.split(`
|
|
20
|
+
`),Ye=ce.length-1,Ve=et.length-1;Ye>=1&&Ve>=0&&ce[Ye]!==et[Ve];)Ve--;for(;Ye>=1&&Ve>=0;Ye--,Ve--)if(ce[Ye]!==et[Ve]){if(Ye!==1||Ve!==1)do if(Ye--,Ve--,Ve<0||ce[Ye]!==et[Ve]){var gt=`
|
|
21
|
+
`+ce[Ye].replace(" at new "," at ");return D.displayName&>.includes("<anonymous>")&&(gt=gt.replace("<anonymous>",D.displayName)),typeof D=="function"&&J.set(D,gt),gt}while(Ye>=1&&Ve>=0);break}}}finally{K=!1,U.current=ke,ne(),Error.prepareStackTrace=Ee}var ur=D?D.displayName||D.name:"",An=ur?B(ur):"";return typeof D=="function"&&J.set(D,An),An}function nt(D,z,ee){return Q(D,!1)}function en(D){var z=D.prototype;return!!(z&&z.isReactComponent)}function vt(D,z,ee){if(D==null)return"";if(typeof D=="function")return Q(D,en(D));if(typeof D=="string")return B(D);switch(D){case u:return B("Suspense");case c:return B("SuspenseList")}if(typeof D=="object")switch(D.$$typeof){case l:return nt(D.render);case f:return vt(D.type,z,ee);case h:{var ie=D,Ee=ie._payload,ke=ie._init;try{return vt(ke(Ee),z,ee)}catch{}}}return""}var Lt=Object.prototype.hasOwnProperty,Jr={},Ln=y.ReactDebugCurrentFrame;function Fn(D){if(D){var z=D._owner,ee=vt(D.type,D._source,z?z.type:null);Ln.setExtraStackFrame(ee)}else Ln.setExtraStackFrame(null)}function Zr(D,z,ee,ie,Ee){{var ke=Function.call.bind(Lt);for(var pe in D)if(ke(D,pe)){var ce=void 0;try{if(typeof D[pe]!="function"){var et=Error((ie||"React class")+": "+ee+" type `"+pe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof D[pe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw et.name="Invariant Violation",et}ce=D[pe](z,pe,ie,ee,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ye){ce=Ye}ce&&!(ce instanceof Error)&&(Fn(Ee),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ie||"React class",ee,pe,typeof ce),Fn(null)),ce instanceof Error&&!(ce.message in Jr)&&(Jr[ce.message]=!0,Fn(Ee),E("Failed %s type: %s",ee,ce.message),Fn(null))}}}var ga=Array.isArray;function sr(D){return ga(D)}function ba(D){{var z=typeof Symbol=="function"&&Symbol.toStringTag,ee=z&&D[Symbol.toStringTag]||D.constructor.name||"Object";return ee}}function rD(D){try{return Cf(D),!1}catch{return!0}}function Cf(D){return""+D}function _f(D){if(rD(D))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ba(D)),Cf(D)}var Of=y.ReactCurrentOwner,oD={key:!0,ref:!0,__self:!0,__source:!0},Mf,Tf;function aD(D){if(Lt.call(D,"ref")){var z=Object.getOwnPropertyDescriptor(D,"ref").get;if(z&&z.isReactWarning)return!1}return D.ref!==void 0}function iD(D){if(Lt.call(D,"key")){var z=Object.getOwnPropertyDescriptor(D,"key").get;if(z&&z.isReactWarning)return!1}return D.key!==void 0}function sD(D,z){typeof D.ref=="string"&&Of.current}function lD(D,z){{var ee=function(){Mf||(Mf=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};ee.isReactWarning=!0,Object.defineProperty(D,"key",{get:ee,configurable:!0})}}function uD(D,z){{var ee=function(){Tf||(Tf=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",z))};ee.isReactWarning=!0,Object.defineProperty(D,"ref",{get:ee,configurable:!0})}}var cD=function(D,z,ee,ie,Ee,ke,pe){var ce={$$typeof:r,type:D,key:z,ref:ee,props:pe,_owner:ke};return ce._store={},Object.defineProperty(ce._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ce,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.defineProperty(ce,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ee}),Object.freeze&&(Object.freeze(ce.props),Object.freeze(ce)),ce};function dD(D,z,ee,ie,Ee){{var ke,pe={},ce=null,et=null;ee!==void 0&&(_f(ee),ce=""+ee),iD(z)&&(_f(z.key),ce=""+z.key),aD(z)&&(et=z.ref,sD(z,Ee));for(ke in z)Lt.call(z,ke)&&!oD.hasOwnProperty(ke)&&(pe[ke]=z[ke]);if(D&&D.defaultProps){var Ye=D.defaultProps;for(ke in Ye)pe[ke]===void 0&&(pe[ke]=Ye[ke])}if(ce||et){var Ve=typeof D=="function"?D.displayName||D.name||"Unknown":D;ce&&lD(pe,Ve),et&&uD(pe,Ve)}return cD(D,ce,et,Ee,ie,Of.current,pe)}}var bs=y.ReactCurrentOwner,Pf=y.ReactDebugCurrentFrame;function lr(D){if(D){var z=D._owner,ee=vt(D.type,D._source,z?z.type:null);Pf.setExtraStackFrame(ee)}else Pf.setExtraStackFrame(null)}var ys;ys=!1;function ws(D){return typeof D=="object"&&D!==null&&D.$$typeof===r}function If(){{if(bs.current){var D=k(bs.current.type);if(D)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+
|
|
23
|
+
Check the render method of \``+D+"`."}return""}}function fD(D){return""}var Nf={};function pD(D){{var z=If();if(!z){var ee=typeof D=="string"?D:D.displayName||D.name;ee&&(z=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+
|
|
25
|
+
Check the top-level render call using <`+ee+">.")}return z}}function $f(D,z){{if(!D._store||D._store.validated||D.key!=null)return;D._store.validated=!0;var ee=pD(z);if(Nf[ee])return;Nf[ee]=!0;var ie="";D&&D._owner&&D._owner!==bs.current&&(ie=" It was passed a child from "+k(D._owner.type)+"."),lr(D),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ee,ie),lr(null)}}function Lf(D,z){{if(typeof D!="object")return;if(sr(D))for(var ee=0;ee<D.length;ee++){var ie=D[ee];ws(ie)&&$f(ie,z)}else if(ws(D))D._store&&(D._store.validated=!0);else if(D){var Ee=g(D);if(typeof Ee=="function"&&Ee!==D.entries)for(var ke=Ee.call(D),pe;!(pe=ke.next()).done;)ws(pe.value)&&$f(pe.value,z)}}}function hD(D){{var z=D.type;if(z==null||typeof z=="string")return;var ee;if(typeof z=="function")ee=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===l||z.$$typeof===f))ee=z.propTypes;else return;if(ee){var ie=k(z);Zr(ee,D.props,"prop",ie,D)}else if(z.PropTypes!==void 0&&!ys){ys=!0;var Ee=k(z);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ee||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function mD(D){{for(var z=Object.keys(D.props),ee=0;ee<z.length;ee++){var ie=z[ee];if(ie!=="children"&&ie!=="key"){lr(D),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ie),lr(null);break}}D.ref!==null&&(lr(D),E("Invalid attribute `ref` supplied to `React.Fragment`."),lr(null))}}var Ff={};function Af(D,z,ee,ie,Ee,ke){{var pe=M(D);if(!pe){var ce="";(D===void 0||typeof D=="object"&&D!==null&&Object.keys(D).length===0)&&(ce+=" 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 et=fD();et?ce+=et:ce+=If();var Ye;D===null?Ye="null":sr(D)?Ye="array":D!==void 0&&D.$$typeof===r?(Ye="<"+(k(D.type)||"Unknown")+" />",ce=" Did you accidentally export a JSX literal instead of a component?"):Ye=typeof D,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ye,ce)}var Ve=dD(D,z,ee,Ee,ke);if(Ve==null)return Ve;if(pe){var gt=z.children;if(gt!==void 0)if(ie)if(sr(gt)){for(var ur=0;ur<gt.length;ur++)Lf(gt[ur],D);Object.freeze&&Object.freeze(gt)}else E("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 Lf(gt,D)}if(Lt.call(z,"key")){var An=k(D),rt=Object.keys(z).filter(function(xD){return xD!=="key"}),xs=rt.length>0?"{key: someKey, "+rt.join(": ..., ")+": ...}":"{key: someKey}";if(!Ff[An+xs]){var wD=rt.length>0?"{"+rt.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,ds,_n,oE,_n),lf[_n+ds]=!0}}return y===t?Zx(je):Jx(je),je}}function eE(y,B,J){return uf(y,B,J,!0)}function tE(y,B,J){return uf(y,B,J,!1)}var nE=tE,rE=eE;nr.Fragment=t,nr.jsx=nE,nr.jsxs=rE}()),nr}var ms;function vf(){return ms||(ms=1,process.env.NODE_ENV==="production"?Br.exports=hf():Br.exports=mf()),Br.exports}var Y=vf();function vs(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=vs(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function Be(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=vs(n))&&(t&&(t+=" "),t+=r);return t}const aa="-",gf=n=>{const r=yf(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(aa);return s[0]===""&&s.length!==1&&s.shift(),gs(s,r)||bf(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},gs=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?gs(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(aa);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},bs=/^\[(.+)\]$/,bf=n=>{if(bs.test(n)){const r=bs.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},yf=n=>{const{theme:r,classGroups:e}=n,t={nextPart:new Map,validators:[]};for(const o in e)ia(e[o],t,o,r);return t},ia=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:ys(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(wf(o)){ia(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{ia(i,ys(r,a),e,t)})})},ys=(n,r)=>{let e=n;return r.split(aa).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},wf=n=>n.isThemeGetter,xf=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)}}},sa="!",la=":",Ef=la.length,Df=n=>{const{prefix:r,experimentalParseClassName:e}=n;let t=o=>{const a=[];let i=0,s=0,l=0,u;for(let m=0;m<o.length;m++){let v=o[m];if(i===0&&s===0){if(v===la){a.push(o.slice(l,m)),l=m+Ef;continue}if(v==="/"){u=m;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const c=a.length===0?o:o.substring(l),f=Sf(c),h=f!==c,p=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}};if(r){const o=r+la,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},Sf=n=>n.endsWith(sa)?n.substring(0,n.length-1):n.startsWith(sa)?n.substring(1):n,kf=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}},_f=n=>({cache:xf(n.cacheSize),parseClassName:Df(n),sortModifiers:kf(n),...gf(n)}),Cf=/\s+/,Of=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(Cf);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=e(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!v,x=t(g?m.substring(0,v):m);if(!x){if(!g){l=c+(l.length>0?" "+l:l);continue}if(x=t(m),!x){l=c+(l.length>0?" "+l:l);continue}g=!1}const E=a(h).join(":"),w=p?E+sa:E,k=w+x;if(i.includes(k))continue;i.push(k);const D=o(x,g);for(let T=0;T<D.length;++T){const $=D[T];i.push(w+$)}l=c+(l.length>0?" "+l:l)}return l};function Mf(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=ws(r))&&(t&&(t+=" "),t+=e);return t}const ws=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=ws(n[t]))&&(e&&(e+=" "),e+=r);return e};function xs(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,f)=>f(c),n());return e=_f(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=Of(l,e);return o(l,c),c}return function(){return a(Mf.apply(null,arguments))}}const We=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},Es=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ds=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tf=/^\d+\/\d+$/,Pf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,If=/\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$/,Nf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Lf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ff=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cn=n=>Tf.test(n),ue=n=>!!n&&!Number.isNaN(Number(n)),qt=n=>!!n&&Number.isInteger(Number(n)),ua=n=>n.endsWith("%")&&ue(n.slice(0,-1)),Ot=n=>Pf.test(n),$f=()=>!0,Af=n=>If.test(n)&&!Nf.test(n),Ss=()=>!1,Yf=n=>Lf.test(n),Rf=n=>Ff.test(n),jf=n=>!re(n)&&!oe(n),Wf=n=>On(n,Ms,Ss),re=n=>Es.test(n),sn=n=>On(n,Ts,Af),ca=n=>On(n,qf,ue),ks=n=>On(n,Cs,Ss),Hf=n=>On(n,Os,Rf),Vr=n=>On(n,Ps,Yf),oe=n=>Ds.test(n),rr=n=>Mn(n,Ts),Bf=n=>Mn(n,Uf),_s=n=>Mn(n,Cs),Vf=n=>Mn(n,Ms),zf=n=>Mn(n,Os),zr=n=>Mn(n,Ps,!0),On=(n,r,e)=>{const t=Es.exec(n);return t?t[1]?r(t[1]):e(t[2]):!1},Mn=(n,r,e=!1)=>{const t=Ds.exec(n);return t?t[1]?r(t[1]):e:!1},Cs=n=>n==="position"||n==="percentage",Os=n=>n==="image"||n==="url",Ms=n=>n==="length"||n==="size"||n==="bg-size",Ts=n=>n==="length",qf=n=>n==="number",Uf=n=>n==="family-name",Ps=n=>n==="shadow",Is=()=>{const n=We("color"),r=We("font"),e=We("text"),t=We("font-weight"),o=We("tracking"),a=We("leading"),i=We("breakpoint"),s=We("container"),l=We("spacing"),u=We("radius"),c=We("shadow"),f=We("inset-shadow"),h=We("text-shadow"),p=We("drop-shadow"),m=We("blur"),v=We("perspective"),g=We("aspect"),x=We("ease"),E=We("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...k(),oe,re],T=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],_=()=>[oe,re,l],C=()=>[Cn,"full","auto",..._()],O=()=>[qt,"none","subgrid",oe,re],R=()=>["auto",{span:["full",qt,oe,re]},qt,oe,re],b=()=>[qt,"auto",oe,re],S=()=>["auto","min","max","fr",oe,re],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",..._()],z=()=>[Cn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],I=()=>[n,oe,re],te=()=>[...k(),_s,ks,{position:[oe,re]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",Vf,Wf,{size:[oe,re]}],Q=()=>[ua,rr,sn],W=()=>["","none","full",u,oe,re],F=()=>["",ue,rr,sn],ne=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[ue,ua,_s,ks],H=()=>["","none",m,oe,re],G=()=>["none",ue,oe,re],X=()=>["none",ue,oe,re],Pe=()=>[ue,oe,re],U=()=>[Cn,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ot],breakpoint:[Ot],color:[$f],container:[Ot],"drop-shadow":[Ot],ease:["in","out","in-out"],font:[jf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ot],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ot],shadow:[Ot],spacing:["px",ue],text:[Ot],"text-shadow":[Ot],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Cn,re,oe,g]}],container:["container"],columns:[{columns:[ue,re,oe,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:D()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[qt,"auto",oe,re]}],basis:[{basis:[Cn,"full","auto",s,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,Cn,"auto","initial","none",re]}],grow:[{grow:["",ue,oe,re]}],shrink:[{shrink:["",ue,oe,re]}],order:[{order:[qt,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":S()}],"auto-rows":[{"auto-rows":S()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",e,rr,sn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,oe,ca]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ua,re]}],"font-family":[{font:[Bf,re,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,oe,re]}],"line-clamp":[{"line-clamp":[ue,"none",oe,ca]}],leading:[{leading:[a,..._()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",oe,sn]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ue,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,re]}],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",oe,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qt,oe,re],radial:["",oe,re],conic:[qt,oe,re]},zf,Hf]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,oe,re]}],"outline-w":[{outline:["",ue,rr,sn]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",c,zr,Vr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",f,zr,Vr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ue,sn]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",h,zr,Vr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ue,oe,re]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"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":[ue]}],"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":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"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":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"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":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"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":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"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":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"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":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"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":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"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":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"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":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:H()}],brightness:[{brightness:[ue,oe,re]}],contrast:[{contrast:[ue,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",p,zr,Vr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",ue,oe,re]}],"hue-rotate":[{"hue-rotate":[ue,oe,re]}],invert:[{invert:["",ue,oe,re]}],saturate:[{saturate:[ue,oe,re]}],sepia:[{sepia:["",ue,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[ue,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[ue,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",ue,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[ue,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[ue,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",oe,re]}],ease:[{ease:["linear","initial",x,oe,re]}],delay:[{delay:[ue,oe,re]}],animate:[{animate:["none",E,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,oe,re]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",oe,re]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[ue,rr,sn,ca]}],stroke:[{stroke:["none",...I()]}],"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"]}},Qf=(n,{cacheSize:r,prefix:e,experimentalParseClassName:t,extend:o={},override:a={}})=>(or(n,"cacheSize",r),or(n,"prefix",e),or(n,"experimentalParseClassName",t),qr(n.theme,a.theme),qr(n.classGroups,a.classGroups),qr(n.conflictingClassGroups,a.conflictingClassGroups),qr(n.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),or(n,"orderSensitiveModifiers",a.orderSensitiveModifiers),Ur(n.theme,o.theme),Ur(n.classGroups,o.classGroups),Ur(n.conflictingClassGroups,o.conflictingClassGroups),Ur(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Ns(n,o,"orderSensitiveModifiers"),n),or=(n,r,e)=>{e!==void 0&&(n[r]=e)},qr=(n,r)=>{if(r)for(const e in r)or(n,e,r[e])},Ur=(n,r)=>{if(r)for(const e in r)Ns(n,r,e)},Ns=(n,r,e)=>{const t=r[e];t!==void 0&&(n[e]=n[e]?n[e].concat(t):t)},Gf=((n,...r)=>typeof n=="function"?xs(Is,n,...r):xs(()=>Qf(Is(),n),...r))({extend:{classGroups:{"font-style":[{text:["display-large","display-medium","title-large","title-medium","title-small","label-large","label-medium","label-small","body-large","body-medium","body-small","caption-large","caption-medium","caption-small","badge"]}]},conflictingClassGroups:{"font-style":["font-size","font-weight"]}}});function Ze(...n){return Gf(Be(n))}const Kf=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>Y.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:Ze("petnowRadio size-[3.5vw]",n),onChange:t});var da={},fa,Ls;function Fs(){if(Ls)return fa;Ls=1;function n(r){if(r&&r.__esModule)return r;var e={};if(r!=null){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(r,t):{};o.get||o.set?Object.defineProperty(e,t,o):e[t]=r[t]}}return e.default=r,e}return fa=n,fa}var Mt={},pa,$s;function ar(){if($s)return pa;$s=1;function n(r){return r&&r.__esModule?r:{default:r}}return pa=n,pa}var Qr,As;function Xf(){if(As)return Qr;As=1;function n(){return Qr=n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r},n.apply(this,arguments)}return Qr=n,Qr}var ha,Ys;function Jf(){if(Ys)return ha;Ys=1;function n(r,e){if(r==null)return{};var t={},o=Object.keys(r),a,i;for(i=0;i<o.length;i++)a=o[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}return ha=n,ha}var ma,Rs;function Zf(){if(Rs)return ma;Rs=1;var n=Jf();function r(e,t){if(e==null)return{};var o=n(e,t),a,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)a=s[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}return ma=r,ma}var va,js;function ep(){if(js)return va;js=1;function n(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}return va=n,va}var ga,Ws;function tp(){if(Ws)return ga;Ws=1;function n(e,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function r(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}return ga=r,ga}var ir,Hs;function np(){if(Hs)return ir;Hs=1;function n(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n=function(o){return typeof o}:n=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},n(e)}function r(e){return typeof Symbol=="function"&&n(Symbol.iterator)==="symbol"?ir=r=function(o){return n(o)}:ir=r=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":n(o)},r(e)}return ir=r,ir}var ba,Bs;function rp(){if(Bs)return ba;Bs=1;function n(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}return ba=n,ba}var ya,Vs;function op(){if(Vs)return ya;Vs=1;var n=np(),r=rp();function e(t,o){return o&&(n(o)==="object"||typeof o=="function")?o:r(t)}return ya=e,ya}var Gr,zs;function ap(){if(zs)return Gr;zs=1;function n(r){return Gr=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}return Gr=n,Gr}var Kr,qs;function ip(){if(qs)return Kr;qs=1;function n(r,e){return Kr=n=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},n(r,e)}return Kr=n,Kr}var wa,Us;function sp(){if(Us)return wa;Us=1;var n=ip();function r(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}return wa=r,wa}var Xr={exports:{}},Jr={exports:{}},be={};/** @license React v16.13.1
|
|
30
|
+
<%s key={someKey} {...props} />`,xs,An,wD,An),Ff[An+xs]=!0}}return D===t?mD(Ve):hD(Ve),Ve}}function vD(D,z,ee){return Af(D,z,ee,!0)}function gD(D,z,ee){return Af(D,z,ee,!1)}var bD=gD,yD=vD;fr.Fragment=t,fr.jsx=bD,fr.jsxs=yD}()),fr}var ks;function Vf(){return ks||(ks=1,process.env.NODE_ENV==="production"?eo.exports=Hf():eo.exports=Bf()),eo.exports}var R=Vf();function Cs(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=Cs(n[r]))&&(t&&(t+=" "),t+=e)}else for(e in n)n[e]&&(t&&(t+=" "),t+=e);return t}function Qe(){for(var n,r,e=0,t="",o=arguments.length;e<o;e++)(n=arguments[e])&&(r=Cs(n))&&(t&&(t+=" "),t+=r);return t}const ya="-",zf=n=>{const r=Uf(n),{conflictingClassGroups:e,conflictingClassGroupModifiers:t}=n;return{getClassGroupId:i=>{const s=i.split(ya);return s[0]===""&&s.length!==1&&s.shift(),_s(s,r)||qf(i)},getConflictingClassGroupIds:(i,s)=>{const l=e[i]||[];return s&&t[i]?[...l,...t[i]]:l}}},_s=(n,r)=>{var i;if(n.length===0)return r.classGroupId;const e=n[0],t=r.nextPart.get(e),o=t?_s(n.slice(1),t):void 0;if(o)return o;if(r.validators.length===0)return;const a=n.join(ya);return(i=r.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Os=/^\[(.+)\]$/,qf=n=>{if(Os.test(n)){const r=Os.exec(n)[1],e=r==null?void 0:r.substring(0,r.indexOf(":"));if(e)return"arbitrary.."+e}},Uf=n=>{const{theme:r,classGroups:e}=n,t={nextPart:new Map,validators:[]};for(const o in e)wa(e[o],t,o,r);return t},wa=(n,r,e,t)=>{n.forEach(o=>{if(typeof o=="string"){const a=o===""?r:Ms(r,o);a.classGroupId=e;return}if(typeof o=="function"){if(Qf(o)){wa(o(t),r,e,t);return}r.validators.push({validator:o,classGroupId:e});return}Object.entries(o).forEach(([a,i])=>{wa(i,Ms(r,a),e,t)})})},Ms=(n,r)=>{let e=n;return r.split(ya).forEach(t=>{e.nextPart.has(t)||e.nextPart.set(t,{nextPart:new Map,validators:[]}),e=e.nextPart.get(t)}),e},Qf=n=>n.isThemeGetter,Gf=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)}}},xa="!",Ea=":",Kf=Ea.length,Xf=n=>{const{prefix:r,experimentalParseClassName:e}=n;let t=o=>{const a=[];let i=0,s=0,l=0,u;for(let m=0;m<o.length;m++){let v=o[m];if(i===0&&s===0){if(v===Ea){a.push(o.slice(l,m)),l=m+Kf;continue}if(v==="/"){u=m;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}const c=a.length===0?o:o.substring(l),f=Jf(c),h=f!==c,p=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}};if(r){const o=r+Ea,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},Jf=n=>n.endsWith(xa)?n.substring(0,n.length-1):n.startsWith(xa)?n.substring(1):n,Zf=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}},ep=n=>({cache:Gf(n.cacheSize),parseClassName:Xf(n),sortModifiers:Zf(n),...zf(n)}),tp=/\s+/,np=(n,r)=>{const{parseClassName:e,getClassGroupId:t,getConflictingClassGroupIds:o,sortModifiers:a}=r,i=[],s=n.trim().split(tp);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=e(c);if(f){l=c+(l.length>0?" "+l:l);continue}let g=!!v,y=t(g?m.substring(0,v):m);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=t(m),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const E=a(h).join(":"),w=p?E+xa:E,S=w+y;if(i.includes(S))continue;i.push(S);const x=o(y,g);for(let T=0;T<x.length;++T){const N=x[T];i.push(w+N)}l=c+(l.length>0?" "+l:l)}return l};function rp(){let n=0,r,e,t="";for(;n<arguments.length;)(r=arguments[n++])&&(e=Ts(r))&&(t&&(t+=" "),t+=e);return t}const Ts=n=>{if(typeof n=="string")return n;let r,e="";for(let t=0;t<n.length;t++)n[t]&&(r=Ts(n[t]))&&(e&&(e+=" "),e+=r);return e};function Ps(n,...r){let e,t,o,a=i;function i(l){const u=r.reduce((c,f)=>f(c),n());return e=ep(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=np(l,e);return o(l,c),c}return function(){return a(rp.apply(null,arguments))}}const ze=n=>{const r=e=>e[n]||[];return r.isThemeGetter=!0,r},Is=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ns=/^\((?:(\w[\w-]*):)?(.+)\)$/i,op=/^\d+\/\d+$/,ap=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ip=/\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$/,sp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,up=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rn=n=>op.test(n),ue=n=>!!n&&!Number.isNaN(Number(n)),tn=n=>!!n&&Number.isInteger(Number(n)),Da=n=>n.endsWith("%")&&ue(n.slice(0,-1)),Ft=n=>ap.test(n),cp=()=>!0,dp=n=>ip.test(n)&&!sp.test(n),$s=()=>!1,fp=n=>lp.test(n),pp=n=>up.test(n),hp=n=>!re(n)&&!oe(n),mp=n=>Yn(n,Ys,$s),re=n=>Is.test(n),yn=n=>Yn(n,Ws,dp),Sa=n=>Yn(n,wp,ue),Ls=n=>Yn(n,As,$s),vp=n=>Yn(n,Rs,pp),to=n=>Yn(n,js,fp),oe=n=>Ns.test(n),pr=n=>Wn(n,Ws),gp=n=>Wn(n,xp),Fs=n=>Wn(n,As),bp=n=>Wn(n,Ys),yp=n=>Wn(n,Rs),no=n=>Wn(n,js,!0),Yn=(n,r,e)=>{const t=Is.exec(n);return t?t[1]?r(t[1]):e(t[2]):!1},Wn=(n,r,e=!1)=>{const t=Ns.exec(n);return t?t[1]?r(t[1]):e:!1},As=n=>n==="position"||n==="percentage",Rs=n=>n==="image"||n==="url",Ys=n=>n==="length"||n==="size"||n==="bg-size",Ws=n=>n==="length",wp=n=>n==="number",xp=n=>n==="family-name",js=n=>n==="shadow",Hs=()=>{const n=ze("color"),r=ze("font"),e=ze("text"),t=ze("font-weight"),o=ze("tracking"),a=ze("leading"),i=ze("breakpoint"),s=ze("container"),l=ze("spacing"),u=ze("radius"),c=ze("shadow"),f=ze("inset-shadow"),h=ze("text-shadow"),p=ze("drop-shadow"),m=ze("blur"),v=ze("perspective"),g=ze("aspect"),y=ze("ease"),E=ze("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...S(),oe,re],T=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],_=()=>[oe,re,l],O=()=>[Rn,"full","auto",..._()],M=()=>[tn,"none","subgrid",oe,re],L=()=>["auto",{span:["full",tn,oe,re]},tn,oe,re],b=()=>[tn,"auto",oe,re],k=()=>["auto","min","max","fr",oe,re],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",..._()],V=()=>[Rn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],C=()=>[n,oe,re],q=()=>[...S(),Fs,Ls,{position:[oe,re]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",bp,mp,{size:[oe,re]}],G=()=>[Da,pr,yn],j=()=>["","none","full",u,oe,re],F=()=>["",ue,pr,yn],ne=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[ue,Da,Fs,Ls],B=()=>["","none",m,oe,re],K=()=>["none",ue,oe,re],J=()=>["none",ue,oe,re],Ie=()=>[ue,oe,re],Q=()=>[Rn,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ft],breakpoint:[Ft],color:[cp],container:[Ft],"drop-shadow":[Ft],ease:["in","out","in-out"],font:[hp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ft],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ft],shadow:[Ft],spacing:["px",ue],text:[Ft],"text-shadow":[Ft],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Rn,re,oe,g]}],container:["container"],columns:[{columns:[ue,re,oe,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:x()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[tn,"auto",oe,re]}],basis:[{basis:[Rn,"full","auto",s,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,Rn,"auto","initial","none",re]}],grow:[{grow:["",ue,oe,re]}],shrink:[{shrink:["",ue,oe,re]}],order:[{order:[tn,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"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","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",e,pr,yn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,oe,Sa]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Da,re]}],"font-family":[{font:[gp,re,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,oe,re]}],"line-clamp":[{"line-clamp":[ue,"none",oe,Sa]}],leading:[{leading:[a,..._()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",oe,yn]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[ue,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,re]}],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",oe,re]}],"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:P()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tn,oe,re],radial:["",oe,re],conic:[tn,oe,re]},yp,vp]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,oe,re]}],"outline-w":[{outline:["",ue,pr,yn]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",c,no,to]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",f,no,to]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[ue,yn]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,no,to]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[ue,oe,re]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"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":[ue]}],"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":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"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":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"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":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"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":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"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":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"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":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"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":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"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":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"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":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:B()}],brightness:[{brightness:[ue,oe,re]}],contrast:[{contrast:[ue,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",p,no,to]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",ue,oe,re]}],"hue-rotate":[{"hue-rotate":[ue,oe,re]}],invert:[{invert:["",ue,oe,re]}],saturate:[{saturate:[ue,oe,re]}],sepia:[{sepia:["",ue,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[ue,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[ue,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",ue,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[ue,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[ue,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",oe,re]}],ease:[{ease:["linear","initial",y,oe,re]}],delay:[{delay:[ue,oe,re]}],animate:[{animate:["none",E,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,oe,re]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:Ie()}],"skew-x":[{"skew-x":Ie()}],"skew-y":[{"skew-y":Ie()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Q()}],"translate-x":[{"translate-x":Q()}],"translate-y":[{"translate-y":Q()}],"translate-z":[{"translate-z":Q()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"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",oe,re]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[ue,pr,yn,Sa]}],stroke:[{stroke:["none",...C()]}],"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"]}},Ep=(n,{cacheSize:r,prefix:e,experimentalParseClassName:t,extend:o={},override:a={}})=>(hr(n,"cacheSize",r),hr(n,"prefix",e),hr(n,"experimentalParseClassName",t),ro(n.theme,a.theme),ro(n.classGroups,a.classGroups),ro(n.conflictingClassGroups,a.conflictingClassGroups),ro(n.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),hr(n,"orderSensitiveModifiers",a.orderSensitiveModifiers),oo(n.theme,o.theme),oo(n.classGroups,o.classGroups),oo(n.conflictingClassGroups,o.conflictingClassGroups),oo(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Bs(n,o,"orderSensitiveModifiers"),n),hr=(n,r,e)=>{e!==void 0&&(n[r]=e)},ro=(n,r)=>{if(r)for(const e in r)hr(n,e,r[e])},oo=(n,r)=>{if(r)for(const e in r)Bs(n,r,e)},Bs=(n,r,e)=>{const t=r[e];t!==void 0&&(n[e]=n[e]?n[e].concat(t):t)},Dp=((n,...r)=>typeof n=="function"?Ps(Hs,n,...r):Ps(()=>Ep(Hs(),n),...r))({extend:{classGroups:{"font-style":[{text:["display-large","display-medium","title-large","title-medium","title-small","label-large","label-medium","label-small","body-large","body-medium","body-small","caption-large","caption-medium","caption-small","badge"]}]},conflictingClassGroups:{"font-style":["font-size","font-weight"]}}});function ot(...n){return Dp(Qe(n))}const Sp=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>R.jsx("input",{type:"radio",disabled:o,checked:a,id:r,name:e,className:ot("petnowRadio size-[3.5vw]",n),onChange:t});var ka={},Ca,Vs;function zs(){if(Vs)return Ca;Vs=1;function n(r){if(r&&r.__esModule)return r;var e={};if(r!=null){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(r,t):{};o.get||o.set?Object.defineProperty(e,t,o):e[t]=r[t]}}return e.default=r,e}return Ca=n,Ca}var At={},_a,qs;function mr(){if(qs)return _a;qs=1;function n(r){return r&&r.__esModule?r:{default:r}}return _a=n,_a}var ao,Us;function kp(){if(Us)return ao;Us=1;function n(){return ao=n=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r},n.apply(this,arguments)}return ao=n,ao}var Oa,Qs;function Cp(){if(Qs)return Oa;Qs=1;function n(r,e){if(r==null)return{};var t={},o=Object.keys(r),a,i;for(i=0;i<o.length;i++)a=o[i],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}return Oa=n,Oa}var Ma,Gs;function _p(){if(Gs)return Ma;Gs=1;var n=Cp();function r(e,t){if(e==null)return{};var o=n(e,t),a,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)a=s[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}return Ma=r,Ma}var Ta,Ks;function Op(){if(Ks)return Ta;Ks=1;function n(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}return Ta=n,Ta}var Pa,Xs;function Mp(){if(Xs)return Pa;Xs=1;function n(e,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function r(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}return Pa=r,Pa}var vr,Js;function Tp(){if(Js)return vr;Js=1;function n(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n=function(o){return typeof o}:n=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},n(e)}function r(e){return typeof Symbol=="function"&&n(Symbol.iterator)==="symbol"?vr=r=function(o){return n(o)}:vr=r=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":n(o)},r(e)}return vr=r,vr}var Ia,Zs;function Pp(){if(Zs)return Ia;Zs=1;function n(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}return Ia=n,Ia}var Na,el;function Ip(){if(el)return Na;el=1;var n=Tp(),r=Pp();function e(t,o){return o&&(n(o)==="object"||typeof o=="function")?o:r(t)}return Na=e,Na}var io,tl;function Np(){if(tl)return io;tl=1;function n(r){return io=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}return io=n,io}var so,nl;function $p(){if(nl)return so;nl=1;function n(r,e){return so=n=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},n(r,e)}return so=n,so}var $a,rl;function Lp(){if(rl)return $a;rl=1;var n=$p();function r(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}return $a=r,$a}var lo={exports:{}},uo={exports:{}},be={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var ol;function Fp(){if(ol)return be;ol=1;var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,p=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,E=n?Symbol.for("react.scope"):60119;function w(x){if(typeof x=="object"&&x!==null){var T=x.$$typeof;switch(T){case r:switch(x=x.type,x){case l:case u:case t:case a:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case c:case m:case p:case i:return x;default:return T}}case e:return T}}}function S(x){return w(x)===u}return be.AsyncMode=l,be.ConcurrentMode=u,be.ContextConsumer=s,be.ContextProvider=i,be.Element=r,be.ForwardRef=c,be.Fragment=t,be.Lazy=m,be.Memo=p,be.Portal=e,be.Profiler=a,be.StrictMode=o,be.Suspense=f,be.isAsyncMode=function(x){return S(x)||w(x)===l},be.isConcurrentMode=S,be.isContextConsumer=function(x){return w(x)===s},be.isContextProvider=function(x){return w(x)===i},be.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},be.isForwardRef=function(x){return w(x)===c},be.isFragment=function(x){return w(x)===t},be.isLazy=function(x){return w(x)===m},be.isMemo=function(x){return w(x)===p},be.isPortal=function(x){return w(x)===e},be.isProfiler=function(x){return w(x)===a},be.isStrictMode=function(x){return w(x)===o},be.isSuspense=function(x){return w(x)===f},be.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===t||x===u||x===a||x===o||x===f||x===h||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===p||x.$$typeof===i||x.$$typeof===s||x.$$typeof===c||x.$$typeof===g||x.$$typeof===y||x.$$typeof===E||x.$$typeof===v)},be.typeOf=w,be}var ye={};/** @license React v16.13.1
|
|
38
38
|
* react-is.development.js
|
|
39
39
|
*
|
|
40
40
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var
|
|
44
|
+
*/var al;function Ap(){return al||(al=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,e=n?Symbol.for("react.portal"):60106,t=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,p=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,E=n?Symbol.for("react.scope"):60119;function w(Q){return typeof Q=="string"||typeof Q=="function"||Q===t||Q===u||Q===a||Q===o||Q===f||Q===h||typeof Q=="object"&&Q!==null&&(Q.$$typeof===m||Q.$$typeof===p||Q.$$typeof===i||Q.$$typeof===s||Q.$$typeof===c||Q.$$typeof===g||Q.$$typeof===y||Q.$$typeof===E||Q.$$typeof===v)}function S(Q){if(typeof Q=="object"&&Q!==null){var nt=Q.$$typeof;switch(nt){case r:var en=Q.type;switch(en){case l:case u:case t:case a:case o:case f:return en;default:var vt=en&&en.$$typeof;switch(vt){case s:case c:case m:case p:case i:return vt;default:return nt}}case e:return nt}}}var x=l,T=u,N=s,_=i,O=r,M=c,L=t,b=m,k=p,$=e,Y=a,I=o,V=f,C=!1;function q(Q){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(Q)||S(Q)===l}function P(Q){return S(Q)===u}function W(Q){return S(Q)===s}function G(Q){return S(Q)===i}function j(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===r}function F(Q){return S(Q)===c}function ne(Q){return S(Q)===t}function U(Q){return S(Q)===m}function A(Q){return S(Q)===p}function B(Q){return S(Q)===e}function K(Q){return S(Q)===a}function J(Q){return S(Q)===o}function Ie(Q){return S(Q)===f}ye.AsyncMode=x,ye.ConcurrentMode=T,ye.ContextConsumer=N,ye.ContextProvider=_,ye.Element=O,ye.ForwardRef=M,ye.Fragment=L,ye.Lazy=b,ye.Memo=k,ye.Portal=$,ye.Profiler=Y,ye.StrictMode=I,ye.Suspense=V,ye.isAsyncMode=q,ye.isConcurrentMode=P,ye.isContextConsumer=W,ye.isContextProvider=G,ye.isElement=j,ye.isForwardRef=F,ye.isFragment=ne,ye.isLazy=U,ye.isMemo=A,ye.isPortal=B,ye.isProfiler=K,ye.isStrictMode=J,ye.isSuspense=Ie,ye.isValidElementType=w,ye.typeOf=S}()),ye}var il;function sl(){return il||(il=1,process.env.NODE_ENV==="production"?uo.exports=Fp():uo.exports=Ap()),uo.exports}/*
|
|
45
45
|
object-assign
|
|
46
46
|
(c) Sindre Sorhus
|
|
47
47
|
@license MIT
|
|
48
|
-
*/var
|
|
49
|
-
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var U=Pe(A,X,F,ne,q+"."+X,e);if(U)return U}return null}return g(j)}function L(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(L);if(M===null||s(M))return!0;var j=f(M);if(j){var Q=j.call(M),W;if(j!==M.entries){for(;!(W=Q.next()).done;)if(!L(W.value))return!1}else for(;!(W=Q.next()).done;){var F=W.value;if(F&&!L(F[1]))return!1}}else return!1;return!0;default:return!1}}function P(M,j){return M==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function N(M){var j=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":P(j,M)?"symbol":j}function z(M){if(typeof M>"u"||M===null)return""+M;var j=N(M);if(j==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return j}function I(M){var j=z(M);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function te(M){return!M.constructor||!M.constructor.name?h:M.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},_a}var Ca,ol;function pp(){if(ol)return Ca;ol=1;var n=Da();function r(){}function e(){}return e.resetWarningCache=r,Ca=function(){function t(i,s,l,u,c,f){if(f!==n){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}t.isRequired=t;function o(){return t}var a={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:o,element:t,elementType:t,instanceOf:o,node:t,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:e,resetWarningCache:r};return a.PropTypes=a,a},Ca}var al;function hp(){if(al)return Xr.exports;if(al=1,process.env.NODE_ENV!=="production"){var n=Xs(),r=!0;Xr.exports=fp()(n.isElement,r)}else Xr.exports=pp()();return Xr.exports}var Oa,il;function sl(){if(il)return Oa;il=1;var n=process.env.NODE_ENV!=="production",r=function(){};if(n){var e=function(o,a){var i=arguments.length;a=new Array(i>1?i-1:0);for(var s=1;s<i;s++)a[s-1]=arguments[s];var l=0,u="Warning: "+o.replace(/%s/g,function(){return a[l++]});typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}};r=function(t,o,a){var i=arguments.length;a=new Array(i>2?i-2:0);for(var s=2;s<i;s++)a[s-2]=arguments[s];if(o===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||e.apply(null,[o].concat(a))}}return Oa=r,Oa}var Ma={},sr={},ll;function mp(){if(ll)return sr;ll=1;var n=ar();Object.defineProperty(sr,"__esModule",{value:!0}),sr.default=void 0;var r=n(d),e=n(sl()),t=function(i){var s=i.index,l=i.children,u=r.default.Children.count(l);process.env.NODE_ENV!=="production"&&(0,e.default)(s>=0&&s<=u,"react-swipeable-view: the new index: ".concat(s," is out of bounds: [0-").concat(u,"]."))},o=t;return sr.default=o,sr}var Zr={},lr={},ul;function cl(){if(ul)return lr;ul=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.default=void 0;var n={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};return lr.default=n,lr}var dl;function vp(){if(dl)return Zr;dl=1;var n=ar();Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=t;var r=n(d),e=n(cl());function t(o){var a=o.children,i=o.startIndex,s=o.startX,l=o.pageX,u=o.viewLength,c=o.resistance,f=r.default.Children.count(a)-1,h=i+(s-l)/u,p;return c?h<0?h=Math.exp(h*e.default.RESISTANCE_COEF)-1:h>f&&(h=f+1-Math.exp((f-h)*e.default.RESISTANCE_COEF)):h<0?(h=0,p=(h-i)*u+l):h>f&&(h=f,p=(h-i)*u+l),{index:h,startX:p}}return Zr}var ur={},fl;function gp(){if(fl)return ur;fl=1;var n=ar();Object.defineProperty(ur,"__esModule",{value:!0}),ur.default=void 0;var r=n(d),e=function(a,i){var s=!1,l=function(m){return m?m.key:"empty"};if(a.children.length&&i.children.length){var u=r.default.Children.map(a.children,l),c=u[a.index];if(c!=null){var f=r.default.Children.map(i.children,l),h=f[i.index];c===h&&(s=!0)}}return s},t=e;return ur.default=t,ur}var cr={},pl;function bp(){if(pl)return cr;pl=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.default=void 0;function n(e,t){var o=e%t;return o<0?o+t:o}var r=n;return cr.default=r,cr}var hl;function yp(){return hl||(hl=1,function(n){var r=ar();Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"checkIndexBounds",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"computeIndex",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(n,"constant",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"getDisplaySameSlide",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"mod",{enumerable:!0,get:function(){return i.default}});var e=r(mp()),t=r(vp()),o=r(cl()),a=r(gp()),i=r(bp())}(Ma)),Ma}var ml;function wp(){if(ml)return Mt;ml=1;var n=Fs(),r=ar();Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.getDomTreeShapes=w,Mt.findNativeHandler=D,Mt.default=Mt.SwipeableViewsContext=void 0;var e=r(Xf()),t=r(Zf()),o=r(ep()),a=r(tp()),i=r(op()),s=r(ap()),l=r(sp()),u=n(d),c=r(hp()),f=r(sl()),h=yp();function p(C,O,R,b){return C.addEventListener(O,R,b),{remove:function(){C.removeEventListener(O,R,b)}}}var m={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},v={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(O){return"translate(".concat(-O,"%, 0)")},"x-reverse":function(O){return"translate(".concat(O,"%, 0)")},y:function(O){return"translate(0, ".concat(-O,"%)")},"y-reverse":function(O){return"translate(0, ".concat(O,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function g(C,O){var R=O.duration,b=O.easeFunction,S=O.delay;return"".concat(C," ").concat(R," ").concat(b," ").concat(S)}function x(C,O){var R=v.rotationMatrix[O];return{pageX:R.x[0]*C.pageX+R.x[1]*C.pageY,pageY:R.y[0]*C.pageX+R.y[1]*C.pageY}}function E(C){return C.touches=[{pageX:C.pageX,pageY:C.pageY}],C}function w(C,O){for(var R=[];C&&C!==O&&C!==document.body&&!C.hasAttribute("data-swipeable");){var b=window.getComputedStyle(C);b.getPropertyValue("position")==="absolute"||b.getPropertyValue("overflow-x")==="hidden"?R=[]:(C.clientWidth>0&&C.scrollWidth>C.clientWidth||C.clientHeight>0&&C.scrollHeight>C.clientHeight)&&R.push({element:C,scrollWidth:C.scrollWidth,scrollHeight:C.scrollHeight,clientWidth:C.clientWidth,clientHeight:C.clientHeight,scrollLeft:C.scrollLeft,scrollTop:C.scrollTop}),C=C.parentNode}return R}var k=null;function D(C){var O=C.domTreeShapes,R=C.pageX,b=C.startX,S=C.axis;return O.some(function(L){var P=R>=b;(S==="x"||S==="y")&&(P=!P);var N=Math.round(L[v.scrollPosition[S]]),z=N>0,I=N+L[v.clientLength[S]]<L[v.scrollLength[S]];return P&&I||!P&&z?(k=L.element,!0):!1})}var T=u.createContext();Mt.SwipeableViewsContext=T,process.env.NODE_ENV!=="production"&&(T.displayName="SwipeableViewsContext");var $=function(C){(0,l.default)(O,C);function O(R){var b;return(0,o.default)(this,O),b=(0,i.default)(this,(0,s.default)(O).call(this,R)),b.rootNode=null,b.containerNode=null,b.ignoreNextScrollEvents=!1,b.viewLength=0,b.startX=0,b.lastX=0,b.vx=0,b.startY=0,b.isSwiping=void 0,b.started=!1,b.startIndex=0,b.transitionListener=null,b.touchMoveListener=null,b.activeSlide=null,b.indexCurrent=null,b.firstRenderTimeout=null,b.setRootNode=function(S){b.rootNode=S},b.setContainerNode=function(S){b.containerNode=S},b.setActiveSlide=function(S){b.activeSlide=S,b.updateHeight()},b.handleSwipeStart=function(S){var L=b.props.axis,P=x(S.touches[0],L);b.viewLength=b.rootNode.getBoundingClientRect()[v.length[L]],b.startX=P.pageX,b.lastX=P.pageX,b.vx=0,b.startY=P.pageY,b.isSwiping=void 0,b.started=!0;var N=window.getComputedStyle(b.containerNode),z=N.getPropertyValue("-webkit-transform")||N.getPropertyValue("transform");if(z&&z!=="none"){var I=z.split("(")[1].split(")")[0].split(","),te=window.getComputedStyle(b.rootNode),M=x({pageX:parseInt(I[4],10),pageY:parseInt(I[5],10)},L);b.startIndex=-M.pageX/(b.viewLength-parseInt(te.paddingLeft,10)-parseInt(te.paddingRight,10))||0}},b.handleSwipeMove=function(S){if(!b.started){b.handleTouchStart(S);return}if(!(k!==null&&k!==b.rootNode)){var L=b.props,P=L.axis,N=L.children,z=L.ignoreNativeScroll,I=L.onSwitching,te=L.resistance,M=x(S.touches[0],P);if(b.isSwiping===void 0){var j=Math.abs(M.pageX-b.startX),Q=Math.abs(M.pageY-b.startY),W=j>Q&&j>h.constant.UNCERTAINTY_THRESHOLD;if(!te&&(P==="y"||P==="y-reverse")&&(b.indexCurrent===0&&b.startX<M.pageX||b.indexCurrent===u.Children.count(b.props.children)-1&&b.startX>M.pageX)){b.isSwiping=!1;return}if(j>Q&&S.preventDefault(),W===!0||Q>h.constant.UNCERTAINTY_THRESHOLD){b.isSwiping=W,b.startX=M.pageX;return}}if(b.isSwiping===!0){S.preventDefault(),b.vx=b.vx*.5+(M.pageX-b.lastX)*.5,b.lastX=M.pageX;var F=(0,h.computeIndex)({children:N,resistance:te,pageX:M.pageX,startIndex:b.startIndex,startX:b.startX,viewLength:b.viewLength}),ne=F.index,q=F.startX;if(k===null&&!z){var A=w(S.target,b.rootNode),H=D({domTreeShapes:A,startX:b.startX,pageX:M.pageX,axis:P});if(H)return}q?b.startX=q:k===null&&(k=b.rootNode),b.setIndexCurrent(ne);var G=function(){I&&I(ne,"move")};(b.state.displaySameSlide||!b.state.isDragging)&&b.setState({displaySameSlide:!1,isDragging:!0},G),G()}}},b.handleSwipeEnd=function(){if(k=null,!!b.started&&(b.started=!1,b.isSwiping===!0)){var S=b.state.indexLatest,L=b.indexCurrent,P=S-L,N;Math.abs(b.vx)>b.props.threshold?b.vx>0?N=Math.floor(L):N=Math.ceil(L):Math.abs(P)>b.props.hysteresis?N=P>0?Math.floor(L):Math.ceil(L):N=S;var z=u.Children.count(b.props.children)-1;N<0?N=0:N>z&&(N=z),b.setIndexCurrent(N),b.setState({indexLatest:N,isDragging:!1},function(){b.props.onSwitching&&b.props.onSwitching(N,"end"),b.props.onChangeIndex&&N!==S&&b.props.onChangeIndex(N,S,{reason:"swipe"}),L===S&&b.handleTransitionEnd()})}},b.handleTouchStart=function(S){b.props.onTouchStart&&b.props.onTouchStart(S),b.handleSwipeStart(S)},b.handleTouchEnd=function(S){b.props.onTouchEnd&&b.props.onTouchEnd(S),b.handleSwipeEnd(S)},b.handleMouseDown=function(S){b.props.onMouseDown&&b.props.onMouseDown(S),S.persist(),b.handleSwipeStart(E(S))},b.handleMouseUp=function(S){b.props.onMouseUp&&b.props.onMouseUp(S),b.handleSwipeEnd(E(S))},b.handleMouseLeave=function(S){b.props.onMouseLeave&&b.props.onMouseLeave(S),b.started&&b.handleSwipeEnd(E(S))},b.handleMouseMove=function(S){b.props.onMouseMove&&b.props.onMouseMove(S),b.started&&b.handleSwipeMove(E(S))},b.handleScroll=function(S){if(b.props.onScroll&&b.props.onScroll(S),S.target===b.rootNode){if(b.ignoreNextScrollEvents){b.ignoreNextScrollEvents=!1;return}var L=b.state.indexLatest,P=Math.ceil(S.target.scrollLeft/S.target.clientWidth)+L;b.ignoreNextScrollEvents=!0,S.target.scrollLeft=0,b.props.onChangeIndex&&P!==L&&b.props.onChangeIndex(P,L,{reason:"focus"})}},b.updateHeight=function(){if(b.activeSlide!==null){var S=b.activeSlide.children[0];S!==void 0&&S.offsetHeight!==void 0&&b.state.heightLatest!==S.offsetHeight&&b.setState({heightLatest:S.offsetHeight})}},process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(R),b.state={indexLatest:R.index,isDragging:!1,renderOnlyActive:!R.disableLazyLoading,heightLatest:0,displaySameSlide:!0},b.setIndexCurrent(R.index),b}return(0,a.default)(O,[{key:"componentDidMount",value:function(){var b=this;this.transitionListener=p(this.containerNode,"transitionend",function(S){S.target===b.containerNode&&b.handleTransitionEnd()}),this.touchMoveListener=p(this.rootNode,"touchmove",function(S){b.props.disabled||b.handleSwipeMove(S)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){b.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(b){var S=b.index;typeof S=="number"&&S!==this.props.index&&(process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(b),this.setIndexCurrent(S),this.setState({displaySameSlide:(0,h.getDisplaySameSlide)(this.props,b),indexLatest:S}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var b=this;return{slideUpdateHeight:function(){b.updateHeight()}}}},{key:"setIndexCurrent",value:function(b){if(!this.props.animateTransitions&&this.indexCurrent!==b&&this.handleTransitionEnd(),this.indexCurrent=b,this.containerNode){var S=this.props.axis,L=v.transform[S](b*100);this.containerNode.style.WebkitTransform=L,this.containerNode.style.transform=L}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var b=this,S=this.props;S.action;var L=S.animateHeight,P=S.animateTransitions,N=S.axis,z=S.children,I=S.containerStyle,te=S.disabled;S.disableLazyLoading;var M=S.enableMouseEvents;S.hysteresis,S.ignoreNativeScroll,S.index,S.onChangeIndex,S.onSwitching,S.onTransitionEnd,S.resistance;var j=S.slideStyle,Q=S.slideClassName,W=S.springConfig,F=S.style;S.threshold;var ne=(0,t.default)(S,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),q=this.state,A=q.displaySameSlide,H=q.heightLatest,G=q.indexLatest,X=q.isDragging,Pe=q.renderOnlyActive,U=te?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},Xe=!te&&M?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{};process.env.NODE_ENV!=="production"&&(0,f.default)(!L||!I||!I.height,`react-swipeable-view: You are setting animateHeight to true but you are
|
|
48
|
+
*/var La,ll;function Rp(){if(ll)return La;ll=1;var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,e=Object.prototype.propertyIsEnumerable;function t(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},s=0;s<10;s++)i["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return La=o()?Object.assign:function(a,i){for(var s,l=t(a),u,c=1;c<arguments.length;c++){s=Object(arguments[c]);for(var f in s)r.call(s,f)&&(l[f]=s[f]);if(n){u=n(s);for(var h=0;h<u.length;h++)e.call(s,u[h])&&(l[u[h]]=s[u[h]])}}return l},La}var Fa,ul;function Aa(){if(ul)return Fa;ul=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fa=n,Fa}var Ra,cl;function dl(){return cl||(cl=1,Ra=Function.call.bind(Object.prototype.hasOwnProperty)),Ra}var Ya,fl;function Yp(){if(fl)return Ya;fl=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var r=Aa(),e={},t=dl();n=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(a,i,s,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(t(a,c)){var f;try{if(typeof a[c]!="function"){var h=Error((l||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=a[c](i,c,l,s,null,r)}catch(m){f=m}if(f&&!(f instanceof Error)&&n((l||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in e)){e[f.message]=!0;var p=u?u():"";n("Failed "+s+" type: "+f.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(e={})},Ya=o,Ya}var Wa,pl;function Wp(){if(pl)return Wa;pl=1;var n=sl(),r=Rp(),e=Aa(),t=dl(),o=Yp(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return Wa=function(s,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(P){var W=P&&(u&&P[u]||P[c]);if(typeof W=="function")return W}var h="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:w,element:S(),elementType:x(),instanceOf:T,node:M(),objectOf:_,oneOf:N,oneOfType:O,shape:b,exact:k};function m(P,W){return P===W?P!==0||1/P===1/W:P!==P&&W!==W}function v(P,W){this.message=P,this.data=W&&typeof W=="object"?W:{},this.stack=""}v.prototype=Error.prototype;function g(P){if(process.env.NODE_ENV!=="production")var W={},G=0;function j(ne,U,A,B,K,J,Ie){if(B=B||h,J=J||A,Ie!==e){if(l){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var nt=B+":"+A;!W[nt]&&G<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+B+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[nt]=!0,G++)}}return U[A]==null?ne?U[A]===null?new v("The "+K+" `"+J+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new v("The "+K+" `"+J+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:P(U,A,B,K,J)}var F=j.bind(null,!1);return F.isRequired=j.bind(null,!0),F}function y(P){function W(G,j,F,ne,U,A){var B=G[j],K=I(B);if(K!==P){var J=V(B);return new v("Invalid "+ne+" `"+U+"` of type "+("`"+J+"` supplied to `"+F+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return g(W)}function E(){return g(i)}function w(P){function W(G,j,F,ne,U){if(typeof P!="function")return new v("Property `"+U+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var A=G[j];if(!Array.isArray(A)){var B=I(A);return new v("Invalid "+ne+" `"+U+"` of type "+("`"+B+"` supplied to `"+F+"`, expected an array."))}for(var K=0;K<A.length;K++){var J=P(A,K,F,ne,U+"["+K+"]",e);if(J instanceof Error)return J}return null}return g(W)}function S(){function P(W,G,j,F,ne){var U=W[G];if(!s(U)){var A=I(U);return new v("Invalid "+F+" `"+ne+"` of type "+("`"+A+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return g(P)}function x(){function P(W,G,j,F,ne){var U=W[G];if(!n.isValidElementType(U)){var A=I(U);return new v("Invalid "+F+" `"+ne+"` of type "+("`"+A+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return g(P)}function T(P){function W(G,j,F,ne,U){if(!(G[j]instanceof P)){var A=P.name||h,B=q(G[j]);return new v("Invalid "+ne+" `"+U+"` of type "+("`"+B+"` supplied to `"+F+"`, expected ")+("instance of `"+A+"`."))}return null}return g(W)}function N(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function W(G,j,F,ne,U){for(var A=G[j],B=0;B<P.length;B++)if(m(A,P[B]))return null;var K=JSON.stringify(P,function(Ie,Q){var nt=V(Q);return nt==="symbol"?String(Q):Q});return new v("Invalid "+ne+" `"+U+"` of value `"+String(A)+"` "+("supplied to `"+F+"`, expected one of "+K+"."))}return g(W)}function _(P){function W(G,j,F,ne,U){if(typeof P!="function")return new v("Property `"+U+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var A=G[j],B=I(A);if(B!=="object")return new v("Invalid "+ne+" `"+U+"` of type "+("`"+B+"` supplied to `"+F+"`, expected an object."));for(var K in A)if(t(A,K)){var J=P(A,K,F,ne,U+"."+K,e);if(J instanceof Error)return J}return null}return g(W)}function O(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var W=0;W<P.length;W++){var G=P[W];if(typeof G!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(G)+" at index "+W+"."),i}function j(F,ne,U,A,B){for(var K=[],J=0;J<P.length;J++){var Ie=P[J],Q=Ie(F,ne,U,A,B,e);if(Q==null)return null;Q.data&&t(Q.data,"expectedType")&&K.push(Q.data.expectedType)}var nt=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new v("Invalid "+A+" `"+B+"` supplied to "+("`"+U+"`"+nt+"."))}return g(j)}function M(){function P(W,G,j,F,ne){return $(W[G])?null:new v("Invalid "+F+" `"+ne+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return g(P)}function L(P,W,G,j,F){return new v((P||"React class")+": "+W+" type `"+G+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function b(P){function W(G,j,F,ne,U){var A=G[j],B=I(A);if(B!=="object")return new v("Invalid "+ne+" `"+U+"` of type `"+B+"` "+("supplied to `"+F+"`, expected `object`."));for(var K in P){var J=P[K];if(typeof J!="function")return L(F,ne,U,K,V(J));var Ie=J(A,K,F,ne,U+"."+K,e);if(Ie)return Ie}return null}return g(W)}function k(P){function W(G,j,F,ne,U){var A=G[j],B=I(A);if(B!=="object")return new v("Invalid "+ne+" `"+U+"` of type `"+B+"` "+("supplied to `"+F+"`, expected `object`."));var K=r({},G[j],P);for(var J in K){var Ie=P[J];if(t(P,J)&&typeof Ie!="function")return L(F,ne,U,J,V(Ie));if(!Ie)return new v("Invalid "+ne+" `"+U+"` key `"+J+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(G[j],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Q=Ie(A,J,F,ne,U+"."+J,e);if(Q)return Q}return null}return g(W)}function $(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every($);if(P===null||s(P))return!0;var W=f(P);if(W){var G=W.call(P),j;if(W!==P.entries){for(;!(j=G.next()).done;)if(!$(j.value))return!1}else for(;!(j=G.next()).done;){var F=j.value;if(F&&!$(F[1]))return!1}}else return!1;return!0;default:return!1}}function Y(P,W){return P==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function I(P){var W=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":Y(W,P)?"symbol":W}function V(P){if(typeof P>"u"||P===null)return""+P;var W=I(P);if(W==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return W}function C(P){var W=V(P);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function q(P){return!P.constructor||!P.constructor.name?h:P.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},Wa}var ja,hl;function jp(){if(hl)return ja;hl=1;var n=Aa();function r(){}function e(){}return e.resetWarningCache=r,ja=function(){function t(i,s,l,u,c,f){if(f!==n){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}t.isRequired=t;function o(){return t}var a={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:o,element:t,elementType:t,instanceOf:o,node:t,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:e,resetWarningCache:r};return a.PropTypes=a,a},ja}var ml;function Hp(){if(ml)return lo.exports;if(ml=1,process.env.NODE_ENV!=="production"){var n=sl(),r=!0;lo.exports=Wp()(n.isElement,r)}else lo.exports=jp()();return lo.exports}var Ha,vl;function gl(){if(vl)return Ha;vl=1;var n=process.env.NODE_ENV!=="production",r=function(){};if(n){var e=function(o,a){var i=arguments.length;a=new Array(i>1?i-1:0);for(var s=1;s<i;s++)a[s-1]=arguments[s];var l=0,u="Warning: "+o.replace(/%s/g,function(){return a[l++]});typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}};r=function(t,o,a){var i=arguments.length;a=new Array(i>2?i-2:0);for(var s=2;s<i;s++)a[s-2]=arguments[s];if(o===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||e.apply(null,[o].concat(a))}}return Ha=r,Ha}var Ba={},gr={},bl;function Bp(){if(bl)return gr;bl=1;var n=mr();Object.defineProperty(gr,"__esModule",{value:!0}),gr.default=void 0;var r=n(d),e=n(gl()),t=function(i){var s=i.index,l=i.children,u=r.default.Children.count(l);process.env.NODE_ENV!=="production"&&(0,e.default)(s>=0&&s<=u,"react-swipeable-view: the new index: ".concat(s," is out of bounds: [0-").concat(u,"]."))},o=t;return gr.default=o,gr}var co={},br={},yl;function wl(){if(yl)return br;yl=1,Object.defineProperty(br,"__esModule",{value:!0}),br.default=void 0;var n={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};return br.default=n,br}var xl;function Vp(){if(xl)return co;xl=1;var n=mr();Object.defineProperty(co,"__esModule",{value:!0}),co.default=t;var r=n(d),e=n(wl());function t(o){var a=o.children,i=o.startIndex,s=o.startX,l=o.pageX,u=o.viewLength,c=o.resistance,f=r.default.Children.count(a)-1,h=i+(s-l)/u,p;return c?h<0?h=Math.exp(h*e.default.RESISTANCE_COEF)-1:h>f&&(h=f+1-Math.exp((f-h)*e.default.RESISTANCE_COEF)):h<0?(h=0,p=(h-i)*u+l):h>f&&(h=f,p=(h-i)*u+l),{index:h,startX:p}}return co}var yr={},El;function zp(){if(El)return yr;El=1;var n=mr();Object.defineProperty(yr,"__esModule",{value:!0}),yr.default=void 0;var r=n(d),e=function(a,i){var s=!1,l=function(m){return m?m.key:"empty"};if(a.children.length&&i.children.length){var u=r.default.Children.map(a.children,l),c=u[a.index];if(c!=null){var f=r.default.Children.map(i.children,l),h=f[i.index];c===h&&(s=!0)}}return s},t=e;return yr.default=t,yr}var wr={},Dl;function qp(){if(Dl)return wr;Dl=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.default=void 0;function n(e,t){var o=e%t;return o<0?o+t:o}var r=n;return wr.default=r,wr}var Sl;function Up(){return Sl||(Sl=1,function(n){var r=mr();Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"checkIndexBounds",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"computeIndex",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(n,"constant",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"getDisplaySameSlide",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"mod",{enumerable:!0,get:function(){return i.default}});var e=r(Bp()),t=r(Vp()),o=r(wl()),a=r(zp()),i=r(qp())}(Ba)),Ba}var kl;function Qp(){if(kl)return At;kl=1;var n=zs(),r=mr();Object.defineProperty(At,"__esModule",{value:!0}),At.getDomTreeShapes=w,At.findNativeHandler=x,At.default=At.SwipeableViewsContext=void 0;var e=r(kp()),t=r(_p()),o=r(Op()),a=r(Mp()),i=r(Ip()),s=r(Np()),l=r(Lp()),u=n(d),c=r(Hp()),f=r(gl()),h=Up();function p(O,M,L,b){return O.addEventListener(M,L,b),{remove:function(){O.removeEventListener(M,L,b)}}}var m={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},v={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(M){return"translate(".concat(-M,"%, 0)")},"x-reverse":function(M){return"translate(".concat(M,"%, 0)")},y:function(M){return"translate(0, ".concat(-M,"%)")},"y-reverse":function(M){return"translate(0, ".concat(M,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function g(O,M){var L=M.duration,b=M.easeFunction,k=M.delay;return"".concat(O," ").concat(L," ").concat(b," ").concat(k)}function y(O,M){var L=v.rotationMatrix[M];return{pageX:L.x[0]*O.pageX+L.x[1]*O.pageY,pageY:L.y[0]*O.pageX+L.y[1]*O.pageY}}function E(O){return O.touches=[{pageX:O.pageX,pageY:O.pageY}],O}function w(O,M){for(var L=[];O&&O!==M&&O!==document.body&&!O.hasAttribute("data-swipeable");){var b=window.getComputedStyle(O);b.getPropertyValue("position")==="absolute"||b.getPropertyValue("overflow-x")==="hidden"?L=[]:(O.clientWidth>0&&O.scrollWidth>O.clientWidth||O.clientHeight>0&&O.scrollHeight>O.clientHeight)&&L.push({element:O,scrollWidth:O.scrollWidth,scrollHeight:O.scrollHeight,clientWidth:O.clientWidth,clientHeight:O.clientHeight,scrollLeft:O.scrollLeft,scrollTop:O.scrollTop}),O=O.parentNode}return L}var S=null;function x(O){var M=O.domTreeShapes,L=O.pageX,b=O.startX,k=O.axis;return M.some(function($){var Y=L>=b;(k==="x"||k==="y")&&(Y=!Y);var I=Math.round($[v.scrollPosition[k]]),V=I>0,C=I+$[v.clientLength[k]]<$[v.scrollLength[k]];return Y&&C||!Y&&V?(S=$.element,!0):!1})}var T=u.createContext();At.SwipeableViewsContext=T,process.env.NODE_ENV!=="production"&&(T.displayName="SwipeableViewsContext");var N=function(O){(0,l.default)(M,O);function M(L){var b;return(0,o.default)(this,M),b=(0,i.default)(this,(0,s.default)(M).call(this,L)),b.rootNode=null,b.containerNode=null,b.ignoreNextScrollEvents=!1,b.viewLength=0,b.startX=0,b.lastX=0,b.vx=0,b.startY=0,b.isSwiping=void 0,b.started=!1,b.startIndex=0,b.transitionListener=null,b.touchMoveListener=null,b.activeSlide=null,b.indexCurrent=null,b.firstRenderTimeout=null,b.setRootNode=function(k){b.rootNode=k},b.setContainerNode=function(k){b.containerNode=k},b.setActiveSlide=function(k){b.activeSlide=k,b.updateHeight()},b.handleSwipeStart=function(k){var $=b.props.axis,Y=y(k.touches[0],$);b.viewLength=b.rootNode.getBoundingClientRect()[v.length[$]],b.startX=Y.pageX,b.lastX=Y.pageX,b.vx=0,b.startY=Y.pageY,b.isSwiping=void 0,b.started=!0;var I=window.getComputedStyle(b.containerNode),V=I.getPropertyValue("-webkit-transform")||I.getPropertyValue("transform");if(V&&V!=="none"){var C=V.split("(")[1].split(")")[0].split(","),q=window.getComputedStyle(b.rootNode),P=y({pageX:parseInt(C[4],10),pageY:parseInt(C[5],10)},$);b.startIndex=-P.pageX/(b.viewLength-parseInt(q.paddingLeft,10)-parseInt(q.paddingRight,10))||0}},b.handleSwipeMove=function(k){if(!b.started){b.handleTouchStart(k);return}if(!(S!==null&&S!==b.rootNode)){var $=b.props,Y=$.axis,I=$.children,V=$.ignoreNativeScroll,C=$.onSwitching,q=$.resistance,P=y(k.touches[0],Y);if(b.isSwiping===void 0){var W=Math.abs(P.pageX-b.startX),G=Math.abs(P.pageY-b.startY),j=W>G&&W>h.constant.UNCERTAINTY_THRESHOLD;if(!q&&(Y==="y"||Y==="y-reverse")&&(b.indexCurrent===0&&b.startX<P.pageX||b.indexCurrent===u.Children.count(b.props.children)-1&&b.startX>P.pageX)){b.isSwiping=!1;return}if(W>G&&k.preventDefault(),j===!0||G>h.constant.UNCERTAINTY_THRESHOLD){b.isSwiping=j,b.startX=P.pageX;return}}if(b.isSwiping===!0){k.preventDefault(),b.vx=b.vx*.5+(P.pageX-b.lastX)*.5,b.lastX=P.pageX;var F=(0,h.computeIndex)({children:I,resistance:q,pageX:P.pageX,startIndex:b.startIndex,startX:b.startX,viewLength:b.viewLength}),ne=F.index,U=F.startX;if(S===null&&!V){var A=w(k.target,b.rootNode),B=x({domTreeShapes:A,startX:b.startX,pageX:P.pageX,axis:Y});if(B)return}U?b.startX=U:S===null&&(S=b.rootNode),b.setIndexCurrent(ne);var K=function(){C&&C(ne,"move")};(b.state.displaySameSlide||!b.state.isDragging)&&b.setState({displaySameSlide:!1,isDragging:!0},K),K()}}},b.handleSwipeEnd=function(){if(S=null,!!b.started&&(b.started=!1,b.isSwiping===!0)){var k=b.state.indexLatest,$=b.indexCurrent,Y=k-$,I;Math.abs(b.vx)>b.props.threshold?b.vx>0?I=Math.floor($):I=Math.ceil($):Math.abs(Y)>b.props.hysteresis?I=Y>0?Math.floor($):Math.ceil($):I=k;var V=u.Children.count(b.props.children)-1;I<0?I=0:I>V&&(I=V),b.setIndexCurrent(I),b.setState({indexLatest:I,isDragging:!1},function(){b.props.onSwitching&&b.props.onSwitching(I,"end"),b.props.onChangeIndex&&I!==k&&b.props.onChangeIndex(I,k,{reason:"swipe"}),$===k&&b.handleTransitionEnd()})}},b.handleTouchStart=function(k){b.props.onTouchStart&&b.props.onTouchStart(k),b.handleSwipeStart(k)},b.handleTouchEnd=function(k){b.props.onTouchEnd&&b.props.onTouchEnd(k),b.handleSwipeEnd(k)},b.handleMouseDown=function(k){b.props.onMouseDown&&b.props.onMouseDown(k),k.persist(),b.handleSwipeStart(E(k))},b.handleMouseUp=function(k){b.props.onMouseUp&&b.props.onMouseUp(k),b.handleSwipeEnd(E(k))},b.handleMouseLeave=function(k){b.props.onMouseLeave&&b.props.onMouseLeave(k),b.started&&b.handleSwipeEnd(E(k))},b.handleMouseMove=function(k){b.props.onMouseMove&&b.props.onMouseMove(k),b.started&&b.handleSwipeMove(E(k))},b.handleScroll=function(k){if(b.props.onScroll&&b.props.onScroll(k),k.target===b.rootNode){if(b.ignoreNextScrollEvents){b.ignoreNextScrollEvents=!1;return}var $=b.state.indexLatest,Y=Math.ceil(k.target.scrollLeft/k.target.clientWidth)+$;b.ignoreNextScrollEvents=!0,k.target.scrollLeft=0,b.props.onChangeIndex&&Y!==$&&b.props.onChangeIndex(Y,$,{reason:"focus"})}},b.updateHeight=function(){if(b.activeSlide!==null){var k=b.activeSlide.children[0];k!==void 0&&k.offsetHeight!==void 0&&b.state.heightLatest!==k.offsetHeight&&b.setState({heightLatest:k.offsetHeight})}},process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(L),b.state={indexLatest:L.index,isDragging:!1,renderOnlyActive:!L.disableLazyLoading,heightLatest:0,displaySameSlide:!0},b.setIndexCurrent(L.index),b}return(0,a.default)(M,[{key:"componentDidMount",value:function(){var b=this;this.transitionListener=p(this.containerNode,"transitionend",function(k){k.target===b.containerNode&&b.handleTransitionEnd()}),this.touchMoveListener=p(this.rootNode,"touchmove",function(k){b.props.disabled||b.handleSwipeMove(k)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){b.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(b){var k=b.index;typeof k=="number"&&k!==this.props.index&&(process.env.NODE_ENV!=="production"&&(0,h.checkIndexBounds)(b),this.setIndexCurrent(k),this.setState({displaySameSlide:(0,h.getDisplaySameSlide)(this.props,b),indexLatest:k}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var b=this;return{slideUpdateHeight:function(){b.updateHeight()}}}},{key:"setIndexCurrent",value:function(b){if(!this.props.animateTransitions&&this.indexCurrent!==b&&this.handleTransitionEnd(),this.indexCurrent=b,this.containerNode){var k=this.props.axis,$=v.transform[k](b*100);this.containerNode.style.WebkitTransform=$,this.containerNode.style.transform=$}}},{key:"handleTransitionEnd",value:function(){this.props.onTransitionEnd&&(this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd())}},{key:"render",value:function(){var b=this,k=this.props;k.action;var $=k.animateHeight,Y=k.animateTransitions,I=k.axis,V=k.children,C=k.containerStyle,q=k.disabled;k.disableLazyLoading;var P=k.enableMouseEvents;k.hysteresis,k.ignoreNativeScroll,k.index,k.onChangeIndex,k.onSwitching,k.onTransitionEnd,k.resistance;var W=k.slideStyle,G=k.slideClassName,j=k.springConfig,F=k.style;k.threshold;var ne=(0,t.default)(k,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),U=this.state,A=U.displaySameSlide,B=U.heightLatest,K=U.indexLatest,J=U.isDragging,Ie=U.renderOnlyActive,Q=q?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},nt=!q&&P?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{};process.env.NODE_ENV!=="production"&&(0,f.default)(!$||!C||!C.height,`react-swipeable-view: You are setting animateHeight to true but you are
|
|
50
50
|
also providing a custom height.
|
|
51
51
|
The custom height has a higher priority than the animateHeight property.
|
|
52
|
-
So animateHeight is most likely having no effect at all.`);var
|
|
53
|
-
We are expecting a valid React Element`));var Jn,oa=!0;return ra===G&&(oa=!1,L&&(Jn=b.setActiveSlide,zt.overflowY="hidden")),u.createElement("div",{ref:Jn,style:zt,className:Q,"aria-hidden":oa,"data-swipeable":"true"},Wr)}))))}}]),O}(u.Component);$.displayName="ReactSwipableView",$.propTypes=process.env.NODE_ENV!=="production"?{action:c.default.func,animateHeight:c.default.bool,animateTransitions:c.default.bool,axis:c.default.oneOf(["x","x-reverse","y","y-reverse"]),children:c.default.node.isRequired,containerStyle:c.default.object,disabled:c.default.bool,disableLazyLoading:c.default.bool,enableMouseEvents:c.default.bool,hysteresis:c.default.number,ignoreNativeScroll:c.default.bool,index:c.default.number,onChangeIndex:c.default.func,onMouseDown:c.default.func,onMouseLeave:c.default.func,onMouseMove:c.default.func,onMouseUp:c.default.func,onScroll:c.default.func,onSwitching:c.default.func,onTouchEnd:c.default.func,onTouchMove:c.default.func,onTouchStart:c.default.func,onTransitionEnd:c.default.func,resistance:c.default.bool,slideClassName:c.default.string,slideStyle:c.default.object,springConfig:c.default.shape({delay:c.default.string,duration:c.default.string,easeFunction:c.default.string}),style:c.default.object,threshold:c.default.number}:{},$.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var _=$;return Mt.default=_,Mt}var vl;function xp(){return vl||(vl=1,function(n){var r=Fs();Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"SwipeableViewsContext",{enumerable:!0,get:function(){return e.SwipeableViewsContext}});var e=r(wp())}(da)),da}var Ep=xp();const Dp=pf(Ep),Sp=({className:n,tabList:r,isCuratedcontent:e,unswipeableContent:t,defaultIndex:o=0,onTabChange:a,disabled:i,allowScrollToSection:s=!0})=>{const[l,u]=d.useState(o),c=d.useRef(null),f=m=>{m.current&&window.scrollTo({top:m.current.offsetTop-50,behavior:"smooth"})},h=m=>{u(m),s&&f(c),a==null||a(m)},p=()=>{const v=100/r.length;return{width:`${v}%`,left:`${l*v}%`}};return Y.jsxs("div",{ref:c,className:"w-full",children:[Y.jsxs("div",{className:Ze(n==null?void 0:n.tab,`z-50 mb-[20px] flex w-full flex-col bg-white ${e&&"sticky top-[50px]"}`),children:[Y.jsx("div",{className:"flex",children:r.map((m,v)=>Y.jsx("div",{className:"flex flex-1 flex-col",children:Y.jsx("button",{className:Ze(n==null?void 0:n.tabTitle,`cursor-pointer ${l===v?"text-petnow-grey-30 text-label-large":"text-petnow-grey-70 text-body-large disabled:opacity-40"}`),onClick:()=>h(v),disabled:i,children:m.displayName})},m.key))}),Y.jsx("div",{className:Ze(n==null?void 0:n.underline,`relative h-[2px] w-full ${i?"bg-petnow-grey-70/40":"bg-petnow-grey-70"}`),children:Y.jsx("div",{className:Ze(n==null?void 0:n.selectedUnderline,"bg-petnow-grey-30 absolute h-[2px] transition-all duration-200"),style:p()})})]}),t,Y.jsx(Dp,{index:l,onChangeIndex:m=>{u(m),a==null||a(m)},disabled:i,children:r.map(m=>Y.jsx("div",{children:m.content},m.key))})]})},kp=({className:n,id:r,onChange:e,disabled:t,isChecked:o})=>Y.jsxs("label",{className:"relative flex h-min w-min cursor-pointer items-center rounded-full",htmlFor:r,children:[Y.jsx("input",{type:"checkbox",disabled:t,className:Ze(n,"before:content[''] peer bg-petnow-grey-primary checked:border-petnow-orange-primary checked:bg-petnow-orange-primary checked:before:bg-petnow-orange-primary border-petnow-grey-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-6 before:w-6 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity"),id:r,checked:o,onChange:a=>{e(a.target.checked)}}),Y.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:Y.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:Y.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"})})})]}),_p=({className:n,text:r,isSelected:e,onClick:t,disabled:o})=>Y.jsx("button",{className:Ze(n,`keen-slider__slide text-body-medium rounded-full border-1 px-[12px] py-[6px] whitespace-nowrap ${e?"border-petnow-orange-primary bg-petnow-orange-secondary text-petnow-orange-primary":"border-petnow-grey-90 disabled:opacity-40"}`),onClick:t,style:{width:"min-content",minWidth:"fit-content"},disabled:o,children:r}),gl=typeof document<"u"?d.useLayoutEffect:()=>{};function Cp(n){const r=d.useRef(null);return gl(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const Ut=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},ln=n=>n&&"window"in n&&n.window===n?n:Ut(n).defaultView||window;function Op(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function Mp(n){return Op(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let Tp=!1;function Ta(){return Tp}function bl(n,r){if(!Ta())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:Mp(e)?e=e.host:e=e.parentNode}return!1}const Pa=(n=document)=>{var r;if(!Ta())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 yl(n){return Ta()&&n.target.shadowRoot&&n.composedPath?n.composedPath()[0]:n.target}function eo(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 Ia(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 Tt(n){if(process.env.NODE_ENV==="test")return n;let r=null;return()=>(r==null&&(r=n()),r)}const Na=Tt(function(){return Ia(/^Mac/i)}),Pp=Tt(function(){return Ia(/^iPhone/i)}),Ip=Tt(function(){return Ia(/^iPad/i)||Na()&&navigator.maxTouchPoints>1}),Np=Tt(function(){return Pp()||Ip()});Tt(function(){return Na()||Np()}),Tt(function(){return eo(/AppleWebKit/i)&&!Lp()});const Lp=Tt(function(){return eo(/Chrome/i)}),Fp=Tt(function(){return eo(/Android/i)});Tt(function(){return eo(/Firefox/i)});function wl(){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 $p(n){return n.mozInputSource===0&&n.isTrusted?!0:Fp()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function xl(n){let r=n;return r.nativeEvent=n,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function Ap(n,r){Object.defineProperty(n,"target",{value:r}),Object.defineProperty(n,"currentTarget",{value:r})}function El(n){let r=d.useRef({isFocused:!1,observer:null});gl(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=Cp(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=xl(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 Yp=!1,dr=null,La=new Set,fr=new Map,un=!1,Fa=!1;const Rp={Tab:!0,Escape:!0};function $a(n,r){for(let e of La)e(n,r)}function jp(n){return!(n.metaKey||!Na()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function to(n){un=!0,jp(n)&&(dr="keyboard",$a("keyboard",n))}function nt(n){dr="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(un=!0,$a("pointer",n))}function Dl(n){$p(n)&&(un=!0,dr="virtual")}function Sl(n){n.target===window||n.target===document||Yp||!n.isTrusted||(!un&&!Fa&&(dr="virtual",$a("virtual",n)),un=!1,Fa=!1)}function kl(){un=!1,Fa=!0}function Aa(n){if(typeof window>"u"||fr.get(ln(n)))return;const r=ln(n),e=Ut(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){un=!0,t.apply(this,arguments)},e.addEventListener("keydown",to,!0),e.addEventListener("keyup",to,!0),e.addEventListener("click",Dl,!0),r.addEventListener("focus",Sl,!0),r.addEventListener("blur",kl,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",nt,!0),e.addEventListener("pointermove",nt,!0),e.addEventListener("pointerup",nt,!0)):process.env.NODE_ENV==="test"&&(e.addEventListener("mousedown",nt,!0),e.addEventListener("mousemove",nt,!0),e.addEventListener("mouseup",nt,!0)),r.addEventListener("beforeunload",()=>{_l(n)},{once:!0}),fr.set(r,{focus:t})}const _l=(n,r)=>{const e=ln(n),t=Ut(n);r&&t.removeEventListener("DOMContentLoaded",r),fr.has(e)&&(e.HTMLElement.prototype.focus=fr.get(e).focus,t.removeEventListener("keydown",to,!0),t.removeEventListener("keyup",to,!0),t.removeEventListener("click",Dl,!0),e.removeEventListener("focus",Sl,!0),e.removeEventListener("blur",kl,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",nt,!0),t.removeEventListener("pointermove",nt,!0),t.removeEventListener("pointerup",nt,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",nt,!0),t.removeEventListener("mousemove",nt,!0),t.removeEventListener("mouseup",nt,!0)),fr.delete(e))};function Wp(n){const r=Ut(n);let e;return r.readyState!=="loading"?Aa(n):(e=()=>{Aa(n)},r.addEventListener("DOMContentLoaded",e)),()=>_l(n,e)}typeof document<"u"&&Wp();function Cl(){return dr!=="pointer"}const Hp=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Bp(n,r,e){let t=Ut(e==null?void 0:e.target);const o=typeof window<"u"?ln(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?ln(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?ln(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?ln(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||t.activeElement instanceof o&&!Hp.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(n&&r==="keyboard"&&e instanceof s&&!Rp[e.key])}function Vp(n,r,e){Aa(),d.useEffect(()=>{let t=(o,a)=>{Bp(!!(e!=null&&e.isTextInput),o,a)&&n(Cl())};return La.add(t),()=>{La.delete(t)}},r)}function zp(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=El(a),s=d.useCallback(l=>{const u=Ut(l.target),c=u?Pa(u):Pa();l.target===l.currentTarget&&c===yl(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 qp(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=wl(),l=d.useCallback(f=>{f.currentTarget.contains(f.target)&&a.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(a.current.isFocusWithin=!1,s(),e&&e(f),o&&o(!1))},[e,o,a,s]),u=El(l),c=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=Ut(f.target),p=Pa(h);if(!a.current.isFocusWithin&&p===yl(f.nativeEvent)){t&&t(f),o&&o(!0),a.current.isFocusWithin=!0,u(f);let m=f.currentTarget;i(h,"focus",v=>{if(a.current.isFocusWithin&&!bl(m,v.target)){let g=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});Ap(g,m);let x=xl(g);l(x)}},{capture:!0})}},[t,o,u,i,l]);return r?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}let no=!1,Ya=0;function Ra(){no=!0,setTimeout(()=>{no=!1},50)}function Ol(n){n.pointerType==="touch"&&Ra()}function Up(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Ol):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ra),Ya++,()=>{Ya--,!(Ya>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ol):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ra))}}function ja(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(Up,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=wl(),{hoverProps:c,triggerHoverEnd:f}=d.useMemo(()=>{let h=(v,g)=>{if(s.pointerType=g,o||g==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let x=v.currentTarget;s.target=x,l(Ut(v.target),"pointerover",E=>{s.isHovered&&s.target&&!bl(s.target,E.target)&&p(E,E.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:x,pointerType:g}),e&&e(!0),i(!0)},p=(v,g)=>{let x=s.target;s.pointerType="",s.target=null,!(g==="touch"||!s.isHovered||!x)&&(s.isHovered=!1,u(),t&&t({type:"hoverend",target:x,pointerType:g}),e&&e(!1),i(!1))},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=v=>{no&&v.pointerType==="mouse"||h(v,v.pointerType)},m.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(m.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!no&&h(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,"mouse")}),{hoverProps:m,triggerHoverEnd:p}},[r,e,t,o,s,l,u]);return d.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}function Wa(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||Cl()}),[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(p=>{o.current.isFocused=p,i(p),u()},[u]);Vp(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:e});let{focusProps:f}=zp({isDisabled:t,onFocusChange:c}),{focusWithinProps:h}=qp({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?h:f}}var Qp=Object.defineProperty,Gp=(n,r,e)=>r in n?Qp(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Ha=(n,r,e)=>(Gp(n,typeof r!="symbol"?r+"":r,e),e);let Kp=class{constructor(){Ha(this,"current",this.detect()),Ha(this,"handoffState","pending"),Ha(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"}},cn=new Kp;function dn(n){var r,e;return cn.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 ro(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function rt(){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 ro(()=>{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=rt();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 Qt(){let[n]=d.useState(rt);return d.useEffect(()=>()=>n.dispose(),[n]),n}let fe=(n,r)=>{cn.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function Pt(n){let r=d.useRef(n);return fe(()=>{r.current=n},[n]),r}let ee=function(n){let r=Pt(n);return d.useCallback((...e)=>r.current(...e),[r])};function Xp(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 Jp(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function Ml({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=Qt(),a=ee(()=>{r.current=null,t(!1),o.dispose()}),i=ee(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=dn(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",u=>{if(r.current){let c=Xp(u);t(Jp(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Zp=d.createContext(void 0);function oo(){return d.useContext(Zp)}function Ba(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Le(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,Le),t}var Gt=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(Gt||{}),Kt=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(Kt||{});function Me(){let n=th();return d.useCallback(r=>eh({mergeRefs:n,...r}),[n])}function eh({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??nh;let l=Tl(r,n);if(a)return ao(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return ao(f,e,t,i,s)}if(u&1){let{unmount:c=!0,...f}=l;return Le(c?0:1,{0(){return null},1(){return ao({...f,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return ao(l,e,t,i,s)}function ao(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=Va(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 f={};if(r){let h=!1,p=[];for(let[m,v]of Object.entries(r))typeof v=="boolean"&&(h=!0),v===!0&&p.push(m.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let m of p)f[`data-${m}`]=""}}if(a===d.Fragment&&(Object.keys(Xt(l)).length>0||Object.keys(Xt(f)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(Xt(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(Xt(l)).concat(Object.keys(Xt(f))).map(h=>` - ${h}`).join(`
|
|
52
|
+
So animateHeight is most likely having no effect at all.`);var en=(0,e.default)({},m.slide,W),vt,Lt;if(J||!Y||A)vt="all 0s ease 0s",Lt="all 0s ease 0s";else if(vt=g("transform",j),Lt=g("-webkit-transform",j),B!==0){var Jr=", ".concat(g("height",j));vt+=Jr,Lt+=Jr}var Ln={height:null,WebkitFlexDirection:v.flexDirection[I],flexDirection:v.flexDirection[I],WebkitTransition:Lt,transition:vt};if(!Ie){var Fn=v.transform[I](this.indexCurrent*100);Ln.WebkitTransform=Fn,Ln.transform=Fn}return $&&(Ln.height=B),u.createElement(T.Provider,{value:this.getSwipeableViewsContext()},u.createElement("div",(0,e.default)({ref:this.setRootNode,style:(0,e.default)({},v.root[I],F)},ne,Q,nt,{onScroll:this.handleScroll}),u.createElement("div",{ref:this.setContainerNode,style:(0,e.default)({},Ln,m.container,C),className:"react-swipeable-view-container"},u.Children.map(V,function(Zr,ga){if(Ie&&ga!==K)return null;process.env.NODE_ENV!=="production"&&(0,f.default)(u.isValidElement(Zr),"react-swipeable-view: one of the children provided is invalid: ".concat(Zr,`.
|
|
53
|
+
We are expecting a valid React Element`));var sr,ba=!0;return ga===K&&(ba=!1,$&&(sr=b.setActiveSlide,en.overflowY="hidden")),u.createElement("div",{ref:sr,style:en,className:G,"aria-hidden":ba,"data-swipeable":"true"},Zr)}))))}}]),M}(u.Component);N.displayName="ReactSwipableView",N.propTypes=process.env.NODE_ENV!=="production"?{action:c.default.func,animateHeight:c.default.bool,animateTransitions:c.default.bool,axis:c.default.oneOf(["x","x-reverse","y","y-reverse"]),children:c.default.node.isRequired,containerStyle:c.default.object,disabled:c.default.bool,disableLazyLoading:c.default.bool,enableMouseEvents:c.default.bool,hysteresis:c.default.number,ignoreNativeScroll:c.default.bool,index:c.default.number,onChangeIndex:c.default.func,onMouseDown:c.default.func,onMouseLeave:c.default.func,onMouseMove:c.default.func,onMouseUp:c.default.func,onScroll:c.default.func,onSwitching:c.default.func,onTouchEnd:c.default.func,onTouchMove:c.default.func,onTouchStart:c.default.func,onTransitionEnd:c.default.func,resistance:c.default.bool,slideClassName:c.default.string,slideStyle:c.default.object,springConfig:c.default.shape({delay:c.default.string,duration:c.default.string,easeFunction:c.default.string}),style:c.default.object,threshold:c.default.number}:{},N.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var _=N;return At.default=_,At}var Cl;function Gp(){return Cl||(Cl=1,function(n){var r=zs();Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(n,"SwipeableViewsContext",{enumerable:!0,get:function(){return e.SwipeableViewsContext}});var e=r(Qp())}(ka)),ka}var Kp=Gp();const Xp=jf(Kp),Jp=({className:n,tabList:r,isCuratedcontent:e,unswipeableContent:t,defaultIndex:o=0,onTabChange:a,disabled:i,allowScrollToSection:s=!0})=>{const[l,u]=d.useState(o),c=d.useRef(null),f=m=>{m.current&&window.scrollTo({top:m.current.offsetTop-50,behavior:"smooth"})},h=m=>{u(m),s&&f(c),a==null||a(m)},p=()=>{const v=100/r.length;return{width:`${v}%`,left:`${l*v}%`}};return R.jsxs("div",{ref:c,className:"w-full",children:[R.jsxs("div",{className:ot(n==null?void 0:n.tab,`z-50 mb-[20px] flex w-full flex-col bg-white ${e&&"sticky top-[50px]"}`),children:[R.jsx("div",{className:"flex",children:r.map((m,v)=>R.jsx("div",{className:"flex flex-1 flex-col",children:R.jsx("button",{className:ot(n==null?void 0:n.tabTitle,`cursor-pointer ${l===v?"text-petnow-grey-30 text-label-large":"text-petnow-grey-70 text-body-large disabled:opacity-40"}`),onClick:()=>h(v),disabled:i,children:m.displayName})},m.key))}),R.jsx("div",{className:ot(n==null?void 0:n.underline,`relative h-[2px] w-full ${i?"bg-petnow-grey-70/40":"bg-petnow-grey-70"}`),children:R.jsx("div",{className:ot(n==null?void 0:n.selectedUnderline,"bg-petnow-grey-30 absolute h-[2px] transition-all duration-200"),style:p()})})]}),t,R.jsx(Xp,{index:l,onChangeIndex:m=>{u(m),a==null||a(m)},disabled:i,children:r.map(m=>R.jsx("div",{children:m.content},m.key))})]})},Zp=({className:n,id:r,onChange:e,disabled:t,isChecked:o})=>R.jsxs("label",{className:"relative flex h-min w-min cursor-pointer items-center rounded-full",htmlFor:r,children:[R.jsx("input",{type:"checkbox",disabled:t,className:ot(n,"before:content[''] peer bg-petnow-grey-primary checked:border-petnow-orange-primary checked:bg-petnow-orange-primary checked:before:bg-petnow-orange-primary border-petnow-grey-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-6 before:w-6 before:-translate-x-2/4 before:-translate-y-2/4 before:rounded-full before:opacity-0 before:transition-opacity"),id:r,checked:o,onChange:a=>{e(a.target.checked)}}),R.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:R.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:R.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"})})})]}),eh=({className:n,text:r,isSelected:e,onClick:t,disabled:o})=>R.jsx("button",{className:ot(n,`keen-slider__slide text-body-medium rounded-full border-1 px-[12px] py-[6px] whitespace-nowrap ${e?"border-petnow-orange-primary bg-petnow-orange-secondary text-petnow-orange-primary":"border-petnow-grey-90 disabled:opacity-40"}`),onClick:t,style:{width:"min-content",minWidth:"fit-content"},disabled:o,children:r}),_l=typeof document<"u"?d.useLayoutEffect:()=>{};var Va;const th=(Va=d.useInsertionEffect)!==null&&Va!==void 0?Va:_l;function nh(n){const r=d.useRef(null);return th(()=>{r.current=n},[n]),d.useCallback((...e)=>{const t=r.current;return t==null?void 0:t(...e)},[])}const nn=n=>{var r;return(r=n==null?void 0:n.ownerDocument)!==null&&r!==void 0?r:document},wn=n=>n&&"window"in n&&n.window===n?n:nn(n).defaultView||window;function rh(n){return n!==null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}function oh(n){return rh(n)&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in n}let ah=!1;function za(){return ah}function Ol(n,r){if(!za())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:oh(e)?e=e.host:e=e.parentNode}return!1}const qa=(n=document)=>{var r;if(!za())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 Ml(n){return za()&&n.target.shadowRoot&&n.composedPath?n.composedPath()[0]:n.target}function fo(n){var r;if(typeof window>"u"||window.navigator==null)return!1;let e=(r=window.navigator.userAgentData)===null||r===void 0?void 0:r.brands;return Array.isArray(e)&&e.some(t=>n.test(t.brand))||n.test(window.navigator.userAgent)}function Ua(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 Rt(n){if(process.env.NODE_ENV==="test")return n;let r=null;return()=>(r==null&&(r=n()),r)}const Qa=Rt(function(){return Ua(/^Mac/i)}),ih=Rt(function(){return Ua(/^iPhone/i)}),sh=Rt(function(){return Ua(/^iPad/i)||Qa()&&navigator.maxTouchPoints>1}),lh=Rt(function(){return ih()||sh()});Rt(function(){return Qa()||lh()}),Rt(function(){return fo(/AppleWebKit/i)&&!uh()});const uh=Rt(function(){return fo(/Chrome/i)}),ch=Rt(function(){return fo(/Android/i)});Rt(function(){return fo(/Firefox/i)});function Tl(){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 dh(n){return n.mozInputSource===0&&n.isTrusted?!0:ch()&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function Pl(n){let r=n;return r.nativeEvent=n,r.isDefaultPrevented=()=>r.defaultPrevented,r.isPropagationStopped=()=>r.cancelBubble,r.persist=()=>{},r}function fh(n,r){Object.defineProperty(n,"target",{value:r}),Object.defineProperty(n,"currentTarget",{value:r})}function Il(n){let r=d.useRef({isFocused:!1,observer:null});_l(()=>{const t=r.current;return()=>{t.observer&&(t.observer.disconnect(),t.observer=null)}},[]);let e=nh(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=Pl(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 ph=!1,xr=null,Ga=new Set,Er=new Map,xn=!1,Ka=!1;const hh={Tab:!0,Escape:!0};function Xa(n,r){for(let e of Ga)e(n,r)}function mh(n){return!(n.metaKey||!Qa()&&n.altKey||n.ctrlKey||n.key==="Control"||n.key==="Shift"||n.key==="Meta")}function po(n){xn=!0,mh(n)&&(xr="keyboard",Xa("keyboard",n))}function lt(n){xr="pointer",(n.type==="mousedown"||n.type==="pointerdown")&&(xn=!0,Xa("pointer",n))}function Nl(n){dh(n)&&(xn=!0,xr="virtual")}function $l(n){n.target===window||n.target===document||ph||!n.isTrusted||(!xn&&!Ka&&(xr="virtual",Xa("virtual",n)),xn=!1,Ka=!1)}function Ll(){xn=!1,Ka=!0}function Ja(n){if(typeof window>"u"||typeof document>"u"||Er.get(wn(n)))return;const r=wn(n),e=nn(n);let t=r.HTMLElement.prototype.focus;r.HTMLElement.prototype.focus=function(){xn=!0,t.apply(this,arguments)},e.addEventListener("keydown",po,!0),e.addEventListener("keyup",po,!0),e.addEventListener("click",Nl,!0),r.addEventListener("focus",$l,!0),r.addEventListener("blur",Ll,!1),typeof PointerEvent<"u"?(e.addEventListener("pointerdown",lt,!0),e.addEventListener("pointermove",lt,!0),e.addEventListener("pointerup",lt,!0)):process.env.NODE_ENV==="test"&&(e.addEventListener("mousedown",lt,!0),e.addEventListener("mousemove",lt,!0),e.addEventListener("mouseup",lt,!0)),r.addEventListener("beforeunload",()=>{Fl(n)},{once:!0}),Er.set(r,{focus:t})}const Fl=(n,r)=>{const e=wn(n),t=nn(n);r&&t.removeEventListener("DOMContentLoaded",r),Er.has(e)&&(e.HTMLElement.prototype.focus=Er.get(e).focus,t.removeEventListener("keydown",po,!0),t.removeEventListener("keyup",po,!0),t.removeEventListener("click",Nl,!0),e.removeEventListener("focus",$l,!0),e.removeEventListener("blur",Ll,!1),typeof PointerEvent<"u"?(t.removeEventListener("pointerdown",lt,!0),t.removeEventListener("pointermove",lt,!0),t.removeEventListener("pointerup",lt,!0)):process.env.NODE_ENV==="test"&&(t.removeEventListener("mousedown",lt,!0),t.removeEventListener("mousemove",lt,!0),t.removeEventListener("mouseup",lt,!0)),Er.delete(e))};function vh(n){const r=nn(n);let e;return r.readyState!=="loading"?Ja(n):(e=()=>{Ja(n)},r.addEventListener("DOMContentLoaded",e)),()=>Fl(n,e)}typeof document<"u"&&vh();function Al(){return xr!=="pointer"}const gh=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function bh(n,r,e){let t=nn(e==null?void 0:e.target);const o=typeof window<"u"?wn(e==null?void 0:e.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?wn(e==null?void 0:e.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?wn(e==null?void 0:e.target).HTMLElement:HTMLElement,s=typeof window<"u"?wn(e==null?void 0:e.target).KeyboardEvent:KeyboardEvent;return n=n||t.activeElement instanceof o&&!gh.has(t.activeElement.type)||t.activeElement instanceof a||t.activeElement instanceof i&&t.activeElement.isContentEditable,!(n&&r==="keyboard"&&e instanceof s&&!hh[e.key])}function yh(n,r,e){Ja(),d.useEffect(()=>{let t=(o,a)=>{bh(!!(e!=null&&e.isTextInput),o,a)&&n(Al())};return Ga.add(t),()=>{Ga.delete(t)}},r)}function wh(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=Il(a),s=d.useCallback(l=>{const u=nn(l.target),c=u?qa(u):qa();l.target===l.currentTarget&&c===Ml(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 xh(n){let{isDisabled:r,onBlurWithin:e,onFocusWithin:t,onFocusWithinChange:o}=n,a=d.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=Tl(),l=d.useCallback(f=>{f.currentTarget.contains(f.target)&&a.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(a.current.isFocusWithin=!1,s(),e&&e(f),o&&o(!1))},[e,o,a,s]),u=Il(l),c=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=nn(f.target),p=qa(h);if(!a.current.isFocusWithin&&p===Ml(f.nativeEvent)){t&&t(f),o&&o(!0),a.current.isFocusWithin=!0,u(f);let m=f.currentTarget;i(h,"focus",v=>{if(a.current.isFocusWithin&&!Ol(m,v.target)){let g=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});fh(g,m);let y=Pl(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 ho=!1,mo=0;function Za(){ho=!0,setTimeout(()=>{ho=!1},50)}function Rl(n){n.pointerType==="touch"&&Za()}function Eh(){if(!(typeof document>"u"))return mo===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Rl):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Za)),mo++,()=>{mo--,!(mo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Rl):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Za))}}function ei(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(Eh,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=Tl(),{hoverProps:c,triggerHoverEnd:f}=d.useMemo(()=>{let h=(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(nn(v.target),"pointerover",E=>{s.isHovered&&s.target&&!Ol(s.target,E.target)&&p(E,E.pointerType)},{capture:!0}),r&&r({type:"hoverstart",target:y,pointerType:g}),e&&e(!0),i(!0)},p=(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))},m={};return typeof PointerEvent<"u"?(m.onPointerEnter=v=>{ho&&v.pointerType==="mouse"||h(v,v.pointerType)},m.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(m.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},m.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!ho&&h(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},m.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&p(v,"mouse")}),{hoverProps:m,triggerHoverEnd:p}},[r,e,t,o,s,l,u]);return d.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:c,isHovered:a}}function ti(n={}){let{autoFocus:r=!1,isTextInput:e,within:t}=n,o=d.useRef({isFocused:!1,isFocusVisible:r||Al()}),[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(p=>{o.current.isFocused=p,i(p),u()},[u]);yh(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:e});let{focusProps:f}=wh({isDisabled:t,onFocusChange:c}),{focusWithinProps:h}=xh({isDisabled:!t,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:s,focusProps:t?h:f}}var Dh=Object.defineProperty,Sh=(n,r,e)=>r in n?Dh(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,ni=(n,r,e)=>(Sh(n,typeof r!="symbol"?r+"":r,e),e);let kh=class{constructor(){ni(this,"current",this.detect()),ni(this,"handoffState","pending"),ni(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"}},xt=new kh;function En(n){var r,e;return xt.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 vo(n){typeof queueMicrotask=="function"?queueMicrotask(n):Promise.resolve().then(n).catch(r=>setTimeout(()=>{throw r}))}function ut(){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 vo(()=>{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=ut();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 rn(){let[n]=d.useState(ut);return d.useEffect(()=>()=>n.dispose(),[n]),n}let fe=(n,r)=>{xt.isServer?d.useEffect(n,r):d.useLayoutEffect(n,r)};function Yt(n){let r=d.useRef(n);return fe(()=>{r.current=n},[n]),r}let Z=function(n){let r=Yt(n);return d.useCallback((...e)=>r.current(...e),[r])};function Ch(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 _h(n,r){return!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)}function Yl({disabled:n=!1}={}){let r=d.useRef(null),[e,t]=d.useState(!1),o=rn(),a=Z(()=>{r.current=null,t(!1),o.dispose()}),i=Z(s=>{if(o.dispose(),r.current===null){r.current=s.currentTarget,t(!0);{let l=En(s.currentTarget);o.addEventListener(l,"pointerup",a,!1),o.addEventListener(l,"pointermove",u=>{if(r.current){let c=Ch(u);t(_h(c,r.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",a,!1)}}});return{pressed:e,pressProps:n?{}:{onPointerDown:i,onPointerUp:a,onClick:a}}}let Oh=d.createContext(void 0);function go(){return d.useContext(Oh)}function ri(...n){return Array.from(new Set(n.flatMap(r=>typeof r=="string"?r.split(" "):[]))).filter(Boolean).join(" ")}function Fe(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,Fe),t}var on=(n=>(n[n.None=0]="None",n[n.RenderStrategy=1]="RenderStrategy",n[n.Static=2]="Static",n))(on||{}),an=(n=>(n[n.Unmount=0]="Unmount",n[n.Hidden=1]="Hidden",n))(an||{});function Te(){let n=Th();return d.useCallback(r=>Mh({mergeRefs:n,...r}),[n])}function Mh({ourProps:n,theirProps:r,slot:e,defaultTag:t,features:o,visible:a=!0,name:i,mergeRefs:s}){s=s??Ph;let l=Wl(r,n);if(a)return bo(l,e,t,i,s);let u=o??0;if(u&2){let{static:c=!1,...f}=l;if(c)return bo(f,e,t,i,s)}if(u&1){let{unmount:c=!0,...f}=l;return Fe(c?0:1,{0(){return null},1(){return bo({...f,hidden:!0,style:{display:"none"}},e,t,i,s)}})}return bo(l,e,t,i,s)}function bo(n,r={},e,t,o){let{as:a=e,children:i,refName:s="ref",...l}=oi(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 f={};if(r){let h=!1,p=[];for(let[m,v]of Object.entries(r))typeof v=="boolean"&&(h=!0),v===!0&&p.push(m.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(h){f["data-headlessui-state"]=p.join(" ");for(let m of p)f[`data-${m}`]=""}}if(a===d.Fragment&&(Object.keys(sn(l)).length>0||Object.keys(sn(f)).length>0))if(!d.isValidElement(c)||Array.isArray(c)&&c.length>1){if(Object.keys(sn(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(sn(l)).concat(Object.keys(sn(f))).map(h=>` - ${h}`).join(`
|
|
54
54
|
`),"","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(`
|
|
55
55
|
`)].join(`
|
|
56
|
-
`))}else{let h=c.props,p=h==null?void 0:h.className,m=typeof p=="function"?(...x)=>Ba(p(...x),l.className):Ba(p,l.className),v=m?{className:m}:{},g=Tl(c.props,Xt(Va(l,["ref"])));for(let x in f)x in g&&delete f[x];return d.cloneElement(c,Object.assign({},g,f,u,{ref:o(rh(c),u.ref)},v))}return d.createElement(a,Object.assign({},Va(l,["ref"]),a!==d.Fragment&&u,a!==d.Fragment&&f),c)}function th(){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 nh(...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 Tl(...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 pr(...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 Ce(n){var r;return Object.assign(d.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function Xt(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function Va(n,r=[]){let e=Object.assign({},n);for(let t of r)t in e&&delete e[t];return e}function rh(n){return d.version.split(".")[0]>="19"?n.props.ref:n.ref}function Pl(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,ee(u=>(a||o(u),r==null?void 0:r(u)))]}function Il(n){let[r]=d.useState(n);return r}function Nl(n={},r=null,e=[]){for(let[t,o]of Object.entries(n))Fl(e,Ll(r,t),o);return e}function Ll(n,r){return n?n+"["+r+"]":r}function Fl(n,r,e){if(Array.isArray(e))for(let[t,o]of e.entries())Fl(n,Ll(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,""]):Nl(e,r,n)}function oh(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 ah="span";var Tn=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(Tn||{});function ih(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 Me()({ourProps:a,theirProps:o,slot:{},defaultTag:ah,name:"Hidden"})}let hr=Ce(ih),sh=d.createContext(null);function lh({children:n}){let r=d.useContext(sh);if(!r)return d.createElement(d.Fragment,null,n);let{target:e}=r;return e?Ne.createPortal(d.createElement(d.Fragment,null,n),e):null}function $l({data:n,form:r,disabled:e,onReset:t,overrides:o}){let[a,i]=d.useState(null),s=Qt();return d.useEffect(()=>{if(t&&a)return s.addEventListener(a,"reset",t)},[a,r,t]),d.createElement(lh,null,d.createElement(uh,{setForm:i,formId:r}),Nl(n).map(([l,u])=>d.createElement(hr,{features:Tn.Hidden,...Xt({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:e,name:l,value:u,...o})})))}function uh({setForm:n,formId:r}){return d.useEffect(()=>{if(r){let e=document.getElementById(r);e&&n(e)}},[n,r]),r?null:d.createElement(hr,{features:Tn.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&n(t)}})}let ch=d.createContext(void 0);function za(){return d.useContext(ch)}function qa(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function It(n){return qa(n)&&"tagName"in n}function Ke(n){return It(n)&&"accessKey"in n}function Nt(n){return It(n)&&"tabIndex"in n}function dh(n){return It(n)&&"style"in n}function fh(n){return Ke(n)&&n.nodeName==="IFRAME"}function io(n){return Ke(n)&&n.nodeName==="INPUT"}function Al(n){return Ke(n)&&n.nodeName==="LABEL"}function ph(n){return Ke(n)&&n.nodeName==="FIELDSET"}function Yl(n){return Ke(n)&&n.nodeName==="LEGEND"}function hh(n){return It(n)?n.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Rl(n){let r=n.parentElement,e=null;for(;r&&!ph(r);)Yl(r)&&(e=r),r=r.parentElement;let t=(r==null?void 0:r.getAttribute("disabled"))==="";return t&&mh(e)?!1:t}function mh(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(Yl(r))return!1;r=r.previousElementSibling}return!0}let jl=Symbol();function vh(n,r=!0){return Object.assign(n,{[jl]:r})}function Re(...n){let r=d.useRef(n);d.useEffect(()=>{r.current=n},[n]);let e=ee(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[jl]))?void 0:e}let so=d.createContext(null);so.displayName="DescriptionContext";function Wl(){let n=d.useContext(so);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,Wl),r}return n}function Hl(){var n,r;return(r=(n=d.useContext(so))==null?void 0:n.value)!=null?r:void 0}function gh(){let[n,r]=d.useState([]);return[n.length>0?n.join(" "):void 0,d.useMemo(()=>function(e){let t=ee(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(so.Provider,{value:o},e.children)},[r])]}let bh="p";function yh(n,r){let e=d.useId(),t=oo(),{id:o=`headlessui-description-${e}`,...a}=n,i=Wl(),s=Re(r);fe(()=>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 Me()({ourProps:c,theirProps:a,slot:u,defaultTag:bh,name:i.name||"Description"})}let wh=Ce(yh),Bl=Object.assign(wh,{});var he=(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))(he||{});let lo=d.createContext(null);lo.displayName="LabelContext";function Vl(){let n=d.useContext(lo);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,Vl),r}return n}function mr(n){var r,e,t;let o=(e=(r=d.useContext(lo))==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 zl({inherit:n=!1}={}){let r=mr(),[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=ee(l=>(t(u=>[...u,l]),()=>t(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,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(lo.Provider,{value:s},a.children)},[t])]}let xh="label";function Eh(n,r){var e;let t=d.useId(),o=Vl(),a=za(),i=oo(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((e=o.props)==null?void 0:e.htmlFor),passive:u=!1,...c}=n,f=Re(r);fe(()=>o.register(s),[s,o.register]);let h=ee(g=>{let x=g.currentTarget;if(!(g.target!==g.currentTarget&&hh(g.target))&&(Al(x)&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),Al(x))){let E=document.getElementById(x.htmlFor);if(E){let w=E.getAttribute("disabled");if(w==="true"||w==="")return;let k=E.getAttribute("aria-disabled");if(k==="true"||k==="")return;(io(E)&&(E.type==="file"||E.type==="radio"||E.type==="checkbox")||E.role==="radio"||E.role==="checkbox"||E.role==="switch")&&E.click(),E.focus({preventScroll:!0})}}}),p=i||!1,m=d.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),v={ref:f,...o.props,id:s,htmlFor:l,onClick:h};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in c&&delete c.onClick),Me()({ourProps:v,theirProps:c,slot:m,defaultTag:l?xh:"div",name:o.name||"Label"})}let Dh=Ce(Eh),uo=Object.assign(Dh,{}),Sh=d.createContext(()=>{});function kh({value:n,children:r}){return d.createElement(Sh.Provider,{value:n},r)}function Pn(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 f=n();if(!(f.length!==t.length||f.some((m,v)=>t[v]!==m)))return o;t=f;let p;if(e.key&&((s=e.debug)!=null&&s.call(e))&&(p=Date.now()),o=r(...f),e.key&&((l=e.debug)!=null&&l.call(e))){const m=Math.round((Date.now()-c)*100)/100,v=Math.round((Date.now()-p)*100)/100,g=v/16,x=(E,w)=>{for(E=String(E);E.length<w;)E=" "+E;return E};console.info(`%c⏱ ${x(v,5)} /${x(m,5)} ms`,`
|
|
56
|
+
`))}else{let h=c.props,p=h==null?void 0:h.className,m=typeof p=="function"?(...y)=>ri(p(...y),l.className):ri(p,l.className),v=m?{className:m}:{},g=Wl(c.props,sn(oi(l,["ref"])));for(let y in f)y in g&&delete f[y];return d.cloneElement(c,Object.assign({},g,f,u,{ref:o(Ih(c),u.ref)},v))}return d.createElement(a,Object.assign({},oi(l,["ref"]),a!==d.Fragment&&u,a!==d.Fragment&&f),c)}function Th(){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 Ph(...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 Wl(...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 Dr(...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 _e(n){var r;return Object.assign(d.forwardRef(n),{displayName:(r=n.displayName)!=null?r:n.name})}function sn(n){let r=Object.assign({},n);for(let e in r)r[e]===void 0&&delete r[e];return r}function oi(n,r=[]){let e=Object.assign({},n);for(let t of r)t in e&&delete e[t];return e}function Ih(n){return d.version.split(".")[0]>="19"?n.props.ref:n.ref}function jl(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,Z(u=>(a||o(u),r==null?void 0:r(u)))]}function Hl(n){let[r]=d.useState(n);return r}function Bl(n={},r=null,e=[]){for(let[t,o]of Object.entries(n))zl(e,Vl(r,t),o);return e}function Vl(n,r){return n?n+"["+r+"]":r}function zl(n,r,e){if(Array.isArray(e))for(let[t,o]of e.entries())zl(n,Vl(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,""]):Bl(e,r,n)}function Nh(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 $h="span";var jn=(n=>(n[n.None=1]="None",n[n.Focusable=2]="Focusable",n[n.Hidden=4]="Hidden",n))(jn||{});function Lh(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 Te()({ourProps:a,theirProps:o,slot:{},defaultTag:$h,name:"Hidden"})}let Sr=_e(Lh),Fh=d.createContext(null);function Ah({children:n}){let r=d.useContext(Fh);if(!r)return d.createElement(d.Fragment,null,n);let{target:e}=r;return e?Le.createPortal(d.createElement(d.Fragment,null,n),e):null}function ql({data:n,form:r,disabled:e,onReset:t,overrides:o}){let[a,i]=d.useState(null),s=rn();return d.useEffect(()=>{if(t&&a)return s.addEventListener(a,"reset",t)},[a,r,t]),d.createElement(Ah,null,d.createElement(Rh,{setForm:i,formId:r}),Bl(n).map(([l,u])=>d.createElement(Sr,{features:jn.Hidden,...sn({key:l,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:e,name:l,value:u,...o})})))}function Rh({setForm:n,formId:r}){return d.useEffect(()=>{if(r){let e=document.getElementById(r);e&&n(e)}},[n,r]),r?null:d.createElement(Sr,{features:jn.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:e=>{if(!e)return;let t=e.closest("form");t&&n(t)}})}let Yh=d.createContext(void 0);function ai(){return d.useContext(Yh)}function ii(n){return typeof n!="object"||n===null?!1:"nodeType"in n}function Wt(n){return ii(n)&&"tagName"in n}function tt(n){return Wt(n)&&"accessKey"in n}function jt(n){return Wt(n)&&"tabIndex"in n}function Wh(n){return Wt(n)&&"style"in n}function jh(n){return tt(n)&&n.nodeName==="IFRAME"}function yo(n){return tt(n)&&n.nodeName==="INPUT"}function Ul(n){return tt(n)&&n.nodeName==="LABEL"}function Hh(n){return tt(n)&&n.nodeName==="FIELDSET"}function Ql(n){return tt(n)&&n.nodeName==="LEGEND"}function Bh(n){return Wt(n)?n.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Gl(n){let r=n.parentElement,e=null;for(;r&&!Hh(r);)Ql(r)&&(e=r),r=r.parentElement;let t=(r==null?void 0:r.getAttribute("disabled"))==="";return t&&Vh(e)?!1:t}function Vh(n){if(!n)return!1;let r=n.previousElementSibling;for(;r!==null;){if(Ql(r))return!1;r=r.previousElementSibling}return!0}let Kl=Symbol();function zh(n,r=!0){return Object.assign(n,{[Kl]:r})}function We(...n){let r=d.useRef(n);d.useEffect(()=>{r.current=n},[n]);let e=Z(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[Kl]))?void 0:e}let wo=d.createContext(null);wo.displayName="DescriptionContext";function Xl(){let n=d.useContext(wo);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,Xl),r}return n}function Jl(){var n,r;return(r=(n=d.useContext(wo))==null?void 0:n.value)!=null?r:void 0}function qh(){let[n,r]=d.useState([]);return[n.length>0?n.join(" "):void 0,d.useMemo(()=>function(e){let t=Z(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(wo.Provider,{value:o},e.children)},[r])]}let Uh="p";function Qh(n,r){let e=d.useId(),t=go(),{id:o=`headlessui-description-${e}`,...a}=n,i=Xl(),s=We(r);fe(()=>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 Te()({ourProps:c,theirProps:a,slot:u,defaultTag:Uh,name:i.name||"Description"})}let Gh=_e(Qh),Zl=Object.assign(Gh,{});var he=(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))(he||{});let xo=d.createContext(null);xo.displayName="LabelContext";function eu(){let n=d.useContext(xo);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,eu),r}return n}function kr(n){var r,e,t;let o=(e=(r=d.useContext(xo))==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 tu({inherit:n=!1}={}){let r=kr(),[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=Z(l=>(t(u=>[...u,l]),()=>t(u=>{let c=u.slice(),f=c.indexOf(l);return f!==-1&&c.splice(f,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(xo.Provider,{value:s},a.children)},[t])]}let Kh="label";function Xh(n,r){var e;let t=d.useId(),o=eu(),a=ai(),i=go(),{id:s=`headlessui-label-${t}`,htmlFor:l=a??((e=o.props)==null?void 0:e.htmlFor),passive:u=!1,...c}=n,f=We(r);fe(()=>o.register(s),[s,o.register]);let h=Z(g=>{let y=g.currentTarget;if(!(g.target!==g.currentTarget&&Bh(g.target))&&(Ul(y)&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),Ul(y))){let E=document.getElementById(y.htmlFor);if(E){let w=E.getAttribute("disabled");if(w==="true"||w==="")return;let S=E.getAttribute("aria-disabled");if(S==="true"||S==="")return;(yo(E)&&(E.type==="file"||E.type==="radio"||E.type==="checkbox")||E.role==="radio"||E.role==="checkbox"||E.role==="switch")&&E.click(),E.focus({preventScroll:!0})}}}),p=i||!1,m=d.useMemo(()=>({...o.slot,disabled:p}),[o.slot,p]),v={ref:f,...o.props,id:s,htmlFor:l,onClick:h};return u&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in c&&delete c.onClick),Te()({ourProps:v,theirProps:c,slot:m,defaultTag:l?Kh:"div",name:o.name||"Label"})}let Jh=_e(Xh),Eo=Object.assign(Jh,{}),Zh=d.createContext(()=>{});function em({value:n,children:r}){return d.createElement(Zh.Provider,{value:n},r)}function Hn(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 f=n();if(!(f.length!==t.length||f.some((m,v)=>t[v]!==m)))return o;t=f;let p;if(e.key&&((s=e.debug)!=null&&s.call(e))&&(p=Date.now()),o=r(...f),e.key&&((l=e.debug)!=null&&l.call(e))){const m=Math.round((Date.now()-c)*100)/100,v=Math.round((Date.now()-p)*100)/100,g=v/16,y=(E,w)=>{for(E=String(E);E.length<w;)E=" "+E;return E};console.info(`%c⏱ ${y(v,5)} /${y(m,5)} ms`,`
|
|
57
57
|
font-size: .6rem;
|
|
58
58
|
font-weight: bold;
|
|
59
|
-
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 ql(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const _h=(n,r)=>Math.abs(n-r)<=1,Ch=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},Ul=n=>{const{offsetWidth:r,offsetHeight:e}=n;return{width:r,height:e}},Oh=n=>n,Mh=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},Th=(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(Ul(e)),!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(Ul(e))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},Ql={passive:!0},Gl=typeof window>"u"?!0:"onscrollend"in window,Ph=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=n.options.useScrollendEvent&&Gl?()=>{}:Ch(t,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:f,isRtl:h}=n.options;o=f?e.scrollLeft*(h&&-1||1):e.scrollTop,a(),r(o,c)},s=i(!0),l=i(!1);l(),e.addEventListener("scroll",s,Ql);const u=n.options.useScrollendEvent&&Gl;return u&&e.addEventListener("scrollend",l,Ql),()=>{e.removeEventListener("scroll",s),u&&e.removeEventListener("scrollend",l)}},Ih=(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 n[e.options.horizontal?"offsetWidth":"offsetHeight"]},Nh=(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 Lh{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:Oh,rangeExtractor:Mh,onChange:()=>{},measureElement:Ih,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=Pn(()=>(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=Pn(()=>[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=Pn(()=>[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 f=a(c),h=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),p=h?h.end+this.options.gap:t+o,m=s.get(f),v=typeof m=="number"?m:this.options.estimateSize(c),g=p+v,x=h?h.lane:c%this.options.lanes;u[c]={index:c,start:p,size:v,end:g,key:f,lane:x}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Pn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,o,a)=>this.range=e.length>0&&t>0?Fh({measurements:e,outerSize:t,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Pn(()=>{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=Pn(()=>[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 ql(t[Kl(0,t.length-1,o=>ql(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.getTotalSize()-a;return Math.max(Math.min(s,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=this.getOffsetForIndex(e,s);if(!u)return;const[c]=u,f=this.getScrollOffset();_h(c,f)||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 Kl=(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 Fh({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=Kl(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 Xl=typeof document<"u"?V.useLayoutEffect:V.useEffect;function $h(n){const r=V.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?Ne.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=V.useState(()=>new Lh(e));return t.setOptions(e),Xl(()=>t._didMount(),[]),Xl(()=>t._willUpdate()),t}function Ah(n){return $h({observeElementRect:Th,observeElementOffset:Ph,scrollToFn:Nh,...n})}function Yh(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 Jl(n=Yh){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 Rh(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function Ua(n,r=!1){let[e,t]=d.useReducer(()=>({}),{}),o=d.useMemo(()=>Rh(n),[n,e]);return fe(()=>{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 Zl=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}};var jh=Object.defineProperty,Wh=(n,r,e)=>r in n?jh(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Hh=(n,r,e)=>(Wh(n,r+"",e),e),eu=(n,r,e)=>{if(!r.has(n))throw TypeError("Cannot "+e)},ot=(n,r,e)=>(eu(n,r,"read from private field"),e?e.call(n):r.get(n)),Qa=(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)},tu=(n,r,e,t)=>(eu(n,r,"write to private field"),r.set(n,e),e),ht,vr,gr;let Ga=class{constructor(r){Qa(this,ht,{}),Qa(this,vr,new Zl(()=>new Set)),Qa(this,gr,new Set),Hh(this,"disposables",rt()),tu(this,ht,r)}dispose(){this.disposables.dispose()}get state(){return ot(this,ht)}subscribe(r,e){let t={selector:r,callback:e,current:r(ot(this,ht))};return ot(this,gr).add(t),this.disposables.add(()=>{ot(this,gr).delete(t)})}on(r,e){return ot(this,vr).get(r).add(e),this.disposables.add(()=>{ot(this,vr).get(r).delete(e)})}send(r){let e=this.reduce(ot(this,ht),r);if(e!==ot(this,ht)){tu(this,ht,e);for(let t of ot(this,gr)){let o=t.selector(ot(this,ht));nu(t.current,o)||(t.current=o,t.callback(o))}for(let t of ot(this,vr).get(r.type))t(ot(this,ht),r)}}};ht=new WeakMap,vr=new WeakMap,gr=new WeakMap;function nu(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:Ka(n[Symbol.iterator](),r[Symbol.iterator]()):n instanceof Map&&r instanceof Map||n instanceof Set&&r instanceof Set?n.size!==r.size?!1:Ka(n.entries(),r.entries()):ru(n)&&ru(r)?Ka(Object.entries(n)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function Ka(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 ru(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}function Xa(n){let[r,e]=n(),t=rt();return(...o)=>{r(...o),t.dispose(),t.microTask(e)}}var Bh=Object.defineProperty,Vh=(n,r,e)=>r in n?Bh(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,ou=(n,r,e)=>(Vh(n,typeof r!="symbol"?r+"":r,e),e),Ja=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(Ja||{});let zh={0(n,r){let e=r.id,t=n.stack,o=n.stack.indexOf(e);if(o!==-1){let a=n.stack.slice();return a.splice(o,1),a.push(e),t=a,{...n,stack:t}}return{...n,stack:[...n.stack,e]}},1(n,r){let e=r.id,t=n.stack.indexOf(e);if(t===-1)return n;let o=n.stack.slice();return o.splice(t,1),{...n,stack:o}}},qh=class cf extends Ga{constructor(){super(...arguments),ou(this,"actions",{push:r=>this.send({type:0,id:r}),pop:r=>this.send({type:1,id:r})}),ou(this,"selectors",{isTop:(r,e)=>r.stack[r.stack.length-1]===e,inStack:(r,e)=>r.stack.includes(e)})}static new(){return new cf({stack:[]})}reduce(r,e){return Le(e.type,zh,r,e)}};const In=new Zl(()=>qh.new());var co={exports:{}},Za={};/**
|
|
59
|
+
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 nu(n,r){if(n===void 0)throw new Error("Unexpected undefined");return n}const tm=(n,r)=>Math.abs(n-r)<1.01,nm=(n,r,e)=>{let t;return function(...o){n.clearTimeout(t),t=n.setTimeout(()=>r.apply(this,o),e)}},ru=n=>{const{offsetWidth:r,offsetHeight:e}=n;return{width:r,height:e}},rm=n=>n,om=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},am=(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(ru(e)),!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(ru(e))};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return a.observe(e,{box:"border-box"}),()=>{a.unobserve(e)}},ou={passive:!0},au=typeof window>"u"?!0:"onscrollend"in window,im=(n,r)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let o=0;const a=n.options.useScrollendEvent&&au?()=>{}:nm(t,()=>{r(o,!1)},n.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:f,isRtl:h}=n.options;o=f?e.scrollLeft*(h&&-1||1):e.scrollTop,a(),r(o,c)},s=i(!0),l=i(!1);l(),e.addEventListener("scroll",s,ou);const u=n.options.useScrollendEvent&&au;return u&&e.addEventListener("scrollend",l,ou),()=>{e.removeEventListener("scroll",s),u&&e.removeEventListener("scrollend",l)}},sm=(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 n[e.options.horizontal?"offsetWidth":"offsetHeight"]},lm=(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 um{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,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:rm,rangeExtractor:om,onChange:()=>{},measureElement:sm,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=Hn(()=>(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=Hn(()=>[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=Hn(()=>[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 f=a(c),h=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),p=h?h.end+this.options.gap:t+o,m=s.get(f),v=typeof m=="number"?m:this.options.estimateSize(c),g=p+v,y=h?h.lane:c%this.options.lanes;u[c]={index:c,start:p,size:v,end:g,key:f,lane:y}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Hn(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,o,a)=>this.range=e.length>0&&t>0?cm({measurements:e,outerSize:t,scrollOffset:o,lanes:a}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Hn(()=>{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=Hn(()=>[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 nu(t[iu(0,t.length-1,o=>nu(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.getTotalSize()+this.options.scrollMargin-a;return Math.max(Math.min(s,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.scrollToOffset=(e,{align:t="start",behavior:o}={})=>{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}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let a=0;const i=10,s=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(e,u);if(!c){console.warn("Failed to get offset for index:",e);return}const[f,h]=c;this._scrollToOffset(f,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const p=this.getScrollOffset(),m=this.getOffsetForIndex(e,h);if(!m){console.warn("Failed to get offset for index:",e);return}tm(m[0],p)||l(h)})},l=u=>{this.targetWindow&&(a++,a<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",a,i),this.targetWindow.requestAnimationFrame(()=>s(u))):console.warn(`Failed to scroll to index ${e} after ${i} attempts.`))};s(t)},this.scrollBy=(e,{behavior:t}={})=>{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 iu=(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 cm({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=iu(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 su=typeof document<"u"?H.useLayoutEffect:H.useEffect;function dm(n){const r=H.useReducer(()=>({}),{})[1],e={...n,onChange:(o,a)=>{var i;a?Le.flushSync(r):r(),(i=n.onChange)==null||i.call(n,o,a)}},[t]=H.useState(()=>new um(e));return t.setOptions(e),su(()=>t._didMount(),[]),su(()=>t._willUpdate()),t}function fm(n){return dm({observeElementRect:am,observeElementOffset:im,scrollToFn:lm,...n})}function pm(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 lu(n=pm){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 hm(n){if(n===null)return{width:0,height:0};let{width:r,height:e}=n.getBoundingClientRect();return{width:r,height:e}}function si(n,r=!1){let[e,t]=d.useReducer(()=>({}),{}),o=d.useMemo(()=>hm(n),[n,e]);return fe(()=>{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 uu=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}};var mm=Object.defineProperty,vm=(n,r,e)=>r in n?mm(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,gm=(n,r,e)=>(vm(n,r+"",e),e),cu=(n,r,e)=>{if(!r.has(n))throw TypeError("Cannot "+e)},ct=(n,r,e)=>(cu(n,r,"read from private field"),e?e.call(n):r.get(n)),li=(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)},du=(n,r,e,t)=>(cu(n,r,"write to private field"),r.set(n,e),e),Et,Cr,_r;let ui=class{constructor(r){li(this,Et,{}),li(this,Cr,new uu(()=>new Set)),li(this,_r,new Set),gm(this,"disposables",ut()),du(this,Et,r),xt.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return ct(this,Et)}subscribe(r,e){if(xt.isServer)return()=>{};let t={selector:r,callback:e,current:r(ct(this,Et))};return ct(this,_r).add(t),this.disposables.add(()=>{ct(this,_r).delete(t)})}on(r,e){return xt.isServer?()=>{}:(ct(this,Cr).get(r).add(e),this.disposables.add(()=>{ct(this,Cr).get(r).delete(e)}))}send(r){let e=this.reduce(ct(this,Et),r);if(e!==ct(this,Et)){du(this,Et,e);for(let t of ct(this,_r)){let o=t.selector(ct(this,Et));fu(t.current,o)||(t.current=o,t.callback(o))}for(let t of ct(this,Cr).get(r.type))t(ct(this,Et),r)}}};Et=new WeakMap,Cr=new WeakMap,_r=new WeakMap;function fu(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:ci(n[Symbol.iterator](),r[Symbol.iterator]()):n instanceof Map&&r instanceof Map||n instanceof Set&&r instanceof Set?n.size!==r.size?!1:ci(n.entries(),r.entries()):pu(n)&&pu(r)?ci(Object.entries(n)[Symbol.iterator](),Object.entries(r)[Symbol.iterator]()):!1}function ci(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 pu(n){if(Object.prototype.toString.call(n)!=="[object Object]")return!1;let r=Object.getPrototypeOf(n);return r===null||Object.getPrototypeOf(r)===null}function di(n){let[r,e]=n(),t=ut();return(...o)=>{r(...o),t.dispose(),t.microTask(e)}}var bm=Object.defineProperty,ym=(n,r,e)=>r in n?bm(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,hu=(n,r,e)=>(ym(n,typeof r!="symbol"?r+"":r,e),e),fi=(n=>(n[n.Push=0]="Push",n[n.Pop=1]="Pop",n))(fi||{});let wm={0(n,r){let e=r.id,t=n.stack,o=n.stack.indexOf(e);if(o!==-1){let a=n.stack.slice();return a.splice(o,1),a.push(e),t=a,{...n,stack:t}}return{...n,stack:[...n.stack,e]}},1(n,r){let e=r.id,t=n.stack.indexOf(e);if(t===-1)return n;let o=n.stack.slice();return o.splice(t,1),{...n,stack:o}}},xm=class Rf extends ui{constructor(){super(...arguments),hu(this,"actions",{push:r=>this.send({type:0,id:r}),pop:r=>this.send({type:1,id:r})}),hu(this,"selectors",{isTop:(r,e)=>r.stack[r.stack.length-1]===e,inStack:(r,e)=>r.stack.includes(e)})}static new(){return new Rf({stack:[]})}reduce(r,e){return Fe(e.type,wm,r,e)}};const Bn=new uu(()=>xm.new());var Do={exports:{}},pi={};/**
|
|
60
60
|
* @license React
|
|
61
61
|
* use-sync-external-store-with-selector.production.js
|
|
62
62
|
*
|
|
@@ -64,7 +64,7 @@ So animateHeight is most likely having no effect at all.`);var zt=(0,e.default)(
|
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the MIT license found in the
|
|
66
66
|
* LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/var
|
|
67
|
+
*/var mu;function Em(){if(mu)return pi;mu=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 pi.useSyncExternalStoreWithSelector=function(l,u,c,f,h){var p=o(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=i(function(){function g(x){if(!y){if(y=!0,E=x,x=f(x),h!==void 0&&m.hasValue){var T=m.value;if(h(T,x))return w=T}return w=x}if(T=w,e(E,x))return T;var N=f(x);return h!==void 0&&h(T,N)?(E=x,T):(E=x,w=N)}var y=!1,E,w,S=c===void 0?null:c;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,c,f,h]);var v=t(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.value=v},[v]),s(v),v},pi}var hi={};/**
|
|
68
68
|
* @license React
|
|
69
69
|
* use-sync-external-store-with-selector.development.js
|
|
70
70
|
*
|
|
@@ -72,10 +72,10 @@ So animateHeight is most likely having no effect at all.`);var zt=(0,e.default)(
|
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the MIT license found in the
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/var iu;function Qh(){return iu||(iu=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;ei.useSyncExternalStoreWithSelector=function(l,u,c,f,h){var p=o(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=i(function(){function g(D){if(!x){if(x=!0,E=D,D=f(D),h!==void 0&&m.hasValue){var T=m.value;if(h(T,D))return w=T}return w=D}if(T=w,e(E,D))return T;var $=f(D);return h!==void 0&&h(T,$)?(E=D,T):(E=D,w=$)}var x=!1,E,w,k=c===void 0?null:c;return[function(){return g(u())},k===null?void 0:function(){return g(k())}]},[u,c,f,h]);var v=t(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.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())}()),ei}var su;function Gh(){return su||(su=1,process.env.NODE_ENV==="production"?co.exports=Uh():co.exports=Qh()),co.exports}var Kh=Gh();function we(n,r,e=nu){return Kh.useSyncExternalStoreWithSelector(ee(t=>n.subscribe(Xh,t)),ee(()=>n.state),ee(()=>n.state),ee(r),e)}function Xh(n){return n}function br(n,r){let e=d.useId(),t=In.get(r),[o,a]=we(t,d.useCallback(i=>[t.selectors.isTop(i,e),t.selectors.inStack(i,e)],[t,e]));return fe(()=>{if(n)return t.actions.push(e),()=>t.actions.pop(e)},[t,n,e]),n?a?o:!0:!1}let ti=new Map,yr=new Map;function lu(n){var r;let e=(r=yr.get(n))!=null?r:0;return yr.set(n,e+1),e!==0?()=>uu(n):(ti.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>uu(n))}function uu(n){var r;let e=(r=yr.get(n))!=null?r:1;if(e===1?yr.delete(n):yr.set(n,e-1),e!==1)return;let t=ti.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,ti.delete(n))}function ni(n,{allowed:r,disallowed:e}={}){let t=br(n,"inert-others");fe(()=>{var o,a;if(!t)return;let i=rt();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(lu(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let u=dn(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)s.some(h=>f.contains(h))||i.add(lu(f));c=c.parentElement}}return i.dispose},[t,r,e])}function ri(n,r,e){let t=Pt(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:Ke(r)?r:r.current;if(!o)return;let a=rt();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 fo=["[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(","),Jh=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var dt=(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))(dt||{}),oi=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(oi||{}),Zh=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Zh||{});function cu(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(fo)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function em(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(Jh)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var ai=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(ai||{});function du(n,r=0){var e;return n===((e=dn(n))==null?void 0:e.body)?!1:Le(r,{0(){return n.matches(fo)},1(){let t=n;for(;t!==null;){if(t.matches(fo))return!0;t=t.parentElement}return!1}})}var tm=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(tm||{});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 nm=["textarea","input"].join(",");function rm(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,nm))!=null?e:!1}function ii(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 om(n,r){return Nn(cu(),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?ii(n):n:r&64?em(n):cu(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))),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,f=i.length,h;do{if(c>=f||c+f<=0)return 0;let p=l+c;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(u),c+=s}while(h!==a.activeElement);return r&6&&rm(h)&&h.select(),2}function fu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function am(){return/Android/gi.test(window.navigator.userAgent)}function si(){return fu()||am()}function Ln(n,r,e,t){let o=Pt(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 pu(n,r,e,t){let o=Pt(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 hu=30;function li(n,r,e){let t=Pt(e),o=d.useCallback(function(s,l){if(s.defaultPrevented)return;let u=l(s);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]}(r);for(let f of c)if(f!==null&&(f.contains(u)||s.composed&&s.composedPath().includes(f)))return;return!du(u,ai.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t.current(s,u)},[t,r]),a=d.useRef(null);Ln(n,"pointerdown",s=>{var l,u;si()||(a.current=((u=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:u[0])||s.target)},!0),Ln(n,"pointerup",s=>{if(si()||!a.current)return;let l=a.current;return a.current=null,o(s,()=>l)},!0);let i=d.useRef({x:0,y:0});Ln(n,"touchstart",s=>{i.current.x=s.touches[0].clientX,i.current.y=s.touches[0].clientY},!0),Ln(n,"touchend",s=>{let l={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=hu||Math.abs(l.y-i.current.y)>=hu))return o(s,()=>Nt(s.target)?s.target:null)},!0),pu(n,"blur",s=>o(s,()=>fh(window.document.activeElement)?window.document.activeElement:null),!0)}function Ft(...n){return d.useMemo(()=>dn(...n),[...n])}var im=(n=>(n[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n))(im||{});const $t={Ignore:{kind:0},Select:n=>({kind:1,target:n}),Close:{kind:2}},sm=200;function mu(n,{trigger:r,action:e,close:t,select:o}){let a=d.useRef(null);Ln(n&&r!==null,"pointerdown",i=>{qa(i==null?void 0:i.target)&&r!=null&&r.contains(i.target)&&(a.current=new Date)}),Ln(n&&r!==null,"pointerup",i=>{if(a.current===null||!Nt(i.target))return;let s=e(i),l=new Date().getTime()-a.current.getTime();switch(a.current=null,s.kind){case 0:return;case 1:{l>sm&&(o(s.target),t());break}case 2:{t();break}}},{capture:!0})}function ui(n,r,e,t){let o=Pt(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 vu(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return ui(n,"blur",e=>{let t=e.target;io(t)&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),ee(()=>{if(document.activeElement!==n&&io(n)&&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 gu(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 lm(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function um(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 cm(){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 dm(){return fu()?{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=rt();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(Nt(s.target))try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);Nt(c)&&!t(c)&&(i=c)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(Nt(s.target)&&dh(s.target))if(t(s.target)){let l=s.target;for(;l.parentElement&&t(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(n,"touchmove",s=>{if(Nt(s.target)){if(io(s.target))return;if(t(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function fm(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function pm(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let fn=um(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:rt(),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:pm(e)},o=[dm(),cm(),fm()];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)}});fn.subscribe(()=>{let n=fn.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)&&fn.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&fn.dispatch("TEARDOWN",e)}});function hm(n,r,e=()=>({containers:[]})){let t=lm(fn),o=r?t.get(r):void 0,a=o?o.count>0:!1;return fe(()=>{if(!(!r||!n))return fn.dispatch("PUSH",r,e),()=>fn.dispatch("POP",r,e)},[n,r]),a}function ci(n,r,e=()=>[document.body]){let t=br(n,"scroll-lock");hm(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function bu(n){return[n.screenX,n.screenY]}function yu(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=bu(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=bu(r)}}}function mm(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 wu,xu;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((wu=process==null?void 0:process.env)==null?void 0:wu.NODE_ENV)==="test"&&typeof((xu=Element==null?void 0:Element.prototype)==null?void 0:xu.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(`
|
|
76
|
-
`)),[]});var vm=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(vm||{});function di(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function fi(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=mm(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),f=Qt();return fe(()=>{var h;if(n){if(e&&a(!0),!r){e&&s(3);return}return(h=t==null?void 0:t.start)==null||h.call(t,e),gm(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 p;c.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(u.current=!1,l(7),e||a(!1),(p=t==null?void 0:t.end)==null||p.call(t,e))}})}},[n,e,r,f]),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 gm(n,{prepare:r,run:e,done:t,inFlight:o}){let a=rt();return ym(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(bm(n,t))})}),a.dispose}function bm(n,r){var e,t;let o=rt();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 ym(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 wm(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]),fe(()=>{if(!r||!n)return;let i=dn(r);if(!i)return;let s=o.current,l=a.current,u=Object.assign(f=>s(f),{acceptNode:s}),c=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[r,n,o,a])}function wr(n,r){let e=d.useRef([]),t=ee(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 po(){return typeof window<"u"}function Fn(n){return Eu(n)?(n.nodeName||"").toLowerCase():"#document"}function et(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function mt(n){var r;return(r=(Eu(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Eu(n){return po()?n instanceof Node||n instanceof et(n).Node:!1}function Fe(n){return po()?n instanceof Element||n instanceof et(n).Element:!1}function vt(n){return po()?n instanceof HTMLElement||n instanceof et(n).HTMLElement:!1}function Du(n){return!po()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof et(n).ShadowRoot}function xr(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=at(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!["inline","contents"].includes(o)}function xm(n){return["table","td","th"].includes(Fn(n))}function ho(n){return[":popover-open",":modal"].some(r=>{try{return n.matches(r)}catch{return!1}})}function pi(n){const r=hi(),e=Fe(n)?at(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 Em(n){let r=Jt(n);for(;vt(r)&&!$n(r);){if(pi(r))return r;if(ho(r))return null;r=Jt(r)}return null}function hi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $n(n){return["html","body","#document"].includes(Fn(n))}function at(n){return et(n).getComputedStyle(n)}function mo(n){return Fe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Jt(n){if(Fn(n)==="html")return n;const r=n.assignedSlot||n.parentNode||Du(n)&&n.host||mt(n);return Du(r)?r.host:r}function Su(n){const r=Jt(n);return $n(r)?n.ownerDocument?n.ownerDocument.body:n.body:vt(r)&&xr(r)?r:Su(r)}function Er(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=Su(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=et(o);if(a){const s=mi(i);return r.concat(i,i.visualViewport||[],xr(o)?o:[],s&&e?Er(s):[])}return r.concat(o,Er(o,[],e))}function mi(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Dm(){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 At=Math.min,Ue=Math.max,Dr=Math.round,vo=Math.floor,gt=n=>({x:n,y:n}),Sm={left:"right",right:"left",bottom:"top",top:"bottom"},km={start:"end",end:"start"};function vi(n,r,e){return Ue(n,At(r,e))}function pn(n,r){return typeof n=="function"?n(r):n}function Zt(n){return n.split("-")[0]}function An(n){return n.split("-")[1]}function ku(n){return n==="x"?"y":"x"}function gi(n){return n==="y"?"height":"width"}function hn(n){return["top","bottom"].includes(Zt(n))?"y":"x"}function bi(n){return ku(hn(n))}function _m(n,r,e){e===void 0&&(e=!1);const t=An(n),o=bi(n),a=gi(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=go(i)),[i,go(i)]}function Cm(n){const r=go(n);return[yi(n),r,yi(r)]}function yi(n){return n.replace(/start|end/g,r=>km[r])}function Om(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 Mm(n,r,e,t){const o=An(n);let a=Om(Zt(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(yi)))),a}function go(n){return n.replace(/left|right|bottom|top/g,r=>Sm[r])}function Tm(n){return{top:0,right:0,bottom:0,left:0,...n}}function _u(n){return typeof n!="number"?Tm(n):{top:n,right:n,bottom:n,left:n}}function bo(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 Cu(n,r,e){let{reference:t,floating:o}=n;const a=hn(r),i=bi(r),s=gi(i),l=Zt(r),u=a==="y",c=t.x+t.width/2-o.width/2,f=t.y+t.height/2-o.height/2,h=t[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:t.y-o.height};break;case"bottom":p={x:c,y:t.y+t.height};break;case"right":p={x:t.x+t.width,y:f};break;case"left":p={x:t.x-o.width,y:f};break;default:p={x:t.x,y:t.y}}switch(An(r)){case"start":p[i]-=h*(e&&u?-1:1);break;case"end":p[i]+=h*(e&&u?-1:1);break}return p}const Pm=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:f}=Cu(u,t,l),h=t,p={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:x}=s[v],{x:E,y:w,data:k,reset:D}=await x({x:c,y:f,initialPlacement:t,placement:h,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:n,floating:r}});c=E??c,f=w??f,p={...p,[g]:{...p[g],...k}},D&&m<=50&&(m++,typeof D=="object"&&(D.placement&&(h=D.placement),D.rects&&(u=D.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):D.rects),{x:c,y:f}=Cu(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function yo(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:f="floating",altBoundary:h=!1,padding:p=0}=pn(r,n),m=_u(p),g=s[h?f==="floating"?"reference":"floating":f],x=bo(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})),E=f==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=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},D=bo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:w,strategy:l}):E);return{top:(x.top-D.top+m.top)/k.y,bottom:(D.bottom-x.bottom+m.bottom)/k.y,left:(x.left-D.left+m.left)/k.x,right:(D.right-x.right+m.right)/k.x}}const Im=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}=pn(n,r)||{};if(u==null)return{};const f=_u(c),h={x:e,y:t},p=bi(o),m=gi(p),v=await i.getDimensions(u),g=p==="y",x=g?"top":"left",E=g?"bottom":"right",w=g?"clientHeight":"clientWidth",k=a.reference[m]+a.reference[p]-h[p]-a.floating[m],D=h[p]-a.reference[p],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let $=T?T[w]:0;(!$||!await(i.isElement==null?void 0:i.isElement(T)))&&($=s.floating[w]||a.floating[m]);const _=k/2-D/2,C=$/2-v[m]/2-1,O=At(f[x],C),R=At(f[E],C),b=O,S=$-v[m]-R,L=$/2-v[m]/2+_,P=vi(b,L,S),N=!l.arrow&&An(o)!=null&&L!==P&&a.reference[m]/2-(L<b?O:R)-v[m]/2<0,z=N?L<b?L-b:L-S:0;return{[p]:h[p]+z,data:{[p]:P,centerOffset:L-P-z,...N&&{alignmentOffset:z}},reset:N}}}),Nm=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:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=pn(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const x=Zt(o),E=hn(s),w=Zt(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),D=h||(w||!v?[go(s)]:Cm(s)),T=m!=="none";!h&&T&&D.push(...Mm(s,v,m,k));const $=[s,...D],_=await yo(r,g),C=[];let O=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&C.push(_[x]),f){const L=_m(o,i,k);C.push(_[L[0]],_[L[1]])}if(O=[...O,{placement:o,overflows:C}],!C.every(L=>L<=0)){var R,b;const L=(((R=a.flip)==null?void 0:R.index)||0)+1,P=$[L];if(P)return{data:{index:L,overflows:O},reset:{placement:P}};let N=(b=O.filter(z=>z.overflows[0]<=0).sort((z,I)=>z.overflows[1]-I.overflows[1])[0])==null?void 0:b.placement;if(!N)switch(p){case"bestFit":{var S;const z=(S=O.filter(I=>{if(T){const te=hn(I.placement);return te===E||te==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(te=>te>0).reduce((te,M)=>te+M,0)]).sort((I,te)=>I[1]-te[1])[0])==null?void 0:S[0];z&&(N=z);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};async function Lm(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=Zt(e),s=An(e),l=hn(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,f=pn(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*c,y:h*u}:{x:h*u,y:p*c}}const Fm=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 Lm(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}}}}},$m=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:E}=g;return{x,y:E}}},...l}=pn(n,r),u={x:e,y:t},c=await yo(r,l),f=hn(Zt(o)),h=ku(f);let p=u[h],m=u[f];if(a){const g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",E=p+c[g],w=p-c[x];p=vi(E,p,w)}if(i){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",E=m+c[g],w=m-c[x];m=vi(E,m,w)}const v=s.fn({...r,[h]:p,[f]:m});return{...v,data:{x:v.x-e,y:v.y-t,enabled:{[h]:a,[f]:i}}}}}},Am=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}=pn(n,r),c=await yo(r,u),f=Zt(o),h=An(o),p=hn(o)==="y",{width:m,height:v}=a.floating;let g,x;f==="top"||f==="bottom"?(g=f,x=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(x=f,g=h==="end"?"top":"bottom");const E=v-c.top-c.bottom,w=m-c.left-c.right,k=At(v-c[g],E),D=At(m-c[x],w),T=!r.middlewareData.shift;let $=k,_=D;if((e=r.middlewareData.shift)!=null&&e.enabled.x&&(_=w),(t=r.middlewareData.shift)!=null&&t.enabled.y&&($=E),T&&!h){const O=Ue(c.left,0),R=Ue(c.right,0),b=Ue(c.top,0),S=Ue(c.bottom,0);p?_=m-2*(O!==0||R!==0?O+R:Ue(c.left,c.right)):$=v-2*(b!==0||S!==0?b+S:Ue(c.top,c.bottom))}await l({...r,availableWidth:_,availableHeight:$});const C=await i.getDimensions(s.floating);return m!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}};function Ou(n){const r=at(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=vt(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=Dr(e)!==a||Dr(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function wi(n){return Fe(n)?n:n.contextElement}function Yn(n){const r=wi(n);if(!vt(r))return gt(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=Ou(r);let i=(a?Dr(e.width):e.width)/t,s=(a?Dr(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Ym=gt(0);function Mu(n){const r=et(n);return!hi()||!r.visualViewport?Ym:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Rm(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==et(n)?!1:r}function mn(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=wi(n);let i=gt(1);r&&(t?Fe(t)&&(i=Yn(t)):i=Yn(n));const s=Rm(a,e,t)?Mu(a):gt(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,f=o.height/i.y;if(a){const h=et(a),p=t&&Fe(t)?et(t):t;let m=h,v=mi(m);for(;v&&t&&p!==m;){const g=Yn(v),x=v.getBoundingClientRect(),E=at(v),w=x.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,k=x.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=k,m=et(v),v=mi(m)}}return bo({width:c,height:f,x:l,y:u})}function xi(n,r){const e=mo(n).scrollLeft;return r?r.left+e:mn(mt(n)).left+e}function Tu(n,r,e){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=t.left+r.scrollLeft-(e?0:xi(n,t)),a=t.top+r.scrollTop;return{x:o,y:a}}function jm(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=mt(t),s=r?ho(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=gt(1);const c=gt(0),f=vt(t);if((f||!f&&!a)&&((Fn(t)!=="body"||xr(i))&&(l=mo(t)),vt(t))){const p=mn(t);u=Yn(t),c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}const h=i&&!f&&!a?Tu(i,l,!0):gt(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:e.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Wm(n){return Array.from(n.getClientRects())}function Hm(n){const r=mt(n),e=mo(n),t=n.ownerDocument.body,o=Ue(r.scrollWidth,r.clientWidth,t.scrollWidth,t.clientWidth),a=Ue(r.scrollHeight,r.clientHeight,t.scrollHeight,t.clientHeight);let i=-e.scrollLeft+xi(n);const s=-e.scrollTop;return at(t).direction==="rtl"&&(i+=Ue(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Bm(n,r){const e=et(n),t=mt(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=hi();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function Vm(n,r){const e=mn(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=vt(n)?Yn(n):gt(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 Pu(n,r,e){let t;if(r==="viewport")t=Bm(n,e);else if(r==="document")t=Hm(mt(n));else if(Fe(r))t=Vm(r,e);else{const o=Mu(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return bo(t)}function Iu(n,r){const e=Jt(n);return e===r||!Fe(e)||$n(e)?!1:at(e).position==="fixed"||Iu(e,r)}function zm(n,r){const e=r.get(n);if(e)return e;let t=Er(n,[],!1).filter(s=>Fe(s)&&Fn(s)!=="body"),o=null;const a=at(n).position==="fixed";let i=a?Jt(n):n;for(;Fe(i)&&!$n(i);){const s=at(i),l=pi(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||xr(i)&&!l&&Iu(n,i))?t=t.filter(c=>c!==i):o=s,i=Jt(i)}return r.set(n,t),t}function qm(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?ho(r)?[]:zm(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=Pu(r,c,o);return u.top=Ue(f.top,u.top),u.right=At(f.right,u.right),u.bottom=At(f.bottom,u.bottom),u.left=Ue(f.left,u.left),u},Pu(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Um(n){const{width:r,height:e}=Ou(n);return{width:r,height:e}}function Qm(n,r,e){const t=vt(r),o=mt(r),a=e==="fixed",i=mn(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=gt(0);if(t||!t&&!a)if((Fn(r)!=="body"||xr(o))&&(s=mo(r)),t){const h=mn(r,!0,a,r);l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}else o&&(l.x=xi(o));const u=o&&!t&&!a?Tu(o,s):gt(0),c=i.left+s.scrollLeft-l.x-u.x,f=i.top+s.scrollTop-l.y-u.y;return{x:c,y:f,width:i.width,height:i.height}}function Ei(n){return at(n).position==="static"}function Nu(n,r){if(!vt(n)||at(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return mt(n)===e&&(e=e.ownerDocument.body),e}function Lu(n,r){const e=et(n);if(ho(n))return e;if(!vt(n)){let o=Jt(n);for(;o&&!$n(o);){if(Fe(o)&&!Ei(o))return o;o=Jt(o)}return e}let t=Nu(n,r);for(;t&&xm(t)&&Ei(t);)t=Nu(t,r);return t&&$n(t)&&Ei(t)&&!pi(t)?e:t||Em(n)||e}const Gm=async function(n){const r=this.getOffsetParent||Lu,e=this.getDimensions,t=await e(n.floating);return{reference:Qm(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Km(n){return at(n).direction==="rtl"}const Xm={convertOffsetParentRelativeRectToViewportRelativeRect:jm,getDocumentElement:mt,getClippingRect:qm,getOffsetParent:Lu,getElementRects:Gm,getClientRects:Wm,getDimensions:Um,getScale:Yn,isElement:Fe,isRTL:Km};function Fu(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function Jm(n,r){let e=null,t;const o=mt(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:f,width:h,height:p}=u;if(s||r(),!h||!p)return;const m=vo(f),v=vo(o.clientWidth-(c+h)),g=vo(o.clientHeight-(f+p)),x=vo(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-x+"px",threshold:Ue(0,At(1,l))||1};let k=!0;function D(T){const $=T[0].intersectionRatio;if($!==l){if(!k)return i();$?i(!1,$):t=setTimeout(()=>{i(!1,1e-7)},1e3)}$===1&&!Fu(u,n.getBoundingClientRect())&&i(),k=!1}try{e=new IntersectionObserver(D,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(D,w)}e.observe(n)}return i(!0),a}function $u(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=wi(n),c=o||a?[...u?Er(u):[],...Er(r)]:[];c.forEach(x=>{o&&x.addEventListener("scroll",e,{passive:!0}),a&&x.addEventListener("resize",e)});const f=u&&s?Jm(u,e):null;let h=-1,p=null;i&&(p=new ResizeObserver(x=>{let[E]=x;E&&E.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),e()}),u&&!l&&p.observe(u),p.observe(r));let m,v=l?mn(n):null;l&&g();function g(){const x=mn(n);v&&!Fu(v,x)&&e(),v=x,m=requestAnimationFrame(g)}return e(),()=>{var x;c.forEach(E=>{o&&E.removeEventListener("scroll",e),a&&E.removeEventListener("resize",e)}),f==null||f(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Di=yo,Zm=Fm,ev=$m,tv=Nm,nv=Am,Au=Im,rv=(n,r,e)=>{const t=new Map,o={platform:Xm,...e},a={...o.platform,_c:t};return Pm(n,r,{...o,platform:a})};var wo=typeof document<"u"?d.useLayoutEffect:d.useEffect;function xo(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(!xo(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)&&!xo(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function Yu(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ru(n,r){const e=Yu(n);return Math.round(r*e)/e}function Si(n){const r=V.useRef(n);return wo(()=>{r.current=n}),r}function ju(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,f]=V.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=V.useState(t);xo(h,t)||p(t);const[m,v]=V.useState(null),[g,x]=V.useState(null),E=V.useCallback(I=>{I!==T.current&&(T.current=I,v(I))},[]),w=V.useCallback(I=>{I!==$.current&&($.current=I,x(I))},[]),k=a||m,D=i||g,T=V.useRef(null),$=V.useRef(null),_=V.useRef(c),C=l!=null,O=Si(l),R=Si(o),b=Si(u),S=V.useCallback(()=>{if(!T.current||!$.current)return;const I={placement:r,strategy:e,middleware:h};R.current&&(I.platform=R.current),rv(T.current,$.current,I).then(te=>{const M={...te,isPositioned:b.current!==!1};L.current&&!xo(_.current,M)&&(_.current=M,Hr.flushSync(()=>{f(M)}))})},[h,r,e,R,b]);wo(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[u]);const L=V.useRef(!1);wo(()=>(L.current=!0,()=>{L.current=!1}),[]),wo(()=>{if(k&&(T.current=k),D&&($.current=D),k&&D){if(O.current)return O.current(k,D,S);S()}},[k,D,S,O,C]);const P=V.useMemo(()=>({reference:T,floating:$,setReference:E,setFloating:w}),[E,w]),N=V.useMemo(()=>({reference:k,floating:D}),[k,D]),z=V.useMemo(()=>{const I={position:e,left:0,top:0};if(!N.floating)return I;const te=Ru(N.floating,c.x),M=Ru(N.floating,c.y);return s?{...I,transform:"translate("+te+"px, "+M+"px)",...Yu(N.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:te,top:M}},[e,s,N.floating,c.x,c.y]);return V.useMemo(()=>({...c,update:S,refs:P,elements:N,floatingStyles:z}),[c,S,P,N,z])}const ov=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?Au({element:t.current,padding:o}).fn(e):{}:t?Au({element:t,padding:o}).fn(e):{}}}},ki=(n,r)=>({...Zm(n),options:[n,r]}),av=(n,r)=>({...ev(n),options:[n,r]}),Wu=(n,r)=>({...tv(n),options:[n,r]}),iv=(n,r)=>({...nv(n),options:[n,r]}),sv=(n,r)=>({...ov(n),options:[n,r]}),Hu={...V},lv=Hu.useInsertionEffect||(n=>n());function Bu(n){const r=V.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return lv(()=>{r.current=n}),V.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 _i=typeof document<"u"?d.useLayoutEffect:d.useEffect;let Vu=!1,uv=0;const zu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uv++;function cv(){const[n,r]=V.useState(()=>Vu?zu():void 0);return _i(()=>{n==null&&r(zu())},[]),V.useEffect(()=>{Vu=!0},[]),n}const dv=Hu.useId||cv;let Sr;process.env.NODE_ENV!=="production"&&(Sr=new Set);function fv(){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=Sr)!=null&&n.has(o))){var a;(a=Sr)==null||a.add(o),console.warn(o)}}function pv(){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=Sr)!=null&&n.has(o))){var a;(a=Sr)==null||a.add(o),console.error(o)}}function hv(){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 mv=V.createContext(null),vv=V.createContext(null),gv=()=>{var n;return((n=V.useContext(mv))==null?void 0:n.id)||null},bv=()=>V.useContext(vv),yv="data-floating-ui-focusable";function wv(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=dv(),a=V.useRef({}),[i]=V.useState(()=>hv()),s=gv()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!Fe(p)&&pv("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]=V.useState(t.reference),c=Bu((p,m,v)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:v,nested:s}),e==null||e(p,m,v)}),f=V.useMemo(()=>({setPositionReference:u}),[]),h=V.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return V.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function xv(n){n===void 0&&(n={});const{nodeId:r}=n,e=wv({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=V.useState(null),[s,l]=V.useState(null),c=(o==null?void 0:o.domReference)||a,f=V.useRef(null),h=bv();_i(()=>{c&&(f.current=c)},[c]);const p=ju({...n,elements:{...o,...s&&{reference:s}}}),m=V.useCallback(w=>{const k=Fe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(k),p.refs.setReference(k)},[p.refs]),v=V.useCallback(w=>{(Fe(w)||w===null)&&(f.current=w,i(w)),(Fe(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Fe(w))&&p.refs.setReference(w)},[p.refs]),g=V.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),x=V.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=V.useMemo(()=>({...p,...t,refs:g,elements:x,nodeId:r}),[p,g,x,r,t]);return _i(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(k=>k.id===r);w&&(w.context=E)}),V.useMemo(()=>({...p,context:E,refs:g,elements:x}),[p,g,x,E])}const qu="active",Uu="selected";function Ci(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[qu]:i,[Uu]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1,[yv]:""},...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&&[qu,Uu].includes(u)))if(u.indexOf("on")===0){if(t.has(u)||t.set(u,[]),typeof c=="function"){var f;(f=t.get(u))==null||f.push(c),i[u]=function(){for(var h,p=arguments.length,m=new Array(p),v=0;v<p;v++)m[v]=arguments[v];return(h=t.get(u))==null?void 0:h.map(g=>g(...m)).find(g=>g!==void 0)}}}else i[u]=c}),i),{})}}function Ev(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=V.useCallback(s=>Ci(s,n,"reference"),r),a=V.useCallback(s=>Ci(s,n,"floating"),e),i=V.useCallback(s=>Ci(s,n,"item"),t);return V.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function Qu(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const Dv=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}=pn(n,r),{rects:f,elements:{floating:h}}=r,p=e.current[i],m=(u==null?void 0:u.current)||h,v=h.clientTop||m.clientTop,g=h.clientTop!==0,x=m.clientTop!==0,E=h===m;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||fv('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...r,...await ki(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-a).fn(r)},k=await Di(Qu(w,m.scrollHeight+v+h.clientTop),c),D=await Di(w,{...c,elementContext:"reference"}),T=Ue(0,k.top),$=w.y+T,O=(m.scrollHeight>m.clientHeight?R=>R:Dr)(Ue(0,m.scrollHeight+(g&&E||x?v*2:0)-T-Ue(0,k.bottom)));if(m.style.maxHeight=O+"px",m.scrollTop=T,o){const R=m.offsetHeight<p.offsetHeight*At(s,e.current.length)-1||D.top>=-l||D.bottom>=-l;Hr.flushSync(()=>o(R))}return t&&(t.current=await Di(Qu({...w,y:$},m.offsetHeight+v+h.clientTop),c)),{y:$}}});function Sv(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=Bu(s),u=V.useRef(!1),c=V.useRef(null),f=V.useRef(null);V.useEffect(()=>{if(!o)return;function p(v){if(v.ctrlKey||!m||a.current==null)return;const g=v.deltaY,x=a.current.top>=-.5,E=a.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,k=g<0?-1:1,D=g<0?"max":"min";m.scrollHeight<=m.clientHeight||(!x&&g>0||!E&&g<0?(v.preventDefault(),Hr.flushSync(()=>{l(T=>T+Math[D](g,w*k))})):/firefox/i.test(Dm())&&(m.scrollTop+=g))}const m=(i==null?void 0:i.current)||t.floating;if(e&&m)return m.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=m.scrollTop,a.current!=null&&(f.current={...a.current})}),()=>{c.current=null,f.current=null,m.removeEventListener("wheel",p)}},[o,e,t.floating,a,i,l]);const h=V.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(i==null?void 0:i.current)||t.floating;if(!(!a.current||!p||!u.current)){if(c.current!==null){const m=p.scrollTop-c.current;(a.current.bottom<-.5&&m<-1||a.current.top<-.5&&m>1)&&Hr.flushSync(()=>l(v=>v+m))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[t.floating,l,a,i]);return V.useMemo(()=>o?{floating:h}:{},[o,h])}let Rn=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Rn.displayName="FloatingContext";let Oi=d.createContext(null);Oi.displayName="PlacementContext";function Gu(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function Ku(){return d.useContext(Rn).setReference}function kv(){return d.useContext(Rn).getReferenceProps}function Xu(){let{getFloatingProps:n,slot:r}=d.useContext(Rn);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function Ju(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(Oi),e=d.useMemo(()=>n,[JSON.stringify(n,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);fe(()=>{r==null||r(e??null)},[r,e]);let t=d.useContext(Rn);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let Zu=4;function ec({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);_v(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:p=0,inner:m}=Cv(e,s),[v,g="center"]=c.split(" ");fe(()=>{u&&a(0)},[u]);let{refs:x,floatingStyles:E,context:w}=xv({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[ki({mainAxis:v==="selection"?0:f,crossAxis:h}),av({padding:p}),v!=="selection"&&Wu({padding:p}),v==="selection"&&m?Dv({...m,padding:p,overflowRef:i,offset:o,minItemsVisible:Zu,referenceOverflowThreshold:p,onFallbackChange(R){var b,S;if(!R)return;let L=w.elements.floating;if(!L)return;let P=parseFloat(getComputedStyle(L).scrollPaddingBottom)||0,N=Math.min(Zu,L.childElementCount),z=0,I=0;for(let te of(S=(b=w.elements.floating)==null?void 0:b.childNodes)!=null?S:[])if(Ke(te)){let M=te.offsetTop,j=M+te.clientHeight+P,Q=L.scrollTop,W=Q+L.clientHeight;if(M>=Q&&j<=W)N--;else{I=Math.max(0,Math.min(j,W)-Math.max(M,Q)),z=te.clientHeight;break}}N>=1&&a(te=>{let M=z*N-I+P;return te>=M?te:M})}}):null,iv({padding:p,apply({availableWidth:R,availableHeight:b,elements:S}){Object.assign(S.floating.style,{overflow:"auto",maxWidth:`${R}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${b}px)`})}})].filter(Boolean),whileElementsMounted:$u}),[k=v,D=g]=w.placement.split("-");v==="selection"&&(k="selection");let T=d.useMemo(()=>({anchor:[k,D].filter(Boolean).join(" ")}),[k,D]),$=Sv(w,{overflowRef:i,onChange:a}),{getReferenceProps:_,getFloatingProps:C}=Ev([$]),O=ee(R=>{l(R),x.setFloating(R)});return V.createElement(Oi.Provider,{value:t},V.createElement(Rn.Provider,{value:{setFloating:O,setReference:x.setReference,styles:E,getReferenceProps:_,getFloatingProps:C,slot:T}},n))}function _v(n){fe(()=>{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 Cv(n,r){var e,t,o;let a=Mi((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=Mi((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Mi((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function Mi(n,r,e=void 0){let t=Qt(),o=ee((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=nc(l,u);return[c,f=>{let h=tc(l);{let p=h.map(m=>window.getComputedStyle(u).getPropertyValue(m));t.requestAnimationFrame(function m(){t.nextFrame(m);let v=!1;for(let[x,E]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(E);if(p[x]!==w){p[x]=w,v=!0;break}}if(!v)return;let g=nc(l,u);c!==g&&(f(g),c=g)})}return t.dispose}]}return[e,null]}),a=d.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=d.useState();return fe(()=>{let[l,u]=o(n,r);if(s(l),!!u)return u(s)},[n,r]),i}function tc(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,...tc(o)]:[t]}return[]}function nc(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 Ov({children:n,freeze:r}){let e=Eo(r,n);return d.createElement(d.Fragment,null,e)}function Eo(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let Do=d.createContext(null);Do.displayName="OpenClosedContext";var He=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(He||{});function jn(){return d.useContext(Do)}function Ti({value:n,children:r}){return d.createElement(Do.Provider,{value:n},r)}function Mv({children:n}){return d.createElement(Do.Provider,{value:null},n)}function Tv(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let bt=[];Tv(()=>{function n(r){if(!Nt(r.target)||r.target===document.body||bt[0]===r.target)return;let e=r.target;e=e.closest(fo),bt.unshift(e??r.target),bt=bt.filter(t=>t!=null&&t.isConnected),bt.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 Pv(n){throw new Error("Unexpected object: "+n)}var se=(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))(se||{});function Wn(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:Pv(n)}}var Pi=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))(Pi||{});function So(n){let r=ee(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,ro(()=>{e.current&&r()})}),[r])}function Iv(){let n=typeof document>"u";return"useSyncExternalStore"in V?(r=>r.useSyncExternalStore)(V)(()=>()=>{},()=>!1,()=>!n):!1}function kr(){let n=Iv(),[r,e]=V.useState(cn.isHandoffComplete);return r&&cn.isHandoffComplete===!1&&e(!1),V.useEffect(()=>{r!==!0&&e(!0)},[r]),V.useEffect(()=>cn.handoff(),[]),n?!1:r}let rc=d.createContext(!1);function Nv(){return d.useContext(rc)}function oc(n){return d.createElement(rc.Provider,{value:n.force},n.children)}function Lv(n){let r=Nv(),e=d.useContext(ic),[t,o]=d.useState(()=>{var a;if(!r&&e!==null)return(a=e.current)!=null?a:null;if(cn.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 ac=d.Fragment,Fv=Ce(function(n,r){let{ownerDocument:e=null,...t}=n,o=d.useRef(null),a=Re(vh(p=>{o.current=p}),r),i=Ft(o),s=e??i,l=Lv(s),[u]=d.useState(()=>{var p;return cn.isServer?null:(p=s==null?void 0:s.createElement("div"))!=null?p:null}),c=d.useContext(Ii),f=kr();fe(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),fe(()=>{if(u&&c)return c.register(u)},[c,u]),So(()=>{var p;!l||!u||(qa(u)&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l)))});let h=Me();return f?!l||!u?null:Ne.createPortal(h({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:ac,name:"Portal"}),u):null});function $v(n,r){let e=Re(r),{enabled:t=!0,ownerDocument:o,...a}=n,i=Me();return t?d.createElement(Fv,{...a,ownerDocument:o,ref:e}):i({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:ac,name:"Portal"})}let Av=d.Fragment,ic=d.createContext(null);function Yv(n,r){let{target:e,...t}=n,o={ref:Re(r)},a=Me();return d.createElement(ic.Provider,{value:e},a({ourProps:o,theirProps:t,defaultTag:Av,name:"Popover.Group"}))}let Ii=d.createContext(null);function Rv(){let n=d.useContext(Ii),r=d.useRef([]),e=ee(a=>(r.current.push(a),n&&n.register(a),()=>t(a))),t=ee(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(Ii.Provider,{value:o},a)},[o])]}let jv=Ce($v),sc=Ce(Yv),Ni=Object.assign(jv,{Group:sc});var Wv=Object.defineProperty,Hv=(n,r,e)=>r in n?Wv(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,lc=(n,r,e)=>(Hv(n,typeof r!="symbol"?r+"":r,e),e),de=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(de||{}),tt=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(tt||{}),en=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(en||{}),uc=(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))(uc||{});function Li(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):ii(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Bv={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,f=r.focus===se.Specific?r.idx:Wn(r,{resolveItems:()=>u,resolveActiveIndex:()=>{var p,m;return(m=(p=n.activeOptionIndex)!=null?p:u.findIndex(v=>!c(v)))!=null?m:null},resolveDisabled:c,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=Li(n);if(i.activeOptionIndex===null){let u=i.options.findIndex(c=>!c.dataRef.current.disabled);u!==-1&&(i.activeOptionIndex=u)}let s=r.focus===se.Specific?r.idx:Wn(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=Li(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=Li(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}},Vv=class df extends Ga{constructor(r){super(r),lc(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Le(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:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),(t=(e=this.state.dataRef.current).onClose)==null||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(e!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:se.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),lc(this,"selectors",{activeDescendantId:e=>{var t,o;let a=this.selectors.activeOptionIndex(e);if(a!==null)return e.virtual?(o=e.options.find(i=>!i.dataRef.current.disabled&&e.dataRef.current.compare(i.dataRef.current.value,e.virtual.options[a])))==null?void 0:o.id:(t=e.options[a])==null?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&e.activeOptionIndex===null&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:o,disabled:a}=e.virtual,i=o.findIndex(s=>{var l;return!((l=a==null?void 0:a(s))!=null&&l)});if(i!==-1)return i}let t=e.options.findIndex(o=>!o.dataRef.current.disabled);if(t!==-1)return t}return e.activeOptionIndex},activeOption:e=>{var t,o;let a=this.selectors.activeOptionIndex(e);return a===null?null:e.virtual?e.virtual.options[a??0]:(o=(t=e.options[a])==null?void 0:t.dataRef.current.value)!=null?o:null},isActive:(e,t,o)=>{var a;let i=this.selectors.activeOptionIndex(e);return i===null?!1:e.virtual?i===e.dataRef.current.calculateIndex(t):((a=e.options[i])==null?void 0:a.id)===o},shouldScrollIntoView:(e,t,o)=>!(e.virtual||e.__demoMode||e.comboboxState!==0||e.activationTrigger===0||!this.selectors.isActive(e,t,o))});{let e=this.state.id,t=In.get(null);this.disposables.add(t.on(Ja.Push,o=>{!t.selectors.isTop(o,e)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:r,virtual:e=null,__demoMode:t=!1}){var o;return new df({id:r,dataRef:{current:{}},comboboxState:t?0:1,isTyping:!1,options:[],virtual:e?{options:e.options,disabled:(o=e.disabled)!=null?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:t})}reduce(r,e){return Le(e.type,Bv,r,e)}};const cc=d.createContext(null);function _r(n){let r=d.useContext(cc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,dc),e}return r}function dc({id:n,virtual:r=null,__demoMode:e=!1}){let t=d.useMemo(()=>Vv.new({id:n,virtual:r,__demoMode:e}),[]);return So(()=>t.dispose()),t}let Cr=d.createContext(null);Cr.displayName="ComboboxDataContext";function Hn(n){let r=d.useContext(Cr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Hn),e}return r}let fc=d.createContext(null);function zv(n){let r=_r("VirtualProvider"),e=Hn("VirtualProvider"),{options:t}=e.virtual,o=we(r,p=>p.optionsElement),[a,i]=d.useMemo(()=>{let p=o;if(!p)return[0,0];let m=window.getComputedStyle(p);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[o]),s=Ah({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);fe(()=>{u(p=>p+1)},[t]);let c=s.getVirtualItems(),f=we(r,p=>p.activationTrigger===en.Pointer),h=we(r,r.selectors.activeOptionIndex);return c.length===0?null:d.createElement(fc.Provider,{value:s},d.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:p=>{p&&(f||h!==null&&t.length>h&&s.scrollToIndex(h))}},c.map(p=>{var m;return d.createElement(d.Fragment,{key:p.key},d.cloneElement((m=n.children)==null?void 0:m.call(n,{...n.slot,option:t[p.index]}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":t.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let qv=d.Fragment;function Uv(n,r){let e=d.useId(),t=oo(),{value:o,defaultValue:a,onChange:i,form:s,name:l,by:u,invalid:c=!1,disabled:f=t||!1,onClose:h,__demoMode:p=!1,multiple:m=!1,immediate:v=!1,virtual:g=null,nullable:x,...E}=n,w=Il(a),[k=m?[]:void 0,D]=Pl(o,i,w),T=dc({id:e,virtual:g,__demoMode:p}),$=d.useRef({static:!1,hold:!1}),_=Jl(u),C=ee(H=>g?u===null?g.options.indexOf(H):g.options.findIndex(G=>_(G,H)):T.state.options.findIndex(G=>_(G.dataRef.current.value,H))),O=d.useCallback(H=>Le(S.mode,{[tt.Multi]:()=>k.some(G=>_(G,H)),[tt.Single]:()=>_(k,H)}),[k]),R=we(T,H=>H.virtual),b=ee(()=>h==null?void 0:h()),S=d.useMemo(()=>({__demoMode:p,immediate:v,optionsPropsRef:$,value:k,defaultValue:w,disabled:f,invalid:c,mode:m?tt.Multi:tt.Single,virtual:g?R:null,onChange:D,isSelected:O,calculateIndex:C,compare:_,onClose:b}),[k,w,f,c,m,D,O,p,T,g,R,b]);fe(()=>{var H;g&&T.send({type:uc.UpdateVirtualConfiguration,options:g.options,disabled:(H=g.disabled)!=null?H:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),fe(()=>{T.state.dataRef.current=S},[S]);let[L,P,N,z]=we(T,H=>[H.comboboxState,H.buttonElement,H.inputElement,H.optionsElement]),I=In.get(null),te=we(I,d.useCallback(H=>I.selectors.isTop(H,e),[I,e]));li(te,[P,N,z],()=>T.actions.closeCombobox());let M=we(T,T.selectors.activeOptionIndex),j=we(T,T.selectors.activeOption),Q=d.useMemo(()=>({open:L===de.Open,disabled:f,invalid:c,activeIndex:M,activeOption:j,value:k}),[S,f,k,c,j,L]),[W,F]=zl(),ne=r===null?{}:{ref:r},q=d.useCallback(()=>{if(w!==void 0)return D==null?void 0:D(w)},[D,w]),A=Me();return d.createElement(F,{value:W,props:{htmlFor:N==null?void 0:N.id},slot:{open:L===de.Open,disabled:f}},d.createElement(ec,null,d.createElement(Cr.Provider,{value:S},d.createElement(cc.Provider,{value:T},d.createElement(Ti,{value:Le(L,{[de.Open]:He.Open,[de.Closed]:He.Closed})},l!=null&&d.createElement($l,{disabled:f,data:k!=null?{[l]:k}:{},form:s,onReset:q}),A({ourProps:ne,theirProps:E,slot:Q,defaultTag:qv,name:"Combobox"}))))))}let Qv="input";function Gv(n,r){var e,t;let o=_r("Combobox.Input"),a=Hn("Combobox.Input"),i=d.useId(),s=za(),{id:l=s||`headlessui-combobox-input-${i}`,onChange:u,displayValue:c,disabled:f=a.disabled||!1,autoFocus:h=!1,type:p="text",...m}=n,[v]=we(o,F=>[F.inputElement]),g=d.useRef(null),x=Re(g,r,Ku(),o.actions.setInputElement),E=Ft(v),[w,k]=we(o,F=>[F.comboboxState,F.isTyping]),D=Qt(),T=ee(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:se.Nothing})}),$=d.useMemo(()=>{var F;return typeof c=="function"&&a.value!==void 0?(F=c(a.value))!=null?F:"":typeof a.value=="string"?a.value:""},[a.value,c]);wr(([F,ne],[q,A])=>{if(o.state.isTyping)return;let H=g.current;H&&((A===de.Open&&ne===de.Closed||F!==q)&&(H.value=F),requestAnimationFrame(()=>{if(o.state.isTyping||!H||(E==null?void 0:E.activeElement)!==H)return;let{selectionStart:G,selectionEnd:X}=H;Math.abs((X??0)-(G??0))===0&&G===0&&H.setSelectionRange(H.value.length,H.value.length)}))},[$,w,E,k]),wr(([F],[ne])=>{if(F===de.Open&&ne===de.Closed){if(o.state.isTyping)return;let q=g.current;if(!q)return;let A=q.value,{selectionStart:H,selectionEnd:G,selectionDirection:X}=q;q.value="",q.value=A,X!==null?q.setSelectionRange(H,G,X):q.setSelectionRange(H,G)}},[w]);let _=d.useRef(!1),C=ee(()=>{_.current=!0}),O=ee(()=>{D.nextFrame(()=>{_.current=!1})}),R=ee(F=>{switch(o.actions.setIsTyping(!0),F.key){case he.Enter:if(o.state.comboboxState!==de.Open||_.current)return;if(F.preventDefault(),F.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),a.mode===tt.Single&&o.actions.closeCombobox();break;case he.ArrowDown:return F.preventDefault(),F.stopPropagation(),Le(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Next}),[de.Closed]:()=>o.actions.openCombobox()});case he.ArrowUp:return F.preventDefault(),F.stopPropagation(),Le(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Previous}),[de.Closed]:()=>{Ne.flushSync(()=>o.actions.openCombobox()),a.value||o.actions.goToOption({focus:se.Last})}});case he.Home:if(F.shiftKey)break;return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.First});case he.PageUp:return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.First});case he.End:if(F.shiftKey)break;return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.Last});case he.PageDown:return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.Last});case he.Escape:return o.state.comboboxState!==de.Open?void 0:(F.preventDefault(),o.state.optionsElement&&!a.optionsPropsRef.current.static&&F.stopPropagation(),a.mode===tt.Single&&a.value===null&&T(),o.actions.closeCombobox());case he.Tab:if(o.state.comboboxState!==de.Open)return;a.mode===tt.Single&&o.state.activationTrigger!==en.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),b=ee(F=>{u==null||u(F),a.mode===tt.Single&&F.target.value===""&&T(),o.actions.openCombobox()}),S=ee(F=>{var ne,q,A;let H=(ne=F.relatedTarget)!=null?ne:bt.find(G=>G!==F.currentTarget);if(!((q=o.state.optionsElement)!=null&&q.contains(H))&&!((A=o.state.buttonElement)!=null&&A.contains(H))&&o.state.comboboxState===de.Open)return F.preventDefault(),a.mode===tt.Single&&a.value===null&&T(),o.actions.closeCombobox()}),L=ee(F=>{var ne,q,A;let H=(ne=F.relatedTarget)!=null?ne:bt.find(G=>G!==F.currentTarget);(q=o.state.buttonElement)!=null&&q.contains(H)||(A=o.state.optionsElement)!=null&&A.contains(H)||a.disabled||a.immediate&&o.state.comboboxState!==de.Open&&D.microTask(()=>{Ne.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(en.Focus)})}),P=mr(),N=Hl(),{isFocused:z,focusProps:I}=Wa({autoFocus:h}),{isHovered:te,hoverProps:M}=ja({isDisabled:f}),j=we(o,F=>F.optionsElement),Q=d.useMemo(()=>({open:w===de.Open,disabled:f,invalid:a.invalid,hover:te,focus:z,autofocus:h}),[a,te,z,h,f,a.invalid]),W=pr({ref:x,id:l,role:"combobox",type:p,"aria-controls":j==null?void 0:j.id,"aria-expanded":w===de.Open,"aria-activedescendant":we(o,o.selectors.activeDescendantId),"aria-labelledby":P,"aria-describedby":N,"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:f||void 0,autoFocus:h,onCompositionStart:C,onCompositionEnd:O,onKeyDown:R,onChange:b,onFocus:L,onBlur:S},I,M);return Me()({ourProps:W,theirProps:m,slot:Q,defaultTag:Qv,name:"Combobox.Input"})}let Kv="button";function Xv(n,r){let e=_r("Combobox.Button"),t=Hn("Combobox.Button"),[o,a]=d.useState(null),i=Re(r,a,e.actions.setButtonElement),s=d.useId(),{id:l=`headlessui-combobox-button-${s}`,disabled:u=t.disabled||!1,autoFocus:c=!1,...f}=n,[h,p,m]=we(e,b=>[b.comboboxState,b.inputElement,b.optionsElement]),v=vu(p),g=h===de.Open;mu(g,{trigger:o,action:d.useCallback(b=>{if(o!=null&&o.contains(b.target)||p!=null&&p.contains(b.target))return $t.Ignore;let S=b.target.closest('[role="option"]:not([data-disabled])');return Ke(S)?$t.Select(S):m!=null&&m.contains(b.target)?$t.Ignore:$t.Close},[o,p,m]),close:e.actions.closeCombobox,select:e.actions.selectActiveOption});let x=ee(b=>{switch(b.key){case he.Space:case he.Enter:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&Ne.flushSync(()=>e.actions.openCombobox()),v();return;case he.ArrowDown:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Ne.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.First})),v();return;case he.ArrowUp:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Ne.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.Last})),v();return;case he.Escape:if(e.state.comboboxState!==de.Open)return;b.preventDefault(),e.state.optionsElement&&!t.optionsPropsRef.current.static&&b.stopPropagation(),Ne.flushSync(()=>e.actions.closeCombobox()),v();return;default:return}}),E=ee(b=>{b.preventDefault(),!Rl(b.currentTarget)&&(b.button===Pi.Left&&(e.state.comboboxState===de.Open?e.actions.closeCombobox():e.actions.openCombobox()),v())}),w=mr([l]),{isFocusVisible:k,focusProps:D}=Wa({autoFocus:c}),{isHovered:T,hoverProps:$}=ja({isDisabled:u}),{pressed:_,pressProps:C}=Ml({disabled:u}),O=d.useMemo(()=>({open:h===de.Open,active:_||h===de.Open,disabled:u,invalid:t.invalid,value:t.value,hover:T,focus:k}),[t,T,k,_,u,h]),R=pr({ref:i,id:l,type:gu(n,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":h===de.Open,"aria-labelledby":w,disabled:u||void 0,autoFocus:c,onPointerDown:E,onKeyDown:x},D,$,C);return Me()({ourProps:R,theirProps:f,slot:O,defaultTag:Kv,name:"Combobox.Button"})}let Jv="div",Zv=Gt.RenderStrategy|Gt.Static;function eg(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:f=!1,...h}=n,p=_r("Combobox.Options"),m=Hn("Combobox.Options"),v=Gu(l);v&&(u=!0);let[g,x]=Ju(v),[E,w]=d.useState(null),k=Xu(),D=Re(r,v?g:null,p.actions.setOptionsElement,w),[T,$,_,C,O]=we(p,X=>[X.comboboxState,X.inputElement,X.buttonElement,X.optionsElement,X.activationTrigger]),R=Ft($||_),b=Ft(C),S=jn(),[L,P]=fi(f,E,S!==null?(S&He.Open)===He.Open:T===de.Open);ri(L,$,p.actions.closeCombobox);let N=m.__demoMode?!1:c&&T===de.Open;ci(N,b);let z=m.__demoMode?!1:c&&T===de.Open;ni(z,{allowed:d.useCallback(()=>[$,_,C],[$,_,C])}),fe(()=>{var X;m.optionsPropsRef.current.static=(X=n.static)!=null?X:!1},[m.optionsPropsRef,n.static]),fe(()=>{m.optionsPropsRef.current.hold=s},[m.optionsPropsRef,s]),wm(T===de.Open,{container:C,accept(X){return X.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:X.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(X){X.setAttribute("role","none")}});let I=mr([_==null?void 0:_.id]),te=d.useMemo(()=>({open:T===de.Open,option:void 0}),[T]),M=ee(()=>{p.actions.setActivationTrigger(en.Pointer)}),j=ee(X=>{X.preventDefault(),p.actions.setActivationTrigger(en.Pointer)}),Q=pr(v?k():{},{"aria-labelledby":I,role:"listbox","aria-multiselectable":m.mode===tt.Multi?!0:void 0,id:i,ref:D,style:{...h.style,...x,"--input-width":Ua($,!0).width,"--button-width":Ua(_,!0).width},onWheel:O===en.Pointer?void 0:M,onMouseDown:j,...di(P)}),W=L&&T===de.Closed,F=Eo(W,(e=m.virtual)==null?void 0:e.options),ne=Eo(W,m.value),q=ee(X=>m.compare(ne,X)),A=d.useMemo(()=>{if(!m.virtual)return m;if(F===void 0)throw new Error("Missing `options` in virtual mode");return F!==m.virtual.options?{...m,virtual:{...m.virtual,options:F}}:m},[m,F,(t=m.virtual)==null?void 0:t.options]);m.virtual&&Object.assign(h,{children:d.createElement(Cr.Provider,{value:A},d.createElement(zv,{slot:te},h.children))});let H=Me(),G=d.useMemo(()=>m.mode===tt.Multi?m:{...m,isSelected:q},[m,q]);return d.createElement(Ni,{enabled:u?n.static||L:!1,ownerDocument:R},d.createElement(Cr.Provider,{value:G},H({ourProps:Q,theirProps:{...h,children:d.createElement(Ov,{freeze:W},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,te):h.children)},slot:te,defaultTag:Jv,features:Zv,visible:L,name:"Combobox.Options"})))}let tg="div";function ng(n,r){var e,t,o;let a=Hn("Combobox.Option"),i=_r("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:f=null,...h}=n,[p]=we(i,P=>[P.inputElement]),m=vu(p),v=we(i,d.useCallback(P=>i.selectors.isActive(P,u,l),[u,l])),g=a.isSelected(u),x=d.useRef(null),E=Pt({disabled:c,value:u,domRef:x,order:f}),w=d.useContext(fc),k=Re(r,x,w?w.measureElement:null),D=ee(()=>{i.actions.setIsTyping(!1),i.actions.onChange(u)});fe(()=>i.actions.registerOption(l,E),[E,l]);let T=we(i,d.useCallback(P=>i.selectors.shouldScrollIntoView(P,u,l),[u,l]));fe(()=>{if(T)return rt().requestAnimationFrame(()=>{var P,N;(N=(P=x.current)==null?void 0:P.scrollIntoView)==null||N.call(P,{block:"nearest"})})},[T,x]);let $=ee(P=>{P.preventDefault(),P.button===Pi.Left&&(c||(D(),si()||requestAnimationFrame(()=>m()),a.mode===tt.Single&&i.actions.closeCombobox()))}),_=ee(()=>{if(c)return i.actions.goToOption({focus:se.Nothing});let P=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:P})}),C=yu(),O=ee(P=>C.update(P)),R=ee(P=>{if(!C.wasMoved(P)||c||v)return;let N=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:N},en.Pointer)}),b=ee(P=>{C.wasMoved(P)&&(c||v&&(a.optionsPropsRef.current.hold||i.actions.goToOption({focus:se.Nothing})))}),S=d.useMemo(()=>({active:v,focus:v,selected:g,disabled:c}),[v,g,c]),L={id:l,ref:k,role:"option",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:$,onFocus:_,onPointerEnter:O,onMouseEnter:O,onPointerMove:R,onMouseMove:R,onPointerLeave:b,onMouseLeave:b};return Me()({ourProps:L,theirProps:h,slot:S,defaultTag:tg,name:"Combobox.Option"})}let rg=Ce(Uv),og=Ce(Xv),pc=Ce(Gv),ag=uo,hc=Ce(eg),mc=Ce(ng),ig=Object.assign(rg,{Input:pc,Button:og,Label:ag,Options:hc,Option:mc});function sg(n,r=typeof document<"u"?document.defaultView:null,e){let t=br(n,"escape");ui(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===he.Escape&&e(o))})}function lg(){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 fe(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),e}function ug({defaultContainers:n=[],portals:r,mainTreeNode:e}={}){let t=Ft(e),o=ee(()=>{var a,i;let s=[];for(let l of n)l!==null&&(It(l)?s.push(l):"current"in l&&It(l.current)&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=t==null?void 0:t.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&It(l)&&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:ee(a=>o().some(i=>i.contains(a)))}}let vc=d.createContext(null);function gc({children:n,node:r}){let[e,t]=d.useState(null),o=bc(r??e);return d.createElement(vc.Provider,{value:o},n,o===null&&d.createElement(hr,{features:Tn.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=dn(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&It(l)&&l!=null&&l.contains(a)){t(l);break}}}}))}function bc(n=null){var r;return(r=d.useContext(vc))!=null?r:n}function Fi(){let n=d.useRef(!1);return fe(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Or=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Or||{});function cg(){let n=d.useRef(0);return pu(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function yc(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)It(e.current)&&r.add(e.current);return r}let dg="div";var vn=(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))(vn||{});function fg(n,r){let e=d.useRef(null),t=Re(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;kr()||(s=0);let u=Ft(e);vg(s,{ownerDocument:u});let c=gg(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});bg(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let f=cg(),h=ee(E=>{if(!Ke(e.current))return;let w=e.current;(k=>k())(()=>{Le(f.current,{[Or.Forwards]:()=>{Nn(w,dt.First,{skipElements:[E.relatedTarget,a]})},[Or.Backwards]:()=>{Nn(w,dt.Last,{skipElements:[E.relatedTarget,a]})}})})}),p=br(!!(s&2),"focus-trap#tab-lock"),m=Qt(),v=d.useRef(!1),g={ref:t,onKeyDown(E){E.key=="Tab"&&(v.current=!0,m.requestAnimationFrame(()=>{v.current=!1}))},onBlur(E){if(!(s&4))return;let w=yc(i);Ke(e.current)&&w.add(e.current);let k=E.relatedTarget;Nt(k)&&k.dataset.headlessuiFocusGuard!=="true"&&(wc(w,k)||(v.current?Nn(e.current,Le(f.current,{[Or.Forwards]:()=>dt.Next,[Or.Backwards]:()=>dt.Previous})|dt.WrapAround,{relativeTo:E.target}):Nt(E.target)&&Lt(E.target)))}},x=Me();return d.createElement(d.Fragment,null,p&&d.createElement(hr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Tn.Focusable}),x({ourProps:g,theirProps:l,defaultTag:dg,name:"FocusTrap"}),p&&d.createElement(hr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:Tn.Focusable}))}let pg=Ce(fg),hg=Object.assign(pg,{features:vn});function mg(n=!0){let r=d.useRef(bt.slice());return wr(([e],[t])=>{t===!0&&e===!1&&ro(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=bt.slice())},[n,bt,r]),ee(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function vg(n,{ownerDocument:r}){let e=!!(n&8),t=mg(e);wr(()=>{e||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&Lt(t())},[e]),So(()=>{e&&Lt(t())})}function gg(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=br(!!(n&1),"focus-trap#initial-focus"),s=Fi();return wr(()=>{if(n===0)return;if(!i){o!=null&&o.current&&Lt(o.current);return}let l=e.current;l&&ro(()=>{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,dt.First|dt.AutoFocus)!==oi.Error)return}else if(Nn(l,dt.First)!==oi.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 bg(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=Fi(),i=!!(n&4);ui(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=yc(t);Ke(e.current)&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;Ke(c)?wc(l,c)?(o.current=c,Lt(c)):(s.preventDefault(),s.stopPropagation(),Lt(u)):Lt(o.current)},!0)}function wc(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function xc(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:Dc)!==d.Fragment||d.Children.count(n.children)===1}let ko=d.createContext(null);ko.displayName="TransitionContext";var yg=(n=>(n.Visible="visible",n.Hidden="hidden",n))(yg||{});function wg(){let n=d.useContext(ko);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function xg(){let n=d.useContext(_o);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let _o=d.createContext(null);_o.displayName="NestingContext";function Co(n){return"children"in n?Co(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Ec(n,r){let e=Pt(n),t=d.useRef([]),o=Fi(),a=Qt(),i=ee((p,m=Kt.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===p);v!==-1&&(Le(m,{[Kt.Unmount](){t.current.splice(v,1)},[Kt.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!Co(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=ee(p=>{let m=t.current.find(({el:v})=>v===p);return m?m.state!=="visible"&&(m.state="visible"):t.current.push({el:p,state:"visible"}),()=>i(p,Kt.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),f=ee((p,m,v)=>{l.current.splice(0),r&&(r.chains.current[m]=r.chains.current[m].filter(([g])=>g!==p)),r==null||r.chains.current[m].push([p,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[m].push([p,new Promise(g=>{Promise.all(c.current[m].map(([x,E])=>E)).then(()=>g())})]),m==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(m)):v(m)}),h=ee((p,m,v)=>{Promise.all(c.current[m].splice(0).map(([g,x])=>x)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(m))});return d.useMemo(()=>({children:t,register:s,unregister:i,onStart:f,onStop:h,wait:u,chains:c}),[s,i,t,f,h,c,u])}let Dc=d.Fragment,Sc=Gt.RenderStrategy;function Eg(n,r){var e,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:p,leaveFrom:m,leaveTo:v,...g}=n,[x,E]=d.useState(null),w=d.useRef(null),k=xc(n),D=Re(...k?[w,r,E]:r===null?[]:[r]),T=(e=g.unmount)==null||e?Kt.Unmount:Kt.Hidden,{show:$,appear:_,initial:C}=wg(),[O,R]=d.useState($?"visible":"hidden"),b=xg(),{register:S,unregister:L}=b;fe(()=>S(w),[S,w]),fe(()=>{if(T===Kt.Hidden&&w.current){if($&&O!=="visible"){R("visible");return}return Le(O,{hidden:()=>L(w),visible:()=>S(w)})}},[O,w,S,L,$,T]);let P=kr();fe(()=>{if(k&&P&&O==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,O,P,k]);let N=C&&!_,z=_&&$&&C,I=d.useRef(!1),te=Ec(()=>{I.current||(R("hidden"),L(w))},b),M=ee(A=>{I.current=!0;let H=A?"enter":"leave";te.onStart(w,H,G=>{G==="enter"?a==null||a():G==="leave"&&(s==null||s())})}),j=ee(A=>{let H=A?"enter":"leave";I.current=!1,te.onStop(w,H,G=>{G==="enter"?i==null||i():G==="leave"&&(l==null||l())}),H==="leave"&&!Co(te)&&(R("hidden"),L(w))});d.useEffect(()=>{k&&o||(M($),j($))},[$,k,o]);let Q=!(!o||!k||!P||N),[,W]=fi(Q,x,$,{start:M,end:j}),F=Xt({ref:D,className:((t=Ba(g.className,z&&u,z&&c,W.enter&&u,W.enter&&W.closed&&c,W.enter&&!W.closed&&f,W.leave&&p,W.leave&&!W.closed&&m,W.leave&&W.closed&&v,!W.transition&&$&&h))==null?void 0:t.trim())||void 0,...di(W)}),ne=0;O==="visible"&&(ne|=He.Open),O==="hidden"&&(ne|=He.Closed),$&&O==="hidden"&&(ne|=He.Opening),!$&&O==="visible"&&(ne|=He.Closing);let q=Me();return d.createElement(_o.Provider,{value:te},d.createElement(Ti,{value:ne},q({ourProps:F,theirProps:g,defaultTag:Dc,features:Sc,visible:O==="visible",name:"Transition.Child"})))}function Dg(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=xc(n),l=Re(...s?[i,r]:r===null?[]:[r]);kr();let u=jn();if(e===void 0&&u!==null&&(e=(u&He.Open)===He.Open),e===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=d.useState(e?"visible":"hidden"),h=Ec(()=>{e||f("hidden")}),[p,m]=d.useState(!0),v=d.useRef([e]);fe(()=>{p!==!1&&v.current[v.current.length-1]!==e&&(v.current.push(e),m(!1))},[v,e]);let g=d.useMemo(()=>({show:e,appear:t,initial:p}),[e,t,p]);fe(()=>{e?f("visible"):!Co(h)&&i.current!==null&&f("hidden")},[e,h]);let x={unmount:o},E=ee(()=>{var D;p&&m(!1),(D=n.beforeEnter)==null||D.call(n)}),w=ee(()=>{var D;p&&m(!1),(D=n.beforeLeave)==null||D.call(n)}),k=Me();return d.createElement(_o.Provider,{value:h},d.createElement(ko.Provider,{value:g},k({ourProps:{...x,as:d.Fragment,children:d.createElement(kc,{ref:l,...x,...a,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:Sc,visible:c==="visible",name:"Transition"})))}function Sg(n,r){let e=d.useContext(ko)!==null,t=jn()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement($i,{ref:r,...n}):d.createElement(kc,{ref:r,...n}))}let $i=Ce(Dg),kc=Ce(Eg),Ai=Ce(Sg),_c=Object.assign($i,{Child:Ai,Root:$i});var kg=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(kg||{}),_g=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(_g||{});let Cg={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},Yi=d.createContext(null);Yi.displayName="DialogContext";function Oo(n){let r=d.useContext(Yi);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Oo),e}return r}function Og(n,r){return Le(r.type,Cg,n,r)}let Cc=Ce(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,...f}=n,h=d.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=jn();o===void 0&&p!==null&&(o=(p&He.Open)===He.Open);let m=d.useRef(null),v=Re(m,r),g=Ft(m),x=o?0:1,[E,w]=d.useReducer(Og,{titleId:null,descriptionId:null,panelRef:d.createRef()}),k=ee(()=>a(!1)),D=ee(W=>w({type:0,id:W})),T=kr()?x===0:!1,[$,_]=Rv(),C={get current(){var W;return(W=E.panelRef.current)!=null?W:m.current}},O=bc(),{resolveContainers:R}=ug({mainTreeNode:O,portals:$,defaultContainers:[C]}),b=p!==null?(p&He.Closing)===He.Closing:!1;ni(u||b?!1:T,{allowed:ee(()=>{var W,F;return[(F=(W=m.current)==null?void 0:W.closest("[data-headlessui-portal]"))!=null?F:null]}),disallowed:ee(()=>{var W;return[(W=O==null?void 0:O.closest("body > *:not(#headlessui-portal-root)"))!=null?W:null]})});let S=In.get(null);fe(()=>{if(T)return S.actions.push(t),()=>S.actions.pop(t)},[S,t,T]);let L=we(S,d.useCallback(W=>S.selectors.isTop(W,t),[S,t]));li(L,R,W=>{W.preventDefault(),k()}),sg(L,g==null?void 0:g.defaultView,W=>{W.preventDefault(),W.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),k()}),ci(u||b?!1:T,g,R),ri(T,m,k);let[P,N]=gh(),z=d.useMemo(()=>[{dialogState:x,close:k,setTitleId:D,unmount:c},E],[x,E,k,D,c]),I=d.useMemo(()=>({open:x===0}),[x]),te={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:x===0?!0:void 0,"aria-labelledby":E.titleId,"aria-describedby":P,unmount:c},M=!lg(),j=vn.None;T&&!u&&(j|=vn.RestoreFocus,j|=vn.TabLock,l&&(j|=vn.AutoFocus),M&&(j|=vn.InitialFocus));let Q=Me();return d.createElement(Mv,null,d.createElement(oc,{force:!0},d.createElement(Ni,null,d.createElement(Yi.Provider,{value:z},d.createElement(sc,{target:m},d.createElement(oc,{force:!1},d.createElement(N,{slot:I},d.createElement(_,null,d.createElement(hg,{initialFocus:i,initialFocusFallback:m,containers:R,features:j},d.createElement(kh,{value:k},Q({ourProps:te,theirProps:f,slot:I,defaultTag:Mg,features:Tg,visible:x===0,name:"Dialog"})))))))))))}),Mg="div",Tg=Gt.RenderStrategy|Gt.Static;function Pg(n,r){let{transition:e=!1,open:t,...o}=n,a=jn(),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(gc,null,d.createElement(_c,{show:t,transition:e,unmount:o.unmount},d.createElement(Cc,{ref:r,...o}))):d.createElement(gc,null,d.createElement(Cc,{ref:r,open:t,...o}))}let Ig="div";function Ng(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Oo("Dialog.Panel"),u=Re(r,l.panelRef),c=d.useMemo(()=>({open:i===0}),[i]),f=ee(g=>{g.stopPropagation()}),h={ref:u,id:t,onClick:f},p=o?Ai:d.Fragment,m=o?{unmount:s}:{},v=Me();return d.createElement(p,{...m},v({ourProps:h,theirProps:a,slot:c,defaultTag:Ig,name:"Dialog.Panel"}))}let Lg="div";function Fg(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Oo("Dialog.Backdrop"),i=d.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0},l=e?Ai:d.Fragment,u=e?{unmount:a}:{},c=Me();return d.createElement(l,{...u},c({ourProps:s,theirProps:t,slot:i,defaultTag:Lg,name:"Dialog.Backdrop"}))}let $g="h2";function Ag(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Oo("Dialog.Title"),s=Re(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=d.useMemo(()=>({open:a===0}),[a]),u={ref:s,id:t};return Me()({ourProps:u,theirProps:o,slot:l,defaultTag:$g,name:"Dialog.Title"})}let Yg=Ce(Pg),Oc=Ce(Ng);Ce(Fg);let Mc=Ce(Ag),Mr=Object.assign(Yg,{Panel:Oc,Title:Mc,Description:Bl});function Rg(n,r){let e=d.useRef({left:0,top:0});if(fe(()=>{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 Tc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Pc(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!Ke(o))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 Tc.test(i)&&(i=i.replace(Tc,"")),i}function jg(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():Pc(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return Pc(n).trim()}function Wg(n){let r=d.useRef(""),e=d.useRef("");return ee(()=>{let t=n.current;if(!t)return"";let o=t.innerText;if(r.current===o)return e.current;let a=jg(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var Hg=Object.defineProperty,Bg=(n,r,e)=>r in n?Hg(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Ic=(n,r,e)=>(Bg(n,typeof r!="symbol"?r+"":r,e),e),Ve=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Ve||{}),yt=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(yt||{}),Ri=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(Ri||{}),Nc=(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))(Nc||{});function Lc(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=ii(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 Vg={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,pendingFocus:{focus:se.Nothing},listboxState:1,__demoMode:!1}},0(n,r){if(n.dataRef.current.disabled||n.listboxState===0)return n;let e=n.activeOptionIndex,{isSelected:t}=n.dataRef.current,o=n.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(e=o),{...n,pendingFocus:r.focus,listboxState:0,activeOptionIndex:e,__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===se.Nothing)return{...s,activeOptionIndex:null};if(r.focus===se.Specific)return{...s,activeOptionIndex:n.options.findIndex(c=>c.id===r.id)};if(r.focus===se.Previous){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,h=Wn(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(((t=f.current)==null?void 0:t.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:h}}}}else if(r.focus===se.Next){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,h=Wn(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=Lc(n),u=Wn(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.pendingFocus.focus!==se.Nothing&&(t=Wn(n.pendingFocus,{resolveItems:()=>e,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),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,pendingFocus:{focus:se.Nothing},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,...Lc(n),pendingShouldSort:!1}:n},zg=class ff extends Ga{constructor(r){super(r),Ic(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Le(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:Xa(()=>{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:Xa(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:6,options:e.splice(0)})}]}),goToOption:Xa(()=>{let e=null;return[(t,o)=>{e={type:2,...t,trigger:o}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},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:se.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})}}),Ic(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})})});{let e=this.state.id,t=In.get(null);this.disposables.add(t.on(Ja.Push,o=>{!t.selectors.isTop(o,e)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:r,__demoMode:e=!1}){return new ff({id:r,dataRef:{current:{}},listboxState:e?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:se.Nothing},__demoMode:e})}reduce(r,e){return Le(e.type,Vg,r,e)}};const Fc=d.createContext(null);function ji(n){let r=d.useContext(Fc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,$c),e}return r}function $c({id:n,__demoMode:r=!1}){let e=d.useMemo(()=>zg.new({id:n,__demoMode:r}),[]);return So(()=>e.dispose()),e}let Mo=d.createContext(null);Mo.displayName="ListboxDataContext";function Tr(n){let r=d.useContext(Mo);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Tr),e}return r}let qg=d.Fragment;function Ug(n,r){let e=d.useId(),t=oo(),{value:o,defaultValue:a,form:i,name:s,onChange:l,by:u,invalid:c=!1,disabled:f=t||!1,horizontal:h=!1,multiple:p=!1,__demoMode:m=!1,...v}=n;const g=h?"horizontal":"vertical";let x=Re(r),E=Il(a),[w=p?[]:void 0,k]=Pl(o,l,E),D=$c({id:e,__demoMode:m}),T=d.useRef({static:!1,hold:!1}),$=d.useRef(new Map),_=Jl(u),C=d.useCallback(Q=>Le(O.mode,{[yt.Multi]:()=>w.some(W=>_(W,Q)),[yt.Single]:()=>_(w,Q)}),[w]),O=d.useMemo(()=>({value:w,disabled:f,invalid:c,mode:p?yt.Multi:yt.Single,orientation:g,onChange:k,compare:_,isSelected:C,optionsPropsRef:T,listRef:$}),[w,f,c,p,g,k,_,C,T,$]);fe(()=>{D.state.dataRef.current=O},[O]);let R=we(D,Q=>Q.listboxState),b=In.get(null),S=we(b,d.useCallback(Q=>b.selectors.isTop(Q,e),[b,e])),[L,P]=we(D,Q=>[Q.buttonElement,Q.optionsElement]);li(S,[L,P],(Q,W)=>{D.send({type:Nc.CloseListbox}),du(W,ai.Loose)||(Q.preventDefault(),L==null||L.focus())});let N=d.useMemo(()=>({open:R===Ve.Open,disabled:f,invalid:c,value:w}),[R,f,c,w]),[z,I]=zl({inherit:!0}),te={ref:x},M=d.useCallback(()=>{if(E!==void 0)return k==null?void 0:k(E)},[k,E]),j=Me();return d.createElement(I,{value:z,props:{htmlFor:L==null?void 0:L.id},slot:{open:R===Ve.Open,disabled:f}},d.createElement(ec,null,d.createElement(Fc.Provider,{value:D},d.createElement(Mo.Provider,{value:O},d.createElement(Ti,{value:Le(R,{[Ve.Open]:He.Open,[Ve.Closed]:He.Closed})},s!=null&&w!=null&&d.createElement($l,{disabled:f,data:{[s]:w},form:i,onReset:M}),j({ourProps:te,theirProps:v,slot:N,defaultTag:qg,name:"Listbox"}))))))}let Qg="button";function Gg(n,r){let e=d.useId(),t=za(),o=Tr("Listbox.Button"),a=ji("Listbox.Button"),{id:i=t||`headlessui-listbox-button-${e}`,disabled:s=o.disabled||!1,autoFocus:l=!1,...u}=n,c=Re(r,Ku(),a.actions.setButtonElement),f=kv(),[h,p,m]=we(a,P=>[P.listboxState,P.buttonElement,P.optionsElement]),v=h===Ve.Open;mu(v,{trigger:p,action:d.useCallback(P=>{if(p!=null&&p.contains(P.target))return $t.Ignore;let N=P.target.closest('[role="option"]:not([data-disabled])');return Ke(N)?$t.Select(N):m!=null&&m.contains(P.target)?$t.Ignore:$t.Close},[p,m]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let g=ee(P=>{switch(P.key){case he.Enter:oh(P.currentTarget);break;case he.Space:case he.ArrowDown:P.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.First});break;case he.ArrowUp:P.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.Last});break}}),x=ee(P=>{switch(P.key){case he.Space:P.preventDefault();break}}),E=ee(P=>{var N;if(P.button===0){if(Rl(P.currentTarget))return P.preventDefault();a.state.listboxState===Ve.Open?(Ne.flushSync(()=>a.actions.closeListbox()),(N=a.state.buttonElement)==null||N.focus({preventScroll:!0})):(P.preventDefault(),a.actions.openListbox({focus:se.Nothing}))}}),w=ee(P=>P.preventDefault()),k=mr([i]),D=Hl(),{isFocusVisible:T,focusProps:$}=Wa({autoFocus:l}),{isHovered:_,hoverProps:C}=ja({isDisabled:s}),{pressed:O,pressProps:R}=Ml({disabled:s}),b=d.useMemo(()=>({open:h===Ve.Open,active:O||h===Ve.Open,disabled:s,invalid:o.invalid,value:o.value,hover:_,focus:T,autofocus:l}),[h,o.value,s,_,T,O,o.invalid,l]),S=we(a,P=>P.listboxState===Ve.Open),L=pr(f(),{ref:c,id:i,type:gu(n,p),"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":S,"aria-labelledby":k,"aria-describedby":D,disabled:s||void 0,autoFocus:l,onKeyDown:g,onKeyUp:x,onKeyPress:w,onPointerDown:E},$,C,R);return Me()({ourProps:L,theirProps:u,slot:b,defaultTag:Qg,name:"Listbox.Button"})}let Ac=d.createContext(!1),Kg="div",Xg=Gt.RenderStrategy|Gt.Static;function Jg(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=Gu(o),[c,f]=d.useState(null);u&&(a=!0);let h=Tr("Listbox.Options"),p=ji("Listbox.Options"),[m,v,g,x]=we(p,A=>[A.listboxState,A.buttonElement,A.optionsElement,A.__demoMode]),E=Ft(v),w=Ft(g),k=jn(),[D,T]=fi(s,c,k!==null?(k&He.Open)===He.Open:m===Ve.Open);ri(D,v,p.actions.closeListbox);let $=x?!1:i&&m===Ve.Open;ci($,w);let _=x?!1:i&&m===Ve.Open;ni(_,{allowed:d.useCallback(()=>[v,g],[v,g])});let C=m!==Ve.Open,O=Rg(C,v)?!1:D,R=D&&m===Ve.Closed,b=Eo(R,h.value),S=ee(A=>h.compare(b,A)),L=we(p,A=>{var H;if(u==null||!((H=u==null?void 0:u.to)!=null&&H.includes("selection")))return null;let G=A.options.findIndex(X=>S(X.dataRef.current.value));return G===-1&&(G=0),G}),P=(()=>{if(u==null)return;if(L===null)return{...u,inner:void 0};let A=Array.from(h.listRef.current.values());return{...u,inner:{listRef:{current:A},index:L}}})(),[N,z]=Ju(P),I=Xu(),te=Re(r,u?N:null,p.actions.setOptionsElement,f),M=Qt();d.useEffect(()=>{var A;let H=g;H&&m===Ve.Open&&H!==((A=dn(H))==null?void 0:A.activeElement)&&(H==null||H.focus({preventScroll:!0}))},[m,g]);let j=ee(A=>{var H,G;switch(M.dispose(),A.key){case he.Space:if(p.state.searchQuery!=="")return A.preventDefault(),A.stopPropagation(),p.actions.search(A.key);case he.Enter:if(A.preventDefault(),A.stopPropagation(),p.state.activeOptionIndex!==null){let{dataRef:X}=p.state.options[p.state.activeOptionIndex];p.actions.onChange(X.current.value)}h.mode===yt.Single&&(Ne.flushSync(()=>p.actions.closeListbox()),(H=p.state.buttonElement)==null||H.focus({preventScroll:!0}));break;case Le(h.orientation,{vertical:he.ArrowDown,horizontal:he.ArrowRight}):return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Next});case Le(h.orientation,{vertical:he.ArrowUp,horizontal:he.ArrowLeft}):return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Previous});case he.Home:case he.PageUp:return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.First});case he.End:case he.PageDown:return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Last});case he.Escape:A.preventDefault(),A.stopPropagation(),Ne.flushSync(()=>p.actions.closeListbox()),(G=p.state.buttonElement)==null||G.focus({preventScroll:!0});return;case he.Tab:A.preventDefault(),A.stopPropagation(),Ne.flushSync(()=>p.actions.closeListbox()),om(p.state.buttonElement,A.shiftKey?dt.Previous:dt.Next);break;default:A.key.length===1&&(p.actions.search(A.key),M.setTimeout(()=>p.actions.clearSearch(),350));break}}),Q=we(p,A=>{var H;return(H=A.buttonElement)==null?void 0:H.id}),W=d.useMemo(()=>({open:m===Ve.Open}),[m]),F=pr(u?I():{},{id:t,ref:te,"aria-activedescendant":we(p,p.selectors.activeDescendantId),"aria-multiselectable":h.mode===yt.Multi?!0:void 0,"aria-labelledby":Q,"aria-orientation":h.orientation,onKeyDown:j,role:"listbox",tabIndex:m===Ve.Open?0:void 0,style:{...l.style,...z,"--button-width":Ua(v,!0).width},...di(T)}),ne=Me(),q=d.useMemo(()=>h.mode===yt.Multi?h:{...h,isSelected:S},[h,S]);return d.createElement(Ni,{enabled:a?n.static||D:!1,ownerDocument:E},d.createElement(Mo.Provider,{value:q},ne({ourProps:F,theirProps:l,slot:W,defaultTag:Kg,features:Xg,visible:O,name:"Listbox.Options"})))}let Zg="div";function eb(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(Ac)===!0,l=Tr("Listbox.Option"),u=ji("Listbox.Option"),c=we(u,O=>u.selectors.isActive(O,t)),f=l.isSelected(a),h=d.useRef(null),p=Wg(h),m=Pt({disabled:o,value:a,domRef:h,get textValue(){return p()}}),v=Re(r,h,O=>{O?l.listRef.current.set(t,O):l.listRef.current.delete(t)}),g=we(u,O=>u.selectors.shouldScrollIntoView(O,t));fe(()=>{if(g)return rt().requestAnimationFrame(()=>{var O,R;(R=(O=h.current)==null?void 0:O.scrollIntoView)==null||R.call(O,{block:"nearest"})})},[g,h]),fe(()=>{if(!s)return u.actions.registerOption(t,m),()=>u.actions.unregisterOption(t)},[m,t,s]);let x=ee(O=>{var R;if(o)return O.preventDefault();u.actions.onChange(a),l.mode===yt.Single&&(Ne.flushSync(()=>u.actions.closeListbox()),(R=u.state.buttonElement)==null||R.focus({preventScroll:!0}))}),E=ee(()=>{if(o)return u.actions.goToOption({focus:se.Nothing});u.actions.goToOption({focus:se.Specific,id:t})}),w=yu(),k=ee(O=>{w.update(O),!o&&(c||u.actions.goToOption({focus:se.Specific,id:t},Ri.Pointer))}),D=ee(O=>{w.wasMoved(O)&&(o||c||u.actions.goToOption({focus:se.Specific,id:t},Ri.Pointer))}),T=ee(O=>{w.wasMoved(O)&&(o||c&&u.actions.goToOption({focus:se.Nothing}))}),$=d.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&s}),[c,f,o,s]),_=s?{}:{id:t,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:x,onFocus:E,onPointerEnter:k,onMouseEnter:k,onPointerMove:D,onMouseMove:D,onPointerLeave:T,onMouseLeave:T},C=Me();return!f&&s?null:C({ourProps:_,theirProps:i,slot:$,defaultTag:Zg,name:"Listbox.Option"})}let tb=d.Fragment;function nb(n,r){let{options:e,placeholder:t,...o}=n,a={ref:Re(r)},i=Tr("ListboxSelectedOption"),s=d.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===yt.Multi&&Array.isArray(i.value)&&i.value.length===0,u=Me();return d.createElement(Ac.Provider,{value:!0},u({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:tb,name:"ListboxSelectedOption"}))}let rb=Ce(Ug),Yc=Ce(Gg),ob=uo,Rc=Ce(Jg),jc=Ce(eb),ab=Ce(nb),ib=Object.assign(rb,{Button:Yc,Label:ob,Options:Rc,Option:jc,SelectedOption:ab});const sb=n=>{const{isOpen:r,setIsOpen:e,onClose:t,title:o,image:a,description:i,confirm:s,cancel:l,className:u}=n;return Y.jsx(_c,{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:Y.jsxs(Mr,{onClose:t,className:"relative z-50 focus:outline-hidden",children:[Y.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),Y.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:Y.jsxs(Oc,{className:Ze(u==null?void 0:u.popup,"ja-break-all flex w-[90vw] max-w-[300px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]"),children:[Y.jsxs("div",{className:"flex flex-col gap-[8px]",children:[o&&Y.jsx(Mc,{className:Ze(u==null?void 0:u.title,"global-break-all text-title-small font-bold text-black"),children:o}),a&&Y.jsx("img",{className:u==null?void 0:u.image,src:a.url,alt:a.alt}),i&&i!==""&&Y.jsx(Bl,{className:Ze(u==null?void 0:u.description,"text-petnow-grey-tertiary text-body-large popup-scrollbar max-h-[314px] overflow-y-auto break-all"),children:i})]}),Y.jsxs("div",{className:"flex flex-col gap-[8px]",children:[s&&Y.jsx("button",{className:"bg-petnow-orange-primary sm:hover:bg-petnow-orange-40 text-label-medium w-full cursor-pointer rounded-[12px] py-[12px] font-bold text-white transition duration-200",onClick:s.onClick,children:s.text}),l&&Y.jsx("button",{onClick:()=>e(!1),className:"bg-background-tertiary sm:hover:bg-petnow-grey-90 text-petnow-grey-tertiary text-label-medium w-full cursor-pointer rounded-[12px] py-[12px] font-bold transition duration-200",children:l.text})]})]})})]})})},lb=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>Y.jsxs("label",{htmlFor:r,className:"relative inline-flex cursor-pointer items-center",children:[Y.jsx("input",{type:"checkbox",disabled:o,checked:a,id:r,name:e,className:"peer sr-only",onChange:t}),Y.jsx("div",{className:Ze(n,"bg-petnow-grey-primary peer-checked:bg-petnow-orange-primary h-[32px] w-[52px] rounded-full duration-[250ms] peer-focus:outline-none after:absolute after:start-[2px] after:top-[3px] after:size-[26px] after:rounded-full after:bg-white after:shadow-[0_3px_8px_0_rgba(0,0,0,0.15)] after:transition-all after:duration-[250ms] after:content-[''] peer-checked:after:translate-x-[calc(100%-4px)] peer-checked:after:border-white",o&&"cursor-not-allowed opacity-50")})]});var Wc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hc=d.createContext&&d.createContext(Wc),ub=["attr","size","title"];function cb(n,r){if(n==null)return{};var e=db(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 db(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 To(){return To=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},To.apply(this,arguments)}function Bc(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 Po(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?Bc(Object(e),!0).forEach(function(t){fb(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Bc(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function fb(n,r,e){return r=pb(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function pb(n){var r=hb(n,"string");return typeof r=="symbol"?r:r+""}function hb(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 Vc(n){return n&&n.map((r,e)=>d.createElement(r.tag,Po({key:e},r.attr),Vc(r.child)))}function Pr(n){return r=>d.createElement(mb,To({attr:Po({},n.attr)},r),Vc(n.child))}function mb(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=cb(n,ub),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",To({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:Po(Po({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 Hc!==void 0?d.createElement(Hc.Consumer,null,e=>r(e)):r(Wc)}function vb(n){return Pr({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 zc(n){return Pr({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 gb=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return Y.jsxs(Y.Fragment,{children:[Y.jsx(bb,{isOpen:o,setIsOpen:a,termImageUrl:t}),Y.jsxs("div",{className:"inline-flex items-center",children:[Y.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[Y.jsx("input",{type:"checkbox",className:"before:content[''] border-petnow-grey-primary 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)}}),Y.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:Y.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:Y.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&&Y.jsxs("div",{className:"flex items-center",children:[Y.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),Y.jsx(vb,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},bb=({isOpen:n,setIsOpen:r,termImageUrl:e})=>Y.jsxs(Mr,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[Y.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),Y.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:Y.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:Y.jsxs(Mr.Panel,{className:"mx-auto flex max-w-sm flex-col items-center rounded-sm bg-white",children:[Y.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:Y.jsx(zc,{size:20,className:"mr-2",onClick:()=>r(!1)})}),Y.jsx("img",{src:e,alt:"약관동의 이미지"})]})})})]});var Wi=function(n,r){return Wi=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])},Wi(n,r)},Bn=function(){return Bn=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},Bn.apply(this,arguments)};function yb(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 Hi,qc="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",wb=(Hi=null,function(n){return n===void 0&&(n=qc),Hi||(Hi=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)}))}),xb=d.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),Eb={width:"100%",height:400},Db={scriptUrl:qc,errorMessage:xb,autoClose:!0},Sb=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,f=yb(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new t(Bn(Bn({},f),{oncomplete:function(h){s&&s(h),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}Wi(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||(wb(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:Bn(Bn({},Eb),o)},l&&a)},r.defaultProps=Db,r}(d.Component);const kb=({label:n,value:r,onFrontChange:e,onBackChange:t,onPostalCodeChange:o,disabled:a})=>{const[i,s]=d.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})`:""),e(h),o&&o(f.zonecode),s(!1)},u=()=>{s(!0)},c=()=>r.front?r.front:Y.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return Y.jsxs(Y.Fragment,{children:[Y.jsx(_b,{isOpen:i,setIsOpen:s,handleComplete:l}),Y.jsxs("div",{className:"text-petnow-grey-tertiary",children:[Y.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),Y.jsxs("div",{className:"relative flex flex-col",children:[Y.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()}),Y.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=>t(f.target.value)})]})]})]})},_b=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return Y.jsx(Mr,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:Y.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:Y.jsx(Mr.Panel,{children:Y.jsxs("div",{children:[Y.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>e(!1),children:Y.jsx(zc,{size:24,onClick:()=>e(!1)})}),Y.jsx(Sb,{onComplete:t,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})};function Cb(n){return Pr({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 Ob(n){return Pr({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 Mb=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return Y.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:[Y.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:[Y.jsxs("p",{className:Ze("mr-4 text-lg font-medium md:text-xl",e),children:[Y.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?Y.jsx(Ob,{className:"text-petnow-orange-primary min-w-6",size:24}):Y.jsx(Cb,{className:"text-petnow-orange-primary min-w-6",size:24})]}),Y.jsx("p",{className:Ze(`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})]})},Uc=6048e5,Tb=864e5,Io=6e4,No=36e5,Pb=1e3,Qc=Symbol.for("constructDateFrom");function De(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&Qc in n?n[Qc](r):n instanceof Date?new n.constructor(r):new Date(r)}function ae(n,r){return De(r||n,n)}function ft(n,r,e){const t=ae(n,e==null?void 0:e.in);return isNaN(r)?De((e==null?void 0:e.in)||n,NaN):(r&&t.setDate(t.getDate()+r),t)}function pt(n,r,e){const t=ae(n,e==null?void 0:e.in);if(isNaN(r))return De(n,NaN);if(!r)return t;const o=t.getDate(),a=De(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 Gc(n,r,e){return De(n,+ae(n)+r)}function Ib(n,r,e){return Gc(n,r*No)}let Nb={};function gn(){return Nb}function Yt(n,r){var s,l,u,c;const e=gn(),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=ae(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 Vn(n,r){return Yt(n,{...r,weekStartsOn:1})}function Kc(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=De(e,0);o.setFullYear(t+1,0,4),o.setHours(0,0,0,0);const a=Vn(o),i=De(e,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=Vn(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function Lo(n){const r=ae(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 Rt(n,...r){const e=De.bind(null,r.find(t=>typeof t=="object"));return r.map(e)}function bn(n,r){const e=ae(n,r==null?void 0:r.in);return e.setHours(0,0,0,0),e}function zn(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=bn(t),i=bn(o),s=+a-Lo(a),l=+i-Lo(i);return Math.round((s-l)/Tb)}function Lb(n,r){const e=Kc(n,r),t=De(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),Vn(t)}function Bi(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setTime(t.getTime()+r*Io),t}function Vi(n,r,e){return pt(n,r*3,e)}function Fb(n,r,e){return Gc(n,r*1e3)}function Fo(n,r,e){return ft(n,r*7,e)}function jt(n,r,e){return pt(n,r*12,e)}function Xc(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=De.bind(null,o));const a=ae(o,t);(!e||e<a||isNaN(+a))&&(e=a)}),De(t,e||NaN)}function Jc(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=De.bind(null,o));const a=ae(o,t);(!e||e>a||isNaN(+a))&&(e=a)}),De(t,e||NaN)}function $b(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return+bn(t)==+bn(o)}function Wt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function $o(n){return!(!Wt(n)&&typeof n!="number"||isNaN(+ae(n)))}function Ao(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function yn(n,r){const e=ae(n,r==null?void 0:r.in);return Math.trunc(e.getMonth()/3)+1}function Yo(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=yn(t)-yn(o);return a*4+i}function Ro(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return t.getFullYear()-o.getFullYear()}function Ab(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r),a=Zc(t,o),i=Math.abs(zn(t,o));t.setDate(t.getDate()-a*i);const s=+(Zc(t,o)===-a),l=a*(i-s);return l===0?0:l}function Zc(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 ed(n,r){const e=ae(n,r==null?void 0:r.in);return e.setHours(23,59,59,999),e}function td(n,r){const e=ae(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 zi(n,r){const e=ae(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 nd(n,r){const e=ae(n,r==null?void 0:r.in);return e.setDate(1),e.setHours(0,0,0,0),e}function rd(n,r){const e=ae(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 jo(n,r){const e=ae(n,r==null?void 0:r.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Yb(n,r){var s,l;const e=gn(),t=e.weekStartsOn??((l=(s=e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=ae(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 Rb={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"}},jb=(n,r,e)=>{let t;const o=Rb[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 qn(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Wb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Hb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Bb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vb={date:qn({formats:Wb,defaultWidth:"full"}),time:qn({formats:Hb,defaultWidth:"full"}),dateTime:qn({formats:Bb,defaultWidth:"full"})},zb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qb=(n,r,e,t)=>zb[n];function wt(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 Ub={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Gb={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"]},Kb={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"]},Xb={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"}},Jb={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"}},Zb={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:wt({values:Ub,defaultWidth:"wide"}),quarter:wt({values:Qb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:Gb,defaultWidth:"wide"}),day:wt({values:Kb,defaultWidth:"wide"}),dayPeriod:wt({values:Xb,defaultWidth:"wide",formattingValues:Jb,defaultFormattingWidth:"wide"})};function xt(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)?ty(s,f=>f.test(i)):ey(s,f=>f.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 ey(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function ty(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function od(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 ny=/^(\d+)(th|st|nd|rd)?/i,ry=/\d+/i,oy={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},ay={any:[/^b/i,/^(a|c)/i]},iy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sy={any:[/1/i,/2/i,/3/i,/4/i]},ly={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uy={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]},cy={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},dy={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]},fy={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},py={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hy={ordinalNumber:od({matchPattern:ny,parsePattern:ry,valueCallback:n=>parseInt(n,10)}),era:xt({matchPatterns:oy,defaultMatchWidth:"wide",parsePatterns:ay,defaultParseWidth:"any"}),quarter:xt({matchPatterns:iy,defaultMatchWidth:"wide",parsePatterns:sy,defaultParseWidth:"any",valueCallback:n=>n+1}),month:xt({matchPatterns:ly,defaultMatchWidth:"wide",parsePatterns:uy,defaultParseWidth:"any"}),day:xt({matchPatterns:cy,defaultMatchWidth:"wide",parsePatterns:dy,defaultParseWidth:"any"}),dayPeriod:xt({matchPatterns:fy,defaultMatchWidth:"any",parsePatterns:py,defaultParseWidth:"any"})},ad={code:"en-US",formatDistance:jb,formatLong:Vb,formatRelative:qb,localize:Zb,match:hy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function my(n,r){const e=ae(n,r==null?void 0:r.in);return zn(e,jo(e))+1}function qi(n,r){const e=ae(n,r==null?void 0:r.in),t=+Vn(e)-+Lb(e);return Math.round(t/Uc)+1}function Ui(n,r){var c,f,h,p;const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=gn(),a=(r==null?void 0:r.firstWeekContainsDate)??((f=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=De((r==null?void 0:r.in)||n,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=Yt(i,r),l=De((r==null?void 0:r.in)||n,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const u=Yt(l,r);return+e>=+s?t+1:+e>=+u?t:t-1}function vy(n,r){var s,l,u,c;const e=gn(),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=Ui(n,r),a=De((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),Yt(a,r)}function id(n,r){const e=ae(n,r==null?void 0:r.in),t=+Yt(e,r)-+vy(e,r);return Math.round(t/Uc)+1}function Se(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const tn={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return Se(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):Se(e+1,2)},d(n,r){return Se(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 Se(n.getHours()%12||12,r.length)},H(n,r){return Se(n.getHours(),r.length)},m(n,r){return Se(n.getMinutes(),r.length)},s(n,r){return Se(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),o=Math.trunc(t*Math.pow(10,e-3));return Se(o,r.length)}},Un={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sd={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 tn.y(n,r)},Y:function(n,r,e,t){const o=Ui(n,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return Se(i,2)}return r==="Yo"?e.ordinalNumber(a,{unit:"year"}):Se(a,r.length)},R:function(n,r){const e=Kc(n);return Se(e,r.length)},u:function(n,r){const e=n.getFullYear();return Se(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 Se(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 Se(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 tn.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 Se(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=id(n,t);return r==="wo"?e.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(n,r,e){const t=qi(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):Se(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):tn.d(n,r)},D:function(n,r,e){const t=my(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):Se(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 Se(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 Se(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 Se(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=Un.noon:t===0?o=Un.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=Un.evening:t>=12?o=Un.afternoon:t>=4?o=Un.morning:o=Un.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 tn.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):tn.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):Se(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):Se(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):tn.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):tn.s(n,r)},S:function(n,r){return tn.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return ud(t);case"XXXX":case"XX":return wn(t);case"XXXXX":case"XXX":default:return wn(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return ud(t);case"xxxx":case"xx":return wn(t);case"xxxxx":case"xxx":default:return wn(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ld(t,":");case"OOOO":default:return"GMT"+wn(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ld(t,":");case"zzzz":default:return"GMT"+wn(t,":")}},t:function(n,r,e){const t=Math.trunc(+n/1e3);return Se(t,r.length)},T:function(n,r,e){return Se(+n,r.length)}};function ld(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+Se(a,2)}function ud(n,r){return n%60===0?(n>0?"-":"+")+Se(Math.abs(n)/60,2):wn(n,r)}function wn(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=Se(Math.trunc(t/60),2),a=Se(t%60,2);return e+o+r+a}const cd=(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"})}},dd=(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"})}},Qi={p:dd,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return cd(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}}",cd(t,r)).replace("{{time}}",dd(o,r))}},gy=/^D+$/,by=/^Y+$/,yy=["D","DD","YY","YYYY"];function wy(n){return gy.test(n)}function xy(n){return by.test(n)}function Ey(n,r,e){const t=Dy(n,r,e);if(console.warn(t),yy.includes(n))throw new RangeError(t)}function Dy(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 Sy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ky=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_y=/^'([^]*?)'?$/,Cy=/''/g,Oy=/[a-zA-Z]/;function fd(n,r,e){var c,f,h,p,m,v,g,x;const t=gn(),o=(e==null?void 0:e.locale)??t.locale??ad,a=(e==null?void 0:e.firstWeekContainsDate)??((f=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(h=t.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??t.weekStartsOn??((x=(g=t.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??0,s=ae(n,e==null?void 0:e.in);if(!$o(s))throw new RangeError("Invalid time value");let l=r.match(ky).map(E=>{const w=E[0];if(w==="p"||w==="P"){const k=Qi[w];return k(E,o.formatLong)}return E}).join("").match(Sy).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const w=E[0];if(w==="'")return{isToken:!1,value:My(E)};if(sd[w])return{isToken:!0,value:E};if(w.match(Oy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:E}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(E=>{if(!E.isToken)return E.value;const w=E.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&xy(w)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&wy(w))&&Ey(w,r,String(n));const k=sd[w[0]];return k(s,w,o.localize,u)}).join("")}function My(n){const r=n.match(_y);return r?r[1].replace(Cy,"'"):n}function pd(n,r){return ae(n,r==null?void 0:r.in).getDate()}function Ty(n,r){return ae(n,r==null?void 0:r.in).getDay()}function Py(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=e.getMonth(),a=De(e,0);return a.setFullYear(t,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Iy(){return Object.assign({},gn())}function Ht(n,r){return ae(n,r==null?void 0:r.in).getHours()}function Ny(n,r){const e=ae(n,r==null?void 0:r.in).getDay();return e===0?7:e}function Bt(n,r){return ae(n,r==null?void 0:r.in).getMinutes()}function qe(n,r){return ae(n,r==null?void 0:r.in).getMonth()}function nn(n){return ae(n).getSeconds()}function Gi(n){return+ae(n)}function le(n,r){return ae(n,r==null?void 0:r.in).getFullYear()}function rn(n,r){return+ae(n)>+ae(r)}function xn(n,r){return+ae(n)<+ae(r)}function Ly(n,r){return+ae(n)==+ae(r)}function Fy(n,r){const e=$y(r)?new r(0):De(r,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function $y(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const Ay=10;class hd{constructor(){Z(this,"subPriority",0)}validate(r,e){return!0}}class Yy extends hd{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 Ry extends hd{constructor(e,t){super();Z(this,"priority",Ay);Z(this,"subPriority",-1);this.context=e||(o=>De(t,o))}set(e,t){return t.timestampIsSet?e:De(e,Fy(e,this.context))}}class ge{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new Yy(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class jy extends ge{constructor(){super(...arguments);Z(this,"priority",140);Z(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 $e={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 Ae(n,r){return n&&{value:r(n.value),rest:n.rest}}function Te(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function Dt(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*No+a*Io+i*Pb),rest:r.slice(e[0].length)}}function md(n){return Te($e.anyDigitsSigned,n)}function Ie(n,r){switch(n){case 1:return Te($e.singleDigit,r);case 2:return Te($e.twoDigits,r);case 3:return Te($e.threeDigits,r);case 4:return Te($e.fourDigits,r);default:return Te(new RegExp("^\\d{1,"+n+"}"),r)}}function Wo(n,r){switch(n){case 1:return Te($e.singleDigitSigned,r);case 2:return Te($e.twoDigitsSigned,r);case 3:return Te($e.threeDigitsSigned,r);case 4:return Te($e.fourDigitsSigned,r);default:return Te(new RegExp("^-?\\d{1,"+n+"}"),r)}}function Ki(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 vd(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 gd(n){return n%400===0||n%4===0&&n%100!==0}class Wy extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(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 Ae(Ie(4,e),a);case"yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae(Ie(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=vd(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 Hy extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(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 Ae(Ie(4,e),a);case"Yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae(Ie(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=Ui(e,a);if(o.isTwoDigitYear){const l=vd(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Yt(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),Yt(e,a)}}class By extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return Wo(t==="R"?4:t.length,e)}set(e,t,o){const a=De(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),Vn(a)}}class Vy extends ge{constructor(){super(...arguments);Z(this,"priority",130);Z(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return Wo(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class zy extends ge{constructor(){super(...arguments);Z(this,"priority",120);Z(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 Ie(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 qy extends ge{constructor(){super(...arguments);Z(this,"priority",120);Z(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 Ie(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 Uy extends ge{constructor(){super(...arguments);Z(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);Z(this,"priority",110)}parse(e,t,o){const a=i=>i-1;switch(t){case"M":return Ae(Te($e.month,e),a);case"MM":return Ae(Ie(2,e),a);case"Mo":return Ae(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 Qy extends ge{constructor(){super(...arguments);Z(this,"priority",110);Z(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 Ae(Te($e.month,e),a);case"LL":return Ae(Ie(2,e),a);case"Lo":return Ae(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 Gy(n,r,e){const t=ae(n,e==null?void 0:e.in),o=id(t,e)-r;return t.setDate(t.getDate()-o*7),ae(t,e==null?void 0:e.in)}class Ky extends ge{constructor(){super(...arguments);Z(this,"priority",100);Z(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,o){switch(t){case"w":return Te($e.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return Ie(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return Yt(Gy(e,o,a),a)}}function Xy(n,r,e){const t=ae(n,e==null?void 0:e.in),o=qi(t,e)-r;return t.setDate(t.getDate()-o*7),t}class Jy extends ge{constructor(){super(...arguments);Z(this,"priority",100);Z(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 Te($e.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return Ie(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return Vn(Xy(e,o))}}const Zy=[31,28,31,30,31,30,31,31,30,31,30,31],ew=[31,29,31,30,31,30,31,31,30,31,30,31];class tw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"subPriority",1);Z(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"d":return Te($e.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return Ie(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=gd(o),i=e.getMonth();return a?t>=1&&t<=ew[i]:t>=1&&t<=Zy[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class nw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(this,"subpriority",1);Z(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 Te($e.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return Ie(t.length,e)}}validate(e,t){const o=e.getFullYear();return gd(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 Xi(n,r,e){var f,h,p,m;const t=gn(),o=(e==null?void 0:e.weekStartsOn)??((h=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((m=(p=t.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,a=ae(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 ft(a,c,e)}class rw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(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=Xi(e,o,a),e.setHours(0,0,0,0),e}}class ow extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(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 Ae(Ie(t.length,e),i);case"eo":return Ae(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=Xi(e,o,a),e.setHours(0,0,0,0),e}}class aw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(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 Ae(Ie(t.length,e),i);case"co":return Ae(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=Xi(e,o,a),e.setHours(0,0,0,0),e}}function iw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Ny(t,e),a=r-o;return ft(t,a,e)}class sw extends ge{constructor(){super(...arguments);Z(this,"priority",90);Z(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 Ie(t.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return Ae(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 Ae(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ae(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ae(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=iw(e,o),e.setHours(0,0,0,0),e}}class lw extends ge{constructor(){super(...arguments);Z(this,"priority",80);Z(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(Ki(o),0,0,0),e}}class uw extends ge{constructor(){super(...arguments);Z(this,"priority",80);Z(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(Ki(o),0,0,0),e}}class cw extends ge{constructor(){super(...arguments);Z(this,"priority",80);Z(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(Ki(o),0,0,0),e}}class dw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return Te($e.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(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 fw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,o){switch(t){case"H":return Te($e.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class pw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return Te($e.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(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 hw extends ge{constructor(){super(...arguments);Z(this,"priority",70);Z(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,o){switch(t){case"k":return Te($e.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return Ie(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 mw extends ge{constructor(){super(...arguments);Z(this,"priority",60);Z(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return Te($e.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return Ie(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class vw extends ge{constructor(){super(...arguments);Z(this,"priority",50);Z(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return Te($e.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return Ie(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class gw extends ge{constructor(){super(...arguments);Z(this,"priority",30);Z(this,"incompatibleTokens",["t","T"])}parse(e,t){const o=a=>Math.trunc(a*Math.pow(10,-t.length+3));return Ae(Ie(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class bw extends ge{constructor(){super(...arguments);Z(this,"priority",10);Z(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return Dt(Et.basicOptionalMinutes,e);case"XX":return Dt(Et.basic,e);case"XXXX":return Dt(Et.basicOptionalSeconds,e);case"XXXXX":return Dt(Et.extendedOptionalSeconds,e);case"XXX":default:return Dt(Et.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-Lo(e)-o)}}class yw extends ge{constructor(){super(...arguments);Z(this,"priority",10);Z(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return Dt(Et.basicOptionalMinutes,e);case"xx":return Dt(Et.basic,e);case"xxxx":return Dt(Et.basicOptionalSeconds,e);case"xxxxx":return Dt(Et.extendedOptionalSeconds,e);case"xxx":default:return Dt(Et.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-Lo(e)-o)}}class ww extends ge{constructor(){super(...arguments);Z(this,"priority",40);Z(this,"incompatibleTokens","*")}parse(e){return md(e)}set(e,t,o){return[De(e,o*1e3),{timestampIsSet:!0}]}}class xw extends ge{constructor(){super(...arguments);Z(this,"priority",20);Z(this,"incompatibleTokens","*")}parse(e){return md(e)}set(e,t,o){return[De(e,o),{timestampIsSet:!0}]}}const Ew={G:new jy,y:new Wy,Y:new Hy,R:new By,u:new Vy,Q:new zy,q:new qy,M:new Uy,L:new Qy,w:new Ky,I:new Jy,d:new tw,D:new nw,E:new rw,e:new ow,c:new aw,i:new sw,a:new lw,b:new uw,B:new cw,h:new dw,H:new fw,K:new pw,k:new hw,m:new mw,s:new vw,S:new gw,X:new bw,x:new yw,t:new ww,T:new xw},Dw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kw=/^'([^]*?)'?$/,_w=/''/g,Cw=/\S/,Ow=/[a-zA-Z]/;function Mw(n,r,e,t){var g,x,E,w,k,D,T,$;const o=()=>De((t==null?void 0:t.in)||e,NaN),a=Iy(),i=(t==null?void 0:t.locale)??a.locale??ad,s=(t==null?void 0:t.firstWeekContainsDate)??((x=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:x.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(E=a.locale)==null?void 0:E.options)==null?void 0:w.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((D=(k=t==null?void 0:t.locale)==null?void 0:k.options)==null?void 0:D.weekStartsOn)??a.weekStartsOn??(($=(T=a.locale)==null?void 0:T.options)==null?void 0:$.weekStartsOn)??0;if(!r)return n?o():ae(e,t==null?void 0:t.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:i},c=[new Ry(t==null?void 0:t.in,e)],f=r.match(Sw).map(_=>{const C=_[0];if(C in Qi){const O=Qi[C];return O(_,i.formatLong)}return _}).join("").match(Dw),h=[];for(let _ of f){const C=_[0],O=Ew[C];if(O){const{incompatibleTokens:R}=O;if(Array.isArray(R)){const S=h.find(L=>R.includes(L.token)||L.token===C);if(S)throw new RangeError(`The format string mustn't contain \`${S.fullToken}\` and \`${_}\` at the same time`)}else if(O.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);h.push({token:C,fullToken:_});const b=O.run(n,_,i.match,u);if(!b)return o();c.push(b.setter),n=b.rest}else{if(C.match(Ow))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");if(_==="''"?_="'":C==="'"&&(_=Tw(_)),n.indexOf(_)===0)n=n.slice(_.length);else return o()}}if(n.length>0&&Cw.test(n))return o();const p=c.map(_=>_.priority).sort((_,C)=>C-_).filter((_,C,O)=>O.indexOf(_)===C).map(_=>c.filter(C=>C.priority===_).sort((C,O)=>O.subPriority-C.subPriority)).map(_=>_[0]);let m=ae(e,t==null?void 0:t.in);if(isNaN(+m))return o();const v={};for(const _ of p){if(!_.validate(m,u))return o();const C=_.set(m,v,u);Array.isArray(C)?(m=C[0],Object.assign(v,C[1])):m=C}return m}function Tw(n){return n.match(kw)[1].replace(_w,"'")}function Pw(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function Iw(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return+zi(t)==+zi(o)}function Nw(n,r,e){const[t,o]=Rt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()}function Ir(n,r,e){const t=+ae(n,e==null?void 0:e.in),[o,a]=[+ae(r.start,e==null?void 0:e.in),+ae(r.end,e==null?void 0:e.in)].sort((i,s)=>i-s);return t>=o&&t<=a}function Lw(n,r,e){return ft(n,-1,e)}function Fw(n,r){const e=()=>De(r==null?void 0:r.in,NaN),o=Rw(n);let a;if(o.date){const u=jw(o.date,2);a=Ww(u.restDateString,u.year)}if(!a||isNaN(+a))return e();const i=+a;let s=0,l;if(o.time&&(s=Hw(o.time),isNaN(s)))return e();if(o.timezone){if(l=Bw(o.timezone),isNaN(l))return e()}else{const u=new Date(i+s),c=ae(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 ae(i+s+l,r==null?void 0:r.in)}const Ho={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},$w=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Aw=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yw=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Rw(n){const r={},e=n.split(Ho.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],Ho.timeZoneDelimiter.test(r.date)&&(r.date=n.split(Ho.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=Ho.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function jw(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 Ww(n,r){if(r===null)return new Date(NaN);const e=n.match($w);if(!e)return new Date(NaN);const t=!!e[4],o=Nr(e[1]),a=Nr(e[2])-1,i=Nr(e[3]),s=Nr(e[4]),l=Nr(e[5])-1;if(t)return Qw(r,s,l)?Vw(r,s,l):new Date(NaN);{const u=new Date(0);return!qw(r,a,i)||!Uw(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function Nr(n){return n?parseInt(n):1}function Hw(n){const r=n.match(Aw);if(!r)return NaN;const e=Ji(r[1]),t=Ji(r[2]),o=Ji(r[3]);return Gw(e,t,o)?e*No+t*Io+o*1e3:NaN}function Ji(n){return n&&parseFloat(n.replace(",","."))||0}function Bw(n){if(n==="Z")return 0;const r=n.match(Yw);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return Kw(t,o)?e*(t*No+o*Io):NaN}function Vw(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 zw=[31,null,31,30,31,30,31,31,30,31,30,31];function bd(n){return n%400===0||n%4===0&&n%100!==0}function qw(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(zw[r]||(bd(n)?29:28))}function Uw(n,r){return r>=1&&r<=(bd(n)?366:365)}function Qw(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function Gw(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function Kw(n,r){return r>=0&&r<=59}function it(n,r,e){const t=ae(n,e==null?void 0:e.in),o=t.getFullYear(),a=t.getDate(),i=De(n,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=Py(i);return t.setMonth(r,Math.min(a,s)),t}function Bo(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setHours(r),t}function Vo(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setMinutes(r),t}function Qn(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return it(t,t.getMonth()+a*3)}function zo(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setSeconds(r),t}function St(n,r,e){const t=ae(n,e==null?void 0:e.in);return isNaN(+t)?De(n,NaN):(t.setFullYear(r),t)}function En(n,r,e){return pt(n,-r,e)}function yd(n,r,e){return Vi(n,-1,e)}function wd(n,r,e){return Fo(n,-1,e)}function Gn(n,r,e){return jt(n,-r,e)}const Xw={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}}년"}},Jw=(n,r,e)=>{let t;const o=Xw[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},Zw={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},e0={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},t0={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},n0={date:qn({formats:Zw,defaultWidth:"full"}),time:qn({formats:e0,defaultWidth:"full"}),dateTime:qn({formats:t0,defaultWidth:"full"})},r0={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},o0=(n,r,e,t)=>r0[n],a0={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},i0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},s0={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월"]},l0={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},u0={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:"밤"}},c0={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:"밤"}},d0={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:wt({values:a0,defaultWidth:"wide"}),quarter:wt({values:i0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:wt({values:s0,defaultWidth:"wide"}),day:wt({values:l0,defaultWidth:"wide"}),dayPeriod:wt({values:u0,defaultWidth:"wide",formattingValues:c0,defaultFormattingWidth:"wide"})},f0=/^(\d+)(일|번째)?/i,p0=/\d+/i,h0={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},m0={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},v0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},g0={any:[/1/i,/2/i,/3/i,/4/i]},b0={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},y0={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},w0={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},x0={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},E0={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},D0={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},S0={ordinalNumber:od({matchPattern:f0,parsePattern:p0,valueCallback:n=>parseInt(n,10)}),era:xt({matchPatterns:h0,defaultMatchWidth:"wide",parsePatterns:m0,defaultParseWidth:"any"}),quarter:xt({matchPatterns:v0,defaultMatchWidth:"wide",parsePatterns:g0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:xt({matchPatterns:b0,defaultMatchWidth:"wide",parsePatterns:y0,defaultParseWidth:"any"}),day:xt({matchPatterns:w0,defaultMatchWidth:"wide",parsePatterns:x0,defaultParseWidth:"any"}),dayPeriod:xt({matchPatterns:E0,defaultMatchWidth:"any",parsePatterns:D0,defaultParseWidth:"any"})},k0={code:"ko",formatDistance:Jw,formatLong:n0,formatRelative:o0,localize:d0,match:S0,options:{weekStartsOn:0,firstWeekContainsDate:1}};var qo=typeof document<"u"?d.useLayoutEffect:d.useEffect;const _0={...V}.useInsertionEffect||(n=>n());function C0(n){const r=V.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return _0(()=>{r.current=n}),V.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 O0={...V};let xd=!1,M0=0;const Ed=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+M0++;function T0(){const[n,r]=V.useState(()=>xd?Ed():void 0);return qo(()=>{n==null&&r(Ed())},[]),V.useEffect(()=>{xd=!0},[]),n}const Dd=O0.useId||T0;let Lr;process.env.NODE_ENV!=="production"&&(Lr=new Set);function P0(){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=Lr)!=null&&n.has(o))){var a;(a=Lr)==null||a.add(o),console.warn(o)}}function I0(){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=Lr)!=null&&n.has(o))){var a;(a=Lr)==null||a.add(o),console.error(o)}}const N0=V.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:f,stroke:h,d:p,style:{transform:m,...v}={},...g}=r;process.env.NODE_ENV!=="production"&&(e||P0("The `ref` prop is required for `FloatingArrow`."));const x=Dd(),[E,w]=V.useState(!1);if(qo(()=>{if(!o)return;at(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[k,D]=t.split("-"),T=k==="top"||k==="bottom";let $=f;(T&&i!=null&&i.x||!T&&i!=null&&i.y)&&($=null);const _=c*2,C=_/2,O=s/2*(u/-8+1),R=l/2*u/4,b=!!p,S=$&&D==="end"?"bottom":"top";let L=$&&D==="end"?"right":"left";$&&E&&(L=D==="end"?"left":"right");const P=(a==null?void 0:a.x)!=null?$||a.x:"",N=(a==null?void 0:a.y)!=null?$||a.y:"",z=p||"M0,0"+(" H"+s)+(" L"+(s-O)+","+(l-R))+(" Q"+s/2+","+l+" "+O+","+(l-R))+" Z",I={top:b?"rotate(180deg)":"",left:b?"rotate(90deg)":"rotate(-90deg)",bottom:b?"":"rotate(180deg)",right:b?"rotate(-90deg)":"rotate(90deg)"}[k];return Y.jsxs("svg",{...g,"aria-hidden":!0,ref:e,width:b?s:s+_,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[L]:P,[S]:N,[k]:T||b?"100%":"calc(100% - "+_/2+"px)",transform:[I,m].filter(te=>!!te).join(" "),...v},children:[_>0&&Y.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:h,strokeWidth:_+(p?0:1),d:z}),Y.jsx("path",{stroke:_&&!p?g.fill:"none",d:z}),Y.jsx("clipPath",{id:x,children:Y.jsx("rect",{x:-C,y:C*(b?-1:1),width:s+_,height:s})})]})});function L0(){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 F0=V.createContext(null),$0=V.createContext(null),A0=()=>{var n;return((n=V.useContext(F0))==null?void 0:n.id)||null},Y0=()=>V.useContext($0);function R0(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Dd(),a=V.useRef({}),[i]=V.useState(()=>L0()),s=A0()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!Fe(p)&&I0("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]=V.useState(t.reference),c=C0((p,m,v)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:v,nested:s}),e==null||e(p,m,v)}),f=V.useMemo(()=>({setPositionReference:u}),[]),h=V.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return V.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function j0(n){n===void 0&&(n={});const{nodeId:r}=n,e=R0({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=V.useState(null),[s,l]=V.useState(null),c=(o==null?void 0:o.domReference)||a,f=V.useRef(null),h=Y0();qo(()=>{c&&(f.current=c)},[c]);const p=ju({...n,elements:{...o,...s&&{reference:s}}}),m=V.useCallback(w=>{const k=Fe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(k),p.refs.setReference(k)},[p.refs]),v=V.useCallback(w=>{(Fe(w)||w===null)&&(f.current=w,i(w)),(Fe(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Fe(w))&&p.refs.setReference(w)},[p.refs]),g=V.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),x=V.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=V.useMemo(()=>({...p,...t,refs:g,elements:x,nodeId:r}),[p,g,x,r,t]);return qo(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(k=>k.id===r);w&&(w.context=E)}),V.useMemo(()=>({...p,context:E,refs:g,elements:x}),[p,g,x,E])}/*!
|
|
75
|
+
*/var vu;function Dm(){return vu||(vu=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;hi.useSyncExternalStoreWithSelector=function(l,u,c,f,h){var p=o(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=i(function(){function g(x){if(!y){if(y=!0,E=x,x=f(x),h!==void 0&&m.hasValue){var T=m.value;if(h(T,x))return w=T}return w=x}if(T=w,e(E,x))return T;var N=f(x);return h!==void 0&&h(T,N)?(E=x,T):(E=x,w=N)}var y=!1,E,w,S=c===void 0?null:c;return[function(){return g(u())},S===null?void 0:function(){return g(S())}]},[u,c,f,h]);var v=t(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.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())}()),hi}var gu;function Sm(){return gu||(gu=1,process.env.NODE_ENV==="production"?Do.exports=Em():Do.exports=Dm()),Do.exports}var km=Sm();function we(n,r,e=fu){return km.useSyncExternalStoreWithSelector(Z(t=>n.subscribe(Cm,t)),Z(()=>n.state),Z(()=>n.state),Z(r),e)}function Cm(n){return n}function Or(n,r){let e=d.useId(),t=Bn.get(r),[o,a]=we(t,d.useCallback(i=>[t.selectors.isTop(i,e),t.selectors.inStack(i,e)],[t,e]));return fe(()=>{if(n)return t.actions.push(e),()=>t.actions.pop(e)},[t,n,e]),n?a?o:!0:!1}let mi=new Map,Mr=new Map;function bu(n){var r;let e=(r=Mr.get(n))!=null?r:0;return Mr.set(n,e+1),e!==0?()=>yu(n):(mi.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0,()=>yu(n))}function yu(n){var r;let e=(r=Mr.get(n))!=null?r:1;if(e===1?Mr.delete(n):Mr.set(n,e-1),e!==1)return;let t=mi.get(n);t&&(t["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",t["aria-hidden"]),n.inert=t.inert,mi.delete(n))}function vi(n,{allowed:r,disallowed:e}={}){let t=Or(n,"inert-others");fe(()=>{var o,a;if(!t)return;let i=ut();for(let l of(o=e==null?void 0:e())!=null?o:[])l&&i.add(bu(l));let s=(a=r==null?void 0:r())!=null?a:[];for(let l of s){if(!l)continue;let u=En(l);if(!u)continue;let c=l.parentElement;for(;c&&c!==u.body;){for(let f of c.children)s.some(h=>f.contains(h))||i.add(bu(f));c=c.parentElement}}return i.dispose},[t,r,e])}function gi(n,r,e){let t=Yt(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:tt(r)?r:r.current;if(!o)return;let a=ut();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 So=["[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(","),_m=["[data-autofocus]"].map(n=>`${n}:not([tabindex='-1'])`).join(",");var bt=(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))(bt||{}),bi=(n=>(n[n.Error=0]="Error",n[n.Overflow=1]="Overflow",n[n.Success=2]="Success",n[n.Underflow=3]="Underflow",n))(bi||{}),Om=(n=>(n[n.Previous=-1]="Previous",n[n.Next=1]="Next",n))(Om||{});function wu(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(So)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}function Mm(n=document.body){return n==null?[]:Array.from(n.querySelectorAll(_m)).sort((r,e)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(e.tabIndex||Number.MAX_SAFE_INTEGER)))}var yi=(n=>(n[n.Strict=0]="Strict",n[n.Loose=1]="Loose",n))(yi||{});function xu(n,r=0){var e;return n===((e=En(n))==null?void 0:e.body)?!1:Fe(r,{0(){return n.matches(So)},1(){let t=n;for(;t!==null;){if(t.matches(So))return!0;t=t.parentElement}return!1}})}var Tm=(n=>(n[n.Keyboard=0]="Keyboard",n[n.Mouse=1]="Mouse",n))(Tm||{});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 Ht(n){n==null||n.focus({preventScroll:!0})}let Pm=["textarea","input"].join(",");function Im(n){var r,e;return(e=(r=n==null?void 0:n.matches)==null?void 0:r.call(n,Pm))!=null?e:!1}function wi(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 Nm(n,r){return Vn(wu(),r,{relativeTo:n})}function Vn(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?wi(n):n:r&64?Mm(n):wu(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))),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,f=i.length,h;do{if(c>=f||c+f<=0)return 0;let p=l+c;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(u),c+=s}while(h!==a.activeElement);return r&6&&Im(h)&&h.select(),2}function Eu(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function $m(){return/Android/gi.test(window.navigator.userAgent)}function xi(){return Eu()||$m()}function zn(n,r,e,t){let o=Yt(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 Du(n,r,e,t){let o=Yt(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 Su=30;function Ei(n,r,e){let t=Yt(e),o=d.useCallback(function(s,l){if(s.defaultPrevented)return;let u=l(s);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]}(r);for(let f of c)if(f!==null&&(f.contains(u)||s.composed&&s.composedPath().includes(f)))return;return!xu(u,yi.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t.current(s,u)},[t,r]),a=d.useRef(null);zn(n,"pointerdown",s=>{var l,u;xi()||(a.current=((u=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:u[0])||s.target)},!0),zn(n,"pointerup",s=>{if(xi()||!a.current)return;let l=a.current;return a.current=null,o(s,()=>l)},!0);let i=d.useRef({x:0,y:0});zn(n,"touchstart",s=>{i.current.x=s.touches[0].clientX,i.current.y=s.touches[0].clientY},!0),zn(n,"touchend",s=>{let l={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(l.x-i.current.x)>=Su||Math.abs(l.y-i.current.y)>=Su))return o(s,()=>jt(s.target)?s.target:null)},!0),Du(n,"blur",s=>o(s,()=>jh(window.document.activeElement)?window.document.activeElement:null),!0)}function Bt(...n){return d.useMemo(()=>En(...n),[...n])}var Lm=(n=>(n[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n))(Lm||{});const Vt={Ignore:{kind:0},Select:n=>({kind:1,target:n}),Close:{kind:2}},Fm=200,ku=5;function Cu(n,{trigger:r,action:e,close:t,select:o}){let a=d.useRef(null),i=d.useRef(null),s=d.useRef(null);zn(n&&r!==null,"pointerdown",l=>{ii(l==null?void 0:l.target)&&r!=null&&r.contains(l.target)&&(i.current=l.x,s.current=l.y,a.current=l.timeStamp)}),zn(n&&r!==null,"pointerup",l=>{var u,c;let f=a.current;if(f===null||(a.current=null,!jt(l.target))||Math.abs(l.x-((u=i.current)!=null?u:l.x))<ku&&Math.abs(l.y-((c=s.current)!=null?c:l.y))<ku)return;let h=e(l);switch(h.kind){case 0:return;case 1:{l.timeStamp-f>Fm&&(o(h.target),t());break}case 2:{t();break}}},{capture:!0})}function Di(n,r,e,t){let o=Yt(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 _u(n){let r=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Di(n,"blur",e=>{let t=e.target;yo(t)&&(r.current={value:t.value,selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})}),Z(()=>{if(document.activeElement!==n&&yo(n)&&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 Ou(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 Am(n){return d.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot)}function Rm(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 Ym(){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 Wm(){return Eu()?{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=ut();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(jt(s.target))try{let l=s.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),c=n.querySelector(u);jt(c)&&!t(c)&&(i=c)}catch{}},!0),r.addEventListener(n,"touchstart",s=>{if(jt(s.target)&&Wh(s.target))if(t(s.target)){let l=s.target;for(;l.parentElement&&t(l.parentElement);)l=l.parentElement;r.style(l,"overscrollBehavior","contain")}else r.style(s.target,"touchAction","none")}),r.addEventListener(n,"touchmove",s=>{if(jt(s.target)){if(yo(s.target))return;if(t(s.target)){let l=s.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),r.add(()=>{var s;let l=(s=window.scrollY)!=null?s:window.pageYOffset;a!==l&&window.scrollTo(0,a),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)})})}}:{}}function jm(){return{before({doc:n,d:r}){r.style(n.documentElement,"overflow","hidden")}}}function Hm(n){let r={};for(let e of n)Object.assign(r,e(r));return r}let Dn=Rm(()=>new Map,{PUSH(n,r){var e;let t=(e=this.get(n))!=null?e:{doc:n,count:0,d:ut(),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:Hm(e)},o=[Wm(),Ym(),jm()];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)}});Dn.subscribe(()=>{let n=Dn.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)&&Dn.dispatch(e.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",e),e.count===0&&Dn.dispatch("TEARDOWN",e)}});function Bm(n,r,e=()=>({containers:[]})){let t=Am(Dn),o=r?t.get(r):void 0,a=o?o.count>0:!1;return fe(()=>{if(!(!r||!n))return Dn.dispatch("PUSH",r,e),()=>Dn.dispatch("POP",r,e)},[n,r]),a}function Si(n,r,e=()=>[document.body]){let t=Or(n,"scroll-lock");Bm(t,r,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],e]}})}function Mu(n){return[n.screenX,n.screenY]}function Tu(){let n=d.useRef([-1,-1]);return{wasMoved(r){let e=Mu(r);return n.current[0]===e[0]&&n.current[1]===e[1]?!1:(n.current=e,!0)},update(r){n.current=Mu(r)}}}function Vm(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 Pu,Iu;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Pu=process==null?void 0:process.env)==null?void 0:Pu.NODE_ENV)==="test"&&typeof((Iu=Element==null?void 0:Element.prototype)==null?void 0:Iu.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(`
|
|
76
|
+
`)),[]});var zm=(n=>(n[n.None=0]="None",n[n.Closed=1]="Closed",n[n.Enter=2]="Enter",n[n.Leave=4]="Leave",n))(zm||{});function ki(n){let r={};for(let e in n)n[e]===!0&&(r[`data-${e}`]="");return r}function Ci(n,r,e,t){let[o,a]=d.useState(e),{hasFlag:i,addFlag:s,removeFlag:l}=Vm(n&&o?3:0),u=d.useRef(!1),c=d.useRef(!1),f=rn();return fe(()=>{var h;if(n){if(e&&a(!0),!r){e&&s(3);return}return(h=t==null?void 0:t.start)==null||h.call(t,e),qm(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 p;c.current&&typeof r.getAnimations=="function"&&r.getAnimations().length>0||(u.current=!1,l(7),e||a(!1),(p=t==null?void 0:t.end)==null||p.call(t,e))}})}},[n,e,r,f]),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 qm(n,{prepare:r,run:e,done:t,inFlight:o}){let a=ut();return Qm(n,{prepare:r,inFlight:o}),a.nextFrame(()=>{e(),a.requestAnimationFrame(()=>{a.add(Um(n,t))})}),a.dispose}function Um(n,r){var e,t;let o=ut();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 Qm(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 Gm(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]),fe(()=>{if(!r||!n)return;let i=En(r);if(!i)return;let s=o.current,l=a.current,u=Object.assign(f=>s(f),{acceptNode:s}),c=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)l(c.currentNode)},[r,n,o,a])}function Tr(n,r){let e=d.useRef([]),t=Z(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 ko(){return typeof window<"u"}function zt(n){return Nu(n)?(n.nodeName||"").toLowerCase():"#document"}function je(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function qe(n){var r;return(r=(Nu(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function Nu(n){return ko()?n instanceof Node||n instanceof je(n).Node:!1}function Oe(n){return ko()?n instanceof Element||n instanceof je(n).Element:!1}function Ge(n){return ko()?n instanceof HTMLElement||n instanceof je(n).HTMLElement:!1}function $u(n){return!ko()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof je(n).ShadowRoot}const Km=new Set(["inline","contents"]);function ln(n){const{overflow:r,overflowX:e,overflowY:t,display:o}=He(n);return/auto|scroll|overlay|hidden|clip/.test(r+t+e)&&!Km.has(o)}const Xm=new Set(["table","td","th"]);function Lu(n){return Xm.has(zt(n))}const Jm=[":popover-open",":modal"];function Sn(n){return Jm.some(r=>{try{return n.matches(r)}catch{return!1}})}const Zm=["transform","translate","scale","rotate","perspective"],ev=["transform","translate","scale","rotate","perspective","filter"],tv=["paint","layout","strict","content"];function Pr(n){const r=Ir(),e=Oe(n)?He(n):n;return Zm.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)||ev.some(t=>(e.willChange||"").includes(t))||tv.some(t=>(e.contain||"").includes(t))}function Fu(n){let r=at(n);for(;Ge(r)&&!Dt(r);){if(Pr(r))return r;if(Sn(r))return null;r=at(r)}return null}function Ir(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nv=new Set(["html","body","#document"]);function Dt(n){return nv.has(zt(n))}function He(n){return je(n).getComputedStyle(n)}function un(n){return Oe(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function at(n){if(zt(n)==="html")return n;const r=n.assignedSlot||n.parentNode||$u(n)&&n.host||qe(n);return $u(r)?r.host:r}function Au(n){const r=at(n);return Dt(r)?n.ownerDocument?n.ownerDocument.body:n.body:Ge(r)&&ln(r)?r:Au(r)}function cn(n,r,e){var t;r===void 0&&(r=[]),e===void 0&&(e=!0);const o=Au(n),a=o===((t=n.ownerDocument)==null?void 0:t.body),i=je(o);if(a){const s=Nr(i);return r.concat(i,i.visualViewport||[],ln(o)?o:[],s&&e?cn(s):[])}return r.concat(o,cn(o,[],e))}function Nr(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function rv(){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 dt=Math.min,Ne=Math.max,qt=Math.round,dn=Math.floor,Be=n=>({x:n,y:n}),ov={left:"right",right:"left",bottom:"top",top:"bottom"},av={start:"end",end:"start"};function _i(n,r,e){return Ne(n,dt(r,e))}function St(n,r){return typeof n=="function"?n(r):n}function ft(n){return n.split("-")[0]}function fn(n){return n.split("-")[1]}function Ru(n){return n==="x"?"y":"x"}function Co(n){return n==="y"?"height":"width"}const iv=new Set(["top","bottom"]);function it(n){return iv.has(ft(n))?"y":"x"}function _o(n){return Ru(it(n))}function Yu(n,r,e){e===void 0&&(e=!1);const t=fn(n),o=_o(n),a=Co(o);let i=o==="x"?t===(e?"end":"start")?"right":"left":t==="start"?"bottom":"top";return r.reference[a]>r.floating[a]&&(i=$r(i)),[i,$r(i)]}function Wu(n){const r=$r(n);return[Oi(n),r,Oi(r)]}function Oi(n){return n.replace(/start|end/g,r=>av[r])}const ju=["left","right"],Hu=["right","left"],sv=["top","bottom"],lv=["bottom","top"];function uv(n,r,e){switch(n){case"top":case"bottom":return e?r?Hu:ju:r?ju:Hu;case"left":case"right":return r?sv:lv;default:return[]}}function Bu(n,r,e,t){const o=fn(n);let a=uv(ft(n),e==="start",t);return o&&(a=a.map(i=>i+"-"+o),r&&(a=a.concat(a.map(Oi)))),a}function $r(n){return n.replace(/left|right|bottom|top/g,r=>ov[r])}function cv(n){return{top:0,right:0,bottom:0,left:0,...n}}function Mi(n){return typeof n!="number"?cv(n):{top:n,right:n,bottom:n,left:n}}function pn(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 Vu(n,r,e){let{reference:t,floating:o}=n;const a=it(r),i=_o(r),s=Co(i),l=ft(r),u=a==="y",c=t.x+t.width/2-o.width/2,f=t.y+t.height/2-o.height/2,h=t[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:t.y-o.height};break;case"bottom":p={x:c,y:t.y+t.height};break;case"right":p={x:t.x+t.width,y:f};break;case"left":p={x:t.x-o.width,y:f};break;default:p={x:t.x,y:t.y}}switch(fn(r)){case"start":p[i]-=h*(e&&u?-1:1);break;case"end":p[i]+=h*(e&&u?-1:1);break}return p}const dv=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:f}=Vu(u,t,l),h=t,p={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:y}=s[v],{x:E,y:w,data:S,reset:x}=await y({x:c,y:f,initialPlacement:t,placement:h,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:n,floating:r}});c=E??c,f=w??f,p={...p,[g]:{...p[g],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):x.rects),{x:c,y:f}=Vu(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function Oo(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:f="floating",altBoundary:h=!1,padding:p=0}=St(r,n),m=Mi(p),g=s[h?f==="floating"?"reference":"floating":f],y=pn(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})),E=f==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=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},x=pn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:w,strategy:l}):E);return{top:(y.top-x.top+m.top)/S.y,bottom:(x.bottom-y.bottom+m.bottom)/S.y,left:(y.left-x.left+m.left)/S.x,right:(x.right-y.right+m.right)/S.x}}const fv=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:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=St(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=ft(o),E=it(s),w=ft(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(w||!v?[$r(s)]:Wu(s)),T=m!=="none";!h&&T&&x.push(...Bu(s,v,m,S));const N=[s,...x],_=await Oo(r,g),O=[];let M=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&O.push(_[y]),f){const $=Yu(o,i,S);O.push(_[$[0]],_[$[1]])}if(M=[...M,{placement:o,overflows:O}],!O.every($=>$<=0)){var L,b;const $=(((L=a.flip)==null?void 0:L.index)||0)+1,Y=N[$];if(Y&&(!(f==="alignment"?E!==it(Y):!1)||M.every(C=>it(C.placement)===E?C.overflows[0]>0:!0)))return{data:{index:$,overflows:M},reset:{placement:Y}};let I=(b=M.filter(V=>V.overflows[0]<=0).sort((V,C)=>V.overflows[1]-C.overflows[1])[0])==null?void 0:b.placement;if(!I)switch(p){case"bestFit":{var k;const V=(k=M.filter(C=>{if(T){const q=it(C.placement);return q===E||q==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((C,q)=>C[1]-q[1])[0])==null?void 0:k[0];V&&(I=V);break}case"initialPlacement":I=s;break}if(o!==I)return{reset:{placement:I}}}return{}}}},pv=new Set(["left","top"]);async function hv(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=ft(e),s=fn(e),l=it(e)==="y",u=pv.has(i)?-1:1,c=a&&l?-1:1,f=St(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*c,y:h*u}:{x:h*u,y:p*c}}const mv=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 hv(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}}}}},vv=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:E}=g;return{x:y,y:E}}},...l}=St(n,r),u={x:e,y:t},c=await Oo(r,l),f=it(ft(o)),h=Ru(f);let p=u[h],m=u[f];if(a){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",E=p+c[g],w=p-c[y];p=_i(E,p,w)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",E=m+c[g],w=m-c[y];m=_i(E,m,w)}const v=s.fn({...r,[h]:p,[f]:m});return{...v,data:{x:v.x-e,y:v.y-t,enabled:{[h]:a,[f]:i}}}}}},gv=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}=St(n,r),c=await Oo(r,u),f=ft(o),h=fn(o),p=it(o)==="y",{width:m,height:v}=a.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,g=h==="end"?"top":"bottom");const E=v-c.top-c.bottom,w=m-c.left-c.right,S=dt(v-c[g],E),x=dt(m-c[y],w),T=!r.middlewareData.shift;let N=S,_=x;if((e=r.middlewareData.shift)!=null&&e.enabled.x&&(_=w),(t=r.middlewareData.shift)!=null&&t.enabled.y&&(N=E),T&&!h){const M=Ne(c.left,0),L=Ne(c.right,0),b=Ne(c.top,0),k=Ne(c.bottom,0);p?_=m-2*(M!==0||L!==0?M+L:Ne(c.left,c.right)):N=v-2*(b!==0||k!==0?b+k:Ne(c.top,c.bottom))}await l({...r,availableWidth:_,availableHeight:N});const O=await i.getDimensions(s.floating);return m!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function zu(n){const r=He(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Ge(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=qt(e)!==a||qt(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function Ti(n){return Oe(n)?n:n.contextElement}function qn(n){const r=Ti(n);if(!Ge(r))return Be(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=zu(r);let i=(a?qt(e.width):e.width)/t,s=(a?qt(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const bv=Be(0);function qu(n){const r=je(n);return!Ir()||!r.visualViewport?bv:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function yv(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==je(n)?!1:r}function kn(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=Ti(n);let i=Be(1);r&&(t?Oe(t)&&(i=qn(t)):i=qn(n));const s=yv(a,e,t)?qu(a):Be(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,f=o.height/i.y;if(a){const h=je(a),p=t&&Oe(t)?je(t):t;let m=h,v=Nr(m);for(;v&&t&&p!==m;){const g=qn(v),y=v.getBoundingClientRect(),E=He(v),w=y.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,S=y.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=S,m=je(v),v=Nr(m)}}return pn({width:c,height:f,x:l,y:u})}function Mo(n,r){const e=un(n).scrollLeft;return r?r.left+e:kn(qe(n)).left+e}function Uu(n,r){const e=n.getBoundingClientRect(),t=e.left+r.scrollLeft-Mo(n,e),o=e.top+r.scrollTop;return{x:t,y:o}}function wv(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=qe(t),s=r?Sn(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Be(1);const c=Be(0),f=Ge(t);if((f||!f&&!a)&&((zt(t)!=="body"||ln(i))&&(l=un(t)),Ge(t))){const p=kn(t);u=qn(t),c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}const h=i&&!f&&!a?Uu(i,l):Be(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:e.y*u.y-l.scrollTop*u.y+c.y+h.y}}function xv(n){return Array.from(n.getClientRects())}function Ev(n){const r=qe(n),e=un(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+Mo(n);const s=-e.scrollTop;return He(t).direction==="rtl"&&(i+=Ne(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}const Qu=25;function Dv(n,r){const e=je(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 c=Ir();(!c||c&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const u=Mo(t);if(u<=0){const c=t.ownerDocument,f=c.body,h=getComputedStyle(f),p=c.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(t.clientWidth-f.clientWidth-p);m<=Qu&&(a-=m)}else u<=Qu&&(a+=u);return{width:a,height:i,x:s,y:l}}const Sv=new Set(["absolute","fixed"]);function kv(n,r){const e=kn(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=Ge(n)?qn(n):Be(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 Gu(n,r,e){let t;if(r==="viewport")t=Dv(n,e);else if(r==="document")t=Ev(qe(n));else if(Oe(r))t=kv(r,e);else{const o=qu(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return pn(t)}function Ku(n,r){const e=at(n);return e===r||!Oe(e)||Dt(e)?!1:He(e).position==="fixed"||Ku(e,r)}function Cv(n,r){const e=r.get(n);if(e)return e;let t=cn(n,[],!1).filter(s=>Oe(s)&&zt(s)!=="body"),o=null;const a=He(n).position==="fixed";let i=a?at(n):n;for(;Oe(i)&&!Dt(i);){const s=He(i),l=Pr(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&Sv.has(o.position)||ln(i)&&!l&&Ku(n,i))?t=t.filter(c=>c!==i):o=s,i=at(i)}return r.set(n,t),t}function _v(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?Sn(r)?[]:Cv(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=Gu(r,c,o);return u.top=Ne(f.top,u.top),u.right=dt(f.right,u.right),u.bottom=dt(f.bottom,u.bottom),u.left=Ne(f.left,u.left),u},Gu(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ov(n){const{width:r,height:e}=zu(n);return{width:r,height:e}}function Mv(n,r,e){const t=Ge(r),o=qe(r),a=e==="fixed",i=kn(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Be(0);function u(){l.x=Mo(o)}if(t||!t&&!a)if((zt(r)!=="body"||ln(o))&&(s=un(r)),t){const p=kn(r,!0,a,r);l.x=p.x+r.clientLeft,l.y=p.y+r.clientTop}else o&&u();a&&!t&&o&&u();const c=o&&!t&&!a?Uu(o,s):Be(0),f=i.left+s.scrollLeft-l.x-c.x,h=i.top+s.scrollTop-l.y-c.y;return{x:f,y:h,width:i.width,height:i.height}}function Pi(n){return He(n).position==="static"}function Xu(n,r){if(!Ge(n)||He(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return qe(n)===e&&(e=e.ownerDocument.body),e}function Ju(n,r){const e=je(n);if(Sn(n))return e;if(!Ge(n)){let o=at(n);for(;o&&!Dt(o);){if(Oe(o)&&!Pi(o))return o;o=at(o)}return e}let t=Xu(n,r);for(;t&&Lu(t)&&Pi(t);)t=Xu(t,r);return t&&Dt(t)&&Pi(t)&&!Pr(t)?e:t||Fu(n)||e}const Tv=async function(n){const r=this.getOffsetParent||Ju,e=this.getDimensions,t=await e(n.floating);return{reference:Mv(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Pv(n){return He(n).direction==="rtl"}const Iv={convertOffsetParentRelativeRectToViewportRelativeRect:wv,getDocumentElement:qe,getClippingRect:_v,getOffsetParent:Ju,getElementRects:Tv,getClientRects:xv,getDimensions:Ov,getScale:qn,isElement:Oe,isRTL:Pv};function Zu(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function Nv(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:f,width:h,height:p}=u;if(s||r(),!h||!p)return;const m=dn(f),v=dn(o.clientWidth-(c+h)),g=dn(o.clientHeight-(f+p)),y=dn(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ne(0,dt(1,l))||1};let S=!0;function x(T){const N=T[0].intersectionRatio;if(N!==l){if(!S)return i();N?i(!1,N):t=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Zu(u,n.getBoundingClientRect())&&i(),S=!1}try{e=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(x,w)}e.observe(n)}return i(!0),a}function $v(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=Ti(n),c=o||a?[...u?cn(u):[],...cn(r)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const f=u&&s?Nv(u,e):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[E]=y;E&&E.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),e()}),u&&!l&&p.observe(u),p.observe(r));let m,v=l?kn(n):null;l&&g();function g(){const y=kn(n);v&&!Zu(v,y)&&e(),v=y,m=requestAnimationFrame(g)}return e(),()=>{var y;c.forEach(E=>{o&&E.removeEventListener("scroll",e),a&&E.removeEventListener("resize",e)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Ii=Oo,Lv=mv,Fv=vv,Av=fv,Rv=gv,Yv=(n,r,e)=>{const t=new Map,o={platform:Iv,...e},a={...o.platform,_c:t};return dv(n,r,{...o,platform:a})};var Wv=typeof document<"u",jv=function(){},To=Wv?d.useLayoutEffect:jv;function Po(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(!Po(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)&&!Po(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function ec(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function tc(n,r){const e=ec(n);return Math.round(r*e)/e}function Ni(n){const r=H.useRef(n);return To(()=>{r.current=n}),r}function Hv(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,f]=H.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=H.useState(t);Po(h,t)||p(t);const[m,v]=H.useState(null),[g,y]=H.useState(null),E=H.useCallback(C=>{C!==T.current&&(T.current=C,v(C))},[]),w=H.useCallback(C=>{C!==N.current&&(N.current=C,y(C))},[]),S=a||m,x=i||g,T=H.useRef(null),N=H.useRef(null),_=H.useRef(c),O=l!=null,M=Ni(l),L=Ni(o),b=Ni(u),k=H.useCallback(()=>{if(!T.current||!N.current)return;const C={placement:r,strategy:e,middleware:h};L.current&&(C.platform=L.current),Yv(T.current,N.current,C).then(q=>{const P={...q,isPositioned:b.current!==!1};$.current&&!Po(_.current,P)&&(_.current=P,cr.flushSync(()=>{f(P)}))})},[h,r,e,L,b]);To(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[u]);const $=H.useRef(!1);To(()=>($.current=!0,()=>{$.current=!1}),[]),To(()=>{if(S&&(T.current=S),x&&(N.current=x),S&&x){if(M.current)return M.current(S,x,k);k()}},[S,x,k,M,O]);const Y=H.useMemo(()=>({reference:T,floating:N,setReference:E,setFloating:w}),[E,w]),I=H.useMemo(()=>({reference:S,floating:x}),[S,x]),V=H.useMemo(()=>{const C={position:e,left:0,top:0};if(!I.floating)return C;const q=tc(I.floating,c.x),P=tc(I.floating,c.y);return s?{...C,transform:"translate("+q+"px, "+P+"px)",...ec(I.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:q,top:P}},[e,s,I.floating,c.x,c.y]);return H.useMemo(()=>({...c,update:k,refs:Y,elements:I,floatingStyles:V}),[c,k,Y,I,V])}const nc=(n,r)=>({...Lv(n),options:[n,r]}),Bv=(n,r)=>({...Fv(n),options:[n,r]}),Vv=(n,r)=>({...Av(n),options:[n,r]}),zv=(n,r)=>({...Rv(n),options:[n,r]}),rc={...H},qv=rc.useInsertionEffect||(n=>n());function oc(n){const r=H.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return qv(()=>{r.current=n}),H.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 $i=typeof document<"u"?d.useLayoutEffect:d.useEffect;let ac=!1,Uv=0;const ic=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Uv++;function Qv(){const[n,r]=H.useState(()=>ac?ic():void 0);return $i(()=>{n==null&&r(ic())},[]),H.useEffect(()=>{ac=!0},[]),n}const Gv=rc.useId||Qv;let Lr;process.env.NODE_ENV!=="production"&&(Lr=new Set);function Kv(){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=Lr)!=null&&n.has(o))){var a;(a=Lr)==null||a.add(o),console.warn(o)}}function Xv(){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=Lr)!=null&&n.has(o))){var a;(a=Lr)==null||a.add(o),console.error(o)}}function Jv(){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 Zv=H.createContext(null),eg=H.createContext(null),tg=()=>{var n;return((n=H.useContext(Zv))==null?void 0:n.id)||null},ng=()=>H.useContext(eg),rg="data-floating-ui-focusable";function og(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Gv(),a=H.useRef({}),[i]=H.useState(()=>Jv()),s=tg()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!Oe(p)&&Xv("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]=H.useState(t.reference),c=oc((p,m,v)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:v,nested:s}),e==null||e(p,m,v)}),f=H.useMemo(()=>({setPositionReference:u}),[]),h=H.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return H.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function ag(n){n===void 0&&(n={});const{nodeId:r}=n,e=og({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=H.useState(null),[s,l]=H.useState(null),c=(o==null?void 0:o.domReference)||a,f=H.useRef(null),h=ng();$i(()=>{c&&(f.current=c)},[c]);const p=Hv({...n,elements:{...o,...s&&{reference:s}}}),m=H.useCallback(w=>{const S=Oe(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;l(S),p.refs.setReference(S)},[p.refs]),v=H.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]),g=H.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),y=H.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=H.useMemo(()=>({...p,...t,refs:g,elements:y,nodeId:r}),[p,g,y,r,t]);return $i(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(S=>S.id===r);w&&(w.context=E)}),H.useMemo(()=>({...p,context:E,refs:g,elements:y}),[p,g,y,E])}const sc="active",lc="selected";function Li(n,r,e){const t=new Map,o=e==="item";let a=n;if(o&&n){const{[sc]:i,[lc]:s,...l}=n;a=l}return{...e==="floating"&&{tabIndex:-1,[rg]:""},...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&&[sc,lc].includes(u)))if(u.indexOf("on")===0){if(t.has(u)||t.set(u,[]),typeof c=="function"){var f;(f=t.get(u))==null||f.push(c),i[u]=function(){for(var h,p=arguments.length,m=new Array(p),v=0;v<p;v++)m[v]=arguments[v];return(h=t.get(u))==null?void 0:h.map(g=>g(...m)).find(g=>g!==void 0)}}}else i[u]=c}),i),{})}}function ig(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=H.useCallback(s=>Li(s,n,"reference"),r),a=H.useCallback(s=>Li(s,n,"floating"),e),i=H.useCallback(s=>Li(s,n,"item"),t);return H.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}function uc(n,r){return{...n,rects:{...n.rects,floating:{...n.rects.floating,height:r}}}}const sg=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}=St(n,r),{rects:f,elements:{floating:h}}=r,p=e.current[i],m=(u==null?void 0:u.current)||h,v=h.clientTop||m.clientTop,g=h.clientTop!==0,y=m.clientTop!==0,E=h===m;if(process.env.NODE_ENV!=="production"&&(r.placement.startsWith("bottom")||Kv('`placement` side must be "bottom" when using the `inner`',"middleware.")),!p)return{};const w={...r,...await nc(-p.offsetTop-h.clientTop-f.reference.height/2-p.offsetHeight/2-a).fn(r)},S=await Ii(uc(w,m.scrollHeight+v+h.clientTop),c),x=await Ii(w,{...c,elementContext:"reference"}),T=Ne(0,S.top),N=w.y+T,M=(m.scrollHeight>m.clientHeight?L=>L:qt)(Ne(0,m.scrollHeight+(g&&E||y?v*2:0)-T-Ne(0,S.bottom)));if(m.style.maxHeight=M+"px",m.scrollTop=T,o){const L=m.offsetHeight<p.offsetHeight*dt(s,e.current.length)-1||x.top>=-l||x.bottom>=-l;cr.flushSync(()=>o(L))}return t&&(t.current=await Ii(uc({...w,y:N},m.offsetHeight+v+h.clientTop),c)),{y:N}}});function lg(n,r){const{open:e,elements:t}=n,{enabled:o=!0,overflowRef:a,scrollRef:i,onChange:s}=r,l=oc(s),u=H.useRef(!1),c=H.useRef(null),f=H.useRef(null);H.useEffect(()=>{if(!o)return;function p(v){if(v.ctrlKey||!m||a.current==null)return;const g=v.deltaY,y=a.current.top>=-.5,E=a.current.bottom>=-.5,w=m.scrollHeight-m.clientHeight,S=g<0?-1:1,x=g<0?"max":"min";m.scrollHeight<=m.clientHeight||(!y&&g>0||!E&&g<0?(v.preventDefault(),cr.flushSync(()=>{l(T=>T+Math[x](g,w*S))})):/firefox/i.test(rv())&&(m.scrollTop+=g))}const m=(i==null?void 0:i.current)||t.floating;if(e&&m)return m.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=m.scrollTop,a.current!=null&&(f.current={...a.current})}),()=>{c.current=null,f.current=null,m.removeEventListener("wheel",p)}},[o,e,t.floating,a,i,l]);const h=H.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(i==null?void 0:i.current)||t.floating;if(!(!a.current||!p||!u.current)){if(c.current!==null){const m=p.scrollTop-c.current;(a.current.bottom<-.5&&m<-1||a.current.top<-.5&&m>1)&&cr.flushSync(()=>l(v=>v+m))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[t.floating,l,a,i]);return H.useMemo(()=>o?{floating:h}:{},[o,h])}let Un=d.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Un.displayName="FloatingContext";let Fi=d.createContext(null);Fi.displayName="PlacementContext";function cc(n){return d.useMemo(()=>n?typeof n=="string"?{to:n}:n:null,[n])}function dc(){return d.useContext(Un).setReference}function ug(){return d.useContext(Un).getReferenceProps}function fc(){let{getFloatingProps:n,slot:r}=d.useContext(Un);return d.useCallback((...e)=>Object.assign({},n(...e),{"data-anchor":r.anchor}),[n,r])}function pc(n=null){n===!1&&(n=null),typeof n=="string"&&(n={to:n});let r=d.useContext(Fi),e=d.useMemo(()=>n,[JSON.stringify(n,(o,a)=>{var i;return(i=a==null?void 0:a.outerHTML)!=null?i:a})]);fe(()=>{r==null||r(e??null)},[r,e]);let t=d.useContext(Un);return d.useMemo(()=>[t.setFloating,n?t.styles:{}],[t.setFloating,n,t.styles])}let hc=4;function mc({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);cg(s);let u=r&&e!==null&&s!==null,{to:c="bottom",gap:f=0,offset:h=0,padding:p=0,inner:m}=dg(e,s),[v,g="center"]=c.split(" ");fe(()=>{u&&a(0)},[u]);let{refs:y,floatingStyles:E,context:w}=ag({open:u,placement:v==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${v}`:`${v}-${g}`,strategy:"absolute",transform:!1,middleware:[nc({mainAxis:v==="selection"?0:f,crossAxis:h}),Bv({padding:p}),v!=="selection"&&Vv({padding:p}),v==="selection"&&m?sg({...m,padding:p,overflowRef:i,offset:o,minItemsVisible:hc,referenceOverflowThreshold:p,onFallbackChange(L){var b,k;if(!L)return;let $=w.elements.floating;if(!$)return;let Y=parseFloat(getComputedStyle($).scrollPaddingBottom)||0,I=Math.min(hc,$.childElementCount),V=0,C=0;for(let q of(k=(b=w.elements.floating)==null?void 0:b.childNodes)!=null?k:[])if(tt(q)){let P=q.offsetTop,W=P+q.clientHeight+Y,G=$.scrollTop,j=G+$.clientHeight;if(P>=G&&W<=j)I--;else{C=Math.max(0,Math.min(W,j)-Math.max(P,G)),V=q.clientHeight;break}}I>=1&&a(q=>{let P=V*I-C+Y;return q>=P?q:P})}}):null,zv({padding:p,apply({availableWidth:L,availableHeight:b,elements:k}){Object.assign(k.floating.style,{overflow:"auto",maxWidth:`${L}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${b}px)`})}})].filter(Boolean),whileElementsMounted:$v}),[S=v,x=g]=w.placement.split("-");v==="selection"&&(S="selection");let T=d.useMemo(()=>({anchor:[S,x].filter(Boolean).join(" ")}),[S,x]),N=lg(w,{overflowRef:i,onChange:a}),{getReferenceProps:_,getFloatingProps:O}=ig([N]),M=Z(L=>{l(L),y.setFloating(L)});return H.createElement(Fi.Provider,{value:t},H.createElement(Un.Provider,{value:{setFloating:M,setReference:y.setReference,styles:E,getReferenceProps:_,getFloatingProps:O,slot:T}},n))}function cg(n){fe(()=>{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 dg(n,r){var e,t,o;let a=Ai((e=n==null?void 0:n.gap)!=null?e:"var(--anchor-gap, 0)",r),i=Ai((t=n==null?void 0:n.offset)!=null?t:"var(--anchor-offset, 0)",r),s=Ai((o=n==null?void 0:n.padding)!=null?o:"var(--anchor-padding, 0)",r);return{...n,gap:a,offset:i,padding:s}}function Ai(n,r,e=void 0){let t=rn(),o=Z((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=gc(l,u);return[c,f=>{let h=vc(l);{let p=h.map(m=>window.getComputedStyle(u).getPropertyValue(m));t.requestAnimationFrame(function m(){t.nextFrame(m);let v=!1;for(let[y,E]of h.entries()){let w=window.getComputedStyle(u).getPropertyValue(E);if(p[y]!==w){p[y]=w,v=!0;break}}if(!v)return;let g=gc(l,u);c!==g&&(f(g),c=g)})}return t.dispose}]}return[e,null]}),a=d.useMemo(()=>o(n,r)[0],[n,r]),[i=a,s]=d.useState();return fe(()=>{let[l,u]=o(n,r);if(s(l),!!u)return u(s)},[n,r]),i}function vc(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,...vc(o)]:[t]}return[]}function gc(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 fg({children:n,freeze:r}){let e=Io(r,n);return d.createElement(d.Fragment,null,e)}function Io(n,r){let[e,t]=d.useState(r);return!n&&e!==r&&t(r),n?e:r}let No=d.createContext(null);No.displayName="OpenClosedContext";var Ue=(n=>(n[n.Open=1]="Open",n[n.Closed=2]="Closed",n[n.Closing=4]="Closing",n[n.Opening=8]="Opening",n))(Ue||{});function Qn(){return d.useContext(No)}function Ri({value:n,children:r}){return d.createElement(No.Provider,{value:n},r)}function pg({children:n}){return d.createElement(No.Provider,{value:null},n)}function hg(n){function r(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",r))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",r),r())}let kt=[];hg(()=>{function n(r){if(!jt(r.target)||r.target===document.body||kt[0]===r.target)return;let e=r.target;e=e.closest(So),kt.unshift(e??r.target),kt=kt.filter(t=>t!=null&&t.isConnected),kt.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 mg(n){throw new Error("Unexpected object: "+n)}var se=(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))(se||{});function Gn(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:mg(n)}}var $o=(n=>(n[n.Left=0]="Left",n[n.Right=2]="Right",n))($o||{});function Lo(n){let r=Z(n),e=d.useRef(!1);d.useEffect(()=>(e.current=!1,()=>{e.current=!0,vo(()=>{e.current&&r()})}),[r])}function vg(){let n=typeof document>"u";return"useSyncExternalStore"in H?(r=>r.useSyncExternalStore)(H)(()=>()=>{},()=>!1,()=>!n):!1}function Fr(){let n=vg(),[r,e]=H.useState(xt.isHandoffComplete);return r&&xt.isHandoffComplete===!1&&e(!1),H.useEffect(()=>{r!==!0&&e(!0)},[r]),H.useEffect(()=>xt.handoff(),[]),n?!1:r}let bc=d.createContext(!1);function gg(){return d.useContext(bc)}function yc(n){return d.createElement(bc.Provider,{value:n.force},n.children)}function bg(n){let r=gg(),e=d.useContext(xc),[t,o]=d.useState(()=>{var a;if(!r&&e!==null)return(a=e.current)!=null?a:null;if(xt.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 wc=d.Fragment,yg=_e(function(n,r){let{ownerDocument:e=null,...t}=n,o=d.useRef(null),a=We(zh(p=>{o.current=p}),r),i=Bt(o),s=e??i,l=bg(s),[u]=d.useState(()=>{var p;return xt.isServer?null:(p=s==null?void 0:s.createElement("div"))!=null?p:null}),c=d.useContext(Yi),f=Fr();fe(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),fe(()=>{if(u&&c)return c.register(u)},[c,u]),Lo(()=>{var p;!l||!u||(ii(u)&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((p=l.parentElement)==null||p.removeChild(l)))});let h=Te();return f?!l||!u?null:Le.createPortal(h({ourProps:{ref:a},theirProps:t,slot:{},defaultTag:wc,name:"Portal"}),u):null});function wg(n,r){let e=We(r),{enabled:t=!0,ownerDocument:o,...a}=n,i=Te();return t?d.createElement(yg,{...a,ownerDocument:o,ref:e}):i({ourProps:{ref:e},theirProps:a,slot:{},defaultTag:wc,name:"Portal"})}let xg=d.Fragment,xc=d.createContext(null);function Eg(n,r){let{target:e,...t}=n,o={ref:We(r)},a=Te();return d.createElement(xc.Provider,{value:e},a({ourProps:o,theirProps:t,defaultTag:xg,name:"Popover.Group"}))}let Yi=d.createContext(null);function Dg(){let n=d.useContext(Yi),r=d.useRef([]),e=Z(a=>(r.current.push(a),n&&n.register(a),()=>t(a))),t=Z(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(Yi.Provider,{value:o},a)},[o])]}let Sg=_e(wg),Ec=_e(Eg),Wi=Object.assign(Sg,{Group:Ec});var kg=Object.defineProperty,Cg=(n,r,e)=>r in n?kg(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Dc=(n,r,e)=>(Cg(n,typeof r!="symbol"?r+"":r,e),e),de=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(de||{}),st=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(st||{}),Ct=(n=>(n[n.Pointer=0]="Pointer",n[n.Focus=1]="Focus",n[n.Other=2]="Other",n))(Ct||{}),Sc=(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))(Sc||{});function ji(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):wi(t,i=>i.dataRef.current.domRef.current),a=e?o.indexOf(e):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let _g={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,f=r.focus===se.Specific?r.idx:Gn(r,{resolveItems:()=>u,resolveActiveIndex:()=>{var p,m;return(m=(p=n.activeOptionIndex)!=null?p:u.findIndex(v=>!c(v)))!=null?m:null},resolveDisabled:c,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=ji(n);if(i.activeOptionIndex===null){let u=i.options.findIndex(c=>!c.dataRef.current.disabled);u!==-1&&(i.activeOptionIndex=u)}let s=r.focus===se.Specific?r.idx:Gn(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=ji(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=ji(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}},Og=class Yf extends ui{constructor(r){super(r),Dc(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Fe(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:(e,t)=>(this.send({type:4,payload:{id:e,dataRef:t}}),()=>{this.state.activeOptionIndex===this.state.dataRef.current.calculateIndex(t.current.value)&&this.send({type:6,value:!0}),this.send({type:5,id:e})}),goToOption:(e,t)=>(this.send({type:6,value:!1}),this.send({type:2,...e,trigger:t})),setIsTyping:e=>{this.send({type:3,isTyping:e})},closeCombobox:()=>{var e,t;this.send({type:1}),this.send({type:6,value:!1}),(t=(e=this.state.dataRef.current).onClose)==null||t.call(e)},openCombobox:()=>{this.send({type:0}),this.send({type:6,value:!0})},setActivationTrigger:e=>{this.send({type:7,trigger:e})},selectActiveOption:()=>{let e=this.selectors.activeOptionIndex(this.state);if(e!==null){if(this.actions.setIsTyping(!1),this.state.virtual)this.actions.onChange(this.state.virtual.options[e]);else{let{dataRef:t}=this.state.options[e];this.actions.onChange(t.current.value)}this.actions.goToOption({focus:se.Specific,idx:e})}},setInputElement:e=>{this.send({type:9,element:e})},setButtonElement:e=>{this.send({type:10,element:e})},setOptionsElement:e=>{this.send({type:11,element:e})}}),Dc(this,"selectors",{activeDescendantId:e=>{var t,o;let a=this.selectors.activeOptionIndex(e);if(a!==null)return e.virtual?(o=e.options.find(i=>!i.dataRef.current.disabled&&e.dataRef.current.compare(i.dataRef.current.value,e.virtual.options[a])))==null?void 0:o.id:(t=e.options[a])==null?void 0:t.id},activeOptionIndex:e=>{if(e.defaultToFirstOption&&e.activeOptionIndex===null&&(e.virtual?e.virtual.options.length>0:e.options.length>0)){if(e.virtual){let{options:o,disabled:a}=e.virtual,i=o.findIndex(s=>{var l;return!((l=a==null?void 0:a(s))!=null&&l)});if(i!==-1)return i}let t=e.options.findIndex(o=>!o.dataRef.current.disabled);if(t!==-1)return t}return e.activeOptionIndex},activeOption:e=>{var t,o;let a=this.selectors.activeOptionIndex(e);return a===null?null:e.virtual?e.virtual.options[a??0]:(o=(t=e.options[a])==null?void 0:t.dataRef.current.value)!=null?o:null},isActive:(e,t,o)=>{var a;let i=this.selectors.activeOptionIndex(e);return i===null?!1:e.virtual?i===e.dataRef.current.calculateIndex(t):((a=e.options[i])==null?void 0:a.id)===o},shouldScrollIntoView:(e,t,o)=>!(e.virtual||e.__demoMode||e.comboboxState!==0||e.activationTrigger===0||!this.selectors.isActive(e,t,o))});{let e=this.state.id,t=Bn.get(null);this.disposables.add(t.on(fi.Push,o=>{!t.selectors.isTop(o,e)&&this.state.comboboxState===0&&this.actions.closeCombobox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:r,virtual:e=null,__demoMode:t=!1}){var o;return new Yf({id:r,dataRef:{current:{}},comboboxState:t?0:1,isTyping:!1,options:[],virtual:e?{options:e.options,disabled:(o=e.disabled)!=null?o:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:t})}reduce(r,e){return Fe(e.type,_g,r,e)}};const kc=d.createContext(null);function Ar(n){let r=d.useContext(kc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Cc),e}return r}function Cc({id:n,virtual:r=null,__demoMode:e=!1}){let t=d.useMemo(()=>Og.new({id:n,virtual:r,__demoMode:e}),[]);return Lo(()=>t.dispose()),t}let Rr=d.createContext(null);Rr.displayName="ComboboxDataContext";function Kn(n){let r=d.useContext(Rr);if(r===null){let e=new Error(`<${n} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Kn),e}return r}let _c=d.createContext(null);function Mg(n){let r=Ar("VirtualProvider"),e=Kn("VirtualProvider"),{options:t}=e.virtual,o=we(r,p=>p.optionsElement),[a,i]=d.useMemo(()=>{let p=o;if(!p)return[0,0];let m=window.getComputedStyle(p);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[o]),s=fm({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);fe(()=>{u(p=>p+1)},[t]);let c=s.getVirtualItems(),f=we(r,p=>p.activationTrigger===Ct.Pointer),h=we(r,r.selectors.activeOptionIndex);return c.length===0?null:d.createElement(_c.Provider,{value:s},d.createElement("div",{style:{position:"relative",width:"100%",height:`${s.getTotalSize()}px`},ref:p=>{p&&(f||h!==null&&t.length>h&&s.scrollToIndex(h))}},c.map(p=>{var m;return d.createElement(d.Fragment,{key:p.key},d.cloneElement((m=n.children)==null?void 0:m.call(n,{...n.slot,option:t[p.index]}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":t.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let Tg=d.Fragment;function Pg(n,r){let e=d.useId(),t=go(),{value:o,defaultValue:a,onChange:i,form:s,name:l,by:u,invalid:c=!1,disabled:f=t||!1,onClose:h,__demoMode:p=!1,multiple:m=!1,immediate:v=!1,virtual:g=null,nullable:y,...E}=n,w=Hl(a),[S=m?[]:void 0,x]=jl(o,i,w),T=Cc({id:e,virtual:g,__demoMode:p}),N=d.useRef({static:!1,hold:!1}),_=lu(u),O=Z(B=>g?u===null?g.options.indexOf(B):g.options.findIndex(K=>_(K,B)):T.state.options.findIndex(K=>_(K.dataRef.current.value,B))),M=d.useCallback(B=>Fe(k.mode,{[st.Multi]:()=>S.some(K=>_(K,B)),[st.Single]:()=>_(S,B)}),[S]),L=we(T,B=>B.virtual),b=Z(()=>h==null?void 0:h()),k=d.useMemo(()=>({__demoMode:p,immediate:v,optionsPropsRef:N,value:S,defaultValue:w,disabled:f,invalid:c,mode:m?st.Multi:st.Single,virtual:g?L:null,onChange:x,isSelected:M,calculateIndex:O,compare:_,onClose:b}),[S,w,f,c,m,x,M,p,T,g,L,b]);fe(()=>{var B;g&&T.send({type:Sc.UpdateVirtualConfiguration,options:g.options,disabled:(B=g.disabled)!=null?B:null})},[g,g==null?void 0:g.options,g==null?void 0:g.disabled]),fe(()=>{T.state.dataRef.current=k},[k]);let[$,Y,I,V]=we(T,B=>[B.comboboxState,B.buttonElement,B.inputElement,B.optionsElement]),C=Bn.get(null),q=we(C,d.useCallback(B=>C.selectors.isTop(B,e),[C,e]));Ei(q,[Y,I,V],()=>T.actions.closeCombobox());let P=we(T,T.selectors.activeOptionIndex),W=we(T,T.selectors.activeOption),G=d.useMemo(()=>({open:$===de.Open,disabled:f,invalid:c,activeIndex:P,activeOption:W,value:S}),[k,f,S,c,W,$]),[j,F]=tu(),ne=r===null?{}:{ref:r},U=d.useCallback(()=>{if(w!==void 0)return x==null?void 0:x(w)},[x,w]),A=Te();return d.createElement(F,{value:j,props:{htmlFor:I==null?void 0:I.id},slot:{open:$===de.Open,disabled:f}},d.createElement(mc,null,d.createElement(Rr.Provider,{value:k},d.createElement(kc.Provider,{value:T},d.createElement(Ri,{value:Fe($,{[de.Open]:Ue.Open,[de.Closed]:Ue.Closed})},l!=null&&d.createElement(ql,{disabled:f,data:S!=null?{[l]:S}:{},form:s,onReset:U}),A({ourProps:ne,theirProps:E,slot:G,defaultTag:Tg,name:"Combobox"}))))))}let Ig="input";function Ng(n,r){var e,t;let o=Ar("Combobox.Input"),a=Kn("Combobox.Input"),i=d.useId(),s=ai(),{id:l=s||`headlessui-combobox-input-${i}`,onChange:u,displayValue:c,disabled:f=a.disabled||!1,autoFocus:h=!1,type:p="text",...m}=n,[v]=we(o,F=>[F.inputElement]),g=d.useRef(null),y=We(g,r,dc(),o.actions.setInputElement),E=Bt(v),[w,S]=we(o,F=>[F.comboboxState,F.isTyping]),x=rn(),T=Z(()=>{o.actions.onChange(null),o.state.optionsElement&&(o.state.optionsElement.scrollTop=0),o.actions.goToOption({focus:se.Nothing})}),N=d.useMemo(()=>{var F;return typeof c=="function"&&a.value!==void 0?(F=c(a.value))!=null?F:"":typeof a.value=="string"?a.value:""},[a.value,c]);Tr(([F,ne],[U,A])=>{if(o.state.isTyping)return;let B=g.current;B&&((A===de.Open&&ne===de.Closed||F!==U)&&(B.value=F),requestAnimationFrame(()=>{if(o.state.isTyping||!B||(E==null?void 0:E.activeElement)!==B)return;let{selectionStart:K,selectionEnd:J}=B;Math.abs((J??0)-(K??0))===0&&K===0&&B.setSelectionRange(B.value.length,B.value.length)}))},[N,w,E,S]),Tr(([F],[ne])=>{if(F===de.Open&&ne===de.Closed){if(o.state.isTyping)return;let U=g.current;if(!U)return;let A=U.value,{selectionStart:B,selectionEnd:K,selectionDirection:J}=U;U.value="",U.value=A,J!==null?U.setSelectionRange(B,K,J):U.setSelectionRange(B,K)}},[w]);let _=d.useRef(!1),O=Z(()=>{_.current=!0}),M=Z(()=>{x.nextFrame(()=>{_.current=!1})}),L=Z(F=>{switch(o.actions.setIsTyping(!0),F.key){case he.Enter:if(o.state.comboboxState!==de.Open||_.current)return;if(F.preventDefault(),F.stopPropagation(),o.selectors.activeOptionIndex(o.state)===null){o.actions.closeCombobox();return}o.actions.selectActiveOption(),a.mode===st.Single&&o.actions.closeCombobox();break;case he.ArrowDown:return F.preventDefault(),F.stopPropagation(),Fe(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Next}),[de.Closed]:()=>o.actions.openCombobox()});case he.ArrowUp:return F.preventDefault(),F.stopPropagation(),Fe(o.state.comboboxState,{[de.Open]:()=>o.actions.goToOption({focus:se.Previous}),[de.Closed]:()=>{Le.flushSync(()=>o.actions.openCombobox()),a.value||o.actions.goToOption({focus:se.Last})}});case he.Home:if(F.shiftKey)break;return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.First});case he.PageUp:return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.First});case he.End:if(F.shiftKey)break;return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.Last});case he.PageDown:return F.preventDefault(),F.stopPropagation(),o.actions.goToOption({focus:se.Last});case he.Escape:return o.state.comboboxState!==de.Open?void 0:(F.preventDefault(),o.state.optionsElement&&!a.optionsPropsRef.current.static&&F.stopPropagation(),a.mode===st.Single&&a.value===null&&T(),o.actions.closeCombobox());case he.Tab:if(o.state.comboboxState!==de.Open)return;a.mode===st.Single&&o.state.activationTrigger!==Ct.Focus&&o.actions.selectActiveOption(),o.actions.closeCombobox();break}}),b=Z(F=>{u==null||u(F),a.mode===st.Single&&F.target.value===""&&T(),o.actions.openCombobox()}),k=Z(F=>{var ne,U,A;let B=(ne=F.relatedTarget)!=null?ne:kt.find(K=>K!==F.currentTarget);if(!((U=o.state.optionsElement)!=null&&U.contains(B))&&!((A=o.state.buttonElement)!=null&&A.contains(B))&&o.state.comboboxState===de.Open)return F.preventDefault(),a.mode===st.Single&&a.value===null&&T(),o.actions.closeCombobox()}),$=Z(F=>{var ne,U,A;let B=(ne=F.relatedTarget)!=null?ne:kt.find(K=>K!==F.currentTarget);(U=o.state.buttonElement)!=null&&U.contains(B)||(A=o.state.optionsElement)!=null&&A.contains(B)||a.disabled||a.immediate&&o.state.comboboxState!==de.Open&&x.microTask(()=>{Le.flushSync(()=>o.actions.openCombobox()),o.actions.setActivationTrigger(Ct.Focus)})}),Y=kr(),I=Jl(),{isFocused:V,focusProps:C}=ti({autoFocus:h}),{isHovered:q,hoverProps:P}=ei({isDisabled:f}),W=we(o,F=>F.optionsElement),G=d.useMemo(()=>({open:w===de.Open,disabled:f,invalid:a.invalid,hover:q,focus:V,autofocus:h}),[a,q,V,h,f,a.invalid]),j=Dr({ref:y,id:l,role:"combobox",type:p,"aria-controls":W==null?void 0:W.id,"aria-expanded":w===de.Open,"aria-activedescendant":we(o,o.selectors.activeDescendantId),"aria-labelledby":Y,"aria-describedby":I,"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:f||void 0,autoFocus:h,onCompositionStart:O,onCompositionEnd:M,onKeyDown:L,onChange:b,onFocus:$,onBlur:k},C,P);return Te()({ourProps:j,theirProps:m,slot:G,defaultTag:Ig,name:"Combobox.Input"})}let $g="button";function Lg(n,r){let e=Ar("Combobox.Button"),t=Kn("Combobox.Button"),[o,a]=d.useState(null),i=We(r,a,e.actions.setButtonElement),s=d.useId(),{id:l=`headlessui-combobox-button-${s}`,disabled:u=t.disabled||!1,autoFocus:c=!1,...f}=n,[h,p,m]=we(e,b=>[b.comboboxState,b.inputElement,b.optionsElement]),v=_u(p),g=h===de.Open;Cu(g,{trigger:o,action:d.useCallback(b=>{if(o!=null&&o.contains(b.target)||p!=null&&p.contains(b.target))return Vt.Ignore;let k=b.target.closest('[role="option"]:not([data-disabled])');return tt(k)?Vt.Select(k):m!=null&&m.contains(b.target)?Vt.Ignore:Vt.Close},[o,p,m]),close:e.actions.closeCombobox,select:e.actions.selectActiveOption});let y=Z(b=>{switch(b.key){case he.Space:case he.Enter:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&Le.flushSync(()=>e.actions.openCombobox()),v();return;case he.ArrowDown:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Le.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.First})),v();return;case he.ArrowUp:b.preventDefault(),b.stopPropagation(),e.state.comboboxState===de.Closed&&(Le.flushSync(()=>e.actions.openCombobox()),e.state.dataRef.current.value||e.actions.goToOption({focus:se.Last})),v();return;case he.Escape:if(e.state.comboboxState!==de.Open)return;b.preventDefault(),e.state.optionsElement&&!t.optionsPropsRef.current.static&&b.stopPropagation(),Le.flushSync(()=>e.actions.closeCombobox()),v();return;default:return}}),E=Z(b=>{b.preventDefault(),!Gl(b.currentTarget)&&(b.button===$o.Left&&(e.state.comboboxState===de.Open?e.actions.closeCombobox():e.actions.openCombobox()),v())}),w=kr([l]),{isFocusVisible:S,focusProps:x}=ti({autoFocus:c}),{isHovered:T,hoverProps:N}=ei({isDisabled:u}),{pressed:_,pressProps:O}=Yl({disabled:u}),M=d.useMemo(()=>({open:h===de.Open,active:_||h===de.Open,disabled:u,invalid:t.invalid,value:t.value,hover:T,focus:S}),[t,T,S,_,u,h]),L=Dr({ref:i,id:l,type:Ou(n,o),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":h===de.Open,"aria-labelledby":w,disabled:u||void 0,autoFocus:c,onPointerDown:E,onKeyDown:y},x,N,O);return Te()({ourProps:L,theirProps:f,slot:M,defaultTag:$g,name:"Combobox.Button"})}let Fg="div",Ag=on.RenderStrategy|on.Static;function Rg(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:f=!1,...h}=n,p=Ar("Combobox.Options"),m=Kn("Combobox.Options"),v=cc(l);v&&(u=!0);let[g,y]=pc(v),[E,w]=d.useState(null),S=fc(),x=We(r,v?g:null,p.actions.setOptionsElement,w),[T,N,_,O,M]=we(p,J=>[J.comboboxState,J.inputElement,J.buttonElement,J.optionsElement,J.activationTrigger]),L=Bt(N||_),b=Bt(O),k=Qn(),[$,Y]=Ci(f,E,k!==null?(k&Ue.Open)===Ue.Open:T===de.Open);gi($,N,p.actions.closeCombobox);let I=m.__demoMode?!1:c&&T===de.Open;Si(I,b);let V=m.__demoMode?!1:c&&T===de.Open;vi(V,{allowed:d.useCallback(()=>[N,_,O],[N,_,O])}),fe(()=>{var J;m.optionsPropsRef.current.static=(J=n.static)!=null?J:!1},[m.optionsPropsRef,n.static]),fe(()=>{m.optionsPropsRef.current.hold=s},[m.optionsPropsRef,s]),Gm(T===de.Open,{container:O,accept(J){return J.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:J.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(J){J.setAttribute("role","none")}});let C=kr([_==null?void 0:_.id]),q=d.useMemo(()=>({open:T===de.Open,option:void 0}),[T]),P=Z(()=>{p.actions.setActivationTrigger(Ct.Pointer)}),W=Z(J=>{J.preventDefault(),p.actions.setActivationTrigger(Ct.Pointer)}),G=Dr(v?S():{},{"aria-labelledby":C,role:"listbox","aria-multiselectable":m.mode===st.Multi?!0:void 0,id:i,ref:x,style:{...h.style,...y,"--input-width":si(N,!0).width,"--button-width":si(_,!0).width},onWheel:M===Ct.Pointer?void 0:P,onMouseDown:W,...ki(Y)}),j=$&&T===de.Closed,F=Io(j,(e=m.virtual)==null?void 0:e.options),ne=Io(j,m.value),U=Z(J=>m.compare(ne,J)),A=d.useMemo(()=>{if(!m.virtual)return m;if(F===void 0)throw new Error("Missing `options` in virtual mode");return F!==m.virtual.options?{...m,virtual:{...m.virtual,options:F}}:m},[m,F,(t=m.virtual)==null?void 0:t.options]);m.virtual&&Object.assign(h,{children:d.createElement(Rr.Provider,{value:A},d.createElement(Mg,{slot:q},h.children))});let B=Te(),K=d.useMemo(()=>m.mode===st.Multi?m:{...m,isSelected:U},[m,U]);return d.createElement(Wi,{enabled:u?n.static||$:!1,ownerDocument:L},d.createElement(Rr.Provider,{value:K},B({ourProps:G,theirProps:{...h,children:d.createElement(fg,{freeze:j},typeof h.children=="function"?(o=h.children)==null?void 0:o.call(h,q):h.children)},slot:q,defaultTag:Fg,features:Ag,visible:$,name:"Combobox.Options"})))}let Yg="div";function Wg(n,r){var e,t,o;let a=Kn("Combobox.Option"),i=Ar("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:f=null,...h}=n,[p]=we(i,Y=>[Y.inputElement]),m=_u(p),v=we(i,d.useCallback(Y=>i.selectors.isActive(Y,u,l),[u,l])),g=a.isSelected(u),y=d.useRef(null),E=Yt({disabled:c,value:u,domRef:y,order:f}),w=d.useContext(_c),S=We(r,y,w?w.measureElement:null),x=Z(()=>{i.actions.setIsTyping(!1),i.actions.onChange(u)});fe(()=>i.actions.registerOption(l,E),[E,l]);let T=we(i,d.useCallback(Y=>i.selectors.shouldScrollIntoView(Y,u,l),[u,l]));fe(()=>{if(T)return ut().requestAnimationFrame(()=>{var Y,I;(I=(Y=y.current)==null?void 0:Y.scrollIntoView)==null||I.call(Y,{block:"nearest"})})},[T,y]);let N=Z(Y=>{Y.preventDefault(),Y.button===$o.Left&&(c||(x(),xi()||requestAnimationFrame(()=>m()),a.mode===st.Single&&i.actions.closeCombobox()))}),_=Z(()=>{if(c)return i.actions.goToOption({focus:se.Nothing});let Y=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:Y})}),O=Tu(),M=Z(Y=>O.update(Y)),L=Z(Y=>{if(!O.wasMoved(Y)||c||v&&i.state.activationTrigger===Ct.Pointer)return;let I=a.calculateIndex(u);i.actions.goToOption({focus:se.Specific,idx:I},Ct.Pointer)}),b=Z(Y=>{O.wasMoved(Y)&&(c||v&&(a.optionsPropsRef.current.hold||i.state.activationTrigger===Ct.Pointer&&i.actions.goToOption({focus:se.Nothing})))}),k=d.useMemo(()=>({active:v,focus:v,selected:g,disabled:c}),[v,g,c]),$={id:l,ref:S,role:"option",tabIndex:c===!0?void 0:-1,"aria-disabled":c===!0?!0:void 0,"aria-selected":g,disabled:void 0,onMouseDown:N,onFocus:_,onPointerEnter:M,onMouseEnter:M,onPointerMove:L,onMouseMove:L,onPointerLeave:b,onMouseLeave:b};return Te()({ourProps:$,theirProps:h,slot:k,defaultTag:Yg,name:"Combobox.Option"})}let jg=_e(Pg),Hg=_e(Lg),Oc=_e(Ng),Bg=Eo,Mc=_e(Rg),Tc=_e(Wg),Vg=Object.assign(jg,{Input:Oc,Button:Hg,Label:Bg,Options:Mc,Option:Tc});function zg(n,r=typeof document<"u"?document.defaultView:null,e){let t=Or(n,"escape");Di(r,"keydown",o=>{t&&(o.defaultPrevented||o.key===he.Escape&&e(o))})}function qg(){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 fe(()=>{if(!r)return;function o(a){t(a.matches)}return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[r]),e}function Ug({defaultContainers:n=[],portals:r,mainTreeNode:e}={}){let t=Bt(e),o=Z(()=>{var a,i;let s=[];for(let l of n)l!==null&&(Wt(l)?s.push(l):"current"in l&&Wt(l.current)&&s.push(l.current));if(r!=null&&r.current)for(let l of r.current)s.push(l);for(let l of(a=t==null?void 0:t.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&Wt(l)&&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:Z(a=>o().some(i=>i.contains(a)))}}let Pc=d.createContext(null);function Ic({children:n,node:r}){let[e,t]=d.useState(null),o=Nc(r??e);return d.createElement(Pc.Provider,{value:o},n,o===null&&d.createElement(Sr,{features:jn.Hidden,ref:a=>{var i,s;if(a){for(let l of(s=(i=En(a))==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])if(l!==document.body&&l!==document.head&&Wt(l)&&l!=null&&l.contains(a)){t(l);break}}}}))}function Nc(n=null){var r;return(r=d.useContext(Pc))!=null?r:n}function Hi(){let n=d.useRef(!1);return fe(()=>(n.current=!0,()=>{n.current=!1}),[]),n}var Yr=(n=>(n[n.Forwards=0]="Forwards",n[n.Backwards=1]="Backwards",n))(Yr||{});function Qg(){let n=d.useRef(0);return Du(!0,"keydown",r=>{r.key==="Tab"&&(n.current=r.shiftKey?1:0)},!0),n}function $c(n){if(!n)return new Set;if(typeof n=="function")return new Set(n());let r=new Set;for(let e of n.current)Wt(e.current)&&r.add(e.current);return r}let Gg="div";var Cn=(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))(Cn||{});function Kg(n,r){let e=d.useRef(null),t=We(e,r),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=n;Fr()||(s=0);let u=Bt(e);eb(s,{ownerDocument:u});let c=tb(s,{ownerDocument:u,container:e,initialFocus:o,initialFocusFallback:a});nb(s,{ownerDocument:u,container:e,containers:i,previousActiveElement:c});let f=Qg(),h=Z(E=>{if(!tt(e.current))return;let w=e.current;(S=>S())(()=>{Fe(f.current,{[Yr.Forwards]:()=>{Vn(w,bt.First,{skipElements:[E.relatedTarget,a]})},[Yr.Backwards]:()=>{Vn(w,bt.Last,{skipElements:[E.relatedTarget,a]})}})})}),p=Or(!!(s&2),"focus-trap#tab-lock"),m=rn(),v=d.useRef(!1),g={ref:t,onKeyDown(E){E.key=="Tab"&&(v.current=!0,m.requestAnimationFrame(()=>{v.current=!1}))},onBlur(E){if(!(s&4))return;let w=$c(i);tt(e.current)&&w.add(e.current);let S=E.relatedTarget;jt(S)&&S.dataset.headlessuiFocusGuard!=="true"&&(Lc(w,S)||(v.current?Vn(e.current,Fe(f.current,{[Yr.Forwards]:()=>bt.Next,[Yr.Backwards]:()=>bt.Previous})|bt.WrapAround,{relativeTo:E.target}):jt(E.target)&&Ht(E.target)))}},y=Te();return d.createElement(d.Fragment,null,p&&d.createElement(Sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:jn.Focusable}),y({ourProps:g,theirProps:l,defaultTag:Gg,name:"FocusTrap"}),p&&d.createElement(Sr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:h,features:jn.Focusable}))}let Xg=_e(Kg),Jg=Object.assign(Xg,{features:Cn});function Zg(n=!0){let r=d.useRef(kt.slice());return Tr(([e],[t])=>{t===!0&&e===!1&&vo(()=>{r.current.splice(0)}),t===!1&&e===!0&&(r.current=kt.slice())},[n,kt,r]),Z(()=>{var e;return(e=r.current.find(t=>t!=null&&t.isConnected))!=null?e:null})}function eb(n,{ownerDocument:r}){let e=!!(n&8),t=Zg(e);Tr(()=>{e||(r==null?void 0:r.activeElement)===(r==null?void 0:r.body)&&Ht(t())},[e]),Lo(()=>{e&&Ht(t())})}function tb(n,{ownerDocument:r,container:e,initialFocus:t,initialFocusFallback:o}){let a=d.useRef(null),i=Or(!!(n&1),"focus-trap#initial-focus"),s=Hi();return Tr(()=>{if(n===0)return;if(!i){o!=null&&o.current&&Ht(o.current);return}let l=e.current;l&&vo(()=>{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)Ht(t.current);else{if(n&16){if(Vn(l,bt.First|bt.AutoFocus)!==bi.Error)return}else if(Vn(l,bt.First)!==bi.Error)return;if(o!=null&&o.current&&(Ht(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 nb(n,{ownerDocument:r,container:e,containers:t,previousActiveElement:o}){let a=Hi(),i=!!(n&4);Di(r==null?void 0:r.defaultView,"focus",s=>{if(!i||!a.current)return;let l=$c(t);tt(e.current)&&l.add(e.current);let u=o.current;if(!u)return;let c=s.target;tt(c)?Lc(l,c)?(o.current=c,Ht(c)):(s.preventDefault(),s.stopPropagation(),Ht(u)):Ht(o.current)},!0)}function Lc(n,r){for(let e of n)if(e.contains(r))return!0;return!1}function Fc(n){var r;return!!(n.enter||n.enterFrom||n.enterTo||n.leave||n.leaveFrom||n.leaveTo)||((r=n.as)!=null?r:Rc)!==d.Fragment||d.Children.count(n.children)===1}let Fo=d.createContext(null);Fo.displayName="TransitionContext";var rb=(n=>(n.Visible="visible",n.Hidden="hidden",n))(rb||{});function ob(){let n=d.useContext(Fo);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}function ab(){let n=d.useContext(Ao);if(n===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return n}let Ao=d.createContext(null);Ao.displayName="NestingContext";function Ro(n){return"children"in n?Ro(n.children):n.current.filter(({el:r})=>r.current!==null).filter(({state:r})=>r==="visible").length>0}function Ac(n,r){let e=Yt(n),t=d.useRef([]),o=Hi(),a=rn(),i=Z((p,m=an.Hidden)=>{let v=t.current.findIndex(({el:g})=>g===p);v!==-1&&(Fe(m,{[an.Unmount](){t.current.splice(v,1)},[an.Hidden](){t.current[v].state="hidden"}}),a.microTask(()=>{var g;!Ro(t)&&o.current&&((g=e.current)==null||g.call(e))}))}),s=Z(p=>{let m=t.current.find(({el:v})=>v===p);return m?m.state!=="visible"&&(m.state="visible"):t.current.push({el:p,state:"visible"}),()=>i(p,an.Unmount)}),l=d.useRef([]),u=d.useRef(Promise.resolve()),c=d.useRef({enter:[],leave:[]}),f=Z((p,m,v)=>{l.current.splice(0),r&&(r.chains.current[m]=r.chains.current[m].filter(([g])=>g!==p)),r==null||r.chains.current[m].push([p,new Promise(g=>{l.current.push(g)})]),r==null||r.chains.current[m].push([p,new Promise(g=>{Promise.all(c.current[m].map(([y,E])=>E)).then(()=>g())})]),m==="enter"?u.current=u.current.then(()=>r==null?void 0:r.wait.current).then(()=>v(m)):v(m)}),h=Z((p,m,v)=>{Promise.all(c.current[m].splice(0).map(([g,y])=>y)).then(()=>{var g;(g=l.current.shift())==null||g()}).then(()=>v(m))});return d.useMemo(()=>({children:t,register:s,unregister:i,onStart:f,onStop:h,wait:u,chains:c}),[s,i,t,f,h,c,u])}let Rc=d.Fragment,Yc=on.RenderStrategy;function ib(n,r){var e,t;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:u,enterFrom:c,enterTo:f,entered:h,leave:p,leaveFrom:m,leaveTo:v,...g}=n,[y,E]=d.useState(null),w=d.useRef(null),S=Fc(n),x=We(...S?[w,r,E]:r===null?[]:[r]),T=(e=g.unmount)==null||e?an.Unmount:an.Hidden,{show:N,appear:_,initial:O}=ob(),[M,L]=d.useState(N?"visible":"hidden"),b=ab(),{register:k,unregister:$}=b;fe(()=>k(w),[k,w]),fe(()=>{if(T===an.Hidden&&w.current){if(N&&M!=="visible"){L("visible");return}return Fe(M,{hidden:()=>$(w),visible:()=>k(w)})}},[M,w,k,$,N,T]);let Y=Fr();fe(()=>{if(S&&Y&&M==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,M,Y,S]);let I=O&&!_,V=_&&N&&O,C=d.useRef(!1),q=Ac(()=>{C.current||(L("hidden"),$(w))},b),P=Z(A=>{C.current=!0;let B=A?"enter":"leave";q.onStart(w,B,K=>{K==="enter"?a==null||a():K==="leave"&&(s==null||s())})}),W=Z(A=>{let B=A?"enter":"leave";C.current=!1,q.onStop(w,B,K=>{K==="enter"?i==null||i():K==="leave"&&(l==null||l())}),B==="leave"&&!Ro(q)&&(L("hidden"),$(w))});d.useEffect(()=>{S&&o||(P(N),W(N))},[N,S,o]);let G=!(!o||!S||!Y||I),[,j]=Ci(G,y,N,{start:P,end:W}),F=sn({ref:x,className:((t=ri(g.className,V&&u,V&&c,j.enter&&u,j.enter&&j.closed&&c,j.enter&&!j.closed&&f,j.leave&&p,j.leave&&!j.closed&&m,j.leave&&j.closed&&v,!j.transition&&N&&h))==null?void 0:t.trim())||void 0,...ki(j)}),ne=0;M==="visible"&&(ne|=Ue.Open),M==="hidden"&&(ne|=Ue.Closed),N&&M==="hidden"&&(ne|=Ue.Opening),!N&&M==="visible"&&(ne|=Ue.Closing);let U=Te();return d.createElement(Ao.Provider,{value:q},d.createElement(Ri,{value:ne},U({ourProps:F,theirProps:g,defaultTag:Rc,features:Yc,visible:M==="visible",name:"Transition.Child"})))}function sb(n,r){let{show:e,appear:t=!1,unmount:o=!0,...a}=n,i=d.useRef(null),s=Fc(n),l=We(...s?[i,r]:r===null?[]:[r]);Fr();let u=Qn();if(e===void 0&&u!==null&&(e=(u&Ue.Open)===Ue.Open),e===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=d.useState(e?"visible":"hidden"),h=Ac(()=>{e||f("hidden")}),[p,m]=d.useState(!0),v=d.useRef([e]);fe(()=>{p!==!1&&v.current[v.current.length-1]!==e&&(v.current.push(e),m(!1))},[v,e]);let g=d.useMemo(()=>({show:e,appear:t,initial:p}),[e,t,p]);fe(()=>{e?f("visible"):!Ro(h)&&i.current!==null&&f("hidden")},[e,h]);let y={unmount:o},E=Z(()=>{var x;p&&m(!1),(x=n.beforeEnter)==null||x.call(n)}),w=Z(()=>{var x;p&&m(!1),(x=n.beforeLeave)==null||x.call(n)}),S=Te();return d.createElement(Ao.Provider,{value:h},d.createElement(Fo.Provider,{value:g},S({ourProps:{...y,as:d.Fragment,children:d.createElement(Wc,{ref:l,...y,...a,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:Yc,visible:c==="visible",name:"Transition"})))}function lb(n,r){let e=d.useContext(Fo)!==null,t=Qn()!==null;return d.createElement(d.Fragment,null,!e&&t?d.createElement(Bi,{ref:r,...n}):d.createElement(Wc,{ref:r,...n}))}let Bi=_e(sb),Wc=_e(ib),Vi=_e(lb),jc=Object.assign(Bi,{Child:Vi,Root:Bi});var ub=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(ub||{}),cb=(n=>(n[n.SetTitleId=0]="SetTitleId",n))(cb||{});let db={0(n,r){return n.titleId===r.id?n:{...n,titleId:r.id}}},zi=d.createContext(null);zi.displayName="DialogContext";function Yo(n){let r=d.useContext(zi);if(r===null){let e=new Error(`<${n} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Yo),e}return r}function fb(n,r){return Fe(r.type,db,n,r)}let Hc=_e(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,...f}=n,h=d.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=Qn();o===void 0&&p!==null&&(o=(p&Ue.Open)===Ue.Open);let m=d.useRef(null),v=We(m,r),g=Bt(m),y=o?0:1,[E,w]=d.useReducer(fb,{titleId:null,descriptionId:null,panelRef:d.createRef()}),S=Z(()=>a(!1)),x=Z(j=>w({type:0,id:j})),T=Fr()?y===0:!1,[N,_]=Dg(),O={get current(){var j;return(j=E.panelRef.current)!=null?j:m.current}},M=Nc(),{resolveContainers:L}=Ug({mainTreeNode:M,portals:N,defaultContainers:[O]}),b=p!==null?(p&Ue.Closing)===Ue.Closing:!1;vi(u||b?!1:T,{allowed:Z(()=>{var j,F;return[(F=(j=m.current)==null?void 0:j.closest("[data-headlessui-portal]"))!=null?F:null]}),disallowed:Z(()=>{var j;return[(j=M==null?void 0:M.closest("body > *:not(#headlessui-portal-root)"))!=null?j:null]})});let k=Bn.get(null);fe(()=>{if(T)return k.actions.push(t),()=>k.actions.pop(t)},[k,t,T]);let $=we(k,d.useCallback(j=>k.selectors.isTop(j,t),[k,t]));Ei($,L,j=>{j.preventDefault(),S()}),zg($,g==null?void 0:g.defaultView,j=>{j.preventDefault(),j.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),S()}),Si(u||b?!1:T,g,L),gi(T,m,S);let[Y,I]=qh(),V=d.useMemo(()=>[{dialogState:y,close:S,setTitleId:x,unmount:c},E],[y,E,S,x,c]),C=d.useMemo(()=>({open:y===0}),[y]),q={ref:v,id:t,role:s,tabIndex:-1,"aria-modal":u?void 0:y===0?!0:void 0,"aria-labelledby":E.titleId,"aria-describedby":Y,unmount:c},P=!qg(),W=Cn.None;T&&!u&&(W|=Cn.RestoreFocus,W|=Cn.TabLock,l&&(W|=Cn.AutoFocus),P&&(W|=Cn.InitialFocus));let G=Te();return d.createElement(pg,null,d.createElement(yc,{force:!0},d.createElement(Wi,null,d.createElement(zi.Provider,{value:V},d.createElement(Ec,{target:m},d.createElement(yc,{force:!1},d.createElement(I,{slot:C},d.createElement(_,null,d.createElement(Jg,{initialFocus:i,initialFocusFallback:m,containers:L,features:W},d.createElement(em,{value:S},G({ourProps:q,theirProps:f,slot:C,defaultTag:pb,features:hb,visible:y===0,name:"Dialog"})))))))))))}),pb="div",hb=on.RenderStrategy|on.Static;function mb(n,r){let{transition:e=!1,open:t,...o}=n,a=Qn(),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(Ic,null,d.createElement(jc,{show:t,transition:e,unmount:o.unmount},d.createElement(Hc,{ref:r,...o}))):d.createElement(Ic,null,d.createElement(Hc,{ref:r,open:t,...o}))}let vb="div";function gb(n,r){let e=d.useId(),{id:t=`headlessui-dialog-panel-${e}`,transition:o=!1,...a}=n,[{dialogState:i,unmount:s},l]=Yo("Dialog.Panel"),u=We(r,l.panelRef),c=d.useMemo(()=>({open:i===0}),[i]),f=Z(g=>{g.stopPropagation()}),h={ref:u,id:t,onClick:f},p=o?Vi:d.Fragment,m=o?{unmount:s}:{},v=Te();return d.createElement(p,{...m},v({ourProps:h,theirProps:a,slot:c,defaultTag:vb,name:"Dialog.Panel"}))}let bb="div";function yb(n,r){let{transition:e=!1,...t}=n,[{dialogState:o,unmount:a}]=Yo("Dialog.Backdrop"),i=d.useMemo(()=>({open:o===0}),[o]),s={ref:r,"aria-hidden":!0},l=e?Vi:d.Fragment,u=e?{unmount:a}:{},c=Te();return d.createElement(l,{...u},c({ourProps:s,theirProps:t,slot:i,defaultTag:bb,name:"Dialog.Backdrop"}))}let wb="h2";function xb(n,r){let e=d.useId(),{id:t=`headlessui-dialog-title-${e}`,...o}=n,[{dialogState:a,setTitleId:i}]=Yo("Dialog.Title"),s=We(r);d.useEffect(()=>(i(t),()=>i(null)),[t,i]);let l=d.useMemo(()=>({open:a===0}),[a]),u={ref:s,id:t};return Te()({ourProps:u,theirProps:o,slot:l,defaultTag:wb,name:"Dialog.Title"})}let Eb=_e(mb),Bc=_e(gb);_e(yb);let Vc=_e(xb),Wr=Object.assign(Eb,{Panel:Bc,Title:Vc,Description:Zl});function Db(n,r){let e=d.useRef({left:0,top:0});if(fe(()=>{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 zc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function qc(n){var r,e;let t=(r=n.innerText)!=null?r:"",o=n.cloneNode(!0);if(!tt(o))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 zc.test(i)&&(i=i.replace(zc,"")),i}function Sb(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():qc(a).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return qc(n).trim()}function kb(n){let r=d.useRef(""),e=d.useRef("");return Z(()=>{let t=n.current;if(!t)return"";let o=t.innerText;if(r.current===o)return e.current;let a=Sb(t).trim().toLowerCase();return r.current=o,e.current=a,a})}var Cb=Object.defineProperty,_b=(n,r,e)=>r in n?Cb(n,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[r]=e,Uc=(n,r,e)=>(_b(n,typeof r!="symbol"?r+"":r,e),e),Ke=(n=>(n[n.Open=0]="Open",n[n.Closed=1]="Closed",n))(Ke||{}),_t=(n=>(n[n.Single=0]="Single",n[n.Multi=1]="Multi",n))(_t||{}),Wo=(n=>(n[n.Pointer=0]="Pointer",n[n.Other=1]="Other",n))(Wo||{}),Qc=(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))(Qc||{});function Gc(n,r=e=>e){let e=n.activeOptionIndex!==null?n.options[n.activeOptionIndex]:null,t=wi(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 Ob={1(n){return n.dataRef.current.disabled||n.listboxState===1?n:{...n,activeOptionIndex:null,pendingFocus:{focus:se.Nothing},listboxState:1,__demoMode:!1}},0(n,r){if(n.dataRef.current.disabled||n.listboxState===0)return n;let e=n.activeOptionIndex,{isSelected:t}=n.dataRef.current,o=n.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(e=o),{...n,pendingFocus:r.focus,listboxState:0,activeOptionIndex:e,__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===se.Nothing)return{...s,activeOptionIndex:null};if(r.focus===se.Specific)return{...s,activeOptionIndex:n.options.findIndex(c=>c.id===r.id)};if(r.focus===se.Previous){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,h=Gn(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(((t=f.current)==null?void 0:t.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:h}}}}else if(r.focus===se.Next){let c=n.activeOptionIndex;if(c!==null){let f=n.options[c].dataRef.current.domRef,h=Gn(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=Gc(n),u=Gn(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.pendingFocus.focus!==se.Nothing&&(t=Gn(n.pendingFocus,{resolveItems:()=>e,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),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,pendingFocus:{focus:se.Nothing},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,...Gc(n),pendingShouldSort:!1}:n},Mb=class Wf extends ui{constructor(r){super(r),Uc(this,"actions",{onChange:e=>{let{onChange:t,compare:o,mode:a,value:i}=this.state.dataRef.current;return Fe(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:di(()=>{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:di(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:6,options:e.splice(0)})}]}),goToOption:di(()=>{let e=null;return[(t,o)=>{e={type:2,...t,trigger:o}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},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:se.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})}}),Uc(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})})});{let e=this.state.id,t=Bn.get(null);this.disposables.add(t.on(fi.Push,o=>{!t.selectors.isTop(o,e)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}}static new({id:r,__demoMode:e=!1}){return new Wf({id:r,dataRef:{current:{}},listboxState:e?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:se.Nothing},__demoMode:e})}reduce(r,e){return Fe(e.type,Ob,r,e)}};const Kc=d.createContext(null);function qi(n){let r=d.useContext(Kc);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Xc),e}return r}function Xc({id:n,__demoMode:r=!1}){let e=d.useMemo(()=>Mb.new({id:n,__demoMode:r}),[]);return Lo(()=>e.dispose()),e}let jo=d.createContext(null);jo.displayName="ListboxDataContext";function jr(n){let r=d.useContext(jo);if(r===null){let e=new Error(`<${n} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,jr),e}return r}let Tb=d.Fragment;function Pb(n,r){let e=d.useId(),t=go(),{value:o,defaultValue:a,form:i,name:s,onChange:l,by:u,invalid:c=!1,disabled:f=t||!1,horizontal:h=!1,multiple:p=!1,__demoMode:m=!1,...v}=n;const g=h?"horizontal":"vertical";let y=We(r),E=Hl(a),[w=p?[]:void 0,S]=jl(o,l,E),x=Xc({id:e,__demoMode:m}),T=d.useRef({static:!1,hold:!1}),N=d.useRef(new Map),_=lu(u),O=d.useCallback(G=>Fe(M.mode,{[_t.Multi]:()=>w.some(j=>_(j,G)),[_t.Single]:()=>_(w,G)}),[w]),M=d.useMemo(()=>({value:w,disabled:f,invalid:c,mode:p?_t.Multi:_t.Single,orientation:g,onChange:S,compare:_,isSelected:O,optionsPropsRef:T,listRef:N}),[w,f,c,p,g,S,_,O,T,N]);fe(()=>{x.state.dataRef.current=M},[M]);let L=we(x,G=>G.listboxState),b=Bn.get(null),k=we(b,d.useCallback(G=>b.selectors.isTop(G,e),[b,e])),[$,Y]=we(x,G=>[G.buttonElement,G.optionsElement]);Ei(k,[$,Y],(G,j)=>{x.send({type:Qc.CloseListbox}),xu(j,yi.Loose)||(G.preventDefault(),$==null||$.focus())});let I=d.useMemo(()=>({open:L===Ke.Open,disabled:f,invalid:c,value:w}),[L,f,c,w]),[V,C]=tu({inherit:!0}),q={ref:y},P=d.useCallback(()=>{if(E!==void 0)return S==null?void 0:S(E)},[S,E]),W=Te();return d.createElement(C,{value:V,props:{htmlFor:$==null?void 0:$.id},slot:{open:L===Ke.Open,disabled:f}},d.createElement(mc,null,d.createElement(Kc.Provider,{value:x},d.createElement(jo.Provider,{value:M},d.createElement(Ri,{value:Fe(L,{[Ke.Open]:Ue.Open,[Ke.Closed]:Ue.Closed})},s!=null&&w!=null&&d.createElement(ql,{disabled:f,data:{[s]:w},form:i,onReset:P}),W({ourProps:q,theirProps:v,slot:I,defaultTag:Tb,name:"Listbox"}))))))}let Ib="button";function Nb(n,r){let e=d.useId(),t=ai(),o=jr("Listbox.Button"),a=qi("Listbox.Button"),{id:i=t||`headlessui-listbox-button-${e}`,disabled:s=o.disabled||!1,autoFocus:l=!1,...u}=n,c=We(r,dc(),a.actions.setButtonElement),f=ug(),[h,p,m]=we(a,C=>[C.listboxState,C.buttonElement,C.optionsElement]),v=h===Ke.Open;Cu(v,{trigger:p,action:d.useCallback(C=>{if(p!=null&&p.contains(C.target))return Vt.Ignore;let q=C.target.closest('[role="option"]:not([data-disabled])');return tt(q)?Vt.Select(q):m!=null&&m.contains(C.target)?Vt.Ignore:Vt.Close},[p,m]),close:a.actions.closeListbox,select:a.actions.selectActiveOption});let g=Z(C=>{switch(C.key){case he.Enter:Nh(C.currentTarget);break;case he.Space:case he.ArrowDown:C.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.First});break;case he.ArrowUp:C.preventDefault(),a.actions.openListbox({focus:o.value?se.Nothing:se.Last});break}}),y=Z(C=>{switch(C.key){case he.Space:C.preventDefault();break}}),E=Z(C=>{var q;if(C.button===$o.Left){if(Gl(C.currentTarget))return C.preventDefault();a.state.listboxState===Ke.Open?(Le.flushSync(()=>a.actions.closeListbox()),(q=a.state.buttonElement)==null||q.focus({preventScroll:!0})):(C.preventDefault(),a.actions.openListbox({focus:se.Nothing}))}}),w=d.useRef(null),S=Z(C=>{w.current=C.pointerType,C.pointerType==="mouse"&&E(C)}),x=Z(C=>{w.current!=="mouse"&&E(C)}),T=Z(C=>C.preventDefault()),N=kr([i]),_=Jl(),{isFocusVisible:O,focusProps:M}=ti({autoFocus:l}),{isHovered:L,hoverProps:b}=ei({isDisabled:s}),{pressed:k,pressProps:$}=Yl({disabled:s}),Y=d.useMemo(()=>({open:h===Ke.Open,active:k||h===Ke.Open,disabled:s,invalid:o.invalid,value:o.value,hover:L,focus:O,autofocus:l}),[h,o.value,s,L,O,k,o.invalid,l]),I=we(a,C=>C.listboxState===Ke.Open),V=Dr(f(),{ref:c,id:i,type:Ou(n,p),"aria-haspopup":"listbox","aria-controls":m==null?void 0:m.id,"aria-expanded":I,"aria-labelledby":N,"aria-describedby":_,disabled:s||void 0,autoFocus:l,onKeyDown:g,onKeyUp:y,onKeyPress:T,onPointerDown:S,onClick:x},M,b,$);return Te()({ourProps:V,theirProps:u,slot:Y,defaultTag:Ib,name:"Listbox.Button"})}let Jc=d.createContext(!1),$b="div",Lb=on.RenderStrategy|on.Static;function Fb(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=cc(o),[c,f]=d.useState(null);u&&(a=!0);let h=jr("Listbox.Options"),p=qi("Listbox.Options"),[m,v,g,y]=we(p,A=>[A.listboxState,A.buttonElement,A.optionsElement,A.__demoMode]),E=Bt(v),w=Bt(g),S=Qn(),[x,T]=Ci(s,c,S!==null?(S&Ue.Open)===Ue.Open:m===Ke.Open);gi(x,v,p.actions.closeListbox);let N=y?!1:i&&m===Ke.Open;Si(N,w);let _=y?!1:i&&m===Ke.Open;vi(_,{allowed:d.useCallback(()=>[v,g],[v,g])});let O=m!==Ke.Open,M=Db(O,v)?!1:x,L=x&&m===Ke.Closed,b=Io(L,h.value),k=Z(A=>h.compare(b,A)),$=we(p,A=>{var B;if(u==null||!((B=u==null?void 0:u.to)!=null&&B.includes("selection")))return null;let K=A.options.findIndex(J=>k(J.dataRef.current.value));return K===-1&&(K=0),K}),Y=(()=>{if(u==null)return;if($===null)return{...u,inner:void 0};let A=Array.from(h.listRef.current.values());return{...u,inner:{listRef:{current:A},index:$}}})(),[I,V]=pc(Y),C=fc(),q=We(r,u?I:null,p.actions.setOptionsElement,f),P=rn();d.useEffect(()=>{var A;let B=g;B&&m===Ke.Open&&B!==((A=En(B))==null?void 0:A.activeElement)&&(B==null||B.focus({preventScroll:!0}))},[m,g]);let W=Z(A=>{var B,K;switch(P.dispose(),A.key){case he.Space:if(p.state.searchQuery!=="")return A.preventDefault(),A.stopPropagation(),p.actions.search(A.key);case he.Enter:if(A.preventDefault(),A.stopPropagation(),p.state.activeOptionIndex!==null){let{dataRef:J}=p.state.options[p.state.activeOptionIndex];p.actions.onChange(J.current.value)}h.mode===_t.Single&&(Le.flushSync(()=>p.actions.closeListbox()),(B=p.state.buttonElement)==null||B.focus({preventScroll:!0}));break;case Fe(h.orientation,{vertical:he.ArrowDown,horizontal:he.ArrowRight}):return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Next});case Fe(h.orientation,{vertical:he.ArrowUp,horizontal:he.ArrowLeft}):return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Previous});case he.Home:case he.PageUp:return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.First});case he.End:case he.PageDown:return A.preventDefault(),A.stopPropagation(),p.actions.goToOption({focus:se.Last});case he.Escape:A.preventDefault(),A.stopPropagation(),Le.flushSync(()=>p.actions.closeListbox()),(K=p.state.buttonElement)==null||K.focus({preventScroll:!0});return;case he.Tab:A.preventDefault(),A.stopPropagation(),Le.flushSync(()=>p.actions.closeListbox()),Nm(p.state.buttonElement,A.shiftKey?bt.Previous:bt.Next);break;default:A.key.length===1&&(p.actions.search(A.key),P.setTimeout(()=>p.actions.clearSearch(),350));break}}),G=we(p,A=>{var B;return(B=A.buttonElement)==null?void 0:B.id}),j=d.useMemo(()=>({open:m===Ke.Open}),[m]),F=Dr(u?C():{},{id:t,ref:q,"aria-activedescendant":we(p,p.selectors.activeDescendantId),"aria-multiselectable":h.mode===_t.Multi?!0:void 0,"aria-labelledby":G,"aria-orientation":h.orientation,onKeyDown:W,role:"listbox",tabIndex:m===Ke.Open?0:void 0,style:{...l.style,...V,"--button-width":si(v,!0).width},...ki(T)}),ne=Te(),U=d.useMemo(()=>h.mode===_t.Multi?h:{...h,isSelected:k},[h,k]);return d.createElement(Wi,{enabled:a?n.static||x:!1,ownerDocument:E},d.createElement(jo.Provider,{value:U},ne({ourProps:F,theirProps:l,slot:j,defaultTag:$b,features:Lb,visible:M,name:"Listbox.Options"})))}let Ab="div";function Rb(n,r){let e=d.useId(),{id:t=`headlessui-listbox-option-${e}`,disabled:o=!1,value:a,...i}=n,s=d.useContext(Jc)===!0,l=jr("Listbox.Option"),u=qi("Listbox.Option"),c=we(u,M=>u.selectors.isActive(M,t)),f=l.isSelected(a),h=d.useRef(null),p=kb(h),m=Yt({disabled:o,value:a,domRef:h,get textValue(){return p()}}),v=We(r,h,M=>{M?l.listRef.current.set(t,M):l.listRef.current.delete(t)}),g=we(u,M=>u.selectors.shouldScrollIntoView(M,t));fe(()=>{if(g)return ut().requestAnimationFrame(()=>{var M,L;(L=(M=h.current)==null?void 0:M.scrollIntoView)==null||L.call(M,{block:"nearest"})})},[g,h]),fe(()=>{if(!s)return u.actions.registerOption(t,m),()=>u.actions.unregisterOption(t)},[m,t,s]);let y=Z(M=>{var L;if(o)return M.preventDefault();u.actions.onChange(a),l.mode===_t.Single&&(Le.flushSync(()=>u.actions.closeListbox()),(L=u.state.buttonElement)==null||L.focus({preventScroll:!0}))}),E=Z(()=>{if(o)return u.actions.goToOption({focus:se.Nothing});u.actions.goToOption({focus:se.Specific,id:t})}),w=Tu(),S=Z(M=>w.update(M)),x=Z(M=>{w.wasMoved(M)&&(o||c&&u.state.activationTrigger===Wo.Pointer||u.actions.goToOption({focus:se.Specific,id:t},Wo.Pointer))}),T=Z(M=>{w.wasMoved(M)&&(o||c&&u.state.activationTrigger===Wo.Pointer&&u.actions.goToOption({focus:se.Nothing}))}),N=d.useMemo(()=>({active:c,focus:c,selected:f,disabled:o,selectedOption:f&&s}),[c,f,o,s]),_=s?{}:{id:t,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:y,onFocus:E,onPointerEnter:S,onMouseEnter:S,onPointerMove:x,onMouseMove:x,onPointerLeave:T,onMouseLeave:T},O=Te();return!f&&s?null:O({ourProps:_,theirProps:i,slot:N,defaultTag:Ab,name:"Listbox.Option"})}let Yb=d.Fragment;function Wb(n,r){let{options:e,placeholder:t,...o}=n,a={ref:We(r)},i=jr("ListboxSelectedOption"),s=d.useMemo(()=>({}),[]),l=i.value===void 0||i.value===null||i.mode===_t.Multi&&Array.isArray(i.value)&&i.value.length===0,u=Te();return d.createElement(Jc.Provider,{value:!0},u({ourProps:a,theirProps:{...o,children:d.createElement(d.Fragment,null,t&&l?t:e)},slot:s,defaultTag:Yb,name:"ListboxSelectedOption"}))}let jb=_e(Pb),Zc=_e(Nb),Hb=Eo,ed=_e(Fb),td=_e(Rb),Bb=_e(Wb),Vb=Object.assign(jb,{Button:Zc,Label:Hb,Options:ed,Option:td,SelectedOption:Bb});const zb=n=>{const{isOpen:r,setIsOpen:e,onClose:t,title:o,image:a,description:i,confirm:s,cancel:l,className:u}=n;return R.jsx(jc,{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:R.jsxs(Wr,{onClose:t,className:"relative z-50 focus:outline-hidden",children:[R.jsx("div",{className:"fixed inset-0 bg-black/40","aria-hidden":!r}),R.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:R.jsxs(Bc,{className:ot(u==null?void 0:u.popup,"ja-break-all flex w-[90vw] max-w-[300px] flex-col gap-[16px] rounded-[16px] bg-white p-[20px]"),children:[R.jsxs("div",{className:"flex flex-col gap-[8px]",children:[o&&R.jsx(Vc,{className:ot(u==null?void 0:u.title,"global-break-all text-title-small font-bold text-black"),children:o}),a&&R.jsx("img",{className:u==null?void 0:u.image,src:a.url,alt:a.alt}),i&&i!==""&&R.jsx(Zl,{className:ot(u==null?void 0:u.description,"text-petnow-grey-tertiary text-body-large popup-scrollbar max-h-[314px] overflow-y-auto break-all"),children:i})]}),R.jsxs("div",{className:"flex flex-col gap-[8px]",children:[s&&R.jsx("button",{className:"bg-petnow-orange-primary sm:hover:bg-petnow-orange-40 text-label-medium w-full cursor-pointer rounded-[12px] py-[12px] font-bold text-white transition duration-200",onClick:s.onClick,children:s.text}),l&&R.jsx("button",{onClick:()=>e(!1),className:"bg-background-tertiary sm:hover:bg-petnow-grey-90 text-petnow-grey-tertiary text-label-medium w-full cursor-pointer rounded-[12px] py-[12px] font-bold transition duration-200",children:l.text})]})]})})]})})},qb=({className:n,id:r,name:e,onChange:t,disabled:o,isChecked:a})=>R.jsxs("label",{htmlFor:r,className:"relative inline-flex cursor-pointer items-center",children:[R.jsx("input",{type:"checkbox",disabled:o,checked:a,id:r,name:e,className:"peer sr-only",onChange:t}),R.jsx("div",{className:ot(n,"bg-petnow-grey-primary peer-checked:bg-petnow-orange-primary h-[32px] w-[52px] rounded-full duration-[250ms] peer-focus:outline-none after:absolute after:start-[2px] after:top-[3px] after:size-[26px] after:rounded-full after:bg-white after:shadow-[0_3px_8px_0_rgba(0,0,0,0.15)] after:transition-all after:duration-[250ms] after:content-[''] peer-checked:after:translate-x-[calc(100%-4px)] peer-checked:after:border-white",o&&"cursor-not-allowed opacity-50")})]});var nd={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},rd=d.createContext&&d.createContext(nd),Ub=["attr","size","title"];function Qb(n,r){if(n==null)return{};var e=Gb(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 Gb(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 Ho(){return Ho=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},Ho.apply(this,arguments)}function od(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 Bo(n){for(var r=1;r<arguments.length;r++){var e=arguments[r]!=null?arguments[r]:{};r%2?od(Object(e),!0).forEach(function(t){Kb(n,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):od(Object(e)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}return n}function Kb(n,r,e){return r=Xb(r),r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function Xb(n){var r=Jb(n,"string");return typeof r=="symbol"?r:r+""}function Jb(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 ad(n){return n&&n.map((r,e)=>d.createElement(r.tag,Bo({key:e},r.attr),ad(r.child)))}function Hr(n){return r=>d.createElement(Zb,Ho({attr:Bo({},n.attr)},r),ad(n.child))}function Zb(n){var r=e=>{var{attr:t,size:o,title:a}=n,i=Qb(n,Ub),s=o||e.size||"1em",l;return e.className&&(l=e.className),n.className&&(l=(l?l+" ":"")+n.className),d.createElement("svg",Ho({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,i,{className:l,style:Bo(Bo({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 rd!==void 0?d.createElement(rd.Consumer,null,e=>r(e)):r(nd)}function ey(n){return Hr({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 id(n){return Hr({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 ty=({checked:n,label:r,onChange:e,termImageUrl:t})=>{const[o,a]=d.useState(!1);return R.jsxs(R.Fragment,{children:[R.jsx(ny,{isOpen:o,setIsOpen:a,termImageUrl:t}),R.jsxs("div",{className:"inline-flex items-center",children:[R.jsxs("label",{className:"relative flex cursor-pointer items-center rounded-full p-3",htmlFor:"check",children:[R.jsx("input",{type:"checkbox",className:"before:content[''] border-petnow-grey-primary 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)}}),R.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:R.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:R.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&&R.jsxs("div",{className:"flex items-center",children:[R.jsx("label",{className:"cursor-pointer font-medium",htmlFor:r,children:r}),R.jsx(ey,{onClick:()=>{a(!0)},className:"text-petnow-grey-tertiary mt-[2.5px] ml-2 cursor-pointer",size:24})]})]})]})},ny=({isOpen:n,setIsOpen:r,termImageUrl:e})=>R.jsxs(Wr,{open:n,onClose:()=>r(!1),className:"relative z-50",children:[R.jsx("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),R.jsx("div",{className:"fixed inset-0 w-screen overflow-y-auto",children:R.jsx("div",{className:"flex min-h-full items-center justify-center p-4",children:R.jsxs(Wr.Panel,{className:"mx-auto flex max-w-sm flex-col items-center rounded-sm bg-white",children:[R.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-full flex-row-reverse items-center",children:R.jsx(id,{size:20,className:"mr-2",onClick:()=>r(!1)})}),R.jsx("img",{src:e,alt:"약관동의 이미지"})]})})})]});var Ui=function(n,r){return Ui=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])},Ui(n,r)},Xn=function(){return Xn=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},Xn.apply(this,arguments)};function ry(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 Qi,sd="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",oy=(Qi=null,function(n){return n===void 0&&(n=sd),Qi||(Qi=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)}))}),ay=d.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),iy={width:"100%",height:400},sy={scriptUrl:sd,errorMessage:ay,autoClose:!0},ly=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,f=ry(o,["scriptUrl","className","style","defaultQuery","autoClose","errorMessage","onComplete","onClose","onResize","onSearch"]);new t(Xn(Xn({},f),{oncomplete:function(h){s&&s(h),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}Ui(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||(oy(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:Xn(Xn({},iy),o)},l&&a)},r.defaultProps=sy,r}(d.Component);const uy=({label:n,value:r,onFrontChange:e,onBackChange:t,onPostalCodeChange:o,disabled:a})=>{const[i,s]=d.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})`:""),e(h),o&&o(f.zonecode),s(!1)},u=()=>{s(!0)},c=()=>r.front?r.front:R.jsx("p",{className:"text-petnow-grey-primary",children:"주소를 입력해주세요."});return R.jsxs(R.Fragment,{children:[R.jsx(cy,{isOpen:i,setIsOpen:s,handleComplete:l}),R.jsxs("div",{className:"text-petnow-grey-tertiary",children:[R.jsx("label",{htmlFor:n,className:"text-sm font-bold text-black",children:n}),R.jsxs("div",{className:"relative flex flex-col",children:[R.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()}),R.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=>t(f.target.value)})]})]})]})},cy=n=>{const{isOpen:r,setIsOpen:e,handleComplete:t}=n;return R.jsx(Wr,{open:r,onClose:()=>e(!1),className:"relateive z-50",children:R.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center",children:R.jsx(Wr.Panel,{children:R.jsxs("div",{children:[R.jsx("div",{className:"bg-background-tertiary flex h-[36px] w-[100vw] flex-row-reverse items-center px-2",onClick:()=>e(!1),children:R.jsx(id,{size:24,onClick:()=>e(!1)})}),R.jsx(ly,{onComplete:t,style:{width:"100vw",height:"calc(100vh - 36px)"}})]})})})})};function dy(n){return Hr({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 fy(n){return Hr({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 py=({title:n,description:r,titleTextClassName:e,descriptionTextClassName:t})=>{const[o,a]=d.useState(!1);return R.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:[R.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:[R.jsxs("p",{className:ot("mr-4 text-lg font-medium md:text-xl",e),children:[R.jsx("span",{className:"font-semibold",children:"Q."})," ",n]}),o?R.jsx(fy,{className:"text-petnow-orange-primary min-w-6",size:24}):R.jsx(dy,{className:"text-petnow-orange-primary min-w-6",size:24})]}),R.jsx("p",{className:ot(`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})]})},ld=6048e5,hy=864e5,Vo=6e4,zo=36e5,my=1e3,ud=Symbol.for("constructDateFrom");function De(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&ud in n?n[ud](r):n instanceof Date?new n.constructor(r):new Date(r)}function ae(n,r){return De(r||n,n)}function yt(n,r,e){const t=ae(n,e==null?void 0:e.in);return isNaN(r)?De((e==null?void 0:e.in)||n,NaN):(r&&t.setDate(t.getDate()+r),t)}function wt(n,r,e){const t=ae(n,e==null?void 0:e.in);if(isNaN(r))return De(n,NaN);if(!r)return t;const o=t.getDate(),a=De(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 cd(n,r,e){return De(n,+ae(n)+r)}function vy(n,r,e){return cd(n,r*zo)}let gy={};function _n(){return gy}function Ut(n,r){var s,l,u,c;const e=_n(),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=ae(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 Jn(n,r){return Ut(n,{...r,weekStartsOn:1})}function dd(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=De(e,0);o.setFullYear(t+1,0,4),o.setHours(0,0,0,0);const a=Jn(o),i=De(e,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=Jn(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function qo(n){const r=ae(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 Qt(n,...r){const e=De.bind(null,r.find(t=>typeof t=="object"));return r.map(e)}function On(n,r){const e=ae(n,r==null?void 0:r.in);return e.setHours(0,0,0,0),e}function Zn(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r),a=On(t),i=On(o),s=+a-qo(a),l=+i-qo(i);return Math.round((s-l)/hy)}function by(n,r){const e=dd(n,r),t=De(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),Jn(t)}function Gi(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setTime(t.getTime()+r*Vo),t}function Ki(n,r,e){return wt(n,r*3,e)}function yy(n,r,e){return cd(n,r*1e3)}function Uo(n,r,e){return yt(n,r*7,e)}function Gt(n,r,e){return wt(n,r*12,e)}function fd(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=De.bind(null,o));const a=ae(o,t);(!e||e<a||isNaN(+a))&&(e=a)}),De(t,e||NaN)}function pd(n,r){let e,t=r==null?void 0:r.in;return n.forEach(o=>{!t&&typeof o=="object"&&(t=De.bind(null,o));const a=ae(o,t);(!e||e>a||isNaN(+a))&&(e=a)}),De(t,e||NaN)}function wy(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return+On(t)==+On(o)}function Kt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Qo(n){return!(!Kt(n)&&typeof n!="number"||isNaN(+ae(n)))}function Go(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=t.getMonth()-o.getMonth();return a*12+i}function Mn(n,r){const e=ae(n,r==null?void 0:r.in);return Math.trunc(e.getMonth()/3)+1}function Ko(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r),a=t.getFullYear()-o.getFullYear(),i=Mn(t)-Mn(o);return a*4+i}function Xo(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return t.getFullYear()-o.getFullYear()}function xy(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r),a=hd(t,o),i=Math.abs(Zn(t,o));t.setDate(t.getDate()-a*i);const s=+(hd(t,o)===-a),l=a*(i-s);return l===0?0:l}function hd(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 md(n,r){const e=ae(n,r==null?void 0:r.in);return e.setHours(23,59,59,999),e}function vd(n,r){const e=ae(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 Xi(n,r){const e=ae(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 gd(n,r){const e=ae(n,r==null?void 0:r.in);return e.setDate(1),e.setHours(0,0,0,0),e}function bd(n,r){const e=ae(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 Jo(n,r){const e=ae(n,r==null?void 0:r.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Ey(n,r){var s,l;const e=_n(),t=e.weekStartsOn??((l=(s=e.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??0,o=ae(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 Dy={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"}},Sy=(n,r,e)=>{let t;const o=Dy[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 er(n){return(r={})=>{const e=r.width?String(r.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const ky={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Cy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_y={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Oy={date:er({formats:ky,defaultWidth:"full"}),time:er({formats:Cy,defaultWidth:"full"}),dateTime:er({formats:_y,defaultWidth:"full"})},My={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ty=(n,r,e,t)=>My[n];function Ot(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 Py={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ny={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"]},$y={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"]},Ly={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"}},Fy={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"}},Ay={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:Ot({values:Py,defaultWidth:"wide"}),quarter:Ot({values:Iy,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ot({values:Ny,defaultWidth:"wide"}),day:Ot({values:$y,defaultWidth:"wide"}),dayPeriod:Ot({values:Ly,defaultWidth:"wide",formattingValues:Fy,defaultFormattingWidth:"wide"})};function Mt(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)?Yy(s,f=>f.test(i)):Ry(s,f=>f.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 Ry(n,r){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&r(n[e]))return e}function Yy(n,r){for(let e=0;e<n.length;e++)if(r(n[e]))return e}function yd(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 Wy=/^(\d+)(th|st|nd|rd)?/i,jy=/\d+/i,Hy={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},By={any:[/^b/i,/^(a|c)/i]},Vy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zy={any:[/1/i,/2/i,/3/i,/4/i]},qy={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},Uy={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]},Qy={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},Gy={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]},Ky={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},Xy={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}},Jy={ordinalNumber:yd({matchPattern:Wy,parsePattern:jy,valueCallback:n=>parseInt(n,10)}),era:Mt({matchPatterns:Hy,defaultMatchWidth:"wide",parsePatterns:By,defaultParseWidth:"any"}),quarter:Mt({matchPatterns:Vy,defaultMatchWidth:"wide",parsePatterns:zy,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Mt({matchPatterns:qy,defaultMatchWidth:"wide",parsePatterns:Uy,defaultParseWidth:"any"}),day:Mt({matchPatterns:Qy,defaultMatchWidth:"wide",parsePatterns:Gy,defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:Ky,defaultMatchWidth:"any",parsePatterns:Xy,defaultParseWidth:"any"})},wd={code:"en-US",formatDistance:Sy,formatLong:Oy,formatRelative:Ty,localize:Ay,match:Jy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Zy(n,r){const e=ae(n,r==null?void 0:r.in);return Zn(e,Jo(e))+1}function Ji(n,r){const e=ae(n,r==null?void 0:r.in),t=+Jn(e)-+by(e);return Math.round(t/ld)+1}function Zi(n,r){var c,f,h,p;const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=_n(),a=(r==null?void 0:r.firstWeekContainsDate)??((f=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=De((r==null?void 0:r.in)||n,0);i.setFullYear(t+1,0,a),i.setHours(0,0,0,0);const s=Ut(i,r),l=De((r==null?void 0:r.in)||n,0);l.setFullYear(t,0,a),l.setHours(0,0,0,0);const u=Ut(l,r);return+e>=+s?t+1:+e>=+u?t:t-1}function ew(n,r){var s,l,u,c;const e=_n(),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=Zi(n,r),a=De((r==null?void 0:r.in)||n,0);return a.setFullYear(o,0,t),a.setHours(0,0,0,0),Ut(a,r)}function xd(n,r){const e=ae(n,r==null?void 0:r.in),t=+Ut(e,r)-+ew(e,r);return Math.round(t/ld)+1}function Se(n,r){const e=n<0?"-":"",t=Math.abs(n).toString().padStart(r,"0");return e+t}const hn={y(n,r){const e=n.getFullYear(),t=e>0?e:1-e;return Se(r==="yy"?t%100:t,r.length)},M(n,r){const e=n.getMonth();return r==="M"?String(e+1):Se(e+1,2)},d(n,r){return Se(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 Se(n.getHours()%12||12,r.length)},H(n,r){return Se(n.getHours(),r.length)},m(n,r){return Se(n.getMinutes(),r.length)},s(n,r){return Se(n.getSeconds(),r.length)},S(n,r){const e=r.length,t=n.getMilliseconds(),o=Math.trunc(t*Math.pow(10,e-3));return Se(o,r.length)}},tr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ed={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 hn.y(n,r)},Y:function(n,r,e,t){const o=Zi(n,t),a=o>0?o:1-o;if(r==="YY"){const i=a%100;return Se(i,2)}return r==="Yo"?e.ordinalNumber(a,{unit:"year"}):Se(a,r.length)},R:function(n,r){const e=dd(n);return Se(e,r.length)},u:function(n,r){const e=n.getFullYear();return Se(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 Se(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 Se(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 hn.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 Se(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=xd(n,t);return r==="wo"?e.ordinalNumber(o,{unit:"week"}):Se(o,r.length)},I:function(n,r,e){const t=Ji(n);return r==="Io"?e.ordinalNumber(t,{unit:"week"}):Se(t,r.length)},d:function(n,r,e){return r==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):hn.d(n,r)},D:function(n,r,e){const t=Zy(n);return r==="Do"?e.ordinalNumber(t,{unit:"dayOfYear"}):Se(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 Se(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 Se(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 Se(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=tr.noon:t===0?o=tr.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=tr.evening:t>=12?o=tr.afternoon:t>=4?o=tr.morning:o=tr.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 hn.h(n,r)},H:function(n,r,e){return r==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):hn.H(n,r)},K:function(n,r,e){const t=n.getHours()%12;return r==="Ko"?e.ordinalNumber(t,{unit:"hour"}):Se(t,r.length)},k:function(n,r,e){let t=n.getHours();return t===0&&(t=24),r==="ko"?e.ordinalNumber(t,{unit:"hour"}):Se(t,r.length)},m:function(n,r,e){return r==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):hn.m(n,r)},s:function(n,r,e){return r==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):hn.s(n,r)},S:function(n,r){return hn.S(n,r)},X:function(n,r,e){const t=n.getTimezoneOffset();if(t===0)return"Z";switch(r){case"X":return Sd(t);case"XXXX":case"XX":return Tn(t);case"XXXXX":case"XXX":default:return Tn(t,":")}},x:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"x":return Sd(t);case"xxxx":case"xx":return Tn(t);case"xxxxx":case"xxx":default:return Tn(t,":")}},O:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Dd(t,":");case"OOOO":default:return"GMT"+Tn(t,":")}},z:function(n,r,e){const t=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Dd(t,":");case"zzzz":default:return"GMT"+Tn(t,":")}},t:function(n,r,e){const t=Math.trunc(+n/1e3);return Se(t,r.length)},T:function(n,r,e){return Se(+n,r.length)}};function Dd(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+Se(a,2)}function Sd(n,r){return n%60===0?(n>0?"-":"+")+Se(Math.abs(n)/60,2):Tn(n,r)}function Tn(n,r=""){const e=n>0?"-":"+",t=Math.abs(n),o=Se(Math.trunc(t/60),2),a=Se(t%60,2);return e+o+r+a}const kd=(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"})}},Cd=(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"})}},es={p:Cd,P:(n,r)=>{const e=n.match(/(P+)(p+)?/)||[],t=e[1],o=e[2];if(!o)return kd(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}}",kd(t,r)).replace("{{time}}",Cd(o,r))}},tw=/^D+$/,nw=/^Y+$/,rw=["D","DD","YY","YYYY"];function ow(n){return tw.test(n)}function aw(n){return nw.test(n)}function iw(n,r,e){const t=sw(n,r,e);if(console.warn(t),rw.includes(n))throw new RangeError(t)}function sw(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 lw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cw=/^'([^]*?)'?$/,dw=/''/g,fw=/[a-zA-Z]/;function _d(n,r,e){var c,f,h,p,m,v,g,y;const t=_n(),o=(e==null?void 0:e.locale)??t.locale??wd,a=(e==null?void 0:e.firstWeekContainsDate)??((f=(c=e==null?void 0:e.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((p=(h=t.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=(e==null?void 0:e.weekStartsOn)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??t.weekStartsOn??((y=(g=t.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,s=ae(n,e==null?void 0:e.in);if(!Qo(s))throw new RangeError("Invalid time value");let l=r.match(uw).map(E=>{const w=E[0];if(w==="p"||w==="P"){const S=es[w];return S(E,o.formatLong)}return E}).join("").match(lw).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const w=E[0];if(w==="'")return{isToken:!1,value:pw(E)};if(Ed[w])return{isToken:!0,value:E};if(w.match(fw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:E}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(E=>{if(!E.isToken)return E.value;const w=E.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&aw(w)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&ow(w))&&iw(w,r,String(n));const S=Ed[w[0]];return S(s,w,o.localize,u)}).join("")}function pw(n){const r=n.match(cw);return r?r[1].replace(dw,"'"):n}function Od(n,r){return ae(n,r==null?void 0:r.in).getDate()}function hw(n,r){return ae(n,r==null?void 0:r.in).getDay()}function mw(n,r){const e=ae(n,r==null?void 0:r.in),t=e.getFullYear(),o=e.getMonth(),a=De(e,0);return a.setFullYear(t,o+1,0),a.setHours(0,0,0,0),a.getDate()}function vw(){return Object.assign({},_n())}function Xt(n,r){return ae(n,r==null?void 0:r.in).getHours()}function gw(n,r){const e=ae(n,r==null?void 0:r.in).getDay();return e===0?7:e}function Jt(n,r){return ae(n,r==null?void 0:r.in).getMinutes()}function Je(n,r){return ae(n,r==null?void 0:r.in).getMonth()}function mn(n){return ae(n).getSeconds()}function ts(n){return+ae(n)}function le(n,r){return ae(n,r==null?void 0:r.in).getFullYear()}function vn(n,r){return+ae(n)>+ae(r)}function Pn(n,r){return+ae(n)<+ae(r)}function bw(n,r){return+ae(n)==+ae(r)}function yw(n,r){const e=ww(r)?new r(0):De(r,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function ww(n){var r;return typeof n=="function"&&((r=n.prototype)==null?void 0:r.constructor)===n}const xw=10;class Md{constructor(){te(this,"subPriority",0)}validate(r,e){return!0}}class Ew extends Md{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 Dw extends Md{constructor(e,t){super();te(this,"priority",xw);te(this,"subPriority",-1);this.context=e||(o=>De(t,o))}set(e,t){return t.timestampIsSet?e:De(e,yw(e,this.context))}}class ge{run(r,e,t,o){const a=this.parse(r,e,t,o);return a?{setter:new Ew(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(r,e,t){return!0}}class Sw extends ge{constructor(){super(...arguments);te(this,"priority",140);te(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 Ae={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}/},Tt={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 Re(n,r){return n&&{value:r(n.value),rest:n.rest}}function Pe(n,r){const e=r.match(n);return e?{value:parseInt(e[0],10),rest:r.slice(e[0].length)}:null}function Pt(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*zo+a*Vo+i*my),rest:r.slice(e[0].length)}}function Td(n){return Pe(Ae.anyDigitsSigned,n)}function $e(n,r){switch(n){case 1:return Pe(Ae.singleDigit,r);case 2:return Pe(Ae.twoDigits,r);case 3:return Pe(Ae.threeDigits,r);case 4:return Pe(Ae.fourDigits,r);default:return Pe(new RegExp("^\\d{1,"+n+"}"),r)}}function Zo(n,r){switch(n){case 1:return Pe(Ae.singleDigitSigned,r);case 2:return Pe(Ae.twoDigitsSigned,r);case 3:return Pe(Ae.threeDigitsSigned,r);case 4:return Pe(Ae.fourDigitsSigned,r);default:return Pe(new RegExp("^-?\\d{1,"+n+"}"),r)}}function ns(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 Pd(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 Id(n){return n%400===0||n%4===0&&n%100!==0}class kw extends ge{constructor(){super(...arguments);te(this,"priority",130);te(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 Re($e(4,e),a);case"yo":return Re(o.ordinalNumber(e,{unit:"year"}),a);default:return Re($e(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=Pd(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 Cw extends ge{constructor(){super(...arguments);te(this,"priority",130);te(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 Re($e(4,e),a);case"Yo":return Re(o.ordinalNumber(e,{unit:"year"}),a);default:return Re($e(t.length,e),a)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,o,a){const i=Zi(e,a);if(o.isTwoDigitYear){const l=Pd(o.year,i);return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),Ut(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),Ut(e,a)}}class _w extends ge{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,t){return Zo(t==="R"?4:t.length,e)}set(e,t,o){const a=De(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),Jn(a)}}class Ow extends ge{constructor(){super(...arguments);te(this,"priority",130);te(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,t){return Zo(t==="u"?4:t.length,e)}set(e,t,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Mw extends ge{constructor(){super(...arguments);te(this,"priority",120);te(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 $e(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 Tw extends ge{constructor(){super(...arguments);te(this,"priority",120);te(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 $e(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 Pw extends ge{constructor(){super(...arguments);te(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);te(this,"priority",110)}parse(e,t,o){const a=i=>i-1;switch(t){case"M":return Re(Pe(Ae.month,e),a);case"MM":return Re($e(2,e),a);case"Mo":return Re(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 Iw extends ge{constructor(){super(...arguments);te(this,"priority",110);te(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 Re(Pe(Ae.month,e),a);case"LL":return Re($e(2,e),a);case"Lo":return Re(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 Nw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=xd(t,e)-r;return t.setDate(t.getDate()-o*7),ae(t,e==null?void 0:e.in)}class $w extends ge{constructor(){super(...arguments);te(this,"priority",100);te(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,t,o){switch(t){case"w":return Pe(Ae.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o,a){return Ut(Nw(e,o,a),a)}}function Lw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Ji(t,e)-r;return t.setDate(t.getDate()-o*7),t}class Fw extends ge{constructor(){super(...arguments);te(this,"priority",100);te(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 Pe(Ae.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return $e(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,o){return Jn(Lw(e,o))}}const Aw=[31,28,31,30,31,30,31,31,30,31,30,31],Rw=[31,29,31,30,31,30,31,31,30,31,30,31];class Yw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(this,"subPriority",1);te(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,t,o){switch(t){case"d":return Pe(Ae.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}}validate(e,t){const o=e.getFullYear(),a=Id(o),i=e.getMonth();return a?t>=1&&t<=Rw[i]:t>=1&&t<=Aw[i]}set(e,t,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class Ww extends ge{constructor(){super(...arguments);te(this,"priority",90);te(this,"subpriority",1);te(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 Pe(Ae.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return $e(t.length,e)}}validate(e,t){const o=e.getFullYear();return Id(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 rs(n,r,e){var f,h,p,m;const t=_n(),o=(e==null?void 0:e.weekStartsOn)??((h=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??t.weekStartsOn??((m=(p=t.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,a=ae(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 yt(a,c,e)}class jw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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=rs(e,o,a),e.setHours(0,0,0,0),e}}class Hw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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 Re($e(t.length,e),i);case"eo":return Re(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=rs(e,o,a),e.setHours(0,0,0,0),e}}class Bw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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 Re($e(t.length,e),i);case"co":return Re(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=rs(e,o,a),e.setHours(0,0,0,0),e}}function Vw(n,r,e){const t=ae(n,e==null?void 0:e.in),o=gw(t,e),a=r-o;return yt(t,a,e)}class zw extends ge{constructor(){super(...arguments);te(this,"priority",90);te(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 $e(t.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return Re(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 Re(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Re(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Re(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=Vw(e,o),e.setHours(0,0,0,0),e}}class qw extends ge{constructor(){super(...arguments);te(this,"priority",80);te(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(ns(o),0,0,0),e}}class Uw extends ge{constructor(){super(...arguments);te(this,"priority",80);te(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(ns(o),0,0,0),e}}class Qw extends ge{constructor(){super(...arguments);te(this,"priority",80);te(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(ns(o),0,0,0),e}}class Gw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,o){switch(t){case"h":return Pe(Ae.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 Kw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,o){switch(t){case"H":return Pe(Ae.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,o){return e.setHours(o,0,0,0),e}}class Xw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,o){switch(t){case"K":return Pe(Ae.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 Jw extends ge{constructor(){super(...arguments);te(this,"priority",70);te(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,o){switch(t){case"k":return Pe(Ae.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return $e(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 Zw extends ge{constructor(){super(...arguments);te(this,"priority",60);te(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"m":return Pe(Ae.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setMinutes(o,0,0),e}}class e0 extends ge{constructor(){super(...arguments);te(this,"priority",50);te(this,"incompatibleTokens",["t","T"])}parse(e,t,o){switch(t){case"s":return Pe(Ae.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return $e(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,o){return e.setSeconds(o,0),e}}class t0 extends ge{constructor(){super(...arguments);te(this,"priority",30);te(this,"incompatibleTokens",["t","T"])}parse(e,t){const o=a=>Math.trunc(a*Math.pow(10,-t.length+3));return Re($e(t.length,e),o)}set(e,t,o){return e.setMilliseconds(o),e}}class n0 extends ge{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){case"X":return Pt(Tt.basicOptionalMinutes,e);case"XX":return Pt(Tt.basic,e);case"XXXX":return Pt(Tt.basicOptionalSeconds,e);case"XXXXX":return Pt(Tt.extendedOptionalSeconds,e);case"XXX":default:return Pt(Tt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-qo(e)-o)}}class r0 extends ge{constructor(){super(...arguments);te(this,"priority",10);te(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){case"x":return Pt(Tt.basicOptionalMinutes,e);case"xx":return Pt(Tt.basic,e);case"xxxx":return Pt(Tt.basicOptionalSeconds,e);case"xxxxx":return Pt(Tt.extendedOptionalSeconds,e);case"xxx":default:return Pt(Tt.extended,e)}}set(e,t,o){return t.timestampIsSet?e:De(e,e.getTime()-qo(e)-o)}}class o0 extends ge{constructor(){super(...arguments);te(this,"priority",40);te(this,"incompatibleTokens","*")}parse(e){return Td(e)}set(e,t,o){return[De(e,o*1e3),{timestampIsSet:!0}]}}class a0 extends ge{constructor(){super(...arguments);te(this,"priority",20);te(this,"incompatibleTokens","*")}parse(e){return Td(e)}set(e,t,o){return[De(e,o),{timestampIsSet:!0}]}}const i0={G:new Sw,y:new kw,Y:new Cw,R:new _w,u:new Ow,Q:new Mw,q:new Tw,M:new Pw,L:new Iw,w:new $w,I:new Fw,d:new Yw,D:new Ww,E:new jw,e:new Hw,c:new Bw,i:new zw,a:new qw,b:new Uw,B:new Qw,h:new Gw,H:new Kw,K:new Xw,k:new Jw,m:new Zw,s:new e0,S:new t0,X:new n0,x:new r0,t:new o0,T:new a0},s0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,l0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,u0=/^'([^]*?)'?$/,c0=/''/g,d0=/\S/,f0=/[a-zA-Z]/;function p0(n,r,e,t){var g,y,E,w,S,x,T,N;const o=()=>De((t==null?void 0:t.in)||e,NaN),a=vw(),i=(t==null?void 0:t.locale)??a.locale??wd,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??((w=(E=a.locale)==null?void 0:E.options)==null?void 0:w.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((x=(S=t==null?void 0:t.locale)==null?void 0:S.options)==null?void 0:x.weekStartsOn)??a.weekStartsOn??((N=(T=a.locale)==null?void 0:T.options)==null?void 0:N.weekStartsOn)??0;if(!r)return n?o():ae(e,t==null?void 0:t.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:i},c=[new Dw(t==null?void 0:t.in,e)],f=r.match(l0).map(_=>{const O=_[0];if(O in es){const M=es[O];return M(_,i.formatLong)}return _}).join("").match(s0),h=[];for(let _ of f){const O=_[0],M=i0[O];if(M){const{incompatibleTokens:L}=M;if(Array.isArray(L)){const k=h.find($=>L.includes($.token)||$.token===O);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${_}\` at the same time`)}else if(M.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${_}\` and any other token at the same time`);h.push({token:O,fullToken:_});const b=M.run(n,_,i.match,u);if(!b)return o();c.push(b.setter),n=b.rest}else{if(O.match(f0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");if(_==="''"?_="'":O==="'"&&(_=h0(_)),n.indexOf(_)===0)n=n.slice(_.length);else return o()}}if(n.length>0&&d0.test(n))return o();const p=c.map(_=>_.priority).sort((_,O)=>O-_).filter((_,O,M)=>M.indexOf(_)===O).map(_=>c.filter(O=>O.priority===_).sort((O,M)=>M.subPriority-O.subPriority)).map(_=>_[0]);let m=ae(e,t==null?void 0:t.in);if(isNaN(+m))return o();const v={};for(const _ of p){if(!_.validate(m,u))return o();const O=_.set(m,v,u);Array.isArray(O)?(m=O[0],Object.assign(v,O[1])):m=O}return m}function h0(n){return n.match(u0)[1].replace(c0,"'")}function m0(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()}function v0(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return+Xi(t)==+Xi(o)}function g0(n,r,e){const[t,o]=Qt(e==null?void 0:e.in,n,r);return t.getFullYear()===o.getFullYear()}function Br(n,r,e){const t=+ae(n,e==null?void 0:e.in),[o,a]=[+ae(r.start,e==null?void 0:e.in),+ae(r.end,e==null?void 0:e.in)].sort((i,s)=>i-s);return t>=o&&t<=a}function b0(n,r,e){return yt(n,-1,e)}function y0(n,r){const e=()=>De(r==null?void 0:r.in,NaN),o=D0(n);let a;if(o.date){const u=S0(o.date,2);a=k0(u.restDateString,u.year)}if(!a||isNaN(+a))return e();const i=+a;let s=0,l;if(o.time&&(s=C0(o.time),isNaN(s)))return e();if(o.timezone){if(l=_0(o.timezone),isNaN(l))return e()}else{const u=new Date(i+s),c=ae(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 ae(i+s+l,r==null?void 0:r.in)}const ea={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},w0=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,x0=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,E0=/^([+-])(\d{2})(?::?(\d{2}))?$/;function D0(n){const r={},e=n.split(ea.dateTimeDelimiter);let t;if(e.length>2)return r;if(/:/.test(e[0])?t=e[0]:(r.date=e[0],t=e[1],ea.timeZoneDelimiter.test(r.date)&&(r.date=n.split(ea.timeZoneDelimiter)[0],t=n.substr(r.date.length,n.length))),t){const o=ea.timezone.exec(t);o?(r.time=t.replace(o[1],""),r.timezone=o[1]):r.time=t}return r}function S0(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 k0(n,r){if(r===null)return new Date(NaN);const e=n.match(w0);if(!e)return new Date(NaN);const t=!!e[4],o=Vr(e[1]),a=Vr(e[2])-1,i=Vr(e[3]),s=Vr(e[4]),l=Vr(e[5])-1;if(t)return I0(r,s,l)?O0(r,s,l):new Date(NaN);{const u=new Date(0);return!T0(r,a,i)||!P0(r,o)?new Date(NaN):(u.setUTCFullYear(r,a,Math.max(o,i)),u)}}function Vr(n){return n?parseInt(n):1}function C0(n){const r=n.match(x0);if(!r)return NaN;const e=os(r[1]),t=os(r[2]),o=os(r[3]);return N0(e,t,o)?e*zo+t*Vo+o*1e3:NaN}function os(n){return n&&parseFloat(n.replace(",","."))||0}function _0(n){if(n==="Z")return 0;const r=n.match(E0);if(!r)return 0;const e=r[1]==="+"?-1:1,t=parseInt(r[2]),o=r[3]&&parseInt(r[3])||0;return $0(t,o)?e*(t*zo+o*Vo):NaN}function O0(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 M0=[31,null,31,30,31,30,31,31,30,31,30,31];function Nd(n){return n%400===0||n%4===0&&n%100!==0}function T0(n,r,e){return r>=0&&r<=11&&e>=1&&e<=(M0[r]||(Nd(n)?29:28))}function P0(n,r){return r>=1&&r<=(Nd(n)?366:365)}function I0(n,r,e){return r>=1&&r<=53&&e>=0&&e<=6}function N0(n,r,e){return n===24?r===0&&e===0:e>=0&&e<60&&r>=0&&r<60&&n>=0&&n<25}function $0(n,r){return r>=0&&r<=59}function pt(n,r,e){const t=ae(n,e==null?void 0:e.in),o=t.getFullYear(),a=t.getDate(),i=De(n,0);i.setFullYear(o,r,15),i.setHours(0,0,0,0);const s=mw(i);return t.setMonth(r,Math.min(a,s)),t}function ta(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setHours(r),t}function na(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setMinutes(r),t}function nr(n,r,e){const t=ae(n,e==null?void 0:e.in),o=Math.trunc(t.getMonth()/3)+1,a=r-o;return pt(t,t.getMonth()+a*3)}function ra(n,r,e){const t=ae(n,e==null?void 0:e.in);return t.setSeconds(r),t}function It(n,r,e){const t=ae(n,e==null?void 0:e.in);return isNaN(+t)?De(n,NaN):(t.setFullYear(r),t)}function In(n,r,e){return wt(n,-r,e)}function $d(n,r,e){return Ki(n,-1,e)}function Ld(n,r,e){return Uo(n,-1,e)}function rr(n,r,e){return Gt(n,-r,e)}const L0={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}}년"}},F0=(n,r,e)=>{let t;const o=L0[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},A0={full:"y년 M월 d일 EEEE",long:"y년 M월 d일",medium:"y.MM.dd",short:"y.MM.dd"},R0={full:"a H시 mm분 ss초 zzzz",long:"a H:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Y0={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},W0={date:er({formats:A0,defaultWidth:"full"}),time:er({formats:R0,defaultWidth:"full"}),dateTime:er({formats:Y0,defaultWidth:"full"})},j0={lastWeek:"'지난' eeee p",yesterday:"'어제' p",today:"'오늘' p",tomorrow:"'내일' p",nextWeek:"'다음' eeee p",other:"P"},H0=(n,r,e,t)=>j0[n],B0={narrow:["BC","AD"],abbreviated:["BC","AD"],wide:["기원전","서기"]},V0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1분기","2분기","3분기","4분기"]},z0={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월"]},q0={narrow:["일","월","화","수","목","금","토"],short:["일","월","화","수","목","금","토"],abbreviated:["일","월","화","수","목","금","토"],wide:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},U0={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:"밤"}},Q0={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:"밤"}},G0={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:Ot({values:B0,defaultWidth:"wide"}),quarter:Ot({values:V0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Ot({values:z0,defaultWidth:"wide"}),day:Ot({values:q0,defaultWidth:"wide"}),dayPeriod:Ot({values:U0,defaultWidth:"wide",formattingValues:Q0,defaultFormattingWidth:"wide"})},K0=/^(\d+)(일|번째)?/i,X0=/\d+/i,J0={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},Z0={any:[/^(bc|기원전)/i,/^(ad|서기)/i]},ex={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234]사?분기/i},tx={any:[/1/i,/2/i,/3/i,/4/i]},nx={narrow:/^(1[012]|[123456789])/,abbreviated:/^(1[012]|[123456789])월/i,wide:/^(1[012]|[123456789])월/i},rx={any:[/^1월?$/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},ox={narrow:/^[일월화수목금토]/,short:/^[일월화수목금토]/,abbreviated:/^[일월화수목금토]/,wide:/^[일월화수목금토]요일/},ax={any:[/^일/,/^월/,/^화/,/^수/,/^목/,/^금/,/^토/]},ix={any:/^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i},sx={any:{am:/^(am|오전)/i,pm:/^(pm|오후)/i,midnight:/^자정/i,noon:/^정오/i,morning:/^아침/i,afternoon:/^오후/i,evening:/^저녁/i,night:/^밤/i}},lx={ordinalNumber:yd({matchPattern:K0,parsePattern:X0,valueCallback:n=>parseInt(n,10)}),era:Mt({matchPatterns:J0,defaultMatchWidth:"wide",parsePatterns:Z0,defaultParseWidth:"any"}),quarter:Mt({matchPatterns:ex,defaultMatchWidth:"wide",parsePatterns:tx,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Mt({matchPatterns:nx,defaultMatchWidth:"wide",parsePatterns:rx,defaultParseWidth:"any"}),day:Mt({matchPatterns:ox,defaultMatchWidth:"wide",parsePatterns:ax,defaultParseWidth:"any"}),dayPeriod:Mt({matchPatterns:ix,defaultMatchWidth:"any",parsePatterns:sx,defaultParseWidth:"any"})},ux={code:"ko",formatDistance:F0,formatLong:W0,formatRelative:H0,localize:G0,match:lx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cx(){return typeof window<"u"}function Fd(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function zr(n){return cx()?n instanceof Element||n instanceof Fd(n).Element:!1}function dx(n){return Fd(n).getComputedStyle(n)}var oa=typeof document<"u"?d.useLayoutEffect:d.useEffect;const fx={...H}.useInsertionEffect||(n=>n());function px(n){const r=H.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return fx(()=>{r.current=n}),H.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)},[])}function Ad(n,r,e){let{reference:t,floating:o}=n;const a=it(r),i=_o(r),s=Co(i),l=ft(r),u=a==="y",c=t.x+t.width/2-o.width/2,f=t.y+t.height/2-o.height/2,h=t[s]/2-o[s]/2;let p;switch(l){case"top":p={x:c,y:t.y-o.height};break;case"bottom":p={x:c,y:t.y+t.height};break;case"right":p={x:t.x+t.width,y:f};break;case"left":p={x:t.x-o.width,y:f};break;default:p={x:t.x,y:t.y}}switch(fn(r)){case"start":p[i]-=h*(e&&u?-1:1);break;case"end":p[i]+=h*(e&&u?-1:1);break}return p}const hx=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:f}=Ad(u,t,l),h=t,p={},m=0;for(let v=0;v<s.length;v++){const{name:g,fn:y}=s[v],{x:E,y:w,data:S,reset:x}=await y({x:c,y:f,initialPlacement:t,placement:h,strategy:o,middlewareData:p,rects:u,platform:i,elements:{reference:n,floating:r}});c=E??c,f=w??f,p={...p,[g]:{...p[g],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:n,floating:r,strategy:o}):x.rects),{x:c,y:f}=Ad(u,h,l)),v=-1)}return{x:c,y:f,placement:h,strategy:o,middlewareData:p}};async function mx(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:f="floating",altBoundary:h=!1,padding:p=0}=St(r,n),m=Mi(p),g=s[h?f==="floating"?"reference":"floating":f],y=pn(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})),E=f==="floating"?{x:t,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=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},x=pn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:w,strategy:l}):E);return{top:(y.top-x.top+m.top)/S.y,bottom:(x.bottom-y.bottom+m.bottom)/S.y,left:(y.left-x.left+m.left)/S.x,right:(x.right-y.right+m.right)/S.x}}const vx=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}=St(n,r)||{};if(u==null)return{};const f=Mi(c),h={x:e,y:t},p=_o(o),m=Co(p),v=await i.getDimensions(u),g=p==="y",y=g?"top":"left",E=g?"bottom":"right",w=g?"clientHeight":"clientWidth",S=a.reference[m]+a.reference[p]-h[p]-a.floating[m],x=h[p]-a.reference[p],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=T?T[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(T)))&&(N=s.floating[w]||a.floating[m]);const _=S/2-x/2,O=N/2-v[m]/2-1,M=dt(f[y],O),L=dt(f[E],O),b=M,k=N-v[m]-L,$=N/2-v[m]/2+_,Y=_i(b,$,k),I=!l.arrow&&fn(o)!=null&&$!==Y&&a.reference[m]/2-($<b?M:L)-v[m]/2<0,V=I?$<b?$-b:$-k:0;return{[p]:h[p]+V,data:{[p]:Y,centerOffset:$-Y-V,...I&&{alignmentOffset:V}},reset:I}}}),gx=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:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...g}=St(n,r);if((e=a.arrow)!=null&&e.alignmentOffset)return{};const y=ft(o),E=it(s),w=ft(s)===s,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=h||(w||!v?[$r(s)]:Wu(s)),T=m!=="none";!h&&T&&x.push(...Bu(s,v,m,S));const N=[s,...x],_=await mx(r,g),O=[];let M=((t=a.flip)==null?void 0:t.overflows)||[];if(c&&O.push(_[y]),f){const $=Yu(o,i,S);O.push(_[$[0]],_[$[1]])}if(M=[...M,{placement:o,overflows:O}],!O.every($=>$<=0)){var L,b;const $=(((L=a.flip)==null?void 0:L.index)||0)+1,Y=N[$];if(Y)return{data:{index:$,overflows:M},reset:{placement:Y}};let I=(b=M.filter(V=>V.overflows[0]<=0).sort((V,C)=>V.overflows[1]-C.overflows[1])[0])==null?void 0:b.placement;if(!I)switch(p){case"bestFit":{var k;const V=(k=M.filter(C=>{if(T){const q=it(C.placement);return q===E||q==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(q=>q>0).reduce((q,P)=>q+P,0)]).sort((C,q)=>C[1]-q[1])[0])==null?void 0:k[0];V&&(I=V);break}case"initialPlacement":I=s;break}if(o!==I)return{reset:{placement:I}}}return{}}}};async function bx(n,r){const{placement:e,platform:t,elements:o}=n,a=await(t.isRTL==null?void 0:t.isRTL(o.floating)),i=ft(e),s=fn(e),l=it(e)==="y",u=["left","top"].includes(i)?-1:1,c=a&&l?-1:1,f=St(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*c,y:h*u}:{x:h*u,y:p*c}}const yx=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 bx(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}}}}};function Rd(n){const r=He(n);let e=parseFloat(r.width)||0,t=parseFloat(r.height)||0;const o=Ge(n),a=o?n.offsetWidth:e,i=o?n.offsetHeight:t,s=qt(e)!==a||qt(t)!==i;return s&&(e=a,t=i),{width:e,height:t,$:s}}function as(n){return Oe(n)?n:n.contextElement}function or(n){const r=as(n);if(!Ge(r))return Be(1);const e=r.getBoundingClientRect(),{width:t,height:o,$:a}=Rd(r);let i=(a?qt(e.width):e.width)/t,s=(a?qt(e.height):e.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const wx=Be(0);function Yd(n){const r=je(n);return!Ir()||!r.visualViewport?wx:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function xx(n,r,e){return r===void 0&&(r=!1),!e||r&&e!==je(n)?!1:r}function Nn(n,r,e,t){r===void 0&&(r=!1),e===void 0&&(e=!1);const o=n.getBoundingClientRect(),a=as(n);let i=Be(1);r&&(t?Oe(t)&&(i=or(t)):i=or(n));const s=xx(a,e,t)?Yd(a):Be(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,c=o.width/i.x,f=o.height/i.y;if(a){const h=je(a),p=t&&Oe(t)?je(t):t;let m=h,v=Nr(m);for(;v&&t&&p!==m;){const g=or(v),y=v.getBoundingClientRect(),E=He(v),w=y.left+(v.clientLeft+parseFloat(E.paddingLeft))*g.x,S=y.top+(v.clientTop+parseFloat(E.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=w,u+=S,m=je(v),v=Nr(m)}}return pn({width:c,height:f,x:l,y:u})}function is(n,r){const e=un(n).scrollLeft;return r?r.left+e:Nn(qe(n)).left+e}function Wd(n,r,e){e===void 0&&(e=!1);const t=n.getBoundingClientRect(),o=t.left+r.scrollLeft-(e?0:is(n,t)),a=t.top+r.scrollTop;return{x:o,y:a}}function Ex(n){let{elements:r,rect:e,offsetParent:t,strategy:o}=n;const a=o==="fixed",i=qe(t),s=r?Sn(r.floating):!1;if(t===i||s&&a)return e;let l={scrollLeft:0,scrollTop:0},u=Be(1);const c=Be(0),f=Ge(t);if((f||!f&&!a)&&((zt(t)!=="body"||ln(i))&&(l=un(t)),Ge(t))){const p=Nn(t);u=or(t),c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}const h=i&&!f&&!a?Wd(i,l,!0):Be(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:e.y*u.y-l.scrollTop*u.y+c.y+h.y}}function Dx(n){return Array.from(n.getClientRects())}function Sx(n){const r=qe(n),e=un(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+is(n);const s=-e.scrollTop;return He(t).direction==="rtl"&&(i+=Ne(r.clientWidth,t.clientWidth)-o),{width:o,height:a,x:i,y:s}}function kx(n,r){const e=je(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=Ir();(!u||u&&r==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}function Cx(n,r){const e=Nn(n,!0,r==="fixed"),t=e.top+n.clientTop,o=e.left+n.clientLeft,a=Ge(n)?or(n):Be(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 jd(n,r,e){let t;if(r==="viewport")t=kx(n,e);else if(r==="document")t=Sx(qe(n));else if(Oe(r))t=Cx(r,e);else{const o=Yd(n);t={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return pn(t)}function Hd(n,r){const e=at(n);return e===r||!Oe(e)||Dt(e)?!1:He(e).position==="fixed"||Hd(e,r)}function _x(n,r){const e=r.get(n);if(e)return e;let t=cn(n,[],!1).filter(s=>Oe(s)&&zt(s)!=="body"),o=null;const a=He(n).position==="fixed";let i=a?at(n):n;for(;Oe(i)&&!Dt(i);){const s=He(i),l=Pr(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ln(i)&&!l&&Hd(n,i))?t=t.filter(c=>c!==i):o=s,i=at(i)}return r.set(n,t),t}function Ox(n){let{element:r,boundary:e,rootBoundary:t,strategy:o}=n;const i=[...e==="clippingAncestors"?Sn(r)?[]:_x(r,this._c):[].concat(e),t],s=i[0],l=i.reduce((u,c)=>{const f=jd(r,c,o);return u.top=Ne(f.top,u.top),u.right=dt(f.right,u.right),u.bottom=dt(f.bottom,u.bottom),u.left=Ne(f.left,u.left),u},jd(r,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Mx(n){const{width:r,height:e}=Rd(n);return{width:r,height:e}}function Tx(n,r,e){const t=Ge(r),o=qe(r),a=e==="fixed",i=Nn(n,!0,a,r);let s={scrollLeft:0,scrollTop:0};const l=Be(0);if(t||!t&&!a)if((zt(r)!=="body"||ln(o))&&(s=un(r)),t){const h=Nn(r,!0,a,r);l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}else o&&(l.x=is(o));const u=o&&!t&&!a?Wd(o,s):Be(0),c=i.left+s.scrollLeft-l.x-u.x,f=i.top+s.scrollTop-l.y-u.y;return{x:c,y:f,width:i.width,height:i.height}}function ss(n){return He(n).position==="static"}function Bd(n,r){if(!Ge(n)||He(n).position==="fixed")return null;if(r)return r(n);let e=n.offsetParent;return qe(n)===e&&(e=e.ownerDocument.body),e}function Vd(n,r){const e=je(n);if(Sn(n))return e;if(!Ge(n)){let o=at(n);for(;o&&!Dt(o);){if(Oe(o)&&!ss(o))return o;o=at(o)}return e}let t=Bd(n,r);for(;t&&Lu(t)&&ss(t);)t=Bd(t,r);return t&&Dt(t)&&ss(t)&&!Pr(t)?e:t||Fu(n)||e}const Px=async function(n){const r=this.getOffsetParent||Vd,e=this.getDimensions,t=await e(n.floating);return{reference:Tx(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:t.width,height:t.height}}};function Ix(n){return He(n).direction==="rtl"}const Nx={convertOffsetParentRelativeRectToViewportRelativeRect:Ex,getDocumentElement:qe,getClippingRect:Ox,getOffsetParent:Vd,getElementRects:Px,getClientRects:Dx,getDimensions:Mx,getScale:or,isElement:Oe,isRTL:Ix};function zd(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function $x(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:f,width:h,height:p}=u;if(s||r(),!h||!p)return;const m=dn(f),v=dn(o.clientWidth-(c+h)),g=dn(o.clientHeight-(f+p)),y=dn(c),w={rootMargin:-m+"px "+-v+"px "+-g+"px "+-y+"px",threshold:Ne(0,dt(1,l))||1};let S=!0;function x(T){const N=T[0].intersectionRatio;if(N!==l){if(!S)return i();N?i(!1,N):t=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!zd(u,n.getBoundingClientRect())&&i(),S=!1}try{e=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{e=new IntersectionObserver(x,w)}e.observe(n)}return i(!0),a}function Lx(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=as(n),c=o||a?[...u?cn(u):[],...cn(r)]:[];c.forEach(y=>{o&&y.addEventListener("scroll",e,{passive:!0}),a&&y.addEventListener("resize",e)});const f=u&&s?$x(u,e):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[E]=y;E&&E.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),e()}),u&&!l&&p.observe(u),p.observe(r));let m,v=l?Nn(n):null;l&&g();function g(){const y=Nn(n);v&&!zd(v,y)&&e(),v=y,m=requestAnimationFrame(g)}return e(),()=>{var y;c.forEach(E=>{o&&E.removeEventListener("scroll",e),a&&E.removeEventListener("resize",e)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const Fx=yx,Ax=gx,qd=vx,Rx=(n,r,e)=>{const t=new Map,o={platform:Nx,...e},a={...o.platform,_c:t};return hx(n,r,{...o,platform:a})};var aa=typeof document<"u"?d.useLayoutEffect:d.useEffect;function ia(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(!ia(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)&&!ia(n[a],r[a]))return!1}return!0}return n!==n&&r!==r}function Ud(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Qd(n,r){const e=Ud(n);return Math.round(r*e)/e}function ls(n){const r=H.useRef(n);return aa(()=>{r.current=n}),r}function Yx(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,f]=H.useState({x:0,y:0,strategy:e,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=H.useState(t);ia(h,t)||p(t);const[m,v]=H.useState(null),[g,y]=H.useState(null),E=H.useCallback(C=>{C!==T.current&&(T.current=C,v(C))},[]),w=H.useCallback(C=>{C!==N.current&&(N.current=C,y(C))},[]),S=a||m,x=i||g,T=H.useRef(null),N=H.useRef(null),_=H.useRef(c),O=l!=null,M=ls(l),L=ls(o),b=ls(u),k=H.useCallback(()=>{if(!T.current||!N.current)return;const C={placement:r,strategy:e,middleware:h};L.current&&(C.platform=L.current),Rx(T.current,N.current,C).then(q=>{const P={...q,isPositioned:b.current!==!1};$.current&&!ia(_.current,P)&&(_.current=P,cr.flushSync(()=>{f(P)}))})},[h,r,e,L,b]);aa(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(C=>({...C,isPositioned:!1})))},[u]);const $=H.useRef(!1);aa(()=>($.current=!0,()=>{$.current=!1}),[]),aa(()=>{if(S&&(T.current=S),x&&(N.current=x),S&&x){if(M.current)return M.current(S,x,k);k()}},[S,x,k,M,O]);const Y=H.useMemo(()=>({reference:T,floating:N,setReference:E,setFloating:w}),[E,w]),I=H.useMemo(()=>({reference:S,floating:x}),[S,x]),V=H.useMemo(()=>{const C={position:e,left:0,top:0};if(!I.floating)return C;const q=Qd(I.floating,c.x),P=Qd(I.floating,c.y);return s?{...C,transform:"translate("+q+"px, "+P+"px)",...Ud(I.floating)>=1.5&&{willChange:"transform"}}:{position:e,left:q,top:P}},[e,s,I.floating,c.x,c.y]);return H.useMemo(()=>({...c,update:k,refs:Y,elements:I,floatingStyles:V}),[c,k,Y,I,V])}const Wx=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?qd({element:t.current,padding:o}).fn(e):{}:t?qd({element:t,padding:o}).fn(e):{}}}},jx=(n,r)=>({...Fx(n),options:[n,r]}),Hx=(n,r)=>({...Ax(n),options:[n,r]}),Bx=(n,r)=>({...Wx(n),options:[n,r]}),Vx={...H};let Gd=!1,zx=0;const Kd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+zx++;function qx(){const[n,r]=H.useState(()=>Gd?Kd():void 0);return oa(()=>{n==null&&r(Kd())},[]),H.useEffect(()=>{Gd=!0},[]),n}const Xd=Vx.useId||qx;let qr;process.env.NODE_ENV!=="production"&&(qr=new Set);function Ux(){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=qr)!=null&&n.has(o))){var a;(a=qr)==null||a.add(o),console.warn(o)}}function Qx(){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=qr)!=null&&n.has(o))){var a;(a=qr)==null||a.add(o),console.error(o)}}const Gx=H.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:f,stroke:h,d:p,style:{transform:m,...v}={},...g}=r;process.env.NODE_ENV!=="production"&&(e||Ux("The `ref` prop is required for `FloatingArrow`."));const y=Xd(),[E,w]=H.useState(!1);if(oa(()=>{if(!o)return;dx(o).direction==="rtl"&&w(!0)},[o]),!o)return null;const[S,x]=t.split("-"),T=S==="top"||S==="bottom";let N=f;(T&&i!=null&&i.x||!T&&i!=null&&i.y)&&(N=null);const _=c*2,O=_/2,M=s/2*(u/-8+1),L=l/2*u/4,b=!!p,k=N&&x==="end"?"bottom":"top";let $=N&&x==="end"?"right":"left";N&&E&&($=x==="end"?"left":"right");const Y=(a==null?void 0:a.x)!=null?N||a.x:"",I=(a==null?void 0:a.y)!=null?N||a.y:"",V=p||"M0,0"+(" H"+s)+(" L"+(s-M)+","+(l-L))+(" Q"+s/2+","+l+" "+M+","+(l-L))+" Z",C={top:b?"rotate(180deg)":"",left:b?"rotate(90deg)":"rotate(-90deg)",bottom:b?"":"rotate(180deg)",right:b?"rotate(-90deg)":"rotate(90deg)"}[S];return R.jsxs("svg",{...g,"aria-hidden":!0,ref:e,width:b?s:s+_,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[$]:Y,[k]:I,[S]:T||b?"100%":"calc(100% - "+_/2+"px)",transform:[C,m].filter(q=>!!q).join(" "),...v},children:[_>0&&R.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:h,strokeWidth:_+(p?0:1),d:V}),R.jsx("path",{stroke:_&&!p?g.fill:"none",d:V}),R.jsx("clipPath",{id:y,children:R.jsx("rect",{x:-O,y:O*(b?-1:1),width:s+_,height:s})})]})});function Kx(){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 Xx=H.createContext(null),Jx=H.createContext(null),Zx=()=>{var n;return((n=H.useContext(Xx))==null?void 0:n.id)||null},eE=()=>H.useContext(Jx);function tE(n){const{open:r=!1,onOpenChange:e,elements:t}=n,o=Xd(),a=H.useRef({}),[i]=H.useState(()=>Kx()),s=Zx()!=null;if(process.env.NODE_ENV!=="production"){const p=t.reference;p&&!zr(p)&&Qx("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]=H.useState(t.reference),c=px((p,m,v)=>{a.current.openEvent=p?m:void 0,i.emit("openchange",{open:p,event:m,reason:v,nested:s}),e==null||e(p,m,v)}),f=H.useMemo(()=>({setPositionReference:u}),[]),h=H.useMemo(()=>({reference:l||t.reference||null,floating:t.floating||null,domReference:t.reference}),[l,t.reference,t.floating]);return H.useMemo(()=>({dataRef:a,open:r,onOpenChange:c,elements:h,events:i,floatingId:o,refs:f}),[r,c,h,i,o,f])}function nE(n){n===void 0&&(n={});const{nodeId:r}=n,e=tE({...n,elements:{reference:null,floating:null,...n.elements}}),t=n.rootContext||e,o=t.elements,[a,i]=H.useState(null),[s,l]=H.useState(null),c=(o==null?void 0:o.domReference)||a,f=H.useRef(null),h=eE();oa(()=>{c&&(f.current=c)},[c]);const p=Yx({...n,elements:{...o,...s&&{reference:s}}}),m=H.useCallback(w=>{const S=zr(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(S),p.refs.setReference(S)},[p.refs]),v=H.useCallback(w=>{(zr(w)||w===null)&&(f.current=w,i(w)),(zr(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!zr(w))&&p.refs.setReference(w)},[p.refs]),g=H.useMemo(()=>({...p.refs,setReference:v,setPositionReference:m,domReference:f}),[p.refs,v,m]),y=H.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),E=H.useMemo(()=>({...p,...t,refs:g,elements:y,nodeId:r}),[p,g,y,r,t]);return oa(()=>{t.dataRef.current.floatingContext=E;const w=h==null?void 0:h.nodesRef.current.find(S=>S.id===r);w&&(w.context=E)}),H.useMemo(()=>({...p,context:E,refs:g,elements:y}),[p,g,y,E])}/*!
|
|
77
77
|
react-datepicker v8.4.0
|
|
78
78
|
https://github.com/Hacker0x01/react-datepicker
|
|
79
79
|
Released under the MIT License.
|
|
80
|
-
*/var Zi=function(r,e){return Zi=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])},Zi(r,e)};function ze(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Zi(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var me=function(){return me=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},me.apply(this,arguments)};function kt(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 W0=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)},H0=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},Uo=function(n){var r=n.children,e=n.onClickOutside,t=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=H0(e,i);return d.createElement("div",{className:t,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},K;(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"})(K||(K={}));function Sd(){var n=typeof window<"u"?window:globalThis;return n}var Fr=12;function xe(n){if(n==null)return new Date;var r=typeof n=="string"?Fw(n):ae(n);return Qo(r)?r:new Date}function es(n,r,e,t,o){o===void 0&&(o=xe());for(var a=Kn(e)||Kn(ns()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var u=l[s],c=Mw(n,u,o,{locale:a});if(Qo(c)&&(!t||n===Oe(c,u,e)))return c}return null}function Qo(n,r){return $o(n)&&!xn(n,new Date("1/1/1800"))}function Oe(n,r,e){if(e==="en")return fd(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?Kn(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||Kn(ns()),fd(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function st(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&Oe(n,o,t)||""}var kd=" - ";function B0(n,r,e){if(!n)return"";var t=st(n,e),o=r?st(r,e):"";return"".concat(t).concat(kd).concat(o)}function V0(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?st(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=st(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function ts(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 Bo(Vo(zo(n,s),a),t)}function z0(n){return qi(n)}function q0(n,r){return Oe(n,"ddd",r)}function Go(n){return bn(n)}function on(n,r,e){var t=Kn(r||ns());return Yt(n,{locale:t,weekStartsOn:e})}function Vt(n){return nd(n)}function $r(n){return jo(n)}function _d(n){return zi(n)}function Cd(){return bn(xe())}function Od(n){return ed(n)}function U0(n){return Yb(n)}function Q0(n){return td(n)}function _t(n,r){return n&&r?Nw(n,r):!n&&!r}function Qe(n,r){return n&&r?Pw(n,r):!n&&!r}function Ko(n,r){return n&&r?Iw(n,r):!n&&!r}function ve(n,r){return n&&r?$b(n,r):!n&&!r}function Dn(n,r){return n&&r?Ly(n,r):!n&&!r}function Ar(n,r,e){var t,o=bn(r),a=ed(e);try{t=Ir(n,{start:o,end:a})}catch{t=!1}return t}function ns(){var n=Sd();return n.__localeId__}function Kn(n){if(typeof n=="string"){var r=Sd();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function G0(n,r,e){return r(Oe(n,"EEEE",e))}function K0(n,r){return Oe(n,"EEEEEE",r)}function X0(n,r){return Oe(n,"EEE",r)}function rs(n,r){return Oe(it(xe(),n),"LLLL",r)}function Md(n,r){return Oe(it(xe(),n),"LLL",r)}function J0(n,r){return Oe(Qn(xe(),n),"QQQ",r)}function lt(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 Yr(n,{minDate:t,maxDate:o})||a&&a.some(function(c){return c instanceof Date?ve(n,c):ve(n,c.date)})||i&&i.some(function(c){var f=c.start,h=c.end;return Ir(n,{start:f,end:h})})||s&&!s.some(function(c){return ve(n,c)})||l&&!l.some(function(c){var f=c.start,h=c.end;return Ir(n,{start:f,end:h})})||u&&!u(xe(n))||!1}function os(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 Ir(n,{start:i,end:s})}):t&&t.some(function(a){var i;return a instanceof Date?ve(n,a):ve(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function Td(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Yr(n,{minDate:t?nd(t):void 0,maxDate:o?td(o):void 0})||(a==null?void 0:a.some(function(l){return Qe(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Qe(n,l)})||s&&!s(xe(n))||!1}function Xo(n,r,e,t){var o=le(n),a=qe(n),i=le(r),s=qe(r),l=le(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 Z0(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return Yr(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return Qe(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return Qe(s,n)})||!1}function Jo(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Yr(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return Ko(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ko(n,l)})||s&&!s(xe(n))||!1}function Zo(n,r,e){if(!r||!e||!$o(r)||!$o(e))return!1;var t=le(r),o=le(e);return t<=n&&o>=n}function ea(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 Yr(l,{minDate:t?jo(t):void 0,maxDate:o?rd(o):void 0})||(a==null?void 0:a.some(function(u){return _t(l,u instanceof Date?u:u.date)}))||i&&!i.some(function(u){return _t(l,u)})||s&&!s(xe(l))||!1}function ta(n,r,e,t){var o=le(n),a=yn(n),i=le(r),s=yn(r),l=le(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 Yr(n,r){var e,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(e=o&&zn(n,o)<0||a&&zn(n,a)>0)!==null&&e!==void 0?e:!1}function Pd(n,r){return r.some(function(e){return Ht(e)===Ht(n)&&Bt(e)===Bt(n)&&nn(e)===nn(n)})}function Id(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&Pd(n,t)||o&&!Pd(n,o)||a&&!a(n)||!1}function Nd(n,r){var e=r.minTime,t=r.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var o=xe();o=Bo(o,Ht(n)),o=Vo(o,Bt(n)),o=zo(o,nn(n));var a=xe();a=Bo(a,Ht(e)),a=Vo(a,Bt(e)),a=zo(a,nn(e));var i=xe();i=Bo(i,Ht(t)),i=Vo(i,Bt(t)),i=zo(i,nn(t));var s;try{s=!Ir(o,{start:a,end:i})}catch{s=!1}return s}function Ld(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=En(n,1);return t&&Ao(t,a)>0||o&&o.every(function(i){return Ao(i,a)>0})||!1}function Fd(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=pt(n,1);return t&&Ao(a,t)>0||o&&o.every(function(i){return Ao(a,i)>0})||!1}function ex(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=jo(n),i=yd(a);return t&&Yo(t,i)>0||o&&o.every(function(s){return Yo(s,i)>0})||!1}function tx(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=rd(n),i=Vi(a,1);return t&&Yo(i,t)>0||o&&o.every(function(s){return Yo(i,s)>0})||!1}function $d(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Gn(n,1);return t&&Ro(t,a)>0||o&&o.every(function(i){return Ro(i,a)>0})||!1}function nx(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?Fr:o,i=$r(Gn(n,a)),s=an(i,a).endPeriod,l=t&&le(t);return l&&l>s||!1}function Ad(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=jt(n,1);return t&&Ro(a,t)>0||o&&o.every(function(i){return Ro(a,i)>0})||!1}function rx(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?Fr:o,i=jt(n,a),s=an(i,a).startPeriod,l=t&&le(t);return l&&l<s||!1}function Yd(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return zn(o,r)>=0});return Jc(t)}else return e?Jc(e):r}function Rd(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return zn(o,r)<=0});return Xc(t)}else return e?Xc(e):r}function jd(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(Wt(i)){var s=Oe(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:"",f=i[c];if(typeof c=="string"&&Array.isArray(f))for(var h=0,p=f.length;h<p;h++){var m=f[h];if(m){var s=Oe(m,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function ox(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function ax(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(Wt(o)){var i=Oe(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&ox(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?kt(kt([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function ix(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=Ib(l,Ht(u)),l=Bi(l,Bt(u)),l=Fb(l,nn(u)));var c=Bi(n,(e+1)*t);rn(l,r)&&xn(l,c)&&u!=null&&i.push(u)}return i}function Wd(n){return n<10?"0".concat(n):"".concat(n)}function an(n,r){r===void 0&&(r=Fr);var e=Math.ceil(le(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function sx(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 Hd(n){var r=n.getSeconds(),e=n.getMilliseconds();return ae(n.getTime()-r*1e3-e)}function lx(n,r){return Hd(n).getTime()===Hd(r).getTime()}function Bd(n){if(!Wt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function Vd(n,r){if(!Wt(n)||!Wt(r))throw new Error("Invalid date received");var e=Bd(n),t=Bd(r);return xn(e,t)}function zd(n){return n.key===K.Space}var ux=function(n){ze(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(":"),f=c[0],h=c[1];u.setHours(Number(f)),u.setMinutes(Number(h))}(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),cx=function(n){ze(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===K.Space&&(t.preventDefault(),t.key=K.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isSameDay=function(t){return ve(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),lt(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 os(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return ve(e.props.day,on(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&ve(t,on(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=Oe(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=Oe(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:Ar(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,f=o.endDate,h=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(i||s||l)||!h||!u&&e.isDisabled()?!1:i&&f&&(xn(h,f)||Dn(h,f))?Ar(a,h,f):s&&c&&(rn(h,c)||Dn(h,c))||l&&c&&!f&&(rn(h,c)||Dn(h,c))?Ar(a,c,h):!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?ve(a,l):ve(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?ve(a,u):ve(a,i)},e.isRangeStart=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ve(a,o)},e.isRangeEnd=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ve(i,o)},e.isWeekend=function(){var t=Ty(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===qe(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(qe(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(xe())},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 Be("react-datepicker__day",o,"react-datepicker__day--"+q0(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(Oe(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=Oe(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?ve(c,o):ve(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)&&ve(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(pd(e.props.day),e.props.day):pd(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),dx=function(n){ze(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===K.Space&&(t.preventDefault(),t.key=K.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ve(e.props.date,e.props.selected)&&ve(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||ve(e.props.date,e.props.selected)&&ve(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var o=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&ve(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&&ve(this.props.date,this.props.selected)};return d.createElement("div",{ref:this.weekNumberEl,className:Be(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),fx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return lt(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 f=new Date(t);f.setDate(f.getDate()+c);var h=!e.isDisabled(f);if(h){u=f;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):z0(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),o=ft(t,6),a=new Date(t);a<=o;){if(!e.isDisabled(a))return!1;a=ft(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(dx,me({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=ft(t,s);return d.createElement(cx,me({},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 on(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ve(e.startOfWeek(),e.props.selected)&&ve(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":ve(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return d.createElement("div",{className:Be(e)},this.renderDays())},r}(d.Component),Rr,px=6,Xn={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},as=(Rr={},Rr[Xn.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Rr[Xn.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Rr[Xn.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Rr),na=1;function qd(n,r){return n?Xn.FOUR_COLUMNS:r?Xn.TWO_COLUMNS:Xn.THREE_COLUMNS}var hx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=kt([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=kt([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return lt(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 os(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:Qe(it(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ko(Qn(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Qe(it(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ko(Qn(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,f=a.endDate,h=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!h?!1:s&&f?Xo(h,f,t,i):l&&c||u&&c&&!f?Xo(c,h,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=it(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?Qe(u,c):Qe(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=it(i,t),f=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?Qe(c,f):Qe(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,f=a.endDate,h=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!h?!1:s&&f?ta(h,f,t,i):l&&c||u&&c&&!f?ta(c,h,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=ft(t,6);return Qe(t,o)||Qe(a,o)},e.isCurrentMonth=function(t,o){return le(t)===le(xe())&&o===qe(xe())},e.isCurrentQuarter=function(t,o){return le(t)===le(xe())&&o===yn(xe())},e.isSelectedMonth=function(t,o,a){return qe(a)===o&&le(t)===le(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 yn(t)===o&&le(t)===le(a)},e.isMonthSelected=function(){var t=e.props,o=t.day,a=t.selected,i=t.selectedDates,s=t.selectsMultiple,l=qe(o);return s?i==null?void 0:i.some(function(u){return e.isSelectedMonth(o,l,u)}):!!a&&e.isSelectedMonth(o,l,a)},e.renderWeeks=function(){for(var t=[],o=e.props.fixedHeight,a=0,i=!1,s=on(Vt(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(m){return e.props.showWeekPicker?on(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(m){return e.props.showWeekPicker?on(m,e.props.locale,e.props.calendarStartDay):e.props.selected},c=e.props.selected?u(e.props.selected):void 0,f=e.props.preSelection?l(e.props.preSelection):void 0;t.push(d.createElement(fx,me({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:qe(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:f,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Fo(s,1);var h=o&&a>=px,p=!o&&!e.isWeekInMonth(s);if(h||p)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(Vt(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter(Vt(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,f=s.minDate,h=s.maxDate,p=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(u){var v=qd(p,m),g=e.getVerticalOffset(v),x=(i=as[v])===null||i===void 0?void 0:i.grid,E=function($,_,C){var O,R,b=_,S=C;switch($){case K.ArrowRight:b=pt(_,na),S=C===11?0:C+na;break;case K.ArrowLeft:b=En(_,na),S=C===0?11:C-na;break;case K.ArrowUp:b=En(_,g),S=!((O=x==null?void 0:x[0])===null||O===void 0)&&O.includes(C)?C+12-g:C-g;break;case K.ArrowDown:b=pt(_,g),S=!((R=x==null?void 0:x[x.length-1])===null||R===void 0)&&R.includes(C)?C-12+g:C+g;break}return{newCalculatedDate:b,newCalculatedMonth:S}},w=function($,_,C){for(var O=40,R=$,b=!1,S=0,L=E(R,_,C),P=L.newCalculatedDate,N=L.newCalculatedMonth;!b;){if(S>=O){P=_,N=C;break}if(f&&P<f){R=K.ArrowRight;var z=E(R,P,N);P=z.newCalculatedDate,N=z.newCalculatedMonth}if(h&&P>h){R=K.ArrowLeft;var z=E(R,P,N);P=z.newCalculatedDate,N=z.newCalculatedMonth}if(Z0(P,e.props)){var z=E(R,P,N);P=z.newCalculatedDate,N=z.newCalculatedMonth}else b=!0;S++}return{newCalculatedDate:P,newCalculatedMonth:N}};if(o===K.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var k=w(o,u,a),D=k.newCalculatedDate,T=k.newCalculatedMonth;switch(o){case K.ArrowRight:case K.ArrowLeft:case K.ArrowUp:case K.ArrowDown:e.handleMonthNavigation(T,D);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=as[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!==K.Tab&&t.preventDefault(),i||e.handleKeyboardNavigation(t,l,o),s&&s(t)},e.onQuarterClick=function(t,o){var a=Qn(e.props.day,o);Jo(a,e.props)||e.handleDayClick(_d(a),t)},e.onQuarterMouseEnter=function(t){var o=Qn(e.props.day,t);Jo(o,e.props)||e.handleDayMouseEnter(_d(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 K.Enter:e.onQuarterClick(t,o),(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,e.props.selected);break;case K.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===4?1:o+1,Vi(e.props.preSelection,1));break;case K.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,yd(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,f=it(i,t);return{isDisabled:(o=(s||l||u||c)&&Td(f,e.props))!==null&&o!==void 0?o:!1,labelDate:f}},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(it(a,t)):void 0,f=e.getSelection();return Be("react-datepicker__month-text","react-datepicker__month-".concat(t),c,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":f?e.isSelectMonthInList(a,t,f):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&l&&e.isSelectedMonth(a,t,l)&&!e.isMonthSelected()&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":i&&s?Xo(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=qe(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=yn(e.props.preSelection),a=Jo(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,f=it(u,t),h=e.isDisabled(f)||e.isExcluded(f)?l:i;return"".concat(h," ").concat(Oe(f,"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,f=o.excludeDates,h=o.includeDates,p=o.filterDate,m=o.preSelection,v=o.disabledKeyboardNavigation,g=(u||c||f||h||p)&&Jo(Qn(a,t),e.props);return Be("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&&m&&e.isSelectedQuarter(a,t,m)&&!g,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":i&&s?ta(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=Md(t,s),c=rs(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=J0(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=as[qd(i,a)])===null||t===void 0?void 0:t.grid;return u==null?void 0:u.map(function(c,f){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:f},c.map(function(h,p){return d.createElement("div",{ref:e.MONTH_REFS[h],key:p,onClick:function(m){e.onMonthClick(m,h)},onKeyDown:function(m){zd(m)&&(m.preventDefault(),m.key=K.Enter),e.onMonthKeyDown(m,h)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(h)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(h)}:void 0,tabIndex:Number(e.getTabIndex(h)),className:e.getMonthClassNames(h),"aria-disabled":e.isMonthDisabled(h),role:"option","aria-label":e.getAriaLabel(h),"aria-current":e.isCurrentMonth(s,h)?"date":void 0,"aria-selected":l?e.isSelectedMonth(s,h,l):void 0},e.getMonthContent(h))}))})},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 Be("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(Oe(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),mx=function(n){ze(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(Uo,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),vx=function(n){ze(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(mx,me({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 Md(a,e.props.locale)}:function(a){return rs(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 gx(n,r){for(var e=[],t=Vt(n),o=Vt(r);!rn(t,o);)e.push(xe(t)),t=pt(t,1);return e}var bx=function(n){ze(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=Gi(o),i=_t(t.props.date,o)&&Qe(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"},"✓"):"",Oe(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:gx(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=Be({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(Uo,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),yx=function(n){ze(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=Vt(e.props.minDate),o=Vt(e.props.maxDate),a=[];!rn(t,o);){var i=Gi(t);a.push(d.createElement("option",{key:i,value:i},Oe(t,e.props.dateFormat,e.props.locale))),t=pt(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:Gi(Vt(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=Oe(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(bx,me({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=xe(t);_t(e.props.date,o)&&Qe(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),wx=function(n){ze(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)&&Nd(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Id(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&lx(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&Nd(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&Id(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&&(Ht(t)*3600+Bt(t)*60+nn(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===K.Space&&(t.preventDefault(),t.key=K.Enter),(t.key===K.ArrowUp||t.key===K.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===K.ArrowDown||t.key===K.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===K.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||xe(),l=Go(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,x){return g.getTime()-x.getTime()}),c=60*sx(s),f=c/i,h=0;h<f;h++){var p=Bi(l,h*i);if(o.push(p),u){var m=ix(l,p,h,i,u);o=o.concat(m)}}var v=o.reduce(function(g,x){return x.getTime()<=s.getTime()?x: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(x){g===v&&(e.centerLi=x)},onKeyDown:function(x){e.handleOnKeyDown(x,g)},tabIndex:g===v?0:-1,role:"option","aria-selected":e.isSelectedTime(g)?"true":void 0,"aria-disabled":e.isDisabledTime(g)?"true":void 0},Oe(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),Ud=3,xx=function(n){ze(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=kt([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return lt(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 os(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,f=c.date,h=c.yearItemNumber;if(!(f===void 0||h===void 0)){var p=an(f,h).startPeriod;t.isDisabled(a)||t.isExcluded(a)||((s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,a),o-p<0?t.updateFocusOnPaginate(h-(p-o)):o-p>=h?t.updateFocusOnPaginate(Math.abs(h-(o-p))):(u=(l=t.YEAR_REFS[o-p])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())}},t.isSameDay=function(o,a){return ve(o,a)},t.isCurrentYear=function(o){return o===le(xe())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&_t(St(xe(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&_t(St(xe(),o),t.props.endDate)},t.isInRange=function(o){return Zo(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?Zo(o,t.selectingDate(),c):s&&u||l&&u&&!c?Zo(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=St(xe(),o);return l?_t(u,(a=t.selectingDate())!==null&&a!==void 0?a:null):_t(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=St(xe(),o);return l||u?_t(c,(a=t.selectingDate())!==null&&a!==void 0?a:null):_t(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,f=$r(St(t.props.date,o)),h=(i||s||l||u||c)&&ea(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!ve(f,$r(t.props.selected))&&ve(f,$r(t.props.preSelection))&&!h}},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===le(u)}):!!s&&o===le(s)},t.onYearClick=function(o,a){var i=t.props.date;i!==void 0&&t.handleYearClick($r(St(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,u=t.props,c=u.date,f=u.yearItemNumber,h=u.handleOnKeyDown;if(l!==K.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case K.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 K.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,jt(t.props.preSelection,1));break;case K.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,Gn(t.props.preSelection,1));break;case K.ArrowUp:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var p=an(c,f).startPeriod,m=Ud,v=a-m;if(v<p){var g=f%m;a>=p&&a<p+g?m=g:m+=g,v=a-m}t.handleYearNavigation(v,Gn(t.props.preSelection,m));break}case K.ArrowDown:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var x=an(c,f).endPeriod,m=Ud,v=a+m;if(v>x){var g=f%m;a<=x&&a>x-g?m=g:m+=g,v=a+m}t.handleYearNavigation(v,jt(t.props.preSelection,m));break}}h&&h(o)},t.getYearClassNames=function(o){var a=t.props,i=a.date,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,f=a.filterDate,h=a.yearClassName;return Be("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h==null?void 0:h(St(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||u||c||f)&&ea(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=le(t.props.preSelection),i=ea(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=an(a,i),c=u.startPeriod,f=u.endPeriod,h=function(v){t.push(d.createElement("div",{ref:p.YEAR_REFS[v-c],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){zd(g)&&(g.preventDefault(),g.key=K.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(p.getYearTabIndex(v)),className:p.getYearClassNames(v),onMouseEnter:p.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:p.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:p.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":p.isCurrentYear(v)?"date":void 0},p.getYearContent(v)))},p=this,m=c;m<=f;m++)h(m);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 Ex(n,r,e,t){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;e&&(s=le(e)<=i),t&&s&&(s=le(t)>=i),s&&o.push(i)}return o}var Dx=function(n){ze(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(f){return d.createElement("div",{className:s===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:t.onChange.bind(t,f),"aria-selected":s===f?"true":void 0},s===f?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),u=t.props.minDate?le(t.props.minDate):null,c=t.props.maxDate?le(t.props.maxDate):null;return(!c||!t.state.yearsList.find(function(f){return f===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(f){return f===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:Ex(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=Be({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(Uo,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),Sx=function(n){ze(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?le(e.props.minDate):1900,o=e.props.maxDate?le(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(Dx,me({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),kx=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],_x=function(n){var r=(n.className||"").split(/\s+/);return kx.some(function(e){return r.indexOf(e)>=0})},Cx=function(n){ze(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;_x(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=Yd(t.props),u=Rd(t.props),c=xe(),f=s||i||a;return f||(l&&xn(c,l)?l:u&&rn(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:pt(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:En(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:St(xe(),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(!lt(o,t.props))return o;for(var a=Vt(o),i=Q0(o),s=Ab(i,a),l=null,u=0;u<=s;u++){var c=ft(a,u);if(!lt(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:St(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:it(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:St(it(i,qe(o)),le(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=on(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=ft(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":Oe(l,"EEEE",t.props.locale),className:Be("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?G0(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?X0(o,a):K0(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=En(t.state.date,u),f;switch(!0){case t.props.showMonthYearPicker:f=$d(t.state.date,t.props);break;case t.props.showYearPicker:f=nx(t.state.date,t.props);break;case t.props.showQuarterYearPicker:f=ex(t.state.date,t.props);break;default:f=Ld(c,t.props);break}if(!(!((i=t.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&f||t.props.showTimeSelectOnly)){var h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],p=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(m=t.decreaseYear),f&&t.props.showDisabledMonthNavigation&&(p.push("react-datepicker__navigation--previous--disabled"),m=void 0);var v=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,g=t.props,x=g.previousMonthButtonLabel,E=x===void 0?r.defaultProps.previousMonthButtonLabel:x,w=g.previousYearButtonLabel,k=w===void 0?r.defaultProps.previousYearButtonLabel:w,D=t.props,T=D.previousMonthAriaLabel,$=T===void 0?typeof E=="string"?E:"Previous Month":T,_=D.previousYearAriaLabel,C=_===void 0?typeof k=="string"?k:"Previous Year":_;return d.createElement("button",{type:"button",className:p.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?C:$},d.createElement("span",{className:h.join(" ")},v?k:E))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:jt(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=Ad(t.state.date,t.props);break;case t.props.showYearPicker:a=rx(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=tx(t.state.date,t.props);break;default:a=Fd(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,f=c.nextMonthButtonLabel,h=f===void 0?r.defaultProps.nextMonthButtonLabel:f,p=c.nextYearButtonLabel,m=p===void 0?r.defaultProps.nextYearButtonLabel:p,v=t.props,g=v.nextMonthAriaLabel,x=g===void 0?typeof h=="string"?h:"Next Month":g,E=v.nextYearAriaLabel,w=E===void 0?typeof m=="string"?m:"Next Year":E;return d.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?w:x},d.createElement("span",{className:s.join(" ")},u?m:h))}}},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(" ")},Oe(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(Sx,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:le(t.state.date)}))},t.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthDropdown||o))return d.createElement(vx,me({},r.defaultProps,t.props,{month:qe(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(yx,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(Cd(),o),t.props.setPreSelection&&t.props.setPreSelection(Cd())},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=Ld(t.state.date,t.props),c=Fd(t.state.date,t.props),f=$d(t.state.date,t.props),h=Ad(t.state.date,t.props),p=!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,me(me({},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:f,nextYearButtonDisabled:h})),p&&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=an(a,u),f=c.startPeriod,h=c.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(h):le(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?jt(t.state.date,l):En(t.state.date,l),c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,f=0;f<s;++f){var h=f-c+l,p=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?jt(u,h):pt(u,h),m="month-".concat(f),v=f<s-1,g=f>0;i.push(d.createElement("div",{key:m,ref:function(x){t.monthContainer=x??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:p,i:f}),d.createElement(hx,me({},r.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:p,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:f,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(xx,me({},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(wx,me({},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&&Qo(o)&&!!t.props.selected,i=a?"".concat(Wd(o.getHours()),":").concat(Wd(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(ux,me({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=an(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=le(t.state.date):l="".concat(rs(qe(t.state.date),t.props.locale)," ").concat(le(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:Fr}},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&&(!ve(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var o=!Qe(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!ve(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var e=this.props.container||W0;return d.createElement(Uo,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:Be("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),Ox=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"}))},Qd=function(n){ze(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 Ne.createPortal(this.props.children,this.el)},r}(d.Component),Mx="[tabindex], a, button, input, select, textarea",Tx=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},Gd=function(n){ze(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(Mx),1,-1).filter(Tx)},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 Px(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=j0(me({open:!o,whileElementsMounted:$u,placement:e.popperPlacement,middleware:kt([Wu({padding:15}),ki(10),sv({element:a})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),s=me(me({},e),{hidePopper:o,popperProps:me(me({},i),{arrowRef:a})});return d.createElement(n,me({},s))};return r}var Ix=function(n){ze(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,f=e.portalId,h=e.portalHost,p=e.popperProps,m=e.showArrow,v=void 0;if(!i){var g=Be("react-datepicker-popper",t);v=d.createElement(Gd,{enableTabLoop:u},d.createElement("div",{ref:p.refs.setFloating,style:p.floatingStyles,className:g,"data-placement":p.placement,onKeyDown:c},s,m&&d.createElement(N0,{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&&(v=d.createElement(this.props.popperContainer,{},v)),f&&!i&&(v=d.createElement(Qd,{portalId:f,portalHost:h},v));var x=Be("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:p.refs.setReference,className:x},l),v)},r}(d.Component),Nx=Px(Ix),Kd="react-datepicker-ignore-onclickoutside";function Lx(n,r){return n&&r?qe(n)!==qe(r)||le(n)!==le(r):n!==r}var is="Date input not valid.",Fx=function(n){ze(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:xe()},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 Qo(s)?kt(kt([],a,!0),[me(me({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=Yd(t.props),s=Rd(t.props),l=i&&xn(a,Go(i))?i:s&&rn(a,Od(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:jd(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(me(me({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(me(me({},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:ss},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Wt(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 f=u[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,u),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){t.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:$x});var h=t.props,p=h.selectsRange,m=h.startDate,v=h.endDate,g=(o=t.props.dateFormat)!==null&&o!==void 0?o:r.defaultProps.dateFormat,x=(a=t.props.strictParsing)!==null&&a!==void 0?a:r.defaultProps.strictParsing,E=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(p){var w=E.split(g.includes("-")?kd:"-",2).map(function(R){return R.trim()}),k=w[0],D=w[1],T=es(k??"",g,t.props.locale,x),$=es(D??"",g,t.props.locale,x),_=(m==null?void 0:m.getTime())!==(T==null?void 0:T.getTime()),C=(v==null?void 0:v.getTime())!==($==null?void 0:$.getTime());if(!_&&!C||T&<(T,t.props)||$&<($,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[T,$],f)}else{var O=es(E,g,t.props.locale,x,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(O||!E)&&t.setSelected(O,f,!0)}}},t.handleSelect=function(o,a,i){if(!t.props.readOnly){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||!Vd(o,l))&&t.setOpen(!1)}}},t.setSelected=function(o,a,i,s){var l,u,c=o;if(t.props.showYearPicker){if(c!==null&&ea(le(c),t.props))return}else if(t.props.showMonthYearPicker){if(c!==null&&Td(c,t.props))return}else if(c!==null&<(c,t.props))return;var f=t.props,h=f.onChange,p=f.selectsRange,m=f.startDate,v=f.endDate,g=f.selectsMultiple,x=f.selectedDates,E=f.minTime,w=f.swapRange;if(!Dn(t.props.selected,c)||t.props.allowSameDay||p||g)if(c!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(c=ts(c,{hour:Ht(t.props.selected),minute:Bt(t.props.selected),second:nn(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&E&&(c=ts(c,{hour:E.getHours(),minute:E.getMinutes(),second:E.getSeconds()})),t.props.inline||t.setState({preSelection:c}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),p){var k=!m&&!v,D=m&&!v,T=m&&v;k?h==null||h([c,null],a):D&&(c===null?h==null||h([null,null],a):Vd(c,m)?w?h==null||h([c,m],a):h==null||h([c,null],a):h==null||h([m,c],a)),T&&(h==null||h([c,null],a))}else if(g){if(c!==null)if(!(x!=null&&x.length))h==null||h([c],a);else{var $=x.some(function(C){return ve(C,c)});if($){var _=x.filter(function(C){return!ve(C,c)});h==null||h(_,a)}else h==null||h(kt(kt([],x,!0),[c],!1),a)}}else h==null||h(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){if(!t.props.readOnly){var a=Wt(t.props.minDate),i=Wt(t.props.maxDate),s=!0;if(o){var l=Go(o);if(a&&i)s=Ar(o,t.props.minDate,t.props.maxDate);else if(a){var u=Go(t.props.minDate);s=rn(o,u)||Dn(l,u)}else if(i){var c=Od(t.props.maxDate);s=xn(o,c)||Dn(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:ts(s,{hour:Ht(o),minute:Bt(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 f=o.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(f===K.ArrowDown||f===K.ArrowUp||f===K.Enter)&&((s=t.onInputClick)===null||s===void 0||s.call(t));return}if(t.state.open){if(f===K.ArrowDown||f===K.ArrowUp){o.preventDefault();var h=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"]',p=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(h);p instanceof HTMLElement&&p.focus({preventScroll:!0});return}var m=xe(t.state.preSelection);f===K.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===ss?(t.handleSelect(m,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(m)):t.setOpen(!1)):f===K.Escape?(o.preventDefault(),o.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):f===K.Tab&&t.setOpen(!1),t.inputOk()||(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:is})}},t.onPortalKeyDown=function(o){var a=o.key;a===K.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,f=t.props,h=f.minDate,p=f.maxDate,m=f.disabledKeyboardNavigation,v=f.showWeekPicker,g=f.shouldCloseOnSelect,x=f.locale,E=f.calendarStartDay,w=f.adjustDateOnChange,k=f.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var D=o.key,T=o.shiftKey,$=xe(t.state.preSelection),_=function(P,N){var z=N;switch(P){case K.ArrowRight:z=v?Fo(N,1):ft(N,1);break;case K.ArrowLeft:z=v?wd(N):Lw(N);break;case K.ArrowUp:z=wd(N);break;case K.ArrowDown:z=Fo(N,1);break;case K.PageUp:z=T?Gn(N,1):En(N,1);break;case K.PageDown:z=T?jt(N,1):pt(N,1);break;case K.Home:z=on(N,x,E);break;case K.End:z=U0(N);break}return z},C=function(P,N){for(var z=40,I=P,te=!1,M=0,j=_(P,N);!te;){if(M>=z){j=N;break}h&&j<h&&(I=K.ArrowRight,j=lt(h,t.props)?_(I,j):h),p&&j>p&&(I=K.ArrowLeft,j=lt(p,t.props)?_(I,j):p),lt(j,t.props)?((I===K.PageUp||I===K.Home)&&(I=K.ArrowRight),(I===K.PageDown||I===K.End)&&(I=K.ArrowLeft),j=_(I,j)):te=!0,M++}return j};if(D===K.Enter){o.preventDefault(),t.handleSelect($,o),!g&&t.setPreSelection($);return}else if(D===K.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:is});return}var O=null;switch(D){case K.ArrowLeft:case K.ArrowRight:case K.ArrowUp:case K.ArrowDown:case K.PageUp:case K.PageDown:case K.Home:case K.End:O=C(D,$);break}if(!O){(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:is});return}if(o.preventDefault(),t.setState({lastPreSelectChange:ss}),w&&t.setSelected(O),t.setPreSelection(O),k){var R=qe($),b=qe(O),S=le($),L=le(O);R!==b||S!==L?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===K.Escape&&(o.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1))},t.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),t.sendFocusBackToInput();var a=t.props,i=a.selectsRange,s=a.onChange;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(Cx,me({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:ax(t.modifyHolidays()),outsideClickIgnoreClass:Kd,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(st(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+st(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(st(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(st(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(st(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(st(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(st(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=Be(t.props.className,(o={},o[Kd]=t.state.open,o)),l=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",c=t.props,f=c.dateFormat,h=f===void 0?r.defaultProps.dateFormat:f,p=c.locale,m=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?B0(t.props.startDate,t.props.endDate,{dateFormat:h,locale:p}):t.props.selectsMultiple?V0((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:h,locale:p}):st(t.props.selected,{dateFormat:h,locale:p});return d.cloneElement(l,(a={},a[u]=function(v){t.input=v},a.value=m,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=Be(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,f=o.clearButtonClassName,h=f===void 0?"":f,p=o.ariaLabelClose,m=p===void 0?"Close":p,v=o.selectedDates,g=o.readOnly;return a&&!g&&(s!=null||l!=null||u!=null||v!=null&&v.length)?d.createElement("button",{type:"button",className:Be("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,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:Fr,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&&Lx(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:jd(this.props.highlightDates)}),!t.focused&&!Dn(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(Ox,me({icon:o,className:Be(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(Gd,{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(Qd,me({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(Nx,me({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(d.Component),$x="input",ss="navigate";const Ax=({label:n,placeholder:r,value:e,onChange:t,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(c,f)=>1990+f),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=d.forwardRef(({value:c,onClick:f},h)=>Y.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:c||Y.jsx("p",{className:"text-petnow-grey-primary",children:r})}));l.displayName="CustomInput";function u(c){const f=c.substring(0,4),h=c.substring(5,7),p=c.substring(8,10);return new Date(Number(f),Number(h)-1,Number(p))}return Y.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[Y.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),Y.jsx(Fx,{disabledKeyboardNavigation:!0,locale:k0,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:Y.jsx(l,{}),renderCustomHeader:({date:c,changeYear:f,changeMonth:h,decreaseMonth:p,increaseMonth:m})=>Y.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[Y.jsx("button",{onClick:p,disabled:c.getFullYear()<=1990&&c.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:Y.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),Y.jsxs("div",{className:"text-lg",children:[Y.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:le(c),onChange:({target:{value:v}})=>f(Number(v)),children:i.map(v=>Y.jsx("option",{value:v,children:v},v))}),Y.jsx("span",{className:"mr-2 ml-1",children:"년"}),Y.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[qe(c)],onChange:({target:{value:v}})=>h(s.indexOf(v)),children:s.map(v=>Y.jsx("option",{value:v,children:v},v))}),Y.jsx("span",{className:"mx-1",children:"월"})]}),Y.jsx("button",{onClick:m,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:Y.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&Y.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function Yx(n){return Pr({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 Rx=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>Y.jsx("div",{className:"text-petnow-grey-tertiary relative",children:Y.jsxs(ib,{disabled:a,onChange:o,children:[Y.jsx(uo,{className:"text-xl font-bold text-black",children:n}),Y.jsxs(Yc,{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?Y.jsx("p",{children:e.name}):Y.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",Y.jsx(Yx,{className:"absolute right-4 bottom-5"})]}),Y.jsx(Rc,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>Y.jsx(jc,{value:i,as:Y.Fragment,children:({focus:s,selected:l})=>Y.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))})]})}),jx=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,u]=d.useState("");let c;const f=m=>{c&&clearTimeout(c),c=setTimeout(async()=>{u(m.target.value)},200)},h=m=>{u(m.target.value)},p=l===""?t.slice(0,4):t.filter(m=>{var v;return(v=m.name)==null?void 0:v.replace(/ /g,"").includes(l.replace(/ /g,""))}).slice(0,4);return Y.jsxs("div",{children:[Y.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:Y.jsxs(ig,{onChange:m=>{o(m)},disabled:a,children:[Y.jsx(uo,{className:"text-xl font-bold text-black",children:n}),Y.jsx(pc,{"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?h:f,onKeyDown:m=>{m.key==="Backspace"&&o({name:void 0,value:void 0})},placeholder:r,autoComplete:"off"}),Y.jsx(hc,{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=>Y.jsx(mc,{value:m,as:d.Fragment,children:({focus:v,selected:g})=>Y.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:m.name})},m.name))})]})}),i&&Y.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})};_e.AccordionCard=Mb,_e.Checkbox=kp,_e.Chip=_p,_e.LabeledAddressInput=kb,_e.LabeledAutocomplete=jx,_e.LabeledCheckbox=gb,_e.LabeledDatepicker=Ax,_e.LabeledSelect=Rx,_e.Popup=sb,_e.Radio=Kf,_e.Tabs=Sp,_e.Toggle=lb,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
|
|
80
|
+
*/var us=function(r,e){return us=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])},us(r,e)};function Xe(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");us(n,r);function e(){this.constructor=n}n.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var me=function(){return me=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},me.apply(this,arguments)};function Nt(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 rE=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)},oE=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},sa=function(n){var r=n.children,e=n.onClickOutside,t=n.className,o=n.containerRef,a=n.style,i=n.ignoreClass,s=oE(e,i);return d.createElement("div",{className:t,style:a,ref:function(l){s.current=l,o&&(o.current=l)}},r)},X;(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"})(X||(X={}));function Jd(){var n=typeof window<"u"?window:globalThis;return n}var Ur=12;function xe(n){if(n==null)return new Date;var r=typeof n=="string"?y0(n):ae(n);return la(r)?r:new Date}function cs(n,r,e,t,o){o===void 0&&(o=xe());for(var a=ar(e)||ar(fs()),i=Array.isArray(r)?r:[r],s=0,l=i;s<l.length;s++){var u=l[s],c=p0(n,u,o,{locale:a});if(la(c)&&(!t||n===Me(c,u,e)))return c}return null}function la(n,r){return Qo(n)&&!Pn(n,new Date("1/1/1800"))}function Me(n,r,e){if(e==="en")return _d(n,r,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?ar(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||ar(fs()),_d(n,r,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function ht(n,r){var e=r.dateFormat,t=r.locale,o=Array.isArray(e)&&e.length>0?e[0]:e;return n&&Me(n,o,t)||""}var Zd=" - ";function aE(n,r,e){if(!n)return"";var t=ht(n,e),o=r?ht(r,e):"";return"".concat(t).concat(Zd).concat(o)}function iE(n,r){if(!(n!=null&&n.length))return"";var e=n[0]?ht(n[0],r):"";if(n.length===1)return e;if(n.length===2&&n[1]){var t=ht(n[1],r);return"".concat(e,", ").concat(t)}var o=n.length-1;return"".concat(e," (+").concat(o,")")}function ds(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 ta(na(ra(n,s),a),t)}function sE(n){return Ji(n)}function lE(n,r){return Me(n,"ddd",r)}function ua(n){return On(n)}function gn(n,r,e){var t=ar(r||fs());return Ut(n,{locale:t,weekStartsOn:e})}function Zt(n){return gd(n)}function Qr(n){return Jo(n)}function ef(n){return Xi(n)}function tf(){return On(xe())}function nf(n){return md(n)}function uE(n){return Ey(n)}function cE(n){return vd(n)}function $t(n,r){return n&&r?g0(n,r):!n&&!r}function Ze(n,r){return n&&r?m0(n,r):!n&&!r}function ca(n,r){return n&&r?v0(n,r):!n&&!r}function ve(n,r){return n&&r?wy(n,r):!n&&!r}function $n(n,r){return n&&r?bw(n,r):!n&&!r}function Gr(n,r,e){var t,o=On(r),a=md(e);try{t=Br(n,{start:o,end:a})}catch{t=!1}return t}function fs(){var n=Jd();return n.__localeId__}function ar(n){if(typeof n=="string"){var r=Jd();return r.__localeData__?r.__localeData__[n]:void 0}else return n}function dE(n,r,e){return r(Me(n,"EEEE",e))}function fE(n,r){return Me(n,"EEEEEE",r)}function pE(n,r){return Me(n,"EEE",r)}function ps(n,r){return Me(pt(xe(),n),"LLLL",r)}function rf(n,r){return Me(pt(xe(),n),"LLL",r)}function hE(n,r){return Me(nr(xe(),n),"QQQ",r)}function mt(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 Kr(n,{minDate:t,maxDate:o})||a&&a.some(function(c){return c instanceof Date?ve(n,c):ve(n,c.date)})||i&&i.some(function(c){var f=c.start,h=c.end;return Br(n,{start:f,end:h})})||s&&!s.some(function(c){return ve(n,c)})||l&&!l.some(function(c){var f=c.start,h=c.end;return Br(n,{start:f,end:h})})||u&&!u(xe(n))||!1}function hs(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 Br(n,{start:i,end:s})}):t&&t.some(function(a){var i;return a instanceof Date?ve(n,a):ve(n,(i=a.date)!==null&&i!==void 0?i:new Date)})||!1}function of(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Kr(n,{minDate:t?gd(t):void 0,maxDate:o?vd(o):void 0})||(a==null?void 0:a.some(function(l){return Ze(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return Ze(n,l)})||s&&!s(xe(n))||!1}function da(n,r,e,t){var o=le(n),a=Je(n),i=le(r),s=Je(r),l=le(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 mE(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates;return Kr(n,{minDate:t,maxDate:o})||a&&a.some(function(s){return Ze(s instanceof Date?s:s.date,n)})||i&&!i.some(function(s){return Ze(s,n)})||!1}function fa(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.maxDate,a=e.excludeDates,i=e.includeDates,s=e.filterDate;return Kr(n,{minDate:t,maxDate:o})||(a==null?void 0:a.some(function(l){return ca(n,l instanceof Date?l:l.date)}))||i&&!i.some(function(l){return ca(n,l)})||s&&!s(xe(n))||!1}function pa(n,r,e){if(!r||!e||!Qo(r)||!Qo(e))return!1;var t=le(r),o=le(e);return t<=n&&o>=n}function ha(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 Kr(l,{minDate:t?Jo(t):void 0,maxDate:o?bd(o):void 0})||(a==null?void 0:a.some(function(u){return $t(l,u instanceof Date?u:u.date)}))||i&&!i.some(function(u){return $t(l,u)})||s&&!s(xe(l))||!1}function ma(n,r,e,t){var o=le(n),a=Mn(n),i=le(r),s=Mn(r),l=le(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 Kr(n,r){var e,t=r===void 0?{}:r,o=t.minDate,a=t.maxDate;return(e=o&&Zn(n,o)<0||a&&Zn(n,a)>0)!==null&&e!==void 0?e:!1}function af(n,r){return r.some(function(e){return Xt(e)===Xt(n)&&Jt(e)===Jt(n)&&mn(e)===mn(n)})}function sf(n,r){var e=r===void 0?{}:r,t=e.excludeTimes,o=e.includeTimes,a=e.filterTime;return t&&af(n,t)||o&&!af(n,o)||a&&!a(n)||!1}function lf(n,r){var e=r.minTime,t=r.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var o=xe();o=ta(o,Xt(n)),o=na(o,Jt(n)),o=ra(o,mn(n));var a=xe();a=ta(a,Xt(e)),a=na(a,Jt(e)),a=ra(a,mn(e));var i=xe();i=ta(i,Xt(t)),i=na(i,Jt(t)),i=ra(i,mn(t));var s;try{s=!Br(o,{start:a,end:i})}catch{s=!1}return s}function uf(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=In(n,1);return t&&Go(t,a)>0||o&&o.every(function(i){return Go(i,a)>0})||!1}function cf(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=wt(n,1);return t&&Go(a,t)>0||o&&o.every(function(i){return Go(a,i)>0})||!1}function vE(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=Jo(n),i=$d(a);return t&&Ko(t,i)>0||o&&o.every(function(s){return Ko(s,i)>0})||!1}function gE(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=bd(n),i=Ki(a,1);return t&&Ko(i,t)>0||o&&o.every(function(s){return Ko(i,s)>0})||!1}function df(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.includeDates,a=rr(n,1);return t&&Xo(t,a)>0||o&&o.every(function(i){return Xo(i,a)>0})||!1}function bE(n,r){var e=r===void 0?{}:r,t=e.minDate,o=e.yearItemNumber,a=o===void 0?Ur:o,i=Qr(rr(n,a)),s=bn(i,a).endPeriod,l=t&&le(t);return l&&l>s||!1}function ff(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.includeDates,a=Gt(n,1);return t&&Xo(a,t)>0||o&&o.every(function(i){return Xo(a,i)>0})||!1}function yE(n,r){var e=r===void 0?{}:r,t=e.maxDate,o=e.yearItemNumber,a=o===void 0?Ur:o,i=Gt(n,a),s=bn(i,a).startPeriod,l=t&&le(t);return l&&l<s||!1}function pf(n){var r=n.minDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return Zn(o,r)>=0});return pd(t)}else return e?pd(e):r}function hf(n){var r=n.maxDate,e=n.includeDates;if(e&&r){var t=e.filter(function(o){return Zn(o,r)<=0});return fd(t)}else return e?fd(e):r}function mf(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(Kt(i)){var s=Me(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:"",f=i[c];if(typeof c=="string"&&Array.isArray(f))for(var h=0,p=f.length;h<p;h++){var m=f[h];if(m){var s=Me(m,"MM.dd.yyyy"),l=t.get(s)||[];l.includes(c)||(l.push(c),t.set(s,l))}}}}return t}function wE(n,r){return n.length!==r.length?!1:n.every(function(e,t){return e===r[t]})}function xE(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(Kt(o)){var i=Me(o,"MM.dd.yyyy"),s=e.get(i)||{className:"",holidayNames:[]};if(!("className"in s&&s.className===r&&wE(s.holidayNames,[a]))){s.className=r;var l=s.holidayNames;s.holidayNames=l?Nt(Nt([],l,!0),[a],!1):[a],e.set(i,s)}}}),e}function EE(n,r,e,t,o){for(var a=o.length,i=[],s=0;s<a;s++){var l=n,u=o[s];u&&(l=vy(l,Xt(u)),l=Gi(l,Jt(u)),l=yy(l,mn(u)));var c=Gi(n,(e+1)*t);vn(l,r)&&Pn(l,c)&&u!=null&&i.push(u)}return i}function vf(n){return n<10?"0".concat(n):"".concat(n)}function bn(n,r){r===void 0&&(r=Ur);var e=Math.ceil(le(n)/r)*r,t=e-(r-1);return{startPeriod:t,endPeriod:e}}function DE(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 gf(n){var r=n.getSeconds(),e=n.getMilliseconds();return ae(n.getTime()-r*1e3-e)}function SE(n,r){return gf(n).getTime()===gf(r).getTime()}function bf(n){if(!Kt(n))throw new Error("Invalid date");var r=new Date(n);return r.setHours(0,0,0,0),r}function yf(n,r){if(!Kt(n)||!Kt(r))throw new Error("Invalid date received");var e=bf(n),t=bf(r);return Pn(e,t)}function wf(n){return n.key===X.Space}var kE=function(n){Xe(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(":"),f=c[0],h=c[1];u.setHours(Number(f)),u.setMinutes(Number(h))}(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),CE=function(n){Xe(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===X.Space&&(t.preventDefault(),t.key=X.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isSameDay=function(t){return ve(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),mt(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 hs(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return ve(e.props.day,gn(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&ve(t,gn(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=Me(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=Me(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:Gr(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,f=o.endDate,h=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return!(i||s||l)||!h||!u&&e.isDisabled()?!1:i&&f&&(Pn(h,f)||$n(h,f))?Gr(a,h,f):s&&c&&(vn(h,c)||$n(h,c))||l&&c&&!f&&(vn(h,c)||$n(h,c))?Gr(a,c,h):!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?ve(a,l):ve(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?ve(a,u):ve(a,i)},e.isRangeStart=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ve(a,o)},e.isRangeEnd=function(){var t=e.props,o=t.day,a=t.startDate,i=t.endDate;return!a||!i?!1:ve(i,o)},e.isWeekend=function(){var t=hw(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===Je(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(Je(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(xe())},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 Qe("react-datepicker__day",o,"react-datepicker__day--"+lE(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(Me(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=Me(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?ve(c,o):ve(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)&&ve(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(Od(e.props.day),e.props.day):Od(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),_E=function(n){Xe(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===X.Space&&(t.preventDefault(),t.key=X.Enter),(a=(o=e.props).handleOnKeyDown)===null||a===void 0||a.call(o,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ve(e.props.date,e.props.selected)&&ve(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||ve(e.props.date,e.props.selected)&&ve(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var o=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&ve(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&&ve(this.props.date,this.props.selected)};return d.createElement("div",{ref:this.weekNumberEl,className:Qe(l),"aria-label":"".concat(i," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},t)},r}(d.Component),OE=function(n){Xe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.isDisabled=function(t){return mt(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 f=new Date(t);f.setDate(f.getDate()+c);var h=!e.isDisabled(f);if(h){u=f;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):sE(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),o=yt(t,6),a=new Date(t);a<=o;){if(!e.isDisabled(a))return!1;a=yt(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(_E,me({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=yt(t,s);return d.createElement(CE,me({},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 gn(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!ve(e.startOfWeek(),e.props.selected)&&ve(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":ve(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return d.createElement("div",{className:Qe(e)},this.renderDays())},r}(d.Component),Xr,ME=6,ir={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ms=(Xr={},Xr[ir.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},Xr[ir.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},Xr[ir.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},Xr),va=1;function xf(n,r){return n?ir.FOUR_COLUMNS:r?ir.TWO_COLUMNS:ir.THREE_COLUMNS}var TE=function(n){Xe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.MONTH_REFS=Nt([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=Nt([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return mt(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 hs(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:Ze(pt(a,t),i)},e.isRangeStartQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ca(nr(a,t),i)},e.isRangeEndMonth=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:Ze(pt(a,t),s)},e.isRangeEndQuarter=function(t){var o=e.props,a=o.day,i=o.startDate,s=o.endDate;return!i||!s?!1:ca(nr(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,f=a.endDate,h=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!h?!1:s&&f?da(h,f,t,i):l&&c||u&&c&&!f?da(c,h,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=pt(i,t),c=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l?Ze(u,c):Ze(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=pt(i,t),f=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return l||u?Ze(c,f):Ze(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,f=a.endDate,h=(o=e.props.selectingDate)!==null&&o!==void 0?o:e.props.preSelection;return!(s||l||u)||!h?!1:s&&f?ma(h,f,t,i):l&&c||u&&c&&!f?ma(c,h,t,i):!1},e.isWeekInMonth=function(t){var o=e.props.day,a=yt(t,6);return Ze(t,o)||Ze(a,o)},e.isCurrentMonth=function(t,o){return le(t)===le(xe())&&o===Je(xe())},e.isCurrentQuarter=function(t,o){return le(t)===le(xe())&&o===Mn(xe())},e.isSelectedMonth=function(t,o,a){return Je(a)===o&&le(t)===le(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 Mn(t)===o&&le(t)===le(a)},e.isMonthSelected=function(){var t=e.props,o=t.day,a=t.selected,i=t.selectedDates,s=t.selectsMultiple,l=Je(o);return s?i==null?void 0:i.some(function(u){return e.isSelectedMonth(o,l,u)}):!!a&&e.isSelectedMonth(o,l,a)},e.renderWeeks=function(){for(var t=[],o=e.props.fixedHeight,a=0,i=!1,s=gn(Zt(e.props.day),e.props.locale,e.props.calendarStartDay),l=function(m){return e.props.showWeekPicker?gn(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},u=function(m){return e.props.showWeekPicker?gn(m,e.props.locale,e.props.calendarStartDay):e.props.selected},c=e.props.selected?u(e.props.selected):void 0,f=e.props.preSelection?l(e.props.preSelection):void 0;t.push(d.createElement(OE,me({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:a,day:s,month:Je(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:c,preSelection:f,showWeekNumber:e.props.showWeekNumbers}))),!i;){a++,s=Uo(s,1);var h=o&&a>=ME,p=!o&&!e.isWeekInMonth(s);if(h||p)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(Zt(s),t)},e.onMonthMouseEnter=function(t){var o=e.isMonthDisabledForLabelDate(t),a=o.isDisabled,i=o.labelDate;a||e.handleDayMouseEnter(Zt(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,f=s.minDate,h=s.maxDate,p=s.showFourColumnMonthYearPicker,m=s.showTwoColumnMonthYearPicker;if(u){var v=xf(p,m),g=e.getVerticalOffset(v),y=(i=ms[v])===null||i===void 0?void 0:i.grid,E=function(N,_,O){var M,L,b=_,k=O;switch(N){case X.ArrowRight:b=wt(_,va),k=O===11?0:O+va;break;case X.ArrowLeft:b=In(_,va),k=O===0?11:O-va;break;case X.ArrowUp:b=In(_,g),k=!((M=y==null?void 0:y[0])===null||M===void 0)&&M.includes(O)?O+12-g:O-g;break;case X.ArrowDown:b=wt(_,g),k=!((L=y==null?void 0:y[y.length-1])===null||L===void 0)&&L.includes(O)?O-12+g:O+g;break}return{newCalculatedDate:b,newCalculatedMonth:k}},w=function(N,_,O){for(var M=40,L=N,b=!1,k=0,$=E(L,_,O),Y=$.newCalculatedDate,I=$.newCalculatedMonth;!b;){if(k>=M){Y=_,I=O;break}if(f&&Y<f){L=X.ArrowRight;var V=E(L,Y,I);Y=V.newCalculatedDate,I=V.newCalculatedMonth}if(h&&Y>h){L=X.ArrowLeft;var V=E(L,Y,I);Y=V.newCalculatedDate,I=V.newCalculatedMonth}if(mE(Y,e.props)){var V=E(L,Y,I);Y=V.newCalculatedDate,I=V.newCalculatedMonth}else b=!0;k++}return{newCalculatedDate:Y,newCalculatedMonth:I}};if(o===X.Enter){e.isMonthDisabled(a)||(e.onMonthClick(t,a),c==null||c(l));return}var S=w(o,u,a),x=S.newCalculatedDate,T=S.newCalculatedMonth;switch(o){case X.ArrowRight:case X.ArrowLeft:case X.ArrowUp:case X.ArrowDown:e.handleMonthNavigation(T,x);break}}},e.getVerticalOffset=function(t){var o,a;return(a=(o=ms[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!==X.Tab&&t.preventDefault(),i||e.handleKeyboardNavigation(t,l,o),s&&s(t)},e.onQuarterClick=function(t,o){var a=nr(e.props.day,o);fa(a,e.props)||e.handleDayClick(ef(a),t)},e.onQuarterMouseEnter=function(t){var o=nr(e.props.day,t);fa(o,e.props)||e.handleDayMouseEnter(ef(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 X.Enter:e.onQuarterClick(t,o),(i=(a=e.props).setPreSelection)===null||i===void 0||i.call(a,e.props.selected);break;case X.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===4?1:o+1,Ki(e.props.preSelection,1));break;case X.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(o===1?4:o-1,$d(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,f=pt(i,t);return{isDisabled:(o=(s||l||u||c)&&of(f,e.props))!==null&&o!==void 0?o:!1,labelDate:f}},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(pt(a,t)):void 0,f=e.getSelection();return Qe("react-datepicker__month-text","react-datepicker__month-".concat(t),c,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":f?e.isSelectMonthInList(a,t,f):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&l&&e.isSelectedMonth(a,t,l)&&!e.isMonthSelected()&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":i&&s?da(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=Je(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=Mn(e.props.preSelection),a=fa(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,f=pt(u,t),h=e.isDisabled(f)||e.isExcluded(f)?l:i;return"".concat(h," ").concat(Me(f,"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,f=o.excludeDates,h=o.includeDates,p=o.filterDate,m=o.preSelection,v=o.disabledKeyboardNavigation,g=(u||c||f||h||p)&&fa(nr(a,t),e.props);return Qe("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&&m&&e.isSelectedQuarter(a,t,m)&&!g,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":i&&s?ma(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=rf(t,s),c=ps(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=hE(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=ms[xf(i,a)])===null||t===void 0?void 0:t.grid;return u==null?void 0:u.map(function(c,f){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:f},c.map(function(h,p){return d.createElement("div",{ref:e.MONTH_REFS[h],key:p,onClick:function(m){e.onMonthClick(m,h)},onKeyDown:function(m){wf(m)&&(m.preventDefault(),m.key=X.Enter),e.onMonthKeyDown(m,h)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(h)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(h)}:void 0,tabIndex:Number(e.getTabIndex(h)),className:e.getMonthClassNames(h),"aria-disabled":e.isMonthDisabled(h),role:"option","aria-label":e.getAriaLabel(h),"aria-current":e.isCurrentMonth(s,h)?"date":void 0,"aria-selected":l?e.isSelectedMonth(s,h,l):void 0},e.getMonthContent(h))}))})},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 Qe("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(Me(a,"MMMM, yyyy",this.props.locale)),role:"listbox"},t?this.renderMonths():o?this.renderQuarters():this.renderWeeks())},r}(d.Component),PE=function(n){Xe(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(sa,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),IE=function(n){Xe(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(PE,me({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 rf(a,e.props.locale)}:function(a){return ps(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 NE(n,r){for(var e=[],t=Zt(n),o=Zt(r);!vn(t,o);)e.push(xe(t)),t=wt(t,1);return e}var $E=function(n){Xe(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=ts(o),i=$t(t.props.date,o)&&Ze(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"},"✓"):"",Me(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:NE(t.props.minDate,t.props.maxDate)},t}return r.prototype.render=function(){var e=Qe({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(sa,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),LE=function(n){Xe(r,n);function r(){var e=n!==null&&n.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=Zt(e.props.minDate),o=Zt(e.props.maxDate),a=[];!vn(t,o);){var i=ts(t);a.push(d.createElement("option",{key:i,value:i},Me(t,e.props.dateFormat,e.props.locale))),t=wt(t,1)}return a},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:ts(Zt(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var o=Me(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($E,me({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=xe(t);$t(e.props.date,o)&&Ze(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),FE=function(n){Xe(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)&&lf(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&sf(t,e.props)||(a=(o=e.props).onChange)===null||a===void 0||a.call(o,t)},e.isSelectedTime=function(t){return e.props.selected&&SE(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&lf(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&sf(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&&(Xt(t)*3600+Jt(t)*60+mn(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===X.Space&&(t.preventDefault(),t.key=X.Enter),(t.key===X.ArrowUp||t.key===X.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===X.ArrowDown||t.key===X.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===X.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||xe(),l=ua(s),u=e.props.injectTimes&&e.props.injectTimes.sort(function(g,y){return g.getTime()-y.getTime()}),c=60*DE(s),f=c/i,h=0;h<f;h++){var p=Gi(l,h*i);if(o.push(p),u){var m=EE(l,p,h,i,u);o=o.concat(m)}}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},Me(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),Ef=3,AE=function(n){Xe(r,n);function r(e){var t=n.call(this,e)||this;return t.YEAR_REFS=Nt([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(o){return mt(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 hs(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,f=c.date,h=c.yearItemNumber;if(!(f===void 0||h===void 0)){var p=bn(f,h).startPeriod;t.isDisabled(a)||t.isExcluded(a)||((s=(i=t.props).setPreSelection)===null||s===void 0||s.call(i,a),o-p<0?t.updateFocusOnPaginate(h-(p-o)):o-p>=h?t.updateFocusOnPaginate(Math.abs(h-(o-p))):(u=(l=t.YEAR_REFS[o-p])===null||l===void 0?void 0:l.current)===null||u===void 0||u.focus())}},t.isSameDay=function(o,a){return ve(o,a)},t.isCurrentYear=function(o){return o===le(xe())},t.isRangeStart=function(o){return t.props.startDate&&t.props.endDate&&$t(It(xe(),o),t.props.startDate)},t.isRangeEnd=function(o){return t.props.startDate&&t.props.endDate&&$t(It(xe(),o),t.props.endDate)},t.isInRange=function(o){return pa(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?pa(o,t.selectingDate(),c):s&&u||l&&u&&!c?pa(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=It(xe(),o);return l?$t(u,(a=t.selectingDate())!==null&&a!==void 0?a:null):$t(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=It(xe(),o);return l||u?$t(c,(a=t.selectingDate())!==null&&a!==void 0?a:null):$t(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,f=Qr(It(t.props.date,o)),h=(i||s||l||u||c)&&ha(o,t.props);return!t.props.disabledKeyboardNavigation&&!t.props.inline&&!ve(f,Qr(t.props.selected))&&ve(f,Qr(t.props.preSelection))&&!h}},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===le(u)}):!!s&&o===le(s)},t.onYearClick=function(o,a){var i=t.props.date;i!==void 0&&t.handleYearClick(Qr(It(i,a)),o)},t.onYearKeyDown=function(o,a){var i,s,l=o.key,u=t.props,c=u.date,f=u.yearItemNumber,h=u.handleOnKeyDown;if(l!==X.Tab&&o.preventDefault(),!t.props.disabledKeyboardNavigation)switch(l){case X.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 X.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(a+1,Gt(t.props.preSelection,1));break;case X.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(a-1,rr(t.props.preSelection,1));break;case X.ArrowUp:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var p=bn(c,f).startPeriod,m=Ef,v=a-m;if(v<p){var g=f%m;a>=p&&a<p+g?m=g:m+=g,v=a-m}t.handleYearNavigation(v,rr(t.props.preSelection,m));break}case X.ArrowDown:{if(c===void 0||f===void 0||t.props.preSelection==null)break;var y=bn(c,f).endPeriod,m=Ef,v=a+m;if(v>y){var g=f%m;a<=y&&a>y-g?m=g:m+=g,v=a+m}t.handleYearNavigation(v,Gt(t.props.preSelection,m));break}}h&&h(o)},t.getYearClassNames=function(o){var a=t.props,i=a.date,s=a.minDate,l=a.maxDate,u=a.excludeDates,c=a.includeDates,f=a.filterDate,h=a.yearClassName;return Qe("react-datepicker__year-text","react-datepicker__year-".concat(o),i?h==null?void 0:h(It(i,o)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(o),"react-datepicker__year-text--disabled":(s||l||u||c||f)&&ha(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=le(t.props.preSelection),i=ha(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=bn(a,i),c=u.startPeriod,f=u.endPeriod,h=function(v){t.push(d.createElement("div",{ref:p.YEAR_REFS[v-c],onClick:function(g){e.onYearClick(g,v)},onKeyDown:function(g){wf(g)&&(g.preventDefault(),g.key=X.Enter),e.onYearKeyDown(g,v)},tabIndex:Number(p.getYearTabIndex(v)),className:p.getYearClassNames(v),onMouseEnter:p.props.usePointerEvent?void 0:function(g){return s(g,v)},onPointerEnter:p.props.usePointerEvent?function(g){return s(g,v)}:void 0,onMouseLeave:p.props.usePointerEvent?void 0:function(g){return l(g,v)},onPointerLeave:p.props.usePointerEvent?function(g){return l(g,v)}:void 0,key:v,"aria-current":p.isCurrentYear(v)?"date":void 0},p.getYearContent(v)))},p=this,m=c;m<=f;m++)h(m);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 RE(n,r,e,t){for(var o=[],a=0;a<2*r+1;a++){var i=n+r-a,s=!0;e&&(s=le(e)<=i),t&&s&&(s=le(t)>=i),s&&o.push(i)}return o}var YE=function(n){Xe(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(f){return d.createElement("div",{className:s===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:t.onChange.bind(t,f),"aria-selected":s===f?"true":void 0},s===f?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),u=t.props.minDate?le(t.props.minDate):null,c=t.props.maxDate?le(t.props.maxDate):null;return(!c||!t.state.yearsList.find(function(f){return f===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(f){return f===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:RE(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=Qe({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(sa,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},r}(d.Component),WE=function(n){Xe(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?le(e.props.minDate):1900,o=e.props.maxDate?le(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(YE,me({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),jE=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],HE=function(n){var r=(n.className||"").split(/\s+/);return jE.some(function(e){return r.indexOf(e)>=0})},BE=function(n){Xe(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;HE(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=pf(t.props),u=hf(t.props),c=xe(),f=s||i||a;return f||(l&&Pn(c,l)?l:u&&vn(c,u)?u:c)},t.increaseMonth=function(){t.setState(function(o){var a=o.date;return{date:wt(a,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(o){var a=o.date;return{date:In(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:It(xe(),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(!mt(o,t.props))return o;for(var a=Zt(o),i=cE(o),s=xy(i,a),l=null,u=0;u<=s;u++){var c=yt(a,u);if(!mt(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:It(i,Number(o))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(o){t.setState(function(a){var i=a.date;return{date:pt(i,Number(o))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(o){t.setState(function(a){var i=a.date;return{date:It(pt(i,Je(o)),le(o))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(o){o===void 0&&(o=t.state.date);var a=gn(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=yt(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":Me(l,"EEEE",t.props.locale),className:Qe("react-datepicker__day-name",c)},u)}))},t.formatWeekday=function(o,a){return t.props.formatWeekDay?dE(o,t.props.formatWeekDay,a):t.props.useWeekdaysShort?pE(o,a):fE(o,a)},t.decreaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:rr(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=In(t.state.date,u),f;switch(!0){case t.props.showMonthYearPicker:f=df(t.state.date,t.props);break;case t.props.showYearPicker:f=bE(t.state.date,t.props);break;case t.props.showQuarterYearPicker:f=vE(t.state.date,t.props);break;default:f=uf(c,t.props);break}if(!(!((i=t.props.forceShowMonthNavigation)!==null&&i!==void 0?i:r.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&f||t.props.showTimeSelectOnly)){var h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],p=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(m=t.decreaseYear),f&&t.props.showDisabledMonthNavigation&&(p.push("react-datepicker__navigation--previous--disabled"),m=void 0);var v=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,g=t.props,y=g.previousMonthButtonLabel,E=y===void 0?r.defaultProps.previousMonthButtonLabel:y,w=g.previousYearButtonLabel,S=w===void 0?r.defaultProps.previousYearButtonLabel:w,x=t.props,T=x.previousMonthAriaLabel,N=T===void 0?typeof E=="string"?E:"Previous Month":T,_=x.previousYearAriaLabel,O=_===void 0?typeof S=="string"?S:"Previous Year":_;return d.createElement("button",{type:"button",className:p.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":v?O:N},d.createElement("span",{className:h.join(" ")},v?S:E))}}},t.increaseYear=function(){t.setState(function(o){var a,i=o.date;return{date:Gt(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=ff(t.state.date,t.props);break;case t.props.showYearPicker:a=yE(t.state.date,t.props);break;case t.props.showQuarterYearPicker:a=gE(t.state.date,t.props);break;default:a=cf(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,f=c.nextMonthButtonLabel,h=f===void 0?r.defaultProps.nextMonthButtonLabel:f,p=c.nextYearButtonLabel,m=p===void 0?r.defaultProps.nextYearButtonLabel:p,v=t.props,g=v.nextMonthAriaLabel,y=g===void 0?typeof h=="string"?h:"Next Month":g,E=v.nextYearAriaLabel,w=E===void 0?typeof m=="string"?m:"Next Year":E;return d.createElement("button",{type:"button",className:i.join(" "),onClick:l,onKeyDown:t.props.handleOnKeyDown,"aria-label":u?w:y},d.createElement("span",{className:s.join(" ")},u?m:h))}}},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(" ")},Me(o,t.props.dateFormat,t.props.locale))},t.renderYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showYearDropdown||o))return d.createElement(WE,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:le(t.state.date)}))},t.renderMonthDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthDropdown||o))return d.createElement(IE,me({},r.defaultProps,t.props,{month:Je(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(o){if(o===void 0&&(o=!1),!(!t.props.showMonthYearDropdown||o))return d.createElement(LE,me({},r.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(o){t.props.onSelect(tf(),o),t.props.setPreSelection&&t.props.setPreSelection(tf())},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=uf(t.state.date,t.props),c=cf(t.state.date,t.props),f=df(t.state.date,t.props),h=ff(t.state.date,t.props),p=!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,me(me({},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:f,nextYearButtonDisabled:h})),p&&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=bn(a,u),f=c.startPeriod,h=c.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(f," - ").concat(h):le(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?Gt(t.state.date,l):In(t.state.date,l),c=(a=t.props.monthSelectedIn)!==null&&a!==void 0?a:l,f=0;f<s;++f){var h=f-c+l,p=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?Gt(u,h):wt(u,h),m="month-".concat(f),v=f<s-1,g=f>0;i.push(d.createElement("div",{key:m,ref:function(y){t.monthContainer=y??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:p,i:f}),d.createElement(TE,me({},r.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:p,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:f,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(AE,me({},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(FE,me({},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&&la(o)&&!!t.props.selected,i=a?"".concat(vf(o.getHours()),":").concat(vf(o.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(kE,me({},r.defaultProps,t.props,{date:o,timeString:i,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var o,a=bn(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=le(t.state.date):l="".concat(ps(Je(t.state.date),t.props.locale)," ").concat(le(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:Ur}},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&&(!ve(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var o=!Ze(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return o&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!ve(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},r.prototype.render=function(){var e=this.props.container||rE;return d.createElement(sa,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:Qe("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),VE=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"}))},Df=function(n){Xe(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 Le.createPortal(this.props.children,this.el)},r}(d.Component),zE="[tabindex], a, button, input, select, textarea",qE=function(n){return(n instanceof HTMLAnchorElement||!n.disabled)&&n.tabIndex!==-1},Sf=function(n){Xe(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(zE),1,-1).filter(qE)},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 UE(n){var r=function(e){var t,o=typeof e.hidePopper=="boolean"?e.hidePopper:!0,a=d.useRef(null),i=nE(me({open:!o,whileElementsMounted:Lx,placement:e.popperPlacement,middleware:Nt([Hx({padding:15}),jx(10),Bx({element:a})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),s=me(me({},e),{hidePopper:o,popperProps:me(me({},i),{arrowRef:a})});return d.createElement(n,me({},s))};return r}var QE=function(n){Xe(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,f=e.portalId,h=e.portalHost,p=e.popperProps,m=e.showArrow,v=void 0;if(!i){var g=Qe("react-datepicker-popper",t);v=d.createElement(Sf,{enableTabLoop:u},d.createElement("div",{ref:p.refs.setFloating,style:p.floatingStyles,className:g,"data-placement":p.placement,onKeyDown:c},s,m&&d.createElement(Gx,{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&&(v=d.createElement(this.props.popperContainer,{},v)),f&&!i&&(v=d.createElement(Df,{portalId:f,portalHost:h},v));var y=Qe("react-datepicker-wrapper",o);return d.createElement(d.Fragment,null,d.createElement("div",{ref:p.refs.setReference,className:y},l),v)},r}(d.Component),GE=UE(QE),kf="react-datepicker-ignore-onclickoutside";function KE(n,r){return n&&r?Je(n)!==Je(r)||le(n)!==le(r):n!==r}var vs="Date input not valid.",XE=function(n){Xe(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:xe()},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 la(s)?Nt(Nt([],a,!0),[me(me({},i),{date:s})],!1):a},[])},t.calcInitialState=function(){var o,a=t.getPreSelection(),i=pf(t.props),s=hf(t.props),l=i&&Pn(a,ua(i))?i:s&&vn(a,nf(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:mf(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.resetHiddenStatus=function(){t.setState(me(me({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(me(me({},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:gs},function(){o||t.setState(function(i){return{focused:a?i.focused:!1}},function(){!a&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return Kt(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 f=u[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,u),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){t.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:JE});var h=t.props,p=h.selectsRange,m=h.startDate,v=h.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,E=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(p){var w=E.split(g.includes("-")?Zd:"-",2).map(function(L){return L.trim()}),S=w[0],x=w[1],T=cs(S??"",g,t.props.locale,y),N=cs(x??"",g,t.props.locale,y),_=(m==null?void 0:m.getTime())!==(T==null?void 0:T.getTime()),O=(v==null?void 0:v.getTime())!==(N==null?void 0:N.getTime());if(!_&&!O||T&&mt(T,t.props)||N&&mt(N,t.props))return;(s=(i=t.props).onChange)===null||s===void 0||s.call(i,[T,N],f)}else{var M=cs(E,g,t.props.locale,y,(l=t.props.selected)!==null&&l!==void 0?l:void 0);(M||!E)&&t.setSelected(M,f,!0)}}},t.handleSelect=function(o,a,i){if(!t.props.readOnly){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||!yf(o,l))&&t.setOpen(!1)}}},t.setSelected=function(o,a,i,s){var l,u,c=o;if(t.props.showYearPicker){if(c!==null&&ha(le(c),t.props))return}else if(t.props.showMonthYearPicker){if(c!==null&&of(c,t.props))return}else if(c!==null&&mt(c,t.props))return;var f=t.props,h=f.onChange,p=f.selectsRange,m=f.startDate,v=f.endDate,g=f.selectsMultiple,y=f.selectedDates,E=f.minTime,w=f.swapRange;if(!$n(t.props.selected,c)||t.props.allowSameDay||p||g)if(c!==null&&(t.props.selected&&(!i||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(c=ds(c,{hour:Xt(t.props.selected),minute:Jt(t.props.selected),second:mn(t.props.selected)})),!i&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&E&&(c=ds(c,{hour:E.getHours(),minute:E.getMinutes(),second:E.getSeconds()})),t.props.inline||t.setState({preSelection:c}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:s})),p){var S=!m&&!v,x=m&&!v,T=m&&v;S?h==null||h([c,null],a):x&&(c===null?h==null||h([null,null],a):yf(c,m)?w?h==null||h([c,m],a):h==null||h([c,null],a):h==null||h([m,c],a)),T&&(h==null||h([c,null],a))}else if(g){if(c!==null)if(!(y!=null&&y.length))h==null||h([c],a);else{var N=y.some(function(O){return ve(O,c)});if(N){var _=y.filter(function(O){return!ve(O,c)});h==null||h(_,a)}else h==null||h(Nt(Nt([],y,!0),[c],!1),a)}}else h==null||h(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){if(!t.props.readOnly){var a=Kt(t.props.minDate),i=Kt(t.props.maxDate),s=!0;if(o){var l=ua(o);if(a&&i)s=Gr(o,t.props.minDate,t.props.maxDate);else if(a){var u=ua(t.props.minDate);s=vn(o,u)||$n(l,u)}else if(i){var c=nf(t.props.maxDate);s=Pn(o,c)||$n(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:ds(s,{hour:Xt(o),minute:Jt(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 f=o.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(f===X.ArrowDown||f===X.ArrowUp||f===X.Enter)&&((s=t.onInputClick)===null||s===void 0||s.call(t));return}if(t.state.open){if(f===X.ArrowDown||f===X.ArrowUp){o.preventDefault();var h=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"]',p=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(h);p instanceof HTMLElement&&p.focus({preventScroll:!0});return}var m=xe(t.state.preSelection);f===X.Enter?(o.preventDefault(),o.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===gs?(t.handleSelect(m,o),!t.props.shouldCloseOnSelect&&t.setPreSelection(m)):t.setOpen(!1)):f===X.Escape?(o.preventDefault(),o.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):f===X.Tab&&t.setOpen(!1),t.inputOk()||(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:vs})}},t.onPortalKeyDown=function(o){var a=o.key;a===X.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,f=t.props,h=f.minDate,p=f.maxDate,m=f.disabledKeyboardNavigation,v=f.showWeekPicker,g=f.shouldCloseOnSelect,y=f.locale,E=f.calendarStartDay,w=f.adjustDateOnChange,S=f.inline;if((i=(a=t.props).onKeyDown)===null||i===void 0||i.call(a,o),!m){var x=o.key,T=o.shiftKey,N=xe(t.state.preSelection),_=function(Y,I){var V=I;switch(Y){case X.ArrowRight:V=v?Uo(I,1):yt(I,1);break;case X.ArrowLeft:V=v?Ld(I):b0(I);break;case X.ArrowUp:V=Ld(I);break;case X.ArrowDown:V=Uo(I,1);break;case X.PageUp:V=T?rr(I,1):In(I,1);break;case X.PageDown:V=T?Gt(I,1):wt(I,1);break;case X.Home:V=gn(I,y,E);break;case X.End:V=uE(I);break}return V},O=function(Y,I){for(var V=40,C=Y,q=!1,P=0,W=_(Y,I);!q;){if(P>=V){W=I;break}h&&W<h&&(C=X.ArrowRight,W=mt(h,t.props)?_(C,W):h),p&&W>p&&(C=X.ArrowLeft,W=mt(p,t.props)?_(C,W):p),mt(W,t.props)?((C===X.PageUp||C===X.Home)&&(C=X.ArrowRight),(C===X.PageDown||C===X.End)&&(C=X.ArrowLeft),W=_(C,W)):q=!0,P++}return W};if(x===X.Enter){o.preventDefault(),t.handleSelect(N,o),!g&&t.setPreSelection(N);return}else if(x===X.Escape){o.preventDefault(),t.setOpen(!1),t.inputOk()||(l=(s=t.props).onInputError)===null||l===void 0||l.call(s,{code:1,msg:vs});return}var M=null;switch(x){case X.ArrowLeft:case X.ArrowRight:case X.ArrowUp:case X.ArrowDown:case X.PageUp:case X.PageDown:case X.Home:case X.End:M=O(x,N);break}if(!M){(c=(u=t.props).onInputError)===null||c===void 0||c.call(u,{code:1,msg:vs});return}if(o.preventDefault(),t.setState({lastPreSelectChange:gs}),w&&t.setSelected(M),t.setPreSelection(M),S){var L=Je(N),b=Je(M),k=le(N),$=le(M);L!==b||k!==$?t.setState({shouldFocusDayInline:!0}):t.setState({shouldFocusDayInline:!1})}}},t.onPopperKeyDown=function(o){var a=o.key;a===X.Escape&&(o.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1))},t.onClearClick=function(o){o&&o.preventDefault&&o.preventDefault(),t.sendFocusBackToInput();var a=t.props,i=a.selectsRange,s=a.onChange;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(BE,me({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:xE(t.modifyHolidays()),outsideClickIgnoreClass:kf,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(ht(t.props.startDate,{dateFormat:u,locale:s}),". ").concat(t.props.endDate?"End date: "+ht(t.props.endDate,{dateFormat:u,locale:s}):""):t.props.showTimeSelectOnly?c="Selected time: ".concat(ht(t.props.selected,{dateFormat:i,locale:s})):t.props.showYearPicker?c="Selected year: ".concat(ht(t.props.selected,{dateFormat:"yyyy",locale:s})):t.props.showMonthYearPicker?c="Selected month: ".concat(ht(t.props.selected,{dateFormat:"MMMM yyyy",locale:s})):t.props.showQuarterYearPicker?c="Selected quarter: ".concat(ht(t.props.selected,{dateFormat:"yyyy, QQQ",locale:s})):c="Selected date: ".concat(ht(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=Qe(t.props.className,(o={},o[kf]=t.state.open,o)),l=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",c=t.props,f=c.dateFormat,h=f===void 0?r.defaultProps.dateFormat:f,p=c.locale,m=typeof t.props.value=="string"?t.props.value:typeof t.state.inputValue=="string"?t.state.inputValue:t.props.selectsRange?aE(t.props.startDate,t.props.endDate,{dateFormat:h,locale:p}):t.props.selectsMultiple?iE((i=t.props.selectedDates)!==null&&i!==void 0?i:[],{dateFormat:h,locale:p}):ht(t.props.selected,{dateFormat:h,locale:p});return d.cloneElement(l,(a={},a[u]=function(v){t.input=v},a.value=m,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=Qe(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,f=o.clearButtonClassName,h=f===void 0?"":f,p=o.ariaLabelClose,m=p===void 0?"Close":p,v=o.selectedDates,g=o.readOnly;return a&&!g&&(s!=null||l!=null||u!=null||v!=null&&v.length)?d.createElement("button",{type:"button",className:Qe("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":i}),disabled:i,"aria-label":m,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:Ur,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&&KE(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:mf(this.props.highlightDates)}),!t.focused&&!$n(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(VE,me({icon:o,className:Qe(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(Sf,{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(Df,me({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(GE,me({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},r}(d.Component),JE="input",gs="navigate";const ZE=({label:n,placeholder:r,value:e,onChange:t,helperText:o})=>{const a=new Date().getFullYear(),i=Array.from({length:a-1989},(c,f)=>1990+f),s=["1","2","3","4","5","6","7","8","9","10","11","12"],l=d.forwardRef(({value:c,onClick:f},h)=>R.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:c||R.jsx("p",{className:"text-petnow-grey-primary",children:r})}));l.displayName="CustomInput";function u(c){const f=c.substring(0,4),h=c.substring(5,7),p=c.substring(8,10);return new Date(Number(f),Number(h)-1,Number(p))}return R.jsxs("div",{className:"text-petnow-grey-tertiary flex flex-col",children:[R.jsx("label",{htmlFor:n,className:"mb-4 text-xl font-bold text-black",children:n}),R.jsx(XE,{disabledKeyboardNavigation:!0,locale:ux,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:R.jsx(l,{}),renderCustomHeader:({date:c,changeYear:f,changeMonth:h,decreaseMonth:p,increaseMonth:m})=>R.jsxs("div",{className:"flex justify-center pt-5 pb-4 text-black",children:[R.jsx("button",{onClick:p,disabled:c.getFullYear()<=1990&&c.getMonth()===0,type:"button",className:"react-datepicker__navigation react-datepicker__navigation--previous","aria-label":"Previous Month",children:R.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",children:"Previous Month"})}),R.jsxs("div",{className:"text-lg",children:[R.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:le(c),onChange:({target:{value:v}})=>f(Number(v)),children:i.map(v=>R.jsx("option",{value:v,children:v},v))}),R.jsx("span",{className:"mr-2 ml-1",children:"년"}),R.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[Je(c)],onChange:({target:{value:v}})=>h(s.indexOf(v)),children:s.map(v=>R.jsx("option",{value:v,children:v},v))}),R.jsx("span",{className:"mx-1",children:"월"})]}),R.jsx("button",{onClick:m,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:R.jsx("span",{className:"react-datepicker__navigation-icon react-datepicker__navigation-icon--next",children:"Next Month"})})]})}),o&&R.jsx("p",{className:"text-petnow-grey-secondary px-4 pt-2",children:o})]})};function eD(n){return Hr({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 tD=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a})=>R.jsx("div",{className:"text-petnow-grey-tertiary relative",children:R.jsxs(Vb,{disabled:a,onChange:o,children:[R.jsx(Eo,{className:"text-xl font-bold text-black",children:n}),R.jsxs(Zc,{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?R.jsx("p",{children:e.name}):R.jsx("p",{className:"text-petnow-grey-primary",children:r})," ",R.jsx(eD,{className:"absolute right-4 bottom-5"})]}),R.jsx(ed,{className:"scrollbar absolute max-h-[240px] w-full overflow-hidden overflow-y-auto rounded-xl shadow-md",children:t.map(i=>R.jsx(td,{value:i,as:R.Fragment,children:({focus:s,selected:l})=>R.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))})]})}),nD=({label:n,placeholder:r,value:e,options:t,onChange:o,disabled:a,helperText:i,disableDebounce:s})=>{const[l,u]=d.useState("");let c;const f=m=>{c&&clearTimeout(c),c=setTimeout(async()=>{u(m.target.value)},200)},h=m=>{u(m.target.value)},p=l===""?t.slice(0,4):t.filter(m=>{var v;return(v=m.name)==null?void 0:v.replace(/ /g,"").includes(l.replace(/ /g,""))}).slice(0,4);return R.jsxs("div",{children:[R.jsx("div",{className:"text-petnow-grey-tertiary relative flex flex-col",children:R.jsxs(Vg,{onChange:m=>{o(m)},disabled:a,children:[R.jsx(Eo,{className:"text-xl font-bold text-black",children:n}),R.jsx(Oc,{"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?h:f,onKeyDown:m=>{m.key==="Backspace"&&o({name:void 0,value:void 0})},placeholder:r,autoComplete:"off"}),R.jsx(Mc,{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=>R.jsx(Tc,{value:m,as:d.Fragment,children:({focus:v,selected:g})=>R.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:m.name})},m.name))})]})}),i&&R.jsx("p",{className:"text-petnow-grey-secondary mt-2 px-4",children:i})]})};Ce.AccordionCard=py,Ce.Checkbox=Zp,Ce.Chip=eh,Ce.LabeledAddressInput=uy,Ce.LabeledAutocomplete=nD,Ce.LabeledCheckbox=ty,Ce.LabeledDatepicker=ZE,Ce.LabeledSelect=tD,Ce.Popup=zb,Ce.Radio=Sp,Ce.Tabs=Jp,Ce.Toggle=qb,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})});
|
|
81
81
|
//# sourceMappingURL=index.umd.js.map
|