@influence-society-web/yuna-frontend 2.0.0 → 2.0.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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var Yd=Object.create;var Ma=Object.defineProperty;var $d=Object.getOwnPropertyDescriptor;var jd=Object.getOwnPropertyNames;var zd=Object.getPrototypeOf,Bd=Object.prototype.hasOwnProperty;var Ud=(n,t,e)=>t in n?Ma(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var Vd=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var qd=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jd(t))!Bd.call(n,i)&&i!==e&&Ma(n,i,{get:()=>t[i],enumerable:!(r=$d(t,i))||r.enumerable});return n};var Wd=(n,t,e)=>(e=n!=null?Yd(zd(n)):{},qd(t||!n||!n.__esModule?Ma(e,"default",{value:n,enumerable:!0}):e,n));var O=(n,t,e)=>(Ud(n,typeof t!="symbol"?t+"":t,e),e);var qc=Vd((qa,Wa)=>{(function(n,t){typeof qa=="object"&&typeof Wa<"u"?Wa.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.JSBI=t())})(qa,function(){"use strict";var n=Math.imul,t=Math.clz32;function e(N,Y){(Y==null||Y>N.length)&&(Y=N.length);for(var F=0,ee=Array(Y);F<Y;F++)ee[F]=N[F];return ee}function r(N){if(Array.isArray(N))return N}function i(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function o(N,Y,F){return Y=p(Y),B(N,T()?Reflect.construct(Y,F||[],p(N).constructor):Y.apply(N,F))}function a(N,Y){if(!(N instanceof Y))throw new TypeError("Cannot call a class as a function")}function s(N,Y,F){if(T())return Reflect.construct.apply(null,arguments);var ee=[null];ee.push.apply(ee,Y);var g=new(N.bind.apply(N,ee));return F&&K(g,F.prototype),g}function l(N,Y){for(var F,ee=0;ee<Y.length;ee++)F=Y[ee],F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(N,te(F.key),F)}function u(N,Y,F){return Y&&l(N.prototype,Y),F&&l(N,F),Object.defineProperty(N,"prototype",{writable:!1}),N}function h(N,Y){var F=typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(!F){if(Array.isArray(N)||(F=Me(N))||Y&&N&&typeof N.length=="number"){F&&(N=F);var ee=0,g=function(){};return{s:g,n:function(){return ee>=N.length?{done:!0}:{done:!1,value:N[ee++]}},e:function(v){throw v},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var A,c=!0,d=!1;return{s:function(){F=F.call(N)},n:function(){var v=F.next();return c=v.done,v},e:function(v){d=!0,A=v},f:function(){try{c||F.return==null||F.return()}finally{if(d)throw A}}}}function p(N){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Y){return Y.__proto__||Object.getPrototypeOf(Y)},p(N)}function y(N,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(Y&&Y.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),Y&&K(N,Y)}function E(N){try{return Function.toString.call(N).indexOf("[native code]")!==-1}catch{return typeof N=="function"}}function T(){try{var N=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(T=function(){return!!N})()}function C(N,Y){var F=N==null?null:typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(F!=null){var ee,g,A,c,d=[],v=!0,D=!1;try{if(A=(F=F.call(N)).next,Y===0){if(Object(F)!==F)return;v=!1}else for(;!(v=(ee=A.call(F)).done)&&(d.push(ee.value),d.length!==Y);v=!0);}catch(b){D=!0,g=b}finally{try{if(!v&&F.return!=null&&(c=F.return(),Object(c)!==c))return}finally{if(D)throw g}}return d}}function L(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(N,Y){if(Y&&(typeof Y=="object"||typeof Y=="function"))return Y;if(Y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(N)}function K(N,Y){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,ee){return F.__proto__=ee,F},K(N,Y)}function W(N,Y){return r(N)||C(N,Y)||Me(N,Y)||L()}function Q(N,Y){if(typeof N!="object"||!N)return N;var F=N[Symbol.toPrimitive];if(F!==void 0){var ee=F.call(N,Y||"default");if(typeof ee!="object")return ee;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)(N)}function te(N){var Y=Q(N,"string");return typeof Y=="symbol"?Y:Y+""}function oe(N){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},oe(N)}function Me(N,Y){if(N){if(typeof N=="string")return e(N,Y);var F={}.toString.call(N).slice(8,-1);return F==="Object"&&N.constructor&&(F=N.constructor.name),F==="Map"||F==="Set"?Array.from(N):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?e(N,Y):void 0}}function Ee(N){var Y=typeof Map=="function"?new Map:void 0;return Ee=function(F){function ee(){return s(F,arguments,p(this).constructor)}if(F===null||!E(F))return F;if(typeof F!="function")throw new TypeError("Super expression must either be null or a function");if(Y!==void 0){if(Y.has(F))return Y.get(F);Y.set(F,ee)}return ee.prototype=Object.create(F.prototype,{constructor:{value:ee,enumerable:!1,writable:!0,configurable:!0}}),K(ee,F)},Ee(N)}var ie=function(N){var Y=Math.abs,F=Math.max,ee=Math.floor;function g(A,c){var d;if(a(this,g),d=o(this,g,[A]),d.sign=c,Object.setPrototypeOf(d,g.prototype),A>g.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return d}return y(g,N),u(g,[{key:"toDebugString",value:function(){var c,d=["BigInt["],v=h(this);try{for(v.s();!(c=v.n()).done;){var D=c.value;d.push((D&&(D>>>0).toString(16))+", ")}}catch(b){v.e(b)}finally{v.f()}return d.push("]"),d.join("")}},{key:"toString",value:function(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:10;if(2>c||36<c)throw new RangeError("toString() radix argument must be between 2 and 36");return this.length===0?"0":c&c-1?g.__toStringGeneric(this,c,!1):g.__toStringBasePowerOfTwo(this,c)}},{key:"valueOf",value:function(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}},{key:"__copy",value:function(){for(var c=new g(this.length,this.sign),d=0;d<this.length;d++)c[d]=this[d];return c}},{key:"__trim",value:function(){for(var c=this.length,d=this[c-1];d===0;)c--,d=this[c-1],this.pop();return c===0&&(this.sign=!1),this}},{key:"__initializeDigits",value:function(){for(var c=0;c<this.length;c++)this[c]=0}},{key:"__clzmsd",value:function(){return g.__clz30(this.__digit(this.length-1))}},{key:"__inplaceMultiplyAdd",value:function(c,d,v){v>this.length&&(v=this.length);for(var D=32767&c,b=c>>>15,_=0,I=d,k=0;k<v;k++){var H=this.__digit(k),R=32767&H,V=H>>>15,J=g.__imul(R,D),U=g.__imul(R,b),j=g.__imul(V,D),re=g.__imul(V,b),le=I+J+_;_=le>>>30,le&=1073741823,le+=((32767&U)<<15)+((32767&j)<<15),_+=le>>>30,I=re+(U>>>15)+(j>>>15),this.__setDigit(k,1073741823&le)}if(_!==0||I!==0)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(c,d,v){for(var D,b=0,_=0;_<v;_++)D=this.__halfDigit(d+_)+c.__halfDigit(_)+b,b=D>>>15,this.__setHalfDigit(d+_,32767&D);return b}},{key:"__inplaceSub",value:function(c,d,v){var D=v-1>>>1,b=0;if(1&d){d>>=1;for(var _=this.__digit(d),I=32767&_,k=0;k<D;k++){var H=c.__digit(k),R=(_>>>15)-(32767&H)-b;b=1&R>>>15,this.__setDigit(d+k,(32767&R)<<15|32767&I),_=this.__digit(d+k+1),I=(32767&_)-(H>>>15)-b,b=1&I>>>15}var V=c.__digit(k),J=(_>>>15)-(32767&V)-b;b=1&J>>>15,this.__setDigit(d+k,(32767&J)<<15|32767&I);var U=V>>>15;if(d+k+1>=this.length)throw new RangeError("out of bounds");!(1&v)&&(_=this.__digit(d+k+1),I=(32767&_)-U-b,b=1&I>>>15,this.__setDigit(d+c.length,1073709056&_|32767&I))}else{d>>=1;for(var j=0;j<c.length-1;j++){var re=this.__digit(d+j),le=c.__digit(j),fe=(32767&re)-(32767&le)-b;b=1&fe>>>15;var ve=(re>>>15)-(le>>>15)-b;b=1&ve>>>15,this.__setDigit(d+j,(32767&ve)<<15|32767&fe)}var Ce=this.__digit(d+j),je=c.__digit(j),Xe=(32767&Ce)-(32767&je)-b;b=1&Xe>>>15;var Bt=0;!(1&v)&&(Bt=(Ce>>>15)-(je>>>15)-b,b=1&Bt>>>15),this.__setDigit(d+j,(32767&Bt)<<15|32767&Xe)}return b}},{key:"__inplaceRightShift",value:function(c){if(c!==0){for(var d,v=this.__digit(0)>>>c,D=this.length-1,b=0;b<D;b++)d=this.__digit(b+1),this.__setDigit(b,1073741823&d<<30-c|v),v=d>>>c;this.__setDigit(D,v)}}},{key:"__digit",value:function(c){return this[c]}},{key:"__unsignedDigit",value:function(c){return this[c]>>>0}},{key:"__setDigit",value:function(c,d){this[c]=0|d}},{key:"__setDigitGrow",value:function(c,d){this[c]=0|d}},{key:"__halfDigitLength",value:function(){var c=this.length;return 32767>=this.__unsignedDigit(c-1)?2*c-1:2*c}},{key:"__halfDigit",value:function(c){return 32767&this[c>>>1]>>>15*(1&c)}},{key:"__setHalfDigit",value:function(c,d){var v=c>>>1,D=this.__digit(v),b=1&c?32767&D|d<<15:1073709056&D|32767&d;this.__setDigit(v,b)}}],[{key:"BigInt",value:function(c){var d=Number.isFinite;if(typeof c=="number"){if(c===0)return g.__zero();if(g.__isOneDigitInt(c))return 0>c?g.__oneDigit(-c,!0):g.__oneDigit(c,!1);if(!d(c)||ee(c)!==c)throw new RangeError("The number "+c+" cannot be converted to BigInt because it is not an integer");return g.__fromDouble(c)}if(typeof c=="string"){var v=g.__fromString(c);if(v===null)throw new SyntaxError("Cannot convert "+c+" to a BigInt");return v}if(typeof c=="boolean")return c===!0?g.__oneDigit(1,!1):g.__zero();if(oe(c)==="object"){if(c.constructor===g)return c;var D=g.__toPrimitive(c);return g.BigInt(D)}throw new TypeError("Cannot convert "+c+" to a BigInt")}},{key:"toNumber",value:function(c){var d=c.length;if(d===0)return 0;if(d===1){var v=c.__unsignedDigit(0);return c.sign?-v:v}var D=c.__digit(d-1),b=g.__clz30(D),_=30*d-b;if(1024<_)return c.sign?-1/0:1/0;var I=_-1,k=D,H=d-1,R=b+3,V=R===32?0:k<<R;V>>>=12;var J=R-12,U=12<=R?0:k<<20+R,j=20+R;for(0<J&&0<H&&(H--,k=c.__digit(H),V|=k>>>30-J,U=k<<J+2,j=J+2);0<j&&0<H;)H--,k=c.__digit(H),U|=30<=j?k<<j-30:k>>>30-j,j-=30;var re=g.__decideRounding(c,j,H,k);if((re===1||re===0&&(1&U)==1)&&(U=U+1>>>0,U===0&&(V++,V>>>20!=0&&(V=0,I++,1023<I))))return c.sign?-1/0:1/0;var le=c.sign?-2147483648:0;return I=I+1023<<20,g.__kBitConversionInts[g.__kBitConversionIntHigh]=le|I|V,g.__kBitConversionInts[g.__kBitConversionIntLow]=U,g.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(c){if(c.length===0)return c;var d=c.__copy();return d.sign=!c.sign,d}},{key:"bitwiseNot",value:function(c){return c.sign?g.__absoluteSubOne(c).__trim():g.__absoluteAddOne(c,!0)}},{key:"exponentiate",value:function(c,d){if(d.sign)throw new RangeError("Exponent must be positive");if(d.length===0)return g.__oneDigit(1,!1);if(c.length===0)return c;if(c.length===1&&c.__digit(0)===1)return c.sign&&!(1&d.__digit(0))?g.unaryMinus(c):c;if(1<d.length)throw new RangeError("BigInt too big");var v=d.__unsignedDigit(0);if(v===1)return c;if(v>=g.__kMaxLengthBits)throw new RangeError("BigInt too big");if(c.length===1&&c.__digit(0)===2){var D=1+(0|v/30),b=c.sign&&(1&v)!=0,_=new g(D,b);_.__initializeDigits();var I=1<<v%30;return _.__setDigit(D-1,I),_}var k=null,H=c;for(1&v&&(k=c),v>>=1;v!==0;v>>=1)H=g.multiply(H,H),1&v&&(k===null?k=H:k=g.multiply(k,H));return k}},{key:"multiply",value:function(c,d){if(c.length===0)return c;if(d.length===0)return d;var v=c.length+d.length;30<=c.__clzmsd()+d.__clzmsd()&&v--;var D=new g(v,c.sign!==d.sign);D.__initializeDigits();for(var b=0;b<c.length;b++)g.__multiplyAccumulate(d,c.__digit(b),D,b);return D.__trim()}},{key:"divide",value:function(c,d){if(d.length===0)throw new RangeError("Division by zero");if(0>g.__absoluteCompare(c,d))return g.__zero();var v,D=c.sign!==d.sign,b=d.__unsignedDigit(0);if(d.length===1&&32767>=b){if(b===1)return D===c.sign?c:g.unaryMinus(c);v=g.__absoluteDivSmall(c,b,null)}else v=g.__absoluteDivLarge(c,d,!0,!1);return v.sign=D,v.__trim()}},{key:"remainder",value:function(c,d){if(d.length===0)throw new RangeError("Division by zero");if(0>g.__absoluteCompare(c,d))return c;var v=d.__unsignedDigit(0);if(d.length===1&&32767>=v){if(v===1)return g.__zero();var D=g.__absoluteModSmall(c,v);return D===0?g.__zero():g.__oneDigit(D,c.sign)}var b=g.__absoluteDivLarge(c,d,!1,!0);return b.sign=c.sign,b.__trim()}},{key:"add",value:function(c,d){var v=c.sign;return v===d.sign?g.__absoluteAdd(c,d,v):0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,v):g.__absoluteSub(d,c,!v)}},{key:"subtract",value:function(c,d){var v=c.sign;return v===d.sign?0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,v):g.__absoluteSub(d,c,!v):g.__absoluteAdd(c,d,v)}},{key:"leftShift",value:function(c,d){return d.length===0||c.length===0?c:d.sign?g.__rightShiftByAbsolute(c,d):g.__leftShiftByAbsolute(c,d)}},{key:"signedRightShift",value:function(c,d){return d.length===0||c.length===0?c:d.sign?g.__leftShiftByAbsolute(c,d):g.__rightShiftByAbsolute(c,d)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(c,d){return 0>g.__compareToBigInt(c,d)}},{key:"lessThanOrEqual",value:function(c,d){return 0>=g.__compareToBigInt(c,d)}},{key:"greaterThan",value:function(c,d){return 0<g.__compareToBigInt(c,d)}},{key:"greaterThanOrEqual",value:function(c,d){return 0<=g.__compareToBigInt(c,d)}},{key:"equal",value:function(c,d){if(c.sign!==d.sign||c.length!==d.length)return!1;for(var v=0;v<c.length;v++)if(c.__digit(v)!==d.__digit(v))return!1;return!0}},{key:"notEqual",value:function(c,d){return!g.equal(c,d)}},{key:"bitwiseAnd",value:function(c,d){if(!c.sign&&!d.sign)return g.__absoluteAnd(c,d).__trim();if(c.sign&&d.sign){var v=F(c.length,d.length)+1,D=g.__absoluteSubOne(c,v),b=g.__absoluteSubOne(d);return D=g.__absoluteOr(D,b,D),g.__absoluteAddOne(D,!0,D).__trim()}if(c.sign){var _=[d,c];c=_[0],d=_[1]}return g.__absoluteAndNot(c,g.__absoluteSubOne(d)).__trim()}},{key:"bitwiseXor",value:function(c,d){if(!c.sign&&!d.sign)return g.__absoluteXor(c,d).__trim();if(c.sign&&d.sign){var v=F(c.length,d.length),D=g.__absoluteSubOne(c,v),b=g.__absoluteSubOne(d);return g.__absoluteXor(D,b,D).__trim()}var _=F(c.length,d.length)+1;if(c.sign){var I=[d,c];c=I[0],d=I[1]}var k=g.__absoluteSubOne(d,_);return k=g.__absoluteXor(k,c,k),g.__absoluteAddOne(k,!0,k).__trim()}},{key:"bitwiseOr",value:function(c,d){var v=F(c.length,d.length);if(!c.sign&&!d.sign)return g.__absoluteOr(c,d).__trim();if(c.sign&&d.sign){var D=g.__absoluteSubOne(c,v),b=g.__absoluteSubOne(d);return D=g.__absoluteAnd(D,b,D),g.__absoluteAddOne(D,!0,D).__trim()}if(c.sign){var _=[d,c];c=_[0],d=_[1]}var I=g.__absoluteSubOne(d,v);return I=g.__absoluteAndNot(I,c,I),g.__absoluteAddOne(I,!0,I).__trim()}},{key:"asIntN",value:function(c,d){if(d.length===0)return d;if(c=ee(c),0>c)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(c===0)return g.__zero();if(c>=g.__kMaxLengthBits)return d;var v=0|(c+29)/30;if(d.length<v)return d;var D=d.__unsignedDigit(v-1),b=1<<(c-1)%30;if(d.length===v&&D<b)return d;var _=(D&b)===b;if(!_)return g.__truncateToNBits(c,d);if(!d.sign)return g.__truncateAndSubFromPowerOfTwo(c,d,!0);if(!(D&b-1)){for(var I=v-2;0<=I;I--)if(d.__digit(I)!==0)return g.__truncateAndSubFromPowerOfTwo(c,d,!1);return d.length===v&&D===b?d:g.__truncateToNBits(c,d)}return g.__truncateAndSubFromPowerOfTwo(c,d,!1)}},{key:"asUintN",value:function(c,d){if(d.length===0)return d;if(c=ee(c),0>c)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(c===0)return g.__zero();if(d.sign){if(c>g.__kMaxLengthBits)throw new RangeError("BigInt too big");return g.__truncateAndSubFromPowerOfTwo(c,d,!1)}if(c>=g.__kMaxLengthBits)return d;var v=0|(c+29)/30;if(d.length<v)return d;var D=c%30;if(d.length==v){if(D===0)return d;var b=d.__digit(v-1);if(!(b>>>D))return d}return g.__truncateToNBits(c,d)}},{key:"ADD",value:function(c,d){if(c=g.__toPrimitive(c),d=g.__toPrimitive(d),typeof c=="string")return typeof d!="string"&&(d=d.toString()),c+d;if(typeof d=="string")return c.toString()+d;if(c=g.__toNumeric(c),d=g.__toNumeric(d),g.__isBigInt(c)&&g.__isBigInt(d))return g.add(c,d);if(typeof c=="number"&&typeof d=="number")return c+d;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(c,d){return g.__compare(c,d,0)}},{key:"LE",value:function(c,d){return g.__compare(c,d,1)}},{key:"GT",value:function(c,d){return g.__compare(c,d,2)}},{key:"GE",value:function(c,d){return g.__compare(c,d,3)}},{key:"EQ",value:function(c,d){for(;;){if(g.__isBigInt(c))return g.__isBigInt(d)?g.equal(c,d):g.EQ(d,c);if(typeof c=="number"){if(g.__isBigInt(d))return g.__equalToNumber(d,c);if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(typeof c=="string"){if(g.__isBigInt(d))return c=g.__fromString(c),c!==null&&g.equal(c,d);if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(typeof c=="boolean"){if(g.__isBigInt(d))return g.__equalToNumber(d,+c);if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(oe(c)==="symbol"){if(g.__isBigInt(d))return!1;if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(oe(c)==="object"){if(oe(d)==="object"&&d.constructor!==g)return c==d;c=g.__toPrimitive(c)}else return c==d}}},{key:"NE",value:function(c,d){return!g.EQ(c,d)}},{key:"DataViewGetBigInt64",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return g.asIntN(64,g.DataViewGetBigUint64(c,d,v))}},{key:"DataViewGetBigUint64",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0&&arguments[2],D=v?[4,0]:[0,4],b=W(D,2),_=b[0],I=b[1],k=c.getUint32(d+_,v),H=c.getUint32(d+I,v),R=new g(3,!1);return R.__setDigit(0,1073741823&H),R.__setDigit(1,(268435455&k)<<2|H>>>30),R.__setDigit(2,k>>>28),R.__trim()}},{key:"DataViewSetBigInt64",value:function(c,d,v){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];g.DataViewSetBigUint64(c,d,v,D)}},{key:"DataViewSetBigUint64",value:function(c,d,v){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];v=g.asUintN(64,v);var b=0,_=0;if(0<v.length&&(_=v.__digit(0),1<v.length)){var I=v.__digit(1);_|=I<<30,b=I>>>2,2<v.length&&(b|=v.__digit(2)<<28)}var k=D?[4,0]:[0,4],H=W(k,2),R=H[0],V=H[1];c.setUint32(d+R,b,D),c.setUint32(d+V,_,D)}},{key:"__zero",value:function(){return new g(0,!1)}},{key:"__oneDigit",value:function(c,d){var v=new g(1,d);return v.__setDigit(0,c),v}},{key:"__decideRounding",value:function(c,d,v,D){if(0<d)return-1;var b;if(0>d)b=-d-1;else{if(v===0)return-1;v--,D=c.__digit(v),b=29}var _=1<<b;if(!(D&_))return-1;if(_-=1,(D&_)!=0)return 1;for(;0<v;)if(v--,c.__digit(v)!==0)return 1;return 0}},{key:"__fromDouble",value:function(c){var d=0>c;g.__kBitConversionDouble[0]=c;var v,D=2047&g.__kBitConversionInts[g.__kBitConversionIntHigh]>>>20,b=D-1023,_=(0|b/30)+1,I=new g(_,d),k=1048576,H=1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh]|k,R=g.__kBitConversionInts[g.__kBitConversionIntLow],V=20,J=b%30,U=0;if(J<V){var j=V-J;U=j+32,v=H>>>j,H=H<<32-j|R>>>j,R<<=32-j}else if(J===V)U=32,v=H,H=R,R=0;else{var re=J-V;U=32-re,v=H<<re|R>>>32-re,H=R<<re,R=0}I.__setDigit(_-1,v);for(var le=_-2;0<=le;le--)0<U?(U-=30,v=H>>>2,H=H<<30|R>>>2,R<<=30):v=0,I.__setDigit(le,v);return I.__trim()}},{key:"__isWhitespace",value:function(c){return 13>=c&&9<=c||(159>=c?c==32:131071>=c?c==160||c==5760:196607>=c?(c&=131071,10>=c||c==40||c==41||c==47||c==95||c==4096):c==65279)}},{key:"__fromString",value:function(c){var d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,v=0,D=c.length,b=0;if(b===D)return g.__zero();for(var _=c.charCodeAt(b);g.__isWhitespace(_);){if(++b===D)return g.__zero();_=c.charCodeAt(b)}if(_===43){if(++b===D)return null;_=c.charCodeAt(b),v=1}else if(_===45){if(++b===D)return null;_=c.charCodeAt(b),v=-1}if(d===0){if(d=10,_===48){if(++b===D)return g.__zero();if(_=c.charCodeAt(b),_===88||_===120){if(d=16,++b===D)return null;_=c.charCodeAt(b)}else if(_===79||_===111){if(d=8,++b===D)return null;_=c.charCodeAt(b)}else if(_===66||_===98){if(d=2,++b===D)return null;_=c.charCodeAt(b)}}}else if(d===16&&_===48){if(++b===D)return g.__zero();if(_=c.charCodeAt(b),_===88||_===120){if(++b===D)return null;_=c.charCodeAt(b)}}if(v!==0&&d!==10)return null;for(;_===48;){if(++b===D)return g.__zero();_=c.charCodeAt(b)}var I=D-b,k=g.__kMaxBitsPerChar[d],H=g.__kBitsPerCharTableMultiplier-1;if(I>1073741824/k)return null;var R=k*I+H>>>g.__kBitsPerCharTableShift,V=0|(R+29)/30,J=new g(V,!1),U=10>d?d:10,j=10<d?d-10:0;if(d&d-1){J.__initializeDigits();var Xe=!1,Bt=0;do{for(var Wn,Pn=0,Ur=1;;){if(Wn=void 0,_-48>>>0<U)Wn=_-48;else if((32|_)-97>>>0<j)Wn=(32|_)-87;else{Xe=!0;break}var to=Ur*d;if(1073741823<to)break;if(Ur=to,Pn=Pn*d+Wn,Bt++,++b===D){Xe=!0;break}_=c.charCodeAt(b)}H=30*g.__kBitsPerCharTableMultiplier-1;var no=0|(k*Bt+H>>>g.__kBitsPerCharTableShift)/30;J.__inplaceMultiplyAdd(Ur,Pn,no)}while(!Xe)}else{k>>=g.__kBitsPerCharTableShift;var re=[],le=[],fe=!1;do{for(var ve,Ce=0,je=0;;){if(ve=void 0,_-48>>>0<U)ve=_-48;else if((32|_)-97>>>0<j)ve=(32|_)-87;else{fe=!0;break}if(je+=k,Ce=Ce<<k|ve,++b===D){fe=!0;break}if(_=c.charCodeAt(b),30<je+k)break}re.push(Ce),le.push(je)}while(!fe);g.__fillFromParts(J,re,le)}if(b!==D){if(!g.__isWhitespace(_))return null;for(b++;b<D;b++)if(_=c.charCodeAt(b),!g.__isWhitespace(_))return null}return J.sign=v===-1,J.__trim()}},{key:"__fillFromParts",value:function(c,d,v){for(var D=0,b=0,_=0,I=d.length-1;0<=I;I--){var k=d[I],H=v[I];b|=k<<_,_+=H,_===30?(c.__setDigit(D++,b),_=0,b=0):30<_&&(c.__setDigit(D++,1073741823&b),_-=30,b=k>>>H-_)}if(b!==0){if(D>=c.length)throw new Error("implementation bug");c.__setDigit(D++,b)}for(;D<c.length;D++)c.__setDigit(D,0)}},{key:"__toStringBasePowerOfTwo",value:function(c,d){var v=c.length,D=d-1;D=(85&D>>>1)+(85&D),D=(51&D>>>2)+(51&D),D=(15&D>>>4)+(15&D);var b=D,_=d-1,I=c.__digit(v-1),k=g.__clz30(I),H=30*v-k,R=0|(H+b-1)/b;if(c.sign&&R++,268435456<R)throw new Error("string too long");for(var V=Array(R),J=R-1,U=0,j=0,re=0;re<v-1;re++){var le=c.__digit(re),fe=(U|le<<j)&_;V[J--]=g.__kConversionChars[fe];var ve=b-j;for(U=le>>>ve,j=30-ve;j>=b;)V[J--]=g.__kConversionChars[U&_],U>>>=b,j-=b}var Ce=(U|I<<j)&_;for(V[J--]=g.__kConversionChars[Ce],U=I>>>b-j;U!==0;)V[J--]=g.__kConversionChars[U&_],U>>>=b;if(c.sign&&(V[J--]="-"),J!==-1)throw new Error("implementation bug");return V.join("")}},{key:"__toStringGeneric",value:function(c,d,v){var D=c.length;if(D===0)return"";if(D===1){var b=c.__unsignedDigit(0).toString(d);return v===!1&&c.sign&&(b="-"+b),b}var _=30*D-g.__clz30(c.__digit(D-1)),I=g.__kMaxBitsPerChar[d],k=I-1,H=_*g.__kBitsPerCharTableMultiplier;H+=k-1,H=0|H/k;var R,V,J=H+1>>1,U=g.exponentiate(g.__oneDigit(d,!1),g.__oneDigit(J,!1)),j=U.__unsignedDigit(0);if(U.length===1&&32767>=j){R=new g(c.length,!1),R.__initializeDigits();for(var re,le=0,fe=2*c.length-1;0<=fe;fe--)re=le<<15|c.__halfDigit(fe),R.__setHalfDigit(fe,0|re/j),le=0|re%j;V=le.toString(d)}else{var ve=g.__absoluteDivLarge(c,U,!0,!0);R=ve.quotient;var Ce=ve.remainder.__trim();V=g.__toStringGeneric(Ce,d,!0)}R.__trim();for(var je=g.__toStringGeneric(R,d,!0);V.length<J;)V="0"+V;return v===!1&&c.sign&&(je="-"+je),je+V}},{key:"__unequalSign",value:function(c){return c?-1:1}},{key:"__absoluteGreater",value:function(c){return c?-1:1}},{key:"__absoluteLess",value:function(c){return c?1:-1}},{key:"__compareToBigInt",value:function(c,d){var v=c.sign;if(v!==d.sign)return g.__unequalSign(v);var D=g.__absoluteCompare(c,d);return 0<D?g.__absoluteGreater(v):0>D?g.__absoluteLess(v):0}},{key:"__compareToNumber",value:function(c,d){if(g.__isOneDigitInt(d)){var v=c.sign,D=0>d;if(v!==D)return g.__unequalSign(v);if(c.length===0){if(D)throw new Error("implementation bug");return d===0?0:-1}if(1<c.length)return g.__absoluteGreater(v);var b=Y(d),_=c.__unsignedDigit(0);return _>b?g.__absoluteGreater(v):_<b?g.__absoluteLess(v):0}return g.__compareToDouble(c,d)}},{key:"__compareToDouble",value:function(c,d){if(d!==d)return d;if(d===1/0)return-1;if(d===-1/0)return 1;var v=c.sign,D=0>d;if(v!==D)return g.__unequalSign(v);if(d===0)throw new Error("implementation bug: should be handled elsewhere");if(c.length===0)return-1;g.__kBitConversionDouble[0]=d;var b=2047&g.__kBitConversionInts[g.__kBitConversionIntHigh]>>>20;if(b==2047)throw new Error("implementation bug: handled elsewhere");var _=b-1023;if(0>_)return g.__absoluteGreater(v);var I=c.length,k=c.__digit(I-1),H=g.__clz30(k),R=30*I-H,V=_+1;if(R<V)return g.__absoluteLess(v);if(R>V)return g.__absoluteGreater(v);var J=1048576,U=1048576|1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh],j=g.__kBitConversionInts[g.__kBitConversionIntLow],re=20,le=29-H;if(le!==(0|(R-1)%30))throw new Error("implementation bug");var fe,ve=0;if(le<re){var Ce=re-le;ve=Ce+32,fe=U>>>Ce,U=U<<32-Ce|j>>>Ce,j<<=32-Ce}else if(le===re)ve=32,fe=U,U=j,j=0;else{var je=le-re;ve=32-je,fe=U<<je|j>>>32-je,U=j<<je,j=0}if(k>>>=0,fe>>>=0,k>fe)return g.__absoluteGreater(v);if(k<fe)return g.__absoluteLess(v);for(var Xe=I-2;0<=Xe;Xe--){0<ve?(ve-=30,fe=U>>>2,U=U<<30|j>>>2,j<<=30):fe=0;var Bt=c.__unsignedDigit(Xe);if(Bt>fe)return g.__absoluteGreater(v);if(Bt<fe)return g.__absoluteLess(v)}if(U!==0||j!==0){if(ve===0)throw new Error("implementation bug");return g.__absoluteLess(v)}return 0}},{key:"__equalToNumber",value:function(c,d){return g.__isOneDigitInt(d)?d===0?c.length===0:c.length===1&&c.sign===0>d&&c.__unsignedDigit(0)===Y(d):g.__compareToDouble(c,d)===0}},{key:"__comparisonResultToBool",value:function(c,d){return d===0?0>c:d===1?0>=c:d===2?0<c:d===3?0<=c:void 0}},{key:"__compare",value:function(c,d,v){if(c=g.__toPrimitive(c),d=g.__toPrimitive(d),typeof c=="string"&&typeof d=="string")switch(v){case 0:return c<d;case 1:return c<=d;case 2:return c>d;case 3:return c>=d}if(g.__isBigInt(c)&&typeof d=="string")return d=g.__fromString(d),d!==null&&g.__comparisonResultToBool(g.__compareToBigInt(c,d),v);if(typeof c=="string"&&g.__isBigInt(d))return c=g.__fromString(c),c!==null&&g.__comparisonResultToBool(g.__compareToBigInt(c,d),v);if(c=g.__toNumeric(c),d=g.__toNumeric(d),g.__isBigInt(c)){if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToBigInt(c,d),v);if(typeof d!="number")throw new Error("implementation bug");return g.__comparisonResultToBool(g.__compareToNumber(c,d),v)}if(typeof c!="number")throw new Error("implementation bug");if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToNumber(d,c),2^v);if(typeof d!="number")throw new Error("implementation bug");return v===0?c<d:v===1?c<=d:v===2?c>d:v===3?c>=d:void 0}},{key:"__absoluteAdd",value:function(c,d,v){if(c.length<d.length)return g.__absoluteAdd(d,c,v);if(c.length===0)return c;if(d.length===0)return c.sign===v?c:g.unaryMinus(c);var D=c.length;(c.__clzmsd()===0||d.length===c.length&&d.__clzmsd()===0)&&D++;for(var b,_=new g(D,v),I=0,k=0;k<d.length;k++)b=c.__digit(k)+d.__digit(k)+I,I=b>>>30,_.__setDigit(k,1073741823&b);for(;k<c.length;k++){var H=c.__digit(k)+I;I=H>>>30,_.__setDigit(k,1073741823&H)}return k<_.length&&_.__setDigit(k,I),_.__trim()}},{key:"__absoluteSub",value:function(c,d,v){if(c.length===0)return c;if(d.length===0)return c.sign===v?c:g.unaryMinus(c);for(var D,b=new g(c.length,v),_=0,I=0;I<d.length;I++)D=c.__digit(I)-d.__digit(I)-_,_=1&D>>>30,b.__setDigit(I,1073741823&D);for(;I<c.length;I++){var k=c.__digit(I)-_;_=1&k>>>30,b.__setDigit(I,1073741823&k)}return b.__trim()}},{key:"__absoluteAddOne",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length;v===null?v=new g(D,d):v.sign=d;for(var b,_=1,I=0;I<D;I++)b=c.__digit(I)+_,_=b>>>30,v.__setDigit(I,1073741823&b);return _!==0&&v.__setDigitGrow(D,1),v}},{key:"__absoluteSubOne",value:function(c,d){var v=c.length;d=d||v;for(var D,b=new g(d,!1),_=1,I=0;I<v;I++)D=c.__digit(I)-_,_=1&D>>>30,b.__setDigit(I,1073741823&D);if(_!==0)throw new Error("implementation bug");for(var k=v;k<d;k++)b.__setDigit(k,0);return b}},{key:"__absoluteAnd",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,k=D;c=d,D=b,d=I,b=k}var H=_;v===null?v=new g(H,!1):H=v.length;for(var R=0;R<_;R++)v.__setDigit(R,c.__digit(R)&d.__digit(R));for(;R<H;R++)v.__setDigit(R,0);return v}},{key:"__absoluteAndNot",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;D<b&&(_=D);var I=D;v===null?v=new g(I,!1):I=v.length;for(var k=0;k<_;k++)v.__setDigit(k,c.__digit(k)&~d.__digit(k));for(;k<D;k++)v.__setDigit(k,c.__digit(k));for(;k<I;k++)v.__setDigit(k,0);return v}},{key:"__absoluteOr",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,k=D;c=d,D=b,d=I,b=k}var H=D;v===null?v=new g(H,!1):H=v.length;for(var R=0;R<_;R++)v.__setDigit(R,c.__digit(R)|d.__digit(R));for(;R<D;R++)v.__setDigit(R,c.__digit(R));for(;R<H;R++)v.__setDigit(R,0);return v}},{key:"__absoluteXor",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,k=D;c=d,D=b,d=I,b=k}var H=D;v===null?v=new g(H,!1):H=v.length;for(var R=0;R<_;R++)v.__setDigit(R,c.__digit(R)^d.__digit(R));for(;R<D;R++)v.__setDigit(R,c.__digit(R));for(;R<H;R++)v.__setDigit(R,0);return v}},{key:"__absoluteCompare",value:function(c,d){var v=c.length-d.length;if(v!=0)return v;for(var D=c.length-1;0<=D&&c.__digit(D)===d.__digit(D);)D--;return 0>D?0:c.__unsignedDigit(D)>d.__unsignedDigit(D)?1:-1}},{key:"__multiplyAccumulate",value:function(c,d,v,D){if(d!==0){for(var b=32767&d,_=d>>>15,I=0,k=0,H=0;H<c.length;H++,D++){var R=v.__digit(D),V=c.__digit(H),J=32767&V,U=V>>>15,j=g.__imul(J,b),re=g.__imul(J,_),le=g.__imul(U,b),fe=g.__imul(U,_);R+=k+j+I,I=R>>>30,R&=1073741823,R+=((32767&re)<<15)+((32767&le)<<15),I+=R>>>30,k=fe+(re>>>15)+(le>>>15),v.__setDigit(D,1073741823&R)}for(;I!==0||k!==0;D++){var ve=v.__digit(D);ve+=I+k,k=0,I=ve>>>30,v.__setDigit(D,1073741823&ve)}}}},{key:"__internalMultiplyAdd",value:function(c,d,v,D,b){for(var _=v,I=0,k=0;k<D;k++){var H=c.__digit(k),R=g.__imul(32767&H,d),V=g.__imul(H>>>15,d),J=R+((32767&V)<<15)+I+_;_=J>>>30,I=V>>>15,b.__setDigit(k,1073741823&J)}if(b.length>D)for(b.__setDigit(D++,_+I);D<b.length;)b.__setDigit(D++,0);else if(_+I!==0)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;v===null&&(v=new g(c.length,!1));for(var D=0,b=2*c.length-1;0<=b;b-=2){var _=(D<<15|c.__halfDigit(b))>>>0,I=0|_/d;D=0|_%d,_=(D<<15|c.__halfDigit(b-1))>>>0;var k=0|_/d;D=0|_%d,v.__setDigit(b>>>1,I<<15|k)}return v}},{key:"__absoluteModSmall",value:function(c,d){for(var v,D=0,b=2*c.length-1;0<=b;b--)v=(D<<15|c.__halfDigit(b))>>>0,D=0|v%d;return D}},{key:"__absoluteDivLarge",value:function(c,d,v,D){var b=d.__halfDigitLength(),_=d.length,I=c.__halfDigitLength()-b,k=null;v&&(k=new g(I+2>>>1,!1),k.__initializeDigits());var H=new g(b+2>>>1,!1);H.__initializeDigits();var R=g.__clz15(d.__halfDigit(b-1));0<R&&(d=g.__specialLeftShift(d,R,0));for(var V=g.__specialLeftShift(c,R,1),J=d.__halfDigit(b-1),U=0,j=I;0<=j;j--){var re=32767,le=V.__halfDigit(j+b);if(le!==J){var fe=(le<<15|V.__halfDigit(j+b-1))>>>0;re=0|fe/J;for(var ve=0|fe%J,Ce=d.__halfDigit(b-2),je=V.__halfDigit(j+b-2);g.__imul(re,Ce)>>>0>(ve<<16|je)>>>0&&(re--,ve+=J,!(32767<ve)););}g.__internalMultiplyAdd(d,re,0,_,H);var Xe=V.__inplaceSub(H,j,b+1);Xe!==0&&(Xe=V.__inplaceAdd(d,j,b),V.__setHalfDigit(j+b,32767&V.__halfDigit(j+b)+Xe),re--),v&&(1&j?U=re<<15:k.__setDigit(j>>>1,U|re))}if(D)return V.__inplaceRightShift(R),v?{quotient:k,remainder:V}:V;if(v)return k;throw new Error("unreachable")}},{key:"__clz15",value:function(c){return g.__clz30(c)-15}},{key:"__specialLeftShift",value:function(c,d,v){var D=c.length,b=D+v,_=new g(b,!1);if(d===0){for(var I=0;I<D;I++)_.__setDigit(I,c.__digit(I));return 0<v&&_.__setDigit(D,0),_}for(var k,H=0,R=0;R<D;R++)k=c.__digit(R),_.__setDigit(R,1073741823&k<<d|H),H=k>>>30-d;return 0<v&&_.__setDigit(D,H),_}},{key:"__leftShiftByAbsolute",value:function(c,d){var v=g.__toShiftAmount(d);if(0>v)throw new RangeError("BigInt too big");var D=0|v/30,b=v%30,_=c.length,I=b!==0&&c.__digit(_-1)>>>30-b!=0,k=_+D+(I?1:0),H=new g(k,c.sign);if(b===0){for(var R=0;R<D;R++)H.__setDigit(R,0);for(;R<k;R++)H.__setDigit(R,c.__digit(R-D))}else{for(var V=0,J=0;J<D;J++)H.__setDigit(J,0);for(var U,j=0;j<_;j++)U=c.__digit(j),H.__setDigit(j+D,1073741823&U<<b|V),V=U>>>30-b;if(I)H.__setDigit(_+D,V);else if(V!==0)throw new Error("implementation bug")}return H.__trim()}},{key:"__rightShiftByAbsolute",value:function(c,d){var v=c.length,D=c.sign,b=g.__toShiftAmount(d);if(0>b)return g.__rightShiftByMaximum(D);var _=0|b/30,I=b%30,k=v-_;if(0>=k)return g.__rightShiftByMaximum(D);var H=!1;if(D){var R=(1<<I)-1;if(c.__digit(_)&R)H=!0;else for(var V=0;V<_;V++)if(c.__digit(V)!==0){H=!0;break}}if(H&&I===0){var J=c.__digit(v-1),U=~J==0;U&&k++}var j=new g(k,D);if(I===0){j.__setDigit(k-1,0);for(var re=_;re<v;re++)j.__setDigit(re-_,c.__digit(re))}else{for(var le,fe=c.__digit(_)>>>I,ve=v-_-1,Ce=0;Ce<ve;Ce++)le=c.__digit(Ce+_+1),j.__setDigit(Ce,1073741823&le<<30-I|fe),fe=le>>>I;j.__setDigit(ve,fe)}return H&&(j=g.__absoluteAddOne(j,!0,j)),j.__trim()}},{key:"__rightShiftByMaximum",value:function(c){return c?g.__oneDigit(1,!0):g.__zero()}},{key:"__toShiftAmount",value:function(c){if(1<c.length)return-1;var d=c.__unsignedDigit(0);return d>g.__kMaxLengthBits?-1:d}},{key:"__toPrimitive",value:function(c){var d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"default";if(oe(c)!=="object"||c.constructor===g)return c;if(typeof Symbol<"u"&&oe(Symbol.toPrimitive)==="symbol"&&c[Symbol.toPrimitive]){var v=c[Symbol.toPrimitive](d);if(oe(v)!=="object")return v;throw new TypeError("Cannot convert object to primitive value")}var D=c.valueOf;if(D){var b=D.call(c);if(oe(b)!=="object")return b}var _=c.toString;if(_){var I=_.call(c);if(oe(I)!=="object")return I}throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function(c){return g.__isBigInt(c)?c:+c}},{key:"__isBigInt",value:function(c){return oe(c)==="object"&&c!==null&&c.constructor===g}},{key:"__truncateToNBits",value:function(c,d){for(var v=0|(c+29)/30,D=new g(v,d.sign),b=v-1,_=0;_<b;_++)D.__setDigit(_,d.__digit(_));var I=d.__digit(b);if(c%30!=0){var k=32-c%30;I=I<<k>>>k}return D.__setDigit(b,I),D.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(c,d,v){for(var D=Math.min,b,_=0|(c+29)/30,I=new g(_,v),k=0,H=_-1,R=0,V=D(H,d.length);k<V;k++)b=0-d.__digit(k)-R,R=1&b>>>30,I.__setDigit(k,1073741823&b);for(;k<H;k++)I.__setDigit(k,0|1073741823&-R);var J,U=H<d.length?d.__digit(H):0,j=c%30;if(j===0)J=0-U-R,J&=1073741823;else{var re=32-j;U=U<<re>>>re;var le=1<<32-re;J=le-U-R,J&=le-1}return I.__setDigit(H,J),I.__trim()}},{key:"__digitPow",value:function(c,d){for(var v=1;0<d;)1&d&&(v*=c),d>>>=1,c*=c;return v}},{key:"__detectBigEndian",value:function(){return g.__kBitConversionDouble[0]=-0,g.__kBitConversionInts[0]!==0}},{key:"__isOneDigitInt",value:function(c){return(1073741823&c)===c}}])}(Ee(Array));return ie.__kMaxLength=33554432,ie.__kMaxLengthBits=ie.__kMaxLength<<5,ie.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],ie.__kBitsPerCharTableShift=5,ie.__kBitsPerCharTableMultiplier=1<<ie.__kBitsPerCharTableShift,ie.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],ie.__kBitConversionBuffer=new ArrayBuffer(8),ie.__kBitConversionDouble=new Float64Array(ie.__kBitConversionBuffer),ie.__kBitConversionInts=new Int32Array(ie.__kBitConversionBuffer),ie.__kBitConversionIntHigh=ie.__detectBigEndian()?0:1,ie.__kBitConversionIntLow=ie.__detectBigEndian()?1:0,ie.__clz30=t?function(N){return t(N)-2}:function(N){var Y=Math.LN2,F=Math.log;return N===0?30:0|29-(0|F(N>>>0)/Y)},ie.__imul=n||function(N,Y){return 0|N*Y},ie})});var qr=()=>{};function Kn(n,t,e,r){return n?(n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)):qr}var Tc=n=>n instanceof HTMLInputElement;var Wr=n=>{let{value:t}=n;if(n.type==="checkbox"&&(t=n.checked.toString()),n.type==="radio"){let e=n.closest("form")?.querySelector(`input[name="${n.name}"]:checked`);t=Tc(e)?e.value:""}return t.toString()};var Sa=class{constructor(){O(this,"listeners",new Map)}on(t,e){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(e)}off(t,e){this.listeners.get(t)?.delete(e)}emit(t,e){this.listeners.get(t)?.forEach(r=>r(e))}},oo=new Sa;function ot(n,t){oo.emit(n,t)}function hn(n,t){Array.isArray(n)?n.forEach(e=>oo.on(e,t)):oo.on(n,t)}var Zn=()=>{let n=document.documentElement.lang.toLowerCase(),t={iso639:"fr",bcp47:"fr-FR"},r=Object.entries({en:{iso639:"en",bcp47:"en"},fr:{iso639:"fr",bcp47:"fr-FR"},de:{iso639:"de",bcp47:"de"},es:{iso639:"es",bcp47:"es"},it:{iso639:"it",bcp47:"it"},pt:{iso639:"pt",bcp47:"pt"},zh:{iso639:"zh",bcp47:"zh"},ar:{iso639:"ar",bcp47:"ar"},ru:{iso639:"ru",bcp47:"ru"}}).find(([i])=>n.startsWith(i))?.[1];return r&&(t=r),t},xn=Zn().bcp47,Gm=Zn().iso639;var Cc={en:{loading:"Loading...",night:"Night",chooseOption:"Choose an option",apartment:"Apartment",total:"In total",missingEnterpriseId:"Missing enterprise-ID",missingCategoryId:"Missing category-ID",minimumNights:"nights minimum",maximumNights:"nights maximum",booked:"Already Booked",select:"Select",fatalErrorMessage:"Oops! An unexpected error occurred. Please try reloading or contact support.",pleaseWait:"Please wait...","chargingMode:Once":"Once","chargingMode:PerTimeUnit":"Nightly","chargingMode:PerPersonPerTimeUnit":"Nightly per person",adults:"Adults",children:"Children (0-18 years old)",guestSingular:"Person",guestPlural:"People",couponValid:"Coupon is valid ;)",couponInvalid:"Coupon is invalid !",couponError:"Error validating coupon!",proceedToPayment:"Proceed to payment",completePayment:"Complete the payment",viewHotelPage:"View Site",pricingProducts:"Products:",pricingProductsAndExtras:"Products & Extras:",pricingTaxes:"Taxes:",pricingSubtotal:"Subtotal:",pricingService:"service"},"fr-FR":{loading:"Chargement...",night:"Nuit",chooseOption:"Choisir une option",apartment:"Appartement",total:"Au total",missingEnterpriseId:"ID d'entreprise manquant",missingCategoryId:"ID de cat\xE9gorie manquant",minimumNights:"nuits minimum",maximumNights:"nuits maximum",booked:"D\xE9j\xE0 r\xE9serv\xE9",select:"S\xE9lectionner",fatalErrorMessage:"Oups ! Une erreur inattendue s'est produite. Veuillez recharger la page ou contacter le support.",pleaseWait:"S'il vous pla\xEEt, attendez...","chargingMode:Once":"Une fois","chargingMode:PerTimeUnit":"Par nuit","chargingMode:PerPersonPerTimeUnit":"Par personne par nuit",adults:"Adultes",children:"Enfants (0-18 ans)",guestSingular:"Personne",guestPlural:"Personnes",couponValid:"Le coupon est valide ;)",couponInvalid:"Le coupon est invalide !",couponError:"Erreur lors de la validation du coupon !",proceedToPayment:"Proc\xE9der au paiement",completePayment:"Finalisez le paiement",viewHotelPage:"Voir le site",pricingProducts:"Produits :",pricingProductsAndExtras:"Produits et options :",pricingTaxes:"Taxes :",pricingSubtotal:"Sous-total :",pricingService:"service"},de:{loading:"Laden...",night:"Nacht",chooseOption:"Option ausw\xE4hlen",apartment:"Apartment",total:"Gesamt",missingEnterpriseId:"Unternehmens-ID fehlt",missingCategoryId:"Kategorie-ID fehlt",minimumNights:"Mindestn\xE4chte",maximumNights:"Maximale N\xE4chte",booked:"Bereits gebucht",select:"Ausw\xE4hlen",fatalErrorMessage:"Hoppla! Ein unerwarteter Fehler ist aufgetreten. Bitte laden Sie die Seite neu oder kontaktieren Sie den Support.",pleaseWait:"Bitte warten...","chargingMode:Once":"Einmal","chargingMode:PerTimeUnit":"Pro Nacht","chargingMode:PerPersonPerTimeUnit":"Pro Person und Nacht",adults:"Erwachsene",children:"Kinder (0-18 Jahre)",guestSingular:"Person",guestPlural:"Personen",couponValid:"Gutschein ist g\xFCltig ;)",couponInvalid:"Gutschein ist ung\xFCltig!",couponError:"Fehler bei der Gutscheinpr\xFCfung!",proceedToPayment:"Zur Zahlung fortfahren",completePayment:"Zahlung abschlie\xDFen",viewHotelPage:"Website ansehen",pricingProducts:"Produkte:",pricingProductsAndExtras:"Produkte & Extras:",pricingTaxes:"Steuern:",pricingSubtotal:"Zwischensumme:",pricingService:"Service"},es:{loading:"Cargando...",night:"Noche",chooseOption:"Elige una opci\xF3n",apartment:"Apartamento",total:"Total",missingEnterpriseId:"Falta el ID de empresa",missingCategoryId:"Falta el ID de categor\xEDa",minimumNights:"noches m\xEDnimas",maximumNights:"noches m\xE1ximas",booked:"Ya reservado",select:"Seleccionar",fatalErrorMessage:"\xA1Ups! Ha ocurrido un error inesperado. Por favor, recarga la p\xE1gina o contacta con soporte.",pleaseWait:"Por favor espera...","chargingMode:Once":"Una vez","chargingMode:PerTimeUnit":"Por noche","chargingMode:PerPersonPerTimeUnit":"Por persona y noche",adults:"Adultos",children:"Ni\xF1os (0-18 a\xF1os)",guestSingular:"Persona",guestPlural:"Personas",couponValid:"El cup\xF3n es v\xE1lido ;)",couponInvalid:"\xA1El cup\xF3n no es v\xE1lido!",couponError:"Error al validar el cup\xF3n!",proceedToPayment:"Ir al pago",completePayment:"Completar el pago",viewHotelPage:"Ver el sitio",pricingProducts:"Productos:",pricingProductsAndExtras:"Productos y extras:",pricingTaxes:"Impuestos:",pricingSubtotal:"Subtotal:",pricingService:"servicio"},it:{loading:"Caricamento...",night:"Notte",chooseOption:"Scegli un\u2019opzione",apartment:"Appartamento",total:"Totale",missingEnterpriseId:"ID azienda mancante",missingCategoryId:"ID categoria mancante",minimumNights:"notti minime",maximumNights:"notti massime",booked:"Gi\xE0 prenotato",select:"Seleziona",fatalErrorMessage:"Ops! Si \xE8 verificato un errore imprevisto. Ricarica la pagina o contatta il supporto.",pleaseWait:"Attendere prego...","chargingMode:Once":"Una volta","chargingMode:PerTimeUnit":"Per notte","chargingMode:PerPersonPerTimeUnit":"Per persona a notte",adults:"Adulti",children:"Bambini (0-18 anni)",guestSingular:"Persona",guestPlural:"Persone",couponValid:"Il coupon \xE8 valido ;)",couponInvalid:"Il coupon non \xE8 valido!",couponError:"Errore durante la verifica del coupon!",proceedToPayment:"Procedi al pagamento",completePayment:"Completa il pagamento",viewHotelPage:"Vedi il sito",pricingProducts:"Prodotti:",pricingProductsAndExtras:"Prodotti ed extra:",pricingTaxes:"Tasse:",pricingSubtotal:"Subtotale:",pricingService:"servizio"},pt:{loading:"A carregar...",night:"Noite",chooseOption:"Escolha uma op\xE7\xE3o",apartment:"Apartamento",total:"Total",missingEnterpriseId:"ID da empresa em falta",missingCategoryId:"ID da categoria em falta",minimumNights:"noites m\xEDnimas",maximumNights:"noites m\xE1ximas",booked:"J\xE1 reservado",select:"Selecionar",fatalErrorMessage:"Ops! Ocorreu um erro inesperado. Por favor, recarregue a p\xE1gina ou contacte o suporte.",pleaseWait:"Por favor, aguarde...","chargingMode:Once":"Uma vez","chargingMode:PerTimeUnit":"Por noite","chargingMode:PerPersonPerTimeUnit":"Por pessoa por noite",adults:"Adultos",children:"Crian\xE7as (0-18 anos)",guestSingular:"Pessoa",guestPlural:"Pessoas",couponValid:"O cup\xE3o \xE9 v\xE1lido ;)",couponInvalid:"O cup\xE3o \xE9 inv\xE1lido!",couponError:"Erro ao validar o cup\xE3o!",proceedToPayment:"Prosseguir para pagamento",completePayment:"Concluir pagamento",viewHotelPage:"Ver site",pricingProducts:"Produtos:",pricingProductsAndExtras:"Produtos e extras:",pricingTaxes:"Impostos:",pricingSubtotal:"Subtotal:",pricingService:"servi\xE7o"},zh:{loading:"\u52A0\u8F7D\u4E2D...",night:"\u665A",chooseOption:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879",apartment:"\u516C\u5BD3",total:"\u603B\u8BA1",missingEnterpriseId:"\u7F3A\u5C11\u4F01\u4E1AID",missingCategoryId:"\u7F3A\u5C11\u7C7B\u522BID",minimumNights:"\u6700\u5C11\u5165\u4F4F\u665A\u6570",maximumNights:"\u6700\u591A\u5165\u4F4F\u665A\u6570",booked:"\u5DF2\u9884\u8BA2",select:"\u9009\u62E9",fatalErrorMessage:"\u7CDF\u7CD5\uFF01\u53D1\u751F\u4E86\u610F\u5916\u9519\u8BEF\u3002\u8BF7\u5237\u65B0\u9875\u9762\u6216\u8054\u7CFB\u652F\u6301\u3002",pleaseWait:"\u8BF7\u7A0D\u5019...","chargingMode:Once":"\u4E00\u6B21","chargingMode:PerTimeUnit":"\u6BCF\u665A","chargingMode:PerPersonPerTimeUnit":"\u6BCF\u4EBA\u6BCF\u665A",adults:"\u6210\u4EBA",children:"\u513F\u7AE5\uFF080-18\u5C81\uFF09",guestSingular:"\u4EBA",guestPlural:"\u4EBA",couponValid:"\u4F18\u60E0\u5238\u6709\u6548 ;)",couponInvalid:"\u4F18\u60E0\u5238\u65E0\u6548\uFF01",couponError:"\u9A8C\u8BC1\u4F18\u60E0\u5238\u65F6\u51FA\u9519\uFF01",proceedToPayment:"\u524D\u5F80\u652F\u4ED8",completePayment:"\u5B8C\u6210\u652F\u4ED8",viewHotelPage:"\u67E5\u770B\u7F51\u7AD9",pricingProducts:"\u4EA7\u54C1\uFF1A",pricingProductsAndExtras:"\u4EA7\u54C1\u53CA\u9644\u52A0\u9879\uFF1A",pricingTaxes:"\u7A0E\u8D39\uFF1A",pricingSubtotal:"\u5C0F\u8BA1\uFF1A",pricingService:"\u670D\u52A1"},ar:{loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644...",night:"\u0644\u064A\u0644\u0629",chooseOption:"\u0627\u062E\u062A\u0631 \u062E\u064A\u0627\u0631\u064B\u0627",apartment:"\u0634\u0642\u0629",total:"\u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A",missingEnterpriseId:"\u0645\u0639\u0631\u0651\u0641 \u0627\u0644\u0634\u0631\u0643\u0629 \u0645\u0641\u0642\u0648\u062F",missingCategoryId:"\u0645\u0639\u0631\u0651\u0641 \u0627\u0644\u0641\u0626\u0629 \u0645\u0641\u0642\u0648\u062F",minimumNights:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 \u0644\u0639\u062F\u062F \u0627\u0644\u0644\u064A\u0627\u0644\u064A",maximumNights:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062F\u062F \u0627\u0644\u0644\u064A\u0627\u0644\u064A",booked:"\u0645\u062D\u062C\u0648\u0632 \u0628\u0627\u0644\u0641\u0639\u0644",select:"\u0627\u062E\u062A\u064A\u0627\u0631",fatalErrorMessage:"\u0639\u0630\u0631\u064B\u0627! \u062D\u062F\u062B \u062E\u0637\u0623 \u063A\u064A\u0631 \u0645\u062A\u0648\u0642\u0639. \u064A\u0631\u062C\u0649 \u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0635\u0641\u062D\u0629 \u0623\u0648 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062F\u0639\u0645.",pleaseWait:"\u064A\u0631\u062C\u0649 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631...","chargingMode:Once":"\u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629","chargingMode:PerTimeUnit":"\u0644\u0643\u0644 \u0644\u064A\u0644\u0629","chargingMode:PerPersonPerTimeUnit":"\u0644\u0643\u0644 \u0634\u062E\u0635 \u0641\u064A \u0627\u0644\u0644\u064A\u0644\u0629",adults:"\u0627\u0644\u0628\u0627\u0644\u063A\u0648\u0646",children:"\u0627\u0644\u0623\u0637\u0641\u0627\u0644 (0-18 \u0633\u0646\u0629)",guestSingular:"\u0634\u062E\u0635",guestPlural:"\u0623\u0634\u062E\u0627\u0635",couponValid:"\u0627\u0644\u0642\u0633\u064A\u0645\u0629 \u0635\u0627\u0644\u062D\u0629 ;)",couponInvalid:"\u0627\u0644\u0642\u0633\u064A\u0645\u0629 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629!",couponError:"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u0644\u0642\u0633\u064A\u0645\u0629!",proceedToPayment:"\u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0641\u0639",completePayment:"\u0625\u062A\u0645\u0627\u0645 \u0627\u0644\u062F\u0641\u0639",viewHotelPage:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0648\u0642\u0639",pricingProducts:"\u0627\u0644\u0645\u0646\u062A\u062C\u0627\u062A:",pricingProductsAndExtras:"\u0627\u0644\u0645\u0646\u062A\u062C\u0627\u062A \u0648\u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062A:",pricingTaxes:"\u0627\u0644\u0636\u0631\u0627\u0626\u0628:",pricingSubtotal:"\u0627\u0644\u0645\u062C\u0645\u0648\u0639 \u0627\u0644\u0641\u0631\u0639\u064A:",pricingService:"\u0627\u0644\u062E\u062F\u0645\u0629"},ru:{loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...",night:"\u041D\u043E\u0447\u044C",chooseOption:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442",apartment:"\u0410\u043F\u0430\u0440\u0442\u0430\u043C\u0435\u043D\u0442\u044B",total:"\u0418\u0442\u043E\u0433\u043E",missingEnterpriseId:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ID \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438",missingCategoryId:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ID \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438",minimumNights:"\u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043D\u043E\u0447\u0435\u0439",maximumNights:"\u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043D\u043E\u0447\u0435\u0439",booked:"\u0423\u0436\u0435 \u0437\u0430\u0431\u0440\u043E\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043E",select:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C",fatalErrorMessage:"\u0423\u043F\u0441! \u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439.",pleaseWait:"\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435...","chargingMode:Once":"\u041E\u0434\u0438\u043D \u0440\u0430\u0437","chargingMode:PerTimeUnit":"\u0417\u0430 \u043D\u043E\u0447\u044C","chargingMode:PerPersonPerTimeUnit":"\u0417\u0430 \u0447\u0435\u043B\u043E\u0432\u0435\u043A\u0430 \u0437\u0430 \u043D\u043E\u0447\u044C",adults:"\u0412\u0437\u0440\u043E\u0441\u043B\u044B\u0435",children:"\u0414\u0435\u0442\u0438 (0-18 \u043B\u0435\u0442)",guestSingular:"\u0427\u0435\u043B\u043E\u0432\u0435\u043A",guestPlural:"\u041B\u044E\u0434\u0438",couponValid:"\u041A\u0443\u043F\u043E\u043D \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D ;)",couponInvalid:"\u041A\u0443\u043F\u043E\u043D \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D!",couponError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043A\u0443\u043F\u043E\u043D\u0430!",proceedToPayment:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u043B\u0430\u0442\u0435",completePayment:"\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u043F\u043B\u0430\u0442\u0443",viewHotelPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0430\u0439\u0442",pricingProducts:"\u0422\u043E\u0432\u0430\u0440\u044B:",pricingProductsAndExtras:"\u0422\u043E\u0432\u0430\u0440\u044B \u0438 \u0434\u043E\u043F. \u0443\u0441\u043B\u0443\u0433\u0438:",pricingTaxes:"\u041D\u0430\u043B\u043E\u0433\u0438:",pricingSubtotal:"\u041F\u0440\u043E\u043C\u0435\u0436\u0443\u0442\u043E\u0447\u043D\u044B\u0439 \u0438\u0442\u043E\u0433:",pricingService:"\u0443\u0441\u043B\u0443\u0433\u0430"}},ka={en:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"fr-FR":["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],de:["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],es:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sept.","oct.","nov.","dic."],it:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],pt:["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],zh:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],ar:["\u064A\u0646\u0627\u064A\u0631","\u0641\u0628\u0631\u0627\u064A\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064A\u0644","\u0645\u0627\u064A\u0648","\u064A\u0648\u0646\u064A\u0648","\u064A\u0648\u0644\u064A\u0648","\u0623\u063A\u0633\u0637\u0633","\u0633\u0628\u062A\u0645\u0628\u0631","\u0623\u0643\u062A\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062F\u064A\u0633\u0645\u0628\u0631"],ru:["\u044F\u043D\u0432.","\u0444\u0435\u0432\u0440.","\u043C\u0430\u0440\u0442","\u0430\u043F\u0440.","\u043C\u0430\u0439","\u0438\u044E\u043D\u044C","\u0438\u044E\u043B\u044C","\u0430\u0432\u0433.","\u0441\u0435\u043D\u0442.","\u043E\u043A\u0442.","\u043D\u043E\u044F\u0431.","\u0434\u0435\u043A."]},Pc=()=>{let n=Zn().bcp47,t=n.split("-")[0],e=[n,t,"en"];for(let r of e)if(r in ka)return ka[r];return ka.en},Ic=(n,t)=>{for(let e of t){let r=n[e];if(typeof r=="string"&&r.trim()!=="")return r}},Kd=n=>{let t=[],e=o=>{o&&!t.includes(o)&&t.push(o)};e(n);let r=n.split("-")[0];return r&&r!==n&&e(r),({en:["en-US","en-GB"],es:["es-ES","es-MX","es-419"],de:["de-DE","de-AT","de-CH"],it:["it-IT","it-CH"],pt:["pt-PT","pt-BR"],zh:["zh-CN","zh-TW","zh-Hans","zh-Hant"],ar:["ar-SA","ar-EG"],ru:["ru-RU"],fr:["fr-FR","fr-CA","fr-BE","fr"]}[r]??[]).forEach(e),e("en-US"),e("en"),e("fr-FR"),e("fr"),t},mn=n=>Cc[Zn().bcp47][n]||Cc["fr-FR"][n],Nt=n=>{let t=Zn().bcp47,e=t.split("-")[0],r=Ic(n,Kd(t));if(r!==void 0)return r;if(e){let a=Object.entries(n).find(([s])=>s===e||s.startsWith(`${e}-`));if(a&&a[1].trim()!=="")return a[1]}let i=Ic(n,["en-US","en","fr-FR","fr"]);if(i!==void 0)return i;let o=Object.values(n).find(a=>typeof a=="string"&&a.trim()!=="");return o!==void 0?o:(console.warn(`Translation [${t}] not found and no fallback strings were available.`,n),"")};function Ta(n){let t=Object.create(null);for(let e of n.split(","))t[e]=1;return e=>e in t}var Ca=Object.assign;var Zd=Object.prototype.hasOwnProperty,ao=(n,t)=>Zd.call(n,t),Gn=Array.isArray,Kr=n=>xc(n)==="[object Map]";var Gd=n=>typeof n=="string",pr=n=>typeof n=="symbol",Zr=n=>n!==null&&typeof n=="object";var Jd=Object.prototype.toString,xc=n=>Jd.call(n),Rc=n=>xc(n).slice(8,-1);var so=n=>Gd(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n;var co=n=>{let t=Object.create(null);return e=>t[e]||(t[e]=n(e))},Xd=/-(\w)/g,tp=co(n=>n.replace(Xd,(t,e)=>e?e.toUpperCase():"")),Qd=/\B([A-Z])/g,np=co(n=>n.replace(Qd,"-$1").toLowerCase()),eh=co(n=>n.charAt(0).toUpperCase()+n.slice(1)),rp=co(n=>n?`on${eh(n)}`:""),Jn=(n,t)=>!Object.is(n,t);var th="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var ip=Ta(th+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var Ia;var Ie;var Pa=new WeakSet,ho=class{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ia&&Ia.active&&Ia.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Pa.has(this)&&(Pa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||nh(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ac(this),Oc(this);let t=Ie,e=Zt;Ie=this,Zt=!0;try{return this.fn()}finally{Fc(this),Ie=t,Zt=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ua(t);this.deps=this.depsTail=void 0,Ac(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Pa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Aa(this)&&this.run()}get dirty(){return Aa(this)}},Nc=0,Jr,Xr;function nh(n,t=!1){if(n.flags|=8,t){n.next=Xr,Xr=n;return}n.next=Jr,Jr=n}function za(){Nc++}function Ba(){if(--Nc>0)return;if(Xr){let t=Xr;for(Xr=void 0;t;){let e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Jr;){let t=Jr;for(Jr=void 0;t;){let e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){n||(n=r)}t=e}}if(n)throw n}function Oc(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fc(n){let t,e=n.depsTail,r=e;for(;r;){let i=r.prevDep;r.version===-1?(r===e&&(e=i),Ua(r),ih(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}n.deps=t,n.depsTail=e}function Aa(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(rh(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function rh(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===mo)||(n.globalVersion=mo,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Aa(n))))return;n.flags|=2;let t=n.dep,e=Ie,r=Zt;Ie=n,Zt=!0;try{Oc(n);let i=n.fn(n._value);(t.version===0||Jn(i,n._value))&&(n.flags|=128,n._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ie=e,Zt=r,Fc(n),n.flags&=-3}}function Ua(n,t=!1){let{dep:e,prevSub:r,nextSub:i}=n;if(r&&(r.nextSub=i,n.prevSub=void 0),i&&(i.prevSub=r,n.nextSub=void 0),e.subs===n&&(e.subs=r,!r&&e.computed)){e.computed.flags&=-5;for(let o=e.computed.deps;o;o=o.nextDep)Ua(o,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function ih(n){let{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}function Hc(n,t){n.effect instanceof ho&&(n=n.effect.fn);let e=new ho(n);t&&Ca(e,t);try{e.run()}catch(i){throw e.stop(),i}let r=e.run.bind(e);return r.effect=e,r}var Zt=!0,Yc=[];function oh(){Yc.push(Zt),Zt=!1}function ah(){let n=Yc.pop();Zt=n===void 0?!0:n}function Ac(n){let{cleanup:t}=n;if(n.cleanup=void 0,t){let e=Ie;Ie=void 0;try{t()}finally{Ie=e}}}var mo=0,La=class{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},po=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ie||!Zt||Ie===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==Ie)e=this.activeLink=new La(Ie,this),Ie.deps?(e.prevDep=Ie.depsTail,Ie.depsTail.nextDep=e,Ie.depsTail=e):Ie.deps=Ie.depsTail=e,$c(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){let r=e.nextDep;r.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=r),e.prevDep=Ie.depsTail,e.nextDep=void 0,Ie.depsTail.nextDep=e,Ie.depsTail=e,Ie.deps===e&&(Ie.deps=r)}return e}trigger(t){this.version++,mo++,this.notify(t)}notify(t){za();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ba()}}};function $c(n){if(n.dep.sc++,n.sub.flags&4){let t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)$c(r)}let e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),n.dep.subs=n}}var Na=new WeakMap,Xn=Symbol(""),Oa=Symbol(""),Qr=Symbol("");function Mt(n,t,e){if(Zt&&Ie){let r=Na.get(n);r||Na.set(n,r=new Map);let i=r.get(e);i||(r.set(e,i=new po),i.map=r,i.key=e),i.track()}}function Rn(n,t,e,r,i,o){let a=Na.get(n);if(!a){mo++;return}let s=l=>{l&&l.trigger()};if(za(),t==="clear")a.forEach(s);else{let l=Gn(n),u=l&&so(e);if(l&&e==="length"){let h=Number(r);a.forEach((p,y)=>{(y==="length"||y===Qr||!pr(y)&&y>=h)&&s(p)})}else switch((e!==void 0||a.has(void 0))&&s(a.get(e)),u&&s(a.get(Qr)),t){case"add":l?u&&s(a.get("length")):(s(a.get(Xn)),Kr(n)&&s(a.get(Oa)));break;case"delete":l||(s(a.get(Xn)),Kr(n)&&s(a.get(Oa)));break;case"set":Kr(n)&&s(a.get(Xn));break}}Ba()}function fr(n){let t=ke(n);return t===n?t:(Mt(t,"iterate",Qr),An(n)?t:t.map(at))}function Va(n){return Mt(n=ke(n),"iterate",Qr),n}var sh={__proto__:null,[Symbol.iterator](){return xa(this,Symbol.iterator,at)},concat(...n){return fr(this).concat(...n.map(t=>Gn(t)?fr(t):t))},entries(){return xa(this,"entries",n=>(n[1]=at(n[1]),n))},every(n,t){return pn(this,"every",n,t,void 0,arguments)},filter(n,t){return pn(this,"filter",n,t,e=>e.map(at),arguments)},find(n,t){return pn(this,"find",n,t,at,arguments)},findIndex(n,t){return pn(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return pn(this,"findLast",n,t,at,arguments)},findLastIndex(n,t){return pn(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return pn(this,"forEach",n,t,void 0,arguments)},includes(...n){return Ra(this,"includes",n)},indexOf(...n){return Ra(this,"indexOf",n)},join(n){return fr(this).join(n)},lastIndexOf(...n){return Ra(this,"lastIndexOf",n)},map(n,t){return pn(this,"map",n,t,void 0,arguments)},pop(){return Gr(this,"pop")},push(...n){return Gr(this,"push",n)},reduce(n,...t){return Lc(this,"reduce",n,t)},reduceRight(n,...t){return Lc(this,"reduceRight",n,t)},shift(){return Gr(this,"shift")},some(n,t){return pn(this,"some",n,t,void 0,arguments)},splice(...n){return Gr(this,"splice",n)},toReversed(){return fr(this).toReversed()},toSorted(n){return fr(this).toSorted(n)},toSpliced(...n){return fr(this).toSpliced(...n)},unshift(...n){return Gr(this,"unshift",n)},values(){return xa(this,"values",at)}};function xa(n,t,e){let r=Va(n),i=r[t]();return r!==n&&!An(n)&&(i._next=i.next,i.next=()=>{let o=i._next();return o.value&&(o.value=e(o.value)),o}),i}var ch=Array.prototype;function pn(n,t,e,r,i,o){let a=Va(n),s=a!==n&&!An(n),l=a[t];if(l!==ch[t]){let p=l.apply(n,o);return s?at(p):p}let u=e;a!==n&&(s?u=function(p,y){return e.call(this,at(p),y,n)}:e.length>2&&(u=function(p,y){return e.call(this,p,y,n)}));let h=l.call(a,u,r);return s&&i?i(h):h}function Lc(n,t,e,r){let i=Va(n),o=e;return i!==n&&(An(n)?e.length>3&&(o=function(a,s,l){return e.call(this,a,s,l,n)}):o=function(a,s,l){return e.call(this,a,at(s),l,n)}),i[t](o,...r)}function Ra(n,t,e){let r=ke(n);Mt(r,"iterate",Qr);let i=r[t](...e);return(i===-1||i===!1)&&Dh(e[0])?(e[0]=ke(e[0]),r[t](...e)):i}function Gr(n,t,e=[]){oh(),za();let r=ke(n)[t].apply(n,e);return Ba(),ah(),r}var lh=Ta("__proto__,__v_isRef,__isVue"),jc=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(pr));function uh(n){pr(n)||(n=String(n));let t=ke(this);return Mt(t,"has",n),t.hasOwnProperty(n)}var fo=class{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,r){if(e==="__v_skip")return t.__v_skip;let i=this._isReadonly,o=this._isShallow;if(e==="__v_isReactive")return!i;if(e==="__v_isReadonly")return i;if(e==="__v_isShallow")return o;if(e==="__v_raw")return r===(i?o?vh:Uc:o?yh:Bc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=Gn(t);if(!i){let l;if(a&&(l=sh[e]))return l;if(e==="hasOwnProperty")return uh}let s=Reflect.get(t,e,gr(t)?t:r);return(pr(e)?jc.has(e):lh(e))||(i||Mt(t,"get",e),o)?s:gr(s)?a&&so(e)?s:s.value:Zr(s)?i?go(s):vr(s):s}},Fa=class extends fo{constructor(t=!1){super(!1,t)}set(t,e,r,i){let o=t[e];if(!this._isShallow){let l=yr(o);if(!An(r)&&!yr(r)&&(o=ke(o),r=ke(r)),!Gn(t)&&gr(o)&&!gr(r))return l?!1:(o.value=r,!0)}let a=Gn(t)&&so(e)?Number(e)<t.length:ao(t,e),s=Reflect.set(t,e,r,gr(t)?t:i);return t===ke(i)&&(a?Jn(r,o)&&Rn(t,"set",e,r,o):Rn(t,"add",e,r)),s}deleteProperty(t,e){let r=ao(t,e),i=t[e],o=Reflect.deleteProperty(t,e);return o&&r&&Rn(t,"delete",e,void 0,i),o}has(t,e){let r=Reflect.has(t,e);return(!pr(e)||!jc.has(e))&&Mt(t,"has",e),r}ownKeys(t){return Mt(t,"iterate",Gn(t)?"length":Xn),Reflect.ownKeys(t)}},Ha=class extends fo{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}},dh=new Fa,hh=new Ha;var Ya=n=>n,lo=n=>Reflect.getPrototypeOf(n);function mh(n,t,e){return function(...r){let i=this.__v_raw,o=ke(i),a=Kr(o),s=n==="entries"||n===Symbol.iterator&&a,l=n==="keys"&&a,u=i[n](...r),h=e?Ya:t?$a:at;return!t&&Mt(o,"iterate",l?Oa:Xn),{next(){let{value:p,done:y}=u.next();return y?{value:p,done:y}:{value:s?[h(p[0]),h(p[1])]:h(p),done:y}},[Symbol.iterator](){return this}}}}function uo(n){return function(...t){return n==="delete"?!1:n==="clear"?void 0:this}}function ph(n,t){let e={get(i){let o=this.__v_raw,a=ke(o),s=ke(i);n||(Jn(i,s)&&Mt(a,"get",i),Mt(a,"get",s));let{has:l}=lo(a),u=t?Ya:n?$a:at;if(l.call(a,i))return u(o.get(i));if(l.call(a,s))return u(o.get(s));o!==a&&o.get(i)},get size(){let i=this.__v_raw;return!n&&Mt(ke(i),"iterate",Xn),Reflect.get(i,"size",i)},has(i){let o=this.__v_raw,a=ke(o),s=ke(i);return n||(Jn(i,s)&&Mt(a,"has",i),Mt(a,"has",s)),i===s?o.has(i):o.has(i)||o.has(s)},forEach(i,o){let a=this,s=a.__v_raw,l=ke(s),u=t?Ya:n?$a:at;return!n&&Mt(l,"iterate",Xn),s.forEach((h,p)=>i.call(o,u(h),u(p),a))}};return Ca(e,n?{add:uo("add"),set:uo("set"),delete:uo("delete"),clear:uo("clear")}:{add(i){!t&&!An(i)&&!yr(i)&&(i=ke(i));let o=ke(this);return lo(o).has.call(o,i)||(o.add(i),Rn(o,"add",i,i)),this},set(i,o){!t&&!An(o)&&!yr(o)&&(o=ke(o));let a=ke(this),{has:s,get:l}=lo(a),u=s.call(a,i);u||(i=ke(i),u=s.call(a,i));let h=l.call(a,i);return a.set(i,o),u?Jn(o,h)&&Rn(a,"set",i,o,h):Rn(a,"add",i,o),this},delete(i){let o=ke(this),{has:a,get:s}=lo(o),l=a.call(o,i);l||(i=ke(i),l=a.call(o,i));let u=s?s.call(o,i):void 0,h=o.delete(i);return l&&Rn(o,"delete",i,void 0,u),h},clear(){let i=ke(this),o=i.size!==0,a=void 0,s=i.clear();return o&&Rn(i,"clear",void 0,void 0,a),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=mh(i,n,t)}),e}function zc(n,t){let e=ph(n,t);return(r,i,o)=>i==="__v_isReactive"?!n:i==="__v_isReadonly"?n:i==="__v_raw"?r:Reflect.get(ao(e,i)&&i in r?e:r,i,o)}var fh={get:zc(!1,!1)};var gh={get:zc(!0,!1)};var Bc=new WeakMap,yh=new WeakMap,Uc=new WeakMap,vh=new WeakMap;function wh(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bh(n){return n.__v_skip||!Object.isExtensible(n)?0:wh(Rc(n))}function vr(n){return yr(n)?n:Vc(n,!1,dh,fh,Bc)}function go(n){return Vc(n,!0,hh,gh,Uc)}function Vc(n,t,e,r,i){if(!Zr(n)||n.__v_raw&&!(t&&n.__v_isReactive))return n;let o=bh(n);if(o===0)return n;let a=i.get(n);if(a)return a;let s=new Proxy(n,o===2?r:e);return i.set(n,s),s}function yr(n){return!!(n&&n.__v_isReadonly)}function An(n){return!!(n&&n.__v_isShallow)}function Dh(n){return n?!!n.__v_raw:!1}function ke(n){let t=n&&n.__v_raw;return t?ke(t):n}var at=n=>Zr(n)?vr(n):n,$a=n=>Zr(n)?go(n):n;function gr(n){return n?n.__v_isRef===!0:!1}function $e(n){return Eh(n,!1)}function Eh(n,t){return gr(n)?n:new ja(n,t)}var ja=class{constructor(t,e){this.dep=new po,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:ke(t),this._value=e?t:at(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){let e=this._rawValue,r=this.__v_isShallow||An(t)||yr(t);t=r?t:ke(t),Jn(t,e)&&(this._rawValue=t,this._value=r?t:at(t),this.dep.trigger())}};var S=Wd(qc(),1),Ht=S.default.BigInt(0),yi=S.default.BigInt(1),Ys=S.default.BigInt(2),_h=S.default.BigInt(10),Mh=S.default.BigInt(24),Sh=S.default.BigInt(60),kh=S.default.BigInt(1e3),Ni=S.default.BigInt(1e6),di=S.default.BigInt(1e9),Tl=S.default.multiply(S.default.BigInt(3600),di),Th=S.default.multiply(Sh,di),Yn=S.default.multiply(Tl,Mh);function gn(n){return typeof n=="bigint"?S.default.BigInt(n.toString(10)):n}function Cl(n){return S.default.equal(S.default.remainder(n,Ys),Ht)}function Qn(n){return S.default.lessThan(n,Ht)?S.default.unaryMinus(n):n}function wo(n,t){return S.default.lessThan(n,t)?-1:S.default.greaterThan(n,t)?1:0}function ri(n,t){return{quotient:S.default.divide(n,t),remainder:S.default.remainder(n,t)}}var Wc,Kc,se="slot-epochNanoSeconds",ce="slot-iso-date",Pe="slot-iso-date-time",Oe="slot-time",$="slot-calendar",Il="slot-date-brand",Pl="slot-year-month-brand",xl="slot-month-day-brand",De="slot-time-zone",ut="slot-years",dt="slot-months",St="slot-weeks",ht="slot-days",mt="slot-hours",pt="slot-minutes",ft="slot-seconds",gt="slot-milliseconds",yt="slot-microseconds",kt="slot-nanoseconds",Rl="date",Al="ym",Ll="md",Nl="time",Ol="datetime",Fl="instant",ur="original",Er="timezone-canonical",Qa="timezone-original",ii="calendar-id",Hl="locale",es="options",Yl=new WeakMap,ts=Symbol.for("@@Temporal__GetSlots");(Wc=globalThis)[ts]||(Wc[ts]=function(n){return Yl.get(n)});var No=globalThis[ts],ns=Symbol.for("@@Temporal__CreateSlots");(Kc=globalThis)[ns]||(Kc[ns]=function(n){Yl.set(n,Object.create(null))});var Tn=globalThis[ns];function Et(n,...t){if(!n||typeof n!="object")return!1;let e=No(n);return!!e&&t.every(r=>r in e)}function m(n,t){let e=No(n)?.[t];if(e===void 0)throw new TypeError(`Missing internal slot ${t}`);return e}function me(n,t,e){let r=No(n);if(r===void 0)throw new TypeError("Missing slots for the given container");if(r[t])throw new TypeError(`${t} already has set`);r[t]=e}var rs={};function Cn(n,t){Object.defineProperty(n.prototype,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0});let e=Object.getOwnPropertyNames(n);for(let i=0;i<e.length;i++){let o=e[i],a=Object.getOwnPropertyDescriptor(n,o);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n,o,a))}let r=Object.getOwnPropertyNames(n.prototype);for(let i=0;i<r.length;i++){let o=r[i],a=Object.getOwnPropertyDescriptor(n.prototype,o);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n.prototype,o,a))}is(t,n),is(`${t}.prototype`,n.prototype)}function is(n,t){let e=`%${n}%`;if(rs[e]!==void 0)throw new Error(`intrinsic ${n} already exists`);rs[e]=t}function Ge(n){return rs[n]}function Mr(n,t){let e=n;if(e===0)return{div:e,mod:e};let r=Math.sign(e);e=Math.abs(e);let i=Math.trunc(1+Math.log10(e));if(t>=i)return{div:0*r,mod:r*e};if(t===0)return{div:r*e,mod:0*r};let o=e.toPrecision(i);return{div:r*Number.parseInt(o.slice(0,i-t),10),mod:r*Number.parseInt(o.slice(i-t),10)}}function Ka(n,t,e){let r=n,i=e;if(r===0)return i;let o=Math.sign(r)||Math.sign(i);r=Math.abs(r),i=Math.abs(i);let a=r.toPrecision(Math.trunc(1+Math.log10(r)));if(i===0)return o*Number.parseInt(a+"0".repeat(t),10);let s=a+i.toPrecision(Math.trunc(1+Math.log10(i))).padStart(t,"0");return o*Number.parseInt(s,10)}function Oo(n,t){let e=t==="negative";switch(n){case"ceil":return e?"zero":"infinity";case"floor":return e?"infinity":"zero";case"expand":return"infinity";case"trunc":return"zero";case"halfCeil":return e?"half-zero":"half-infinity";case"halfFloor":return e?"half-infinity":"half-zero";case"halfExpand":return"half-infinity";case"halfTrunc":return"half-zero";case"halfEven":return"half-even"}}function Fo(n,t,e,r,i){return i==="zero"?n:i==="infinity"?t:e<0?n:e>0?t:i==="half-zero"?n:i==="half-infinity"?t:r?n:t}var _e=class n{constructor(t){this.totalNs=gn(t),this.sec=S.default.toNumber(S.default.divide(this.totalNs,di)),this.subsec=S.default.toNumber(S.default.remainder(this.totalNs,di))}static validateNew(t,e){if(S.default.greaterThan(Qn(t),n.MAX))throw new RangeError(`${e} of duration time units cannot exceed ${n.MAX} s`);return new n(t)}static fromEpochNsDiff(t,e){let r=S.default.subtract(gn(t),gn(e));return new n(r)}static fromComponents(t,e,r,i,o,a){let s=S.default.add(S.default.add(S.default.add(S.default.add(S.default.add(S.default.BigInt(a),S.default.multiply(S.default.BigInt(o),kh)),S.default.multiply(S.default.BigInt(i),Ni)),S.default.multiply(S.default.BigInt(r),di)),S.default.multiply(S.default.BigInt(e),Th)),S.default.multiply(S.default.BigInt(t),Tl));return n.validateNew(s,"total")}abs(){return new n(Qn(this.totalNs))}add(t){return n.validateNew(S.default.add(this.totalNs,t.totalNs),"sum")}add24HourDays(t){return n.validateNew(S.default.add(this.totalNs,S.default.multiply(S.default.BigInt(t),Yn)),"sum")}addToEpochNs(t){return S.default.add(gn(t),this.totalNs)}cmp(t){return wo(this.totalNs,t.totalNs)}divmod(t){let{quotient:e,remainder:r}=ri(this.totalNs,S.default.BigInt(t));return{quotient:S.default.toNumber(e),remainder:new n(r)}}fdiv(t){let e=gn(t),r=S.default.BigInt(e),{quotient:i,remainder:o}=ri(this.totalNs,r),a=[],s,l=(S.default.lessThan(this.totalNs,Ht)?-1:1)*Math.sign(S.default.toNumber(e));for(;!S.default.equal(o,Ht)&&a.length<50;)o=S.default.multiply(o,_h),{quotient:s,remainder:o}=ri(o,r),a.push(Math.abs(S.default.toNumber(s)));return l*+(Qn(i).toString()+"."+a.join(""))}isZero(){return S.default.equal(this.totalNs,Ht)}round(t,e){let r=gn(t);if(S.default.equal(r,yi))return this;let{quotient:i,remainder:o}=ri(this.totalNs,r),a=S.default.lessThan(this.totalNs,Ht)?"negative":"positive",s=S.default.multiply(Qn(i),r),l=S.default.add(s,r),u=wo(Qn(S.default.multiply(o,Ys)),r),h=Oo(e,a),p=S.default.equal(Qn(this.totalNs),s)?s:Fo(s,l,u,Cl(i),h),y=a==="positive"?p:S.default.unaryMinus(p);return n.validateNew(y,"rounding")}sign(){return this.cmp(new n(Ht))}subtract(t){return n.validateNew(S.default.subtract(this.totalNs,t.totalNs),"difference")}};_e.MAX=S.default.BigInt("9007199254740991999999999"),_e.ZERO=new _e(Ht);var Zc=/[A-Za-z._][A-Za-z._0-9+-]*/,Oi=new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${Zc.source})(?:\\/(?:${Zc.source}))*)`),$l=/(?:[+-]\d{6}|\d{4})/,bo=/(?:0[1-9]|1[0-2])/,os=/(?:0[1-9]|[12]\d|3[01])/,Ch=new RegExp(`(${$l.source})(?:-(${bo.source})-(${os.source})|(${bo.source})(${os.source}))`),jl=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,zl=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,Bl=new RegExp(`([zZ])|${zl.source}?`),Cr=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,Ih=new RegExp([`^${Ch.source}`,`(?:(?:[tT]|\\s+)${jl.source}(?:${Bl.source})?)?`,`(?:\\[!?(${Oi.source})\\])?`,`((?:${Cr.source})*)$`].join("")),Ph=new RegExp([`^[tT]?${jl.source}`,`(?:${Bl.source})?`,`(?:\\[!?${Oi.source}\\])?`,`((?:${Cr.source})*)$`].join("")),xh=new RegExp(`^(${$l.source})-?(${bo.source})(?:\\[!?${Oi.source}\\])?((?:${Cr.source})*)$`),Rh=new RegExp(`^(?:--)?(${bo.source})-?(${os.source})(?:\\[!?${Oi.source}\\])?((?:${Cr.source})*)$`),Za=/(\d+)(?:[.,](\d{1,9}))?/,Ah=new RegExp(`(?:${Za.source}H)?(?:${Za.source}M)?(?:${Za.source}S)?`),Lh=new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${Ah.source})?$`,"i"),$n=864e5,Do=1e6*$n,Nh=6e10,Ul=1e8*$n,Ir=Xt(Ul),vi=S.default.unaryMinus(Ir),Oh=S.default.add(S.default.subtract(vi,Yn),yi),Fh=S.default.subtract(S.default.add(Ir,Yn),yi),Hh=146097*$n,Gc=-271821,Jc=275760,hi=Date.UTC(1847,0,1),Yh=["iso8601","hebrew","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","islamicc","persian","ethiopic","ethioaa","ethiopic-amete-alem","coptic","chinese","dangi","roc","indian","buddhist","japanese","gregory"],$h=new Set(["ACT","AET","AGT","ART","AST","BET","BST","CAT","CNT","CST","CTT","EAT","ECT","IET","IST","JST","MIT","NET","NST","PLT","PNT","PRT","PST","SST","VST"]);function Fe(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Ho(n){if(typeof n=="bigint")throw new TypeError("Cannot convert BigInt to number");return Number(n)}function Yo(n){if(typeof n=="symbol")throw new TypeError("Cannot convert a Symbol value to a String");return String(n)}function ue(n){let t=Ho(n);if(t===0)return 0;if(Number.isNaN(t)||t===1/0||t===-1/0)throw new RangeError("invalid number value");let e=Math.trunc(t);return e===0?0:e}function Xc(n,t){let e=ue(n);if(e<=0)throw t!==void 0?new RangeError(`property '${t}' cannot be a a number less than one`):new RangeError("Cannot convert a number less than one to a positive integer");return e}function Gt(n){let t=Ho(n);if(Number.isNaN(t))throw new RangeError("not a number");if(t===1/0||t===-1/0)throw new RangeError("infinity is out of range");if(!function(e){if(typeof e!="number"||Number.isNaN(e)||e===1/0||e===-1/0)return!1;let r=Math.abs(e);return Math.floor(r)===r}(t))throw new RangeError(`unsupported fractional value ${n}`);return t===0?0:t}function wi(n,t){return String(n).padStart(t,"0")}function Be(n){if(typeof n!="string")throw new TypeError(`expected a string, not ${String(n)}`);return n}function as(n,t){if(Fe(n)){let e=n?.toString();if(typeof e=="string"||typeof e=="number")return e;throw new TypeError("Cannot convert object to primitive value")}return n}var ss=["era","eraYear","year","month","monthCode","day","hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],jh={era:Yo,eraYear:ue,year:ue,month:Xc,monthCode:function(n){let t=Be(as(n));if(t.length<3||t.length>4||t[0]!=="M"||"0123456789".indexOf(t[1])===-1||"0123456789".indexOf(t[2])===-1||t[1]+t[2]==="00"&&t[3]!=="L"||t[3]!=="L"&&t[3]!==void 0)throw new RangeError(`bad month code ${t}; must match M01-M99 or M00L-M99L`);return t},day:Xc,hour:ue,minute:ue,second:ue,millisecond:ue,microsecond:ue,nanosecond:ue,offset:function(n){let t=Be(as(n));return Hr(t),t},timeZone:bt},zh={hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},Pr=[["years","year","date"],["months","month","date"],["weeks","week","date"],["days","day","date"],["hours","hour","time"],["minutes","minute","time"],["seconds","second","time"],["milliseconds","millisecond","time"],["microseconds","microsecond","time"],["nanoseconds","nanosecond","time"]],Qc=Object.fromEntries(Pr.map(n=>[n[0],n[1]])),Bh=Object.fromEntries(Pr.map(([n,t])=>[t,n])),mi=Pr.map(([,n])=>n),xr={day:Do,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},Eo=["days","hours","microseconds","milliseconds","minutes","months","nanoseconds","seconds","weeks","years"],Uh=Intl.DateTimeFormat,el=new Map;function Vl(n){let t=Mi(n),e=el.get(t);return e===void 0&&(e=new Uh("en-us",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),el.set(t,e)),e}function We(n){return Et(n,se)&&!Et(n,De,$)}function Le(n){return Et(n,ut,dt,ht,mt,pt,ft,gt,yt,kt)}function Ne(n){return Et(n,Il)}function He(n){return Et(n,Oe)}function Te(n){return Et(n,Pe)}function Ke(n){return Et(n,Pl)}function Ft(n){return Et(n,xl)}function pe(n){return Et(n,se,De,$)}function P(n,t){if(!t(n))throw new TypeError("invalid receiver: method called with the wrong type of this-object")}function Nr(n){if(Et(n,$)||Et(n,De))throw new TypeError("with() does not support a calendar or timeZone property");if(He(n))throw new TypeError("with() does not accept Temporal.PlainTime, use withPlainTime() instead");if(n.calendar!==void 0)throw new TypeError("with() does not support a calendar property");if(n.timeZone!==void 0)throw new TypeError("with() does not support a timeZone property")}function Fi(n,t){return t==="never"||t==="auto"&&n==="iso8601"?"":`[${t==="critical"?"!":""}u-ca=${n}]`}function $o(n){let t,e,r=!1;for(Cr.lastIndex=0;e=Cr.exec(n);){let{1:i,2:o,3:a}=e;if(o==="u-ca"){if(t===void 0)t=a,r=i==="!";else if(i==="!"||r)throw new RangeError(`Invalid annotations in ${n}: more than one u-ca present with critical flag`)}else if(i==="!")throw new RangeError(`Unrecognized annotation: !${o}=${a}`)}return t}function un(n){let t=Ih.exec(n);if(!t)throw new RangeError(`invalid RFC 9557 string: ${n}`);let e=$o(t[16]),r=t[1];if(r==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);let i=+r,o=+(t[2]??t[4]??1),a=+(t[3]??t[5]??1),s=t[6]!==void 0,l=+(t[6]??0),u=+(t[7]??t[10]??0),h=+(t[8]??t[11]??0);h===60&&(h=59);let p=(t[9]??t[12]??"")+"000000000",y=+p.slice(0,3),E=+p.slice(3,6),T=+p.slice(6,9),C,L=!1;t[13]?(C=void 0,L=!0):t[14]&&(C=t[14]);let B=t[15];return Vs(i,o,a,l,u,h,y,E,T),{year:i,month:o,day:a,time:s?{hour:l,minute:u,second:h,millisecond:y,microsecond:E,nanosecond:T}:"start-of-day",tzAnnotation:B,offset:C,z:L,calendar:e}}function ql(n){let t=Ph.exec(n),e,r,i,o,a,s,l;if(t){l=$o(t[10]),e=+(t[1]??0),r=+(t[2]??t[5]??0),i=+(t[3]??t[6]??0),i===60&&(i=59);let u=(t[4]??t[7]??"")+"000000000";if(o=+u.slice(0,3),a=+u.slice(3,6),s=+u.slice(6,9),t[8])throw new RangeError("Z designator not supported for PlainTime")}else{let u,h;if({time:u,z:h,calendar:l}=un(n),u==="start-of-day")throw new RangeError(`time is missing in string: ${n}`);if(h)throw new RangeError("Z designator not supported for PlainTime");({hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s}=u)}if(Uo(e,r,i,o,a,s),/[tT ][0-9][0-9]/.test(n))return{hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s,calendar:l};try{let{month:u,day:h}=js(n);ir(1972,u,h)}catch{try{let{year:u,month:h}=$s(n);ir(u,h,1)}catch{return{hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s,calendar:l}}}throw new RangeError(`invalid RFC 9557 time-only string ${n}; may need a T prefix`)}function $s(n){let t=xh.exec(n),e,r,i,o;if(t){i=$o(t[3]);let a=t[1];if(a==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);if(e=+a,r=+t[2],o=1,i!==void 0&&i!=="iso8601")throw new RangeError("YYYY-MM format is only valid with iso8601 calendar")}else{let a;if({year:e,month:r,calendar:i,day:o,z:a}=un(n),a)throw new RangeError("Z designator not supported for PlainYearMonth")}return{year:e,month:r,calendar:i,referenceISODay:o}}function js(n){let t=Rh.exec(n),e,r,i,o;if(t){if(i=$o(t[3]),e=+t[1],r=+t[2],i!==void 0&&i!=="iso8601")throw new RangeError("MM-DD format is only valid with iso8601 calendar")}else{let a;if({month:e,day:r,calendar:i,year:o,z:a}=un(n),a)throw new RangeError("Z designator not supported for PlainMonthDay")}return{month:e,day:r,calendar:i,referenceISOYear:o}}var Wl=new RegExp(`^${Oi.source}$`,"i"),Kl=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);function Zl(n){let t=qh.test(n)?"Seconds not allowed in offset time zone":"Invalid time zone";throw new RangeError(`${t}: ${n}`)}function Hn(n){return Wl.test(n)||Zl(n),Kl.test(n)?{offsetMinutes:Hr(n)/6e10}:{tzName:n}}function pi(n,t,e,r){let i=n,o=t,a=e;switch(r){case"reject":ir(i,o,a);break;case"constrain":({year:i,month:o,day:a}=hu(i,o,a))}return{year:i,month:o,day:a}}function jo(n,t,e,r,i,o,a){let s=n,l=t,u=e,h=r,p=i,y=o;switch(a){case"reject":Uo(s,l,u,h,p,y);break;case"constrain":s=vt(s,0,23),l=vt(l,0,59),u=vt(u,0,59),h=vt(h,0,999),p=vt(p,0,999),y=vt(y,0,999)}return{hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y}}function Gl(n){if(!Fe(n))throw new TypeError("invalid duration-like");let t={years:void 0,months:void 0,weeks:void 0,days:void 0,hours:void 0,minutes:void 0,seconds:void 0,milliseconds:void 0,microseconds:void 0,nanoseconds:void 0},e=!1;for(let r=0;r<Eo.length;r++){let i=Eo[r],o=n[i];o!==void 0&&(e=!0,t[i]=Gt(o))}if(!e)throw new TypeError("invalid duration-like");return t}function et({years:n,months:t,weeks:e,days:r},i,o,a){return{years:n,months:a??t,weeks:o??e,days:i??r}}function we(n,t){return{isoDate:n,time:t}}function ye(n){return _n(n,"overflow",["constrain","reject"],"constrain")}function fi(n){return _n(n,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function Qt(n,t){return _n(n,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],t)}function vo(n,t){return _n(n,"offset",["prefer","use","ignore","reject"],t)}function Hi(n){return _n(n,"calendarName",["auto","always","never","critical"],"auto")}function Or(n){let t=n.roundingIncrement;if(t===void 0)return 1;let e=ue(t);if(e<1||e>1e9)throw new RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${t}`);return e}function Fr(n,t,e){let r=e?t:t-1;if(n>r)throw new RangeError(`roundingIncrement must be at least 1 and less than ${r}, not ${n}`);if(t%n!=0)throw new RangeError(`Rounding increment must divide evenly into ${t}`)}function Yi(n){let t=n.fractionalSecondDigits;if(t===void 0)return"auto";if(typeof t!="number"){if(Yo(t)!=="auto")throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return"auto"}let e=Math.floor(t);if(!Number.isFinite(e)||e<0||e>9)throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return e}function $i(n,t){switch(n){case"minute":return{precision:"minute",unit:"minute",increment:1};case"second":return{precision:0,unit:"second",increment:1};case"millisecond":return{precision:3,unit:"millisecond",increment:1};case"microsecond":return{precision:6,unit:"microsecond",increment:1};case"nanosecond":return{precision:9,unit:"nanosecond",increment:1}}switch(t){case"auto":return{precision:t,unit:"nanosecond",increment:1};case 0:return{precision:t,unit:"second",increment:1};case 1:case 2:case 3:return{precision:t,unit:"millisecond",increment:10**(3-t)};case 4:case 5:case 6:return{precision:t,unit:"microsecond",increment:10**(6-t)};case 7:case 8:case 9:return{precision:t,unit:"nanosecond",increment:10**(9-t)};default:throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`)}}var Sn=Symbol("~required~");function Ct(n,t,e,r,i=[]){let o=[];for(let u=0;u<Pr.length;u++){let h=Pr[u],p=h[1],y=h[2];e!=="datetime"&&e!==y||o.push(p)}o=o.concat(i);let a=r;a===Sn?a=void 0:a!==void 0&&o.push(a);let s=[];s=s.concat(o);for(let u=0;u<o.length;u++){let h=o[u],p=Bh[h];p!==void 0&&s.push(p)}let l=_n(n,t,s,a);if(l===void 0&&r===Sn)throw new RangeError(`${t} is required`);return l&&l in Qc?Qc[l]:l}function Ga(n){let t=n.relativeTo;if(t===void 0)return{};let e,r,i,o,a,s="option",l=!1;if(Fe(t)){if(pe(t))return{zonedRelativeTo:t};if(Ne(t))return{plainRelativeTo:t};if(Te(t))return{plainRelativeTo:wt(m(t,Pe).isoDate,m(t,$))};i=Vi(t);let u=zt(i,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],[]);({isoDate:e,time:r}=zi(i,u,"constrain")),{offset:a,timeZone:o}=u,a===void 0&&(s="wall")}else{let u,h,p,y,E;if({year:p,month:y,day:E,time:r,calendar:i,tzAnnotation:u,offset:a,z:h}=un(Be(t)),u)o=bt(u),h?s="exact":a||(s="wall"),l=!0;else if(h)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");i||(i="iso8601"),i=_t(i),e={year:p,month:y,day:E}}return o===void 0?{plainRelativeTo:wt(e,i)}:{zonedRelativeTo:Qe(_o(e,r,s,s==="option"?Hr(a):0,o,"compatible","reject",l),o,i)}}function yn(n){return m(n,ut)!==0?"year":m(n,dt)!==0?"month":m(n,St)!==0?"week":m(n,ht)!==0?"day":m(n,mt)!==0?"hour":m(n,pt)!==0?"minute":m(n,ft)!==0?"second":m(n,gt)!==0?"millisecond":m(n,yt)!==0?"microsecond":"nanosecond"}function Dn(n,t){return mi.indexOf(n)>mi.indexOf(t)?t:n}function nn(n){return n==="year"||n==="month"||n==="week"}function vn(n){return nn(n)||n==="day"?"date":"time"}function Bn(n){return Ge("%calendarImpl%")(n)}function ji(n){return Ge("%calendarImpl%")(m(n,$))}function Dt(n,t,e="date"){let r=Object.create(null),i=Bn(n).isoToDate(t,{year:!0,monthCode:!0,day:!0});return r.monthCode=i.monthCode,e!=="month-day"&&e!=="date"||(r.day=i.day),e!=="year-month"&&e!=="date"||(r.year=i.year),r}function zt(n,t,e,r,i){let o=Bn(n).extraFields(e),a=e.concat(r,o),s=Object.create(null),l=!1;a.sort();for(let u=0;u<a.length;u++){let h=a[u],p=t[h];if(p!==void 0)l=!0,s[h]=(0,jh[h])(p);else if(i!=="partial"){if(i.includes(h))throw new TypeError(`required property '${h}' missing or undefined`);s[h]=zh[h]}}if(i==="partial"&&!l)throw new TypeError("no supported properties found");return s}function cs(n,t="complete"){let e=["hour","microsecond","millisecond","minute","nanosecond","second"],r=!1,i=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o],s=n[a];s!==void 0?(i[a]=ue(s),r=!0):t==="complete"&&(i[a]=0)}if(!r)throw new TypeError("invalid time-like");return i}function oi(n,t){if(Fe(n)){if(Ne(n))return ye(X(t)),wt(m(n,ce),m(n,$));if(pe(n)){let l=Wt(m(n,De),m(n,se));return ye(X(t)),wt(l.isoDate,m(n,$))}if(Te(n))return ye(X(t)),wt(m(n,Pe).isoDate,m(n,$));let s=Vi(n);return wt(jn(s,zt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{year:e,month:r,day:i,calendar:o,z:a}=un(Be(n));if(a)throw new RangeError("Z designator not supported for PlainDate");return o||(o="iso8601"),o=_t(o),ye(X(t)),wt({year:e,month:r,day:i},o)}function zi(n,t,e){return we(jn(n,t,e),jo(t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond,e))}function ai(n,t){let e,r,i;if(Fe(n)){if(Te(n))return ye(X(t)),Ut(m(n,Pe),m(n,$));if(pe(n)){let s=Wt(m(n,De),m(n,se));return ye(X(t)),Ut(s,m(n,$))}if(Ne(n))return ye(X(t)),Ut(we(m(n,ce),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),m(n,$));i=Vi(n);let o=zt(i,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],[]),a=ye(X(t));({isoDate:e,time:r}=zi(i,o,a))}else{let o,a,s,l;if({year:a,month:s,day:l,time:r,calendar:i,z:o}=un(Be(n)),o)throw new RangeError("Z designator not supported for PlainDateTime");r==="start-of-day"&&(r={deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),Vs(a,s,l,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),i||(i="iso8601"),i=_t(i),ye(X(t)),e={year:a,month:s,day:l}}return Ut(we(e,r),i)}function qt(n){let t=Ge("%Temporal.Duration%");if(Le(n))return new t(m(n,ut),m(n,dt),m(n,St),m(n,ht),m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt));if(!Fe(n))return function(i){let{years:o,months:a,weeks:s,days:l,hours:u,minutes:h,seconds:p,milliseconds:y,microseconds:E,nanoseconds:T}=function(C){let L=Lh.exec(C);if(!L)throw new RangeError(`invalid duration: ${C}`);if(L.every((v,D)=>D<2||v===void 0))throw new RangeError(`invalid duration: ${C}`);let B=L[1]==="-"?-1:1,K=L[2]===void 0?0:ue(L[2])*B,W=L[3]===void 0?0:ue(L[3])*B,Q=L[4]===void 0?0:ue(L[4])*B,te=L[5]===void 0?0:ue(L[5])*B,oe=L[6]===void 0?0:ue(L[6])*B,Me=L[7],Ee=L[8],ie=L[9],N=L[10],Y=L[11],F=0,ee=0,g=0;if(Me!==void 0){if(Ee??ie??N??Y)throw new RangeError("only the smallest unit can be fractional");g=3600*ue((Me+"000000000").slice(0,9))*B}else if(F=Ee===void 0?0:ue(Ee)*B,ie!==void 0){if(N??Y)throw new RangeError("only the smallest unit can be fractional");g=60*ue((ie+"000000000").slice(0,9))*B}else ee=N===void 0?0:ue(N)*B,Y!==void 0&&(g=ue((Y+"000000000").slice(0,9))*B);let A=g%1e3,c=Math.trunc(g/1e3)%1e3,d=Math.trunc(g/1e6)%1e3;return ee+=Math.trunc(g/1e9)%60,F+=Math.trunc(g/6e10),Vo(K,W,Q,te,oe,F,ee,d,c,A),{years:K,months:W,weeks:Q,days:te,hours:oe,minutes:F,seconds:ee,milliseconds:d,microseconds:c,nanoseconds:A}}(i);return new(Ge("%Temporal.Duration%"))(o,a,s,l,u,h,p,y,E,T)}(Be(n));let e={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0},r=Gl(n);for(let i=0;i<Eo.length;i++){let o=Eo[i],a=r[o];a!==void 0&&(e[o]=a)}return new t(e.years,e.months,e.weeks,e.days,e.hours,e.minutes,e.seconds,e.milliseconds,e.microseconds,e.nanoseconds)}function si(n){let t;if(Fe(n)){if(We(n)||pe(n))return Jt(m(n,se));t=as(n)}else t=n;let{year:e,month:r,day:i,time:o,offset:a,z:s}=function(C){let L=un(C);if(!L.z&&!L.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return L}(Be(t)),{hour:l=0,minute:u=0,second:h=0,millisecond:p=0,microsecond:y=0,nanosecond:E=0}=o==="start-of-day"?{}:o,T=_i(e,r,i,l,u,h,p,y,E-(s?0:Hr(a)));return Tr(T.isoDate),Jt(Ze(T))}function tl(n,t){if(Fe(n)){if(Ft(n))return ye(X(t)),Sr(m(n,ce),m(n,$));let s;return Et(n,$)?s=m(n,$):(s=n.calendar,s===void 0&&(s="iso8601"),s=Ui(s)),Sr(Mo(s,zt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{month:e,day:r,referenceISOYear:i,calendar:o}=js(Be(n));if(o===void 0&&(o="iso8601"),o=_t(o),ye(X(t)),o==="iso8601")return Sr({year:1972,month:e,day:r},o);let a={year:i,month:e,day:r};return dr(a),a=Mo(o,Dt(o,a,"month-day"),"constrain"),Sr(a,o)}function On(n,t){let e;if(Fe(n)){if(He(n))return ye(X(t)),wn(m(n,Oe));if(Te(n))return ye(X(t)),wn(m(n,Pe).time);if(pe(n)){let u=Wt(m(n,De),m(n,se));return ye(X(t)),wn(u.time)}let{hour:r,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:l}=cs(n);e=jo(r,i,o,a,s,l,ye(X(t)))}else e=ql(Be(n)),ye(X(t));return wn(e)}function Jl(n){return n===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:m(On(n),Oe)}function ci(n,t){if(Fe(n)){if(Ke(n))return ye(X(t)),kr(m(n,ce),m(n,$));let s=Vi(n);return kr(bi(s,zt(s,n,["year","month","monthCode"],[],[]),ye(X(t))),s)}let{year:e,month:r,referenceISODay:i,calendar:o}=$s(Be(n));o===void 0&&(o="iso8601"),o=_t(o),ye(X(t));let a={year:e,month:r,day:i};return qs(a),a=bi(o,Dt(o,a,"year-month"),"constrain"),kr(a,o)}function _o(n,t,e,r,i,o,a,s){if(t==="start-of-day")return Ln(i,n);let l=we(n,t);if(e==="wall"||a==="ignore")return tt(i,l,o);if(e==="exact"||a==="use"){let p=_i(n.year,n.month,n.day,t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond-r);Tr(p.isoDate);let y=Ze(p);return cn(y),y}Tr(n);let u=Ze(l),h=Di(i,l);for(let p=0;p<h.length;p++){let y=h[p],E=S.default.toNumber(S.default.subtract(u,y)),T=Fn(E,6e10,"halfExpand");if(E===r||s&&T===r)return y}if(a==="reject"){let p=ls(r),y=Ei(l,"iso8601","auto");throw new RangeError(`Offset ${p} is invalid for ${y} in ${i}`)}return au(h,i,l,o)}function li(n,t){let e,r,i,o,a,s,l,u=!1,h="option";if(Fe(n)){if(pe(n)){let C=X(t);return fi(C),vo(C,"reject"),ye(C),Qe(m(n,se),m(n,De),m(n,$))}a=Vi(n);let y=zt(a,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],["timeZone"]);({offset:o,timeZone:i}=y),o===void 0&&(h="wall");let E=X(t);s=fi(E),l=vo(E,"reject");let T=ye(E);({isoDate:e,time:r}=zi(a,y,T))}else{let y,E,T,C,L;({year:T,month:C,day:L,time:r,tzAnnotation:y,offset:o,z:E,calendar:a}=function(K){let W=un(K);if(!W.tzAnnotation)throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");return W}(Be(n))),i=bt(y),E?h="exact":o||(h="wall"),a||(a="iso8601"),a=_t(a),u=!0;let B=X(t);s=fi(B),l=vo(B,"reject"),ye(B),e={year:T,month:C,day:L}}let p=0;return h==="option"&&(p=Hr(o)),Qe(_o(e,r,h,p,i,s,l,u),i,a)}function Xl(n,t,e){dr(t),Tn(n),me(n,ce,t),me(n,$,e),me(n,Il,!0)}function wt(n,t){let e=Ge("%Temporal.PlainDate%"),r=Object.create(e.prototype);return Xl(r,n,t),r}function Ql(n,t,e){or(t),Tn(n),me(n,Pe,t),me(n,$,e)}function Ut(n,t){let e=Ge("%Temporal.PlainDateTime%"),r=Object.create(e.prototype);return Ql(r,n,t),r}function eu(n,t,e){dr(t),Tn(n),me(n,ce,t),me(n,$,e),me(n,xl,!0)}function Sr(n,t){let e=Ge("%Temporal.PlainMonthDay%"),r=Object.create(e.prototype);return eu(r,n,t),r}function tu(n,t){Tn(n),me(n,Oe,t)}function wn(n){let t=Ge("%Temporal.PlainTime%"),e=Object.create(t.prototype);return tu(e,n),e}function nu(n,t,e){qs(t),Tn(n),me(n,ce,t),me(n,$,e),me(n,Pl,!0)}function kr(n,t){let e=Ge("%Temporal.PlainYearMonth%"),r=Object.create(e.prototype);return nu(r,n,t),r}function ru(n,t){cn(t),Tn(n),me(n,se,t)}function Jt(n){let t=Ge("%Temporal.Instant%"),e=Object.create(t.prototype);return ru(e,n),e}function iu(n,t,e,r){cn(t),Tn(n),me(n,se,t),me(n,De,e),me(n,$,r)}function Qe(n,t,e="iso8601"){let r=Ge("%Temporal.ZonedDateTime%"),i=Object.create(r.prototype);return iu(i,n,t,e),i}function nl(n){return ss.filter(t=>n[t]!==void 0)}function rr(n,t,e){let r=nl(e),i=Bn(n).fieldKeysToIgnore(r),o=Object.create(null),a=nl(t);for(let s=0;s<ss.length;s++){let l,u=ss[s];a.includes(u)&&!i.includes(u)&&(l=t[u]),r.includes(u)&&(l=e[u]),l!==void 0&&(o[u]=l)}return o}function $t(n,t,e,r){let i=Bn(n).dateAdd(t,e,r);return dr(i),i}function Bi(n,t,e,r){return Bn(n).dateUntil(t,e,r)}function Ui(n){if(Fe(n)&&Et(n,$))return m(n,$);let t=Be(n);try{return _t(t)}catch{}let e;try{({calendar:e}=un(t))}catch{try{({calendar:e}=ql(t))}catch{try{({calendar:e}=$s(t))}catch{({calendar:e}=js(t))}}}return e||(e="iso8601"),_t(e)}function Vi(n){if(Et(n,$))return m(n,$);let{calendar:t}=n;return t===void 0?"iso8601":Ui(t)}function sn(n,t){return _t(n)===_t(t)}function jn(n,t,e){let r=Bn(n);r.resolveFields(t,"date");let i=r.dateToISO(t,e);return dr(i),i}function bi(n,t,e){let r=Bn(n);r.resolveFields(t,"year-month"),t.day=1;let i=r.dateToISO(t,e);return qs(i),i}function Mo(n,t,e){let r=Bn(n);r.resolveFields(t,"month-day");let i=r.monthDayToISOReferenceDate(t,e);return dr(i),i}function bt(n){if(Fe(n)&&pe(n))return m(n,De);let t=Be(n);if(t==="UTC")return"UTC";let{tzName:e,offsetMinutes:r}=function(o){let{tzAnnotation:a,offset:s,z:l}=function(u){if(Wl.test(u))return{tzAnnotation:u,offset:void 0,z:!1};try{let{tzAnnotation:h,offset:p,z:y}=un(u);if(y||h||p)return{tzAnnotation:h,offset:p,z:y}}catch{}Zl(u)}(o);return a?Hn(a):l?Hn("UTC"):s?Hn(s):void 0}(t);if(r!==void 0)return zs(r);let i=So(e);if(!i)throw new RangeError(`Unrecognized time zone ${e}`);return i.identifier}function ou(n,t){if(n===t)return!0;let e=Hn(n).offsetMinutes,r=Hn(t).offsetMinutes;if(e===void 0&&r===void 0){let i=So(t);if(!i)return!1;let o=So(n);return!!o&&o.primaryIdentifier===i.primaryIdentifier}return e===r}function bn(n,t){let e=Hn(n).offsetMinutes;return e!==void 0?6e10*e:us(n,t)}function ls(n){let t=n<0?"-":"+",e=Math.abs(n),r=Math.floor(e/36e11),i=Math.floor(e/6e10)%60,o=Math.floor(e/1e9)%60,a=e%1e9;return`${t}${zo(r,i,o,a,o===0&&a===0?"minute":"auto")}`}function Wt(n,t){let e=bn(n,t),{isoDate:{year:r,month:i,day:o},time:{hour:a,minute:s,second:l,millisecond:u,microsecond:h,nanosecond:p}}=lu(t);return _i(r,i,o,a,s,l,u,h,p+e)}function tt(n,t,e){return au(Di(n,t),n,t,e)}function au(n,t,e,r){let i=n.length;if(i===1)return n[0];if(i)switch(r){case"compatible":case"earlier":return n[0];case"later":return n[i-1];case"reject":throw new RangeError("multiple instants found")}if(r==="reject")throw new RangeError("multiple instants found");let o=Ze(e),a=S.default.subtract(o,Yn);cn(a);let s=bn(t,a),l=S.default.add(o,Yn);cn(l);let u=bn(t,l)-s;switch(r){case"earlier":{let h=_e.fromComponents(0,0,0,0,0,-u),p=Rr(e.time,h);return Di(t,we(It(e.isoDate.year,e.isoDate.month,e.isoDate.day+p.deltaDays),p))[0]}case"compatible":case"later":{let h=_e.fromComponents(0,0,0,0,0,u),p=Rr(e.time,h),y=Di(t,we(It(e.isoDate.year,e.isoDate.month,e.isoDate.day+p.deltaDays),p));return y[y.length-1]}}}function Di(n,t){if(n==="UTC")return Tr(t.isoDate),[Ze(t)];let e=Hn(n).offsetMinutes;if(e!==void 0){let r=_i(t.isoDate.year,t.isoDate.month,t.isoDate.day,t.time.hour,t.time.minute-e,t.time.second,t.time.millisecond,t.time.microsecond,t.time.nanosecond);Tr(r.isoDate);let i=Ze(r);return cn(i),[i]}return Tr(t.isoDate),function(r,i){let o=Ze(i),a=S.default.subtract(o,Yn);S.default.lessThan(a,vi)&&(a=o);let s=S.default.add(o,Yn);S.default.greaterThan(s,Ir)&&(s=o);let l=us(r,a),u=us(r,s);return(l===u?[l]:[l,u]).map(p=>{let y=S.default.subtract(o,S.default.BigInt(p)),E=function(T,C){let{epochMilliseconds:L,time:{millisecond:B,microsecond:K,nanosecond:W}}=lu(C),{year:Q,month:te,day:oe,hour:Me,minute:Ee,second:ie}=uu(T,L);return _i(Q,te,oe,Me,Ee,ie,B,K,W)}(r,y);if(Ar(i,E)===0)return cn(y),y}).filter(p=>p!==void 0)}(n,t)}function Ln(n,t){let e=we(t,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=Di(n,e);if(r.length)return r[0];let i=Ze(e),o=S.default.subtract(i,Yn);return cn(o),Us(n,o)}function qi(n){let t;return t=n<0||n>9999?(n<0?"-":"+")+wi(Math.abs(n),6):wi(n,4),t}function jt(n){return wi(n,2)}function su(n,t){let e;if(t==="auto"){if(n===0)return"";e=wi(n,9).replace(/0+$/,"")}else{if(t===0)return"";e=wi(n,9).slice(0,t)}return`.${e}`}function zo(n,t,e,r,i){let o=`${jt(n)}:${jt(t)}`;return i==="minute"||(o+=`:${jt(e)}`,o+=su(r,i)),o}function rl(n,t,e){let r=t;r===void 0&&(r="UTC");let i=m(n,se),o=Ei(Wt(r,i),"iso8601",e,"never"),a="Z";return t!==void 0&&(a=cu(bn(r,i))),`${o}${a}`}function yo(n,t){let e=m(n,ut),r=m(n,dt),i=m(n,St),o=m(n,ht),a=m(n,mt),s=m(n,pt),l=To(n),u="";e!==0&&(u+=`${Math.abs(e)}Y`),r!==0&&(u+=`${Math.abs(r)}M`),i!==0&&(u+=`${Math.abs(i)}W`),o!==0&&(u+=`${Math.abs(o)}D`);let h="";a!==0&&(h+=`${Math.abs(a)}H`),s!==0&&(h+=`${Math.abs(s)}M`);let p=_e.fromComponents(0,0,m(n,ft),m(n,gt),m(n,yt),m(n,kt));p.isZero()&&!["second","millisecond","microsecond","nanosecond"].includes(yn(n))&&t==="auto"||(h+=`${Math.abs(p.sec)}${su(Math.abs(p.subsec),t)}S`);let y=`${l<0?"-":""}P${u}`;return h&&(y=`${y}T${h}`),y}function il(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce);return`${qi(e)}-${jt(r)}-${jt(i)}${Fi(m(n,$),t)}`}function ol({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){return zo(n,t,e,1e6*r+1e3*i+o,a)}function Ei(n,t,e,r="auto"){let{isoDate:{year:i,month:o,day:a},time:{hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y}}=n;return`${qi(i)}-${jt(o)}-${jt(a)}T${zo(s,l,u,1e6*h+1e3*p+y,e)}${Fi(t,r)}`}function al(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce),o=`${jt(r)}-${jt(i)}`,a=m(n,$);t!=="always"&&t!=="critical"&&a==="iso8601"||(o=`${qi(e)}-${o}`);let s=Fi(a,t);return s&&(o+=s),o}function sl(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce),o=`${qi(e)}-${jt(r)}`,a=m(n,$);t!=="always"&&t!=="critical"&&a==="iso8601"||(o+=`-${jt(i)}`);let s=Fi(a,t);return s&&(o+=s),o}function cl(n,t,e="auto",r="auto",i="auto",o=void 0){let a=m(n,se);if(o){let{unit:h,increment:p,roundingMode:y}=o;a=ps(a,p,h,y)}let s=m(n,De),l=bn(s,a),u=Ei(Wt(s,a),"iso8601",t,"never");return i!=="never"&&(u+=cu(l)),r!=="never"&&(u+=`[${r==="critical"?"!":""}${s}]`),u+=Fi(m(n,$),e),u}function ll(n){return Kl.test(n)}function Hr(n){let t=Wh.exec(n);if(!t)throw new RangeError(`invalid time zone offset: ${n}; must match \xB1HH:MM[:SS.SSSSSSSSS]`);return(t[1]==="-"?-1:1)*(1e9*(60*(60*+t[2]+ +(t[3]||0))+ +(t[4]||0))+ +((t[5]||0)+"000000000").slice(0,9))}var ei,Vh=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function So(n){if(ei===void 0){let o=Intl.supportedValuesOf?.("timeZone");if(o){ei=new Map;for(let a=0;a<o.length;a++){let s=o[a];ei.set(Mi(s),s)}}else ei=null}let t=Mi(n),e=ei?.get(t);if(e)return{identifier:e,primaryIdentifier:e};try{e=Vl(n).resolvedOptions().timeZone}catch{return}if(t==="antarctica/south_pole"&&(e="Antarctica/McMurdo"),$h.has(n))throw new RangeError(`${n} is a legacy time zone identifier from ICU. Use ${e} instead`);let r=[...t].map((o,a)=>a===0||Vh[t[a-1]]?o.toUpperCase():o).join("").split("/");if(r.length===1)return t==="gb-eire"?{identifier:"GB-Eire",primaryIdentifier:e}:{identifier:t.length<=3||/[-0-9]/.test(t)?t.toUpperCase():r[0],primaryIdentifier:e};if(r[0]==="Etc")return{identifier:`Etc/${["Zulu","Greenwich","Universal"].includes(r[1])?r[1]:r[1].toUpperCase()}`,primaryIdentifier:e};if(r[0]==="Us")return{identifier:`US/${r[1]}`,primaryIdentifier:e};let i=new Map([["Act","ACT"],["Lhi","LHI"],["Nsw","NSW"],["Dar_Es_Salaam","Dar_es_Salaam"],["Port_Of_Spain","Port_of_Spain"],["Port-Au-Prince","Port-au-Prince"],["Isle_Of_Man","Isle_of_Man"],["Comodrivadavia","ComodRivadavia"],["Knox_In","Knox_IN"],["Dumontdurville","DumontDUrville"],["Mcmurdo","McMurdo"],["Denoronha","DeNoronha"],["Easterisland","EasterIsland"],["Bajanorte","BajaNorte"],["Bajasur","BajaSur"]]);return r[1]=i.get(r[1])??r[1],r.length>2&&(r[2]=i.get(r[2])??r[2]),{identifier:r.join("/"),primaryIdentifier:e}}function tr(n,t){let{year:e,month:r,day:i,hour:o,minute:a,second:s}=uu(n,t),l=t%1e3;return l<0&&(l+=1e3),1e6*(Bs({isoDate:{year:e,month:r,day:i},time:{hour:o,minute:a,second:s,millisecond:l}})-t)}function us(n,t){return tr(n,Kt(t,"floor"))}function zs(n){let t=n<0?"-":"+",e=Math.abs(n);return`${t}${zo(Math.floor(e/60),e%60,0,0,"minute")}`}function cu(n){return zs(Fn(n,Nh,"halfExpand")/6e10)}function Bs({isoDate:{year:n,month:t,day:e},time:{hour:r,minute:i,second:o,millisecond:a}}){let s=n%400,l=(n-s)/400,u=new Date;return u.setUTCHours(r,i,o,a),u.setUTCFullYear(s,t-1,e),u.getTime()+Hh*l}function Ze(n){let t=Bs(n),e=1e3*n.time.microsecond+n.time.nanosecond;return S.default.add(Xt(t),S.default.BigInt(e))}function lu(n){let t=Kt(n,"trunc"),e=S.default.toNumber(S.default.remainder(n,Ni));e<0&&(e+=1e6,t-=1);let r=Math.floor(e/1e3)%1e3,i=e%1e3,o=new Date(t);return{epochMilliseconds:t,isoDate:{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate()},time:{hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds(),microsecond:r,nanosecond:i}}}function Us(n,t){if(n==="UTC")return null;let e=Kt(t,"floor");if(e<hi)return Us(n,Xt(hi));let r=Date.now(),i=Math.max(e,r)+366*$n*3,o=e,a=tr(n,o),s=o,l=a;for(;a===l&&o<i;){if(s=o+2*$n*7,s>Ul)return null;l=tr(n,s),a===l&&(o=s)}return a===l?null:Xt(bu(u=>tr(n,u),o,s,a,l))}function ds(n,t){if(n==="UTC")return null;let e=Kt(t,"ceil"),r=Date.now(),i=r+366*$n*3;if(e>i){let u=ds(n,Xt(i));if(u===null||S.default.lessThan(u,Xt(r)))return u}if(n==="Africa/Casablanca"||n==="Africa/El_Aaiun"){let u=Date.UTC(2088,0,1);if(u<e)return ds(n,Xt(u))}let o=e-1;if(o<hi)return null;let a=tr(n,o),s=o,l=a;for(;a===l&&o>hi;){if(s=o-2*$n*7,s<hi)return null;l=tr(n,s),a===l&&(o=s)}return a===l?null:Xt(bu(u=>tr(n,u),s,o,l,a))}function uu(n,t){return function(e){let r=e.split(/[^\w]+/);if(r.length!==7)throw new RangeError(`expected 7 parts in "${e}`);let i=+r[0],o=+r[1],a=+r[2],s=r[3];if(s[0]==="b"||s[0]==="B")a=1-a;else if(s[0]!=="a"&&s[0]!=="A")throw new RangeError(`Unknown era ${s} in "${e}`);let l=r[4]==="24"?0:+r[4],u=+r[5],h=+r[6];if(!(Number.isFinite(a)&&Number.isFinite(i)&&Number.isFinite(o)&&Number.isFinite(l)&&Number.isFinite(u)&&Number.isFinite(h)))throw new RangeError(`Invalid number in "${e}`);return{year:a,month:i,day:o,hour:l,minute:u,second:h}}(Vl(n).format(t))}function ko(n){return n!==void 0&&!(n%4!=0||n%100==0&&n%400!=0)}function nr(n,t){return{standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]}[ko(n)?"leapyear":"standard"][t-1]}function To(n){let t=[m(n,ut),m(n,dt),m(n,St),m(n,ht),m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt)];for(let e=0;e<t.length;e++){let r=t[e];if(r!==0)return r<0?-1:1}return 0}function Bo(n){let t=["years","months","weeks","days"];for(let e=0;e<t.length;e++){let r=n[t[e]];if(r!==0)return r<0?-1:1}return 0}function du(n){let t=Bo(n.date);return t!==0?t:n.time.sign()}function er(n,t){let e=n,r=t;if(!Number.isFinite(e)||!Number.isFinite(r))throw new RangeError("infinity is out of range");return r-=1,e+=Math.floor(r/12),r%=12,r<0&&(r+=12),r+=1,{year:e,month:r}}function It(n,t,e){let r=n,i=t,o=e;if(!Number.isFinite(o))throw new RangeError("infinity is out of range");({year:r,month:i}=er(r,i));let a=146097;if(Math.abs(o)>a){let u=Math.trunc(o/a);r+=400*u,o-=u*a}let s=0,l=i>2?r:r-1;for(;s=ko(l)?366:365,o<-s;)r-=1,l-=1,o+=s;for(l+=1;s=ko(l)?366:365,o>s;)r+=1,l+=1,o-=s;for(;o<1;)({year:r,month:i}=er(r,i-1)),o+=nr(r,i);for(;o>nr(r,i);)o-=nr(r,i),{year:r,month:i}=er(r,i+1);return{year:r,month:i,day:o}}function _i(n,t,e,r,i,o,a,s,l){let u=Nn(r,i,o,a,s,l);return we(It(n,t,e+u.deltaDays),u)}function Nn(n,t,e,r,i,o){let a,s=n,l=t,u=e,h=r,p=i,y=o;({div:a,mod:y}=Mr(y,3)),p+=a,y<0&&(p-=1,y+=1e3),{div:a,mod:p}=Mr(p,3),h+=a,p<0&&(h-=1,p+=1e3),u+=Math.trunc(h/1e3),h%=1e3,h<0&&(u-=1,h+=1e3),l+=Math.trunc(u/60),u%=60,u<0&&(l-=1,u+=60),s+=Math.trunc(l/60),l%=60,l<0&&(s-=1,l+=60);let E=Math.trunc(s/24);return s%=24,s<0&&(E-=1,s+=24),E+=0,s+=0,l+=0,u+=0,h+=0,p+=0,y+=0,{deltaDays:E,hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y}}function ul(n,t){let e=et(n,0);if(Bo(e)===0)return n.days;let r=m(t,ce),i=$t(m(t,$),r,e,"constrain"),o=ar(r.year,r.month-1,r.day),a=ar(i.year,i.month-1,i.day)-o;return n.days+a}function Pt(n){return new(Ge("%Temporal.Duration%"))(-m(n,ut),-m(n,dt),-m(n,St),-m(n,ht),-m(n,mt),-m(n,pt),-m(n,ft),-m(n,gt),-m(n,yt),-m(n,kt))}function vt(n,t,e){return Math.min(e,Math.max(t,n))}function hu(n,t,e){let r=vt(t,1,12);return{year:n,month:r,day:vt(e,1,nr(n,r))}}function Ve(n,t,e){if(n<t||n>e)throw new RangeError(`value out of range: ${t} <= ${n} <= ${e}`)}function ir(n,t,e){Ve(t,1,12),Ve(e,1,nr(n,t))}function dr(n){or(we(n,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function Uo(n,t,e,r,i,o){Ve(n,0,23),Ve(t,0,59),Ve(e,0,59),Ve(r,0,999),Ve(i,0,999),Ve(o,0,999)}function Vs(n,t,e,r,i,o,a,s,l){ir(n,t,e),Uo(r,i,o,a,s,l)}function or(n){let t=Ze(n);(S.default.lessThan(t,Oh)||S.default.greaterThan(t,Fh))&&cn(t)}function hs(n){Ze(n)}function cn(n){if(S.default.lessThan(n,vi)||S.default.greaterThan(n,Ir))throw new RangeError("date/time value is outside of supported range")}function qs({year:n,month:t}){Ve(n,Gc,Jc),n===Gc?Ve(t,4,12):n===Jc&&Ve(t,1,9)}function Vo(n,t,e,r,i,o,a,s,l,u){let h=0,p=[n,t,e,r,i,o,a,s,l,u];for(let B=0;B<p.length;B++){let K=p[B];if(K===1/0||K===-1/0)throw new RangeError("infinite values not allowed as duration fields");if(K!==0){let W=K<0?-1:1;if(h!==0&&W!==h)throw new RangeError("mixed-sign values not allowed as duration fields");h=W}}if(Math.abs(n)>=2**32||Math.abs(t)>=2**32||Math.abs(e)>=2**32)throw new RangeError("years, months, and weeks must be < 2\xB3\xB2");let y=Mr(s,3),E=Mr(l,6),T=Mr(u,9),C=Mr(1e6*y.mod+1e3*E.mod+T.mod,9).div,L=86400*r+3600*i+60*o+a+y.div+E.div+T.div+C;if(!Number.isSafeInteger(L))throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s")}function _r(n){return{date:{years:m(n,ut),months:m(n,dt),weeks:m(n,St),days:m(n,ht)},time:_e.fromComponents(m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt))}}function on(n){let t=_e.fromComponents(m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt)).add24HourDays(m(n,ht));return{date:{years:m(n,ut),months:m(n,dt),weeks:m(n,St),days:0},time:t}}function mu(n){let t=on(n),e=Math.trunc(t.time.sec/86400);return Vo(t.date.years,t.date.months,t.date.weeks,e,0,0,0,0,0,0),{...t.date,days:e}}function Vt(n,t){let e=n.time.sign(),r=n.time.abs().subsec,i=0,o=0,a=n.time.abs().sec,s=0,l=0,u=0;switch(t){case"year":case"month":case"week":case"day":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60,l=Math.trunc(s/60),s%=60,u=Math.trunc(l/24),l%=24;break;case"hour":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60,l=Math.trunc(s/60),s%=60;break;case"minute":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60;break;case"second":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3;break;case"millisecond":i=Math.trunc(r/1e3),r%=1e3,o=Ka(a,3,Math.trunc(i/1e3)),i%=1e3,a=0;break;case"microsecond":i=Ka(a,6,Math.trunc(r/1e3)),r%=1e3,a=0;break;case"nanosecond":r=Ka(a,9,r),a=0}return new(Ge("%Temporal.Duration%"))(n.date.years,n.date.months,n.date.weeks,n.date.days+e*u,e*l,e*s,e*a,e*o,e*i,e*r)}function En(n,t){return Bo(n),t.sign(),{date:n,time:t}}function ar(n,t,e){return Bs({isoDate:{year:n,month:t+1,day:e},time:{hour:0,minute:0,second:0,millisecond:0}})/$n}function Tr({year:n,month:t,day:e}){if(Math.abs(ar(n,t-1,e))>1e8)throw new RangeError("date/time value is outside the supported range")}function Ws(n,t){let e=t.hour-n.hour,r=t.minute-n.minute,i=t.second-n.second,o=t.millisecond-n.millisecond,a=t.microsecond-n.microsecond,s=t.nanosecond-n.nanosecond;return _e.fromComponents(e,r,i,o,a,s)}function Ks(n,t,e,r,i){let o=_e.fromEpochNsDiff(t,n);return o=Co(o,e,r,i),En({years:0,months:0,weeks:0,days:0},o)}function pu(n,t,e,r){hs(n),hs(t);let i=Ws(n.time,t.time),o=i.sign(),a=ln(n.isoDate,t.isoDate),s=t.isoDate;a===o&&(s=It(s.year,s.month,s.day+o),i=i.add24HourDays(-o));let l=Dn("day",r),u=Bi(e,n.isoDate,s,l);return r!==l&&(i=i.add24HourDays(u.days),u.days=0),En(u,i)}function fu(n,t,e,r,i){let o=S.default.subtract(t,n);if(S.default.equal(o,Ht))return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};let a=S.default.lessThan(o,Ht)?-1:1,s=Wt(e,n),l=Wt(e,t),u,h=0,p=a===1?2:1,y=Ws(s.time,l.time);for(y.sign()===-a&&h++;h<=p;h++){u=we(It(l.isoDate.year,l.isoDate.month,l.isoDate.day-h*a),s.time);let T=tt(e,u,"compatible");if(y=_e.fromEpochNsDiff(t,T),y.sign()!==-a)break}let E=Dn("day",i);return En(Bi(r,s.isoDate,u.isoDate,E),y)}function gu(n,t,e,r,i,o,a,s,l){let u,h,p,y,E=t;switch(s){case"year":{let F=Fn(E.date.years,a,"trunc");u=F,h=F+a*n,p={years:u,months:0,weeks:0,days:0},y={...p,years:h};break}case"month":{let F=Fn(E.date.months,a,"trunc");u=F,h=F+a*n,p=et(E.date,0,0,u),y=et(E.date,0,0,h);break}case"week":{let F=et(E.date,0,0),ee=$t(o,r.isoDate,F,"constrain"),g=Bi(o,ee,It(ee.year,ee.month,ee.day+E.date.days),"week"),A=Fn(E.date.weeks+g.weeks,a,"trunc");u=A,h=A+a*n,p=et(E.date,0,u),y=et(E.date,0,h);break}case"day":{let F=Fn(E.date.days,a,"trunc");u=F,h=F+a*n,p=et(E.date,u),y=et(E.date,h);break}}let T=$t(o,r.isoDate,p,"constrain"),C=$t(o,r.isoDate,y,"constrain"),L,B,K=we(T,r.time),W=we(C,r.time);i?(L=tt(i,K,"compatible"),B=tt(i,W,"compatible")):(L=Ze(K),B=Ze(W));let Q=_e.fromEpochNsDiff(e,L),te=_e.fromEpochNsDiff(B,L),oe=Oo(l,n<0?"negative":"positive"),Me=Q.add(Q).abs().subtract(te.abs()).sign(),Ee=Math.abs(u)/a%2==0,ie=Q.isZero()?Math.abs(u):Q.cmp(te)?Fo(Math.abs(u),Math.abs(h),Me,Ee,oe):Math.abs(h),N=new _e(S.default.add(S.default.multiply(te.totalNs,S.default.BigInt(u)),S.default.multiply(Q.totalNs,S.default.BigInt(a*n)))).fdiv(te.totalNs),Y=ie===Math.abs(h);return E={date:Y?y:p,time:_e.ZERO},{nudgeResult:{duration:E,nudgedEpochNs:Y?B:L,didExpandCalendarUnit:Y},total:N}}function qo(n,t,e,r,i,o,a,s,l){let u=n,h=nn(s)||r&&s==="day",p=du(u)<0?-1:1,y;return h?{nudgeResult:y}=gu(p,u,t,e,r,i,a,s,l):y=r?function(E,T,C,L,B,K,W,Q){let te=T,oe=$t(B,C.isoDate,te.date,"constrain"),Me=we(oe,C.time),Ee=we(It(oe.year,oe.month,oe.day+E),C.time),ie=tt(L,Me,"compatible"),N=tt(L,Ee,"compatible"),Y=_e.fromEpochNsDiff(N,ie);if(Y.sign()!==E)throw new RangeError("time zone returned inconsistent Instants");let F=S.default.BigInt(xr[W]*K),ee=te.time.round(F,Q),g=ee.subtract(Y),A=g.sign()!==-E,c,d;return A?(c=E,ee=g.round(F,Q),d=ee.addToEpochNs(N)):(c=0,d=ee.addToEpochNs(ie)),{duration:En(et(te.date,te.date.days+c),ee),nudgedEpochNs:d,didExpandCalendarUnit:A}}(p,u,e,r,i,a,s,l):function(E,T,C,L,B,K){let W=E,Q=W.time.add24HourDays(W.date.days),te=Q.round(S.default.BigInt(L*xr[B]),K),oe=te.subtract(Q),{quotient:Me}=Q.divmod(Do),{quotient:Ee}=te.divmod(Do),ie=Math.sign(Ee-Me)===Q.sign(),N=oe.addToEpochNs(T),Y=0,F=te;return vn(C)==="date"&&(Y=Ee,F=te.add(_e.fromComponents(24*-Ee,0,0,0,0,0))),{duration:{date:et(W.date,Y),time:F},nudgedEpochNs:N,didExpandCalendarUnit:ie}}(u,t,o,a,s,l),u=y.duration,y.didExpandCalendarUnit&&s!=="week"&&(u=function(E,T,C,L,B,K,W,Q){let te=T;if(Q===W)return te;let oe=mi.indexOf(W);for(let Me=mi.indexOf(Q)-1;Me>=oe;Me--){let Ee=mi[Me];if(Ee==="week"&&W!=="week")continue;let ie;switch(Ee){case"year":ie={years:te.date.years+E,months:0,weeks:0,days:0};break;case"month":{let F=te.date.months+E;ie=et(te.date,0,0,F);break}case"week":{let F=te.date.weeks+E;ie=et(te.date,0,F);break}}let N=we($t(K,L.isoDate,ie,"constrain"),L.time),Y;if(Y=B?tt(B,N,"compatible"):Ze(N),wo(C,Y)===-E)break;te={date:ie,time:_e.ZERO}}return te}(p,u,y.nudgedEpochNs,e,r,i,o,Dn(s,"day"))),u}function dl(n,t,e,r,i,o){return nn(o)||r&&o==="day"?gu(du(n)<0?-1:1,n,t,e,r,i,1,o,"trunc").total:gi(n.time.add24HourDays(n.date.days),o)}function yu(n,t,e,r,i,o,a){if(Ar(n,t)==0)return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};or(n),or(t);let s=pu(n,t,e,r);return o==="nanosecond"&&i===1?s:qo(s,Ze(t),n,null,e,r,i,o,a)}function vu(n,t,e,r,i,o,a,s){if(vn(i)==="time")return Ks(n,t,o,a,s);let l=fu(n,t,e,r,i);return a==="nanosecond"&&o===1?l:qo(l,t,Wt(e,n),e,r,i,o,a,s)}function Yr(n,t,e,r,i,o){let a=Pr.reduce((E,T)=>{let C=T[0],L=T[1],B=T[2];return e!=="datetime"&&B!==e||r.includes(L)||E.push(L,C),E},[]),s=Ct(t,"largestUnit",e,"auto");if(r.includes(s))throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);let l=Or(t),u=Qt(t,"trunc");n==="since"&&(u=function(E){switch(E){case"ceil":return"floor";case"floor":return"ceil";case"halfCeil":return"halfFloor";case"halfFloor":return"halfCeil";default:return E}}(u));let h=Ct(t,"smallestUnit",e,i);if(r.includes(h))throw new RangeError(`smallestUnit must be one of ${a.join(", ")}, not ${h}`);let p=Dn(o,h);if(s==="auto"&&(s=p),Dn(s,h)!==s)throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${h}`);let y={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[h];return y!==void 0&&Fr(l,y,!1),{largestUnit:s,roundingIncrement:l,roundingMode:u,smallestUnit:h}}function hl(n,t,e,r){let i=si(e),o=Yr(n,X(r),"time",[],"nanosecond","second"),a=Vt(Ks(m(t,se),m(i,se),o.roundingIncrement,o.smallestUnit,o.roundingMode),o.largestUnit);return n==="since"&&(a=Pt(a)),a}function ml(n,t,e,r){let i=oi(e),o=m(t,$),a=m(i,$);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Yr(n,X(r),"date",[],"day","day"),l=Ge("%Temporal.Duration%"),u=m(t,ce),h=m(i,ce);if(ln(u,h)===0)return new l;let p={date:Bi(o,u,h,s.largestUnit),time:_e.ZERO};if(s.smallestUnit!=="day"||s.roundingIncrement!==1){let E=we(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});p=qo(p,Ze(we(h,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),E,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let y=Vt(p,"day");return n==="since"&&(y=Pt(y)),y}function pl(n,t,e,r){let i=ai(e),o=m(t,$),a=m(i,$);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Yr(n,X(r),"datetime",[],"nanosecond","day"),l=Ge("%Temporal.Duration%"),u=m(t,Pe),h=m(i,Pe);if(Ar(u,h)===0)return new l;let p=Vt(yu(u,h,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return n==="since"&&(p=Pt(p)),p}function fl(n,t,e,r){let i=On(e),o=Yr(n,X(r),"time",[],"nanosecond","hour"),a=Ws(m(t,Oe),m(i,Oe));a=Co(a,o.roundingIncrement,o.smallestUnit,o.roundingMode);let s=Vt(En({years:0,months:0,weeks:0,days:0},a),o.largestUnit);return n==="since"&&(s=Pt(s)),s}function gl(n,t,e,r){let i=ci(e),o=m(t,$),a=m(i,$);if(!sn(o,a))throw new RangeError(`cannot compute difference between months of ${o} and ${a} calendars`);let s=Yr(n,X(r),"date",["week","day"],"month","year"),l=Ge("%Temporal.Duration%");if(ln(m(t,ce),m(i,ce))==0)return new l;let u=Dt(o,m(t,ce),"year-month");u.day=1;let h=jn(o,u,"constrain"),p=Dt(o,m(i,ce),"year-month");p.day=1;let y=jn(o,p,"constrain"),E={date:et(Bi(o,h,y,s.largestUnit),0,0),time:_e.ZERO};if(s.smallestUnit!=="month"||s.roundingIncrement!==1){let C=we(h,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});E=qo(E,Ze(we(y,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),C,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let T=Vt(E,"day");return n==="since"&&(T=Pt(T)),T}function yl(n,t,e,r){let i=li(e),o=m(t,$),a=m(i,$);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Yr(n,X(r),"datetime",[],"nanosecond","hour"),l=m(t,se),u=m(i,se),h=Ge("%Temporal.Duration%"),p;if(vn(s.largestUnit)!=="date")p=Vt(Ks(l,u,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{let y=m(t,De);if(!ou(y,m(i,De)))throw new RangeError("When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.");if(S.default.equal(l,u))return new h;p=Vt(vu(l,u,y,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),"hour")}return n==="since"&&(p=Pt(p)),p}function Rr({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){let s=e,l=o;return s+=a.sec,l+=a.subsec,Nn(n,t,s,r,i,l)}function ms(n,t){let e=t.addToEpochNs(n);return cn(e),e}function ui(n,t,e,r,i="constrain"){if(Bo(r.date)===0)return ms(n,r.time);let o=Wt(t,n);return ms(tt(t,we($t(e,o.isoDate,r.date,i),o.time),"compatible"),r.time)}function vl(n,t,e){let r=qt(e);n==="subtract"&&(r=Pt(r));let i=Dn(yn(t),yn(r));if(nn(i))throw new RangeError("For years, months, or weeks arithmetic, use date arithmetic relative to a starting point");let o=on(t),a=on(r);return Vt(En({years:0,months:0,weeks:0,days:0},o.time.add(a.time)),i)}function wl(n,t,e){let r=qt(e);n==="subtract"&&(r=Pt(r));let i=yn(r);if(vn(i)==="date")throw new RangeError(`Duration field ${i} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);let o=on(r);return Jt(ms(m(t,se),o.time))}function bl(n,t,e,r){let i=m(t,$),o=qt(e);n==="subtract"&&(o=Pt(o));let a=mu(o),s=ye(X(r));return wt($t(i,m(t,ce),a,s),i)}function Dl(n,t,e,r){let i=qt(e);n==="subtract"&&(i=Pt(i));let o=ye(X(r)),a=m(t,$),s=on(i),l=m(t,Pe),u=Rr(l.time,s.time),h=et(s.date,u.deltaDays);return Vo(h.years,h.months,h.weeks,h.days,0,0,0,0,0,0),Ut(we($t(a,l.isoDate,h,o),u),a)}function El(n,t,e){let r=qt(e);n==="subtract"&&(r=Pt(r));let i=on(r),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:h}=Rr(m(t,Oe),i.time);return wn(jo(o,a,s,l,u,h,"reject"))}function _l(n,t,e,r){let i=qt(e);n==="subtract"&&(i=Pt(i));let o=ye(X(r)),a=To(i),s=m(t,$),l=Dt(s,m(t,ce),"year-month");l.day=1;let u=jn(s,l,"constrain");if(a<0){let p=$t(s,u,{months:1},"constrain");u=It(p.year,p.month,p.day-1)}let h=mu(i);return dr(u),kr(bi(s,Dt(s,$t(s,u,h,o),"year-month"),o),s)}function Ml(n,t,e,r){let i=qt(e);n==="subtract"&&(i=Pt(i));let o=ye(X(r)),a=m(t,De),s=m(t,$),l=_r(i);return Qe(ui(m(t,se),a,s,l,o),a,s)}function Fn(n,t,e){let r=Math.trunc(n/t),i=n%t,o=n<0?"negative":"positive",a=Math.abs(r),s=a+1,l=Tt(Math.abs(2*i)-t),u=a%2==0,h=Oo(e,o),p=i===0?a:Fo(a,s,l,u,h);return t*(o==="positive"?p:-p)}function ps(n,t,e,r){let i=xr[e]*t;return function(o,a,s){let l=gn(o),u=gn(a),h=S.default.divide(l,u),p=S.default.remainder(l,u),y=Oo(s,"positive"),E,T;S.default.lessThan(l,Ht)?(E=S.default.subtract(h,yi),T=h):(E=h,T=S.default.add(h,yi));let C=wo(Qn(S.default.multiply(p,Ys)),u)*(S.default.lessThan(l,Ht)?-1:1)+0,L=S.default.equal(p,Ht)?h:Fo(E,T,C,Cl(E),y);return S.default.multiply(L,u)}(n,S.default.BigInt(i),r)}function fs(n,t,e,r){hs(n);let{year:i,month:o,day:a}=n.isoDate,s=gs(n.time,t,e,r);return we(It(i,o,a+s.deltaDays),s)}function gs({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a,s,l){let u;switch(s){case"day":case"hour":u=1e3*(1e3*(1e3*(60*(60*n+t)+e)+r)+i)+o;break;case"minute":u=1e3*(1e3*(1e3*(60*t+e)+r)+i)+o;break;case"second":u=1e3*(1e3*(1e3*e+r)+i)+o;break;case"millisecond":u=1e3*(1e3*r+i)+o;break;case"microsecond":u=1e3*i+o;break;case"nanosecond":u=o}let h=xr[s],p=Fn(u,h*a,l)/h;switch(s){case"day":return{deltaDays:p,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case"hour":return Nn(p,0,0,0,0,0);case"minute":return Nn(n,p,0,0,0,0);case"second":return Nn(n,t,p,0,0,0);case"millisecond":return Nn(n,t,e,p,0,0);case"microsecond":return Nn(n,t,e,r,p,0);case"nanosecond":return Nn(n,t,e,r,i,p);default:throw new Error(`Invalid unit ${s}`)}}function Co(n,t,e,r){let i=xr[e];return n.round(S.default.BigInt(i*t),r)}function gi(n,t){let e=xr[t];return n.fdiv(S.default.BigInt(e))}function ln(n,t){return n.year!==t.year?Tt(n.year-t.year):n.month!==t.month?Tt(n.month-t.month):n.day!==t.day?Tt(n.day-t.day):0}function ys(n,t){return n.hour!==t.hour?Tt(n.hour-t.hour):n.minute!==t.minute?Tt(n.minute-t.minute):n.second!==t.second?Tt(n.second-t.second):n.millisecond!==t.millisecond?Tt(n.millisecond-t.millisecond):n.microsecond!==t.microsecond?Tt(n.microsecond-t.microsecond):n.nanosecond!==t.nanosecond?Tt(n.nanosecond-t.nanosecond):0}function Ar(n,t){let e=ln(n.isoDate,t.isoDate);return e!==0?e:ys(n.time,t.time)}function wu(n){let t=Io(n);return globalThis.BigInt!==void 0?globalThis.BigInt(t.toString(10)):t}function Kt(n,t){let e=gn(n),{quotient:r,remainder:i}=ri(e,Ni),o=S.default.toNumber(r);return t==="floor"&&S.default.toNumber(i)<0&&(o-=1),t==="ceil"&&S.default.toNumber(i)>0&&(o+=1),o}function Xt(n){if(!Number.isInteger(n))throw new RangeError("epoch milliseconds must be an integer");return S.default.multiply(S.default.BigInt(n),Ni)}function Io(n){let t=n;if(typeof n=="object"){let e=n[Symbol.toPrimitive];e&&typeof e=="function"&&(t=e.call(n,"number"))}if(typeof t=="number")throw new TypeError("cannot convert number to bigint");return typeof t=="bigint"?S.default.BigInt(t.toString(10)):S.default.BigInt(t)}var vs=(()=>{let n=S.default.BigInt(Date.now()%1e6);return()=>{let t=Date.now(),e=S.default.BigInt(t),r=S.default.add(Xt(t),n);return n=S.default.remainder(e,Ni),S.default.greaterThan(r,Ir)?Ir:S.default.lessThan(r,vi)?vi:r}})();function ti(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function Tt(n){return n<0?-1:n>0?1:n}function X(n){if(n===void 0)return Object.create(null);if(Fe(n)&&n!==null)return n;throw new TypeError("Options parameter must be an object, not "+(n===null?"null":typeof n))}function sr(n,t){let e=Object.create(null);return e[n]=t,e}function _n(n,t,e,r){let i=n[t];if(i!==void 0){if(i=Yo(i),!e.includes(i))throw new RangeError(`${t} must be one of ${e.join(", ")}, not ${i}`);return i}if(r===Sn)throw new RangeError(`${t} option is required`);return r}function _t(n){let t=Mi(n);if(!Yh.includes(Mi(t)))throw new RangeError(`invalid calendar identifier ${t}`);switch(t){case"ethiopic-amete-alem":return"ethioaa";case"islamicc":return"islamic-civil"}return t}function Mi(n){let t="";for(let e=0;e<n.length;e++){let r=n.charCodeAt(e);t+=r>=65&&r<=90?String.fromCharCode(r+32):String.fromCharCode(r)}return t}function Un(n){throw new TypeError(`Do not use built-in arithmetic operators with Temporal objects. When comparing, use ${n==="PlainMonthDay"?"Temporal.PlainDate.compare(obj1.toPlainDate(year), obj2.toPlainDate(year))":`Temporal.${n}.compare(obj1, obj2)`}, not obj1 > obj2. When coercing to strings, use \`\${obj}\` or String(obj), not '' + obj. When coercing to numbers, use properties or methods of the object, not \`+obj\`. When concatenating with strings, use \`\${str}\${obj}\` or str.concat(obj), not str + obj. In React, coerce to a string before rendering a Temporal object.`)}var qh=new RegExp(`^${zl.source}$`),Wh=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);function bu(n,t,e,r=n(t),i=n(e)){let o=t,a=e,s=r,l=i;for(;a-o>1;){let u=Math.trunc((o+a)/2),h=n(u);h===s?(o=u,s=h):h===l&&(a=u,l=h)}return a}function Du(n){return[...n]}function Eu(n,t){if(n!=="gregory"&&n!=="iso8601")return;let e=Wi[n],r=t.year,{dayOfWeek:i,dayOfYear:o,daysInYear:a}=e.isoToDate(t,{dayOfWeek:!0,dayOfYear:!0,daysInYear:!0}),s=e.getFirstDayOfWeek(),l=e.getMinimalDaysInFirstWeek(),u=(i+7-s)%7,h=(i-o+7001-s)%7,p=Math.floor((o-1+h)/7);if(7-h>=l&&++p,p==0)p=function(y,E,T,C){let L=(C-y-T+1)%7;L<0&&(L+=7);let B=Math.floor((T+L-1)/7);return 7-L>=E&&++B,B}(s,l,o+e.isoToDate(e.dateAdd(t,{years:-1},"constrain"),{daysInYear:!0}).daysInYear,i),r--;else if(o>=a-5){let y=(u+a-o)%7;y<0&&(y+=7),6-y>=l&&o+7-u>a&&(p=1,r++)}return{week:p,year:r}}function Sl(n,t,e,r,i){if(t!==i.year){if(n*(t-i.year)>0)return!0}else if(e!==i.month){if(n*(e-i.month)>0)return!0}else if(r!==i.day&&n*(r-i.day)>0)return!0;return!1}var Wi={};function cr(n){if(!n.startsWith("M"))throw new RangeError(`Invalid month code: ${n}. Month codes must start with M.`);let t=+n.slice(1);if(Number.isNaN(t))throw new RangeError(`Invalid month code: ${n}`);return t}function an(n,t=!1){return`M${`${n}`.padStart(2,"0")}${t?"L":""}`}function Zs(n,t=void 0,e=12){let{month:r,monthCode:i}=n;if(i===void 0){if(r===void 0)throw new TypeError("Either month or monthCode are required");t==="reject"&&Ve(r,1,e),t==="constrain"&&(r=vt(r,1,e)),i=an(r)}else{let o=cr(i);if(i!==an(o))throw new RangeError(`Invalid month code: ${i}`);if(r!==void 0&&r!==o)throw new RangeError(`monthCode ${i} and month ${r} must match if both are present`);if(r=o,r<1||r>e)throw new RangeError(`Invalid monthCode: ${i}`)}return{...n,month:r,monthCode:i}}Wi.iso8601={resolveFields(n,t){if((t==="date"||t==="year-month")&&n.year===void 0)throw new TypeError("year is required");if((t==="date"||t==="month-day")&&n.day===void 0)throw new TypeError("day is required");Object.assign(n,Zs(n))},dateToISO:(n,t)=>pi(n.year,n.month,n.day,t),monthDayToISOReferenceDate(n,t){let{month:e,day:r}=pi(n.year??1972,n.month,n.day,t);return{month:e,day:r,year:1972}},extraFields:()=>[],fieldKeysToIgnore(n){let t=new Set;for(let e=0;e<n.length;e++){let r=n[e];t.add(r),r==="month"?t.add("monthCode"):r==="monthCode"&&t.add("month")}return Du(t)},dateAdd(n,{years:t=0,months:e=0,weeks:r=0,days:i=0},o){let{year:a,month:s,day:l}=n;return a+=t,s+=e,{year:a,month:s}=er(a,s),{year:a,month:s,day:l}=pi(a,s,l,o),l+=i+7*r,It(a,s,l)},dateUntil(n,t,e){let r=-ln(n,t);if(r===0)return{years:0,months:0,weeks:0,days:0};let i,o=0,a=0;if(e==="year"||e==="month"){let h=t.year-n.year;for(h!==0&&(h-=r);!Sl(r,n.year+h,n.month,n.day,t);)o=h,h+=r;let p=r;for(i=er(n.year+o,n.month+p);!Sl(r,i.year,i.month,n.day,t);)a=p,p+=r,i=er(i.year,i.month+r);e==="month"&&(a+=12*o,o=0)}i=er(n.year+o,n.month+a);let s=hu(i.year,i.month,n.day),l=0,u=ar(t.year,t.month-1,t.day)-ar(s.year,s.month-1,s.day);return e==="week"&&(l=Math.trunc(u/7),u%=7),{years:o,months:a,weeks:l,days:u}},isoToDate({year:n,month:t,day:e},r){let i={era:void 0,eraYear:void 0,year:n,month:t,day:e,daysInWeek:7,monthsInYear:12};if(r.monthCode&&(i.monthCode=an(t)),r.dayOfWeek){let o=t+(t<3?10:-2),a=n-(t<3?1:0),s=Math.floor(a/100),l=a-100*s,u=(e+Math.floor(2.6*o-.2)+(l+Math.floor(l/4))+(Math.floor(s/4)-2*s))%7;i.dayOfWeek=u+(u<=0?7:0)}if(r.dayOfYear){let o=e;for(let a=t-1;a>0;a--)o+=nr(n,a);i.dayOfYear=o}return r.weekOfYear&&(i.weekOfYear=Eu("iso8601",{year:n,month:t,day:e})),r.daysInMonth&&(i.daysInMonth=nr(n,t)),(r.daysInYear||r.inLeapYear)&&(i.inLeapYear=ko(n),i.daysInYear=i.inLeapYear?366:365),i},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};var Ot=class n{constructor(t){if(this.map=new Map,this.calls=0,this.hits=0,this.misses=0,t!==void 0){let e=0;for(let r of t.map.entries()){if(++e>n.MAX_CACHE_ENTRIES)break;this.map.set(...r)}}}get(t){let e=this.map.get(t);return e&&(this.hits++,this.report()),this.calls++,e}set(t,e){this.map.set(t,e),this.misses++,this.report()}report(){}setObject(t){if(n.objectMap.get(t))throw new RangeError("object already cached");n.objectMap.set(t,this),this.report()}static getCacheForObject(t){let e=n.objectMap.get(t);return e||(e=new n,n.objectMap.set(t,e)),e}};function _u({isoYear:n,isoMonth:t,isoDay:e}){return`${qi(n)}-${jt(t)}-${jt(e)}T00:00Z`}function Ja(n,t){return{years:n.year-t.year,months:n.month-t.month,days:n.day-t.day}}Ot.objectMap=new WeakMap,Ot.MAX_CACHE_ENTRIES=1e3;var kn=class{constructor(){this.eras=[],this.hasEra=!1,this.erasBeginMidYear=!1}getFormatter(){return this.formatter===void 0&&(this.formatter=new Intl.DateTimeFormat(`en-US-u-ca-${this.id}`,{day:"numeric",month:"numeric",year:"numeric",era:"short",timeZone:"UTC"})),this.formatter}getCalendarParts(t){let e=this.getFormatter(),r=new Date(t);if(t==="-271821-04-19T00:00Z"){let i=e.resolvedOptions();e=new Intl.DateTimeFormat(i.locale,{...i,timeZone:"Etc/GMT+1"}),r=new Date("-271821-04-20T00:00Z")}try{return e.formatToParts(r)}catch{throw new RangeError(`Invalid ISO date: ${t}`)}}isoToCalendarDate(t,e){let{year:r,month:i,day:o}=t,a=JSON.stringify({func:"isoToCalendarDate",isoYear:r,isoMonth:i,isoDay:o,id:this.id}),s=e.get(a);if(s)return s;let l=_u({isoYear:r,isoMonth:i,isoDay:o}),u=this.getCalendarParts(l),h={};for(let y=0;y<u.length;y++){let{type:E,value:T}=u[y];if(E!=="year"&&E!=="relatedYear"||(this.hasEra?h.eraYear=+T:h.year=+T),E==="month"){let C=/^([0-9]*)(.*?)$/.exec(T);if(!C||C.length!=3||!C[1]&&!C[2])throw new RangeError(`Unexpected month: ${T}`);if(h.month=C[1]?+C[1]:1,h.month<1)throw new RangeError(`Invalid month ${T} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(h.month>13)throw new RangeError(`Invalid month ${T} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);C[2]&&(h.monthExtra=C[2])}E==="day"&&(h.day=+T),this.hasEra&&E==="era"&&T!=null&&T!==""&&(h.era=T.split(" (")[0].normalize("NFD").replace(/[^-0-9 \p{L}]/gu,"").replace(/ /g,"-").toLowerCase())}if(this.hasEra&&h.eraYear===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);if(this.hasEra){let y=this.eras.find(E=>h.era===E.genericName);y&&(h.era=y.code)}if(this.reviseIntlEra){let{era:y,eraYear:E}=this.reviseIntlEra(h,t);h.era=y,h.eraYear=E}this.checkIcuBugs&&this.checkIcuBugs(t);let p=this.adjustCalendarDate(h,e,"constrain",!0);if(p.year===void 0)throw new RangeError(`Missing year converting ${JSON.stringify(t)}`);if(p.month===void 0)throw new RangeError(`Missing month converting ${JSON.stringify(t)}`);if(p.day===void 0)throw new RangeError(`Missing day converting ${JSON.stringify(t)}`);return e.set(a,p),["constrain","reject"].forEach(y=>{let E=JSON.stringify({func:"calendarToIsoDate",year:p.year,month:p.month,day:p.day,overflow:y,id:this.id});e.set(E,t)}),p}validateCalendarDate(t){let{month:e,year:r,day:i,eraYear:o,monthCode:a,monthExtra:s}=t;if(s!==void 0)throw new RangeError("Unexpected `monthExtra` value");if(r===void 0&&o===void 0)throw new TypeError("year or eraYear is required");if(e===void 0&&a===void 0)throw new TypeError("month or monthCode is required");if(i===void 0)throw new RangeError("Missing day");if(a!==void 0){if(typeof a!="string")throw new RangeError("monthCode must be a string, not "+typeof a);if(!/^M([01]?\d)(L?)$/.test(a))throw new RangeError(`Invalid monthCode: ${a}`)}if(this.hasEra&&t.era===void 0!=(t.eraYear===void 0))throw new TypeError("properties era and eraYear must be provided together")}adjustCalendarDate(t,e=void 0,r="constrain",i=!1){if(this.calendarType==="lunisolar")throw new RangeError("Override required for lunisolar calendars");let o=t;this.validateCalendarDate(o);let a=this.monthsInYear(o,e),{month:s,monthCode:l}=o;return{month:s,monthCode:l}=Zs(o,r,a),{...o,month:s,monthCode:l}}regulateMonthDayNaive(t,e,r){let i=this.monthsInYear(t,r),{month:o,day:a}=t;return e==="reject"?(Ve(o,1,i),Ve(a,1,this.maximumMonthLength(t))):(o=vt(o,1,i),a=vt(a,1,this.maximumMonthLength({...t,month:o}))),{...t,month:o,day:a}}calendarToIsoDate(t,e="constrain",r){let i=t,o=this.adjustCalendarDate(t,r,e,!1);o=this.regulateMonthDayNaive(o,e,r);let{year:a,month:s,day:l}=o,u=JSON.stringify({func:"calendarToIsoDate",year:a,month:s,day:l,overflow:e,id:this.id}),h,p=r.get(u);if(p||i.year!==void 0&&i.month!==void 0&&i.day!==void 0&&(i.year!==o.year||i.month!==o.month||i.day!==o.day)&&(h=JSON.stringify({func:"calendarToIsoDate",year:i.year,month:i.month,day:i.day,overflow:e,id:this.id}),p=r.get(h),p))return p;let y=this.estimateIsoDate({year:a,month:s,day:l}),E=K=>{let W=this.addDaysIso(y,K);if(o.day>this.minimumMonthLength(o)){let Q=this.isoToCalendarDate(W,r);for(;Q.month!==s||Q.year!==a;){if(e==="reject")throw new RangeError(`day ${l} does not exist in month ${s} of year ${a}`);W=this.addDaysIso(W,-1),Q=this.isoToCalendarDate(W,r)}}return W},T=0,C=this.isoToCalendarDate(y,r),L=Ja(o,C);if(L.years!==0||L.months!==0||L.days!==0){let K=365*L.years+30*L.months+L.days;y=this.addDaysIso(y,K),C=this.isoToCalendarDate(y,r),L=Ja(o,C),L.years===0&&L.months===0?y=E(L.days):T=this.compareCalendarDates(o,C)}let B=8;for(;T;){y=this.addDaysIso(y,T*B);let K=C;C=this.isoToCalendarDate(y,r);let W=T;if(T=this.compareCalendarDates(o,C),T){if(L=Ja(o,C),L.years===0&&L.months===0)y=E(L.days),T=0;else if(W&&T!==W)if(B>1)B/=2;else{if(e==="reject")throw new RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...i})}`);this.compareCalendarDates(C,K)>0&&(y=this.addDaysIso(y,-1)),T=0}}}if(r.set(u,y),h&&r.set(h,y),o.year===void 0||o.month===void 0||o.day===void 0||o.monthCode===void 0||this.hasEra&&(o.era===void 0||o.eraYear===void 0))throw new RangeError("Unexpected missing property");return y}compareCalendarDates(t,e){return t.year!==e.year?Tt(t.year-e.year):t.month!==e.month?Tt(t.month-e.month):t.day!==e.day?Tt(t.day-e.day):0}regulateDate(t,e="constrain",r){let i=this.calendarToIsoDate(t,e,r);return this.isoToCalendarDate(i,r)}addDaysIso(t,e){return It(t.year,t.month,t.day+e)}addDaysCalendar(t,e,r){let i=this.calendarToIsoDate(t,"constrain",r),o=this.addDaysIso(i,e);return this.isoToCalendarDate(o,r)}addMonthsCalendar(t,e,r,i){let o=t,{day:a}=o;for(let s=0,l=Math.abs(e);s<l;s++){let{month:u}=o,h=o,p=e<0?-Math.max(a,this.daysInPreviousMonth(o,i)):this.daysInMonth(o,i),y=this.calendarToIsoDate(o,"constrain",i),E=this.addDaysIso(y,p);if(o=this.isoToCalendarDate(E,i),e>0){let T=this.monthsInYear(h,i);for(;o.month-1!=u%T;)E=this.addDaysIso(E,-1),o=this.isoToCalendarDate(E,i)}o.day!==a&&(o=this.regulateDate({...o,day:a},"constrain",i))}if(r==="reject"&&o.day!==a)throw new RangeError(`Day ${a} does not exist in resulting calendar month`);return o}addCalendar(t,{years:e=0,months:r=0,weeks:i=0,days:o=0},a,s){let{year:l,day:u,monthCode:h}=t,p=this.adjustCalendarDate({year:l+e,monthCode:h,day:u},s),y=this.addMonthsCalendar(p,r,a,s),E=o+7*i;return this.addDaysCalendar(y,E,s)}untilCalendar(t,e,r,i){let o=0,a=0,s=0,l=0;switch(r){case"day":o=this.calendarDaysUntil(t,e,i);break;case"week":{let u=this.calendarDaysUntil(t,e,i);o=u%7,a=(u-o)/7;break}case"month":case"year":{let u=this.compareCalendarDates(e,t);if(!u)return{years:0,months:0,weeks:0,days:0};let h=e.year-t.year,p=e.day-t.day;if(r==="year"&&h){let T=0;e.monthCode>t.monthCode&&(T=1),e.monthCode<t.monthCode&&(T=-1),T||(T=Math.sign(p)),l=T*u<0?h-u:h}let y,E=l?this.addCalendar(t,{years:l},"constrain",i):t;do s+=u,y=E,E=this.addMonthsCalendar(y,u,"constrain",i),E.day!==t.day&&(E=this.regulateDate({...E,day:t.day},"constrain",i));while(this.compareCalendarDates(e,E)*u>=0);s-=u,o=this.calendarDaysUntil(y,e,i);break}}return{years:l,months:s,weeks:a,days:o}}daysInMonth(t,e){let{day:r}=t,i=this.maximumMonthLength(t),o=this.minimumMonthLength(t);if(o===i)return o;let a=r<=i-o?i:o,s=this.calendarToIsoDate(t,"constrain",e),l=this.addDaysIso(s,a),u=this.isoToCalendarDate(l,e),h=this.addDaysIso(l,-u.day);return this.isoToCalendarDate(h,e).day}daysInPreviousMonth(t,e){let{day:r,month:i,year:o}=t,a={year:i>1?o:o-1,month:i,day:1},s=i>1?i-1:this.monthsInYear(a,e);a={...a,month:s};let l=this.minimumMonthLength(a),u=this.maximumMonthLength(a);if(l===u)return u;let h=this.calendarToIsoDate(t,"constrain",e),p=this.addDaysIso(h,-r);return this.isoToCalendarDate(p,e).day}startOfCalendarYear(t){return{year:t.year,month:1,monthCode:"M01",day:1}}startOfCalendarMonth(t){return{year:t.year,month:t.month,day:1}}calendarDaysUntil(t,e,r){let i=this.calendarToIsoDate(t,"constrain",r),o=this.calendarToIsoDate(e,"constrain",r);return ar(o.year,o.month-1,o.day)-ar(i.year,i.month-1,i.day)}monthDaySearchStartYear(t,e){return 1972}monthDayFromFields(t,e,r){let i,o,a,s,l,{era:u,eraYear:h,year:p,month:y,monthCode:E,day:T}=t;if(y!==void 0&&p===void 0&&(!this.hasEra||u===void 0||h===void 0))throw new TypeError("when month is present, year (or era and eraYear) are required");(E===void 0||p!==void 0||this.hasEra&&h!==void 0)&&({monthCode:E,day:T}=this.isoToCalendarDate(this.calendarToIsoDate(t,e,r),r));let C={year:this.monthDaySearchStartYear(E,T),month:12,day:31},L=this.isoToCalendarDate(C,r),B=L.monthCode>E||L.monthCode===E&&L.day>=T?L.year:L.year-1;for(let K=0;K<20;K++){let W=this.adjustCalendarDate({day:T,monthCode:E,year:B-K},r),Q=this.calendarToIsoDate(W,"constrain",r),te=this.isoToCalendarDate(Q,r);if({year:i,month:o,day:a}=Q,te.monthCode===E&&te.day===T)return{month:o,day:a,year:i};if(e==="constrain"){let oe=this.maxLengthOfMonthCodeInAnyYear(te.monthCode);if(te.monthCode===E&&te.day===oe&&T>oe)return{month:o,day:a,year:i};(s===void 0||te.monthCode===s.monthCode&&te.day>s.day)&&(s=te,l=Q)}}if(e==="constrain"&&l!==void 0)return l;throw new RangeError(`No recent ${this.id} year with monthCode ${E} and day ${T}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}},ws=class extends kn{constructor(){super(...arguments),this.id="hebrew",this.calendarType="lunisolar",this.months={Tishri:{leap:1,regular:1,monthCode:"M01",days:30},Heshvan:{leap:2,regular:2,monthCode:"M02",days:{min:29,max:30}},Kislev:{leap:3,regular:3,monthCode:"M03",days:{min:29,max:30}},Tevet:{leap:4,regular:4,monthCode:"M04",days:29},Shevat:{leap:5,regular:5,monthCode:"M05",days:30},Adar:{leap:void 0,regular:6,monthCode:"M06",days:29},"Adar I":{leap:6,regular:void 0,monthCode:"M05L",days:30},"Adar II":{leap:7,regular:void 0,monthCode:"M06",days:29},Nisan:{leap:8,regular:7,monthCode:"M07",days:30},Iyar:{leap:9,regular:8,monthCode:"M08",days:29},Sivan:{leap:10,regular:9,monthCode:"M09",days:30},Tamuz:{leap:11,regular:10,monthCode:"M10",days:29},Av:{leap:12,regular:11,monthCode:"M11",days:30},Elul:{leap:13,regular:12,monthCode:"M12",days:29}}}inLeapYear(t){let{year:e}=t;return(7*e+1)%19<7}monthsInYear(t){return this.inLeapYear(t)?13:12}minimumMonthLength(t){return this.minMaxMonthLength(t,"min")}maximumMonthLength(t){return this.minMaxMonthLength(t,"max")}minMaxMonthLength(t,e){let{month:r,year:i}=t,o=this.getMonthCode(i,r),a=Object.entries(this.months).find(l=>l[1].monthCode===o);if(a===void 0)throw new RangeError(`unmatched Hebrew month: ${r}`);let s=a[1].days;return typeof s=="number"?s:s[e]}maxLengthOfMonthCodeInAnyYear(t){return["M04","M06","M08","M10","M12"].includes(t)?29:30}estimateIsoDate(t){let{year:e}=t;return{year:e-3760,month:1,day:1}}getMonthCode(t,e){return this.inLeapYear({year:t})?e===6?an(5,!0):an(e<6?e:e-1):an(e)}adjustCalendarDate(t,e,r="constrain",i=!1){let{year:o,month:a,monthCode:s,day:l,monthExtra:u}=t;if(o===void 0)throw new TypeError("Missing property: year");if(i){if(u){let h=this.months[u];if(!h)throw new RangeError(`Unrecognized month from formatToParts: ${u}`);a=this.inLeapYear({year:o})?h.leap:h.regular}return s=this.getMonthCode(o,a),{year:o,month:a,day:l,monthCode:s}}if(this.validateCalendarDate(t),a===void 0)if(s.endsWith("L")){if(s!=="M05L")throw new RangeError(`Hebrew leap month must have monthCode M05L, not ${s}`);if(a=6,!this.inLeapYear({year:o})){if(r==="reject")throw new RangeError(`Hebrew monthCode M05L is invalid in year ${o} which is not a leap year`);a=6,s="M06"}}else{a=cr(s),this.inLeapYear({year:o})&&a>=6&&a++;let h=this.monthsInYear({year:o});if(a<1||a>h)throw new RangeError(`Invalid monthCode: ${s}`)}else if(r==="reject"?(Ve(a,1,this.monthsInYear({year:o})),Ve(l,1,this.maximumMonthLength({year:o,month:a}))):(a=vt(a,1,this.monthsInYear({year:o})),l=vt(l,1,this.maximumMonthLength({year:o,month:a}))),s===void 0)s=this.getMonthCode(o,a);else if(this.getMonthCode(o,a)!==s)throw new RangeError(`monthCode ${s} doesn't correspond to month ${a} in Hebrew year ${o}`);return{...t,day:l,month:a,monthCode:s,year:o}}},zn=class extends kn{constructor(){super(...arguments),this.calendarType="lunar",this.DAYS_PER_ISLAMIC_YEAR=354+11/30,this.DAYS_PER_ISO_YEAR=365.2425}inLeapYear(t,e){let r={year:t.year,month:1,monthCode:"M01",day:1},i={year:t.year+1,month:1,monthCode:"M01",day:1};return this.calendarDaysUntil(r,i,e)===355}monthsInYear(){return 12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(){return 30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:Math.floor(e*this.DAYS_PER_ISLAMIC_YEAR/this.DAYS_PER_ISO_YEAR)+622,month:1,day:1}}},bs=class extends zn{constructor(){super(...arguments),this.id="islamic"}},Ds=class extends zn{constructor(){super(...arguments),this.id="islamic-umalqura"}},Es=class extends zn{constructor(){super(...arguments),this.id="islamic-tbla"}},_s=class extends zn{constructor(){super(...arguments),this.id="islamic-civil"}},Ms=class extends zn{constructor(){super(...arguments),this.id="islamic-rgsa"}},Ss=class extends zn{constructor(){super(...arguments),this.id="islamicc"}},ks=class extends kn{constructor(){super(...arguments),this.id="persian",this.calendarType="solar"}inLeapYear(t,e){return this.daysInMonth({year:t.year,month:12,day:1},e)===30}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===12?29:e<=6?31:30}maximumMonthLength(t){let{month:e}=t;return e===12?30:e<=6?31:30}maxLengthOfMonthCodeInAnyYear(t){return cr(t)<=6?31:30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:e+621,month:1,day:1}}},Ts=class extends kn{constructor(){super(...arguments),this.id="indian",this.calendarType="solar",this.months={1:{length:30,month:3,day:22,leap:{length:31,month:3,day:21}},2:{length:31,month:4,day:21},3:{length:31,month:5,day:22},4:{length:31,month:6,day:22},5:{length:31,month:7,day:23},6:{length:31,month:8,day:23},7:{length:30,month:9,day:23},8:{length:30,month:10,day:23},9:{length:30,month:11,day:22},10:{length:30,month:12,day:22},11:{length:30,month:1,nextYear:!0,day:21},12:{length:30,month:2,nextYear:!0,day:20}},this.vulnerableToBceBug=new Date("0000-01-01T00:00Z").toLocaleDateString("en-US-u-ca-indian",{timeZone:"UTC"})!=="10/11/-79 Saka"}inLeapYear(t){return Gs(t.year+78)}monthsInYear(){return 12}minimumMonthLength(t){return this.getMonthInfo(t).length}maximumMonthLength(t){return this.getMonthInfo(t).length}maxLengthOfMonthCodeInAnyYear(t){let e=cr(t),r=this.months[e];return r=r.leap??r,r.length}getMonthInfo(t){let{month:e}=t,r=this.months[e];if(r===void 0)throw new RangeError(`Invalid month: ${e}`);return this.inLeapYear(t)&&r.leap&&(r=r.leap),r}estimateIsoDate(t){let e=this.adjustCalendarDate(t),r=this.getMonthInfo(e);return It(e.year+78+(r.nextYear?1:0),r.month,r.day+e.day-1)}checkIcuBugs(t){if(this.vulnerableToBceBug&&t.year<1)throw new RangeError(`calendar '${this.id}' is broken for ISO dates before 0001-01-01 (see https://bugs.chromium.org/p/v8/issues/detail?id=10529)`)}};function Gs(n){return n%4==0&&(n%100!=0||n%400==0)}var Po=class extends kn{constructor(t,e){super(),this.calendarType="solar",this.id=t,this.isoEpoch=e}inLeapYear(t){let{year:e}=this.estimateIsoDate({month:1,day:1,year:t.year});return Gs(e)}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===2?this.inLeapYear(t)?29:28:[4,6,9,11].indexOf(e)>=0?30:31}maximumMonthLength(t){return this.minimumMonthLength(t)}maxLengthOfMonthCodeInAnyYear(t){return[31,29,31,30,31,30,31,31,30,31,30,31][cr(t)-1]}estimateIsoDate(t){let e=this.adjustCalendarDate(t);return pi(e.year+this.isoEpoch.year,e.month+this.isoEpoch.month,e.day+this.isoEpoch.day,"constrain")}},xo=class extends kn{constructor(t,e){super(),this.hasEra=!0,this.calendarType="solar",this.id=t;let{eras:r,anchorEra:i}=function(o){let a,s=o;if(s.length===0)throw new RangeError("Invalid era data: eras are required");if(s.length===1&&s[0].reverseOf)throw new RangeError("Invalid era data: anchor era cannot count years backwards");if(s.length===1&&!s[0].code)throw new RangeError("Invalid era data: at least one named era is required");if(s.filter(u=>u.reverseOf!=null).length>1)throw new RangeError("Invalid era data: only one era can count years backwards");s.forEach(u=>{if(u.isAnchor||!u.anchorEpoch&&!u.reverseOf){if(a)throw new RangeError("Invalid era data: cannot have multiple anchor eras");a=u,u.anchorEpoch={year:u.hasYearZero?0:1}}else if(!u.code)throw new RangeError("If era name is blank, it must be the anchor era")}),s=s.filter(u=>u.code),s.forEach(u=>{let{reverseOf:h}=u;if(h){let p=s.find(y=>y.code===h);if(p===void 0)throw new RangeError(`Invalid era data: unmatched reverseOf era: ${h}`);u.reverseOf=p,u.anchorEpoch=p.anchorEpoch,u.isoEpoch=p.isoEpoch}u.anchorEpoch.month===void 0&&(u.anchorEpoch.month=1),u.anchorEpoch.day===void 0&&(u.anchorEpoch.day=1)}),s.sort((u,h)=>{if(u.reverseOf)return 1;if(h.reverseOf)return-1;if(!u.isoEpoch||!h.isoEpoch)throw new RangeError("Invalid era data: missing ISO epoch");return h.isoEpoch.year-u.isoEpoch.year});let l=s[s.length-1].reverseOf;if(l&&l!==s[s.length-2])throw new RangeError("Invalid era data: invalid reverse-sign era");return s.forEach((u,h)=>{u.genericName="era"+(s.length-1-h)}),{eras:s,anchorEra:a||s[0]}}(e);this.anchorEra=i,this.eras=r}inLeapYear(t){let{year:e}=this.estimateIsoDate({month:1,day:1,year:t.year});return Gs(e)}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===2?this.inLeapYear(t)?29:28:[4,6,9,11].indexOf(e)>=0?30:31}maximumMonthLength(t){return this.minimumMonthLength(t)}maxLengthOfMonthCodeInAnyYear(t){return[31,29,31,30,31,30,31,31,30,31,30,31][cr(t)-1]}completeEraYear(t){let e=(s,l,u)=>{let h=t[s];if(h!=null&&h!=l&&!(u||[]).includes(h)){let p=u?.[0];throw new RangeError(`Input ${s} ${h} doesn't match calculated value ${p?`${l} (also called ${p})`:l}`)}},r=s=>{let l,u={...t,year:s},h=this.eras.find((p,y)=>{if(y===this.eras.length-1){if(p.reverseOf){if(s>0)throw new RangeError(`Signed year ${s} is invalid for era ${p.code}`);return l=p.anchorEpoch.year-s,!0}return l=s-p.anchorEpoch.year+(p.hasYearZero?0:1),!0}return this.compareCalendarDates(u,p.anchorEpoch)>=0&&(l=s-p.anchorEpoch.year+(p.hasYearZero?0:1),!0)});if(!h)throw new RangeError(`Year ${s} was not matched by any era`);return{eraYear:l,era:h.code,eraNames:h.names}},{year:i,eraYear:o,era:a}=t;if(i!=null){let s=r(i);({eraYear:o,era:a}=s),e("era",a,s?.eraNames),e("eraYear",o)}else{if(o==null)throw new RangeError("Either year or eraYear and era are required");{if(a===void 0)throw new RangeError("era and eraYear must be provided together");let s=this.eras.find(({code:l,names:u=[]})=>l===a||u.includes(a));if(!s)throw new RangeError(`Era ${a} (ISO year ${o}) was not matched by any era`);i=s.reverseOf?s.anchorEpoch.year-o:o+s.anchorEpoch.year-(s.hasYearZero?0:1),e("year",i),{eraYear:o,era:a}=r(i)}}return{...t,year:i,eraYear:o,era:a}}adjustCalendarDate(t,e,r="constrain"){let i=t,{month:o,monthCode:a}=i;return o===void 0&&(i={...i,month:cr(a)}),this.validateCalendarDate(i),i=this.completeEraYear(i),super.adjustCalendarDate(i,e,r)}estimateIsoDate(t){let e=this.adjustCalendarDate(t),{year:r,month:i,day:o}=e,{anchorEra:a}=this;return pi(r+a.isoEpoch.year-(a.hasYearZero?0:1),i,o,"constrain")}},Si=class extends xo{constructor(t,e){super(t,e)}isoToCalendarDate(t){let{year:e,month:r,day:i}=t,o=an(r),a=e-this.anchorEra.isoEpoch.year+1;return this.completeEraYear({year:a,month:r,monthCode:o,day:i})}},rn={inLeapYear(n){let{year:t}=n;return(t+1)%4==0},monthsInYear:()=>13,minimumMonthLength(n){let{month:t}=n;return t===13?this.inLeapYear(n)?6:5:30},maximumMonthLength(n){return this.minimumMonthLength(n)},maxLengthOfMonthCodeInAnyYear:n=>n==="M13"?6:30},Cs=class extends Po{constructor(t,e){super(t,e),this.inLeapYear=rn.inLeapYear,this.monthsInYear=rn.monthsInYear,this.minimumMonthLength=rn.minimumMonthLength,this.maximumMonthLength=rn.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=rn.maxLengthOfMonthCodeInAnyYear}},Ro=class extends xo{constructor(t,e){super(t,e),this.inLeapYear=rn.inLeapYear,this.monthsInYear=rn.monthsInYear,this.minimumMonthLength=rn.minimumMonthLength,this.maximumMonthLength=rn.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=rn.maxLengthOfMonthCodeInAnyYear}},Is=class extends Cs{constructor(){super("ethioaa",{year:-5492,month:7,day:17})}},Ps=class extends Ro{constructor(){super("coptic",[{code:"coptic",isoEpoch:{year:284,month:8,day:29}},{code:"coptic-inverse",reverseOf:"coptic"}])}},xs=class extends Ro{constructor(){super("ethiopic",[{code:"ethioaa",names:["ethiopic-amete-alem","mundi"],isoEpoch:{year:-5492,month:7,day:17}},{code:"ethiopic",names:["incar"],isoEpoch:{year:8,month:8,day:27},anchorEpoch:{year:5501}}])}},Rs=class extends Si{constructor(){super("roc",[{code:"roc",names:["minguo"],isoEpoch:{year:1912,month:1,day:1}},{code:"roc-inverse",names:["before-roc"],reverseOf:"roc"}])}},As=class extends Po{constructor(){super("buddhist",{year:-543,month:1,day:1})}},Ls=class extends Si{constructor(){super("gregory",[{code:"gregory",names:["ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"gregory-inverse",names:["be","bce"],reverseOf:"gregory"}])}reviseIntlEra(t){let{era:e,eraYear:r}=t;return e==="b"&&(e="gregory-inverse"),e==="a"&&(e="gregory"),{era:e,eraYear:r}}getFirstDayOfWeek(){return 1}getMinimalDaysInFirstWeek(){return 1}},Ns=class extends Si{constructor(){super("japanese",[{code:"reiwa",isoEpoch:{year:2019,month:5,day:1},anchorEpoch:{year:2019,month:5,day:1}},{code:"heisei",isoEpoch:{year:1989,month:1,day:8},anchorEpoch:{year:1989,month:1,day:8}},{code:"showa",isoEpoch:{year:1926,month:12,day:25},anchorEpoch:{year:1926,month:12,day:25}},{code:"taisho",isoEpoch:{year:1912,month:7,day:30},anchorEpoch:{year:1912,month:7,day:30}},{code:"meiji",isoEpoch:{year:1868,month:9,day:8},anchorEpoch:{year:1868,month:9,day:8}},{code:"japanese",names:["japanese","gregory","ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"japanese-inverse",names:["japanese-inverse","gregory-inverse","bc","bce"],reverseOf:"japanese"}]),this.erasBeginMidYear=!0}reviseIntlEra(t,e){let{era:r,eraYear:i}=t,{year:o}=e;return this.eras.find(a=>a.code===r)?{era:r,eraYear:i}:o<1?{era:"japanese-inverse",eraYear:1-o}:{era:"japanese",eraYear:o}}},Ao=class extends kn{constructor(){super(...arguments),this.calendarType="lunisolar"}inLeapYear(t,e){let r=this.getMonthList(t.year,e);return Object.entries(r).length===13}monthsInYear(t,e){return this.inLeapYear(t,e)?13:12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(t){return["M01L","M09L","M10L","M11L","M12L"].includes(t)?29:30}monthDaySearchStartYear(t,e){let r={M01L:[1651,1651],M02L:[1947,1765],M03L:[1966,1955],M04L:[1963,1944],M05L:[1971,1952],M06L:[1960,1941],M07L:[1968,1938],M08L:[1957,1718],M09L:[1832,1832],M10L:[1870,1870],M11L:[1814,1814],M12L:[1890,1890]}[t]??[1972,1972];return e<30?r[0]:r[1]}getMonthList(t,e){if(t===void 0)throw new TypeError("Missing year");let r=JSON.stringify({func:"getMonthList",calendarYear:t,id:this.id}),i=e.get(r);if(i)return i;let o=this.getFormatter(),a=(L,B)=>{let K=_u({isoYear:L,isoMonth:2,isoDay:1}),W=new Date(K);W.setUTCDate(B+1);let Q=o.formatToParts(W),te=Q.find(ie=>ie.type==="month").value,oe=+Q.find(ie=>ie.type==="day").value,Me=Q.find(ie=>ie.type==="relatedYear"),Ee;if(Me===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);return Ee=+Me.value,{calendarMonthString:te,calendarDay:oe,calendarYearToVerify:Ee}},s=17,{calendarMonthString:l,calendarDay:u,calendarYearToVerify:h}=a(t,s);l!=="1"&&(s+=29,{calendarMonthString:l,calendarDay:u}=a(t,s)),s-=u-5;let p={},y,E,T=1,C=!1;do({calendarMonthString:l,calendarDay:u,calendarYearToVerify:h}=a(t,s)),y&&(p[E].daysInMonth=y+30-u),h!==t?C=!0:(p[l]={monthIndex:T++},s+=30),y=u,E=l;while(!C);return p[E].daysInMonth=y+30-u,e.set(r,p),p}estimateIsoDate(t){let{year:e,month:r}=t;return{year:e,month:r>=12?12:r+1,day:1}}adjustCalendarDate(t,e,r="constrain",i=!1){let{year:o,month:a,monthExtra:s,day:l,monthCode:u}=t;if(o===void 0)throw new TypeError("Missing property: year");if(i){if(s&&s!=="bis")throw new RangeError(`Unexpected leap month suffix: ${s}`);let h=an(a,s!==void 0),p=`${a}${s||""}`,y=this.getMonthList(o,e)[p];if(y===void 0)throw new RangeError(`Unmatched month ${p} in Chinese year ${o}`);return a=y.monthIndex,{year:o,month:a,day:l,monthCode:h}}if(this.validateCalendarDate(t),a===void 0){let h=this.getMonthList(o,e),p=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");p[0]==="0"&&(p=p.slice(1));let y=h[p];if(a=y&&y.monthIndex,a===void 0&&u.endsWith("L")&&u!="M13L"&&r==="constrain"){let E=+u.replace(/^M0?|L$/g,"");y=h[E],y&&(a=y.monthIndex,u=an(E))}if(a===void 0)throw new RangeError(`Unmatched month ${u} in Chinese year ${o}`)}else if(u===void 0){let h=this.getMonthList(o,e),p=Object.entries(h),y=p.length;r==="reject"?(Ve(a,1,y),Ve(l,1,this.maximumMonthLength())):(a=vt(a,1,y),l=vt(l,1,this.maximumMonthLength()));let E=p.find(T=>T[1].monthIndex===a);if(E===void 0)throw new RangeError(`Invalid month ${a} in Chinese year ${o}`);u=an(+E[0].replace("bis",""),E[0].indexOf("bis")!==-1)}else{let h=this.getMonthList(o,e),p=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");p[0]==="0"&&(p=p.slice(1));let y=h[p];if(!y)throw new RangeError(`Unmatched monthCode ${u} in Chinese year ${o}`);if(a!==y.monthIndex)throw new RangeError(`monthCode ${u} doesn't correspond to month ${a} in Chinese year ${o}`)}return{...t,year:o,month:a,monthCode:u,day:l}}},Os=class extends Ao{constructor(){super(...arguments),this.id="chinese"}},Fs=class extends Ao{constructor(){super(...arguments),this.id="dangi"}},Hs=class{constructor(t){this.helper=t}extraFields(t){return this.helper.hasEra&&t.includes("year")?["era","eraYear"]:[]}resolveFields(t){if(this.helper.calendarType!=="lunisolar"){let e=new Ot;Zs(t,void 0,this.helper.monthsInYear({year:t.year??1972},e))}}dateToISO(t,e){let r=new Ot,i=this.helper.calendarToIsoDate(t,e,r);return r.setObject(i),i}monthDayToISOReferenceDate(t,e){let r=new Ot,i=this.helper.monthDayFromFields(t,e,r);return r.setObject(i),i}fieldKeysToIgnore(t){let e=new Set;for(let r=0;r<t.length;r++){let i=t[r];switch(e.add(i),i){case"era":e.add("eraYear"),e.add("year");break;case"eraYear":e.add("era"),e.add("year");break;case"year":e.add("era"),e.add("eraYear");break;case"month":e.add("monthCode"),this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"));break;case"monthCode":e.add("month"),this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"));break;case"day":this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"))}}return Du(e)}dateAdd(t,{years:e,months:r,weeks:i,days:o},a){let s=Ot.getCacheForObject(t),l=this.helper.isoToCalendarDate(t,s),u=this.helper.addCalendar(l,{years:e,months:r,weeks:i,days:o},a,s),h=this.helper.calendarToIsoDate(u,"constrain",s);return Ot.getCacheForObject(h)||new Ot(s).setObject(h),h}dateUntil(t,e,r){let i=Ot.getCacheForObject(t),o=Ot.getCacheForObject(e),a=this.helper.isoToCalendarDate(t,i),s=this.helper.isoToCalendarDate(e,o);return this.helper.untilCalendar(a,s,r,i)}isoToDate(t,e){let r=Ot.getCacheForObject(t),i=this.helper.isoToCalendarDate(t,r);if(e.dayOfWeek&&(i.dayOfWeek=Wi.iso8601.isoToDate(t,{dayOfWeek:!0}).dayOfWeek),e.dayOfYear){let o=this.helper.startOfCalendarYear(i),a=this.helper.calendarDaysUntil(o,i,r);i.dayOfYear=a+1}if(e.weekOfYear&&(i.weekOfYear=Eu(this.helper.id,t)),i.daysInWeek=7,e.daysInMonth&&(i.daysInMonth=this.helper.daysInMonth(i,r)),e.daysInYear){let o=this.helper.startOfCalendarYear(i),a=this.helper.addCalendar(o,{years:1},"constrain",r);i.daysInYear=this.helper.calendarDaysUntil(o,a,r)}return e.monthsInYear&&(i.monthsInYear=this.helper.monthsInYear(i,r)),e.inLeapYear&&(i.inLeapYear=this.helper.inLeapYear(i,r)),i}getFirstDayOfWeek(){return this.helper.getFirstDayOfWeek()}getMinimalDaysInFirstWeek(){return this.helper.getMinimalDaysInFirstWeek()}};for(let n of[ws,ks,xs,Is,Ps,Os,Fs,Rs,Ts,As,Ls,Ns,bs,Ds,Es,_s,Ms,Ss]){let t=new n;Wi[t.id]=new Hs(t)}is("calendarImpl",function(n){return Wi[n]});var ki=Intl.DateTimeFormat;function wr(n,t){let e=m(n,t);return typeof e=="function"&&(e=new ki(m(n,Hl),e(m(n,es))),function(r,i,o){let a=No(r);if(a===void 0)throw new TypeError("Missing slots for the given container");if(a[i]===void 0)throw new TypeError(`tried to reset ${i} which was not set`);a[i]=o}(n,t,e)),e}function ni(n){return Et(n,ur)}var lr=class{constructor(t=void 0,e=void 0){(function(r,i,o){let a=o!==void 0,s;if(a){let p=["localeMatcher","calendar","numberingSystem","hour12","hourCycle","timeZone","weekday","era","year","month","day","dayPeriod","hour","minute","second","fractionalSecondDigits","timeZoneName","formatMatcher","dateStyle","timeStyle"];s=function(E){if(E==null)throw new TypeError(`Expected object not ${E}`);return Object(E)}(o);let y=Object.create(null);for(let E=0;E<p.length;E++){let T=p[E];Object.prototype.hasOwnProperty.call(s,T)&&(y[T]=s[T])}s=y}else s=Object.create(null);let l=new ki(i,s),u=l.resolvedOptions();if(Tn(r),a){let p=Object.assign(Object.create(null),u);for(let y in p)Object.prototype.hasOwnProperty.call(s,y)||delete p[y];p.hour12=s.hour12,p.hourCycle=s.hourCycle,me(r,es,p)}else me(r,es,s);me(r,Hl,u.locale),me(r,ur,l),me(r,Er,u.timeZone),me(r,ii,u.calendar),me(r,Rl,nm),me(r,Al,em),me(r,Ll,tm),me(r,Nl,Qh),me(r,Ol,rm),me(r,Fl,im);let h=a?s.timeZone:void 0;if(h===void 0)me(r,Qa,u.timeZone);else{let p=Yo(h);if(p.startsWith("\u2212"))throw new RangeError("Unicode minus (U+2212) is not supported in time zone offsets");me(r,Qa,bt(p))}})(this,t,e)}get format(){P(this,ni);let t=Zh.bind(this);return Object.defineProperties(t,{length:{value:1,enumerable:!1,writable:!1,configurable:!0},name:{value:"",enumerable:!1,writable:!1,configurable:!0}}),t}formatRange(t,e){return P(this,ni),Jh.call(this,t,e)}formatToParts(t,...e){return P(this,ni),Gh.call(this,t,...e)}formatRangeToParts(t,e){return P(this,ni),Xh.call(this,t,e)}resolvedOptions(){return P(this,ni),Kh.call(this)}};"formatToParts"in ki.prototype||delete lr.prototype.formatToParts,"formatRangeToParts"in ki.prototype||delete lr.prototype.formatRangeToParts;var Yt=function(n=void 0,t=void 0){return new lr(n,t)};function Kh(){let n=m(this,ur).resolvedOptions();return n.timeZone=m(this,Qa),n}function Zh(n,...t){let e,r,i=Lr(n,this);return i.formatter?(e=i.formatter,r=[Kt(i.epochNs,"floor")]):(e=m(this,ur),r=[n,...t]),e.format(...r)}function Gh(n,...t){let e,r,i=Lr(n,this);return i.formatter?(e=i.formatter,r=[Kt(i.epochNs,"floor")]):(e=m(this,ur),r=[n,...t]),e.formatToParts(...r)}function Jh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Lo(n),r=Lo(t),i,o=[e,r];if(Mn(e)!==Mn(r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");if(Mn(e)){if(!Mu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");let{epochNs:a,formatter:s}=Lr(e,this),{epochNs:l,formatter:u}=Lr(r,this);s&&(i=s,o=[Kt(a,"floor"),Kt(l,"floor")])}return i||(i=m(this,ur)),i.formatRange(...o)}function Xh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Lo(n),r=Lo(t),i,o=[e,r];if(Mn(e)!==Mn(r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");if(Mn(e)){if(!Mu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");let{epochNs:a,formatter:s}=Lr(e,this),{epochNs:l,formatter:u}=Lr(r,this);s&&(i=s,o=[Kt(a,"floor"),Kt(l,"floor")])}return i||(i=m(this,ur)),i.formatRangeToParts(...o)}function Ki(n={},t={}){let e=Object.assign({},n),r=["year","month","day","hour","minute","second","weekday","dayPeriod","timeZoneName","dateStyle","timeStyle"];for(let i=0;i<r.length;i++){let o=r[i];e[o]=o in t?t[o]:e[o],e[o]!==!1&&e[o]!==void 0||delete e[o]}return e}function Qh(n){let t=Ki(n,{year:!1,month:!1,day:!1,weekday:!1,timeZoneName:!1,dateStyle:!1});if(t.timeStyle!=="long"&&t.timeStyle!=="full"||(delete t.timeStyle,Object.assign(t,{hour:"numeric",minute:"2-digit",second:"2-digit"})),!Ko(t)){if(Zi(n))throw new TypeError(`cannot format Temporal.PlainTime with options [${Object.keys(n)}]`);Object.assign(t,{hour:"numeric",minute:"numeric",second:"numeric"})}return t}function em(n){let t={short:{year:"2-digit",month:"numeric"},medium:{year:"numeric",month:"short"},long:{year:"numeric",month:"long"},full:{year:"numeric",month:"long"}},e=Ki(n,{day:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in e&&e.dateStyle){let r=e.dateStyle;delete e.dateStyle,Object.assign(e,t[r])}if(!("year"in e||"month"in e||"era"in e)){if(Zi(n))throw new TypeError(`cannot format PlainYearMonth with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric"})}return e}function tm(n){let t={short:{month:"numeric",day:"numeric"},medium:{month:"short",day:"numeric"},long:{month:"long",day:"numeric"},full:{month:"long",day:"numeric"}},e=Ki(n,{year:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in e&&e.dateStyle){let r=e.dateStyle;delete e.dateStyle,Object.assign(e,t[r])}if(!("month"in e)&&!("day"in e)){if(Zi(n))throw new TypeError(`cannot format PlainMonthDay with options [${Object.keys(n)}]`);Object.assign(e,{month:"numeric",day:"numeric"})}return e}function nm(n){let t=Ki(n,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!Wo(t)){if(Zi(n))throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric"})}return t}function rm(n){let t=Ki(n,{timeZoneName:!1});if((t.timeStyle==="long"||t.timeStyle==="full")&&(delete t.timeStyle,Object.assign(t,{hour:"numeric",minute:"2-digit",second:"2-digit"}),t.dateStyle)&&(Object.assign(t,{short:{year:"numeric",month:"numeric",day:"numeric"},medium:{year:"numeric",month:"short",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{year:"numeric",month:"long",day:"numeric",weekday:"long"}}[t.dateStyle]),delete t.dateStyle),!Ko(t)&&!Wo(t)){if(Zi(n))throw new TypeError(`cannot format PlainDateTime with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}return t}function im(n){let t=n;return Ko(t)||Wo(t)||(t=Object.assign({},t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),t}function Wo(n){return"year"in n||"month"in n||"day"in n||"weekday"in n||"dateStyle"in n||"era"in n}function Ko(n){return"hour"in n||"minute"in n||"second"in n||"timeStyle"in n||"dayPeriod"in n||"fractionalSecondDigits"in n}function Zi(n){return Wo(n)||Ko(n)||"dateStyle"in n||"timeStyle"in n||"timeZoneName"in n}function Mn(n){return Ne(n)||He(n)||Te(n)||pe(n)||Ke(n)||Ft(n)||We(n)}function Lo(n){return Mn(n)?n:Ho(n)}function Mu(n,t){return!(!Mn(n)||!Mn(t)||He(n)&&!He(t)||Ne(n)&&!Ne(t)||Te(n)&&!Te(t)||pe(n)&&!pe(t)||Ke(n)&&!Ke(t)||Ft(n)&&!Ft(t)||We(n)&&!We(t))}function Lr(n,t){if(He(n)){let e={isoDate:{year:1970,month:1,day:1},time:m(n,Oe)};return{epochNs:tt(m(t,Er),e,"compatible"),formatter:wr(t,Nl)}}if(Ke(n)){let e=m(n,$),r=m(t,ii);if(e!==r)throw new RangeError(`cannot format PlainYearMonth with calendar ${e} in locale with calendar ${r}`);let i=we(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Al)}}if(Ft(n)){let e=m(n,$),r=m(t,ii);if(e!==r)throw new RangeError(`cannot format PlainMonthDay with calendar ${e} in locale with calendar ${r}`);let i=we(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Ll)}}if(Ne(n)){let e=m(n,$),r=m(t,ii);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDate with calendar ${e} in locale with calendar ${r}`);let i=we(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Rl)}}if(Te(n)){let e=m(n,$),r=m(t,ii);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDateTime with calendar ${e} in locale with calendar ${r}`);let i=m(n,Pe);return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Ol)}}if(pe(n))throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");return We(n)?{epochNs:m(n,se),formatter:wr(t,Fl)}:{}}function Su(n){let t=Object.create(null);return t.years=m(n,ut),t.months=m(n,dt),t.weeks=m(n,St),t.days=m(n,ht),t.hours=m(n,mt),t.minutes=m(n,pt),t.seconds=m(n,ft),t.milliseconds=m(n,gt),t.microseconds=m(n,yt),t.nanoseconds=m(n,kt),t}lr.prototype.constructor=Yt,Object.defineProperty(Yt,"prototype",{value:lr.prototype,writable:!1,enumerable:!1,configurable:!1}),Yt.supportedLocalesOf=ki.supportedLocalesOf,Cn(Yt,"Intl.DateTimeFormat");var{format:om,formatToParts:am}=Intl.DurationFormat?.prototype??Object.create(null);function Js(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=Su(qt(n));return om.call(this,t)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=Js,Intl.DurationFormat.prototype.formatToParts=function(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=Su(qt(n));return am.call(this,t)});var gp=Object.freeze({__proto__:null,DateTimeFormat:Yt,ModifiedIntlDurationFormatPrototypeFormat:Js}),Ti=class{constructor(t){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");ru(this,Io(t))}get epochMilliseconds(){return P(this,We),Kt(m(this,se),"floor")}get epochNanoseconds(){return P(this,We),wu(S.default.BigInt(m(this,se)))}add(t){return P(this,We),wl("add",this,t)}subtract(t){return P(this,We),wl("subtract",this,t)}until(t,e=void 0){return P(this,We),hl("until",this,t,e)}since(t,e=void 0){return P(this,We),hl("since",this,t,e)}round(t){if(P(this,We),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn);return Fr(r,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[o],!0),Jt(ps(m(this,se),r,o,i))}equals(t){P(this,We);let e=si(t),r=m(this,se),i=m(e,se);return S.default.equal(S.default.BigInt(r),S.default.BigInt(i))}toString(t=void 0){P(this,We);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let a=e.timeZone;a!==void 0&&(a=bt(a));let{precision:s,unit:l,increment:u}=$i(o,r);return rl(Jt(ps(m(this,se),u,l,i)),a,s)}toJSON(){return P(this,We),rl(this,void 0,"auto")}toLocaleString(t=void 0,e=void 0){return P(this,We),new Yt(t,e).format(this)}valueOf(){Un("Instant")}toZonedDateTimeISO(t){P(this,We);let e=bt(t);return Qe(m(this,se),e,"iso8601")}static fromEpochMilliseconds(t){return Jt(Xt(Ho(t)))}static fromEpochNanoseconds(t){return Jt(Io(t))}static from(t){return si(t)}static compare(t,e){let r=si(t),i=si(e),o=m(r,se),a=m(i,se);return S.default.lessThan(o,a)?-1:S.default.greaterThan(o,a)?1:0}};Cn(Ti,"Temporal.Instant");var Ci=class{constructor(t,e,r,i="iso8601"){let o=ue(t),a=ue(e),s=ue(r),l=_t(i===void 0?"iso8601":Be(i));ir(o,a,s),Xl(this,{year:o,month:a,day:s},l)}get calendarId(){return P(this,Ne),m(this,$)}get era(){return st(this,"era")}get eraYear(){return st(this,"eraYear")}get year(){return st(this,"year")}get month(){return st(this,"month")}get monthCode(){return st(this,"monthCode")}get day(){return st(this,"day")}get dayOfWeek(){return st(this,"dayOfWeek")}get dayOfYear(){return st(this,"dayOfYear")}get weekOfYear(){return st(this,"weekOfYear")?.week}get yearOfWeek(){return st(this,"weekOfYear")?.year}get daysInWeek(){return st(this,"daysInWeek")}get daysInMonth(){return st(this,"daysInMonth")}get daysInYear(){return st(this,"daysInYear")}get monthsInYear(){return st(this,"monthsInYear")}get inLeapYear(){return st(this,"inLeapYear")}with(t,e=void 0){if(P(this,Ne),!Fe(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=Dt(r,m(this,ce));return i=rr(r,i,zt(r,t,["year","month","monthCode","day"],[],"partial")),wt(jn(r,i,ye(X(e))),r)}withCalendar(t){P(this,Ne);let e=Ui(t);return wt(m(this,ce),e)}add(t,e=void 0){return P(this,Ne),bl("add",this,t,e)}subtract(t,e=void 0){return P(this,Ne),bl("subtract",this,t,e)}until(t,e=void 0){return P(this,Ne),ml("until",this,t,e)}since(t,e=void 0){return P(this,Ne),ml("since",this,t,e)}equals(t){P(this,Ne);let e=oi(t);return ln(m(this,ce),m(e,ce))===0&&sn(m(this,$),m(e,$))}toString(t=void 0){return P(this,Ne),il(this,Hi(X(t)))}toJSON(){return P(this,Ne),il(this)}toLocaleString(t=void 0,e=void 0){return P(this,Ne),new Yt(t,e).format(this)}valueOf(){Un("PlainDate")}toPlainDateTime(t=void 0){P(this,Ne);let e=Jl(t);return Ut(we(m(this,ce),e),m(this,$))}toZonedDateTime(t){let e,r;if(P(this,Ne),Fe(t)){let a=t.timeZone;a===void 0?e=bt(t):(e=bt(a),r=t.plainTime)}else e=bt(t);let i=m(this,ce),o;return r===void 0?o=Ln(e,i):(r=On(r),o=tt(e,we(i,m(r,Oe)),"compatible")),Qe(o,e,m(this,$))}toPlainYearMonth(){P(this,Ne);let t=m(this,$);return kr(bi(t,Dt(t,m(this,ce)),"constrain"),t)}toPlainMonthDay(){P(this,Ne);let t=m(this,$);return Sr(Mo(t,Dt(t,m(this,ce)),"constrain"),t)}static from(t,e=void 0){return oi(t,e)}static compare(t,e){let r=oi(t),i=oi(e);return ln(m(r,ce),m(i,ce))}};function st(n,t){P(n,Ne);let e=m(n,ce);return ji(n).isoToDate(e,{[t]:!0})[t]}Cn(Ci,"Temporal.PlainDate");var Ii=class{constructor(t,e,r,i=0,o=0,a=0,s=0,l=0,u=0,h="iso8601"){let p=ue(t),y=ue(e),E=ue(r),T=i===void 0?0:ue(i),C=o===void 0?0:ue(o),L=a===void 0?0:ue(a),B=s===void 0?0:ue(s),K=l===void 0?0:ue(l),W=u===void 0?0:ue(u),Q=_t(h===void 0?"iso8601":Be(h));Vs(p,y,E,T,C,L,B,K,W),Ql(this,{isoDate:{year:p,month:y,day:E},time:{hour:T,minute:C,second:L,millisecond:B,microsecond:K,nanosecond:W}},Q)}get calendarId(){return P(this,Te),m(this,$)}get year(){return ct(this,"year")}get month(){return ct(this,"month")}get monthCode(){return ct(this,"monthCode")}get day(){return ct(this,"day")}get hour(){return br(this,"hour")}get minute(){return br(this,"minute")}get second(){return br(this,"second")}get millisecond(){return br(this,"millisecond")}get microsecond(){return br(this,"microsecond")}get nanosecond(){return br(this,"nanosecond")}get era(){return ct(this,"era")}get eraYear(){return ct(this,"eraYear")}get dayOfWeek(){return ct(this,"dayOfWeek")}get dayOfYear(){return ct(this,"dayOfYear")}get weekOfYear(){return ct(this,"weekOfYear")?.week}get yearOfWeek(){return ct(this,"weekOfYear")?.year}get daysInWeek(){return ct(this,"daysInWeek")}get daysInYear(){return ct(this,"daysInYear")}get daysInMonth(){return ct(this,"daysInMonth")}get monthsInYear(){return ct(this,"monthsInYear")}get inLeapYear(){return ct(this,"inLeapYear")}with(t,e=void 0){if(P(this,Te),!Fe(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=m(this,Pe),o={...Dt(r,i.isoDate),...i.time};return o=rr(r,o,zt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],"partial")),Ut(zi(r,o,ye(X(e))),r)}withPlainTime(t=void 0){P(this,Te);let e=Jl(t);return Ut(we(m(this,Pe).isoDate,e),m(this,$))}withCalendar(t){P(this,Te);let e=Ui(t);return Ut(m(this,Pe),e)}add(t,e=void 0){return P(this,Te),Dl("add",this,t,e)}subtract(t,e=void 0){return P(this,Te),Dl("subtract",this,t,e)}until(t,e=void 0){return P(this,Te),pl("until",this,t,e)}since(t,e=void 0){return P(this,Te),pl("since",this,t,e)}round(t){if(P(this,Te),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];Fr(r,a,a===1);let s=m(this,Pe);return Ut(r===1&&o==="nanosecond"?s:fs(s,r,o,i),m(this,$))}equals(t){P(this,Te);let e=ai(t);return Ar(m(this,Pe),m(e,Pe))===0&&sn(m(this,$),m(e,$))}toString(t=void 0){P(this,Te);let e=X(t),r=Hi(e),i=Yi(e),o=Qt(e,"trunc"),a=Ct(e,"smallestUnit","time",void 0);if(a==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let{precision:s,unit:l,increment:u}=$i(a,i),h=fs(m(this,Pe),u,l,o);return or(h),Ei(h,m(this,$),s,r)}toJSON(){return P(this,Te),Ei(m(this,Pe),m(this,$),"auto")}toLocaleString(t=void 0,e=void 0){return P(this,Te),new Yt(t,e).format(this)}valueOf(){Un("PlainDateTime")}toZonedDateTime(t,e=void 0){P(this,Te);let r=bt(t),i=fi(X(e));return Qe(tt(r,m(this,Pe),i),r,m(this,$))}toPlainDate(){return P(this,Te),wt(m(this,Pe).isoDate,m(this,$))}toPlainTime(){return P(this,Te),wn(m(this,Pe).time)}static from(t,e=void 0){return ai(t,e)}static compare(t,e){let r=ai(t),i=ai(e);return Ar(m(r,Pe),m(i,Pe))}};function ct(n,t){P(n,Te);let e=m(n,Pe).isoDate;return ji(n).isoToDate(e,{[t]:!0})[t]}function br(n,t){return P(n,Te),m(n,Pe).time[t]}Cn(Ii,"Temporal.PlainDateTime");var Pi=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0,s=0,l=0,u=0,h=0){let p=t===void 0?0:Gt(t),y=e===void 0?0:Gt(e),E=r===void 0?0:Gt(r),T=i===void 0?0:Gt(i),C=o===void 0?0:Gt(o),L=a===void 0?0:Gt(a),B=s===void 0?0:Gt(s),K=l===void 0?0:Gt(l),W=u===void 0?0:Gt(u),Q=h===void 0?0:Gt(h);Vo(p,y,E,T,C,L,B,K,W,Q),Tn(this),me(this,ut,p),me(this,dt,y),me(this,St,E),me(this,ht,T),me(this,mt,C),me(this,pt,L),me(this,ft,B),me(this,gt,K),me(this,yt,W),me(this,kt,Q)}get years(){return P(this,Le),m(this,ut)}get months(){return P(this,Le),m(this,dt)}get weeks(){return P(this,Le),m(this,St)}get days(){return P(this,Le),m(this,ht)}get hours(){return P(this,Le),m(this,mt)}get minutes(){return P(this,Le),m(this,pt)}get seconds(){return P(this,Le),m(this,ft)}get milliseconds(){return P(this,Le),m(this,gt)}get microseconds(){return P(this,Le),m(this,yt)}get nanoseconds(){return P(this,Le),m(this,kt)}get sign(){return P(this,Le),To(this)}get blank(){return P(this,Le),To(this)===0}with(t){P(this,Le);let e=Gl(t),{years:r=m(this,ut),months:i=m(this,dt),weeks:o=m(this,St),days:a=m(this,ht),hours:s=m(this,mt),minutes:l=m(this,pt),seconds:u=m(this,ft),milliseconds:h=m(this,gt),microseconds:p=m(this,yt),nanoseconds:y=m(this,kt)}=e;return new n(r,i,o,a,s,l,u,h,p,y)}negated(){return P(this,Le),Pt(this)}abs(){return P(this,Le),new n(Math.abs(m(this,ut)),Math.abs(m(this,dt)),Math.abs(m(this,St)),Math.abs(m(this,ht)),Math.abs(m(this,mt)),Math.abs(m(this,pt)),Math.abs(m(this,ft)),Math.abs(m(this,gt)),Math.abs(m(this,yt)),Math.abs(m(this,kt)))}add(t){return P(this,Le),vl("add",this,t)}subtract(t){return P(this,Le),vl("subtract",this,t)}round(t){if(P(this,Le),t===void 0)throw new TypeError("options parameter is required");let e=yn(this),r=typeof t=="string"?sr("smallestUnit",t):X(t),i=Ct(r,"largestUnit","datetime",void 0,["auto"]),{plainRelativeTo:o,zonedRelativeTo:a}=Ga(r),s=Or(r),l=Qt(r,"halfExpand"),u=Ct(r,"smallestUnit","datetime",void 0),h=!0;u||(h=!1,u="nanosecond");let p=Dn(e,u),y=!0;if(i||(y=!1,i=p),i==="auto"&&(i=p),!h&&!y)throw new RangeError("at least one of smallestUnit or largestUnit is required");if(Dn(i,u)!==i)throw new RangeError(`largestUnit ${i} cannot be smaller than smallestUnit ${u}`);let E={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[u];if(E!==void 0&&Fr(s,E,!1),s>1&&vn(u)==="date"&&i!==u)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");if(a){let C=_r(this),L=m(a,De),B=m(a,$),K=m(a,se);return C=vu(K,ui(K,L,B,C),L,B,i,s,u,l),vn(i)==="date"&&(i="hour"),Vt(C,i)}if(o){let C=on(this),L=Rr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},C.time),B=m(o,ce),K=m(o,$),W=$t(K,B,et(C.date,L.deltaDays),"constrain");return C=yu(we(B,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(W,L),K,i,s,u,l),Vt(C,i)}if(nn(e))throw new RangeError(`a starting point is required for ${e}s balancing`);if(nn(i))throw new RangeError(`a starting point is required for ${i}s balancing`);let T=on(this);if(u==="day"){let{quotient:C,remainder:L}=T.time.divmod(Do),B=T.date.days+C+gi(L,"day");B=Fn(B,s,l),T=En({years:0,months:0,weeks:0,days:B},_e.ZERO)}else T=En({years:0,months:0,weeks:0,days:0},Co(T.time,s,u,l));return Vt(T,i)}total(t){if(P(this,Le),t===void 0)throw new TypeError("options argument is required");let e=typeof t=="string"?sr("unit",t):X(t),{plainRelativeTo:r,zonedRelativeTo:i}=Ga(e),o=Ct(e,"unit","datetime",Sn);if(i){let s=_r(this),l=m(i,De),u=m(i,$),h=m(i,se);return function(p,y,E,T,C){return vn(C)==="time"?gi(_e.fromEpochNsDiff(y,p),C):dl(fu(p,y,E,T,C),y,Wt(E,p),E,T,C)}(h,ui(h,l,u,s),l,u,o)}if(r){let s=on(this),l=Rr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},s.time),u=m(r,ce),h=m(r,$),p=$t(h,u,et(s.date,l.deltaDays),"constrain");return function(y,E,T,C){if(Ar(y,E)==0)return 0;or(y),or(E);let L=pu(y,E,T,C);return C==="nanosecond"?S.default.toNumber(L.time.totalNs):dl(L,Ze(E),y,null,T,C)}(we(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(p,l),h,o)}let a=yn(this);if(nn(a))throw new RangeError(`a starting point is required for ${a}s total`);if(nn(o))throw new RangeError(`a starting point is required for ${o}s total`);return gi(on(this).time,o)}toString(t=void 0){P(this,Le);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour"||o==="minute")throw new RangeError('smallestUnit must be a time unit other than "hours" or "minutes"');let{precision:a,unit:s,increment:l}=$i(o,r);if(s==="nanosecond"&&l===1)return yo(this,a);let u=yn(this),h=_r(this),p=Co(h.time,l,s,i);return h=En(h.date,p),yo(Vt(h,Dn(u,"second")),a)}toJSON(){return P(this,Le),yo(this,"auto")}toLocaleString(t=void 0,e=void 0){if(P(this,Le),typeof Intl.DurationFormat=="function"){let r=new Intl.DurationFormat(t,e);return Js.call(r,this)}return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."),yo(this,"auto")}valueOf(){Un("Duration")}static from(t){return qt(t)}static compare(t,e,r=void 0){let i=qt(t),o=qt(e),a=X(r),{plainRelativeTo:s,zonedRelativeTo:l}=Ga(a);if(m(i,ut)===m(o,ut)&&m(i,dt)===m(o,dt)&&m(i,St)===m(o,St)&&m(i,ht)===m(o,ht)&&m(i,mt)===m(o,mt)&&m(i,pt)===m(o,pt)&&m(i,ft)===m(o,ft)&&m(i,gt)===m(o,gt)&&m(i,yt)===m(o,yt)&&m(i,kt)===m(o,kt))return 0;let u=yn(i),h=yn(o),p=_r(i),y=_r(o);if(l&&(vn(u)==="date"||vn(h)==="date")){let B=m(l,De),K=m(l,$),W=m(l,se),Q=ui(W,B,K,p),te=ui(W,B,K,y);return Tt(S.default.toNumber(S.default.subtract(Q,te)))}let E=p.date.days,T=y.date.days;if(nn(u)||nn(h)){if(!s)throw new RangeError("A starting point is required for years, months, or weeks comparison");E=ul(p.date,s),T=ul(y.date,s)}let C=p.time.add24HourDays(E),L=y.time.add24HourDays(T);return C.cmp(L)}};Cn(Pi,"Temporal.Duration");var xi=class{constructor(t,e,r="iso8601",i=1972){let o=ue(t),a=ue(e),s=_t(r===void 0?"iso8601":Be(r)),l=ue(i);ir(l,o,a),eu(this,{year:l,month:o,day:a},s)}get monthCode(){return kl(this,"monthCode")}get day(){return kl(this,"day")}get calendarId(){return P(this,Ft),m(this,$)}with(t,e=void 0){if(P(this,Ft),!Fe(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=Dt(r,m(this,ce),"month-day");return i=rr(r,i,zt(r,t,["year","month","monthCode","day"],[],"partial")),Sr(Mo(r,i,ye(X(e))),r)}equals(t){P(this,Ft);let e=tl(t);return ln(m(this,ce),m(e,ce))===0&&sn(m(this,$),m(e,$))}toString(t=void 0){return P(this,Ft),al(this,Hi(X(t)))}toJSON(){return P(this,Ft),al(this)}toLocaleString(t=void 0,e=void 0){return P(this,Ft),new Yt(t,e).format(this)}valueOf(){Un("PlainMonthDay")}toPlainDate(t){if(P(this,Ft),!Fe(t))throw new TypeError("argument should be an object");let e=m(this,$);return wt(jn(e,rr(e,Dt(e,m(this,ce),"month-day"),zt(e,t,["year"],[],[])),"constrain"),e)}static from(t,e=void 0){return tl(t,e)}};function kl(n,t){P(n,Ft);let e=m(n,ce);return ji(n).isoToDate(e,{[t]:!0})[t]}function Xa(n){return Wt(n,vs())}Cn(xi,"Temporal.PlainMonthDay");var ku={instant:()=>Jt(vs()),plainDateTimeISO:(n=ti())=>Ut(Xa(bt(n)),"iso8601"),plainDateISO:(n=ti())=>wt(Xa(bt(n)).isoDate,"iso8601"),plainTimeISO:(n=ti())=>wn(Xa(bt(n)).time),timeZoneId:()=>ti(),zonedDateTimeISO:(n=ti())=>{let t=bt(n);return Qe(vs(),t,"iso8601")},[Symbol.toStringTag]:"Temporal.Now"};Object.defineProperty(ku,Symbol.toStringTag,{value:"Temporal.Now",writable:!1,enumerable:!1,configurable:!0});var Ri=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0){let s=t===void 0?0:ue(t),l=e===void 0?0:ue(e),u=r===void 0?0:ue(r),h=i===void 0?0:ue(i),p=o===void 0?0:ue(o),y=a===void 0?0:ue(a);Uo(s,l,u,h,p,y),tu(this,{hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y})}get hour(){return P(this,He),m(this,Oe).hour}get minute(){return P(this,He),m(this,Oe).minute}get second(){return P(this,He),m(this,Oe).second}get millisecond(){return P(this,He),m(this,Oe).millisecond}get microsecond(){return P(this,He),m(this,Oe).microsecond}get nanosecond(){return P(this,He),m(this,Oe).nanosecond}with(t,e=void 0){if(P(this,He),!Fe(t))throw new TypeError("invalid argument");Nr(t);let r=cs(t,"partial"),i=cs(this),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:h}=Object.assign(i,r),p=ye(X(e));return{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:h}=jo(o,a,s,l,u,h,p),new n(o,a,s,l,u,h)}add(t){return P(this,He),El("add",this,t)}subtract(t){return P(this,He),El("subtract",this,t)}until(t,e=void 0){return P(this,He),fl("until",this,t,e)}since(t,e=void 0){return P(this,He),fl("since",this,t,e)}round(t){if(P(this,He),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn);return Fr(r,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o],!1),wn(gs(m(this,Oe),r,o,i))}equals(t){P(this,He);let e=On(t);return ys(m(this,Oe),m(e,Oe))===0}toString(t=void 0){P(this,He);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let{precision:a,unit:s,increment:l}=$i(o,r);return ol(gs(m(this,Oe),l,s,i),a)}toJSON(){return P(this,He),ol(m(this,Oe),"auto")}toLocaleString(t=void 0,e=void 0){return P(this,He),new Yt(t,e).format(this)}valueOf(){Un("PlainTime")}static from(t,e=void 0){return On(t,e)}static compare(t,e){let r=On(t),i=On(e);return ys(m(r,Oe),m(i,Oe))}};Cn(Ri,"Temporal.PlainTime");var Ai=class{constructor(t,e,r="iso8601",i=1){let o=ue(t),a=ue(e),s=_t(r===void 0?"iso8601":Be(r)),l=ue(i);ir(o,a,l),nu(this,{year:o,month:a,day:l},s)}get year(){return fn(this,"year")}get month(){return fn(this,"month")}get monthCode(){return fn(this,"monthCode")}get calendarId(){return P(this,Ke),m(this,$)}get era(){return fn(this,"era")}get eraYear(){return fn(this,"eraYear")}get daysInMonth(){return fn(this,"daysInMonth")}get daysInYear(){return fn(this,"daysInYear")}get monthsInYear(){return fn(this,"monthsInYear")}get inLeapYear(){return fn(this,"inLeapYear")}with(t,e=void 0){if(P(this,Ke),!Fe(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=Dt(r,m(this,ce),"year-month");return i=rr(r,i,zt(r,t,["year","month","monthCode"],[],"partial")),kr(bi(r,i,ye(X(e))),r)}add(t,e=void 0){return P(this,Ke),_l("add",this,t,e)}subtract(t,e=void 0){return P(this,Ke),_l("subtract",this,t,e)}until(t,e=void 0){return P(this,Ke),gl("until",this,t,e)}since(t,e=void 0){return P(this,Ke),gl("since",this,t,e)}equals(t){P(this,Ke);let e=ci(t);return ln(m(this,ce),m(e,ce))===0&&sn(m(this,$),m(e,$))}toString(t=void 0){return P(this,Ke),sl(this,Hi(X(t)))}toJSON(){return P(this,Ke),sl(this)}toLocaleString(t=void 0,e=void 0){return P(this,Ke),new Yt(t,e).format(this)}valueOf(){Un("PlainYearMonth")}toPlainDate(t){if(P(this,Ke),!Fe(t))throw new TypeError("argument should be an object");let e=m(this,$);return wt(jn(e,rr(e,Dt(e,m(this,ce),"year-month"),zt(e,t,["day"],[],[])),"constrain"),e)}static from(t,e=void 0){return ci(t,e)}static compare(t,e){let r=ci(t),i=ci(e);return ln(m(r,ce),m(i,ce))}};function fn(n,t){P(n,Ke);let e=m(n,ce);return ji(n).isoToDate(e,{[t]:!0})[t]}Cn(Ai,"Temporal.PlainYearMonth");var sm=Yt.prototype.resolvedOptions,Li=class{constructor(t,e,r="iso8601"){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");let i=Io(t),o=Be(e),{tzName:a,offsetMinutes:s}=Hn(o);if(s===void 0){let l=So(a);if(!l)throw new RangeError(`unknown time zone ${a}`);o=l.identifier}else o=zs(s);iu(this,i,o,_t(r===void 0?"iso8601":Be(r)))}get calendarId(){return P(this,pe),m(this,$)}get timeZoneId(){return P(this,pe),m(this,De)}get year(){return lt(this,"year")}get month(){return lt(this,"month")}get monthCode(){return lt(this,"monthCode")}get day(){return lt(this,"day")}get hour(){return Dr(this,"hour")}get minute(){return Dr(this,"minute")}get second(){return Dr(this,"second")}get millisecond(){return Dr(this,"millisecond")}get microsecond(){return Dr(this,"microsecond")}get nanosecond(){return Dr(this,"nanosecond")}get era(){return lt(this,"era")}get eraYear(){return lt(this,"eraYear")}get epochMilliseconds(){return P(this,pe),Kt(m(this,se),"floor")}get epochNanoseconds(){return P(this,pe),wu(m(this,se))}get dayOfWeek(){return lt(this,"dayOfWeek")}get dayOfYear(){return lt(this,"dayOfYear")}get weekOfYear(){return lt(this,"weekOfYear")?.week}get yearOfWeek(){return lt(this,"weekOfYear")?.year}get hoursInDay(){P(this,pe);let t=m(this,De),e=tn(this).isoDate,r=It(e.year,e.month,e.day+1),i=Ln(t,e),o=Ln(t,r);return gi(_e.fromEpochNsDiff(o,i),"hour")}get daysInWeek(){return lt(this,"daysInWeek")}get daysInMonth(){return lt(this,"daysInMonth")}get daysInYear(){return lt(this,"daysInYear")}get monthsInYear(){return lt(this,"monthsInYear")}get inLeapYear(){return lt(this,"inLeapYear")}get offset(){return P(this,pe),ls(bn(m(this,De),m(this,se)))}get offsetNanoseconds(){return P(this,pe),bn(m(this,De),m(this,se))}with(t,e=void 0){if(P(this,pe),!Fe(t))throw new TypeError("invalid zoned-date-time-like");Nr(t);let r=m(this,$),i=m(this,De),o=bn(i,m(this,se)),a=tn(this),s={...Dt(r,a.isoDate),...a.time,offset:ls(o)};s=rr(r,s,zt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset"],"partial"));let l=X(e),u=fi(l),h=vo(l,"prefer"),p=zi(r,s,ye(l)),y=Hr(s.offset);return Qe(_o(p.isoDate,p.time,"option",y,i,u,h,!1),i,r)}withPlainTime(t=void 0){P(this,pe);let e=m(this,De),r=m(this,$),i=tn(this).isoDate,o;return o=t===void 0?Ln(e,i):tt(e,we(i,m(On(t),Oe)),"compatible"),Qe(o,e,r)}withTimeZone(t){P(this,pe);let e=bt(t);return Qe(m(this,se),e,m(this,$))}withCalendar(t){P(this,pe);let e=Ui(t);return Qe(m(this,se),m(this,De),e)}add(t,e=void 0){return P(this,pe),Ml("add",this,t,e)}subtract(t,e=void 0){return P(this,pe),Ml("subtract",this,t,e)}until(t,e=void 0){return P(this,pe),yl("until",this,t,e)}since(t,e=void 0){return P(this,pe),yl("since",this,t,e)}round(t){if(P(this,pe),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];if(Fr(r,a,a===1),o==="nanosecond"&&r===1)return Qe(m(this,se),m(this,De),m(this,$));let s=m(this,De),l=m(this,se),u=tn(this),h;if(o==="day"){let p=u.isoDate,y=It(p.year,p.month,p.day+1),E=Ln(s,p),T=Ln(s,y),C=S.default.subtract(T,E);h=_e.fromEpochNsDiff(l,E).round(C,i).addToEpochNs(E)}else{let p=fs(u,r,o,i),y=bn(s,l);h=_o(p.isoDate,p.time,"option",y,s,"compatible","prefer",!1)}return Qe(h,s,m(this,$))}equals(t){P(this,pe);let e=li(t),r=m(this,se),i=m(e,se);return!!S.default.equal(S.default.BigInt(r),S.default.BigInt(i))&&!!ou(m(this,De),m(e,De))&&sn(m(this,$),m(e,$))}toString(t=void 0){P(this,pe);let e=X(t),r=Hi(e),i=Yi(e),o=function(y){return _n(y,"offset",["auto","never"],"auto")}(e),a=Qt(e,"trunc"),s=Ct(e,"smallestUnit","time",void 0);if(s==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let l=function(y){return _n(y,"timeZoneName",["auto","never","critical"],"auto")}(e),{precision:u,unit:h,increment:p}=$i(s,i);return cl(this,u,r,l,o,{unit:h,increment:p,roundingMode:a})}toLocaleString(t=void 0,e=void 0){P(this,pe);let r=X(e),i=Object.create(null);if(function(l,u,h,p){if(u==null)return;let y=Reflect.ownKeys(u);for(let E=0;E<y.length;E++){let T=y[E];if(!h.some(C=>Object.is(C,T))&&Object.prototype.propertyIsEnumerable.call(u,T)){let C=u[T];l[T]=C}}}(i,r,["timeZone"]),r.timeZone!==void 0)throw new TypeError("ZonedDateTime toLocaleString does not accept a timeZone option");if(i.year===void 0&&i.month===void 0&&i.day===void 0&&i.era===void 0&&i.weekday===void 0&&i.dateStyle===void 0&&i.hour===void 0&&i.minute===void 0&&i.second===void 0&&i.fractionalSecondDigits===void 0&&i.timeStyle===void 0&&i.dayPeriod===void 0&&i.timeZoneName===void 0&&(i.timeZoneName="short"),i.timeZone=m(this,De),ll(i.timeZone))throw new RangeError("toLocaleString does not currently support offset time zones");let o=new Yt(t,i),a=sm.call(o).calendar,s=m(this,$);if(s!=="iso8601"&&a!=="iso8601"&&!sn(a,s))throw new RangeError(`cannot format ZonedDateTime with calendar ${s} in locale with calendar ${a}`);return o.format(Jt(m(this,se)))}toJSON(){return P(this,pe),cl(this,"auto")}valueOf(){Un("ZonedDateTime")}startOfDay(){P(this,pe);let t=m(this,De);return Qe(Ln(t,tn(this).isoDate),t,m(this,$))}getTimeZoneTransition(t){P(this,pe);let e=m(this,De);if(t===void 0)throw new TypeError("options parameter is required");let r=_n(typeof t=="string"?sr("direction",t):X(t),"direction",["next","previous"],Sn);if(r===void 0)throw new TypeError("direction option is required");if(ll(e)||e==="UTC")return null;let i=m(this,se),o=r==="next"?Us(e,i):ds(e,i);return o===null?null:Qe(o,e,m(this,$))}toInstant(){return P(this,pe),Jt(m(this,se))}toPlainDate(){return P(this,pe),wt(tn(this).isoDate,m(this,$))}toPlainTime(){return P(this,pe),wn(tn(this).time)}toPlainDateTime(){return P(this,pe),Ut(tn(this),m(this,$))}static from(t,e=void 0){return li(t,e)}static compare(t,e){let r=li(t),i=li(e),o=m(r,se),a=m(i,se);return S.default.lessThan(S.default.BigInt(o),S.default.BigInt(a))?-1:S.default.greaterThan(S.default.BigInt(o),S.default.BigInt(a))?1:0}};function tn(n){return Wt(m(n,De),m(n,se))}function lt(n,t){P(n,pe);let e=tn(n).isoDate;return ji(n).isoToDate(e,{[t]:!0})[t]}function Dr(n,t){return P(n,pe),tn(n).time[t]}Cn(Li,"Temporal.ZonedDateTime");var xe=Object.freeze({__proto__:null,Duration:Pi,Instant:Ti,Now:ku,PlainDate:Ci,PlainDateTime:Ii,PlainMonthDay:xi,PlainTime:Ri,PlainYearMonth:Ai,ZonedDateTime:Li}),yp=class{toTemporalInstant(){return Jt(Xt(Date.prototype.valueOf.call(this)))}}.prototype.toTemporalInstant,cm=[Ti,Ci,Ii,Pi,xi,Ri,Ai,Li];for(let n of cm){let t=Object.getOwnPropertyDescriptor(n,"prototype");(t.configurable||t.enumerable||t.writable)&&(t.configurable=!1,t.enumerable=!1,t.writable=!1,Object.defineProperty(n,"prototype",t))}var lm="https://yuna-backend.cbocher.workers.dev/mews",um="https://api.mews.com/api/distributor/v1",dm="Yuna",hm="mewscache",mm=!1,pm=13,fm=8,gm=xe.Duration.from({minutes:20}).milliseconds,ym=new Headers({Accept:"application/json, text/plain, */*","Content-Type":"application/json; charset=utf-8"}),Re={base_url:lm,bookingEngine_url:um,bookingEngineClient:dm,bypassCache:mm,headers:ym,cache_key:hm,ttl:gm,beCheckInUTC:pm,beCheckOutUTC:fm};var Tu=(n,t,e)=>`${n}:${t}:${JSON.stringify(e)}`;var Zo=class{constructor(){O(this,"dbName","MewsAPICache");O(this,"version",2);O(this,"db",null);O(this,"initPromise",null);O(this,"performanceMetrics",[]);this.initPromise=this.init()}async init(){return new Promise((t,e)=>{try{let r=indexedDB.open(this.dbName,this.version);r.onerror=()=>{console.error("Failed to initialize IndexedDB:",r.error),e(r.error)},r.onsuccess=()=>{this.db=r.result,t()},r.onupgradeneeded=i=>{let o=i.target.result,{oldVersion:a}=i;if(a>0)try{o.objectStoreNames.contains("api_cache")&&o.deleteObjectStore("api_cache"),o.objectStoreNames.contains("performance_metrics")&&o.deleteObjectStore("performance_metrics")}catch(u){console.warn("Error cleaning up old stores:",u)}let s=o.createObjectStore("api_cache",{keyPath:"cacheKey"});s.createIndex("by-timestamp","timestamp"),s.createIndex("by-enterprise","enterpriseId"),s.createIndex("by-size","size"),o.createObjectStore("performance_metrics",{keyPath:"timestamp"}).createIndex("by-operation","operation")},r.onblocked=()=>{console.warn("IndexedDB upgrade blocked by another tab")}}catch(r){console.error("Failed to initialize IndexedDB:",r),e(r)}})}async ensureDB(){if(!this.db&&(await this.initPromise,!this.db))throw new Error("Failed to initialize IndexedDB");return this.db}calculateDataSize(t){try{return new Blob([JSON.stringify(t)]).size}catch{return 0}}recordPerformanceMetric(t,e,r,i){let o=performance.now()-e,a={operation:t,duration:o,timestamp:Date.now(),cacheHit:r,dataSize:i};this.performanceMetrics.push(a),this.performanceMetrics.length>1e3&&(this.performanceMetrics=this.performanceMetrics.slice(-1e3)),this.storeMetricAsync(a).catch(console.error)}async storeMetricAsync(t){try{let e=await this.ensureDB();return new Promise(r=>{let a=e.transaction("performance_metrics","readwrite").objectStore("performance_metrics").add(t);a.onerror=()=>r(),a.onsuccess=()=>r()})}catch{}}async get(t,e){let r=performance.now();try{let i=await this.ensureDB();return new Promise(o=>{let l=i.transaction("api_cache","readonly").objectStore("api_cache").get(t);l.onerror=()=>{this.recordPerformanceMetric("cache-miss",r,!1),o(null)},l.onsuccess=()=>{let u=l.result;if(!u){this.recordPerformanceMetric("cache-miss",r,!1),o(null);return}let h=e!==void 0?e:Re.ttl,p=xe.Instant.fromEpochMilliseconds(u.timestamp);if(xe.Now.instant().since(p,{smallestUnit:"milliseconds"}).milliseconds>h){this.delete(t).catch(console.error),this.recordPerformanceMetric("cache-expired",r,!1),o(null);return}this.recordPerformanceMetric("cache-hit",r,!0,u.size),o(u.data)}})}catch(i){return console.error("Error getting cached data:",i),this.recordPerformanceMetric("cache-error",r,!1),null}}async set(t,e,r){let i=performance.now();try{let o=await this.ensureDB(),a=this.calculateDataSize(e),s={cacheKey:t,data:e,timestamp:xe.Now.instant().epochMilliseconds,enterpriseId:r,size:a};return new Promise((l,u)=>{let y=o.transaction("api_cache","readwrite").objectStore("api_cache").put(s);y.onerror=()=>{this.recordPerformanceMetric("cache-write-error",i,!1),u(y.error)},y.onsuccess=()=>{this.recordPerformanceMetric("cache-write",i,!1,a),l()}})}catch(o){if(console.error("Error setting cached data:",o),this.recordPerformanceMetric("cache-write-error",i,!1),o instanceof Error&&o.name==="QuotaExceededError"){await this.cleanupOldEntries();try{let a=await this.ensureDB(),s={cacheKey:t,data:e,timestamp:xe.Now.instant().epochMilliseconds,enterpriseId:r,size:this.calculateDataSize(e)};return new Promise((l,u)=>{let y=a.transaction("api_cache","readwrite").objectStore("api_cache").put(s);y.onerror=()=>u(y.error),y.onsuccess=()=>l()})}catch(a){console.error("Error setting cached data after cleanup:",a)}}}}async delete(t){try{let i=(await this.ensureDB()).transaction("api_cache","readwrite").objectStore("api_cache");await new Promise((o,a)=>{let s=i.delete(t);s.onsuccess=()=>o(),s.onerror=()=>a(s.error)})}catch(e){console.error("Error deleting cached data:",e)}}async clearExpired(){let t=performance.now(),e=0;try{let r=await this.ensureDB(),i=xe.Now.instant().epochMilliseconds-Re.ttl,o=r.transaction("api_cache","readwrite"),a=o.objectStore("api_cache"),s=a.index("by-timestamp"),l=await new Promise((h,p)=>{let y=s.getAll(IDBKeyRange.upperBound(i));y.onsuccess=()=>h(y.result),y.onerror=()=>p(y.error)}),u=50;for(let h=0;h<l.length;h+=u){let p=l.slice(h,h+u);await Promise.all(p.map(y=>new Promise((E,T)=>{let C=a.delete(y.cacheKey);C.onsuccess=()=>E(),C.onerror=()=>T(C.error)}))),e+=p.length,h+u<l.length&&await new Promise(y=>setTimeout(y,0))}await new Promise((h,p)=>{o.oncomplete=()=>h(),o.onerror=()=>p(o.error)}),this.recordPerformanceMetric("cache-cleanup",t,!1)}catch(r){console.error("Error clearing expired cache:",r)}return e}async cleanupOldEntries(t=1e3){try{let r=(await this.ensureDB()).transaction("api_cache","readwrite"),i=r.objectStore("api_cache"),o=i.index("by-timestamp"),a=await new Promise((s,l)=>{let u=o.getAll();u.onsuccess=()=>s(u.result),u.onerror=()=>l(u.error)});if(a.length>t){let s=a.slice(0,a.length-t);await Promise.all(s.map(l=>new Promise((u,h)=>{let p=i.delete(l.cacheKey);p.onsuccess=()=>u(),p.onerror=()=>h(p.error)})))}await new Promise((s,l)=>{r.oncomplete=()=>s(),r.onerror=()=>l(r.error)})}catch(e){console.error("Error cleaning up old entries:",e)}}async clearAll(){try{let r=(await this.ensureDB()).transaction("api_cache","readwrite").objectStore("api_cache");await new Promise((i,o)=>{let a=r.clear();a.onsuccess=()=>i(),a.onerror=()=>o(a.error)})}catch(t){console.error("Error clearing all cache:",t)}}async getCacheStats(){try{let r=(await this.ensureDB()).transaction("api_cache","readonly").objectStore("api_cache"),i=await new Promise((a,s)=>{let l=r.getAll();l.onsuccess=()=>a(l.result),l.onerror=()=>s(l.error)}),o={totalEntries:i.length,totalSize:i.reduce((a,s)=>a+(s.size||0),0),oldestEntry:i.length>0?Math.min(...i.map(a=>a.timestamp)):null,newestEntry:i.length>0?Math.max(...i.map(a=>a.timestamp)):null,entriesByEnterprise:{}};return i.forEach(a=>{let s=a.enterpriseId||"unknown";o.entriesByEnterprise[s]=(o.entriesByEnterprise[s]||0)+1}),o}catch(t){return console.error("Error getting cache stats:",t),{totalEntries:0,totalSize:0,oldestEntry:null,newestEntry:null,entriesByEnterprise:{}}}}getPerformanceMetrics(){return[...this.performanceMetrics]}getAveragePerformance(){let t=this.performanceMetrics,e=t.filter(o=>o.operation==="cache-hit"),r=t.filter(o=>o.operation==="cache-miss"),i=t.filter(o=>o.operation==="cache-write");return{averageCacheHitTime:e.length>0?e.reduce((o,a)=>o+a.duration,0)/e.length:0,averageCacheMissTime:r.length>0?r.reduce((o,a)=>o+a.duration,0)/r.length:0,averageWriteTime:i.length>0?i.reduce((o,a)=>o+a.duration,0)/i.length:0,cacheHitRate:e.length+r.length>0?e.length/(e.length+r.length):0,totalOperations:t.length}}async performMaintenance(){try{setTimeout(async()=>{await this.clearExpired(),(await this.getCacheStats()).totalEntries>2e3&&await this.cleanupOldEntries(1500)},0)}catch(t){console.error("Error during cache maintenance:",t)}}};var Ue=async(n,t,e=null,r=!1)=>{let i=new Zo,o=Tu(n,e||"null",t.body);if(!Re.bypassCache){let a=await i.get(o);if(a)return a}try{let a=new URL(Re.base_url);r&&(a.pathname=a.pathname.replace("/mews","/_adapter")),a.pathname+=n,a.searchParams.set("enterprise",e||"null");let s=await fetch(a.toString(),t),l=await s.json();if(s.ok)return i.set(o,l,e||"null").catch(u=>{console.error("Error setting cache:",u)}),l;throw new Error("FETCH_ERROR",{cause:l})}catch(a){throw a instanceof Error?console.error(`${a.name} [${n}]`,a.cause):console.error(a),a}};var Cu=(n,t={})=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/services/getAll",e,n)};function Iu(n){return n.Services.map(t=>({id:t.Id,enterpriseId:t.EnterpriseId,isActive:t.IsActive,name:Nt(t.Names),startTime:t.StartTime,endTime:t.EndTime,type:t.Type,ordering:t.Ordering}))}var Xs=$e({});async function Pu(n){if(Xs.value[n])return Xs.value[n];let t=await Cu(n),e=Iu(t);return Xs.value[n]=e,e}var xu=(n,t)=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/ageCategories/getAll",e,n)};function Ru(n){if(!n||!n.AgeCategories||!Array.isArray(n.AgeCategories))throw new Error("Invalid age categories response format");return n.AgeCategories.map(t=>({id:t.Id,name:Nt(t.Names),shortName:t.ShortNames?Nt(t.ShortNames):null,classification:t.Classification,isActive:t.IsActive,maximalAge:t.MaximalAge,minimalAge:t.MinimalAge,serviceId:t.ServiceId}))}var Qs=$e({});async function Au(n){if(Qs.value[n])return Qs.value[n];let t=await xu(n,{EnterpriseIds:[n]}),e=Ru(t);return Qs.value[n]=e,e}var Lu=(n,t)=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/products/getAll",e,n)};function vm(n){if(!n||!n.Enterprise||!n.Enterprise.Id||!n.Enterprise.Name||!n.Enterprise.Address||!n.Enterprise.WebsiteUrl)throw new Error("Invalid configuration data");let t=n.Enterprise;return{id:t.Id,name:t.Name,chainName:t.ChainName,address:t.Address,phone:t.Phone,email:t.Email,timezone:t.TimeZoneIdentifier,url:t.WebsiteUrl,pricing:t.Pricing,coverImageId:t.CoverImageId,logoImageId:t.LogoImageId}}function Nu(n){return $r(n,vm)}function Ou(n){return{currency:n.Currency,datesUtc:n.DatesUtc.map(t=>t.split("T")[0]),timeUnitStartsUTC:n.TimeUnitStartsUtc,categoryPrices:n.CategoryPrices,relativeAdjustment:n.RelativeAdjustment,absoluteAdjustment:n.AbsoluteAdjustment}}function Fu(n){let t={};for(let e of n)e.pricing?.datesUtc.forEach((r,i)=>{t[r]=t[r]||[],t[r].push({rate:e.rate,categoryPrices:e.pricing?.categoryPrices.map(o=>({categoryId:o.CategoryId,amountPrice:o.AmountPrices[i],price:o.Prices[i]}))||[]})});return t}function Hu(n){if(!n||!n.Rates||!Array.isArray(n.Rates))throw new Error("Invalid rates response format");return n.Rates.filter(t=>t.IsActive&&t.IsEnabled&&t.IsPublic).map(t=>({id:t.Id,serviceId:t.ServiceId,baseRateId:t.BaseRateId,isBaseRate:t.IsBaseRate,isActive:t.IsActive,isEnabled:t.IsEnabled,isPublic:t.IsPublic,isDefault:t.IsDefault,type:t.Type,name:Nt(t.Names),shortName:t.ShortName,description:Nt(t.Description),hideFromGuest:t.Options.HidePriceFromGuest,group:n.RateGroups.find(e=>e.Id===t.GroupId)||null,pricing:t.Pricing}))}function $r(n,t){return n.map(t)}function ec(n){return{id:n.Id,serviceId:n.ServiceId,categoryId:n.CategoryId,isActive:n.IsActive,isDefault:n.IsDefault,name:Nt(n.Names),shortName:Nt(n.ShortNames),description:Nt(n.Descriptions),options:n.Options,promotions:n.Promotions,classifications:n.Classifications,pricing:n.Pricing,imageIds:n.ImageIds||[],ordering:n.Ordering,consumptionMoment:n.ConsumptionMoment,chargingMode:n.ChargingMode}}function Yu(n){return{products:$r(n.Products,ec),customerProducts:$r(n.CustomerProducts,ec)}}var tc=$e({});async function $u(n,t){if(tc.value[t])return tc.value[t];let e=await Lu(n,{ServiceIds:[t]}),r=Yu(e);return tc.value[t]=r,r}var ju=(n,t={})=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/rates/getAll",e,n)};var nc=$e({});async function zu(n,t){if(nc.value[t])return nc.value[t];let e=await ju(n,{ServiceIds:[t]}),r=Hu(e);return nc.value[t]=r,r}var Bu=(n,t)=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/services/getAvailability",e,n)};function Uu(n){if(!n||!n.CategoryAvailabilities||!Array.isArray(n.CategoryAvailabilities)||!n.TimeUnitStartsUtc)throw new Error("Invalid service availabilities response format");return n.CategoryAvailabilities.map(t=>({categoryId:t.CategoryId,timeUnitStartsUTC:n.TimeUnitStartsUtc,availabilities:t.Availabilities||[],adjustments:t.Adjustments||[]}))}var ne=class n{static getCurrentDate(){return xe.Now.plainDateISO()}static fromString(t){return xe.PlainDate.from(this.safeParsePlainDate(t))}static formatForDisplay(t,e={weekday:"short",month:"short",day:"numeric"}){return t.toLocaleString(xn,e)}static formatForAPI(t){return(typeof t=="string"?xe.PlainDate.from(t):xe.PlainDate.from(t)).toZonedDateTime({timeZone:"Europe/Paris",plainTime:xe.PlainTime.from("00:00")}).toInstant().toString()}static addDays(t,e){return t.add({days:e})}static daysBetween(t,e){return t.until(e).days}static isBefore(t,e){return xe.PlainDate.compare(t,e)>0}static isAfterOrEqual(t,e){return xe.PlainDate.compare(t,e)<0}static isSameDate(t,e){return xe.PlainDate.compare(t,e)===0}static getDateRange(t,e){let r=[],i=t;for(;this.isBefore(i,e);)r.push(i),i=this.addDays(i,1);return r}static fromJSDate(t){return xe.PlainDate.from({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()})}static toJSDate(t){return new Date(t.year,t.month-1,t.day)}static formatForCalendar(t,e="flatpickr"){if(e==="flatpickr")return t.toString();let r=String(t.day).padStart(2,"0"),i=String(t.month).padStart(2,"0");return`${r}/${i}/${t.year}`}static safeParsePlainDate(t){try{if(t.endsWith("Z")){let e=t.split("T")[0];return xe.PlainDate.from(e)}return xe.PlainDate.from(t)}catch(e){return console.error("Error parsing date string:",e),n.getCurrentDate()}}};var zf=localStorage.getItem("dev")==="true";var Bf=3*60*60*1e3;var Vu="AIzaSyBXRY4Jk6cEaWaodqBa6Cdhieejw6l8c2Y",rc=n=>`<svg fill="none" viewBox="0 0 39 54" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="39" height="54"><g clip-path="url(#a)"><path d="M19.5 54c-3.288-5.01-6.676-10.098-9.998-15.089-5.629-8.454-12.375-16.188-8.21-26.975 6.346-16.433 31.605-15.72 36.813 1.032 3.279 10.541-3.101 17.728-8.572 25.946C26.199 43.92 22.754 48.944 19.5 54M18.159 7.484c-6.38.612-10.57 6.87-8.985 12.636 2.37 8.625 14.983 10.184 19.623 2.429 4.386-7.333-1.826-15.91-10.64-15.065z" fill="${n}"/></g><path fill="#fff" d="M34.225 18.783A14.725 14.87 0 0 1 19.5 33.653a14.725 14.87 0 0 1-14.725-14.87 14.725 14.87 0 0 1 29.45 0"/><path fill="url(#b)" d="M12.735 10.174h14.326v14.87H12.735z"/><defs><clipPath id="a"><path fill="#fff" d="M0 0h39v54H0z"/></clipPath><pattern height="1" id="b" patternContentUnits="objectBoundingBox" width="1"><use transform="matrix(.01408 0 0 .01357 0 .025)" xlink:href="#c"/></pattern><image height="70" id="c" preserveAspectRatio="none" width="71" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEcAAABGCAYAAACe7Im6AAAACXBIWXMAABYlAAAWJQFJUiTwAAAGgklEQVR4nO2cWYwURRiAv53lcLniFTFeQQtFAyqBrWhEEUqNhgchJopoPMCIIoqiQER8QLOgRg4V1MADGtFEjIICHkgsISDEVBBNICpaEdTAA9EoIIsIjA81s8wOc3RXV+9uWL4npqv+g5+6+q+/qclms5zgKFqKOcAFwMYOre1MG6QDcCMwPNPanrQltBR1wF6gFphZc2JaObQUY4FpwHnAPmVs93Y/rbQUfYGFwFUFj28DaNcjR0sxEZhT9HizMnYAuMWn3aGl6AksAoaVaL47/4d2FRwtRT3uL38v0L1El0+UsVvyP9pNcLQU44DXqnR7tPDHcR8cLUUNsAC4v0rX+crYnwsfHNfByQXmO+DSKl33A1OLHx63h0AtxXXAcqoHBmCyMnZf8cPjbivXUnQEXgEejCiyQxnbq1RDs5GjpTgpmWttgluIHhiAh8o1NI0cLcWVwArgb2AL8DmwVhm71d/PlkNLMQaYBHQBugGnRRDboIwdVK6xJpvNoqU4BdgFdC7RZxPQoIz9ML7L6aOl6ALMA8Z4iA9Qxm4u15ifVqsoHRiAgcAyLcV7WorTPRxIm0HAHR5yiysFBiCTm04ygrJbgc25/q2OlqJWS7EI6AV8EFP8EPBEtU4ZYHgMpecAG7UU/WI6E5TcxrERGI17o74zpopnlLG7q3XKAFfEd48JHjJB0FJ0Ar4m2mgvxV7gxSgdM8CZHgZ8HQvBV8BlCeSnKmP/jdIxQ/mFuBL9tRRRTp5B0VIsAeoTqPhVGftq1M4Z4IinoZGecl5oKRrIZegSEGu7zwD/eRoa31Inai3FcFx+NwnrlLFfxBHI4LY1H04GxnnKRkZLcTbwfgBV1VIWx5ABTk1gcEbO+TRZTvLUylvK2B/jCmWAHQmM1gFfpjW9tBTTgAEJ1TQCE30EM0DFI3QELgTWaSlqE+pphpZCAg0BVDUoY//0EcwAXoJF1AOfBdBTyMoAOnYoY2f6CmdwczoE12spxodQpKV4CTgjgKrJSYTzKYtluOlxEdAxgb7DQNeoJ9BSaCluwOWSkrJdGXt+EgX5lMUoZWw/kjtVS4XMWjW0FD0Is20D3JVUQQZAGXsg9zvErpNkEV0B9Ajgw3pl7PqkSppyyFqK7sCQpAqBLlqKm+IKaSleAAYHsA8wKoSSwgT7SNy0CMHzcTprKW4HpgSy/boy9vcQivILci2wHZfMCkUfZey2ap20FL2AXwLZPKSMTbKhNCM/cvoQNjAAcyP2+zSgzUkBdTUFJ+jpNscwLcXllTpoKRYAFweyt0sZ+3IgXcDR4HwPrA6pOMe75Rq0FEOAsQFtBTmAFtLsOlhLMR13W9gzoI1JytjZhQ+0FBlgD9A1kI2yV7pJaHYdrIydDvTGXZKFYpaW4tyiZ4sJFxiApwLqaqJsIYGW4jngyUB2Nilj63N6++Kum0OxSxl7VkB9TZQtQVHGTgVClWAMzFVWAcwPpDNP4teEclQsQcm9BK4CagLYagRG4FIRoc4iTSMyDSoWLyljVxNuR6kDlgAHA+kDvzvyyEQqXtJSbMOlNNoSHyljR6RpIGrZW8jzSChi3ybEJVJwlLFrgBnpuhKLN6IUAiQlcsGkMvZp4PEUfYnDwy1hJFY1qTJ2LjAUCJIS8GShMnZ/SxiKXWqbm2L9cdUOrcE7LWXIqw5ZGfuHMvZqYE1YdyLhnbyPS6IibWXsUOAbT/Ej+FV4dPO0F5sQFezXAOs85LLAPx5ywTJ91UgcHGXsfmXsYFy11RBckXTh/ftuSo+QWlzNcNz3t9883PQilfJ+LcUU3A3ASlyx9AOEGaU7lbFpV3U0kdaHIctxp+o+wH34TZ9iDtLCJ/VUgqOM/QF383kJLjBZXBWnbxXZQkAoYz8O42E0UvneSktxD+5TQXCVYx1w//I1uPv0qAn9tcBjythvA7sYibQ+RiusDs/b6ITL6Ryi9PeVxbypjB0d2rE4BA9Oroi6d5nmOtzIye8C5ZJojcAjgV2LTRprzs24IBRzGPgLN3L2UXn9mV3qy7mWJo3gXFvBVn7t6YybZqXYw7EfwrcKaQSn1KgBN4W64U64NbjR01iiX0fg7VytTquSxoJ8oEp7vgbocJn2Olz5bzU9qZNGcKIWYFYqlJqnjA2ZiPcijWm1M4COVg8MpBOcnxLKzwKWhnAkKWlMK9+i76W4LXxDSGeSkNZb+VjgWVxKohKNwFZgQuH/PtJW+B8ku7Vobv83DwAAAABJRU5ErkJggg=="/></defs></svg>`,ic={accent_color:"#C64509",info_window_max_width:200},Go="calendar-day-price",qu="DD/MM/YYYY",Wu="Y-m-d",oc=!1,wm=365,ac=ne.getCurrentDate(),Ku=ne.addDays(ac,wm),Jo=ne.getCurrentDate(),sc=ne.addDays(Jo,3),bm=ne.getCurrentDate(),Uf=ne.addDays(bm,30);var Zu=6;function Xo(n=!0,t=document.body){t.querySelectorAll('[data-fs-element="preloader"]').forEach(r=>{r.classList.toggle("hide",!n)})}function cc(n=!0,t=document.body,e=mn("fatalErrorMessage")){t.querySelectorAll('[data-fs-element="preloader"]').forEach(i=>{let o=i.querySelector('[data-fs-element="spinner"]'),a=i.querySelector('[data-fs-element="message"]'),s=i.firstChild;o&&o.classList.toggle("hide",n),a&&(n?(s.style.width="90%",a.textContent=e):(s.removeAttribute("style"),a.textContent=mn("pleaseWait"))),i.classList.toggle("hide",!n)})}function Gu(n,t){document.addEventListener(n,t)}var lc=class{constructor(){O(this,"state",vr({appartmentsData:[],today:ne.getCurrentDate(),lowestPricesByDate:{},isLoadingPrices:!1,isLoadingData:!1}))}setAppartmentsData(t){this.state.appartmentsData=t}setLowestPricesByDate(t){this.state.lowestPricesByDate=t}setLoadingPrices(t){this.state.isLoadingPrices=t}setLoadingData(t){this.state.isLoadingData=t}reset(){this.state.appartmentsData=[],this.state.lowestPricesByDate={},this.state.isLoadingPrices=!1,this.state.isLoadingData=!1}},tg=new lc;var hr={get:n=>{try{let t=localStorage.getItem(n);return t?JSON.parse(t):null}catch(t){return console.error(`Error reading from localStorage for key ${n}:`,t),null}},set:(n,t)=>{try{localStorage.setItem(n,JSON.stringify(t)),hr.touch()}catch(e){console.error(`Error writing to localStorage for key ${n}:`,e)}},update:(n,t)=>{let e=hr.get(n),r=t(e);hr.set(n,r)},remove:n=>{localStorage.removeItem(n),hr.touch()},clear:()=>{localStorage.clear()},has:n=>localStorage.getItem(n)!==null,touch:()=>{localStorage.setItem("lastUpdater",Dm()||"root")}},Dm=()=>localStorage.getItem("lastUpdater");var Qo=n=>{let t=new Date;return t.setDate(t.getDate()+n),t.toISOString().split("T")[0]},Vn=hr.get("form_state"),Ju=Vn?{enterpriseId:Vn.enterpriseId||"",startDate:Vn.startDate||Qo(45),endDate:Vn.endDate||Qo(48),guests:Vn.guests||2,coupon:Vn.coupon||"",referrer:Vn.referrer||window.location.href,rooms:Vn.rooms||0}:{enterpriseId:"",startDate:Qo(45),endDate:Qo(48),guests:2,coupon:"",referrer:window.location.href,rooms:0},Ye=vr(Ju),Em=go(Ju);Hc(()=>{hr.set("form_state",Ye)});var _m="data-fs-element";var Je=(n,t=document)=>t.querySelector(`[${_m}="${n}"]`);var uc=$e({});async function Xu(n,t,e,r){if(uc.value[t])return uc.value[t];let i=await Bu(n,{ServiceId:t,FirstTimeUnitStartUtc:ne.formatForAPI(e),LastTimeUnitStartUtc:ne.formatForAPI(r)}),o=Uu(i);return uc.value[t]=o,o}var Qu=(n,t)=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/restrictions/getAll",e,n)};function ed(n){if(!n||!n.Restrictions||!Array.isArray(n.Restrictions))throw new Error("Invalid service restrictions response format");return n.Restrictions}var dc=$e({});async function td(n,t,e,r){if(dc.value[t])return dc.value[t];let i=await Qu(n,{ServiceIds:[t],CollidingUtc:{StartUtc:ne.formatForAPI(e),EndUtc:ne.formatForAPI(r)},Origin:"User"}),o=ed(i);return dc.value[t]=o,o}var nd=(n,t)=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/rules/getAll",e,n)};function rd(n){if(!n||!n.Rules||!Array.isArray(n.Rules))throw new Error("Invalid service rules response format");return n.Rules.map(t=>({id:t.Id,serviceId:t.ServiceId,conditions:t.Conditions,actions:n.RuleActions!=null?n.RuleActions.filter(e=>e.RuleId===t.Id):n.RuleActions}))}var hc=$e({});async function id(n,t){if(hc.value[t])return hc.value[t];let e=await nd(n,{ServiceIds:[t],Extent:{RuleActions:!0}}),r=rd(e);return hc.value[t]=r,r}var od=(n,t)=>{let e={method:"POST",headers:Re.headers,body:JSON.stringify(t)};return Ue("/rates/getPricing",e,n)};var mc=$e({});async function ad(n,t,e,r){if(mc.value[t])return mc.value[t];let i=await od(n,{RateId:t,FirstTimeUnitStartUtc:ne.formatForAPI(e),LastTimeUnitStartUtc:ne.formatForAPI(r)}),o=Ou(i);return mc.value[t]=o,o}var ea=class{constructor(t,e){O(this,"enterprise");O(this,"rate",null);O(this,"pricing",null);this.enterprise=t,this.rate=e}getRate(){if(!this.rate)throw new Error("Rate is not initialized");return this.rate}async initPricing(t,e){if(!this.rate)throw new Error("Rate is not initialized");return this.pricing=await ad(this.enterprise.getEnterpriseId(),this.rate.id,t,e),this.pricing}getPricing(){if(!this.pricing)throw new Error("Rate pricing is not initialized");return this.pricing}};var ta=class{constructor(t,e){O(this,"enterprise");O(this,"service",null);O(this,"products",[]);O(this,"customerProducts",[]);O(this,"restrictions",[]);O(this,"availabilities",[]);O(this,"rules",[]);O(this,"ageCategories",[]);O(this,"rates",[]);this.enterprise=t,this.service=e}getService(){return this.service}async initAvailabilities(t,e){if(!this.service)throw new Error("Service is not initialized");return this.availabilities=await Xu(this.enterprise.getEnterpriseId(),this.service.id,t,e),this.availabilities}getAvailabilities(){if(this.availabilities.length===0)throw new Error("Service availabilities are not initialized");return this.availabilities}async initRestrictions(t,e){if(!this.service)throw new Error("Service is not initialized");return this.restrictions=await td(this.enterprise.getEnterpriseId(),this.service.id,t,e),this.restrictions}getRestrictions(){if(this.restrictions.length===0)throw new Error("Service restrictions are not initialized");return this.restrictions}async initProducts(){if(!this.service)throw new Error("Service is not initialized");let t=await $u(this.enterprise.getEnterpriseId(),this.service.id);return this.products=t.products,this.customerProducts=t.customerProducts,t}getProducts(){if(this.products.length===0)throw new Error("Service products are not initialized");return this.products}async initRates(){if(!this.service)throw new Error("Service is not initialized");let t=await zu(this.enterprise.getEnterpriseId(),this.service.id);if(this.rates=t.map(e=>new ea(this.enterprise,e)),this.rates.length===0)throw new Error("No rates found for the service");return this.rates}getRates(){if(this.rates.length===0)throw new Error("Service rates are not initialized");return this.rates?.map(t=>t.getRate())||[]}async initRules(){if(!this.service)throw new Error("Service is not initialized");return this.rules=await id(this.enterprise.getEnterpriseId(),this.service.id),this.rules}getRules(){if(this.rules.length===0)throw new Error("Service rules are not initialized");return this.rules}async initAgeCategories(){if(!this.service)throw new Error("Service is not initialized");return this.ageCategories=await Au(this.enterprise.getEnterpriseId()),this.ageCategories}getAgeCategories(){if(this.ageCategories.length===0)throw new Error("Age categories are not initialized");return this.ageCategories}};var na=class{constructor(t){O(this,"enterpriseId");O(this,"services",[]);O(this,"reservableService",null);this.enterpriseId=t}async initServices(){this.services=await Pu(this.enterpriseId);let t=this.services.find(e=>e.type.toLowerCase()==="reservable");return t&&(this.reservableService=new ta(this,t)),this.services}getEnterpriseId(){return this.enterpriseId}getServices(){return this.services}getReservableService(){return this.reservableService?.getService()??null}};function sd(n,t){return{rate:n,pricing:t}}function pc(n){return n.isActive&&n.isEnabled&&n.isPublic&&!n.hideFromGuest}function cd(n,t){let e=t.filter(o=>Mm(n,o.Conditions));return!!(e.some(o=>{let{Exceptions:a}=o;return a.MaxAdvance==null&&a.MinAdvance==null&&a.MaxLength==null&&a.MinLength==null&&a.MaxPrice==null&&a.MinPrice==null&&a.MaxReservationCount==null&&a.MinReservationCount==null})||e.some(o=>Sm(n,o.Exceptions)))}function Mm(n,t){return(t.ExactRateId===null||n.rate.id===t.ExactRateId)&&(t.BaseRateId===null||n.rate.baseRateId===t.BaseRateId)&&(t.ExactRateId===null||n.rate.baseRateId===t.ExactRateId)&&(t.RateGroupId===null||n.rate.group?.Id===t.RateGroupId)&&t.ResourceCategoryId===null&&t.ResourceCategoryType===null&&n.pricing?.datesUtc.every(e=>{let r=ne.fromString(e);return t.Days.includes(r.toLocaleString("en-US",{weekday:"long"}))})&&!0}function ra(n){if(!n)return null;try{return xe.Duration.from(n).total({unit:"days"})}catch{return null}}function Sm(n,t){let e=ne.fromString(n.pricing?.datesUtc[0]),r=ne.fromString(n.pricing?.datesUtc.at(-1));if(!e||!r)return console.warn("Missing date information, cannot check restrictions"),!0;let i=r.since(e,{largestUnit:"day"}).days,o=ne.getCurrentDate(),a=e.since(o,{largestUnit:"day"}).days,s=ra(t.MinAdvance),l=ra(t.MaxAdvance),u=ra(t.MinLength),h=ra(t.MaxLength);return!!(u&&i<u||h&&i>h||s&&a<s||l&&a>l||!t.MinLength&&!t.MaxLength&&!t.MinAdvance&&!t.MaxAdvance)}var ld=(n,t)=>{let e=n.find(s=>s.rate.isBaseRate),r=n.filter(s=>!cd(s,t)&&pc(s.rate)),i=Object.groupBy(r,s=>s.rate.group?.Name||"unknown"),o=Fu(r),a=km(o);return{baseRate:e,allowedRates:r,groupedRates:i,datedPrices:o,lowestDatedPrices:a}};function km(n){let t={};for(let[e,r]of Object.entries(n)){let i=1/0,o=r.filter(a=>pc(a.rate));for(let a of o)for(let s of a.categoryPrices)s.price<i&&(i=s.price);i!==1/0&&(t[e]=i)}return t}var fc=async n=>{let t=await Promise.all(n.map(async r=>{let i=new na(r);await i.initServices();let o=i.reservableService;if(!o){console.error("No reservable service found for the enterprise.");return}await o.initRates();let a=[],s=await Promise.all(o.rates.map(async u=>{let h=await u.initPricing(ne.formatForAPI(ac.toString()),ne.formatForAPI(Ku.toString()));return sd(u.getRate(),h)}));return ld(s,a).lowestDatedPrices})),e={};for(let r of t)if(r)for(let[i,o]of Object.entries(r))(!e[i]||o<e[i])&&(e[i]=o);return e};var qe=class qe extends Date{constructor(e=null,r="YYYY-MM-DD",i="en-US"){super(qe.parseDateTime(e,r,i));O(this,"lang");this.lang=i}static parseDateTime(e,r="YYYY-MM-DD",i="en-US"){if(!e)return new Date(new Date().setHours(0,0,0,0));if(e instanceof qe)return e.toJSDate();if(e instanceof Date)return e;if(/^-?\d{10,}$/.test(String(e)))return new Date(Number(e));if(typeof e=="string"){let o=[],a=null;for(;(a=qe.regex.exec(r))!=null;)a[1]!=="\\"&&o.push(a);if(o.length){let s={year:null,month:null,shortMonth:null,longMonth:null,day:null,hour:0,minute:0,second:0,ampm:null,value:""};o[0].index>0&&(s.value+=".*?");for(let[u,h]of Object.entries(o)){let p=Number(u),{group:y,pattern:E}=qe.formatPatterns(h[0],i);s[y]=p+1,s.value+=E,s.value+=".*?"}let l=new RegExp(`^${s.value}$`);if(l.test(e)){let u=l.exec(e),h=Number(u[s.year]),p=null;s.month?p=Number(u[s.month])-1:s.shortMonth?p=qe.shortMonths(i).indexOf(u[s.shortMonth]):s.longMonth&&(p=qe.longMonths(i).indexOf(u[s.longMonth]));let y=Number(u[s.day])||1,E=Number(u[s.hour]),T=Number.isNaN(E)?0:E,C=Number(u[s.minute]),L=Number.isNaN(C)?0:C,B=Number(u[s.second]),K=Number.isNaN(B)?0:B,W=u[s.ampm];return W&&W==="PM"&&(T+=12,T===24&&(T=0)),new Date(h,p,y,T,L,K,0)}}}return new Date(new Date().setHours(0,0,0,0))}static shortMonths(e){return qe.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"short"}))}static longMonths(e){return qe.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"long"}))}static formatPatterns(e,r){switch(e){case"YY":case"YYYY":return{group:"year",pattern:`(\\d{${e.length}})`};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:`(${qe.shortMonths(r).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${qe.longMonths(r).join("|")})`};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"};case"h":case"H":return{group:"hour",pattern:"(\\d{1,2})"};case"hh":case"HH":return{group:"hour",pattern:"(\\d{2})"};case"m":return{group:"minute",pattern:"(\\d{1,2})"};case"mm":return{group:"minute",pattern:"(\\d{2})"};case"s":return{group:"second",pattern:"(\\d{1,2})"};case"ss":return{group:"second",pattern:"(\\d{2})"};case"a":case"A":return{group:"ampm",pattern:"(AM|PM|am|pm)"}}}getWeek(e){let r=new Date(this.midnight_ts(this)),i=(this.getDay()+(7-e))%7;r.setDate(r.getDate()-i);let o=r.getTime();return r.setMonth(0,1),r.getDay()!==e&&r.setMonth(0,1+(4-r.getDay()+7)%7),1+Math.ceil((o-r.getTime())/6048e5)}clone(){return new qe(this)}toJSDate(){return new Date(this)}inArray(e,r="[]"){return e.some(i=>i instanceof Array?this.isBetween(i[0],i[1],r):this.isSame(i,"day"))}isBetween(e,r,i="()"){switch(i){default:case"()":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(r);case"[)":return this.midnight_ts(this)>=this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(r);case"(]":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<=this.midnight_ts(r);case"[]":return this.midnight_ts()>=this.midnight_ts(e)&&this.midnight_ts()<=this.midnight_ts(r)}}isBefore(e,r="days"){switch(r){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return e.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")}isSameOrBefore(e,r="days"){switch(r){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")}isAfter(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(e.getFullYear(),e.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>e.getFullYear()}throw new Error("isAfter: Invalid unit!")}isSameOrAfter(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")}isSame(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")}add(e,r="days"){switch(r){case"day":case"days":this.setDate(this.getDate()+e);break;case"month":case"months":this.setMonth(this.getMonth()+e)}return this}subtract(e,r="days"){switch(r){case"day":case"days":this.setDate(this.getDate()-e);break;case"month":case"months":this.setMonth(this.getMonth()-e)}return this}diff(e,r="days"){switch(r){default:case"day":case"days":return Math.round((this.midnight_ts()-this.midnight_ts(e))/864e5);case"month":case"months":let i=12*(e.getFullYear()-this.getFullYear());return i-=e.getMonth(),i+=this.getMonth(),i}}format(e,r="en-US"){let i="",o=[],a=null;for(;(a=qe.regex.exec(e))!=null;)a[1]!=="\\"&&o.push(a);if(o.length){o[0].index>0&&(i+=e.substring(0,o[0].index));for(let[s,l]of Object.entries(o)){let u=Number(s);i+=this.formatTokens(l[0],r),o[u+1]&&(i+=e.substring(l.index+l[0].length,o[u+1].index)),u===o.length-1&&(i+=e.substring(l.index+l[0].length))}}return i.replace(/\\/g,"")}midnight_ts(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0).getTime():new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()}formatTokens(e,r){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return`0${this.getMonth()+1}`.slice(-2);case"MMM":return qe.shortMonths(r)[this.getMonth()];case"MMMM":return qe.longMonths(r)[this.getMonth()];case"D":return String(this.getDate());case"DD":return`0${this.getDate()}`.slice(-2);case"H":return String(this.getHours());case"HH":return`0${this.getHours()}`.slice(-2);case"h":return String(this.getHours()%12||12);case"hh":return`0${this.getHours()%12||12}`.slice(-2);case"m":return String(this.getMinutes());case"mm":return`0${this.getMinutes()}`.slice(-2);case"s":return String(this.getSeconds());case"ss":return`0${this.getSeconds()}`.slice(-2);case"a":return this.getHours()<12||this.getHours()===24?"am":"pm";case"A":return this.getHours()<12||this.getHours()===24?"AM":"PM";default:return""}}};O(qe,"regex",/(\\)?(Y{2,4}|M{1,4}|D{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|A|a)/g),O(qe,"MONTH_JS",[0,1,2,3,4,5,6,7,8,9,10,11]);var de=qe,gc=class{constructor(t){O(this,"picker");this.picker=t}render(t,e){t||(t=new de),t.setDate(1),t.setHours(0,0,0,0),typeof this[`get${e}View`]=="function"&&this[`get${e}View`](t)}getContainerView(t){this.picker.ui.container.innerHTML="",this.picker.options.header&&this.picker.trigger("render",{date:t.clone(),view:"Header"}),this.picker.trigger("render",{date:t.clone(),view:"Main"}),this.picker.options.autoApply||this.picker.trigger("render",{date:t.clone(),view:"Footer"})}getHeaderView(t){let e=document.createElement("header");this.picker.options.header instanceof HTMLElement&&e.appendChild(this.picker.options.header),typeof this.picker.options.header=="string"&&(e.innerHTML=this.picker.options.header),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{target:e,date:t.clone(),view:"Header"})}getMainView(t){let e=document.createElement("main");this.picker.ui.container.appendChild(e);let r=document.createElement("div");r.className=`calendars grid-${this.picker.options.grid}`;for(let i=0;i<this.picker.options.calendars;i++){let o=document.createElement("div");o.className="calendar",r.appendChild(o);let a=this.getCalendarHeaderView(t.clone());o.appendChild(a),this.picker.trigger("view",{date:t.clone(),view:"CalendarHeader",index:i,target:a});let s=this.getCalendarDayNamesView();o.appendChild(s),this.picker.trigger("view",{date:t.clone(),view:"CalendarDayNames",index:i,target:s});let l=this.getCalendarDaysView(t.clone());o.appendChild(l),this.picker.trigger("view",{date:t.clone(),view:"CalendarDays",index:i,target:l});let u=this.getCalendarFooterView(this.picker.options.lang,t.clone());o.appendChild(u),this.picker.trigger("view",{date:t.clone(),view:"CalendarFooter",index:i,target:u}),this.picker.trigger("view",{date:t.clone(),view:"CalendarItem",index:i,target:o}),t.add(1,"month")}e.appendChild(r),this.picker.trigger("view",{date:t.clone(),view:"Calendars",target:r}),this.picker.trigger("view",{date:t.clone(),view:"Main",target:e})}getFooterView(t){let e=document.createElement("footer"),r=document.createElement("div");r.className="footer-buttons";let i=document.createElement("button");i.className="cancel-button unit",i.innerHTML=this.picker.options.locale.cancel,r.appendChild(i);let o=document.createElement("button");o.className="apply-button unit",o.innerHTML=this.picker.options.locale.apply,o.disabled=!0,r.appendChild(o),e.appendChild(r),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{date:t,target:e,view:"Footer"})}getCalendarHeaderView(t){let e=document.createElement("div");e.className="header";let r=document.createElement("div");r.className="month-name",r.innerHTML=`<span>${t.toLocaleString(this.picker.options.lang,{month:"long"})}</span> ${t.format("YYYY")}`,e.appendChild(r);let i=document.createElement("button");i.className="previous-button unit",i.innerHTML=this.picker.options.locale.previousMonth,e.appendChild(i);let o=document.createElement("button");return o.className="next-button unit",o.innerHTML=this.picker.options.locale.nextMonth,e.appendChild(o),e}getCalendarDayNamesView(){let t=document.createElement("div");t.className="daynames-row";for(let e=1;e<=7;e++){let r=3+this.picker.options.firstDay+e,i=document.createElement("div");i.className="dayname",i.innerHTML=new Date(1970,0,r,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"short"}),i.title=new Date(1970,0,r,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"long"}),t.appendChild(i),this.picker.trigger("view",{dayIdx:r,view:"CalendarDayName",target:i})}return t}getCalendarDaysView(t){let e=document.createElement("div");e.className="days-grid";let r=this.calcOffsetDays(t,this.picker.options.firstDay),i=32-new Date(t.getFullYear(),t.getMonth(),32).getDate();for(let o=0;o<r;o++){let a=document.createElement("div");a.className="offset",e.appendChild(a)}for(let o=1;o<=i;o++){t.setDate(o);let a=this.getCalendarDayView(t);e.appendChild(a),this.picker.trigger("view",{date:t,view:"CalendarDay",target:a})}return e}getCalendarDayView(t){let e=this.picker.options.date?new de(this.picker.options.date):null,r=new de,i=document.createElement("div");return i.className="day unit",i.innerHTML=t.format("D"),i.dataset.time=String(t.getTime()),t.isSame(r,"day")&&i.classList.add("today"),[0,6].includes(t.getDay())&&i.classList.add("weekend"),this.picker.datePicked.length?this.picker.datePicked[0].isSame(t,"day")&&i.classList.add("selected"):e&&t.isSame(e,"day")&&i.classList.add("selected"),this.picker.trigger("view",{date:t,view:"CalendarDay",target:i}),i}getCalendarFooterView(t,e){let r=document.createElement("div");return r.className="footer",r}calcOffsetDays(t,e){let r=t.getDay()-e;return r<0&&(r+=7),r}},yc=class{constructor(t){O(this,"picker");O(this,"instances",{});this.picker=t}initialize(){let t=[];this.picker.options.plugins.forEach(e=>{typeof e=="function"?t.push(new e):typeof e=="string"&&typeof easepick<"u"&&Object.prototype.hasOwnProperty.call(easepick,e)?t.push(new easepick[e]):console.warn(`easepick: ${e} not found.`)}),t.sort((e,r)=>e.priority>r.priority?-1:e.priority<r.priority||e.dependencies.length>r.dependencies.length?1:e.dependencies.length<r.dependencies.length?-1:0),t.forEach(e=>{e.attach(this.picker),this.instances[e.getName()]=e})}getInstance(t){return this.instances[t]}addInstance(t){if(Object.prototype.hasOwnProperty.call(this.instances,t))console.warn(`easepick: ${t} already added.`);else{if(typeof easepick<"u"&&Object.prototype.hasOwnProperty.call(easepick,t)){let e=new easepick[t];return e.attach(this.picker),this.instances[e.getName()]=e,e}if(this.getPluginFn(t)!=="undefined"){let e=new(this.getPluginFn(t));return e.attach(this.picker),this.instances[e.getName()]=e,e}console.warn(`easepick: ${t} not found.`)}return null}removeInstance(t){return t in this.instances&&this.instances[t].detach(),delete this.instances[t]}reloadInstance(t){return this.removeInstance(t),this.addInstance(t)}getPluginFn(t){return[...this.picker.options.plugins].filter(e=>typeof e=="function"&&new e().getName()===t).shift()}},ia=class{constructor(t){O(this,"Calendar",new gc(this));O(this,"PluginManager",new yc(this));O(this,"calendars",[]);O(this,"datePicked",[]);O(this,"cssLoaded",0);O(this,"binds",{hidePicker:this.hidePicker.bind(this),show:this.show.bind(this)});O(this,"options",{doc:document,css:[],element:null,firstDay:1,grid:1,calendars:1,lang:"en-US",date:null,format:"YYYY-MM-DD",readonly:!0,autoApply:!0,header:!1,inline:!1,scrollToDate:!0,locale:{nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',cancel:"Cancel",apply:"Apply"},documentClick:this.binds.hidePicker,plugins:[]});O(this,"ui",{container:null,shadowRoot:null,wrapper:null});O(this,"version","1.2.1");let e={...this.options.locale,...t.locale};this.options={...this.options,...t},this.options.locale=e,this.handleOptions(),this.ui.wrapper=document.createElement("span"),this.ui.wrapper.style.display="none",this.ui.wrapper.style.position="absolute",this.ui.wrapper.style.pointerEvents="none",this.ui.wrapper.className="easepick-wrapper",this.ui.wrapper.attachShadow({mode:"open"}),this.ui.shadowRoot=this.ui.wrapper.shadowRoot,this.ui.container=document.createElement("div"),this.ui.container.className="container",this.options.zIndex&&(this.ui.container.style.zIndex=String(this.options.zIndex)),this.options.inline&&(this.ui.wrapper.style.position="relative",this.ui.container.classList.add("inline")),this.ui.shadowRoot.appendChild(this.ui.container),this.options.element.after(this.ui.wrapper),this.handleCSS(),this.options.element.addEventListener("click",this.binds.show),this.on("view",this.onView.bind(this)),this.on("render",this.onRender.bind(this)),this.PluginManager.initialize(),this.parseValues(),typeof this.options.setup=="function"&&this.options.setup(this),this.on("click",this.onClick.bind(this));let r=this.options.scrollToDate?this.getDate():null;this.renderAll(r)}on(t,e,r={}){this.ui.container.addEventListener(t,e,r)}off(t,e,r={}){this.ui.container.removeEventListener(t,e,r)}trigger(t,e={}){return this.ui.container.dispatchEvent(new CustomEvent(t,{detail:e}))}destroy(){this.options.element.removeEventListener("click",this.binds.show),typeof this.options.documentClick=="function"&&document.removeEventListener("click",this.options.documentClick,!0),Object.keys(this.PluginManager.instances).forEach(t=>{this.PluginManager.removeInstance(t)}),this.ui.wrapper.remove()}onRender(t){let{view:e,date:r}=t.detail;this.Calendar.render(r,e)}onView(t){let{view:e,target:r}=t.detail;e==="Footer"&&this.datePicked.length&&(r.querySelector(".apply-button").disabled=!1)}onClickHeaderButton(t){this.isCalendarHeaderButton(t)&&(t.classList.contains("next-button")?this.calendars[0].add(1,"month"):this.calendars[0].subtract(1,"month"),this.renderAll(this.calendars[0]))}onClickCalendarDay(t){if(this.isCalendarDay(t)){let e=new de(t.dataset.time);this.options.autoApply?(this.setDate(e),this.trigger("select",{date:this.getDate()}),this.hide()):(this.datePicked[0]=e,this.trigger("preselect",{date:this.getDate()}),this.renderAll())}}onClickApplyButton(t){if(this.isApplyButton(t)){if(this.datePicked[0]instanceof Date){let e=this.datePicked[0].clone();this.setDate(e)}this.hide(),this.trigger("select",{date:this.getDate()})}}onClickCancelButton(t){this.isCancelButton(t)&&this.hide()}onClick(t){let e=t.target;if(e instanceof HTMLElement){let r=e.closest(".unit");if(!(r instanceof HTMLElement))return;this.onClickHeaderButton(r),this.onClickCalendarDay(r),this.onClickApplyButton(r),this.onClickCancelButton(r)}}isShown(){return this.ui.container.classList.contains("inline")||this.ui.container.classList.contains("show")}show(t){if(this.isShown())return;let e=t&&"target"in t?t.target:this.options.element,{top:r,left:i}=this.adjustPosition(e);this.ui.container.style.top=`${r}px`,this.ui.container.style.left=`${i}px`,this.ui.container.classList.add("show"),this.trigger("show",{target:e})}hide(){this.ui.container.classList.remove("show"),this.datePicked.length=0,this.renderAll(),this.trigger("hide")}setDate(t){let e=new de(t,this.options.format);this.options.date=e.clone(),this.updateValues(),this.calendars.length&&this.renderAll()}getDate(){return this.options.date instanceof de?this.options.date.clone():null}parseValues(){this.options.date?this.setDate(this.options.date):this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.setDate(this.options.element.value),this.options.date instanceof Date||(this.options.date=null)}updateValues(){let t=this.getDate(),e=t instanceof Date?t.format(this.options.format,this.options.lang):"",r=this.options.element;r instanceof HTMLInputElement?r.value=e:r instanceof HTMLElement&&(r.innerText=e)}hidePicker(t){let e=t.target,r=null;e.shadowRoot&&(e=t.composedPath()[0],r=e.getRootNode().host),this.isShown()&&r!==this.ui.wrapper&&e!==this.options.element&&this.hide()}renderAll(t){this.trigger("render",{view:"Container",date:(t||this.calendars[0]).clone()})}isCalendarHeaderButton(t){return["previous-button","next-button"].some(e=>t.classList.contains(e))}isCalendarDay(t){return t.classList.contains("day")}isApplyButton(t){return t.classList.contains("apply-button")}isCancelButton(t){return t.classList.contains("cancel-button")}gotoDate(t){let e=new de(t,this.options.format);e.setDate(1),this.calendars[0]=e.clone(),this.renderAll()}clear(){this.options.date=null,this.datePicked.length=0,this.updateValues(),this.renderAll(),this.trigger("clear")}handleOptions(){this.options.element instanceof HTMLElement||(this.options.element=this.options.doc.querySelector(this.options.element)),typeof this.options.documentClick=="function"&&document.addEventListener("click",this.options.documentClick,!0),this.options.element instanceof HTMLInputElement&&(this.options.element.readOnly=this.options.readonly),this.options.date?this.calendars[0]=new de(this.options.date,this.options.format):this.calendars[0]=new de}handleCSS(){if(Array.isArray(this.options.css))this.options.css.forEach(t=>{let e=document.createElement("link");e.href=t,e.rel="stylesheet";let r=()=>{this.cssLoaded++,this.cssLoaded===this.options.css.length&&(this.ui.wrapper.style.display="")};e.addEventListener("load",r),e.addEventListener("error",r),this.ui.shadowRoot.append(e)});else if(typeof this.options.css=="string"){let t=document.createElement("style"),e=document.createTextNode(this.options.css);t.appendChild(e),this.ui.shadowRoot.append(t),this.ui.wrapper.style.display=""}else typeof this.options.css=="function"&&(this.options.css.call(this,this),this.ui.wrapper.style.display="")}adjustPosition(t){let e=t.getBoundingClientRect(),r=this.ui.wrapper.getBoundingClientRect();this.ui.container.classList.add("calc");let i=this.ui.container.getBoundingClientRect();this.ui.container.classList.remove("calc");let o=e.bottom-r.bottom,a=e.left-r.left;return typeof window<"u"&&(window.innerHeight<o+i.height&&o-i.height>=0&&(o=e.top-r.top-i.height),window.innerWidth<a+i.width&&e.right-i.width>=0&&(a=e.right-r.right-i.width)),{left:a,top:o}}},ca=Object.freeze({__proto__:null,Core:ia,create:ia}),Gi=class{constructor(){O(this,"picker");O(this,"options");O(this,"priority",0);O(this,"dependencies",[])}attach(t){let e=this.getName(),r={...this.options};this.options={...this.options,...t.options[e]||{}};for(let o of Object.keys(r))if(r[o]!==null&&typeof r[o]=="object"&&Object.keys(r[o]).length&&e in t.options&&o in t.options[e]){let a={...t.options[e][o]};a!==null&&typeof a=="object"&&Object.keys(a).length&&Object.keys(a).every(s=>Object.keys(r[o]).includes(s))&&(this.options[o]={...r[o],...a})}if(this.picker=t,this.dependenciesNotFound()){let o=this.dependencies.filter(a=>!this.pluginsAsStringArray().includes(a));return void console.warn(`${this.getName()}: required dependencies (${o.join(", ")}).`)}let i=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.add(i),this.onAttach()}detach(){let t=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.remove(t),typeof this.onDetach=="function"&&this.onDetach()}dependenciesNotFound(){return this.dependencies.length&&!this.dependencies.every(t=>this.pluginsAsStringArray().includes(t))}pluginsAsStringArray(){return this.picker.options.plugins.map(t=>typeof t=="function"?new t().getName():t)}camelCaseToKebab(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}},oa=class extends Gi{constructor(){super(...arguments);O(this,"priority",1);O(this,"binds",{onView:this.onView.bind(this)});O(this,"options",{minDate:null,maxDate:null,minDays:null,maxDays:null,selectForward:null,selectBackward:null,presets:!0,inseparable:!1,filter:null})}getName(){return"LockPlugin"}onAttach(){if(this.options.minDate&&(this.options.minDate=new de(this.options.minDate,this.picker.options.format,this.picker.options.lang)),this.options.maxDate&&(this.options.maxDate=new de(this.options.maxDate,this.picker.options.format,this.picker.options.lang),this.options.maxDate instanceof de&&this.picker.options.calendars>1&&this.picker.calendars[0].isSame(this.options.maxDate,"month"))){let e=this.picker.calendars[0].clone().subtract(1,"month");this.picker.gotoDate(e)}if((this.options.minDays||this.options.maxDays||this.options.selectForward||this.options.selectBackward)&&!this.picker.options.plugins.includes("RangePlugin")){let e=["minDays","maxDays","selectForward","selectBackward"];console.warn(`${this.getName()}: options ${e.join(", ")} required RangePlugin.`)}this.picker.on("view",this.binds.onView)}onDetach(){this.picker.off("view",this.binds.onView)}onView(e){let{view:r,target:i,date:o}=e.detail;if(r==="CalendarHeader"&&(this.options.minDate instanceof de&&o.isSameOrBefore(this.options.minDate,"month")&&i.classList.add("no-previous-month"),this.options.maxDate instanceof de&&o.isSameOrAfter(this.options.maxDate,"month")&&i.classList.add("no-next-month")),r==="CalendarDay"){let a=this.picker.datePicked.length?this.picker.datePicked[0]:null;if(this.testFilter(o))return void i.classList.add("locked");if(this.options.inseparable){if(this.options.minDays){let s=o.clone().subtract(this.options.minDays-1,"day"),l=o.clone().add(this.options.minDays-1,"day"),u=!1,h=!1;for(;s.isBefore(o,"day");){if(this.testFilter(s)){u=!0;break}s.add(1,"day")}for(;l.isAfter(o,"day");){if(this.testFilter(l)){h=!0;break}l.subtract(1,"day")}u&&h&&i.classList.add("not-available")}this.rangeIsNotAvailable(o,a)&&i.classList.add("not-available")}this.dateIsNotAvailable(o,a)&&i.classList.add("not-available")}if(this.options.presets&&r==="PresetPluginButton"){let a=new de(Number(i.dataset.start)),s=new de(Number(i.dataset.end)),l=s.diff(a,"day"),u=this.options.minDays&&l<this.options.minDays,h=this.options.maxDays&&l>this.options.maxDays;(u||h||this.lockMinDate(a)||this.lockMaxDate(a)||this.lockMinDate(s)||this.lockMaxDate(s)||this.rangeIsNotAvailable(a,s))&&i.setAttribute("disabled","disabled")}}dateIsNotAvailable(e,r){return this.lockMinDate(e)||this.lockMaxDate(e)||this.lockMinDays(e,r)||this.lockMaxDays(e,r)||this.lockSelectForward(e)||this.lockSelectBackward(e)}rangeIsNotAvailable(e,r){if(!e||!r)return!1;let i=(e.isSameOrBefore(r,"day")?e:r).clone(),o=(r.isSameOrAfter(e,"day")?r:e).clone();for(;i.isSameOrBefore(o,"day");){if(this.testFilter(i))return!0;i.add(1,"day")}return!1}lockMinDate(e){return this.options.minDate instanceof de&&e.isBefore(this.options.minDate,"day")}lockMaxDate(e){return this.options.maxDate instanceof de&&e.isAfter(this.options.maxDate,"day")}lockMinDays(e,r){if(this.options.minDays&&r){let i=r.clone().subtract(this.options.minDays-1,"day"),o=r.clone().add(this.options.minDays-1,"day");return e.isBetween(i,o)}return!1}lockMaxDays(e,r){if(this.options.maxDays&&r){let i=r.clone().subtract(this.options.maxDays,"day"),o=r.clone().add(this.options.maxDays,"day");return!e.isBetween(i,o)}return!1}lockSelectForward(e){if(this.picker.datePicked.length===1&&this.options.selectForward){let r=this.picker.datePicked[0].clone();return e.isBefore(r,"day")}return!1}lockSelectBackward(e){if(this.picker.datePicked.length===1&&this.options.selectBackward){let r=this.picker.datePicked[0].clone();return e.isAfter(r,"day")}return!1}testFilter(e){return typeof this.options.filter=="function"&&this.options.filter(e,this.picker.datePicked)}};var aa=class extends Gi{constructor(){super(...arguments);O(this,"tooltipElement");O(this,"triggerElement");O(this,"binds",{setStartDate:this.setStartDate.bind(this),setEndDate:this.setEndDate.bind(this),setDateRange:this.setDateRange.bind(this),getStartDate:this.getStartDate.bind(this),getEndDate:this.getEndDate.bind(this),onView:this.onView.bind(this),onShow:this.onShow.bind(this),onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),onClickCalendarDay:this.onClickCalendarDay.bind(this),onClickApplyButton:this.onClickApplyButton.bind(this),parseValues:this.parseValues.bind(this),updateValues:this.updateValues.bind(this),clear:this.clear.bind(this)});O(this,"options",{elementEnd:null,startDate:null,endDate:null,repick:!1,strict:!0,delimiter:" - ",tooltip:!0,tooltipNumber:e=>e,locale:{zero:"",one:"day",two:"",few:"",many:"",other:"days"},documentClick:this.hidePicker.bind(this)})}getName(){return"RangePlugin"}onAttach(){this.binds._setStartDate=this.picker.setStartDate,this.binds._setEndDate=this.picker.setEndDate,this.binds._setDateRange=this.picker.setDateRange,this.binds._getStartDate=this.picker.getStartDate,this.binds._getEndDate=this.picker.getEndDate,this.binds._parseValues=this.picker.parseValues,this.binds._updateValues=this.picker.updateValues,this.binds._clear=this.picker.clear,this.binds._onClickCalendarDay=this.picker.onClickCalendarDay,this.binds._onClickApplyButton=this.picker.onClickApplyButton,Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds.setStartDate},setEndDate:{configurable:!0,value:this.binds.setEndDate},setDateRange:{configurable:!0,value:this.binds.setDateRange},getStartDate:{configurable:!0,value:this.binds.getStartDate},getEndDate:{configurable:!0,value:this.binds.getEndDate},parseValues:{configurable:!0,value:this.binds.parseValues},updateValues:{configurable:!0,value:this.binds.updateValues},clear:{configurable:!0,value:this.binds.clear},onClickCalendarDay:{configurable:!0,value:this.binds.onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds.onClickApplyButton}}),this.options.elementEnd&&(this.options.elementEnd instanceof HTMLElement||(this.options.elementEnd=this.picker.options.doc.querySelector(this.options.elementEnd)),this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.readOnly=this.picker.options.readonly),typeof this.picker.options.documentClick=="function"&&(document.removeEventListener("click",this.picker.options.documentClick,!0),typeof this.options.documentClick=="function"&&document.addEventListener("click",this.options.documentClick,!0)),this.options.elementEnd.addEventListener("click",this.picker.show.bind(this.picker))),this.options.repick=this.options.repick&&this.options.elementEnd instanceof HTMLElement,this.picker.options.date=null,this.picker.on("view",this.binds.onView),this.picker.on("show",this.binds.onShow),this.picker.on("mouseenter",this.binds.onMouseEnter,!0),this.picker.on("mouseleave",this.binds.onMouseLeave,!0),this.checkIntlPluralLocales()}onDetach(){Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds._setStartDate},setEndDate:{configurable:!0,value:this.binds._setEndDate},setDateRange:{configurable:!0,value:this.binds._setDateRange},getStartDate:{configurable:!0,value:this.binds._getStartDate},getEndDate:{configurable:!0,value:this.binds._getEndDate},parseValues:{configurable:!0,value:this.binds._parseValues},updateValues:{configurable:!0,value:this.binds._updateValues},clear:{configurable:!0,value:this.binds._clear},onClickCalendarDay:{configurable:!0,value:this.binds._onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds._onClickApplyButton}}),this.picker.off("view",this.binds.onView),this.picker.off("show",this.binds.onShow),this.picker.off("mouseenter",this.binds.onMouseEnter,!0),this.picker.off("mouseleave",this.binds.onMouseLeave,!0)}parseValues(){if(this.options.startDate||this.options.endDate)this.options.strict?this.options.startDate&&this.options.endDate?this.setDateRange(this.options.startDate,this.options.endDate):(this.options.startDate=null,this.options.endDate=null):(this.options.startDate&&this.setStartDate(this.options.startDate),this.options.endDate&&this.setEndDate(this.options.endDate));else if(this.options.elementEnd)this.options.strict?this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setDateRange(this.picker.options.element.value,this.options.elementEnd.value):(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.setStartDate(this.picker.options.element.value),this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setEndDate(this.options.elementEnd.value));else if(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length){let[e,r]=this.picker.options.element.value.split(this.options.delimiter);this.options.strict?e&&r&&this.setDateRange(e,r):(e&&this.setStartDate(e),r&&this.setEndDate(r))}}updateValues(){let e=this.picker.options.element,r=this.options.elementEnd,i=this.picker.getStartDate(),o=this.picker.getEndDate(),a=i instanceof Date?i.format(this.picker.options.format,this.picker.options.lang):"",s=o instanceof Date?o.format(this.picker.options.format,this.picker.options.lang):"";if(r)e instanceof HTMLInputElement?e.value=a:e instanceof HTMLElement&&(e.innerText=a),r instanceof HTMLInputElement?r.value=s:r instanceof HTMLElement&&(r.innerText=s);else{let l=`${a}${a||s?this.options.delimiter:""}${s}`;e instanceof HTMLInputElement?e.value=l:e instanceof HTMLElement&&(e.innerText=l)}}clear(){this.options.startDate=null,this.options.endDate=null,this.picker.datePicked.length=0,this.updateValues(),this.picker.renderAll(),this.picker.trigger("clear")}onShow(e){let{target:r}=e.detail;this.triggerElement=r,this.picker.options.scrollToDate&&this.getStartDate()instanceof Date&&this.picker.gotoDate(this.getStartDate()),this.initializeRepick()}onView(e){let{view:r,target:i}=e.detail;if(r==="Main"&&(this.tooltipElement=document.createElement("span"),this.tooltipElement.className="range-plugin-tooltip",i.appendChild(this.tooltipElement)),r==="CalendarDay"){let o=new de(i.dataset.time),a=this.picker.datePicked,s=a.length?this.picker.datePicked[0]:this.getStartDate(),l=a.length?this.picker.datePicked[1]:this.getEndDate();s&&s.isSame(o,"day")&&i.classList.add("start"),s&&l&&(l.isSame(o,"day")&&i.classList.add("end"),o.isBetween(s,l)&&i.classList.add("in-range"))}if(r==="Footer"){let o=this.picker.datePicked.length===1&&!this.options.strict||this.picker.datePicked.length===2;i.querySelector(".apply-button").disabled=!o}}hidePicker(e){let r=e.target,i=null;r.shadowRoot&&(r=e.composedPath()[0],i=r.getRootNode().host),this.picker.isShown()&&i!==this.picker.ui.wrapper&&r!==this.picker.options.element&&r!==this.options.elementEnd&&this.picker.hide()}setStartDate(e){let r=new de(e,this.picker.options.format);this.options.startDate=r?r.clone():null,this.updateValues(),this.picker.renderAll()}setEndDate(e){let r=new de(e,this.picker.options.format);this.options.endDate=r?r.clone():null,this.updateValues(),this.picker.renderAll()}setDateRange(e,r){let i=new de(e,this.picker.options.format),o=new de(r,this.picker.options.format);this.options.startDate=i?i.clone():null,this.options.endDate=o?o.clone():null,this.updateValues(),this.picker.renderAll()}getStartDate(){return this.options.startDate instanceof Date?this.options.startDate.clone():null}getEndDate(){return this.options.endDate instanceof Date?this.options.endDate.clone():null}onMouseEnter(e){let r=e.target;if(r instanceof HTMLElement){this.isContainer(r)&&this.initializeRepick();let i=r.closest(".unit");if(!(i instanceof HTMLElement))return;if(this.picker.isCalendarDay(i)){if(this.picker.datePicked.length!==1)return;let o=this.picker.datePicked[0].clone(),a=new de(i.dataset.time),s=!1;if(o.isAfter(a,"day")){let l=o.clone();o=a.clone(),a=l.clone(),s=!0}if([...this.picker.ui.container.querySelectorAll(".day")].forEach(l=>{let u=new de(l.dataset.time),h=this.picker.Calendar.getCalendarDayView(u);u.isBetween(o,a)&&h.classList.add("in-range"),u.isSame(this.picker.datePicked[0],"day")&&(h.classList.add("start"),h.classList.toggle("flipped",s)),l===i&&(h.classList.add("end"),h.classList.toggle("flipped",s)),l.className=h.className}),this.options.tooltip){let l=this.options.tooltipNumber(a.diff(o,"day")+1);if(l>0){let u=new Intl.PluralRules(this.picker.options.lang).select(l),h=`${l} ${this.options.locale[u]}`;this.showTooltip(i,h)}else this.hideTooltip()}}}}onMouseLeave(e){if(this.isContainer(e.target)&&this.options.repick){let r=this.getStartDate(),i=this.getEndDate();r&&i&&(this.picker.datePicked.length=0,this.picker.renderAll())}}onClickCalendarDay(e){if(this.picker.isCalendarDay(e)){this.picker.datePicked.length===2&&(this.picker.datePicked.length=0);let r=new de(e.dataset.time);if(this.picker.datePicked[this.picker.datePicked.length]=r,this.picker.datePicked.length===2&&this.picker.datePicked[0].isAfter(this.picker.datePicked[1])){let i=this.picker.datePicked[1].clone();this.picker.datePicked[1]=this.picker.datePicked[0].clone(),this.picker.datePicked[0]=i.clone()}this.picker.datePicked.length!==1&&this.picker.options.autoApply||this.picker.trigger("preselect",{start:this.picker.datePicked[0]instanceof Date?this.picker.datePicked[0].clone():null,end:this.picker.datePicked[1]instanceof Date?this.picker.datePicked[1].clone():null}),this.picker.datePicked.length===1&&(!this.options.strict&&this.picker.options.autoApply&&(this.picker.options.element===this.triggerElement&&this.setStartDate(this.picker.datePicked[0]),this.options.elementEnd===this.triggerElement&&this.setEndDate(this.picker.datePicked[0]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()})),this.picker.renderAll()),this.picker.datePicked.length===2&&(this.picker.options.autoApply?(this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide()):(this.hideTooltip(),this.picker.renderAll()))}}onClickApplyButton(e){this.picker.isApplyButton(e)&&(this.picker.datePicked.length!==1||this.options.strict||(this.picker.options.element===this.triggerElement&&(this.options.endDate=null,this.setStartDate(this.picker.datePicked[0])),this.options.elementEnd===this.triggerElement&&(this.options.startDate=null,this.setEndDate(this.picker.datePicked[0]))),this.picker.datePicked.length===2&&this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide())}showTooltip(e,r){this.tooltipElement.style.visibility="visible",this.tooltipElement.innerHTML=r;let i=this.picker.ui.container.getBoundingClientRect(),o=this.tooltipElement.getBoundingClientRect(),a=e.getBoundingClientRect(),s=a.top,l=a.left;s-=i.top,l-=i.left,s-=o.height,l-=o.width/2,l+=a.width/2,this.tooltipElement.style.top=`${s}px`,this.tooltipElement.style.left=`${l}px`}hideTooltip(){this.tooltipElement.style.visibility="hidden"}checkIntlPluralLocales(){if(!this.options.tooltip)return;let e=[...new Set([new Intl.PluralRules(this.picker.options.lang).select(0),new Intl.PluralRules(this.picker.options.lang).select(1),new Intl.PluralRules(this.picker.options.lang).select(2),new Intl.PluralRules(this.picker.options.lang).select(6),new Intl.PluralRules(this.picker.options.lang).select(18)])],r=Object.keys(this.options.locale);e.every(i=>r.includes(i))||console.warn(`${this.getName()}: provide locales (${e.join(", ")}) for correct tooltip text.`)}initializeRepick(){if(!this.options.repick)return;let e=this.getStartDate(),r=this.getEndDate();r&&this.triggerElement===this.picker.options.element&&(this.picker.datePicked[0]=r),e&&this.triggerElement===this.options.elementEnd&&(this.picker.datePicked[0]=e)}isContainer(e){return e===this.picker.ui.container}};var sa=class extends Gi{constructor(){super(...arguments);O(this,"rangePlugin");O(this,"lockPlugin");O(this,"priority",10);O(this,"binds",{onView:this.onView.bind(this),onColorScheme:this.onColorScheme.bind(this)});O(this,"options",{dropdown:{months:!1,years:!1,minYear:1950,maxYear:null},darkMode:!0,locale:{resetButton:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></svg>'}});O(this,"matchMedia")}getName(){return"AmpPlugin"}onAttach(){this.options.darkMode&&window&&"matchMedia"in window&&(this.matchMedia=window.matchMedia("(prefers-color-scheme: dark)"),this.matchMedia.matches&&(this.picker.ui.container.dataset.theme="dark"),this.matchMedia.addEventListener("change",this.binds.onColorScheme)),this.options.weekNumbers&&this.picker.ui.container.classList.add("week-numbers"),this.picker.on("view",this.binds.onView)}onDetach(){this.options.darkMode&&window&&"matchMedia"in window&&this.matchMedia.removeEventListener("change",this.binds.onColorScheme),this.picker.ui.container.removeAttribute("data-theme"),this.picker.ui.container.classList.remove("week-numbers"),this.picker.off("view",this.binds.onView)}onView(e){this.lockPlugin=this.picker.PluginManager.getInstance("LockPlugin"),this.rangePlugin=this.picker.PluginManager.getInstance("RangePlugin"),this.handleDropdown(e),this.handleResetButton(e),this.handleWeekNumbers(e)}onColorScheme(e){let r=e.matches?"dark":"light";this.picker.ui.container.dataset.theme=r}handleDropdown(e){let{view:r,target:i,date:o,index:a}=e.detail;if(r==="CalendarHeader"){let s=i.querySelector(".month-name");if(this.options.dropdown.months){s.childNodes[0].remove();let l=document.createElement("select");l.className="month-name--select month-name--dropdown";for(let u=0;u<12;u+=1){let h=document.createElement("option"),p=new de(new Date(o.getFullYear(),u,2,0,0,0)),y=new de(new Date(o.getFullYear(),u,1,0,0,0));h.value=String(u),h.text=p.toLocaleString(this.picker.options.lang,{month:"long"}),this.lockPlugin&&(h.disabled=this.lockPlugin.options.minDate&&y.isBefore(new de(this.lockPlugin.options.minDate),"month")||this.lockPlugin.options.maxDate&&y.isAfter(new de(this.lockPlugin.options.maxDate),"month")),h.selected=y.getMonth()===o.getMonth(),l.appendChild(h)}l.addEventListener("change",u=>{let h=u.target;this.picker.calendars[0].setDate(1),this.picker.calendars[0].setMonth(Number(h.value)),this.picker.renderAll()}),s.prepend(l)}if(this.options.dropdown.years){s.childNodes[1].remove();let l=document.createElement("select");l.className="month-name--select";let u=this.options.dropdown.minYear,h=this.options.dropdown.maxYear?this.options.dropdown.maxYear:new Date().getFullYear();if(o.getFullYear()>h){let p=document.createElement("option");p.value=String(o.getFullYear()),p.text=String(o.getFullYear()),p.selected=!0,p.disabled=!0,l.appendChild(p)}for(let p=h;p>=u;p-=1){let y=document.createElement("option"),E=new de(new Date(p,0,1,0,0,0));y.value=String(p),y.text=String(p),this.lockPlugin&&(y.disabled=this.lockPlugin.options.minDate&&E.isBefore(new de(this.lockPlugin.options.minDate),"year")||this.lockPlugin.options.maxDate&&E.isAfter(new de(this.lockPlugin.options.maxDate),"year")),y.selected=o.getFullYear()===p,l.appendChild(y)}if(o.getFullYear()<u){let p=document.createElement("option");p.value=String(o.getFullYear()),p.text=String(o.getFullYear()),p.selected=!0,p.disabled=!0,l.appendChild(p)}if(this.options.dropdown.years==="asc"){let p=Array.prototype.slice.call(l.childNodes).reverse();l.innerHTML="",p.forEach(y=>{y.innerHTML=y.value,l.appendChild(y)})}l.addEventListener("change",p=>{let y=p.target;this.picker.calendars[0].setFullYear(Number(y.value)),this.picker.renderAll()}),s.appendChild(l)}}}handleResetButton(e){let{view:r,target:i}=e.detail;if(r==="CalendarHeader"&&this.options.resetButton){let o=document.createElement("button");o.className="reset-button unit",o.innerHTML=this.options.locale.resetButton,o.addEventListener("click",a=>{a.preventDefault();let s=!0;typeof this.options.resetButton=="function"&&(s=this.options.resetButton.call(this)),s&&this.picker.clear()}),i.appendChild(o)}}handleWeekNumbers(e){if(this.options.weekNumbers){let{view:r,target:i}=e.detail;if(r==="CalendarDayNames"){let o=document.createElement("div");o.className="wnum-header",o.innerHTML="Wk",i.prepend(o)}r==="CalendarDays"&&[...i.children].forEach((o,a)=>{if(a===0||a%7==0){let s;if(o.classList.contains("day"))s=new de(o.dataset.time);else{let h=i.querySelector(".day");s=new de(h.dataset.time)}let l=s.getWeek(this.picker.options.firstDay);l===53&&s.getMonth()===0&&(l="53/1");let u=document.createElement("div");u.className="wnum-item",u.innerHTML=String(l),i.insertBefore(u,o)}})}}};var la=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],qn={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var ua={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},da=ua;var nt=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},xt=function(n){return n===!0?1:0};function vc(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var ha=function(n){return n instanceof Array?n:[n]};function rt(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function be(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function Ji(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function wc(n,t){if(t(n))return n;if(n.parentNode)return wc(n.parentNode,t)}function Xi(n,t){var e=be("div","numInputWrapper"),r=be("input","numInput "+n),i=be("span","arrowUp"),o=be("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return e.appendChild(r),e.appendChild(i),e.appendChild(o),e}function Rt(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch{return n.target}}var bc=function(){},Qi=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},ud={D:bc,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*xt(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:bc,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:bc,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},In={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},jr={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[jr.w(n,t,e)]},F:function(n,t,e){return Qi(jr.n(n,t,e)-1,!1,t)},G:function(n,t,e){return nt(jr.h(n,t,e))},H:function(n){return nt(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[xt(n.getHours()>11)]},M:function(n,t){return Qi(n.getMonth(),!0,t)},S:function(n){return nt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return nt(n.getFullYear(),4)},d:function(n){return nt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return nt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return nt(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}};var Dc=function(n){var t=n.config,e=t===void 0?qn:t,r=n.l10n,i=r===void 0?ua:r,o=n.isMobile,a=o===void 0?!1:o;return function(s,l,u){var h=u||i;return e.formatDate!==void 0&&!a?e.formatDate(s,l,h):l.split("").map(function(p,y,E){return jr[p]&&E[y-1]!=="\\"?jr[p](s,h,e):p!=="\\"?p:""}).join("")}},ma=function(n){var t=n.config,e=t===void 0?qn:t,r=n.l10n,i=r===void 0?ua:r;return function(o,a,s,l){if(!(o!==0&&!o)){var u=l||i,h,p=o;if(o instanceof Date)h=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)h=new Date(o);else if(typeof o=="string"){var y=a||(e||qn).dateFormat,E=String(o).trim();if(E==="today")h=new Date,s=!0;else if(e&&e.parseDate)h=e.parseDate(o,y);else if(/Z$/.test(E)||/GMT$/.test(E))h=new Date(o);else{for(var T=void 0,C=[],L=0,B=0,K="";L<y.length;L++){var W=y[L],Q=W==="\\",te=y[L-1]==="\\"||Q;if(In[W]&&!te){K+=In[W];var oe=new RegExp(K).exec(o);oe&&(T=!0)&&C[W!=="Y"?"push":"unshift"]({fn:ud[W],val:oe[++B]})}else Q||(K+=".")}h=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),C.forEach(function(Me){var Ee=Me.fn,ie=Me.val;return h=Ee(h,ie,u)||h}),h=T?h:void 0}}if(!(h instanceof Date&&!isNaN(h.getTime()))){e.errorHandler(new Error("Invalid date provided: "+p));return}return s===!0&&h.setHours(0,0,0,0),h}}};function At(n,t,e){return e===void 0&&(e=!0),e!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}var dd=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},pa=function(n,t,e){return n*3600+t*60+e},hd=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},md={DAY:864e5};function fa(n){var t=n.defaultHour,e=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),o=n.minDate.getMinutes(),a=n.minDate.getSeconds();t<i&&(t=i),t===i&&e<o&&(e=o),t===i&&e===o&&r<a&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var s=n.maxDate.getHours(),l=n.maxDate.getMinutes();t=Math.min(t,s),t===s&&(e=Math.min(l,e)),t===s&&e===l&&(r=n.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(l){return n[l]=s[l]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return n});var it=function(){return it=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},it.apply(this,arguments)},pd=function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},Tm=300;function Cm(n,t){var e={config:it(it({},qn),ze.defaultConfig),l10n:da};e.parseDate=ma({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=C,e._setHoursFromDate=y,e._positionCalendar=Pn,e.changeMonth=_,e.changeYear=J,e.clear=I,e.close=k,e.onMouseOver=fe,e._createElement=be,e.createDay=oe,e.destroy=H,e.isEnabled=U,e.jumpToDate=K,e.updateValue=dn,e.open=Ce,e.redraw=no,e.set=Dd,e.setDate=Ed,e.toggle=kd;function r(){e.utils={getDaysInMonth:function(f,w){return f===void 0&&(f=e.currentMonth),w===void 0&&(w=e.currentYear),f===1&&(w%4===0&&w%100!==0||w%400===0)?29:e.l10n.daysInMonth[f]}}}function i(){e.element=e.input=n,e.isOpen=!1,Xe(),Wn(),Md(),_d(),r(),e.isMobile||te(),B(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&y(e.config.noCalendar?e.latestSelectedDateObj:void 0),dn(!1)),s();var f=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&f&&Pn(),Ae("onReady")}function o(){var f;return((f=e.calendarContainer)===null||f===void 0?void 0:f.getRootNode()).activeElement||document.activeElement}function a(f){return f.bind(e)}function s(){var f=e.config;f.weekNumbers===!1&&f.showMonths===1||f.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var w=(e.days.offsetWidth+1)*f.showMonths;e.daysContainer.style.width=w+"px",e.calendarContainer.style.width=w+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(f){if(e.selectedDates.length===0){var w=e.config.minDate===void 0||At(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),M=fa(e.config);w.setHours(M.hours,M.minutes,M.seconds,w.getMilliseconds()),e.selectedDates=[w],e.latestSelectedDateObj=w}f!==void 0&&f.type!=="blur"&&Id(f);var x=e._input.value;p(),dn(),e._input.value!==x&&e._debouncedChange()}function u(f,w){return f%12+12*xt(w===e.l10n.amPM[1])}function h(f){switch(f%24){case 0:case 12:return 12;default:return f%12}}function p(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var f=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,w=(parseInt(e.minuteElement.value,10)||0)%60,M=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(f=u(f,e.amPM.textContent));var x=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&At(e.latestSelectedDateObj,e.config.minDate,!0)===0,z=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&At(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var q=pa(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),he=pa(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),G=pa(f,w,M);if(G>he&&G<q){var ge=hd(q);f=ge[0],w=ge[1],M=ge[2]}}else{if(z){var Z=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;f=Math.min(f,Z.getHours()),f===Z.getHours()&&(w=Math.min(w,Z.getMinutes())),w===Z.getMinutes()&&(M=Math.min(M,Z.getSeconds()))}if(x){var ae=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;f=Math.max(f,ae.getHours()),f===ae.getHours()&&w<ae.getMinutes()&&(w=ae.getMinutes()),w===ae.getMinutes()&&(M=Math.max(M,ae.getSeconds()))}}E(f,w,M)}}function y(f){var w=f||e.latestSelectedDateObj;w&&w instanceof Date&&E(w.getHours(),w.getMinutes(),w.getSeconds())}function E(f,w,M){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(f%24,w,M||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=nt(e.config.time_24hr?f:(12+f)%12+12*xt(f%12===0)),e.minuteElement.value=nt(w),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[xt(f>=12)]),e.secondElement!==void 0&&(e.secondElement.value=nt(M)))}function T(f){var w=Rt(f),M=parseInt(w.value)+(f.delta||0);(M/1e3>1||f.key==="Enter"&&!/[^\d]/.test(M.toString()))&&J(M)}function C(f,w,M,x){if(w instanceof Array)return w.forEach(function(z){return C(f,z,M,x)});if(f instanceof Array)return f.forEach(function(z){return C(z,w,M,x)});f.addEventListener(w,M,x),e._handlers.push({remove:function(){return f.removeEventListener(w,M,x)}})}function L(){Ae("onChange")}function B(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(M){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+M+"]"),function(x){return C(x,"click",e[M])})}),e.isMobile){Sd();return}var f=vc(ve,50);if(e._debouncedChange=vc(L,Tm),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&C(e.daysContainer,"mouseover",function(M){e.config.mode==="range"&&fe(Rt(M))}),C(e._input,"keydown",le),e.calendarContainer!==void 0&&C(e.calendarContainer,"keydown",le),!e.config.inline&&!e.config.static&&C(window,"resize",f),window.ontouchstart!==void 0?C(window.document,"touchstart",V):C(window.document,"mousedown",V),C(window.document,"focus",V,{capture:!0}),e.config.clickOpens===!0&&(C(e._input,"focus",e.open),C(e._input,"click",e.open)),e.daysContainer!==void 0&&(C(e.monthNav,"click",Cd),C(e.monthNav,["keyup","increment"],T),C(e.daysContainer,"click",_c)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var w=function(M){return Rt(M).select()};C(e.timeContainer,["increment"],l),C(e.timeContainer,"blur",l,{capture:!0}),C(e.timeContainer,"click",W),C([e.hourElement,e.minuteElement],["focus","click"],w),e.secondElement!==void 0&&C(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&C(e.amPM,"click",function(M){l(M)})}e.config.allowInput&&C(e._input,"blur",re)}function K(f,w){var M=f!==void 0?e.parseDate(f):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),x=e.currentYear,z=e.currentMonth;try{M!==void 0&&(e.currentYear=M.getFullYear(),e.currentMonth=M.getMonth())}catch(q){q.message="Invalid date supplied: "+M,e.config.errorHandler(q)}w&&e.currentYear!==x&&(Ae("onYearChange"),ee()),w&&(e.currentYear!==x||e.currentMonth!==z)&&Ae("onMonthChange"),e.redraw()}function W(f){var w=Rt(f);~w.className.indexOf("arrow")&&Q(f,w.classList.contains("arrowUp")?1:-1)}function Q(f,w,M){var x=f&&Rt(f),z=M||x&&x.parentNode&&x.parentNode.firstChild,q=ba("increment");q.delta=w,z&&z.dispatchEvent(q)}function te(){var f=window.document.createDocumentFragment();if(e.calendarContainer=be("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(f.appendChild(c()),e.innerContainer=be("div","flatpickr-innerContainer"),e.config.weekNumbers){var w=b(),M=w.weekWrapper,x=w.weekNumbers;e.innerContainer.appendChild(M),e.weekNumbers=x,e.weekWrapper=M}e.rContainer=be("div","flatpickr-rContainer"),e.rContainer.appendChild(v()),e.daysContainer||(e.daysContainer=be("div","flatpickr-days"),e.daysContainer.tabIndex=-1),F(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),f.appendChild(e.innerContainer)}e.config.enableTime&&f.appendChild(d()),rt(e.calendarContainer,"rangeMode",e.config.mode==="range"),rt(e.calendarContainer,"animate",e.config.animate===!0),rt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(f);var z=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!z&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var q=be("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(q,e.element),q.appendChild(e.element),e.altInput&&q.appendChild(e.altInput),q.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function oe(f,w,M,x){var z=U(w,!0),q=be("span",f,w.getDate().toString());return q.dateObj=w,q.$i=x,q.setAttribute("aria-label",e.formatDate(w,e.config.ariaDateFormat)),f.indexOf("hidden")===-1&&At(w,e.now)===0&&(e.todayDateElem=q,q.classList.add("today"),q.setAttribute("aria-current","date")),z?(q.tabIndex=-1,Da(w)&&(q.classList.add("selected"),e.selectedDateElem=q,e.config.mode==="range"&&(rt(q,"startRange",e.selectedDates[0]&&At(w,e.selectedDates[0],!0)===0),rt(q,"endRange",e.selectedDates[1]&&At(w,e.selectedDates[1],!0)===0),f==="nextMonthDay"&&q.classList.add("inRange")))):q.classList.add("flatpickr-disabled"),e.config.mode==="range"&&Td(w)&&!Da(w)&&q.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&f!=="prevMonthDay"&&x%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(w)+"</span>"),Ae("onDayCreate",q),q}function Me(f){f.focus(),e.config.mode==="range"&&fe(f)}function Ee(f){for(var w=f>0?0:e.config.showMonths-1,M=f>0?e.config.showMonths:-1,x=w;x!=M;x+=f)for(var z=e.daysContainer.children[x],q=f>0?0:z.children.length-1,he=f>0?z.children.length:-1,G=q;G!=he;G+=f){var ge=z.children[G];if(ge.className.indexOf("hidden")===-1&&U(ge.dateObj))return ge}}function ie(f,w){for(var M=f.className.indexOf("Month")===-1?f.dateObj.getMonth():e.currentMonth,x=w>0?e.config.showMonths:-1,z=w>0?1:-1,q=M-e.currentMonth;q!=x;q+=z)for(var he=e.daysContainer.children[q],G=M-e.currentMonth===q?f.$i+w:w<0?he.children.length-1:0,ge=he.children.length,Z=G;Z>=0&&Z<ge&&Z!=(w>0?ge:-1);Z+=z){var ae=he.children[Z];if(ae.className.indexOf("hidden")===-1&&U(ae.dateObj)&&Math.abs(f.$i-Z)>=Math.abs(w))return Me(ae)}e.changeMonth(z),N(Ee(z),0)}function N(f,w){var M=o(),x=j(M||document.body),z=f!==void 0?f:x?M:e.selectedDateElem!==void 0&&j(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&j(e.todayDateElem)?e.todayDateElem:Ee(w>0?1:-1);z===void 0?e._input.focus():x?ie(z,w):Me(z)}function Y(f,w){for(var M=(new Date(f,w,1).getDay()-e.l10n.firstDayOfWeek+7)%7,x=e.utils.getDaysInMonth((w-1+12)%12,f),z=e.utils.getDaysInMonth(w,f),q=window.document.createDocumentFragment(),he=e.config.showMonths>1,G=he?"prevMonthDay hidden":"prevMonthDay",ge=he?"nextMonthDay hidden":"nextMonthDay",Z=x+1-M,ae=0;Z<=x;Z++,ae++)q.appendChild(oe("flatpickr-day "+G,new Date(f,w-1,Z),Z,ae));for(Z=1;Z<=z;Z++,ae++)q.appendChild(oe("flatpickr-day",new Date(f,w,Z),Z,ae));for(var Se=z+1;Se<=42-M&&(e.config.showMonths===1||ae%7!==0);Se++,ae++)q.appendChild(oe("flatpickr-day "+ge,new Date(f,w+1,Se%z),Se,ae));var en=be("div","dayContainer");return en.appendChild(q),en}function F(){if(e.daysContainer!==void 0){Ji(e.daysContainer),e.weekNumbers&&Ji(e.weekNumbers);for(var f=document.createDocumentFragment(),w=0;w<e.config.showMonths;w++){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),f.appendChild(Y(M.getFullYear(),M.getMonth()))}e.daysContainer.appendChild(f),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&fe()}}function ee(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var f=function(x){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&x<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&x>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var w=0;w<12;w++)if(f(w)){var M=be("option","flatpickr-monthDropdown-month");M.value=new Date(e.currentYear,w).getMonth().toString(),M.textContent=Qi(w,e.config.shorthandCurrentMonth,e.l10n),M.tabIndex=-1,e.currentMonth===w&&(M.selected=!0),e.monthsDropdownContainer.appendChild(M)}}}function g(){var f=be("div","flatpickr-month"),w=window.document.createDocumentFragment(),M;e.config.showMonths>1||e.config.monthSelectorType==="static"?M=be("span","cur-month"):(e.monthsDropdownContainer=be("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),C(e.monthsDropdownContainer,"change",function(he){var G=Rt(he),ge=parseInt(G.value,10);e.changeMonth(ge-e.currentMonth),Ae("onMonthChange")}),ee(),M=e.monthsDropdownContainer);var x=Xi("cur-year",{tabindex:"-1"}),z=x.getElementsByTagName("input")[0];z.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&z.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(z.setAttribute("max",e.config.maxDate.getFullYear().toString()),z.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var q=be("div","flatpickr-current-month");return q.appendChild(M),q.appendChild(x),w.appendChild(q),f.appendChild(w),{container:f,yearElement:z,monthElement:M}}function A(){Ji(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var f=e.config.showMonths;f--;){var w=g();e.yearElements.push(w.yearElement),e.monthElements.push(w.monthElement),e.monthNav.appendChild(w.container)}e.monthNav.appendChild(e.nextMonthNav)}function c(){return e.monthNav=be("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=be("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=be("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,A(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(f){e.__hidePrevMonthArrow!==f&&(rt(e.prevMonthNav,"flatpickr-disabled",f),e.__hidePrevMonthArrow=f)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(f){e.__hideNextMonthArrow!==f&&(rt(e.nextMonthNav,"flatpickr-disabled",f),e.__hideNextMonthArrow=f)}}),e.currentYearElement=e.yearElements[0],io(),e.monthNav}function d(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var f=fa(e.config);e.timeContainer=be("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var w=be("span","flatpickr-time-separator",":"),M=Xi("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=M.getElementsByTagName("input")[0];var x=Xi("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=x.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=nt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?f.hours:h(f.hours)),e.minuteElement.value=nt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():f.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(M),e.timeContainer.appendChild(w),e.timeContainer.appendChild(x),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var z=Xi("flatpickr-second");e.secondElement=z.getElementsByTagName("input")[0],e.secondElement.value=nt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():f.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(be("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(z)}return e.config.time_24hr||(e.amPM=be("span","flatpickr-am-pm",e.l10n.amPM[xt((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function v(){e.weekdayContainer?Ji(e.weekdayContainer):e.weekdayContainer=be("div","flatpickr-weekdays");for(var f=e.config.showMonths;f--;){var w=be("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(w)}return D(),e.weekdayContainer}function D(){if(e.weekdayContainer){var f=e.l10n.firstDayOfWeek,w=pd(e.l10n.weekdays.shorthand);f>0&&f<w.length&&(w=pd(w.splice(f,w.length),w.splice(0,f)));for(var M=e.config.showMonths;M--;)e.weekdayContainer.children[M].innerHTML=`
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(N,Y){if(Y&&(typeof Y=="object"||typeof Y=="function"))return Y;if(Y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(N)}function K(N,Y){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,ee){return F.__proto__=ee,F},K(N,Y)}function W(N,Y){return r(N)||C(N,Y)||Me(N,Y)||L()}function Q(N,Y){if(typeof N!="object"||!N)return N;var F=N[Symbol.toPrimitive];if(F!==void 0){var ee=F.call(N,Y||"default");if(typeof ee!="object")return ee;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)(N)}function te(N){var Y=Q(N,"string");return typeof Y=="symbol"?Y:Y+""}function oe(N){"@babel/helpers - typeof";return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},oe(N)}function Me(N,Y){if(N){if(typeof N=="string")return e(N,Y);var F={}.toString.call(N).slice(8,-1);return F==="Object"&&N.constructor&&(F=N.constructor.name),F==="Map"||F==="Set"?Array.from(N):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?e(N,Y):void 0}}function Ee(N){var Y=typeof Map=="function"?new Map:void 0;return Ee=function(F){function ee(){return s(F,arguments,p(this).constructor)}if(F===null||!E(F))return F;if(typeof F!="function")throw new TypeError("Super expression must either be null or a function");if(Y!==void 0){if(Y.has(F))return Y.get(F);Y.set(F,ee)}return ee.prototype=Object.create(F.prototype,{constructor:{value:ee,enumerable:!1,writable:!0,configurable:!0}}),K(ee,F)},Ee(N)}var ie=function(N){var Y=Math.abs,F=Math.max,ee=Math.floor;function g(A,c){var d;if(a(this,g),d=o(this,g,[A]),d.sign=c,Object.setPrototypeOf(d,g.prototype),A>g.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return d}return y(g,N),u(g,[{key:"toDebugString",value:function(){var c,d=["BigInt["],v=h(this);try{for(v.s();!(c=v.n()).done;){var D=c.value;d.push((D&&(D>>>0).toString(16))+", ")}}catch(b){v.e(b)}finally{v.f()}return d.push("]"),d.join("")}},{key:"toString",value:function(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:10;if(2>c||36<c)throw new RangeError("toString() radix argument must be between 2 and 36");return this.length===0?"0":c&c-1?g.__toStringGeneric(this,c,!1):g.__toStringBasePowerOfTwo(this,c)}},{key:"valueOf",value:function(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}},{key:"__copy",value:function(){for(var c=new g(this.length,this.sign),d=0;d<this.length;d++)c[d]=this[d];return c}},{key:"__trim",value:function(){for(var c=this.length,d=this[c-1];d===0;)c--,d=this[c-1],this.pop();return c===0&&(this.sign=!1),this}},{key:"__initializeDigits",value:function(){for(var c=0;c<this.length;c++)this[c]=0}},{key:"__clzmsd",value:function(){return g.__clz30(this.__digit(this.length-1))}},{key:"__inplaceMultiplyAdd",value:function(c,d,v){v>this.length&&(v=this.length);for(var D=32767&c,b=c>>>15,_=0,I=d,k=0;k<v;k++){var H=this.__digit(k),R=32767&H,V=H>>>15,J=g.__imul(R,D),U=g.__imul(R,b),j=g.__imul(V,D),re=g.__imul(V,b),le=I+J+_;_=le>>>30,le&=1073741823,le+=((32767&U)<<15)+((32767&j)<<15),_+=le>>>30,I=re+(U>>>15)+(j>>>15),this.__setDigit(k,1073741823&le)}if(_!==0||I!==0)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(c,d,v){for(var D,b=0,_=0;_<v;_++)D=this.__halfDigit(d+_)+c.__halfDigit(_)+b,b=D>>>15,this.__setHalfDigit(d+_,32767&D);return b}},{key:"__inplaceSub",value:function(c,d,v){var D=v-1>>>1,b=0;if(1&d){d>>=1;for(var _=this.__digit(d),I=32767&_,k=0;k<D;k++){var H=c.__digit(k),R=(_>>>15)-(32767&H)-b;b=1&R>>>15,this.__setDigit(d+k,(32767&R)<<15|32767&I),_=this.__digit(d+k+1),I=(32767&_)-(H>>>15)-b,b=1&I>>>15}var V=c.__digit(k),J=(_>>>15)-(32767&V)-b;b=1&J>>>15,this.__setDigit(d+k,(32767&J)<<15|32767&I);var U=V>>>15;if(d+k+1>=this.length)throw new RangeError("out of bounds");!(1&v)&&(_=this.__digit(d+k+1),I=(32767&_)-U-b,b=1&I>>>15,this.__setDigit(d+c.length,1073709056&_|32767&I))}else{d>>=1;for(var j=0;j<c.length-1;j++){var re=this.__digit(d+j),le=c.__digit(j),fe=(32767&re)-(32767&le)-b;b=1&fe>>>15;var ve=(re>>>15)-(le>>>15)-b;b=1&ve>>>15,this.__setDigit(d+j,(32767&ve)<<15|32767&fe)}var Ie=this.__digit(d+j),je=c.__digit(j),Xe=(32767&Ie)-(32767&je)-b;b=1&Xe>>>15;var Bt=0;!(1&v)&&(Bt=(Ie>>>15)-(je>>>15)-b,b=1&Bt>>>15),this.__setDigit(d+j,(32767&Bt)<<15|32767&Xe)}return b}},{key:"__inplaceRightShift",value:function(c){if(c!==0){for(var d,v=this.__digit(0)>>>c,D=this.length-1,b=0;b<D;b++)d=this.__digit(b+1),this.__setDigit(b,1073741823&d<<30-c|v),v=d>>>c;this.__setDigit(D,v)}}},{key:"__digit",value:function(c){return this[c]}},{key:"__unsignedDigit",value:function(c){return this[c]>>>0}},{key:"__setDigit",value:function(c,d){this[c]=0|d}},{key:"__setDigitGrow",value:function(c,d){this[c]=0|d}},{key:"__halfDigitLength",value:function(){var c=this.length;return 32767>=this.__unsignedDigit(c-1)?2*c-1:2*c}},{key:"__halfDigit",value:function(c){return 32767&this[c>>>1]>>>15*(1&c)}},{key:"__setHalfDigit",value:function(c,d){var v=c>>>1,D=this.__digit(v),b=1&c?32767&D|d<<15:1073709056&D|32767&d;this.__setDigit(v,b)}}],[{key:"BigInt",value:function(c){var d=Number.isFinite;if(typeof c=="number"){if(c===0)return g.__zero();if(g.__isOneDigitInt(c))return 0>c?g.__oneDigit(-c,!0):g.__oneDigit(c,!1);if(!d(c)||ee(c)!==c)throw new RangeError("The number "+c+" cannot be converted to BigInt because it is not an integer");return g.__fromDouble(c)}if(typeof c=="string"){var v=g.__fromString(c);if(v===null)throw new SyntaxError("Cannot convert "+c+" to a BigInt");return v}if(typeof c=="boolean")return c===!0?g.__oneDigit(1,!1):g.__zero();if(oe(c)==="object"){if(c.constructor===g)return c;var D=g.__toPrimitive(c);return g.BigInt(D)}throw new TypeError("Cannot convert "+c+" to a BigInt")}},{key:"toNumber",value:function(c){var d=c.length;if(d===0)return 0;if(d===1){var v=c.__unsignedDigit(0);return c.sign?-v:v}var D=c.__digit(d-1),b=g.__clz30(D),_=30*d-b;if(1024<_)return c.sign?-1/0:1/0;var I=_-1,k=D,H=d-1,R=b+3,V=R===32?0:k<<R;V>>>=12;var J=R-12,U=12<=R?0:k<<20+R,j=20+R;for(0<J&&0<H&&(H--,k=c.__digit(H),V|=k>>>30-J,U=k<<J+2,j=J+2);0<j&&0<H;)H--,k=c.__digit(H),U|=30<=j?k<<j-30:k>>>30-j,j-=30;var re=g.__decideRounding(c,j,H,k);if((re===1||re===0&&(1&U)==1)&&(U=U+1>>>0,U===0&&(V++,V>>>20!=0&&(V=0,I++,1023<I))))return c.sign?-1/0:1/0;var le=c.sign?-2147483648:0;return I=I+1023<<20,g.__kBitConversionInts[g.__kBitConversionIntHigh]=le|I|V,g.__kBitConversionInts[g.__kBitConversionIntLow]=U,g.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(c){if(c.length===0)return c;var d=c.__copy();return d.sign=!c.sign,d}},{key:"bitwiseNot",value:function(c){return c.sign?g.__absoluteSubOne(c).__trim():g.__absoluteAddOne(c,!0)}},{key:"exponentiate",value:function(c,d){if(d.sign)throw new RangeError("Exponent must be positive");if(d.length===0)return g.__oneDigit(1,!1);if(c.length===0)return c;if(c.length===1&&c.__digit(0)===1)return c.sign&&!(1&d.__digit(0))?g.unaryMinus(c):c;if(1<d.length)throw new RangeError("BigInt too big");var v=d.__unsignedDigit(0);if(v===1)return c;if(v>=g.__kMaxLengthBits)throw new RangeError("BigInt too big");if(c.length===1&&c.__digit(0)===2){var D=1+(0|v/30),b=c.sign&&(1&v)!=0,_=new g(D,b);_.__initializeDigits();var I=1<<v%30;return _.__setDigit(D-1,I),_}var k=null,H=c;for(1&v&&(k=c),v>>=1;v!==0;v>>=1)H=g.multiply(H,H),1&v&&(k===null?k=H:k=g.multiply(k,H));return k}},{key:"multiply",value:function(c,d){if(c.length===0)return c;if(d.length===0)return d;var v=c.length+d.length;30<=c.__clzmsd()+d.__clzmsd()&&v--;var D=new g(v,c.sign!==d.sign);D.__initializeDigits();for(var b=0;b<c.length;b++)g.__multiplyAccumulate(d,c.__digit(b),D,b);return D.__trim()}},{key:"divide",value:function(c,d){if(d.length===0)throw new RangeError("Division by zero");if(0>g.__absoluteCompare(c,d))return g.__zero();var v,D=c.sign!==d.sign,b=d.__unsignedDigit(0);if(d.length===1&&32767>=b){if(b===1)return D===c.sign?c:g.unaryMinus(c);v=g.__absoluteDivSmall(c,b,null)}else v=g.__absoluteDivLarge(c,d,!0,!1);return v.sign=D,v.__trim()}},{key:"remainder",value:function(c,d){if(d.length===0)throw new RangeError("Division by zero");if(0>g.__absoluteCompare(c,d))return c;var v=d.__unsignedDigit(0);if(d.length===1&&32767>=v){if(v===1)return g.__zero();var D=g.__absoluteModSmall(c,v);return D===0?g.__zero():g.__oneDigit(D,c.sign)}var b=g.__absoluteDivLarge(c,d,!1,!0);return b.sign=c.sign,b.__trim()}},{key:"add",value:function(c,d){var v=c.sign;return v===d.sign?g.__absoluteAdd(c,d,v):0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,v):g.__absoluteSub(d,c,!v)}},{key:"subtract",value:function(c,d){var v=c.sign;return v===d.sign?0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,v):g.__absoluteSub(d,c,!v):g.__absoluteAdd(c,d,v)}},{key:"leftShift",value:function(c,d){return d.length===0||c.length===0?c:d.sign?g.__rightShiftByAbsolute(c,d):g.__leftShiftByAbsolute(c,d)}},{key:"signedRightShift",value:function(c,d){return d.length===0||c.length===0?c:d.sign?g.__leftShiftByAbsolute(c,d):g.__rightShiftByAbsolute(c,d)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(c,d){return 0>g.__compareToBigInt(c,d)}},{key:"lessThanOrEqual",value:function(c,d){return 0>=g.__compareToBigInt(c,d)}},{key:"greaterThan",value:function(c,d){return 0<g.__compareToBigInt(c,d)}},{key:"greaterThanOrEqual",value:function(c,d){return 0<=g.__compareToBigInt(c,d)}},{key:"equal",value:function(c,d){if(c.sign!==d.sign||c.length!==d.length)return!1;for(var v=0;v<c.length;v++)if(c.__digit(v)!==d.__digit(v))return!1;return!0}},{key:"notEqual",value:function(c,d){return!g.equal(c,d)}},{key:"bitwiseAnd",value:function(c,d){if(!c.sign&&!d.sign)return g.__absoluteAnd(c,d).__trim();if(c.sign&&d.sign){var v=F(c.length,d.length)+1,D=g.__absoluteSubOne(c,v),b=g.__absoluteSubOne(d);return D=g.__absoluteOr(D,b,D),g.__absoluteAddOne(D,!0,D).__trim()}if(c.sign){var _=[d,c];c=_[0],d=_[1]}return g.__absoluteAndNot(c,g.__absoluteSubOne(d)).__trim()}},{key:"bitwiseXor",value:function(c,d){if(!c.sign&&!d.sign)return g.__absoluteXor(c,d).__trim();if(c.sign&&d.sign){var v=F(c.length,d.length),D=g.__absoluteSubOne(c,v),b=g.__absoluteSubOne(d);return g.__absoluteXor(D,b,D).__trim()}var _=F(c.length,d.length)+1;if(c.sign){var I=[d,c];c=I[0],d=I[1]}var k=g.__absoluteSubOne(d,_);return k=g.__absoluteXor(k,c,k),g.__absoluteAddOne(k,!0,k).__trim()}},{key:"bitwiseOr",value:function(c,d){var v=F(c.length,d.length);if(!c.sign&&!d.sign)return g.__absoluteOr(c,d).__trim();if(c.sign&&d.sign){var D=g.__absoluteSubOne(c,v),b=g.__absoluteSubOne(d);return D=g.__absoluteAnd(D,b,D),g.__absoluteAddOne(D,!0,D).__trim()}if(c.sign){var _=[d,c];c=_[0],d=_[1]}var I=g.__absoluteSubOne(d,v);return I=g.__absoluteAndNot(I,c,I),g.__absoluteAddOne(I,!0,I).__trim()}},{key:"asIntN",value:function(c,d){if(d.length===0)return d;if(c=ee(c),0>c)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(c===0)return g.__zero();if(c>=g.__kMaxLengthBits)return d;var v=0|(c+29)/30;if(d.length<v)return d;var D=d.__unsignedDigit(v-1),b=1<<(c-1)%30;if(d.length===v&&D<b)return d;var _=(D&b)===b;if(!_)return g.__truncateToNBits(c,d);if(!d.sign)return g.__truncateAndSubFromPowerOfTwo(c,d,!0);if(!(D&b-1)){for(var I=v-2;0<=I;I--)if(d.__digit(I)!==0)return g.__truncateAndSubFromPowerOfTwo(c,d,!1);return d.length===v&&D===b?d:g.__truncateToNBits(c,d)}return g.__truncateAndSubFromPowerOfTwo(c,d,!1)}},{key:"asUintN",value:function(c,d){if(d.length===0)return d;if(c=ee(c),0>c)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(c===0)return g.__zero();if(d.sign){if(c>g.__kMaxLengthBits)throw new RangeError("BigInt too big");return g.__truncateAndSubFromPowerOfTwo(c,d,!1)}if(c>=g.__kMaxLengthBits)return d;var v=0|(c+29)/30;if(d.length<v)return d;var D=c%30;if(d.length==v){if(D===0)return d;var b=d.__digit(v-1);if(!(b>>>D))return d}return g.__truncateToNBits(c,d)}},{key:"ADD",value:function(c,d){if(c=g.__toPrimitive(c),d=g.__toPrimitive(d),typeof c=="string")return typeof d!="string"&&(d=d.toString()),c+d;if(typeof d=="string")return c.toString()+d;if(c=g.__toNumeric(c),d=g.__toNumeric(d),g.__isBigInt(c)&&g.__isBigInt(d))return g.add(c,d);if(typeof c=="number"&&typeof d=="number")return c+d;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(c,d){return g.__compare(c,d,0)}},{key:"LE",value:function(c,d){return g.__compare(c,d,1)}},{key:"GT",value:function(c,d){return g.__compare(c,d,2)}},{key:"GE",value:function(c,d){return g.__compare(c,d,3)}},{key:"EQ",value:function(c,d){for(;;){if(g.__isBigInt(c))return g.__isBigInt(d)?g.equal(c,d):g.EQ(d,c);if(typeof c=="number"){if(g.__isBigInt(d))return g.__equalToNumber(d,c);if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(typeof c=="string"){if(g.__isBigInt(d))return c=g.__fromString(c),c!==null&&g.equal(c,d);if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(typeof c=="boolean"){if(g.__isBigInt(d))return g.__equalToNumber(d,+c);if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(oe(c)==="symbol"){if(g.__isBigInt(d))return!1;if(oe(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(oe(c)==="object"){if(oe(d)==="object"&&d.constructor!==g)return c==d;c=g.__toPrimitive(c)}else return c==d}}},{key:"NE",value:function(c,d){return!g.EQ(c,d)}},{key:"DataViewGetBigInt64",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return g.asIntN(64,g.DataViewGetBigUint64(c,d,v))}},{key:"DataViewGetBigUint64",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0&&arguments[2],D=v?[4,0]:[0,4],b=W(D,2),_=b[0],I=b[1],k=c.getUint32(d+_,v),H=c.getUint32(d+I,v),R=new g(3,!1);return R.__setDigit(0,1073741823&H),R.__setDigit(1,(268435455&k)<<2|H>>>30),R.__setDigit(2,k>>>28),R.__trim()}},{key:"DataViewSetBigInt64",value:function(c,d,v){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];g.DataViewSetBigUint64(c,d,v,D)}},{key:"DataViewSetBigUint64",value:function(c,d,v){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];v=g.asUintN(64,v);var b=0,_=0;if(0<v.length&&(_=v.__digit(0),1<v.length)){var I=v.__digit(1);_|=I<<30,b=I>>>2,2<v.length&&(b|=v.__digit(2)<<28)}var k=D?[4,0]:[0,4],H=W(k,2),R=H[0],V=H[1];c.setUint32(d+R,b,D),c.setUint32(d+V,_,D)}},{key:"__zero",value:function(){return new g(0,!1)}},{key:"__oneDigit",value:function(c,d){var v=new g(1,d);return v.__setDigit(0,c),v}},{key:"__decideRounding",value:function(c,d,v,D){if(0<d)return-1;var b;if(0>d)b=-d-1;else{if(v===0)return-1;v--,D=c.__digit(v),b=29}var _=1<<b;if(!(D&_))return-1;if(_-=1,(D&_)!=0)return 1;for(;0<v;)if(v--,c.__digit(v)!==0)return 1;return 0}},{key:"__fromDouble",value:function(c){var d=0>c;g.__kBitConversionDouble[0]=c;var v,D=2047&g.__kBitConversionInts[g.__kBitConversionIntHigh]>>>20,b=D-1023,_=(0|b/30)+1,I=new g(_,d),k=1048576,H=1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh]|k,R=g.__kBitConversionInts[g.__kBitConversionIntLow],V=20,J=b%30,U=0;if(J<V){var j=V-J;U=j+32,v=H>>>j,H=H<<32-j|R>>>j,R<<=32-j}else if(J===V)U=32,v=H,H=R,R=0;else{var re=J-V;U=32-re,v=H<<re|R>>>32-re,H=R<<re,R=0}I.__setDigit(_-1,v);for(var le=_-2;0<=le;le--)0<U?(U-=30,v=H>>>2,H=H<<30|R>>>2,R<<=30):v=0,I.__setDigit(le,v);return I.__trim()}},{key:"__isWhitespace",value:function(c){return 13>=c&&9<=c||(159>=c?c==32:131071>=c?c==160||c==5760:196607>=c?(c&=131071,10>=c||c==40||c==41||c==47||c==95||c==4096):c==65279)}},{key:"__fromString",value:function(c){var d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,v=0,D=c.length,b=0;if(b===D)return g.__zero();for(var _=c.charCodeAt(b);g.__isWhitespace(_);){if(++b===D)return g.__zero();_=c.charCodeAt(b)}if(_===43){if(++b===D)return null;_=c.charCodeAt(b),v=1}else if(_===45){if(++b===D)return null;_=c.charCodeAt(b),v=-1}if(d===0){if(d=10,_===48){if(++b===D)return g.__zero();if(_=c.charCodeAt(b),_===88||_===120){if(d=16,++b===D)return null;_=c.charCodeAt(b)}else if(_===79||_===111){if(d=8,++b===D)return null;_=c.charCodeAt(b)}else if(_===66||_===98){if(d=2,++b===D)return null;_=c.charCodeAt(b)}}}else if(d===16&&_===48){if(++b===D)return g.__zero();if(_=c.charCodeAt(b),_===88||_===120){if(++b===D)return null;_=c.charCodeAt(b)}}if(v!==0&&d!==10)return null;for(;_===48;){if(++b===D)return g.__zero();_=c.charCodeAt(b)}var I=D-b,k=g.__kMaxBitsPerChar[d],H=g.__kBitsPerCharTableMultiplier-1;if(I>1073741824/k)return null;var R=k*I+H>>>g.__kBitsPerCharTableShift,V=0|(R+29)/30,J=new g(V,!1),U=10>d?d:10,j=10<d?d-10:0;if(d&d-1){J.__initializeDigits();var Xe=!1,Bt=0;do{for(var Wn,Pn=0,Ur=1;;){if(Wn=void 0,_-48>>>0<U)Wn=_-48;else if((32|_)-97>>>0<j)Wn=(32|_)-87;else{Xe=!0;break}var to=Ur*d;if(1073741823<to)break;if(Ur=to,Pn=Pn*d+Wn,Bt++,++b===D){Xe=!0;break}_=c.charCodeAt(b)}H=30*g.__kBitsPerCharTableMultiplier-1;var no=0|(k*Bt+H>>>g.__kBitsPerCharTableShift)/30;J.__inplaceMultiplyAdd(Ur,Pn,no)}while(!Xe)}else{k>>=g.__kBitsPerCharTableShift;var re=[],le=[],fe=!1;do{for(var ve,Ie=0,je=0;;){if(ve=void 0,_-48>>>0<U)ve=_-48;else if((32|_)-97>>>0<j)ve=(32|_)-87;else{fe=!0;break}if(je+=k,Ie=Ie<<k|ve,++b===D){fe=!0;break}if(_=c.charCodeAt(b),30<je+k)break}re.push(Ie),le.push(je)}while(!fe);g.__fillFromParts(J,re,le)}if(b!==D){if(!g.__isWhitespace(_))return null;for(b++;b<D;b++)if(_=c.charCodeAt(b),!g.__isWhitespace(_))return null}return J.sign=v===-1,J.__trim()}},{key:"__fillFromParts",value:function(c,d,v){for(var D=0,b=0,_=0,I=d.length-1;0<=I;I--){var k=d[I],H=v[I];b|=k<<_,_+=H,_===30?(c.__setDigit(D++,b),_=0,b=0):30<_&&(c.__setDigit(D++,1073741823&b),_-=30,b=k>>>H-_)}if(b!==0){if(D>=c.length)throw new Error("implementation bug");c.__setDigit(D++,b)}for(;D<c.length;D++)c.__setDigit(D,0)}},{key:"__toStringBasePowerOfTwo",value:function(c,d){var v=c.length,D=d-1;D=(85&D>>>1)+(85&D),D=(51&D>>>2)+(51&D),D=(15&D>>>4)+(15&D);var b=D,_=d-1,I=c.__digit(v-1),k=g.__clz30(I),H=30*v-k,R=0|(H+b-1)/b;if(c.sign&&R++,268435456<R)throw new Error("string too long");for(var V=Array(R),J=R-1,U=0,j=0,re=0;re<v-1;re++){var le=c.__digit(re),fe=(U|le<<j)&_;V[J--]=g.__kConversionChars[fe];var ve=b-j;for(U=le>>>ve,j=30-ve;j>=b;)V[J--]=g.__kConversionChars[U&_],U>>>=b,j-=b}var Ie=(U|I<<j)&_;for(V[J--]=g.__kConversionChars[Ie],U=I>>>b-j;U!==0;)V[J--]=g.__kConversionChars[U&_],U>>>=b;if(c.sign&&(V[J--]="-"),J!==-1)throw new Error("implementation bug");return V.join("")}},{key:"__toStringGeneric",value:function(c,d,v){var D=c.length;if(D===0)return"";if(D===1){var b=c.__unsignedDigit(0).toString(d);return v===!1&&c.sign&&(b="-"+b),b}var _=30*D-g.__clz30(c.__digit(D-1)),I=g.__kMaxBitsPerChar[d],k=I-1,H=_*g.__kBitsPerCharTableMultiplier;H+=k-1,H=0|H/k;var R,V,J=H+1>>1,U=g.exponentiate(g.__oneDigit(d,!1),g.__oneDigit(J,!1)),j=U.__unsignedDigit(0);if(U.length===1&&32767>=j){R=new g(c.length,!1),R.__initializeDigits();for(var re,le=0,fe=2*c.length-1;0<=fe;fe--)re=le<<15|c.__halfDigit(fe),R.__setHalfDigit(fe,0|re/j),le=0|re%j;V=le.toString(d)}else{var ve=g.__absoluteDivLarge(c,U,!0,!0);R=ve.quotient;var Ie=ve.remainder.__trim();V=g.__toStringGeneric(Ie,d,!0)}R.__trim();for(var je=g.__toStringGeneric(R,d,!0);V.length<J;)V="0"+V;return v===!1&&c.sign&&(je="-"+je),je+V}},{key:"__unequalSign",value:function(c){return c?-1:1}},{key:"__absoluteGreater",value:function(c){return c?-1:1}},{key:"__absoluteLess",value:function(c){return c?1:-1}},{key:"__compareToBigInt",value:function(c,d){var v=c.sign;if(v!==d.sign)return g.__unequalSign(v);var D=g.__absoluteCompare(c,d);return 0<D?g.__absoluteGreater(v):0>D?g.__absoluteLess(v):0}},{key:"__compareToNumber",value:function(c,d){if(g.__isOneDigitInt(d)){var v=c.sign,D=0>d;if(v!==D)return g.__unequalSign(v);if(c.length===0){if(D)throw new Error("implementation bug");return d===0?0:-1}if(1<c.length)return g.__absoluteGreater(v);var b=Y(d),_=c.__unsignedDigit(0);return _>b?g.__absoluteGreater(v):_<b?g.__absoluteLess(v):0}return g.__compareToDouble(c,d)}},{key:"__compareToDouble",value:function(c,d){if(d!==d)return d;if(d===1/0)return-1;if(d===-1/0)return 1;var v=c.sign,D=0>d;if(v!==D)return g.__unequalSign(v);if(d===0)throw new Error("implementation bug: should be handled elsewhere");if(c.length===0)return-1;g.__kBitConversionDouble[0]=d;var b=2047&g.__kBitConversionInts[g.__kBitConversionIntHigh]>>>20;if(b==2047)throw new Error("implementation bug: handled elsewhere");var _=b-1023;if(0>_)return g.__absoluteGreater(v);var I=c.length,k=c.__digit(I-1),H=g.__clz30(k),R=30*I-H,V=_+1;if(R<V)return g.__absoluteLess(v);if(R>V)return g.__absoluteGreater(v);var J=1048576,U=1048576|1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh],j=g.__kBitConversionInts[g.__kBitConversionIntLow],re=20,le=29-H;if(le!==(0|(R-1)%30))throw new Error("implementation bug");var fe,ve=0;if(le<re){var Ie=re-le;ve=Ie+32,fe=U>>>Ie,U=U<<32-Ie|j>>>Ie,j<<=32-Ie}else if(le===re)ve=32,fe=U,U=j,j=0;else{var je=le-re;ve=32-je,fe=U<<je|j>>>32-je,U=j<<je,j=0}if(k>>>=0,fe>>>=0,k>fe)return g.__absoluteGreater(v);if(k<fe)return g.__absoluteLess(v);for(var Xe=I-2;0<=Xe;Xe--){0<ve?(ve-=30,fe=U>>>2,U=U<<30|j>>>2,j<<=30):fe=0;var Bt=c.__unsignedDigit(Xe);if(Bt>fe)return g.__absoluteGreater(v);if(Bt<fe)return g.__absoluteLess(v)}if(U!==0||j!==0){if(ve===0)throw new Error("implementation bug");return g.__absoluteLess(v)}return 0}},{key:"__equalToNumber",value:function(c,d){return g.__isOneDigitInt(d)?d===0?c.length===0:c.length===1&&c.sign===0>d&&c.__unsignedDigit(0)===Y(d):g.__compareToDouble(c,d)===0}},{key:"__comparisonResultToBool",value:function(c,d){return d===0?0>c:d===1?0>=c:d===2?0<c:d===3?0<=c:void 0}},{key:"__compare",value:function(c,d,v){if(c=g.__toPrimitive(c),d=g.__toPrimitive(d),typeof c=="string"&&typeof d=="string")switch(v){case 0:return c<d;case 1:return c<=d;case 2:return c>d;case 3:return c>=d}if(g.__isBigInt(c)&&typeof d=="string")return d=g.__fromString(d),d!==null&&g.__comparisonResultToBool(g.__compareToBigInt(c,d),v);if(typeof c=="string"&&g.__isBigInt(d))return c=g.__fromString(c),c!==null&&g.__comparisonResultToBool(g.__compareToBigInt(c,d),v);if(c=g.__toNumeric(c),d=g.__toNumeric(d),g.__isBigInt(c)){if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToBigInt(c,d),v);if(typeof d!="number")throw new Error("implementation bug");return g.__comparisonResultToBool(g.__compareToNumber(c,d),v)}if(typeof c!="number")throw new Error("implementation bug");if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToNumber(d,c),2^v);if(typeof d!="number")throw new Error("implementation bug");return v===0?c<d:v===1?c<=d:v===2?c>d:v===3?c>=d:void 0}},{key:"__absoluteAdd",value:function(c,d,v){if(c.length<d.length)return g.__absoluteAdd(d,c,v);if(c.length===0)return c;if(d.length===0)return c.sign===v?c:g.unaryMinus(c);var D=c.length;(c.__clzmsd()===0||d.length===c.length&&d.__clzmsd()===0)&&D++;for(var b,_=new g(D,v),I=0,k=0;k<d.length;k++)b=c.__digit(k)+d.__digit(k)+I,I=b>>>30,_.__setDigit(k,1073741823&b);for(;k<c.length;k++){var H=c.__digit(k)+I;I=H>>>30,_.__setDigit(k,1073741823&H)}return k<_.length&&_.__setDigit(k,I),_.__trim()}},{key:"__absoluteSub",value:function(c,d,v){if(c.length===0)return c;if(d.length===0)return c.sign===v?c:g.unaryMinus(c);for(var D,b=new g(c.length,v),_=0,I=0;I<d.length;I++)D=c.__digit(I)-d.__digit(I)-_,_=1&D>>>30,b.__setDigit(I,1073741823&D);for(;I<c.length;I++){var k=c.__digit(I)-_;_=1&k>>>30,b.__setDigit(I,1073741823&k)}return b.__trim()}},{key:"__absoluteAddOne",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length;v===null?v=new g(D,d):v.sign=d;for(var b,_=1,I=0;I<D;I++)b=c.__digit(I)+_,_=b>>>30,v.__setDigit(I,1073741823&b);return _!==0&&v.__setDigitGrow(D,1),v}},{key:"__absoluteSubOne",value:function(c,d){var v=c.length;d=d||v;for(var D,b=new g(d,!1),_=1,I=0;I<v;I++)D=c.__digit(I)-_,_=1&D>>>30,b.__setDigit(I,1073741823&D);if(_!==0)throw new Error("implementation bug");for(var k=v;k<d;k++)b.__setDigit(k,0);return b}},{key:"__absoluteAnd",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,k=D;c=d,D=b,d=I,b=k}var H=_;v===null?v=new g(H,!1):H=v.length;for(var R=0;R<_;R++)v.__setDigit(R,c.__digit(R)&d.__digit(R));for(;R<H;R++)v.__setDigit(R,0);return v}},{key:"__absoluteAndNot",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;D<b&&(_=D);var I=D;v===null?v=new g(I,!1):I=v.length;for(var k=0;k<_;k++)v.__setDigit(k,c.__digit(k)&~d.__digit(k));for(;k<D;k++)v.__setDigit(k,c.__digit(k));for(;k<I;k++)v.__setDigit(k,0);return v}},{key:"__absoluteOr",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,k=D;c=d,D=b,d=I,b=k}var H=D;v===null?v=new g(H,!1):H=v.length;for(var R=0;R<_;R++)v.__setDigit(R,c.__digit(R)|d.__digit(R));for(;R<D;R++)v.__setDigit(R,c.__digit(R));for(;R<H;R++)v.__setDigit(R,0);return v}},{key:"__absoluteXor",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,k=D;c=d,D=b,d=I,b=k}var H=D;v===null?v=new g(H,!1):H=v.length;for(var R=0;R<_;R++)v.__setDigit(R,c.__digit(R)^d.__digit(R));for(;R<D;R++)v.__setDigit(R,c.__digit(R));for(;R<H;R++)v.__setDigit(R,0);return v}},{key:"__absoluteCompare",value:function(c,d){var v=c.length-d.length;if(v!=0)return v;for(var D=c.length-1;0<=D&&c.__digit(D)===d.__digit(D);)D--;return 0>D?0:c.__unsignedDigit(D)>d.__unsignedDigit(D)?1:-1}},{key:"__multiplyAccumulate",value:function(c,d,v,D){if(d!==0){for(var b=32767&d,_=d>>>15,I=0,k=0,H=0;H<c.length;H++,D++){var R=v.__digit(D),V=c.__digit(H),J=32767&V,U=V>>>15,j=g.__imul(J,b),re=g.__imul(J,_),le=g.__imul(U,b),fe=g.__imul(U,_);R+=k+j+I,I=R>>>30,R&=1073741823,R+=((32767&re)<<15)+((32767&le)<<15),I+=R>>>30,k=fe+(re>>>15)+(le>>>15),v.__setDigit(D,1073741823&R)}for(;I!==0||k!==0;D++){var ve=v.__digit(D);ve+=I+k,k=0,I=ve>>>30,v.__setDigit(D,1073741823&ve)}}}},{key:"__internalMultiplyAdd",value:function(c,d,v,D,b){for(var _=v,I=0,k=0;k<D;k++){var H=c.__digit(k),R=g.__imul(32767&H,d),V=g.__imul(H>>>15,d),J=R+((32767&V)<<15)+I+_;_=J>>>30,I=V>>>15,b.__setDigit(k,1073741823&J)}if(b.length>D)for(b.__setDigit(D++,_+I);D<b.length;)b.__setDigit(D++,0);else if(_+I!==0)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;v===null&&(v=new g(c.length,!1));for(var D=0,b=2*c.length-1;0<=b;b-=2){var _=(D<<15|c.__halfDigit(b))>>>0,I=0|_/d;D=0|_%d,_=(D<<15|c.__halfDigit(b-1))>>>0;var k=0|_/d;D=0|_%d,v.__setDigit(b>>>1,I<<15|k)}return v}},{key:"__absoluteModSmall",value:function(c,d){for(var v,D=0,b=2*c.length-1;0<=b;b--)v=(D<<15|c.__halfDigit(b))>>>0,D=0|v%d;return D}},{key:"__absoluteDivLarge",value:function(c,d,v,D){var b=d.__halfDigitLength(),_=d.length,I=c.__halfDigitLength()-b,k=null;v&&(k=new g(I+2>>>1,!1),k.__initializeDigits());var H=new g(b+2>>>1,!1);H.__initializeDigits();var R=g.__clz15(d.__halfDigit(b-1));0<R&&(d=g.__specialLeftShift(d,R,0));for(var V=g.__specialLeftShift(c,R,1),J=d.__halfDigit(b-1),U=0,j=I;0<=j;j--){var re=32767,le=V.__halfDigit(j+b);if(le!==J){var fe=(le<<15|V.__halfDigit(j+b-1))>>>0;re=0|fe/J;for(var ve=0|fe%J,Ie=d.__halfDigit(b-2),je=V.__halfDigit(j+b-2);g.__imul(re,Ie)>>>0>(ve<<16|je)>>>0&&(re--,ve+=J,!(32767<ve)););}g.__internalMultiplyAdd(d,re,0,_,H);var Xe=V.__inplaceSub(H,j,b+1);Xe!==0&&(Xe=V.__inplaceAdd(d,j,b),V.__setHalfDigit(j+b,32767&V.__halfDigit(j+b)+Xe),re--),v&&(1&j?U=re<<15:k.__setDigit(j>>>1,U|re))}if(D)return V.__inplaceRightShift(R),v?{quotient:k,remainder:V}:V;if(v)return k;throw new Error("unreachable")}},{key:"__clz15",value:function(c){return g.__clz30(c)-15}},{key:"__specialLeftShift",value:function(c,d,v){var D=c.length,b=D+v,_=new g(b,!1);if(d===0){for(var I=0;I<D;I++)_.__setDigit(I,c.__digit(I));return 0<v&&_.__setDigit(D,0),_}for(var k,H=0,R=0;R<D;R++)k=c.__digit(R),_.__setDigit(R,1073741823&k<<d|H),H=k>>>30-d;return 0<v&&_.__setDigit(D,H),_}},{key:"__leftShiftByAbsolute",value:function(c,d){var v=g.__toShiftAmount(d);if(0>v)throw new RangeError("BigInt too big");var D=0|v/30,b=v%30,_=c.length,I=b!==0&&c.__digit(_-1)>>>30-b!=0,k=_+D+(I?1:0),H=new g(k,c.sign);if(b===0){for(var R=0;R<D;R++)H.__setDigit(R,0);for(;R<k;R++)H.__setDigit(R,c.__digit(R-D))}else{for(var V=0,J=0;J<D;J++)H.__setDigit(J,0);for(var U,j=0;j<_;j++)U=c.__digit(j),H.__setDigit(j+D,1073741823&U<<b|V),V=U>>>30-b;if(I)H.__setDigit(_+D,V);else if(V!==0)throw new Error("implementation bug")}return H.__trim()}},{key:"__rightShiftByAbsolute",value:function(c,d){var v=c.length,D=c.sign,b=g.__toShiftAmount(d);if(0>b)return g.__rightShiftByMaximum(D);var _=0|b/30,I=b%30,k=v-_;if(0>=k)return g.__rightShiftByMaximum(D);var H=!1;if(D){var R=(1<<I)-1;if(c.__digit(_)&R)H=!0;else for(var V=0;V<_;V++)if(c.__digit(V)!==0){H=!0;break}}if(H&&I===0){var J=c.__digit(v-1),U=~J==0;U&&k++}var j=new g(k,D);if(I===0){j.__setDigit(k-1,0);for(var re=_;re<v;re++)j.__setDigit(re-_,c.__digit(re))}else{for(var le,fe=c.__digit(_)>>>I,ve=v-_-1,Ie=0;Ie<ve;Ie++)le=c.__digit(Ie+_+1),j.__setDigit(Ie,1073741823&le<<30-I|fe),fe=le>>>I;j.__setDigit(ve,fe)}return H&&(j=g.__absoluteAddOne(j,!0,j)),j.__trim()}},{key:"__rightShiftByMaximum",value:function(c){return c?g.__oneDigit(1,!0):g.__zero()}},{key:"__toShiftAmount",value:function(c){if(1<c.length)return-1;var d=c.__unsignedDigit(0);return d>g.__kMaxLengthBits?-1:d}},{key:"__toPrimitive",value:function(c){var d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"default";if(oe(c)!=="object"||c.constructor===g)return c;if(typeof Symbol<"u"&&oe(Symbol.toPrimitive)==="symbol"&&c[Symbol.toPrimitive]){var v=c[Symbol.toPrimitive](d);if(oe(v)!=="object")return v;throw new TypeError("Cannot convert object to primitive value")}var D=c.valueOf;if(D){var b=D.call(c);if(oe(b)!=="object")return b}var _=c.toString;if(_){var I=_.call(c);if(oe(I)!=="object")return I}throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function(c){return g.__isBigInt(c)?c:+c}},{key:"__isBigInt",value:function(c){return oe(c)==="object"&&c!==null&&c.constructor===g}},{key:"__truncateToNBits",value:function(c,d){for(var v=0|(c+29)/30,D=new g(v,d.sign),b=v-1,_=0;_<b;_++)D.__setDigit(_,d.__digit(_));var I=d.__digit(b);if(c%30!=0){var k=32-c%30;I=I<<k>>>k}return D.__setDigit(b,I),D.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(c,d,v){for(var D=Math.min,b,_=0|(c+29)/30,I=new g(_,v),k=0,H=_-1,R=0,V=D(H,d.length);k<V;k++)b=0-d.__digit(k)-R,R=1&b>>>30,I.__setDigit(k,1073741823&b);for(;k<H;k++)I.__setDigit(k,0|1073741823&-R);var J,U=H<d.length?d.__digit(H):0,j=c%30;if(j===0)J=0-U-R,J&=1073741823;else{var re=32-j;U=U<<re>>>re;var le=1<<32-re;J=le-U-R,J&=le-1}return I.__setDigit(H,J),I.__trim()}},{key:"__digitPow",value:function(c,d){for(var v=1;0<d;)1&d&&(v*=c),d>>>=1,c*=c;return v}},{key:"__detectBigEndian",value:function(){return g.__kBitConversionDouble[0]=-0,g.__kBitConversionInts[0]!==0}},{key:"__isOneDigitInt",value:function(c){return(1073741823&c)===c}}])}(Ee(Array));return ie.__kMaxLength=33554432,ie.__kMaxLengthBits=ie.__kMaxLength<<5,ie.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],ie.__kBitsPerCharTableShift=5,ie.__kBitsPerCharTableMultiplier=1<<ie.__kBitsPerCharTableShift,ie.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],ie.__kBitConversionBuffer=new ArrayBuffer(8),ie.__kBitConversionDouble=new Float64Array(ie.__kBitConversionBuffer),ie.__kBitConversionInts=new Int32Array(ie.__kBitConversionBuffer),ie.__kBitConversionIntHigh=ie.__detectBigEndian()?0:1,ie.__kBitConversionIntLow=ie.__detectBigEndian()?1:0,ie.__clz30=t?function(N){return t(N)-2}:function(N){var Y=Math.LN2,F=Math.log;return N===0?30:0|29-(0|F(N>>>0)/Y)},ie.__imul=n||function(N,Y){return 0|N*Y},ie})});var qr=()=>{};function Kn(n,t,e,r){return n?(n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)):qr}var Tc=n=>n instanceof HTMLInputElement;var Wr=n=>{let{value:t}=n;if(n.type==="checkbox"&&(t=n.checked.toString()),n.type==="radio"){let e=n.closest("form")?.querySelector(`input[name="${n.name}"]:checked`);t=Tc(e)?e.value:""}return t.toString()};var Sa=class{constructor(){O(this,"listeners",new Map)}on(t,e){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(e)}off(t,e){this.listeners.get(t)?.delete(e)}emit(t,e){this.listeners.get(t)?.forEach(r=>r(e))}},oo=new Sa;function ot(n,t){oo.emit(n,t)}function tn(n,t){Array.isArray(n)?n.forEach(e=>oo.on(e,t)):oo.on(n,t)}var Zn=()=>{let n=document.documentElement.lang.toLowerCase(),t={iso639:"fr",bcp47:"fr-FR"},r=Object.entries({en:{iso639:"en",bcp47:"en"},fr:{iso639:"fr",bcp47:"fr-FR"},de:{iso639:"de",bcp47:"de"},es:{iso639:"es",bcp47:"es"},it:{iso639:"it",bcp47:"it"},pt:{iso639:"pt",bcp47:"pt"},zh:{iso639:"zh",bcp47:"zh"},ar:{iso639:"ar",bcp47:"ar"},ru:{iso639:"ru",bcp47:"ru"}}).find(([i])=>n.startsWith(i))?.[1];return r&&(t=r),t},xn=Zn().bcp47,Gm=Zn().iso639;var Cc={en:{loading:"Loading...",night:"Night",chooseOption:"Choose an option",apartment:"Apartment",total:"In total",missingEnterpriseId:"Missing enterprise-ID",missingCategoryId:"Missing category-ID",minimumNights:"nights minimum",maximumNights:"nights maximum",booked:"Already Booked",select:"Select",fatalErrorMessage:"Oops! An unexpected error occurred. Please try reloading or contact support.",pleaseWait:"Please wait...","chargingMode:Once":"Once","chargingMode:PerTimeUnit":"Nightly","chargingMode:PerPersonPerTimeUnit":"Nightly per person",adults:"Adults",children:"Children (0-18 years old)",guestSingular:"Person",guestPlural:"People",couponValid:"Coupon is valid ;)",couponInvalid:"Coupon is invalid !",couponError:"Error validating coupon!",proceedToPayment:"Proceed to payment",completePayment:"Complete the payment",viewHotelPage:"View Site",pricingProducts:"Products:",pricingProductsAndExtras:"Products & Extras:",pricingTaxes:"Taxes:",pricingSubtotal:"Subtotal:",pricingService:"service"},"fr-FR":{loading:"Chargement...",night:"Nuit",chooseOption:"Choisir une option",apartment:"Appartement",total:"Au total",missingEnterpriseId:"ID d'entreprise manquant",missingCategoryId:"ID de cat\xE9gorie manquant",minimumNights:"nuits minimum",maximumNights:"nuits maximum",booked:"D\xE9j\xE0 r\xE9serv\xE9",select:"S\xE9lectionner",fatalErrorMessage:"Oups ! Une erreur inattendue s'est produite. Veuillez recharger la page ou contacter le support.",pleaseWait:"S'il vous pla\xEEt, attendez...","chargingMode:Once":"Une fois","chargingMode:PerTimeUnit":"Par nuit","chargingMode:PerPersonPerTimeUnit":"Par personne par nuit",adults:"Adultes",children:"Enfants (0-18 ans)",guestSingular:"Personne",guestPlural:"Personnes",couponValid:"Le coupon est valide ;)",couponInvalid:"Le coupon est invalide !",couponError:"Erreur lors de la validation du coupon !",proceedToPayment:"Proc\xE9der au paiement",completePayment:"Finalisez le paiement",viewHotelPage:"Voir le site",pricingProducts:"Produits :",pricingProductsAndExtras:"Produits et options :",pricingTaxes:"Taxes :",pricingSubtotal:"Sous-total :",pricingService:"service"},de:{loading:"Laden...",night:"Nacht",chooseOption:"Option ausw\xE4hlen",apartment:"Apartment",total:"Gesamt",missingEnterpriseId:"Unternehmens-ID fehlt",missingCategoryId:"Kategorie-ID fehlt",minimumNights:"Mindestn\xE4chte",maximumNights:"Maximale N\xE4chte",booked:"Bereits gebucht",select:"Ausw\xE4hlen",fatalErrorMessage:"Hoppla! Ein unerwarteter Fehler ist aufgetreten. Bitte laden Sie die Seite neu oder kontaktieren Sie den Support.",pleaseWait:"Bitte warten...","chargingMode:Once":"Einmal","chargingMode:PerTimeUnit":"Pro Nacht","chargingMode:PerPersonPerTimeUnit":"Pro Person und Nacht",adults:"Erwachsene",children:"Kinder (0-18 Jahre)",guestSingular:"Person",guestPlural:"Personen",couponValid:"Gutschein ist g\xFCltig ;)",couponInvalid:"Gutschein ist ung\xFCltig!",couponError:"Fehler bei der Gutscheinpr\xFCfung!",proceedToPayment:"Zur Zahlung fortfahren",completePayment:"Zahlung abschlie\xDFen",viewHotelPage:"Website ansehen",pricingProducts:"Produkte:",pricingProductsAndExtras:"Produkte & Extras:",pricingTaxes:"Steuern:",pricingSubtotal:"Zwischensumme:",pricingService:"Service"},es:{loading:"Cargando...",night:"Noche",chooseOption:"Elige una opci\xF3n",apartment:"Apartamento",total:"Total",missingEnterpriseId:"Falta el ID de empresa",missingCategoryId:"Falta el ID de categor\xEDa",minimumNights:"noches m\xEDnimas",maximumNights:"noches m\xE1ximas",booked:"Ya reservado",select:"Seleccionar",fatalErrorMessage:"\xA1Ups! Ha ocurrido un error inesperado. Por favor, recarga la p\xE1gina o contacta con soporte.",pleaseWait:"Por favor espera...","chargingMode:Once":"Una vez","chargingMode:PerTimeUnit":"Por noche","chargingMode:PerPersonPerTimeUnit":"Por persona y noche",adults:"Adultos",children:"Ni\xF1os (0-18 a\xF1os)",guestSingular:"Persona",guestPlural:"Personas",couponValid:"El cup\xF3n es v\xE1lido ;)",couponInvalid:"\xA1El cup\xF3n no es v\xE1lido!",couponError:"Error al validar el cup\xF3n!",proceedToPayment:"Ir al pago",completePayment:"Completar el pago",viewHotelPage:"Ver el sitio",pricingProducts:"Productos:",pricingProductsAndExtras:"Productos y extras:",pricingTaxes:"Impuestos:",pricingSubtotal:"Subtotal:",pricingService:"servicio"},it:{loading:"Caricamento...",night:"Notte",chooseOption:"Scegli un\u2019opzione",apartment:"Appartamento",total:"Totale",missingEnterpriseId:"ID azienda mancante",missingCategoryId:"ID categoria mancante",minimumNights:"notti minime",maximumNights:"notti massime",booked:"Gi\xE0 prenotato",select:"Seleziona",fatalErrorMessage:"Ops! Si \xE8 verificato un errore imprevisto. Ricarica la pagina o contatta il supporto.",pleaseWait:"Attendere prego...","chargingMode:Once":"Una volta","chargingMode:PerTimeUnit":"Per notte","chargingMode:PerPersonPerTimeUnit":"Per persona a notte",adults:"Adulti",children:"Bambini (0-18 anni)",guestSingular:"Persona",guestPlural:"Persone",couponValid:"Il coupon \xE8 valido ;)",couponInvalid:"Il coupon non \xE8 valido!",couponError:"Errore durante la verifica del coupon!",proceedToPayment:"Procedi al pagamento",completePayment:"Completa il pagamento",viewHotelPage:"Vedi il sito",pricingProducts:"Prodotti:",pricingProductsAndExtras:"Prodotti ed extra:",pricingTaxes:"Tasse:",pricingSubtotal:"Subtotale:",pricingService:"servizio"},pt:{loading:"A carregar...",night:"Noite",chooseOption:"Escolha uma op\xE7\xE3o",apartment:"Apartamento",total:"Total",missingEnterpriseId:"ID da empresa em falta",missingCategoryId:"ID da categoria em falta",minimumNights:"noites m\xEDnimas",maximumNights:"noites m\xE1ximas",booked:"J\xE1 reservado",select:"Selecionar",fatalErrorMessage:"Ops! Ocorreu um erro inesperado. Por favor, recarregue a p\xE1gina ou contacte o suporte.",pleaseWait:"Por favor, aguarde...","chargingMode:Once":"Uma vez","chargingMode:PerTimeUnit":"Por noite","chargingMode:PerPersonPerTimeUnit":"Por pessoa por noite",adults:"Adultos",children:"Crian\xE7as (0-18 anos)",guestSingular:"Pessoa",guestPlural:"Pessoas",couponValid:"O cup\xE3o \xE9 v\xE1lido ;)",couponInvalid:"O cup\xE3o \xE9 inv\xE1lido!",couponError:"Erro ao validar o cup\xE3o!",proceedToPayment:"Prosseguir para pagamento",completePayment:"Concluir pagamento",viewHotelPage:"Ver site",pricingProducts:"Produtos:",pricingProductsAndExtras:"Produtos e extras:",pricingTaxes:"Impostos:",pricingSubtotal:"Subtotal:",pricingService:"servi\xE7o"},zh:{loading:"\u52A0\u8F7D\u4E2D...",night:"\u665A",chooseOption:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879",apartment:"\u516C\u5BD3",total:"\u603B\u8BA1",missingEnterpriseId:"\u7F3A\u5C11\u4F01\u4E1AID",missingCategoryId:"\u7F3A\u5C11\u7C7B\u522BID",minimumNights:"\u6700\u5C11\u5165\u4F4F\u665A\u6570",maximumNights:"\u6700\u591A\u5165\u4F4F\u665A\u6570",booked:"\u5DF2\u9884\u8BA2",select:"\u9009\u62E9",fatalErrorMessage:"\u7CDF\u7CD5\uFF01\u53D1\u751F\u4E86\u610F\u5916\u9519\u8BEF\u3002\u8BF7\u5237\u65B0\u9875\u9762\u6216\u8054\u7CFB\u652F\u6301\u3002",pleaseWait:"\u8BF7\u7A0D\u5019...","chargingMode:Once":"\u4E00\u6B21","chargingMode:PerTimeUnit":"\u6BCF\u665A","chargingMode:PerPersonPerTimeUnit":"\u6BCF\u4EBA\u6BCF\u665A",adults:"\u6210\u4EBA",children:"\u513F\u7AE5\uFF080-18\u5C81\uFF09",guestSingular:"\u4EBA",guestPlural:"\u4EBA",couponValid:"\u4F18\u60E0\u5238\u6709\u6548 ;)",couponInvalid:"\u4F18\u60E0\u5238\u65E0\u6548\uFF01",couponError:"\u9A8C\u8BC1\u4F18\u60E0\u5238\u65F6\u51FA\u9519\uFF01",proceedToPayment:"\u524D\u5F80\u652F\u4ED8",completePayment:"\u5B8C\u6210\u652F\u4ED8",viewHotelPage:"\u67E5\u770B\u7F51\u7AD9",pricingProducts:"\u4EA7\u54C1\uFF1A",pricingProductsAndExtras:"\u4EA7\u54C1\u53CA\u9644\u52A0\u9879\uFF1A",pricingTaxes:"\u7A0E\u8D39\uFF1A",pricingSubtotal:"\u5C0F\u8BA1\uFF1A",pricingService:"\u670D\u52A1"},ar:{loading:"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644...",night:"\u0644\u064A\u0644\u0629",chooseOption:"\u0627\u062E\u062A\u0631 \u062E\u064A\u0627\u0631\u064B\u0627",apartment:"\u0634\u0642\u0629",total:"\u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A",missingEnterpriseId:"\u0645\u0639\u0631\u0651\u0641 \u0627\u0644\u0634\u0631\u0643\u0629 \u0645\u0641\u0642\u0648\u062F",missingCategoryId:"\u0645\u0639\u0631\u0651\u0641 \u0627\u0644\u0641\u0626\u0629 \u0645\u0641\u0642\u0648\u062F",minimumNights:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u062F\u0646\u0649 \u0644\u0639\u062F\u062F \u0627\u0644\u0644\u064A\u0627\u0644\u064A",maximumNights:"\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0639\u062F\u062F \u0627\u0644\u0644\u064A\u0627\u0644\u064A",booked:"\u0645\u062D\u062C\u0648\u0632 \u0628\u0627\u0644\u0641\u0639\u0644",select:"\u0627\u062E\u062A\u064A\u0627\u0631",fatalErrorMessage:"\u0639\u0630\u0631\u064B\u0627! \u062D\u062F\u062B \u062E\u0637\u0623 \u063A\u064A\u0631 \u0645\u062A\u0648\u0642\u0639. \u064A\u0631\u062C\u0649 \u0625\u0639\u0627\u062F\u0629 \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0635\u0641\u062D\u0629 \u0623\u0648 \u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062F\u0639\u0645.",pleaseWait:"\u064A\u0631\u062C\u0649 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631...","chargingMode:Once":"\u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629","chargingMode:PerTimeUnit":"\u0644\u0643\u0644 \u0644\u064A\u0644\u0629","chargingMode:PerPersonPerTimeUnit":"\u0644\u0643\u0644 \u0634\u062E\u0635 \u0641\u064A \u0627\u0644\u0644\u064A\u0644\u0629",adults:"\u0627\u0644\u0628\u0627\u0644\u063A\u0648\u0646",children:"\u0627\u0644\u0623\u0637\u0641\u0627\u0644 (0-18 \u0633\u0646\u0629)",guestSingular:"\u0634\u062E\u0635",guestPlural:"\u0623\u0634\u062E\u0627\u0635",couponValid:"\u0627\u0644\u0642\u0633\u064A\u0645\u0629 \u0635\u0627\u0644\u062D\u0629 ;)",couponInvalid:"\u0627\u0644\u0642\u0633\u064A\u0645\u0629 \u063A\u064A\u0631 \u0635\u0627\u0644\u062D\u0629!",couponError:"\u062E\u0637\u0623 \u0641\u064A \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u0644\u0642\u0633\u064A\u0645\u0629!",proceedToPayment:"\u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0641\u0639",completePayment:"\u0625\u062A\u0645\u0627\u0645 \u0627\u0644\u062F\u0641\u0639",viewHotelPage:"\u0639\u0631\u0636 \u0627\u0644\u0645\u0648\u0642\u0639",pricingProducts:"\u0627\u0644\u0645\u0646\u062A\u062C\u0627\u062A:",pricingProductsAndExtras:"\u0627\u0644\u0645\u0646\u062A\u062C\u0627\u062A \u0648\u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062A:",pricingTaxes:"\u0627\u0644\u0636\u0631\u0627\u0626\u0628:",pricingSubtotal:"\u0627\u0644\u0645\u062C\u0645\u0648\u0639 \u0627\u0644\u0641\u0631\u0639\u064A:",pricingService:"\u0627\u0644\u062E\u062F\u0645\u0629"},ru:{loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...",night:"\u041D\u043E\u0447\u044C",chooseOption:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442",apartment:"\u0410\u043F\u0430\u0440\u0442\u0430\u043C\u0435\u043D\u0442\u044B",total:"\u0418\u0442\u043E\u0433\u043E",missingEnterpriseId:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ID \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438",missingCategoryId:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ID \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438",minimumNights:"\u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043D\u043E\u0447\u0435\u0439",maximumNights:"\u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043D\u043E\u0447\u0435\u0439",booked:"\u0423\u0436\u0435 \u0437\u0430\u0431\u0440\u043E\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u043E",select:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C",fatalErrorMessage:"\u0423\u043F\u0441! \u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439.",pleaseWait:"\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435...","chargingMode:Once":"\u041E\u0434\u0438\u043D \u0440\u0430\u0437","chargingMode:PerTimeUnit":"\u0417\u0430 \u043D\u043E\u0447\u044C","chargingMode:PerPersonPerTimeUnit":"\u0417\u0430 \u0447\u0435\u043B\u043E\u0432\u0435\u043A\u0430 \u0437\u0430 \u043D\u043E\u0447\u044C",adults:"\u0412\u0437\u0440\u043E\u0441\u043B\u044B\u0435",children:"\u0414\u0435\u0442\u0438 (0-18 \u043B\u0435\u0442)",guestSingular:"\u0427\u0435\u043B\u043E\u0432\u0435\u043A",guestPlural:"\u041B\u044E\u0434\u0438",couponValid:"\u041A\u0443\u043F\u043E\u043D \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D ;)",couponInvalid:"\u041A\u0443\u043F\u043E\u043D \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D!",couponError:"\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043A\u0443\u043F\u043E\u043D\u0430!",proceedToPayment:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u043B\u0430\u0442\u0435",completePayment:"\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u043E\u043F\u043B\u0430\u0442\u0443",viewHotelPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0430\u0439\u0442",pricingProducts:"\u0422\u043E\u0432\u0430\u0440\u044B:",pricingProductsAndExtras:"\u0422\u043E\u0432\u0430\u0440\u044B \u0438 \u0434\u043E\u043F. \u0443\u0441\u043B\u0443\u0433\u0438:",pricingTaxes:"\u041D\u0430\u043B\u043E\u0433\u0438:",pricingSubtotal:"\u041F\u0440\u043E\u043C\u0435\u0436\u0443\u0442\u043E\u0447\u043D\u044B\u0439 \u0438\u0442\u043E\u0433:",pricingService:"\u0443\u0441\u043B\u0443\u0433\u0430"}},ka={en:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"fr-FR":["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],de:["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],es:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sept.","oct.","nov.","dic."],it:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],pt:["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],zh:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],ar:["\u064A\u0646\u0627\u064A\u0631","\u0641\u0628\u0631\u0627\u064A\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064A\u0644","\u0645\u0627\u064A\u0648","\u064A\u0648\u0646\u064A\u0648","\u064A\u0648\u0644\u064A\u0648","\u0623\u063A\u0633\u0637\u0633","\u0633\u0628\u062A\u0645\u0628\u0631","\u0623\u0643\u062A\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062F\u064A\u0633\u0645\u0628\u0631"],ru:["\u044F\u043D\u0432.","\u0444\u0435\u0432\u0440.","\u043C\u0430\u0440\u0442","\u0430\u043F\u0440.","\u043C\u0430\u0439","\u0438\u044E\u043D\u044C","\u0438\u044E\u043B\u044C","\u0430\u0432\u0433.","\u0441\u0435\u043D\u0442.","\u043E\u043A\u0442.","\u043D\u043E\u044F\u0431.","\u0434\u0435\u043A."]},Pc=()=>{let n=Zn().bcp47,t=n.split("-")[0],e=[n,t,"en"];for(let r of e)if(r in ka)return ka[r];return ka.en},Ic=(n,t)=>{for(let e of t){let r=n[e];if(typeof r=="string"&&r.trim()!=="")return r}},Kd=n=>{let t=[],e=o=>{o&&!t.includes(o)&&t.push(o)};e(n);let r=n.split("-")[0];return r&&r!==n&&e(r),({en:["en-US","en-GB"],es:["es-ES","es-MX","es-419"],de:["de-DE","de-AT","de-CH"],it:["it-IT","it-CH"],pt:["pt-PT","pt-BR"],zh:["zh-CN","zh-TW","zh-Hans","zh-Hant"],ar:["ar-SA","ar-EG"],ru:["ru-RU"],fr:["fr-FR","fr-CA","fr-BE","fr"]}[r]??[]).forEach(e),e("en-US"),e("en"),e("fr-FR"),e("fr"),t},mn=n=>Cc[Zn().bcp47][n]||Cc["fr-FR"][n],Nt=n=>{let t=Zn().bcp47,e=t.split("-")[0],r=Ic(n,Kd(t));if(r!==void 0)return r;if(e){let a=Object.entries(n).find(([s])=>s===e||s.startsWith(`${e}-`));if(a&&a[1].trim()!=="")return a[1]}let i=Ic(n,["en-US","en","fr-FR","fr"]);if(i!==void 0)return i;let o=Object.values(n).find(a=>typeof a=="string"&&a.trim()!=="");return o!==void 0?o:(console.warn(`Translation [${t}] not found and no fallback strings were available.`,n),"")};function Ta(n){let t=Object.create(null);for(let e of n.split(","))t[e]=1;return e=>e in t}var Ca=Object.assign;var Zd=Object.prototype.hasOwnProperty,ao=(n,t)=>Zd.call(n,t),Gn=Array.isArray,Kr=n=>xc(n)==="[object Map]";var Gd=n=>typeof n=="string",pr=n=>typeof n=="symbol",Zr=n=>n!==null&&typeof n=="object";var Jd=Object.prototype.toString,xc=n=>Jd.call(n),Rc=n=>xc(n).slice(8,-1);var so=n=>Gd(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n;var co=n=>{let t=Object.create(null);return e=>t[e]||(t[e]=n(e))},Xd=/-(\w)/g,tp=co(n=>n.replace(Xd,(t,e)=>e?e.toUpperCase():"")),Qd=/\B([A-Z])/g,np=co(n=>n.replace(Qd,"-$1").toLowerCase()),eh=co(n=>n.charAt(0).toUpperCase()+n.slice(1)),rp=co(n=>n?`on${eh(n)}`:""),Jn=(n,t)=>!Object.is(n,t);var th="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var ip=Ta(th+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var Ia;var Pe;var Pa=new WeakSet,ho=class{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ia&&Ia.active&&Ia.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Pa.has(this)&&(Pa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||nh(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ac(this),Oc(this);let t=Pe,e=Zt;Pe=this,Zt=!0;try{return this.fn()}finally{Fc(this),Pe=t,Zt=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ua(t);this.deps=this.depsTail=void 0,Ac(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Pa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Aa(this)&&this.run()}get dirty(){return Aa(this)}},Nc=0,Jr,Xr;function nh(n,t=!1){if(n.flags|=8,t){n.next=Xr,Xr=n;return}n.next=Jr,Jr=n}function za(){Nc++}function Ba(){if(--Nc>0)return;if(Xr){let t=Xr;for(Xr=void 0;t;){let e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Jr;){let t=Jr;for(Jr=void 0;t;){let e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){n||(n=r)}t=e}}if(n)throw n}function Oc(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fc(n){let t,e=n.depsTail,r=e;for(;r;){let i=r.prevDep;r.version===-1?(r===e&&(e=i),Ua(r),ih(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}n.deps=t,n.depsTail=e}function Aa(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(rh(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function rh(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===mo)||(n.globalVersion=mo,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Aa(n))))return;n.flags|=2;let t=n.dep,e=Pe,r=Zt;Pe=n,Zt=!0;try{Oc(n);let i=n.fn(n._value);(t.version===0||Jn(i,n._value))&&(n.flags|=128,n._value=i,t.version++)}catch(i){throw t.version++,i}finally{Pe=e,Zt=r,Fc(n),n.flags&=-3}}function Ua(n,t=!1){let{dep:e,prevSub:r,nextSub:i}=n;if(r&&(r.nextSub=i,n.prevSub=void 0),i&&(i.prevSub=r,n.nextSub=void 0),e.subs===n&&(e.subs=r,!r&&e.computed)){e.computed.flags&=-5;for(let o=e.computed.deps;o;o=o.nextDep)Ua(o,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function ih(n){let{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}function Hc(n,t){n.effect instanceof ho&&(n=n.effect.fn);let e=new ho(n);t&&Ca(e,t);try{e.run()}catch(i){throw e.stop(),i}let r=e.run.bind(e);return r.effect=e,r}var Zt=!0,Yc=[];function oh(){Yc.push(Zt),Zt=!1}function ah(){let n=Yc.pop();Zt=n===void 0?!0:n}function Ac(n){let{cleanup:t}=n;if(n.cleanup=void 0,t){let e=Pe;Pe=void 0;try{t()}finally{Pe=e}}}var mo=0,La=class{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},po=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Pe||!Zt||Pe===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==Pe)e=this.activeLink=new La(Pe,this),Pe.deps?(e.prevDep=Pe.depsTail,Pe.depsTail.nextDep=e,Pe.depsTail=e):Pe.deps=Pe.depsTail=e,$c(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){let r=e.nextDep;r.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=r),e.prevDep=Pe.depsTail,e.nextDep=void 0,Pe.depsTail.nextDep=e,Pe.depsTail=e,Pe.deps===e&&(Pe.deps=r)}return e}trigger(t){this.version++,mo++,this.notify(t)}notify(t){za();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ba()}}};function $c(n){if(n.dep.sc++,n.sub.flags&4){let t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)$c(r)}let e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),n.dep.subs=n}}var Na=new WeakMap,Xn=Symbol(""),Oa=Symbol(""),Qr=Symbol("");function Mt(n,t,e){if(Zt&&Pe){let r=Na.get(n);r||Na.set(n,r=new Map);let i=r.get(e);i||(r.set(e,i=new po),i.map=r,i.key=e),i.track()}}function Rn(n,t,e,r,i,o){let a=Na.get(n);if(!a){mo++;return}let s=l=>{l&&l.trigger()};if(za(),t==="clear")a.forEach(s);else{let l=Gn(n),u=l&&so(e);if(l&&e==="length"){let h=Number(r);a.forEach((p,y)=>{(y==="length"||y===Qr||!pr(y)&&y>=h)&&s(p)})}else switch((e!==void 0||a.has(void 0))&&s(a.get(e)),u&&s(a.get(Qr)),t){case"add":l?u&&s(a.get("length")):(s(a.get(Xn)),Kr(n)&&s(a.get(Oa)));break;case"delete":l||(s(a.get(Xn)),Kr(n)&&s(a.get(Oa)));break;case"set":Kr(n)&&s(a.get(Xn));break}}Ba()}function fr(n){let t=ke(n);return t===n?t:(Mt(t,"iterate",Qr),An(n)?t:t.map(at))}function Va(n){return Mt(n=ke(n),"iterate",Qr),n}var sh={__proto__:null,[Symbol.iterator](){return xa(this,Symbol.iterator,at)},concat(...n){return fr(this).concat(...n.map(t=>Gn(t)?fr(t):t))},entries(){return xa(this,"entries",n=>(n[1]=at(n[1]),n))},every(n,t){return pn(this,"every",n,t,void 0,arguments)},filter(n,t){return pn(this,"filter",n,t,e=>e.map(at),arguments)},find(n,t){return pn(this,"find",n,t,at,arguments)},findIndex(n,t){return pn(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return pn(this,"findLast",n,t,at,arguments)},findLastIndex(n,t){return pn(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return pn(this,"forEach",n,t,void 0,arguments)},includes(...n){return Ra(this,"includes",n)},indexOf(...n){return Ra(this,"indexOf",n)},join(n){return fr(this).join(n)},lastIndexOf(...n){return Ra(this,"lastIndexOf",n)},map(n,t){return pn(this,"map",n,t,void 0,arguments)},pop(){return Gr(this,"pop")},push(...n){return Gr(this,"push",n)},reduce(n,...t){return Lc(this,"reduce",n,t)},reduceRight(n,...t){return Lc(this,"reduceRight",n,t)},shift(){return Gr(this,"shift")},some(n,t){return pn(this,"some",n,t,void 0,arguments)},splice(...n){return Gr(this,"splice",n)},toReversed(){return fr(this).toReversed()},toSorted(n){return fr(this).toSorted(n)},toSpliced(...n){return fr(this).toSpliced(...n)},unshift(...n){return Gr(this,"unshift",n)},values(){return xa(this,"values",at)}};function xa(n,t,e){let r=Va(n),i=r[t]();return r!==n&&!An(n)&&(i._next=i.next,i.next=()=>{let o=i._next();return o.value&&(o.value=e(o.value)),o}),i}var ch=Array.prototype;function pn(n,t,e,r,i,o){let a=Va(n),s=a!==n&&!An(n),l=a[t];if(l!==ch[t]){let p=l.apply(n,o);return s?at(p):p}let u=e;a!==n&&(s?u=function(p,y){return e.call(this,at(p),y,n)}:e.length>2&&(u=function(p,y){return e.call(this,p,y,n)}));let h=l.call(a,u,r);return s&&i?i(h):h}function Lc(n,t,e,r){let i=Va(n),o=e;return i!==n&&(An(n)?e.length>3&&(o=function(a,s,l){return e.call(this,a,s,l,n)}):o=function(a,s,l){return e.call(this,a,at(s),l,n)}),i[t](o,...r)}function Ra(n,t,e){let r=ke(n);Mt(r,"iterate",Qr);let i=r[t](...e);return(i===-1||i===!1)&&Dh(e[0])?(e[0]=ke(e[0]),r[t](...e)):i}function Gr(n,t,e=[]){oh(),za();let r=ke(n)[t].apply(n,e);return Ba(),ah(),r}var lh=Ta("__proto__,__v_isRef,__isVue"),jc=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(pr));function uh(n){pr(n)||(n=String(n));let t=ke(this);return Mt(t,"has",n),t.hasOwnProperty(n)}var fo=class{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,r){if(e==="__v_skip")return t.__v_skip;let i=this._isReadonly,o=this._isShallow;if(e==="__v_isReactive")return!i;if(e==="__v_isReadonly")return i;if(e==="__v_isShallow")return o;if(e==="__v_raw")return r===(i?o?vh:Uc:o?yh:Bc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=Gn(t);if(!i){let l;if(a&&(l=sh[e]))return l;if(e==="hasOwnProperty")return uh}let s=Reflect.get(t,e,gr(t)?t:r);return(pr(e)?jc.has(e):lh(e))||(i||Mt(t,"get",e),o)?s:gr(s)?a&&so(e)?s:s.value:Zr(s)?i?go(s):vr(s):s}},Fa=class extends fo{constructor(t=!1){super(!1,t)}set(t,e,r,i){let o=t[e];if(!this._isShallow){let l=yr(o);if(!An(r)&&!yr(r)&&(o=ke(o),r=ke(r)),!Gn(t)&&gr(o)&&!gr(r))return l?!1:(o.value=r,!0)}let a=Gn(t)&&so(e)?Number(e)<t.length:ao(t,e),s=Reflect.set(t,e,r,gr(t)?t:i);return t===ke(i)&&(a?Jn(r,o)&&Rn(t,"set",e,r,o):Rn(t,"add",e,r)),s}deleteProperty(t,e){let r=ao(t,e),i=t[e],o=Reflect.deleteProperty(t,e);return o&&r&&Rn(t,"delete",e,void 0,i),o}has(t,e){let r=Reflect.has(t,e);return(!pr(e)||!jc.has(e))&&Mt(t,"has",e),r}ownKeys(t){return Mt(t,"iterate",Gn(t)?"length":Xn),Reflect.ownKeys(t)}},Ha=class extends fo{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}},dh=new Fa,hh=new Ha;var Ya=n=>n,lo=n=>Reflect.getPrototypeOf(n);function mh(n,t,e){return function(...r){let i=this.__v_raw,o=ke(i),a=Kr(o),s=n==="entries"||n===Symbol.iterator&&a,l=n==="keys"&&a,u=i[n](...r),h=e?Ya:t?$a:at;return!t&&Mt(o,"iterate",l?Oa:Xn),{next(){let{value:p,done:y}=u.next();return y?{value:p,done:y}:{value:s?[h(p[0]),h(p[1])]:h(p),done:y}},[Symbol.iterator](){return this}}}}function uo(n){return function(...t){return n==="delete"?!1:n==="clear"?void 0:this}}function ph(n,t){let e={get(i){let o=this.__v_raw,a=ke(o),s=ke(i);n||(Jn(i,s)&&Mt(a,"get",i),Mt(a,"get",s));let{has:l}=lo(a),u=t?Ya:n?$a:at;if(l.call(a,i))return u(o.get(i));if(l.call(a,s))return u(o.get(s));o!==a&&o.get(i)},get size(){let i=this.__v_raw;return!n&&Mt(ke(i),"iterate",Xn),Reflect.get(i,"size",i)},has(i){let o=this.__v_raw,a=ke(o),s=ke(i);return n||(Jn(i,s)&&Mt(a,"has",i),Mt(a,"has",s)),i===s?o.has(i):o.has(i)||o.has(s)},forEach(i,o){let a=this,s=a.__v_raw,l=ke(s),u=t?Ya:n?$a:at;return!n&&Mt(l,"iterate",Xn),s.forEach((h,p)=>i.call(o,u(h),u(p),a))}};return Ca(e,n?{add:uo("add"),set:uo("set"),delete:uo("delete"),clear:uo("clear")}:{add(i){!t&&!An(i)&&!yr(i)&&(i=ke(i));let o=ke(this);return lo(o).has.call(o,i)||(o.add(i),Rn(o,"add",i,i)),this},set(i,o){!t&&!An(o)&&!yr(o)&&(o=ke(o));let a=ke(this),{has:s,get:l}=lo(a),u=s.call(a,i);u||(i=ke(i),u=s.call(a,i));let h=l.call(a,i);return a.set(i,o),u?Jn(o,h)&&Rn(a,"set",i,o,h):Rn(a,"add",i,o),this},delete(i){let o=ke(this),{has:a,get:s}=lo(o),l=a.call(o,i);l||(i=ke(i),l=a.call(o,i));let u=s?s.call(o,i):void 0,h=o.delete(i);return l&&Rn(o,"delete",i,void 0,u),h},clear(){let i=ke(this),o=i.size!==0,a=void 0,s=i.clear();return o&&Rn(i,"clear",void 0,void 0,a),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=mh(i,n,t)}),e}function zc(n,t){let e=ph(n,t);return(r,i,o)=>i==="__v_isReactive"?!n:i==="__v_isReadonly"?n:i==="__v_raw"?r:Reflect.get(ao(e,i)&&i in r?e:r,i,o)}var fh={get:zc(!1,!1)};var gh={get:zc(!0,!1)};var Bc=new WeakMap,yh=new WeakMap,Uc=new WeakMap,vh=new WeakMap;function wh(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bh(n){return n.__v_skip||!Object.isExtensible(n)?0:wh(Rc(n))}function vr(n){return yr(n)?n:Vc(n,!1,dh,fh,Bc)}function go(n){return Vc(n,!0,hh,gh,Uc)}function Vc(n,t,e,r,i){if(!Zr(n)||n.__v_raw&&!(t&&n.__v_isReactive))return n;let o=bh(n);if(o===0)return n;let a=i.get(n);if(a)return a;let s=new Proxy(n,o===2?r:e);return i.set(n,s),s}function yr(n){return!!(n&&n.__v_isReadonly)}function An(n){return!!(n&&n.__v_isShallow)}function Dh(n){return n?!!n.__v_raw:!1}function ke(n){let t=n&&n.__v_raw;return t?ke(t):n}var at=n=>Zr(n)?vr(n):n,$a=n=>Zr(n)?go(n):n;function gr(n){return n?n.__v_isRef===!0:!1}function $e(n){return Eh(n,!1)}function Eh(n,t){return gr(n)?n:new ja(n,t)}var ja=class{constructor(t,e){this.dep=new po,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:ke(t),this._value=e?t:at(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){let e=this._rawValue,r=this.__v_isShallow||An(t)||yr(t);t=r?t:ke(t),Jn(t,e)&&(this._rawValue=t,this._value=r?t:at(t),this.dep.trigger())}};var S=Wd(qc(),1),Ht=S.default.BigInt(0),yi=S.default.BigInt(1),Ys=S.default.BigInt(2),_h=S.default.BigInt(10),Mh=S.default.BigInt(24),Sh=S.default.BigInt(60),kh=S.default.BigInt(1e3),Ni=S.default.BigInt(1e6),di=S.default.BigInt(1e9),Tl=S.default.multiply(S.default.BigInt(3600),di),Th=S.default.multiply(Sh,di),Yn=S.default.multiply(Tl,Mh);function gn(n){return typeof n=="bigint"?S.default.BigInt(n.toString(10)):n}function Cl(n){return S.default.equal(S.default.remainder(n,Ys),Ht)}function Qn(n){return S.default.lessThan(n,Ht)?S.default.unaryMinus(n):n}function wo(n,t){return S.default.lessThan(n,t)?-1:S.default.greaterThan(n,t)?1:0}function ri(n,t){return{quotient:S.default.divide(n,t),remainder:S.default.remainder(n,t)}}var Wc,Kc,se="slot-epochNanoSeconds",ce="slot-iso-date",xe="slot-iso-date-time",Fe="slot-time",$="slot-calendar",Il="slot-date-brand",Pl="slot-year-month-brand",xl="slot-month-day-brand",De="slot-time-zone",ut="slot-years",dt="slot-months",St="slot-weeks",ht="slot-days",mt="slot-hours",pt="slot-minutes",ft="slot-seconds",gt="slot-milliseconds",yt="slot-microseconds",kt="slot-nanoseconds",Rl="date",Al="ym",Ll="md",Nl="time",Ol="datetime",Fl="instant",ur="original",Er="timezone-canonical",Qa="timezone-original",ii="calendar-id",Hl="locale",es="options",Yl=new WeakMap,ts=Symbol.for("@@Temporal__GetSlots");(Wc=globalThis)[ts]||(Wc[ts]=function(n){return Yl.get(n)});var No=globalThis[ts],ns=Symbol.for("@@Temporal__CreateSlots");(Kc=globalThis)[ns]||(Kc[ns]=function(n){Yl.set(n,Object.create(null))});var Tn=globalThis[ns];function Et(n,...t){if(!n||typeof n!="object")return!1;let e=No(n);return!!e&&t.every(r=>r in e)}function m(n,t){let e=No(n)?.[t];if(e===void 0)throw new TypeError(`Missing internal slot ${t}`);return e}function me(n,t,e){let r=No(n);if(r===void 0)throw new TypeError("Missing slots for the given container");if(r[t])throw new TypeError(`${t} already has set`);r[t]=e}var rs={};function Cn(n,t){Object.defineProperty(n.prototype,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0});let e=Object.getOwnPropertyNames(n);for(let i=0;i<e.length;i++){let o=e[i],a=Object.getOwnPropertyDescriptor(n,o);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n,o,a))}let r=Object.getOwnPropertyNames(n.prototype);for(let i=0;i<r.length;i++){let o=r[i],a=Object.getOwnPropertyDescriptor(n.prototype,o);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n.prototype,o,a))}is(t,n),is(`${t}.prototype`,n.prototype)}function is(n,t){let e=`%${n}%`;if(rs[e]!==void 0)throw new Error(`intrinsic ${n} already exists`);rs[e]=t}function Ge(n){return rs[n]}function Mr(n,t){let e=n;if(e===0)return{div:e,mod:e};let r=Math.sign(e);e=Math.abs(e);let i=Math.trunc(1+Math.log10(e));if(t>=i)return{div:0*r,mod:r*e};if(t===0)return{div:r*e,mod:0*r};let o=e.toPrecision(i);return{div:r*Number.parseInt(o.slice(0,i-t),10),mod:r*Number.parseInt(o.slice(i-t),10)}}function Ka(n,t,e){let r=n,i=e;if(r===0)return i;let o=Math.sign(r)||Math.sign(i);r=Math.abs(r),i=Math.abs(i);let a=r.toPrecision(Math.trunc(1+Math.log10(r)));if(i===0)return o*Number.parseInt(a+"0".repeat(t),10);let s=a+i.toPrecision(Math.trunc(1+Math.log10(i))).padStart(t,"0");return o*Number.parseInt(s,10)}function Oo(n,t){let e=t==="negative";switch(n){case"ceil":return e?"zero":"infinity";case"floor":return e?"infinity":"zero";case"expand":return"infinity";case"trunc":return"zero";case"halfCeil":return e?"half-zero":"half-infinity";case"halfFloor":return e?"half-infinity":"half-zero";case"halfExpand":return"half-infinity";case"halfTrunc":return"half-zero";case"halfEven":return"half-even"}}function Fo(n,t,e,r,i){return i==="zero"?n:i==="infinity"?t:e<0?n:e>0?t:i==="half-zero"?n:i==="half-infinity"?t:r?n:t}var _e=class n{constructor(t){this.totalNs=gn(t),this.sec=S.default.toNumber(S.default.divide(this.totalNs,di)),this.subsec=S.default.toNumber(S.default.remainder(this.totalNs,di))}static validateNew(t,e){if(S.default.greaterThan(Qn(t),n.MAX))throw new RangeError(`${e} of duration time units cannot exceed ${n.MAX} s`);return new n(t)}static fromEpochNsDiff(t,e){let r=S.default.subtract(gn(t),gn(e));return new n(r)}static fromComponents(t,e,r,i,o,a){let s=S.default.add(S.default.add(S.default.add(S.default.add(S.default.add(S.default.BigInt(a),S.default.multiply(S.default.BigInt(o),kh)),S.default.multiply(S.default.BigInt(i),Ni)),S.default.multiply(S.default.BigInt(r),di)),S.default.multiply(S.default.BigInt(e),Th)),S.default.multiply(S.default.BigInt(t),Tl));return n.validateNew(s,"total")}abs(){return new n(Qn(this.totalNs))}add(t){return n.validateNew(S.default.add(this.totalNs,t.totalNs),"sum")}add24HourDays(t){return n.validateNew(S.default.add(this.totalNs,S.default.multiply(S.default.BigInt(t),Yn)),"sum")}addToEpochNs(t){return S.default.add(gn(t),this.totalNs)}cmp(t){return wo(this.totalNs,t.totalNs)}divmod(t){let{quotient:e,remainder:r}=ri(this.totalNs,S.default.BigInt(t));return{quotient:S.default.toNumber(e),remainder:new n(r)}}fdiv(t){let e=gn(t),r=S.default.BigInt(e),{quotient:i,remainder:o}=ri(this.totalNs,r),a=[],s,l=(S.default.lessThan(this.totalNs,Ht)?-1:1)*Math.sign(S.default.toNumber(e));for(;!S.default.equal(o,Ht)&&a.length<50;)o=S.default.multiply(o,_h),{quotient:s,remainder:o}=ri(o,r),a.push(Math.abs(S.default.toNumber(s)));return l*+(Qn(i).toString()+"."+a.join(""))}isZero(){return S.default.equal(this.totalNs,Ht)}round(t,e){let r=gn(t);if(S.default.equal(r,yi))return this;let{quotient:i,remainder:o}=ri(this.totalNs,r),a=S.default.lessThan(this.totalNs,Ht)?"negative":"positive",s=S.default.multiply(Qn(i),r),l=S.default.add(s,r),u=wo(Qn(S.default.multiply(o,Ys)),r),h=Oo(e,a),p=S.default.equal(Qn(this.totalNs),s)?s:Fo(s,l,u,Cl(i),h),y=a==="positive"?p:S.default.unaryMinus(p);return n.validateNew(y,"rounding")}sign(){return this.cmp(new n(Ht))}subtract(t){return n.validateNew(S.default.subtract(this.totalNs,t.totalNs),"difference")}};_e.MAX=S.default.BigInt("9007199254740991999999999"),_e.ZERO=new _e(Ht);var Zc=/[A-Za-z._][A-Za-z._0-9+-]*/,Oi=new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${Zc.source})(?:\\/(?:${Zc.source}))*)`),$l=/(?:[+-]\d{6}|\d{4})/,bo=/(?:0[1-9]|1[0-2])/,os=/(?:0[1-9]|[12]\d|3[01])/,Ch=new RegExp(`(${$l.source})(?:-(${bo.source})-(${os.source})|(${bo.source})(${os.source}))`),jl=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,zl=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,Bl=new RegExp(`([zZ])|${zl.source}?`),Cr=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,Ih=new RegExp([`^${Ch.source}`,`(?:(?:[tT]|\\s+)${jl.source}(?:${Bl.source})?)?`,`(?:\\[!?(${Oi.source})\\])?`,`((?:${Cr.source})*)$`].join("")),Ph=new RegExp([`^[tT]?${jl.source}`,`(?:${Bl.source})?`,`(?:\\[!?${Oi.source}\\])?`,`((?:${Cr.source})*)$`].join("")),xh=new RegExp(`^(${$l.source})-?(${bo.source})(?:\\[!?${Oi.source}\\])?((?:${Cr.source})*)$`),Rh=new RegExp(`^(?:--)?(${bo.source})-?(${os.source})(?:\\[!?${Oi.source}\\])?((?:${Cr.source})*)$`),Za=/(\d+)(?:[.,](\d{1,9}))?/,Ah=new RegExp(`(?:${Za.source}H)?(?:${Za.source}M)?(?:${Za.source}S)?`),Lh=new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${Ah.source})?$`,"i"),$n=864e5,Do=1e6*$n,Nh=6e10,Ul=1e8*$n,Ir=Xt(Ul),vi=S.default.unaryMinus(Ir),Oh=S.default.add(S.default.subtract(vi,Yn),yi),Fh=S.default.subtract(S.default.add(Ir,Yn),yi),Hh=146097*$n,Gc=-271821,Jc=275760,hi=Date.UTC(1847,0,1),Yh=["iso8601","hebrew","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","islamicc","persian","ethiopic","ethioaa","ethiopic-amete-alem","coptic","chinese","dangi","roc","indian","buddhist","japanese","gregory"],$h=new Set(["ACT","AET","AGT","ART","AST","BET","BST","CAT","CNT","CST","CTT","EAT","ECT","IET","IST","JST","MIT","NET","NST","PLT","PNT","PRT","PST","SST","VST"]);function He(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Ho(n){if(typeof n=="bigint")throw new TypeError("Cannot convert BigInt to number");return Number(n)}function Yo(n){if(typeof n=="symbol")throw new TypeError("Cannot convert a Symbol value to a String");return String(n)}function ue(n){let t=Ho(n);if(t===0)return 0;if(Number.isNaN(t)||t===1/0||t===-1/0)throw new RangeError("invalid number value");let e=Math.trunc(t);return e===0?0:e}function Xc(n,t){let e=ue(n);if(e<=0)throw t!==void 0?new RangeError(`property '${t}' cannot be a a number less than one`):new RangeError("Cannot convert a number less than one to a positive integer");return e}function Gt(n){let t=Ho(n);if(Number.isNaN(t))throw new RangeError("not a number");if(t===1/0||t===-1/0)throw new RangeError("infinity is out of range");if(!function(e){if(typeof e!="number"||Number.isNaN(e)||e===1/0||e===-1/0)return!1;let r=Math.abs(e);return Math.floor(r)===r}(t))throw new RangeError(`unsupported fractional value ${n}`);return t===0?0:t}function wi(n,t){return String(n).padStart(t,"0")}function Be(n){if(typeof n!="string")throw new TypeError(`expected a string, not ${String(n)}`);return n}function as(n,t){if(He(n)){let e=n?.toString();if(typeof e=="string"||typeof e=="number")return e;throw new TypeError("Cannot convert object to primitive value")}return n}var ss=["era","eraYear","year","month","monthCode","day","hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],jh={era:Yo,eraYear:ue,year:ue,month:Xc,monthCode:function(n){let t=Be(as(n));if(t.length<3||t.length>4||t[0]!=="M"||"0123456789".indexOf(t[1])===-1||"0123456789".indexOf(t[2])===-1||t[1]+t[2]==="00"&&t[3]!=="L"||t[3]!=="L"&&t[3]!==void 0)throw new RangeError(`bad month code ${t}; must match M01-M99 or M00L-M99L`);return t},day:Xc,hour:ue,minute:ue,second:ue,millisecond:ue,microsecond:ue,nanosecond:ue,offset:function(n){let t=Be(as(n));return Hr(t),t},timeZone:bt},zh={hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},Pr=[["years","year","date"],["months","month","date"],["weeks","week","date"],["days","day","date"],["hours","hour","time"],["minutes","minute","time"],["seconds","second","time"],["milliseconds","millisecond","time"],["microseconds","microsecond","time"],["nanoseconds","nanosecond","time"]],Qc=Object.fromEntries(Pr.map(n=>[n[0],n[1]])),Bh=Object.fromEntries(Pr.map(([n,t])=>[t,n])),mi=Pr.map(([,n])=>n),xr={day:Do,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},Eo=["days","hours","microseconds","milliseconds","minutes","months","nanoseconds","seconds","weeks","years"],Uh=Intl.DateTimeFormat,el=new Map;function Vl(n){let t=Mi(n),e=el.get(t);return e===void 0&&(e=new Uh("en-us",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),el.set(t,e)),e}function We(n){return Et(n,se)&&!Et(n,De,$)}function Ne(n){return Et(n,ut,dt,ht,mt,pt,ft,gt,yt,kt)}function Oe(n){return Et(n,Il)}function Ye(n){return Et(n,Fe)}function Te(n){return Et(n,xe)}function Ke(n){return Et(n,Pl)}function Ft(n){return Et(n,xl)}function pe(n){return Et(n,se,De,$)}function P(n,t){if(!t(n))throw new TypeError("invalid receiver: method called with the wrong type of this-object")}function Nr(n){if(Et(n,$)||Et(n,De))throw new TypeError("with() does not support a calendar or timeZone property");if(Ye(n))throw new TypeError("with() does not accept Temporal.PlainTime, use withPlainTime() instead");if(n.calendar!==void 0)throw new TypeError("with() does not support a calendar property");if(n.timeZone!==void 0)throw new TypeError("with() does not support a timeZone property")}function Fi(n,t){return t==="never"||t==="auto"&&n==="iso8601"?"":`[${t==="critical"?"!":""}u-ca=${n}]`}function $o(n){let t,e,r=!1;for(Cr.lastIndex=0;e=Cr.exec(n);){let{1:i,2:o,3:a}=e;if(o==="u-ca"){if(t===void 0)t=a,r=i==="!";else if(i==="!"||r)throw new RangeError(`Invalid annotations in ${n}: more than one u-ca present with critical flag`)}else if(i==="!")throw new RangeError(`Unrecognized annotation: !${o}=${a}`)}return t}function dn(n){let t=Ih.exec(n);if(!t)throw new RangeError(`invalid RFC 9557 string: ${n}`);let e=$o(t[16]),r=t[1];if(r==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);let i=+r,o=+(t[2]??t[4]??1),a=+(t[3]??t[5]??1),s=t[6]!==void 0,l=+(t[6]??0),u=+(t[7]??t[10]??0),h=+(t[8]??t[11]??0);h===60&&(h=59);let p=(t[9]??t[12]??"")+"000000000",y=+p.slice(0,3),E=+p.slice(3,6),T=+p.slice(6,9),C,L=!1;t[13]?(C=void 0,L=!0):t[14]&&(C=t[14]);let B=t[15];return Vs(i,o,a,l,u,h,y,E,T),{year:i,month:o,day:a,time:s?{hour:l,minute:u,second:h,millisecond:y,microsecond:E,nanosecond:T}:"start-of-day",tzAnnotation:B,offset:C,z:L,calendar:e}}function ql(n){let t=Ph.exec(n),e,r,i,o,a,s,l;if(t){l=$o(t[10]),e=+(t[1]??0),r=+(t[2]??t[5]??0),i=+(t[3]??t[6]??0),i===60&&(i=59);let u=(t[4]??t[7]??"")+"000000000";if(o=+u.slice(0,3),a=+u.slice(3,6),s=+u.slice(6,9),t[8])throw new RangeError("Z designator not supported for PlainTime")}else{let u,h;if({time:u,z:h,calendar:l}=dn(n),u==="start-of-day")throw new RangeError(`time is missing in string: ${n}`);if(h)throw new RangeError("Z designator not supported for PlainTime");({hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s}=u)}if(Uo(e,r,i,o,a,s),/[tT ][0-9][0-9]/.test(n))return{hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s,calendar:l};try{let{month:u,day:h}=js(n);ir(1972,u,h)}catch{try{let{year:u,month:h}=$s(n);ir(u,h,1)}catch{return{hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s,calendar:l}}}throw new RangeError(`invalid RFC 9557 time-only string ${n}; may need a T prefix`)}function $s(n){let t=xh.exec(n),e,r,i,o;if(t){i=$o(t[3]);let a=t[1];if(a==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);if(e=+a,r=+t[2],o=1,i!==void 0&&i!=="iso8601")throw new RangeError("YYYY-MM format is only valid with iso8601 calendar")}else{let a;if({year:e,month:r,calendar:i,day:o,z:a}=dn(n),a)throw new RangeError("Z designator not supported for PlainYearMonth")}return{year:e,month:r,calendar:i,referenceISODay:o}}function js(n){let t=Rh.exec(n),e,r,i,o;if(t){if(i=$o(t[3]),e=+t[1],r=+t[2],i!==void 0&&i!=="iso8601")throw new RangeError("MM-DD format is only valid with iso8601 calendar")}else{let a;if({month:e,day:r,calendar:i,year:o,z:a}=dn(n),a)throw new RangeError("Z designator not supported for PlainMonthDay")}return{month:e,day:r,calendar:i,referenceISOYear:o}}var Wl=new RegExp(`^${Oi.source}$`,"i"),Kl=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);function Zl(n){let t=qh.test(n)?"Seconds not allowed in offset time zone":"Invalid time zone";throw new RangeError(`${t}: ${n}`)}function Hn(n){return Wl.test(n)||Zl(n),Kl.test(n)?{offsetMinutes:Hr(n)/6e10}:{tzName:n}}function pi(n,t,e,r){let i=n,o=t,a=e;switch(r){case"reject":ir(i,o,a);break;case"constrain":({year:i,month:o,day:a}=hu(i,o,a))}return{year:i,month:o,day:a}}function jo(n,t,e,r,i,o,a){let s=n,l=t,u=e,h=r,p=i,y=o;switch(a){case"reject":Uo(s,l,u,h,p,y);break;case"constrain":s=vt(s,0,23),l=vt(l,0,59),u=vt(u,0,59),h=vt(h,0,999),p=vt(p,0,999),y=vt(y,0,999)}return{hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y}}function Gl(n){if(!He(n))throw new TypeError("invalid duration-like");let t={years:void 0,months:void 0,weeks:void 0,days:void 0,hours:void 0,minutes:void 0,seconds:void 0,milliseconds:void 0,microseconds:void 0,nanoseconds:void 0},e=!1;for(let r=0;r<Eo.length;r++){let i=Eo[r],o=n[i];o!==void 0&&(e=!0,t[i]=Gt(o))}if(!e)throw new TypeError("invalid duration-like");return t}function et({years:n,months:t,weeks:e,days:r},i,o,a){return{years:n,months:a??t,weeks:o??e,days:i??r}}function we(n,t){return{isoDate:n,time:t}}function ye(n){return _n(n,"overflow",["constrain","reject"],"constrain")}function fi(n){return _n(n,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function Qt(n,t){return _n(n,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],t)}function vo(n,t){return _n(n,"offset",["prefer","use","ignore","reject"],t)}function Hi(n){return _n(n,"calendarName",["auto","always","never","critical"],"auto")}function Or(n){let t=n.roundingIncrement;if(t===void 0)return 1;let e=ue(t);if(e<1||e>1e9)throw new RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${t}`);return e}function Fr(n,t,e){let r=e?t:t-1;if(n>r)throw new RangeError(`roundingIncrement must be at least 1 and less than ${r}, not ${n}`);if(t%n!=0)throw new RangeError(`Rounding increment must divide evenly into ${t}`)}function Yi(n){let t=n.fractionalSecondDigits;if(t===void 0)return"auto";if(typeof t!="number"){if(Yo(t)!=="auto")throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return"auto"}let e=Math.floor(t);if(!Number.isFinite(e)||e<0||e>9)throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return e}function $i(n,t){switch(n){case"minute":return{precision:"minute",unit:"minute",increment:1};case"second":return{precision:0,unit:"second",increment:1};case"millisecond":return{precision:3,unit:"millisecond",increment:1};case"microsecond":return{precision:6,unit:"microsecond",increment:1};case"nanosecond":return{precision:9,unit:"nanosecond",increment:1}}switch(t){case"auto":return{precision:t,unit:"nanosecond",increment:1};case 0:return{precision:t,unit:"second",increment:1};case 1:case 2:case 3:return{precision:t,unit:"millisecond",increment:10**(3-t)};case 4:case 5:case 6:return{precision:t,unit:"microsecond",increment:10**(6-t)};case 7:case 8:case 9:return{precision:t,unit:"nanosecond",increment:10**(9-t)};default:throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`)}}var Sn=Symbol("~required~");function Ct(n,t,e,r,i=[]){let o=[];for(let u=0;u<Pr.length;u++){let h=Pr[u],p=h[1],y=h[2];e!=="datetime"&&e!==y||o.push(p)}o=o.concat(i);let a=r;a===Sn?a=void 0:a!==void 0&&o.push(a);let s=[];s=s.concat(o);for(let u=0;u<o.length;u++){let h=o[u],p=Bh[h];p!==void 0&&s.push(p)}let l=_n(n,t,s,a);if(l===void 0&&r===Sn)throw new RangeError(`${t} is required`);return l&&l in Qc?Qc[l]:l}function Ga(n){let t=n.relativeTo;if(t===void 0)return{};let e,r,i,o,a,s="option",l=!1;if(He(t)){if(pe(t))return{zonedRelativeTo:t};if(Oe(t))return{plainRelativeTo:t};if(Te(t))return{plainRelativeTo:wt(m(t,xe).isoDate,m(t,$))};i=Vi(t);let u=zt(i,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],[]);({isoDate:e,time:r}=zi(i,u,"constrain")),{offset:a,timeZone:o}=u,a===void 0&&(s="wall")}else{let u,h,p,y,E;if({year:p,month:y,day:E,time:r,calendar:i,tzAnnotation:u,offset:a,z:h}=dn(Be(t)),u)o=bt(u),h?s="exact":a||(s="wall"),l=!0;else if(h)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");i||(i="iso8601"),i=_t(i),e={year:p,month:y,day:E}}return o===void 0?{plainRelativeTo:wt(e,i)}:{zonedRelativeTo:Qe(_o(e,r,s,s==="option"?Hr(a):0,o,"compatible","reject",l),o,i)}}function yn(n){return m(n,ut)!==0?"year":m(n,dt)!==0?"month":m(n,St)!==0?"week":m(n,ht)!==0?"day":m(n,mt)!==0?"hour":m(n,pt)!==0?"minute":m(n,ft)!==0?"second":m(n,gt)!==0?"millisecond":m(n,yt)!==0?"microsecond":"nanosecond"}function Dn(n,t){return mi.indexOf(n)>mi.indexOf(t)?t:n}function rn(n){return n==="year"||n==="month"||n==="week"}function vn(n){return rn(n)||n==="day"?"date":"time"}function Bn(n){return Ge("%calendarImpl%")(n)}function ji(n){return Ge("%calendarImpl%")(m(n,$))}function Dt(n,t,e="date"){let r=Object.create(null),i=Bn(n).isoToDate(t,{year:!0,monthCode:!0,day:!0});return r.monthCode=i.monthCode,e!=="month-day"&&e!=="date"||(r.day=i.day),e!=="year-month"&&e!=="date"||(r.year=i.year),r}function zt(n,t,e,r,i){let o=Bn(n).extraFields(e),a=e.concat(r,o),s=Object.create(null),l=!1;a.sort();for(let u=0;u<a.length;u++){let h=a[u],p=t[h];if(p!==void 0)l=!0,s[h]=(0,jh[h])(p);else if(i!=="partial"){if(i.includes(h))throw new TypeError(`required property '${h}' missing or undefined`);s[h]=zh[h]}}if(i==="partial"&&!l)throw new TypeError("no supported properties found");return s}function cs(n,t="complete"){let e=["hour","microsecond","millisecond","minute","nanosecond","second"],r=!1,i=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o],s=n[a];s!==void 0?(i[a]=ue(s),r=!0):t==="complete"&&(i[a]=0)}if(!r)throw new TypeError("invalid time-like");return i}function oi(n,t){if(He(n)){if(Oe(n))return ye(X(t)),wt(m(n,ce),m(n,$));if(pe(n)){let l=Wt(m(n,De),m(n,se));return ye(X(t)),wt(l.isoDate,m(n,$))}if(Te(n))return ye(X(t)),wt(m(n,xe).isoDate,m(n,$));let s=Vi(n);return wt(jn(s,zt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{year:e,month:r,day:i,calendar:o,z:a}=dn(Be(n));if(a)throw new RangeError("Z designator not supported for PlainDate");return o||(o="iso8601"),o=_t(o),ye(X(t)),wt({year:e,month:r,day:i},o)}function zi(n,t,e){return we(jn(n,t,e),jo(t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond,e))}function ai(n,t){let e,r,i;if(He(n)){if(Te(n))return ye(X(t)),Ut(m(n,xe),m(n,$));if(pe(n)){let s=Wt(m(n,De),m(n,se));return ye(X(t)),Ut(s,m(n,$))}if(Oe(n))return ye(X(t)),Ut(we(m(n,ce),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),m(n,$));i=Vi(n);let o=zt(i,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],[]),a=ye(X(t));({isoDate:e,time:r}=zi(i,o,a))}else{let o,a,s,l;if({year:a,month:s,day:l,time:r,calendar:i,z:o}=dn(Be(n)),o)throw new RangeError("Z designator not supported for PlainDateTime");r==="start-of-day"&&(r={deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),Vs(a,s,l,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),i||(i="iso8601"),i=_t(i),ye(X(t)),e={year:a,month:s,day:l}}return Ut(we(e,r),i)}function qt(n){let t=Ge("%Temporal.Duration%");if(Ne(n))return new t(m(n,ut),m(n,dt),m(n,St),m(n,ht),m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt));if(!He(n))return function(i){let{years:o,months:a,weeks:s,days:l,hours:u,minutes:h,seconds:p,milliseconds:y,microseconds:E,nanoseconds:T}=function(C){let L=Lh.exec(C);if(!L)throw new RangeError(`invalid duration: ${C}`);if(L.every((v,D)=>D<2||v===void 0))throw new RangeError(`invalid duration: ${C}`);let B=L[1]==="-"?-1:1,K=L[2]===void 0?0:ue(L[2])*B,W=L[3]===void 0?0:ue(L[3])*B,Q=L[4]===void 0?0:ue(L[4])*B,te=L[5]===void 0?0:ue(L[5])*B,oe=L[6]===void 0?0:ue(L[6])*B,Me=L[7],Ee=L[8],ie=L[9],N=L[10],Y=L[11],F=0,ee=0,g=0;if(Me!==void 0){if(Ee??ie??N??Y)throw new RangeError("only the smallest unit can be fractional");g=3600*ue((Me+"000000000").slice(0,9))*B}else if(F=Ee===void 0?0:ue(Ee)*B,ie!==void 0){if(N??Y)throw new RangeError("only the smallest unit can be fractional");g=60*ue((ie+"000000000").slice(0,9))*B}else ee=N===void 0?0:ue(N)*B,Y!==void 0&&(g=ue((Y+"000000000").slice(0,9))*B);let A=g%1e3,c=Math.trunc(g/1e3)%1e3,d=Math.trunc(g/1e6)%1e3;return ee+=Math.trunc(g/1e9)%60,F+=Math.trunc(g/6e10),Vo(K,W,Q,te,oe,F,ee,d,c,A),{years:K,months:W,weeks:Q,days:te,hours:oe,minutes:F,seconds:ee,milliseconds:d,microseconds:c,nanoseconds:A}}(i);return new(Ge("%Temporal.Duration%"))(o,a,s,l,u,h,p,y,E,T)}(Be(n));let e={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0},r=Gl(n);for(let i=0;i<Eo.length;i++){let o=Eo[i],a=r[o];a!==void 0&&(e[o]=a)}return new t(e.years,e.months,e.weeks,e.days,e.hours,e.minutes,e.seconds,e.milliseconds,e.microseconds,e.nanoseconds)}function si(n){let t;if(He(n)){if(We(n)||pe(n))return Jt(m(n,se));t=as(n)}else t=n;let{year:e,month:r,day:i,time:o,offset:a,z:s}=function(C){let L=dn(C);if(!L.z&&!L.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return L}(Be(t)),{hour:l=0,minute:u=0,second:h=0,millisecond:p=0,microsecond:y=0,nanosecond:E=0}=o==="start-of-day"?{}:o,T=_i(e,r,i,l,u,h,p,y,E-(s?0:Hr(a)));return Tr(T.isoDate),Jt(Ze(T))}function tl(n,t){if(He(n)){if(Ft(n))return ye(X(t)),Sr(m(n,ce),m(n,$));let s;return Et(n,$)?s=m(n,$):(s=n.calendar,s===void 0&&(s="iso8601"),s=Ui(s)),Sr(Mo(s,zt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{month:e,day:r,referenceISOYear:i,calendar:o}=js(Be(n));if(o===void 0&&(o="iso8601"),o=_t(o),ye(X(t)),o==="iso8601")return Sr({year:1972,month:e,day:r},o);let a={year:i,month:e,day:r};return dr(a),a=Mo(o,Dt(o,a,"month-day"),"constrain"),Sr(a,o)}function On(n,t){let e;if(He(n)){if(Ye(n))return ye(X(t)),wn(m(n,Fe));if(Te(n))return ye(X(t)),wn(m(n,xe).time);if(pe(n)){let u=Wt(m(n,De),m(n,se));return ye(X(t)),wn(u.time)}let{hour:r,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:l}=cs(n);e=jo(r,i,o,a,s,l,ye(X(t)))}else e=ql(Be(n)),ye(X(t));return wn(e)}function Jl(n){return n===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:m(On(n),Fe)}function ci(n,t){if(He(n)){if(Ke(n))return ye(X(t)),kr(m(n,ce),m(n,$));let s=Vi(n);return kr(bi(s,zt(s,n,["year","month","monthCode"],[],[]),ye(X(t))),s)}let{year:e,month:r,referenceISODay:i,calendar:o}=$s(Be(n));o===void 0&&(o="iso8601"),o=_t(o),ye(X(t));let a={year:e,month:r,day:i};return qs(a),a=bi(o,Dt(o,a,"year-month"),"constrain"),kr(a,o)}function _o(n,t,e,r,i,o,a,s){if(t==="start-of-day")return Ln(i,n);let l=we(n,t);if(e==="wall"||a==="ignore")return tt(i,l,o);if(e==="exact"||a==="use"){let p=_i(n.year,n.month,n.day,t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond-r);Tr(p.isoDate);let y=Ze(p);return ln(y),y}Tr(n);let u=Ze(l),h=Di(i,l);for(let p=0;p<h.length;p++){let y=h[p],E=S.default.toNumber(S.default.subtract(u,y)),T=Fn(E,6e10,"halfExpand");if(E===r||s&&T===r)return y}if(a==="reject"){let p=ls(r),y=Ei(l,"iso8601","auto");throw new RangeError(`Offset ${p} is invalid for ${y} in ${i}`)}return au(h,i,l,o)}function li(n,t){let e,r,i,o,a,s,l,u=!1,h="option";if(He(n)){if(pe(n)){let C=X(t);return fi(C),vo(C,"reject"),ye(C),Qe(m(n,se),m(n,De),m(n,$))}a=Vi(n);let y=zt(a,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],["timeZone"]);({offset:o,timeZone:i}=y),o===void 0&&(h="wall");let E=X(t);s=fi(E),l=vo(E,"reject");let T=ye(E);({isoDate:e,time:r}=zi(a,y,T))}else{let y,E,T,C,L;({year:T,month:C,day:L,time:r,tzAnnotation:y,offset:o,z:E,calendar:a}=function(K){let W=dn(K);if(!W.tzAnnotation)throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");return W}(Be(n))),i=bt(y),E?h="exact":o||(h="wall"),a||(a="iso8601"),a=_t(a),u=!0;let B=X(t);s=fi(B),l=vo(B,"reject"),ye(B),e={year:T,month:C,day:L}}let p=0;return h==="option"&&(p=Hr(o)),Qe(_o(e,r,h,p,i,s,l,u),i,a)}function Xl(n,t,e){dr(t),Tn(n),me(n,ce,t),me(n,$,e),me(n,Il,!0)}function wt(n,t){let e=Ge("%Temporal.PlainDate%"),r=Object.create(e.prototype);return Xl(r,n,t),r}function Ql(n,t,e){or(t),Tn(n),me(n,xe,t),me(n,$,e)}function Ut(n,t){let e=Ge("%Temporal.PlainDateTime%"),r=Object.create(e.prototype);return Ql(r,n,t),r}function eu(n,t,e){dr(t),Tn(n),me(n,ce,t),me(n,$,e),me(n,xl,!0)}function Sr(n,t){let e=Ge("%Temporal.PlainMonthDay%"),r=Object.create(e.prototype);return eu(r,n,t),r}function tu(n,t){Tn(n),me(n,Fe,t)}function wn(n){let t=Ge("%Temporal.PlainTime%"),e=Object.create(t.prototype);return tu(e,n),e}function nu(n,t,e){qs(t),Tn(n),me(n,ce,t),me(n,$,e),me(n,Pl,!0)}function kr(n,t){let e=Ge("%Temporal.PlainYearMonth%"),r=Object.create(e.prototype);return nu(r,n,t),r}function ru(n,t){ln(t),Tn(n),me(n,se,t)}function Jt(n){let t=Ge("%Temporal.Instant%"),e=Object.create(t.prototype);return ru(e,n),e}function iu(n,t,e,r){ln(t),Tn(n),me(n,se,t),me(n,De,e),me(n,$,r)}function Qe(n,t,e="iso8601"){let r=Ge("%Temporal.ZonedDateTime%"),i=Object.create(r.prototype);return iu(i,n,t,e),i}function nl(n){return ss.filter(t=>n[t]!==void 0)}function rr(n,t,e){let r=nl(e),i=Bn(n).fieldKeysToIgnore(r),o=Object.create(null),a=nl(t);for(let s=0;s<ss.length;s++){let l,u=ss[s];a.includes(u)&&!i.includes(u)&&(l=t[u]),r.includes(u)&&(l=e[u]),l!==void 0&&(o[u]=l)}return o}function $t(n,t,e,r){let i=Bn(n).dateAdd(t,e,r);return dr(i),i}function Bi(n,t,e,r){return Bn(n).dateUntil(t,e,r)}function Ui(n){if(He(n)&&Et(n,$))return m(n,$);let t=Be(n);try{return _t(t)}catch{}let e;try{({calendar:e}=dn(t))}catch{try{({calendar:e}=ql(t))}catch{try{({calendar:e}=$s(t))}catch{({calendar:e}=js(t))}}}return e||(e="iso8601"),_t(e)}function Vi(n){if(Et(n,$))return m(n,$);let{calendar:t}=n;return t===void 0?"iso8601":Ui(t)}function cn(n,t){return _t(n)===_t(t)}function jn(n,t,e){let r=Bn(n);r.resolveFields(t,"date");let i=r.dateToISO(t,e);return dr(i),i}function bi(n,t,e){let r=Bn(n);r.resolveFields(t,"year-month"),t.day=1;let i=r.dateToISO(t,e);return qs(i),i}function Mo(n,t,e){let r=Bn(n);r.resolveFields(t,"month-day");let i=r.monthDayToISOReferenceDate(t,e);return dr(i),i}function bt(n){if(He(n)&&pe(n))return m(n,De);let t=Be(n);if(t==="UTC")return"UTC";let{tzName:e,offsetMinutes:r}=function(o){let{tzAnnotation:a,offset:s,z:l}=function(u){if(Wl.test(u))return{tzAnnotation:u,offset:void 0,z:!1};try{let{tzAnnotation:h,offset:p,z:y}=dn(u);if(y||h||p)return{tzAnnotation:h,offset:p,z:y}}catch{}Zl(u)}(o);return a?Hn(a):l?Hn("UTC"):s?Hn(s):void 0}(t);if(r!==void 0)return zs(r);let i=So(e);if(!i)throw new RangeError(`Unrecognized time zone ${e}`);return i.identifier}function ou(n,t){if(n===t)return!0;let e=Hn(n).offsetMinutes,r=Hn(t).offsetMinutes;if(e===void 0&&r===void 0){let i=So(t);if(!i)return!1;let o=So(n);return!!o&&o.primaryIdentifier===i.primaryIdentifier}return e===r}function bn(n,t){let e=Hn(n).offsetMinutes;return e!==void 0?6e10*e:us(n,t)}function ls(n){let t=n<0?"-":"+",e=Math.abs(n),r=Math.floor(e/36e11),i=Math.floor(e/6e10)%60,o=Math.floor(e/1e9)%60,a=e%1e9;return`${t}${zo(r,i,o,a,o===0&&a===0?"minute":"auto")}`}function Wt(n,t){let e=bn(n,t),{isoDate:{year:r,month:i,day:o},time:{hour:a,minute:s,second:l,millisecond:u,microsecond:h,nanosecond:p}}=lu(t);return _i(r,i,o,a,s,l,u,h,p+e)}function tt(n,t,e){return au(Di(n,t),n,t,e)}function au(n,t,e,r){let i=n.length;if(i===1)return n[0];if(i)switch(r){case"compatible":case"earlier":return n[0];case"later":return n[i-1];case"reject":throw new RangeError("multiple instants found")}if(r==="reject")throw new RangeError("multiple instants found");let o=Ze(e),a=S.default.subtract(o,Yn);ln(a);let s=bn(t,a),l=S.default.add(o,Yn);ln(l);let u=bn(t,l)-s;switch(r){case"earlier":{let h=_e.fromComponents(0,0,0,0,0,-u),p=Rr(e.time,h);return Di(t,we(It(e.isoDate.year,e.isoDate.month,e.isoDate.day+p.deltaDays),p))[0]}case"compatible":case"later":{let h=_e.fromComponents(0,0,0,0,0,u),p=Rr(e.time,h),y=Di(t,we(It(e.isoDate.year,e.isoDate.month,e.isoDate.day+p.deltaDays),p));return y[y.length-1]}}}function Di(n,t){if(n==="UTC")return Tr(t.isoDate),[Ze(t)];let e=Hn(n).offsetMinutes;if(e!==void 0){let r=_i(t.isoDate.year,t.isoDate.month,t.isoDate.day,t.time.hour,t.time.minute-e,t.time.second,t.time.millisecond,t.time.microsecond,t.time.nanosecond);Tr(r.isoDate);let i=Ze(r);return ln(i),[i]}return Tr(t.isoDate),function(r,i){let o=Ze(i),a=S.default.subtract(o,Yn);S.default.lessThan(a,vi)&&(a=o);let s=S.default.add(o,Yn);S.default.greaterThan(s,Ir)&&(s=o);let l=us(r,a),u=us(r,s);return(l===u?[l]:[l,u]).map(p=>{let y=S.default.subtract(o,S.default.BigInt(p)),E=function(T,C){let{epochMilliseconds:L,time:{millisecond:B,microsecond:K,nanosecond:W}}=lu(C),{year:Q,month:te,day:oe,hour:Me,minute:Ee,second:ie}=uu(T,L);return _i(Q,te,oe,Me,Ee,ie,B,K,W)}(r,y);if(Ar(i,E)===0)return ln(y),y}).filter(p=>p!==void 0)}(n,t)}function Ln(n,t){let e=we(t,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=Di(n,e);if(r.length)return r[0];let i=Ze(e),o=S.default.subtract(i,Yn);return ln(o),Us(n,o)}function qi(n){let t;return t=n<0||n>9999?(n<0?"-":"+")+wi(Math.abs(n),6):wi(n,4),t}function jt(n){return wi(n,2)}function su(n,t){let e;if(t==="auto"){if(n===0)return"";e=wi(n,9).replace(/0+$/,"")}else{if(t===0)return"";e=wi(n,9).slice(0,t)}return`.${e}`}function zo(n,t,e,r,i){let o=`${jt(n)}:${jt(t)}`;return i==="minute"||(o+=`:${jt(e)}`,o+=su(r,i)),o}function rl(n,t,e){let r=t;r===void 0&&(r="UTC");let i=m(n,se),o=Ei(Wt(r,i),"iso8601",e,"never"),a="Z";return t!==void 0&&(a=cu(bn(r,i))),`${o}${a}`}function yo(n,t){let e=m(n,ut),r=m(n,dt),i=m(n,St),o=m(n,ht),a=m(n,mt),s=m(n,pt),l=To(n),u="";e!==0&&(u+=`${Math.abs(e)}Y`),r!==0&&(u+=`${Math.abs(r)}M`),i!==0&&(u+=`${Math.abs(i)}W`),o!==0&&(u+=`${Math.abs(o)}D`);let h="";a!==0&&(h+=`${Math.abs(a)}H`),s!==0&&(h+=`${Math.abs(s)}M`);let p=_e.fromComponents(0,0,m(n,ft),m(n,gt),m(n,yt),m(n,kt));p.isZero()&&!["second","millisecond","microsecond","nanosecond"].includes(yn(n))&&t==="auto"||(h+=`${Math.abs(p.sec)}${su(Math.abs(p.subsec),t)}S`);let y=`${l<0?"-":""}P${u}`;return h&&(y=`${y}T${h}`),y}function il(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce);return`${qi(e)}-${jt(r)}-${jt(i)}${Fi(m(n,$),t)}`}function ol({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){return zo(n,t,e,1e6*r+1e3*i+o,a)}function Ei(n,t,e,r="auto"){let{isoDate:{year:i,month:o,day:a},time:{hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y}}=n;return`${qi(i)}-${jt(o)}-${jt(a)}T${zo(s,l,u,1e6*h+1e3*p+y,e)}${Fi(t,r)}`}function al(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce),o=`${jt(r)}-${jt(i)}`,a=m(n,$);t!=="always"&&t!=="critical"&&a==="iso8601"||(o=`${qi(e)}-${o}`);let s=Fi(a,t);return s&&(o+=s),o}function sl(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce),o=`${qi(e)}-${jt(r)}`,a=m(n,$);t!=="always"&&t!=="critical"&&a==="iso8601"||(o+=`-${jt(i)}`);let s=Fi(a,t);return s&&(o+=s),o}function cl(n,t,e="auto",r="auto",i="auto",o=void 0){let a=m(n,se);if(o){let{unit:h,increment:p,roundingMode:y}=o;a=ps(a,p,h,y)}let s=m(n,De),l=bn(s,a),u=Ei(Wt(s,a),"iso8601",t,"never");return i!=="never"&&(u+=cu(l)),r!=="never"&&(u+=`[${r==="critical"?"!":""}${s}]`),u+=Fi(m(n,$),e),u}function ll(n){return Kl.test(n)}function Hr(n){let t=Wh.exec(n);if(!t)throw new RangeError(`invalid time zone offset: ${n}; must match \xB1HH:MM[:SS.SSSSSSSSS]`);return(t[1]==="-"?-1:1)*(1e9*(60*(60*+t[2]+ +(t[3]||0))+ +(t[4]||0))+ +((t[5]||0)+"000000000").slice(0,9))}var ei,Vh=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function So(n){if(ei===void 0){let o=Intl.supportedValuesOf?.("timeZone");if(o){ei=new Map;for(let a=0;a<o.length;a++){let s=o[a];ei.set(Mi(s),s)}}else ei=null}let t=Mi(n),e=ei?.get(t);if(e)return{identifier:e,primaryIdentifier:e};try{e=Vl(n).resolvedOptions().timeZone}catch{return}if(t==="antarctica/south_pole"&&(e="Antarctica/McMurdo"),$h.has(n))throw new RangeError(`${n} is a legacy time zone identifier from ICU. Use ${e} instead`);let r=[...t].map((o,a)=>a===0||Vh[t[a-1]]?o.toUpperCase():o).join("").split("/");if(r.length===1)return t==="gb-eire"?{identifier:"GB-Eire",primaryIdentifier:e}:{identifier:t.length<=3||/[-0-9]/.test(t)?t.toUpperCase():r[0],primaryIdentifier:e};if(r[0]==="Etc")return{identifier:`Etc/${["Zulu","Greenwich","Universal"].includes(r[1])?r[1]:r[1].toUpperCase()}`,primaryIdentifier:e};if(r[0]==="Us")return{identifier:`US/${r[1]}`,primaryIdentifier:e};let i=new Map([["Act","ACT"],["Lhi","LHI"],["Nsw","NSW"],["Dar_Es_Salaam","Dar_es_Salaam"],["Port_Of_Spain","Port_of_Spain"],["Port-Au-Prince","Port-au-Prince"],["Isle_Of_Man","Isle_of_Man"],["Comodrivadavia","ComodRivadavia"],["Knox_In","Knox_IN"],["Dumontdurville","DumontDUrville"],["Mcmurdo","McMurdo"],["Denoronha","DeNoronha"],["Easterisland","EasterIsland"],["Bajanorte","BajaNorte"],["Bajasur","BajaSur"]]);return r[1]=i.get(r[1])??r[1],r.length>2&&(r[2]=i.get(r[2])??r[2]),{identifier:r.join("/"),primaryIdentifier:e}}function tr(n,t){let{year:e,month:r,day:i,hour:o,minute:a,second:s}=uu(n,t),l=t%1e3;return l<0&&(l+=1e3),1e6*(Bs({isoDate:{year:e,month:r,day:i},time:{hour:o,minute:a,second:s,millisecond:l}})-t)}function us(n,t){return tr(n,Kt(t,"floor"))}function zs(n){let t=n<0?"-":"+",e=Math.abs(n);return`${t}${zo(Math.floor(e/60),e%60,0,0,"minute")}`}function cu(n){return zs(Fn(n,Nh,"halfExpand")/6e10)}function Bs({isoDate:{year:n,month:t,day:e},time:{hour:r,minute:i,second:o,millisecond:a}}){let s=n%400,l=(n-s)/400,u=new Date;return u.setUTCHours(r,i,o,a),u.setUTCFullYear(s,t-1,e),u.getTime()+Hh*l}function Ze(n){let t=Bs(n),e=1e3*n.time.microsecond+n.time.nanosecond;return S.default.add(Xt(t),S.default.BigInt(e))}function lu(n){let t=Kt(n,"trunc"),e=S.default.toNumber(S.default.remainder(n,Ni));e<0&&(e+=1e6,t-=1);let r=Math.floor(e/1e3)%1e3,i=e%1e3,o=new Date(t);return{epochMilliseconds:t,isoDate:{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate()},time:{hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds(),microsecond:r,nanosecond:i}}}function Us(n,t){if(n==="UTC")return null;let e=Kt(t,"floor");if(e<hi)return Us(n,Xt(hi));let r=Date.now(),i=Math.max(e,r)+366*$n*3,o=e,a=tr(n,o),s=o,l=a;for(;a===l&&o<i;){if(s=o+2*$n*7,s>Ul)return null;l=tr(n,s),a===l&&(o=s)}return a===l?null:Xt(bu(u=>tr(n,u),o,s,a,l))}function ds(n,t){if(n==="UTC")return null;let e=Kt(t,"ceil"),r=Date.now(),i=r+366*$n*3;if(e>i){let u=ds(n,Xt(i));if(u===null||S.default.lessThan(u,Xt(r)))return u}if(n==="Africa/Casablanca"||n==="Africa/El_Aaiun"){let u=Date.UTC(2088,0,1);if(u<e)return ds(n,Xt(u))}let o=e-1;if(o<hi)return null;let a=tr(n,o),s=o,l=a;for(;a===l&&o>hi;){if(s=o-2*$n*7,s<hi)return null;l=tr(n,s),a===l&&(o=s)}return a===l?null:Xt(bu(u=>tr(n,u),s,o,l,a))}function uu(n,t){return function(e){let r=e.split(/[^\w]+/);if(r.length!==7)throw new RangeError(`expected 7 parts in "${e}`);let i=+r[0],o=+r[1],a=+r[2],s=r[3];if(s[0]==="b"||s[0]==="B")a=1-a;else if(s[0]!=="a"&&s[0]!=="A")throw new RangeError(`Unknown era ${s} in "${e}`);let l=r[4]==="24"?0:+r[4],u=+r[5],h=+r[6];if(!(Number.isFinite(a)&&Number.isFinite(i)&&Number.isFinite(o)&&Number.isFinite(l)&&Number.isFinite(u)&&Number.isFinite(h)))throw new RangeError(`Invalid number in "${e}`);return{year:a,month:i,day:o,hour:l,minute:u,second:h}}(Vl(n).format(t))}function ko(n){return n!==void 0&&!(n%4!=0||n%100==0&&n%400!=0)}function nr(n,t){return{standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]}[ko(n)?"leapyear":"standard"][t-1]}function To(n){let t=[m(n,ut),m(n,dt),m(n,St),m(n,ht),m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt)];for(let e=0;e<t.length;e++){let r=t[e];if(r!==0)return r<0?-1:1}return 0}function Bo(n){let t=["years","months","weeks","days"];for(let e=0;e<t.length;e++){let r=n[t[e]];if(r!==0)return r<0?-1:1}return 0}function du(n){let t=Bo(n.date);return t!==0?t:n.time.sign()}function er(n,t){let e=n,r=t;if(!Number.isFinite(e)||!Number.isFinite(r))throw new RangeError("infinity is out of range");return r-=1,e+=Math.floor(r/12),r%=12,r<0&&(r+=12),r+=1,{year:e,month:r}}function It(n,t,e){let r=n,i=t,o=e;if(!Number.isFinite(o))throw new RangeError("infinity is out of range");({year:r,month:i}=er(r,i));let a=146097;if(Math.abs(o)>a){let u=Math.trunc(o/a);r+=400*u,o-=u*a}let s=0,l=i>2?r:r-1;for(;s=ko(l)?366:365,o<-s;)r-=1,l-=1,o+=s;for(l+=1;s=ko(l)?366:365,o>s;)r+=1,l+=1,o-=s;for(;o<1;)({year:r,month:i}=er(r,i-1)),o+=nr(r,i);for(;o>nr(r,i);)o-=nr(r,i),{year:r,month:i}=er(r,i+1);return{year:r,month:i,day:o}}function _i(n,t,e,r,i,o,a,s,l){let u=Nn(r,i,o,a,s,l);return we(It(n,t,e+u.deltaDays),u)}function Nn(n,t,e,r,i,o){let a,s=n,l=t,u=e,h=r,p=i,y=o;({div:a,mod:y}=Mr(y,3)),p+=a,y<0&&(p-=1,y+=1e3),{div:a,mod:p}=Mr(p,3),h+=a,p<0&&(h-=1,p+=1e3),u+=Math.trunc(h/1e3),h%=1e3,h<0&&(u-=1,h+=1e3),l+=Math.trunc(u/60),u%=60,u<0&&(l-=1,u+=60),s+=Math.trunc(l/60),l%=60,l<0&&(s-=1,l+=60);let E=Math.trunc(s/24);return s%=24,s<0&&(E-=1,s+=24),E+=0,s+=0,l+=0,u+=0,h+=0,p+=0,y+=0,{deltaDays:E,hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y}}function ul(n,t){let e=et(n,0);if(Bo(e)===0)return n.days;let r=m(t,ce),i=$t(m(t,$),r,e,"constrain"),o=ar(r.year,r.month-1,r.day),a=ar(i.year,i.month-1,i.day)-o;return n.days+a}function Pt(n){return new(Ge("%Temporal.Duration%"))(-m(n,ut),-m(n,dt),-m(n,St),-m(n,ht),-m(n,mt),-m(n,pt),-m(n,ft),-m(n,gt),-m(n,yt),-m(n,kt))}function vt(n,t,e){return Math.min(e,Math.max(t,n))}function hu(n,t,e){let r=vt(t,1,12);return{year:n,month:r,day:vt(e,1,nr(n,r))}}function Ve(n,t,e){if(n<t||n>e)throw new RangeError(`value out of range: ${t} <= ${n} <= ${e}`)}function ir(n,t,e){Ve(t,1,12),Ve(e,1,nr(n,t))}function dr(n){or(we(n,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function Uo(n,t,e,r,i,o){Ve(n,0,23),Ve(t,0,59),Ve(e,0,59),Ve(r,0,999),Ve(i,0,999),Ve(o,0,999)}function Vs(n,t,e,r,i,o,a,s,l){ir(n,t,e),Uo(r,i,o,a,s,l)}function or(n){let t=Ze(n);(S.default.lessThan(t,Oh)||S.default.greaterThan(t,Fh))&&ln(t)}function hs(n){Ze(n)}function ln(n){if(S.default.lessThan(n,vi)||S.default.greaterThan(n,Ir))throw new RangeError("date/time value is outside of supported range")}function qs({year:n,month:t}){Ve(n,Gc,Jc),n===Gc?Ve(t,4,12):n===Jc&&Ve(t,1,9)}function Vo(n,t,e,r,i,o,a,s,l,u){let h=0,p=[n,t,e,r,i,o,a,s,l,u];for(let B=0;B<p.length;B++){let K=p[B];if(K===1/0||K===-1/0)throw new RangeError("infinite values not allowed as duration fields");if(K!==0){let W=K<0?-1:1;if(h!==0&&W!==h)throw new RangeError("mixed-sign values not allowed as duration fields");h=W}}if(Math.abs(n)>=2**32||Math.abs(t)>=2**32||Math.abs(e)>=2**32)throw new RangeError("years, months, and weeks must be < 2\xB3\xB2");let y=Mr(s,3),E=Mr(l,6),T=Mr(u,9),C=Mr(1e6*y.mod+1e3*E.mod+T.mod,9).div,L=86400*r+3600*i+60*o+a+y.div+E.div+T.div+C;if(!Number.isSafeInteger(L))throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s")}function _r(n){return{date:{years:m(n,ut),months:m(n,dt),weeks:m(n,St),days:m(n,ht)},time:_e.fromComponents(m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt))}}function an(n){let t=_e.fromComponents(m(n,mt),m(n,pt),m(n,ft),m(n,gt),m(n,yt),m(n,kt)).add24HourDays(m(n,ht));return{date:{years:m(n,ut),months:m(n,dt),weeks:m(n,St),days:0},time:t}}function mu(n){let t=an(n),e=Math.trunc(t.time.sec/86400);return Vo(t.date.years,t.date.months,t.date.weeks,e,0,0,0,0,0,0),{...t.date,days:e}}function Vt(n,t){let e=n.time.sign(),r=n.time.abs().subsec,i=0,o=0,a=n.time.abs().sec,s=0,l=0,u=0;switch(t){case"year":case"month":case"week":case"day":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60,l=Math.trunc(s/60),s%=60,u=Math.trunc(l/24),l%=24;break;case"hour":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60,l=Math.trunc(s/60),s%=60;break;case"minute":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60;break;case"second":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3;break;case"millisecond":i=Math.trunc(r/1e3),r%=1e3,o=Ka(a,3,Math.trunc(i/1e3)),i%=1e3,a=0;break;case"microsecond":i=Ka(a,6,Math.trunc(r/1e3)),r%=1e3,a=0;break;case"nanosecond":r=Ka(a,9,r),a=0}return new(Ge("%Temporal.Duration%"))(n.date.years,n.date.months,n.date.weeks,n.date.days+e*u,e*l,e*s,e*a,e*o,e*i,e*r)}function En(n,t){return Bo(n),t.sign(),{date:n,time:t}}function ar(n,t,e){return Bs({isoDate:{year:n,month:t+1,day:e},time:{hour:0,minute:0,second:0,millisecond:0}})/$n}function Tr({year:n,month:t,day:e}){if(Math.abs(ar(n,t-1,e))>1e8)throw new RangeError("date/time value is outside the supported range")}function Ws(n,t){let e=t.hour-n.hour,r=t.minute-n.minute,i=t.second-n.second,o=t.millisecond-n.millisecond,a=t.microsecond-n.microsecond,s=t.nanosecond-n.nanosecond;return _e.fromComponents(e,r,i,o,a,s)}function Ks(n,t,e,r,i){let o=_e.fromEpochNsDiff(t,n);return o=Co(o,e,r,i),En({years:0,months:0,weeks:0,days:0},o)}function pu(n,t,e,r){hs(n),hs(t);let i=Ws(n.time,t.time),o=i.sign(),a=un(n.isoDate,t.isoDate),s=t.isoDate;a===o&&(s=It(s.year,s.month,s.day+o),i=i.add24HourDays(-o));let l=Dn("day",r),u=Bi(e,n.isoDate,s,l);return r!==l&&(i=i.add24HourDays(u.days),u.days=0),En(u,i)}function fu(n,t,e,r,i){let o=S.default.subtract(t,n);if(S.default.equal(o,Ht))return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};let a=S.default.lessThan(o,Ht)?-1:1,s=Wt(e,n),l=Wt(e,t),u,h=0,p=a===1?2:1,y=Ws(s.time,l.time);for(y.sign()===-a&&h++;h<=p;h++){u=we(It(l.isoDate.year,l.isoDate.month,l.isoDate.day-h*a),s.time);let T=tt(e,u,"compatible");if(y=_e.fromEpochNsDiff(t,T),y.sign()!==-a)break}let E=Dn("day",i);return En(Bi(r,s.isoDate,u.isoDate,E),y)}function gu(n,t,e,r,i,o,a,s,l){let u,h,p,y,E=t;switch(s){case"year":{let F=Fn(E.date.years,a,"trunc");u=F,h=F+a*n,p={years:u,months:0,weeks:0,days:0},y={...p,years:h};break}case"month":{let F=Fn(E.date.months,a,"trunc");u=F,h=F+a*n,p=et(E.date,0,0,u),y=et(E.date,0,0,h);break}case"week":{let F=et(E.date,0,0),ee=$t(o,r.isoDate,F,"constrain"),g=Bi(o,ee,It(ee.year,ee.month,ee.day+E.date.days),"week"),A=Fn(E.date.weeks+g.weeks,a,"trunc");u=A,h=A+a*n,p=et(E.date,0,u),y=et(E.date,0,h);break}case"day":{let F=Fn(E.date.days,a,"trunc");u=F,h=F+a*n,p=et(E.date,u),y=et(E.date,h);break}}let T=$t(o,r.isoDate,p,"constrain"),C=$t(o,r.isoDate,y,"constrain"),L,B,K=we(T,r.time),W=we(C,r.time);i?(L=tt(i,K,"compatible"),B=tt(i,W,"compatible")):(L=Ze(K),B=Ze(W));let Q=_e.fromEpochNsDiff(e,L),te=_e.fromEpochNsDiff(B,L),oe=Oo(l,n<0?"negative":"positive"),Me=Q.add(Q).abs().subtract(te.abs()).sign(),Ee=Math.abs(u)/a%2==0,ie=Q.isZero()?Math.abs(u):Q.cmp(te)?Fo(Math.abs(u),Math.abs(h),Me,Ee,oe):Math.abs(h),N=new _e(S.default.add(S.default.multiply(te.totalNs,S.default.BigInt(u)),S.default.multiply(Q.totalNs,S.default.BigInt(a*n)))).fdiv(te.totalNs),Y=ie===Math.abs(h);return E={date:Y?y:p,time:_e.ZERO},{nudgeResult:{duration:E,nudgedEpochNs:Y?B:L,didExpandCalendarUnit:Y},total:N}}function qo(n,t,e,r,i,o,a,s,l){let u=n,h=rn(s)||r&&s==="day",p=du(u)<0?-1:1,y;return h?{nudgeResult:y}=gu(p,u,t,e,r,i,a,s,l):y=r?function(E,T,C,L,B,K,W,Q){let te=T,oe=$t(B,C.isoDate,te.date,"constrain"),Me=we(oe,C.time),Ee=we(It(oe.year,oe.month,oe.day+E),C.time),ie=tt(L,Me,"compatible"),N=tt(L,Ee,"compatible"),Y=_e.fromEpochNsDiff(N,ie);if(Y.sign()!==E)throw new RangeError("time zone returned inconsistent Instants");let F=S.default.BigInt(xr[W]*K),ee=te.time.round(F,Q),g=ee.subtract(Y),A=g.sign()!==-E,c,d;return A?(c=E,ee=g.round(F,Q),d=ee.addToEpochNs(N)):(c=0,d=ee.addToEpochNs(ie)),{duration:En(et(te.date,te.date.days+c),ee),nudgedEpochNs:d,didExpandCalendarUnit:A}}(p,u,e,r,i,a,s,l):function(E,T,C,L,B,K){let W=E,Q=W.time.add24HourDays(W.date.days),te=Q.round(S.default.BigInt(L*xr[B]),K),oe=te.subtract(Q),{quotient:Me}=Q.divmod(Do),{quotient:Ee}=te.divmod(Do),ie=Math.sign(Ee-Me)===Q.sign(),N=oe.addToEpochNs(T),Y=0,F=te;return vn(C)==="date"&&(Y=Ee,F=te.add(_e.fromComponents(24*-Ee,0,0,0,0,0))),{duration:{date:et(W.date,Y),time:F},nudgedEpochNs:N,didExpandCalendarUnit:ie}}(u,t,o,a,s,l),u=y.duration,y.didExpandCalendarUnit&&s!=="week"&&(u=function(E,T,C,L,B,K,W,Q){let te=T;if(Q===W)return te;let oe=mi.indexOf(W);for(let Me=mi.indexOf(Q)-1;Me>=oe;Me--){let Ee=mi[Me];if(Ee==="week"&&W!=="week")continue;let ie;switch(Ee){case"year":ie={years:te.date.years+E,months:0,weeks:0,days:0};break;case"month":{let F=te.date.months+E;ie=et(te.date,0,0,F);break}case"week":{let F=te.date.weeks+E;ie=et(te.date,0,F);break}}let N=we($t(K,L.isoDate,ie,"constrain"),L.time),Y;if(Y=B?tt(B,N,"compatible"):Ze(N),wo(C,Y)===-E)break;te={date:ie,time:_e.ZERO}}return te}(p,u,y.nudgedEpochNs,e,r,i,o,Dn(s,"day"))),u}function dl(n,t,e,r,i,o){return rn(o)||r&&o==="day"?gu(du(n)<0?-1:1,n,t,e,r,i,1,o,"trunc").total:gi(n.time.add24HourDays(n.date.days),o)}function yu(n,t,e,r,i,o,a){if(Ar(n,t)==0)return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};or(n),or(t);let s=pu(n,t,e,r);return o==="nanosecond"&&i===1?s:qo(s,Ze(t),n,null,e,r,i,o,a)}function vu(n,t,e,r,i,o,a,s){if(vn(i)==="time")return Ks(n,t,o,a,s);let l=fu(n,t,e,r,i);return a==="nanosecond"&&o===1?l:qo(l,t,Wt(e,n),e,r,i,o,a,s)}function Yr(n,t,e,r,i,o){let a=Pr.reduce((E,T)=>{let C=T[0],L=T[1],B=T[2];return e!=="datetime"&&B!==e||r.includes(L)||E.push(L,C),E},[]),s=Ct(t,"largestUnit",e,"auto");if(r.includes(s))throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);let l=Or(t),u=Qt(t,"trunc");n==="since"&&(u=function(E){switch(E){case"ceil":return"floor";case"floor":return"ceil";case"halfCeil":return"halfFloor";case"halfFloor":return"halfCeil";default:return E}}(u));let h=Ct(t,"smallestUnit",e,i);if(r.includes(h))throw new RangeError(`smallestUnit must be one of ${a.join(", ")}, not ${h}`);let p=Dn(o,h);if(s==="auto"&&(s=p),Dn(s,h)!==s)throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${h}`);let y={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[h];return y!==void 0&&Fr(l,y,!1),{largestUnit:s,roundingIncrement:l,roundingMode:u,smallestUnit:h}}function hl(n,t,e,r){let i=si(e),o=Yr(n,X(r),"time",[],"nanosecond","second"),a=Vt(Ks(m(t,se),m(i,se),o.roundingIncrement,o.smallestUnit,o.roundingMode),o.largestUnit);return n==="since"&&(a=Pt(a)),a}function ml(n,t,e,r){let i=oi(e),o=m(t,$),a=m(i,$);if(!cn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Yr(n,X(r),"date",[],"day","day"),l=Ge("%Temporal.Duration%"),u=m(t,ce),h=m(i,ce);if(un(u,h)===0)return new l;let p={date:Bi(o,u,h,s.largestUnit),time:_e.ZERO};if(s.smallestUnit!=="day"||s.roundingIncrement!==1){let E=we(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});p=qo(p,Ze(we(h,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),E,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let y=Vt(p,"day");return n==="since"&&(y=Pt(y)),y}function pl(n,t,e,r){let i=ai(e),o=m(t,$),a=m(i,$);if(!cn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Yr(n,X(r),"datetime",[],"nanosecond","day"),l=Ge("%Temporal.Duration%"),u=m(t,xe),h=m(i,xe);if(Ar(u,h)===0)return new l;let p=Vt(yu(u,h,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return n==="since"&&(p=Pt(p)),p}function fl(n,t,e,r){let i=On(e),o=Yr(n,X(r),"time",[],"nanosecond","hour"),a=Ws(m(t,Fe),m(i,Fe));a=Co(a,o.roundingIncrement,o.smallestUnit,o.roundingMode);let s=Vt(En({years:0,months:0,weeks:0,days:0},a),o.largestUnit);return n==="since"&&(s=Pt(s)),s}function gl(n,t,e,r){let i=ci(e),o=m(t,$),a=m(i,$);if(!cn(o,a))throw new RangeError(`cannot compute difference between months of ${o} and ${a} calendars`);let s=Yr(n,X(r),"date",["week","day"],"month","year"),l=Ge("%Temporal.Duration%");if(un(m(t,ce),m(i,ce))==0)return new l;let u=Dt(o,m(t,ce),"year-month");u.day=1;let h=jn(o,u,"constrain"),p=Dt(o,m(i,ce),"year-month");p.day=1;let y=jn(o,p,"constrain"),E={date:et(Bi(o,h,y,s.largestUnit),0,0),time:_e.ZERO};if(s.smallestUnit!=="month"||s.roundingIncrement!==1){let C=we(h,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});E=qo(E,Ze(we(y,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),C,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let T=Vt(E,"day");return n==="since"&&(T=Pt(T)),T}function yl(n,t,e,r){let i=li(e),o=m(t,$),a=m(i,$);if(!cn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Yr(n,X(r),"datetime",[],"nanosecond","hour"),l=m(t,se),u=m(i,se),h=Ge("%Temporal.Duration%"),p;if(vn(s.largestUnit)!=="date")p=Vt(Ks(l,u,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{let y=m(t,De);if(!ou(y,m(i,De)))throw new RangeError("When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.");if(S.default.equal(l,u))return new h;p=Vt(vu(l,u,y,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),"hour")}return n==="since"&&(p=Pt(p)),p}function Rr({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){let s=e,l=o;return s+=a.sec,l+=a.subsec,Nn(n,t,s,r,i,l)}function ms(n,t){let e=t.addToEpochNs(n);return ln(e),e}function ui(n,t,e,r,i="constrain"){if(Bo(r.date)===0)return ms(n,r.time);let o=Wt(t,n);return ms(tt(t,we($t(e,o.isoDate,r.date,i),o.time),"compatible"),r.time)}function vl(n,t,e){let r=qt(e);n==="subtract"&&(r=Pt(r));let i=Dn(yn(t),yn(r));if(rn(i))throw new RangeError("For years, months, or weeks arithmetic, use date arithmetic relative to a starting point");let o=an(t),a=an(r);return Vt(En({years:0,months:0,weeks:0,days:0},o.time.add(a.time)),i)}function wl(n,t,e){let r=qt(e);n==="subtract"&&(r=Pt(r));let i=yn(r);if(vn(i)==="date")throw new RangeError(`Duration field ${i} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);let o=an(r);return Jt(ms(m(t,se),o.time))}function bl(n,t,e,r){let i=m(t,$),o=qt(e);n==="subtract"&&(o=Pt(o));let a=mu(o),s=ye(X(r));return wt($t(i,m(t,ce),a,s),i)}function Dl(n,t,e,r){let i=qt(e);n==="subtract"&&(i=Pt(i));let o=ye(X(r)),a=m(t,$),s=an(i),l=m(t,xe),u=Rr(l.time,s.time),h=et(s.date,u.deltaDays);return Vo(h.years,h.months,h.weeks,h.days,0,0,0,0,0,0),Ut(we($t(a,l.isoDate,h,o),u),a)}function El(n,t,e){let r=qt(e);n==="subtract"&&(r=Pt(r));let i=an(r),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:h}=Rr(m(t,Fe),i.time);return wn(jo(o,a,s,l,u,h,"reject"))}function _l(n,t,e,r){let i=qt(e);n==="subtract"&&(i=Pt(i));let o=ye(X(r)),a=To(i),s=m(t,$),l=Dt(s,m(t,ce),"year-month");l.day=1;let u=jn(s,l,"constrain");if(a<0){let p=$t(s,u,{months:1},"constrain");u=It(p.year,p.month,p.day-1)}let h=mu(i);return dr(u),kr(bi(s,Dt(s,$t(s,u,h,o),"year-month"),o),s)}function Ml(n,t,e,r){let i=qt(e);n==="subtract"&&(i=Pt(i));let o=ye(X(r)),a=m(t,De),s=m(t,$),l=_r(i);return Qe(ui(m(t,se),a,s,l,o),a,s)}function Fn(n,t,e){let r=Math.trunc(n/t),i=n%t,o=n<0?"negative":"positive",a=Math.abs(r),s=a+1,l=Tt(Math.abs(2*i)-t),u=a%2==0,h=Oo(e,o),p=i===0?a:Fo(a,s,l,u,h);return t*(o==="positive"?p:-p)}function ps(n,t,e,r){let i=xr[e]*t;return function(o,a,s){let l=gn(o),u=gn(a),h=S.default.divide(l,u),p=S.default.remainder(l,u),y=Oo(s,"positive"),E,T;S.default.lessThan(l,Ht)?(E=S.default.subtract(h,yi),T=h):(E=h,T=S.default.add(h,yi));let C=wo(Qn(S.default.multiply(p,Ys)),u)*(S.default.lessThan(l,Ht)?-1:1)+0,L=S.default.equal(p,Ht)?h:Fo(E,T,C,Cl(E),y);return S.default.multiply(L,u)}(n,S.default.BigInt(i),r)}function fs(n,t,e,r){hs(n);let{year:i,month:o,day:a}=n.isoDate,s=gs(n.time,t,e,r);return we(It(i,o,a+s.deltaDays),s)}function gs({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a,s,l){let u;switch(s){case"day":case"hour":u=1e3*(1e3*(1e3*(60*(60*n+t)+e)+r)+i)+o;break;case"minute":u=1e3*(1e3*(1e3*(60*t+e)+r)+i)+o;break;case"second":u=1e3*(1e3*(1e3*e+r)+i)+o;break;case"millisecond":u=1e3*(1e3*r+i)+o;break;case"microsecond":u=1e3*i+o;break;case"nanosecond":u=o}let h=xr[s],p=Fn(u,h*a,l)/h;switch(s){case"day":return{deltaDays:p,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case"hour":return Nn(p,0,0,0,0,0);case"minute":return Nn(n,p,0,0,0,0);case"second":return Nn(n,t,p,0,0,0);case"millisecond":return Nn(n,t,e,p,0,0);case"microsecond":return Nn(n,t,e,r,p,0);case"nanosecond":return Nn(n,t,e,r,i,p);default:throw new Error(`Invalid unit ${s}`)}}function Co(n,t,e,r){let i=xr[e];return n.round(S.default.BigInt(i*t),r)}function gi(n,t){let e=xr[t];return n.fdiv(S.default.BigInt(e))}function un(n,t){return n.year!==t.year?Tt(n.year-t.year):n.month!==t.month?Tt(n.month-t.month):n.day!==t.day?Tt(n.day-t.day):0}function ys(n,t){return n.hour!==t.hour?Tt(n.hour-t.hour):n.minute!==t.minute?Tt(n.minute-t.minute):n.second!==t.second?Tt(n.second-t.second):n.millisecond!==t.millisecond?Tt(n.millisecond-t.millisecond):n.microsecond!==t.microsecond?Tt(n.microsecond-t.microsecond):n.nanosecond!==t.nanosecond?Tt(n.nanosecond-t.nanosecond):0}function Ar(n,t){let e=un(n.isoDate,t.isoDate);return e!==0?e:ys(n.time,t.time)}function wu(n){let t=Io(n);return globalThis.BigInt!==void 0?globalThis.BigInt(t.toString(10)):t}function Kt(n,t){let e=gn(n),{quotient:r,remainder:i}=ri(e,Ni),o=S.default.toNumber(r);return t==="floor"&&S.default.toNumber(i)<0&&(o-=1),t==="ceil"&&S.default.toNumber(i)>0&&(o+=1),o}function Xt(n){if(!Number.isInteger(n))throw new RangeError("epoch milliseconds must be an integer");return S.default.multiply(S.default.BigInt(n),Ni)}function Io(n){let t=n;if(typeof n=="object"){let e=n[Symbol.toPrimitive];e&&typeof e=="function"&&(t=e.call(n,"number"))}if(typeof t=="number")throw new TypeError("cannot convert number to bigint");return typeof t=="bigint"?S.default.BigInt(t.toString(10)):S.default.BigInt(t)}var vs=(()=>{let n=S.default.BigInt(Date.now()%1e6);return()=>{let t=Date.now(),e=S.default.BigInt(t),r=S.default.add(Xt(t),n);return n=S.default.remainder(e,Ni),S.default.greaterThan(r,Ir)?Ir:S.default.lessThan(r,vi)?vi:r}})();function ti(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function Tt(n){return n<0?-1:n>0?1:n}function X(n){if(n===void 0)return Object.create(null);if(He(n)&&n!==null)return n;throw new TypeError("Options parameter must be an object, not "+(n===null?"null":typeof n))}function sr(n,t){let e=Object.create(null);return e[n]=t,e}function _n(n,t,e,r){let i=n[t];if(i!==void 0){if(i=Yo(i),!e.includes(i))throw new RangeError(`${t} must be one of ${e.join(", ")}, not ${i}`);return i}if(r===Sn)throw new RangeError(`${t} option is required`);return r}function _t(n){let t=Mi(n);if(!Yh.includes(Mi(t)))throw new RangeError(`invalid calendar identifier ${t}`);switch(t){case"ethiopic-amete-alem":return"ethioaa";case"islamicc":return"islamic-civil"}return t}function Mi(n){let t="";for(let e=0;e<n.length;e++){let r=n.charCodeAt(e);t+=r>=65&&r<=90?String.fromCharCode(r+32):String.fromCharCode(r)}return t}function Un(n){throw new TypeError(`Do not use built-in arithmetic operators with Temporal objects. When comparing, use ${n==="PlainMonthDay"?"Temporal.PlainDate.compare(obj1.toPlainDate(year), obj2.toPlainDate(year))":`Temporal.${n}.compare(obj1, obj2)`}, not obj1 > obj2. When coercing to strings, use \`\${obj}\` or String(obj), not '' + obj. When coercing to numbers, use properties or methods of the object, not \`+obj\`. When concatenating with strings, use \`\${str}\${obj}\` or str.concat(obj), not str + obj. In React, coerce to a string before rendering a Temporal object.`)}var qh=new RegExp(`^${zl.source}$`),Wh=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);function bu(n,t,e,r=n(t),i=n(e)){let o=t,a=e,s=r,l=i;for(;a-o>1;){let u=Math.trunc((o+a)/2),h=n(u);h===s?(o=u,s=h):h===l&&(a=u,l=h)}return a}function Du(n){return[...n]}function Eu(n,t){if(n!=="gregory"&&n!=="iso8601")return;let e=Wi[n],r=t.year,{dayOfWeek:i,dayOfYear:o,daysInYear:a}=e.isoToDate(t,{dayOfWeek:!0,dayOfYear:!0,daysInYear:!0}),s=e.getFirstDayOfWeek(),l=e.getMinimalDaysInFirstWeek(),u=(i+7-s)%7,h=(i-o+7001-s)%7,p=Math.floor((o-1+h)/7);if(7-h>=l&&++p,p==0)p=function(y,E,T,C){let L=(C-y-T+1)%7;L<0&&(L+=7);let B=Math.floor((T+L-1)/7);return 7-L>=E&&++B,B}(s,l,o+e.isoToDate(e.dateAdd(t,{years:-1},"constrain"),{daysInYear:!0}).daysInYear,i),r--;else if(o>=a-5){let y=(u+a-o)%7;y<0&&(y+=7),6-y>=l&&o+7-u>a&&(p=1,r++)}return{week:p,year:r}}function Sl(n,t,e,r,i){if(t!==i.year){if(n*(t-i.year)>0)return!0}else if(e!==i.month){if(n*(e-i.month)>0)return!0}else if(r!==i.day&&n*(r-i.day)>0)return!0;return!1}var Wi={};function cr(n){if(!n.startsWith("M"))throw new RangeError(`Invalid month code: ${n}. Month codes must start with M.`);let t=+n.slice(1);if(Number.isNaN(t))throw new RangeError(`Invalid month code: ${n}`);return t}function sn(n,t=!1){return`M${`${n}`.padStart(2,"0")}${t?"L":""}`}function Zs(n,t=void 0,e=12){let{month:r,monthCode:i}=n;if(i===void 0){if(r===void 0)throw new TypeError("Either month or monthCode are required");t==="reject"&&Ve(r,1,e),t==="constrain"&&(r=vt(r,1,e)),i=sn(r)}else{let o=cr(i);if(i!==sn(o))throw new RangeError(`Invalid month code: ${i}`);if(r!==void 0&&r!==o)throw new RangeError(`monthCode ${i} and month ${r} must match if both are present`);if(r=o,r<1||r>e)throw new RangeError(`Invalid monthCode: ${i}`)}return{...n,month:r,monthCode:i}}Wi.iso8601={resolveFields(n,t){if((t==="date"||t==="year-month")&&n.year===void 0)throw new TypeError("year is required");if((t==="date"||t==="month-day")&&n.day===void 0)throw new TypeError("day is required");Object.assign(n,Zs(n))},dateToISO:(n,t)=>pi(n.year,n.month,n.day,t),monthDayToISOReferenceDate(n,t){let{month:e,day:r}=pi(n.year??1972,n.month,n.day,t);return{month:e,day:r,year:1972}},extraFields:()=>[],fieldKeysToIgnore(n){let t=new Set;for(let e=0;e<n.length;e++){let r=n[e];t.add(r),r==="month"?t.add("monthCode"):r==="monthCode"&&t.add("month")}return Du(t)},dateAdd(n,{years:t=0,months:e=0,weeks:r=0,days:i=0},o){let{year:a,month:s,day:l}=n;return a+=t,s+=e,{year:a,month:s}=er(a,s),{year:a,month:s,day:l}=pi(a,s,l,o),l+=i+7*r,It(a,s,l)},dateUntil(n,t,e){let r=-un(n,t);if(r===0)return{years:0,months:0,weeks:0,days:0};let i,o=0,a=0;if(e==="year"||e==="month"){let h=t.year-n.year;for(h!==0&&(h-=r);!Sl(r,n.year+h,n.month,n.day,t);)o=h,h+=r;let p=r;for(i=er(n.year+o,n.month+p);!Sl(r,i.year,i.month,n.day,t);)a=p,p+=r,i=er(i.year,i.month+r);e==="month"&&(a+=12*o,o=0)}i=er(n.year+o,n.month+a);let s=hu(i.year,i.month,n.day),l=0,u=ar(t.year,t.month-1,t.day)-ar(s.year,s.month-1,s.day);return e==="week"&&(l=Math.trunc(u/7),u%=7),{years:o,months:a,weeks:l,days:u}},isoToDate({year:n,month:t,day:e},r){let i={era:void 0,eraYear:void 0,year:n,month:t,day:e,daysInWeek:7,monthsInYear:12};if(r.monthCode&&(i.monthCode=sn(t)),r.dayOfWeek){let o=t+(t<3?10:-2),a=n-(t<3?1:0),s=Math.floor(a/100),l=a-100*s,u=(e+Math.floor(2.6*o-.2)+(l+Math.floor(l/4))+(Math.floor(s/4)-2*s))%7;i.dayOfWeek=u+(u<=0?7:0)}if(r.dayOfYear){let o=e;for(let a=t-1;a>0;a--)o+=nr(n,a);i.dayOfYear=o}return r.weekOfYear&&(i.weekOfYear=Eu("iso8601",{year:n,month:t,day:e})),r.daysInMonth&&(i.daysInMonth=nr(n,t)),(r.daysInYear||r.inLeapYear)&&(i.inLeapYear=ko(n),i.daysInYear=i.inLeapYear?366:365),i},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};var Ot=class n{constructor(t){if(this.map=new Map,this.calls=0,this.hits=0,this.misses=0,t!==void 0){let e=0;for(let r of t.map.entries()){if(++e>n.MAX_CACHE_ENTRIES)break;this.map.set(...r)}}}get(t){let e=this.map.get(t);return e&&(this.hits++,this.report()),this.calls++,e}set(t,e){this.map.set(t,e),this.misses++,this.report()}report(){}setObject(t){if(n.objectMap.get(t))throw new RangeError("object already cached");n.objectMap.set(t,this),this.report()}static getCacheForObject(t){let e=n.objectMap.get(t);return e||(e=new n,n.objectMap.set(t,e)),e}};function _u({isoYear:n,isoMonth:t,isoDay:e}){return`${qi(n)}-${jt(t)}-${jt(e)}T00:00Z`}function Ja(n,t){return{years:n.year-t.year,months:n.month-t.month,days:n.day-t.day}}Ot.objectMap=new WeakMap,Ot.MAX_CACHE_ENTRIES=1e3;var kn=class{constructor(){this.eras=[],this.hasEra=!1,this.erasBeginMidYear=!1}getFormatter(){return this.formatter===void 0&&(this.formatter=new Intl.DateTimeFormat(`en-US-u-ca-${this.id}`,{day:"numeric",month:"numeric",year:"numeric",era:"short",timeZone:"UTC"})),this.formatter}getCalendarParts(t){let e=this.getFormatter(),r=new Date(t);if(t==="-271821-04-19T00:00Z"){let i=e.resolvedOptions();e=new Intl.DateTimeFormat(i.locale,{...i,timeZone:"Etc/GMT+1"}),r=new Date("-271821-04-20T00:00Z")}try{return e.formatToParts(r)}catch{throw new RangeError(`Invalid ISO date: ${t}`)}}isoToCalendarDate(t,e){let{year:r,month:i,day:o}=t,a=JSON.stringify({func:"isoToCalendarDate",isoYear:r,isoMonth:i,isoDay:o,id:this.id}),s=e.get(a);if(s)return s;let l=_u({isoYear:r,isoMonth:i,isoDay:o}),u=this.getCalendarParts(l),h={};for(let y=0;y<u.length;y++){let{type:E,value:T}=u[y];if(E!=="year"&&E!=="relatedYear"||(this.hasEra?h.eraYear=+T:h.year=+T),E==="month"){let C=/^([0-9]*)(.*?)$/.exec(T);if(!C||C.length!=3||!C[1]&&!C[2])throw new RangeError(`Unexpected month: ${T}`);if(h.month=C[1]?+C[1]:1,h.month<1)throw new RangeError(`Invalid month ${T} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(h.month>13)throw new RangeError(`Invalid month ${T} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);C[2]&&(h.monthExtra=C[2])}E==="day"&&(h.day=+T),this.hasEra&&E==="era"&&T!=null&&T!==""&&(h.era=T.split(" (")[0].normalize("NFD").replace(/[^-0-9 \p{L}]/gu,"").replace(/ /g,"-").toLowerCase())}if(this.hasEra&&h.eraYear===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);if(this.hasEra){let y=this.eras.find(E=>h.era===E.genericName);y&&(h.era=y.code)}if(this.reviseIntlEra){let{era:y,eraYear:E}=this.reviseIntlEra(h,t);h.era=y,h.eraYear=E}this.checkIcuBugs&&this.checkIcuBugs(t);let p=this.adjustCalendarDate(h,e,"constrain",!0);if(p.year===void 0)throw new RangeError(`Missing year converting ${JSON.stringify(t)}`);if(p.month===void 0)throw new RangeError(`Missing month converting ${JSON.stringify(t)}`);if(p.day===void 0)throw new RangeError(`Missing day converting ${JSON.stringify(t)}`);return e.set(a,p),["constrain","reject"].forEach(y=>{let E=JSON.stringify({func:"calendarToIsoDate",year:p.year,month:p.month,day:p.day,overflow:y,id:this.id});e.set(E,t)}),p}validateCalendarDate(t){let{month:e,year:r,day:i,eraYear:o,monthCode:a,monthExtra:s}=t;if(s!==void 0)throw new RangeError("Unexpected `monthExtra` value");if(r===void 0&&o===void 0)throw new TypeError("year or eraYear is required");if(e===void 0&&a===void 0)throw new TypeError("month or monthCode is required");if(i===void 0)throw new RangeError("Missing day");if(a!==void 0){if(typeof a!="string")throw new RangeError("monthCode must be a string, not "+typeof a);if(!/^M([01]?\d)(L?)$/.test(a))throw new RangeError(`Invalid monthCode: ${a}`)}if(this.hasEra&&t.era===void 0!=(t.eraYear===void 0))throw new TypeError("properties era and eraYear must be provided together")}adjustCalendarDate(t,e=void 0,r="constrain",i=!1){if(this.calendarType==="lunisolar")throw new RangeError("Override required for lunisolar calendars");let o=t;this.validateCalendarDate(o);let a=this.monthsInYear(o,e),{month:s,monthCode:l}=o;return{month:s,monthCode:l}=Zs(o,r,a),{...o,month:s,monthCode:l}}regulateMonthDayNaive(t,e,r){let i=this.monthsInYear(t,r),{month:o,day:a}=t;return e==="reject"?(Ve(o,1,i),Ve(a,1,this.maximumMonthLength(t))):(o=vt(o,1,i),a=vt(a,1,this.maximumMonthLength({...t,month:o}))),{...t,month:o,day:a}}calendarToIsoDate(t,e="constrain",r){let i=t,o=this.adjustCalendarDate(t,r,e,!1);o=this.regulateMonthDayNaive(o,e,r);let{year:a,month:s,day:l}=o,u=JSON.stringify({func:"calendarToIsoDate",year:a,month:s,day:l,overflow:e,id:this.id}),h,p=r.get(u);if(p||i.year!==void 0&&i.month!==void 0&&i.day!==void 0&&(i.year!==o.year||i.month!==o.month||i.day!==o.day)&&(h=JSON.stringify({func:"calendarToIsoDate",year:i.year,month:i.month,day:i.day,overflow:e,id:this.id}),p=r.get(h),p))return p;let y=this.estimateIsoDate({year:a,month:s,day:l}),E=K=>{let W=this.addDaysIso(y,K);if(o.day>this.minimumMonthLength(o)){let Q=this.isoToCalendarDate(W,r);for(;Q.month!==s||Q.year!==a;){if(e==="reject")throw new RangeError(`day ${l} does not exist in month ${s} of year ${a}`);W=this.addDaysIso(W,-1),Q=this.isoToCalendarDate(W,r)}}return W},T=0,C=this.isoToCalendarDate(y,r),L=Ja(o,C);if(L.years!==0||L.months!==0||L.days!==0){let K=365*L.years+30*L.months+L.days;y=this.addDaysIso(y,K),C=this.isoToCalendarDate(y,r),L=Ja(o,C),L.years===0&&L.months===0?y=E(L.days):T=this.compareCalendarDates(o,C)}let B=8;for(;T;){y=this.addDaysIso(y,T*B);let K=C;C=this.isoToCalendarDate(y,r);let W=T;if(T=this.compareCalendarDates(o,C),T){if(L=Ja(o,C),L.years===0&&L.months===0)y=E(L.days),T=0;else if(W&&T!==W)if(B>1)B/=2;else{if(e==="reject")throw new RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...i})}`);this.compareCalendarDates(C,K)>0&&(y=this.addDaysIso(y,-1)),T=0}}}if(r.set(u,y),h&&r.set(h,y),o.year===void 0||o.month===void 0||o.day===void 0||o.monthCode===void 0||this.hasEra&&(o.era===void 0||o.eraYear===void 0))throw new RangeError("Unexpected missing property");return y}compareCalendarDates(t,e){return t.year!==e.year?Tt(t.year-e.year):t.month!==e.month?Tt(t.month-e.month):t.day!==e.day?Tt(t.day-e.day):0}regulateDate(t,e="constrain",r){let i=this.calendarToIsoDate(t,e,r);return this.isoToCalendarDate(i,r)}addDaysIso(t,e){return It(t.year,t.month,t.day+e)}addDaysCalendar(t,e,r){let i=this.calendarToIsoDate(t,"constrain",r),o=this.addDaysIso(i,e);return this.isoToCalendarDate(o,r)}addMonthsCalendar(t,e,r,i){let o=t,{day:a}=o;for(let s=0,l=Math.abs(e);s<l;s++){let{month:u}=o,h=o,p=e<0?-Math.max(a,this.daysInPreviousMonth(o,i)):this.daysInMonth(o,i),y=this.calendarToIsoDate(o,"constrain",i),E=this.addDaysIso(y,p);if(o=this.isoToCalendarDate(E,i),e>0){let T=this.monthsInYear(h,i);for(;o.month-1!=u%T;)E=this.addDaysIso(E,-1),o=this.isoToCalendarDate(E,i)}o.day!==a&&(o=this.regulateDate({...o,day:a},"constrain",i))}if(r==="reject"&&o.day!==a)throw new RangeError(`Day ${a} does not exist in resulting calendar month`);return o}addCalendar(t,{years:e=0,months:r=0,weeks:i=0,days:o=0},a,s){let{year:l,day:u,monthCode:h}=t,p=this.adjustCalendarDate({year:l+e,monthCode:h,day:u},s),y=this.addMonthsCalendar(p,r,a,s),E=o+7*i;return this.addDaysCalendar(y,E,s)}untilCalendar(t,e,r,i){let o=0,a=0,s=0,l=0;switch(r){case"day":o=this.calendarDaysUntil(t,e,i);break;case"week":{let u=this.calendarDaysUntil(t,e,i);o=u%7,a=(u-o)/7;break}case"month":case"year":{let u=this.compareCalendarDates(e,t);if(!u)return{years:0,months:0,weeks:0,days:0};let h=e.year-t.year,p=e.day-t.day;if(r==="year"&&h){let T=0;e.monthCode>t.monthCode&&(T=1),e.monthCode<t.monthCode&&(T=-1),T||(T=Math.sign(p)),l=T*u<0?h-u:h}let y,E=l?this.addCalendar(t,{years:l},"constrain",i):t;do s+=u,y=E,E=this.addMonthsCalendar(y,u,"constrain",i),E.day!==t.day&&(E=this.regulateDate({...E,day:t.day},"constrain",i));while(this.compareCalendarDates(e,E)*u>=0);s-=u,o=this.calendarDaysUntil(y,e,i);break}}return{years:l,months:s,weeks:a,days:o}}daysInMonth(t,e){let{day:r}=t,i=this.maximumMonthLength(t),o=this.minimumMonthLength(t);if(o===i)return o;let a=r<=i-o?i:o,s=this.calendarToIsoDate(t,"constrain",e),l=this.addDaysIso(s,a),u=this.isoToCalendarDate(l,e),h=this.addDaysIso(l,-u.day);return this.isoToCalendarDate(h,e).day}daysInPreviousMonth(t,e){let{day:r,month:i,year:o}=t,a={year:i>1?o:o-1,month:i,day:1},s=i>1?i-1:this.monthsInYear(a,e);a={...a,month:s};let l=this.minimumMonthLength(a),u=this.maximumMonthLength(a);if(l===u)return u;let h=this.calendarToIsoDate(t,"constrain",e),p=this.addDaysIso(h,-r);return this.isoToCalendarDate(p,e).day}startOfCalendarYear(t){return{year:t.year,month:1,monthCode:"M01",day:1}}startOfCalendarMonth(t){return{year:t.year,month:t.month,day:1}}calendarDaysUntil(t,e,r){let i=this.calendarToIsoDate(t,"constrain",r),o=this.calendarToIsoDate(e,"constrain",r);return ar(o.year,o.month-1,o.day)-ar(i.year,i.month-1,i.day)}monthDaySearchStartYear(t,e){return 1972}monthDayFromFields(t,e,r){let i,o,a,s,l,{era:u,eraYear:h,year:p,month:y,monthCode:E,day:T}=t;if(y!==void 0&&p===void 0&&(!this.hasEra||u===void 0||h===void 0))throw new TypeError("when month is present, year (or era and eraYear) are required");(E===void 0||p!==void 0||this.hasEra&&h!==void 0)&&({monthCode:E,day:T}=this.isoToCalendarDate(this.calendarToIsoDate(t,e,r),r));let C={year:this.monthDaySearchStartYear(E,T),month:12,day:31},L=this.isoToCalendarDate(C,r),B=L.monthCode>E||L.monthCode===E&&L.day>=T?L.year:L.year-1;for(let K=0;K<20;K++){let W=this.adjustCalendarDate({day:T,monthCode:E,year:B-K},r),Q=this.calendarToIsoDate(W,"constrain",r),te=this.isoToCalendarDate(Q,r);if({year:i,month:o,day:a}=Q,te.monthCode===E&&te.day===T)return{month:o,day:a,year:i};if(e==="constrain"){let oe=this.maxLengthOfMonthCodeInAnyYear(te.monthCode);if(te.monthCode===E&&te.day===oe&&T>oe)return{month:o,day:a,year:i};(s===void 0||te.monthCode===s.monthCode&&te.day>s.day)&&(s=te,l=Q)}}if(e==="constrain"&&l!==void 0)return l;throw new RangeError(`No recent ${this.id} year with monthCode ${E} and day ${T}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}},ws=class extends kn{constructor(){super(...arguments),this.id="hebrew",this.calendarType="lunisolar",this.months={Tishri:{leap:1,regular:1,monthCode:"M01",days:30},Heshvan:{leap:2,regular:2,monthCode:"M02",days:{min:29,max:30}},Kislev:{leap:3,regular:3,monthCode:"M03",days:{min:29,max:30}},Tevet:{leap:4,regular:4,monthCode:"M04",days:29},Shevat:{leap:5,regular:5,monthCode:"M05",days:30},Adar:{leap:void 0,regular:6,monthCode:"M06",days:29},"Adar I":{leap:6,regular:void 0,monthCode:"M05L",days:30},"Adar II":{leap:7,regular:void 0,monthCode:"M06",days:29},Nisan:{leap:8,regular:7,monthCode:"M07",days:30},Iyar:{leap:9,regular:8,monthCode:"M08",days:29},Sivan:{leap:10,regular:9,monthCode:"M09",days:30},Tamuz:{leap:11,regular:10,monthCode:"M10",days:29},Av:{leap:12,regular:11,monthCode:"M11",days:30},Elul:{leap:13,regular:12,monthCode:"M12",days:29}}}inLeapYear(t){let{year:e}=t;return(7*e+1)%19<7}monthsInYear(t){return this.inLeapYear(t)?13:12}minimumMonthLength(t){return this.minMaxMonthLength(t,"min")}maximumMonthLength(t){return this.minMaxMonthLength(t,"max")}minMaxMonthLength(t,e){let{month:r,year:i}=t,o=this.getMonthCode(i,r),a=Object.entries(this.months).find(l=>l[1].monthCode===o);if(a===void 0)throw new RangeError(`unmatched Hebrew month: ${r}`);let s=a[1].days;return typeof s=="number"?s:s[e]}maxLengthOfMonthCodeInAnyYear(t){return["M04","M06","M08","M10","M12"].includes(t)?29:30}estimateIsoDate(t){let{year:e}=t;return{year:e-3760,month:1,day:1}}getMonthCode(t,e){return this.inLeapYear({year:t})?e===6?sn(5,!0):sn(e<6?e:e-1):sn(e)}adjustCalendarDate(t,e,r="constrain",i=!1){let{year:o,month:a,monthCode:s,day:l,monthExtra:u}=t;if(o===void 0)throw new TypeError("Missing property: year");if(i){if(u){let h=this.months[u];if(!h)throw new RangeError(`Unrecognized month from formatToParts: ${u}`);a=this.inLeapYear({year:o})?h.leap:h.regular}return s=this.getMonthCode(o,a),{year:o,month:a,day:l,monthCode:s}}if(this.validateCalendarDate(t),a===void 0)if(s.endsWith("L")){if(s!=="M05L")throw new RangeError(`Hebrew leap month must have monthCode M05L, not ${s}`);if(a=6,!this.inLeapYear({year:o})){if(r==="reject")throw new RangeError(`Hebrew monthCode M05L is invalid in year ${o} which is not a leap year`);a=6,s="M06"}}else{a=cr(s),this.inLeapYear({year:o})&&a>=6&&a++;let h=this.monthsInYear({year:o});if(a<1||a>h)throw new RangeError(`Invalid monthCode: ${s}`)}else if(r==="reject"?(Ve(a,1,this.monthsInYear({year:o})),Ve(l,1,this.maximumMonthLength({year:o,month:a}))):(a=vt(a,1,this.monthsInYear({year:o})),l=vt(l,1,this.maximumMonthLength({year:o,month:a}))),s===void 0)s=this.getMonthCode(o,a);else if(this.getMonthCode(o,a)!==s)throw new RangeError(`monthCode ${s} doesn't correspond to month ${a} in Hebrew year ${o}`);return{...t,day:l,month:a,monthCode:s,year:o}}},zn=class extends kn{constructor(){super(...arguments),this.calendarType="lunar",this.DAYS_PER_ISLAMIC_YEAR=354+11/30,this.DAYS_PER_ISO_YEAR=365.2425}inLeapYear(t,e){let r={year:t.year,month:1,monthCode:"M01",day:1},i={year:t.year+1,month:1,monthCode:"M01",day:1};return this.calendarDaysUntil(r,i,e)===355}monthsInYear(){return 12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(){return 30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:Math.floor(e*this.DAYS_PER_ISLAMIC_YEAR/this.DAYS_PER_ISO_YEAR)+622,month:1,day:1}}},bs=class extends zn{constructor(){super(...arguments),this.id="islamic"}},Ds=class extends zn{constructor(){super(...arguments),this.id="islamic-umalqura"}},Es=class extends zn{constructor(){super(...arguments),this.id="islamic-tbla"}},_s=class extends zn{constructor(){super(...arguments),this.id="islamic-civil"}},Ms=class extends zn{constructor(){super(...arguments),this.id="islamic-rgsa"}},Ss=class extends zn{constructor(){super(...arguments),this.id="islamicc"}},ks=class extends kn{constructor(){super(...arguments),this.id="persian",this.calendarType="solar"}inLeapYear(t,e){return this.daysInMonth({year:t.year,month:12,day:1},e)===30}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===12?29:e<=6?31:30}maximumMonthLength(t){let{month:e}=t;return e===12?30:e<=6?31:30}maxLengthOfMonthCodeInAnyYear(t){return cr(t)<=6?31:30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:e+621,month:1,day:1}}},Ts=class extends kn{constructor(){super(...arguments),this.id="indian",this.calendarType="solar",this.months={1:{length:30,month:3,day:22,leap:{length:31,month:3,day:21}},2:{length:31,month:4,day:21},3:{length:31,month:5,day:22},4:{length:31,month:6,day:22},5:{length:31,month:7,day:23},6:{length:31,month:8,day:23},7:{length:30,month:9,day:23},8:{length:30,month:10,day:23},9:{length:30,month:11,day:22},10:{length:30,month:12,day:22},11:{length:30,month:1,nextYear:!0,day:21},12:{length:30,month:2,nextYear:!0,day:20}},this.vulnerableToBceBug=new Date("0000-01-01T00:00Z").toLocaleDateString("en-US-u-ca-indian",{timeZone:"UTC"})!=="10/11/-79 Saka"}inLeapYear(t){return Gs(t.year+78)}monthsInYear(){return 12}minimumMonthLength(t){return this.getMonthInfo(t).length}maximumMonthLength(t){return this.getMonthInfo(t).length}maxLengthOfMonthCodeInAnyYear(t){let e=cr(t),r=this.months[e];return r=r.leap??r,r.length}getMonthInfo(t){let{month:e}=t,r=this.months[e];if(r===void 0)throw new RangeError(`Invalid month: ${e}`);return this.inLeapYear(t)&&r.leap&&(r=r.leap),r}estimateIsoDate(t){let e=this.adjustCalendarDate(t),r=this.getMonthInfo(e);return It(e.year+78+(r.nextYear?1:0),r.month,r.day+e.day-1)}checkIcuBugs(t){if(this.vulnerableToBceBug&&t.year<1)throw new RangeError(`calendar '${this.id}' is broken for ISO dates before 0001-01-01 (see https://bugs.chromium.org/p/v8/issues/detail?id=10529)`)}};function Gs(n){return n%4==0&&(n%100!=0||n%400==0)}var Po=class extends kn{constructor(t,e){super(),this.calendarType="solar",this.id=t,this.isoEpoch=e}inLeapYear(t){let{year:e}=this.estimateIsoDate({month:1,day:1,year:t.year});return Gs(e)}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===2?this.inLeapYear(t)?29:28:[4,6,9,11].indexOf(e)>=0?30:31}maximumMonthLength(t){return this.minimumMonthLength(t)}maxLengthOfMonthCodeInAnyYear(t){return[31,29,31,30,31,30,31,31,30,31,30,31][cr(t)-1]}estimateIsoDate(t){let e=this.adjustCalendarDate(t);return pi(e.year+this.isoEpoch.year,e.month+this.isoEpoch.month,e.day+this.isoEpoch.day,"constrain")}},xo=class extends kn{constructor(t,e){super(),this.hasEra=!0,this.calendarType="solar",this.id=t;let{eras:r,anchorEra:i}=function(o){let a,s=o;if(s.length===0)throw new RangeError("Invalid era data: eras are required");if(s.length===1&&s[0].reverseOf)throw new RangeError("Invalid era data: anchor era cannot count years backwards");if(s.length===1&&!s[0].code)throw new RangeError("Invalid era data: at least one named era is required");if(s.filter(u=>u.reverseOf!=null).length>1)throw new RangeError("Invalid era data: only one era can count years backwards");s.forEach(u=>{if(u.isAnchor||!u.anchorEpoch&&!u.reverseOf){if(a)throw new RangeError("Invalid era data: cannot have multiple anchor eras");a=u,u.anchorEpoch={year:u.hasYearZero?0:1}}else if(!u.code)throw new RangeError("If era name is blank, it must be the anchor era")}),s=s.filter(u=>u.code),s.forEach(u=>{let{reverseOf:h}=u;if(h){let p=s.find(y=>y.code===h);if(p===void 0)throw new RangeError(`Invalid era data: unmatched reverseOf era: ${h}`);u.reverseOf=p,u.anchorEpoch=p.anchorEpoch,u.isoEpoch=p.isoEpoch}u.anchorEpoch.month===void 0&&(u.anchorEpoch.month=1),u.anchorEpoch.day===void 0&&(u.anchorEpoch.day=1)}),s.sort((u,h)=>{if(u.reverseOf)return 1;if(h.reverseOf)return-1;if(!u.isoEpoch||!h.isoEpoch)throw new RangeError("Invalid era data: missing ISO epoch");return h.isoEpoch.year-u.isoEpoch.year});let l=s[s.length-1].reverseOf;if(l&&l!==s[s.length-2])throw new RangeError("Invalid era data: invalid reverse-sign era");return s.forEach((u,h)=>{u.genericName="era"+(s.length-1-h)}),{eras:s,anchorEra:a||s[0]}}(e);this.anchorEra=i,this.eras=r}inLeapYear(t){let{year:e}=this.estimateIsoDate({month:1,day:1,year:t.year});return Gs(e)}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===2?this.inLeapYear(t)?29:28:[4,6,9,11].indexOf(e)>=0?30:31}maximumMonthLength(t){return this.minimumMonthLength(t)}maxLengthOfMonthCodeInAnyYear(t){return[31,29,31,30,31,30,31,31,30,31,30,31][cr(t)-1]}completeEraYear(t){let e=(s,l,u)=>{let h=t[s];if(h!=null&&h!=l&&!(u||[]).includes(h)){let p=u?.[0];throw new RangeError(`Input ${s} ${h} doesn't match calculated value ${p?`${l} (also called ${p})`:l}`)}},r=s=>{let l,u={...t,year:s},h=this.eras.find((p,y)=>{if(y===this.eras.length-1){if(p.reverseOf){if(s>0)throw new RangeError(`Signed year ${s} is invalid for era ${p.code}`);return l=p.anchorEpoch.year-s,!0}return l=s-p.anchorEpoch.year+(p.hasYearZero?0:1),!0}return this.compareCalendarDates(u,p.anchorEpoch)>=0&&(l=s-p.anchorEpoch.year+(p.hasYearZero?0:1),!0)});if(!h)throw new RangeError(`Year ${s} was not matched by any era`);return{eraYear:l,era:h.code,eraNames:h.names}},{year:i,eraYear:o,era:a}=t;if(i!=null){let s=r(i);({eraYear:o,era:a}=s),e("era",a,s?.eraNames),e("eraYear",o)}else{if(o==null)throw new RangeError("Either year or eraYear and era are required");{if(a===void 0)throw new RangeError("era and eraYear must be provided together");let s=this.eras.find(({code:l,names:u=[]})=>l===a||u.includes(a));if(!s)throw new RangeError(`Era ${a} (ISO year ${o}) was not matched by any era`);i=s.reverseOf?s.anchorEpoch.year-o:o+s.anchorEpoch.year-(s.hasYearZero?0:1),e("year",i),{eraYear:o,era:a}=r(i)}}return{...t,year:i,eraYear:o,era:a}}adjustCalendarDate(t,e,r="constrain"){let i=t,{month:o,monthCode:a}=i;return o===void 0&&(i={...i,month:cr(a)}),this.validateCalendarDate(i),i=this.completeEraYear(i),super.adjustCalendarDate(i,e,r)}estimateIsoDate(t){let e=this.adjustCalendarDate(t),{year:r,month:i,day:o}=e,{anchorEra:a}=this;return pi(r+a.isoEpoch.year-(a.hasYearZero?0:1),i,o,"constrain")}},Si=class extends xo{constructor(t,e){super(t,e)}isoToCalendarDate(t){let{year:e,month:r,day:i}=t,o=sn(r),a=e-this.anchorEra.isoEpoch.year+1;return this.completeEraYear({year:a,month:r,monthCode:o,day:i})}},on={inLeapYear(n){let{year:t}=n;return(t+1)%4==0},monthsInYear:()=>13,minimumMonthLength(n){let{month:t}=n;return t===13?this.inLeapYear(n)?6:5:30},maximumMonthLength(n){return this.minimumMonthLength(n)},maxLengthOfMonthCodeInAnyYear:n=>n==="M13"?6:30},Cs=class extends Po{constructor(t,e){super(t,e),this.inLeapYear=on.inLeapYear,this.monthsInYear=on.monthsInYear,this.minimumMonthLength=on.minimumMonthLength,this.maximumMonthLength=on.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=on.maxLengthOfMonthCodeInAnyYear}},Ro=class extends xo{constructor(t,e){super(t,e),this.inLeapYear=on.inLeapYear,this.monthsInYear=on.monthsInYear,this.minimumMonthLength=on.minimumMonthLength,this.maximumMonthLength=on.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=on.maxLengthOfMonthCodeInAnyYear}},Is=class extends Cs{constructor(){super("ethioaa",{year:-5492,month:7,day:17})}},Ps=class extends Ro{constructor(){super("coptic",[{code:"coptic",isoEpoch:{year:284,month:8,day:29}},{code:"coptic-inverse",reverseOf:"coptic"}])}},xs=class extends Ro{constructor(){super("ethiopic",[{code:"ethioaa",names:["ethiopic-amete-alem","mundi"],isoEpoch:{year:-5492,month:7,day:17}},{code:"ethiopic",names:["incar"],isoEpoch:{year:8,month:8,day:27},anchorEpoch:{year:5501}}])}},Rs=class extends Si{constructor(){super("roc",[{code:"roc",names:["minguo"],isoEpoch:{year:1912,month:1,day:1}},{code:"roc-inverse",names:["before-roc"],reverseOf:"roc"}])}},As=class extends Po{constructor(){super("buddhist",{year:-543,month:1,day:1})}},Ls=class extends Si{constructor(){super("gregory",[{code:"gregory",names:["ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"gregory-inverse",names:["be","bce"],reverseOf:"gregory"}])}reviseIntlEra(t){let{era:e,eraYear:r}=t;return e==="b"&&(e="gregory-inverse"),e==="a"&&(e="gregory"),{era:e,eraYear:r}}getFirstDayOfWeek(){return 1}getMinimalDaysInFirstWeek(){return 1}},Ns=class extends Si{constructor(){super("japanese",[{code:"reiwa",isoEpoch:{year:2019,month:5,day:1},anchorEpoch:{year:2019,month:5,day:1}},{code:"heisei",isoEpoch:{year:1989,month:1,day:8},anchorEpoch:{year:1989,month:1,day:8}},{code:"showa",isoEpoch:{year:1926,month:12,day:25},anchorEpoch:{year:1926,month:12,day:25}},{code:"taisho",isoEpoch:{year:1912,month:7,day:30},anchorEpoch:{year:1912,month:7,day:30}},{code:"meiji",isoEpoch:{year:1868,month:9,day:8},anchorEpoch:{year:1868,month:9,day:8}},{code:"japanese",names:["japanese","gregory","ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"japanese-inverse",names:["japanese-inverse","gregory-inverse","bc","bce"],reverseOf:"japanese"}]),this.erasBeginMidYear=!0}reviseIntlEra(t,e){let{era:r,eraYear:i}=t,{year:o}=e;return this.eras.find(a=>a.code===r)?{era:r,eraYear:i}:o<1?{era:"japanese-inverse",eraYear:1-o}:{era:"japanese",eraYear:o}}},Ao=class extends kn{constructor(){super(...arguments),this.calendarType="lunisolar"}inLeapYear(t,e){let r=this.getMonthList(t.year,e);return Object.entries(r).length===13}monthsInYear(t,e){return this.inLeapYear(t,e)?13:12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(t){return["M01L","M09L","M10L","M11L","M12L"].includes(t)?29:30}monthDaySearchStartYear(t,e){let r={M01L:[1651,1651],M02L:[1947,1765],M03L:[1966,1955],M04L:[1963,1944],M05L:[1971,1952],M06L:[1960,1941],M07L:[1968,1938],M08L:[1957,1718],M09L:[1832,1832],M10L:[1870,1870],M11L:[1814,1814],M12L:[1890,1890]}[t]??[1972,1972];return e<30?r[0]:r[1]}getMonthList(t,e){if(t===void 0)throw new TypeError("Missing year");let r=JSON.stringify({func:"getMonthList",calendarYear:t,id:this.id}),i=e.get(r);if(i)return i;let o=this.getFormatter(),a=(L,B)=>{let K=_u({isoYear:L,isoMonth:2,isoDay:1}),W=new Date(K);W.setUTCDate(B+1);let Q=o.formatToParts(W),te=Q.find(ie=>ie.type==="month").value,oe=+Q.find(ie=>ie.type==="day").value,Me=Q.find(ie=>ie.type==="relatedYear"),Ee;if(Me===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);return Ee=+Me.value,{calendarMonthString:te,calendarDay:oe,calendarYearToVerify:Ee}},s=17,{calendarMonthString:l,calendarDay:u,calendarYearToVerify:h}=a(t,s);l!=="1"&&(s+=29,{calendarMonthString:l,calendarDay:u}=a(t,s)),s-=u-5;let p={},y,E,T=1,C=!1;do({calendarMonthString:l,calendarDay:u,calendarYearToVerify:h}=a(t,s)),y&&(p[E].daysInMonth=y+30-u),h!==t?C=!0:(p[l]={monthIndex:T++},s+=30),y=u,E=l;while(!C);return p[E].daysInMonth=y+30-u,e.set(r,p),p}estimateIsoDate(t){let{year:e,month:r}=t;return{year:e,month:r>=12?12:r+1,day:1}}adjustCalendarDate(t,e,r="constrain",i=!1){let{year:o,month:a,monthExtra:s,day:l,monthCode:u}=t;if(o===void 0)throw new TypeError("Missing property: year");if(i){if(s&&s!=="bis")throw new RangeError(`Unexpected leap month suffix: ${s}`);let h=sn(a,s!==void 0),p=`${a}${s||""}`,y=this.getMonthList(o,e)[p];if(y===void 0)throw new RangeError(`Unmatched month ${p} in Chinese year ${o}`);return a=y.monthIndex,{year:o,month:a,day:l,monthCode:h}}if(this.validateCalendarDate(t),a===void 0){let h=this.getMonthList(o,e),p=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");p[0]==="0"&&(p=p.slice(1));let y=h[p];if(a=y&&y.monthIndex,a===void 0&&u.endsWith("L")&&u!="M13L"&&r==="constrain"){let E=+u.replace(/^M0?|L$/g,"");y=h[E],y&&(a=y.monthIndex,u=sn(E))}if(a===void 0)throw new RangeError(`Unmatched month ${u} in Chinese year ${o}`)}else if(u===void 0){let h=this.getMonthList(o,e),p=Object.entries(h),y=p.length;r==="reject"?(Ve(a,1,y),Ve(l,1,this.maximumMonthLength())):(a=vt(a,1,y),l=vt(l,1,this.maximumMonthLength()));let E=p.find(T=>T[1].monthIndex===a);if(E===void 0)throw new RangeError(`Invalid month ${a} in Chinese year ${o}`);u=sn(+E[0].replace("bis",""),E[0].indexOf("bis")!==-1)}else{let h=this.getMonthList(o,e),p=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");p[0]==="0"&&(p=p.slice(1));let y=h[p];if(!y)throw new RangeError(`Unmatched monthCode ${u} in Chinese year ${o}`);if(a!==y.monthIndex)throw new RangeError(`monthCode ${u} doesn't correspond to month ${a} in Chinese year ${o}`)}return{...t,year:o,month:a,monthCode:u,day:l}}},Os=class extends Ao{constructor(){super(...arguments),this.id="chinese"}},Fs=class extends Ao{constructor(){super(...arguments),this.id="dangi"}},Hs=class{constructor(t){this.helper=t}extraFields(t){return this.helper.hasEra&&t.includes("year")?["era","eraYear"]:[]}resolveFields(t){if(this.helper.calendarType!=="lunisolar"){let e=new Ot;Zs(t,void 0,this.helper.monthsInYear({year:t.year??1972},e))}}dateToISO(t,e){let r=new Ot,i=this.helper.calendarToIsoDate(t,e,r);return r.setObject(i),i}monthDayToISOReferenceDate(t,e){let r=new Ot,i=this.helper.monthDayFromFields(t,e,r);return r.setObject(i),i}fieldKeysToIgnore(t){let e=new Set;for(let r=0;r<t.length;r++){let i=t[r];switch(e.add(i),i){case"era":e.add("eraYear"),e.add("year");break;case"eraYear":e.add("era"),e.add("year");break;case"year":e.add("era"),e.add("eraYear");break;case"month":e.add("monthCode"),this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"));break;case"monthCode":e.add("month"),this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"));break;case"day":this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"))}}return Du(e)}dateAdd(t,{years:e,months:r,weeks:i,days:o},a){let s=Ot.getCacheForObject(t),l=this.helper.isoToCalendarDate(t,s),u=this.helper.addCalendar(l,{years:e,months:r,weeks:i,days:o},a,s),h=this.helper.calendarToIsoDate(u,"constrain",s);return Ot.getCacheForObject(h)||new Ot(s).setObject(h),h}dateUntil(t,e,r){let i=Ot.getCacheForObject(t),o=Ot.getCacheForObject(e),a=this.helper.isoToCalendarDate(t,i),s=this.helper.isoToCalendarDate(e,o);return this.helper.untilCalendar(a,s,r,i)}isoToDate(t,e){let r=Ot.getCacheForObject(t),i=this.helper.isoToCalendarDate(t,r);if(e.dayOfWeek&&(i.dayOfWeek=Wi.iso8601.isoToDate(t,{dayOfWeek:!0}).dayOfWeek),e.dayOfYear){let o=this.helper.startOfCalendarYear(i),a=this.helper.calendarDaysUntil(o,i,r);i.dayOfYear=a+1}if(e.weekOfYear&&(i.weekOfYear=Eu(this.helper.id,t)),i.daysInWeek=7,e.daysInMonth&&(i.daysInMonth=this.helper.daysInMonth(i,r)),e.daysInYear){let o=this.helper.startOfCalendarYear(i),a=this.helper.addCalendar(o,{years:1},"constrain",r);i.daysInYear=this.helper.calendarDaysUntil(o,a,r)}return e.monthsInYear&&(i.monthsInYear=this.helper.monthsInYear(i,r)),e.inLeapYear&&(i.inLeapYear=this.helper.inLeapYear(i,r)),i}getFirstDayOfWeek(){return this.helper.getFirstDayOfWeek()}getMinimalDaysInFirstWeek(){return this.helper.getMinimalDaysInFirstWeek()}};for(let n of[ws,ks,xs,Is,Ps,Os,Fs,Rs,Ts,As,Ls,Ns,bs,Ds,Es,_s,Ms,Ss]){let t=new n;Wi[t.id]=new Hs(t)}is("calendarImpl",function(n){return Wi[n]});var ki=Intl.DateTimeFormat;function wr(n,t){let e=m(n,t);return typeof e=="function"&&(e=new ki(m(n,Hl),e(m(n,es))),function(r,i,o){let a=No(r);if(a===void 0)throw new TypeError("Missing slots for the given container");if(a[i]===void 0)throw new TypeError(`tried to reset ${i} which was not set`);a[i]=o}(n,t,e)),e}function ni(n){return Et(n,ur)}var lr=class{constructor(t=void 0,e=void 0){(function(r,i,o){let a=o!==void 0,s;if(a){let p=["localeMatcher","calendar","numberingSystem","hour12","hourCycle","timeZone","weekday","era","year","month","day","dayPeriod","hour","minute","second","fractionalSecondDigits","timeZoneName","formatMatcher","dateStyle","timeStyle"];s=function(E){if(E==null)throw new TypeError(`Expected object not ${E}`);return Object(E)}(o);let y=Object.create(null);for(let E=0;E<p.length;E++){let T=p[E];Object.prototype.hasOwnProperty.call(s,T)&&(y[T]=s[T])}s=y}else s=Object.create(null);let l=new ki(i,s),u=l.resolvedOptions();if(Tn(r),a){let p=Object.assign(Object.create(null),u);for(let y in p)Object.prototype.hasOwnProperty.call(s,y)||delete p[y];p.hour12=s.hour12,p.hourCycle=s.hourCycle,me(r,es,p)}else me(r,es,s);me(r,Hl,u.locale),me(r,ur,l),me(r,Er,u.timeZone),me(r,ii,u.calendar),me(r,Rl,nm),me(r,Al,em),me(r,Ll,tm),me(r,Nl,Qh),me(r,Ol,rm),me(r,Fl,im);let h=a?s.timeZone:void 0;if(h===void 0)me(r,Qa,u.timeZone);else{let p=Yo(h);if(p.startsWith("\u2212"))throw new RangeError("Unicode minus (U+2212) is not supported in time zone offsets");me(r,Qa,bt(p))}})(this,t,e)}get format(){P(this,ni);let t=Zh.bind(this);return Object.defineProperties(t,{length:{value:1,enumerable:!1,writable:!1,configurable:!0},name:{value:"",enumerable:!1,writable:!1,configurable:!0}}),t}formatRange(t,e){return P(this,ni),Jh.call(this,t,e)}formatToParts(t,...e){return P(this,ni),Gh.call(this,t,...e)}formatRangeToParts(t,e){return P(this,ni),Xh.call(this,t,e)}resolvedOptions(){return P(this,ni),Kh.call(this)}};"formatToParts"in ki.prototype||delete lr.prototype.formatToParts,"formatRangeToParts"in ki.prototype||delete lr.prototype.formatRangeToParts;var Yt=function(n=void 0,t=void 0){return new lr(n,t)};function Kh(){let n=m(this,ur).resolvedOptions();return n.timeZone=m(this,Qa),n}function Zh(n,...t){let e,r,i=Lr(n,this);return i.formatter?(e=i.formatter,r=[Kt(i.epochNs,"floor")]):(e=m(this,ur),r=[n,...t]),e.format(...r)}function Gh(n,...t){let e,r,i=Lr(n,this);return i.formatter?(e=i.formatter,r=[Kt(i.epochNs,"floor")]):(e=m(this,ur),r=[n,...t]),e.formatToParts(...r)}function Jh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Lo(n),r=Lo(t),i,o=[e,r];if(Mn(e)!==Mn(r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");if(Mn(e)){if(!Mu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");let{epochNs:a,formatter:s}=Lr(e,this),{epochNs:l,formatter:u}=Lr(r,this);s&&(i=s,o=[Kt(a,"floor"),Kt(l,"floor")])}return i||(i=m(this,ur)),i.formatRange(...o)}function Xh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Lo(n),r=Lo(t),i,o=[e,r];if(Mn(e)!==Mn(r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");if(Mn(e)){if(!Mu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");let{epochNs:a,formatter:s}=Lr(e,this),{epochNs:l,formatter:u}=Lr(r,this);s&&(i=s,o=[Kt(a,"floor"),Kt(l,"floor")])}return i||(i=m(this,ur)),i.formatRangeToParts(...o)}function Ki(n={},t={}){let e=Object.assign({},n),r=["year","month","day","hour","minute","second","weekday","dayPeriod","timeZoneName","dateStyle","timeStyle"];for(let i=0;i<r.length;i++){let o=r[i];e[o]=o in t?t[o]:e[o],e[o]!==!1&&e[o]!==void 0||delete e[o]}return e}function Qh(n){let t=Ki(n,{year:!1,month:!1,day:!1,weekday:!1,timeZoneName:!1,dateStyle:!1});if(t.timeStyle!=="long"&&t.timeStyle!=="full"||(delete t.timeStyle,Object.assign(t,{hour:"numeric",minute:"2-digit",second:"2-digit"})),!Ko(t)){if(Zi(n))throw new TypeError(`cannot format Temporal.PlainTime with options [${Object.keys(n)}]`);Object.assign(t,{hour:"numeric",minute:"numeric",second:"numeric"})}return t}function em(n){let t={short:{year:"2-digit",month:"numeric"},medium:{year:"numeric",month:"short"},long:{year:"numeric",month:"long"},full:{year:"numeric",month:"long"}},e=Ki(n,{day:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in e&&e.dateStyle){let r=e.dateStyle;delete e.dateStyle,Object.assign(e,t[r])}if(!("year"in e||"month"in e||"era"in e)){if(Zi(n))throw new TypeError(`cannot format PlainYearMonth with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric"})}return e}function tm(n){let t={short:{month:"numeric",day:"numeric"},medium:{month:"short",day:"numeric"},long:{month:"long",day:"numeric"},full:{month:"long",day:"numeric"}},e=Ki(n,{year:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in e&&e.dateStyle){let r=e.dateStyle;delete e.dateStyle,Object.assign(e,t[r])}if(!("month"in e)&&!("day"in e)){if(Zi(n))throw new TypeError(`cannot format PlainMonthDay with options [${Object.keys(n)}]`);Object.assign(e,{month:"numeric",day:"numeric"})}return e}function nm(n){let t=Ki(n,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!Wo(t)){if(Zi(n))throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric"})}return t}function rm(n){let t=Ki(n,{timeZoneName:!1});if((t.timeStyle==="long"||t.timeStyle==="full")&&(delete t.timeStyle,Object.assign(t,{hour:"numeric",minute:"2-digit",second:"2-digit"}),t.dateStyle)&&(Object.assign(t,{short:{year:"numeric",month:"numeric",day:"numeric"},medium:{year:"numeric",month:"short",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{year:"numeric",month:"long",day:"numeric",weekday:"long"}}[t.dateStyle]),delete t.dateStyle),!Ko(t)&&!Wo(t)){if(Zi(n))throw new TypeError(`cannot format PlainDateTime with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}return t}function im(n){let t=n;return Ko(t)||Wo(t)||(t=Object.assign({},t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),t}function Wo(n){return"year"in n||"month"in n||"day"in n||"weekday"in n||"dateStyle"in n||"era"in n}function Ko(n){return"hour"in n||"minute"in n||"second"in n||"timeStyle"in n||"dayPeriod"in n||"fractionalSecondDigits"in n}function Zi(n){return Wo(n)||Ko(n)||"dateStyle"in n||"timeStyle"in n||"timeZoneName"in n}function Mn(n){return Oe(n)||Ye(n)||Te(n)||pe(n)||Ke(n)||Ft(n)||We(n)}function Lo(n){return Mn(n)?n:Ho(n)}function Mu(n,t){return!(!Mn(n)||!Mn(t)||Ye(n)&&!Ye(t)||Oe(n)&&!Oe(t)||Te(n)&&!Te(t)||pe(n)&&!pe(t)||Ke(n)&&!Ke(t)||Ft(n)&&!Ft(t)||We(n)&&!We(t))}function Lr(n,t){if(Ye(n)){let e={isoDate:{year:1970,month:1,day:1},time:m(n,Fe)};return{epochNs:tt(m(t,Er),e,"compatible"),formatter:wr(t,Nl)}}if(Ke(n)){let e=m(n,$),r=m(t,ii);if(e!==r)throw new RangeError(`cannot format PlainYearMonth with calendar ${e} in locale with calendar ${r}`);let i=we(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Al)}}if(Ft(n)){let e=m(n,$),r=m(t,ii);if(e!==r)throw new RangeError(`cannot format PlainMonthDay with calendar ${e} in locale with calendar ${r}`);let i=we(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Ll)}}if(Oe(n)){let e=m(n,$),r=m(t,ii);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDate with calendar ${e} in locale with calendar ${r}`);let i=we(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Rl)}}if(Te(n)){let e=m(n,$),r=m(t,ii);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDateTime with calendar ${e} in locale with calendar ${r}`);let i=m(n,xe);return{epochNs:tt(m(t,Er),i,"compatible"),formatter:wr(t,Ol)}}if(pe(n))throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");return We(n)?{epochNs:m(n,se),formatter:wr(t,Fl)}:{}}function Su(n){let t=Object.create(null);return t.years=m(n,ut),t.months=m(n,dt),t.weeks=m(n,St),t.days=m(n,ht),t.hours=m(n,mt),t.minutes=m(n,pt),t.seconds=m(n,ft),t.milliseconds=m(n,gt),t.microseconds=m(n,yt),t.nanoseconds=m(n,kt),t}lr.prototype.constructor=Yt,Object.defineProperty(Yt,"prototype",{value:lr.prototype,writable:!1,enumerable:!1,configurable:!1}),Yt.supportedLocalesOf=ki.supportedLocalesOf,Cn(Yt,"Intl.DateTimeFormat");var{format:om,formatToParts:am}=Intl.DurationFormat?.prototype??Object.create(null);function Js(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=Su(qt(n));return om.call(this,t)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=Js,Intl.DurationFormat.prototype.formatToParts=function(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=Su(qt(n));return am.call(this,t)});var gp=Object.freeze({__proto__:null,DateTimeFormat:Yt,ModifiedIntlDurationFormatPrototypeFormat:Js}),Ti=class{constructor(t){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");ru(this,Io(t))}get epochMilliseconds(){return P(this,We),Kt(m(this,se),"floor")}get epochNanoseconds(){return P(this,We),wu(S.default.BigInt(m(this,se)))}add(t){return P(this,We),wl("add",this,t)}subtract(t){return P(this,We),wl("subtract",this,t)}until(t,e=void 0){return P(this,We),hl("until",this,t,e)}since(t,e=void 0){return P(this,We),hl("since",this,t,e)}round(t){if(P(this,We),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn);return Fr(r,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[o],!0),Jt(ps(m(this,se),r,o,i))}equals(t){P(this,We);let e=si(t),r=m(this,se),i=m(e,se);return S.default.equal(S.default.BigInt(r),S.default.BigInt(i))}toString(t=void 0){P(this,We);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let a=e.timeZone;a!==void 0&&(a=bt(a));let{precision:s,unit:l,increment:u}=$i(o,r);return rl(Jt(ps(m(this,se),u,l,i)),a,s)}toJSON(){return P(this,We),rl(this,void 0,"auto")}toLocaleString(t=void 0,e=void 0){return P(this,We),new Yt(t,e).format(this)}valueOf(){Un("Instant")}toZonedDateTimeISO(t){P(this,We);let e=bt(t);return Qe(m(this,se),e,"iso8601")}static fromEpochMilliseconds(t){return Jt(Xt(Ho(t)))}static fromEpochNanoseconds(t){return Jt(Io(t))}static from(t){return si(t)}static compare(t,e){let r=si(t),i=si(e),o=m(r,se),a=m(i,se);return S.default.lessThan(o,a)?-1:S.default.greaterThan(o,a)?1:0}};Cn(Ti,"Temporal.Instant");var Ci=class{constructor(t,e,r,i="iso8601"){let o=ue(t),a=ue(e),s=ue(r),l=_t(i===void 0?"iso8601":Be(i));ir(o,a,s),Xl(this,{year:o,month:a,day:s},l)}get calendarId(){return P(this,Oe),m(this,$)}get era(){return st(this,"era")}get eraYear(){return st(this,"eraYear")}get year(){return st(this,"year")}get month(){return st(this,"month")}get monthCode(){return st(this,"monthCode")}get day(){return st(this,"day")}get dayOfWeek(){return st(this,"dayOfWeek")}get dayOfYear(){return st(this,"dayOfYear")}get weekOfYear(){return st(this,"weekOfYear")?.week}get yearOfWeek(){return st(this,"weekOfYear")?.year}get daysInWeek(){return st(this,"daysInWeek")}get daysInMonth(){return st(this,"daysInMonth")}get daysInYear(){return st(this,"daysInYear")}get monthsInYear(){return st(this,"monthsInYear")}get inLeapYear(){return st(this,"inLeapYear")}with(t,e=void 0){if(P(this,Oe),!He(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=Dt(r,m(this,ce));return i=rr(r,i,zt(r,t,["year","month","monthCode","day"],[],"partial")),wt(jn(r,i,ye(X(e))),r)}withCalendar(t){P(this,Oe);let e=Ui(t);return wt(m(this,ce),e)}add(t,e=void 0){return P(this,Oe),bl("add",this,t,e)}subtract(t,e=void 0){return P(this,Oe),bl("subtract",this,t,e)}until(t,e=void 0){return P(this,Oe),ml("until",this,t,e)}since(t,e=void 0){return P(this,Oe),ml("since",this,t,e)}equals(t){P(this,Oe);let e=oi(t);return un(m(this,ce),m(e,ce))===0&&cn(m(this,$),m(e,$))}toString(t=void 0){return P(this,Oe),il(this,Hi(X(t)))}toJSON(){return P(this,Oe),il(this)}toLocaleString(t=void 0,e=void 0){return P(this,Oe),new Yt(t,e).format(this)}valueOf(){Un("PlainDate")}toPlainDateTime(t=void 0){P(this,Oe);let e=Jl(t);return Ut(we(m(this,ce),e),m(this,$))}toZonedDateTime(t){let e,r;if(P(this,Oe),He(t)){let a=t.timeZone;a===void 0?e=bt(t):(e=bt(a),r=t.plainTime)}else e=bt(t);let i=m(this,ce),o;return r===void 0?o=Ln(e,i):(r=On(r),o=tt(e,we(i,m(r,Fe)),"compatible")),Qe(o,e,m(this,$))}toPlainYearMonth(){P(this,Oe);let t=m(this,$);return kr(bi(t,Dt(t,m(this,ce)),"constrain"),t)}toPlainMonthDay(){P(this,Oe);let t=m(this,$);return Sr(Mo(t,Dt(t,m(this,ce)),"constrain"),t)}static from(t,e=void 0){return oi(t,e)}static compare(t,e){let r=oi(t),i=oi(e);return un(m(r,ce),m(i,ce))}};function st(n,t){P(n,Oe);let e=m(n,ce);return ji(n).isoToDate(e,{[t]:!0})[t]}Cn(Ci,"Temporal.PlainDate");var Ii=class{constructor(t,e,r,i=0,o=0,a=0,s=0,l=0,u=0,h="iso8601"){let p=ue(t),y=ue(e),E=ue(r),T=i===void 0?0:ue(i),C=o===void 0?0:ue(o),L=a===void 0?0:ue(a),B=s===void 0?0:ue(s),K=l===void 0?0:ue(l),W=u===void 0?0:ue(u),Q=_t(h===void 0?"iso8601":Be(h));Vs(p,y,E,T,C,L,B,K,W),Ql(this,{isoDate:{year:p,month:y,day:E},time:{hour:T,minute:C,second:L,millisecond:B,microsecond:K,nanosecond:W}},Q)}get calendarId(){return P(this,Te),m(this,$)}get year(){return ct(this,"year")}get month(){return ct(this,"month")}get monthCode(){return ct(this,"monthCode")}get day(){return ct(this,"day")}get hour(){return br(this,"hour")}get minute(){return br(this,"minute")}get second(){return br(this,"second")}get millisecond(){return br(this,"millisecond")}get microsecond(){return br(this,"microsecond")}get nanosecond(){return br(this,"nanosecond")}get era(){return ct(this,"era")}get eraYear(){return ct(this,"eraYear")}get dayOfWeek(){return ct(this,"dayOfWeek")}get dayOfYear(){return ct(this,"dayOfYear")}get weekOfYear(){return ct(this,"weekOfYear")?.week}get yearOfWeek(){return ct(this,"weekOfYear")?.year}get daysInWeek(){return ct(this,"daysInWeek")}get daysInYear(){return ct(this,"daysInYear")}get daysInMonth(){return ct(this,"daysInMonth")}get monthsInYear(){return ct(this,"monthsInYear")}get inLeapYear(){return ct(this,"inLeapYear")}with(t,e=void 0){if(P(this,Te),!He(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=m(this,xe),o={...Dt(r,i.isoDate),...i.time};return o=rr(r,o,zt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],"partial")),Ut(zi(r,o,ye(X(e))),r)}withPlainTime(t=void 0){P(this,Te);let e=Jl(t);return Ut(we(m(this,xe).isoDate,e),m(this,$))}withCalendar(t){P(this,Te);let e=Ui(t);return Ut(m(this,xe),e)}add(t,e=void 0){return P(this,Te),Dl("add",this,t,e)}subtract(t,e=void 0){return P(this,Te),Dl("subtract",this,t,e)}until(t,e=void 0){return P(this,Te),pl("until",this,t,e)}since(t,e=void 0){return P(this,Te),pl("since",this,t,e)}round(t){if(P(this,Te),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];Fr(r,a,a===1);let s=m(this,xe);return Ut(r===1&&o==="nanosecond"?s:fs(s,r,o,i),m(this,$))}equals(t){P(this,Te);let e=ai(t);return Ar(m(this,xe),m(e,xe))===0&&cn(m(this,$),m(e,$))}toString(t=void 0){P(this,Te);let e=X(t),r=Hi(e),i=Yi(e),o=Qt(e,"trunc"),a=Ct(e,"smallestUnit","time",void 0);if(a==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let{precision:s,unit:l,increment:u}=$i(a,i),h=fs(m(this,xe),u,l,o);return or(h),Ei(h,m(this,$),s,r)}toJSON(){return P(this,Te),Ei(m(this,xe),m(this,$),"auto")}toLocaleString(t=void 0,e=void 0){return P(this,Te),new Yt(t,e).format(this)}valueOf(){Un("PlainDateTime")}toZonedDateTime(t,e=void 0){P(this,Te);let r=bt(t),i=fi(X(e));return Qe(tt(r,m(this,xe),i),r,m(this,$))}toPlainDate(){return P(this,Te),wt(m(this,xe).isoDate,m(this,$))}toPlainTime(){return P(this,Te),wn(m(this,xe).time)}static from(t,e=void 0){return ai(t,e)}static compare(t,e){let r=ai(t),i=ai(e);return Ar(m(r,xe),m(i,xe))}};function ct(n,t){P(n,Te);let e=m(n,xe).isoDate;return ji(n).isoToDate(e,{[t]:!0})[t]}function br(n,t){return P(n,Te),m(n,xe).time[t]}Cn(Ii,"Temporal.PlainDateTime");var Pi=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0,s=0,l=0,u=0,h=0){let p=t===void 0?0:Gt(t),y=e===void 0?0:Gt(e),E=r===void 0?0:Gt(r),T=i===void 0?0:Gt(i),C=o===void 0?0:Gt(o),L=a===void 0?0:Gt(a),B=s===void 0?0:Gt(s),K=l===void 0?0:Gt(l),W=u===void 0?0:Gt(u),Q=h===void 0?0:Gt(h);Vo(p,y,E,T,C,L,B,K,W,Q),Tn(this),me(this,ut,p),me(this,dt,y),me(this,St,E),me(this,ht,T),me(this,mt,C),me(this,pt,L),me(this,ft,B),me(this,gt,K),me(this,yt,W),me(this,kt,Q)}get years(){return P(this,Ne),m(this,ut)}get months(){return P(this,Ne),m(this,dt)}get weeks(){return P(this,Ne),m(this,St)}get days(){return P(this,Ne),m(this,ht)}get hours(){return P(this,Ne),m(this,mt)}get minutes(){return P(this,Ne),m(this,pt)}get seconds(){return P(this,Ne),m(this,ft)}get milliseconds(){return P(this,Ne),m(this,gt)}get microseconds(){return P(this,Ne),m(this,yt)}get nanoseconds(){return P(this,Ne),m(this,kt)}get sign(){return P(this,Ne),To(this)}get blank(){return P(this,Ne),To(this)===0}with(t){P(this,Ne);let e=Gl(t),{years:r=m(this,ut),months:i=m(this,dt),weeks:o=m(this,St),days:a=m(this,ht),hours:s=m(this,mt),minutes:l=m(this,pt),seconds:u=m(this,ft),milliseconds:h=m(this,gt),microseconds:p=m(this,yt),nanoseconds:y=m(this,kt)}=e;return new n(r,i,o,a,s,l,u,h,p,y)}negated(){return P(this,Ne),Pt(this)}abs(){return P(this,Ne),new n(Math.abs(m(this,ut)),Math.abs(m(this,dt)),Math.abs(m(this,St)),Math.abs(m(this,ht)),Math.abs(m(this,mt)),Math.abs(m(this,pt)),Math.abs(m(this,ft)),Math.abs(m(this,gt)),Math.abs(m(this,yt)),Math.abs(m(this,kt)))}add(t){return P(this,Ne),vl("add",this,t)}subtract(t){return P(this,Ne),vl("subtract",this,t)}round(t){if(P(this,Ne),t===void 0)throw new TypeError("options parameter is required");let e=yn(this),r=typeof t=="string"?sr("smallestUnit",t):X(t),i=Ct(r,"largestUnit","datetime",void 0,["auto"]),{plainRelativeTo:o,zonedRelativeTo:a}=Ga(r),s=Or(r),l=Qt(r,"halfExpand"),u=Ct(r,"smallestUnit","datetime",void 0),h=!0;u||(h=!1,u="nanosecond");let p=Dn(e,u),y=!0;if(i||(y=!1,i=p),i==="auto"&&(i=p),!h&&!y)throw new RangeError("at least one of smallestUnit or largestUnit is required");if(Dn(i,u)!==i)throw new RangeError(`largestUnit ${i} cannot be smaller than smallestUnit ${u}`);let E={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[u];if(E!==void 0&&Fr(s,E,!1),s>1&&vn(u)==="date"&&i!==u)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");if(a){let C=_r(this),L=m(a,De),B=m(a,$),K=m(a,se);return C=vu(K,ui(K,L,B,C),L,B,i,s,u,l),vn(i)==="date"&&(i="hour"),Vt(C,i)}if(o){let C=an(this),L=Rr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},C.time),B=m(o,ce),K=m(o,$),W=$t(K,B,et(C.date,L.deltaDays),"constrain");return C=yu(we(B,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(W,L),K,i,s,u,l),Vt(C,i)}if(rn(e))throw new RangeError(`a starting point is required for ${e}s balancing`);if(rn(i))throw new RangeError(`a starting point is required for ${i}s balancing`);let T=an(this);if(u==="day"){let{quotient:C,remainder:L}=T.time.divmod(Do),B=T.date.days+C+gi(L,"day");B=Fn(B,s,l),T=En({years:0,months:0,weeks:0,days:B},_e.ZERO)}else T=En({years:0,months:0,weeks:0,days:0},Co(T.time,s,u,l));return Vt(T,i)}total(t){if(P(this,Ne),t===void 0)throw new TypeError("options argument is required");let e=typeof t=="string"?sr("unit",t):X(t),{plainRelativeTo:r,zonedRelativeTo:i}=Ga(e),o=Ct(e,"unit","datetime",Sn);if(i){let s=_r(this),l=m(i,De),u=m(i,$),h=m(i,se);return function(p,y,E,T,C){return vn(C)==="time"?gi(_e.fromEpochNsDiff(y,p),C):dl(fu(p,y,E,T,C),y,Wt(E,p),E,T,C)}(h,ui(h,l,u,s),l,u,o)}if(r){let s=an(this),l=Rr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},s.time),u=m(r,ce),h=m(r,$),p=$t(h,u,et(s.date,l.deltaDays),"constrain");return function(y,E,T,C){if(Ar(y,E)==0)return 0;or(y),or(E);let L=pu(y,E,T,C);return C==="nanosecond"?S.default.toNumber(L.time.totalNs):dl(L,Ze(E),y,null,T,C)}(we(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(p,l),h,o)}let a=yn(this);if(rn(a))throw new RangeError(`a starting point is required for ${a}s total`);if(rn(o))throw new RangeError(`a starting point is required for ${o}s total`);return gi(an(this).time,o)}toString(t=void 0){P(this,Ne);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour"||o==="minute")throw new RangeError('smallestUnit must be a time unit other than "hours" or "minutes"');let{precision:a,unit:s,increment:l}=$i(o,r);if(s==="nanosecond"&&l===1)return yo(this,a);let u=yn(this),h=_r(this),p=Co(h.time,l,s,i);return h=En(h.date,p),yo(Vt(h,Dn(u,"second")),a)}toJSON(){return P(this,Ne),yo(this,"auto")}toLocaleString(t=void 0,e=void 0){if(P(this,Ne),typeof Intl.DurationFormat=="function"){let r=new Intl.DurationFormat(t,e);return Js.call(r,this)}return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."),yo(this,"auto")}valueOf(){Un("Duration")}static from(t){return qt(t)}static compare(t,e,r=void 0){let i=qt(t),o=qt(e),a=X(r),{plainRelativeTo:s,zonedRelativeTo:l}=Ga(a);if(m(i,ut)===m(o,ut)&&m(i,dt)===m(o,dt)&&m(i,St)===m(o,St)&&m(i,ht)===m(o,ht)&&m(i,mt)===m(o,mt)&&m(i,pt)===m(o,pt)&&m(i,ft)===m(o,ft)&&m(i,gt)===m(o,gt)&&m(i,yt)===m(o,yt)&&m(i,kt)===m(o,kt))return 0;let u=yn(i),h=yn(o),p=_r(i),y=_r(o);if(l&&(vn(u)==="date"||vn(h)==="date")){let B=m(l,De),K=m(l,$),W=m(l,se),Q=ui(W,B,K,p),te=ui(W,B,K,y);return Tt(S.default.toNumber(S.default.subtract(Q,te)))}let E=p.date.days,T=y.date.days;if(rn(u)||rn(h)){if(!s)throw new RangeError("A starting point is required for years, months, or weeks comparison");E=ul(p.date,s),T=ul(y.date,s)}let C=p.time.add24HourDays(E),L=y.time.add24HourDays(T);return C.cmp(L)}};Cn(Pi,"Temporal.Duration");var xi=class{constructor(t,e,r="iso8601",i=1972){let o=ue(t),a=ue(e),s=_t(r===void 0?"iso8601":Be(r)),l=ue(i);ir(l,o,a),eu(this,{year:l,month:o,day:a},s)}get monthCode(){return kl(this,"monthCode")}get day(){return kl(this,"day")}get calendarId(){return P(this,Ft),m(this,$)}with(t,e=void 0){if(P(this,Ft),!He(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=Dt(r,m(this,ce),"month-day");return i=rr(r,i,zt(r,t,["year","month","monthCode","day"],[],"partial")),Sr(Mo(r,i,ye(X(e))),r)}equals(t){P(this,Ft);let e=tl(t);return un(m(this,ce),m(e,ce))===0&&cn(m(this,$),m(e,$))}toString(t=void 0){return P(this,Ft),al(this,Hi(X(t)))}toJSON(){return P(this,Ft),al(this)}toLocaleString(t=void 0,e=void 0){return P(this,Ft),new Yt(t,e).format(this)}valueOf(){Un("PlainMonthDay")}toPlainDate(t){if(P(this,Ft),!He(t))throw new TypeError("argument should be an object");let e=m(this,$);return wt(jn(e,rr(e,Dt(e,m(this,ce),"month-day"),zt(e,t,["year"],[],[])),"constrain"),e)}static from(t,e=void 0){return tl(t,e)}};function kl(n,t){P(n,Ft);let e=m(n,ce);return ji(n).isoToDate(e,{[t]:!0})[t]}function Xa(n){return Wt(n,vs())}Cn(xi,"Temporal.PlainMonthDay");var ku={instant:()=>Jt(vs()),plainDateTimeISO:(n=ti())=>Ut(Xa(bt(n)),"iso8601"),plainDateISO:(n=ti())=>wt(Xa(bt(n)).isoDate,"iso8601"),plainTimeISO:(n=ti())=>wn(Xa(bt(n)).time),timeZoneId:()=>ti(),zonedDateTimeISO:(n=ti())=>{let t=bt(n);return Qe(vs(),t,"iso8601")},[Symbol.toStringTag]:"Temporal.Now"};Object.defineProperty(ku,Symbol.toStringTag,{value:"Temporal.Now",writable:!1,enumerable:!1,configurable:!0});var Ri=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0){let s=t===void 0?0:ue(t),l=e===void 0?0:ue(e),u=r===void 0?0:ue(r),h=i===void 0?0:ue(i),p=o===void 0?0:ue(o),y=a===void 0?0:ue(a);Uo(s,l,u,h,p,y),tu(this,{hour:s,minute:l,second:u,millisecond:h,microsecond:p,nanosecond:y})}get hour(){return P(this,Ye),m(this,Fe).hour}get minute(){return P(this,Ye),m(this,Fe).minute}get second(){return P(this,Ye),m(this,Fe).second}get millisecond(){return P(this,Ye),m(this,Fe).millisecond}get microsecond(){return P(this,Ye),m(this,Fe).microsecond}get nanosecond(){return P(this,Ye),m(this,Fe).nanosecond}with(t,e=void 0){if(P(this,Ye),!He(t))throw new TypeError("invalid argument");Nr(t);let r=cs(t,"partial"),i=cs(this),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:h}=Object.assign(i,r),p=ye(X(e));return{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:h}=jo(o,a,s,l,u,h,p),new n(o,a,s,l,u,h)}add(t){return P(this,Ye),El("add",this,t)}subtract(t){return P(this,Ye),El("subtract",this,t)}until(t,e=void 0){return P(this,Ye),fl("until",this,t,e)}since(t,e=void 0){return P(this,Ye),fl("since",this,t,e)}round(t){if(P(this,Ye),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn);return Fr(r,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o],!1),wn(gs(m(this,Fe),r,o,i))}equals(t){P(this,Ye);let e=On(t);return ys(m(this,Fe),m(e,Fe))===0}toString(t=void 0){P(this,Ye);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let{precision:a,unit:s,increment:l}=$i(o,r);return ol(gs(m(this,Fe),l,s,i),a)}toJSON(){return P(this,Ye),ol(m(this,Fe),"auto")}toLocaleString(t=void 0,e=void 0){return P(this,Ye),new Yt(t,e).format(this)}valueOf(){Un("PlainTime")}static from(t,e=void 0){return On(t,e)}static compare(t,e){let r=On(t),i=On(e);return ys(m(r,Fe),m(i,Fe))}};Cn(Ri,"Temporal.PlainTime");var Ai=class{constructor(t,e,r="iso8601",i=1){let o=ue(t),a=ue(e),s=_t(r===void 0?"iso8601":Be(r)),l=ue(i);ir(o,a,l),nu(this,{year:o,month:a,day:l},s)}get year(){return fn(this,"year")}get month(){return fn(this,"month")}get monthCode(){return fn(this,"monthCode")}get calendarId(){return P(this,Ke),m(this,$)}get era(){return fn(this,"era")}get eraYear(){return fn(this,"eraYear")}get daysInMonth(){return fn(this,"daysInMonth")}get daysInYear(){return fn(this,"daysInYear")}get monthsInYear(){return fn(this,"monthsInYear")}get inLeapYear(){return fn(this,"inLeapYear")}with(t,e=void 0){if(P(this,Ke),!He(t))throw new TypeError("invalid argument");Nr(t);let r=m(this,$),i=Dt(r,m(this,ce),"year-month");return i=rr(r,i,zt(r,t,["year","month","monthCode"],[],"partial")),kr(bi(r,i,ye(X(e))),r)}add(t,e=void 0){return P(this,Ke),_l("add",this,t,e)}subtract(t,e=void 0){return P(this,Ke),_l("subtract",this,t,e)}until(t,e=void 0){return P(this,Ke),gl("until",this,t,e)}since(t,e=void 0){return P(this,Ke),gl("since",this,t,e)}equals(t){P(this,Ke);let e=ci(t);return un(m(this,ce),m(e,ce))===0&&cn(m(this,$),m(e,$))}toString(t=void 0){return P(this,Ke),sl(this,Hi(X(t)))}toJSON(){return P(this,Ke),sl(this)}toLocaleString(t=void 0,e=void 0){return P(this,Ke),new Yt(t,e).format(this)}valueOf(){Un("PlainYearMonth")}toPlainDate(t){if(P(this,Ke),!He(t))throw new TypeError("argument should be an object");let e=m(this,$);return wt(jn(e,rr(e,Dt(e,m(this,ce),"year-month"),zt(e,t,["day"],[],[])),"constrain"),e)}static from(t,e=void 0){return ci(t,e)}static compare(t,e){let r=ci(t),i=ci(e);return un(m(r,ce),m(i,ce))}};function fn(n,t){P(n,Ke);let e=m(n,ce);return ji(n).isoToDate(e,{[t]:!0})[t]}Cn(Ai,"Temporal.PlainYearMonth");var sm=Yt.prototype.resolvedOptions,Li=class{constructor(t,e,r="iso8601"){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");let i=Io(t),o=Be(e),{tzName:a,offsetMinutes:s}=Hn(o);if(s===void 0){let l=So(a);if(!l)throw new RangeError(`unknown time zone ${a}`);o=l.identifier}else o=zs(s);iu(this,i,o,_t(r===void 0?"iso8601":Be(r)))}get calendarId(){return P(this,pe),m(this,$)}get timeZoneId(){return P(this,pe),m(this,De)}get year(){return lt(this,"year")}get month(){return lt(this,"month")}get monthCode(){return lt(this,"monthCode")}get day(){return lt(this,"day")}get hour(){return Dr(this,"hour")}get minute(){return Dr(this,"minute")}get second(){return Dr(this,"second")}get millisecond(){return Dr(this,"millisecond")}get microsecond(){return Dr(this,"microsecond")}get nanosecond(){return Dr(this,"nanosecond")}get era(){return lt(this,"era")}get eraYear(){return lt(this,"eraYear")}get epochMilliseconds(){return P(this,pe),Kt(m(this,se),"floor")}get epochNanoseconds(){return P(this,pe),wu(m(this,se))}get dayOfWeek(){return lt(this,"dayOfWeek")}get dayOfYear(){return lt(this,"dayOfYear")}get weekOfYear(){return lt(this,"weekOfYear")?.week}get yearOfWeek(){return lt(this,"weekOfYear")?.year}get hoursInDay(){P(this,pe);let t=m(this,De),e=nn(this).isoDate,r=It(e.year,e.month,e.day+1),i=Ln(t,e),o=Ln(t,r);return gi(_e.fromEpochNsDiff(o,i),"hour")}get daysInWeek(){return lt(this,"daysInWeek")}get daysInMonth(){return lt(this,"daysInMonth")}get daysInYear(){return lt(this,"daysInYear")}get monthsInYear(){return lt(this,"monthsInYear")}get inLeapYear(){return lt(this,"inLeapYear")}get offset(){return P(this,pe),ls(bn(m(this,De),m(this,se)))}get offsetNanoseconds(){return P(this,pe),bn(m(this,De),m(this,se))}with(t,e=void 0){if(P(this,pe),!He(t))throw new TypeError("invalid zoned-date-time-like");Nr(t);let r=m(this,$),i=m(this,De),o=bn(i,m(this,se)),a=nn(this),s={...Dt(r,a.isoDate),...a.time,offset:ls(o)};s=rr(r,s,zt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset"],"partial"));let l=X(e),u=fi(l),h=vo(l,"prefer"),p=zi(r,s,ye(l)),y=Hr(s.offset);return Qe(_o(p.isoDate,p.time,"option",y,i,u,h,!1),i,r)}withPlainTime(t=void 0){P(this,pe);let e=m(this,De),r=m(this,$),i=nn(this).isoDate,o;return o=t===void 0?Ln(e,i):tt(e,we(i,m(On(t),Fe)),"compatible"),Qe(o,e,r)}withTimeZone(t){P(this,pe);let e=bt(t);return Qe(m(this,se),e,m(this,$))}withCalendar(t){P(this,pe);let e=Ui(t);return Qe(m(this,se),m(this,De),e)}add(t,e=void 0){return P(this,pe),Ml("add",this,t,e)}subtract(t,e=void 0){return P(this,pe),Ml("subtract",this,t,e)}until(t,e=void 0){return P(this,pe),yl("until",this,t,e)}since(t,e=void 0){return P(this,pe),yl("since",this,t,e)}round(t){if(P(this,pe),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?sr("smallestUnit",t):X(t),r=Or(e),i=Qt(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];if(Fr(r,a,a===1),o==="nanosecond"&&r===1)return Qe(m(this,se),m(this,De),m(this,$));let s=m(this,De),l=m(this,se),u=nn(this),h;if(o==="day"){let p=u.isoDate,y=It(p.year,p.month,p.day+1),E=Ln(s,p),T=Ln(s,y),C=S.default.subtract(T,E);h=_e.fromEpochNsDiff(l,E).round(C,i).addToEpochNs(E)}else{let p=fs(u,r,o,i),y=bn(s,l);h=_o(p.isoDate,p.time,"option",y,s,"compatible","prefer",!1)}return Qe(h,s,m(this,$))}equals(t){P(this,pe);let e=li(t),r=m(this,se),i=m(e,se);return!!S.default.equal(S.default.BigInt(r),S.default.BigInt(i))&&!!ou(m(this,De),m(e,De))&&cn(m(this,$),m(e,$))}toString(t=void 0){P(this,pe);let e=X(t),r=Hi(e),i=Yi(e),o=function(y){return _n(y,"offset",["auto","never"],"auto")}(e),a=Qt(e,"trunc"),s=Ct(e,"smallestUnit","time",void 0);if(s==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let l=function(y){return _n(y,"timeZoneName",["auto","never","critical"],"auto")}(e),{precision:u,unit:h,increment:p}=$i(s,i);return cl(this,u,r,l,o,{unit:h,increment:p,roundingMode:a})}toLocaleString(t=void 0,e=void 0){P(this,pe);let r=X(e),i=Object.create(null);if(function(l,u,h,p){if(u==null)return;let y=Reflect.ownKeys(u);for(let E=0;E<y.length;E++){let T=y[E];if(!h.some(C=>Object.is(C,T))&&Object.prototype.propertyIsEnumerable.call(u,T)){let C=u[T];l[T]=C}}}(i,r,["timeZone"]),r.timeZone!==void 0)throw new TypeError("ZonedDateTime toLocaleString does not accept a timeZone option");if(i.year===void 0&&i.month===void 0&&i.day===void 0&&i.era===void 0&&i.weekday===void 0&&i.dateStyle===void 0&&i.hour===void 0&&i.minute===void 0&&i.second===void 0&&i.fractionalSecondDigits===void 0&&i.timeStyle===void 0&&i.dayPeriod===void 0&&i.timeZoneName===void 0&&(i.timeZoneName="short"),i.timeZone=m(this,De),ll(i.timeZone))throw new RangeError("toLocaleString does not currently support offset time zones");let o=new Yt(t,i),a=sm.call(o).calendar,s=m(this,$);if(s!=="iso8601"&&a!=="iso8601"&&!cn(a,s))throw new RangeError(`cannot format ZonedDateTime with calendar ${s} in locale with calendar ${a}`);return o.format(Jt(m(this,se)))}toJSON(){return P(this,pe),cl(this,"auto")}valueOf(){Un("ZonedDateTime")}startOfDay(){P(this,pe);let t=m(this,De);return Qe(Ln(t,nn(this).isoDate),t,m(this,$))}getTimeZoneTransition(t){P(this,pe);let e=m(this,De);if(t===void 0)throw new TypeError("options parameter is required");let r=_n(typeof t=="string"?sr("direction",t):X(t),"direction",["next","previous"],Sn);if(r===void 0)throw new TypeError("direction option is required");if(ll(e)||e==="UTC")return null;let i=m(this,se),o=r==="next"?Us(e,i):ds(e,i);return o===null?null:Qe(o,e,m(this,$))}toInstant(){return P(this,pe),Jt(m(this,se))}toPlainDate(){return P(this,pe),wt(nn(this).isoDate,m(this,$))}toPlainTime(){return P(this,pe),wn(nn(this).time)}toPlainDateTime(){return P(this,pe),Ut(nn(this),m(this,$))}static from(t,e=void 0){return li(t,e)}static compare(t,e){let r=li(t),i=li(e),o=m(r,se),a=m(i,se);return S.default.lessThan(S.default.BigInt(o),S.default.BigInt(a))?-1:S.default.greaterThan(S.default.BigInt(o),S.default.BigInt(a))?1:0}};function nn(n){return Wt(m(n,De),m(n,se))}function lt(n,t){P(n,pe);let e=nn(n).isoDate;return ji(n).isoToDate(e,{[t]:!0})[t]}function Dr(n,t){return P(n,pe),nn(n).time[t]}Cn(Li,"Temporal.ZonedDateTime");var Re=Object.freeze({__proto__:null,Duration:Pi,Instant:Ti,Now:ku,PlainDate:Ci,PlainDateTime:Ii,PlainMonthDay:xi,PlainTime:Ri,PlainYearMonth:Ai,ZonedDateTime:Li}),yp=class{toTemporalInstant(){return Jt(Xt(Date.prototype.valueOf.call(this)))}}.prototype.toTemporalInstant,cm=[Ti,Ci,Ii,Pi,xi,Ri,Ai,Li];for(let n of cm){let t=Object.getOwnPropertyDescriptor(n,"prototype");(t.configurable||t.enumerable||t.writable)&&(t.configurable=!1,t.enumerable=!1,t.writable=!1,Object.defineProperty(n,"prototype",t))}var lm="https://yuna-backend.cbocher.workers.dev/mews",um="https://api.mews.com/api/distributor/v1",dm="Yuna",hm="mewscache",mm=!1,pm=13,fm=8,gm=Re.Duration.from({minutes:20}).milliseconds,ym=new Headers({Accept:"application/json, text/plain, */*","Content-Type":"application/json; charset=utf-8"}),Ae={base_url:lm,bookingEngine_url:um,bookingEngineClient:dm,bypassCache:mm,headers:ym,cache_key:hm,ttl:gm,beCheckInUTC:pm,beCheckOutUTC:fm};var Tu=(n,t,e)=>`${n}:${t}:${JSON.stringify(e)}`;var Zo=class{constructor(){O(this,"dbName","MewsAPICache");O(this,"version",2);O(this,"db",null);O(this,"initPromise",null);O(this,"performanceMetrics",[]);this.initPromise=this.init()}async init(){return new Promise((t,e)=>{try{let r=indexedDB.open(this.dbName,this.version);r.onerror=()=>{console.error("Failed to initialize IndexedDB:",r.error),e(r.error)},r.onsuccess=()=>{this.db=r.result,t()},r.onupgradeneeded=i=>{let o=i.target.result,{oldVersion:a}=i;if(a>0)try{o.objectStoreNames.contains("api_cache")&&o.deleteObjectStore("api_cache"),o.objectStoreNames.contains("performance_metrics")&&o.deleteObjectStore("performance_metrics")}catch(u){console.warn("Error cleaning up old stores:",u)}let s=o.createObjectStore("api_cache",{keyPath:"cacheKey"});s.createIndex("by-timestamp","timestamp"),s.createIndex("by-enterprise","enterpriseId"),s.createIndex("by-size","size"),o.createObjectStore("performance_metrics",{keyPath:"timestamp"}).createIndex("by-operation","operation")},r.onblocked=()=>{console.warn("IndexedDB upgrade blocked by another tab")}}catch(r){console.error("Failed to initialize IndexedDB:",r),e(r)}})}async ensureDB(){if(!this.db&&(await this.initPromise,!this.db))throw new Error("Failed to initialize IndexedDB");return this.db}calculateDataSize(t){try{return new Blob([JSON.stringify(t)]).size}catch{return 0}}recordPerformanceMetric(t,e,r,i){let o=performance.now()-e,a={operation:t,duration:o,timestamp:Date.now(),cacheHit:r,dataSize:i};this.performanceMetrics.push(a),this.performanceMetrics.length>1e3&&(this.performanceMetrics=this.performanceMetrics.slice(-1e3)),this.storeMetricAsync(a).catch(console.error)}async storeMetricAsync(t){try{let e=await this.ensureDB();return new Promise(r=>{let a=e.transaction("performance_metrics","readwrite").objectStore("performance_metrics").add(t);a.onerror=()=>r(),a.onsuccess=()=>r()})}catch{}}async get(t,e){let r=performance.now();try{let i=await this.ensureDB();return new Promise(o=>{let l=i.transaction("api_cache","readonly").objectStore("api_cache").get(t);l.onerror=()=>{this.recordPerformanceMetric("cache-miss",r,!1),o(null)},l.onsuccess=()=>{let u=l.result;if(!u){this.recordPerformanceMetric("cache-miss",r,!1),o(null);return}let h=e!==void 0?e:Ae.ttl,p=Re.Instant.fromEpochMilliseconds(u.timestamp);if(Re.Now.instant().since(p,{smallestUnit:"milliseconds"}).milliseconds>h){this.delete(t).catch(console.error),this.recordPerformanceMetric("cache-expired",r,!1),o(null);return}this.recordPerformanceMetric("cache-hit",r,!0,u.size),o(u.data)}})}catch(i){return console.error("Error getting cached data:",i),this.recordPerformanceMetric("cache-error",r,!1),null}}async set(t,e,r){let i=performance.now();try{let o=await this.ensureDB(),a=this.calculateDataSize(e),s={cacheKey:t,data:e,timestamp:Re.Now.instant().epochMilliseconds,enterpriseId:r,size:a};return new Promise((l,u)=>{let y=o.transaction("api_cache","readwrite").objectStore("api_cache").put(s);y.onerror=()=>{this.recordPerformanceMetric("cache-write-error",i,!1),u(y.error)},y.onsuccess=()=>{this.recordPerformanceMetric("cache-write",i,!1,a),l()}})}catch(o){if(console.error("Error setting cached data:",o),this.recordPerformanceMetric("cache-write-error",i,!1),o instanceof Error&&o.name==="QuotaExceededError"){await this.cleanupOldEntries();try{let a=await this.ensureDB(),s={cacheKey:t,data:e,timestamp:Re.Now.instant().epochMilliseconds,enterpriseId:r,size:this.calculateDataSize(e)};return new Promise((l,u)=>{let y=a.transaction("api_cache","readwrite").objectStore("api_cache").put(s);y.onerror=()=>u(y.error),y.onsuccess=()=>l()})}catch(a){console.error("Error setting cached data after cleanup:",a)}}}}async delete(t){try{let i=(await this.ensureDB()).transaction("api_cache","readwrite").objectStore("api_cache");await new Promise((o,a)=>{let s=i.delete(t);s.onsuccess=()=>o(),s.onerror=()=>a(s.error)})}catch(e){console.error("Error deleting cached data:",e)}}async clearExpired(){let t=performance.now(),e=0;try{let r=await this.ensureDB(),i=Re.Now.instant().epochMilliseconds-Ae.ttl,o=r.transaction("api_cache","readwrite"),a=o.objectStore("api_cache"),s=a.index("by-timestamp"),l=await new Promise((h,p)=>{let y=s.getAll(IDBKeyRange.upperBound(i));y.onsuccess=()=>h(y.result),y.onerror=()=>p(y.error)}),u=50;for(let h=0;h<l.length;h+=u){let p=l.slice(h,h+u);await Promise.all(p.map(y=>new Promise((E,T)=>{let C=a.delete(y.cacheKey);C.onsuccess=()=>E(),C.onerror=()=>T(C.error)}))),e+=p.length,h+u<l.length&&await new Promise(y=>setTimeout(y,0))}await new Promise((h,p)=>{o.oncomplete=()=>h(),o.onerror=()=>p(o.error)}),this.recordPerformanceMetric("cache-cleanup",t,!1)}catch(r){console.error("Error clearing expired cache:",r)}return e}async cleanupOldEntries(t=1e3){try{let r=(await this.ensureDB()).transaction("api_cache","readwrite"),i=r.objectStore("api_cache"),o=i.index("by-timestamp"),a=await new Promise((s,l)=>{let u=o.getAll();u.onsuccess=()=>s(u.result),u.onerror=()=>l(u.error)});if(a.length>t){let s=a.slice(0,a.length-t);await Promise.all(s.map(l=>new Promise((u,h)=>{let p=i.delete(l.cacheKey);p.onsuccess=()=>u(),p.onerror=()=>h(p.error)})))}await new Promise((s,l)=>{r.oncomplete=()=>s(),r.onerror=()=>l(r.error)})}catch(e){console.error("Error cleaning up old entries:",e)}}async clearAll(){try{let r=(await this.ensureDB()).transaction("api_cache","readwrite").objectStore("api_cache");await new Promise((i,o)=>{let a=r.clear();a.onsuccess=()=>i(),a.onerror=()=>o(a.error)})}catch(t){console.error("Error clearing all cache:",t)}}async getCacheStats(){try{let r=(await this.ensureDB()).transaction("api_cache","readonly").objectStore("api_cache"),i=await new Promise((a,s)=>{let l=r.getAll();l.onsuccess=()=>a(l.result),l.onerror=()=>s(l.error)}),o={totalEntries:i.length,totalSize:i.reduce((a,s)=>a+(s.size||0),0),oldestEntry:i.length>0?Math.min(...i.map(a=>a.timestamp)):null,newestEntry:i.length>0?Math.max(...i.map(a=>a.timestamp)):null,entriesByEnterprise:{}};return i.forEach(a=>{let s=a.enterpriseId||"unknown";o.entriesByEnterprise[s]=(o.entriesByEnterprise[s]||0)+1}),o}catch(t){return console.error("Error getting cache stats:",t),{totalEntries:0,totalSize:0,oldestEntry:null,newestEntry:null,entriesByEnterprise:{}}}}getPerformanceMetrics(){return[...this.performanceMetrics]}getAveragePerformance(){let t=this.performanceMetrics,e=t.filter(o=>o.operation==="cache-hit"),r=t.filter(o=>o.operation==="cache-miss"),i=t.filter(o=>o.operation==="cache-write");return{averageCacheHitTime:e.length>0?e.reduce((o,a)=>o+a.duration,0)/e.length:0,averageCacheMissTime:r.length>0?r.reduce((o,a)=>o+a.duration,0)/r.length:0,averageWriteTime:i.length>0?i.reduce((o,a)=>o+a.duration,0)/i.length:0,cacheHitRate:e.length+r.length>0?e.length/(e.length+r.length):0,totalOperations:t.length}}async performMaintenance(){try{setTimeout(async()=>{await this.clearExpired(),(await this.getCacheStats()).totalEntries>2e3&&await this.cleanupOldEntries(1500)},0)}catch(t){console.error("Error during cache maintenance:",t)}}};var Ue=async(n,t,e=null,r=!1)=>{let i=new Zo,o=Tu(n,e||"null",t.body);if(!Ae.bypassCache){let a=await i.get(o);if(a)return a}try{let a=new URL(Ae.base_url);r&&(a.pathname=a.pathname.replace("/mews","/_adapter")),a.pathname+=n,a.searchParams.set("enterprise",e||"null");let s=await fetch(a.toString(),t),l=await s.json();if(s.ok)return i.set(o,l,e||"null").catch(u=>{console.error("Error setting cache:",u)}),l;throw new Error("FETCH_ERROR",{cause:l})}catch(a){throw a instanceof Error?console.error(`${a.name} [${n}]`,a.cause):console.error(a),a}};var Cu=(n,t={})=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/services/getAll",e,n)};function Iu(n){return n.Services.map(t=>({id:t.Id,enterpriseId:t.EnterpriseId,isActive:t.IsActive,name:Nt(t.Names),startTime:t.StartTime,endTime:t.EndTime,type:t.Type,ordering:t.Ordering}))}var Xs=$e({});async function Pu(n){if(Xs.value[n])return Xs.value[n];let t=await Cu(n),e=Iu(t);return Xs.value[n]=e,e}var xu=(n,t)=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/ageCategories/getAll",e,n)};function Ru(n){if(!n||!n.AgeCategories||!Array.isArray(n.AgeCategories))throw new Error("Invalid age categories response format");return n.AgeCategories.map(t=>({id:t.Id,name:Nt(t.Names),shortName:t.ShortNames?Nt(t.ShortNames):null,classification:t.Classification,isActive:t.IsActive,maximalAge:t.MaximalAge,minimalAge:t.MinimalAge,serviceId:t.ServiceId}))}var Qs=$e({});async function Au(n){if(Qs.value[n])return Qs.value[n];let t=await xu(n,{EnterpriseIds:[n]}),e=Ru(t);return Qs.value[n]=e,e}var Lu=(n,t)=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/products/getAll",e,n)};function vm(n){if(!n||!n.Enterprise||!n.Enterprise.Id||!n.Enterprise.Name||!n.Enterprise.Address||!n.Enterprise.WebsiteUrl)throw new Error("Invalid configuration data");let t=n.Enterprise;return{id:t.Id,name:t.Name,chainName:t.ChainName,address:t.Address,phone:t.Phone,email:t.Email,timezone:t.TimeZoneIdentifier,url:t.WebsiteUrl,pricing:t.Pricing,coverImageId:t.CoverImageId,logoImageId:t.LogoImageId}}function Nu(n){return $r(n,vm)}function Ou(n){return{currency:n.Currency,datesUtc:n.DatesUtc.map(t=>t.split("T")[0]),timeUnitStartsUTC:n.TimeUnitStartsUtc,categoryPrices:n.CategoryPrices,relativeAdjustment:n.RelativeAdjustment,absoluteAdjustment:n.AbsoluteAdjustment}}function Fu(n){let t={};for(let e of n)e.pricing?.datesUtc.forEach((r,i)=>{t[r]=t[r]||[],t[r].push({rate:e.rate,categoryPrices:e.pricing?.categoryPrices.map(o=>({categoryId:o.CategoryId,amountPrice:o.AmountPrices[i],price:o.Prices[i]}))||[]})});return t}function Hu(n){if(!n||!n.Rates||!Array.isArray(n.Rates))throw new Error("Invalid rates response format");return n.Rates.filter(t=>t.IsActive&&t.IsEnabled&&t.IsPublic).map(t=>({id:t.Id,serviceId:t.ServiceId,baseRateId:t.BaseRateId,isBaseRate:t.IsBaseRate,isActive:t.IsActive,isEnabled:t.IsEnabled,isPublic:t.IsPublic,isDefault:t.IsDefault,type:t.Type,name:Nt(t.Names),shortName:t.ShortName,description:Nt(t.Description),hideFromGuest:t.Options.HidePriceFromGuest,group:n.RateGroups.find(e=>e.Id===t.GroupId)||null,pricing:t.Pricing}))}function $r(n,t){return n.map(t)}function ec(n){return{id:n.Id,serviceId:n.ServiceId,categoryId:n.CategoryId,isActive:n.IsActive,isDefault:n.IsDefault,name:Nt(n.Names),shortName:Nt(n.ShortNames),description:Nt(n.Descriptions),options:n.Options,promotions:n.Promotions,classifications:n.Classifications,pricing:n.Pricing,imageIds:n.ImageIds||[],ordering:n.Ordering,consumptionMoment:n.ConsumptionMoment,chargingMode:n.ChargingMode}}function Yu(n){return{products:$r(n.Products,ec),customerProducts:$r(n.CustomerProducts,ec)}}var tc=$e({});async function $u(n,t){if(tc.value[t])return tc.value[t];let e=await Lu(n,{ServiceIds:[t]}),r=Yu(e);return tc.value[t]=r,r}var ju=(n,t={})=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/rates/getAll",e,n)};var nc=$e({});async function zu(n,t){if(nc.value[t])return nc.value[t];let e=await ju(n,{ServiceIds:[t]}),r=Hu(e);return nc.value[t]=r,r}var Bu=(n,t)=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/services/getAvailability",e,n)};function Uu(n){if(!n||!n.CategoryAvailabilities||!Array.isArray(n.CategoryAvailabilities)||!n.TimeUnitStartsUtc)throw new Error("Invalid service availabilities response format");return n.CategoryAvailabilities.map(t=>({categoryId:t.CategoryId,timeUnitStartsUTC:n.TimeUnitStartsUtc,availabilities:t.Availabilities||[],adjustments:t.Adjustments||[]}))}var ne=class n{static getCurrentDate(){return Re.Now.plainDateISO()}static fromString(t){return Re.PlainDate.from(this.safeParsePlainDate(t))}static formatForDisplay(t,e={weekday:"short",month:"short",day:"numeric"}){return t.toLocaleString(xn,e)}static formatForAPI(t){return(typeof t=="string"?Re.PlainDate.from(t):Re.PlainDate.from(t)).toZonedDateTime({timeZone:"Europe/Paris",plainTime:Re.PlainTime.from("00:00")}).toInstant().toString()}static addDays(t,e){return t.add({days:e})}static daysBetween(t,e){return t.until(e).days}static isBefore(t,e){return Re.PlainDate.compare(t,e)>0}static isAfterOrEqual(t,e){return Re.PlainDate.compare(t,e)<0}static isSameDate(t,e){return Re.PlainDate.compare(t,e)===0}static getDateRange(t,e){let r=[],i=t;for(;this.isBefore(i,e);)r.push(i),i=this.addDays(i,1);return r}static fromJSDate(t){return Re.PlainDate.from({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()})}static toJSDate(t){return new Date(t.year,t.month-1,t.day)}static formatForCalendar(t,e="flatpickr"){if(e==="flatpickr")return t.toString();let r=String(t.day).padStart(2,"0"),i=String(t.month).padStart(2,"0");return`${r}/${i}/${t.year}`}static safeParsePlainDate(t){try{if(t.endsWith("Z")){let e=t.split("T")[0];return Re.PlainDate.from(e)}return Re.PlainDate.from(t)}catch(e){return console.error("Error parsing date string:",e),n.getCurrentDate()}}};var zf=localStorage.getItem("dev")==="true";var Bf=3*60*60*1e3;var Vu="AIzaSyBXRY4Jk6cEaWaodqBa6Cdhieejw6l8c2Y",rc=n=>`<svg fill="none" viewBox="0 0 39 54" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="39" height="54"><g clip-path="url(#a)"><path d="M19.5 54c-3.288-5.01-6.676-10.098-9.998-15.089-5.629-8.454-12.375-16.188-8.21-26.975 6.346-16.433 31.605-15.72 36.813 1.032 3.279 10.541-3.101 17.728-8.572 25.946C26.199 43.92 22.754 48.944 19.5 54M18.159 7.484c-6.38.612-10.57 6.87-8.985 12.636 2.37 8.625 14.983 10.184 19.623 2.429 4.386-7.333-1.826-15.91-10.64-15.065z" fill="${n}"/></g><path fill="#fff" d="M34.225 18.783A14.725 14.87 0 0 1 19.5 33.653a14.725 14.87 0 0 1-14.725-14.87 14.725 14.87 0 0 1 29.45 0"/><path fill="url(#b)" d="M12.735 10.174h14.326v14.87H12.735z"/><defs><clipPath id="a"><path fill="#fff" d="M0 0h39v54H0z"/></clipPath><pattern height="1" id="b" patternContentUnits="objectBoundingBox" width="1"><use transform="matrix(.01408 0 0 .01357 0 .025)" xlink:href="#c"/></pattern><image height="70" id="c" preserveAspectRatio="none" width="71" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEcAAABGCAYAAACe7Im6AAAACXBIWXMAABYlAAAWJQFJUiTwAAAGgklEQVR4nO2cWYwURRiAv53lcLniFTFeQQtFAyqBrWhEEUqNhgchJopoPMCIIoqiQER8QLOgRg4V1MADGtFEjIICHkgsISDEVBBNICpaEdTAA9EoIIsIjA81s8wOc3RXV+9uWL4npqv+g5+6+q+/qclms5zgKFqKOcAFwMYOre1MG6QDcCMwPNPanrQltBR1wF6gFphZc2JaObQUY4FpwHnAPmVs93Y/rbQUfYGFwFUFj28DaNcjR0sxEZhT9HizMnYAuMWn3aGl6AksAoaVaL47/4d2FRwtRT3uL38v0L1El0+UsVvyP9pNcLQU44DXqnR7tPDHcR8cLUUNsAC4v0rX+crYnwsfHNfByQXmO+DSKl33A1OLHx63h0AtxXXAcqoHBmCyMnZf8cPjbivXUnQEXgEejCiyQxnbq1RDs5GjpTgpmWttgluIHhiAh8o1NI0cLcWVwArgb2AL8DmwVhm71d/PlkNLMQaYBHQBugGnRRDboIwdVK6xJpvNoqU4BdgFdC7RZxPQoIz9ML7L6aOl6ALMA8Z4iA9Qxm4u15ifVqsoHRiAgcAyLcV7WorTPRxIm0HAHR5yiysFBiCTm04ygrJbgc25/q2OlqJWS7EI6AV8EFP8EPBEtU4ZYHgMpecAG7UU/WI6E5TcxrERGI17o74zpopnlLG7q3XKAFfEd48JHjJB0FJ0Ar4m2mgvxV7gxSgdM8CZHgZ8HQvBV8BlCeSnKmP/jdIxQ/mFuBL9tRRRTp5B0VIsAeoTqPhVGftq1M4Z4IinoZGecl5oKRrIZegSEGu7zwD/eRoa31Inai3FcFx+NwnrlLFfxBHI4LY1H04GxnnKRkZLcTbwfgBV1VIWx5ABTk1gcEbO+TRZTvLUylvK2B/jCmWAHQmM1gFfpjW9tBTTgAEJ1TQCE30EM0DFI3QELgTWaSlqE+pphpZCAg0BVDUoY//0EcwAXoJF1AOfBdBTyMoAOnYoY2f6CmdwczoE12spxodQpKV4CTgjgKrJSYTzKYtluOlxEdAxgb7DQNeoJ9BSaCluwOWSkrJdGXt+EgX5lMUoZWw/kjtVS4XMWjW0FD0Is20D3JVUQQZAGXsg9zvErpNkEV0B9Ajgw3pl7PqkSppyyFqK7sCQpAqBLlqKm+IKaSleAAYHsA8wKoSSwgT7SNy0CMHzcTprKW4HpgSy/boy9vcQivILci2wHZfMCkUfZey2ap20FL2AXwLZPKSMTbKhNCM/cvoQNjAAcyP2+zSgzUkBdTUFJ+jpNscwLcXllTpoKRYAFweyt0sZ+3IgXcDR4HwPrA6pOMe75Rq0FEOAsQFtBTmAFtLsOlhLMR13W9gzoI1JytjZhQ+0FBlgD9A1kI2yV7pJaHYdrIydDvTGXZKFYpaW4tyiZ4sJFxiApwLqaqJsIYGW4jngyUB2Nilj63N6++Kum0OxSxl7VkB9TZQtQVHGTgVClWAMzFVWAcwPpDNP4teEclQsQcm9BK4CagLYagRG4FIRoc4iTSMyDSoWLyljVxNuR6kDlgAHA+kDvzvyyEQqXtJSbMOlNNoSHyljR6RpIGrZW8jzSChi3ybEJVJwlLFrgBnpuhKLN6IUAiQlcsGkMvZp4PEUfYnDwy1hJFY1qTJ2LjAUCJIS8GShMnZ/SxiKXWqbm2L9cdUOrcE7LWXIqw5ZGfuHMvZqYE1YdyLhnbyPS6IibWXsUOAbT/Ej+FV4dPO0F5sQFezXAOs85LLAPx5ywTJ91UgcHGXsfmXsYFy11RBckXTh/ftuSo+QWlzNcNz3t9883PQilfJ+LcUU3A3ASlyx9AOEGaU7lbFpV3U0kdaHIctxp+o+wH34TZ9iDtLCJ/VUgqOM/QF383kJLjBZXBWnbxXZQkAoYz8O42E0UvneSktxD+5TQXCVYx1w//I1uPv0qAn9tcBjythvA7sYibQ+RiusDs/b6ITL6Ryi9PeVxbypjB0d2rE4BA9Oroi6d5nmOtzIye8C5ZJojcAjgV2LTRprzs24IBRzGPgLN3L2UXn9mV3qy7mWJo3gXFvBVn7t6YybZqXYw7EfwrcKaQSn1KgBN4W64U64NbjR01iiX0fg7VytTquSxoJ8oEp7vgbocJn2Olz5bzU9qZNGcKIWYFYqlJqnjA2ZiPcijWm1M4COVg8MpBOcnxLKzwKWhnAkKWlMK9+i76W4LXxDSGeSkNZb+VjgWVxKohKNwFZgQuH/PtJW+B8ku7Vobv83DwAAAABJRU5ErkJggg=="/></defs></svg>`,ic={accent_color:"#C64509",info_window_max_width:200},Go="calendar-day-price",qu="DD/MM/YYYY",Wu="Y-m-d",oc=!1,wm=365,ac=ne.getCurrentDate(),Ku=ne.addDays(ac,wm),Jo=ne.getCurrentDate(),sc=ne.addDays(Jo,3),bm=ne.getCurrentDate(),Uf=ne.addDays(bm,30);var Zu=6;function Xo(n=!0,t=document.body){t.querySelectorAll('[data-fs-element="preloader"]').forEach(r=>{r.classList.toggle("hide",!n)})}function cc(n=!0,t=document.body,e=mn("fatalErrorMessage")){t.querySelectorAll('[data-fs-element="preloader"]').forEach(i=>{let o=i.querySelector('[data-fs-element="spinner"]'),a=i.querySelector('[data-fs-element="message"]'),s=i.firstChild;o&&o.classList.toggle("hide",n),a&&(n?(s.style.width="90%",a.textContent=e):(s.removeAttribute("style"),a.textContent=mn("pleaseWait"))),i.classList.toggle("hide",!n)})}function Gu(n,t){document.addEventListener(n,t)}var lc=class{constructor(){O(this,"state",vr({appartmentsData:[],today:ne.getCurrentDate(),lowestPricesByDate:{},isLoadingPrices:!1,isLoadingData:!1}))}setAppartmentsData(t){this.state.appartmentsData=t}setLowestPricesByDate(t){this.state.lowestPricesByDate=t}setLoadingPrices(t){this.state.isLoadingPrices=t}setLoadingData(t){this.state.isLoadingData=t}reset(){this.state.appartmentsData=[],this.state.lowestPricesByDate={},this.state.isLoadingPrices=!1,this.state.isLoadingData=!1}},tg=new lc;var hr={get:n=>{try{let t=localStorage.getItem(n);return t?JSON.parse(t):null}catch(t){return console.error(`Error reading from localStorage for key ${n}:`,t),null}},set:(n,t)=>{try{localStorage.setItem(n,JSON.stringify(t)),hr.touch()}catch(e){console.error(`Error writing to localStorage for key ${n}:`,e)}},update:(n,t)=>{let e=hr.get(n),r=t(e);hr.set(n,r)},remove:n=>{localStorage.removeItem(n),hr.touch()},clear:()=>{localStorage.clear()},has:n=>localStorage.getItem(n)!==null,touch:()=>{localStorage.setItem("lastUpdater",Dm()||"root")}},Dm=()=>localStorage.getItem("lastUpdater");var Qo=n=>{let t=new Date;return t.setDate(t.getDate()+n),t.toISOString().split("T")[0]},Vn=hr.get("form_state"),Ju=Vn?{enterpriseId:Vn.enterpriseId||"",startDate:Vn.startDate||Qo(45),endDate:Vn.endDate||Qo(48),guests:Vn.guests||2,coupon:Vn.coupon||"",referrer:Vn.referrer||window.location.href,rooms:Vn.rooms||0}:{enterpriseId:"",startDate:Qo(45),endDate:Qo(48),guests:2,coupon:"",referrer:window.location.href,rooms:0},Ce=vr(Ju),Em=go(Ju);Hc(()=>{hr.set("form_state",Ce)});var _m="data-fs-element";var Je=(n,t=document)=>t.querySelector(`[${_m}="${n}"]`);var uc=$e({});async function Xu(n,t,e,r){if(uc.value[t])return uc.value[t];let i=await Bu(n,{ServiceId:t,FirstTimeUnitStartUtc:ne.formatForAPI(e),LastTimeUnitStartUtc:ne.formatForAPI(r)}),o=Uu(i);return uc.value[t]=o,o}var Qu=(n,t)=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/restrictions/getAll",e,n)};function ed(n){if(!n||!n.Restrictions||!Array.isArray(n.Restrictions))throw new Error("Invalid service restrictions response format");return n.Restrictions}var dc=$e({});async function td(n,t,e,r){if(dc.value[t])return dc.value[t];let i=await Qu(n,{ServiceIds:[t],CollidingUtc:{StartUtc:ne.formatForAPI(e),EndUtc:ne.formatForAPI(r)},Origin:"User"}),o=ed(i);return dc.value[t]=o,o}var nd=(n,t)=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/rules/getAll",e,n)};function rd(n){if(!n||!n.Rules||!Array.isArray(n.Rules))throw new Error("Invalid service rules response format");return n.Rules.map(t=>({id:t.Id,serviceId:t.ServiceId,conditions:t.Conditions,actions:n.RuleActions!=null?n.RuleActions.filter(e=>e.RuleId===t.Id):n.RuleActions}))}var hc=$e({});async function id(n,t){if(hc.value[t])return hc.value[t];let e=await nd(n,{ServiceIds:[t],Extent:{RuleActions:!0}}),r=rd(e);return hc.value[t]=r,r}var od=(n,t)=>{let e={method:"POST",headers:Ae.headers,body:JSON.stringify(t)};return Ue("/rates/getPricing",e,n)};var mc=$e({});async function ad(n,t,e,r){if(mc.value[t])return mc.value[t];let i=await od(n,{RateId:t,FirstTimeUnitStartUtc:ne.formatForAPI(e),LastTimeUnitStartUtc:ne.formatForAPI(r)}),o=Ou(i);return mc.value[t]=o,o}var ea=class{constructor(t,e){O(this,"enterprise");O(this,"rate",null);O(this,"pricing",null);this.enterprise=t,this.rate=e}getRate(){if(!this.rate)throw new Error("Rate is not initialized");return this.rate}async initPricing(t,e){if(!this.rate)throw new Error("Rate is not initialized");return this.pricing=await ad(this.enterprise.getEnterpriseId(),this.rate.id,t,e),this.pricing}getPricing(){if(!this.pricing)throw new Error("Rate pricing is not initialized");return this.pricing}};var ta=class{constructor(t,e){O(this,"enterprise");O(this,"service",null);O(this,"products",[]);O(this,"customerProducts",[]);O(this,"restrictions",[]);O(this,"availabilities",[]);O(this,"rules",[]);O(this,"ageCategories",[]);O(this,"rates",[]);this.enterprise=t,this.service=e}getService(){return this.service}async initAvailabilities(t,e){if(!this.service)throw new Error("Service is not initialized");return this.availabilities=await Xu(this.enterprise.getEnterpriseId(),this.service.id,t,e),this.availabilities}getAvailabilities(){if(this.availabilities.length===0)throw new Error("Service availabilities are not initialized");return this.availabilities}async initRestrictions(t,e){if(!this.service)throw new Error("Service is not initialized");return this.restrictions=await td(this.enterprise.getEnterpriseId(),this.service.id,t,e),this.restrictions}getRestrictions(){if(this.restrictions.length===0)throw new Error("Service restrictions are not initialized");return this.restrictions}async initProducts(){if(!this.service)throw new Error("Service is not initialized");let t=await $u(this.enterprise.getEnterpriseId(),this.service.id);return this.products=t.products,this.customerProducts=t.customerProducts,t}getProducts(){if(this.products.length===0)throw new Error("Service products are not initialized");return this.products}async initRates(){if(!this.service)throw new Error("Service is not initialized");let t=await zu(this.enterprise.getEnterpriseId(),this.service.id);if(this.rates=t.map(e=>new ea(this.enterprise,e)),this.rates.length===0)throw new Error("No rates found for the service");return this.rates}getRates(){if(this.rates.length===0)throw new Error("Service rates are not initialized");return this.rates?.map(t=>t.getRate())||[]}async initRules(){if(!this.service)throw new Error("Service is not initialized");return this.rules=await id(this.enterprise.getEnterpriseId(),this.service.id),this.rules}getRules(){if(this.rules.length===0)throw new Error("Service rules are not initialized");return this.rules}async initAgeCategories(){if(!this.service)throw new Error("Service is not initialized");return this.ageCategories=await Au(this.enterprise.getEnterpriseId()),this.ageCategories}getAgeCategories(){if(this.ageCategories.length===0)throw new Error("Age categories are not initialized");return this.ageCategories}};var na=class{constructor(t){O(this,"enterpriseId");O(this,"services",[]);O(this,"reservableService",null);this.enterpriseId=t}async initServices(){this.services=await Pu(this.enterpriseId);let t=this.services.find(e=>e.type.toLowerCase()==="reservable");return t&&(this.reservableService=new ta(this,t)),this.services}getEnterpriseId(){return this.enterpriseId}getServices(){return this.services}getReservableService(){return this.reservableService?.getService()??null}};function sd(n,t){return{rate:n,pricing:t}}function pc(n){return n.isActive&&n.isEnabled&&n.isPublic&&!n.hideFromGuest}function cd(n,t){let e=t.filter(o=>Mm(n,o.Conditions));return!!(e.some(o=>{let{Exceptions:a}=o;return a.MaxAdvance==null&&a.MinAdvance==null&&a.MaxLength==null&&a.MinLength==null&&a.MaxPrice==null&&a.MinPrice==null&&a.MaxReservationCount==null&&a.MinReservationCount==null})||e.some(o=>Sm(n,o.Exceptions)))}function Mm(n,t){return(t.ExactRateId===null||n.rate.id===t.ExactRateId)&&(t.BaseRateId===null||n.rate.baseRateId===t.BaseRateId)&&(t.ExactRateId===null||n.rate.baseRateId===t.ExactRateId)&&(t.RateGroupId===null||n.rate.group?.Id===t.RateGroupId)&&t.ResourceCategoryId===null&&t.ResourceCategoryType===null&&n.pricing?.datesUtc.every(e=>{let r=ne.fromString(e);return t.Days.includes(r.toLocaleString("en-US",{weekday:"long"}))})&&!0}function ra(n){if(!n)return null;try{return Re.Duration.from(n).total({unit:"days"})}catch{return null}}function Sm(n,t){let e=ne.fromString(n.pricing?.datesUtc[0]),r=ne.fromString(n.pricing?.datesUtc.at(-1));if(!e||!r)return console.warn("Missing date information, cannot check restrictions"),!0;let i=r.since(e,{largestUnit:"day"}).days,o=ne.getCurrentDate(),a=e.since(o,{largestUnit:"day"}).days,s=ra(t.MinAdvance),l=ra(t.MaxAdvance),u=ra(t.MinLength),h=ra(t.MaxLength);return!!(u&&i<u||h&&i>h||s&&a<s||l&&a>l||!t.MinLength&&!t.MaxLength&&!t.MinAdvance&&!t.MaxAdvance)}var ld=(n,t)=>{let e=n.find(s=>s.rate.isBaseRate),r=n.filter(s=>!cd(s,t)&&pc(s.rate)),i=Object.groupBy(r,s=>s.rate.group?.Name||"unknown"),o=Fu(r),a=km(o);return{baseRate:e,allowedRates:r,groupedRates:i,datedPrices:o,lowestDatedPrices:a}};function km(n){let t={};for(let[e,r]of Object.entries(n)){let i=1/0,o=r.filter(a=>pc(a.rate));for(let a of o)for(let s of a.categoryPrices)s.price<i&&(i=s.price);i!==1/0&&(t[e]=i)}return t}var fc=async n=>{let t=await Promise.all(n.map(async r=>{let i=new na(r);await i.initServices();let o=i.reservableService;if(!o){console.error("No reservable service found for the enterprise.");return}await o.initRates();let a=[],s=await Promise.all(o.rates.map(async u=>{let h=await u.initPricing(ne.formatForAPI(ac.toString()),ne.formatForAPI(Ku.toString()));return sd(u.getRate(),h)}));return ld(s,a).lowestDatedPrices})),e={};for(let r of t)if(r)for(let[i,o]of Object.entries(r))(!e[i]||o<e[i])&&(e[i]=o);return e};var qe=class qe extends Date{constructor(e=null,r="YYYY-MM-DD",i="en-US"){super(qe.parseDateTime(e,r,i));O(this,"lang");this.lang=i}static parseDateTime(e,r="YYYY-MM-DD",i="en-US"){if(!e)return new Date(new Date().setHours(0,0,0,0));if(e instanceof qe)return e.toJSDate();if(e instanceof Date)return e;if(/^-?\d{10,}$/.test(String(e)))return new Date(Number(e));if(typeof e=="string"){let o=[],a=null;for(;(a=qe.regex.exec(r))!=null;)a[1]!=="\\"&&o.push(a);if(o.length){let s={year:null,month:null,shortMonth:null,longMonth:null,day:null,hour:0,minute:0,second:0,ampm:null,value:""};o[0].index>0&&(s.value+=".*?");for(let[u,h]of Object.entries(o)){let p=Number(u),{group:y,pattern:E}=qe.formatPatterns(h[0],i);s[y]=p+1,s.value+=E,s.value+=".*?"}let l=new RegExp(`^${s.value}$`);if(l.test(e)){let u=l.exec(e),h=Number(u[s.year]),p=null;s.month?p=Number(u[s.month])-1:s.shortMonth?p=qe.shortMonths(i).indexOf(u[s.shortMonth]):s.longMonth&&(p=qe.longMonths(i).indexOf(u[s.longMonth]));let y=Number(u[s.day])||1,E=Number(u[s.hour]),T=Number.isNaN(E)?0:E,C=Number(u[s.minute]),L=Number.isNaN(C)?0:C,B=Number(u[s.second]),K=Number.isNaN(B)?0:B,W=u[s.ampm];return W&&W==="PM"&&(T+=12,T===24&&(T=0)),new Date(h,p,y,T,L,K,0)}}}return new Date(new Date().setHours(0,0,0,0))}static shortMonths(e){return qe.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"short"}))}static longMonths(e){return qe.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"long"}))}static formatPatterns(e,r){switch(e){case"YY":case"YYYY":return{group:"year",pattern:`(\\d{${e.length}})`};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:`(${qe.shortMonths(r).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${qe.longMonths(r).join("|")})`};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"};case"h":case"H":return{group:"hour",pattern:"(\\d{1,2})"};case"hh":case"HH":return{group:"hour",pattern:"(\\d{2})"};case"m":return{group:"minute",pattern:"(\\d{1,2})"};case"mm":return{group:"minute",pattern:"(\\d{2})"};case"s":return{group:"second",pattern:"(\\d{1,2})"};case"ss":return{group:"second",pattern:"(\\d{2})"};case"a":case"A":return{group:"ampm",pattern:"(AM|PM|am|pm)"}}}getWeek(e){let r=new Date(this.midnight_ts(this)),i=(this.getDay()+(7-e))%7;r.setDate(r.getDate()-i);let o=r.getTime();return r.setMonth(0,1),r.getDay()!==e&&r.setMonth(0,1+(4-r.getDay()+7)%7),1+Math.ceil((o-r.getTime())/6048e5)}clone(){return new qe(this)}toJSDate(){return new Date(this)}inArray(e,r="[]"){return e.some(i=>i instanceof Array?this.isBetween(i[0],i[1],r):this.isSame(i,"day"))}isBetween(e,r,i="()"){switch(i){default:case"()":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(r);case"[)":return this.midnight_ts(this)>=this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(r);case"(]":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<=this.midnight_ts(r);case"[]":return this.midnight_ts()>=this.midnight_ts(e)&&this.midnight_ts()<=this.midnight_ts(r)}}isBefore(e,r="days"){switch(r){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return e.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")}isSameOrBefore(e,r="days"){switch(r){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")}isAfter(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(e.getFullYear(),e.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>e.getFullYear()}throw new Error("isAfter: Invalid unit!")}isSameOrAfter(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")}isSame(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")}add(e,r="days"){switch(r){case"day":case"days":this.setDate(this.getDate()+e);break;case"month":case"months":this.setMonth(this.getMonth()+e)}return this}subtract(e,r="days"){switch(r){case"day":case"days":this.setDate(this.getDate()-e);break;case"month":case"months":this.setMonth(this.getMonth()-e)}return this}diff(e,r="days"){switch(r){default:case"day":case"days":return Math.round((this.midnight_ts()-this.midnight_ts(e))/864e5);case"month":case"months":let i=12*(e.getFullYear()-this.getFullYear());return i-=e.getMonth(),i+=this.getMonth(),i}}format(e,r="en-US"){let i="",o=[],a=null;for(;(a=qe.regex.exec(e))!=null;)a[1]!=="\\"&&o.push(a);if(o.length){o[0].index>0&&(i+=e.substring(0,o[0].index));for(let[s,l]of Object.entries(o)){let u=Number(s);i+=this.formatTokens(l[0],r),o[u+1]&&(i+=e.substring(l.index+l[0].length,o[u+1].index)),u===o.length-1&&(i+=e.substring(l.index+l[0].length))}}return i.replace(/\\/g,"")}midnight_ts(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0).getTime():new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()}formatTokens(e,r){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return`0${this.getMonth()+1}`.slice(-2);case"MMM":return qe.shortMonths(r)[this.getMonth()];case"MMMM":return qe.longMonths(r)[this.getMonth()];case"D":return String(this.getDate());case"DD":return`0${this.getDate()}`.slice(-2);case"H":return String(this.getHours());case"HH":return`0${this.getHours()}`.slice(-2);case"h":return String(this.getHours()%12||12);case"hh":return`0${this.getHours()%12||12}`.slice(-2);case"m":return String(this.getMinutes());case"mm":return`0${this.getMinutes()}`.slice(-2);case"s":return String(this.getSeconds());case"ss":return`0${this.getSeconds()}`.slice(-2);case"a":return this.getHours()<12||this.getHours()===24?"am":"pm";case"A":return this.getHours()<12||this.getHours()===24?"AM":"PM";default:return""}}};O(qe,"regex",/(\\)?(Y{2,4}|M{1,4}|D{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|A|a)/g),O(qe,"MONTH_JS",[0,1,2,3,4,5,6,7,8,9,10,11]);var de=qe,gc=class{constructor(t){O(this,"picker");this.picker=t}render(t,e){t||(t=new de),t.setDate(1),t.setHours(0,0,0,0),typeof this[`get${e}View`]=="function"&&this[`get${e}View`](t)}getContainerView(t){this.picker.ui.container.innerHTML="",this.picker.options.header&&this.picker.trigger("render",{date:t.clone(),view:"Header"}),this.picker.trigger("render",{date:t.clone(),view:"Main"}),this.picker.options.autoApply||this.picker.trigger("render",{date:t.clone(),view:"Footer"})}getHeaderView(t){let e=document.createElement("header");this.picker.options.header instanceof HTMLElement&&e.appendChild(this.picker.options.header),typeof this.picker.options.header=="string"&&(e.innerHTML=this.picker.options.header),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{target:e,date:t.clone(),view:"Header"})}getMainView(t){let e=document.createElement("main");this.picker.ui.container.appendChild(e);let r=document.createElement("div");r.className=`calendars grid-${this.picker.options.grid}`;for(let i=0;i<this.picker.options.calendars;i++){let o=document.createElement("div");o.className="calendar",r.appendChild(o);let a=this.getCalendarHeaderView(t.clone());o.appendChild(a),this.picker.trigger("view",{date:t.clone(),view:"CalendarHeader",index:i,target:a});let s=this.getCalendarDayNamesView();o.appendChild(s),this.picker.trigger("view",{date:t.clone(),view:"CalendarDayNames",index:i,target:s});let l=this.getCalendarDaysView(t.clone());o.appendChild(l),this.picker.trigger("view",{date:t.clone(),view:"CalendarDays",index:i,target:l});let u=this.getCalendarFooterView(this.picker.options.lang,t.clone());o.appendChild(u),this.picker.trigger("view",{date:t.clone(),view:"CalendarFooter",index:i,target:u}),this.picker.trigger("view",{date:t.clone(),view:"CalendarItem",index:i,target:o}),t.add(1,"month")}e.appendChild(r),this.picker.trigger("view",{date:t.clone(),view:"Calendars",target:r}),this.picker.trigger("view",{date:t.clone(),view:"Main",target:e})}getFooterView(t){let e=document.createElement("footer"),r=document.createElement("div");r.className="footer-buttons";let i=document.createElement("button");i.className="cancel-button unit",i.innerHTML=this.picker.options.locale.cancel,r.appendChild(i);let o=document.createElement("button");o.className="apply-button unit",o.innerHTML=this.picker.options.locale.apply,o.disabled=!0,r.appendChild(o),e.appendChild(r),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{date:t,target:e,view:"Footer"})}getCalendarHeaderView(t){let e=document.createElement("div");e.className="header";let r=document.createElement("div");r.className="month-name",r.innerHTML=`<span>${t.toLocaleString(this.picker.options.lang,{month:"long"})}</span> ${t.format("YYYY")}`,e.appendChild(r);let i=document.createElement("button");i.className="previous-button unit",i.innerHTML=this.picker.options.locale.previousMonth,e.appendChild(i);let o=document.createElement("button");return o.className="next-button unit",o.innerHTML=this.picker.options.locale.nextMonth,e.appendChild(o),e}getCalendarDayNamesView(){let t=document.createElement("div");t.className="daynames-row";for(let e=1;e<=7;e++){let r=3+this.picker.options.firstDay+e,i=document.createElement("div");i.className="dayname",i.innerHTML=new Date(1970,0,r,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"short"}),i.title=new Date(1970,0,r,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"long"}),t.appendChild(i),this.picker.trigger("view",{dayIdx:r,view:"CalendarDayName",target:i})}return t}getCalendarDaysView(t){let e=document.createElement("div");e.className="days-grid";let r=this.calcOffsetDays(t,this.picker.options.firstDay),i=32-new Date(t.getFullYear(),t.getMonth(),32).getDate();for(let o=0;o<r;o++){let a=document.createElement("div");a.className="offset",e.appendChild(a)}for(let o=1;o<=i;o++){t.setDate(o);let a=this.getCalendarDayView(t);e.appendChild(a),this.picker.trigger("view",{date:t,view:"CalendarDay",target:a})}return e}getCalendarDayView(t){let e=this.picker.options.date?new de(this.picker.options.date):null,r=new de,i=document.createElement("div");return i.className="day unit",i.innerHTML=t.format("D"),i.dataset.time=String(t.getTime()),t.isSame(r,"day")&&i.classList.add("today"),[0,6].includes(t.getDay())&&i.classList.add("weekend"),this.picker.datePicked.length?this.picker.datePicked[0].isSame(t,"day")&&i.classList.add("selected"):e&&t.isSame(e,"day")&&i.classList.add("selected"),this.picker.trigger("view",{date:t,view:"CalendarDay",target:i}),i}getCalendarFooterView(t,e){let r=document.createElement("div");return r.className="footer",r}calcOffsetDays(t,e){let r=t.getDay()-e;return r<0&&(r+=7),r}},yc=class{constructor(t){O(this,"picker");O(this,"instances",{});this.picker=t}initialize(){let t=[];this.picker.options.plugins.forEach(e=>{typeof e=="function"?t.push(new e):typeof e=="string"&&typeof easepick<"u"&&Object.prototype.hasOwnProperty.call(easepick,e)?t.push(new easepick[e]):console.warn(`easepick: ${e} not found.`)}),t.sort((e,r)=>e.priority>r.priority?-1:e.priority<r.priority||e.dependencies.length>r.dependencies.length?1:e.dependencies.length<r.dependencies.length?-1:0),t.forEach(e=>{e.attach(this.picker),this.instances[e.getName()]=e})}getInstance(t){return this.instances[t]}addInstance(t){if(Object.prototype.hasOwnProperty.call(this.instances,t))console.warn(`easepick: ${t} already added.`);else{if(typeof easepick<"u"&&Object.prototype.hasOwnProperty.call(easepick,t)){let e=new easepick[t];return e.attach(this.picker),this.instances[e.getName()]=e,e}if(this.getPluginFn(t)!=="undefined"){let e=new(this.getPluginFn(t));return e.attach(this.picker),this.instances[e.getName()]=e,e}console.warn(`easepick: ${t} not found.`)}return null}removeInstance(t){return t in this.instances&&this.instances[t].detach(),delete this.instances[t]}reloadInstance(t){return this.removeInstance(t),this.addInstance(t)}getPluginFn(t){return[...this.picker.options.plugins].filter(e=>typeof e=="function"&&new e().getName()===t).shift()}},ia=class{constructor(t){O(this,"Calendar",new gc(this));O(this,"PluginManager",new yc(this));O(this,"calendars",[]);O(this,"datePicked",[]);O(this,"cssLoaded",0);O(this,"binds",{hidePicker:this.hidePicker.bind(this),show:this.show.bind(this)});O(this,"options",{doc:document,css:[],element:null,firstDay:1,grid:1,calendars:1,lang:"en-US",date:null,format:"YYYY-MM-DD",readonly:!0,autoApply:!0,header:!1,inline:!1,scrollToDate:!0,locale:{nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',cancel:"Cancel",apply:"Apply"},documentClick:this.binds.hidePicker,plugins:[]});O(this,"ui",{container:null,shadowRoot:null,wrapper:null});O(this,"version","1.2.1");let e={...this.options.locale,...t.locale};this.options={...this.options,...t},this.options.locale=e,this.handleOptions(),this.ui.wrapper=document.createElement("span"),this.ui.wrapper.style.display="none",this.ui.wrapper.style.position="absolute",this.ui.wrapper.style.pointerEvents="none",this.ui.wrapper.className="easepick-wrapper",this.ui.wrapper.attachShadow({mode:"open"}),this.ui.shadowRoot=this.ui.wrapper.shadowRoot,this.ui.container=document.createElement("div"),this.ui.container.className="container",this.options.zIndex&&(this.ui.container.style.zIndex=String(this.options.zIndex)),this.options.inline&&(this.ui.wrapper.style.position="relative",this.ui.container.classList.add("inline")),this.ui.shadowRoot.appendChild(this.ui.container),this.options.element.after(this.ui.wrapper),this.handleCSS(),this.options.element.addEventListener("click",this.binds.show),this.on("view",this.onView.bind(this)),this.on("render",this.onRender.bind(this)),this.PluginManager.initialize(),this.parseValues(),typeof this.options.setup=="function"&&this.options.setup(this),this.on("click",this.onClick.bind(this));let r=this.options.scrollToDate?this.getDate():null;this.renderAll(r)}on(t,e,r={}){this.ui.container.addEventListener(t,e,r)}off(t,e,r={}){this.ui.container.removeEventListener(t,e,r)}trigger(t,e={}){return this.ui.container.dispatchEvent(new CustomEvent(t,{detail:e}))}destroy(){this.options.element.removeEventListener("click",this.binds.show),typeof this.options.documentClick=="function"&&document.removeEventListener("click",this.options.documentClick,!0),Object.keys(this.PluginManager.instances).forEach(t=>{this.PluginManager.removeInstance(t)}),this.ui.wrapper.remove()}onRender(t){let{view:e,date:r}=t.detail;this.Calendar.render(r,e)}onView(t){let{view:e,target:r}=t.detail;e==="Footer"&&this.datePicked.length&&(r.querySelector(".apply-button").disabled=!1)}onClickHeaderButton(t){this.isCalendarHeaderButton(t)&&(t.classList.contains("next-button")?this.calendars[0].add(1,"month"):this.calendars[0].subtract(1,"month"),this.renderAll(this.calendars[0]))}onClickCalendarDay(t){if(this.isCalendarDay(t)){let e=new de(t.dataset.time);this.options.autoApply?(this.setDate(e),this.trigger("select",{date:this.getDate()}),this.hide()):(this.datePicked[0]=e,this.trigger("preselect",{date:this.getDate()}),this.renderAll())}}onClickApplyButton(t){if(this.isApplyButton(t)){if(this.datePicked[0]instanceof Date){let e=this.datePicked[0].clone();this.setDate(e)}this.hide(),this.trigger("select",{date:this.getDate()})}}onClickCancelButton(t){this.isCancelButton(t)&&this.hide()}onClick(t){let e=t.target;if(e instanceof HTMLElement){let r=e.closest(".unit");if(!(r instanceof HTMLElement))return;this.onClickHeaderButton(r),this.onClickCalendarDay(r),this.onClickApplyButton(r),this.onClickCancelButton(r)}}isShown(){return this.ui.container.classList.contains("inline")||this.ui.container.classList.contains("show")}show(t){if(this.isShown())return;let e=t&&"target"in t?t.target:this.options.element,{top:r,left:i}=this.adjustPosition(e);this.ui.container.style.top=`${r}px`,this.ui.container.style.left=`${i}px`,this.ui.container.classList.add("show"),this.trigger("show",{target:e})}hide(){this.ui.container.classList.remove("show"),this.datePicked.length=0,this.renderAll(),this.trigger("hide")}setDate(t){let e=new de(t,this.options.format);this.options.date=e.clone(),this.updateValues(),this.calendars.length&&this.renderAll()}getDate(){return this.options.date instanceof de?this.options.date.clone():null}parseValues(){this.options.date?this.setDate(this.options.date):this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.setDate(this.options.element.value),this.options.date instanceof Date||(this.options.date=null)}updateValues(){let t=this.getDate(),e=t instanceof Date?t.format(this.options.format,this.options.lang):"",r=this.options.element;r instanceof HTMLInputElement?r.value=e:r instanceof HTMLElement&&(r.innerText=e)}hidePicker(t){let e=t.target,r=null;e.shadowRoot&&(e=t.composedPath()[0],r=e.getRootNode().host),this.isShown()&&r!==this.ui.wrapper&&e!==this.options.element&&this.hide()}renderAll(t){this.trigger("render",{view:"Container",date:(t||this.calendars[0]).clone()})}isCalendarHeaderButton(t){return["previous-button","next-button"].some(e=>t.classList.contains(e))}isCalendarDay(t){return t.classList.contains("day")}isApplyButton(t){return t.classList.contains("apply-button")}isCancelButton(t){return t.classList.contains("cancel-button")}gotoDate(t){let e=new de(t,this.options.format);e.setDate(1),this.calendars[0]=e.clone(),this.renderAll()}clear(){this.options.date=null,this.datePicked.length=0,this.updateValues(),this.renderAll(),this.trigger("clear")}handleOptions(){this.options.element instanceof HTMLElement||(this.options.element=this.options.doc.querySelector(this.options.element)),typeof this.options.documentClick=="function"&&document.addEventListener("click",this.options.documentClick,!0),this.options.element instanceof HTMLInputElement&&(this.options.element.readOnly=this.options.readonly),this.options.date?this.calendars[0]=new de(this.options.date,this.options.format):this.calendars[0]=new de}handleCSS(){if(Array.isArray(this.options.css))this.options.css.forEach(t=>{let e=document.createElement("link");e.href=t,e.rel="stylesheet";let r=()=>{this.cssLoaded++,this.cssLoaded===this.options.css.length&&(this.ui.wrapper.style.display="")};e.addEventListener("load",r),e.addEventListener("error",r),this.ui.shadowRoot.append(e)});else if(typeof this.options.css=="string"){let t=document.createElement("style"),e=document.createTextNode(this.options.css);t.appendChild(e),this.ui.shadowRoot.append(t),this.ui.wrapper.style.display=""}else typeof this.options.css=="function"&&(this.options.css.call(this,this),this.ui.wrapper.style.display="")}adjustPosition(t){let e=t.getBoundingClientRect(),r=this.ui.wrapper.getBoundingClientRect();this.ui.container.classList.add("calc");let i=this.ui.container.getBoundingClientRect();this.ui.container.classList.remove("calc");let o=e.bottom-r.bottom,a=e.left-r.left;return typeof window<"u"&&(window.innerHeight<o+i.height&&o-i.height>=0&&(o=e.top-r.top-i.height),window.innerWidth<a+i.width&&e.right-i.width>=0&&(a=e.right-r.right-i.width)),{left:a,top:o}}},ca=Object.freeze({__proto__:null,Core:ia,create:ia}),Gi=class{constructor(){O(this,"picker");O(this,"options");O(this,"priority",0);O(this,"dependencies",[])}attach(t){let e=this.getName(),r={...this.options};this.options={...this.options,...t.options[e]||{}};for(let o of Object.keys(r))if(r[o]!==null&&typeof r[o]=="object"&&Object.keys(r[o]).length&&e in t.options&&o in t.options[e]){let a={...t.options[e][o]};a!==null&&typeof a=="object"&&Object.keys(a).length&&Object.keys(a).every(s=>Object.keys(r[o]).includes(s))&&(this.options[o]={...r[o],...a})}if(this.picker=t,this.dependenciesNotFound()){let o=this.dependencies.filter(a=>!this.pluginsAsStringArray().includes(a));return void console.warn(`${this.getName()}: required dependencies (${o.join(", ")}).`)}let i=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.add(i),this.onAttach()}detach(){let t=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.remove(t),typeof this.onDetach=="function"&&this.onDetach()}dependenciesNotFound(){return this.dependencies.length&&!this.dependencies.every(t=>this.pluginsAsStringArray().includes(t))}pluginsAsStringArray(){return this.picker.options.plugins.map(t=>typeof t=="function"?new t().getName():t)}camelCaseToKebab(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}},oa=class extends Gi{constructor(){super(...arguments);O(this,"priority",1);O(this,"binds",{onView:this.onView.bind(this)});O(this,"options",{minDate:null,maxDate:null,minDays:null,maxDays:null,selectForward:null,selectBackward:null,presets:!0,inseparable:!1,filter:null})}getName(){return"LockPlugin"}onAttach(){if(this.options.minDate&&(this.options.minDate=new de(this.options.minDate,this.picker.options.format,this.picker.options.lang)),this.options.maxDate&&(this.options.maxDate=new de(this.options.maxDate,this.picker.options.format,this.picker.options.lang),this.options.maxDate instanceof de&&this.picker.options.calendars>1&&this.picker.calendars[0].isSame(this.options.maxDate,"month"))){let e=this.picker.calendars[0].clone().subtract(1,"month");this.picker.gotoDate(e)}if((this.options.minDays||this.options.maxDays||this.options.selectForward||this.options.selectBackward)&&!this.picker.options.plugins.includes("RangePlugin")){let e=["minDays","maxDays","selectForward","selectBackward"];console.warn(`${this.getName()}: options ${e.join(", ")} required RangePlugin.`)}this.picker.on("view",this.binds.onView)}onDetach(){this.picker.off("view",this.binds.onView)}onView(e){let{view:r,target:i,date:o}=e.detail;if(r==="CalendarHeader"&&(this.options.minDate instanceof de&&o.isSameOrBefore(this.options.minDate,"month")&&i.classList.add("no-previous-month"),this.options.maxDate instanceof de&&o.isSameOrAfter(this.options.maxDate,"month")&&i.classList.add("no-next-month")),r==="CalendarDay"){let a=this.picker.datePicked.length?this.picker.datePicked[0]:null;if(this.testFilter(o))return void i.classList.add("locked");if(this.options.inseparable){if(this.options.minDays){let s=o.clone().subtract(this.options.minDays-1,"day"),l=o.clone().add(this.options.minDays-1,"day"),u=!1,h=!1;for(;s.isBefore(o,"day");){if(this.testFilter(s)){u=!0;break}s.add(1,"day")}for(;l.isAfter(o,"day");){if(this.testFilter(l)){h=!0;break}l.subtract(1,"day")}u&&h&&i.classList.add("not-available")}this.rangeIsNotAvailable(o,a)&&i.classList.add("not-available")}this.dateIsNotAvailable(o,a)&&i.classList.add("not-available")}if(this.options.presets&&r==="PresetPluginButton"){let a=new de(Number(i.dataset.start)),s=new de(Number(i.dataset.end)),l=s.diff(a,"day"),u=this.options.minDays&&l<this.options.minDays,h=this.options.maxDays&&l>this.options.maxDays;(u||h||this.lockMinDate(a)||this.lockMaxDate(a)||this.lockMinDate(s)||this.lockMaxDate(s)||this.rangeIsNotAvailable(a,s))&&i.setAttribute("disabled","disabled")}}dateIsNotAvailable(e,r){return this.lockMinDate(e)||this.lockMaxDate(e)||this.lockMinDays(e,r)||this.lockMaxDays(e,r)||this.lockSelectForward(e)||this.lockSelectBackward(e)}rangeIsNotAvailable(e,r){if(!e||!r)return!1;let i=(e.isSameOrBefore(r,"day")?e:r).clone(),o=(r.isSameOrAfter(e,"day")?r:e).clone();for(;i.isSameOrBefore(o,"day");){if(this.testFilter(i))return!0;i.add(1,"day")}return!1}lockMinDate(e){return this.options.minDate instanceof de&&e.isBefore(this.options.minDate,"day")}lockMaxDate(e){return this.options.maxDate instanceof de&&e.isAfter(this.options.maxDate,"day")}lockMinDays(e,r){if(this.options.minDays&&r){let i=r.clone().subtract(this.options.minDays-1,"day"),o=r.clone().add(this.options.minDays-1,"day");return e.isBetween(i,o)}return!1}lockMaxDays(e,r){if(this.options.maxDays&&r){let i=r.clone().subtract(this.options.maxDays,"day"),o=r.clone().add(this.options.maxDays,"day");return!e.isBetween(i,o)}return!1}lockSelectForward(e){if(this.picker.datePicked.length===1&&this.options.selectForward){let r=this.picker.datePicked[0].clone();return e.isBefore(r,"day")}return!1}lockSelectBackward(e){if(this.picker.datePicked.length===1&&this.options.selectBackward){let r=this.picker.datePicked[0].clone();return e.isAfter(r,"day")}return!1}testFilter(e){return typeof this.options.filter=="function"&&this.options.filter(e,this.picker.datePicked)}};var aa=class extends Gi{constructor(){super(...arguments);O(this,"tooltipElement");O(this,"triggerElement");O(this,"binds",{setStartDate:this.setStartDate.bind(this),setEndDate:this.setEndDate.bind(this),setDateRange:this.setDateRange.bind(this),getStartDate:this.getStartDate.bind(this),getEndDate:this.getEndDate.bind(this),onView:this.onView.bind(this),onShow:this.onShow.bind(this),onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),onClickCalendarDay:this.onClickCalendarDay.bind(this),onClickApplyButton:this.onClickApplyButton.bind(this),parseValues:this.parseValues.bind(this),updateValues:this.updateValues.bind(this),clear:this.clear.bind(this)});O(this,"options",{elementEnd:null,startDate:null,endDate:null,repick:!1,strict:!0,delimiter:" - ",tooltip:!0,tooltipNumber:e=>e,locale:{zero:"",one:"day",two:"",few:"",many:"",other:"days"},documentClick:this.hidePicker.bind(this)})}getName(){return"RangePlugin"}onAttach(){this.binds._setStartDate=this.picker.setStartDate,this.binds._setEndDate=this.picker.setEndDate,this.binds._setDateRange=this.picker.setDateRange,this.binds._getStartDate=this.picker.getStartDate,this.binds._getEndDate=this.picker.getEndDate,this.binds._parseValues=this.picker.parseValues,this.binds._updateValues=this.picker.updateValues,this.binds._clear=this.picker.clear,this.binds._onClickCalendarDay=this.picker.onClickCalendarDay,this.binds._onClickApplyButton=this.picker.onClickApplyButton,Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds.setStartDate},setEndDate:{configurable:!0,value:this.binds.setEndDate},setDateRange:{configurable:!0,value:this.binds.setDateRange},getStartDate:{configurable:!0,value:this.binds.getStartDate},getEndDate:{configurable:!0,value:this.binds.getEndDate},parseValues:{configurable:!0,value:this.binds.parseValues},updateValues:{configurable:!0,value:this.binds.updateValues},clear:{configurable:!0,value:this.binds.clear},onClickCalendarDay:{configurable:!0,value:this.binds.onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds.onClickApplyButton}}),this.options.elementEnd&&(this.options.elementEnd instanceof HTMLElement||(this.options.elementEnd=this.picker.options.doc.querySelector(this.options.elementEnd)),this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.readOnly=this.picker.options.readonly),typeof this.picker.options.documentClick=="function"&&(document.removeEventListener("click",this.picker.options.documentClick,!0),typeof this.options.documentClick=="function"&&document.addEventListener("click",this.options.documentClick,!0)),this.options.elementEnd.addEventListener("click",this.picker.show.bind(this.picker))),this.options.repick=this.options.repick&&this.options.elementEnd instanceof HTMLElement,this.picker.options.date=null,this.picker.on("view",this.binds.onView),this.picker.on("show",this.binds.onShow),this.picker.on("mouseenter",this.binds.onMouseEnter,!0),this.picker.on("mouseleave",this.binds.onMouseLeave,!0),this.checkIntlPluralLocales()}onDetach(){Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds._setStartDate},setEndDate:{configurable:!0,value:this.binds._setEndDate},setDateRange:{configurable:!0,value:this.binds._setDateRange},getStartDate:{configurable:!0,value:this.binds._getStartDate},getEndDate:{configurable:!0,value:this.binds._getEndDate},parseValues:{configurable:!0,value:this.binds._parseValues},updateValues:{configurable:!0,value:this.binds._updateValues},clear:{configurable:!0,value:this.binds._clear},onClickCalendarDay:{configurable:!0,value:this.binds._onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds._onClickApplyButton}}),this.picker.off("view",this.binds.onView),this.picker.off("show",this.binds.onShow),this.picker.off("mouseenter",this.binds.onMouseEnter,!0),this.picker.off("mouseleave",this.binds.onMouseLeave,!0)}parseValues(){if(this.options.startDate||this.options.endDate)this.options.strict?this.options.startDate&&this.options.endDate?this.setDateRange(this.options.startDate,this.options.endDate):(this.options.startDate=null,this.options.endDate=null):(this.options.startDate&&this.setStartDate(this.options.startDate),this.options.endDate&&this.setEndDate(this.options.endDate));else if(this.options.elementEnd)this.options.strict?this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setDateRange(this.picker.options.element.value,this.options.elementEnd.value):(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.setStartDate(this.picker.options.element.value),this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setEndDate(this.options.elementEnd.value));else if(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length){let[e,r]=this.picker.options.element.value.split(this.options.delimiter);this.options.strict?e&&r&&this.setDateRange(e,r):(e&&this.setStartDate(e),r&&this.setEndDate(r))}}updateValues(){let e=this.picker.options.element,r=this.options.elementEnd,i=this.picker.getStartDate(),o=this.picker.getEndDate(),a=i instanceof Date?i.format(this.picker.options.format,this.picker.options.lang):"",s=o instanceof Date?o.format(this.picker.options.format,this.picker.options.lang):"";if(r)e instanceof HTMLInputElement?e.value=a:e instanceof HTMLElement&&(e.innerText=a),r instanceof HTMLInputElement?r.value=s:r instanceof HTMLElement&&(r.innerText=s);else{let l=`${a}${a||s?this.options.delimiter:""}${s}`;e instanceof HTMLInputElement?e.value=l:e instanceof HTMLElement&&(e.innerText=l)}}clear(){this.options.startDate=null,this.options.endDate=null,this.picker.datePicked.length=0,this.updateValues(),this.picker.renderAll(),this.picker.trigger("clear")}onShow(e){let{target:r}=e.detail;this.triggerElement=r,this.picker.options.scrollToDate&&this.getStartDate()instanceof Date&&this.picker.gotoDate(this.getStartDate()),this.initializeRepick()}onView(e){let{view:r,target:i}=e.detail;if(r==="Main"&&(this.tooltipElement=document.createElement("span"),this.tooltipElement.className="range-plugin-tooltip",i.appendChild(this.tooltipElement)),r==="CalendarDay"){let o=new de(i.dataset.time),a=this.picker.datePicked,s=a.length?this.picker.datePicked[0]:this.getStartDate(),l=a.length?this.picker.datePicked[1]:this.getEndDate();s&&s.isSame(o,"day")&&i.classList.add("start"),s&&l&&(l.isSame(o,"day")&&i.classList.add("end"),o.isBetween(s,l)&&i.classList.add("in-range"))}if(r==="Footer"){let o=this.picker.datePicked.length===1&&!this.options.strict||this.picker.datePicked.length===2;i.querySelector(".apply-button").disabled=!o}}hidePicker(e){let r=e.target,i=null;r.shadowRoot&&(r=e.composedPath()[0],i=r.getRootNode().host),this.picker.isShown()&&i!==this.picker.ui.wrapper&&r!==this.picker.options.element&&r!==this.options.elementEnd&&this.picker.hide()}setStartDate(e){let r=new de(e,this.picker.options.format);this.options.startDate=r?r.clone():null,this.updateValues(),this.picker.renderAll()}setEndDate(e){let r=new de(e,this.picker.options.format);this.options.endDate=r?r.clone():null,this.updateValues(),this.picker.renderAll()}setDateRange(e,r){let i=new de(e,this.picker.options.format),o=new de(r,this.picker.options.format);this.options.startDate=i?i.clone():null,this.options.endDate=o?o.clone():null,this.updateValues(),this.picker.renderAll()}getStartDate(){return this.options.startDate instanceof Date?this.options.startDate.clone():null}getEndDate(){return this.options.endDate instanceof Date?this.options.endDate.clone():null}onMouseEnter(e){let r=e.target;if(r instanceof HTMLElement){this.isContainer(r)&&this.initializeRepick();let i=r.closest(".unit");if(!(i instanceof HTMLElement))return;if(this.picker.isCalendarDay(i)){if(this.picker.datePicked.length!==1)return;let o=this.picker.datePicked[0].clone(),a=new de(i.dataset.time),s=!1;if(o.isAfter(a,"day")){let l=o.clone();o=a.clone(),a=l.clone(),s=!0}if([...this.picker.ui.container.querySelectorAll(".day")].forEach(l=>{let u=new de(l.dataset.time),h=this.picker.Calendar.getCalendarDayView(u);u.isBetween(o,a)&&h.classList.add("in-range"),u.isSame(this.picker.datePicked[0],"day")&&(h.classList.add("start"),h.classList.toggle("flipped",s)),l===i&&(h.classList.add("end"),h.classList.toggle("flipped",s)),l.className=h.className}),this.options.tooltip){let l=this.options.tooltipNumber(a.diff(o,"day")+1);if(l>0){let u=new Intl.PluralRules(this.picker.options.lang).select(l),h=`${l} ${this.options.locale[u]}`;this.showTooltip(i,h)}else this.hideTooltip()}}}}onMouseLeave(e){if(this.isContainer(e.target)&&this.options.repick){let r=this.getStartDate(),i=this.getEndDate();r&&i&&(this.picker.datePicked.length=0,this.picker.renderAll())}}onClickCalendarDay(e){if(this.picker.isCalendarDay(e)){this.picker.datePicked.length===2&&(this.picker.datePicked.length=0);let r=new de(e.dataset.time);if(this.picker.datePicked[this.picker.datePicked.length]=r,this.picker.datePicked.length===2&&this.picker.datePicked[0].isAfter(this.picker.datePicked[1])){let i=this.picker.datePicked[1].clone();this.picker.datePicked[1]=this.picker.datePicked[0].clone(),this.picker.datePicked[0]=i.clone()}this.picker.datePicked.length!==1&&this.picker.options.autoApply||this.picker.trigger("preselect",{start:this.picker.datePicked[0]instanceof Date?this.picker.datePicked[0].clone():null,end:this.picker.datePicked[1]instanceof Date?this.picker.datePicked[1].clone():null}),this.picker.datePicked.length===1&&(!this.options.strict&&this.picker.options.autoApply&&(this.picker.options.element===this.triggerElement&&this.setStartDate(this.picker.datePicked[0]),this.options.elementEnd===this.triggerElement&&this.setEndDate(this.picker.datePicked[0]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()})),this.picker.renderAll()),this.picker.datePicked.length===2&&(this.picker.options.autoApply?(this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide()):(this.hideTooltip(),this.picker.renderAll()))}}onClickApplyButton(e){this.picker.isApplyButton(e)&&(this.picker.datePicked.length!==1||this.options.strict||(this.picker.options.element===this.triggerElement&&(this.options.endDate=null,this.setStartDate(this.picker.datePicked[0])),this.options.elementEnd===this.triggerElement&&(this.options.startDate=null,this.setEndDate(this.picker.datePicked[0]))),this.picker.datePicked.length===2&&this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide())}showTooltip(e,r){this.tooltipElement.style.visibility="visible",this.tooltipElement.innerHTML=r;let i=this.picker.ui.container.getBoundingClientRect(),o=this.tooltipElement.getBoundingClientRect(),a=e.getBoundingClientRect(),s=a.top,l=a.left;s-=i.top,l-=i.left,s-=o.height,l-=o.width/2,l+=a.width/2,this.tooltipElement.style.top=`${s}px`,this.tooltipElement.style.left=`${l}px`}hideTooltip(){this.tooltipElement.style.visibility="hidden"}checkIntlPluralLocales(){if(!this.options.tooltip)return;let e=[...new Set([new Intl.PluralRules(this.picker.options.lang).select(0),new Intl.PluralRules(this.picker.options.lang).select(1),new Intl.PluralRules(this.picker.options.lang).select(2),new Intl.PluralRules(this.picker.options.lang).select(6),new Intl.PluralRules(this.picker.options.lang).select(18)])],r=Object.keys(this.options.locale);e.every(i=>r.includes(i))||console.warn(`${this.getName()}: provide locales (${e.join(", ")}) for correct tooltip text.`)}initializeRepick(){if(!this.options.repick)return;let e=this.getStartDate(),r=this.getEndDate();r&&this.triggerElement===this.picker.options.element&&(this.picker.datePicked[0]=r),e&&this.triggerElement===this.options.elementEnd&&(this.picker.datePicked[0]=e)}isContainer(e){return e===this.picker.ui.container}};var sa=class extends Gi{constructor(){super(...arguments);O(this,"rangePlugin");O(this,"lockPlugin");O(this,"priority",10);O(this,"binds",{onView:this.onView.bind(this),onColorScheme:this.onColorScheme.bind(this)});O(this,"options",{dropdown:{months:!1,years:!1,minYear:1950,maxYear:null},darkMode:!0,locale:{resetButton:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></svg>'}});O(this,"matchMedia")}getName(){return"AmpPlugin"}onAttach(){this.options.darkMode&&window&&"matchMedia"in window&&(this.matchMedia=window.matchMedia("(prefers-color-scheme: dark)"),this.matchMedia.matches&&(this.picker.ui.container.dataset.theme="dark"),this.matchMedia.addEventListener("change",this.binds.onColorScheme)),this.options.weekNumbers&&this.picker.ui.container.classList.add("week-numbers"),this.picker.on("view",this.binds.onView)}onDetach(){this.options.darkMode&&window&&"matchMedia"in window&&this.matchMedia.removeEventListener("change",this.binds.onColorScheme),this.picker.ui.container.removeAttribute("data-theme"),this.picker.ui.container.classList.remove("week-numbers"),this.picker.off("view",this.binds.onView)}onView(e){this.lockPlugin=this.picker.PluginManager.getInstance("LockPlugin"),this.rangePlugin=this.picker.PluginManager.getInstance("RangePlugin"),this.handleDropdown(e),this.handleResetButton(e),this.handleWeekNumbers(e)}onColorScheme(e){let r=e.matches?"dark":"light";this.picker.ui.container.dataset.theme=r}handleDropdown(e){let{view:r,target:i,date:o,index:a}=e.detail;if(r==="CalendarHeader"){let s=i.querySelector(".month-name");if(this.options.dropdown.months){s.childNodes[0].remove();let l=document.createElement("select");l.className="month-name--select month-name--dropdown";for(let u=0;u<12;u+=1){let h=document.createElement("option"),p=new de(new Date(o.getFullYear(),u,2,0,0,0)),y=new de(new Date(o.getFullYear(),u,1,0,0,0));h.value=String(u),h.text=p.toLocaleString(this.picker.options.lang,{month:"long"}),this.lockPlugin&&(h.disabled=this.lockPlugin.options.minDate&&y.isBefore(new de(this.lockPlugin.options.minDate),"month")||this.lockPlugin.options.maxDate&&y.isAfter(new de(this.lockPlugin.options.maxDate),"month")),h.selected=y.getMonth()===o.getMonth(),l.appendChild(h)}l.addEventListener("change",u=>{let h=u.target;this.picker.calendars[0].setDate(1),this.picker.calendars[0].setMonth(Number(h.value)),this.picker.renderAll()}),s.prepend(l)}if(this.options.dropdown.years){s.childNodes[1].remove();let l=document.createElement("select");l.className="month-name--select";let u=this.options.dropdown.minYear,h=this.options.dropdown.maxYear?this.options.dropdown.maxYear:new Date().getFullYear();if(o.getFullYear()>h){let p=document.createElement("option");p.value=String(o.getFullYear()),p.text=String(o.getFullYear()),p.selected=!0,p.disabled=!0,l.appendChild(p)}for(let p=h;p>=u;p-=1){let y=document.createElement("option"),E=new de(new Date(p,0,1,0,0,0));y.value=String(p),y.text=String(p),this.lockPlugin&&(y.disabled=this.lockPlugin.options.minDate&&E.isBefore(new de(this.lockPlugin.options.minDate),"year")||this.lockPlugin.options.maxDate&&E.isAfter(new de(this.lockPlugin.options.maxDate),"year")),y.selected=o.getFullYear()===p,l.appendChild(y)}if(o.getFullYear()<u){let p=document.createElement("option");p.value=String(o.getFullYear()),p.text=String(o.getFullYear()),p.selected=!0,p.disabled=!0,l.appendChild(p)}if(this.options.dropdown.years==="asc"){let p=Array.prototype.slice.call(l.childNodes).reverse();l.innerHTML="",p.forEach(y=>{y.innerHTML=y.value,l.appendChild(y)})}l.addEventListener("change",p=>{let y=p.target;this.picker.calendars[0].setFullYear(Number(y.value)),this.picker.renderAll()}),s.appendChild(l)}}}handleResetButton(e){let{view:r,target:i}=e.detail;if(r==="CalendarHeader"&&this.options.resetButton){let o=document.createElement("button");o.className="reset-button unit",o.innerHTML=this.options.locale.resetButton,o.addEventListener("click",a=>{a.preventDefault();let s=!0;typeof this.options.resetButton=="function"&&(s=this.options.resetButton.call(this)),s&&this.picker.clear()}),i.appendChild(o)}}handleWeekNumbers(e){if(this.options.weekNumbers){let{view:r,target:i}=e.detail;if(r==="CalendarDayNames"){let o=document.createElement("div");o.className="wnum-header",o.innerHTML="Wk",i.prepend(o)}r==="CalendarDays"&&[...i.children].forEach((o,a)=>{if(a===0||a%7==0){let s;if(o.classList.contains("day"))s=new de(o.dataset.time);else{let h=i.querySelector(".day");s=new de(h.dataset.time)}let l=s.getWeek(this.picker.options.firstDay);l===53&&s.getMonth()===0&&(l="53/1");let u=document.createElement("div");u.className="wnum-item",u.innerHTML=String(l),i.insertBefore(u,o)}})}}};var la=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],qn={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var ua={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},da=ua;var nt=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},xt=function(n){return n===!0?1:0};function vc(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var ha=function(n){return n instanceof Array?n:[n]};function rt(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function be(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function Ji(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function wc(n,t){if(t(n))return n;if(n.parentNode)return wc(n.parentNode,t)}function Xi(n,t){var e=be("div","numInputWrapper"),r=be("input","numInput "+n),i=be("span","arrowUp"),o=be("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return e.appendChild(r),e.appendChild(i),e.appendChild(o),e}function Rt(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch{return n.target}}var bc=function(){},Qi=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},ud={D:bc,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*xt(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:bc,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:bc,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},In={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},jr={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[jr.w(n,t,e)]},F:function(n,t,e){return Qi(jr.n(n,t,e)-1,!1,t)},G:function(n,t,e){return nt(jr.h(n,t,e))},H:function(n){return nt(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[xt(n.getHours()>11)]},M:function(n,t){return Qi(n.getMonth(),!0,t)},S:function(n){return nt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return nt(n.getFullYear(),4)},d:function(n){return nt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return nt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return nt(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}};var Dc=function(n){var t=n.config,e=t===void 0?qn:t,r=n.l10n,i=r===void 0?ua:r,o=n.isMobile,a=o===void 0?!1:o;return function(s,l,u){var h=u||i;return e.formatDate!==void 0&&!a?e.formatDate(s,l,h):l.split("").map(function(p,y,E){return jr[p]&&E[y-1]!=="\\"?jr[p](s,h,e):p!=="\\"?p:""}).join("")}},ma=function(n){var t=n.config,e=t===void 0?qn:t,r=n.l10n,i=r===void 0?ua:r;return function(o,a,s,l){if(!(o!==0&&!o)){var u=l||i,h,p=o;if(o instanceof Date)h=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)h=new Date(o);else if(typeof o=="string"){var y=a||(e||qn).dateFormat,E=String(o).trim();if(E==="today")h=new Date,s=!0;else if(e&&e.parseDate)h=e.parseDate(o,y);else if(/Z$/.test(E)||/GMT$/.test(E))h=new Date(o);else{for(var T=void 0,C=[],L=0,B=0,K="";L<y.length;L++){var W=y[L],Q=W==="\\",te=y[L-1]==="\\"||Q;if(In[W]&&!te){K+=In[W];var oe=new RegExp(K).exec(o);oe&&(T=!0)&&C[W!=="Y"?"push":"unshift"]({fn:ud[W],val:oe[++B]})}else Q||(K+=".")}h=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),C.forEach(function(Me){var Ee=Me.fn,ie=Me.val;return h=Ee(h,ie,u)||h}),h=T?h:void 0}}if(!(h instanceof Date&&!isNaN(h.getTime()))){e.errorHandler(new Error("Invalid date provided: "+p));return}return s===!0&&h.setHours(0,0,0,0),h}}};function At(n,t,e){return e===void 0&&(e=!0),e!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}var dd=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},pa=function(n,t,e){return n*3600+t*60+e},hd=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},md={DAY:864e5};function fa(n){var t=n.defaultHour,e=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),o=n.minDate.getMinutes(),a=n.minDate.getSeconds();t<i&&(t=i),t===i&&e<o&&(e=o),t===i&&e===o&&r<a&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var s=n.maxDate.getHours(),l=n.maxDate.getMinutes();t=Math.min(t,s),t===s&&(e=Math.min(l,e)),t===s&&e===l&&(r=n.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(l){return n[l]=s[l]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return n});var it=function(){return it=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},it.apply(this,arguments)},pd=function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},Tm=300;function Cm(n,t){var e={config:it(it({},qn),ze.defaultConfig),l10n:da};e.parseDate=ma({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=C,e._setHoursFromDate=y,e._positionCalendar=Pn,e.changeMonth=_,e.changeYear=J,e.clear=I,e.close=k,e.onMouseOver=fe,e._createElement=be,e.createDay=oe,e.destroy=H,e.isEnabled=U,e.jumpToDate=K,e.updateValue=hn,e.open=Ie,e.redraw=no,e.set=Dd,e.setDate=Ed,e.toggle=kd;function r(){e.utils={getDaysInMonth:function(f,w){return f===void 0&&(f=e.currentMonth),w===void 0&&(w=e.currentYear),f===1&&(w%4===0&&w%100!==0||w%400===0)?29:e.l10n.daysInMonth[f]}}}function i(){e.element=e.input=n,e.isOpen=!1,Xe(),Wn(),Md(),_d(),r(),e.isMobile||te(),B(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&y(e.config.noCalendar?e.latestSelectedDateObj:void 0),hn(!1)),s();var f=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&f&&Pn(),Le("onReady")}function o(){var f;return((f=e.calendarContainer)===null||f===void 0?void 0:f.getRootNode()).activeElement||document.activeElement}function a(f){return f.bind(e)}function s(){var f=e.config;f.weekNumbers===!1&&f.showMonths===1||f.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var w=(e.days.offsetWidth+1)*f.showMonths;e.daysContainer.style.width=w+"px",e.calendarContainer.style.width=w+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(f){if(e.selectedDates.length===0){var w=e.config.minDate===void 0||At(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),M=fa(e.config);w.setHours(M.hours,M.minutes,M.seconds,w.getMilliseconds()),e.selectedDates=[w],e.latestSelectedDateObj=w}f!==void 0&&f.type!=="blur"&&Id(f);var x=e._input.value;p(),hn(),e._input.value!==x&&e._debouncedChange()}function u(f,w){return f%12+12*xt(w===e.l10n.amPM[1])}function h(f){switch(f%24){case 0:case 12:return 12;default:return f%12}}function p(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var f=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,w=(parseInt(e.minuteElement.value,10)||0)%60,M=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(f=u(f,e.amPM.textContent));var x=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&At(e.latestSelectedDateObj,e.config.minDate,!0)===0,z=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&At(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var q=pa(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),he=pa(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),G=pa(f,w,M);if(G>he&&G<q){var ge=hd(q);f=ge[0],w=ge[1],M=ge[2]}}else{if(z){var Z=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;f=Math.min(f,Z.getHours()),f===Z.getHours()&&(w=Math.min(w,Z.getMinutes())),w===Z.getMinutes()&&(M=Math.min(M,Z.getSeconds()))}if(x){var ae=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;f=Math.max(f,ae.getHours()),f===ae.getHours()&&w<ae.getMinutes()&&(w=ae.getMinutes()),w===ae.getMinutes()&&(M=Math.max(M,ae.getSeconds()))}}E(f,w,M)}}function y(f){var w=f||e.latestSelectedDateObj;w&&w instanceof Date&&E(w.getHours(),w.getMinutes(),w.getSeconds())}function E(f,w,M){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(f%24,w,M||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=nt(e.config.time_24hr?f:(12+f)%12+12*xt(f%12===0)),e.minuteElement.value=nt(w),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[xt(f>=12)]),e.secondElement!==void 0&&(e.secondElement.value=nt(M)))}function T(f){var w=Rt(f),M=parseInt(w.value)+(f.delta||0);(M/1e3>1||f.key==="Enter"&&!/[^\d]/.test(M.toString()))&&J(M)}function C(f,w,M,x){if(w instanceof Array)return w.forEach(function(z){return C(f,z,M,x)});if(f instanceof Array)return f.forEach(function(z){return C(z,w,M,x)});f.addEventListener(w,M,x),e._handlers.push({remove:function(){return f.removeEventListener(w,M,x)}})}function L(){Le("onChange")}function B(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(M){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+M+"]"),function(x){return C(x,"click",e[M])})}),e.isMobile){Sd();return}var f=vc(ve,50);if(e._debouncedChange=vc(L,Tm),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&C(e.daysContainer,"mouseover",function(M){e.config.mode==="range"&&fe(Rt(M))}),C(e._input,"keydown",le),e.calendarContainer!==void 0&&C(e.calendarContainer,"keydown",le),!e.config.inline&&!e.config.static&&C(window,"resize",f),window.ontouchstart!==void 0?C(window.document,"touchstart",V):C(window.document,"mousedown",V),C(window.document,"focus",V,{capture:!0}),e.config.clickOpens===!0&&(C(e._input,"focus",e.open),C(e._input,"click",e.open)),e.daysContainer!==void 0&&(C(e.monthNav,"click",Cd),C(e.monthNav,["keyup","increment"],T),C(e.daysContainer,"click",_c)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var w=function(M){return Rt(M).select()};C(e.timeContainer,["increment"],l),C(e.timeContainer,"blur",l,{capture:!0}),C(e.timeContainer,"click",W),C([e.hourElement,e.minuteElement],["focus","click"],w),e.secondElement!==void 0&&C(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&C(e.amPM,"click",function(M){l(M)})}e.config.allowInput&&C(e._input,"blur",re)}function K(f,w){var M=f!==void 0?e.parseDate(f):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),x=e.currentYear,z=e.currentMonth;try{M!==void 0&&(e.currentYear=M.getFullYear(),e.currentMonth=M.getMonth())}catch(q){q.message="Invalid date supplied: "+M,e.config.errorHandler(q)}w&&e.currentYear!==x&&(Le("onYearChange"),ee()),w&&(e.currentYear!==x||e.currentMonth!==z)&&Le("onMonthChange"),e.redraw()}function W(f){var w=Rt(f);~w.className.indexOf("arrow")&&Q(f,w.classList.contains("arrowUp")?1:-1)}function Q(f,w,M){var x=f&&Rt(f),z=M||x&&x.parentNode&&x.parentNode.firstChild,q=ba("increment");q.delta=w,z&&z.dispatchEvent(q)}function te(){var f=window.document.createDocumentFragment();if(e.calendarContainer=be("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(f.appendChild(c()),e.innerContainer=be("div","flatpickr-innerContainer"),e.config.weekNumbers){var w=b(),M=w.weekWrapper,x=w.weekNumbers;e.innerContainer.appendChild(M),e.weekNumbers=x,e.weekWrapper=M}e.rContainer=be("div","flatpickr-rContainer"),e.rContainer.appendChild(v()),e.daysContainer||(e.daysContainer=be("div","flatpickr-days"),e.daysContainer.tabIndex=-1),F(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),f.appendChild(e.innerContainer)}e.config.enableTime&&f.appendChild(d()),rt(e.calendarContainer,"rangeMode",e.config.mode==="range"),rt(e.calendarContainer,"animate",e.config.animate===!0),rt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(f);var z=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!z&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var q=be("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(q,e.element),q.appendChild(e.element),e.altInput&&q.appendChild(e.altInput),q.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function oe(f,w,M,x){var z=U(w,!0),q=be("span",f,w.getDate().toString());return q.dateObj=w,q.$i=x,q.setAttribute("aria-label",e.formatDate(w,e.config.ariaDateFormat)),f.indexOf("hidden")===-1&&At(w,e.now)===0&&(e.todayDateElem=q,q.classList.add("today"),q.setAttribute("aria-current","date")),z?(q.tabIndex=-1,Da(w)&&(q.classList.add("selected"),e.selectedDateElem=q,e.config.mode==="range"&&(rt(q,"startRange",e.selectedDates[0]&&At(w,e.selectedDates[0],!0)===0),rt(q,"endRange",e.selectedDates[1]&&At(w,e.selectedDates[1],!0)===0),f==="nextMonthDay"&&q.classList.add("inRange")))):q.classList.add("flatpickr-disabled"),e.config.mode==="range"&&Td(w)&&!Da(w)&&q.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&f!=="prevMonthDay"&&x%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(w)+"</span>"),Le("onDayCreate",q),q}function Me(f){f.focus(),e.config.mode==="range"&&fe(f)}function Ee(f){for(var w=f>0?0:e.config.showMonths-1,M=f>0?e.config.showMonths:-1,x=w;x!=M;x+=f)for(var z=e.daysContainer.children[x],q=f>0?0:z.children.length-1,he=f>0?z.children.length:-1,G=q;G!=he;G+=f){var ge=z.children[G];if(ge.className.indexOf("hidden")===-1&&U(ge.dateObj))return ge}}function ie(f,w){for(var M=f.className.indexOf("Month")===-1?f.dateObj.getMonth():e.currentMonth,x=w>0?e.config.showMonths:-1,z=w>0?1:-1,q=M-e.currentMonth;q!=x;q+=z)for(var he=e.daysContainer.children[q],G=M-e.currentMonth===q?f.$i+w:w<0?he.children.length-1:0,ge=he.children.length,Z=G;Z>=0&&Z<ge&&Z!=(w>0?ge:-1);Z+=z){var ae=he.children[Z];if(ae.className.indexOf("hidden")===-1&&U(ae.dateObj)&&Math.abs(f.$i-Z)>=Math.abs(w))return Me(ae)}e.changeMonth(z),N(Ee(z),0)}function N(f,w){var M=o(),x=j(M||document.body),z=f!==void 0?f:x?M:e.selectedDateElem!==void 0&&j(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&j(e.todayDateElem)?e.todayDateElem:Ee(w>0?1:-1);z===void 0?e._input.focus():x?ie(z,w):Me(z)}function Y(f,w){for(var M=(new Date(f,w,1).getDay()-e.l10n.firstDayOfWeek+7)%7,x=e.utils.getDaysInMonth((w-1+12)%12,f),z=e.utils.getDaysInMonth(w,f),q=window.document.createDocumentFragment(),he=e.config.showMonths>1,G=he?"prevMonthDay hidden":"prevMonthDay",ge=he?"nextMonthDay hidden":"nextMonthDay",Z=x+1-M,ae=0;Z<=x;Z++,ae++)q.appendChild(oe("flatpickr-day "+G,new Date(f,w-1,Z),Z,ae));for(Z=1;Z<=z;Z++,ae++)q.appendChild(oe("flatpickr-day",new Date(f,w,Z),Z,ae));for(var Se=z+1;Se<=42-M&&(e.config.showMonths===1||ae%7!==0);Se++,ae++)q.appendChild(oe("flatpickr-day "+ge,new Date(f,w+1,Se%z),Se,ae));var en=be("div","dayContainer");return en.appendChild(q),en}function F(){if(e.daysContainer!==void 0){Ji(e.daysContainer),e.weekNumbers&&Ji(e.weekNumbers);for(var f=document.createDocumentFragment(),w=0;w<e.config.showMonths;w++){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),f.appendChild(Y(M.getFullYear(),M.getMonth()))}e.daysContainer.appendChild(f),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&fe()}}function ee(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var f=function(x){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&x<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&x>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var w=0;w<12;w++)if(f(w)){var M=be("option","flatpickr-monthDropdown-month");M.value=new Date(e.currentYear,w).getMonth().toString(),M.textContent=Qi(w,e.config.shorthandCurrentMonth,e.l10n),M.tabIndex=-1,e.currentMonth===w&&(M.selected=!0),e.monthsDropdownContainer.appendChild(M)}}}function g(){var f=be("div","flatpickr-month"),w=window.document.createDocumentFragment(),M;e.config.showMonths>1||e.config.monthSelectorType==="static"?M=be("span","cur-month"):(e.monthsDropdownContainer=be("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),C(e.monthsDropdownContainer,"change",function(he){var G=Rt(he),ge=parseInt(G.value,10);e.changeMonth(ge-e.currentMonth),Le("onMonthChange")}),ee(),M=e.monthsDropdownContainer);var x=Xi("cur-year",{tabindex:"-1"}),z=x.getElementsByTagName("input")[0];z.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&z.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(z.setAttribute("max",e.config.maxDate.getFullYear().toString()),z.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var q=be("div","flatpickr-current-month");return q.appendChild(M),q.appendChild(x),w.appendChild(q),f.appendChild(w),{container:f,yearElement:z,monthElement:M}}function A(){Ji(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var f=e.config.showMonths;f--;){var w=g();e.yearElements.push(w.yearElement),e.monthElements.push(w.monthElement),e.monthNav.appendChild(w.container)}e.monthNav.appendChild(e.nextMonthNav)}function c(){return e.monthNav=be("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=be("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=be("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,A(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(f){e.__hidePrevMonthArrow!==f&&(rt(e.prevMonthNav,"flatpickr-disabled",f),e.__hidePrevMonthArrow=f)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(f){e.__hideNextMonthArrow!==f&&(rt(e.nextMonthNav,"flatpickr-disabled",f),e.__hideNextMonthArrow=f)}}),e.currentYearElement=e.yearElements[0],io(),e.monthNav}function d(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var f=fa(e.config);e.timeContainer=be("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var w=be("span","flatpickr-time-separator",":"),M=Xi("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=M.getElementsByTagName("input")[0];var x=Xi("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=x.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=nt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?f.hours:h(f.hours)),e.minuteElement.value=nt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():f.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(M),e.timeContainer.appendChild(w),e.timeContainer.appendChild(x),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var z=Xi("flatpickr-second");e.secondElement=z.getElementsByTagName("input")[0],e.secondElement.value=nt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():f.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(be("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(z)}return e.config.time_24hr||(e.amPM=be("span","flatpickr-am-pm",e.l10n.amPM[xt((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function v(){e.weekdayContainer?Ji(e.weekdayContainer):e.weekdayContainer=be("div","flatpickr-weekdays");for(var f=e.config.showMonths;f--;){var w=be("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(w)}return D(),e.weekdayContainer}function D(){if(e.weekdayContainer){var f=e.l10n.firstDayOfWeek,w=pd(e.l10n.weekdays.shorthand);f>0&&f<w.length&&(w=pd(w.splice(f,w.length),w.splice(0,f)));for(var M=e.config.showMonths;M--;)e.weekdayContainer.children[M].innerHTML=`
|
|
4
4
|
<span class='flatpickr-weekday'>
|
|
5
5
|
`+w.join("</span><span class='flatpickr-weekday'>")+`
|
|
6
6
|
</span>
|
|
7
|
-
`}}function b(){e.calendarContainer.classList.add("hasWeeks");var f=be("div","flatpickr-weekwrapper");f.appendChild(be("span","flatpickr-weekday",e.l10n.weekAbbreviation));var w=be("div","flatpickr-weeks");return f.appendChild(w),{weekWrapper:f,weekNumbers:w}}function _(f,w){w===void 0&&(w=!0);var M=w?f:f-e.currentMonth;M<0&&e._hidePrevMonthArrow===!0||M>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=M,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,Ae("onYearChange"),ee()),F(),Ae("onMonthChange"),io())}function I(f,w){if(f===void 0&&(f=!0),w===void 0&&(w=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,w===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var M=fa(e.config),x=M.hours,z=M.minutes,q=M.seconds;E(x,z,q)}e.redraw(),f&&Ae("onChange")}function k(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),Ae("onClose")}function H(){e.config!==void 0&&Ae("onDestroy");for(var f=e._handlers.length;f--;)e._handlers[f].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var w=e.calendarContainer.parentNode;if(w.lastChild&&w.removeChild(w.lastChild),w.parentNode){for(;w.firstChild;)w.parentNode.insertBefore(w.firstChild,w);w.parentNode.removeChild(w)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(M){try{delete e[M]}catch{}})}function R(f){return e.calendarContainer.contains(f)}function V(f){if(e.isOpen&&!e.config.inline){var w=Rt(f),M=R(w),x=w===e.input||w===e.altInput||e.element.contains(w)||f.path&&f.path.indexOf&&(~f.path.indexOf(e.input)||~f.path.indexOf(e.altInput)),z=!x&&!M&&!R(f.relatedTarget),q=!e.config.ignoredFocusElements.some(function(he){return he.contains(w)});z&&q&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function J(f){if(!(!f||e.config.minDate&&f<e.config.minDate.getFullYear()||e.config.maxDate&&f>e.config.maxDate.getFullYear())){var w=f,M=e.currentYear!==w;e.currentYear=w||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),M&&(e.redraw(),Ae("onYearChange"),ee())}}function U(f,w){var M;w===void 0&&(w=!0);var x=e.parseDate(f,void 0,w);if(e.config.minDate&&x&&At(x,e.config.minDate,w!==void 0?w:!e.minDateHasTime)<0||e.config.maxDate&&x&&At(x,e.config.maxDate,w!==void 0?w:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(x===void 0)return!1;for(var z=!!e.config.enable,q=(M=e.config.enable)!==null&&M!==void 0?M:e.config.disable,he=0,G=void 0;he<q.length;he++){if(G=q[he],typeof G=="function"&&G(x))return z;if(G instanceof Date&&x!==void 0&&G.getTime()===x.getTime())return z;if(typeof G=="string"){var ge=e.parseDate(G,void 0,!0);return ge&&ge.getTime()===x.getTime()?z:!z}else if(typeof G=="object"&&x!==void 0&&G.from&&G.to&&x.getTime()>=G.from.getTime()&&x.getTime()<=G.to.getTime())return z}return!z}function j(f){return e.daysContainer!==void 0?f.className.indexOf("hidden")===-1&&f.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(f):!1}function re(f){var w=f.target===e._input,M=e._input.value.trimEnd()!==Ea();w&&M&&!(f.relatedTarget&&R(f.relatedTarget))&&e.setDate(e._input.value,!0,f.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function le(f){var w=Rt(f),M=e.config.wrap?n.contains(w):w===e._input,x=e.config.allowInput,z=e.isOpen&&(!x||!M),q=e.config.inline&&M&&!x;if(f.keyCode===13&&M){if(x)return e.setDate(e._input.value,!0,w===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),w.blur();e.open()}else if(R(w)||z||q){var he=!!e.timeContainer&&e.timeContainer.contains(w);switch(f.keyCode){case 13:he?(f.preventDefault(),l(),wa()):_c(f);break;case 27:f.preventDefault(),wa();break;case 8:case 46:M&&!e.config.allowInput&&(f.preventDefault(),e.clear());break;case 37:case 39:if(!he&&!M){f.preventDefault();var G=o();if(e.daysContainer!==void 0&&(x===!1||G&&j(G))){var ge=f.keyCode===39?1:-1;f.ctrlKey?(f.stopPropagation(),_(ge),N(Ee(1),0)):N(void 0,ge)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:f.preventDefault();var Z=f.keyCode===40?1:-1;e.daysContainer&&w.$i!==void 0||w===e.input||w===e.altInput?f.ctrlKey?(f.stopPropagation(),J(e.currentYear-Z),N(Ee(1),0)):he||N(void 0,Z*7):w===e.currentYearElement?J(e.currentYear-Z):e.config.enableTime&&(!he&&e.hourElement&&e.hourElement.focus(),l(f),e._debouncedChange());break;case 9:if(he){var ae=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Lt){return Lt}),Se=ae.indexOf(w);if(Se!==-1){var en=ae[Se+(f.shiftKey?-1:1)];f.preventDefault(),(en||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(w)&&f.shiftKey&&(f.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&w===e.amPM)switch(f.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],p(),dn();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],p(),dn();break}(M||R(w))&&Ae("onKeyDown",f)}function fe(f,w){if(w===void 0&&(w="flatpickr-day"),!(e.selectedDates.length!==1||f&&(!f.classList.contains(w)||f.classList.contains("flatpickr-disabled")))){for(var M=f?f.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),z=Math.min(M,e.selectedDates[0].getTime()),q=Math.max(M,e.selectedDates[0].getTime()),he=!1,G=0,ge=0,Z=z;Z<q;Z+=md.DAY)U(new Date(Z),!0)||(he=he||Z>z&&Z<q,Z<x&&(!G||Z>G)?G=Z:Z>x&&(!ge||Z<ge)&&(ge=Z));var ae=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+w));ae.forEach(function(Se){var en=Se.dateObj,Lt=en.getTime(),Vr=G>0&&Lt<G||ge>0&&Lt>ge;if(Vr){Se.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(mr){Se.classList.remove(mr)});return}else if(he&&!Vr)return;["startRange","inRange","endRange","notAllowed"].forEach(function(mr){Se.classList.remove(mr)}),f!==void 0&&(f.classList.add(M<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<M&&Lt===x?Se.classList.add("startRange"):x>M&&Lt===x&&Se.classList.add("endRange"),Lt>=G&&(ge===0||Lt<=ge)&&dd(Lt,x,M)&&Se.classList.add("inRange"))})}}function ve(){e.isOpen&&!e.config.static&&!e.config.inline&&Pn()}function Ce(f,w){if(w===void 0&&(w=e._positionElement),e.isMobile===!0){if(f){f.preventDefault();var M=Rt(f);M&&M.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),Ae("onOpen");return}else if(e._input.disabled||e.config.inline)return;var x=e.isOpen;e.isOpen=!0,x||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),Ae("onOpen"),Pn(w)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(f===void 0||!e.timeContainer.contains(f.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function je(f){return function(w){var M=e.config["_"+f+"Date"]=e.parseDate(w,e.config.dateFormat),x=e.config["_"+(f==="min"?"max":"min")+"Date"];M!==void 0&&(e[f==="min"?"minDateHasTime":"maxDateHasTime"]=M.getHours()>0||M.getMinutes()>0||M.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(z){return U(z)}),!e.selectedDates.length&&f==="min"&&y(M),dn()),e.daysContainer&&(no(),M!==void 0?e.currentYearElement[f]=M.getFullYear().toString():e.currentYearElement.removeAttribute(f),e.currentYearElement.disabled=!!x&&M!==void 0&&x.getFullYear()===M.getFullYear())}}function Xe(){var f=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],w=it(it({},JSON.parse(JSON.stringify(n.dataset||{}))),t),M={};e.config.parseDate=w.parseDate,e.config.formatDate=w.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(ae){e.config._enable=Sc(ae)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(ae){e.config._disable=Sc(ae)}});var x=w.mode==="time";if(!w.dateFormat&&(w.enableTime||x)){var z=ze.defaultConfig.dateFormat||qn.dateFormat;M.dateFormat=w.noCalendar||x?"H:i"+(w.enableSeconds?":S":""):z+" H:i"+(w.enableSeconds?":S":"")}if(w.altInput&&(w.enableTime||x)&&!w.altFormat){var q=ze.defaultConfig.altFormat||qn.altFormat;M.altFormat=w.noCalendar||x?"h:i"+(w.enableSeconds?":S K":" K"):q+(" h:i"+(w.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:je("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:je("max")});var he=function(ae){return function(Se){e.config[ae==="min"?"_minTime":"_maxTime"]=e.parseDate(Se,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:he("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:he("max")}),w.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,M,w);for(var G=0;G<f.length;G++)e.config[f[G]]=e.config[f[G]]===!0||e.config[f[G]]==="true";la.filter(function(ae){return e.config[ae]!==void 0}).forEach(function(ae){e.config[ae]=ha(e.config[ae]||[]).map(a)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var G=0;G<e.config.plugins.length;G++){var ge=e.config.plugins[G](e)||{};for(var Z in ge)la.indexOf(Z)>-1?e.config[Z]=ha(ge[Z]).map(a).concat(e.config[Z]):typeof w[Z]>"u"&&(e.config[Z]=ge[Z])}w.altInputClass||(e.config.altInputClass=Bt().className+" "+e.config.altInputClass),Ae("onParseConfig")}function Bt(){return e.config.wrap?n.querySelector("[data-input]"):n}function Wn(){typeof e.config.locale!="object"&&typeof ze.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=it(it({},ze.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?ze.l10ns[e.config.locale]:void 0),In.D="("+e.l10n.weekdays.shorthand.join("|")+")",In.l="("+e.l10n.weekdays.longhand.join("|")+")",In.M="("+e.l10n.months.shorthand.join("|")+")",In.F="("+e.l10n.months.longhand.join("|")+")",In.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var f=it(it({},t),JSON.parse(JSON.stringify(n.dataset||{})));f.time_24hr===void 0&&ze.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Dc(e),e.parseDate=ma({config:e.config,l10n:e.l10n})}function Pn(f){if(typeof e.config.position=="function")return void e.config.position(e,f);if(e.calendarContainer!==void 0){Ae("onPreCalendarPosition");var w=f||e._positionElement,M=Array.prototype.reduce.call(e.calendarContainer.children,function(Fd,Hd){return Fd+Hd.offsetHeight},0),x=e.calendarContainer.offsetWidth,z=e.config.position.split(" "),q=z[0],he=z.length>1?z[1]:null,G=w.getBoundingClientRect(),ge=window.innerHeight-G.bottom,Z=q==="above"||q!=="below"&&ge<M&&G.top>M,ae=window.pageYOffset+G.top+(Z?-M-2:w.offsetHeight+2);if(rt(e.calendarContainer,"arrowTop",!Z),rt(e.calendarContainer,"arrowBottom",Z),!e.config.inline){var Se=window.pageXOffset+G.left,en=!1,Lt=!1;he==="center"?(Se-=(x-G.width)/2,en=!0):he==="right"&&(Se-=x-G.width,Lt=!0),rt(e.calendarContainer,"arrowLeft",!en&&!Lt),rt(e.calendarContainer,"arrowCenter",en),rt(e.calendarContainer,"arrowRight",Lt);var Vr=window.document.body.offsetWidth-(window.pageXOffset+G.right),mr=Se+x>window.document.body.offsetWidth,Pd=Vr+x>window.document.body.offsetWidth;if(rt(e.calendarContainer,"rightMost",mr),!e.config.static)if(e.calendarContainer.style.top=ae+"px",!mr)e.calendarContainer.style.left=Se+"px",e.calendarContainer.style.right="auto";else if(!Pd)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=Vr+"px";else{var _a=Ur();if(_a===void 0)return;var xd=window.document.body.offsetWidth,Rd=Math.max(0,xd/2-x/2),Ad=".flatpickr-calendar.centerMost:before",Ld=".flatpickr-calendar.centerMost:after",Nd=_a.cssRules.length,Od="{left:"+G.left+"px;right:auto;}";rt(e.calendarContainer,"rightMost",!1),rt(e.calendarContainer,"centerMost",!0),_a.insertRule(Ad+","+Ld+Od,Nd),e.calendarContainer.style.left=Rd+"px",e.calendarContainer.style.right="auto"}}}}function Ur(){for(var f=null,w=0;w<document.styleSheets.length;w++){var M=document.styleSheets[w];if(M.cssRules){try{M.cssRules}catch{continue}f=M;break}}return f??to()}function to(){var f=document.createElement("style");return document.head.appendChild(f),f.sheet}function no(){e.config.noCalendar||e.isMobile||(ee(),io(),F())}function wa(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function _c(f){f.preventDefault(),f.stopPropagation();var w=function(ae){return ae.classList&&ae.classList.contains("flatpickr-day")&&!ae.classList.contains("flatpickr-disabled")&&!ae.classList.contains("notAllowed")},M=wc(Rt(f),w);if(M!==void 0){var x=M,z=e.latestSelectedDateObj=new Date(x.dateObj.getTime()),q=(z.getMonth()<e.currentMonth||z.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=x,e.config.mode==="single")e.selectedDates=[z];else if(e.config.mode==="multiple"){var he=Da(z);he?e.selectedDates.splice(parseInt(he),1):e.selectedDates.push(z)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=z,e.selectedDates.push(z),At(z,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(ae,Se){return ae.getTime()-Se.getTime()}));if(p(),q){var G=e.currentYear!==z.getFullYear();e.currentYear=z.getFullYear(),e.currentMonth=z.getMonth(),G&&(Ae("onYearChange"),ee()),Ae("onMonthChange")}if(io(),F(),dn(),!q&&e.config.mode!=="range"&&e.config.showMonths===1?Me(x):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var ge=e.config.mode==="single"&&!e.config.enableTime,Z=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(ge||Z)&&wa()}L()}}var ro={locale:[Wn,D],showMonths:[A,s,v],minDate:[K],maxDate:[K],positionElement:[kc],clickOpens:[function(){e.config.clickOpens===!0?(C(e._input,"focus",e.open),C(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Dd(f,w){if(f!==null&&typeof f=="object"){Object.assign(e.config,f);for(var M in f)ro[M]!==void 0&&ro[M].forEach(function(x){return x()})}else e.config[f]=w,ro[f]!==void 0?ro[f].forEach(function(x){return x()}):la.indexOf(f)>-1&&(e.config[f]=ha(w));e.redraw(),dn(!0)}function Mc(f,w){var M=[];if(f instanceof Array)M=f.map(function(x){return e.parseDate(x,w)});else if(f instanceof Date||typeof f=="number")M=[e.parseDate(f,w)];else if(typeof f=="string")switch(e.config.mode){case"single":case"time":M=[e.parseDate(f,w)];break;case"multiple":M=f.split(e.config.conjunction).map(function(x){return e.parseDate(x,w)});break;case"range":M=f.split(e.l10n.rangeSeparator).map(function(x){return e.parseDate(x,w)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(f)));e.selectedDates=e.config.allowInvalidPreload?M:M.filter(function(x){return x instanceof Date&&U(x,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(x,z){return x.getTime()-z.getTime()})}function Ed(f,w,M){if(w===void 0&&(w=!1),M===void 0&&(M=e.config.dateFormat),f!==0&&!f||f instanceof Array&&f.length===0)return e.clear(w);Mc(f,M),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),K(void 0,w),y(),e.selectedDates.length===0&&e.clear(!1),dn(w),w&&Ae("onChange")}function Sc(f){return f.slice().map(function(w){return typeof w=="string"||typeof w=="number"||w instanceof Date?e.parseDate(w,void 0,!0):w&&typeof w=="object"&&w.from&&w.to?{from:e.parseDate(w.from,void 0),to:e.parseDate(w.to,void 0)}:w}).filter(function(w){return w})}function _d(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var f=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);f&&Mc(f,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Md(){if(e.input=Bt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=be(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),kc()}function kc(){e._positionElement=e.config.positionElement||e._input}function Sd(){var f=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=be("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=f,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=f==="datetime-local"?"Y-m-d\\TH:i:S":f==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}C(e.mobileInput,"change",function(w){e.setDate(Rt(w).value,!1,e.mobileFormatStr),Ae("onChange"),Ae("onClose")})}function kd(f){if(e.isOpen===!0)return e.close();e.open(f)}function Ae(f,w){if(e.config!==void 0){var M=e.config[f];if(M!==void 0&&M.length>0)for(var x=0;M[x]&&x<M.length;x++)M[x](e.selectedDates,e.input.value,e,w);f==="onChange"&&(e.input.dispatchEvent(ba("change")),e.input.dispatchEvent(ba("input")))}}function ba(f){var w=document.createEvent("Event");return w.initEvent(f,!0,!0),w}function Da(f){for(var w=0;w<e.selectedDates.length;w++){var M=e.selectedDates[w];if(M instanceof Date&&At(M,f)===0)return""+w}return!1}function Td(f){return e.config.mode!=="range"||e.selectedDates.length<2?!1:At(f,e.selectedDates[0])>=0&&At(f,e.selectedDates[1])<=0}function io(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(f,w){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[w].textContent=Qi(M.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=M.getMonth().toString(),f.value=M.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Ea(f){var w=f||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(M){return e.formatDate(M,w)}).filter(function(M,x,z){return e.config.mode!=="range"||e.config.enableTime||z.indexOf(M)===x}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function dn(f){f===void 0&&(f=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Ea(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Ea(e.config.altFormat)),f!==!1&&Ae("onValueUpdate")}function Cd(f){var w=Rt(f),M=e.prevMonthNav.contains(w),x=e.nextMonthNav.contains(w);M||x?_(M?-1:1):e.yearElements.indexOf(w)>=0?w.select():w.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):w.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Id(f){f.preventDefault();var w=f.type==="keydown",M=Rt(f),x=M;e.amPM!==void 0&&M===e.amPM&&(e.amPM.textContent=e.l10n.amPM[xt(e.amPM.textContent===e.l10n.amPM[0])]);var z=parseFloat(x.getAttribute("min")),q=parseFloat(x.getAttribute("max")),he=parseFloat(x.getAttribute("step")),G=parseInt(x.value,10),ge=f.delta||(w?f.which===38?1:-1:0),Z=G+he*ge;if(typeof x.value<"u"&&x.value.length===2){var ae=x===e.hourElement,Se=x===e.minuteElement;Z<z?(Z=q+Z+xt(!ae)+(xt(ae)&&xt(!e.amPM)),Se&&Q(void 0,-1,e.hourElement)):Z>q&&(Z=x===e.hourElement?Z-q-xt(!e.amPM):z,Se&&Q(void 0,1,e.hourElement)),e.amPM&&ae&&(he===1?Z+G===23:Math.abs(Z-G)>he)&&(e.amPM.textContent=e.l10n.amPM[xt(e.amPM.textContent===e.l10n.amPM[0])]),x.value=nt(Z)}}return i(),e}function zr(n,t){for(var e=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<e.length;i++){var o=e[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=Cm(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return zr(this,n)},HTMLElement.prototype.flatpickr=function(n){return zr([this],n)});var ze=function(n,t){return typeof n=="string"?zr(window.document.querySelectorAll(n),t):n instanceof Node?zr([n],t):zr(n,t)};ze.defaultConfig={};ze.l10ns={en:it({},da),default:it({},da)};ze.localize=function(n){ze.l10ns.default=it(it({},ze.l10ns.default),n)};ze.setDefaults=function(n){ze.defaultConfig=it(it({},ze.defaultConfig),n)};ze.parseDate=ma({});ze.formatDate=Dc({});ze.compareDates=At;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return zr(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window<"u"&&(window.flatpickr=ze);var fd=ze;var eo=class{constructor(t,e){this.dateInputEl=t;O(this,"minDate");O(this,"maxDate");O(this,"defaultReservationDays");O(this,"hasPrices",!1);O(this,"prices",{});O(this,"availability",{});O(this,"disabledDates",[]);O(this,"selectedStartDate");O(this,"selectedEndDate");O(this,"config");O(this,"instance");O(this,"destroyInstance");O(this,"currentDate");O(this,"handleResize",()=>{let t=this.isMobileDevice();(t&&this.config.grid!==1||!t&&this.config.grid!==2)&&(this.config.grid=t?1:2,this.config.calendars=t?1:2,this.destroyInstance&&this.destroyInstance(),this.initialize())});this.isMobileDevice()&&(e.grid=1,e.calendars=1),this.dateInputEl=t,this.defaultReservationDays=e.defaultReservationDays??3;let r=e.startWithEmptyDates??!1;this.config={...e,type:e.type,showPrices:e.showPrices??!1,defaultReservationDays:this.defaultReservationDays,grid:e.grid??2,calendars:e.calendars??2,darkMode:e.darkMode??!0,tooltip:e.tooltip??!0,repick:e.repick??!1,minDays:e.minDays??1,defaultStartDate:e.defaultStartDate??ne.getCurrentDate(),defaultEndDate:e.defaultEndDate??ne.getCurrentDate(),startWithEmptyDates:r},this.currentDate=ne.getCurrentDate(),this.selectedStartDate=r?null:this.config.defaultStartDate,this.selectedEndDate=r?null:this.config.defaultEndDate}isMobileDevice(){return window.innerWidth<=768}initialize(){switch(window.addEventListener("resize",this.handleResize),this.config.type){case"easepick":this.initEasepickCalendar();break;case"flatpickr":this.initFlatpickrCalendar();break;default:throw new Error(`Unsupported calendar type: ${this.config.type}`)}}setMinimumDate(t){this.minDate=t}setMaximumDate(t){this.maxDate=t}setStartDate(t){let e=ne.toJSDate(t),r=this.selectedEndDate?ne.toJSDate(this.selectedEndDate):e;this.selectedStartDate=t,this.instance instanceof ca.Core?this.instance.setStartDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setEndDate(t){let e=this.selectedStartDate?ne.toJSDate(this.selectedStartDate):ne.toJSDate(t),r=ne.toJSDate(t);this.selectedEndDate=t,this.instance instanceof ca.Core?this.instance.setEndDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setDateRange(t,e){if(this.config.type==="flatpickr"){this.selectedStartDate=t,this.selectedEndDate=e;let r=ne.toJSDate(t),i=ne.toJSDate(e);this.instance.setDate([r,i],!0);return}this.setStartDate(t),this.setEndDate(e)}getSelectedDates(){return{startDate:this.selectedStartDate,endDate:this.selectedEndDate}}includePrices(t=!0){this.hasPrices=t}setPrices(t){this.prices=t}setAvailability(t){this.availability=t,this.disabledDates=Object.keys(t).filter(e=>!t[e])}initEasepickCalendar(){let t={tooltip:this.config.tooltip,repick:this.config.repick,tooltipNumber:i=>i-1,locale:{one:"nuit",other:"nuits"}};this.config.startWithEmptyDates||(t.startDate=new de(this.config.defaultStartDate.toString()),t.endDate=new de(this.config.defaultEndDate.toString()));let e={element:this.dateInputEl,css:["https://cdn.jsdelivr.net/npm/@easepick/bundle@1.2.1/dist/index.css"],zIndex:10,format:qu,grid:this.config.grid,calendars:this.config.calendars,header:"",lang:document.documentElement.lang,RangePlugin:t,LockPlugin:{minDate:new de(this.minDate.toString()),minDays:this.config.minDays,selectForward:!0},AmpPlugin:{darkMode:this.config.darkMode},plugins:[sa,aa,oa],setup:i=>{i.on("view",o=>{let{view:a,date:s,target:l}=o.detail,u=s?s.format("YYYY-MM-DD"):null;if(a==="CalendarDay"&&u&&this.prices[u]){let h=this.prices[u],p=l.querySelector(`.${Go}`)||document.createElement("span");p.className=Go,p.textContent=`${h.toLocaleString(xn,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,p.style.color="#c64509",p.style.fontWeight="bold",p.style.fontSize="10px",l.append(p)}}),i.on("select",o=>{let{start:a,end:s}=o.detail;this.selectedStartDate=ne.fromString(a.format("YYYY-MM-DD")),this.selectedEndDate=ne.fromString(s.format("YYYY-MM-DD"));let l={startDate:a.format("YYYY-MM-DD").toString(),endDate:s.format("YYYY-MM-DD").toString()};ot("date:changed",l)})}},r=new ca.create(e);this.instance=r,this.destroyInstance=()=>r.destroy()}initFlatpickrCalendar(){let t=document.createElement("link");t.rel="stylesheet",t.href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.css",document.head.appendChild(t);let e=Pc(),r={mode:"range",showMonths:this.config.calendars,minDate:this.minDate.toString(),shorthandCurrentMonth:!0,monthSelectorType:"static",inline:!1,dateFormat:Wu,locale:{months:{shorthand:e,longhand:e}},zIndex:10,disable:this.disabledDates};this.config.startWithEmptyDates||(r.defaultDate=[this.config.defaultStartDate.toString(),this.config.defaultEndDate.toString()]),Object.assign(r,{onChange:o=>{let a=Je("label",this.dateInputEl);if(o.length===1){if(this.selectedStartDate=ne.fromJSDate(o[0]),this.selectedEndDate=null,ot("date:changed",{startDate:this.selectedStartDate.toString(),endDate:""}),a){let s=this.formatDate(o[0]);a.textContent=s}}else if(o.length===2){this.selectedStartDate=ne.fromJSDate(o[0]),this.selectedEndDate=ne.fromJSDate(o[1]);let s={startDate:this.selectedStartDate.toString(),endDate:this.selectedEndDate.toString()};if(ot("date:changed",s),a){let l=this.formatDate(o[0]),u=this.formatDate(o[1]);a.textContent=`${l} - ${u}`}}else this.selectedStartDate?a&&(a.textContent=this.formatDate(ne.toJSDate(this.selectedStartDate))):(this.selectedEndDate=null,ot("date:changed",{startDate:"",endDate:""}),a&&(a.textContent="Choose your dates"))},onDayCreate:async(o,a,s,l)=>{let u=l.dateObj,h=ne.fromJSDate(u),p=ne.formatForAPI(h);if(this.prices[p]){let y=this.prices[p],E=document.createElement("span");E.style.marginTop="2px",E.style.color="#c64509",E.style.fontSize="10px",E.style.fontWeight="bold",E.className=Go,E.textContent=`${y.toLocaleString(xn,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,l.style.display="flex",l.style.flexDirection="column",l.style.alignItems="center",l.style.justifyContent="center",l.style.lineHeight="1.1",l.appendChild(E)}}});let i=fd(this.dateInputEl,r);this.instance=i,this.destroyInstance=()=>i.destroy()}clear(){this.selectedStartDate=null,this.selectedEndDate=null,this.config.type==="flatpickr"&&this.instance.clear?.()}destroy(){window.removeEventListener("resize",this.handleResize),this.destroyInstance&&this.destroyInstance()}formatDate(t){let e=ne.fromJSDate(t),r=e.year,i=String(e.month).padStart(2,"0"),o=String(e.day).padStart(2,"0");return xn==="en"?`${r}/${i}/${o}`:xn==="fr-FR"||xn==="de"?`${o}/${i}/${r}`:`${r}/${i}/${o}`}};var ga=class{constructor(t,e=oc){this.fsListInstance=t;this.includePrices=e;O(this,"element");O(this,"form");O(this,"apartmentInputEl");O(this,"dateInputEl");O(this,"dateClearEl");O(this,"guestsInputEl");O(this,"couponInputEl");O(this,"submitButtonEl");O(this,"onSubmitCallback");O(this,"calendarInstance");O(this,"dateLabelPlaceholder","");O(this,"cmsAparthotels",[]);O(this,"datedPrices",{});O(this,"populateApartmentsInput",()=>{if(!this.apartmentInputEl||!this.fsListInstance)return;let t=document.createDocumentFragment(),e=this.apartmentInputEl.querySelector("option");e&&t.appendChild(e),this.cmsAparthotels.forEach(r=>{let i=document.createElement("option");i.value=r.id,i.textContent=r.title,t.appendChild(i)}),this.apartmentInputEl.replaceChildren(t),Kn(this.apartmentInputEl,"change",async r=>{let i=r.target,o=Wr(i);ot("apartment:changed",o)})});O(this,"populateCalendarInput",async t=>{if(!this.dateInputEl)return;this.dateInputEl.style.cursor="pointer";let e=new eo(this.dateInputEl,{type:"flatpickr",showPrices:!0,defaultReservationDays:3,grid:2,calendars:2,darkMode:!1,tooltip:!0,repick:!1,minDays:1,startWithEmptyDates:!0});if(e.setMinimumDate(Jo),e.setMaximumDate(sc),e.includePrices(this.includePrices),this.includePrices){let r=await fc(this.cmsAparthotels.map(i=>i.id).filter(i=>i!==t||t==null));e.setPrices(r)}return e.initialize(),e});O(this,"populateGuestsInput",()=>{if(!this.guestsInputEl)return;let t=document.createDocumentFragment(),e=this.guestsInputEl.querySelector("option");e&&t.appendChild(e);let r=i=>`${i} ${mn(i===1?"guestSingular":"guestPlural")}`;for(let i=1;i<=Zu;i++){let o=document.createElement("option");o.value=i.toString(),o.textContent=r(i),t.appendChild(o)}this.guestsInputEl.replaceChildren(t),Kn(this.guestsInputEl,"change",async i=>{let o=i.target,a=Wr(o);ot("guests:changed",a)})});if(hn("loading:start",r=>Xo(!0,r)),hn("loading:end",r=>Xo(!1,r)),this.element=Je("booking-component"),!this.element)throw new Error("Booking component not found");this.form=this.element.querySelector("form"),this.apartmentInputEl=Je("location-input",this.element),this.dateInputEl=Je("date-input",this.element),this.dateClearEl=Je("date-clear",this.element),this.guestsInputEl=Je("guests-input",this.element),this.couponInputEl=Je("coupon-input",this.element),this.submitButtonEl=Je("submit",this.element),this.onSubmitCallback=qr,this.cmsAparthotels=this.fsListInstance.items.value.map(r=>({id:r.fields["enterprise-id"].value,title:r.fields.title.value})),hn("apartment:changed",async r=>{r.length===0?Ye.enterpriseId=null:Ye.enterpriseId=r,this.calendarInstance&&Ye.enterpriseId&&await this.updateCalendarForSelectedApartment(Ye.enterpriseId)}),hn("date:changed",async r=>{Ye.startDate=r.startDate||null,Ye.endDate=r.endDate||null,this.updateDateClearVisibility()}),hn("guests:changed",async r=>{Ye.guests=parseInt(r)}),hn("coupon:changed",async r=>{Ye.coupon=r}),hn(["apartment:changed","date:changed","guests:changed","coupon:changed"],async()=>{this.fsListInstance.triggerHook("filter")})}async init(){ot("loading:start",this.element),Ye.enterpriseId=null,Ye.coupon=null,Ye.startDate=null,Ye.endDate=null,Ye.guests=2;try{if(this.initSubmitButton(),this.apartmentInputEl&&this.populateApartmentsInput(),this.dateInputEl){let t=Je("label",this.dateInputEl);this.dateLabelPlaceholder=t?.textContent?.trim()??"",this.calendarInstance=await this.populateCalendarInput(),this.fsListInstance.addHook("filter",async e=>{if(e.length===1){this.calendarInstance?.destroy?.();let r=Ye.enterpriseId||void 0;this.calendarInstance=await this.populateCalendarInput(r)}return e}),this.updateDateClearVisibility(),this.setupDateClearClickHandler()}return this.guestsInputEl&&this.populateGuestsInput(),this.couponInputEl&&Kn(this.couponInputEl,"change",async t=>{let e=t.target,r=Wr(e);ot("coupon:changed",r)}),this}catch(t){throw t instanceof Error?console.error("Error initializing BookingComponent",t.name):console.error("Error initializing BookingComponent",t),t}}updateRedirectUrl(){!this.submitButtonEl||!this.fsListInstance||(this.fsListInstance.renderedItems.size===1?this.submitButtonEl.href=this.fsListInstance.renderedItems.values().next().value?.href||"#":this.submitButtonEl.href="#")}initSubmitButton(){this.submitButtonEl&&(this.fsListInstance.addHook("filter",()=>{this.updateRedirectUrl()}),Kn(this.submitButtonEl,"click",()=>{if(this.fsListInstance.renderedItems.size!==1||!Ye.enterpriseId){let e=window.location.pathname.split("/").filter(Boolean)[0]?.toLowerCase(),i=new Set(["fr","en","de","es","it","pt","zh","ar","ru"]).has(e)?e:"fr",o=i==="fr"?"/apparthotels-booking":`/${i}/aparthotels-booking`,a=this.submitButtonEl;if(!a)return;a.setAttribute("href",o);return}}))}updateDateClearVisibility(){if(!this.dateClearEl)return;let t=!!(Ye.startDate&&Ye.endDate);this.dateClearEl.style.display=t?"flex":"none"}setupDateClearClickHandler(){this.dateClearEl&&Kn(this.dateClearEl,"click",t=>{t.preventDefault(),Ye.startDate=null,Ye.endDate=null,this.calendarInstance?.clear();let e=this.dateInputEl?Je("label",this.dateInputEl):null;e&&(e.textContent=this.dateLabelPlaceholder),ot("date:changed",{startDate:"",endDate:""}),this.updateDateClearVisibility()})}async updateCalendarForSelectedApartment(t){if(this.dateInputEl)try{this.calendarInstance&&(this.calendarInstance.destroy?.(),this.calendarInstance=void 0),this.calendarInstance=await this.populateCalendarInput(t)}catch(e){console.error("Error updating calendar for selected apartment:",e)}}};var yd=async(n=[])=>{let t={method:"POST",headers:Re.headers,body:JSON.stringify(n)};return(await Ue("/configuration/get",t,null,!0)).filter(r=>"error"in r?(console.error("Error fetching configuration:",r),!1):!0)};var A0=$e({}),Ec=$e([]);async function vd(){if(Ec.value.length>0)return Ec.value;let n=await yd(),t=Nu(n);return Ec.value=t,t}var U0=$e({});function Im(n,t,e,r){function i(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function s(h){try{u(r.next(h))}catch(p){a(p)}}function l(h){try{u(r.throw(h))}catch(p){a(p)}}function u(h){h.done?o(h.value):i(h.value).then(s,l)}u((r=r.apply(n,t||[])).next())})}function Pm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xm=function n(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!n(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!n(t[a],e[a]))return!1}return!0}return t!==t&&e!==e},Rm=Pm(xm),wd="__googleMapsScriptId",Br;(function(n){n[n.INITIALIZED=0]="INITIALIZED",n[n.LOADING=1]="LOADING",n[n.SUCCESS=2]="SUCCESS",n[n.FAILURE=3]="FAILURE"})(Br||(Br={}));var ya=class n{constructor({apiKey:t,authReferrerPolicy:e,channel:r,client:i,id:o=wd,language:a,libraries:s=[],mapIds:l,nonce:u,region:h,retries:p=3,url:y="https://maps.googleapis.com/maps/api/js",version:E}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=r,this.client=i,this.id=o||wd,this.language=a,this.libraries=s,this.mapIds=l,this.nonce=u,this.region=h,this.retries=p,this.url=y,this.version=E,n.instance){if(!Rm(this.options,n.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(n.instance.options)}`);return n.instance}n.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Br.FAILURE:this.done?Br.SUCCESS:this.loading?Br.LOADING:Br.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`®ion=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){let t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((t,e)=>{this.loadCallback(r=>{r?e(r.error):t(window.google)})})}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,e;if(document.getElementById(this.id)){this.callback();return}let r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((e=(t=window?.google)===null||t===void 0?void 0:t.maps)===null||e===void 0)&&e.importLibrary||(o=>{let a,s,l,u="The Google Maps JavaScript API",h="google",p="importLibrary",y="__ib__",E=document,T=window;T=T[h]||(T[h]={});let C=T.maps||(T.maps={}),L=new Set,B=new URLSearchParams,K=()=>a||(a=new Promise((W,Q)=>Im(this,void 0,void 0,function*(){var te;yield s=E.createElement("script"),s.id=this.id,B.set("libraries",[...L]+"");for(l in o)B.set(l.replace(/[A-Z]/g,oe=>"_"+oe[0].toLowerCase()),o[l]);B.set("callback",h+".maps."+y),s.src=this.url+"?"+B,C[y]=W,s.onerror=()=>a=Q(Error(u+" could not load.")),s.nonce=this.nonce||((te=E.querySelector("script[nonce]"))===null||te===void 0?void 0:te.nonce)||"",E.head.append(s)})));C[p]?console.warn(u+" only loads once. Ignoring:",o):C[p]=(W,...Q)=>L.add(W)&&K().then(()=>C[p](W,...Q))})(r);let i=this.libraries.map(o=>this.importLibrary(o));i.length||i.push(this.importLibrary("core")),Promise.all(i).then(()=>this.callback(),o=>{let a=new ErrorEvent("error",{error:o});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){let e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},e)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(t=>{t(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}};var va=class{constructor(t){O(this,"map",null);O(this,"markers",[]);O(this,"element");O(this,"wrapperElement");O(this,"landmarks",[]);O(this,"medianLandmark",{lat:0,lng:0});O(this,"loader");O(this,"initPromise");O(this,"markerMap",new Map);O(this,"infoWindows",new Map);O(this,"currentlyOpenInfoWindows",new Set);O(this,"geocoder",null);O(this,"colors",{marker:"#C64509",marker_dark:"#8B3604",label:"#616161",road:"#e4e1db",water:"#d8d3cb",water_label:"#9e9e9e"});if(this.landmarks=t,this.element=Je("map-canvas"),this.wrapperElement=Je("map-wrapper"),!this.element||!this.wrapperElement)throw new Error("Map canvas not found");this.element.innerHTML="",this.loader=new ya({apiKey:Vu,version:"weekly",libraries:["places","marker","geocoding"]}),this.initPromise=this.init(),this.initPromise.then(()=>{this.fillMissingCoordinates()})}async init(){try{if(await this.loader.load(),!this.element)return;this.geocoder=new google.maps.Geocoder,this.map=new google.maps.Map(this.element,{center:{lat:this.medianLandmark.lat,lng:this.medianLandmark.lng},zoom:13,gestureHandling:"greedy",styles:[{elementType:"geometry",stylers:[{color:"#f7f6f4"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.attraction",stylers:[{visibility:"simplified"}]},{featureType:"poi.attraction",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi.attraction",elementType:"labels.icon",stylers:[{color:"#9d907c"},{visibility:"on"}]},{featureType:"poi.park",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#ebe9e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",stylers:[{color:"#e4e1db"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#e4e1db"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#d8d3cb"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#d8d3cb"}]},{featureType:"water",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],disableDefaultUI:!0,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1}),this.landmarks.length>0&&this.addLandmarks()}catch(t){throw console.error("Error loading Google Maps:",t),t}}async addLandmarks(){if(await this.initPromise,!this.map){console.error("Map not initialized");return}for(let t of this.landmarks){let e={url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(rc(this.colors.marker)),scaledSize:new google.maps.Size(48,48),anchor:new google.maps.Point(24,48)};if(t.lat&&t.lng){let r=new google.maps.Marker({map:this.map,position:{lat:t.lat,lng:t.lng},title:t.name,icon:e});this.setupMarkerInfoWindow(r,t),this.markers.push(r),this.markerMap.set(t.enterpriseId,r)}else if(t.address)try{let r=await this.geocodeAddress(t.address);if(r){t.lat=r.lat,t.lng=r.lng;let i=new google.maps.Marker({map:this.map,position:r,title:t.name,icon:e});this.setupMarkerInfoWindow(i,t),this.markers.push(i),this.markerMap.set(t.enterpriseId,i)}else console.error(`Geocoding failed for address: ${t.address}`)}catch(r){console.error(`Error geocoding address: ${t.address}`,r)}else console.error(`No valid position data for landmark: ${t.name}`)}this.setupMarkerHoverListeners()}getLandmarks(){return this.landmarks}setLandmarks(t){this.landmarks=t}setupMarkerHoverListeners(){this.landmarks.forEach(t=>{Gu("landmark-hover",e=>{let{enterpriseId:r,isHovering:i}=e.detail;if(r===t.enterpriseId){let o=this.markerMap.get(t.enterpriseId);if(o){this.updateMarkerColor(o,i);let a=this.infoWindows.get(t.name);a&&(i?(a.open({map:this.map,anchor:o}),this.currentlyOpenInfoWindows.add(t.name)):(a.close(),this.currentlyOpenInfoWindows.delete(t.name)))}}})})}updateMarkerColor(t,e){let r=e?this.colors.marker_dark:this.colors.marker,i={url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(rc(r)),scaledSize:new google.maps.Size(48,48),anchor:new google.maps.Point(24,48)};t.setIcon(i)}geocodeAddress(t){return new Promise(e=>{if(!this.geocoder){console.error("Geocoder not initialized"),e(null);return}this.geocoder.geocode({address:t},(r,i)=>{if(i==="OK"&&r&&r[0]){let{geometry:{location:o}}=r[0];e({lat:o.lat(),lng:o.lng()})}else console.error(`Geocoding failed with status: ${i}`),e(null)})})}setupMarkerInfoWindow(t,e){let r=document.createElement("div");r.innerHTML=`
|
|
7
|
+
`}}function b(){e.calendarContainer.classList.add("hasWeeks");var f=be("div","flatpickr-weekwrapper");f.appendChild(be("span","flatpickr-weekday",e.l10n.weekAbbreviation));var w=be("div","flatpickr-weeks");return f.appendChild(w),{weekWrapper:f,weekNumbers:w}}function _(f,w){w===void 0&&(w=!0);var M=w?f:f-e.currentMonth;M<0&&e._hidePrevMonthArrow===!0||M>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=M,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,Le("onYearChange"),ee()),F(),Le("onMonthChange"),io())}function I(f,w){if(f===void 0&&(f=!0),w===void 0&&(w=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,w===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var M=fa(e.config),x=M.hours,z=M.minutes,q=M.seconds;E(x,z,q)}e.redraw(),f&&Le("onChange")}function k(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),Le("onClose")}function H(){e.config!==void 0&&Le("onDestroy");for(var f=e._handlers.length;f--;)e._handlers[f].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var w=e.calendarContainer.parentNode;if(w.lastChild&&w.removeChild(w.lastChild),w.parentNode){for(;w.firstChild;)w.parentNode.insertBefore(w.firstChild,w);w.parentNode.removeChild(w)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(M){try{delete e[M]}catch{}})}function R(f){return e.calendarContainer.contains(f)}function V(f){if(e.isOpen&&!e.config.inline){var w=Rt(f),M=R(w),x=w===e.input||w===e.altInput||e.element.contains(w)||f.path&&f.path.indexOf&&(~f.path.indexOf(e.input)||~f.path.indexOf(e.altInput)),z=!x&&!M&&!R(f.relatedTarget),q=!e.config.ignoredFocusElements.some(function(he){return he.contains(w)});z&&q&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function J(f){if(!(!f||e.config.minDate&&f<e.config.minDate.getFullYear()||e.config.maxDate&&f>e.config.maxDate.getFullYear())){var w=f,M=e.currentYear!==w;e.currentYear=w||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),M&&(e.redraw(),Le("onYearChange"),ee())}}function U(f,w){var M;w===void 0&&(w=!0);var x=e.parseDate(f,void 0,w);if(e.config.minDate&&x&&At(x,e.config.minDate,w!==void 0?w:!e.minDateHasTime)<0||e.config.maxDate&&x&&At(x,e.config.maxDate,w!==void 0?w:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(x===void 0)return!1;for(var z=!!e.config.enable,q=(M=e.config.enable)!==null&&M!==void 0?M:e.config.disable,he=0,G=void 0;he<q.length;he++){if(G=q[he],typeof G=="function"&&G(x))return z;if(G instanceof Date&&x!==void 0&&G.getTime()===x.getTime())return z;if(typeof G=="string"){var ge=e.parseDate(G,void 0,!0);return ge&&ge.getTime()===x.getTime()?z:!z}else if(typeof G=="object"&&x!==void 0&&G.from&&G.to&&x.getTime()>=G.from.getTime()&&x.getTime()<=G.to.getTime())return z}return!z}function j(f){return e.daysContainer!==void 0?f.className.indexOf("hidden")===-1&&f.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(f):!1}function re(f){var w=f.target===e._input,M=e._input.value.trimEnd()!==Ea();w&&M&&!(f.relatedTarget&&R(f.relatedTarget))&&e.setDate(e._input.value,!0,f.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function le(f){var w=Rt(f),M=e.config.wrap?n.contains(w):w===e._input,x=e.config.allowInput,z=e.isOpen&&(!x||!M),q=e.config.inline&&M&&!x;if(f.keyCode===13&&M){if(x)return e.setDate(e._input.value,!0,w===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),w.blur();e.open()}else if(R(w)||z||q){var he=!!e.timeContainer&&e.timeContainer.contains(w);switch(f.keyCode){case 13:he?(f.preventDefault(),l(),wa()):_c(f);break;case 27:f.preventDefault(),wa();break;case 8:case 46:M&&!e.config.allowInput&&(f.preventDefault(),e.clear());break;case 37:case 39:if(!he&&!M){f.preventDefault();var G=o();if(e.daysContainer!==void 0&&(x===!1||G&&j(G))){var ge=f.keyCode===39?1:-1;f.ctrlKey?(f.stopPropagation(),_(ge),N(Ee(1),0)):N(void 0,ge)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:f.preventDefault();var Z=f.keyCode===40?1:-1;e.daysContainer&&w.$i!==void 0||w===e.input||w===e.altInput?f.ctrlKey?(f.stopPropagation(),J(e.currentYear-Z),N(Ee(1),0)):he||N(void 0,Z*7):w===e.currentYearElement?J(e.currentYear-Z):e.config.enableTime&&(!he&&e.hourElement&&e.hourElement.focus(),l(f),e._debouncedChange());break;case 9:if(he){var ae=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Lt){return Lt}),Se=ae.indexOf(w);if(Se!==-1){var en=ae[Se+(f.shiftKey?-1:1)];f.preventDefault(),(en||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(w)&&f.shiftKey&&(f.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&w===e.amPM)switch(f.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],p(),hn();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],p(),hn();break}(M||R(w))&&Le("onKeyDown",f)}function fe(f,w){if(w===void 0&&(w="flatpickr-day"),!(e.selectedDates.length!==1||f&&(!f.classList.contains(w)||f.classList.contains("flatpickr-disabled")))){for(var M=f?f.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),z=Math.min(M,e.selectedDates[0].getTime()),q=Math.max(M,e.selectedDates[0].getTime()),he=!1,G=0,ge=0,Z=z;Z<q;Z+=md.DAY)U(new Date(Z),!0)||(he=he||Z>z&&Z<q,Z<x&&(!G||Z>G)?G=Z:Z>x&&(!ge||Z<ge)&&(ge=Z));var ae=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+w));ae.forEach(function(Se){var en=Se.dateObj,Lt=en.getTime(),Vr=G>0&&Lt<G||ge>0&&Lt>ge;if(Vr){Se.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(mr){Se.classList.remove(mr)});return}else if(he&&!Vr)return;["startRange","inRange","endRange","notAllowed"].forEach(function(mr){Se.classList.remove(mr)}),f!==void 0&&(f.classList.add(M<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<M&&Lt===x?Se.classList.add("startRange"):x>M&&Lt===x&&Se.classList.add("endRange"),Lt>=G&&(ge===0||Lt<=ge)&&dd(Lt,x,M)&&Se.classList.add("inRange"))})}}function ve(){e.isOpen&&!e.config.static&&!e.config.inline&&Pn()}function Ie(f,w){if(w===void 0&&(w=e._positionElement),e.isMobile===!0){if(f){f.preventDefault();var M=Rt(f);M&&M.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),Le("onOpen");return}else if(e._input.disabled||e.config.inline)return;var x=e.isOpen;e.isOpen=!0,x||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),Le("onOpen"),Pn(w)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(f===void 0||!e.timeContainer.contains(f.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function je(f){return function(w){var M=e.config["_"+f+"Date"]=e.parseDate(w,e.config.dateFormat),x=e.config["_"+(f==="min"?"max":"min")+"Date"];M!==void 0&&(e[f==="min"?"minDateHasTime":"maxDateHasTime"]=M.getHours()>0||M.getMinutes()>0||M.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(z){return U(z)}),!e.selectedDates.length&&f==="min"&&y(M),hn()),e.daysContainer&&(no(),M!==void 0?e.currentYearElement[f]=M.getFullYear().toString():e.currentYearElement.removeAttribute(f),e.currentYearElement.disabled=!!x&&M!==void 0&&x.getFullYear()===M.getFullYear())}}function Xe(){var f=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],w=it(it({},JSON.parse(JSON.stringify(n.dataset||{}))),t),M={};e.config.parseDate=w.parseDate,e.config.formatDate=w.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(ae){e.config._enable=Sc(ae)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(ae){e.config._disable=Sc(ae)}});var x=w.mode==="time";if(!w.dateFormat&&(w.enableTime||x)){var z=ze.defaultConfig.dateFormat||qn.dateFormat;M.dateFormat=w.noCalendar||x?"H:i"+(w.enableSeconds?":S":""):z+" H:i"+(w.enableSeconds?":S":"")}if(w.altInput&&(w.enableTime||x)&&!w.altFormat){var q=ze.defaultConfig.altFormat||qn.altFormat;M.altFormat=w.noCalendar||x?"h:i"+(w.enableSeconds?":S K":" K"):q+(" h:i"+(w.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:je("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:je("max")});var he=function(ae){return function(Se){e.config[ae==="min"?"_minTime":"_maxTime"]=e.parseDate(Se,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:he("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:he("max")}),w.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,M,w);for(var G=0;G<f.length;G++)e.config[f[G]]=e.config[f[G]]===!0||e.config[f[G]]==="true";la.filter(function(ae){return e.config[ae]!==void 0}).forEach(function(ae){e.config[ae]=ha(e.config[ae]||[]).map(a)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var G=0;G<e.config.plugins.length;G++){var ge=e.config.plugins[G](e)||{};for(var Z in ge)la.indexOf(Z)>-1?e.config[Z]=ha(ge[Z]).map(a).concat(e.config[Z]):typeof w[Z]>"u"&&(e.config[Z]=ge[Z])}w.altInputClass||(e.config.altInputClass=Bt().className+" "+e.config.altInputClass),Le("onParseConfig")}function Bt(){return e.config.wrap?n.querySelector("[data-input]"):n}function Wn(){typeof e.config.locale!="object"&&typeof ze.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=it(it({},ze.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?ze.l10ns[e.config.locale]:void 0),In.D="("+e.l10n.weekdays.shorthand.join("|")+")",In.l="("+e.l10n.weekdays.longhand.join("|")+")",In.M="("+e.l10n.months.shorthand.join("|")+")",In.F="("+e.l10n.months.longhand.join("|")+")",In.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var f=it(it({},t),JSON.parse(JSON.stringify(n.dataset||{})));f.time_24hr===void 0&&ze.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Dc(e),e.parseDate=ma({config:e.config,l10n:e.l10n})}function Pn(f){if(typeof e.config.position=="function")return void e.config.position(e,f);if(e.calendarContainer!==void 0){Le("onPreCalendarPosition");var w=f||e._positionElement,M=Array.prototype.reduce.call(e.calendarContainer.children,function(Fd,Hd){return Fd+Hd.offsetHeight},0),x=e.calendarContainer.offsetWidth,z=e.config.position.split(" "),q=z[0],he=z.length>1?z[1]:null,G=w.getBoundingClientRect(),ge=window.innerHeight-G.bottom,Z=q==="above"||q!=="below"&&ge<M&&G.top>M,ae=window.pageYOffset+G.top+(Z?-M-2:w.offsetHeight+2);if(rt(e.calendarContainer,"arrowTop",!Z),rt(e.calendarContainer,"arrowBottom",Z),!e.config.inline){var Se=window.pageXOffset+G.left,en=!1,Lt=!1;he==="center"?(Se-=(x-G.width)/2,en=!0):he==="right"&&(Se-=x-G.width,Lt=!0),rt(e.calendarContainer,"arrowLeft",!en&&!Lt),rt(e.calendarContainer,"arrowCenter",en),rt(e.calendarContainer,"arrowRight",Lt);var Vr=window.document.body.offsetWidth-(window.pageXOffset+G.right),mr=Se+x>window.document.body.offsetWidth,Pd=Vr+x>window.document.body.offsetWidth;if(rt(e.calendarContainer,"rightMost",mr),!e.config.static)if(e.calendarContainer.style.top=ae+"px",!mr)e.calendarContainer.style.left=Se+"px",e.calendarContainer.style.right="auto";else if(!Pd)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=Vr+"px";else{var _a=Ur();if(_a===void 0)return;var xd=window.document.body.offsetWidth,Rd=Math.max(0,xd/2-x/2),Ad=".flatpickr-calendar.centerMost:before",Ld=".flatpickr-calendar.centerMost:after",Nd=_a.cssRules.length,Od="{left:"+G.left+"px;right:auto;}";rt(e.calendarContainer,"rightMost",!1),rt(e.calendarContainer,"centerMost",!0),_a.insertRule(Ad+","+Ld+Od,Nd),e.calendarContainer.style.left=Rd+"px",e.calendarContainer.style.right="auto"}}}}function Ur(){for(var f=null,w=0;w<document.styleSheets.length;w++){var M=document.styleSheets[w];if(M.cssRules){try{M.cssRules}catch{continue}f=M;break}}return f??to()}function to(){var f=document.createElement("style");return document.head.appendChild(f),f.sheet}function no(){e.config.noCalendar||e.isMobile||(ee(),io(),F())}function wa(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function _c(f){f.preventDefault(),f.stopPropagation();var w=function(ae){return ae.classList&&ae.classList.contains("flatpickr-day")&&!ae.classList.contains("flatpickr-disabled")&&!ae.classList.contains("notAllowed")},M=wc(Rt(f),w);if(M!==void 0){var x=M,z=e.latestSelectedDateObj=new Date(x.dateObj.getTime()),q=(z.getMonth()<e.currentMonth||z.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=x,e.config.mode==="single")e.selectedDates=[z];else if(e.config.mode==="multiple"){var he=Da(z);he?e.selectedDates.splice(parseInt(he),1):e.selectedDates.push(z)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=z,e.selectedDates.push(z),At(z,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(ae,Se){return ae.getTime()-Se.getTime()}));if(p(),q){var G=e.currentYear!==z.getFullYear();e.currentYear=z.getFullYear(),e.currentMonth=z.getMonth(),G&&(Le("onYearChange"),ee()),Le("onMonthChange")}if(io(),F(),hn(),!q&&e.config.mode!=="range"&&e.config.showMonths===1?Me(x):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var ge=e.config.mode==="single"&&!e.config.enableTime,Z=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(ge||Z)&&wa()}L()}}var ro={locale:[Wn,D],showMonths:[A,s,v],minDate:[K],maxDate:[K],positionElement:[kc],clickOpens:[function(){e.config.clickOpens===!0?(C(e._input,"focus",e.open),C(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Dd(f,w){if(f!==null&&typeof f=="object"){Object.assign(e.config,f);for(var M in f)ro[M]!==void 0&&ro[M].forEach(function(x){return x()})}else e.config[f]=w,ro[f]!==void 0?ro[f].forEach(function(x){return x()}):la.indexOf(f)>-1&&(e.config[f]=ha(w));e.redraw(),hn(!0)}function Mc(f,w){var M=[];if(f instanceof Array)M=f.map(function(x){return e.parseDate(x,w)});else if(f instanceof Date||typeof f=="number")M=[e.parseDate(f,w)];else if(typeof f=="string")switch(e.config.mode){case"single":case"time":M=[e.parseDate(f,w)];break;case"multiple":M=f.split(e.config.conjunction).map(function(x){return e.parseDate(x,w)});break;case"range":M=f.split(e.l10n.rangeSeparator).map(function(x){return e.parseDate(x,w)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(f)));e.selectedDates=e.config.allowInvalidPreload?M:M.filter(function(x){return x instanceof Date&&U(x,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(x,z){return x.getTime()-z.getTime()})}function Ed(f,w,M){if(w===void 0&&(w=!1),M===void 0&&(M=e.config.dateFormat),f!==0&&!f||f instanceof Array&&f.length===0)return e.clear(w);Mc(f,M),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),K(void 0,w),y(),e.selectedDates.length===0&&e.clear(!1),hn(w),w&&Le("onChange")}function Sc(f){return f.slice().map(function(w){return typeof w=="string"||typeof w=="number"||w instanceof Date?e.parseDate(w,void 0,!0):w&&typeof w=="object"&&w.from&&w.to?{from:e.parseDate(w.from,void 0),to:e.parseDate(w.to,void 0)}:w}).filter(function(w){return w})}function _d(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var f=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);f&&Mc(f,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Md(){if(e.input=Bt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=be(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),kc()}function kc(){e._positionElement=e.config.positionElement||e._input}function Sd(){var f=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=be("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=f,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=f==="datetime-local"?"Y-m-d\\TH:i:S":f==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}C(e.mobileInput,"change",function(w){e.setDate(Rt(w).value,!1,e.mobileFormatStr),Le("onChange"),Le("onClose")})}function kd(f){if(e.isOpen===!0)return e.close();e.open(f)}function Le(f,w){if(e.config!==void 0){var M=e.config[f];if(M!==void 0&&M.length>0)for(var x=0;M[x]&&x<M.length;x++)M[x](e.selectedDates,e.input.value,e,w);f==="onChange"&&(e.input.dispatchEvent(ba("change")),e.input.dispatchEvent(ba("input")))}}function ba(f){var w=document.createEvent("Event");return w.initEvent(f,!0,!0),w}function Da(f){for(var w=0;w<e.selectedDates.length;w++){var M=e.selectedDates[w];if(M instanceof Date&&At(M,f)===0)return""+w}return!1}function Td(f){return e.config.mode!=="range"||e.selectedDates.length<2?!1:At(f,e.selectedDates[0])>=0&&At(f,e.selectedDates[1])<=0}function io(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(f,w){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[w].textContent=Qi(M.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=M.getMonth().toString(),f.value=M.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Ea(f){var w=f||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(M){return e.formatDate(M,w)}).filter(function(M,x,z){return e.config.mode!=="range"||e.config.enableTime||z.indexOf(M)===x}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function hn(f){f===void 0&&(f=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Ea(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Ea(e.config.altFormat)),f!==!1&&Le("onValueUpdate")}function Cd(f){var w=Rt(f),M=e.prevMonthNav.contains(w),x=e.nextMonthNav.contains(w);M||x?_(M?-1:1):e.yearElements.indexOf(w)>=0?w.select():w.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):w.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Id(f){f.preventDefault();var w=f.type==="keydown",M=Rt(f),x=M;e.amPM!==void 0&&M===e.amPM&&(e.amPM.textContent=e.l10n.amPM[xt(e.amPM.textContent===e.l10n.amPM[0])]);var z=parseFloat(x.getAttribute("min")),q=parseFloat(x.getAttribute("max")),he=parseFloat(x.getAttribute("step")),G=parseInt(x.value,10),ge=f.delta||(w?f.which===38?1:-1:0),Z=G+he*ge;if(typeof x.value<"u"&&x.value.length===2){var ae=x===e.hourElement,Se=x===e.minuteElement;Z<z?(Z=q+Z+xt(!ae)+(xt(ae)&&xt(!e.amPM)),Se&&Q(void 0,-1,e.hourElement)):Z>q&&(Z=x===e.hourElement?Z-q-xt(!e.amPM):z,Se&&Q(void 0,1,e.hourElement)),e.amPM&&ae&&(he===1?Z+G===23:Math.abs(Z-G)>he)&&(e.amPM.textContent=e.l10n.amPM[xt(e.amPM.textContent===e.l10n.amPM[0])]),x.value=nt(Z)}}return i(),e}function zr(n,t){for(var e=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<e.length;i++){var o=e[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=Cm(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return zr(this,n)},HTMLElement.prototype.flatpickr=function(n){return zr([this],n)});var ze=function(n,t){return typeof n=="string"?zr(window.document.querySelectorAll(n),t):n instanceof Node?zr([n],t):zr(n,t)};ze.defaultConfig={};ze.l10ns={en:it({},da),default:it({},da)};ze.localize=function(n){ze.l10ns.default=it(it({},ze.l10ns.default),n)};ze.setDefaults=function(n){ze.defaultConfig=it(it({},ze.defaultConfig),n)};ze.parseDate=ma({});ze.formatDate=Dc({});ze.compareDates=At;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return zr(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window<"u"&&(window.flatpickr=ze);var fd=ze;var eo=class{constructor(t,e){this.dateInputEl=t;O(this,"minDate");O(this,"maxDate");O(this,"defaultReservationDays");O(this,"hasPrices",!1);O(this,"prices",{});O(this,"availability",{});O(this,"disabledDates",[]);O(this,"selectedStartDate");O(this,"selectedEndDate");O(this,"config");O(this,"instance");O(this,"destroyInstance");O(this,"currentDate");O(this,"handleResize",()=>{let t=this.isMobileDevice();(t&&this.config.grid!==1||!t&&this.config.grid!==2)&&(this.config.grid=t?1:2,this.config.calendars=t?1:2,this.destroyInstance&&this.destroyInstance(),this.initialize())});this.isMobileDevice()&&(e.grid=1,e.calendars=1),this.dateInputEl=t,this.defaultReservationDays=e.defaultReservationDays??3;let r=e.startWithEmptyDates??!1;this.config={...e,type:e.type,showPrices:e.showPrices??!1,defaultReservationDays:this.defaultReservationDays,grid:e.grid??2,calendars:e.calendars??2,darkMode:e.darkMode??!0,tooltip:e.tooltip??!0,repick:e.repick??!1,minDays:e.minDays??1,defaultStartDate:e.defaultStartDate??ne.getCurrentDate(),defaultEndDate:e.defaultEndDate??ne.getCurrentDate(),startWithEmptyDates:r},this.currentDate=ne.getCurrentDate(),this.selectedStartDate=r?null:this.config.defaultStartDate,this.selectedEndDate=r?null:this.config.defaultEndDate}isMobileDevice(){return window.innerWidth<=768}initialize(){switch(window.addEventListener("resize",this.handleResize),this.config.type){case"easepick":this.initEasepickCalendar();break;case"flatpickr":this.initFlatpickrCalendar();break;default:throw new Error(`Unsupported calendar type: ${this.config.type}`)}}setMinimumDate(t){this.minDate=t}setMaximumDate(t){this.maxDate=t}setStartDate(t){let e=ne.toJSDate(t),r=this.selectedEndDate?ne.toJSDate(this.selectedEndDate):e;this.selectedStartDate=t,this.instance instanceof ca.Core?this.instance.setStartDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setEndDate(t){let e=this.selectedStartDate?ne.toJSDate(this.selectedStartDate):ne.toJSDate(t),r=ne.toJSDate(t);this.selectedEndDate=t,this.instance instanceof ca.Core?this.instance.setEndDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setDateRange(t,e){if(this.config.type==="flatpickr"){this.selectedStartDate=t,this.selectedEndDate=e;let r=ne.toJSDate(t),i=ne.toJSDate(e);this.instance.setDate([r,i],!0);return}this.setStartDate(t),this.setEndDate(e)}getSelectedDates(){return{startDate:this.selectedStartDate,endDate:this.selectedEndDate}}includePrices(t=!0){this.hasPrices=t}setPrices(t){this.prices=t}setAvailability(t){this.availability=t,this.disabledDates=Object.keys(t).filter(e=>!t[e])}initEasepickCalendar(){let t={tooltip:this.config.tooltip,repick:this.config.repick,tooltipNumber:i=>i-1,locale:{one:"nuit",other:"nuits"}};this.config.startWithEmptyDates||(t.startDate=new de(this.config.defaultStartDate.toString()),t.endDate=new de(this.config.defaultEndDate.toString()));let e={element:this.dateInputEl,css:["https://cdn.jsdelivr.net/npm/@easepick/bundle@1.2.1/dist/index.css"],zIndex:10,format:qu,grid:this.config.grid,calendars:this.config.calendars,header:"",lang:document.documentElement.lang,RangePlugin:t,LockPlugin:{minDate:new de(this.minDate.toString()),minDays:this.config.minDays,selectForward:!0},AmpPlugin:{darkMode:this.config.darkMode},plugins:[sa,aa,oa],setup:i=>{i.on("view",o=>{let{view:a,date:s,target:l}=o.detail,u=s?s.format("YYYY-MM-DD"):null;if(a==="CalendarDay"&&u&&this.prices[u]){let h=this.prices[u],p=l.querySelector(`.${Go}`)||document.createElement("span");p.className=Go,p.textContent=`${h.toLocaleString(xn,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,p.style.color="#c64509",p.style.fontWeight="bold",p.style.fontSize="10px",l.append(p)}}),i.on("select",o=>{let{start:a,end:s}=o.detail;this.selectedStartDate=ne.fromString(a.format("YYYY-MM-DD")),this.selectedEndDate=ne.fromString(s.format("YYYY-MM-DD"));let l={startDate:a.format("YYYY-MM-DD").toString(),endDate:s.format("YYYY-MM-DD").toString()};ot("date:changed",l)})}},r=new ca.create(e);this.instance=r,this.destroyInstance=()=>r.destroy()}initFlatpickrCalendar(){let t=document.createElement("link");t.rel="stylesheet",t.href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.css",document.head.appendChild(t);let e=Pc(),r={mode:"range",showMonths:this.config.calendars,minDate:this.minDate.toString(),shorthandCurrentMonth:!0,monthSelectorType:"static",inline:!1,dateFormat:Wu,locale:{months:{shorthand:e,longhand:e}},zIndex:10,disable:this.disabledDates};this.config.startWithEmptyDates||(r.defaultDate=[this.config.defaultStartDate.toString(),this.config.defaultEndDate.toString()]),Object.assign(r,{onChange:o=>{let a=Je("label",this.dateInputEl);if(o.length===1){if(this.selectedStartDate=ne.fromJSDate(o[0]),this.selectedEndDate=null,ot("date:changed",{startDate:this.selectedStartDate.toString(),endDate:""}),a){let s=this.formatDate(o[0]);a.textContent=s}}else if(o.length===2){this.selectedStartDate=ne.fromJSDate(o[0]),this.selectedEndDate=ne.fromJSDate(o[1]);let s={startDate:this.selectedStartDate.toString(),endDate:this.selectedEndDate.toString()};if(ot("date:changed",s),a){let l=this.formatDate(o[0]),u=this.formatDate(o[1]);a.textContent=`${l} - ${u}`}}else this.selectedStartDate?a&&(a.textContent=this.formatDate(ne.toJSDate(this.selectedStartDate))):(this.selectedEndDate=null,ot("date:changed",{startDate:"",endDate:""}),a&&(a.textContent="Choose your dates"))},onDayCreate:async(o,a,s,l)=>{let u=l.dateObj,h=ne.fromJSDate(u),p=ne.formatForAPI(h);if(this.prices[p]){let y=this.prices[p],E=document.createElement("span");E.style.marginTop="2px",E.style.color="#c64509",E.style.fontSize="10px",E.style.fontWeight="bold",E.className=Go,E.textContent=`${y.toLocaleString(xn,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,l.style.display="flex",l.style.flexDirection="column",l.style.alignItems="center",l.style.justifyContent="center",l.style.lineHeight="1.1",l.appendChild(E)}}});let i=fd(this.dateInputEl,r);this.instance=i,this.destroyInstance=()=>i.destroy()}clear(){this.selectedStartDate=null,this.selectedEndDate=null,this.config.type==="flatpickr"&&this.instance.clear?.()}destroy(){window.removeEventListener("resize",this.handleResize),this.destroyInstance&&this.destroyInstance()}formatDate(t){let e=ne.fromJSDate(t),r=e.year,i=String(e.month).padStart(2,"0"),o=String(e.day).padStart(2,"0");return xn==="en"?`${r}/${i}/${o}`:xn==="fr-FR"||xn==="de"?`${o}/${i}/${r}`:`${r}/${i}/${o}`}};var ga=class{constructor(t,e=oc){this.fsListInstance=t;this.includePrices=e;O(this,"element");O(this,"form");O(this,"apartmentInputEl");O(this,"dateInputEl");O(this,"dateClearEl");O(this,"guestsInputEl");O(this,"couponInputEl");O(this,"submitButtonEl");O(this,"onSubmitCallback");O(this,"calendarInstance");O(this,"dateLabelPlaceholder","");O(this,"cmsAparthotels",[]);O(this,"datedPrices",{});O(this,"populateApartmentsInput",()=>{if(!this.apartmentInputEl||!this.fsListInstance)return;let t=document.createDocumentFragment(),e=this.apartmentInputEl.querySelector("option");e&&t.appendChild(e),this.cmsAparthotels.forEach(r=>{let i=document.createElement("option");i.value=r.id,i.textContent=r.title,t.appendChild(i)}),this.apartmentInputEl.replaceChildren(t),Kn(this.apartmentInputEl,"change",async r=>{let i=r.target,o=Wr(i);ot("apartment:changed",o)})});O(this,"populateCalendarInput",async t=>{if(!this.dateInputEl)return;this.dateInputEl.style.cursor="pointer";let e=new eo(this.dateInputEl,{type:"flatpickr",showPrices:!0,defaultReservationDays:3,grid:2,calendars:2,darkMode:!1,tooltip:!0,repick:!1,minDays:1,startWithEmptyDates:!0});if(e.setMinimumDate(Jo),e.setMaximumDate(sc),e.includePrices(this.includePrices),this.includePrices){let r=await fc(this.cmsAparthotels.map(i=>i.id).filter(i=>i!==t||t==null));e.setPrices(r)}return e.initialize(),e});O(this,"populateGuestsInput",()=>{if(!this.guestsInputEl)return;let t=document.createDocumentFragment(),e=this.guestsInputEl.querySelector("option");e&&t.appendChild(e);let r=i=>`${i} ${mn(i===1?"guestSingular":"guestPlural")}`;for(let i=1;i<=Zu;i++){let o=document.createElement("option");o.value=i.toString(),o.textContent=r(i),t.appendChild(o)}this.guestsInputEl.replaceChildren(t),Kn(this.guestsInputEl,"change",async i=>{let o=i.target,a=Wr(o);ot("guests:changed",a)})});if(tn("loading:start",r=>Xo(!0,r)),tn("loading:end",r=>Xo(!1,r)),this.element=Je("booking-component"),!this.element)throw new Error("Booking component not found");this.form=this.element.querySelector("form"),this.apartmentInputEl=Je("location-input",this.element),this.dateInputEl=Je("date-input",this.element),this.dateClearEl=Je("date-clear",this.element),this.guestsInputEl=Je("guests-input",this.element),this.couponInputEl=Je("coupon-input",this.element),this.submitButtonEl=Je("submit",this.element),this.onSubmitCallback=qr,this.cmsAparthotels=this.fsListInstance.items.value.map(r=>({id:r.fields["enterprise-id"].value,title:r.fields.title.value})),tn("apartment:changed",async r=>{r.length===0?Ce.enterpriseId=null:Ce.enterpriseId=r,this.calendarInstance&&Ce.enterpriseId&&await this.updateCalendarForSelectedApartment(Ce.enterpriseId)}),tn("date:changed",async r=>{Ce.startDate=r.startDate||null,Ce.endDate=r.endDate||null,this.updateDateClearVisibility()}),tn("guests:changed",async r=>{Ce.guests=parseInt(r)}),tn("coupon:changed",async r=>{Ce.coupon=r}),tn(["apartment:changed","guests:changed","coupon:changed"],async()=>{this.fsListInstance.triggerHook("filter")}),tn("date:changed",async()=>{(Ce.startDate&&Ce.endDate||!Ce.startDate&&!Ce.endDate)&&this.fsListInstance.triggerHook("filter")})}async init(){ot("loading:start",this.element),Ce.enterpriseId=null,Ce.coupon=null,Ce.startDate=null,Ce.endDate=null,Ce.guests=2;try{if(this.initSubmitButton(),this.apartmentInputEl&&this.populateApartmentsInput(),this.dateInputEl){let t=Je("label",this.dateInputEl);this.dateLabelPlaceholder=t?.textContent?.trim()??"",this.calendarInstance=await this.populateCalendarInput(),this.fsListInstance.addHook("filter",async e=>{if(e.length===1){this.calendarInstance?.destroy?.();let r=Ce.enterpriseId||void 0;this.calendarInstance=await this.populateCalendarInput(r)}return e}),this.updateDateClearVisibility(),this.setupDateClearClickHandler()}return this.guestsInputEl&&this.populateGuestsInput(),this.couponInputEl&&Kn(this.couponInputEl,"change",async t=>{let e=t.target,r=Wr(e);ot("coupon:changed",r)}),this}catch(t){throw t instanceof Error?console.error("Error initializing BookingComponent",t.name):console.error("Error initializing BookingComponent",t),t}}updateRedirectUrl(){!this.submitButtonEl||!this.fsListInstance||(this.fsListInstance.renderedItems.size===1?this.submitButtonEl.href=this.fsListInstance.renderedItems.values().next().value?.href||"#":this.submitButtonEl.href="#")}initSubmitButton(){this.submitButtonEl&&(this.fsListInstance.addHook("filter",()=>{this.updateRedirectUrl()}),Kn(this.submitButtonEl,"click",()=>{if(this.fsListInstance.renderedItems.size!==1||!Ce.enterpriseId){let e=window.location.pathname.split("/").filter(Boolean)[0]?.toLowerCase(),i=new Set(["fr","en","de","es","it","pt","zh","ar","ru"]).has(e)?e:"fr",o=i==="fr"?"/apparthotels-booking":`/${i}/aparthotels-booking`,a=this.submitButtonEl;if(!a)return;a.setAttribute("href",o);return}}))}updateDateClearVisibility(){if(!this.dateClearEl)return;let t=!!(Ce.startDate&&Ce.endDate);this.dateClearEl.style.display=t?"flex":"none"}setupDateClearClickHandler(){this.dateClearEl&&Kn(this.dateClearEl,"click",t=>{t.preventDefault(),Ce.startDate=null,Ce.endDate=null,this.calendarInstance?.clear();let e=this.dateInputEl?Je("label",this.dateInputEl):null;e&&(e.textContent=this.dateLabelPlaceholder),ot("date:changed",{startDate:"",endDate:""}),this.updateDateClearVisibility()})}async updateCalendarForSelectedApartment(t){if(this.dateInputEl)try{this.calendarInstance&&(this.calendarInstance.destroy?.(),this.calendarInstance=void 0),this.calendarInstance=await this.populateCalendarInput(t)}catch(e){console.error("Error updating calendar for selected apartment:",e)}}};var yd=async(n=[])=>{let t={method:"POST",headers:Ae.headers,body:JSON.stringify(n)};return(await Ue("/configuration/get",t,null,!0)).filter(r=>"error"in r?(console.error("Error fetching configuration:",r),!1):!0)};var A0=$e({}),Ec=$e([]);async function vd(){if(Ec.value.length>0)return Ec.value;let n=await yd(),t=Nu(n);return Ec.value=t,t}var U0=$e({});function Im(n,t,e,r){function i(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function s(h){try{u(r.next(h))}catch(p){a(p)}}function l(h){try{u(r.throw(h))}catch(p){a(p)}}function u(h){h.done?o(h.value):i(h.value).then(s,l)}u((r=r.apply(n,t||[])).next())})}function Pm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xm=function n(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!n(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!n(t[a],e[a]))return!1}return!0}return t!==t&&e!==e},Rm=Pm(xm),wd="__googleMapsScriptId",Br;(function(n){n[n.INITIALIZED=0]="INITIALIZED",n[n.LOADING=1]="LOADING",n[n.SUCCESS=2]="SUCCESS",n[n.FAILURE=3]="FAILURE"})(Br||(Br={}));var ya=class n{constructor({apiKey:t,authReferrerPolicy:e,channel:r,client:i,id:o=wd,language:a,libraries:s=[],mapIds:l,nonce:u,region:h,retries:p=3,url:y="https://maps.googleapis.com/maps/api/js",version:E}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=r,this.client=i,this.id=o||wd,this.language=a,this.libraries=s,this.mapIds=l,this.nonce=u,this.region=h,this.retries=p,this.url=y,this.version=E,n.instance){if(!Rm(this.options,n.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(n.instance.options)}`);return n.instance}n.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Br.FAILURE:this.done?Br.SUCCESS:this.loading?Br.LOADING:Br.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`®ion=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){let t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((t,e)=>{this.loadCallback(r=>{r?e(r.error):t(window.google)})})}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,e;if(document.getElementById(this.id)){this.callback();return}let r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((e=(t=window?.google)===null||t===void 0?void 0:t.maps)===null||e===void 0)&&e.importLibrary||(o=>{let a,s,l,u="The Google Maps JavaScript API",h="google",p="importLibrary",y="__ib__",E=document,T=window;T=T[h]||(T[h]={});let C=T.maps||(T.maps={}),L=new Set,B=new URLSearchParams,K=()=>a||(a=new Promise((W,Q)=>Im(this,void 0,void 0,function*(){var te;yield s=E.createElement("script"),s.id=this.id,B.set("libraries",[...L]+"");for(l in o)B.set(l.replace(/[A-Z]/g,oe=>"_"+oe[0].toLowerCase()),o[l]);B.set("callback",h+".maps."+y),s.src=this.url+"?"+B,C[y]=W,s.onerror=()=>a=Q(Error(u+" could not load.")),s.nonce=this.nonce||((te=E.querySelector("script[nonce]"))===null||te===void 0?void 0:te.nonce)||"",E.head.append(s)})));C[p]?console.warn(u+" only loads once. Ignoring:",o):C[p]=(W,...Q)=>L.add(W)&&K().then(()=>C[p](W,...Q))})(r);let i=this.libraries.map(o=>this.importLibrary(o));i.length||i.push(this.importLibrary("core")),Promise.all(i).then(()=>this.callback(),o=>{let a=new ErrorEvent("error",{error:o});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){let e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},e)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(t=>{t(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}};var va=class{constructor(t){O(this,"map",null);O(this,"markers",[]);O(this,"element");O(this,"wrapperElement");O(this,"landmarks",[]);O(this,"medianLandmark",{lat:0,lng:0});O(this,"loader");O(this,"initPromise");O(this,"markerMap",new Map);O(this,"infoWindows",new Map);O(this,"currentlyOpenInfoWindows",new Set);O(this,"geocoder",null);O(this,"colors",{marker:"#C64509",marker_dark:"#8B3604",label:"#616161",road:"#e4e1db",water:"#d8d3cb",water_label:"#9e9e9e"});if(this.landmarks=t,this.element=Je("map-canvas"),this.wrapperElement=Je("map-wrapper"),!this.element||!this.wrapperElement)throw new Error("Map canvas not found");this.element.innerHTML="",this.loader=new ya({apiKey:Vu,version:"weekly",libraries:["places","marker","geocoding"]}),this.initPromise=this.init(),this.initPromise.then(()=>{this.fillMissingCoordinates()})}async init(){try{if(await this.loader.load(),!this.element)return;this.geocoder=new google.maps.Geocoder,this.map=new google.maps.Map(this.element,{center:{lat:this.medianLandmark.lat,lng:this.medianLandmark.lng},zoom:13,gestureHandling:"greedy",styles:[{elementType:"geometry",stylers:[{color:"#f7f6f4"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.attraction",stylers:[{visibility:"simplified"}]},{featureType:"poi.attraction",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi.attraction",elementType:"labels.icon",stylers:[{color:"#9d907c"},{visibility:"on"}]},{featureType:"poi.park",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#ebe9e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",stylers:[{color:"#e4e1db"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#e4e1db"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#d8d3cb"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#d8d3cb"}]},{featureType:"water",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],disableDefaultUI:!0,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1}),this.landmarks.length>0&&this.addLandmarks()}catch(t){throw console.error("Error loading Google Maps:",t),t}}async addLandmarks(){if(await this.initPromise,!this.map){console.error("Map not initialized");return}for(let t of this.landmarks){let e={url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(rc(this.colors.marker)),scaledSize:new google.maps.Size(48,48),anchor:new google.maps.Point(24,48)};if(t.lat&&t.lng){let r=new google.maps.Marker({map:this.map,position:{lat:t.lat,lng:t.lng},title:t.name,icon:e});this.setupMarkerInfoWindow(r,t),this.markers.push(r),this.markerMap.set(t.enterpriseId,r)}else if(t.address)try{let r=await this.geocodeAddress(t.address);if(r){t.lat=r.lat,t.lng=r.lng;let i=new google.maps.Marker({map:this.map,position:r,title:t.name,icon:e});this.setupMarkerInfoWindow(i,t),this.markers.push(i),this.markerMap.set(t.enterpriseId,i)}else console.error(`Geocoding failed for address: ${t.address}`)}catch(r){console.error(`Error geocoding address: ${t.address}`,r)}else console.error(`No valid position data for landmark: ${t.name}`)}this.setupMarkerHoverListeners()}getLandmarks(){return this.landmarks}setLandmarks(t){this.landmarks=t}setupMarkerHoverListeners(){this.landmarks.forEach(t=>{Gu("landmark-hover",e=>{let{enterpriseId:r,isHovering:i}=e.detail;if(r===t.enterpriseId){let o=this.markerMap.get(t.enterpriseId);if(o){this.updateMarkerColor(o,i);let a=this.infoWindows.get(t.name);a&&(i?(a.open({map:this.map,anchor:o}),this.currentlyOpenInfoWindows.add(t.name)):(a.close(),this.currentlyOpenInfoWindows.delete(t.name)))}}})})}updateMarkerColor(t,e){let r=e?this.colors.marker_dark:this.colors.marker,i={url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(rc(r)),scaledSize:new google.maps.Size(48,48),anchor:new google.maps.Point(24,48)};t.setIcon(i)}geocodeAddress(t){return new Promise(e=>{if(!this.geocoder){console.error("Geocoder not initialized"),e(null);return}this.geocoder.geocode({address:t},(r,i)=>{if(i==="OK"&&r&&r[0]){let{geometry:{location:o}}=r[0];e({lat:o.lat(),lng:o.lng()})}else console.error(`Geocoding failed with status: ${i}`),e(null)})})}setupMarkerInfoWindow(t,e){let r=document.createElement("div");r.innerHTML=`
|
|
8
8
|
<a href="${e.websiteUrl}" target="_blank" style="text-decoration: none;">
|
|
9
9
|
<div style="height: 12px;"></div>
|
|
10
10
|
<div style="text-align: center;
|
|
@@ -20,7 +20,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
20
20
|
<!-- <b style="color: ${ic.accent_color};">${e.availableCount} apartment disponibles</b> -->
|
|
21
21
|
</div>
|
|
22
22
|
</a>
|
|
23
|
-
`;let i=new google.maps.InfoWindow({content:r.outerHTML,maxWidth:ic.info_window_max_width});this.infoWindows.set(e.name,i),t.addListener("click",()=>{this.closeAllInfoWindows(),i.open({map:this.map,anchor:t}),this.currentlyOpenInfoWindows.add(e.name),i.addListener("closeclick",()=>{this.currentlyOpenInfoWindows.delete(e.name)})})}closeAllInfoWindows(){this.currentlyOpenInfoWindows.forEach(t=>{let e=this.infoWindows.get(t);e&&e.close()}),this.currentlyOpenInfoWindows.clear()}async fillMissingCoordinates(){if(await this.initPromise,!this.map||!this.geocoder){console.error("Map or geocoder not initialized");return}for(let t=0;t<this.landmarks.length;t++){let e=this.landmarks[t];if(!(e.lat&&e.lng))if(e.address)try{let r=await this.geocodeAddress(e.address);r?this.landmarks[t]={...e,lat:r.lat,lng:r.lng}:console.error(`Geocoding failed for address: ${e.address}`)}catch(r){console.error(`Error geocoding address: ${e.address}`,r)}else console.error(`No address available for landmark: ${e.name}`)}if(this.landmarks.length>0){let t=this.landmarks.reduce((e,r)=>({lat:e.lat+r.lat,lng:e.lng+r.lng}),{lat:0,lng:0});this.medianLandmark={lat:t.lat/this.landmarks.length,lng:t.lng/this.landmarks.length},this.map.setCenter(this.medianLandmark)}}clearMarkers(){this.markers.forEach(t=>{t.setMap(null)}),this.markers=[],this.markerMap.clear(),this.closeAllInfoWindows(),this.infoWindows.clear()}setView(t,e,r){this.map&&(this.map.setCenter({lat:t,lng:e}),this.map.setZoom(r))}invalidateSize(){this.map&&google.maps.event.trigger(this.map,"resize")}async resetView(t=1e3){if(!this.map||this.landmarks.length===0){console.warn("Cannot reset view: map not initialized or no landmarks");return}let e=this.landmarks.reduce((l,u)=>({lat:l.lat+u.lat,lng:l.lng+u.lng}),{lat:0,lng:0}),r={lat:e.lat/this.landmarks.length,lng:e.lng/this.landmarks.length},i=
|
|
23
|
+
`;let i=new google.maps.InfoWindow({content:r.outerHTML,maxWidth:ic.info_window_max_width});this.infoWindows.set(e.name,i),t.addListener("click",()=>{this.closeAllInfoWindows(),i.open({map:this.map,anchor:t}),this.currentlyOpenInfoWindows.add(e.name),i.addListener("closeclick",()=>{this.currentlyOpenInfoWindows.delete(e.name)})})}closeAllInfoWindows(){this.currentlyOpenInfoWindows.forEach(t=>{let e=this.infoWindows.get(t);e&&e.close()}),this.currentlyOpenInfoWindows.clear()}async fillMissingCoordinates(){if(await this.initPromise,!this.map||!this.geocoder){console.error("Map or geocoder not initialized");return}for(let t=0;t<this.landmarks.length;t++){let e=this.landmarks[t];if(!(e.lat&&e.lng))if(e.address)try{let r=await this.geocodeAddress(e.address);r?this.landmarks[t]={...e,lat:r.lat,lng:r.lng}:console.error(`Geocoding failed for address: ${e.address}`)}catch(r){console.error(`Error geocoding address: ${e.address}`,r)}else console.error(`No address available for landmark: ${e.name}`)}if(this.landmarks.length>0){let t=this.landmarks.reduce((e,r)=>({lat:e.lat+r.lat,lng:e.lng+r.lng}),{lat:0,lng:0});this.medianLandmark={lat:t.lat/this.landmarks.length,lng:t.lng/this.landmarks.length},this.map.setCenter(this.medianLandmark)}}clearMarkers(){this.markers.forEach(t=>{t.setMap(null)}),this.markers=[],this.markerMap.clear(),this.closeAllInfoWindows(),this.infoWindows.clear()}setView(t,e,r){this.map&&(this.map.setCenter({lat:t,lng:e}),this.map.setZoom(r))}invalidateSize(){this.map&&google.maps.event.trigger(this.map,"resize")}async resetView(t=1e3){if(!this.map||this.landmarks.length===0){console.warn("Cannot reset view: map not initialized or no landmarks");return}let e=this.landmarks.reduce((l,u)=>({lat:l.lat+u.lat,lng:l.lng+u.lng}),{lat:0,lng:0}),r={lat:e.lat/this.landmarks.length,lng:e.lng/this.landmarks.length},i=Re.Now.instant(),o=this.map.getCenter(),a=this.map.getZoom()||0,s=()=>{let l=Re.Now.instant().epochMilliseconds-i.epochMilliseconds,u=Math.min(l/t,1),h=u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2;if(o){let p=o.lat()+(r.lat-o.lat())*h,y=o.lng()+(r.lng-o.lng())*h;this.map?.setCenter({lat:p,lng:y})}u<1?requestAnimationFrame(s):(this.map?.setCenter(r),this.map?.setZoom(a))};requestAnimationFrame(s),google.maps.event.trigger(this.map,"resize")}calculateZoomForBounds(t){if(!this.map)return 0;let e=t.getNorthEast(),r=t.getSouthWest(),i=e.lat(),o=e.lng(),a=r.lat(),s=r.lng(),l=Math.abs(i-a),u=Math.abs(o-s),h=this.map.getDiv(),p=h.clientWidth,y=h.clientHeight,E=Math.log2(360/l)-Math.log2(y/256),T=Math.log2(360/u)-Math.log2(p/256);return Math.min(E,T)}toggleAllInfoWindows(t){this.map&&(t?(this.closeAllInfoWindows(),this.landmarks.forEach(e=>{let r=this.markerMap.get(e.name),i=this.infoWindows.get(e.name);r&&i&&(i.open({map:this.map,anchor:r}),this.currentlyOpenInfoWindows.add(e.name))})):this.closeAllInfoWindows())}};async function bd(n){let e=(await vd()).filter(i=>(i.address.Longitude&&i.address.Latitude||i.address.Line1)&&n.items.value.some(o=>i.id===o.fields["enterprise-id"].value)).map(i=>({enterpriseId:i.id,name:i.name,lat:i.address.Latitude,lng:i.address.Longitude,city:i.address.City,websiteUrl:i.url,address:i.address.Line1||"",availableCount:n.items.value.filter(o=>i.id===o.fields["enterprise-id"].value).length})),r=new va(e);return e.length>0&&r.addLandmarks(),r}function Am(n){let t=n.find(r=>r.instance==="apartments");if(!t){console.error("No apartments list instance found");return}new ga(t).init().then(r=>ot("loading:end",r?.element)).catch(r=>{throw cc(!0,void 0),console.error("Error initializing booking component:",r),r}),bd(t).then(r=>{ot("loading:end",r.wrapperElement)}).catch(r=>{cc(!0,void 0),console.error("Error initializing map:",r)})}window.FinsweetAttributes=window.FinsweetAttributes||[];window.FinsweetAttributes.push(["list",async n=>{Am(n)}]);export{Am as initApparthotels};
|
|
24
24
|
/*! Bundled license information:
|
|
25
25
|
|
|
26
26
|
@vue/shared/dist/shared.esm-bundler.js:
|