(function(pe,re){typeof exports=="object"&&typeof module<"u"?re(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],re):(pe=typeof globalThis<"u"?globalThis:pe||self,re(pe["Reservation Grid"]={},pe.React))})(this,function(pe,re){"use strict";var rt={exports:{}},We={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var gt;function vr(){if(gt)return We;gt=1;var i=re,n=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,e=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,v){var w,m={},p=null,b=null;v!==void 0&&(p=""+v),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(b=c.ref);for(w in c)r.call(c,w)&&!o.hasOwnProperty(w)&&(m[w]=c[w]);if(s&&s.defaultProps)for(w in c=s.defaultProps,c)m[w]===void 0&&(m[w]=c[w]);return{$$typeof:n,type:s,key:p,ref:b,props:m,_owner:e.current}}return We.Fragment=t,We.jsx=a,We.jsxs=a,We}var Se={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var pt;function hr(){return pt||(pt=1,process.env.NODE_ENV!=="production"&&function(){var i=re,n=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),U=Symbol.iterator,X="@@iterator";function Q(u){if(u===null||typeof u!="object")return null;var l=U&&u[U]||u[X];return typeof l=="function"?l:null}var I=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(u){{for(var l=arguments.length,f=new Array(l>1?l-1:0),g=1;g=1&&V>=0&&T[G]!==te[V];)V--;for(;G>=1&&V>=0;G--,V--)if(T[G]!==te[V]){if(G!==1||V!==1)do if(G--,V--,V<0||T[G]!==te[V]){var ce=` `+T[G].replace(" at new "," at ");return u.displayName&&ce.includes("")&&(ce=ce.replace("",u.displayName)),typeof u=="function"&&K.set(u,ce),ce}while(G>=1&&V>=0);break}}}finally{_=!1,Me.current=Y,Ke(),Error.prepareStackTrace=E}var Ye=u?u.displayName||u.name:"",dr=Ye?N(Ye):"";return typeof u=="function"&&K.set(u,dr),dr}function Ze(u,l,f){return $e(u,!1)}function qe(u){var l=u.prototype;return!!(l&&l.isReactComponent)}function Pe(u,l,f){if(u==null)return"";if(typeof u=="function")return $e(u,qe(u));if(typeof u=="string")return N(u);switch(u){case v:return N("Suspense");case w:return N("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case c:return Ze(u.render);case m:return Pe(u.type,l,f);case p:{var g=u,E=g._payload,Y=g._init;try{return Pe(Y(E),l,f)}catch{}}}return""}var et=Object.prototype.hasOwnProperty,er={},tr=I.ReactDebugCurrentFrame;function tt(u){if(u){var l=u._owner,f=Pe(u.type,u._source,l?l.type:null);tr.setExtraStackFrame(f)}else tr.setExtraStackFrame(null)}function za(u,l,f,g,E){{var Y=Function.call.bind(et);for(var P in u)if(Y(u,P)){var T=void 0;try{if(typeof u[P]!="function"){var te=Error((g||"React class")+": "+f+" type `"+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[P]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw te.name="Invariant Violation",te}T=u[P](l,P,g,f,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){T=G}T&&!(T instanceof Error)&&(tt(E),R("%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).",g||"React class",f,P,typeof T),tt(null)),T instanceof Error&&!(T.message in er)&&(er[T.message]=!0,tt(E),R("Failed %s type: %s",f,T.message),tt(null))}}}var Ja=Array.isArray;function dt(u){return Ja(u)}function Ka(u){{var l=typeof Symbol=="function"&&Symbol.toStringTag,f=l&&u[Symbol.toStringTag]||u.constructor.name||"Object";return f}}function Za(u){try{return rr(u),!1}catch{return!0}}function rr(u){return""+u}function nr(u){if(Za(u))return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ka(u)),rr(u)}var Qe=I.ReactCurrentOwner,ei={key:!0,ref:!0,__self:!0,__source:!0},ar,ir,vt;vt={};function ti(u){if(et.call(u,"ref")){var l=Object.getOwnPropertyDescriptor(u,"ref").get;if(l&&l.isReactWarning)return!1}return u.ref!==void 0}function ri(u){if(et.call(u,"key")){var l=Object.getOwnPropertyDescriptor(u,"key").get;if(l&&l.isReactWarning)return!1}return u.key!==void 0}function ni(u,l){if(typeof u.ref=="string"&&Qe.current&&l&&Qe.current.stateNode!==l){var f=J(Qe.current.type);vt[f]||(R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',J(Qe.current.type),u.ref),vt[f]=!0)}}function ai(u,l){{var f=function(){ar||(ar=!0,R("%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)",l))};f.isReactWarning=!0,Object.defineProperty(u,"key",{get:f,configurable:!0})}}function ii(u,l){{var f=function(){ir||(ir=!0,R("%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)",l))};f.isReactWarning=!0,Object.defineProperty(u,"ref",{get:f,configurable:!0})}}var oi=function(u,l,f,g,E,Y,P){var T={$$typeof:n,type:u,key:l,ref:f,props:P,_owner:Y};return T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(T,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(T,"_source",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T};function ui(u,l,f,g,E){{var Y,P={},T=null,te=null;f!==void 0&&(nr(f),T=""+f),ri(l)&&(nr(l.key),T=""+l.key),ti(l)&&(te=l.ref,ni(l,E));for(Y in l)et.call(l,Y)&&!ei.hasOwnProperty(Y)&&(P[Y]=l[Y]);if(u&&u.defaultProps){var G=u.defaultProps;for(Y in G)P[Y]===void 0&&(P[Y]=G[Y])}if(T||te){var V=typeof u=="function"?u.displayName||u.name||"Unknown":u;T&&ai(P,V),te&&ii(P,V)}return oi(u,T,te,E,g,Qe.current,P)}}var ht=I.ReactCurrentOwner,or=I.ReactDebugCurrentFrame;function Ue(u){if(u){var l=u._owner,f=Pe(u.type,u._source,l?l.type:null);or.setExtraStackFrame(f)}else or.setExtraStackFrame(null)}var mt;mt=!1;function wt(u){return typeof u=="object"&&u!==null&&u.$$typeof===n}function ur(){{if(ht.current){var u=J(ht.current.type);if(u)return` Check the render method of \``+u+"`."}return""}}function si(u){{if(u!==void 0){var l=u.fileName.replace(/^.*[\\\/]/,""),f=u.lineNumber;return` Check your code at `+l+":"+f+"."}return""}}var sr={};function li(u){{var l=ur();if(!l){var f=typeof u=="string"?u:u.displayName||u.name;f&&(l=` Check the top-level render call using <`+f+">.")}return l}}function lr(u,l){{if(!u._store||u._store.validated||u.key!=null)return;u._store.validated=!0;var f=li(l);if(sr[f])return;sr[f]=!0;var g="";u&&u._owner&&u._owner!==ht.current&&(g=" It was passed a child from "+J(u._owner.type)+"."),Ue(u),R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',f,g),Ue(null)}}function cr(u,l){{if(typeof u!="object")return;if(dt(u))for(var f=0;f",T=" Did you accidentally export a JSX literal instead of a component?"):G=typeof u,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,T)}var V=ui(u,l,f,E,Y);if(V==null)return V;if(P){var ce=l.children;if(ce!==void 0)if(g)if(dt(ce)){for(var Ye=0;Ye1?"s":"")+" required, but only "+n.length+" present")}function F(i){W(1,arguments);var n=Object.prototype.toString.call(i);return i instanceof Date||we(i)==="object"&&n==="[object Date]"?new Date(i.getTime()):typeof i=="number"||n==="[object Number]"?new Date(i):((typeof i=="string"||n==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function mr(i,n){W(2,arguments);var t=F(i),r=ee(n);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}function wr(i,n){W(2,arguments);var t=F(i).getTime(),r=ee(n);return new Date(t+r)}var gr={};function De(){return gr}function yt(i){var n=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return n.setUTCFullYear(i.getFullYear()),i.getTime()-n.getTime()}function Be(i){W(1,arguments);var n=F(i);return n.setHours(0,0,0,0),n}var pr=6e4,yr=36e5,br=1e3;function Tr(i){return W(1,arguments),i instanceof Date||we(i)==="object"&&Object.prototype.toString.call(i)==="[object Date]"}function Cr(i){if(W(1,arguments),!Tr(i)&&typeof i!="number")return!1;var n=F(i);return!isNaN(Number(n))}function xr(i){W(1,arguments);var n=F(i),t=n.getMonth();return n.setFullYear(n.getFullYear(),t+1,0),n.setHours(23,59,59,999),n}function Pr(i){W(1,arguments);var n=F(i);return n.setDate(1),n.setHours(0,0,0,0),n}function Dr(i){W(1,arguments);var n=F(i),t=n.getFullYear();return n.setFullYear(t+1,0,0),n.setHours(23,59,59,999),n}function Or(i){W(1,arguments);var n=F(i),t=new Date(0);return t.setFullYear(n.getFullYear(),0,1),t.setHours(0,0,0,0),t}function bt(i,n){W(2,arguments);var t=ee(n);return wr(i,-t)}var kr=864e5;function Er(i){W(1,arguments);var n=F(i),t=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var r=n.getTime(),e=t-r;return Math.floor(e/kr)+1}function Oe(i){W(1,arguments);var n=1,t=F(i),r=t.getUTCDay(),e=(r=e.getTime()?t+1:n.getTime()>=a.getTime()?t:t-1}function _r(i){W(1,arguments);var n=Tt(i),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var r=Oe(t);return r}var Mr=6048e5;function Ct(i){W(1,arguments);var n=F(i),t=Oe(n).getTime()-_r(n).getTime();return Math.round(t/Mr)+1}function Ce(i,n){var t,r,e,o,a,s,c,v;W(1,arguments);var w=De(),m=ee((t=(r=(e=(o=n==null?void 0:n.weekStartsOn)!==null&&o!==void 0?o:n==null||(a=n.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&e!==void 0?e:w.weekStartsOn)!==null&&r!==void 0?r:(c=w.locale)===null||c===void 0||(v=c.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=F(i),b=p.getUTCDay(),U=(b=1&&b<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var U=new Date(0);U.setUTCFullYear(m+1,0,b),U.setUTCHours(0,0,0,0);var X=Ce(U,n),Q=new Date(0);Q.setUTCFullYear(m,0,b),Q.setUTCHours(0,0,0,0);var I=Ce(Q,n);return w.getTime()>=X.getTime()?m+1:w.getTime()>=I.getTime()?m:m-1}function Rr(i,n){var t,r,e,o,a,s,c,v;W(1,arguments);var w=De(),m=ee((t=(r=(e=(o=n==null?void 0:n.firstWeekContainsDate)!==null&&o!==void 0?o:n==null||(a=n.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&e!==void 0?e:w.firstWeekContainsDate)!==null&&r!==void 0?r:(c=w.locale)===null||c===void 0||(v=c.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&t!==void 0?t:1),p=nt(i,n),b=new Date(0);b.setUTCFullYear(p,0,m),b.setUTCHours(0,0,0,0);var U=Ce(b,n);return U}var Ur=6048e5;function xt(i,n){W(1,arguments);var t=F(i),r=Ce(t,n).getTime()-Rr(t,n).getTime();return Math.round(r/Ur)+1}function M(i,n){for(var t=i<0?"-":"",r=Math.abs(i).toString();r.length0?r:1-r;return M(t==="yy"?e%100:e,t.length)},M:function(n,t){var r=n.getUTCMonth();return t==="M"?String(r+1):M(r+1,2)},d:function(n,t){return M(n.getUTCDate(),t.length)},a:function(n,t){var r=n.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(n,t){return M(n.getUTCHours()%12||12,t.length)},H:function(n,t){return M(n.getUTCHours(),t.length)},m:function(n,t){return M(n.getUTCMinutes(),t.length)},s:function(n,t){return M(n.getUTCSeconds(),t.length)},S:function(n,t){var r=t.length,e=n.getUTCMilliseconds(),o=Math.floor(e*Math.pow(10,r-3));return M(o,t.length)}};const ye=Yr;var ke={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wr={G:function(n,t,r){var e=n.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})}},y:function(n,t,r){if(t==="yo"){var e=n.getUTCFullYear(),o=e>0?e:1-e;return r.ordinalNumber(o,{unit:"year"})}return ye.y(n,t)},Y:function(n,t,r,e){var o=nt(n,e),a=o>0?o:1-o;if(t==="YY"){var s=a%100;return M(s,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):M(a,t.length)},R:function(n,t){var r=Tt(n);return M(r,t.length)},u:function(n,t){var r=n.getUTCFullYear();return M(r,t.length)},Q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"Q":return String(e);case"QQ":return M(e,2);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"q":return String(e);case"qq":return M(e,2);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,t,r){var e=n.getUTCMonth();switch(t){case"M":case"MM":return ye.M(n,t);case"Mo":return r.ordinalNumber(e+1,{unit:"month"});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})}},L:function(n,t,r){var e=n.getUTCMonth();switch(t){case"L":return String(e+1);case"LL":return M(e+1,2);case"Lo":return r.ordinalNumber(e+1,{unit:"month"});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})}},w:function(n,t,r,e){var o=xt(n,e);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):M(o,t.length)},I:function(n,t,r){var e=Ct(n);return t==="Io"?r.ordinalNumber(e,{unit:"week"}):M(e,t.length)},d:function(n,t,r){return t==="do"?r.ordinalNumber(n.getUTCDate(),{unit:"date"}):ye.d(n,t)},D:function(n,t,r){var e=Er(n);return t==="Do"?r.ordinalNumber(e,{unit:"dayOfYear"}):M(e,t.length)},E:function(n,t,r){var e=n.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})}},e:function(n,t,r,e){var o=n.getUTCDay(),a=(o-e.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return M(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(n,t,r,e){var o=n.getUTCDay(),a=(o-e.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return M(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(n,t,r){var e=n.getUTCDay(),o=e===0?7:e;switch(t){case"i":return String(o);case"ii":return M(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(e,{width:"short",context:"formatting"});case"iiii":default:return r.day(e,{width:"wide",context:"formatting"})}},a:function(n,t,r){var e=n.getUTCHours(),o=e/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,t,r){var e=n.getUTCHours(),o;switch(e===12?o=ke.noon:e===0?o=ke.midnight:o=e/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,t,r){var e=n.getUTCHours(),o;switch(e>=17?o=ke.evening:e>=12?o=ke.afternoon:e>=4?o=ke.morning:o=ke.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,t,r){if(t==="ho"){var e=n.getUTCHours()%12;return e===0&&(e=12),r.ordinalNumber(e,{unit:"hour"})}return ye.h(n,t)},H:function(n,t,r){return t==="Ho"?r.ordinalNumber(n.getUTCHours(),{unit:"hour"}):ye.H(n,t)},K:function(n,t,r){var e=n.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(e,{unit:"hour"}):M(e,t.length)},k:function(n,t,r){var e=n.getUTCHours();return e===0&&(e=24),t==="ko"?r.ordinalNumber(e,{unit:"hour"}):M(e,t.length)},m:function(n,t,r){return t==="mo"?r.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):ye.m(n,t)},s:function(n,t,r){return t==="so"?r.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):ye.s(n,t)},S:function(n,t){return ye.S(n,t)},X:function(n,t,r,e){var o=e._originalDate||n,a=o.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Dt(a);case"XXXX":case"XX":return xe(a);case"XXXXX":case"XXX":default:return xe(a,":")}},x:function(n,t,r,e){var o=e._originalDate||n,a=o.getTimezoneOffset();switch(t){case"x":return Dt(a);case"xxxx":case"xx":return xe(a);case"xxxxx":case"xxx":default:return xe(a,":")}},O:function(n,t,r,e){var o=e._originalDate||n,a=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pt(a,":");case"OOOO":default:return"GMT"+xe(a,":")}},z:function(n,t,r,e){var o=e._originalDate||n,a=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pt(a,":");case"zzzz":default:return"GMT"+xe(a,":")}},t:function(n,t,r,e){var o=e._originalDate||n,a=Math.floor(o.getTime()/1e3);return M(a,t.length)},T:function(n,t,r,e){var o=e._originalDate||n,a=o.getTime();return M(a,t.length)}};function Pt(i,n){var t=i>0?"-":"+",r=Math.abs(i),e=Math.floor(r/60),o=r%60;if(o===0)return t+String(e);var a=n||"";return t+String(e)+a+M(o,2)}function Dt(i,n){if(i%60===0){var t=i>0?"-":"+";return t+M(Math.abs(i)/60,2)}return xe(i,n)}function xe(i,n){var t=n||"",r=i>0?"-":"+",e=Math.abs(i),o=M(Math.floor(e/60),2),a=M(e%60,2);return r+o+t+a}const Sr=Wr;var Ot=function(n,t){switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kt=function(n,t){switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jr=function(n,t){var r=n.match(/(P+)(p+)?/)||[],e=r[1],o=r[2];if(!o)return Ot(n,t);var a;switch(e){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ot(e,t)).replace("{{time}}",kt(o,t))},Ar={p:kt,P:jr};const at=Ar;var Nr=["D","DD"],Fr=["YY","YYYY"];function Et(i){return Nr.indexOf(i)!==-1}function _t(i){return Fr.indexOf(i)!==-1}function Ge(i,n,t){if(i==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(i==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Lr={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"}},Ir=function(n,t,r){var e,o=Lr[n];return typeof o=="string"?e=o:t===1?e=o.one:e=o.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+e:e+" ago":e};const Hr=Ir;function it(i){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.width?String(n.width):i.defaultWidth,r=i.formats[t]||i.formats[i.defaultWidth];return r}}var $r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Qr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Br={date:it({formats:$r,defaultWidth:"full"}),time:it({formats:qr,defaultWidth:"full"}),dateTime:it({formats:Qr,defaultWidth:"full"})};const Gr=Br;var Vr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xr=function(n,t,r,e){return Vr[n]};const zr=Xr;function Ae(i){return function(n,t){var r=t!=null&&t.context?String(t.context):"standalone",e;if(r==="formatting"&&i.formattingValues){var o=i.defaultFormattingWidth||i.defaultWidth,a=t!=null&&t.width?String(t.width):o;e=i.formattingValues[a]||i.formattingValues[o]}else{var s=i.defaultWidth,c=t!=null&&t.width?String(t.width):i.defaultWidth;e=i.values[c]||i.values[s]}var v=i.argumentCallback?i.argumentCallback(n):n;return e[v]}}var Jr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Zr={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"]},en={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"]},tn={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"}},rn={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"}},nn=function(n,t){var r=Number(n),e=r%100;if(e>20||e<10)switch(e%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},an={ordinalNumber:nn,era:Ae({values:Jr,defaultWidth:"wide"}),quarter:Ae({values:Kr,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:Ae({values:Zr,defaultWidth:"wide"}),day:Ae({values:en,defaultWidth:"wide"}),dayPeriod:Ae({values:tn,defaultWidth:"wide",formattingValues:rn,defaultFormattingWidth:"wide"})};const on=an;function Ne(i){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,e=r&&i.matchPatterns[r]||i.matchPatterns[i.defaultMatchWidth],o=n.match(e);if(!o)return null;var a=o[0],s=r&&i.parsePatterns[r]||i.parsePatterns[i.defaultParseWidth],c=Array.isArray(s)?sn(s,function(m){return m.test(a)}):un(s,function(m){return m.test(a)}),v;v=i.valueCallback?i.valueCallback(c):c,v=t.valueCallback?t.valueCallback(v):v;var w=n.slice(a.length);return{value:v,rest:w}}}function un(i,n){for(var t in i)if(i.hasOwnProperty(t)&&n(i[t]))return t}function sn(i,n){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:{},r=n.match(i.matchPattern);if(!r)return null;var e=r[0],o=n.match(i.parsePattern);if(!o)return null;var a=i.valueCallback?i.valueCallback(o[0]):o[0];a=t.valueCallback?t.valueCallback(a):a;var s=n.slice(e.length);return{value:a,rest:s}}}var cn=/^(\d+)(th|st|nd|rd)?/i,fn=/\d+/i,dn={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},vn={any:[/^b/i,/^(a|c)/i]},hn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},mn={any:[/1/i,/2/i,/3/i,/4/i]},wn={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},gn={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]},pn={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},yn={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]},bn={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},Tn={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}},Cn={ordinalNumber:ln({matchPattern:cn,parsePattern:fn,valueCallback:function(n){return parseInt(n,10)}}),era:Ne({matchPatterns:dn,defaultMatchWidth:"wide",parsePatterns:vn,defaultParseWidth:"any"}),quarter:Ne({matchPatterns:hn,defaultMatchWidth:"wide",parsePatterns:mn,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:Ne({matchPatterns:wn,defaultMatchWidth:"wide",parsePatterns:gn,defaultParseWidth:"any"}),day:Ne({matchPatterns:pn,defaultMatchWidth:"wide",parsePatterns:yn,defaultParseWidth:"any"}),dayPeriod:Ne({matchPatterns:bn,defaultMatchWidth:"any",parsePatterns:Tn,defaultParseWidth:"any"})},xn={code:"en-US",formatDistance:Hr,formatLong:Gr,formatRelative:zr,localize:on,match:Cn,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Mt=xn;var Pn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,On=/^'([^]*?)'?$/,kn=/''/g,En=/[a-zA-Z]/;function ot(i,n,t){var r,e,o,a,s,c,v,w,m,p,b,U,X,Q,I,R,ae,S;W(2,arguments);var B=String(n),H=De(),z=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:H.locale)!==null&&r!==void 0?r:Mt,ie=ee((o=(a=(s=(c=t==null?void 0:t.firstWeekContainsDate)!==null&&c!==void 0?c:t==null||(v=t.locale)===null||v===void 0||(w=v.options)===null||w===void 0?void 0:w.firstWeekContainsDate)!==null&&s!==void 0?s:H.firstWeekContainsDate)!==null&&a!==void 0?a:(m=H.locale)===null||m===void 0||(p=m.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(ie>=1&&ie<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var oe=ee((b=(U=(X=(Q=t==null?void 0:t.weekStartsOn)!==null&&Q!==void 0?Q:t==null||(I=t.locale)===null||I===void 0||(R=I.options)===null||R===void 0?void 0:R.weekStartsOn)!==null&&X!==void 0?X:H.weekStartsOn)!==null&&U!==void 0?U:(ae=H.locale)===null||ae===void 0||(S=ae.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&b!==void 0?b:0);if(!(oe>=0&&oe<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!z.localize)throw new RangeError("locale must contain localize property");if(!z.formatLong)throw new RangeError("locale must contain formatLong property");var se=F(i);if(!Cr(se))throw new RangeError("Invalid time value");var he=yt(se),le=bt(se,he),J={firstWeekContainsDate:ie,weekStartsOn:oe,locale:z,_originalDate:se},ue=B.match(Dn).map(function(A){var Z=A[0];if(Z==="p"||Z==="P"){var me=at[Z];return me(A,z.formatLong)}return A}).join("").match(Pn).map(function(A){if(A==="''")return"'";var Z=A[0];if(Z==="'")return _n(A);var me=Sr[Z];if(me)return!(t!=null&&t.useAdditionalWeekYearTokens)&&_t(A)&&Ge(A,n,String(i)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Et(A)&&Ge(A,n,String(i)),me(le,A,z.localize,J);if(Z.match(En))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Z+"`");return A}).join("");return ue}function _n(i){var n=i.match(On);return n?n[1].replace(kn,"'"):i}function Mn(i,n){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(i[t]=n[t]);return i}function Rt(i,n){(n==null||n>i.length)&&(n=i.length);for(var t=0,r=new Array(n);t=i.length?{done:!0}:{done:!1,value:i[r++]}},e:function(v){throw v},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){t=t.call(i)},n:function(){var v=t.next();return o=v.done,v},e:function(v){a=!0,s=v},f:function(){try{!o&&t.return!=null&&t.return()}finally{if(a)throw s}}}}function h(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function ut(i,n){return ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},ut(i,n)}function D(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),n&&ut(i,n)}function Ve(i){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ve(i)}function Un(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yn(i,n){if(n&&(we(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(i)}function O(i){var n=Un();return function(){var r=Ve(i),e;if(n){var o=Ve(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Yn(this,e)}}function C(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function Wn(i,n){if(we(i)!=="object"||i===null)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var r=t.call(i,n||"default");if(we(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(i)}function Yt(i){var n=Wn(i,"string");return we(n)==="symbol"?n:String(n)}function Wt(i,n){for(var t=0;t0,r=t?n:1-n,e;if(r<=50)e=i||100;else{var o=r+50,a=Math.floor(o/100)*100,s=i>=o%100;e=i+a-(s?100:0)}return t?e:1-e}function Nt(i){return i%400===0||i%4===0&&i%100!==0}var Fn=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a0}},{key:"set",value:function(e,o,a){var s=e.getUTCFullYear();if(a.isTwoDigitYear){var c=At(a.year,s);return e.setUTCFullYear(c,0,1),e.setUTCHours(0,0,0,0),e}var v=!("era"in o)||o.era===1?a.year:1-a.year;return e.setUTCFullYear(v,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(k),Ln=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a0}},{key:"set",value:function(e,o,a,s){var c=nt(e,s);if(a.isTwoDigitYear){var v=At(a.year,c);return e.setUTCFullYear(v,0,s.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Ce(e,s)}var w=!("era"in o)||o.era===1?a.year:1-a.year;return e.setUTCFullYear(w,0,s.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Ce(e,s)}}]),t}(k),In=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=4}},{key:"set",value:function(e,o,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(k),qn=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=4}},{key:"set",value:function(e,o,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(k),Qn=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=11}},{key:"set",value:function(e,o,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(k),Bn=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=11}},{key:"set",value:function(e,o,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(k);function Gn(i,n,t){W(2,arguments);var r=F(i),e=ee(n),o=xt(r,t)-e;return r.setUTCDate(r.getUTCDate()-o*7),r}var Vn=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=53}},{key:"set",value:function(e,o,a,s){return Ce(Gn(e,a,s),s)}}]),t}(k);function Xn(i,n){W(2,arguments);var t=F(i),r=ee(n),e=Ct(t)-r;return t.setUTCDate(t.getUTCDate()-e*7),t}var zn=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=53}},{key:"set",value:function(e,o,a){return Oe(Xn(e,a))}}]),t}(k),Jn=[31,28,31,30,31,30,31,31,30,31,30,31],Kn=[31,29,31,30,31,30,31,31,30,31,30,31],Zn=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=Kn[c]:o>=1&&o<=Jn[c]}},{key:"set",value:function(e,o,a){return e.setUTCDate(a),e.setUTCHours(0,0,0,0),e}}]),t}(k),ea=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(e,o,a){return e.setUTCMonth(0,a),e.setUTCHours(0,0,0,0),e}}]),t}(k);function lt(i,n,t){var r,e,o,a,s,c,v,w;W(2,arguments);var m=De(),p=ee((r=(e=(o=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:m.weekStartsOn)!==null&&e!==void 0?e:(v=m.locale)===null||v===void 0||(w=v.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var b=F(i),U=ee(n),X=b.getUTCDay(),Q=U%7,I=(Q+7)%7,R=(I=0&&o<=6}},{key:"set",value:function(e,o,a,s){return e=lt(e,a,s),e.setUTCHours(0,0,0,0),e}}]),t}(k),ra=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=6}},{key:"set",value:function(e,o,a,s){return e=lt(e,a,s),e.setUTCHours(0,0,0,0),e}}]),t}(k),na=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=6}},{key:"set",value:function(e,o,a,s){return e=lt(e,a,s),e.setUTCHours(0,0,0,0),e}}]),t}(k);function aa(i,n){W(2,arguments);var t=ee(n);t%7===0&&(t=t-7);var r=1,e=F(i),o=e.getUTCDay(),a=t%7,s=(a+7)%7,c=(s=1&&o<=7}},{key:"set",value:function(e,o,a){return e=aa(e,a),e.setUTCHours(0,0,0,0),e}}]),t}(k),oa=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=12}},{key:"set",value:function(e,o,a){var s=e.getUTCHours()>=12;return s&&a<12?e.setUTCHours(a+12,0,0,0):!s&&a===12?e.setUTCHours(0,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(k),ca=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=23}},{key:"set",value:function(e,o,a){return e.setUTCHours(a,0,0,0),e}}]),t}(k),fa=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=11}},{key:"set",value:function(e,o,a){var s=e.getUTCHours()>=12;return s&&a<12?e.setUTCHours(a+12,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(k),da=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&o<=24}},{key:"set",value:function(e,o,a){var s=a<=24?a%24:a;return e.setUTCHours(s,0,0,0),e}}]),t}(k),va=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=59}},{key:"set",value:function(e,o,a){return e.setUTCMinutes(a,0,0),e}}]),t}(k),ha=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=0&&o<=59}},{key:"set",value:function(e,o,a){return e.setUTCSeconds(a,0),e}}]),t}(k),ma=function(i){D(t,i);var n=O(t);function t(){var r;C(this,t);for(var e=arguments.length,o=new Array(e),a=0;a=1&&se<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var he=ee((U=(X=(Q=(I=r==null?void 0:r.weekStartsOn)!==null&&I!==void 0?I:r==null||(R=r.locale)===null||R===void 0||(ae=R.options)===null||ae===void 0?void 0:ae.weekStartsOn)!==null&&Q!==void 0?Q:ie.weekStartsOn)!==null&&X!==void 0?X:(S=ie.locale)===null||S===void 0||(B=S.options)===null||B===void 0?void 0:B.weekStartsOn)!==null&&U!==void 0?U:0);if(!(he>=0&&he<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(z==="")return H===""?F(t):new Date(NaN);var le={firstWeekContainsDate:se,weekStartsOn:he,locale:oe},J=[new An],ue=z.match(Ca).map(function(N){var _=N[0];if(_ in at){var K=at[_];return K(N,oe.formatLong)}return N}).join("").match(Ta),A=[],Z=Ut(ue),me;try{var ze=function(){var _=me.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&_t(_)&&Ge(_,z,i),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Et(_)&&Ge(_,z,i);var K=_[0],Re=ba[K];if(Re){var $e=Re.incompatibleTokens;if(Array.isArray($e)){var Ze=A.find(function(Pe){return $e.includes(Pe.token)||Pe.token===K});if(Ze)throw new RangeError("The format string mustn't contain `".concat(Ze.fullToken,"` and `").concat(_,"` at the same time"))}else if(Re.incompatibleTokens==="*"&&A.length>0)throw new RangeError("The format string mustn't contain `".concat(_,"` and any other token at the same time"));A.push({token:K,fullToken:_});var qe=Re.run(H,_,oe.match,le);if(!qe)return{v:new Date(NaN)};J.push(qe.setter),H=qe.rest}else{if(K.match(Oa))throw new RangeError("Format string contains an unescaped latin alphabet character `"+K+"`");if(_==="''"?_="'":K==="'"&&(_=Ea(_)),H.indexOf(_)===0)H=H.slice(_.length);else return{v:new Date(NaN)}}};for(Z.s();!(me=Z.n()).done;){var Ie=ze();if(we(Ie)==="object")return Ie.v}}catch(N){Z.e(N)}finally{Z.f()}if(H.length>0&&Da.test(H))return new Date(NaN);var Je=J.map(function(N){return N.priority}).sort(function(N,_){return _-N}).filter(function(N,_,K){return K.indexOf(N)===_}).map(function(N){return J.filter(function(_){return _.priority===N}).sort(function(_,K){return K.subPriority-_.subPriority})}).map(function(N){return N[0]}),Ee=F(t);if(isNaN(Ee.getTime()))return new Date(NaN);var be=bt(Ee,yt(Ee)),He={},_e=Ut(Je),Ke;try{for(_e.s();!(Ke=_e.n()).done;){var Me=Ke.value;if(!Me.validate(be,le))return new Date(NaN);var Te=Me.set(be,He,le);Array.isArray(Te)?(be=Te[0],Mn(He,Te[1])):be=Te}}catch(N){_e.e(N)}finally{_e.f()}return be}function Ea(i){return i.match(xa)[1].replace(Pa,"'")}const _a={en:{mo:"Mo",tu:"Tu",we:"We",th:"Th",fr:"Fr",sa:"Sa",su:"Su"},ua:{mo:"Пн",tu:"Вт",we:"Ср",th:"Чт",fr:"Пт",sa:"Сб",su:"Нд"},de:{mo:"Mo",tu:"Di",we:"Mi",th:"Do",fr:"Fr",sa:"Sa",su:"So"},fr:{mo:"Lu",tu:"Ma",we:"Me",th:"Je",fr:"Ve",sa:"Sa",su:"Di"},it:{mo:"Lu",tu:"Ma",we:"Me",th:"Gi",fr:"Ve",sa:"Sa",su:"Do"},es:{mo:"Lu",tu:"Ma",we:"Mi",th:"Ju",fr:"Vi",sa:"Sa",su:"Do"},pl:{mo:"Po",tu:"Wt",we:"Sr",th:"Cz",fr:"Pi",sa:"So",su:"Ni"}},Ft={date:"yyyy-MM-dd"};function Lt(i){return i instanceof Date&&i.toString()==="Invalid Date"}function fe(i){const n=i.substring(0,10),t=ka(n,Ft.date,new Date);return Lt(t)?new Date(1970,0,1):t}function ne(i){return ot(i,Ft.date)}function It(i){const n=typeof i=="string"?fe(i):i;return ne(n)===ne(new Date)}function Ht(i){const n=fe(i);if(!n)return!1;const t=ot(n,"cccccc").toLowerCase();return t==="sa"||t==="su"}function Ma(i,n="day"){const t=typeof i=="string"?fe(i):i;switch(n){case"day":return ne(Be(t));case"month":return ne(Pr(t));case"year":return ne(Or(t));default:return ne(Be(t))}}function Ra(i,n="month"){const t=typeof i=="string"?fe(i):i;switch(n){case"month":return ne(xr(t));case"year":return ne(Dr(t));default:return ne(Be(t))}}function $t(i,n=1){const t=typeof i=="string"?fe(i):Be(i);return ne(mr(t,n))}function qt(i,n){if(!i||!n)return[];const t=fe(i),r=fe(n);if(t>r)return[];const e=[];let o=t;for(;o<=r;)e.push(ne(o)),o=fe($t(o,1));return e}function Qt(i){return fe(i).getDate()}function Bt(i,n){const t=fe(i);if(!t||ne(t)==="1970-01-01")return"??";const r=ot(t,"cccccc").toLowerCase();return n[r]||"??"}function Ua(i){const{start:n,end:t,locale:r}=i,e=[],o=qt(n,t);if(o.length===0)return e;for(const a of o)e.push({value:a,date:Qt(a),day:Bt(a,r),isWeekend:Ht(a),isToday:It(a)});return e}function Gt(i,n,t){return i===n?"start":i===t?"end":i>n&&io.start===a.start?0:o.start{},onClickCell:()=>{}},zt=re.createContext(Wa),Sa=({value:i,children:n})=>y.jsx(zt.Provider,{value:i,children:n}),ct=()=>re.useContext(zt);function ja(i={}){const n={...je["date.status"],...i["date.status"]?{...i["date.status"]}:{}};return{...je,...i,"date.status":n}}function Aa(i){const n=document.documentElement;for(const t of Object.entries(i)){const[r,e]=t;if(r==="date.status")continue;const o=`--rvg-${r.replace(".","-")}`;n.style.setProperty(o,e)}for(const t of Object.entries(i["date.status"])){const[r,e]=t,o=`--rvg-date-status-${r}`;n.style.setProperty(o,e)}}const ft={createTheme:ja,setVariables:Aa};function Jt(i){var n,t,r="";if(typeof i=="string"||typeof i=="number")r+=i;else if(typeof i=="object")if(Array.isArray(i))for(n=0;nre.useMemo(()=>{const e={start:i,end:n,locale:_a[t]};return Fe.createDaysRange(e)},[i,n,t]);function Na(){const{theme:i}=ct();return i||je}const Fa=({title:i,info:n})=>{const{start:t,end:r,locale:e="en",highlightToday:o,showInfo:a,selectedColumns:s}=ct(),c=Kt(t,r,e),v=(m,p)=>{const{isWeekend:b}=m,U=o&&m.isToday,X=Array.isArray(s)&&s.includes(m.value),Q=Le("rvg-cell",{weekend:b,today:U,selected:X});return y.jsx("td",{className:Q,"data-testid":`cell-${p}-${m.value}`,children:m[p]},m.value)},w=Le("rvg-title","rvg-fixed");return y.jsxs("thead",{"data-testid":"header",children:[y.jsxs("tr",{"data-testid":"row-days",children:[y.jsx("td",{rowSpan:2,className:w,"data-testid":"title",children:i}),a&&y.jsx("td",{rowSpan:2,className:"rvg-info","data-testid":"info",children:n}),c.map(m=>v(m,"day"))]}),y.jsx("tr",{"data-testid":"row-dates",children:c.map(m=>v(m,"date"))})]})},La=({topColor:i,bottomColor:n})=>y.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"intersection",children:[y.jsx("path",{d:"M10.5769 11.4231L3.41421 18.5858C2.15428 19.8457 0 18.9534 0 17.1716V2C0 0.89543 0.89543 0 2 0H17.1716C18.9534 0 19.8457 2.15428 18.5858 3.41421L10.5769 11.4231Z",fill:i}),y.jsx("path",{d:"M13.4231 13.5769L20.5858 6.41421C21.8457 5.15428 24 6.04662 24 7.82843V23C24 24.1046 23.1046 25 22 25H6.82843C5.04662 25 4.15428 22.8457 5.41421 21.5858L13.4231 13.5769Z",fill:n})]}),Ia=({topColor:i})=>y.jsx("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"single.full",children:y.jsx("rect",{width:"26",height:"26",rx:"2",fill:i})}),Ha=({topColor:i})=>y.jsx("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"single.start",children:y.jsx("path",{d:"M13.5 12.5L22.5858 3.41421C23.8457 2.15428 26 3.04662 26 4.82843V24C26 25.1046 25.1046 26 24 26H4.82843C3.04662 26 2.15428 23.8457 3.41421 22.5858L13.5 12.5Z",fill:i})}),$a=({topColor:i})=>y.jsx("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"single.end",children:y.jsx("path",{d:"M12.5 13.5L3.41421 22.5858C2.15428 23.8457 0 22.9534 0 21.1716V2C0 0.89543 0.895432 0 2 0H21.1716C22.9534 0 23.8457 2.15428 22.5858 3.41421L12.5 13.5Z",fill:i})}),qa=({topColor:i})=>y.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"single.disabled",children:[y.jsx("g",{clipPath:"url(#clip0_383_3078)",children:y.jsx("path",{d:"M17.7063 16.2938C18.0969 16.6844 18.0969 17.3172 17.7063 17.7079C17.5125 17.9032 17.2563 18 17 18C16.7437 18 16.4881 17.9024 16.2931 17.7071L13 14.4157L9.70719 17.7063C9.51188 17.9032 9.25594 18 9 18C8.74406 18 8.48844 17.9032 8.29297 17.7063C7.90234 17.3157 7.90234 16.6829 8.29297 16.2922L11.5867 12.9985L8.29297 9.7063C7.90234 9.31567 7.90234 8.68286 8.29297 8.29224C8.68359 7.90161 9.31641 7.90161 9.70703 8.29224L13 11.5875L16.2937 8.2938C16.6844 7.90317 17.3172 7.90317 17.7078 8.2938C18.0984 8.68442 18.0984 9.31724 17.7078 9.70786L14.4141 13.0016L17.7063 16.2938Z",fill:i})}),y.jsx("defs",{children:y.jsx("clipPath",{id:"clip0_383_3078",children:y.jsx("rect",{width:"10",height:"16",fill:"white",transform:"translate(8 5)"})})})]}),Zt=({topColor:i})=>y.jsx("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"single.free",children:y.jsx("rect",{width:"26",height:"26",rx:"2",fill:i})}),Qa={"single.free":Zt,"single.disabled":qa,"single.full":Ia,"single.start":Ha,"single.end":$a,intersection:La},Ba=({type:i,topColor:n,bottomColor:t})=>{const r=Qa[i]||Zt;return y.jsx(r,{topColor:n,bottomColor:t})};function Ga(i){const{id:n,title:t,info:r,periods:e,selected:o}=i,{start:a,end:s,locale:c="en",highlightToday:v,showInfo:w,selectedColumns:m,onClickTitle:p,onClickCell:b}=ct(),U=Na(),X=Kt(a,s,c),Q=re.useCallback(()=>{p&&p(n)},[n,p]),I=re.useCallback((B,H,z)=>()=>{b&&b({id:n,date:B,dayType:H,dayStatus:z})},[n,b]),R=B=>{const{isWeekend:H}=B,z=v&&B.isToday,ie=o||Array.isArray(m)&&m.includes(B.value),oe=Le("rvg-cell","rvg-clickable",{weekend:H,today:z,selected:ie}),se=Fe.getDayParams(B.value,e),{dayType:he,dayStatus:le}=se,J=U["date.status"][le[0]],ue=U["date.status"][le[1]];return y.jsx("td",{className:oe,onClick:I(B.value,he,le),"data-testid":`cell-${n}-${B.value}`,children:y.jsx("div",{className:"day",children:y.jsx(Ba,{type:he,topColor:J,bottomColor:ue})})},B.value)},ae=Le("rvg-title","rvg-clickable","rvg-fixed",{selected:o}),S=Le("rvg-info",{selected:o});return y.jsxs("tr",{"data-testid":`row-${n}`,children:[y.jsx("td",{className:ae,onClick:Q,"data-testid":`title-${n}`,children:t}),w&&y.jsx("td",{className:S,"data-testid":`info-${n}`,children:r}),X.map(B=>R(B))]})}function Va(i){const{start:n,end:t,title:r="Room",info:e="",highlightToday:o=!0,showInfo:a=!0,selectedColumns:s=[],selectedRows:c=[],data:v,theme:w,renderTitle:m,renderInfo:p,locale:b="en",onClickTitle:U=()=>{},onClickCell:X=()=>{}}=i,[Q,I]=re.useState(ft.createTheme(w));re.useEffect(()=>{const S=ft.createTheme(w);I(S),ft.setVariables(S)},[w]);const R={start:n,end:t,highlightToday:o,showInfo:a,selectedColumns:s,selectedRows:c,theme:Q,locale:b||"en",onClickTitle:U,onClickCell:X},ae=S=>{const B=Array.isArray(c)&&c.includes(S.id),H=m?m(S):S.title,z=p?p(S):S.info;return y.jsx(Ga,{id:S.id,title:H,info:z,periods:S.periods,selected:B},S.id)};return y.jsx(Sa,{value:R,children:y.jsx("div",{className:"rvg-wrapper","data-testid":"grid-wrapper",children:y.jsxs("table",{className:"rvg-table",children:[y.jsx(Fa,{title:r,info:e}),y.jsx("tbody",{children:v.map(S=>ae(S))})]})})})}const gi="";function Xa(i){return y.jsx(Va,{...i})}pe.ReservationGrid=Xa,pe.THEME=je,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})});