@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 Sd=Object.create;var wa=Object.defineProperty;var kd=Object.getOwnPropertyDescriptor;var Td=Object.getOwnPropertyNames;var Cd=Object.getPrototypeOf,Pd=Object.prototype.hasOwnProperty;var Id=(n,t,e)=>t in n?wa(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var xd=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Rd=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Td(t))!Pd.call(n,i)&&i!==e&&wa(n,i,{get:()=>t[i],enumerable:!(r=kd(t,i))||r.enumerable});return n};var Ad=(n,t,e)=>(e=n!=null?Sd(Cd(n)):{},Rd(t||!n||!n.__esModule?wa(e,"default",{value:n,enumerable:!0}):e,n));var H=(n,t,e)=>(Id(n,typeof t!="symbol"?t+"":t,e),e);var Oc=xd((Ba,$a)=>{(function(n,t){typeof Ba=="object"&&typeof $a<"u"?$a.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.JSBI=t())})(Ba,function(){"use strict";var n=Math.imul,t=Math.clz32;function e(N,F){(F==null||F>N.length)&&(F=N.length);for(var O=0,Q=Array(F);O<F;O++)Q[O]=N[O];return Q}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,F,O){return F=f(F),z(N,I()?Reflect.construct(F,O||[],f(N).constructor):F.apply(N,O))}function a(N,F){if(!(N instanceof F))throw new TypeError("Cannot call a class as a function")}function s(N,F,O){if(I())return Reflect.construct.apply(null,arguments);var Q=[null];Q.push.apply(Q,F);var g=new(N.bind.apply(N,Q));return O&&W(g,O.prototype),g}function l(N,F){for(var O,Q=0;Q<F.length;Q++)O=F[Q],O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(N,ie(O.key),O)}function u(N,F,O){return F&&l(N.prototype,F),O&&l(N,O),Object.defineProperty(N,"prototype",{writable:!1}),N}function m(N,F){var O=typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(!O){if(Array.isArray(N)||(O=Me(N))||F&&N&&typeof N.length=="number"){O&&(N=O);var Q=0,g=function(){};return{s:g,n:function(){return Q>=N.length?{done:!0}:{done:!1,value:N[Q++]}},e:function(y){throw y},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(){O=O.call(N)},n:function(){var y=O.next();return c=y.done,y},e:function(y){d=!0,A=y},f:function(){try{c||O.return==null||O.return()}finally{if(d)throw A}}}}function f(N){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},f(N)}function v(N,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(F&&F.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),F&&W(N,F)}function E(N){try{return Function.toString.call(N).indexOf("[native code]")!==-1}catch{return typeof N=="function"}}function I(){try{var N=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I=function(){return!!N})()}function P(N,F){var O=N==null?null:typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(O!=null){var Q,g,A,c,d=[],y=!0,D=!1;try{if(A=(O=O.call(N)).next,F===0){if(Object(O)!==O)return;y=!1}else for(;!(y=(Q=A.call(O)).done)&&(d.push(Q.value),d.length!==F);y=!0);}catch(b){D=!0,g=b}finally{try{if(!y&&O.return!=null&&(c=O.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 z(N,F){if(F&&(typeof F=="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(N)}function W(N,F){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,Q){return O.__proto__=Q,O},W(N,F)}function K(N,F){return r(N)||P(N,F)||Me(N,F)||L()}function ne(N,F){if(typeof N!="object"||!N)return N;var O=N[Symbol.toPrimitive];if(O!==void 0){var Q=O.call(N,F||"default");if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(N)}function ie(N){var F=ne(N,"string");return typeof F=="symbol"?F:F+""}function le(N){"@babel/helpers - typeof";return le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},le(N)}function Me(N,F){if(N){if(typeof N=="string")return e(N,F);var O={}.toString.call(N).slice(8,-1);return O==="Object"&&N.constructor&&(O=N.constructor.name),O==="Map"||O==="Set"?Array.from(N):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?e(N,F):void 0}}function Ee(N){var F=typeof Map=="function"?new Map:void 0;return Ee=function(O){function Q(){return s(O,arguments,f(this).constructor)}if(O===null||!E(O))return O;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(F!==void 0){if(F.has(O))return F.get(O);F.set(O,Q)}return Q.prototype=Object.create(O.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),W(Q,O)},Ee(N)}var re=function(N){var F=Math.abs,O=Math.max,Q=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 v(g,N),u(g,[{key:"toDebugString",value:function(){var c,d=["BigInt["],y=m(this);try{for(y.s();!(c=y.n()).done;){var D=c.value;d.push((D&&(D>>>0).toString(16))+", ")}}catch(b){y.e(b)}finally{y.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,y){y>this.length&&(y=this.length);for(var D=32767&c,b=c>>>15,_=0,T=d,k=0;k<y;k++){var Y=this.__digit(k),R=32767&Y,V=Y>>>15,J=g.__imul(R,D),U=g.__imul(R,b),B=g.__imul(V,D),ee=g.__imul(V,b),ce=T+J+_;_=ce>>>30,ce&=1073741823,ce+=((32767&U)<<15)+((32767&B)<<15),_+=ce>>>30,T=ee+(U>>>15)+(B>>>15),this.__setDigit(k,1073741823&ce)}if(_!==0||T!==0)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(c,d,y){for(var D,b=0,_=0;_<y;_++)D=this.__halfDigit(d+_)+c.__halfDigit(_)+b,b=D>>>15,this.__setHalfDigit(d+_,32767&D);return b}},{key:"__inplaceSub",value:function(c,d,y){var D=y-1>>>1,b=0;if(1&d){d>>=1;for(var _=this.__digit(d),T=32767&_,k=0;k<D;k++){var Y=c.__digit(k),R=(_>>>15)-(32767&Y)-b;b=1&R>>>15,this.__setDigit(d+k,(32767&R)<<15|32767&T),_=this.__digit(d+k+1),T=(32767&_)-(Y>>>15)-b,b=1&T>>>15}var V=c.__digit(k),J=(_>>>15)-(32767&V)-b;b=1&J>>>15,this.__setDigit(d+k,(32767&J)<<15|32767&T);var U=V>>>15;if(d+k+1>=this.length)throw new RangeError("out of bounds");!(1&y)&&(_=this.__digit(d+k+1),T=(32767&_)-U-b,b=1&T>>>15,this.__setDigit(d+c.length,1073709056&_|32767&T))}else{d>>=1;for(var B=0;B<c.length-1;B++){var ee=this.__digit(d+B),ce=c.__digit(B),pe=(32767&ee)-(32767&ce)-b;b=1&pe>>>15;var ve=(ee>>>15)-(ce>>>15)-b;b=1&ve>>>15,this.__setDigit(d+B,(32767&ve)<<15|32767&pe)}var Ce=this.__digit(d+B),je=c.__digit(B),Ze=(32767&Ce)-(32767&je)-b;b=1&Ze>>>15;var $t=0;!(1&y)&&($t=(Ce>>>15)-(je>>>15)-b,b=1&$t>>>15),this.__setDigit(d+B,(32767&$t)<<15|32767&Ze)}return b}},{key:"__inplaceRightShift",value:function(c){if(c!==0){for(var d,y=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|y),y=d>>>c;this.__setDigit(D,y)}}},{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 y=c>>>1,D=this.__digit(y),b=1&c?32767&D|d<<15:1073709056&D|32767&d;this.__setDigit(y,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)||Q(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 y=g.__fromString(c);if(y===null)throw new SyntaxError("Cannot convert "+c+" to a BigInt");return y}if(typeof c=="boolean")return c===!0?g.__oneDigit(1,!1):g.__zero();if(le(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 y=c.__unsignedDigit(0);return c.sign?-y:y}var D=c.__digit(d-1),b=g.__clz30(D),_=30*d-b;if(1024<_)return c.sign?-1/0:1/0;var T=_-1,k=D,Y=d-1,R=b+3,V=R===32?0:k<<R;V>>>=12;var J=R-12,U=12<=R?0:k<<20+R,B=20+R;for(0<J&&0<Y&&(Y--,k=c.__digit(Y),V|=k>>>30-J,U=k<<J+2,B=J+2);0<B&&0<Y;)Y--,k=c.__digit(Y),U|=30<=B?k<<B-30:k>>>30-B,B-=30;var ee=g.__decideRounding(c,B,Y,k);if((ee===1||ee===0&&(1&U)==1)&&(U=U+1>>>0,U===0&&(V++,V>>>20!=0&&(V=0,T++,1023<T))))return c.sign?-1/0:1/0;var ce=c.sign?-2147483648:0;return T=T+1023<<20,g.__kBitConversionInts[g.__kBitConversionIntHigh]=ce|T|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 y=d.__unsignedDigit(0);if(y===1)return c;if(y>=g.__kMaxLengthBits)throw new RangeError("BigInt too big");if(c.length===1&&c.__digit(0)===2){var D=1+(0|y/30),b=c.sign&&(1&y)!=0,_=new g(D,b);_.__initializeDigits();var T=1<<y%30;return _.__setDigit(D-1,T),_}var k=null,Y=c;for(1&y&&(k=c),y>>=1;y!==0;y>>=1)Y=g.multiply(Y,Y),1&y&&(k===null?k=Y:k=g.multiply(k,Y));return k}},{key:"multiply",value:function(c,d){if(c.length===0)return c;if(d.length===0)return d;var y=c.length+d.length;30<=c.__clzmsd()+d.__clzmsd()&&y--;var D=new g(y,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 y,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);y=g.__absoluteDivSmall(c,b,null)}else y=g.__absoluteDivLarge(c,d,!0,!1);return y.sign=D,y.__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 y=d.__unsignedDigit(0);if(d.length===1&&32767>=y){if(y===1)return g.__zero();var D=g.__absoluteModSmall(c,y);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 y=c.sign;return y===d.sign?g.__absoluteAdd(c,d,y):0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,y):g.__absoluteSub(d,c,!y)}},{key:"subtract",value:function(c,d){var y=c.sign;return y===d.sign?0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,y):g.__absoluteSub(d,c,!y):g.__absoluteAdd(c,d,y)}},{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 y=0;y<c.length;y++)if(c.__digit(y)!==d.__digit(y))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 y=O(c.length,d.length)+1,D=g.__absoluteSubOne(c,y),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 y=O(c.length,d.length),D=g.__absoluteSubOne(c,y),b=g.__absoluteSubOne(d);return g.__absoluteXor(D,b,D).__trim()}var _=O(c.length,d.length)+1;if(c.sign){var T=[d,c];c=T[0],d=T[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 y=O(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,y),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 T=g.__absoluteSubOne(d,y);return T=g.__absoluteAndNot(T,c,T),g.__absoluteAddOne(T,!0,T).__trim()}},{key:"asIntN",value:function(c,d){if(d.length===0)return d;if(c=Q(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 y=0|(c+29)/30;if(d.length<y)return d;var D=d.__unsignedDigit(y-1),b=1<<(c-1)%30;if(d.length===y&&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 T=y-2;0<=T;T--)if(d.__digit(T)!==0)return g.__truncateAndSubFromPowerOfTwo(c,d,!1);return d.length===y&&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=Q(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 y=0|(c+29)/30;if(d.length<y)return d;var D=c%30;if(d.length==y){if(D===0)return d;var b=d.__digit(y-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(le(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(le(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(typeof c=="boolean"){if(g.__isBigInt(d))return g.__equalToNumber(d,+c);if(le(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(le(c)==="symbol"){if(g.__isBigInt(d))return!1;if(le(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(le(c)==="object"){if(le(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 y=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return g.asIntN(64,g.DataViewGetBigUint64(c,d,y))}},{key:"DataViewGetBigUint64",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0&&arguments[2],D=y?[4,0]:[0,4],b=K(D,2),_=b[0],T=b[1],k=c.getUint32(d+_,y),Y=c.getUint32(d+T,y),R=new g(3,!1);return R.__setDigit(0,1073741823&Y),R.__setDigit(1,(268435455&k)<<2|Y>>>30),R.__setDigit(2,k>>>28),R.__trim()}},{key:"DataViewSetBigInt64",value:function(c,d,y){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];g.DataViewSetBigUint64(c,d,y,D)}},{key:"DataViewSetBigUint64",value:function(c,d,y){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];y=g.asUintN(64,y);var b=0,_=0;if(0<y.length&&(_=y.__digit(0),1<y.length)){var T=y.__digit(1);_|=T<<30,b=T>>>2,2<y.length&&(b|=y.__digit(2)<<28)}var k=D?[4,0]:[0,4],Y=K(k,2),R=Y[0],V=Y[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 y=new g(1,d);return y.__setDigit(0,c),y}},{key:"__decideRounding",value:function(c,d,y,D){if(0<d)return-1;var b;if(0>d)b=-d-1;else{if(y===0)return-1;y--,D=c.__digit(y),b=29}var _=1<<b;if(!(D&_))return-1;if(_-=1,(D&_)!=0)return 1;for(;0<y;)if(y--,c.__digit(y)!==0)return 1;return 0}},{key:"__fromDouble",value:function(c){var d=0>c;g.__kBitConversionDouble[0]=c;var y,D=2047&g.__kBitConversionInts[g.__kBitConversionIntHigh]>>>20,b=D-1023,_=(0|b/30)+1,T=new g(_,d),k=1048576,Y=1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh]|k,R=g.__kBitConversionInts[g.__kBitConversionIntLow],V=20,J=b%30,U=0;if(J<V){var B=V-J;U=B+32,y=Y>>>B,Y=Y<<32-B|R>>>B,R<<=32-B}else if(J===V)U=32,y=Y,Y=R,R=0;else{var ee=J-V;U=32-ee,y=Y<<ee|R>>>32-ee,Y=R<<ee,R=0}T.__setDigit(_-1,y);for(var ce=_-2;0<=ce;ce--)0<U?(U-=30,y=Y>>>2,Y=Y<<30|R>>>2,R<<=30):y=0,T.__setDigit(ce,y);return T.__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,y=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),y=1}else if(_===45){if(++b===D)return null;_=c.charCodeAt(b),y=-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(y!==0&&d!==10)return null;for(;_===48;){if(++b===D)return g.__zero();_=c.charCodeAt(b)}var T=D-b,k=g.__kMaxBitsPerChar[d],Y=g.__kBitsPerCharTableMultiplier-1;if(T>1073741824/k)return null;var R=k*T+Y>>>g.__kBitsPerCharTableShift,V=0|(R+29)/30,J=new g(V,!1),U=10>d?d:10,B=10<d?d-10:0;if(d&d-1){J.__initializeDigits();var Ze=!1,$t=0;do{for(var qn,Cn=0,Br=1;;){if(qn=void 0,_-48>>>0<U)qn=_-48;else if((32|_)-97>>>0<B)qn=(32|_)-87;else{Ze=!0;break}var Qi=Br*d;if(1073741823<Qi)break;if(Br=Qi,Cn=Cn*d+qn,$t++,++b===D){Ze=!0;break}_=c.charCodeAt(b)}Y=30*g.__kBitsPerCharTableMultiplier-1;var eo=0|(k*$t+Y>>>g.__kBitsPerCharTableShift)/30;J.__inplaceMultiplyAdd(Br,Cn,eo)}while(!Ze)}else{k>>=g.__kBitsPerCharTableShift;var ee=[],ce=[],pe=!1;do{for(var ve,Ce=0,je=0;;){if(ve=void 0,_-48>>>0<U)ve=_-48;else if((32|_)-97>>>0<B)ve=(32|_)-87;else{pe=!0;break}if(je+=k,Ce=Ce<<k|ve,++b===D){pe=!0;break}if(_=c.charCodeAt(b),30<je+k)break}ee.push(Ce),ce.push(je)}while(!pe);g.__fillFromParts(J,ee,ce)}if(b!==D){if(!g.__isWhitespace(_))return null;for(b++;b<D;b++)if(_=c.charCodeAt(b),!g.__isWhitespace(_))return null}return J.sign=y===-1,J.__trim()}},{key:"__fillFromParts",value:function(c,d,y){for(var D=0,b=0,_=0,T=d.length-1;0<=T;T--){var k=d[T],Y=y[T];b|=k<<_,_+=Y,_===30?(c.__setDigit(D++,b),_=0,b=0):30<_&&(c.__setDigit(D++,1073741823&b),_-=30,b=k>>>Y-_)}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 y=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,T=c.__digit(y-1),k=g.__clz30(T),Y=30*y-k,R=0|(Y+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,B=0,ee=0;ee<y-1;ee++){var ce=c.__digit(ee),pe=(U|ce<<B)&_;V[J--]=g.__kConversionChars[pe];var ve=b-B;for(U=ce>>>ve,B=30-ve;B>=b;)V[J--]=g.__kConversionChars[U&_],U>>>=b,B-=b}var Ce=(U|T<<B)&_;for(V[J--]=g.__kConversionChars[Ce],U=T>>>b-B;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,y){var D=c.length;if(D===0)return"";if(D===1){var b=c.__unsignedDigit(0).toString(d);return y===!1&&c.sign&&(b="-"+b),b}var _=30*D-g.__clz30(c.__digit(D-1)),T=g.__kMaxBitsPerChar[d],k=T-1,Y=_*g.__kBitsPerCharTableMultiplier;Y+=k-1,Y=0|Y/k;var R,V,J=Y+1>>1,U=g.exponentiate(g.__oneDigit(d,!1),g.__oneDigit(J,!1)),B=U.__unsignedDigit(0);if(U.length===1&&32767>=B){R=new g(c.length,!1),R.__initializeDigits();for(var ee,ce=0,pe=2*c.length-1;0<=pe;pe--)ee=ce<<15|c.__halfDigit(pe),R.__setHalfDigit(pe,0|ee/B),ce=0|ee%B;V=ce.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 y===!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 y=c.sign;if(y!==d.sign)return g.__unequalSign(y);var D=g.__absoluteCompare(c,d);return 0<D?g.__absoluteGreater(y):0>D?g.__absoluteLess(y):0}},{key:"__compareToNumber",value:function(c,d){if(g.__isOneDigitInt(d)){var y=c.sign,D=0>d;if(y!==D)return g.__unequalSign(y);if(c.length===0){if(D)throw new Error("implementation bug");return d===0?0:-1}if(1<c.length)return g.__absoluteGreater(y);var b=F(d),_=c.__unsignedDigit(0);return _>b?g.__absoluteGreater(y):_<b?g.__absoluteLess(y):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 y=c.sign,D=0>d;if(y!==D)return g.__unequalSign(y);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(y);var T=c.length,k=c.__digit(T-1),Y=g.__clz30(k),R=30*T-Y,V=_+1;if(R<V)return g.__absoluteLess(y);if(R>V)return g.__absoluteGreater(y);var J=1048576,U=1048576|1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh],B=g.__kBitConversionInts[g.__kBitConversionIntLow],ee=20,ce=29-Y;if(ce!==(0|(R-1)%30))throw new Error("implementation bug");var pe,ve=0;if(ce<ee){var Ce=ee-ce;ve=Ce+32,pe=U>>>Ce,U=U<<32-Ce|B>>>Ce,B<<=32-Ce}else if(ce===ee)ve=32,pe=U,U=B,B=0;else{var je=ce-ee;ve=32-je,pe=U<<je|B>>>32-je,U=B<<je,B=0}if(k>>>=0,pe>>>=0,k>pe)return g.__absoluteGreater(y);if(k<pe)return g.__absoluteLess(y);for(var Ze=T-2;0<=Ze;Ze--){0<ve?(ve-=30,pe=U>>>2,U=U<<30|B>>>2,B<<=30):pe=0;var $t=c.__unsignedDigit(Ze);if($t>pe)return g.__absoluteGreater(y);if($t<pe)return g.__absoluteLess(y)}if(U!==0||B!==0){if(ve===0)throw new Error("implementation bug");return g.__absoluteLess(y)}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)===F(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,y){if(c=g.__toPrimitive(c),d=g.__toPrimitive(d),typeof c=="string"&&typeof d=="string")switch(y){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),y);if(typeof c=="string"&&g.__isBigInt(d))return c=g.__fromString(c),c!==null&&g.__comparisonResultToBool(g.__compareToBigInt(c,d),y);if(c=g.__toNumeric(c),d=g.__toNumeric(d),g.__isBigInt(c)){if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToBigInt(c,d),y);if(typeof d!="number")throw new Error("implementation bug");return g.__comparisonResultToBool(g.__compareToNumber(c,d),y)}if(typeof c!="number")throw new Error("implementation bug");if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToNumber(d,c),2^y);if(typeof d!="number")throw new Error("implementation bug");return y===0?c<d:y===1?c<=d:y===2?c>d:y===3?c>=d:void 0}},{key:"__absoluteAdd",value:function(c,d,y){if(c.length<d.length)return g.__absoluteAdd(d,c,y);if(c.length===0)return c;if(d.length===0)return c.sign===y?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,y),T=0,k=0;k<d.length;k++)b=c.__digit(k)+d.__digit(k)+T,T=b>>>30,_.__setDigit(k,1073741823&b);for(;k<c.length;k++){var Y=c.__digit(k)+T;T=Y>>>30,_.__setDigit(k,1073741823&Y)}return k<_.length&&_.__setDigit(k,T),_.__trim()}},{key:"__absoluteSub",value:function(c,d,y){if(c.length===0)return c;if(d.length===0)return c.sign===y?c:g.unaryMinus(c);for(var D,b=new g(c.length,y),_=0,T=0;T<d.length;T++)D=c.__digit(T)-d.__digit(T)-_,_=1&D>>>30,b.__setDigit(T,1073741823&D);for(;T<c.length;T++){var k=c.__digit(T)-_;_=1&k>>>30,b.__setDigit(T,1073741823&k)}return b.__trim()}},{key:"__absoluteAddOne",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length;y===null?y=new g(D,d):y.sign=d;for(var b,_=1,T=0;T<D;T++)b=c.__digit(T)+_,_=b>>>30,y.__setDigit(T,1073741823&b);return _!==0&&y.__setDigitGrow(D,1),y}},{key:"__absoluteSubOne",value:function(c,d){var y=c.length;d=d||y;for(var D,b=new g(d,!1),_=1,T=0;T<y;T++)D=c.__digit(T)-_,_=1&D>>>30,b.__setDigit(T,1073741823&D);if(_!==0)throw new Error("implementation bug");for(var k=y;k<d;k++)b.__setDigit(k,0);return b}},{key:"__absoluteAnd",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var T=c,k=D;c=d,D=b,d=T,b=k}var Y=_;y===null?y=new g(Y,!1):Y=y.length;for(var R=0;R<_;R++)y.__setDigit(R,c.__digit(R)&d.__digit(R));for(;R<Y;R++)y.__setDigit(R,0);return y}},{key:"__absoluteAndNot",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;D<b&&(_=D);var T=D;y===null?y=new g(T,!1):T=y.length;for(var k=0;k<_;k++)y.__setDigit(k,c.__digit(k)&~d.__digit(k));for(;k<D;k++)y.__setDigit(k,c.__digit(k));for(;k<T;k++)y.__setDigit(k,0);return y}},{key:"__absoluteOr",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var T=c,k=D;c=d,D=b,d=T,b=k}var Y=D;y===null?y=new g(Y,!1):Y=y.length;for(var R=0;R<_;R++)y.__setDigit(R,c.__digit(R)|d.__digit(R));for(;R<D;R++)y.__setDigit(R,c.__digit(R));for(;R<Y;R++)y.__setDigit(R,0);return y}},{key:"__absoluteXor",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var T=c,k=D;c=d,D=b,d=T,b=k}var Y=D;y===null?y=new g(Y,!1):Y=y.length;for(var R=0;R<_;R++)y.__setDigit(R,c.__digit(R)^d.__digit(R));for(;R<D;R++)y.__setDigit(R,c.__digit(R));for(;R<Y;R++)y.__setDigit(R,0);return y}},{key:"__absoluteCompare",value:function(c,d){var y=c.length-d.length;if(y!=0)return y;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,y,D){if(d!==0){for(var b=32767&d,_=d>>>15,T=0,k=0,Y=0;Y<c.length;Y++,D++){var R=y.__digit(D),V=c.__digit(Y),J=32767&V,U=V>>>15,B=g.__imul(J,b),ee=g.__imul(J,_),ce=g.__imul(U,b),pe=g.__imul(U,_);R+=k+B+T,T=R>>>30,R&=1073741823,R+=((32767&ee)<<15)+((32767&ce)<<15),T+=R>>>30,k=pe+(ee>>>15)+(ce>>>15),y.__setDigit(D,1073741823&R)}for(;T!==0||k!==0;D++){var ve=y.__digit(D);ve+=T+k,k=0,T=ve>>>30,y.__setDigit(D,1073741823&ve)}}}},{key:"__internalMultiplyAdd",value:function(c,d,y,D,b){for(var _=y,T=0,k=0;k<D;k++){var Y=c.__digit(k),R=g.__imul(32767&Y,d),V=g.__imul(Y>>>15,d),J=R+((32767&V)<<15)+T+_;_=J>>>30,T=V>>>15,b.__setDigit(k,1073741823&J)}if(b.length>D)for(b.__setDigit(D++,_+T);D<b.length;)b.__setDigit(D++,0);else if(_+T!==0)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;y===null&&(y=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,T=0|_/d;D=0|_%d,_=(D<<15|c.__halfDigit(b-1))>>>0;var k=0|_/d;D=0|_%d,y.__setDigit(b>>>1,T<<15|k)}return y}},{key:"__absoluteModSmall",value:function(c,d){for(var y,D=0,b=2*c.length-1;0<=b;b--)y=(D<<15|c.__halfDigit(b))>>>0,D=0|y%d;return D}},{key:"__absoluteDivLarge",value:function(c,d,y,D){var b=d.__halfDigitLength(),_=d.length,T=c.__halfDigitLength()-b,k=null;y&&(k=new g(T+2>>>1,!1),k.__initializeDigits());var Y=new g(b+2>>>1,!1);Y.__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,B=T;0<=B;B--){var ee=32767,ce=V.__halfDigit(B+b);if(ce!==J){var pe=(ce<<15|V.__halfDigit(B+b-1))>>>0;ee=0|pe/J;for(var ve=0|pe%J,Ce=d.__halfDigit(b-2),je=V.__halfDigit(B+b-2);g.__imul(ee,Ce)>>>0>(ve<<16|je)>>>0&&(ee--,ve+=J,!(32767<ve)););}g.__internalMultiplyAdd(d,ee,0,_,Y);var Ze=V.__inplaceSub(Y,B,b+1);Ze!==0&&(Ze=V.__inplaceAdd(d,B,b),V.__setHalfDigit(B+b,32767&V.__halfDigit(B+b)+Ze),ee--),y&&(1&B?U=ee<<15:k.__setDigit(B>>>1,U|ee))}if(D)return V.__inplaceRightShift(R),y?{quotient:k,remainder:V}:V;if(y)return k;throw new Error("unreachable")}},{key:"__clz15",value:function(c){return g.__clz30(c)-15}},{key:"__specialLeftShift",value:function(c,d,y){var D=c.length,b=D+y,_=new g(b,!1);if(d===0){for(var T=0;T<D;T++)_.__setDigit(T,c.__digit(T));return 0<y&&_.__setDigit(D,0),_}for(var k,Y=0,R=0;R<D;R++)k=c.__digit(R),_.__setDigit(R,1073741823&k<<d|Y),Y=k>>>30-d;return 0<y&&_.__setDigit(D,Y),_}},{key:"__leftShiftByAbsolute",value:function(c,d){var y=g.__toShiftAmount(d);if(0>y)throw new RangeError("BigInt too big");var D=0|y/30,b=y%30,_=c.length,T=b!==0&&c.__digit(_-1)>>>30-b!=0,k=_+D+(T?1:0),Y=new g(k,c.sign);if(b===0){for(var R=0;R<D;R++)Y.__setDigit(R,0);for(;R<k;R++)Y.__setDigit(R,c.__digit(R-D))}else{for(var V=0,J=0;J<D;J++)Y.__setDigit(J,0);for(var U,B=0;B<_;B++)U=c.__digit(B),Y.__setDigit(B+D,1073741823&U<<b|V),V=U>>>30-b;if(T)Y.__setDigit(_+D,V);else if(V!==0)throw new Error("implementation bug")}return Y.__trim()}},{key:"__rightShiftByAbsolute",value:function(c,d){var y=c.length,D=c.sign,b=g.__toShiftAmount(d);if(0>b)return g.__rightShiftByMaximum(D);var _=0|b/30,T=b%30,k=y-_;if(0>=k)return g.__rightShiftByMaximum(D);var Y=!1;if(D){var R=(1<<T)-1;if(c.__digit(_)&R)Y=!0;else for(var V=0;V<_;V++)if(c.__digit(V)!==0){Y=!0;break}}if(Y&&T===0){var J=c.__digit(y-1),U=~J==0;U&&k++}var B=new g(k,D);if(T===0){B.__setDigit(k-1,0);for(var ee=_;ee<y;ee++)B.__setDigit(ee-_,c.__digit(ee))}else{for(var ce,pe=c.__digit(_)>>>T,ve=y-_-1,Ce=0;Ce<ve;Ce++)ce=c.__digit(Ce+_+1),B.__setDigit(Ce,1073741823&ce<<30-T|pe),pe=ce>>>T;B.__setDigit(ve,pe)}return Y&&(B=g.__absoluteAddOne(B,!0,B)),B.__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(le(c)!=="object"||c.constructor===g)return c;if(typeof Symbol<"u"&&le(Symbol.toPrimitive)==="symbol"&&c[Symbol.toPrimitive]){var y=c[Symbol.toPrimitive](d);if(le(y)!=="object")return y;throw new TypeError("Cannot convert object to primitive value")}var D=c.valueOf;if(D){var b=D.call(c);if(le(b)!=="object")return b}var _=c.toString;if(_){var T=_.call(c);if(le(T)!=="object")return T}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 le(c)==="object"&&c!==null&&c.constructor===g}},{key:"__truncateToNBits",value:function(c,d){for(var y=0|(c+29)/30,D=new g(y,d.sign),b=y-1,_=0;_<b;_++)D.__setDigit(_,d.__digit(_));var T=d.__digit(b);if(c%30!=0){var k=32-c%30;T=T<<k>>>k}return D.__setDigit(b,T),D.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(c,d,y){for(var D=Math.min,b,_=0|(c+29)/30,T=new g(_,y),k=0,Y=_-1,R=0,V=D(Y,d.length);k<V;k++)b=0-d.__digit(k)-R,R=1&b>>>30,T.__setDigit(k,1073741823&b);for(;k<Y;k++)T.__setDigit(k,0|1073741823&-R);var J,U=Y<d.length?d.__digit(Y):0,B=c%30;if(B===0)J=0-U-R,J&=1073741823;else{var ee=32-B;U=U<<ee>>>ee;var ce=1<<32-ee;J=ce-U-R,J&=ce-1}return T.__setDigit(Y,J),T.__trim()}},{key:"__digitPow",value:function(c,d){for(var y=1;0<d;)1&d&&(y*=c),d>>>=1,c*=c;return y}},{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 re.__kMaxLength=33554432,re.__kMaxLengthBits=re.__kMaxLength<<5,re.__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],re.__kBitsPerCharTableShift=5,re.__kBitsPerCharTableMultiplier=1<<re.__kBitsPerCharTableShift,re.__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"],re.__kBitConversionBuffer=new ArrayBuffer(8),re.__kBitConversionDouble=new Float64Array(re.__kBitConversionBuffer),re.__kBitConversionInts=new Int32Array(re.__kBitConversionBuffer),re.__kBitConversionIntHigh=re.__detectBigEndian()?0:1,re.__kBitConversionIntLow=re.__detectBigEndian()?1:0,re.__clz30=t?function(N){return t(N)-2}:function(N){var F=Math.LN2,O=Math.log;return N===0?30:0|29-(0|O(N>>>0)/F)},re.__imul=n||function(N,F){return 0|N*F},re})});var zr=()=>{};function Wn(n,t,e,r){return n?(n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)):zr}var yc=n=>n instanceof HTMLInputElement;var Ur=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=yc(e)?e.value:""}return t.toString()};var ba=class{constructor(){H(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))}},ro=new ba;function At(n,t){ro.emit(n,t)}function Pn(n,t){Array.isArray(n)?n.forEach(e=>ro.on(e,t)):ro.on(n,t)}var Kn=()=>{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},In=Kn().bcp47,Rm=Kn().iso639;var vc={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"}},Da={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."]},bc=()=>{let n=Kn().bcp47,t=n.split("-")[0],e=[n,t,"en"];for(let r of e)if(r in Da)return Da[r];return Da.en},wc=(n,t)=>{for(let e of t){let r=n[e];if(typeof r=="string"&&r.trim()!=="")return r}},Nd=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},Vr=n=>vc[Kn().bcp47][n]||vc["fr-FR"][n],Nt=n=>{let t=Kn().bcp47,e=t.split("-")[0],r=wc(n,Nd(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=wc(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 Ea(n){let t=Object.create(null);for(let e of n.split(","))t[e]=1;return e=>e in t}var _a=Object.assign;var Ld=Object.prototype.hasOwnProperty,io=(n,t)=>Ld.call(n,t),Zn=Array.isArray,qr=n=>Dc(n)==="[object Map]";var Od=n=>typeof n=="string",mr=n=>typeof n=="symbol",Wr=n=>n!==null&&typeof n=="object";var Yd=Object.prototype.toString,Dc=n=>Yd.call(n),Ec=n=>Dc(n).slice(8,-1);var oo=n=>Od(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n;var ao=n=>{let t=Object.create(null);return e=>t[e]||(t[e]=n(e))},Fd=/-(\w)/g,Ym=ao(n=>n.replace(Fd,(t,e)=>e?e.toUpperCase():"")),Hd=/\B([A-Z])/g,Fm=ao(n=>n.replace(Hd,"-$1").toLowerCase()),jd=ao(n=>n.charAt(0).toUpperCase()+n.slice(1)),Hm=ao(n=>n?`on${jd(n)}`:""),Gn=(n,t)=>!Object.is(n,t);var Bd="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var jm=Ea(Bd+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var Ma;var Pe;var Sa=new WeakSet,lo=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,Ma&&Ma.active&&Ma.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Sa.has(this)&&(Sa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||$d(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_c(this),kc(this);let t=Pe,e=Zt;Pe=this,Zt=!0;try{return this.fn()}finally{Tc(this),Pe=t,Zt=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ha(t);this.deps=this.depsTail=void 0,_c(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Sa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ca(this)&&this.run()}get dirty(){return Ca(this)}},Sc=0,Zr,Gr;function $d(n,t=!1){if(n.flags|=8,t){n.next=Gr,Gr=n;return}n.next=Zr,Zr=n}function Ya(){Sc++}function Fa(){if(--Sc>0)return;if(Gr){let t=Gr;for(Gr=void 0;t;){let e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Zr;){let t=Zr;for(Zr=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 kc(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tc(n){let t,e=n.depsTail,r=e;for(;r;){let i=r.prevDep;r.version===-1?(r===e&&(e=i),Ha(r),Ud(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}n.deps=t,n.depsTail=e}function Ca(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(zd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function zd(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===uo)||(n.globalVersion=uo,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Ca(n))))return;n.flags|=2;let t=n.dep,e=Pe,r=Zt;Pe=n,Zt=!0;try{kc(n);let i=n.fn(n._value);(t.version===0||Gn(i,n._value))&&(n.flags|=128,n._value=i,t.version++)}catch(i){throw t.version++,i}finally{Pe=e,Zt=r,Tc(n),n.flags&=-3}}function Ha(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)Ha(o,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function Ud(n){let{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}function Cc(n,t){n.effect instanceof lo&&(n=n.effect.fn);let e=new lo(n);t&&_a(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,Pc=[];function Vd(){Pc.push(Zt),Zt=!1}function qd(){let n=Pc.pop();Zt=n===void 0?!0:n}function _c(n){let{cleanup:t}=n;if(n.cleanup=void 0,t){let e=Pe;Pe=void 0;try{t()}finally{Pe=e}}}var uo=0,Pa=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}},ho=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 Pa(Pe,this),Pe.deps?(e.prevDep=Pe.depsTail,Pe.depsTail.nextDep=e,Pe.depsTail=e):Pe.deps=Pe.depsTail=e,Ic(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++,uo++,this.notify(t)}notify(t){Ya();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Fa()}}};function Ic(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)Ic(r)}let e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),n.dep.subs=n}}var Ia=new WeakMap,Jn=Symbol(""),xa=Symbol(""),Jr=Symbol("");function Et(n,t,e){if(Zt&&Pe){let r=Ia.get(n);r||Ia.set(n,r=new Map);let i=r.get(e);i||(r.set(e,i=new ho),i.map=r,i.key=e),i.track()}}function xn(n,t,e,r,i,o){let a=Ia.get(n);if(!a){uo++;return}let s=l=>{l&&l.trigger()};if(Ya(),t==="clear")a.forEach(s);else{let l=Zn(n),u=l&&oo(e);if(l&&e==="length"){let m=Number(r);a.forEach((f,v)=>{(v==="length"||v===Jr||!mr(v)&&v>=m)&&s(f)})}else switch((e!==void 0||a.has(void 0))&&s(a.get(e)),u&&s(a.get(Jr)),t){case"add":l?u&&s(a.get("length")):(s(a.get(Jn)),qr(n)&&s(a.get(xa)));break;case"delete":l||(s(a.get(Jn)),qr(n)&&s(a.get(xa)));break;case"set":qr(n)&&s(a.get(Jn));break}}Fa()}function fr(n){let t=ke(n);return t===n?t:(Et(t,"iterate",Jr),Rn(n)?t:t.map(it))}function ja(n){return Et(n=ke(n),"iterate",Jr),n}var Wd={__proto__:null,[Symbol.iterator](){return ka(this,Symbol.iterator,it)},concat(...n){return fr(this).concat(...n.map(t=>Zn(t)?fr(t):t))},entries(){return ka(this,"entries",n=>(n[1]=it(n[1]),n))},every(n,t){return hn(this,"every",n,t,void 0,arguments)},filter(n,t){return hn(this,"filter",n,t,e=>e.map(it),arguments)},find(n,t){return hn(this,"find",n,t,it,arguments)},findIndex(n,t){return hn(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return hn(this,"findLast",n,t,it,arguments)},findLastIndex(n,t){return hn(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return hn(this,"forEach",n,t,void 0,arguments)},includes(...n){return Ta(this,"includes",n)},indexOf(...n){return Ta(this,"indexOf",n)},join(n){return fr(this).join(n)},lastIndexOf(...n){return Ta(this,"lastIndexOf",n)},map(n,t){return hn(this,"map",n,t,void 0,arguments)},pop(){return Kr(this,"pop")},push(...n){return Kr(this,"push",n)},reduce(n,...t){return Mc(this,"reduce",n,t)},reduceRight(n,...t){return Mc(this,"reduceRight",n,t)},shift(){return Kr(this,"shift")},some(n,t){return hn(this,"some",n,t,void 0,arguments)},splice(...n){return Kr(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 Kr(this,"unshift",n)},values(){return ka(this,"values",it)}};function ka(n,t,e){let r=ja(n),i=r[t]();return r!==n&&!Rn(n)&&(i._next=i.next,i.next=()=>{let o=i._next();return o.value&&(o.value=e(o.value)),o}),i}var Kd=Array.prototype;function hn(n,t,e,r,i,o){let a=ja(n),s=a!==n&&!Rn(n),l=a[t];if(l!==Kd[t]){let f=l.apply(n,o);return s?it(f):f}let u=e;a!==n&&(s?u=function(f,v){return e.call(this,it(f),v,n)}:e.length>2&&(u=function(f,v){return e.call(this,f,v,n)}));let m=l.call(a,u,r);return s&&i?i(m):m}function Mc(n,t,e,r){let i=ja(n),o=e;return i!==n&&(Rn(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,it(s),l,n)}),i[t](o,...r)}function Ta(n,t,e){let r=ke(n);Et(r,"iterate",Jr);let i=r[t](...e);return(i===-1||i===!1)&&sh(e[0])?(e[0]=ke(e[0]),r[t](...e)):i}function Kr(n,t,e=[]){Vd(),Ya();let r=ke(n)[t].apply(n,e);return Fa(),qd(),r}var Zd=Ea("__proto__,__v_isRef,__isVue"),xc=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(mr));function Gd(n){mr(n)||(n=String(n));let t=ke(this);return Et(t,"has",n),t.hasOwnProperty(n)}var mo=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?ih:Nc:o?rh:Ac).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=Zn(t);if(!i){let l;if(a&&(l=Wd[e]))return l;if(e==="hasOwnProperty")return Gd}let s=Reflect.get(t,e,pr(t)?t:r);return(mr(e)?xc.has(e):Zd(e))||(i||Et(t,"get",e),o)?s:pr(s)?a&&oo(e)?s:s.value:Wr(s)?i?fo(s):yr(s):s}},Ra=class extends mo{constructor(t=!1){super(!1,t)}set(t,e,r,i){let o=t[e];if(!this._isShallow){let l=gr(o);if(!Rn(r)&&!gr(r)&&(o=ke(o),r=ke(r)),!Zn(t)&&pr(o)&&!pr(r))return l?!1:(o.value=r,!0)}let a=Zn(t)&&oo(e)?Number(e)<t.length:io(t,e),s=Reflect.set(t,e,r,pr(t)?t:i);return t===ke(i)&&(a?Gn(r,o)&&xn(t,"set",e,r,o):xn(t,"add",e,r)),s}deleteProperty(t,e){let r=io(t,e),i=t[e],o=Reflect.deleteProperty(t,e);return o&&r&&xn(t,"delete",e,void 0,i),o}has(t,e){let r=Reflect.has(t,e);return(!mr(e)||!xc.has(e))&&Et(t,"has",e),r}ownKeys(t){return Et(t,"iterate",Zn(t)?"length":Jn),Reflect.ownKeys(t)}},Aa=class extends mo{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}},Jd=new Ra,Xd=new Aa;var Na=n=>n,so=n=>Reflect.getPrototypeOf(n);function Qd(n,t,e){return function(...r){let i=this.__v_raw,o=ke(i),a=qr(o),s=n==="entries"||n===Symbol.iterator&&a,l=n==="keys"&&a,u=i[n](...r),m=e?Na:t?La:it;return!t&&Et(o,"iterate",l?xa:Jn),{next(){let{value:f,done:v}=u.next();return v?{value:f,done:v}:{value:s?[m(f[0]),m(f[1])]:m(f),done:v}},[Symbol.iterator](){return this}}}}function co(n){return function(...t){return n==="delete"?!1:n==="clear"?void 0:this}}function eh(n,t){let e={get(i){let o=this.__v_raw,a=ke(o),s=ke(i);n||(Gn(i,s)&&Et(a,"get",i),Et(a,"get",s));let{has:l}=so(a),u=t?Na:n?La:it;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&&Et(ke(i),"iterate",Jn),Reflect.get(i,"size",i)},has(i){let o=this.__v_raw,a=ke(o),s=ke(i);return n||(Gn(i,s)&&Et(a,"has",i),Et(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?Na:n?La:it;return!n&&Et(l,"iterate",Jn),s.forEach((m,f)=>i.call(o,u(m),u(f),a))}};return _a(e,n?{add:co("add"),set:co("set"),delete:co("delete"),clear:co("clear")}:{add(i){!t&&!Rn(i)&&!gr(i)&&(i=ke(i));let o=ke(this);return so(o).has.call(o,i)||(o.add(i),xn(o,"add",i,i)),this},set(i,o){!t&&!Rn(o)&&!gr(o)&&(o=ke(o));let a=ke(this),{has:s,get:l}=so(a),u=s.call(a,i);u||(i=ke(i),u=s.call(a,i));let m=l.call(a,i);return a.set(i,o),u?Gn(o,m)&&xn(a,"set",i,o,m):xn(a,"add",i,o),this},delete(i){let o=ke(this),{has:a,get:s}=so(o),l=a.call(o,i);l||(i=ke(i),l=a.call(o,i));let u=s?s.call(o,i):void 0,m=o.delete(i);return l&&xn(o,"delete",i,void 0,u),m},clear(){let i=ke(this),o=i.size!==0,a=void 0,s=i.clear();return o&&xn(i,"clear",void 0,void 0,a),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Qd(i,n,t)}),e}function Rc(n,t){let e=eh(n,t);return(r,i,o)=>i==="__v_isReactive"?!n:i==="__v_isReadonly"?n:i==="__v_raw"?r:Reflect.get(io(e,i)&&i in r?e:r,i,o)}var th={get:Rc(!1,!1)};var nh={get:Rc(!0,!1)};var Ac=new WeakMap,rh=new WeakMap,Nc=new WeakMap,ih=new WeakMap;function oh(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ah(n){return n.__v_skip||!Object.isExtensible(n)?0:oh(Ec(n))}function yr(n){return gr(n)?n:Lc(n,!1,Jd,th,Ac)}function fo(n){return Lc(n,!0,Xd,nh,Nc)}function Lc(n,t,e,r,i){if(!Wr(n)||n.__v_raw&&!(t&&n.__v_isReactive))return n;let o=ah(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 gr(n){return!!(n&&n.__v_isReadonly)}function Rn(n){return!!(n&&n.__v_isShallow)}function sh(n){return n?!!n.__v_raw:!1}function ke(n){let t=n&&n.__v_raw;return t?ke(t):n}var it=n=>Wr(n)?yr(n):n,La=n=>Wr(n)?fo(n):n;function pr(n){return n?n.__v_isRef===!0:!1}function Ge(n){return ch(n,!1)}function ch(n,t){return pr(n)?n:new Oa(n,t)}var Oa=class{constructor(t,e){this.dep=new ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:ke(t),this._value=e?t:it(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){let e=this._rawValue,r=this.__v_isShallow||Rn(t)||gr(t);t=r?t:ke(t),Gn(t,e)&&(this._rawValue=t,this._value=r?t:it(t),this.dep.trigger())}};var S=Ad(Oc(),1),Yt=S.default.BigInt(0),pi=S.default.BigInt(1),Ns=S.default.BigInt(2),lh=S.default.BigInt(10),uh=S.default.BigInt(24),dh=S.default.BigInt(60),hh=S.default.BigInt(1e3),Ai=S.default.BigInt(1e6),li=S.default.BigInt(1e9),yl=S.default.multiply(S.default.BigInt(3600),li),mh=S.default.multiply(dh,li),Fn=S.default.multiply(yl,uh);function fn(n){return typeof n=="bigint"?S.default.BigInt(n.toString(10)):n}function vl(n){return S.default.equal(S.default.remainder(n,Ns),Yt)}function Xn(n){return S.default.lessThan(n,Yt)?S.default.unaryMinus(n):n}function yo(n,t){return S.default.lessThan(n,t)?-1:S.default.greaterThan(n,t)?1:0}function ti(n,t){return{quotient:S.default.divide(n,t),remainder:S.default.remainder(n,t)}}var Yc,Fc,ae="slot-epochNanoSeconds",se="slot-iso-date",Ie="slot-iso-date-time",Ne="slot-time",j="slot-calendar",wl="slot-date-brand",bl="slot-year-month-brand",Dl="slot-month-day-brand",De="slot-time-zone",ct="slot-years",lt="slot-months",_t="slot-weeks",ut="slot-days",dt="slot-hours",ht="slot-minutes",mt="slot-seconds",ft="slot-milliseconds",pt="slot-microseconds",Mt="slot-nanoseconds",El="date",_l="ym",Ml="md",Sl="time",kl="datetime",Tl="instant",lr="original",Dr="timezone-canonical",Ka="timezone-original",ni="calendar-id",Cl="locale",Za="options",Pl=new WeakMap,Ga=Symbol.for("@@Temporal__GetSlots");(Yc=globalThis)[Ga]||(Yc[Ga]=function(n){return Pl.get(n)});var Ao=globalThis[Ga],Ja=Symbol.for("@@Temporal__CreateSlots");(Fc=globalThis)[Ja]||(Fc[Ja]=function(n){Pl.set(n,Object.create(null))});var Sn=globalThis[Ja];function bt(n,...t){if(!n||typeof n!="object")return!1;let e=Ao(n);return!!e&&t.every(r=>r in e)}function h(n,t){let e=Ao(n)?.[t];if(e===void 0)throw new TypeError(`Missing internal slot ${t}`);return e}function me(n,t,e){let r=Ao(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 Xa={};function kn(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))}Qa(t,n),Qa(`${t}.prototype`,n.prototype)}function Qa(n,t){let e=`%${n}%`;if(Xa[e]!==void 0)throw new Error(`intrinsic ${n} already exists`);Xa[e]=t}function Ke(n){return Xa[n]}function _r(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 za(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 No(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 Lo(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=fn(t),this.sec=S.default.toNumber(S.default.divide(this.totalNs,li)),this.subsec=S.default.toNumber(S.default.remainder(this.totalNs,li))}static validateNew(t,e){if(S.default.greaterThan(Xn(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(fn(t),fn(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),hh)),S.default.multiply(S.default.BigInt(i),Ai)),S.default.multiply(S.default.BigInt(r),li)),S.default.multiply(S.default.BigInt(e),mh)),S.default.multiply(S.default.BigInt(t),yl));return n.validateNew(s,"total")}abs(){return new n(Xn(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),Fn)),"sum")}addToEpochNs(t){return S.default.add(fn(t),this.totalNs)}cmp(t){return yo(this.totalNs,t.totalNs)}divmod(t){let{quotient:e,remainder:r}=ti(this.totalNs,S.default.BigInt(t));return{quotient:S.default.toNumber(e),remainder:new n(r)}}fdiv(t){let e=fn(t),r=S.default.BigInt(e),{quotient:i,remainder:o}=ti(this.totalNs,r),a=[],s,l=(S.default.lessThan(this.totalNs,Yt)?-1:1)*Math.sign(S.default.toNumber(e));for(;!S.default.equal(o,Yt)&&a.length<50;)o=S.default.multiply(o,lh),{quotient:s,remainder:o}=ti(o,r),a.push(Math.abs(S.default.toNumber(s)));return l*+(Xn(i).toString()+"."+a.join(""))}isZero(){return S.default.equal(this.totalNs,Yt)}round(t,e){let r=fn(t);if(S.default.equal(r,pi))return this;let{quotient:i,remainder:o}=ti(this.totalNs,r),a=S.default.lessThan(this.totalNs,Yt)?"negative":"positive",s=S.default.multiply(Xn(i),r),l=S.default.add(s,r),u=yo(Xn(S.default.multiply(o,Ns)),r),m=No(e,a),f=S.default.equal(Xn(this.totalNs),s)?s:Lo(s,l,u,vl(i),m),v=a==="positive"?f:S.default.unaryMinus(f);return n.validateNew(v,"rounding")}sign(){return this.cmp(new n(Yt))}subtract(t){return n.validateNew(S.default.subtract(this.totalNs,t.totalNs),"difference")}};_e.MAX=S.default.BigInt("9007199254740991999999999"),_e.ZERO=new _e(Yt);var Hc=/[A-Za-z._][A-Za-z._0-9+-]*/,Ni=new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${Hc.source})(?:\\/(?:${Hc.source}))*)`),Il=/(?:[+-]\d{6}|\d{4})/,vo=/(?:0[1-9]|1[0-2])/,es=/(?:0[1-9]|[12]\d|3[01])/,fh=new RegExp(`(${Il.source})(?:-(${vo.source})-(${es.source})|(${vo.source})(${es.source}))`),xl=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,Rl=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,Al=new RegExp(`([zZ])|${Rl.source}?`),Tr=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,ph=new RegExp([`^${fh.source}`,`(?:(?:[tT]|\\s+)${xl.source}(?:${Al.source})?)?`,`(?:\\[!?(${Ni.source})\\])?`,`((?:${Tr.source})*)$`].join("")),gh=new RegExp([`^[tT]?${xl.source}`,`(?:${Al.source})?`,`(?:\\[!?${Ni.source}\\])?`,`((?:${Tr.source})*)$`].join("")),yh=new RegExp(`^(${Il.source})-?(${vo.source})(?:\\[!?${Ni.source}\\])?((?:${Tr.source})*)$`),vh=new RegExp(`^(?:--)?(${vo.source})-?(${es.source})(?:\\[!?${Ni.source}\\])?((?:${Tr.source})*)$`),Ua=/(\d+)(?:[.,](\d{1,9}))?/,wh=new RegExp(`(?:${Ua.source}H)?(?:${Ua.source}M)?(?:${Ua.source}S)?`),bh=new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${wh.source})?$`,"i"),Hn=864e5,wo=1e6*Hn,Dh=6e10,Nl=1e8*Hn,Cr=Xt(Nl),gi=S.default.unaryMinus(Cr),Eh=S.default.add(S.default.subtract(gi,Fn),pi),_h=S.default.subtract(S.default.add(Cr,Fn),pi),Mh=146097*Hn,jc=-271821,Bc=275760,ui=Date.UTC(1847,0,1),Sh=["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"],kh=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 Le(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Oo(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=Oo(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 $c(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=Oo(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 yi(n,t){return String(n).padStart(t,"0")}function $e(n){if(typeof n!="string")throw new TypeError(`expected a string, not ${String(n)}`);return n}function ts(n,t){if(Le(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 ns=["era","eraYear","year","month","monthCode","day","hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],Th={era:Yo,eraYear:ue,year:ue,month:$c,monthCode:function(n){let t=$e(ts(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:$c,hour:ue,minute:ue,second:ue,millisecond:ue,microsecond:ue,nanosecond:ue,offset:function(n){let t=$e(ts(n));return Yr(t),t},timeZone:vt},Ch={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"]],zc=Object.fromEntries(Pr.map(n=>[n[0],n[1]])),Ph=Object.fromEntries(Pr.map(([n,t])=>[t,n])),di=Pr.map(([,n])=>n),Ir={day:wo,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},bo=["days","hours","microseconds","milliseconds","minutes","months","nanoseconds","seconds","weeks","years"],Ih=Intl.DateTimeFormat,Uc=new Map;function Ll(n){let t=Ei(n),e=Uc.get(t);return e===void 0&&(e=new Ih("en-us",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Uc.set(t,e)),e}function Ve(n){return bt(n,ae)&&!bt(n,De,j)}function Re(n){return bt(n,ct,lt,ut,dt,ht,mt,ft,pt,Mt)}function Ae(n){return bt(n,wl)}function Oe(n){return bt(n,Ne)}function Te(n){return bt(n,Ie)}function qe(n){return bt(n,bl)}function Ot(n){return bt(n,Dl)}function fe(n){return bt(n,ae,De,j)}function C(n,t){if(!t(n))throw new TypeError("invalid receiver: method called with the wrong type of this-object")}function Nr(n){if(bt(n,j)||bt(n,De))throw new TypeError("with() does not support a calendar or timeZone property");if(Oe(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 Li(n,t){return t==="never"||t==="auto"&&n==="iso8601"?"":`[${t==="critical"?"!":""}u-ca=${n}]`}function Fo(n){let t,e,r=!1;for(Tr.lastIndex=0;e=Tr.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=ph.exec(n);if(!t)throw new RangeError(`invalid RFC 9557 string: ${n}`);let e=Fo(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),m=+(t[8]??t[11]??0);m===60&&(m=59);let f=(t[9]??t[12]??"")+"000000000",v=+f.slice(0,3),E=+f.slice(3,6),I=+f.slice(6,9),P,L=!1;t[13]?(P=void 0,L=!0):t[14]&&(P=t[14]);let z=t[15];return js(i,o,a,l,u,m,v,E,I),{year:i,month:o,day:a,time:s?{hour:l,minute:u,second:m,millisecond:v,microsecond:E,nanosecond:I}:"start-of-day",tzAnnotation:z,offset:P,z:L,calendar:e}}function Ol(n){let t=gh.exec(n),e,r,i,o,a,s,l;if(t){l=Fo(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,m;if({time:u,z:m,calendar:l}=un(n),u==="start-of-day")throw new RangeError(`time is missing in string: ${n}`);if(m)throw new RangeError("Z designator not supported for PlainTime");({hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s}=u)}if($o(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:m}=Os(n);rr(1972,u,m)}catch{try{let{year:u,month:m}=Ls(n);rr(u,m,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 Ls(n){let t=yh.exec(n),e,r,i,o;if(t){i=Fo(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 Os(n){let t=vh.exec(n),e,r,i,o;if(t){if(i=Fo(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 Yl=new RegExp(`^${Ni.source}$`,"i"),Fl=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);function Hl(n){let t=Rh.test(n)?"Seconds not allowed in offset time zone":"Invalid time zone";throw new RangeError(`${t}: ${n}`)}function Yn(n){return Yl.test(n)||Hl(n),Fl.test(n)?{offsetMinutes:Yr(n)/6e10}:{tzName:n}}function hi(n,t,e,r){let i=n,o=t,a=e;switch(r){case"reject":rr(i,o,a);break;case"constrain":({year:i,month:o,day:a}=nu(i,o,a))}return{year:i,month:o,day:a}}function Ho(n,t,e,r,i,o,a){let s=n,l=t,u=e,m=r,f=i,v=o;switch(a){case"reject":$o(s,l,u,m,f,v);break;case"constrain":s=gt(s,0,23),l=gt(l,0,59),u=gt(u,0,59),m=gt(m,0,999),f=gt(f,0,999),v=gt(v,0,999)}return{hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v}}function jl(n){if(!Le(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<bo.length;r++){let i=bo[r],o=n[i];o!==void 0&&(e=!0,t[i]=Gt(o))}if(!e)throw new TypeError("invalid duration-like");return t}function Xe({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 Dn(n,"overflow",["constrain","reject"],"constrain")}function mi(n){return Dn(n,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function Qt(n,t){return Dn(n,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],t)}function go(n,t){return Dn(n,"offset",["prefer","use","ignore","reject"],t)}function Oi(n){return Dn(n,"calendarName",["auto","always","never","critical"],"auto")}function Lr(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 Or(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 Fi(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 _n=Symbol("~required~");function kt(n,t,e,r,i=[]){let o=[];for(let u=0;u<Pr.length;u++){let m=Pr[u],f=m[1],v=m[2];e!=="datetime"&&e!==v||o.push(f)}o=o.concat(i);let a=r;a===_n?a=void 0:a!==void 0&&o.push(a);let s=[];s=s.concat(o);for(let u=0;u<o.length;u++){let m=o[u],f=Ph[m];f!==void 0&&s.push(f)}let l=Dn(n,t,s,a);if(l===void 0&&r===_n)throw new RangeError(`${t} is required`);return l&&l in zc?zc[l]:l}function Va(n){let t=n.relativeTo;if(t===void 0)return{};let e,r,i,o,a,s="option",l=!1;if(Le(t)){if(fe(t))return{zonedRelativeTo:t};if(Ae(t))return{plainRelativeTo:t};if(Te(t))return{plainRelativeTo:yt(h(t,Ie).isoDate,h(t,j))};i=zi(t);let u=Bt(i,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],[]);({isoDate:e,time:r}=ji(i,u,"constrain")),{offset:a,timeZone:o}=u,a===void 0&&(s="wall")}else{let u,m,f,v,E;if({year:f,month:v,day:E,time:r,calendar:i,tzAnnotation:u,offset:a,z:m}=un($e(t)),u)o=vt(u),m?s="exact":a||(s="wall"),l=!0;else if(m)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");i||(i="iso8601"),i=Dt(i),e={year:f,month:v,day:E}}return o===void 0?{plainRelativeTo:yt(e,i)}:{zonedRelativeTo:Je(Do(e,r,s,s==="option"?Yr(a):0,o,"compatible","reject",l),o,i)}}function pn(n){return h(n,ct)!==0?"year":h(n,lt)!==0?"month":h(n,_t)!==0?"week":h(n,ut)!==0?"day":h(n,dt)!==0?"hour":h(n,ht)!==0?"minute":h(n,mt)!==0?"second":h(n,ft)!==0?"millisecond":h(n,pt)!==0?"microsecond":"nanosecond"}function wn(n,t){return di.indexOf(n)>di.indexOf(t)?t:n}function nn(n){return n==="year"||n==="month"||n==="week"}function gn(n){return nn(n)||n==="day"?"date":"time"}function $n(n){return Ke("%calendarImpl%")(n)}function Hi(n){return Ke("%calendarImpl%")(h(n,j))}function wt(n,t,e="date"){let r=Object.create(null),i=$n(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 Bt(n,t,e,r,i){let o=$n(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 m=a[u],f=t[m];if(f!==void 0)l=!0,s[m]=(0,Th[m])(f);else if(i!=="partial"){if(i.includes(m))throw new TypeError(`required property '${m}' missing or undefined`);s[m]=Ch[m]}}if(i==="partial"&&!l)throw new TypeError("no supported properties found");return s}function rs(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 ri(n,t){if(Le(n)){if(Ae(n))return ye(X(t)),yt(h(n,se),h(n,j));if(fe(n)){let l=qt(h(n,De),h(n,ae));return ye(X(t)),yt(l.isoDate,h(n,j))}if(Te(n))return ye(X(t)),yt(h(n,Ie).isoDate,h(n,j));let s=zi(n);return yt(jn(s,Bt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{year:e,month:r,day:i,calendar:o,z:a}=un($e(n));if(a)throw new RangeError("Z designator not supported for PlainDate");return o||(o="iso8601"),o=Dt(o),ye(X(t)),yt({year:e,month:r,day:i},o)}function ji(n,t,e){return we(jn(n,t,e),Ho(t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond,e))}function ii(n,t){let e,r,i;if(Le(n)){if(Te(n))return ye(X(t)),zt(h(n,Ie),h(n,j));if(fe(n)){let s=qt(h(n,De),h(n,ae));return ye(X(t)),zt(s,h(n,j))}if(Ae(n))return ye(X(t)),zt(we(h(n,se),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),h(n,j));i=zi(n);let o=Bt(i,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],[]),a=ye(X(t));({isoDate:e,time:r}=ji(i,o,a))}else{let o,a,s,l;if({year:a,month:s,day:l,time:r,calendar:i,z:o}=un($e(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}),js(a,s,l,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),i||(i="iso8601"),i=Dt(i),ye(X(t)),e={year:a,month:s,day:l}}return zt(we(e,r),i)}function Vt(n){let t=Ke("%Temporal.Duration%");if(Re(n))return new t(h(n,ct),h(n,lt),h(n,_t),h(n,ut),h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt));if(!Le(n))return function(i){let{years:o,months:a,weeks:s,days:l,hours:u,minutes:m,seconds:f,milliseconds:v,microseconds:E,nanoseconds:I}=function(P){let L=bh.exec(P);if(!L)throw new RangeError(`invalid duration: ${P}`);if(L.every((y,D)=>D<2||y===void 0))throw new RangeError(`invalid duration: ${P}`);let z=L[1]==="-"?-1:1,W=L[2]===void 0?0:ue(L[2])*z,K=L[3]===void 0?0:ue(L[3])*z,ne=L[4]===void 0?0:ue(L[4])*z,ie=L[5]===void 0?0:ue(L[5])*z,le=L[6]===void 0?0:ue(L[6])*z,Me=L[7],Ee=L[8],re=L[9],N=L[10],F=L[11],O=0,Q=0,g=0;if(Me!==void 0){if(Ee??re??N??F)throw new RangeError("only the smallest unit can be fractional");g=3600*ue((Me+"000000000").slice(0,9))*z}else if(O=Ee===void 0?0:ue(Ee)*z,re!==void 0){if(N??F)throw new RangeError("only the smallest unit can be fractional");g=60*ue((re+"000000000").slice(0,9))*z}else Q=N===void 0?0:ue(N)*z,F!==void 0&&(g=ue((F+"000000000").slice(0,9))*z);let A=g%1e3,c=Math.trunc(g/1e3)%1e3,d=Math.trunc(g/1e6)%1e3;return Q+=Math.trunc(g/1e9)%60,O+=Math.trunc(g/6e10),zo(W,K,ne,ie,le,O,Q,d,c,A),{years:W,months:K,weeks:ne,days:ie,hours:le,minutes:O,seconds:Q,milliseconds:d,microseconds:c,nanoseconds:A}}(i);return new(Ke("%Temporal.Duration%"))(o,a,s,l,u,m,f,v,E,I)}($e(n));let e={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0},r=jl(n);for(let i=0;i<bo.length;i++){let o=bo[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 oi(n){let t;if(Le(n)){if(Ve(n)||fe(n))return Jt(h(n,ae));t=ts(n)}else t=n;let{year:e,month:r,day:i,time:o,offset:a,z:s}=function(P){let L=un(P);if(!L.z&&!L.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return L}($e(t)),{hour:l=0,minute:u=0,second:m=0,millisecond:f=0,microsecond:v=0,nanosecond:E=0}=o==="start-of-day"?{}:o,I=Di(e,r,i,l,u,m,f,v,E-(s?0:Yr(a)));return kr(I.isoDate),Jt(We(I))}function Vc(n,t){if(Le(n)){if(Ot(n))return ye(X(t)),Mr(h(n,se),h(n,j));let s;return bt(n,j)?s=h(n,j):(s=n.calendar,s===void 0&&(s="iso8601"),s=$i(s)),Mr(Eo(s,Bt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{month:e,day:r,referenceISOYear:i,calendar:o}=Os($e(n));if(o===void 0&&(o="iso8601"),o=Dt(o),ye(X(t)),o==="iso8601")return Mr({year:1972,month:e,day:r},o);let a={year:i,month:e,day:r};return ur(a),a=Eo(o,wt(o,a,"month-day"),"constrain"),Mr(a,o)}function Ln(n,t){let e;if(Le(n)){if(Oe(n))return ye(X(t)),yn(h(n,Ne));if(Te(n))return ye(X(t)),yn(h(n,Ie).time);if(fe(n)){let u=qt(h(n,De),h(n,ae));return ye(X(t)),yn(u.time)}let{hour:r,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:l}=rs(n);e=Ho(r,i,o,a,s,l,ye(X(t)))}else e=Ol($e(n)),ye(X(t));return yn(e)}function Bl(n){return n===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:h(Ln(n),Ne)}function ai(n,t){if(Le(n)){if(qe(n))return ye(X(t)),Sr(h(n,se),h(n,j));let s=zi(n);return Sr(vi(s,Bt(s,n,["year","month","monthCode"],[],[]),ye(X(t))),s)}let{year:e,month:r,referenceISODay:i,calendar:o}=Ls($e(n));o===void 0&&(o="iso8601"),o=Dt(o),ye(X(t));let a={year:e,month:r,day:i};return Bs(a),a=vi(o,wt(o,a,"year-month"),"constrain"),Sr(a,o)}function Do(n,t,e,r,i,o,a,s){if(t==="start-of-day")return An(i,n);let l=we(n,t);if(e==="wall"||a==="ignore")return Qe(i,l,o);if(e==="exact"||a==="use"){let f=Di(n.year,n.month,n.day,t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond-r);kr(f.isoDate);let v=We(f);return cn(v),v}kr(n);let u=We(l),m=wi(i,l);for(let f=0;f<m.length;f++){let v=m[f],E=S.default.toNumber(S.default.subtract(u,v)),I=On(E,6e10,"halfExpand");if(E===r||s&&I===r)return v}if(a==="reject"){let f=is(r),v=bi(l,"iso8601","auto");throw new RangeError(`Offset ${f} is invalid for ${v} in ${i}`)}return Gl(m,i,l,o)}function si(n,t){let e,r,i,o,a,s,l,u=!1,m="option";if(Le(n)){if(fe(n)){let P=X(t);return mi(P),go(P,"reject"),ye(P),Je(h(n,ae),h(n,De),h(n,j))}a=zi(n);let v=Bt(a,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],["timeZone"]);({offset:o,timeZone:i}=v),o===void 0&&(m="wall");let E=X(t);s=mi(E),l=go(E,"reject");let I=ye(E);({isoDate:e,time:r}=ji(a,v,I))}else{let v,E,I,P,L;({year:I,month:P,day:L,time:r,tzAnnotation:v,offset:o,z:E,calendar:a}=function(W){let K=un(W);if(!K.tzAnnotation)throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");return K}($e(n))),i=vt(v),E?m="exact":o||(m="wall"),a||(a="iso8601"),a=Dt(a),u=!0;let z=X(t);s=mi(z),l=go(z,"reject"),ye(z),e={year:I,month:P,day:L}}let f=0;return m==="option"&&(f=Yr(o)),Je(Do(e,r,m,f,i,s,l,u),i,a)}function $l(n,t,e){ur(t),Sn(n),me(n,se,t),me(n,j,e),me(n,wl,!0)}function yt(n,t){let e=Ke("%Temporal.PlainDate%"),r=Object.create(e.prototype);return $l(r,n,t),r}function zl(n,t,e){ir(t),Sn(n),me(n,Ie,t),me(n,j,e)}function zt(n,t){let e=Ke("%Temporal.PlainDateTime%"),r=Object.create(e.prototype);return zl(r,n,t),r}function Ul(n,t,e){ur(t),Sn(n),me(n,se,t),me(n,j,e),me(n,Dl,!0)}function Mr(n,t){let e=Ke("%Temporal.PlainMonthDay%"),r=Object.create(e.prototype);return Ul(r,n,t),r}function Vl(n,t){Sn(n),me(n,Ne,t)}function yn(n){let t=Ke("%Temporal.PlainTime%"),e=Object.create(t.prototype);return Vl(e,n),e}function ql(n,t,e){Bs(t),Sn(n),me(n,se,t),me(n,j,e),me(n,bl,!0)}function Sr(n,t){let e=Ke("%Temporal.PlainYearMonth%"),r=Object.create(e.prototype);return ql(r,n,t),r}function Wl(n,t){cn(t),Sn(n),me(n,ae,t)}function Jt(n){let t=Ke("%Temporal.Instant%"),e=Object.create(t.prototype);return Wl(e,n),e}function Kl(n,t,e,r){cn(t),Sn(n),me(n,ae,t),me(n,De,e),me(n,j,r)}function Je(n,t,e="iso8601"){let r=Ke("%Temporal.ZonedDateTime%"),i=Object.create(r.prototype);return Kl(i,n,t,e),i}function qc(n){return ns.filter(t=>n[t]!==void 0)}function nr(n,t,e){let r=qc(e),i=$n(n).fieldKeysToIgnore(r),o=Object.create(null),a=qc(t);for(let s=0;s<ns.length;s++){let l,u=ns[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 Ht(n,t,e,r){let i=$n(n).dateAdd(t,e,r);return ur(i),i}function Bi(n,t,e,r){return $n(n).dateUntil(t,e,r)}function $i(n){if(Le(n)&&bt(n,j))return h(n,j);let t=$e(n);try{return Dt(t)}catch{}let e;try{({calendar:e}=un(t))}catch{try{({calendar:e}=Ol(t))}catch{try{({calendar:e}=Ls(t))}catch{({calendar:e}=Os(t))}}}return e||(e="iso8601"),Dt(e)}function zi(n){if(bt(n,j))return h(n,j);let{calendar:t}=n;return t===void 0?"iso8601":$i(t)}function sn(n,t){return Dt(n)===Dt(t)}function jn(n,t,e){let r=$n(n);r.resolveFields(t,"date");let i=r.dateToISO(t,e);return ur(i),i}function vi(n,t,e){let r=$n(n);r.resolveFields(t,"year-month"),t.day=1;let i=r.dateToISO(t,e);return Bs(i),i}function Eo(n,t,e){let r=$n(n);r.resolveFields(t,"month-day");let i=r.monthDayToISOReferenceDate(t,e);return ur(i),i}function vt(n){if(Le(n)&&fe(n))return h(n,De);let t=$e(n);if(t==="UTC")return"UTC";let{tzName:e,offsetMinutes:r}=function(o){let{tzAnnotation:a,offset:s,z:l}=function(u){if(Yl.test(u))return{tzAnnotation:u,offset:void 0,z:!1};try{let{tzAnnotation:m,offset:f,z:v}=un(u);if(v||m||f)return{tzAnnotation:m,offset:f,z:v}}catch{}Hl(u)}(o);return a?Yn(a):l?Yn("UTC"):s?Yn(s):void 0}(t);if(r!==void 0)return Ys(r);let i=_o(e);if(!i)throw new RangeError(`Unrecognized time zone ${e}`);return i.identifier}function Zl(n,t){if(n===t)return!0;let e=Yn(n).offsetMinutes,r=Yn(t).offsetMinutes;if(e===void 0&&r===void 0){let i=_o(t);if(!i)return!1;let o=_o(n);return!!o&&o.primaryIdentifier===i.primaryIdentifier}return e===r}function vn(n,t){let e=Yn(n).offsetMinutes;return e!==void 0?6e10*e:os(n,t)}function is(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}${jo(r,i,o,a,o===0&&a===0?"minute":"auto")}`}function qt(n,t){let e=vn(n,t),{isoDate:{year:r,month:i,day:o},time:{hour:a,minute:s,second:l,millisecond:u,microsecond:m,nanosecond:f}}=Ql(t);return Di(r,i,o,a,s,l,u,m,f+e)}function Qe(n,t,e){return Gl(wi(n,t),n,t,e)}function Gl(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=We(e),a=S.default.subtract(o,Fn);cn(a);let s=vn(t,a),l=S.default.add(o,Fn);cn(l);let u=vn(t,l)-s;switch(r){case"earlier":{let m=_e.fromComponents(0,0,0,0,0,-u),f=xr(e.time,m);return wi(t,we(Tt(e.isoDate.year,e.isoDate.month,e.isoDate.day+f.deltaDays),f))[0]}case"compatible":case"later":{let m=_e.fromComponents(0,0,0,0,0,u),f=xr(e.time,m),v=wi(t,we(Tt(e.isoDate.year,e.isoDate.month,e.isoDate.day+f.deltaDays),f));return v[v.length-1]}}}function wi(n,t){if(n==="UTC")return kr(t.isoDate),[We(t)];let e=Yn(n).offsetMinutes;if(e!==void 0){let r=Di(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);kr(r.isoDate);let i=We(r);return cn(i),[i]}return kr(t.isoDate),function(r,i){let o=We(i),a=S.default.subtract(o,Fn);S.default.lessThan(a,gi)&&(a=o);let s=S.default.add(o,Fn);S.default.greaterThan(s,Cr)&&(s=o);let l=os(r,a),u=os(r,s);return(l===u?[l]:[l,u]).map(f=>{let v=S.default.subtract(o,S.default.BigInt(f)),E=function(I,P){let{epochMilliseconds:L,time:{millisecond:z,microsecond:W,nanosecond:K}}=Ql(P),{year:ne,month:ie,day:le,hour:Me,minute:Ee,second:re}=eu(I,L);return Di(ne,ie,le,Me,Ee,re,z,W,K)}(r,v);if(Rr(i,E)===0)return cn(v),v}).filter(f=>f!==void 0)}(n,t)}function An(n,t){let e=we(t,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=wi(n,e);if(r.length)return r[0];let i=We(e),o=S.default.subtract(i,Fn);return cn(o),Hs(n,o)}function Ui(n){let t;return t=n<0||n>9999?(n<0?"-":"+")+yi(Math.abs(n),6):yi(n,4),t}function jt(n){return yi(n,2)}function Jl(n,t){let e;if(t==="auto"){if(n===0)return"";e=yi(n,9).replace(/0+$/,"")}else{if(t===0)return"";e=yi(n,9).slice(0,t)}return`.${e}`}function jo(n,t,e,r,i){let o=`${jt(n)}:${jt(t)}`;return i==="minute"||(o+=`:${jt(e)}`,o+=Jl(r,i)),o}function Wc(n,t,e){let r=t;r===void 0&&(r="UTC");let i=h(n,ae),o=bi(qt(r,i),"iso8601",e,"never"),a="Z";return t!==void 0&&(a=Xl(vn(r,i))),`${o}${a}`}function po(n,t){let e=h(n,ct),r=h(n,lt),i=h(n,_t),o=h(n,ut),a=h(n,dt),s=h(n,ht),l=So(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 m="";a!==0&&(m+=`${Math.abs(a)}H`),s!==0&&(m+=`${Math.abs(s)}M`);let f=_e.fromComponents(0,0,h(n,mt),h(n,ft),h(n,pt),h(n,Mt));f.isZero()&&!["second","millisecond","microsecond","nanosecond"].includes(pn(n))&&t==="auto"||(m+=`${Math.abs(f.sec)}${Jl(Math.abs(f.subsec),t)}S`);let v=`${l<0?"-":""}P${u}`;return m&&(v=`${v}T${m}`),v}function Kc(n,t="auto"){let{year:e,month:r,day:i}=h(n,se);return`${Ui(e)}-${jt(r)}-${jt(i)}${Li(h(n,j),t)}`}function Zc({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){return jo(n,t,e,1e6*r+1e3*i+o,a)}function bi(n,t,e,r="auto"){let{isoDate:{year:i,month:o,day:a},time:{hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v}}=n;return`${Ui(i)}-${jt(o)}-${jt(a)}T${jo(s,l,u,1e6*m+1e3*f+v,e)}${Li(t,r)}`}function Gc(n,t="auto"){let{year:e,month:r,day:i}=h(n,se),o=`${jt(r)}-${jt(i)}`,a=h(n,j);t!=="always"&&t!=="critical"&&a==="iso8601"||(o=`${Ui(e)}-${o}`);let s=Li(a,t);return s&&(o+=s),o}function Jc(n,t="auto"){let{year:e,month:r,day:i}=h(n,se),o=`${Ui(e)}-${jt(r)}`,a=h(n,j);t!=="always"&&t!=="critical"&&a==="iso8601"||(o+=`-${jt(i)}`);let s=Li(a,t);return s&&(o+=s),o}function Xc(n,t,e="auto",r="auto",i="auto",o=void 0){let a=h(n,ae);if(o){let{unit:m,increment:f,roundingMode:v}=o;a=ls(a,f,m,v)}let s=h(n,De),l=vn(s,a),u=bi(qt(s,a),"iso8601",t,"never");return i!=="never"&&(u+=Xl(l)),r!=="never"&&(u+=`[${r==="critical"?"!":""}${s}]`),u+=Li(h(n,j),e),u}function Qc(n){return Fl.test(n)}function Yr(n){let t=Ah.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 Xr,xh=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function _o(n){if(Xr===void 0){let o=Intl.supportedValuesOf?.("timeZone");if(o){Xr=new Map;for(let a=0;a<o.length;a++){let s=o[a];Xr.set(Ei(s),s)}}else Xr=null}let t=Ei(n),e=Xr?.get(t);if(e)return{identifier:e,primaryIdentifier:e};try{e=Ll(n).resolvedOptions().timeZone}catch{return}if(t==="antarctica/south_pole"&&(e="Antarctica/McMurdo"),kh.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||xh[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 er(n,t){let{year:e,month:r,day:i,hour:o,minute:a,second:s}=eu(n,t),l=t%1e3;return l<0&&(l+=1e3),1e6*(Fs({isoDate:{year:e,month:r,day:i},time:{hour:o,minute:a,second:s,millisecond:l}})-t)}function os(n,t){return er(n,Wt(t,"floor"))}function Ys(n){let t=n<0?"-":"+",e=Math.abs(n);return`${t}${jo(Math.floor(e/60),e%60,0,0,"minute")}`}function Xl(n){return Ys(On(n,Dh,"halfExpand")/6e10)}function Fs({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()+Mh*l}function We(n){let t=Fs(n),e=1e3*n.time.microsecond+n.time.nanosecond;return S.default.add(Xt(t),S.default.BigInt(e))}function Ql(n){let t=Wt(n,"trunc"),e=S.default.toNumber(S.default.remainder(n,Ai));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 Hs(n,t){if(n==="UTC")return null;let e=Wt(t,"floor");if(e<ui)return Hs(n,Xt(ui));let r=Date.now(),i=Math.max(e,r)+366*Hn*3,o=e,a=er(n,o),s=o,l=a;for(;a===l&&o<i;){if(s=o+2*Hn*7,s>Nl)return null;l=er(n,s),a===l&&(o=s)}return a===l?null:Xt(uu(u=>er(n,u),o,s,a,l))}function as(n,t){if(n==="UTC")return null;let e=Wt(t,"ceil"),r=Date.now(),i=r+366*Hn*3;if(e>i){let u=as(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 as(n,Xt(u))}let o=e-1;if(o<ui)return null;let a=er(n,o),s=o,l=a;for(;a===l&&o>ui;){if(s=o-2*Hn*7,s<ui)return null;l=er(n,s),a===l&&(o=s)}return a===l?null:Xt(uu(u=>er(n,u),s,o,l,a))}function eu(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],m=+r[6];if(!(Number.isFinite(a)&&Number.isFinite(i)&&Number.isFinite(o)&&Number.isFinite(l)&&Number.isFinite(u)&&Number.isFinite(m)))throw new RangeError(`Invalid number in "${e}`);return{year:a,month:i,day:o,hour:l,minute:u,second:m}}(Ll(n).format(t))}function Mo(n){return n!==void 0&&!(n%4!=0||n%100==0&&n%400!=0)}function tr(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]}[Mo(n)?"leapyear":"standard"][t-1]}function So(n){let t=[h(n,ct),h(n,lt),h(n,_t),h(n,ut),h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt)];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 tu(n){let t=Bo(n.date);return t!==0?t:n.time.sign()}function Qn(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 Tt(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}=Qn(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=Mo(l)?366:365,o<-s;)r-=1,l-=1,o+=s;for(l+=1;s=Mo(l)?366:365,o>s;)r+=1,l+=1,o-=s;for(;o<1;)({year:r,month:i}=Qn(r,i-1)),o+=tr(r,i);for(;o>tr(r,i);)o-=tr(r,i),{year:r,month:i}=Qn(r,i+1);return{year:r,month:i,day:o}}function Di(n,t,e,r,i,o,a,s,l){let u=Nn(r,i,o,a,s,l);return we(Tt(n,t,e+u.deltaDays),u)}function Nn(n,t,e,r,i,o){let a,s=n,l=t,u=e,m=r,f=i,v=o;({div:a,mod:v}=_r(v,3)),f+=a,v<0&&(f-=1,v+=1e3),{div:a,mod:f}=_r(f,3),m+=a,f<0&&(m-=1,f+=1e3),u+=Math.trunc(m/1e3),m%=1e3,m<0&&(u-=1,m+=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,m+=0,f+=0,v+=0,{deltaDays:E,hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v}}function el(n,t){let e=Xe(n,0);if(Bo(e)===0)return n.days;let r=h(t,se),i=Ht(h(t,j),r,e,"constrain"),o=or(r.year,r.month-1,r.day),a=or(i.year,i.month-1,i.day)-o;return n.days+a}function Ct(n){return new(Ke("%Temporal.Duration%"))(-h(n,ct),-h(n,lt),-h(n,_t),-h(n,ut),-h(n,dt),-h(n,ht),-h(n,mt),-h(n,ft),-h(n,pt),-h(n,Mt))}function gt(n,t,e){return Math.min(e,Math.max(t,n))}function nu(n,t,e){let r=gt(t,1,12);return{year:n,month:r,day:gt(e,1,tr(n,r))}}function ze(n,t,e){if(n<t||n>e)throw new RangeError(`value out of range: ${t} <= ${n} <= ${e}`)}function rr(n,t,e){ze(t,1,12),ze(e,1,tr(n,t))}function ur(n){ir(we(n,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function $o(n,t,e,r,i,o){ze(n,0,23),ze(t,0,59),ze(e,0,59),ze(r,0,999),ze(i,0,999),ze(o,0,999)}function js(n,t,e,r,i,o,a,s,l){rr(n,t,e),$o(r,i,o,a,s,l)}function ir(n){let t=We(n);(S.default.lessThan(t,Eh)||S.default.greaterThan(t,_h))&&cn(t)}function ss(n){We(n)}function cn(n){if(S.default.lessThan(n,gi)||S.default.greaterThan(n,Cr))throw new RangeError("date/time value is outside of supported range")}function Bs({year:n,month:t}){ze(n,jc,Bc),n===jc?ze(t,4,12):n===Bc&&ze(t,1,9)}function zo(n,t,e,r,i,o,a,s,l,u){let m=0,f=[n,t,e,r,i,o,a,s,l,u];for(let z=0;z<f.length;z++){let W=f[z];if(W===1/0||W===-1/0)throw new RangeError("infinite values not allowed as duration fields");if(W!==0){let K=W<0?-1:1;if(m!==0&&K!==m)throw new RangeError("mixed-sign values not allowed as duration fields");m=K}}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 v=_r(s,3),E=_r(l,6),I=_r(u,9),P=_r(1e6*v.mod+1e3*E.mod+I.mod,9).div,L=86400*r+3600*i+60*o+a+v.div+E.div+I.div+P;if(!Number.isSafeInteger(L))throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s")}function Er(n){return{date:{years:h(n,ct),months:h(n,lt),weeks:h(n,_t),days:h(n,ut)},time:_e.fromComponents(h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt))}}function on(n){let t=_e.fromComponents(h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt)).add24HourDays(h(n,ut));return{date:{years:h(n,ct),months:h(n,lt),weeks:h(n,_t),days:0},time:t}}function ru(n){let t=on(n),e=Math.trunc(t.time.sec/86400);return zo(t.date.years,t.date.months,t.date.weeks,e,0,0,0,0,0,0),{...t.date,days:e}}function Ut(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=za(a,3,Math.trunc(i/1e3)),i%=1e3,a=0;break;case"microsecond":i=za(a,6,Math.trunc(r/1e3)),r%=1e3,a=0;break;case"nanosecond":r=za(a,9,r),a=0}return new(Ke("%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 bn(n,t){return Bo(n),t.sign(),{date:n,time:t}}function or(n,t,e){return Fs({isoDate:{year:n,month:t+1,day:e},time:{hour:0,minute:0,second:0,millisecond:0}})/Hn}function kr({year:n,month:t,day:e}){if(Math.abs(or(n,t-1,e))>1e8)throw new RangeError("date/time value is outside the supported range")}function $s(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 zs(n,t,e,r,i){let o=_e.fromEpochNsDiff(t,n);return o=ko(o,e,r,i),bn({years:0,months:0,weeks:0,days:0},o)}function iu(n,t,e,r){ss(n),ss(t);let i=$s(n.time,t.time),o=i.sign(),a=ln(n.isoDate,t.isoDate),s=t.isoDate;a===o&&(s=Tt(s.year,s.month,s.day+o),i=i.add24HourDays(-o));let l=wn("day",r),u=Bi(e,n.isoDate,s,l);return r!==l&&(i=i.add24HourDays(u.days),u.days=0),bn(u,i)}function ou(n,t,e,r,i){let o=S.default.subtract(t,n);if(S.default.equal(o,Yt))return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};let a=S.default.lessThan(o,Yt)?-1:1,s=qt(e,n),l=qt(e,t),u,m=0,f=a===1?2:1,v=$s(s.time,l.time);for(v.sign()===-a&&m++;m<=f;m++){u=we(Tt(l.isoDate.year,l.isoDate.month,l.isoDate.day-m*a),s.time);let I=Qe(e,u,"compatible");if(v=_e.fromEpochNsDiff(t,I),v.sign()!==-a)break}let E=wn("day",i);return bn(Bi(r,s.isoDate,u.isoDate,E),v)}function au(n,t,e,r,i,o,a,s,l){let u,m,f,v,E=t;switch(s){case"year":{let O=On(E.date.years,a,"trunc");u=O,m=O+a*n,f={years:u,months:0,weeks:0,days:0},v={...f,years:m};break}case"month":{let O=On(E.date.months,a,"trunc");u=O,m=O+a*n,f=Xe(E.date,0,0,u),v=Xe(E.date,0,0,m);break}case"week":{let O=Xe(E.date,0,0),Q=Ht(o,r.isoDate,O,"constrain"),g=Bi(o,Q,Tt(Q.year,Q.month,Q.day+E.date.days),"week"),A=On(E.date.weeks+g.weeks,a,"trunc");u=A,m=A+a*n,f=Xe(E.date,0,u),v=Xe(E.date,0,m);break}case"day":{let O=On(E.date.days,a,"trunc");u=O,m=O+a*n,f=Xe(E.date,u),v=Xe(E.date,m);break}}let I=Ht(o,r.isoDate,f,"constrain"),P=Ht(o,r.isoDate,v,"constrain"),L,z,W=we(I,r.time),K=we(P,r.time);i?(L=Qe(i,W,"compatible"),z=Qe(i,K,"compatible")):(L=We(W),z=We(K));let ne=_e.fromEpochNsDiff(e,L),ie=_e.fromEpochNsDiff(z,L),le=No(l,n<0?"negative":"positive"),Me=ne.add(ne).abs().subtract(ie.abs()).sign(),Ee=Math.abs(u)/a%2==0,re=ne.isZero()?Math.abs(u):ne.cmp(ie)?Lo(Math.abs(u),Math.abs(m),Me,Ee,le):Math.abs(m),N=new _e(S.default.add(S.default.multiply(ie.totalNs,S.default.BigInt(u)),S.default.multiply(ne.totalNs,S.default.BigInt(a*n)))).fdiv(ie.totalNs),F=re===Math.abs(m);return E={date:F?v:f,time:_e.ZERO},{nudgeResult:{duration:E,nudgedEpochNs:F?z:L,didExpandCalendarUnit:F},total:N}}function Uo(n,t,e,r,i,o,a,s,l){let u=n,m=nn(s)||r&&s==="day",f=tu(u)<0?-1:1,v;return m?{nudgeResult:v}=au(f,u,t,e,r,i,a,s,l):v=r?function(E,I,P,L,z,W,K,ne){let ie=I,le=Ht(z,P.isoDate,ie.date,"constrain"),Me=we(le,P.time),Ee=we(Tt(le.year,le.month,le.day+E),P.time),re=Qe(L,Me,"compatible"),N=Qe(L,Ee,"compatible"),F=_e.fromEpochNsDiff(N,re);if(F.sign()!==E)throw new RangeError("time zone returned inconsistent Instants");let O=S.default.BigInt(Ir[K]*W),Q=ie.time.round(O,ne),g=Q.subtract(F),A=g.sign()!==-E,c,d;return A?(c=E,Q=g.round(O,ne),d=Q.addToEpochNs(N)):(c=0,d=Q.addToEpochNs(re)),{duration:bn(Xe(ie.date,ie.date.days+c),Q),nudgedEpochNs:d,didExpandCalendarUnit:A}}(f,u,e,r,i,a,s,l):function(E,I,P,L,z,W){let K=E,ne=K.time.add24HourDays(K.date.days),ie=ne.round(S.default.BigInt(L*Ir[z]),W),le=ie.subtract(ne),{quotient:Me}=ne.divmod(wo),{quotient:Ee}=ie.divmod(wo),re=Math.sign(Ee-Me)===ne.sign(),N=le.addToEpochNs(I),F=0,O=ie;return gn(P)==="date"&&(F=Ee,O=ie.add(_e.fromComponents(24*-Ee,0,0,0,0,0))),{duration:{date:Xe(K.date,F),time:O},nudgedEpochNs:N,didExpandCalendarUnit:re}}(u,t,o,a,s,l),u=v.duration,v.didExpandCalendarUnit&&s!=="week"&&(u=function(E,I,P,L,z,W,K,ne){let ie=I;if(ne===K)return ie;let le=di.indexOf(K);for(let Me=di.indexOf(ne)-1;Me>=le;Me--){let Ee=di[Me];if(Ee==="week"&&K!=="week")continue;let re;switch(Ee){case"year":re={years:ie.date.years+E,months:0,weeks:0,days:0};break;case"month":{let O=ie.date.months+E;re=Xe(ie.date,0,0,O);break}case"week":{let O=ie.date.weeks+E;re=Xe(ie.date,0,O);break}}let N=we(Ht(W,L.isoDate,re,"constrain"),L.time),F;if(F=z?Qe(z,N,"compatible"):We(N),yo(P,F)===-E)break;ie={date:re,time:_e.ZERO}}return ie}(f,u,v.nudgedEpochNs,e,r,i,o,wn(s,"day"))),u}function tl(n,t,e,r,i,o){return nn(o)||r&&o==="day"?au(tu(n)<0?-1:1,n,t,e,r,i,1,o,"trunc").total:fi(n.time.add24HourDays(n.date.days),o)}function su(n,t,e,r,i,o,a){if(Rr(n,t)==0)return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};ir(n),ir(t);let s=iu(n,t,e,r);return o==="nanosecond"&&i===1?s:Uo(s,We(t),n,null,e,r,i,o,a)}function cu(n,t,e,r,i,o,a,s){if(gn(i)==="time")return zs(n,t,o,a,s);let l=ou(n,t,e,r,i);return a==="nanosecond"&&o===1?l:Uo(l,t,qt(e,n),e,r,i,o,a,s)}function Fr(n,t,e,r,i,o){let a=Pr.reduce((E,I)=>{let P=I[0],L=I[1],z=I[2];return e!=="datetime"&&z!==e||r.includes(L)||E.push(L,P),E},[]),s=kt(t,"largestUnit",e,"auto");if(r.includes(s))throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);let l=Lr(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 m=kt(t,"smallestUnit",e,i);if(r.includes(m))throw new RangeError(`smallestUnit must be one of ${a.join(", ")}, not ${m}`);let f=wn(o,m);if(s==="auto"&&(s=f),wn(s,m)!==s)throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${m}`);let v={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[m];return v!==void 0&&Or(l,v,!1),{largestUnit:s,roundingIncrement:l,roundingMode:u,smallestUnit:m}}function nl(n,t,e,r){let i=oi(e),o=Fr(n,X(r),"time",[],"nanosecond","second"),a=Ut(zs(h(t,ae),h(i,ae),o.roundingIncrement,o.smallestUnit,o.roundingMode),o.largestUnit);return n==="since"&&(a=Ct(a)),a}function rl(n,t,e,r){let i=ri(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Fr(n,X(r),"date",[],"day","day"),l=Ke("%Temporal.Duration%"),u=h(t,se),m=h(i,se);if(ln(u,m)===0)return new l;let f={date:Bi(o,u,m,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});f=Uo(f,We(we(m,{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 v=Ut(f,"day");return n==="since"&&(v=Ct(v)),v}function il(n,t,e,r){let i=ii(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Fr(n,X(r),"datetime",[],"nanosecond","day"),l=Ke("%Temporal.Duration%"),u=h(t,Ie),m=h(i,Ie);if(Rr(u,m)===0)return new l;let f=Ut(su(u,m,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return n==="since"&&(f=Ct(f)),f}function ol(n,t,e,r){let i=Ln(e),o=Fr(n,X(r),"time",[],"nanosecond","hour"),a=$s(h(t,Ne),h(i,Ne));a=ko(a,o.roundingIncrement,o.smallestUnit,o.roundingMode);let s=Ut(bn({years:0,months:0,weeks:0,days:0},a),o.largestUnit);return n==="since"&&(s=Ct(s)),s}function al(n,t,e,r){let i=ai(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between months of ${o} and ${a} calendars`);let s=Fr(n,X(r),"date",["week","day"],"month","year"),l=Ke("%Temporal.Duration%");if(ln(h(t,se),h(i,se))==0)return new l;let u=wt(o,h(t,se),"year-month");u.day=1;let m=jn(o,u,"constrain"),f=wt(o,h(i,se),"year-month");f.day=1;let v=jn(o,f,"constrain"),E={date:Xe(Bi(o,m,v,s.largestUnit),0,0),time:_e.ZERO};if(s.smallestUnit!=="month"||s.roundingIncrement!==1){let P=we(m,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});E=Uo(E,We(we(v,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),P,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let I=Ut(E,"day");return n==="since"&&(I=Ct(I)),I}function sl(n,t,e,r){let i=si(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Fr(n,X(r),"datetime",[],"nanosecond","hour"),l=h(t,ae),u=h(i,ae),m=Ke("%Temporal.Duration%"),f;if(gn(s.largestUnit)!=="date")f=Ut(zs(l,u,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{let v=h(t,De);if(!Zl(v,h(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 m;f=Ut(cu(l,u,v,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),"hour")}return n==="since"&&(f=Ct(f)),f}function xr({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 cs(n,t){let e=t.addToEpochNs(n);return cn(e),e}function ci(n,t,e,r,i="constrain"){if(Bo(r.date)===0)return cs(n,r.time);let o=qt(t,n);return cs(Qe(t,we(Ht(e,o.isoDate,r.date,i),o.time),"compatible"),r.time)}function cl(n,t,e){let r=Vt(e);n==="subtract"&&(r=Ct(r));let i=wn(pn(t),pn(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 Ut(bn({years:0,months:0,weeks:0,days:0},o.time.add(a.time)),i)}function ll(n,t,e){let r=Vt(e);n==="subtract"&&(r=Ct(r));let i=pn(r);if(gn(i)==="date")throw new RangeError(`Duration field ${i} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);let o=on(r);return Jt(cs(h(t,ae),o.time))}function ul(n,t,e,r){let i=h(t,j),o=Vt(e);n==="subtract"&&(o=Ct(o));let a=ru(o),s=ye(X(r));return yt(Ht(i,h(t,se),a,s),i)}function dl(n,t,e,r){let i=Vt(e);n==="subtract"&&(i=Ct(i));let o=ye(X(r)),a=h(t,j),s=on(i),l=h(t,Ie),u=xr(l.time,s.time),m=Xe(s.date,u.deltaDays);return zo(m.years,m.months,m.weeks,m.days,0,0,0,0,0,0),zt(we(Ht(a,l.isoDate,m,o),u),a)}function hl(n,t,e){let r=Vt(e);n==="subtract"&&(r=Ct(r));let i=on(r),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:m}=xr(h(t,Ne),i.time);return yn(Ho(o,a,s,l,u,m,"reject"))}function ml(n,t,e,r){let i=Vt(e);n==="subtract"&&(i=Ct(i));let o=ye(X(r)),a=So(i),s=h(t,j),l=wt(s,h(t,se),"year-month");l.day=1;let u=jn(s,l,"constrain");if(a<0){let f=Ht(s,u,{months:1},"constrain");u=Tt(f.year,f.month,f.day-1)}let m=ru(i);return ur(u),Sr(vi(s,wt(s,Ht(s,u,m,o),"year-month"),o),s)}function fl(n,t,e,r){let i=Vt(e);n==="subtract"&&(i=Ct(i));let o=ye(X(r)),a=h(t,De),s=h(t,j),l=Er(i);return Je(ci(h(t,ae),a,s,l,o),a,s)}function On(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=St(Math.abs(2*i)-t),u=a%2==0,m=No(e,o),f=i===0?a:Lo(a,s,l,u,m);return t*(o==="positive"?f:-f)}function ls(n,t,e,r){let i=Ir[e]*t;return function(o,a,s){let l=fn(o),u=fn(a),m=S.default.divide(l,u),f=S.default.remainder(l,u),v=No(s,"positive"),E,I;S.default.lessThan(l,Yt)?(E=S.default.subtract(m,pi),I=m):(E=m,I=S.default.add(m,pi));let P=yo(Xn(S.default.multiply(f,Ns)),u)*(S.default.lessThan(l,Yt)?-1:1)+0,L=S.default.equal(f,Yt)?m:Lo(E,I,P,vl(E),v);return S.default.multiply(L,u)}(n,S.default.BigInt(i),r)}function us(n,t,e,r){ss(n);let{year:i,month:o,day:a}=n.isoDate,s=ds(n.time,t,e,r);return we(Tt(i,o,a+s.deltaDays),s)}function ds({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 m=Ir[s],f=On(u,m*a,l)/m;switch(s){case"day":return{deltaDays:f,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case"hour":return Nn(f,0,0,0,0,0);case"minute":return Nn(n,f,0,0,0,0);case"second":return Nn(n,t,f,0,0,0);case"millisecond":return Nn(n,t,e,f,0,0);case"microsecond":return Nn(n,t,e,r,f,0);case"nanosecond":return Nn(n,t,e,r,i,f);default:throw new Error(`Invalid unit ${s}`)}}function ko(n,t,e,r){let i=Ir[e];return n.round(S.default.BigInt(i*t),r)}function fi(n,t){let e=Ir[t];return n.fdiv(S.default.BigInt(e))}function ln(n,t){return n.year!==t.year?St(n.year-t.year):n.month!==t.month?St(n.month-t.month):n.day!==t.day?St(n.day-t.day):0}function hs(n,t){return n.hour!==t.hour?St(n.hour-t.hour):n.minute!==t.minute?St(n.minute-t.minute):n.second!==t.second?St(n.second-t.second):n.millisecond!==t.millisecond?St(n.millisecond-t.millisecond):n.microsecond!==t.microsecond?St(n.microsecond-t.microsecond):n.nanosecond!==t.nanosecond?St(n.nanosecond-t.nanosecond):0}function Rr(n,t){let e=ln(n.isoDate,t.isoDate);return e!==0?e:hs(n.time,t.time)}function lu(n){let t=To(n);return globalThis.BigInt!==void 0?globalThis.BigInt(t.toString(10)):t}function Wt(n,t){let e=fn(n),{quotient:r,remainder:i}=ti(e,Ai),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),Ai)}function To(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 ms=(()=>{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,Ai),S.default.greaterThan(r,Cr)?Cr:S.default.lessThan(r,gi)?gi:r}})();function Qr(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function St(n){return n<0?-1:n>0?1:n}function X(n){if(n===void 0)return Object.create(null);if(Le(n)&&n!==null)return n;throw new TypeError("Options parameter must be an object, not "+(n===null?"null":typeof n))}function ar(n,t){let e=Object.create(null);return e[n]=t,e}function Dn(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===_n)throw new RangeError(`${t} option is required`);return r}function Dt(n){let t=Ei(n);if(!Sh.includes(Ei(t)))throw new RangeError(`invalid calendar identifier ${t}`);switch(t){case"ethiopic-amete-alem":return"ethioaa";case"islamicc":return"islamic-civil"}return t}function Ei(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 zn(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 Rh=new RegExp(`^${Rl.source}$`),Ah=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);function uu(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),m=n(u);m===s?(o=u,s=m):m===l&&(a=u,l=m)}return a}function du(n){return[...n]}function hu(n,t){if(n!=="gregory"&&n!=="iso8601")return;let e=Vi[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,m=(i-o+7001-s)%7,f=Math.floor((o-1+m)/7);if(7-m>=l&&++f,f==0)f=function(v,E,I,P){let L=(P-v-I+1)%7;L<0&&(L+=7);let z=Math.floor((I+L-1)/7);return 7-L>=E&&++z,z}(s,l,o+e.isoToDate(e.dateAdd(t,{years:-1},"constrain"),{daysInYear:!0}).daysInYear,i),r--;else if(o>=a-5){let v=(u+a-o)%7;v<0&&(v+=7),6-v>=l&&o+7-u>a&&(f=1,r++)}return{week:f,year:r}}function pl(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 Vi={};function sr(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 Us(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"&&ze(r,1,e),t==="constrain"&&(r=gt(r,1,e)),i=an(r)}else{let o=sr(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}}Vi.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,Us(n))},dateToISO:(n,t)=>hi(n.year,n.month,n.day,t),monthDayToISOReferenceDate(n,t){let{month:e,day:r}=hi(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}=Qn(a,s),{year:a,month:s,day:l}=hi(a,s,l,o),l+=i+7*r,Tt(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 m=t.year-n.year;for(m!==0&&(m-=r);!pl(r,n.year+m,n.month,n.day,t);)o=m,m+=r;let f=r;for(i=Qn(n.year+o,n.month+f);!pl(r,i.year,i.month,n.day,t);)a=f,f+=r,i=Qn(i.year,i.month+r);e==="month"&&(a+=12*o,o=0)}i=Qn(n.year+o,n.month+a);let s=nu(i.year,i.month,n.day),l=0,u=or(t.year,t.month-1,t.day)-or(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+=tr(n,a);i.dayOfYear=o}return r.weekOfYear&&(i.weekOfYear=hu("iso8601",{year:n,month:t,day:e})),r.daysInMonth&&(i.daysInMonth=tr(n,t)),(r.daysInYear||r.inLeapYear)&&(i.inLeapYear=Mo(n),i.daysInYear=i.inLeapYear?366:365),i},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};var Lt=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 mu({isoYear:n,isoMonth:t,isoDay:e}){return`${Ui(n)}-${jt(t)}-${jt(e)}T00:00Z`}function qa(n,t){return{years:n.year-t.year,months:n.month-t.month,days:n.day-t.day}}Lt.objectMap=new WeakMap,Lt.MAX_CACHE_ENTRIES=1e3;var Mn=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=mu({isoYear:r,isoMonth:i,isoDay:o}),u=this.getCalendarParts(l),m={};for(let v=0;v<u.length;v++){let{type:E,value:I}=u[v];if(E!=="year"&&E!=="relatedYear"||(this.hasEra?m.eraYear=+I:m.year=+I),E==="month"){let P=/^([0-9]*)(.*?)$/.exec(I);if(!P||P.length!=3||!P[1]&&!P[2])throw new RangeError(`Unexpected month: ${I}`);if(m.month=P[1]?+P[1]:1,m.month<1)throw new RangeError(`Invalid month ${I} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(m.month>13)throw new RangeError(`Invalid month ${I} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);P[2]&&(m.monthExtra=P[2])}E==="day"&&(m.day=+I),this.hasEra&&E==="era"&&I!=null&&I!==""&&(m.era=I.split(" (")[0].normalize("NFD").replace(/[^-0-9 \p{L}]/gu,"").replace(/ /g,"-").toLowerCase())}if(this.hasEra&&m.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 v=this.eras.find(E=>m.era===E.genericName);v&&(m.era=v.code)}if(this.reviseIntlEra){let{era:v,eraYear:E}=this.reviseIntlEra(m,t);m.era=v,m.eraYear=E}this.checkIcuBugs&&this.checkIcuBugs(t);let f=this.adjustCalendarDate(m,e,"constrain",!0);if(f.year===void 0)throw new RangeError(`Missing year converting ${JSON.stringify(t)}`);if(f.month===void 0)throw new RangeError(`Missing month converting ${JSON.stringify(t)}`);if(f.day===void 0)throw new RangeError(`Missing day converting ${JSON.stringify(t)}`);return e.set(a,f),["constrain","reject"].forEach(v=>{let E=JSON.stringify({func:"calendarToIsoDate",year:f.year,month:f.month,day:f.day,overflow:v,id:this.id});e.set(E,t)}),f}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}=Us(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"?(ze(o,1,i),ze(a,1,this.maximumMonthLength(t))):(o=gt(o,1,i),a=gt(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}),m,f=r.get(u);if(f||i.year!==void 0&&i.month!==void 0&&i.day!==void 0&&(i.year!==o.year||i.month!==o.month||i.day!==o.day)&&(m=JSON.stringify({func:"calendarToIsoDate",year:i.year,month:i.month,day:i.day,overflow:e,id:this.id}),f=r.get(m),f))return f;let v=this.estimateIsoDate({year:a,month:s,day:l}),E=W=>{let K=this.addDaysIso(v,W);if(o.day>this.minimumMonthLength(o)){let ne=this.isoToCalendarDate(K,r);for(;ne.month!==s||ne.year!==a;){if(e==="reject")throw new RangeError(`day ${l} does not exist in month ${s} of year ${a}`);K=this.addDaysIso(K,-1),ne=this.isoToCalendarDate(K,r)}}return K},I=0,P=this.isoToCalendarDate(v,r),L=qa(o,P);if(L.years!==0||L.months!==0||L.days!==0){let W=365*L.years+30*L.months+L.days;v=this.addDaysIso(v,W),P=this.isoToCalendarDate(v,r),L=qa(o,P),L.years===0&&L.months===0?v=E(L.days):I=this.compareCalendarDates(o,P)}let z=8;for(;I;){v=this.addDaysIso(v,I*z);let W=P;P=this.isoToCalendarDate(v,r);let K=I;if(I=this.compareCalendarDates(o,P),I){if(L=qa(o,P),L.years===0&&L.months===0)v=E(L.days),I=0;else if(K&&I!==K)if(z>1)z/=2;else{if(e==="reject")throw new RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...i})}`);this.compareCalendarDates(P,W)>0&&(v=this.addDaysIso(v,-1)),I=0}}}if(r.set(u,v),m&&r.set(m,v),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 v}compareCalendarDates(t,e){return t.year!==e.year?St(t.year-e.year):t.month!==e.month?St(t.month-e.month):t.day!==e.day?St(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 Tt(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,m=o,f=e<0?-Math.max(a,this.daysInPreviousMonth(o,i)):this.daysInMonth(o,i),v=this.calendarToIsoDate(o,"constrain",i),E=this.addDaysIso(v,f);if(o=this.isoToCalendarDate(E,i),e>0){let I=this.monthsInYear(m,i);for(;o.month-1!=u%I;)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:m}=t,f=this.adjustCalendarDate({year:l+e,monthCode:m,day:u},s),v=this.addMonthsCalendar(f,r,a,s),E=o+7*i;return this.addDaysCalendar(v,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 m=e.year-t.year,f=e.day-t.day;if(r==="year"&&m){let I=0;e.monthCode>t.monthCode&&(I=1),e.monthCode<t.monthCode&&(I=-1),I||(I=Math.sign(f)),l=I*u<0?m-u:m}let v,E=l?this.addCalendar(t,{years:l},"constrain",i):t;do s+=u,v=E,E=this.addMonthsCalendar(v,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(v,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),m=this.addDaysIso(l,-u.day);return this.isoToCalendarDate(m,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 m=this.calendarToIsoDate(t,"constrain",e),f=this.addDaysIso(m,-r);return this.isoToCalendarDate(f,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 or(o.year,o.month-1,o.day)-or(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:m,year:f,month:v,monthCode:E,day:I}=t;if(v!==void 0&&f===void 0&&(!this.hasEra||u===void 0||m===void 0))throw new TypeError("when month is present, year (or era and eraYear) are required");(E===void 0||f!==void 0||this.hasEra&&m!==void 0)&&({monthCode:E,day:I}=this.isoToCalendarDate(this.calendarToIsoDate(t,e,r),r));let P={year:this.monthDaySearchStartYear(E,I),month:12,day:31},L=this.isoToCalendarDate(P,r),z=L.monthCode>E||L.monthCode===E&&L.day>=I?L.year:L.year-1;for(let W=0;W<20;W++){let K=this.adjustCalendarDate({day:I,monthCode:E,year:z-W},r),ne=this.calendarToIsoDate(K,"constrain",r),ie=this.isoToCalendarDate(ne,r);if({year:i,month:o,day:a}=ne,ie.monthCode===E&&ie.day===I)return{month:o,day:a,year:i};if(e==="constrain"){let le=this.maxLengthOfMonthCodeInAnyYear(ie.monthCode);if(ie.monthCode===E&&ie.day===le&&I>le)return{month:o,day:a,year:i};(s===void 0||ie.monthCode===s.monthCode&&ie.day>s.day)&&(s=ie,l=ne)}}if(e==="constrain"&&l!==void 0)return l;throw new RangeError(`No recent ${this.id} year with monthCode ${E} and day ${I}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}},fs=class extends Mn{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 m=this.months[u];if(!m)throw new RangeError(`Unrecognized month from formatToParts: ${u}`);a=this.inLeapYear({year:o})?m.leap:m.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=sr(s),this.inLeapYear({year:o})&&a>=6&&a++;let m=this.monthsInYear({year:o});if(a<1||a>m)throw new RangeError(`Invalid monthCode: ${s}`)}else if(r==="reject"?(ze(a,1,this.monthsInYear({year:o})),ze(l,1,this.maximumMonthLength({year:o,month:a}))):(a=gt(a,1,this.monthsInYear({year:o})),l=gt(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}}},Bn=class extends Mn{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}}},ps=class extends Bn{constructor(){super(...arguments),this.id="islamic"}},gs=class extends Bn{constructor(){super(...arguments),this.id="islamic-umalqura"}},ys=class extends Bn{constructor(){super(...arguments),this.id="islamic-tbla"}},vs=class extends Bn{constructor(){super(...arguments),this.id="islamic-civil"}},ws=class extends Bn{constructor(){super(...arguments),this.id="islamic-rgsa"}},bs=class extends Bn{constructor(){super(...arguments),this.id="islamicc"}},Ds=class extends Mn{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 sr(t)<=6?31:30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:e+621,month:1,day:1}}},Es=class extends Mn{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 Vs(t.year+78)}monthsInYear(){return 12}minimumMonthLength(t){return this.getMonthInfo(t).length}maximumMonthLength(t){return this.getMonthInfo(t).length}maxLengthOfMonthCodeInAnyYear(t){let e=sr(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 Tt(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 Vs(n){return n%4==0&&(n%100!=0||n%400==0)}var Co=class extends Mn{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 Vs(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][sr(t)-1]}estimateIsoDate(t){let e=this.adjustCalendarDate(t);return hi(e.year+this.isoEpoch.year,e.month+this.isoEpoch.month,e.day+this.isoEpoch.day,"constrain")}},Po=class extends Mn{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:m}=u;if(m){let f=s.find(v=>v.code===m);if(f===void 0)throw new RangeError(`Invalid era data: unmatched reverseOf era: ${m}`);u.reverseOf=f,u.anchorEpoch=f.anchorEpoch,u.isoEpoch=f.isoEpoch}u.anchorEpoch.month===void 0&&(u.anchorEpoch.month=1),u.anchorEpoch.day===void 0&&(u.anchorEpoch.day=1)}),s.sort((u,m)=>{if(u.reverseOf)return 1;if(m.reverseOf)return-1;if(!u.isoEpoch||!m.isoEpoch)throw new RangeError("Invalid era data: missing ISO epoch");return m.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,m)=>{u.genericName="era"+(s.length-1-m)}),{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 Vs(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][sr(t)-1]}completeEraYear(t){let e=(s,l,u)=>{let m=t[s];if(m!=null&&m!=l&&!(u||[]).includes(m)){let f=u?.[0];throw new RangeError(`Input ${s} ${m} doesn't match calculated value ${f?`${l} (also called ${f})`:l}`)}},r=s=>{let l,u={...t,year:s},m=this.eras.find((f,v)=>{if(v===this.eras.length-1){if(f.reverseOf){if(s>0)throw new RangeError(`Signed year ${s} is invalid for era ${f.code}`);return l=f.anchorEpoch.year-s,!0}return l=s-f.anchorEpoch.year+(f.hasYearZero?0:1),!0}return this.compareCalendarDates(u,f.anchorEpoch)>=0&&(l=s-f.anchorEpoch.year+(f.hasYearZero?0:1),!0)});if(!m)throw new RangeError(`Year ${s} was not matched by any era`);return{eraYear:l,era:m.code,eraNames:m.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:sr(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 hi(r+a.isoEpoch.year-(a.hasYearZero?0:1),i,o,"constrain")}},_i=class extends Po{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},_s=class extends Co{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}},Io=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}},Ms=class extends _s{constructor(){super("ethioaa",{year:-5492,month:7,day:17})}},Ss=class extends Io{constructor(){super("coptic",[{code:"coptic",isoEpoch:{year:284,month:8,day:29}},{code:"coptic-inverse",reverseOf:"coptic"}])}},ks=class extends Io{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}}])}},Ts=class extends _i{constructor(){super("roc",[{code:"roc",names:["minguo"],isoEpoch:{year:1912,month:1,day:1}},{code:"roc-inverse",names:["before-roc"],reverseOf:"roc"}])}},Cs=class extends Co{constructor(){super("buddhist",{year:-543,month:1,day:1})}},Ps=class extends _i{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}},Is=class extends _i{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}}},xo=class extends Mn{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,z)=>{let W=mu({isoYear:L,isoMonth:2,isoDay:1}),K=new Date(W);K.setUTCDate(z+1);let ne=o.formatToParts(K),ie=ne.find(re=>re.type==="month").value,le=+ne.find(re=>re.type==="day").value,Me=ne.find(re=>re.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:ie,calendarDay:le,calendarYearToVerify:Ee}},s=17,{calendarMonthString:l,calendarDay:u,calendarYearToVerify:m}=a(t,s);l!=="1"&&(s+=29,{calendarMonthString:l,calendarDay:u}=a(t,s)),s-=u-5;let f={},v,E,I=1,P=!1;do({calendarMonthString:l,calendarDay:u,calendarYearToVerify:m}=a(t,s)),v&&(f[E].daysInMonth=v+30-u),m!==t?P=!0:(f[l]={monthIndex:I++},s+=30),v=u,E=l;while(!P);return f[E].daysInMonth=v+30-u,e.set(r,f),f}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 m=an(a,s!==void 0),f=`${a}${s||""}`,v=this.getMonthList(o,e)[f];if(v===void 0)throw new RangeError(`Unmatched month ${f} in Chinese year ${o}`);return a=v.monthIndex,{year:o,month:a,day:l,monthCode:m}}if(this.validateCalendarDate(t),a===void 0){let m=this.getMonthList(o,e),f=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");f[0]==="0"&&(f=f.slice(1));let v=m[f];if(a=v&&v.monthIndex,a===void 0&&u.endsWith("L")&&u!="M13L"&&r==="constrain"){let E=+u.replace(/^M0?|L$/g,"");v=m[E],v&&(a=v.monthIndex,u=an(E))}if(a===void 0)throw new RangeError(`Unmatched month ${u} in Chinese year ${o}`)}else if(u===void 0){let m=this.getMonthList(o,e),f=Object.entries(m),v=f.length;r==="reject"?(ze(a,1,v),ze(l,1,this.maximumMonthLength())):(a=gt(a,1,v),l=gt(l,1,this.maximumMonthLength()));let E=f.find(I=>I[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 m=this.getMonthList(o,e),f=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");f[0]==="0"&&(f=f.slice(1));let v=m[f];if(!v)throw new RangeError(`Unmatched monthCode ${u} in Chinese year ${o}`);if(a!==v.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}}},xs=class extends xo{constructor(){super(...arguments),this.id="chinese"}},Rs=class extends xo{constructor(){super(...arguments),this.id="dangi"}},As=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 Lt;Us(t,void 0,this.helper.monthsInYear({year:t.year??1972},e))}}dateToISO(t,e){let r=new Lt,i=this.helper.calendarToIsoDate(t,e,r);return r.setObject(i),i}monthDayToISOReferenceDate(t,e){let r=new Lt,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=Lt.getCacheForObject(t),l=this.helper.isoToCalendarDate(t,s),u=this.helper.addCalendar(l,{years:e,months:r,weeks:i,days:o},a,s),m=this.helper.calendarToIsoDate(u,"constrain",s);return Lt.getCacheForObject(m)||new Lt(s).setObject(m),m}dateUntil(t,e,r){let i=Lt.getCacheForObject(t),o=Lt.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=Lt.getCacheForObject(t),i=this.helper.isoToCalendarDate(t,r);if(e.dayOfWeek&&(i.dayOfWeek=Vi.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=hu(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[fs,Ds,ks,Ms,Ss,xs,Rs,Ts,Es,Cs,Ps,Is,ps,gs,ys,vs,ws,bs]){let t=new n;Vi[t.id]=new As(t)}Qa("calendarImpl",function(n){return Vi[n]});var Mi=Intl.DateTimeFormat;function vr(n,t){let e=h(n,t);return typeof e=="function"&&(e=new Mi(h(n,Cl),e(h(n,Za))),function(r,i,o){let a=Ao(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 ei(n){return bt(n,lr)}var cr=class{constructor(t=void 0,e=void 0){(function(r,i,o){let a=o!==void 0,s;if(a){let f=["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 v=Object.create(null);for(let E=0;E<f.length;E++){let I=f[E];Object.prototype.hasOwnProperty.call(s,I)&&(v[I]=s[I])}s=v}else s=Object.create(null);let l=new Mi(i,s),u=l.resolvedOptions();if(Sn(r),a){let f=Object.assign(Object.create(null),u);for(let v in f)Object.prototype.hasOwnProperty.call(s,v)||delete f[v];f.hour12=s.hour12,f.hourCycle=s.hourCycle,me(r,Za,f)}else me(r,Za,s);me(r,Cl,u.locale),me(r,lr,l),me(r,Dr,u.timeZone),me(r,ni,u.calendar),me(r,El,$h),me(r,_l,jh),me(r,Ml,Bh),me(r,Sl,Hh),me(r,kl,zh),me(r,Tl,Uh);let m=a?s.timeZone:void 0;if(m===void 0)me(r,Ka,u.timeZone);else{let f=Yo(m);if(f.startsWith("\u2212"))throw new RangeError("Unicode minus (U+2212) is not supported in time zone offsets");me(r,Ka,vt(f))}})(this,t,e)}get format(){C(this,ei);let t=Lh.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 C(this,ei),Yh.call(this,t,e)}formatToParts(t,...e){return C(this,ei),Oh.call(this,t,...e)}formatRangeToParts(t,e){return C(this,ei),Fh.call(this,t,e)}resolvedOptions(){return C(this,ei),Nh.call(this)}};"formatToParts"in Mi.prototype||delete cr.prototype.formatToParts,"formatRangeToParts"in Mi.prototype||delete cr.prototype.formatRangeToParts;var Ft=function(n=void 0,t=void 0){return new cr(n,t)};function Nh(){let n=h(this,lr).resolvedOptions();return n.timeZone=h(this,Ka),n}function Lh(n,...t){let e,r,i=Ar(n,this);return i.formatter?(e=i.formatter,r=[Wt(i.epochNs,"floor")]):(e=h(this,lr),r=[n,...t]),e.format(...r)}function Oh(n,...t){let e,r,i=Ar(n,this);return i.formatter?(e=i.formatter,r=[Wt(i.epochNs,"floor")]):(e=h(this,lr),r=[n,...t]),e.formatToParts(...r)}function Yh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Ro(n),r=Ro(t),i,o=[e,r];if(En(e)!==En(r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");if(En(e)){if(!fu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");let{epochNs:a,formatter:s}=Ar(e,this),{epochNs:l,formatter:u}=Ar(r,this);s&&(i=s,o=[Wt(a,"floor"),Wt(l,"floor")])}return i||(i=h(this,lr)),i.formatRange(...o)}function Fh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Ro(n),r=Ro(t),i,o=[e,r];if(En(e)!==En(r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");if(En(e)){if(!fu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");let{epochNs:a,formatter:s}=Ar(e,this),{epochNs:l,formatter:u}=Ar(r,this);s&&(i=s,o=[Wt(a,"floor"),Wt(l,"floor")])}return i||(i=h(this,lr)),i.formatRangeToParts(...o)}function qi(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 Hh(n){let t=qi(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"})),!qo(t)){if(Wi(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 jh(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=qi(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(Wi(n))throw new TypeError(`cannot format PlainYearMonth with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric"})}return e}function Bh(n){let t={short:{month:"numeric",day:"numeric"},medium:{month:"short",day:"numeric"},long:{month:"long",day:"numeric"},full:{month:"long",day:"numeric"}},e=qi(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(Wi(n))throw new TypeError(`cannot format PlainMonthDay with options [${Object.keys(n)}]`);Object.assign(e,{month:"numeric",day:"numeric"})}return e}function $h(n){let t=qi(n,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!Vo(t)){if(Wi(n))throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric"})}return t}function zh(n){let t=qi(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),!qo(t)&&!Vo(t)){if(Wi(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 Uh(n){let t=n;return qo(t)||Vo(t)||(t=Object.assign({},t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),t}function Vo(n){return"year"in n||"month"in n||"day"in n||"weekday"in n||"dateStyle"in n||"era"in n}function qo(n){return"hour"in n||"minute"in n||"second"in n||"timeStyle"in n||"dayPeriod"in n||"fractionalSecondDigits"in n}function Wi(n){return Vo(n)||qo(n)||"dateStyle"in n||"timeStyle"in n||"timeZoneName"in n}function En(n){return Ae(n)||Oe(n)||Te(n)||fe(n)||qe(n)||Ot(n)||Ve(n)}function Ro(n){return En(n)?n:Oo(n)}function fu(n,t){return!(!En(n)||!En(t)||Oe(n)&&!Oe(t)||Ae(n)&&!Ae(t)||Te(n)&&!Te(t)||fe(n)&&!fe(t)||qe(n)&&!qe(t)||Ot(n)&&!Ot(t)||Ve(n)&&!Ve(t))}function Ar(n,t){if(Oe(n)){let e={isoDate:{year:1970,month:1,day:1},time:h(n,Ne)};return{epochNs:Qe(h(t,Dr),e,"compatible"),formatter:vr(t,Sl)}}if(qe(n)){let e=h(n,j),r=h(t,ni);if(e!==r)throw new RangeError(`cannot format PlainYearMonth with calendar ${e} in locale with calendar ${r}`);let i=we(h(n,se),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,_l)}}if(Ot(n)){let e=h(n,j),r=h(t,ni);if(e!==r)throw new RangeError(`cannot format PlainMonthDay with calendar ${e} in locale with calendar ${r}`);let i=we(h(n,se),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,Ml)}}if(Ae(n)){let e=h(n,j),r=h(t,ni);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDate with calendar ${e} in locale with calendar ${r}`);let i=we(h(n,se),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,El)}}if(Te(n)){let e=h(n,j),r=h(t,ni);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDateTime with calendar ${e} in locale with calendar ${r}`);let i=h(n,Ie);return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,kl)}}if(fe(n))throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");return Ve(n)?{epochNs:h(n,ae),formatter:vr(t,Tl)}:{}}function pu(n){let t=Object.create(null);return t.years=h(n,ct),t.months=h(n,lt),t.weeks=h(n,_t),t.days=h(n,ut),t.hours=h(n,dt),t.minutes=h(n,ht),t.seconds=h(n,mt),t.milliseconds=h(n,ft),t.microseconds=h(n,pt),t.nanoseconds=h(n,Mt),t}cr.prototype.constructor=Ft,Object.defineProperty(Ft,"prototype",{value:cr.prototype,writable:!1,enumerable:!1,configurable:!1}),Ft.supportedLocalesOf=Mi.supportedLocalesOf,kn(Ft,"Intl.DateTimeFormat");var{format:Vh,formatToParts:qh}=Intl.DurationFormat?.prototype??Object.create(null);function qs(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=pu(Vt(n));return Vh.call(this,t)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=qs,Intl.DurationFormat.prototype.formatToParts=function(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=pu(Vt(n));return qh.call(this,t)});var Xm=Object.freeze({__proto__:null,DateTimeFormat:Ft,ModifiedIntlDurationFormatPrototypeFormat:qs}),Si=class{constructor(t){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");Wl(this,To(t))}get epochMilliseconds(){return C(this,Ve),Wt(h(this,ae),"floor")}get epochNanoseconds(){return C(this,Ve),lu(S.default.BigInt(h(this,ae)))}add(t){return C(this,Ve),ll("add",this,t)}subtract(t){return C(this,Ve),ll("subtract",this,t)}until(t,e=void 0){return C(this,Ve),nl("until",this,t,e)}since(t,e=void 0){return C(this,Ve),nl("since",this,t,e)}round(t){if(C(this,Ve),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",_n);return Or(r,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[o],!0),Jt(ls(h(this,ae),r,o,i))}equals(t){C(this,Ve);let e=oi(t),r=h(this,ae),i=h(e,ae);return S.default.equal(S.default.BigInt(r),S.default.BigInt(i))}toString(t=void 0){C(this,Ve);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=kt(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=vt(a));let{precision:s,unit:l,increment:u}=Fi(o,r);return Wc(Jt(ls(h(this,ae),u,l,i)),a,s)}toJSON(){return C(this,Ve),Wc(this,void 0,"auto")}toLocaleString(t=void 0,e=void 0){return C(this,Ve),new Ft(t,e).format(this)}valueOf(){zn("Instant")}toZonedDateTimeISO(t){C(this,Ve);let e=vt(t);return Je(h(this,ae),e,"iso8601")}static fromEpochMilliseconds(t){return Jt(Xt(Oo(t)))}static fromEpochNanoseconds(t){return Jt(To(t))}static from(t){return oi(t)}static compare(t,e){let r=oi(t),i=oi(e),o=h(r,ae),a=h(i,ae);return S.default.lessThan(o,a)?-1:S.default.greaterThan(o,a)?1:0}};kn(Si,"Temporal.Instant");var ki=class{constructor(t,e,r,i="iso8601"){let o=ue(t),a=ue(e),s=ue(r),l=Dt(i===void 0?"iso8601":$e(i));rr(o,a,s),$l(this,{year:o,month:a,day:s},l)}get calendarId(){return C(this,Ae),h(this,j)}get era(){return ot(this,"era")}get eraYear(){return ot(this,"eraYear")}get year(){return ot(this,"year")}get month(){return ot(this,"month")}get monthCode(){return ot(this,"monthCode")}get day(){return ot(this,"day")}get dayOfWeek(){return ot(this,"dayOfWeek")}get dayOfYear(){return ot(this,"dayOfYear")}get weekOfYear(){return ot(this,"weekOfYear")?.week}get yearOfWeek(){return ot(this,"weekOfYear")?.year}get daysInWeek(){return ot(this,"daysInWeek")}get daysInMonth(){return ot(this,"daysInMonth")}get daysInYear(){return ot(this,"daysInYear")}get monthsInYear(){return ot(this,"monthsInYear")}get inLeapYear(){return ot(this,"inLeapYear")}with(t,e=void 0){if(C(this,Ae),!Le(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=wt(r,h(this,se));return i=nr(r,i,Bt(r,t,["year","month","monthCode","day"],[],"partial")),yt(jn(r,i,ye(X(e))),r)}withCalendar(t){C(this,Ae);let e=$i(t);return yt(h(this,se),e)}add(t,e=void 0){return C(this,Ae),ul("add",this,t,e)}subtract(t,e=void 0){return C(this,Ae),ul("subtract",this,t,e)}until(t,e=void 0){return C(this,Ae),rl("until",this,t,e)}since(t,e=void 0){return C(this,Ae),rl("since",this,t,e)}equals(t){C(this,Ae);let e=ri(t);return ln(h(this,se),h(e,se))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){return C(this,Ae),Kc(this,Oi(X(t)))}toJSON(){return C(this,Ae),Kc(this)}toLocaleString(t=void 0,e=void 0){return C(this,Ae),new Ft(t,e).format(this)}valueOf(){zn("PlainDate")}toPlainDateTime(t=void 0){C(this,Ae);let e=Bl(t);return zt(we(h(this,se),e),h(this,j))}toZonedDateTime(t){let e,r;if(C(this,Ae),Le(t)){let a=t.timeZone;a===void 0?e=vt(t):(e=vt(a),r=t.plainTime)}else e=vt(t);let i=h(this,se),o;return r===void 0?o=An(e,i):(r=Ln(r),o=Qe(e,we(i,h(r,Ne)),"compatible")),Je(o,e,h(this,j))}toPlainYearMonth(){C(this,Ae);let t=h(this,j);return Sr(vi(t,wt(t,h(this,se)),"constrain"),t)}toPlainMonthDay(){C(this,Ae);let t=h(this,j);return Mr(Eo(t,wt(t,h(this,se)),"constrain"),t)}static from(t,e=void 0){return ri(t,e)}static compare(t,e){let r=ri(t),i=ri(e);return ln(h(r,se),h(i,se))}};function ot(n,t){C(n,Ae);let e=h(n,se);return Hi(n).isoToDate(e,{[t]:!0})[t]}kn(ki,"Temporal.PlainDate");var Ti=class{constructor(t,e,r,i=0,o=0,a=0,s=0,l=0,u=0,m="iso8601"){let f=ue(t),v=ue(e),E=ue(r),I=i===void 0?0:ue(i),P=o===void 0?0:ue(o),L=a===void 0?0:ue(a),z=s===void 0?0:ue(s),W=l===void 0?0:ue(l),K=u===void 0?0:ue(u),ne=Dt(m===void 0?"iso8601":$e(m));js(f,v,E,I,P,L,z,W,K),zl(this,{isoDate:{year:f,month:v,day:E},time:{hour:I,minute:P,second:L,millisecond:z,microsecond:W,nanosecond:K}},ne)}get calendarId(){return C(this,Te),h(this,j)}get year(){return at(this,"year")}get month(){return at(this,"month")}get monthCode(){return at(this,"monthCode")}get day(){return at(this,"day")}get hour(){return wr(this,"hour")}get minute(){return wr(this,"minute")}get second(){return wr(this,"second")}get millisecond(){return wr(this,"millisecond")}get microsecond(){return wr(this,"microsecond")}get nanosecond(){return wr(this,"nanosecond")}get era(){return at(this,"era")}get eraYear(){return at(this,"eraYear")}get dayOfWeek(){return at(this,"dayOfWeek")}get dayOfYear(){return at(this,"dayOfYear")}get weekOfYear(){return at(this,"weekOfYear")?.week}get yearOfWeek(){return at(this,"weekOfYear")?.year}get daysInWeek(){return at(this,"daysInWeek")}get daysInYear(){return at(this,"daysInYear")}get daysInMonth(){return at(this,"daysInMonth")}get monthsInYear(){return at(this,"monthsInYear")}get inLeapYear(){return at(this,"inLeapYear")}with(t,e=void 0){if(C(this,Te),!Le(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=h(this,Ie),o={...wt(r,i.isoDate),...i.time};return o=nr(r,o,Bt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],"partial")),zt(ji(r,o,ye(X(e))),r)}withPlainTime(t=void 0){C(this,Te);let e=Bl(t);return zt(we(h(this,Ie).isoDate,e),h(this,j))}withCalendar(t){C(this,Te);let e=$i(t);return zt(h(this,Ie),e)}add(t,e=void 0){return C(this,Te),dl("add",this,t,e)}subtract(t,e=void 0){return C(this,Te),dl("subtract",this,t,e)}until(t,e=void 0){return C(this,Te),il("until",this,t,e)}since(t,e=void 0){return C(this,Te),il("since",this,t,e)}round(t){if(C(this,Te),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",_n,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];Or(r,a,a===1);let s=h(this,Ie);return zt(r===1&&o==="nanosecond"?s:us(s,r,o,i),h(this,j))}equals(t){C(this,Te);let e=ii(t);return Rr(h(this,Ie),h(e,Ie))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){C(this,Te);let e=X(t),r=Oi(e),i=Yi(e),o=Qt(e,"trunc"),a=kt(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}=Fi(a,i),m=us(h(this,Ie),u,l,o);return ir(m),bi(m,h(this,j),s,r)}toJSON(){return C(this,Te),bi(h(this,Ie),h(this,j),"auto")}toLocaleString(t=void 0,e=void 0){return C(this,Te),new Ft(t,e).format(this)}valueOf(){zn("PlainDateTime")}toZonedDateTime(t,e=void 0){C(this,Te);let r=vt(t),i=mi(X(e));return Je(Qe(r,h(this,Ie),i),r,h(this,j))}toPlainDate(){return C(this,Te),yt(h(this,Ie).isoDate,h(this,j))}toPlainTime(){return C(this,Te),yn(h(this,Ie).time)}static from(t,e=void 0){return ii(t,e)}static compare(t,e){let r=ii(t),i=ii(e);return Rr(h(r,Ie),h(i,Ie))}};function at(n,t){C(n,Te);let e=h(n,Ie).isoDate;return Hi(n).isoToDate(e,{[t]:!0})[t]}function wr(n,t){return C(n,Te),h(n,Ie).time[t]}kn(Ti,"Temporal.PlainDateTime");var Ci=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0,s=0,l=0,u=0,m=0){let f=t===void 0?0:Gt(t),v=e===void 0?0:Gt(e),E=r===void 0?0:Gt(r),I=i===void 0?0:Gt(i),P=o===void 0?0:Gt(o),L=a===void 0?0:Gt(a),z=s===void 0?0:Gt(s),W=l===void 0?0:Gt(l),K=u===void 0?0:Gt(u),ne=m===void 0?0:Gt(m);zo(f,v,E,I,P,L,z,W,K,ne),Sn(this),me(this,ct,f),me(this,lt,v),me(this,_t,E),me(this,ut,I),me(this,dt,P),me(this,ht,L),me(this,mt,z),me(this,ft,W),me(this,pt,K),me(this,Mt,ne)}get years(){return C(this,Re),h(this,ct)}get months(){return C(this,Re),h(this,lt)}get weeks(){return C(this,Re),h(this,_t)}get days(){return C(this,Re),h(this,ut)}get hours(){return C(this,Re),h(this,dt)}get minutes(){return C(this,Re),h(this,ht)}get seconds(){return C(this,Re),h(this,mt)}get milliseconds(){return C(this,Re),h(this,ft)}get microseconds(){return C(this,Re),h(this,pt)}get nanoseconds(){return C(this,Re),h(this,Mt)}get sign(){return C(this,Re),So(this)}get blank(){return C(this,Re),So(this)===0}with(t){C(this,Re);let e=jl(t),{years:r=h(this,ct),months:i=h(this,lt),weeks:o=h(this,_t),days:a=h(this,ut),hours:s=h(this,dt),minutes:l=h(this,ht),seconds:u=h(this,mt),milliseconds:m=h(this,ft),microseconds:f=h(this,pt),nanoseconds:v=h(this,Mt)}=e;return new n(r,i,o,a,s,l,u,m,f,v)}negated(){return C(this,Re),Ct(this)}abs(){return C(this,Re),new n(Math.abs(h(this,ct)),Math.abs(h(this,lt)),Math.abs(h(this,_t)),Math.abs(h(this,ut)),Math.abs(h(this,dt)),Math.abs(h(this,ht)),Math.abs(h(this,mt)),Math.abs(h(this,ft)),Math.abs(h(this,pt)),Math.abs(h(this,Mt)))}add(t){return C(this,Re),cl("add",this,t)}subtract(t){return C(this,Re),cl("subtract",this,t)}round(t){if(C(this,Re),t===void 0)throw new TypeError("options parameter is required");let e=pn(this),r=typeof t=="string"?ar("smallestUnit",t):X(t),i=kt(r,"largestUnit","datetime",void 0,["auto"]),{plainRelativeTo:o,zonedRelativeTo:a}=Va(r),s=Lr(r),l=Qt(r,"halfExpand"),u=kt(r,"smallestUnit","datetime",void 0),m=!0;u||(m=!1,u="nanosecond");let f=wn(e,u),v=!0;if(i||(v=!1,i=f),i==="auto"&&(i=f),!m&&!v)throw new RangeError("at least one of smallestUnit or largestUnit is required");if(wn(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&&Or(s,E,!1),s>1&&gn(u)==="date"&&i!==u)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");if(a){let P=Er(this),L=h(a,De),z=h(a,j),W=h(a,ae);return P=cu(W,ci(W,L,z,P),L,z,i,s,u,l),gn(i)==="date"&&(i="hour"),Ut(P,i)}if(o){let P=on(this),L=xr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},P.time),z=h(o,se),W=h(o,j),K=Ht(W,z,Xe(P.date,L.deltaDays),"constrain");return P=su(we(z,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(K,L),W,i,s,u,l),Ut(P,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 I=on(this);if(u==="day"){let{quotient:P,remainder:L}=I.time.divmod(wo),z=I.date.days+P+fi(L,"day");z=On(z,s,l),I=bn({years:0,months:0,weeks:0,days:z},_e.ZERO)}else I=bn({years:0,months:0,weeks:0,days:0},ko(I.time,s,u,l));return Ut(I,i)}total(t){if(C(this,Re),t===void 0)throw new TypeError("options argument is required");let e=typeof t=="string"?ar("unit",t):X(t),{plainRelativeTo:r,zonedRelativeTo:i}=Va(e),o=kt(e,"unit","datetime",_n);if(i){let s=Er(this),l=h(i,De),u=h(i,j),m=h(i,ae);return function(f,v,E,I,P){return gn(P)==="time"?fi(_e.fromEpochNsDiff(v,f),P):tl(ou(f,v,E,I,P),v,qt(E,f),E,I,P)}(m,ci(m,l,u,s),l,u,o)}if(r){let s=on(this),l=xr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},s.time),u=h(r,se),m=h(r,j),f=Ht(m,u,Xe(s.date,l.deltaDays),"constrain");return function(v,E,I,P){if(Rr(v,E)==0)return 0;ir(v),ir(E);let L=iu(v,E,I,P);return P==="nanosecond"?S.default.toNumber(L.time.totalNs):tl(L,We(E),v,null,I,P)}(we(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(f,l),m,o)}let a=pn(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 fi(on(this).time,o)}toString(t=void 0){C(this,Re);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=kt(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}=Fi(o,r);if(s==="nanosecond"&&l===1)return po(this,a);let u=pn(this),m=Er(this),f=ko(m.time,l,s,i);return m=bn(m.date,f),po(Ut(m,wn(u,"second")),a)}toJSON(){return C(this,Re),po(this,"auto")}toLocaleString(t=void 0,e=void 0){if(C(this,Re),typeof Intl.DurationFormat=="function"){let r=new Intl.DurationFormat(t,e);return qs.call(r,this)}return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."),po(this,"auto")}valueOf(){zn("Duration")}static from(t){return Vt(t)}static compare(t,e,r=void 0){let i=Vt(t),o=Vt(e),a=X(r),{plainRelativeTo:s,zonedRelativeTo:l}=Va(a);if(h(i,ct)===h(o,ct)&&h(i,lt)===h(o,lt)&&h(i,_t)===h(o,_t)&&h(i,ut)===h(o,ut)&&h(i,dt)===h(o,dt)&&h(i,ht)===h(o,ht)&&h(i,mt)===h(o,mt)&&h(i,ft)===h(o,ft)&&h(i,pt)===h(o,pt)&&h(i,Mt)===h(o,Mt))return 0;let u=pn(i),m=pn(o),f=Er(i),v=Er(o);if(l&&(gn(u)==="date"||gn(m)==="date")){let z=h(l,De),W=h(l,j),K=h(l,ae),ne=ci(K,z,W,f),ie=ci(K,z,W,v);return St(S.default.toNumber(S.default.subtract(ne,ie)))}let E=f.date.days,I=v.date.days;if(nn(u)||nn(m)){if(!s)throw new RangeError("A starting point is required for years, months, or weeks comparison");E=el(f.date,s),I=el(v.date,s)}let P=f.time.add24HourDays(E),L=v.time.add24HourDays(I);return P.cmp(L)}};kn(Ci,"Temporal.Duration");var Pi=class{constructor(t,e,r="iso8601",i=1972){let o=ue(t),a=ue(e),s=Dt(r===void 0?"iso8601":$e(r)),l=ue(i);rr(l,o,a),Ul(this,{year:l,month:o,day:a},s)}get monthCode(){return gl(this,"monthCode")}get day(){return gl(this,"day")}get calendarId(){return C(this,Ot),h(this,j)}with(t,e=void 0){if(C(this,Ot),!Le(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=wt(r,h(this,se),"month-day");return i=nr(r,i,Bt(r,t,["year","month","monthCode","day"],[],"partial")),Mr(Eo(r,i,ye(X(e))),r)}equals(t){C(this,Ot);let e=Vc(t);return ln(h(this,se),h(e,se))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){return C(this,Ot),Gc(this,Oi(X(t)))}toJSON(){return C(this,Ot),Gc(this)}toLocaleString(t=void 0,e=void 0){return C(this,Ot),new Ft(t,e).format(this)}valueOf(){zn("PlainMonthDay")}toPlainDate(t){if(C(this,Ot),!Le(t))throw new TypeError("argument should be an object");let e=h(this,j);return yt(jn(e,nr(e,wt(e,h(this,se),"month-day"),Bt(e,t,["year"],[],[])),"constrain"),e)}static from(t,e=void 0){return Vc(t,e)}};function gl(n,t){C(n,Ot);let e=h(n,se);return Hi(n).isoToDate(e,{[t]:!0})[t]}function Wa(n){return qt(n,ms())}kn(Pi,"Temporal.PlainMonthDay");var gu={instant:()=>Jt(ms()),plainDateTimeISO:(n=Qr())=>zt(Wa(vt(n)),"iso8601"),plainDateISO:(n=Qr())=>yt(Wa(vt(n)).isoDate,"iso8601"),plainTimeISO:(n=Qr())=>yn(Wa(vt(n)).time),timeZoneId:()=>Qr(),zonedDateTimeISO:(n=Qr())=>{let t=vt(n);return Je(ms(),t,"iso8601")},[Symbol.toStringTag]:"Temporal.Now"};Object.defineProperty(gu,Symbol.toStringTag,{value:"Temporal.Now",writable:!1,enumerable:!1,configurable:!0});var Ii=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),m=i===void 0?0:ue(i),f=o===void 0?0:ue(o),v=a===void 0?0:ue(a);$o(s,l,u,m,f,v),Vl(this,{hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v})}get hour(){return C(this,Oe),h(this,Ne).hour}get minute(){return C(this,Oe),h(this,Ne).minute}get second(){return C(this,Oe),h(this,Ne).second}get millisecond(){return C(this,Oe),h(this,Ne).millisecond}get microsecond(){return C(this,Oe),h(this,Ne).microsecond}get nanosecond(){return C(this,Oe),h(this,Ne).nanosecond}with(t,e=void 0){if(C(this,Oe),!Le(t))throw new TypeError("invalid argument");Nr(t);let r=rs(t,"partial"),i=rs(this),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:m}=Object.assign(i,r),f=ye(X(e));return{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:m}=Ho(o,a,s,l,u,m,f),new n(o,a,s,l,u,m)}add(t){return C(this,Oe),hl("add",this,t)}subtract(t){return C(this,Oe),hl("subtract",this,t)}until(t,e=void 0){return C(this,Oe),ol("until",this,t,e)}since(t,e=void 0){return C(this,Oe),ol("since",this,t,e)}round(t){if(C(this,Oe),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",_n);return Or(r,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o],!1),yn(ds(h(this,Ne),r,o,i))}equals(t){C(this,Oe);let e=Ln(t);return hs(h(this,Ne),h(e,Ne))===0}toString(t=void 0){C(this,Oe);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=kt(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}=Fi(o,r);return Zc(ds(h(this,Ne),l,s,i),a)}toJSON(){return C(this,Oe),Zc(h(this,Ne),"auto")}toLocaleString(t=void 0,e=void 0){return C(this,Oe),new Ft(t,e).format(this)}valueOf(){zn("PlainTime")}static from(t,e=void 0){return Ln(t,e)}static compare(t,e){let r=Ln(t),i=Ln(e);return hs(h(r,Ne),h(i,Ne))}};kn(Ii,"Temporal.PlainTime");var xi=class{constructor(t,e,r="iso8601",i=1){let o=ue(t),a=ue(e),s=Dt(r===void 0?"iso8601":$e(r)),l=ue(i);rr(o,a,l),ql(this,{year:o,month:a,day:l},s)}get year(){return mn(this,"year")}get month(){return mn(this,"month")}get monthCode(){return mn(this,"monthCode")}get calendarId(){return C(this,qe),h(this,j)}get era(){return mn(this,"era")}get eraYear(){return mn(this,"eraYear")}get daysInMonth(){return mn(this,"daysInMonth")}get daysInYear(){return mn(this,"daysInYear")}get monthsInYear(){return mn(this,"monthsInYear")}get inLeapYear(){return mn(this,"inLeapYear")}with(t,e=void 0){if(C(this,qe),!Le(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=wt(r,h(this,se),"year-month");return i=nr(r,i,Bt(r,t,["year","month","monthCode"],[],"partial")),Sr(vi(r,i,ye(X(e))),r)}add(t,e=void 0){return C(this,qe),ml("add",this,t,e)}subtract(t,e=void 0){return C(this,qe),ml("subtract",this,t,e)}until(t,e=void 0){return C(this,qe),al("until",this,t,e)}since(t,e=void 0){return C(this,qe),al("since",this,t,e)}equals(t){C(this,qe);let e=ai(t);return ln(h(this,se),h(e,se))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){return C(this,qe),Jc(this,Oi(X(t)))}toJSON(){return C(this,qe),Jc(this)}toLocaleString(t=void 0,e=void 0){return C(this,qe),new Ft(t,e).format(this)}valueOf(){zn("PlainYearMonth")}toPlainDate(t){if(C(this,qe),!Le(t))throw new TypeError("argument should be an object");let e=h(this,j);return yt(jn(e,nr(e,wt(e,h(this,se),"year-month"),Bt(e,t,["day"],[],[])),"constrain"),e)}static from(t,e=void 0){return ai(t,e)}static compare(t,e){let r=ai(t),i=ai(e);return ln(h(r,se),h(i,se))}};function mn(n,t){C(n,qe);let e=h(n,se);return Hi(n).isoToDate(e,{[t]:!0})[t]}kn(xi,"Temporal.PlainYearMonth");var Wh=Ft.prototype.resolvedOptions,Ri=class{constructor(t,e,r="iso8601"){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");let i=To(t),o=$e(e),{tzName:a,offsetMinutes:s}=Yn(o);if(s===void 0){let l=_o(a);if(!l)throw new RangeError(`unknown time zone ${a}`);o=l.identifier}else o=Ys(s);Kl(this,i,o,Dt(r===void 0?"iso8601":$e(r)))}get calendarId(){return C(this,fe),h(this,j)}get timeZoneId(){return C(this,fe),h(this,De)}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 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 st(this,"era")}get eraYear(){return st(this,"eraYear")}get epochMilliseconds(){return C(this,fe),Wt(h(this,ae),"floor")}get epochNanoseconds(){return C(this,fe),lu(h(this,ae))}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 hoursInDay(){C(this,fe);let t=h(this,De),e=tn(this).isoDate,r=Tt(e.year,e.month,e.day+1),i=An(t,e),o=An(t,r);return fi(_e.fromEpochNsDiff(o,i),"hour")}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")}get offset(){return C(this,fe),is(vn(h(this,De),h(this,ae)))}get offsetNanoseconds(){return C(this,fe),vn(h(this,De),h(this,ae))}with(t,e=void 0){if(C(this,fe),!Le(t))throw new TypeError("invalid zoned-date-time-like");Nr(t);let r=h(this,j),i=h(this,De),o=vn(i,h(this,ae)),a=tn(this),s={...wt(r,a.isoDate),...a.time,offset:is(o)};s=nr(r,s,Bt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset"],"partial"));let l=X(e),u=mi(l),m=go(l,"prefer"),f=ji(r,s,ye(l)),v=Yr(s.offset);return Je(Do(f.isoDate,f.time,"option",v,i,u,m,!1),i,r)}withPlainTime(t=void 0){C(this,fe);let e=h(this,De),r=h(this,j),i=tn(this).isoDate,o;return o=t===void 0?An(e,i):Qe(e,we(i,h(Ln(t),Ne)),"compatible"),Je(o,e,r)}withTimeZone(t){C(this,fe);let e=vt(t);return Je(h(this,ae),e,h(this,j))}withCalendar(t){C(this,fe);let e=$i(t);return Je(h(this,ae),h(this,De),e)}add(t,e=void 0){return C(this,fe),fl("add",this,t,e)}subtract(t,e=void 0){return C(this,fe),fl("subtract",this,t,e)}until(t,e=void 0){return C(this,fe),sl("until",this,t,e)}since(t,e=void 0){return C(this,fe),sl("since",this,t,e)}round(t){if(C(this,fe),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",_n,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];if(Or(r,a,a===1),o==="nanosecond"&&r===1)return Je(h(this,ae),h(this,De),h(this,j));let s=h(this,De),l=h(this,ae),u=tn(this),m;if(o==="day"){let f=u.isoDate,v=Tt(f.year,f.month,f.day+1),E=An(s,f),I=An(s,v),P=S.default.subtract(I,E);m=_e.fromEpochNsDiff(l,E).round(P,i).addToEpochNs(E)}else{let f=us(u,r,o,i),v=vn(s,l);m=Do(f.isoDate,f.time,"option",v,s,"compatible","prefer",!1)}return Je(m,s,h(this,j))}equals(t){C(this,fe);let e=si(t),r=h(this,ae),i=h(e,ae);return!!S.default.equal(S.default.BigInt(r),S.default.BigInt(i))&&!!Zl(h(this,De),h(e,De))&&sn(h(this,j),h(e,j))}toString(t=void 0){C(this,fe);let e=X(t),r=Oi(e),i=Yi(e),o=function(v){return Dn(v,"offset",["auto","never"],"auto")}(e),a=Qt(e,"trunc"),s=kt(e,"smallestUnit","time",void 0);if(s==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let l=function(v){return Dn(v,"timeZoneName",["auto","never","critical"],"auto")}(e),{precision:u,unit:m,increment:f}=Fi(s,i);return Xc(this,u,r,l,o,{unit:m,increment:f,roundingMode:a})}toLocaleString(t=void 0,e=void 0){C(this,fe);let r=X(e),i=Object.create(null);if(function(l,u,m,f){if(u==null)return;let v=Reflect.ownKeys(u);for(let E=0;E<v.length;E++){let I=v[E];if(!m.some(P=>Object.is(P,I))&&Object.prototype.propertyIsEnumerable.call(u,I)){let P=u[I];l[I]=P}}}(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=h(this,De),Qc(i.timeZone))throw new RangeError("toLocaleString does not currently support offset time zones");let o=new Ft(t,i),a=Wh.call(o).calendar,s=h(this,j);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(h(this,ae)))}toJSON(){return C(this,fe),Xc(this,"auto")}valueOf(){zn("ZonedDateTime")}startOfDay(){C(this,fe);let t=h(this,De);return Je(An(t,tn(this).isoDate),t,h(this,j))}getTimeZoneTransition(t){C(this,fe);let e=h(this,De);if(t===void 0)throw new TypeError("options parameter is required");let r=Dn(typeof t=="string"?ar("direction",t):X(t),"direction",["next","previous"],_n);if(r===void 0)throw new TypeError("direction option is required");if(Qc(e)||e==="UTC")return null;let i=h(this,ae),o=r==="next"?Hs(e,i):as(e,i);return o===null?null:Je(o,e,h(this,j))}toInstant(){return C(this,fe),Jt(h(this,ae))}toPlainDate(){return C(this,fe),yt(tn(this).isoDate,h(this,j))}toPlainTime(){return C(this,fe),yn(tn(this).time)}toPlainDateTime(){return C(this,fe),zt(tn(this),h(this,j))}static from(t,e=void 0){return si(t,e)}static compare(t,e){let r=si(t),i=si(e),o=h(r,ae),a=h(i,ae);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 qt(h(n,De),h(n,ae))}function st(n,t){C(n,fe);let e=tn(n).isoDate;return Hi(n).isoToDate(e,{[t]:!0})[t]}function br(n,t){return C(n,fe),tn(n).time[t]}kn(Ri,"Temporal.ZonedDateTime");var Ye=Object.freeze({__proto__:null,Duration:Ci,Instant:Si,Now:gu,PlainDate:ki,PlainDateTime:Ti,PlainMonthDay:Pi,PlainTime:Ii,PlainYearMonth:xi,ZonedDateTime:Ri}),Qm=class{toTemporalInstant(){return Jt(Xt(Date.prototype.valueOf.call(this)))}}.prototype.toTemporalInstant,Kh=[Si,ki,Ti,Ci,Pi,Ii,xi,Ri];for(let n of Kh){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 Zh="https://yuna-backend.cbocher.workers.dev/mews",Gh="https://api.mews.com/api/distributor/v1",Jh="Yuna",Xh="mewscache",Qh=!1,em=13,tm=8,nm=Ye.Duration.from({minutes:20}).milliseconds,rm=new Headers({Accept:"application/json, text/plain, */*","Content-Type":"application/json; charset=utf-8"}),Fe={base_url:Zh,bookingEngine_url:Gh,bookingEngineClient:Jh,bypassCache:Qh,headers:rm,cache_key:Xh,ttl:nm,beCheckInUTC:em,beCheckOutUTC:tm};var yu=(n,t,e)=>`${n}:${t}:${JSON.stringify(e)}`;var Wo=class{constructor(){H(this,"dbName","MewsAPICache");H(this,"version",2);H(this,"db",null);H(this,"initPromise",null);H(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 m=e!==void 0?e:Fe.ttl,f=Ye.Instant.fromEpochMilliseconds(u.timestamp);if(Ye.Now.instant().since(f,{smallestUnit:"milliseconds"}).milliseconds>m){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:Ye.Now.instant().epochMilliseconds,enterpriseId:r,size:a};return new Promise((l,u)=>{let v=o.transaction("api_cache","readwrite").objectStore("api_cache").put(s);v.onerror=()=>{this.recordPerformanceMetric("cache-write-error",i,!1),u(v.error)},v.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:Ye.Now.instant().epochMilliseconds,enterpriseId:r,size:this.calculateDataSize(e)};return new Promise((l,u)=>{let v=a.transaction("api_cache","readwrite").objectStore("api_cache").put(s);v.onerror=()=>u(v.error),v.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=Ye.Now.instant().epochMilliseconds-Fe.ttl,o=r.transaction("api_cache","readwrite"),a=o.objectStore("api_cache"),s=a.index("by-timestamp"),l=await new Promise((m,f)=>{let v=s.getAll(IDBKeyRange.upperBound(i));v.onsuccess=()=>m(v.result),v.onerror=()=>f(v.error)}),u=50;for(let m=0;m<l.length;m+=u){let f=l.slice(m,m+u);await Promise.all(f.map(v=>new Promise((E,I)=>{let P=a.delete(v.cacheKey);P.onsuccess=()=>E(),P.onerror=()=>I(P.error)}))),e+=f.length,m+u<l.length&&await new Promise(v=>setTimeout(v,0))}await new Promise((m,f)=>{o.oncomplete=()=>m(),o.onerror=()=>f(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,m)=>{let f=i.delete(l.cacheKey);f.onsuccess=()=>u(),f.onerror=()=>m(f.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 et=async(n,t,e=null,r=!1)=>{let i=new Wo,o=yu(n,e||"null",t.body);if(!Fe.bypassCache){let a=await i.get(o);if(a)return a}try{let a=new URL(Fe.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 vu=(n,t={})=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/services/getAll",e,n)};function wu(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 Ws=Ge({});async function bu(n){if(Ws.value[n])return Ws.value[n];let t=await vu(n),e=wu(t);return Ws.value[n]=e,e}var Du=(n,t)=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/ageCategories/getAll",e,n)};function Eu(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 Ks=Ge({});async function _u(n){if(Ks.value[n])return Ks.value[n];let t=await Du(n,{EnterpriseIds:[n]}),e=Eu(t);return Ks.value[n]=e,e}var Mu=(n,t)=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/products/getAll",e,n)};function Su(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 ku(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 Tu(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 Ki(n,t){return n.map(t)}function Zs(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 Cu(n){return{products:Ki(n.Products,Zs),customerProducts:Ki(n.CustomerProducts,Zs)}}var Gs=Ge({});async function Pu(n,t){if(Gs.value[t])return Gs.value[t];let e=await Mu(n,{ServiceIds:[t]}),r=Cu(e);return Gs.value[t]=r,r}var Iu=(n,t={})=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/rates/getAll",e,n)};var Js=Ge({});async function xu(n,t){if(Js.value[t])return Js.value[t];let e=await Iu(n,{ServiceIds:[t]}),r=Tu(e);return Js.value[t]=r,r}var Ru=(n,t)=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/services/getAvailability",e,n)};function Au(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 te=class n{static getCurrentDate(){return Ye.Now.plainDateISO()}static fromString(t){return Ye.PlainDate.from(this.safeParsePlainDate(t))}static formatForDisplay(t,e={weekday:"short",month:"short",day:"numeric"}){return t.toLocaleString(In,e)}static formatForAPI(t){return(typeof t=="string"?Ye.PlainDate.from(t):Ye.PlainDate.from(t)).toZonedDateTime({timeZone:"Europe/Paris",plainTime:Ye.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 Ye.PlainDate.compare(t,e)>0}static isAfterOrEqual(t,e){return Ye.PlainDate.compare(t,e)<0}static isSameDate(t,e){return Ye.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 Ye.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 Ye.PlainDate.from(e)}return Ye.PlainDate.from(t)}catch(e){return console.error("Error parsing date string:",e),n.getCurrentDate()}}};var Mp=localStorage.getItem("dev")==="true";var Sp=3*60*60*1e3;var Ko="calendar-day-price",Nu="DD/MM/YYYY",Lu="Y-m-d",Ou=!1,im=365,Xs=te.getCurrentDate(),Yu=te.addDays(Xs,im),Qs=te.getCurrentDate(),Fu=te.addDays(Qs,3),om=te.getCurrentDate(),kp=te.addDays(om,30);var Hu=6;function ec(n=!0,t=document.body){t.querySelectorAll('[data-fs-element="preloader"]').forEach(r=>{r.classList.toggle("hide",!n)})}function ju(n=!0,t=document.body,e=Vr("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=Vr("pleaseWait"))),i.classList.toggle("hide",!n)})}var tc=class{constructor(){H(this,"state",yr({appartmentsData:[],today:te.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}},Yp=new tc;var dr={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)),dr.touch()}catch(e){console.error(`Error writing to localStorage for key ${n}:`,e)}},update:(n,t)=>{let e=dr.get(n),r=t(e);dr.set(n,r)},remove:n=>{localStorage.removeItem(n),dr.touch()},clear:()=>{localStorage.clear()},has:n=>localStorage.getItem(n)!==null,touch:()=>{localStorage.setItem("lastUpdater",am()||"root")}},am=()=>localStorage.getItem("lastUpdater");var Zo=n=>{let t=new Date;return t.setDate(t.getDate()+n),t.toISOString().split("T")[0]},Un=dr.get("form_state"),Bu=Un?{enterpriseId:Un.enterpriseId||"",startDate:Un.startDate||Zo(45),endDate:Un.endDate||Zo(48),guests:Un.guests||2,coupon:Un.coupon||"",referrer:Un.referrer||window.location.href,rooms:Un.rooms||0}:{enterpriseId:"",startDate:Zo(45),endDate:Zo(48),guests:2,coupon:"",referrer:window.location.href,rooms:0},He=yr(Bu),sm=fo(Bu);Cc(()=>{dr.set("form_state",He)});var cm="data-fs-element";var Kt=(n,t=document)=>t.querySelector(`[${cm}="${n}"]`);var nc=Ge({});async function $u(n,t,e,r){if(nc.value[t])return nc.value[t];let i=await Ru(n,{ServiceId:t,FirstTimeUnitStartUtc:te.formatForAPI(e),LastTimeUnitStartUtc:te.formatForAPI(r)}),o=Au(i);return nc.value[t]=o,o}var zu=(n,t)=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/restrictions/getAll",e,n)};function Uu(n){if(!n||!n.Restrictions||!Array.isArray(n.Restrictions))throw new Error("Invalid service restrictions response format");return n.Restrictions}var rc=Ge({});async function Vu(n,t,e,r){if(rc.value[t])return rc.value[t];let i=await zu(n,{ServiceIds:[t],CollidingUtc:{StartUtc:te.formatForAPI(e),EndUtc:te.formatForAPI(r)},Origin:"User"}),o=Uu(i);return rc.value[t]=o,o}var qu=(n,t)=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/rules/getAll",e,n)};function Wu(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 ic=Ge({});async function Ku(n,t){if(ic.value[t])return ic.value[t];let e=await qu(n,{ServiceIds:[t],Extent:{RuleActions:!0}}),r=Wu(e);return ic.value[t]=r,r}var Zu=(n,t)=>{let e={method:"POST",headers:Fe.headers,body:JSON.stringify(t)};return et("/rates/getPricing",e,n)};var oc=Ge({});async function Gu(n,t,e,r){if(oc.value[t])return oc.value[t];let i=await Zu(n,{RateId:t,FirstTimeUnitStartUtc:te.formatForAPI(e),LastTimeUnitStartUtc:te.formatForAPI(r)}),o=Su(i);return oc.value[t]=o,o}var Go=class{constructor(t,e){H(this,"enterprise");H(this,"rate",null);H(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 Gu(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 Jo=class{constructor(t,e){H(this,"enterprise");H(this,"service",null);H(this,"products",[]);H(this,"customerProducts",[]);H(this,"restrictions",[]);H(this,"availabilities",[]);H(this,"rules",[]);H(this,"ageCategories",[]);H(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 $u(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 Vu(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 Pu(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 xu(this.enterprise.getEnterpriseId(),this.service.id);if(this.rates=t.map(e=>new Go(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 Ku(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 _u(this.enterprise.getEnterpriseId()),this.ageCategories}getAgeCategories(){if(this.ageCategories.length===0)throw new Error("Age categories are not initialized");return this.ageCategories}};var Xo=class{constructor(t){H(this,"enterpriseId");H(this,"services",[]);H(this,"reservableService",null);this.enterpriseId=t}async initServices(){this.services=await bu(this.enterpriseId);let t=this.services.find(e=>e.type.toLowerCase()==="reservable");return t&&(this.reservableService=new Jo(this,t)),this.services}getEnterpriseId(){return this.enterpriseId}getServices(){return this.services}getReservableService(){return this.reservableService?.getService()??null}};function Ju(n,t){return{rate:n,pricing:t}}function ac(n){return n.isActive&&n.isEnabled&&n.isPublic&&!n.hideFromGuest}function Xu(n,t){let e=t.filter(o=>lm(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=>um(n,o.Exceptions)))}function lm(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=te.fromString(e);return t.Days.includes(r.toLocaleString("en-US",{weekday:"long"}))})&&!0}function Qo(n){if(!n)return null;try{return Ye.Duration.from(n).total({unit:"days"})}catch{return null}}function um(n,t){let e=te.fromString(n.pricing?.datesUtc[0]),r=te.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=te.getCurrentDate(),a=e.since(o,{largestUnit:"day"}).days,s=Qo(t.MinAdvance),l=Qo(t.MaxAdvance),u=Qo(t.MinLength),m=Qo(t.MaxLength);return!!(u&&i<u||m&&i>m||s&&a<s||l&&a>l||!t.MinLength&&!t.MaxLength&&!t.MinAdvance&&!t.MaxAdvance)}var Qu=(n,t)=>{let e=n.find(s=>s.rate.isBaseRate),r=n.filter(s=>!Xu(s,t)&&ac(s.rate)),i=Object.groupBy(r,s=>s.rate.group?.Name||"unknown"),o=ku(r),a=dm(o);return{baseRate:e,allowedRates:r,groupedRates:i,datedPrices:o,lowestDatedPrices:a}};function dm(n){let t={};for(let[e,r]of Object.entries(n)){let i=1/0,o=r.filter(a=>ac(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 ed=async n=>{let t=await Promise.all(n.map(async r=>{let i=new Xo(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 m=await u.initPricing(te.formatForAPI(Xs.toString()),te.formatForAPI(Yu.toString()));return Ju(u.getRate(),m)}));return Qu(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 Ue=class Ue extends Date{constructor(e=null,r="YYYY-MM-DD",i="en-US"){super(Ue.parseDateTime(e,r,i));H(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 Ue)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=Ue.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,m]of Object.entries(o)){let f=Number(u),{group:v,pattern:E}=Ue.formatPatterns(m[0],i);s[v]=f+1,s.value+=E,s.value+=".*?"}let l=new RegExp(`^${s.value}$`);if(l.test(e)){let u=l.exec(e),m=Number(u[s.year]),f=null;s.month?f=Number(u[s.month])-1:s.shortMonth?f=Ue.shortMonths(i).indexOf(u[s.shortMonth]):s.longMonth&&(f=Ue.longMonths(i).indexOf(u[s.longMonth]));let v=Number(u[s.day])||1,E=Number(u[s.hour]),I=Number.isNaN(E)?0:E,P=Number(u[s.minute]),L=Number.isNaN(P)?0:P,z=Number(u[s.second]),W=Number.isNaN(z)?0:z,K=u[s.ampm];return K&&K==="PM"&&(I+=12,I===24&&(I=0)),new Date(m,f,v,I,L,W,0)}}}return new Date(new Date().setHours(0,0,0,0))}static shortMonths(e){return Ue.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"short"}))}static longMonths(e){return Ue.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:`(${Ue.shortMonths(r).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${Ue.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 Ue(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=Ue.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 Ue.shortMonths(r)[this.getMonth()];case"MMMM":return Ue.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""}}};H(Ue,"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),H(Ue,"MONTH_JS",[0,1,2,3,4,5,6,7,8,9,10,11]);var de=Ue,sc=class{constructor(t){H(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}},cc=class{constructor(t){H(this,"picker");H(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()}},ea=class{constructor(t){H(this,"Calendar",new sc(this));H(this,"PluginManager",new cc(this));H(this,"calendars",[]);H(this,"datePicked",[]);H(this,"cssLoaded",0);H(this,"binds",{hidePicker:this.hidePicker.bind(this),show:this.show.bind(this)});H(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:[]});H(this,"ui",{container:null,shadowRoot:null,wrapper:null});H(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}}},ia=Object.freeze({__proto__:null,Core:ea,create:ea}),Zi=class{constructor(){H(this,"picker");H(this,"options");H(this,"priority",0);H(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()}},ta=class extends Zi{constructor(){super(...arguments);H(this,"priority",1);H(this,"binds",{onView:this.onView.bind(this)});H(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,m=!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)){m=!0;break}l.subtract(1,"day")}u&&m&&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,m=this.options.maxDays&&l>this.options.maxDays;(u||m||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 na=class extends Zi{constructor(){super(...arguments);H(this,"tooltipElement");H(this,"triggerElement");H(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)});H(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),m=this.picker.Calendar.getCalendarDayView(u);u.isBetween(o,a)&&m.classList.add("in-range"),u.isSame(this.picker.datePicked[0],"day")&&(m.classList.add("start"),m.classList.toggle("flipped",s)),l===i&&(m.classList.add("end"),m.classList.toggle("flipped",s)),l.className=m.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),m=`${l} ${this.options.locale[u]}`;this.showTooltip(i,m)}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 ra=class extends Zi{constructor(){super(...arguments);H(this,"rangePlugin");H(this,"lockPlugin");H(this,"priority",10);H(this,"binds",{onView:this.onView.bind(this),onColorScheme:this.onColorScheme.bind(this)});H(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>'}});H(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 m=document.createElement("option"),f=new de(new Date(o.getFullYear(),u,2,0,0,0)),v=new de(new Date(o.getFullYear(),u,1,0,0,0));m.value=String(u),m.text=f.toLocaleString(this.picker.options.lang,{month:"long"}),this.lockPlugin&&(m.disabled=this.lockPlugin.options.minDate&&v.isBefore(new de(this.lockPlugin.options.minDate),"month")||this.lockPlugin.options.maxDate&&v.isAfter(new de(this.lockPlugin.options.maxDate),"month")),m.selected=v.getMonth()===o.getMonth(),l.appendChild(m)}l.addEventListener("change",u=>{let m=u.target;this.picker.calendars[0].setDate(1),this.picker.calendars[0].setMonth(Number(m.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,m=this.options.dropdown.maxYear?this.options.dropdown.maxYear:new Date().getFullYear();if(o.getFullYear()>m){let f=document.createElement("option");f.value=String(o.getFullYear()),f.text=String(o.getFullYear()),f.selected=!0,f.disabled=!0,l.appendChild(f)}for(let f=m;f>=u;f-=1){let v=document.createElement("option"),E=new de(new Date(f,0,1,0,0,0));v.value=String(f),v.text=String(f),this.lockPlugin&&(v.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")),v.selected=o.getFullYear()===f,l.appendChild(v)}if(o.getFullYear()<u){let f=document.createElement("option");f.value=String(o.getFullYear()),f.text=String(o.getFullYear()),f.selected=!0,f.disabled=!0,l.appendChild(f)}if(this.options.dropdown.years==="asc"){let f=Array.prototype.slice.call(l.childNodes).reverse();l.innerHTML="",f.forEach(v=>{v.innerHTML=v.value,l.appendChild(v)})}l.addEventListener("change",f=>{let v=f.target;this.picker.calendars[0].setFullYear(Number(v.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 m=i.querySelector(".day");s=new de(m.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 oa=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Vn={_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 aa={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},sa=aa;var tt=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},Pt=function(n){return n===!0?1:0};function lc(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var ca=function(n){return n instanceof Array?n:[n]};function nt(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 Gi(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function uc(n,t){if(t(n))return n;if(n.parentNode)return uc(n.parentNode,t)}function Ji(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 It(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch{return n.target}}var dc=function(){},Xi=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},td={D:dc,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*Pt(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:dc,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:dc,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},Tn={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})"},Hr={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[Hr.w(n,t,e)]},F:function(n,t,e){return Xi(Hr.n(n,t,e)-1,!1,t)},G:function(n,t,e){return tt(Hr.h(n,t,e))},H:function(n){return tt(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[Pt(n.getHours()>11)]},M:function(n,t){return Xi(n.getMonth(),!0,t)},S:function(n){return tt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return tt(n.getFullYear(),4)},d:function(n){return tt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return tt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return tt(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 hc=function(n){var t=n.config,e=t===void 0?Vn:t,r=n.l10n,i=r===void 0?aa:r,o=n.isMobile,a=o===void 0?!1:o;return function(s,l,u){var m=u||i;return e.formatDate!==void 0&&!a?e.formatDate(s,l,m):l.split("").map(function(f,v,E){return Hr[f]&&E[v-1]!=="\\"?Hr[f](s,m,e):f!=="\\"?f:""}).join("")}},la=function(n){var t=n.config,e=t===void 0?Vn:t,r=n.l10n,i=r===void 0?aa:r;return function(o,a,s,l){if(!(o!==0&&!o)){var u=l||i,m,f=o;if(o instanceof Date)m=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)m=new Date(o);else if(typeof o=="string"){var v=a||(e||Vn).dateFormat,E=String(o).trim();if(E==="today")m=new Date,s=!0;else if(e&&e.parseDate)m=e.parseDate(o,v);else if(/Z$/.test(E)||/GMT$/.test(E))m=new Date(o);else{for(var I=void 0,P=[],L=0,z=0,W="";L<v.length;L++){var K=v[L],ne=K==="\\",ie=v[L-1]==="\\"||ne;if(Tn[K]&&!ie){W+=Tn[K];var le=new RegExp(W).exec(o);le&&(I=!0)&&P[K!=="Y"?"push":"unshift"]({fn:td[K],val:le[++z]})}else ne||(W+=".")}m=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),P.forEach(function(Me){var Ee=Me.fn,re=Me.val;return m=Ee(m,re,u)||m}),m=I?m:void 0}}if(!(m instanceof Date&&!isNaN(m.getTime()))){e.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&m.setHours(0,0,0,0),m}}};function xt(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 nd=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},ua=function(n,t,e){return n*3600+t*60+e},rd=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},id={DAY:864e5};function da(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 rt=function(){return rt=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},rt.apply(this,arguments)},od=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},hm=300;function mm(n,t){var e={config:rt(rt({},Vn),Be.defaultConfig),l10n:sa};e.parseDate=la({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=P,e._setHoursFromDate=v,e._positionCalendar=Cn,e.changeMonth=_,e.changeYear=J,e.clear=T,e.close=k,e.onMouseOver=pe,e._createElement=be,e.createDay=le,e.destroy=Y,e.isEnabled=U,e.jumpToDate=W,e.updateValue=dn,e.open=Ce,e.redraw=eo,e.set=sd,e.setDate=cd,e.toggle=hd;function r(){e.utils={getDaysInMonth:function(p,w){return p===void 0&&(p=e.currentMonth),w===void 0&&(w=e.currentYear),p===1&&(w%4===0&&w%100!==0||w%400===0)?29:e.l10n.daysInMonth[p]}}}function i(){e.element=e.input=n,e.isOpen=!1,Ze(),qn(),ud(),ld(),r(),e.isMobile||ie(),z(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&v(e.config.noCalendar?e.latestSelectedDateObj:void 0),dn(!1)),s();var p=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&p&&Cn(),xe("onReady")}function o(){var p;return((p=e.calendarContainer)===null||p===void 0?void 0:p.getRootNode()).activeElement||document.activeElement}function a(p){return p.bind(e)}function s(){var p=e.config;p.weekNumbers===!1&&p.showMonths===1||p.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)*p.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(p){if(e.selectedDates.length===0){var w=e.config.minDate===void 0||xt(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),M=da(e.config);w.setHours(M.hours,M.minutes,M.seconds,w.getMilliseconds()),e.selectedDates=[w],e.latestSelectedDateObj=w}p!==void 0&&p.type!=="blur"&&pd(p);var x=e._input.value;f(),dn(),e._input.value!==x&&e._debouncedChange()}function u(p,w){return p%12+12*Pt(w===e.l10n.amPM[1])}function m(p){switch(p%24){case 0:case 12:return 12;default:return p%12}}function f(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var p=(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&&(p=u(p,e.amPM.textContent));var x=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&xt(e.latestSelectedDateObj,e.config.minDate,!0)===0,$=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&xt(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=ua(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),he=ua(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),G=ua(p,w,M);if(G>he&&G<q){var ge=rd(q);p=ge[0],w=ge[1],M=ge[2]}}else{if($){var Z=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;p=Math.min(p,Z.getHours()),p===Z.getHours()&&(w=Math.min(w,Z.getMinutes())),w===Z.getMinutes()&&(M=Math.min(M,Z.getSeconds()))}if(x){var oe=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;p=Math.max(p,oe.getHours()),p===oe.getHours()&&w<oe.getMinutes()&&(w=oe.getMinutes()),w===oe.getMinutes()&&(M=Math.max(M,oe.getSeconds()))}}E(p,w,M)}}function v(p){var w=p||e.latestSelectedDateObj;w&&w instanceof Date&&E(w.getHours(),w.getMinutes(),w.getSeconds())}function E(p,w,M){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(p%24,w,M||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=tt(e.config.time_24hr?p:(12+p)%12+12*Pt(p%12===0)),e.minuteElement.value=tt(w),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[Pt(p>=12)]),e.secondElement!==void 0&&(e.secondElement.value=tt(M)))}function I(p){var w=It(p),M=parseInt(w.value)+(p.delta||0);(M/1e3>1||p.key==="Enter"&&!/[^\d]/.test(M.toString()))&&J(M)}function P(p,w,M,x){if(w instanceof Array)return w.forEach(function($){return P(p,$,M,x)});if(p instanceof Array)return p.forEach(function($){return P($,w,M,x)});p.addEventListener(w,M,x),e._handlers.push({remove:function(){return p.removeEventListener(w,M,x)}})}function L(){xe("onChange")}function z(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(M){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+M+"]"),function(x){return P(x,"click",e[M])})}),e.isMobile){dd();return}var p=lc(ve,50);if(e._debouncedChange=lc(L,hm),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&P(e.daysContainer,"mouseover",function(M){e.config.mode==="range"&&pe(It(M))}),P(e._input,"keydown",ce),e.calendarContainer!==void 0&&P(e.calendarContainer,"keydown",ce),!e.config.inline&&!e.config.static&&P(window,"resize",p),window.ontouchstart!==void 0?P(window.document,"touchstart",V):P(window.document,"mousedown",V),P(window.document,"focus",V,{capture:!0}),e.config.clickOpens===!0&&(P(e._input,"focus",e.open),P(e._input,"click",e.open)),e.daysContainer!==void 0&&(P(e.monthNav,"click",fd),P(e.monthNav,["keyup","increment"],I),P(e.daysContainer,"click",mc)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var w=function(M){return It(M).select()};P(e.timeContainer,["increment"],l),P(e.timeContainer,"blur",l,{capture:!0}),P(e.timeContainer,"click",K),P([e.hourElement,e.minuteElement],["focus","click"],w),e.secondElement!==void 0&&P(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&P(e.amPM,"click",function(M){l(M)})}e.config.allowInput&&P(e._input,"blur",ee)}function W(p,w){var M=p!==void 0?e.parseDate(p):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,$=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&&(xe("onYearChange"),Q()),w&&(e.currentYear!==x||e.currentMonth!==$)&&xe("onMonthChange"),e.redraw()}function K(p){var w=It(p);~w.className.indexOf("arrow")&&ne(p,w.classList.contains("arrowUp")?1:-1)}function ne(p,w,M){var x=p&&It(p),$=M||x&&x.parentNode&&x.parentNode.firstChild,q=pa("increment");q.delta=w,$&&$.dispatchEvent(q)}function ie(){var p=window.document.createDocumentFragment();if(e.calendarContainer=be("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(p.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(y()),e.daysContainer||(e.daysContainer=be("div","flatpickr-days"),e.daysContainer.tabIndex=-1),O(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),p.appendChild(e.innerContainer)}e.config.enableTime&&p.appendChild(d()),nt(e.calendarContainer,"rangeMode",e.config.mode==="range"),nt(e.calendarContainer,"animate",e.config.animate===!0),nt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(p);var $=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&&(!$&&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 le(p,w,M,x){var $=U(w,!0),q=be("span",p,w.getDate().toString());return q.dateObj=w,q.$i=x,q.setAttribute("aria-label",e.formatDate(w,e.config.ariaDateFormat)),p.indexOf("hidden")===-1&&xt(w,e.now)===0&&(e.todayDateElem=q,q.classList.add("today"),q.setAttribute("aria-current","date")),$?(q.tabIndex=-1,ga(w)&&(q.classList.add("selected"),e.selectedDateElem=q,e.config.mode==="range"&&(nt(q,"startRange",e.selectedDates[0]&&xt(w,e.selectedDates[0],!0)===0),nt(q,"endRange",e.selectedDates[1]&&xt(w,e.selectedDates[1],!0)===0),p==="nextMonthDay"&&q.classList.add("inRange")))):q.classList.add("flatpickr-disabled"),e.config.mode==="range"&&md(w)&&!ga(w)&&q.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&p!=="prevMonthDay"&&x%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(w)+"</span>"),xe("onDayCreate",q),q}function Me(p){p.focus(),e.config.mode==="range"&&pe(p)}function Ee(p){for(var w=p>0?0:e.config.showMonths-1,M=p>0?e.config.showMonths:-1,x=w;x!=M;x+=p)for(var $=e.daysContainer.children[x],q=p>0?0:$.children.length-1,he=p>0?$.children.length:-1,G=q;G!=he;G+=p){var ge=$.children[G];if(ge.className.indexOf("hidden")===-1&&U(ge.dateObj))return ge}}function re(p,w){for(var M=p.className.indexOf("Month")===-1?p.dateObj.getMonth():e.currentMonth,x=w>0?e.config.showMonths:-1,$=w>0?1:-1,q=M-e.currentMonth;q!=x;q+=$)for(var he=e.daysContainer.children[q],G=M-e.currentMonth===q?p.$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+=$){var oe=he.children[Z];if(oe.className.indexOf("hidden")===-1&&U(oe.dateObj)&&Math.abs(p.$i-Z)>=Math.abs(w))return Me(oe)}e.changeMonth($),N(Ee($),0)}function N(p,w){var M=o(),x=B(M||document.body),$=p!==void 0?p:x?M:e.selectedDateElem!==void 0&&B(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&B(e.todayDateElem)?e.todayDateElem:Ee(w>0?1:-1);$===void 0?e._input.focus():x?re($,w):Me($)}function F(p,w){for(var M=(new Date(p,w,1).getDay()-e.l10n.firstDayOfWeek+7)%7,x=e.utils.getDaysInMonth((w-1+12)%12,p),$=e.utils.getDaysInMonth(w,p),q=window.document.createDocumentFragment(),he=e.config.showMonths>1,G=he?"prevMonthDay hidden":"prevMonthDay",ge=he?"nextMonthDay hidden":"nextMonthDay",Z=x+1-M,oe=0;Z<=x;Z++,oe++)q.appendChild(le("flatpickr-day "+G,new Date(p,w-1,Z),Z,oe));for(Z=1;Z<=$;Z++,oe++)q.appendChild(le("flatpickr-day",new Date(p,w,Z),Z,oe));for(var Se=$+1;Se<=42-M&&(e.config.showMonths===1||oe%7!==0);Se++,oe++)q.appendChild(le("flatpickr-day "+ge,new Date(p,w+1,Se%$),Se,oe));var en=be("div","dayContainer");return en.appendChild(q),en}function O(){if(e.daysContainer!==void 0){Gi(e.daysContainer),e.weekNumbers&&Gi(e.weekNumbers);for(var p=document.createDocumentFragment(),w=0;w<e.config.showMonths;w++){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),p.appendChild(F(M.getFullYear(),M.getMonth()))}e.daysContainer.appendChild(p),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&pe()}}function Q(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var p=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(p(w)){var M=be("option","flatpickr-monthDropdown-month");M.value=new Date(e.currentYear,w).getMonth().toString(),M.textContent=Xi(w,e.config.shorthandCurrentMonth,e.l10n),M.tabIndex=-1,e.currentMonth===w&&(M.selected=!0),e.monthsDropdownContainer.appendChild(M)}}}function g(){var p=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),P(e.monthsDropdownContainer,"change",function(he){var G=It(he),ge=parseInt(G.value,10);e.changeMonth(ge-e.currentMonth),xe("onMonthChange")}),Q(),M=e.monthsDropdownContainer);var x=Ji("cur-year",{tabindex:"-1"}),$=x.getElementsByTagName("input")[0];$.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&$.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&($.setAttribute("max",e.config.maxDate.getFullYear().toString()),$.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),p.appendChild(w),{container:p,yearElement:$,monthElement:M}}function A(){Gi(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var p=e.config.showMonths;p--;){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(p){e.__hidePrevMonthArrow!==p&&(nt(e.prevMonthNav,"flatpickr-disabled",p),e.__hidePrevMonthArrow=p)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(p){e.__hideNextMonthArrow!==p&&(nt(e.nextMonthNav,"flatpickr-disabled",p),e.__hideNextMonthArrow=p)}}),e.currentYearElement=e.yearElements[0],no(),e.monthNav}function d(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var p=da(e.config);e.timeContainer=be("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var w=be("span","flatpickr-time-separator",":"),M=Ji("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=M.getElementsByTagName("input")[0];var x=Ji("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=x.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=tt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?p.hours:m(p.hours)),e.minuteElement.value=tt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():p.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 $=Ji("flatpickr-second");e.secondElement=$.getElementsByTagName("input")[0],e.secondElement.value=tt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():p.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($)}return e.config.time_24hr||(e.amPM=be("span","flatpickr-am-pm",e.l10n.amPM[Pt((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 y(){e.weekdayContainer?Gi(e.weekdayContainer):e.weekdayContainer=be("div","flatpickr-weekdays");for(var p=e.config.showMonths;p--;){var w=be("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(w)}return D(),e.weekdayContainer}function D(){if(e.weekdayContainer){var p=e.l10n.firstDayOfWeek,w=od(e.l10n.weekdays.shorthand);p>0&&p<w.length&&(w=od(w.splice(p,w.length),w.splice(0,p)));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 z(N,F){if(F&&(typeof F=="object"||typeof F=="function"))return F;if(F!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(N)}function W(N,F){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,Q){return O.__proto__=Q,O},W(N,F)}function K(N,F){return r(N)||P(N,F)||Me(N,F)||L()}function ne(N,F){if(typeof N!="object"||!N)return N;var O=N[Symbol.toPrimitive];if(O!==void 0){var Q=O.call(N,F||"default");if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(N)}function ie(N){var F=ne(N,"string");return typeof F=="symbol"?F:F+""}function le(N){"@babel/helpers - typeof";return le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},le(N)}function Me(N,F){if(N){if(typeof N=="string")return e(N,F);var O={}.toString.call(N).slice(8,-1);return O==="Object"&&N.constructor&&(O=N.constructor.name),O==="Map"||O==="Set"?Array.from(N):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?e(N,F):void 0}}function Ee(N){var F=typeof Map=="function"?new Map:void 0;return Ee=function(O){function Q(){return s(O,arguments,f(this).constructor)}if(O===null||!E(O))return O;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(F!==void 0){if(F.has(O))return F.get(O);F.set(O,Q)}return Q.prototype=Object.create(O.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),W(Q,O)},Ee(N)}var re=function(N){var F=Math.abs,O=Math.max,Q=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 v(g,N),u(g,[{key:"toDebugString",value:function(){var c,d=["BigInt["],y=m(this);try{for(y.s();!(c=y.n()).done;){var D=c.value;d.push((D&&(D>>>0).toString(16))+", ")}}catch(b){y.e(b)}finally{y.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,y){y>this.length&&(y=this.length);for(var D=32767&c,b=c>>>15,_=0,T=d,k=0;k<y;k++){var Y=this.__digit(k),R=32767&Y,V=Y>>>15,J=g.__imul(R,D),U=g.__imul(R,b),B=g.__imul(V,D),ee=g.__imul(V,b),ce=T+J+_;_=ce>>>30,ce&=1073741823,ce+=((32767&U)<<15)+((32767&B)<<15),_+=ce>>>30,T=ee+(U>>>15)+(B>>>15),this.__setDigit(k,1073741823&ce)}if(_!==0||T!==0)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(c,d,y){for(var D,b=0,_=0;_<y;_++)D=this.__halfDigit(d+_)+c.__halfDigit(_)+b,b=D>>>15,this.__setHalfDigit(d+_,32767&D);return b}},{key:"__inplaceSub",value:function(c,d,y){var D=y-1>>>1,b=0;if(1&d){d>>=1;for(var _=this.__digit(d),T=32767&_,k=0;k<D;k++){var Y=c.__digit(k),R=(_>>>15)-(32767&Y)-b;b=1&R>>>15,this.__setDigit(d+k,(32767&R)<<15|32767&T),_=this.__digit(d+k+1),T=(32767&_)-(Y>>>15)-b,b=1&T>>>15}var V=c.__digit(k),J=(_>>>15)-(32767&V)-b;b=1&J>>>15,this.__setDigit(d+k,(32767&J)<<15|32767&T);var U=V>>>15;if(d+k+1>=this.length)throw new RangeError("out of bounds");!(1&y)&&(_=this.__digit(d+k+1),T=(32767&_)-U-b,b=1&T>>>15,this.__setDigit(d+c.length,1073709056&_|32767&T))}else{d>>=1;for(var B=0;B<c.length-1;B++){var ee=this.__digit(d+B),ce=c.__digit(B),pe=(32767&ee)-(32767&ce)-b;b=1&pe>>>15;var ve=(ee>>>15)-(ce>>>15)-b;b=1&ve>>>15,this.__setDigit(d+B,(32767&ve)<<15|32767&pe)}var Ce=this.__digit(d+B),je=c.__digit(B),Ze=(32767&Ce)-(32767&je)-b;b=1&Ze>>>15;var $t=0;!(1&y)&&($t=(Ce>>>15)-(je>>>15)-b,b=1&$t>>>15),this.__setDigit(d+B,(32767&$t)<<15|32767&Ze)}return b}},{key:"__inplaceRightShift",value:function(c){if(c!==0){for(var d,y=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|y),y=d>>>c;this.__setDigit(D,y)}}},{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 y=c>>>1,D=this.__digit(y),b=1&c?32767&D|d<<15:1073709056&D|32767&d;this.__setDigit(y,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)||Q(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 y=g.__fromString(c);if(y===null)throw new SyntaxError("Cannot convert "+c+" to a BigInt");return y}if(typeof c=="boolean")return c===!0?g.__oneDigit(1,!1):g.__zero();if(le(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 y=c.__unsignedDigit(0);return c.sign?-y:y}var D=c.__digit(d-1),b=g.__clz30(D),_=30*d-b;if(1024<_)return c.sign?-1/0:1/0;var T=_-1,k=D,Y=d-1,R=b+3,V=R===32?0:k<<R;V>>>=12;var J=R-12,U=12<=R?0:k<<20+R,B=20+R;for(0<J&&0<Y&&(Y--,k=c.__digit(Y),V|=k>>>30-J,U=k<<J+2,B=J+2);0<B&&0<Y;)Y--,k=c.__digit(Y),U|=30<=B?k<<B-30:k>>>30-B,B-=30;var ee=g.__decideRounding(c,B,Y,k);if((ee===1||ee===0&&(1&U)==1)&&(U=U+1>>>0,U===0&&(V++,V>>>20!=0&&(V=0,T++,1023<T))))return c.sign?-1/0:1/0;var ce=c.sign?-2147483648:0;return T=T+1023<<20,g.__kBitConversionInts[g.__kBitConversionIntHigh]=ce|T|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 y=d.__unsignedDigit(0);if(y===1)return c;if(y>=g.__kMaxLengthBits)throw new RangeError("BigInt too big");if(c.length===1&&c.__digit(0)===2){var D=1+(0|y/30),b=c.sign&&(1&y)!=0,_=new g(D,b);_.__initializeDigits();var T=1<<y%30;return _.__setDigit(D-1,T),_}var k=null,Y=c;for(1&y&&(k=c),y>>=1;y!==0;y>>=1)Y=g.multiply(Y,Y),1&y&&(k===null?k=Y:k=g.multiply(k,Y));return k}},{key:"multiply",value:function(c,d){if(c.length===0)return c;if(d.length===0)return d;var y=c.length+d.length;30<=c.__clzmsd()+d.__clzmsd()&&y--;var D=new g(y,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 y,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);y=g.__absoluteDivSmall(c,b,null)}else y=g.__absoluteDivLarge(c,d,!0,!1);return y.sign=D,y.__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 y=d.__unsignedDigit(0);if(d.length===1&&32767>=y){if(y===1)return g.__zero();var D=g.__absoluteModSmall(c,y);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 y=c.sign;return y===d.sign?g.__absoluteAdd(c,d,y):0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,y):g.__absoluteSub(d,c,!y)}},{key:"subtract",value:function(c,d){var y=c.sign;return y===d.sign?0<=g.__absoluteCompare(c,d)?g.__absoluteSub(c,d,y):g.__absoluteSub(d,c,!y):g.__absoluteAdd(c,d,y)}},{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 y=0;y<c.length;y++)if(c.__digit(y)!==d.__digit(y))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 y=O(c.length,d.length)+1,D=g.__absoluteSubOne(c,y),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 y=O(c.length,d.length),D=g.__absoluteSubOne(c,y),b=g.__absoluteSubOne(d);return g.__absoluteXor(D,b,D).__trim()}var _=O(c.length,d.length)+1;if(c.sign){var T=[d,c];c=T[0],d=T[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 y=O(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,y),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 T=g.__absoluteSubOne(d,y);return T=g.__absoluteAndNot(T,c,T),g.__absoluteAddOne(T,!0,T).__trim()}},{key:"asIntN",value:function(c,d){if(d.length===0)return d;if(c=Q(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 y=0|(c+29)/30;if(d.length<y)return d;var D=d.__unsignedDigit(y-1),b=1<<(c-1)%30;if(d.length===y&&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 T=y-2;0<=T;T--)if(d.__digit(T)!==0)return g.__truncateAndSubFromPowerOfTwo(c,d,!1);return d.length===y&&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=Q(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 y=0|(c+29)/30;if(d.length<y)return d;var D=c%30;if(d.length==y){if(D===0)return d;var b=d.__digit(y-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(le(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(le(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(typeof c=="boolean"){if(g.__isBigInt(d))return g.__equalToNumber(d,+c);if(le(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(le(c)==="symbol"){if(g.__isBigInt(d))return!1;if(le(d)!=="object")return c==d;d=g.__toPrimitive(d)}else if(le(c)==="object"){if(le(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 y=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return g.asIntN(64,g.DataViewGetBigUint64(c,d,y))}},{key:"DataViewGetBigUint64",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0&&arguments[2],D=y?[4,0]:[0,4],b=K(D,2),_=b[0],T=b[1],k=c.getUint32(d+_,y),Y=c.getUint32(d+T,y),R=new g(3,!1);return R.__setDigit(0,1073741823&Y),R.__setDigit(1,(268435455&k)<<2|Y>>>30),R.__setDigit(2,k>>>28),R.__trim()}},{key:"DataViewSetBigInt64",value:function(c,d,y){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];g.DataViewSetBigUint64(c,d,y,D)}},{key:"DataViewSetBigUint64",value:function(c,d,y){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];y=g.asUintN(64,y);var b=0,_=0;if(0<y.length&&(_=y.__digit(0),1<y.length)){var T=y.__digit(1);_|=T<<30,b=T>>>2,2<y.length&&(b|=y.__digit(2)<<28)}var k=D?[4,0]:[0,4],Y=K(k,2),R=Y[0],V=Y[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 y=new g(1,d);return y.__setDigit(0,c),y}},{key:"__decideRounding",value:function(c,d,y,D){if(0<d)return-1;var b;if(0>d)b=-d-1;else{if(y===0)return-1;y--,D=c.__digit(y),b=29}var _=1<<b;if(!(D&_))return-1;if(_-=1,(D&_)!=0)return 1;for(;0<y;)if(y--,c.__digit(y)!==0)return 1;return 0}},{key:"__fromDouble",value:function(c){var d=0>c;g.__kBitConversionDouble[0]=c;var y,D=2047&g.__kBitConversionInts[g.__kBitConversionIntHigh]>>>20,b=D-1023,_=(0|b/30)+1,T=new g(_,d),k=1048576,Y=1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh]|k,R=g.__kBitConversionInts[g.__kBitConversionIntLow],V=20,J=b%30,U=0;if(J<V){var B=V-J;U=B+32,y=Y>>>B,Y=Y<<32-B|R>>>B,R<<=32-B}else if(J===V)U=32,y=Y,Y=R,R=0;else{var ee=J-V;U=32-ee,y=Y<<ee|R>>>32-ee,Y=R<<ee,R=0}T.__setDigit(_-1,y);for(var ce=_-2;0<=ce;ce--)0<U?(U-=30,y=Y>>>2,Y=Y<<30|R>>>2,R<<=30):y=0,T.__setDigit(ce,y);return T.__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,y=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),y=1}else if(_===45){if(++b===D)return null;_=c.charCodeAt(b),y=-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(y!==0&&d!==10)return null;for(;_===48;){if(++b===D)return g.__zero();_=c.charCodeAt(b)}var T=D-b,k=g.__kMaxBitsPerChar[d],Y=g.__kBitsPerCharTableMultiplier-1;if(T>1073741824/k)return null;var R=k*T+Y>>>g.__kBitsPerCharTableShift,V=0|(R+29)/30,J=new g(V,!1),U=10>d?d:10,B=10<d?d-10:0;if(d&d-1){J.__initializeDigits();var Ze=!1,$t=0;do{for(var qn,Pn=0,Br=1;;){if(qn=void 0,_-48>>>0<U)qn=_-48;else if((32|_)-97>>>0<B)qn=(32|_)-87;else{Ze=!0;break}var Qi=Br*d;if(1073741823<Qi)break;if(Br=Qi,Pn=Pn*d+qn,$t++,++b===D){Ze=!0;break}_=c.charCodeAt(b)}Y=30*g.__kBitsPerCharTableMultiplier-1;var eo=0|(k*$t+Y>>>g.__kBitsPerCharTableShift)/30;J.__inplaceMultiplyAdd(Br,Pn,eo)}while(!Ze)}else{k>>=g.__kBitsPerCharTableShift;var ee=[],ce=[],pe=!1;do{for(var ve,Ce=0,je=0;;){if(ve=void 0,_-48>>>0<U)ve=_-48;else if((32|_)-97>>>0<B)ve=(32|_)-87;else{pe=!0;break}if(je+=k,Ce=Ce<<k|ve,++b===D){pe=!0;break}if(_=c.charCodeAt(b),30<je+k)break}ee.push(Ce),ce.push(je)}while(!pe);g.__fillFromParts(J,ee,ce)}if(b!==D){if(!g.__isWhitespace(_))return null;for(b++;b<D;b++)if(_=c.charCodeAt(b),!g.__isWhitespace(_))return null}return J.sign=y===-1,J.__trim()}},{key:"__fillFromParts",value:function(c,d,y){for(var D=0,b=0,_=0,T=d.length-1;0<=T;T--){var k=d[T],Y=y[T];b|=k<<_,_+=Y,_===30?(c.__setDigit(D++,b),_=0,b=0):30<_&&(c.__setDigit(D++,1073741823&b),_-=30,b=k>>>Y-_)}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 y=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,T=c.__digit(y-1),k=g.__clz30(T),Y=30*y-k,R=0|(Y+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,B=0,ee=0;ee<y-1;ee++){var ce=c.__digit(ee),pe=(U|ce<<B)&_;V[J--]=g.__kConversionChars[pe];var ve=b-B;for(U=ce>>>ve,B=30-ve;B>=b;)V[J--]=g.__kConversionChars[U&_],U>>>=b,B-=b}var Ce=(U|T<<B)&_;for(V[J--]=g.__kConversionChars[Ce],U=T>>>b-B;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,y){var D=c.length;if(D===0)return"";if(D===1){var b=c.__unsignedDigit(0).toString(d);return y===!1&&c.sign&&(b="-"+b),b}var _=30*D-g.__clz30(c.__digit(D-1)),T=g.__kMaxBitsPerChar[d],k=T-1,Y=_*g.__kBitsPerCharTableMultiplier;Y+=k-1,Y=0|Y/k;var R,V,J=Y+1>>1,U=g.exponentiate(g.__oneDigit(d,!1),g.__oneDigit(J,!1)),B=U.__unsignedDigit(0);if(U.length===1&&32767>=B){R=new g(c.length,!1),R.__initializeDigits();for(var ee,ce=0,pe=2*c.length-1;0<=pe;pe--)ee=ce<<15|c.__halfDigit(pe),R.__setHalfDigit(pe,0|ee/B),ce=0|ee%B;V=ce.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 y===!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 y=c.sign;if(y!==d.sign)return g.__unequalSign(y);var D=g.__absoluteCompare(c,d);return 0<D?g.__absoluteGreater(y):0>D?g.__absoluteLess(y):0}},{key:"__compareToNumber",value:function(c,d){if(g.__isOneDigitInt(d)){var y=c.sign,D=0>d;if(y!==D)return g.__unequalSign(y);if(c.length===0){if(D)throw new Error("implementation bug");return d===0?0:-1}if(1<c.length)return g.__absoluteGreater(y);var b=F(d),_=c.__unsignedDigit(0);return _>b?g.__absoluteGreater(y):_<b?g.__absoluteLess(y):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 y=c.sign,D=0>d;if(y!==D)return g.__unequalSign(y);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(y);var T=c.length,k=c.__digit(T-1),Y=g.__clz30(k),R=30*T-Y,V=_+1;if(R<V)return g.__absoluteLess(y);if(R>V)return g.__absoluteGreater(y);var J=1048576,U=1048576|1048575&g.__kBitConversionInts[g.__kBitConversionIntHigh],B=g.__kBitConversionInts[g.__kBitConversionIntLow],ee=20,ce=29-Y;if(ce!==(0|(R-1)%30))throw new Error("implementation bug");var pe,ve=0;if(ce<ee){var Ce=ee-ce;ve=Ce+32,pe=U>>>Ce,U=U<<32-Ce|B>>>Ce,B<<=32-Ce}else if(ce===ee)ve=32,pe=U,U=B,B=0;else{var je=ce-ee;ve=32-je,pe=U<<je|B>>>32-je,U=B<<je,B=0}if(k>>>=0,pe>>>=0,k>pe)return g.__absoluteGreater(y);if(k<pe)return g.__absoluteLess(y);for(var Ze=T-2;0<=Ze;Ze--){0<ve?(ve-=30,pe=U>>>2,U=U<<30|B>>>2,B<<=30):pe=0;var $t=c.__unsignedDigit(Ze);if($t>pe)return g.__absoluteGreater(y);if($t<pe)return g.__absoluteLess(y)}if(U!==0||B!==0){if(ve===0)throw new Error("implementation bug");return g.__absoluteLess(y)}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)===F(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,y){if(c=g.__toPrimitive(c),d=g.__toPrimitive(d),typeof c=="string"&&typeof d=="string")switch(y){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),y);if(typeof c=="string"&&g.__isBigInt(d))return c=g.__fromString(c),c!==null&&g.__comparisonResultToBool(g.__compareToBigInt(c,d),y);if(c=g.__toNumeric(c),d=g.__toNumeric(d),g.__isBigInt(c)){if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToBigInt(c,d),y);if(typeof d!="number")throw new Error("implementation bug");return g.__comparisonResultToBool(g.__compareToNumber(c,d),y)}if(typeof c!="number")throw new Error("implementation bug");if(g.__isBigInt(d))return g.__comparisonResultToBool(g.__compareToNumber(d,c),2^y);if(typeof d!="number")throw new Error("implementation bug");return y===0?c<d:y===1?c<=d:y===2?c>d:y===3?c>=d:void 0}},{key:"__absoluteAdd",value:function(c,d,y){if(c.length<d.length)return g.__absoluteAdd(d,c,y);if(c.length===0)return c;if(d.length===0)return c.sign===y?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,y),T=0,k=0;k<d.length;k++)b=c.__digit(k)+d.__digit(k)+T,T=b>>>30,_.__setDigit(k,1073741823&b);for(;k<c.length;k++){var Y=c.__digit(k)+T;T=Y>>>30,_.__setDigit(k,1073741823&Y)}return k<_.length&&_.__setDigit(k,T),_.__trim()}},{key:"__absoluteSub",value:function(c,d,y){if(c.length===0)return c;if(d.length===0)return c.sign===y?c:g.unaryMinus(c);for(var D,b=new g(c.length,y),_=0,T=0;T<d.length;T++)D=c.__digit(T)-d.__digit(T)-_,_=1&D>>>30,b.__setDigit(T,1073741823&D);for(;T<c.length;T++){var k=c.__digit(T)-_;_=1&k>>>30,b.__setDigit(T,1073741823&k)}return b.__trim()}},{key:"__absoluteAddOne",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length;y===null?y=new g(D,d):y.sign=d;for(var b,_=1,T=0;T<D;T++)b=c.__digit(T)+_,_=b>>>30,y.__setDigit(T,1073741823&b);return _!==0&&y.__setDigitGrow(D,1),y}},{key:"__absoluteSubOne",value:function(c,d){var y=c.length;d=d||y;for(var D,b=new g(d,!1),_=1,T=0;T<y;T++)D=c.__digit(T)-_,_=1&D>>>30,b.__setDigit(T,1073741823&D);if(_!==0)throw new Error("implementation bug");for(var k=y;k<d;k++)b.__setDigit(k,0);return b}},{key:"__absoluteAnd",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var T=c,k=D;c=d,D=b,d=T,b=k}var Y=_;y===null?y=new g(Y,!1):Y=y.length;for(var R=0;R<_;R++)y.__setDigit(R,c.__digit(R)&d.__digit(R));for(;R<Y;R++)y.__setDigit(R,0);return y}},{key:"__absoluteAndNot",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;D<b&&(_=D);var T=D;y===null?y=new g(T,!1):T=y.length;for(var k=0;k<_;k++)y.__setDigit(k,c.__digit(k)&~d.__digit(k));for(;k<D;k++)y.__setDigit(k,c.__digit(k));for(;k<T;k++)y.__setDigit(k,0);return y}},{key:"__absoluteOr",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var T=c,k=D;c=d,D=b,d=T,b=k}var Y=D;y===null?y=new g(Y,!1):Y=y.length;for(var R=0;R<_;R++)y.__setDigit(R,c.__digit(R)|d.__digit(R));for(;R<D;R++)y.__setDigit(R,c.__digit(R));for(;R<Y;R++)y.__setDigit(R,0);return y}},{key:"__absoluteXor",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var T=c,k=D;c=d,D=b,d=T,b=k}var Y=D;y===null?y=new g(Y,!1):Y=y.length;for(var R=0;R<_;R++)y.__setDigit(R,c.__digit(R)^d.__digit(R));for(;R<D;R++)y.__setDigit(R,c.__digit(R));for(;R<Y;R++)y.__setDigit(R,0);return y}},{key:"__absoluteCompare",value:function(c,d){var y=c.length-d.length;if(y!=0)return y;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,y,D){if(d!==0){for(var b=32767&d,_=d>>>15,T=0,k=0,Y=0;Y<c.length;Y++,D++){var R=y.__digit(D),V=c.__digit(Y),J=32767&V,U=V>>>15,B=g.__imul(J,b),ee=g.__imul(J,_),ce=g.__imul(U,b),pe=g.__imul(U,_);R+=k+B+T,T=R>>>30,R&=1073741823,R+=((32767&ee)<<15)+((32767&ce)<<15),T+=R>>>30,k=pe+(ee>>>15)+(ce>>>15),y.__setDigit(D,1073741823&R)}for(;T!==0||k!==0;D++){var ve=y.__digit(D);ve+=T+k,k=0,T=ve>>>30,y.__setDigit(D,1073741823&ve)}}}},{key:"__internalMultiplyAdd",value:function(c,d,y,D,b){for(var _=y,T=0,k=0;k<D;k++){var Y=c.__digit(k),R=g.__imul(32767&Y,d),V=g.__imul(Y>>>15,d),J=R+((32767&V)<<15)+T+_;_=J>>>30,T=V>>>15,b.__setDigit(k,1073741823&J)}if(b.length>D)for(b.__setDigit(D++,_+T);D<b.length;)b.__setDigit(D++,0);else if(_+T!==0)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(c,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;y===null&&(y=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,T=0|_/d;D=0|_%d,_=(D<<15|c.__halfDigit(b-1))>>>0;var k=0|_/d;D=0|_%d,y.__setDigit(b>>>1,T<<15|k)}return y}},{key:"__absoluteModSmall",value:function(c,d){for(var y,D=0,b=2*c.length-1;0<=b;b--)y=(D<<15|c.__halfDigit(b))>>>0,D=0|y%d;return D}},{key:"__absoluteDivLarge",value:function(c,d,y,D){var b=d.__halfDigitLength(),_=d.length,T=c.__halfDigitLength()-b,k=null;y&&(k=new g(T+2>>>1,!1),k.__initializeDigits());var Y=new g(b+2>>>1,!1);Y.__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,B=T;0<=B;B--){var ee=32767,ce=V.__halfDigit(B+b);if(ce!==J){var pe=(ce<<15|V.__halfDigit(B+b-1))>>>0;ee=0|pe/J;for(var ve=0|pe%J,Ce=d.__halfDigit(b-2),je=V.__halfDigit(B+b-2);g.__imul(ee,Ce)>>>0>(ve<<16|je)>>>0&&(ee--,ve+=J,!(32767<ve)););}g.__internalMultiplyAdd(d,ee,0,_,Y);var Ze=V.__inplaceSub(Y,B,b+1);Ze!==0&&(Ze=V.__inplaceAdd(d,B,b),V.__setHalfDigit(B+b,32767&V.__halfDigit(B+b)+Ze),ee--),y&&(1&B?U=ee<<15:k.__setDigit(B>>>1,U|ee))}if(D)return V.__inplaceRightShift(R),y?{quotient:k,remainder:V}:V;if(y)return k;throw new Error("unreachable")}},{key:"__clz15",value:function(c){return g.__clz30(c)-15}},{key:"__specialLeftShift",value:function(c,d,y){var D=c.length,b=D+y,_=new g(b,!1);if(d===0){for(var T=0;T<D;T++)_.__setDigit(T,c.__digit(T));return 0<y&&_.__setDigit(D,0),_}for(var k,Y=0,R=0;R<D;R++)k=c.__digit(R),_.__setDigit(R,1073741823&k<<d|Y),Y=k>>>30-d;return 0<y&&_.__setDigit(D,Y),_}},{key:"__leftShiftByAbsolute",value:function(c,d){var y=g.__toShiftAmount(d);if(0>y)throw new RangeError("BigInt too big");var D=0|y/30,b=y%30,_=c.length,T=b!==0&&c.__digit(_-1)>>>30-b!=0,k=_+D+(T?1:0),Y=new g(k,c.sign);if(b===0){for(var R=0;R<D;R++)Y.__setDigit(R,0);for(;R<k;R++)Y.__setDigit(R,c.__digit(R-D))}else{for(var V=0,J=0;J<D;J++)Y.__setDigit(J,0);for(var U,B=0;B<_;B++)U=c.__digit(B),Y.__setDigit(B+D,1073741823&U<<b|V),V=U>>>30-b;if(T)Y.__setDigit(_+D,V);else if(V!==0)throw new Error("implementation bug")}return Y.__trim()}},{key:"__rightShiftByAbsolute",value:function(c,d){var y=c.length,D=c.sign,b=g.__toShiftAmount(d);if(0>b)return g.__rightShiftByMaximum(D);var _=0|b/30,T=b%30,k=y-_;if(0>=k)return g.__rightShiftByMaximum(D);var Y=!1;if(D){var R=(1<<T)-1;if(c.__digit(_)&R)Y=!0;else for(var V=0;V<_;V++)if(c.__digit(V)!==0){Y=!0;break}}if(Y&&T===0){var J=c.__digit(y-1),U=~J==0;U&&k++}var B=new g(k,D);if(T===0){B.__setDigit(k-1,0);for(var ee=_;ee<y;ee++)B.__setDigit(ee-_,c.__digit(ee))}else{for(var ce,pe=c.__digit(_)>>>T,ve=y-_-1,Ce=0;Ce<ve;Ce++)ce=c.__digit(Ce+_+1),B.__setDigit(Ce,1073741823&ce<<30-T|pe),pe=ce>>>T;B.__setDigit(ve,pe)}return Y&&(B=g.__absoluteAddOne(B,!0,B)),B.__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(le(c)!=="object"||c.constructor===g)return c;if(typeof Symbol<"u"&&le(Symbol.toPrimitive)==="symbol"&&c[Symbol.toPrimitive]){var y=c[Symbol.toPrimitive](d);if(le(y)!=="object")return y;throw new TypeError("Cannot convert object to primitive value")}var D=c.valueOf;if(D){var b=D.call(c);if(le(b)!=="object")return b}var _=c.toString;if(_){var T=_.call(c);if(le(T)!=="object")return T}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 le(c)==="object"&&c!==null&&c.constructor===g}},{key:"__truncateToNBits",value:function(c,d){for(var y=0|(c+29)/30,D=new g(y,d.sign),b=y-1,_=0;_<b;_++)D.__setDigit(_,d.__digit(_));var T=d.__digit(b);if(c%30!=0){var k=32-c%30;T=T<<k>>>k}return D.__setDigit(b,T),D.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(c,d,y){for(var D=Math.min,b,_=0|(c+29)/30,T=new g(_,y),k=0,Y=_-1,R=0,V=D(Y,d.length);k<V;k++)b=0-d.__digit(k)-R,R=1&b>>>30,T.__setDigit(k,1073741823&b);for(;k<Y;k++)T.__setDigit(k,0|1073741823&-R);var J,U=Y<d.length?d.__digit(Y):0,B=c%30;if(B===0)J=0-U-R,J&=1073741823;else{var ee=32-B;U=U<<ee>>>ee;var ce=1<<32-ee;J=ce-U-R,J&=ce-1}return T.__setDigit(Y,J),T.__trim()}},{key:"__digitPow",value:function(c,d){for(var y=1;0<d;)1&d&&(y*=c),d>>>=1,c*=c;return y}},{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 re.__kMaxLength=33554432,re.__kMaxLengthBits=re.__kMaxLength<<5,re.__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],re.__kBitsPerCharTableShift=5,re.__kBitsPerCharTableMultiplier=1<<re.__kBitsPerCharTableShift,re.__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"],re.__kBitConversionBuffer=new ArrayBuffer(8),re.__kBitConversionDouble=new Float64Array(re.__kBitConversionBuffer),re.__kBitConversionInts=new Int32Array(re.__kBitConversionBuffer),re.__kBitConversionIntHigh=re.__detectBigEndian()?0:1,re.__kBitConversionIntLow=re.__detectBigEndian()?1:0,re.__clz30=t?function(N){return t(N)-2}:function(N){var F=Math.LN2,O=Math.log;return N===0?30:0|29-(0|O(N>>>0)/F)},re.__imul=n||function(N,F){return 0|N*F},re})});var zr=()=>{};function Wn(n,t,e,r){return n?(n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)):zr}var yc=n=>n instanceof HTMLInputElement;var Ur=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=yc(e)?e.value:""}return t.toString()};var ba=class{constructor(){H(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))}},ro=new ba;function At(n,t){ro.emit(n,t)}function hn(n,t){Array.isArray(n)?n.forEach(e=>ro.on(e,t)):ro.on(n,t)}var Kn=()=>{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},In=Kn().bcp47,Rm=Kn().iso639;var vc={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"}},Da={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."]},bc=()=>{let n=Kn().bcp47,t=n.split("-")[0],e=[n,t,"en"];for(let r of e)if(r in Da)return Da[r];return Da.en},wc=(n,t)=>{for(let e of t){let r=n[e];if(typeof r=="string"&&r.trim()!=="")return r}},Nd=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},Vr=n=>vc[Kn().bcp47][n]||vc["fr-FR"][n],Nt=n=>{let t=Kn().bcp47,e=t.split("-")[0],r=wc(n,Nd(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=wc(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 Ea(n){let t=Object.create(null);for(let e of n.split(","))t[e]=1;return e=>e in t}var _a=Object.assign;var Ld=Object.prototype.hasOwnProperty,io=(n,t)=>Ld.call(n,t),Zn=Array.isArray,qr=n=>Dc(n)==="[object Map]";var Od=n=>typeof n=="string",mr=n=>typeof n=="symbol",Wr=n=>n!==null&&typeof n=="object";var Yd=Object.prototype.toString,Dc=n=>Yd.call(n),Ec=n=>Dc(n).slice(8,-1);var oo=n=>Od(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n;var ao=n=>{let t=Object.create(null);return e=>t[e]||(t[e]=n(e))},Fd=/-(\w)/g,Ym=ao(n=>n.replace(Fd,(t,e)=>e?e.toUpperCase():"")),Hd=/\B([A-Z])/g,Fm=ao(n=>n.replace(Hd,"-$1").toLowerCase()),jd=ao(n=>n.charAt(0).toUpperCase()+n.slice(1)),Hm=ao(n=>n?`on${jd(n)}`:""),Gn=(n,t)=>!Object.is(n,t);var Bd="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var jm=Ea(Bd+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var Ma;var Pe;var Sa=new WeakSet,lo=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,Ma&&Ma.active&&Ma.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Sa.has(this)&&(Sa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||$d(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_c(this),kc(this);let t=Pe,e=Zt;Pe=this,Zt=!0;try{return this.fn()}finally{Tc(this),Pe=t,Zt=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ha(t);this.deps=this.depsTail=void 0,_c(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Sa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ca(this)&&this.run()}get dirty(){return Ca(this)}},Sc=0,Zr,Gr;function $d(n,t=!1){if(n.flags|=8,t){n.next=Gr,Gr=n;return}n.next=Zr,Zr=n}function Ya(){Sc++}function Fa(){if(--Sc>0)return;if(Gr){let t=Gr;for(Gr=void 0;t;){let e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Zr;){let t=Zr;for(Zr=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 kc(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tc(n){let t,e=n.depsTail,r=e;for(;r;){let i=r.prevDep;r.version===-1?(r===e&&(e=i),Ha(r),Ud(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}n.deps=t,n.depsTail=e}function Ca(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(zd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function zd(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===uo)||(n.globalVersion=uo,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Ca(n))))return;n.flags|=2;let t=n.dep,e=Pe,r=Zt;Pe=n,Zt=!0;try{kc(n);let i=n.fn(n._value);(t.version===0||Gn(i,n._value))&&(n.flags|=128,n._value=i,t.version++)}catch(i){throw t.version++,i}finally{Pe=e,Zt=r,Tc(n),n.flags&=-3}}function Ha(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)Ha(o,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function Ud(n){let{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}function Cc(n,t){n.effect instanceof lo&&(n=n.effect.fn);let e=new lo(n);t&&_a(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,Pc=[];function Vd(){Pc.push(Zt),Zt=!1}function qd(){let n=Pc.pop();Zt=n===void 0?!0:n}function _c(n){let{cleanup:t}=n;if(n.cleanup=void 0,t){let e=Pe;Pe=void 0;try{t()}finally{Pe=e}}}var uo=0,Pa=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}},ho=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 Pa(Pe,this),Pe.deps?(e.prevDep=Pe.depsTail,Pe.depsTail.nextDep=e,Pe.depsTail=e):Pe.deps=Pe.depsTail=e,Ic(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++,uo++,this.notify(t)}notify(t){Ya();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Fa()}}};function Ic(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)Ic(r)}let e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),n.dep.subs=n}}var Ia=new WeakMap,Jn=Symbol(""),xa=Symbol(""),Jr=Symbol("");function Et(n,t,e){if(Zt&&Pe){let r=Ia.get(n);r||Ia.set(n,r=new Map);let i=r.get(e);i||(r.set(e,i=new ho),i.map=r,i.key=e),i.track()}}function xn(n,t,e,r,i,o){let a=Ia.get(n);if(!a){uo++;return}let s=l=>{l&&l.trigger()};if(Ya(),t==="clear")a.forEach(s);else{let l=Zn(n),u=l&&oo(e);if(l&&e==="length"){let m=Number(r);a.forEach((f,v)=>{(v==="length"||v===Jr||!mr(v)&&v>=m)&&s(f)})}else switch((e!==void 0||a.has(void 0))&&s(a.get(e)),u&&s(a.get(Jr)),t){case"add":l?u&&s(a.get("length")):(s(a.get(Jn)),qr(n)&&s(a.get(xa)));break;case"delete":l||(s(a.get(Jn)),qr(n)&&s(a.get(xa)));break;case"set":qr(n)&&s(a.get(Jn));break}}Fa()}function fr(n){let t=ke(n);return t===n?t:(Et(t,"iterate",Jr),Rn(n)?t:t.map(it))}function ja(n){return Et(n=ke(n),"iterate",Jr),n}var Wd={__proto__:null,[Symbol.iterator](){return ka(this,Symbol.iterator,it)},concat(...n){return fr(this).concat(...n.map(t=>Zn(t)?fr(t):t))},entries(){return ka(this,"entries",n=>(n[1]=it(n[1]),n))},every(n,t){return mn(this,"every",n,t,void 0,arguments)},filter(n,t){return mn(this,"filter",n,t,e=>e.map(it),arguments)},find(n,t){return mn(this,"find",n,t,it,arguments)},findIndex(n,t){return mn(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return mn(this,"findLast",n,t,it,arguments)},findLastIndex(n,t){return mn(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return mn(this,"forEach",n,t,void 0,arguments)},includes(...n){return Ta(this,"includes",n)},indexOf(...n){return Ta(this,"indexOf",n)},join(n){return fr(this).join(n)},lastIndexOf(...n){return Ta(this,"lastIndexOf",n)},map(n,t){return mn(this,"map",n,t,void 0,arguments)},pop(){return Kr(this,"pop")},push(...n){return Kr(this,"push",n)},reduce(n,...t){return Mc(this,"reduce",n,t)},reduceRight(n,...t){return Mc(this,"reduceRight",n,t)},shift(){return Kr(this,"shift")},some(n,t){return mn(this,"some",n,t,void 0,arguments)},splice(...n){return Kr(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 Kr(this,"unshift",n)},values(){return ka(this,"values",it)}};function ka(n,t,e){let r=ja(n),i=r[t]();return r!==n&&!Rn(n)&&(i._next=i.next,i.next=()=>{let o=i._next();return o.value&&(o.value=e(o.value)),o}),i}var Kd=Array.prototype;function mn(n,t,e,r,i,o){let a=ja(n),s=a!==n&&!Rn(n),l=a[t];if(l!==Kd[t]){let f=l.apply(n,o);return s?it(f):f}let u=e;a!==n&&(s?u=function(f,v){return e.call(this,it(f),v,n)}:e.length>2&&(u=function(f,v){return e.call(this,f,v,n)}));let m=l.call(a,u,r);return s&&i?i(m):m}function Mc(n,t,e,r){let i=ja(n),o=e;return i!==n&&(Rn(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,it(s),l,n)}),i[t](o,...r)}function Ta(n,t,e){let r=ke(n);Et(r,"iterate",Jr);let i=r[t](...e);return(i===-1||i===!1)&&sh(e[0])?(e[0]=ke(e[0]),r[t](...e)):i}function Kr(n,t,e=[]){Vd(),Ya();let r=ke(n)[t].apply(n,e);return Fa(),qd(),r}var Zd=Ea("__proto__,__v_isRef,__isVue"),xc=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(mr));function Gd(n){mr(n)||(n=String(n));let t=ke(this);return Et(t,"has",n),t.hasOwnProperty(n)}var mo=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?ih:Nc:o?rh:Ac).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=Zn(t);if(!i){let l;if(a&&(l=Wd[e]))return l;if(e==="hasOwnProperty")return Gd}let s=Reflect.get(t,e,pr(t)?t:r);return(mr(e)?xc.has(e):Zd(e))||(i||Et(t,"get",e),o)?s:pr(s)?a&&oo(e)?s:s.value:Wr(s)?i?fo(s):yr(s):s}},Ra=class extends mo{constructor(t=!1){super(!1,t)}set(t,e,r,i){let o=t[e];if(!this._isShallow){let l=gr(o);if(!Rn(r)&&!gr(r)&&(o=ke(o),r=ke(r)),!Zn(t)&&pr(o)&&!pr(r))return l?!1:(o.value=r,!0)}let a=Zn(t)&&oo(e)?Number(e)<t.length:io(t,e),s=Reflect.set(t,e,r,pr(t)?t:i);return t===ke(i)&&(a?Gn(r,o)&&xn(t,"set",e,r,o):xn(t,"add",e,r)),s}deleteProperty(t,e){let r=io(t,e),i=t[e],o=Reflect.deleteProperty(t,e);return o&&r&&xn(t,"delete",e,void 0,i),o}has(t,e){let r=Reflect.has(t,e);return(!mr(e)||!xc.has(e))&&Et(t,"has",e),r}ownKeys(t){return Et(t,"iterate",Zn(t)?"length":Jn),Reflect.ownKeys(t)}},Aa=class extends mo{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}},Jd=new Ra,Xd=new Aa;var Na=n=>n,so=n=>Reflect.getPrototypeOf(n);function Qd(n,t,e){return function(...r){let i=this.__v_raw,o=ke(i),a=qr(o),s=n==="entries"||n===Symbol.iterator&&a,l=n==="keys"&&a,u=i[n](...r),m=e?Na:t?La:it;return!t&&Et(o,"iterate",l?xa:Jn),{next(){let{value:f,done:v}=u.next();return v?{value:f,done:v}:{value:s?[m(f[0]),m(f[1])]:m(f),done:v}},[Symbol.iterator](){return this}}}}function co(n){return function(...t){return n==="delete"?!1:n==="clear"?void 0:this}}function eh(n,t){let e={get(i){let o=this.__v_raw,a=ke(o),s=ke(i);n||(Gn(i,s)&&Et(a,"get",i),Et(a,"get",s));let{has:l}=so(a),u=t?Na:n?La:it;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&&Et(ke(i),"iterate",Jn),Reflect.get(i,"size",i)},has(i){let o=this.__v_raw,a=ke(o),s=ke(i);return n||(Gn(i,s)&&Et(a,"has",i),Et(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?Na:n?La:it;return!n&&Et(l,"iterate",Jn),s.forEach((m,f)=>i.call(o,u(m),u(f),a))}};return _a(e,n?{add:co("add"),set:co("set"),delete:co("delete"),clear:co("clear")}:{add(i){!t&&!Rn(i)&&!gr(i)&&(i=ke(i));let o=ke(this);return so(o).has.call(o,i)||(o.add(i),xn(o,"add",i,i)),this},set(i,o){!t&&!Rn(o)&&!gr(o)&&(o=ke(o));let a=ke(this),{has:s,get:l}=so(a),u=s.call(a,i);u||(i=ke(i),u=s.call(a,i));let m=l.call(a,i);return a.set(i,o),u?Gn(o,m)&&xn(a,"set",i,o,m):xn(a,"add",i,o),this},delete(i){let o=ke(this),{has:a,get:s}=so(o),l=a.call(o,i);l||(i=ke(i),l=a.call(o,i));let u=s?s.call(o,i):void 0,m=o.delete(i);return l&&xn(o,"delete",i,void 0,u),m},clear(){let i=ke(this),o=i.size!==0,a=void 0,s=i.clear();return o&&xn(i,"clear",void 0,void 0,a),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Qd(i,n,t)}),e}function Rc(n,t){let e=eh(n,t);return(r,i,o)=>i==="__v_isReactive"?!n:i==="__v_isReadonly"?n:i==="__v_raw"?r:Reflect.get(io(e,i)&&i in r?e:r,i,o)}var th={get:Rc(!1,!1)};var nh={get:Rc(!0,!1)};var Ac=new WeakMap,rh=new WeakMap,Nc=new WeakMap,ih=new WeakMap;function oh(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ah(n){return n.__v_skip||!Object.isExtensible(n)?0:oh(Ec(n))}function yr(n){return gr(n)?n:Lc(n,!1,Jd,th,Ac)}function fo(n){return Lc(n,!0,Xd,nh,Nc)}function Lc(n,t,e,r,i){if(!Wr(n)||n.__v_raw&&!(t&&n.__v_isReactive))return n;let o=ah(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 gr(n){return!!(n&&n.__v_isReadonly)}function Rn(n){return!!(n&&n.__v_isShallow)}function sh(n){return n?!!n.__v_raw:!1}function ke(n){let t=n&&n.__v_raw;return t?ke(t):n}var it=n=>Wr(n)?yr(n):n,La=n=>Wr(n)?fo(n):n;function pr(n){return n?n.__v_isRef===!0:!1}function Ge(n){return ch(n,!1)}function ch(n,t){return pr(n)?n:new Oa(n,t)}var Oa=class{constructor(t,e){this.dep=new ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:ke(t),this._value=e?t:it(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){let e=this._rawValue,r=this.__v_isShallow||Rn(t)||gr(t);t=r?t:ke(t),Gn(t,e)&&(this._rawValue=t,this._value=r?t:it(t),this.dep.trigger())}};var S=Ad(Oc(),1),Yt=S.default.BigInt(0),pi=S.default.BigInt(1),Ns=S.default.BigInt(2),lh=S.default.BigInt(10),uh=S.default.BigInt(24),dh=S.default.BigInt(60),hh=S.default.BigInt(1e3),Ai=S.default.BigInt(1e6),li=S.default.BigInt(1e9),yl=S.default.multiply(S.default.BigInt(3600),li),mh=S.default.multiply(dh,li),Fn=S.default.multiply(yl,uh);function pn(n){return typeof n=="bigint"?S.default.BigInt(n.toString(10)):n}function vl(n){return S.default.equal(S.default.remainder(n,Ns),Yt)}function Xn(n){return S.default.lessThan(n,Yt)?S.default.unaryMinus(n):n}function yo(n,t){return S.default.lessThan(n,t)?-1:S.default.greaterThan(n,t)?1:0}function ti(n,t){return{quotient:S.default.divide(n,t),remainder:S.default.remainder(n,t)}}var Yc,Fc,ae="slot-epochNanoSeconds",se="slot-iso-date",Ie="slot-iso-date-time",Le="slot-time",j="slot-calendar",wl="slot-date-brand",bl="slot-year-month-brand",Dl="slot-month-day-brand",De="slot-time-zone",ct="slot-years",lt="slot-months",_t="slot-weeks",ut="slot-days",dt="slot-hours",ht="slot-minutes",mt="slot-seconds",ft="slot-milliseconds",pt="slot-microseconds",Mt="slot-nanoseconds",El="date",_l="ym",Ml="md",Sl="time",kl="datetime",Tl="instant",lr="original",Dr="timezone-canonical",Ka="timezone-original",ni="calendar-id",Cl="locale",Za="options",Pl=new WeakMap,Ga=Symbol.for("@@Temporal__GetSlots");(Yc=globalThis)[Ga]||(Yc[Ga]=function(n){return Pl.get(n)});var Ao=globalThis[Ga],Ja=Symbol.for("@@Temporal__CreateSlots");(Fc=globalThis)[Ja]||(Fc[Ja]=function(n){Pl.set(n,Object.create(null))});var kn=globalThis[Ja];function bt(n,...t){if(!n||typeof n!="object")return!1;let e=Ao(n);return!!e&&t.every(r=>r in e)}function h(n,t){let e=Ao(n)?.[t];if(e===void 0)throw new TypeError(`Missing internal slot ${t}`);return e}function me(n,t,e){let r=Ao(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 Xa={};function Tn(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))}Qa(t,n),Qa(`${t}.prototype`,n.prototype)}function Qa(n,t){let e=`%${n}%`;if(Xa[e]!==void 0)throw new Error(`intrinsic ${n} already exists`);Xa[e]=t}function Ke(n){return Xa[n]}function _r(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 za(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 No(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 Lo(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=pn(t),this.sec=S.default.toNumber(S.default.divide(this.totalNs,li)),this.subsec=S.default.toNumber(S.default.remainder(this.totalNs,li))}static validateNew(t,e){if(S.default.greaterThan(Xn(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(pn(t),pn(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),hh)),S.default.multiply(S.default.BigInt(i),Ai)),S.default.multiply(S.default.BigInt(r),li)),S.default.multiply(S.default.BigInt(e),mh)),S.default.multiply(S.default.BigInt(t),yl));return n.validateNew(s,"total")}abs(){return new n(Xn(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),Fn)),"sum")}addToEpochNs(t){return S.default.add(pn(t),this.totalNs)}cmp(t){return yo(this.totalNs,t.totalNs)}divmod(t){let{quotient:e,remainder:r}=ti(this.totalNs,S.default.BigInt(t));return{quotient:S.default.toNumber(e),remainder:new n(r)}}fdiv(t){let e=pn(t),r=S.default.BigInt(e),{quotient:i,remainder:o}=ti(this.totalNs,r),a=[],s,l=(S.default.lessThan(this.totalNs,Yt)?-1:1)*Math.sign(S.default.toNumber(e));for(;!S.default.equal(o,Yt)&&a.length<50;)o=S.default.multiply(o,lh),{quotient:s,remainder:o}=ti(o,r),a.push(Math.abs(S.default.toNumber(s)));return l*+(Xn(i).toString()+"."+a.join(""))}isZero(){return S.default.equal(this.totalNs,Yt)}round(t,e){let r=pn(t);if(S.default.equal(r,pi))return this;let{quotient:i,remainder:o}=ti(this.totalNs,r),a=S.default.lessThan(this.totalNs,Yt)?"negative":"positive",s=S.default.multiply(Xn(i),r),l=S.default.add(s,r),u=yo(Xn(S.default.multiply(o,Ns)),r),m=No(e,a),f=S.default.equal(Xn(this.totalNs),s)?s:Lo(s,l,u,vl(i),m),v=a==="positive"?f:S.default.unaryMinus(f);return n.validateNew(v,"rounding")}sign(){return this.cmp(new n(Yt))}subtract(t){return n.validateNew(S.default.subtract(this.totalNs,t.totalNs),"difference")}};_e.MAX=S.default.BigInt("9007199254740991999999999"),_e.ZERO=new _e(Yt);var Hc=/[A-Za-z._][A-Za-z._0-9+-]*/,Ni=new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${Hc.source})(?:\\/(?:${Hc.source}))*)`),Il=/(?:[+-]\d{6}|\d{4})/,vo=/(?:0[1-9]|1[0-2])/,es=/(?:0[1-9]|[12]\d|3[01])/,fh=new RegExp(`(${Il.source})(?:-(${vo.source})-(${es.source})|(${vo.source})(${es.source}))`),xl=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,Rl=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,Al=new RegExp(`([zZ])|${Rl.source}?`),Tr=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,ph=new RegExp([`^${fh.source}`,`(?:(?:[tT]|\\s+)${xl.source}(?:${Al.source})?)?`,`(?:\\[!?(${Ni.source})\\])?`,`((?:${Tr.source})*)$`].join("")),gh=new RegExp([`^[tT]?${xl.source}`,`(?:${Al.source})?`,`(?:\\[!?${Ni.source}\\])?`,`((?:${Tr.source})*)$`].join("")),yh=new RegExp(`^(${Il.source})-?(${vo.source})(?:\\[!?${Ni.source}\\])?((?:${Tr.source})*)$`),vh=new RegExp(`^(?:--)?(${vo.source})-?(${es.source})(?:\\[!?${Ni.source}\\])?((?:${Tr.source})*)$`),Ua=/(\d+)(?:[.,](\d{1,9}))?/,wh=new RegExp(`(?:${Ua.source}H)?(?:${Ua.source}M)?(?:${Ua.source}S)?`),bh=new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${wh.source})?$`,"i"),Hn=864e5,wo=1e6*Hn,Dh=6e10,Nl=1e8*Hn,Cr=Xt(Nl),gi=S.default.unaryMinus(Cr),Eh=S.default.add(S.default.subtract(gi,Fn),pi),_h=S.default.subtract(S.default.add(Cr,Fn),pi),Mh=146097*Hn,jc=-271821,Bc=275760,ui=Date.UTC(1847,0,1),Sh=["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"],kh=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 Oe(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Oo(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=Oo(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 $c(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=Oo(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 yi(n,t){return String(n).padStart(t,"0")}function $e(n){if(typeof n!="string")throw new TypeError(`expected a string, not ${String(n)}`);return n}function ts(n,t){if(Oe(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 ns=["era","eraYear","year","month","monthCode","day","hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],Th={era:Yo,eraYear:ue,year:ue,month:$c,monthCode:function(n){let t=$e(ts(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:$c,hour:ue,minute:ue,second:ue,millisecond:ue,microsecond:ue,nanosecond:ue,offset:function(n){let t=$e(ts(n));return Yr(t),t},timeZone:vt},Ch={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"]],zc=Object.fromEntries(Pr.map(n=>[n[0],n[1]])),Ph=Object.fromEntries(Pr.map(([n,t])=>[t,n])),di=Pr.map(([,n])=>n),Ir={day:wo,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},bo=["days","hours","microseconds","milliseconds","minutes","months","nanoseconds","seconds","weeks","years"],Ih=Intl.DateTimeFormat,Uc=new Map;function Ll(n){let t=Ei(n),e=Uc.get(t);return e===void 0&&(e=new Ih("en-us",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Uc.set(t,e)),e}function Ve(n){return bt(n,ae)&&!bt(n,De,j)}function Ae(n){return bt(n,ct,lt,ut,dt,ht,mt,ft,pt,Mt)}function Ne(n){return bt(n,wl)}function Ye(n){return bt(n,Le)}function Te(n){return bt(n,Ie)}function qe(n){return bt(n,bl)}function Ot(n){return bt(n,Dl)}function fe(n){return bt(n,ae,De,j)}function C(n,t){if(!t(n))throw new TypeError("invalid receiver: method called with the wrong type of this-object")}function Nr(n){if(bt(n,j)||bt(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 Li(n,t){return t==="never"||t==="auto"&&n==="iso8601"?"":`[${t==="critical"?"!":""}u-ca=${n}]`}function Fo(n){let t,e,r=!1;for(Tr.lastIndex=0;e=Tr.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=ph.exec(n);if(!t)throw new RangeError(`invalid RFC 9557 string: ${n}`);let e=Fo(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),m=+(t[8]??t[11]??0);m===60&&(m=59);let f=(t[9]??t[12]??"")+"000000000",v=+f.slice(0,3),E=+f.slice(3,6),I=+f.slice(6,9),P,L=!1;t[13]?(P=void 0,L=!0):t[14]&&(P=t[14]);let z=t[15];return js(i,o,a,l,u,m,v,E,I),{year:i,month:o,day:a,time:s?{hour:l,minute:u,second:m,millisecond:v,microsecond:E,nanosecond:I}:"start-of-day",tzAnnotation:z,offset:P,z:L,calendar:e}}function Ol(n){let t=gh.exec(n),e,r,i,o,a,s,l;if(t){l=Fo(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,m;if({time:u,z:m,calendar:l}=un(n),u==="start-of-day")throw new RangeError(`time is missing in string: ${n}`);if(m)throw new RangeError("Z designator not supported for PlainTime");({hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s}=u)}if($o(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:m}=Os(n);rr(1972,u,m)}catch{try{let{year:u,month:m}=Ls(n);rr(u,m,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 Ls(n){let t=yh.exec(n),e,r,i,o;if(t){i=Fo(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 Os(n){let t=vh.exec(n),e,r,i,o;if(t){if(i=Fo(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 Yl=new RegExp(`^${Ni.source}$`,"i"),Fl=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);function Hl(n){let t=Rh.test(n)?"Seconds not allowed in offset time zone":"Invalid time zone";throw new RangeError(`${t}: ${n}`)}function Yn(n){return Yl.test(n)||Hl(n),Fl.test(n)?{offsetMinutes:Yr(n)/6e10}:{tzName:n}}function hi(n,t,e,r){let i=n,o=t,a=e;switch(r){case"reject":rr(i,o,a);break;case"constrain":({year:i,month:o,day:a}=nu(i,o,a))}return{year:i,month:o,day:a}}function Ho(n,t,e,r,i,o,a){let s=n,l=t,u=e,m=r,f=i,v=o;switch(a){case"reject":$o(s,l,u,m,f,v);break;case"constrain":s=gt(s,0,23),l=gt(l,0,59),u=gt(u,0,59),m=gt(m,0,999),f=gt(f,0,999),v=gt(v,0,999)}return{hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v}}function jl(n){if(!Oe(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<bo.length;r++){let i=bo[r],o=n[i];o!==void 0&&(e=!0,t[i]=Gt(o))}if(!e)throw new TypeError("invalid duration-like");return t}function Xe({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 En(n,"overflow",["constrain","reject"],"constrain")}function mi(n){return En(n,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function Qt(n,t){return En(n,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],t)}function go(n,t){return En(n,"offset",["prefer","use","ignore","reject"],t)}function Oi(n){return En(n,"calendarName",["auto","always","never","critical"],"auto")}function Lr(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 Or(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 Fi(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 Mn=Symbol("~required~");function kt(n,t,e,r,i=[]){let o=[];for(let u=0;u<Pr.length;u++){let m=Pr[u],f=m[1],v=m[2];e!=="datetime"&&e!==v||o.push(f)}o=o.concat(i);let a=r;a===Mn?a=void 0:a!==void 0&&o.push(a);let s=[];s=s.concat(o);for(let u=0;u<o.length;u++){let m=o[u],f=Ph[m];f!==void 0&&s.push(f)}let l=En(n,t,s,a);if(l===void 0&&r===Mn)throw new RangeError(`${t} is required`);return l&&l in zc?zc[l]:l}function Va(n){let t=n.relativeTo;if(t===void 0)return{};let e,r,i,o,a,s="option",l=!1;if(Oe(t)){if(fe(t))return{zonedRelativeTo:t};if(Ne(t))return{plainRelativeTo:t};if(Te(t))return{plainRelativeTo:yt(h(t,Ie).isoDate,h(t,j))};i=zi(t);let u=Bt(i,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],[]);({isoDate:e,time:r}=ji(i,u,"constrain")),{offset:a,timeZone:o}=u,a===void 0&&(s="wall")}else{let u,m,f,v,E;if({year:f,month:v,day:E,time:r,calendar:i,tzAnnotation:u,offset:a,z:m}=un($e(t)),u)o=vt(u),m?s="exact":a||(s="wall"),l=!0;else if(m)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");i||(i="iso8601"),i=Dt(i),e={year:f,month:v,day:E}}return o===void 0?{plainRelativeTo:yt(e,i)}:{zonedRelativeTo:Je(Do(e,r,s,s==="option"?Yr(a):0,o,"compatible","reject",l),o,i)}}function gn(n){return h(n,ct)!==0?"year":h(n,lt)!==0?"month":h(n,_t)!==0?"week":h(n,ut)!==0?"day":h(n,dt)!==0?"hour":h(n,ht)!==0?"minute":h(n,mt)!==0?"second":h(n,ft)!==0?"millisecond":h(n,pt)!==0?"microsecond":"nanosecond"}function bn(n,t){return di.indexOf(n)>di.indexOf(t)?t:n}function nn(n){return n==="year"||n==="month"||n==="week"}function yn(n){return nn(n)||n==="day"?"date":"time"}function $n(n){return Ke("%calendarImpl%")(n)}function Hi(n){return Ke("%calendarImpl%")(h(n,j))}function wt(n,t,e="date"){let r=Object.create(null),i=$n(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 Bt(n,t,e,r,i){let o=$n(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 m=a[u],f=t[m];if(f!==void 0)l=!0,s[m]=(0,Th[m])(f);else if(i!=="partial"){if(i.includes(m))throw new TypeError(`required property '${m}' missing or undefined`);s[m]=Ch[m]}}if(i==="partial"&&!l)throw new TypeError("no supported properties found");return s}function rs(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 ri(n,t){if(Oe(n)){if(Ne(n))return ye(X(t)),yt(h(n,se),h(n,j));if(fe(n)){let l=qt(h(n,De),h(n,ae));return ye(X(t)),yt(l.isoDate,h(n,j))}if(Te(n))return ye(X(t)),yt(h(n,Ie).isoDate,h(n,j));let s=zi(n);return yt(jn(s,Bt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{year:e,month:r,day:i,calendar:o,z:a}=un($e(n));if(a)throw new RangeError("Z designator not supported for PlainDate");return o||(o="iso8601"),o=Dt(o),ye(X(t)),yt({year:e,month:r,day:i},o)}function ji(n,t,e){return we(jn(n,t,e),Ho(t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond,e))}function ii(n,t){let e,r,i;if(Oe(n)){if(Te(n))return ye(X(t)),zt(h(n,Ie),h(n,j));if(fe(n)){let s=qt(h(n,De),h(n,ae));return ye(X(t)),zt(s,h(n,j))}if(Ne(n))return ye(X(t)),zt(we(h(n,se),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),h(n,j));i=zi(n);let o=Bt(i,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],[]),a=ye(X(t));({isoDate:e,time:r}=ji(i,o,a))}else{let o,a,s,l;if({year:a,month:s,day:l,time:r,calendar:i,z:o}=un($e(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}),js(a,s,l,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),i||(i="iso8601"),i=Dt(i),ye(X(t)),e={year:a,month:s,day:l}}return zt(we(e,r),i)}function Vt(n){let t=Ke("%Temporal.Duration%");if(Ae(n))return new t(h(n,ct),h(n,lt),h(n,_t),h(n,ut),h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt));if(!Oe(n))return function(i){let{years:o,months:a,weeks:s,days:l,hours:u,minutes:m,seconds:f,milliseconds:v,microseconds:E,nanoseconds:I}=function(P){let L=bh.exec(P);if(!L)throw new RangeError(`invalid duration: ${P}`);if(L.every((y,D)=>D<2||y===void 0))throw new RangeError(`invalid duration: ${P}`);let z=L[1]==="-"?-1:1,W=L[2]===void 0?0:ue(L[2])*z,K=L[3]===void 0?0:ue(L[3])*z,ne=L[4]===void 0?0:ue(L[4])*z,ie=L[5]===void 0?0:ue(L[5])*z,le=L[6]===void 0?0:ue(L[6])*z,Me=L[7],Ee=L[8],re=L[9],N=L[10],F=L[11],O=0,Q=0,g=0;if(Me!==void 0){if(Ee??re??N??F)throw new RangeError("only the smallest unit can be fractional");g=3600*ue((Me+"000000000").slice(0,9))*z}else if(O=Ee===void 0?0:ue(Ee)*z,re!==void 0){if(N??F)throw new RangeError("only the smallest unit can be fractional");g=60*ue((re+"000000000").slice(0,9))*z}else Q=N===void 0?0:ue(N)*z,F!==void 0&&(g=ue((F+"000000000").slice(0,9))*z);let A=g%1e3,c=Math.trunc(g/1e3)%1e3,d=Math.trunc(g/1e6)%1e3;return Q+=Math.trunc(g/1e9)%60,O+=Math.trunc(g/6e10),zo(W,K,ne,ie,le,O,Q,d,c,A),{years:W,months:K,weeks:ne,days:ie,hours:le,minutes:O,seconds:Q,milliseconds:d,microseconds:c,nanoseconds:A}}(i);return new(Ke("%Temporal.Duration%"))(o,a,s,l,u,m,f,v,E,I)}($e(n));let e={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0},r=jl(n);for(let i=0;i<bo.length;i++){let o=bo[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 oi(n){let t;if(Oe(n)){if(Ve(n)||fe(n))return Jt(h(n,ae));t=ts(n)}else t=n;let{year:e,month:r,day:i,time:o,offset:a,z:s}=function(P){let L=un(P);if(!L.z&&!L.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return L}($e(t)),{hour:l=0,minute:u=0,second:m=0,millisecond:f=0,microsecond:v=0,nanosecond:E=0}=o==="start-of-day"?{}:o,I=Di(e,r,i,l,u,m,f,v,E-(s?0:Yr(a)));return kr(I.isoDate),Jt(We(I))}function Vc(n,t){if(Oe(n)){if(Ot(n))return ye(X(t)),Mr(h(n,se),h(n,j));let s;return bt(n,j)?s=h(n,j):(s=n.calendar,s===void 0&&(s="iso8601"),s=$i(s)),Mr(Eo(s,Bt(s,n,["year","month","monthCode","day"],[],[]),ye(X(t))),s)}let{month:e,day:r,referenceISOYear:i,calendar:o}=Os($e(n));if(o===void 0&&(o="iso8601"),o=Dt(o),ye(X(t)),o==="iso8601")return Mr({year:1972,month:e,day:r},o);let a={year:i,month:e,day:r};return ur(a),a=Eo(o,wt(o,a,"month-day"),"constrain"),Mr(a,o)}function Ln(n,t){let e;if(Oe(n)){if(Ye(n))return ye(X(t)),vn(h(n,Le));if(Te(n))return ye(X(t)),vn(h(n,Ie).time);if(fe(n)){let u=qt(h(n,De),h(n,ae));return ye(X(t)),vn(u.time)}let{hour:r,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:l}=rs(n);e=Ho(r,i,o,a,s,l,ye(X(t)))}else e=Ol($e(n)),ye(X(t));return vn(e)}function Bl(n){return n===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:h(Ln(n),Le)}function ai(n,t){if(Oe(n)){if(qe(n))return ye(X(t)),Sr(h(n,se),h(n,j));let s=zi(n);return Sr(vi(s,Bt(s,n,["year","month","monthCode"],[],[]),ye(X(t))),s)}let{year:e,month:r,referenceISODay:i,calendar:o}=Ls($e(n));o===void 0&&(o="iso8601"),o=Dt(o),ye(X(t));let a={year:e,month:r,day:i};return Bs(a),a=vi(o,wt(o,a,"year-month"),"constrain"),Sr(a,o)}function Do(n,t,e,r,i,o,a,s){if(t==="start-of-day")return An(i,n);let l=we(n,t);if(e==="wall"||a==="ignore")return Qe(i,l,o);if(e==="exact"||a==="use"){let f=Di(n.year,n.month,n.day,t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond-r);kr(f.isoDate);let v=We(f);return cn(v),v}kr(n);let u=We(l),m=wi(i,l);for(let f=0;f<m.length;f++){let v=m[f],E=S.default.toNumber(S.default.subtract(u,v)),I=On(E,6e10,"halfExpand");if(E===r||s&&I===r)return v}if(a==="reject"){let f=is(r),v=bi(l,"iso8601","auto");throw new RangeError(`Offset ${f} is invalid for ${v} in ${i}`)}return Gl(m,i,l,o)}function si(n,t){let e,r,i,o,a,s,l,u=!1,m="option";if(Oe(n)){if(fe(n)){let P=X(t);return mi(P),go(P,"reject"),ye(P),Je(h(n,ae),h(n,De),h(n,j))}a=zi(n);let v=Bt(a,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],["timeZone"]);({offset:o,timeZone:i}=v),o===void 0&&(m="wall");let E=X(t);s=mi(E),l=go(E,"reject");let I=ye(E);({isoDate:e,time:r}=ji(a,v,I))}else{let v,E,I,P,L;({year:I,month:P,day:L,time:r,tzAnnotation:v,offset:o,z:E,calendar:a}=function(W){let K=un(W);if(!K.tzAnnotation)throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");return K}($e(n))),i=vt(v),E?m="exact":o||(m="wall"),a||(a="iso8601"),a=Dt(a),u=!0;let z=X(t);s=mi(z),l=go(z,"reject"),ye(z),e={year:I,month:P,day:L}}let f=0;return m==="option"&&(f=Yr(o)),Je(Do(e,r,m,f,i,s,l,u),i,a)}function $l(n,t,e){ur(t),kn(n),me(n,se,t),me(n,j,e),me(n,wl,!0)}function yt(n,t){let e=Ke("%Temporal.PlainDate%"),r=Object.create(e.prototype);return $l(r,n,t),r}function zl(n,t,e){ir(t),kn(n),me(n,Ie,t),me(n,j,e)}function zt(n,t){let e=Ke("%Temporal.PlainDateTime%"),r=Object.create(e.prototype);return zl(r,n,t),r}function Ul(n,t,e){ur(t),kn(n),me(n,se,t),me(n,j,e),me(n,Dl,!0)}function Mr(n,t){let e=Ke("%Temporal.PlainMonthDay%"),r=Object.create(e.prototype);return Ul(r,n,t),r}function Vl(n,t){kn(n),me(n,Le,t)}function vn(n){let t=Ke("%Temporal.PlainTime%"),e=Object.create(t.prototype);return Vl(e,n),e}function ql(n,t,e){Bs(t),kn(n),me(n,se,t),me(n,j,e),me(n,bl,!0)}function Sr(n,t){let e=Ke("%Temporal.PlainYearMonth%"),r=Object.create(e.prototype);return ql(r,n,t),r}function Wl(n,t){cn(t),kn(n),me(n,ae,t)}function Jt(n){let t=Ke("%Temporal.Instant%"),e=Object.create(t.prototype);return Wl(e,n),e}function Kl(n,t,e,r){cn(t),kn(n),me(n,ae,t),me(n,De,e),me(n,j,r)}function Je(n,t,e="iso8601"){let r=Ke("%Temporal.ZonedDateTime%"),i=Object.create(r.prototype);return Kl(i,n,t,e),i}function qc(n){return ns.filter(t=>n[t]!==void 0)}function nr(n,t,e){let r=qc(e),i=$n(n).fieldKeysToIgnore(r),o=Object.create(null),a=qc(t);for(let s=0;s<ns.length;s++){let l,u=ns[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 Ht(n,t,e,r){let i=$n(n).dateAdd(t,e,r);return ur(i),i}function Bi(n,t,e,r){return $n(n).dateUntil(t,e,r)}function $i(n){if(Oe(n)&&bt(n,j))return h(n,j);let t=$e(n);try{return Dt(t)}catch{}let e;try{({calendar:e}=un(t))}catch{try{({calendar:e}=Ol(t))}catch{try{({calendar:e}=Ls(t))}catch{({calendar:e}=Os(t))}}}return e||(e="iso8601"),Dt(e)}function zi(n){if(bt(n,j))return h(n,j);let{calendar:t}=n;return t===void 0?"iso8601":$i(t)}function sn(n,t){return Dt(n)===Dt(t)}function jn(n,t,e){let r=$n(n);r.resolveFields(t,"date");let i=r.dateToISO(t,e);return ur(i),i}function vi(n,t,e){let r=$n(n);r.resolveFields(t,"year-month"),t.day=1;let i=r.dateToISO(t,e);return Bs(i),i}function Eo(n,t,e){let r=$n(n);r.resolveFields(t,"month-day");let i=r.monthDayToISOReferenceDate(t,e);return ur(i),i}function vt(n){if(Oe(n)&&fe(n))return h(n,De);let t=$e(n);if(t==="UTC")return"UTC";let{tzName:e,offsetMinutes:r}=function(o){let{tzAnnotation:a,offset:s,z:l}=function(u){if(Yl.test(u))return{tzAnnotation:u,offset:void 0,z:!1};try{let{tzAnnotation:m,offset:f,z:v}=un(u);if(v||m||f)return{tzAnnotation:m,offset:f,z:v}}catch{}Hl(u)}(o);return a?Yn(a):l?Yn("UTC"):s?Yn(s):void 0}(t);if(r!==void 0)return Ys(r);let i=_o(e);if(!i)throw new RangeError(`Unrecognized time zone ${e}`);return i.identifier}function Zl(n,t){if(n===t)return!0;let e=Yn(n).offsetMinutes,r=Yn(t).offsetMinutes;if(e===void 0&&r===void 0){let i=_o(t);if(!i)return!1;let o=_o(n);return!!o&&o.primaryIdentifier===i.primaryIdentifier}return e===r}function wn(n,t){let e=Yn(n).offsetMinutes;return e!==void 0?6e10*e:os(n,t)}function is(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}${jo(r,i,o,a,o===0&&a===0?"minute":"auto")}`}function qt(n,t){let e=wn(n,t),{isoDate:{year:r,month:i,day:o},time:{hour:a,minute:s,second:l,millisecond:u,microsecond:m,nanosecond:f}}=Ql(t);return Di(r,i,o,a,s,l,u,m,f+e)}function Qe(n,t,e){return Gl(wi(n,t),n,t,e)}function Gl(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=We(e),a=S.default.subtract(o,Fn);cn(a);let s=wn(t,a),l=S.default.add(o,Fn);cn(l);let u=wn(t,l)-s;switch(r){case"earlier":{let m=_e.fromComponents(0,0,0,0,0,-u),f=xr(e.time,m);return wi(t,we(Tt(e.isoDate.year,e.isoDate.month,e.isoDate.day+f.deltaDays),f))[0]}case"compatible":case"later":{let m=_e.fromComponents(0,0,0,0,0,u),f=xr(e.time,m),v=wi(t,we(Tt(e.isoDate.year,e.isoDate.month,e.isoDate.day+f.deltaDays),f));return v[v.length-1]}}}function wi(n,t){if(n==="UTC")return kr(t.isoDate),[We(t)];let e=Yn(n).offsetMinutes;if(e!==void 0){let r=Di(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);kr(r.isoDate);let i=We(r);return cn(i),[i]}return kr(t.isoDate),function(r,i){let o=We(i),a=S.default.subtract(o,Fn);S.default.lessThan(a,gi)&&(a=o);let s=S.default.add(o,Fn);S.default.greaterThan(s,Cr)&&(s=o);let l=os(r,a),u=os(r,s);return(l===u?[l]:[l,u]).map(f=>{let v=S.default.subtract(o,S.default.BigInt(f)),E=function(I,P){let{epochMilliseconds:L,time:{millisecond:z,microsecond:W,nanosecond:K}}=Ql(P),{year:ne,month:ie,day:le,hour:Me,minute:Ee,second:re}=eu(I,L);return Di(ne,ie,le,Me,Ee,re,z,W,K)}(r,v);if(Rr(i,E)===0)return cn(v),v}).filter(f=>f!==void 0)}(n,t)}function An(n,t){let e=we(t,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=wi(n,e);if(r.length)return r[0];let i=We(e),o=S.default.subtract(i,Fn);return cn(o),Hs(n,o)}function Ui(n){let t;return t=n<0||n>9999?(n<0?"-":"+")+yi(Math.abs(n),6):yi(n,4),t}function jt(n){return yi(n,2)}function Jl(n,t){let e;if(t==="auto"){if(n===0)return"";e=yi(n,9).replace(/0+$/,"")}else{if(t===0)return"";e=yi(n,9).slice(0,t)}return`.${e}`}function jo(n,t,e,r,i){let o=`${jt(n)}:${jt(t)}`;return i==="minute"||(o+=`:${jt(e)}`,o+=Jl(r,i)),o}function Wc(n,t,e){let r=t;r===void 0&&(r="UTC");let i=h(n,ae),o=bi(qt(r,i),"iso8601",e,"never"),a="Z";return t!==void 0&&(a=Xl(wn(r,i))),`${o}${a}`}function po(n,t){let e=h(n,ct),r=h(n,lt),i=h(n,_t),o=h(n,ut),a=h(n,dt),s=h(n,ht),l=So(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 m="";a!==0&&(m+=`${Math.abs(a)}H`),s!==0&&(m+=`${Math.abs(s)}M`);let f=_e.fromComponents(0,0,h(n,mt),h(n,ft),h(n,pt),h(n,Mt));f.isZero()&&!["second","millisecond","microsecond","nanosecond"].includes(gn(n))&&t==="auto"||(m+=`${Math.abs(f.sec)}${Jl(Math.abs(f.subsec),t)}S`);let v=`${l<0?"-":""}P${u}`;return m&&(v=`${v}T${m}`),v}function Kc(n,t="auto"){let{year:e,month:r,day:i}=h(n,se);return`${Ui(e)}-${jt(r)}-${jt(i)}${Li(h(n,j),t)}`}function Zc({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){return jo(n,t,e,1e6*r+1e3*i+o,a)}function bi(n,t,e,r="auto"){let{isoDate:{year:i,month:o,day:a},time:{hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v}}=n;return`${Ui(i)}-${jt(o)}-${jt(a)}T${jo(s,l,u,1e6*m+1e3*f+v,e)}${Li(t,r)}`}function Gc(n,t="auto"){let{year:e,month:r,day:i}=h(n,se),o=`${jt(r)}-${jt(i)}`,a=h(n,j);t!=="always"&&t!=="critical"&&a==="iso8601"||(o=`${Ui(e)}-${o}`);let s=Li(a,t);return s&&(o+=s),o}function Jc(n,t="auto"){let{year:e,month:r,day:i}=h(n,se),o=`${Ui(e)}-${jt(r)}`,a=h(n,j);t!=="always"&&t!=="critical"&&a==="iso8601"||(o+=`-${jt(i)}`);let s=Li(a,t);return s&&(o+=s),o}function Xc(n,t,e="auto",r="auto",i="auto",o=void 0){let a=h(n,ae);if(o){let{unit:m,increment:f,roundingMode:v}=o;a=ls(a,f,m,v)}let s=h(n,De),l=wn(s,a),u=bi(qt(s,a),"iso8601",t,"never");return i!=="never"&&(u+=Xl(l)),r!=="never"&&(u+=`[${r==="critical"?"!":""}${s}]`),u+=Li(h(n,j),e),u}function Qc(n){return Fl.test(n)}function Yr(n){let t=Ah.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 Xr,xh=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function _o(n){if(Xr===void 0){let o=Intl.supportedValuesOf?.("timeZone");if(o){Xr=new Map;for(let a=0;a<o.length;a++){let s=o[a];Xr.set(Ei(s),s)}}else Xr=null}let t=Ei(n),e=Xr?.get(t);if(e)return{identifier:e,primaryIdentifier:e};try{e=Ll(n).resolvedOptions().timeZone}catch{return}if(t==="antarctica/south_pole"&&(e="Antarctica/McMurdo"),kh.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||xh[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 er(n,t){let{year:e,month:r,day:i,hour:o,minute:a,second:s}=eu(n,t),l=t%1e3;return l<0&&(l+=1e3),1e6*(Fs({isoDate:{year:e,month:r,day:i},time:{hour:o,minute:a,second:s,millisecond:l}})-t)}function os(n,t){return er(n,Wt(t,"floor"))}function Ys(n){let t=n<0?"-":"+",e=Math.abs(n);return`${t}${jo(Math.floor(e/60),e%60,0,0,"minute")}`}function Xl(n){return Ys(On(n,Dh,"halfExpand")/6e10)}function Fs({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()+Mh*l}function We(n){let t=Fs(n),e=1e3*n.time.microsecond+n.time.nanosecond;return S.default.add(Xt(t),S.default.BigInt(e))}function Ql(n){let t=Wt(n,"trunc"),e=S.default.toNumber(S.default.remainder(n,Ai));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 Hs(n,t){if(n==="UTC")return null;let e=Wt(t,"floor");if(e<ui)return Hs(n,Xt(ui));let r=Date.now(),i=Math.max(e,r)+366*Hn*3,o=e,a=er(n,o),s=o,l=a;for(;a===l&&o<i;){if(s=o+2*Hn*7,s>Nl)return null;l=er(n,s),a===l&&(o=s)}return a===l?null:Xt(uu(u=>er(n,u),o,s,a,l))}function as(n,t){if(n==="UTC")return null;let e=Wt(t,"ceil"),r=Date.now(),i=r+366*Hn*3;if(e>i){let u=as(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 as(n,Xt(u))}let o=e-1;if(o<ui)return null;let a=er(n,o),s=o,l=a;for(;a===l&&o>ui;){if(s=o-2*Hn*7,s<ui)return null;l=er(n,s),a===l&&(o=s)}return a===l?null:Xt(uu(u=>er(n,u),s,o,l,a))}function eu(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],m=+r[6];if(!(Number.isFinite(a)&&Number.isFinite(i)&&Number.isFinite(o)&&Number.isFinite(l)&&Number.isFinite(u)&&Number.isFinite(m)))throw new RangeError(`Invalid number in "${e}`);return{year:a,month:i,day:o,hour:l,minute:u,second:m}}(Ll(n).format(t))}function Mo(n){return n!==void 0&&!(n%4!=0||n%100==0&&n%400!=0)}function tr(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]}[Mo(n)?"leapyear":"standard"][t-1]}function So(n){let t=[h(n,ct),h(n,lt),h(n,_t),h(n,ut),h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt)];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 tu(n){let t=Bo(n.date);return t!==0?t:n.time.sign()}function Qn(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 Tt(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}=Qn(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=Mo(l)?366:365,o<-s;)r-=1,l-=1,o+=s;for(l+=1;s=Mo(l)?366:365,o>s;)r+=1,l+=1,o-=s;for(;o<1;)({year:r,month:i}=Qn(r,i-1)),o+=tr(r,i);for(;o>tr(r,i);)o-=tr(r,i),{year:r,month:i}=Qn(r,i+1);return{year:r,month:i,day:o}}function Di(n,t,e,r,i,o,a,s,l){let u=Nn(r,i,o,a,s,l);return we(Tt(n,t,e+u.deltaDays),u)}function Nn(n,t,e,r,i,o){let a,s=n,l=t,u=e,m=r,f=i,v=o;({div:a,mod:v}=_r(v,3)),f+=a,v<0&&(f-=1,v+=1e3),{div:a,mod:f}=_r(f,3),m+=a,f<0&&(m-=1,f+=1e3),u+=Math.trunc(m/1e3),m%=1e3,m<0&&(u-=1,m+=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,m+=0,f+=0,v+=0,{deltaDays:E,hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v}}function el(n,t){let e=Xe(n,0);if(Bo(e)===0)return n.days;let r=h(t,se),i=Ht(h(t,j),r,e,"constrain"),o=or(r.year,r.month-1,r.day),a=or(i.year,i.month-1,i.day)-o;return n.days+a}function Ct(n){return new(Ke("%Temporal.Duration%"))(-h(n,ct),-h(n,lt),-h(n,_t),-h(n,ut),-h(n,dt),-h(n,ht),-h(n,mt),-h(n,ft),-h(n,pt),-h(n,Mt))}function gt(n,t,e){return Math.min(e,Math.max(t,n))}function nu(n,t,e){let r=gt(t,1,12);return{year:n,month:r,day:gt(e,1,tr(n,r))}}function ze(n,t,e){if(n<t||n>e)throw new RangeError(`value out of range: ${t} <= ${n} <= ${e}`)}function rr(n,t,e){ze(t,1,12),ze(e,1,tr(n,t))}function ur(n){ir(we(n,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function $o(n,t,e,r,i,o){ze(n,0,23),ze(t,0,59),ze(e,0,59),ze(r,0,999),ze(i,0,999),ze(o,0,999)}function js(n,t,e,r,i,o,a,s,l){rr(n,t,e),$o(r,i,o,a,s,l)}function ir(n){let t=We(n);(S.default.lessThan(t,Eh)||S.default.greaterThan(t,_h))&&cn(t)}function ss(n){We(n)}function cn(n){if(S.default.lessThan(n,gi)||S.default.greaterThan(n,Cr))throw new RangeError("date/time value is outside of supported range")}function Bs({year:n,month:t}){ze(n,jc,Bc),n===jc?ze(t,4,12):n===Bc&&ze(t,1,9)}function zo(n,t,e,r,i,o,a,s,l,u){let m=0,f=[n,t,e,r,i,o,a,s,l,u];for(let z=0;z<f.length;z++){let W=f[z];if(W===1/0||W===-1/0)throw new RangeError("infinite values not allowed as duration fields");if(W!==0){let K=W<0?-1:1;if(m!==0&&K!==m)throw new RangeError("mixed-sign values not allowed as duration fields");m=K}}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 v=_r(s,3),E=_r(l,6),I=_r(u,9),P=_r(1e6*v.mod+1e3*E.mod+I.mod,9).div,L=86400*r+3600*i+60*o+a+v.div+E.div+I.div+P;if(!Number.isSafeInteger(L))throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s")}function Er(n){return{date:{years:h(n,ct),months:h(n,lt),weeks:h(n,_t),days:h(n,ut)},time:_e.fromComponents(h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt))}}function on(n){let t=_e.fromComponents(h(n,dt),h(n,ht),h(n,mt),h(n,ft),h(n,pt),h(n,Mt)).add24HourDays(h(n,ut));return{date:{years:h(n,ct),months:h(n,lt),weeks:h(n,_t),days:0},time:t}}function ru(n){let t=on(n),e=Math.trunc(t.time.sec/86400);return zo(t.date.years,t.date.months,t.date.weeks,e,0,0,0,0,0,0),{...t.date,days:e}}function Ut(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=za(a,3,Math.trunc(i/1e3)),i%=1e3,a=0;break;case"microsecond":i=za(a,6,Math.trunc(r/1e3)),r%=1e3,a=0;break;case"nanosecond":r=za(a,9,r),a=0}return new(Ke("%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 Dn(n,t){return Bo(n),t.sign(),{date:n,time:t}}function or(n,t,e){return Fs({isoDate:{year:n,month:t+1,day:e},time:{hour:0,minute:0,second:0,millisecond:0}})/Hn}function kr({year:n,month:t,day:e}){if(Math.abs(or(n,t-1,e))>1e8)throw new RangeError("date/time value is outside the supported range")}function $s(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 zs(n,t,e,r,i){let o=_e.fromEpochNsDiff(t,n);return o=ko(o,e,r,i),Dn({years:0,months:0,weeks:0,days:0},o)}function iu(n,t,e,r){ss(n),ss(t);let i=$s(n.time,t.time),o=i.sign(),a=ln(n.isoDate,t.isoDate),s=t.isoDate;a===o&&(s=Tt(s.year,s.month,s.day+o),i=i.add24HourDays(-o));let l=bn("day",r),u=Bi(e,n.isoDate,s,l);return r!==l&&(i=i.add24HourDays(u.days),u.days=0),Dn(u,i)}function ou(n,t,e,r,i){let o=S.default.subtract(t,n);if(S.default.equal(o,Yt))return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};let a=S.default.lessThan(o,Yt)?-1:1,s=qt(e,n),l=qt(e,t),u,m=0,f=a===1?2:1,v=$s(s.time,l.time);for(v.sign()===-a&&m++;m<=f;m++){u=we(Tt(l.isoDate.year,l.isoDate.month,l.isoDate.day-m*a),s.time);let I=Qe(e,u,"compatible");if(v=_e.fromEpochNsDiff(t,I),v.sign()!==-a)break}let E=bn("day",i);return Dn(Bi(r,s.isoDate,u.isoDate,E),v)}function au(n,t,e,r,i,o,a,s,l){let u,m,f,v,E=t;switch(s){case"year":{let O=On(E.date.years,a,"trunc");u=O,m=O+a*n,f={years:u,months:0,weeks:0,days:0},v={...f,years:m};break}case"month":{let O=On(E.date.months,a,"trunc");u=O,m=O+a*n,f=Xe(E.date,0,0,u),v=Xe(E.date,0,0,m);break}case"week":{let O=Xe(E.date,0,0),Q=Ht(o,r.isoDate,O,"constrain"),g=Bi(o,Q,Tt(Q.year,Q.month,Q.day+E.date.days),"week"),A=On(E.date.weeks+g.weeks,a,"trunc");u=A,m=A+a*n,f=Xe(E.date,0,u),v=Xe(E.date,0,m);break}case"day":{let O=On(E.date.days,a,"trunc");u=O,m=O+a*n,f=Xe(E.date,u),v=Xe(E.date,m);break}}let I=Ht(o,r.isoDate,f,"constrain"),P=Ht(o,r.isoDate,v,"constrain"),L,z,W=we(I,r.time),K=we(P,r.time);i?(L=Qe(i,W,"compatible"),z=Qe(i,K,"compatible")):(L=We(W),z=We(K));let ne=_e.fromEpochNsDiff(e,L),ie=_e.fromEpochNsDiff(z,L),le=No(l,n<0?"negative":"positive"),Me=ne.add(ne).abs().subtract(ie.abs()).sign(),Ee=Math.abs(u)/a%2==0,re=ne.isZero()?Math.abs(u):ne.cmp(ie)?Lo(Math.abs(u),Math.abs(m),Me,Ee,le):Math.abs(m),N=new _e(S.default.add(S.default.multiply(ie.totalNs,S.default.BigInt(u)),S.default.multiply(ne.totalNs,S.default.BigInt(a*n)))).fdiv(ie.totalNs),F=re===Math.abs(m);return E={date:F?v:f,time:_e.ZERO},{nudgeResult:{duration:E,nudgedEpochNs:F?z:L,didExpandCalendarUnit:F},total:N}}function Uo(n,t,e,r,i,o,a,s,l){let u=n,m=nn(s)||r&&s==="day",f=tu(u)<0?-1:1,v;return m?{nudgeResult:v}=au(f,u,t,e,r,i,a,s,l):v=r?function(E,I,P,L,z,W,K,ne){let ie=I,le=Ht(z,P.isoDate,ie.date,"constrain"),Me=we(le,P.time),Ee=we(Tt(le.year,le.month,le.day+E),P.time),re=Qe(L,Me,"compatible"),N=Qe(L,Ee,"compatible"),F=_e.fromEpochNsDiff(N,re);if(F.sign()!==E)throw new RangeError("time zone returned inconsistent Instants");let O=S.default.BigInt(Ir[K]*W),Q=ie.time.round(O,ne),g=Q.subtract(F),A=g.sign()!==-E,c,d;return A?(c=E,Q=g.round(O,ne),d=Q.addToEpochNs(N)):(c=0,d=Q.addToEpochNs(re)),{duration:Dn(Xe(ie.date,ie.date.days+c),Q),nudgedEpochNs:d,didExpandCalendarUnit:A}}(f,u,e,r,i,a,s,l):function(E,I,P,L,z,W){let K=E,ne=K.time.add24HourDays(K.date.days),ie=ne.round(S.default.BigInt(L*Ir[z]),W),le=ie.subtract(ne),{quotient:Me}=ne.divmod(wo),{quotient:Ee}=ie.divmod(wo),re=Math.sign(Ee-Me)===ne.sign(),N=le.addToEpochNs(I),F=0,O=ie;return yn(P)==="date"&&(F=Ee,O=ie.add(_e.fromComponents(24*-Ee,0,0,0,0,0))),{duration:{date:Xe(K.date,F),time:O},nudgedEpochNs:N,didExpandCalendarUnit:re}}(u,t,o,a,s,l),u=v.duration,v.didExpandCalendarUnit&&s!=="week"&&(u=function(E,I,P,L,z,W,K,ne){let ie=I;if(ne===K)return ie;let le=di.indexOf(K);for(let Me=di.indexOf(ne)-1;Me>=le;Me--){let Ee=di[Me];if(Ee==="week"&&K!=="week")continue;let re;switch(Ee){case"year":re={years:ie.date.years+E,months:0,weeks:0,days:0};break;case"month":{let O=ie.date.months+E;re=Xe(ie.date,0,0,O);break}case"week":{let O=ie.date.weeks+E;re=Xe(ie.date,0,O);break}}let N=we(Ht(W,L.isoDate,re,"constrain"),L.time),F;if(F=z?Qe(z,N,"compatible"):We(N),yo(P,F)===-E)break;ie={date:re,time:_e.ZERO}}return ie}(f,u,v.nudgedEpochNs,e,r,i,o,bn(s,"day"))),u}function tl(n,t,e,r,i,o){return nn(o)||r&&o==="day"?au(tu(n)<0?-1:1,n,t,e,r,i,1,o,"trunc").total:fi(n.time.add24HourDays(n.date.days),o)}function su(n,t,e,r,i,o,a){if(Rr(n,t)==0)return{date:{years:0,months:0,weeks:0,days:0},time:_e.ZERO};ir(n),ir(t);let s=iu(n,t,e,r);return o==="nanosecond"&&i===1?s:Uo(s,We(t),n,null,e,r,i,o,a)}function cu(n,t,e,r,i,o,a,s){if(yn(i)==="time")return zs(n,t,o,a,s);let l=ou(n,t,e,r,i);return a==="nanosecond"&&o===1?l:Uo(l,t,qt(e,n),e,r,i,o,a,s)}function Fr(n,t,e,r,i,o){let a=Pr.reduce((E,I)=>{let P=I[0],L=I[1],z=I[2];return e!=="datetime"&&z!==e||r.includes(L)||E.push(L,P),E},[]),s=kt(t,"largestUnit",e,"auto");if(r.includes(s))throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);let l=Lr(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 m=kt(t,"smallestUnit",e,i);if(r.includes(m))throw new RangeError(`smallestUnit must be one of ${a.join(", ")}, not ${m}`);let f=bn(o,m);if(s==="auto"&&(s=f),bn(s,m)!==s)throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${m}`);let v={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[m];return v!==void 0&&Or(l,v,!1),{largestUnit:s,roundingIncrement:l,roundingMode:u,smallestUnit:m}}function nl(n,t,e,r){let i=oi(e),o=Fr(n,X(r),"time",[],"nanosecond","second"),a=Ut(zs(h(t,ae),h(i,ae),o.roundingIncrement,o.smallestUnit,o.roundingMode),o.largestUnit);return n==="since"&&(a=Ct(a)),a}function rl(n,t,e,r){let i=ri(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Fr(n,X(r),"date",[],"day","day"),l=Ke("%Temporal.Duration%"),u=h(t,se),m=h(i,se);if(ln(u,m)===0)return new l;let f={date:Bi(o,u,m,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});f=Uo(f,We(we(m,{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 v=Ut(f,"day");return n==="since"&&(v=Ct(v)),v}function il(n,t,e,r){let i=ii(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Fr(n,X(r),"datetime",[],"nanosecond","day"),l=Ke("%Temporal.Duration%"),u=h(t,Ie),m=h(i,Ie);if(Rr(u,m)===0)return new l;let f=Ut(su(u,m,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return n==="since"&&(f=Ct(f)),f}function ol(n,t,e,r){let i=Ln(e),o=Fr(n,X(r),"time",[],"nanosecond","hour"),a=$s(h(t,Le),h(i,Le));a=ko(a,o.roundingIncrement,o.smallestUnit,o.roundingMode);let s=Ut(Dn({years:0,months:0,weeks:0,days:0},a),o.largestUnit);return n==="since"&&(s=Ct(s)),s}function al(n,t,e,r){let i=ai(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between months of ${o} and ${a} calendars`);let s=Fr(n,X(r),"date",["week","day"],"month","year"),l=Ke("%Temporal.Duration%");if(ln(h(t,se),h(i,se))==0)return new l;let u=wt(o,h(t,se),"year-month");u.day=1;let m=jn(o,u,"constrain"),f=wt(o,h(i,se),"year-month");f.day=1;let v=jn(o,f,"constrain"),E={date:Xe(Bi(o,m,v,s.largestUnit),0,0),time:_e.ZERO};if(s.smallestUnit!=="month"||s.roundingIncrement!==1){let P=we(m,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});E=Uo(E,We(we(v,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),P,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let I=Ut(E,"day");return n==="since"&&(I=Ct(I)),I}function sl(n,t,e,r){let i=si(e),o=h(t,j),a=h(i,j);if(!sn(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Fr(n,X(r),"datetime",[],"nanosecond","hour"),l=h(t,ae),u=h(i,ae),m=Ke("%Temporal.Duration%"),f;if(yn(s.largestUnit)!=="date")f=Ut(zs(l,u,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{let v=h(t,De);if(!Zl(v,h(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 m;f=Ut(cu(l,u,v,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),"hour")}return n==="since"&&(f=Ct(f)),f}function xr({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 cs(n,t){let e=t.addToEpochNs(n);return cn(e),e}function ci(n,t,e,r,i="constrain"){if(Bo(r.date)===0)return cs(n,r.time);let o=qt(t,n);return cs(Qe(t,we(Ht(e,o.isoDate,r.date,i),o.time),"compatible"),r.time)}function cl(n,t,e){let r=Vt(e);n==="subtract"&&(r=Ct(r));let i=bn(gn(t),gn(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 Ut(Dn({years:0,months:0,weeks:0,days:0},o.time.add(a.time)),i)}function ll(n,t,e){let r=Vt(e);n==="subtract"&&(r=Ct(r));let i=gn(r);if(yn(i)==="date")throw new RangeError(`Duration field ${i} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);let o=on(r);return Jt(cs(h(t,ae),o.time))}function ul(n,t,e,r){let i=h(t,j),o=Vt(e);n==="subtract"&&(o=Ct(o));let a=ru(o),s=ye(X(r));return yt(Ht(i,h(t,se),a,s),i)}function dl(n,t,e,r){let i=Vt(e);n==="subtract"&&(i=Ct(i));let o=ye(X(r)),a=h(t,j),s=on(i),l=h(t,Ie),u=xr(l.time,s.time),m=Xe(s.date,u.deltaDays);return zo(m.years,m.months,m.weeks,m.days,0,0,0,0,0,0),zt(we(Ht(a,l.isoDate,m,o),u),a)}function hl(n,t,e){let r=Vt(e);n==="subtract"&&(r=Ct(r));let i=on(r),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:m}=xr(h(t,Le),i.time);return vn(Ho(o,a,s,l,u,m,"reject"))}function ml(n,t,e,r){let i=Vt(e);n==="subtract"&&(i=Ct(i));let o=ye(X(r)),a=So(i),s=h(t,j),l=wt(s,h(t,se),"year-month");l.day=1;let u=jn(s,l,"constrain");if(a<0){let f=Ht(s,u,{months:1},"constrain");u=Tt(f.year,f.month,f.day-1)}let m=ru(i);return ur(u),Sr(vi(s,wt(s,Ht(s,u,m,o),"year-month"),o),s)}function fl(n,t,e,r){let i=Vt(e);n==="subtract"&&(i=Ct(i));let o=ye(X(r)),a=h(t,De),s=h(t,j),l=Er(i);return Je(ci(h(t,ae),a,s,l,o),a,s)}function On(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=St(Math.abs(2*i)-t),u=a%2==0,m=No(e,o),f=i===0?a:Lo(a,s,l,u,m);return t*(o==="positive"?f:-f)}function ls(n,t,e,r){let i=Ir[e]*t;return function(o,a,s){let l=pn(o),u=pn(a),m=S.default.divide(l,u),f=S.default.remainder(l,u),v=No(s,"positive"),E,I;S.default.lessThan(l,Yt)?(E=S.default.subtract(m,pi),I=m):(E=m,I=S.default.add(m,pi));let P=yo(Xn(S.default.multiply(f,Ns)),u)*(S.default.lessThan(l,Yt)?-1:1)+0,L=S.default.equal(f,Yt)?m:Lo(E,I,P,vl(E),v);return S.default.multiply(L,u)}(n,S.default.BigInt(i),r)}function us(n,t,e,r){ss(n);let{year:i,month:o,day:a}=n.isoDate,s=ds(n.time,t,e,r);return we(Tt(i,o,a+s.deltaDays),s)}function ds({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 m=Ir[s],f=On(u,m*a,l)/m;switch(s){case"day":return{deltaDays:f,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case"hour":return Nn(f,0,0,0,0,0);case"minute":return Nn(n,f,0,0,0,0);case"second":return Nn(n,t,f,0,0,0);case"millisecond":return Nn(n,t,e,f,0,0);case"microsecond":return Nn(n,t,e,r,f,0);case"nanosecond":return Nn(n,t,e,r,i,f);default:throw new Error(`Invalid unit ${s}`)}}function ko(n,t,e,r){let i=Ir[e];return n.round(S.default.BigInt(i*t),r)}function fi(n,t){let e=Ir[t];return n.fdiv(S.default.BigInt(e))}function ln(n,t){return n.year!==t.year?St(n.year-t.year):n.month!==t.month?St(n.month-t.month):n.day!==t.day?St(n.day-t.day):0}function hs(n,t){return n.hour!==t.hour?St(n.hour-t.hour):n.minute!==t.minute?St(n.minute-t.minute):n.second!==t.second?St(n.second-t.second):n.millisecond!==t.millisecond?St(n.millisecond-t.millisecond):n.microsecond!==t.microsecond?St(n.microsecond-t.microsecond):n.nanosecond!==t.nanosecond?St(n.nanosecond-t.nanosecond):0}function Rr(n,t){let e=ln(n.isoDate,t.isoDate);return e!==0?e:hs(n.time,t.time)}function lu(n){let t=To(n);return globalThis.BigInt!==void 0?globalThis.BigInt(t.toString(10)):t}function Wt(n,t){let e=pn(n),{quotient:r,remainder:i}=ti(e,Ai),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),Ai)}function To(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 ms=(()=>{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,Ai),S.default.greaterThan(r,Cr)?Cr:S.default.lessThan(r,gi)?gi:r}})();function Qr(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function St(n){return n<0?-1:n>0?1:n}function X(n){if(n===void 0)return Object.create(null);if(Oe(n)&&n!==null)return n;throw new TypeError("Options parameter must be an object, not "+(n===null?"null":typeof n))}function ar(n,t){let e=Object.create(null);return e[n]=t,e}function En(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===Mn)throw new RangeError(`${t} option is required`);return r}function Dt(n){let t=Ei(n);if(!Sh.includes(Ei(t)))throw new RangeError(`invalid calendar identifier ${t}`);switch(t){case"ethiopic-amete-alem":return"ethioaa";case"islamicc":return"islamic-civil"}return t}function Ei(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 zn(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 Rh=new RegExp(`^${Rl.source}$`),Ah=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);function uu(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),m=n(u);m===s?(o=u,s=m):m===l&&(a=u,l=m)}return a}function du(n){return[...n]}function hu(n,t){if(n!=="gregory"&&n!=="iso8601")return;let e=Vi[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,m=(i-o+7001-s)%7,f=Math.floor((o-1+m)/7);if(7-m>=l&&++f,f==0)f=function(v,E,I,P){let L=(P-v-I+1)%7;L<0&&(L+=7);let z=Math.floor((I+L-1)/7);return 7-L>=E&&++z,z}(s,l,o+e.isoToDate(e.dateAdd(t,{years:-1},"constrain"),{daysInYear:!0}).daysInYear,i),r--;else if(o>=a-5){let v=(u+a-o)%7;v<0&&(v+=7),6-v>=l&&o+7-u>a&&(f=1,r++)}return{week:f,year:r}}function pl(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 Vi={};function sr(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 Us(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"&&ze(r,1,e),t==="constrain"&&(r=gt(r,1,e)),i=an(r)}else{let o=sr(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}}Vi.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,Us(n))},dateToISO:(n,t)=>hi(n.year,n.month,n.day,t),monthDayToISOReferenceDate(n,t){let{month:e,day:r}=hi(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}=Qn(a,s),{year:a,month:s,day:l}=hi(a,s,l,o),l+=i+7*r,Tt(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 m=t.year-n.year;for(m!==0&&(m-=r);!pl(r,n.year+m,n.month,n.day,t);)o=m,m+=r;let f=r;for(i=Qn(n.year+o,n.month+f);!pl(r,i.year,i.month,n.day,t);)a=f,f+=r,i=Qn(i.year,i.month+r);e==="month"&&(a+=12*o,o=0)}i=Qn(n.year+o,n.month+a);let s=nu(i.year,i.month,n.day),l=0,u=or(t.year,t.month-1,t.day)-or(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+=tr(n,a);i.dayOfYear=o}return r.weekOfYear&&(i.weekOfYear=hu("iso8601",{year:n,month:t,day:e})),r.daysInMonth&&(i.daysInMonth=tr(n,t)),(r.daysInYear||r.inLeapYear)&&(i.inLeapYear=Mo(n),i.daysInYear=i.inLeapYear?366:365),i},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};var Lt=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 mu({isoYear:n,isoMonth:t,isoDay:e}){return`${Ui(n)}-${jt(t)}-${jt(e)}T00:00Z`}function qa(n,t){return{years:n.year-t.year,months:n.month-t.month,days:n.day-t.day}}Lt.objectMap=new WeakMap,Lt.MAX_CACHE_ENTRIES=1e3;var Sn=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=mu({isoYear:r,isoMonth:i,isoDay:o}),u=this.getCalendarParts(l),m={};for(let v=0;v<u.length;v++){let{type:E,value:I}=u[v];if(E!=="year"&&E!=="relatedYear"||(this.hasEra?m.eraYear=+I:m.year=+I),E==="month"){let P=/^([0-9]*)(.*?)$/.exec(I);if(!P||P.length!=3||!P[1]&&!P[2])throw new RangeError(`Unexpected month: ${I}`);if(m.month=P[1]?+P[1]:1,m.month<1)throw new RangeError(`Invalid month ${I} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(m.month>13)throw new RangeError(`Invalid month ${I} from ${l}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);P[2]&&(m.monthExtra=P[2])}E==="day"&&(m.day=+I),this.hasEra&&E==="era"&&I!=null&&I!==""&&(m.era=I.split(" (")[0].normalize("NFD").replace(/[^-0-9 \p{L}]/gu,"").replace(/ /g,"-").toLowerCase())}if(this.hasEra&&m.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 v=this.eras.find(E=>m.era===E.genericName);v&&(m.era=v.code)}if(this.reviseIntlEra){let{era:v,eraYear:E}=this.reviseIntlEra(m,t);m.era=v,m.eraYear=E}this.checkIcuBugs&&this.checkIcuBugs(t);let f=this.adjustCalendarDate(m,e,"constrain",!0);if(f.year===void 0)throw new RangeError(`Missing year converting ${JSON.stringify(t)}`);if(f.month===void 0)throw new RangeError(`Missing month converting ${JSON.stringify(t)}`);if(f.day===void 0)throw new RangeError(`Missing day converting ${JSON.stringify(t)}`);return e.set(a,f),["constrain","reject"].forEach(v=>{let E=JSON.stringify({func:"calendarToIsoDate",year:f.year,month:f.month,day:f.day,overflow:v,id:this.id});e.set(E,t)}),f}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}=Us(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"?(ze(o,1,i),ze(a,1,this.maximumMonthLength(t))):(o=gt(o,1,i),a=gt(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}),m,f=r.get(u);if(f||i.year!==void 0&&i.month!==void 0&&i.day!==void 0&&(i.year!==o.year||i.month!==o.month||i.day!==o.day)&&(m=JSON.stringify({func:"calendarToIsoDate",year:i.year,month:i.month,day:i.day,overflow:e,id:this.id}),f=r.get(m),f))return f;let v=this.estimateIsoDate({year:a,month:s,day:l}),E=W=>{let K=this.addDaysIso(v,W);if(o.day>this.minimumMonthLength(o)){let ne=this.isoToCalendarDate(K,r);for(;ne.month!==s||ne.year!==a;){if(e==="reject")throw new RangeError(`day ${l} does not exist in month ${s} of year ${a}`);K=this.addDaysIso(K,-1),ne=this.isoToCalendarDate(K,r)}}return K},I=0,P=this.isoToCalendarDate(v,r),L=qa(o,P);if(L.years!==0||L.months!==0||L.days!==0){let W=365*L.years+30*L.months+L.days;v=this.addDaysIso(v,W),P=this.isoToCalendarDate(v,r),L=qa(o,P),L.years===0&&L.months===0?v=E(L.days):I=this.compareCalendarDates(o,P)}let z=8;for(;I;){v=this.addDaysIso(v,I*z);let W=P;P=this.isoToCalendarDate(v,r);let K=I;if(I=this.compareCalendarDates(o,P),I){if(L=qa(o,P),L.years===0&&L.months===0)v=E(L.days),I=0;else if(K&&I!==K)if(z>1)z/=2;else{if(e==="reject")throw new RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...i})}`);this.compareCalendarDates(P,W)>0&&(v=this.addDaysIso(v,-1)),I=0}}}if(r.set(u,v),m&&r.set(m,v),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 v}compareCalendarDates(t,e){return t.year!==e.year?St(t.year-e.year):t.month!==e.month?St(t.month-e.month):t.day!==e.day?St(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 Tt(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,m=o,f=e<0?-Math.max(a,this.daysInPreviousMonth(o,i)):this.daysInMonth(o,i),v=this.calendarToIsoDate(o,"constrain",i),E=this.addDaysIso(v,f);if(o=this.isoToCalendarDate(E,i),e>0){let I=this.monthsInYear(m,i);for(;o.month-1!=u%I;)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:m}=t,f=this.adjustCalendarDate({year:l+e,monthCode:m,day:u},s),v=this.addMonthsCalendar(f,r,a,s),E=o+7*i;return this.addDaysCalendar(v,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 m=e.year-t.year,f=e.day-t.day;if(r==="year"&&m){let I=0;e.monthCode>t.monthCode&&(I=1),e.monthCode<t.monthCode&&(I=-1),I||(I=Math.sign(f)),l=I*u<0?m-u:m}let v,E=l?this.addCalendar(t,{years:l},"constrain",i):t;do s+=u,v=E,E=this.addMonthsCalendar(v,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(v,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),m=this.addDaysIso(l,-u.day);return this.isoToCalendarDate(m,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 m=this.calendarToIsoDate(t,"constrain",e),f=this.addDaysIso(m,-r);return this.isoToCalendarDate(f,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 or(o.year,o.month-1,o.day)-or(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:m,year:f,month:v,monthCode:E,day:I}=t;if(v!==void 0&&f===void 0&&(!this.hasEra||u===void 0||m===void 0))throw new TypeError("when month is present, year (or era and eraYear) are required");(E===void 0||f!==void 0||this.hasEra&&m!==void 0)&&({monthCode:E,day:I}=this.isoToCalendarDate(this.calendarToIsoDate(t,e,r),r));let P={year:this.monthDaySearchStartYear(E,I),month:12,day:31},L=this.isoToCalendarDate(P,r),z=L.monthCode>E||L.monthCode===E&&L.day>=I?L.year:L.year-1;for(let W=0;W<20;W++){let K=this.adjustCalendarDate({day:I,monthCode:E,year:z-W},r),ne=this.calendarToIsoDate(K,"constrain",r),ie=this.isoToCalendarDate(ne,r);if({year:i,month:o,day:a}=ne,ie.monthCode===E&&ie.day===I)return{month:o,day:a,year:i};if(e==="constrain"){let le=this.maxLengthOfMonthCodeInAnyYear(ie.monthCode);if(ie.monthCode===E&&ie.day===le&&I>le)return{month:o,day:a,year:i};(s===void 0||ie.monthCode===s.monthCode&&ie.day>s.day)&&(s=ie,l=ne)}}if(e==="constrain"&&l!==void 0)return l;throw new RangeError(`No recent ${this.id} year with monthCode ${E} and day ${I}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}},fs=class extends Sn{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 m=this.months[u];if(!m)throw new RangeError(`Unrecognized month from formatToParts: ${u}`);a=this.inLeapYear({year:o})?m.leap:m.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=sr(s),this.inLeapYear({year:o})&&a>=6&&a++;let m=this.monthsInYear({year:o});if(a<1||a>m)throw new RangeError(`Invalid monthCode: ${s}`)}else if(r==="reject"?(ze(a,1,this.monthsInYear({year:o})),ze(l,1,this.maximumMonthLength({year:o,month:a}))):(a=gt(a,1,this.monthsInYear({year:o})),l=gt(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}}},Bn=class extends Sn{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}}},ps=class extends Bn{constructor(){super(...arguments),this.id="islamic"}},gs=class extends Bn{constructor(){super(...arguments),this.id="islamic-umalqura"}},ys=class extends Bn{constructor(){super(...arguments),this.id="islamic-tbla"}},vs=class extends Bn{constructor(){super(...arguments),this.id="islamic-civil"}},ws=class extends Bn{constructor(){super(...arguments),this.id="islamic-rgsa"}},bs=class extends Bn{constructor(){super(...arguments),this.id="islamicc"}},Ds=class extends Sn{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 sr(t)<=6?31:30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:e+621,month:1,day:1}}},Es=class extends Sn{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 Vs(t.year+78)}monthsInYear(){return 12}minimumMonthLength(t){return this.getMonthInfo(t).length}maximumMonthLength(t){return this.getMonthInfo(t).length}maxLengthOfMonthCodeInAnyYear(t){let e=sr(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 Tt(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 Vs(n){return n%4==0&&(n%100!=0||n%400==0)}var Co=class extends Sn{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 Vs(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][sr(t)-1]}estimateIsoDate(t){let e=this.adjustCalendarDate(t);return hi(e.year+this.isoEpoch.year,e.month+this.isoEpoch.month,e.day+this.isoEpoch.day,"constrain")}},Po=class extends Sn{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:m}=u;if(m){let f=s.find(v=>v.code===m);if(f===void 0)throw new RangeError(`Invalid era data: unmatched reverseOf era: ${m}`);u.reverseOf=f,u.anchorEpoch=f.anchorEpoch,u.isoEpoch=f.isoEpoch}u.anchorEpoch.month===void 0&&(u.anchorEpoch.month=1),u.anchorEpoch.day===void 0&&(u.anchorEpoch.day=1)}),s.sort((u,m)=>{if(u.reverseOf)return 1;if(m.reverseOf)return-1;if(!u.isoEpoch||!m.isoEpoch)throw new RangeError("Invalid era data: missing ISO epoch");return m.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,m)=>{u.genericName="era"+(s.length-1-m)}),{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 Vs(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][sr(t)-1]}completeEraYear(t){let e=(s,l,u)=>{let m=t[s];if(m!=null&&m!=l&&!(u||[]).includes(m)){let f=u?.[0];throw new RangeError(`Input ${s} ${m} doesn't match calculated value ${f?`${l} (also called ${f})`:l}`)}},r=s=>{let l,u={...t,year:s},m=this.eras.find((f,v)=>{if(v===this.eras.length-1){if(f.reverseOf){if(s>0)throw new RangeError(`Signed year ${s} is invalid for era ${f.code}`);return l=f.anchorEpoch.year-s,!0}return l=s-f.anchorEpoch.year+(f.hasYearZero?0:1),!0}return this.compareCalendarDates(u,f.anchorEpoch)>=0&&(l=s-f.anchorEpoch.year+(f.hasYearZero?0:1),!0)});if(!m)throw new RangeError(`Year ${s} was not matched by any era`);return{eraYear:l,era:m.code,eraNames:m.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:sr(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 hi(r+a.isoEpoch.year-(a.hasYearZero?0:1),i,o,"constrain")}},_i=class extends Po{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},_s=class extends Co{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}},Io=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}},Ms=class extends _s{constructor(){super("ethioaa",{year:-5492,month:7,day:17})}},Ss=class extends Io{constructor(){super("coptic",[{code:"coptic",isoEpoch:{year:284,month:8,day:29}},{code:"coptic-inverse",reverseOf:"coptic"}])}},ks=class extends Io{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}}])}},Ts=class extends _i{constructor(){super("roc",[{code:"roc",names:["minguo"],isoEpoch:{year:1912,month:1,day:1}},{code:"roc-inverse",names:["before-roc"],reverseOf:"roc"}])}},Cs=class extends Co{constructor(){super("buddhist",{year:-543,month:1,day:1})}},Ps=class extends _i{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}},Is=class extends _i{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}}},xo=class extends Sn{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,z)=>{let W=mu({isoYear:L,isoMonth:2,isoDay:1}),K=new Date(W);K.setUTCDate(z+1);let ne=o.formatToParts(K),ie=ne.find(re=>re.type==="month").value,le=+ne.find(re=>re.type==="day").value,Me=ne.find(re=>re.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:ie,calendarDay:le,calendarYearToVerify:Ee}},s=17,{calendarMonthString:l,calendarDay:u,calendarYearToVerify:m}=a(t,s);l!=="1"&&(s+=29,{calendarMonthString:l,calendarDay:u}=a(t,s)),s-=u-5;let f={},v,E,I=1,P=!1;do({calendarMonthString:l,calendarDay:u,calendarYearToVerify:m}=a(t,s)),v&&(f[E].daysInMonth=v+30-u),m!==t?P=!0:(f[l]={monthIndex:I++},s+=30),v=u,E=l;while(!P);return f[E].daysInMonth=v+30-u,e.set(r,f),f}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 m=an(a,s!==void 0),f=`${a}${s||""}`,v=this.getMonthList(o,e)[f];if(v===void 0)throw new RangeError(`Unmatched month ${f} in Chinese year ${o}`);return a=v.monthIndex,{year:o,month:a,day:l,monthCode:m}}if(this.validateCalendarDate(t),a===void 0){let m=this.getMonthList(o,e),f=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");f[0]==="0"&&(f=f.slice(1));let v=m[f];if(a=v&&v.monthIndex,a===void 0&&u.endsWith("L")&&u!="M13L"&&r==="constrain"){let E=+u.replace(/^M0?|L$/g,"");v=m[E],v&&(a=v.monthIndex,u=an(E))}if(a===void 0)throw new RangeError(`Unmatched month ${u} in Chinese year ${o}`)}else if(u===void 0){let m=this.getMonthList(o,e),f=Object.entries(m),v=f.length;r==="reject"?(ze(a,1,v),ze(l,1,this.maximumMonthLength())):(a=gt(a,1,v),l=gt(l,1,this.maximumMonthLength()));let E=f.find(I=>I[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 m=this.getMonthList(o,e),f=u.replace(/^M|L$/g,E=>E==="L"?"bis":"");f[0]==="0"&&(f=f.slice(1));let v=m[f];if(!v)throw new RangeError(`Unmatched monthCode ${u} in Chinese year ${o}`);if(a!==v.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}}},xs=class extends xo{constructor(){super(...arguments),this.id="chinese"}},Rs=class extends xo{constructor(){super(...arguments),this.id="dangi"}},As=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 Lt;Us(t,void 0,this.helper.monthsInYear({year:t.year??1972},e))}}dateToISO(t,e){let r=new Lt,i=this.helper.calendarToIsoDate(t,e,r);return r.setObject(i),i}monthDayToISOReferenceDate(t,e){let r=new Lt,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=Lt.getCacheForObject(t),l=this.helper.isoToCalendarDate(t,s),u=this.helper.addCalendar(l,{years:e,months:r,weeks:i,days:o},a,s),m=this.helper.calendarToIsoDate(u,"constrain",s);return Lt.getCacheForObject(m)||new Lt(s).setObject(m),m}dateUntil(t,e,r){let i=Lt.getCacheForObject(t),o=Lt.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=Lt.getCacheForObject(t),i=this.helper.isoToCalendarDate(t,r);if(e.dayOfWeek&&(i.dayOfWeek=Vi.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=hu(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[fs,Ds,ks,Ms,Ss,xs,Rs,Ts,Es,Cs,Ps,Is,ps,gs,ys,vs,ws,bs]){let t=new n;Vi[t.id]=new As(t)}Qa("calendarImpl",function(n){return Vi[n]});var Mi=Intl.DateTimeFormat;function vr(n,t){let e=h(n,t);return typeof e=="function"&&(e=new Mi(h(n,Cl),e(h(n,Za))),function(r,i,o){let a=Ao(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 ei(n){return bt(n,lr)}var cr=class{constructor(t=void 0,e=void 0){(function(r,i,o){let a=o!==void 0,s;if(a){let f=["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 v=Object.create(null);for(let E=0;E<f.length;E++){let I=f[E];Object.prototype.hasOwnProperty.call(s,I)&&(v[I]=s[I])}s=v}else s=Object.create(null);let l=new Mi(i,s),u=l.resolvedOptions();if(kn(r),a){let f=Object.assign(Object.create(null),u);for(let v in f)Object.prototype.hasOwnProperty.call(s,v)||delete f[v];f.hour12=s.hour12,f.hourCycle=s.hourCycle,me(r,Za,f)}else me(r,Za,s);me(r,Cl,u.locale),me(r,lr,l),me(r,Dr,u.timeZone),me(r,ni,u.calendar),me(r,El,$h),me(r,_l,jh),me(r,Ml,Bh),me(r,Sl,Hh),me(r,kl,zh),me(r,Tl,Uh);let m=a?s.timeZone:void 0;if(m===void 0)me(r,Ka,u.timeZone);else{let f=Yo(m);if(f.startsWith("\u2212"))throw new RangeError("Unicode minus (U+2212) is not supported in time zone offsets");me(r,Ka,vt(f))}})(this,t,e)}get format(){C(this,ei);let t=Lh.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 C(this,ei),Yh.call(this,t,e)}formatToParts(t,...e){return C(this,ei),Oh.call(this,t,...e)}formatRangeToParts(t,e){return C(this,ei),Fh.call(this,t,e)}resolvedOptions(){return C(this,ei),Nh.call(this)}};"formatToParts"in Mi.prototype||delete cr.prototype.formatToParts,"formatRangeToParts"in Mi.prototype||delete cr.prototype.formatRangeToParts;var Ft=function(n=void 0,t=void 0){return new cr(n,t)};function Nh(){let n=h(this,lr).resolvedOptions();return n.timeZone=h(this,Ka),n}function Lh(n,...t){let e,r,i=Ar(n,this);return i.formatter?(e=i.formatter,r=[Wt(i.epochNs,"floor")]):(e=h(this,lr),r=[n,...t]),e.format(...r)}function Oh(n,...t){let e,r,i=Ar(n,this);return i.formatter?(e=i.formatter,r=[Wt(i.epochNs,"floor")]):(e=h(this,lr),r=[n,...t]),e.formatToParts(...r)}function Yh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Ro(n),r=Ro(t),i,o=[e,r];if(_n(e)!==_n(r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");if(_n(e)){if(!fu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");let{epochNs:a,formatter:s}=Ar(e,this),{epochNs:l,formatter:u}=Ar(r,this);s&&(i=s,o=[Wt(a,"floor"),Wt(l,"floor")])}return i||(i=h(this,lr)),i.formatRange(...o)}function Fh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=Ro(n),r=Ro(t),i,o=[e,r];if(_n(e)!==_n(r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");if(_n(e)){if(!fu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");let{epochNs:a,formatter:s}=Ar(e,this),{epochNs:l,formatter:u}=Ar(r,this);s&&(i=s,o=[Wt(a,"floor"),Wt(l,"floor")])}return i||(i=h(this,lr)),i.formatRangeToParts(...o)}function qi(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 Hh(n){let t=qi(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"})),!qo(t)){if(Wi(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 jh(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=qi(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(Wi(n))throw new TypeError(`cannot format PlainYearMonth with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric"})}return e}function Bh(n){let t={short:{month:"numeric",day:"numeric"},medium:{month:"short",day:"numeric"},long:{month:"long",day:"numeric"},full:{month:"long",day:"numeric"}},e=qi(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(Wi(n))throw new TypeError(`cannot format PlainMonthDay with options [${Object.keys(n)}]`);Object.assign(e,{month:"numeric",day:"numeric"})}return e}function $h(n){let t=qi(n,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!Vo(t)){if(Wi(n))throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric"})}return t}function zh(n){let t=qi(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),!qo(t)&&!Vo(t)){if(Wi(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 Uh(n){let t=n;return qo(t)||Vo(t)||(t=Object.assign({},t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),t}function Vo(n){return"year"in n||"month"in n||"day"in n||"weekday"in n||"dateStyle"in n||"era"in n}function qo(n){return"hour"in n||"minute"in n||"second"in n||"timeStyle"in n||"dayPeriod"in n||"fractionalSecondDigits"in n}function Wi(n){return Vo(n)||qo(n)||"dateStyle"in n||"timeStyle"in n||"timeZoneName"in n}function _n(n){return Ne(n)||Ye(n)||Te(n)||fe(n)||qe(n)||Ot(n)||Ve(n)}function Ro(n){return _n(n)?n:Oo(n)}function fu(n,t){return!(!_n(n)||!_n(t)||Ye(n)&&!Ye(t)||Ne(n)&&!Ne(t)||Te(n)&&!Te(t)||fe(n)&&!fe(t)||qe(n)&&!qe(t)||Ot(n)&&!Ot(t)||Ve(n)&&!Ve(t))}function Ar(n,t){if(Ye(n)){let e={isoDate:{year:1970,month:1,day:1},time:h(n,Le)};return{epochNs:Qe(h(t,Dr),e,"compatible"),formatter:vr(t,Sl)}}if(qe(n)){let e=h(n,j),r=h(t,ni);if(e!==r)throw new RangeError(`cannot format PlainYearMonth with calendar ${e} in locale with calendar ${r}`);let i=we(h(n,se),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,_l)}}if(Ot(n)){let e=h(n,j),r=h(t,ni);if(e!==r)throw new RangeError(`cannot format PlainMonthDay with calendar ${e} in locale with calendar ${r}`);let i=we(h(n,se),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,Ml)}}if(Ne(n)){let e=h(n,j),r=h(t,ni);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDate with calendar ${e} in locale with calendar ${r}`);let i=we(h(n,se),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,El)}}if(Te(n)){let e=h(n,j),r=h(t,ni);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDateTime with calendar ${e} in locale with calendar ${r}`);let i=h(n,Ie);return{epochNs:Qe(h(t,Dr),i,"compatible"),formatter:vr(t,kl)}}if(fe(n))throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");return Ve(n)?{epochNs:h(n,ae),formatter:vr(t,Tl)}:{}}function pu(n){let t=Object.create(null);return t.years=h(n,ct),t.months=h(n,lt),t.weeks=h(n,_t),t.days=h(n,ut),t.hours=h(n,dt),t.minutes=h(n,ht),t.seconds=h(n,mt),t.milliseconds=h(n,ft),t.microseconds=h(n,pt),t.nanoseconds=h(n,Mt),t}cr.prototype.constructor=Ft,Object.defineProperty(Ft,"prototype",{value:cr.prototype,writable:!1,enumerable:!1,configurable:!1}),Ft.supportedLocalesOf=Mi.supportedLocalesOf,Tn(Ft,"Intl.DateTimeFormat");var{format:Vh,formatToParts:qh}=Intl.DurationFormat?.prototype??Object.create(null);function qs(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=pu(Vt(n));return Vh.call(this,t)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=qs,Intl.DurationFormat.prototype.formatToParts=function(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=pu(Vt(n));return qh.call(this,t)});var Xm=Object.freeze({__proto__:null,DateTimeFormat:Ft,ModifiedIntlDurationFormatPrototypeFormat:qs}),Si=class{constructor(t){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");Wl(this,To(t))}get epochMilliseconds(){return C(this,Ve),Wt(h(this,ae),"floor")}get epochNanoseconds(){return C(this,Ve),lu(S.default.BigInt(h(this,ae)))}add(t){return C(this,Ve),ll("add",this,t)}subtract(t){return C(this,Ve),ll("subtract",this,t)}until(t,e=void 0){return C(this,Ve),nl("until",this,t,e)}since(t,e=void 0){return C(this,Ve),nl("since",this,t,e)}round(t){if(C(this,Ve),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",Mn);return Or(r,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[o],!0),Jt(ls(h(this,ae),r,o,i))}equals(t){C(this,Ve);let e=oi(t),r=h(this,ae),i=h(e,ae);return S.default.equal(S.default.BigInt(r),S.default.BigInt(i))}toString(t=void 0){C(this,Ve);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=kt(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=vt(a));let{precision:s,unit:l,increment:u}=Fi(o,r);return Wc(Jt(ls(h(this,ae),u,l,i)),a,s)}toJSON(){return C(this,Ve),Wc(this,void 0,"auto")}toLocaleString(t=void 0,e=void 0){return C(this,Ve),new Ft(t,e).format(this)}valueOf(){zn("Instant")}toZonedDateTimeISO(t){C(this,Ve);let e=vt(t);return Je(h(this,ae),e,"iso8601")}static fromEpochMilliseconds(t){return Jt(Xt(Oo(t)))}static fromEpochNanoseconds(t){return Jt(To(t))}static from(t){return oi(t)}static compare(t,e){let r=oi(t),i=oi(e),o=h(r,ae),a=h(i,ae);return S.default.lessThan(o,a)?-1:S.default.greaterThan(o,a)?1:0}};Tn(Si,"Temporal.Instant");var ki=class{constructor(t,e,r,i="iso8601"){let o=ue(t),a=ue(e),s=ue(r),l=Dt(i===void 0?"iso8601":$e(i));rr(o,a,s),$l(this,{year:o,month:a,day:s},l)}get calendarId(){return C(this,Ne),h(this,j)}get era(){return ot(this,"era")}get eraYear(){return ot(this,"eraYear")}get year(){return ot(this,"year")}get month(){return ot(this,"month")}get monthCode(){return ot(this,"monthCode")}get day(){return ot(this,"day")}get dayOfWeek(){return ot(this,"dayOfWeek")}get dayOfYear(){return ot(this,"dayOfYear")}get weekOfYear(){return ot(this,"weekOfYear")?.week}get yearOfWeek(){return ot(this,"weekOfYear")?.year}get daysInWeek(){return ot(this,"daysInWeek")}get daysInMonth(){return ot(this,"daysInMonth")}get daysInYear(){return ot(this,"daysInYear")}get monthsInYear(){return ot(this,"monthsInYear")}get inLeapYear(){return ot(this,"inLeapYear")}with(t,e=void 0){if(C(this,Ne),!Oe(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=wt(r,h(this,se));return i=nr(r,i,Bt(r,t,["year","month","monthCode","day"],[],"partial")),yt(jn(r,i,ye(X(e))),r)}withCalendar(t){C(this,Ne);let e=$i(t);return yt(h(this,se),e)}add(t,e=void 0){return C(this,Ne),ul("add",this,t,e)}subtract(t,e=void 0){return C(this,Ne),ul("subtract",this,t,e)}until(t,e=void 0){return C(this,Ne),rl("until",this,t,e)}since(t,e=void 0){return C(this,Ne),rl("since",this,t,e)}equals(t){C(this,Ne);let e=ri(t);return ln(h(this,se),h(e,se))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){return C(this,Ne),Kc(this,Oi(X(t)))}toJSON(){return C(this,Ne),Kc(this)}toLocaleString(t=void 0,e=void 0){return C(this,Ne),new Ft(t,e).format(this)}valueOf(){zn("PlainDate")}toPlainDateTime(t=void 0){C(this,Ne);let e=Bl(t);return zt(we(h(this,se),e),h(this,j))}toZonedDateTime(t){let e,r;if(C(this,Ne),Oe(t)){let a=t.timeZone;a===void 0?e=vt(t):(e=vt(a),r=t.plainTime)}else e=vt(t);let i=h(this,se),o;return r===void 0?o=An(e,i):(r=Ln(r),o=Qe(e,we(i,h(r,Le)),"compatible")),Je(o,e,h(this,j))}toPlainYearMonth(){C(this,Ne);let t=h(this,j);return Sr(vi(t,wt(t,h(this,se)),"constrain"),t)}toPlainMonthDay(){C(this,Ne);let t=h(this,j);return Mr(Eo(t,wt(t,h(this,se)),"constrain"),t)}static from(t,e=void 0){return ri(t,e)}static compare(t,e){let r=ri(t),i=ri(e);return ln(h(r,se),h(i,se))}};function ot(n,t){C(n,Ne);let e=h(n,se);return Hi(n).isoToDate(e,{[t]:!0})[t]}Tn(ki,"Temporal.PlainDate");var Ti=class{constructor(t,e,r,i=0,o=0,a=0,s=0,l=0,u=0,m="iso8601"){let f=ue(t),v=ue(e),E=ue(r),I=i===void 0?0:ue(i),P=o===void 0?0:ue(o),L=a===void 0?0:ue(a),z=s===void 0?0:ue(s),W=l===void 0?0:ue(l),K=u===void 0?0:ue(u),ne=Dt(m===void 0?"iso8601":$e(m));js(f,v,E,I,P,L,z,W,K),zl(this,{isoDate:{year:f,month:v,day:E},time:{hour:I,minute:P,second:L,millisecond:z,microsecond:W,nanosecond:K}},ne)}get calendarId(){return C(this,Te),h(this,j)}get year(){return at(this,"year")}get month(){return at(this,"month")}get monthCode(){return at(this,"monthCode")}get day(){return at(this,"day")}get hour(){return wr(this,"hour")}get minute(){return wr(this,"minute")}get second(){return wr(this,"second")}get millisecond(){return wr(this,"millisecond")}get microsecond(){return wr(this,"microsecond")}get nanosecond(){return wr(this,"nanosecond")}get era(){return at(this,"era")}get eraYear(){return at(this,"eraYear")}get dayOfWeek(){return at(this,"dayOfWeek")}get dayOfYear(){return at(this,"dayOfYear")}get weekOfYear(){return at(this,"weekOfYear")?.week}get yearOfWeek(){return at(this,"weekOfYear")?.year}get daysInWeek(){return at(this,"daysInWeek")}get daysInYear(){return at(this,"daysInYear")}get daysInMonth(){return at(this,"daysInMonth")}get monthsInYear(){return at(this,"monthsInYear")}get inLeapYear(){return at(this,"inLeapYear")}with(t,e=void 0){if(C(this,Te),!Oe(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=h(this,Ie),o={...wt(r,i.isoDate),...i.time};return o=nr(r,o,Bt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],"partial")),zt(ji(r,o,ye(X(e))),r)}withPlainTime(t=void 0){C(this,Te);let e=Bl(t);return zt(we(h(this,Ie).isoDate,e),h(this,j))}withCalendar(t){C(this,Te);let e=$i(t);return zt(h(this,Ie),e)}add(t,e=void 0){return C(this,Te),dl("add",this,t,e)}subtract(t,e=void 0){return C(this,Te),dl("subtract",this,t,e)}until(t,e=void 0){return C(this,Te),il("until",this,t,e)}since(t,e=void 0){return C(this,Te),il("since",this,t,e)}round(t){if(C(this,Te),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",Mn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];Or(r,a,a===1);let s=h(this,Ie);return zt(r===1&&o==="nanosecond"?s:us(s,r,o,i),h(this,j))}equals(t){C(this,Te);let e=ii(t);return Rr(h(this,Ie),h(e,Ie))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){C(this,Te);let e=X(t),r=Oi(e),i=Yi(e),o=Qt(e,"trunc"),a=kt(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}=Fi(a,i),m=us(h(this,Ie),u,l,o);return ir(m),bi(m,h(this,j),s,r)}toJSON(){return C(this,Te),bi(h(this,Ie),h(this,j),"auto")}toLocaleString(t=void 0,e=void 0){return C(this,Te),new Ft(t,e).format(this)}valueOf(){zn("PlainDateTime")}toZonedDateTime(t,e=void 0){C(this,Te);let r=vt(t),i=mi(X(e));return Je(Qe(r,h(this,Ie),i),r,h(this,j))}toPlainDate(){return C(this,Te),yt(h(this,Ie).isoDate,h(this,j))}toPlainTime(){return C(this,Te),vn(h(this,Ie).time)}static from(t,e=void 0){return ii(t,e)}static compare(t,e){let r=ii(t),i=ii(e);return Rr(h(r,Ie),h(i,Ie))}};function at(n,t){C(n,Te);let e=h(n,Ie).isoDate;return Hi(n).isoToDate(e,{[t]:!0})[t]}function wr(n,t){return C(n,Te),h(n,Ie).time[t]}Tn(Ti,"Temporal.PlainDateTime");var Ci=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0,s=0,l=0,u=0,m=0){let f=t===void 0?0:Gt(t),v=e===void 0?0:Gt(e),E=r===void 0?0:Gt(r),I=i===void 0?0:Gt(i),P=o===void 0?0:Gt(o),L=a===void 0?0:Gt(a),z=s===void 0?0:Gt(s),W=l===void 0?0:Gt(l),K=u===void 0?0:Gt(u),ne=m===void 0?0:Gt(m);zo(f,v,E,I,P,L,z,W,K,ne),kn(this),me(this,ct,f),me(this,lt,v),me(this,_t,E),me(this,ut,I),me(this,dt,P),me(this,ht,L),me(this,mt,z),me(this,ft,W),me(this,pt,K),me(this,Mt,ne)}get years(){return C(this,Ae),h(this,ct)}get months(){return C(this,Ae),h(this,lt)}get weeks(){return C(this,Ae),h(this,_t)}get days(){return C(this,Ae),h(this,ut)}get hours(){return C(this,Ae),h(this,dt)}get minutes(){return C(this,Ae),h(this,ht)}get seconds(){return C(this,Ae),h(this,mt)}get milliseconds(){return C(this,Ae),h(this,ft)}get microseconds(){return C(this,Ae),h(this,pt)}get nanoseconds(){return C(this,Ae),h(this,Mt)}get sign(){return C(this,Ae),So(this)}get blank(){return C(this,Ae),So(this)===0}with(t){C(this,Ae);let e=jl(t),{years:r=h(this,ct),months:i=h(this,lt),weeks:o=h(this,_t),days:a=h(this,ut),hours:s=h(this,dt),minutes:l=h(this,ht),seconds:u=h(this,mt),milliseconds:m=h(this,ft),microseconds:f=h(this,pt),nanoseconds:v=h(this,Mt)}=e;return new n(r,i,o,a,s,l,u,m,f,v)}negated(){return C(this,Ae),Ct(this)}abs(){return C(this,Ae),new n(Math.abs(h(this,ct)),Math.abs(h(this,lt)),Math.abs(h(this,_t)),Math.abs(h(this,ut)),Math.abs(h(this,dt)),Math.abs(h(this,ht)),Math.abs(h(this,mt)),Math.abs(h(this,ft)),Math.abs(h(this,pt)),Math.abs(h(this,Mt)))}add(t){return C(this,Ae),cl("add",this,t)}subtract(t){return C(this,Ae),cl("subtract",this,t)}round(t){if(C(this,Ae),t===void 0)throw new TypeError("options parameter is required");let e=gn(this),r=typeof t=="string"?ar("smallestUnit",t):X(t),i=kt(r,"largestUnit","datetime",void 0,["auto"]),{plainRelativeTo:o,zonedRelativeTo:a}=Va(r),s=Lr(r),l=Qt(r,"halfExpand"),u=kt(r,"smallestUnit","datetime",void 0),m=!0;u||(m=!1,u="nanosecond");let f=bn(e,u),v=!0;if(i||(v=!1,i=f),i==="auto"&&(i=f),!m&&!v)throw new RangeError("at least one of smallestUnit or largestUnit is required");if(bn(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&&Or(s,E,!1),s>1&&yn(u)==="date"&&i!==u)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");if(a){let P=Er(this),L=h(a,De),z=h(a,j),W=h(a,ae);return P=cu(W,ci(W,L,z,P),L,z,i,s,u,l),yn(i)==="date"&&(i="hour"),Ut(P,i)}if(o){let P=on(this),L=xr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},P.time),z=h(o,se),W=h(o,j),K=Ht(W,z,Xe(P.date,L.deltaDays),"constrain");return P=su(we(z,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(K,L),W,i,s,u,l),Ut(P,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 I=on(this);if(u==="day"){let{quotient:P,remainder:L}=I.time.divmod(wo),z=I.date.days+P+fi(L,"day");z=On(z,s,l),I=Dn({years:0,months:0,weeks:0,days:z},_e.ZERO)}else I=Dn({years:0,months:0,weeks:0,days:0},ko(I.time,s,u,l));return Ut(I,i)}total(t){if(C(this,Ae),t===void 0)throw new TypeError("options argument is required");let e=typeof t=="string"?ar("unit",t):X(t),{plainRelativeTo:r,zonedRelativeTo:i}=Va(e),o=kt(e,"unit","datetime",Mn);if(i){let s=Er(this),l=h(i,De),u=h(i,j),m=h(i,ae);return function(f,v,E,I,P){return yn(P)==="time"?fi(_e.fromEpochNsDiff(v,f),P):tl(ou(f,v,E,I,P),v,qt(E,f),E,I,P)}(m,ci(m,l,u,s),l,u,o)}if(r){let s=on(this),l=xr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},s.time),u=h(r,se),m=h(r,j),f=Ht(m,u,Xe(s.date,l.deltaDays),"constrain");return function(v,E,I,P){if(Rr(v,E)==0)return 0;ir(v),ir(E);let L=iu(v,E,I,P);return P==="nanosecond"?S.default.toNumber(L.time.totalNs):tl(L,We(E),v,null,I,P)}(we(u,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),we(f,l),m,o)}let a=gn(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 fi(on(this).time,o)}toString(t=void 0){C(this,Ae);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=kt(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}=Fi(o,r);if(s==="nanosecond"&&l===1)return po(this,a);let u=gn(this),m=Er(this),f=ko(m.time,l,s,i);return m=Dn(m.date,f),po(Ut(m,bn(u,"second")),a)}toJSON(){return C(this,Ae),po(this,"auto")}toLocaleString(t=void 0,e=void 0){if(C(this,Ae),typeof Intl.DurationFormat=="function"){let r=new Intl.DurationFormat(t,e);return qs.call(r,this)}return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."),po(this,"auto")}valueOf(){zn("Duration")}static from(t){return Vt(t)}static compare(t,e,r=void 0){let i=Vt(t),o=Vt(e),a=X(r),{plainRelativeTo:s,zonedRelativeTo:l}=Va(a);if(h(i,ct)===h(o,ct)&&h(i,lt)===h(o,lt)&&h(i,_t)===h(o,_t)&&h(i,ut)===h(o,ut)&&h(i,dt)===h(o,dt)&&h(i,ht)===h(o,ht)&&h(i,mt)===h(o,mt)&&h(i,ft)===h(o,ft)&&h(i,pt)===h(o,pt)&&h(i,Mt)===h(o,Mt))return 0;let u=gn(i),m=gn(o),f=Er(i),v=Er(o);if(l&&(yn(u)==="date"||yn(m)==="date")){let z=h(l,De),W=h(l,j),K=h(l,ae),ne=ci(K,z,W,f),ie=ci(K,z,W,v);return St(S.default.toNumber(S.default.subtract(ne,ie)))}let E=f.date.days,I=v.date.days;if(nn(u)||nn(m)){if(!s)throw new RangeError("A starting point is required for years, months, or weeks comparison");E=el(f.date,s),I=el(v.date,s)}let P=f.time.add24HourDays(E),L=v.time.add24HourDays(I);return P.cmp(L)}};Tn(Ci,"Temporal.Duration");var Pi=class{constructor(t,e,r="iso8601",i=1972){let o=ue(t),a=ue(e),s=Dt(r===void 0?"iso8601":$e(r)),l=ue(i);rr(l,o,a),Ul(this,{year:l,month:o,day:a},s)}get monthCode(){return gl(this,"monthCode")}get day(){return gl(this,"day")}get calendarId(){return C(this,Ot),h(this,j)}with(t,e=void 0){if(C(this,Ot),!Oe(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=wt(r,h(this,se),"month-day");return i=nr(r,i,Bt(r,t,["year","month","monthCode","day"],[],"partial")),Mr(Eo(r,i,ye(X(e))),r)}equals(t){C(this,Ot);let e=Vc(t);return ln(h(this,se),h(e,se))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){return C(this,Ot),Gc(this,Oi(X(t)))}toJSON(){return C(this,Ot),Gc(this)}toLocaleString(t=void 0,e=void 0){return C(this,Ot),new Ft(t,e).format(this)}valueOf(){zn("PlainMonthDay")}toPlainDate(t){if(C(this,Ot),!Oe(t))throw new TypeError("argument should be an object");let e=h(this,j);return yt(jn(e,nr(e,wt(e,h(this,se),"month-day"),Bt(e,t,["year"],[],[])),"constrain"),e)}static from(t,e=void 0){return Vc(t,e)}};function gl(n,t){C(n,Ot);let e=h(n,se);return Hi(n).isoToDate(e,{[t]:!0})[t]}function Wa(n){return qt(n,ms())}Tn(Pi,"Temporal.PlainMonthDay");var gu={instant:()=>Jt(ms()),plainDateTimeISO:(n=Qr())=>zt(Wa(vt(n)),"iso8601"),plainDateISO:(n=Qr())=>yt(Wa(vt(n)).isoDate,"iso8601"),plainTimeISO:(n=Qr())=>vn(Wa(vt(n)).time),timeZoneId:()=>Qr(),zonedDateTimeISO:(n=Qr())=>{let t=vt(n);return Je(ms(),t,"iso8601")},[Symbol.toStringTag]:"Temporal.Now"};Object.defineProperty(gu,Symbol.toStringTag,{value:"Temporal.Now",writable:!1,enumerable:!1,configurable:!0});var Ii=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),m=i===void 0?0:ue(i),f=o===void 0?0:ue(o),v=a===void 0?0:ue(a);$o(s,l,u,m,f,v),Vl(this,{hour:s,minute:l,second:u,millisecond:m,microsecond:f,nanosecond:v})}get hour(){return C(this,Ye),h(this,Le).hour}get minute(){return C(this,Ye),h(this,Le).minute}get second(){return C(this,Ye),h(this,Le).second}get millisecond(){return C(this,Ye),h(this,Le).millisecond}get microsecond(){return C(this,Ye),h(this,Le).microsecond}get nanosecond(){return C(this,Ye),h(this,Le).nanosecond}with(t,e=void 0){if(C(this,Ye),!Oe(t))throw new TypeError("invalid argument");Nr(t);let r=rs(t,"partial"),i=rs(this),{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:m}=Object.assign(i,r),f=ye(X(e));return{hour:o,minute:a,second:s,millisecond:l,microsecond:u,nanosecond:m}=Ho(o,a,s,l,u,m,f),new n(o,a,s,l,u,m)}add(t){return C(this,Ye),hl("add",this,t)}subtract(t){return C(this,Ye),hl("subtract",this,t)}until(t,e=void 0){return C(this,Ye),ol("until",this,t,e)}since(t,e=void 0){return C(this,Ye),ol("since",this,t,e)}round(t){if(C(this,Ye),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",Mn);return Or(r,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o],!1),vn(ds(h(this,Le),r,o,i))}equals(t){C(this,Ye);let e=Ln(t);return hs(h(this,Le),h(e,Le))===0}toString(t=void 0){C(this,Ye);let e=X(t),r=Yi(e),i=Qt(e,"trunc"),o=kt(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}=Fi(o,r);return Zc(ds(h(this,Le),l,s,i),a)}toJSON(){return C(this,Ye),Zc(h(this,Le),"auto")}toLocaleString(t=void 0,e=void 0){return C(this,Ye),new Ft(t,e).format(this)}valueOf(){zn("PlainTime")}static from(t,e=void 0){return Ln(t,e)}static compare(t,e){let r=Ln(t),i=Ln(e);return hs(h(r,Le),h(i,Le))}};Tn(Ii,"Temporal.PlainTime");var xi=class{constructor(t,e,r="iso8601",i=1){let o=ue(t),a=ue(e),s=Dt(r===void 0?"iso8601":$e(r)),l=ue(i);rr(o,a,l),ql(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 C(this,qe),h(this,j)}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(C(this,qe),!Oe(t))throw new TypeError("invalid argument");Nr(t);let r=h(this,j),i=wt(r,h(this,se),"year-month");return i=nr(r,i,Bt(r,t,["year","month","monthCode"],[],"partial")),Sr(vi(r,i,ye(X(e))),r)}add(t,e=void 0){return C(this,qe),ml("add",this,t,e)}subtract(t,e=void 0){return C(this,qe),ml("subtract",this,t,e)}until(t,e=void 0){return C(this,qe),al("until",this,t,e)}since(t,e=void 0){return C(this,qe),al("since",this,t,e)}equals(t){C(this,qe);let e=ai(t);return ln(h(this,se),h(e,se))===0&&sn(h(this,j),h(e,j))}toString(t=void 0){return C(this,qe),Jc(this,Oi(X(t)))}toJSON(){return C(this,qe),Jc(this)}toLocaleString(t=void 0,e=void 0){return C(this,qe),new Ft(t,e).format(this)}valueOf(){zn("PlainYearMonth")}toPlainDate(t){if(C(this,qe),!Oe(t))throw new TypeError("argument should be an object");let e=h(this,j);return yt(jn(e,nr(e,wt(e,h(this,se),"year-month"),Bt(e,t,["day"],[],[])),"constrain"),e)}static from(t,e=void 0){return ai(t,e)}static compare(t,e){let r=ai(t),i=ai(e);return ln(h(r,se),h(i,se))}};function fn(n,t){C(n,qe);let e=h(n,se);return Hi(n).isoToDate(e,{[t]:!0})[t]}Tn(xi,"Temporal.PlainYearMonth");var Wh=Ft.prototype.resolvedOptions,Ri=class{constructor(t,e,r="iso8601"){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");let i=To(t),o=$e(e),{tzName:a,offsetMinutes:s}=Yn(o);if(s===void 0){let l=_o(a);if(!l)throw new RangeError(`unknown time zone ${a}`);o=l.identifier}else o=Ys(s);Kl(this,i,o,Dt(r===void 0?"iso8601":$e(r)))}get calendarId(){return C(this,fe),h(this,j)}get timeZoneId(){return C(this,fe),h(this,De)}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 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 st(this,"era")}get eraYear(){return st(this,"eraYear")}get epochMilliseconds(){return C(this,fe),Wt(h(this,ae),"floor")}get epochNanoseconds(){return C(this,fe),lu(h(this,ae))}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 hoursInDay(){C(this,fe);let t=h(this,De),e=tn(this).isoDate,r=Tt(e.year,e.month,e.day+1),i=An(t,e),o=An(t,r);return fi(_e.fromEpochNsDiff(o,i),"hour")}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")}get offset(){return C(this,fe),is(wn(h(this,De),h(this,ae)))}get offsetNanoseconds(){return C(this,fe),wn(h(this,De),h(this,ae))}with(t,e=void 0){if(C(this,fe),!Oe(t))throw new TypeError("invalid zoned-date-time-like");Nr(t);let r=h(this,j),i=h(this,De),o=wn(i,h(this,ae)),a=tn(this),s={...wt(r,a.isoDate),...a.time,offset:is(o)};s=nr(r,s,Bt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset"],"partial"));let l=X(e),u=mi(l),m=go(l,"prefer"),f=ji(r,s,ye(l)),v=Yr(s.offset);return Je(Do(f.isoDate,f.time,"option",v,i,u,m,!1),i,r)}withPlainTime(t=void 0){C(this,fe);let e=h(this,De),r=h(this,j),i=tn(this).isoDate,o;return o=t===void 0?An(e,i):Qe(e,we(i,h(Ln(t),Le)),"compatible"),Je(o,e,r)}withTimeZone(t){C(this,fe);let e=vt(t);return Je(h(this,ae),e,h(this,j))}withCalendar(t){C(this,fe);let e=$i(t);return Je(h(this,ae),h(this,De),e)}add(t,e=void 0){return C(this,fe),fl("add",this,t,e)}subtract(t,e=void 0){return C(this,fe),fl("subtract",this,t,e)}until(t,e=void 0){return C(this,fe),sl("until",this,t,e)}since(t,e=void 0){return C(this,fe),sl("since",this,t,e)}round(t){if(C(this,fe),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ar("smallestUnit",t):X(t),r=Lr(e),i=Qt(e,"halfExpand"),o=kt(e,"smallestUnit","time",Mn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];if(Or(r,a,a===1),o==="nanosecond"&&r===1)return Je(h(this,ae),h(this,De),h(this,j));let s=h(this,De),l=h(this,ae),u=tn(this),m;if(o==="day"){let f=u.isoDate,v=Tt(f.year,f.month,f.day+1),E=An(s,f),I=An(s,v),P=S.default.subtract(I,E);m=_e.fromEpochNsDiff(l,E).round(P,i).addToEpochNs(E)}else{let f=us(u,r,o,i),v=wn(s,l);m=Do(f.isoDate,f.time,"option",v,s,"compatible","prefer",!1)}return Je(m,s,h(this,j))}equals(t){C(this,fe);let e=si(t),r=h(this,ae),i=h(e,ae);return!!S.default.equal(S.default.BigInt(r),S.default.BigInt(i))&&!!Zl(h(this,De),h(e,De))&&sn(h(this,j),h(e,j))}toString(t=void 0){C(this,fe);let e=X(t),r=Oi(e),i=Yi(e),o=function(v){return En(v,"offset",["auto","never"],"auto")}(e),a=Qt(e,"trunc"),s=kt(e,"smallestUnit","time",void 0);if(s==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let l=function(v){return En(v,"timeZoneName",["auto","never","critical"],"auto")}(e),{precision:u,unit:m,increment:f}=Fi(s,i);return Xc(this,u,r,l,o,{unit:m,increment:f,roundingMode:a})}toLocaleString(t=void 0,e=void 0){C(this,fe);let r=X(e),i=Object.create(null);if(function(l,u,m,f){if(u==null)return;let v=Reflect.ownKeys(u);for(let E=0;E<v.length;E++){let I=v[E];if(!m.some(P=>Object.is(P,I))&&Object.prototype.propertyIsEnumerable.call(u,I)){let P=u[I];l[I]=P}}}(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=h(this,De),Qc(i.timeZone))throw new RangeError("toLocaleString does not currently support offset time zones");let o=new Ft(t,i),a=Wh.call(o).calendar,s=h(this,j);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(h(this,ae)))}toJSON(){return C(this,fe),Xc(this,"auto")}valueOf(){zn("ZonedDateTime")}startOfDay(){C(this,fe);let t=h(this,De);return Je(An(t,tn(this).isoDate),t,h(this,j))}getTimeZoneTransition(t){C(this,fe);let e=h(this,De);if(t===void 0)throw new TypeError("options parameter is required");let r=En(typeof t=="string"?ar("direction",t):X(t),"direction",["next","previous"],Mn);if(r===void 0)throw new TypeError("direction option is required");if(Qc(e)||e==="UTC")return null;let i=h(this,ae),o=r==="next"?Hs(e,i):as(e,i);return o===null?null:Je(o,e,h(this,j))}toInstant(){return C(this,fe),Jt(h(this,ae))}toPlainDate(){return C(this,fe),yt(tn(this).isoDate,h(this,j))}toPlainTime(){return C(this,fe),vn(tn(this).time)}toPlainDateTime(){return C(this,fe),zt(tn(this),h(this,j))}static from(t,e=void 0){return si(t,e)}static compare(t,e){let r=si(t),i=si(e),o=h(r,ae),a=h(i,ae);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 qt(h(n,De),h(n,ae))}function st(n,t){C(n,fe);let e=tn(n).isoDate;return Hi(n).isoToDate(e,{[t]:!0})[t]}function br(n,t){return C(n,fe),tn(n).time[t]}Tn(Ri,"Temporal.ZonedDateTime");var Fe=Object.freeze({__proto__:null,Duration:Ci,Instant:Si,Now:gu,PlainDate:ki,PlainDateTime:Ti,PlainMonthDay:Pi,PlainTime:Ii,PlainYearMonth:xi,ZonedDateTime:Ri}),Qm=class{toTemporalInstant(){return Jt(Xt(Date.prototype.valueOf.call(this)))}}.prototype.toTemporalInstant,Kh=[Si,ki,Ti,Ci,Pi,Ii,xi,Ri];for(let n of Kh){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 Zh="https://yuna-backend.cbocher.workers.dev/mews",Gh="https://api.mews.com/api/distributor/v1",Jh="Yuna",Xh="mewscache",Qh=!1,em=13,tm=8,nm=Fe.Duration.from({minutes:20}).milliseconds,rm=new Headers({Accept:"application/json, text/plain, */*","Content-Type":"application/json; charset=utf-8"}),He={base_url:Zh,bookingEngine_url:Gh,bookingEngineClient:Jh,bypassCache:Qh,headers:rm,cache_key:Xh,ttl:nm,beCheckInUTC:em,beCheckOutUTC:tm};var yu=(n,t,e)=>`${n}:${t}:${JSON.stringify(e)}`;var Wo=class{constructor(){H(this,"dbName","MewsAPICache");H(this,"version",2);H(this,"db",null);H(this,"initPromise",null);H(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 m=e!==void 0?e:He.ttl,f=Fe.Instant.fromEpochMilliseconds(u.timestamp);if(Fe.Now.instant().since(f,{smallestUnit:"milliseconds"}).milliseconds>m){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:Fe.Now.instant().epochMilliseconds,enterpriseId:r,size:a};return new Promise((l,u)=>{let v=o.transaction("api_cache","readwrite").objectStore("api_cache").put(s);v.onerror=()=>{this.recordPerformanceMetric("cache-write-error",i,!1),u(v.error)},v.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:Fe.Now.instant().epochMilliseconds,enterpriseId:r,size:this.calculateDataSize(e)};return new Promise((l,u)=>{let v=a.transaction("api_cache","readwrite").objectStore("api_cache").put(s);v.onerror=()=>u(v.error),v.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=Fe.Now.instant().epochMilliseconds-He.ttl,o=r.transaction("api_cache","readwrite"),a=o.objectStore("api_cache"),s=a.index("by-timestamp"),l=await new Promise((m,f)=>{let v=s.getAll(IDBKeyRange.upperBound(i));v.onsuccess=()=>m(v.result),v.onerror=()=>f(v.error)}),u=50;for(let m=0;m<l.length;m+=u){let f=l.slice(m,m+u);await Promise.all(f.map(v=>new Promise((E,I)=>{let P=a.delete(v.cacheKey);P.onsuccess=()=>E(),P.onerror=()=>I(P.error)}))),e+=f.length,m+u<l.length&&await new Promise(v=>setTimeout(v,0))}await new Promise((m,f)=>{o.oncomplete=()=>m(),o.onerror=()=>f(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,m)=>{let f=i.delete(l.cacheKey);f.onsuccess=()=>u(),f.onerror=()=>m(f.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 et=async(n,t,e=null,r=!1)=>{let i=new Wo,o=yu(n,e||"null",t.body);if(!He.bypassCache){let a=await i.get(o);if(a)return a}try{let a=new URL(He.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 vu=(n,t={})=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/services/getAll",e,n)};function wu(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 Ws=Ge({});async function bu(n){if(Ws.value[n])return Ws.value[n];let t=await vu(n),e=wu(t);return Ws.value[n]=e,e}var Du=(n,t)=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/ageCategories/getAll",e,n)};function Eu(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 Ks=Ge({});async function _u(n){if(Ks.value[n])return Ks.value[n];let t=await Du(n,{EnterpriseIds:[n]}),e=Eu(t);return Ks.value[n]=e,e}var Mu=(n,t)=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/products/getAll",e,n)};function Su(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 ku(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 Tu(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 Ki(n,t){return n.map(t)}function Zs(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 Cu(n){return{products:Ki(n.Products,Zs),customerProducts:Ki(n.CustomerProducts,Zs)}}var Gs=Ge({});async function Pu(n,t){if(Gs.value[t])return Gs.value[t];let e=await Mu(n,{ServiceIds:[t]}),r=Cu(e);return Gs.value[t]=r,r}var Iu=(n,t={})=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/rates/getAll",e,n)};var Js=Ge({});async function xu(n,t){if(Js.value[t])return Js.value[t];let e=await Iu(n,{ServiceIds:[t]}),r=Tu(e);return Js.value[t]=r,r}var Ru=(n,t)=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/services/getAvailability",e,n)};function Au(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 te=class n{static getCurrentDate(){return Fe.Now.plainDateISO()}static fromString(t){return Fe.PlainDate.from(this.safeParsePlainDate(t))}static formatForDisplay(t,e={weekday:"short",month:"short",day:"numeric"}){return t.toLocaleString(In,e)}static formatForAPI(t){return(typeof t=="string"?Fe.PlainDate.from(t):Fe.PlainDate.from(t)).toZonedDateTime({timeZone:"Europe/Paris",plainTime:Fe.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 Fe.PlainDate.compare(t,e)>0}static isAfterOrEqual(t,e){return Fe.PlainDate.compare(t,e)<0}static isSameDate(t,e){return Fe.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 Fe.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 Fe.PlainDate.from(e)}return Fe.PlainDate.from(t)}catch(e){return console.error("Error parsing date string:",e),n.getCurrentDate()}}};var Mp=localStorage.getItem("dev")==="true";var Sp=3*60*60*1e3;var Ko="calendar-day-price",Nu="DD/MM/YYYY",Lu="Y-m-d",Ou=!1,im=365,Xs=te.getCurrentDate(),Yu=te.addDays(Xs,im),Qs=te.getCurrentDate(),Fu=te.addDays(Qs,3),om=te.getCurrentDate(),kp=te.addDays(om,30);var Hu=6;function ec(n=!0,t=document.body){t.querySelectorAll('[data-fs-element="preloader"]').forEach(r=>{r.classList.toggle("hide",!n)})}function ju(n=!0,t=document.body,e=Vr("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=Vr("pleaseWait"))),i.classList.toggle("hide",!n)})}var tc=class{constructor(){H(this,"state",yr({appartmentsData:[],today:te.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}},Yp=new tc;var dr={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)),dr.touch()}catch(e){console.error(`Error writing to localStorage for key ${n}:`,e)}},update:(n,t)=>{let e=dr.get(n),r=t(e);dr.set(n,r)},remove:n=>{localStorage.removeItem(n),dr.touch()},clear:()=>{localStorage.clear()},has:n=>localStorage.getItem(n)!==null,touch:()=>{localStorage.setItem("lastUpdater",am()||"root")}},am=()=>localStorage.getItem("lastUpdater");var Zo=n=>{let t=new Date;return t.setDate(t.getDate()+n),t.toISOString().split("T")[0]},Un=dr.get("form_state"),Bu=Un?{enterpriseId:Un.enterpriseId||"",startDate:Un.startDate||Zo(45),endDate:Un.endDate||Zo(48),guests:Un.guests||2,coupon:Un.coupon||"",referrer:Un.referrer||window.location.href,rooms:Un.rooms||0}:{enterpriseId:"",startDate:Zo(45),endDate:Zo(48),guests:2,coupon:"",referrer:window.location.href,rooms:0},xe=yr(Bu),sm=fo(Bu);Cc(()=>{dr.set("form_state",xe)});var cm="data-fs-element";var Kt=(n,t=document)=>t.querySelector(`[${cm}="${n}"]`);var nc=Ge({});async function $u(n,t,e,r){if(nc.value[t])return nc.value[t];let i=await Ru(n,{ServiceId:t,FirstTimeUnitStartUtc:te.formatForAPI(e),LastTimeUnitStartUtc:te.formatForAPI(r)}),o=Au(i);return nc.value[t]=o,o}var zu=(n,t)=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/restrictions/getAll",e,n)};function Uu(n){if(!n||!n.Restrictions||!Array.isArray(n.Restrictions))throw new Error("Invalid service restrictions response format");return n.Restrictions}var rc=Ge({});async function Vu(n,t,e,r){if(rc.value[t])return rc.value[t];let i=await zu(n,{ServiceIds:[t],CollidingUtc:{StartUtc:te.formatForAPI(e),EndUtc:te.formatForAPI(r)},Origin:"User"}),o=Uu(i);return rc.value[t]=o,o}var qu=(n,t)=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/rules/getAll",e,n)};function Wu(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 ic=Ge({});async function Ku(n,t){if(ic.value[t])return ic.value[t];let e=await qu(n,{ServiceIds:[t],Extent:{RuleActions:!0}}),r=Wu(e);return ic.value[t]=r,r}var Zu=(n,t)=>{let e={method:"POST",headers:He.headers,body:JSON.stringify(t)};return et("/rates/getPricing",e,n)};var oc=Ge({});async function Gu(n,t,e,r){if(oc.value[t])return oc.value[t];let i=await Zu(n,{RateId:t,FirstTimeUnitStartUtc:te.formatForAPI(e),LastTimeUnitStartUtc:te.formatForAPI(r)}),o=Su(i);return oc.value[t]=o,o}var Go=class{constructor(t,e){H(this,"enterprise");H(this,"rate",null);H(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 Gu(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 Jo=class{constructor(t,e){H(this,"enterprise");H(this,"service",null);H(this,"products",[]);H(this,"customerProducts",[]);H(this,"restrictions",[]);H(this,"availabilities",[]);H(this,"rules",[]);H(this,"ageCategories",[]);H(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 $u(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 Vu(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 Pu(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 xu(this.enterprise.getEnterpriseId(),this.service.id);if(this.rates=t.map(e=>new Go(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 Ku(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 _u(this.enterprise.getEnterpriseId()),this.ageCategories}getAgeCategories(){if(this.ageCategories.length===0)throw new Error("Age categories are not initialized");return this.ageCategories}};var Xo=class{constructor(t){H(this,"enterpriseId");H(this,"services",[]);H(this,"reservableService",null);this.enterpriseId=t}async initServices(){this.services=await bu(this.enterpriseId);let t=this.services.find(e=>e.type.toLowerCase()==="reservable");return t&&(this.reservableService=new Jo(this,t)),this.services}getEnterpriseId(){return this.enterpriseId}getServices(){return this.services}getReservableService(){return this.reservableService?.getService()??null}};function Ju(n,t){return{rate:n,pricing:t}}function ac(n){return n.isActive&&n.isEnabled&&n.isPublic&&!n.hideFromGuest}function Xu(n,t){let e=t.filter(o=>lm(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=>um(n,o.Exceptions)))}function lm(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=te.fromString(e);return t.Days.includes(r.toLocaleString("en-US",{weekday:"long"}))})&&!0}function Qo(n){if(!n)return null;try{return Fe.Duration.from(n).total({unit:"days"})}catch{return null}}function um(n,t){let e=te.fromString(n.pricing?.datesUtc[0]),r=te.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=te.getCurrentDate(),a=e.since(o,{largestUnit:"day"}).days,s=Qo(t.MinAdvance),l=Qo(t.MaxAdvance),u=Qo(t.MinLength),m=Qo(t.MaxLength);return!!(u&&i<u||m&&i>m||s&&a<s||l&&a>l||!t.MinLength&&!t.MaxLength&&!t.MinAdvance&&!t.MaxAdvance)}var Qu=(n,t)=>{let e=n.find(s=>s.rate.isBaseRate),r=n.filter(s=>!Xu(s,t)&&ac(s.rate)),i=Object.groupBy(r,s=>s.rate.group?.Name||"unknown"),o=ku(r),a=dm(o);return{baseRate:e,allowedRates:r,groupedRates:i,datedPrices:o,lowestDatedPrices:a}};function dm(n){let t={};for(let[e,r]of Object.entries(n)){let i=1/0,o=r.filter(a=>ac(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 ed=async n=>{let t=await Promise.all(n.map(async r=>{let i=new Xo(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 m=await u.initPricing(te.formatForAPI(Xs.toString()),te.formatForAPI(Yu.toString()));return Ju(u.getRate(),m)}));return Qu(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 Ue=class Ue extends Date{constructor(e=null,r="YYYY-MM-DD",i="en-US"){super(Ue.parseDateTime(e,r,i));H(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 Ue)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=Ue.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,m]of Object.entries(o)){let f=Number(u),{group:v,pattern:E}=Ue.formatPatterns(m[0],i);s[v]=f+1,s.value+=E,s.value+=".*?"}let l=new RegExp(`^${s.value}$`);if(l.test(e)){let u=l.exec(e),m=Number(u[s.year]),f=null;s.month?f=Number(u[s.month])-1:s.shortMonth?f=Ue.shortMonths(i).indexOf(u[s.shortMonth]):s.longMonth&&(f=Ue.longMonths(i).indexOf(u[s.longMonth]));let v=Number(u[s.day])||1,E=Number(u[s.hour]),I=Number.isNaN(E)?0:E,P=Number(u[s.minute]),L=Number.isNaN(P)?0:P,z=Number(u[s.second]),W=Number.isNaN(z)?0:z,K=u[s.ampm];return K&&K==="PM"&&(I+=12,I===24&&(I=0)),new Date(m,f,v,I,L,W,0)}}}return new Date(new Date().setHours(0,0,0,0))}static shortMonths(e){return Ue.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"short"}))}static longMonths(e){return Ue.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:`(${Ue.shortMonths(r).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${Ue.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 Ue(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=Ue.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 Ue.shortMonths(r)[this.getMonth()];case"MMMM":return Ue.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""}}};H(Ue,"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),H(Ue,"MONTH_JS",[0,1,2,3,4,5,6,7,8,9,10,11]);var de=Ue,sc=class{constructor(t){H(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}},cc=class{constructor(t){H(this,"picker");H(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()}},ea=class{constructor(t){H(this,"Calendar",new sc(this));H(this,"PluginManager",new cc(this));H(this,"calendars",[]);H(this,"datePicked",[]);H(this,"cssLoaded",0);H(this,"binds",{hidePicker:this.hidePicker.bind(this),show:this.show.bind(this)});H(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:[]});H(this,"ui",{container:null,shadowRoot:null,wrapper:null});H(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}}},ia=Object.freeze({__proto__:null,Core:ea,create:ea}),Zi=class{constructor(){H(this,"picker");H(this,"options");H(this,"priority",0);H(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()}},ta=class extends Zi{constructor(){super(...arguments);H(this,"priority",1);H(this,"binds",{onView:this.onView.bind(this)});H(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,m=!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)){m=!0;break}l.subtract(1,"day")}u&&m&&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,m=this.options.maxDays&&l>this.options.maxDays;(u||m||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 na=class extends Zi{constructor(){super(...arguments);H(this,"tooltipElement");H(this,"triggerElement");H(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)});H(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),m=this.picker.Calendar.getCalendarDayView(u);u.isBetween(o,a)&&m.classList.add("in-range"),u.isSame(this.picker.datePicked[0],"day")&&(m.classList.add("start"),m.classList.toggle("flipped",s)),l===i&&(m.classList.add("end"),m.classList.toggle("flipped",s)),l.className=m.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),m=`${l} ${this.options.locale[u]}`;this.showTooltip(i,m)}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 ra=class extends Zi{constructor(){super(...arguments);H(this,"rangePlugin");H(this,"lockPlugin");H(this,"priority",10);H(this,"binds",{onView:this.onView.bind(this),onColorScheme:this.onColorScheme.bind(this)});H(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>'}});H(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 m=document.createElement("option"),f=new de(new Date(o.getFullYear(),u,2,0,0,0)),v=new de(new Date(o.getFullYear(),u,1,0,0,0));m.value=String(u),m.text=f.toLocaleString(this.picker.options.lang,{month:"long"}),this.lockPlugin&&(m.disabled=this.lockPlugin.options.minDate&&v.isBefore(new de(this.lockPlugin.options.minDate),"month")||this.lockPlugin.options.maxDate&&v.isAfter(new de(this.lockPlugin.options.maxDate),"month")),m.selected=v.getMonth()===o.getMonth(),l.appendChild(m)}l.addEventListener("change",u=>{let m=u.target;this.picker.calendars[0].setDate(1),this.picker.calendars[0].setMonth(Number(m.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,m=this.options.dropdown.maxYear?this.options.dropdown.maxYear:new Date().getFullYear();if(o.getFullYear()>m){let f=document.createElement("option");f.value=String(o.getFullYear()),f.text=String(o.getFullYear()),f.selected=!0,f.disabled=!0,l.appendChild(f)}for(let f=m;f>=u;f-=1){let v=document.createElement("option"),E=new de(new Date(f,0,1,0,0,0));v.value=String(f),v.text=String(f),this.lockPlugin&&(v.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")),v.selected=o.getFullYear()===f,l.appendChild(v)}if(o.getFullYear()<u){let f=document.createElement("option");f.value=String(o.getFullYear()),f.text=String(o.getFullYear()),f.selected=!0,f.disabled=!0,l.appendChild(f)}if(this.options.dropdown.years==="asc"){let f=Array.prototype.slice.call(l.childNodes).reverse();l.innerHTML="",f.forEach(v=>{v.innerHTML=v.value,l.appendChild(v)})}l.addEventListener("change",f=>{let v=f.target;this.picker.calendars[0].setFullYear(Number(v.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 m=i.querySelector(".day");s=new de(m.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 oa=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Vn={_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 aa={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},sa=aa;var tt=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},Pt=function(n){return n===!0?1:0};function lc(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var ca=function(n){return n instanceof Array?n:[n]};function nt(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 Gi(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function uc(n,t){if(t(n))return n;if(n.parentNode)return uc(n.parentNode,t)}function Ji(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 It(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch{return n.target}}var dc=function(){},Xi=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},td={D:dc,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*Pt(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:dc,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:dc,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},Cn={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})"},Hr={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[Hr.w(n,t,e)]},F:function(n,t,e){return Xi(Hr.n(n,t,e)-1,!1,t)},G:function(n,t,e){return tt(Hr.h(n,t,e))},H:function(n){return tt(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[Pt(n.getHours()>11)]},M:function(n,t){return Xi(n.getMonth(),!0,t)},S:function(n){return tt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return tt(n.getFullYear(),4)},d:function(n){return tt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return tt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return tt(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 hc=function(n){var t=n.config,e=t===void 0?Vn:t,r=n.l10n,i=r===void 0?aa:r,o=n.isMobile,a=o===void 0?!1:o;return function(s,l,u){var m=u||i;return e.formatDate!==void 0&&!a?e.formatDate(s,l,m):l.split("").map(function(f,v,E){return Hr[f]&&E[v-1]!=="\\"?Hr[f](s,m,e):f!=="\\"?f:""}).join("")}},la=function(n){var t=n.config,e=t===void 0?Vn:t,r=n.l10n,i=r===void 0?aa:r;return function(o,a,s,l){if(!(o!==0&&!o)){var u=l||i,m,f=o;if(o instanceof Date)m=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)m=new Date(o);else if(typeof o=="string"){var v=a||(e||Vn).dateFormat,E=String(o).trim();if(E==="today")m=new Date,s=!0;else if(e&&e.parseDate)m=e.parseDate(o,v);else if(/Z$/.test(E)||/GMT$/.test(E))m=new Date(o);else{for(var I=void 0,P=[],L=0,z=0,W="";L<v.length;L++){var K=v[L],ne=K==="\\",ie=v[L-1]==="\\"||ne;if(Cn[K]&&!ie){W+=Cn[K];var le=new RegExp(W).exec(o);le&&(I=!0)&&P[K!=="Y"?"push":"unshift"]({fn:td[K],val:le[++z]})}else ne||(W+=".")}m=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),P.forEach(function(Me){var Ee=Me.fn,re=Me.val;return m=Ee(m,re,u)||m}),m=I?m:void 0}}if(!(m instanceof Date&&!isNaN(m.getTime()))){e.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&m.setHours(0,0,0,0),m}}};function xt(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 nd=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},ua=function(n,t,e){return n*3600+t*60+e},rd=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},id={DAY:864e5};function da(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 rt=function(){return rt=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},rt.apply(this,arguments)},od=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},hm=300;function mm(n,t){var e={config:rt(rt({},Vn),Be.defaultConfig),l10n:sa};e.parseDate=la({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=P,e._setHoursFromDate=v,e._positionCalendar=Pn,e.changeMonth=_,e.changeYear=J,e.clear=T,e.close=k,e.onMouseOver=pe,e._createElement=be,e.createDay=le,e.destroy=Y,e.isEnabled=U,e.jumpToDate=W,e.updateValue=dn,e.open=Ce,e.redraw=eo,e.set=sd,e.setDate=cd,e.toggle=hd;function r(){e.utils={getDaysInMonth:function(p,w){return p===void 0&&(p=e.currentMonth),w===void 0&&(w=e.currentYear),p===1&&(w%4===0&&w%100!==0||w%400===0)?29:e.l10n.daysInMonth[p]}}}function i(){e.element=e.input=n,e.isOpen=!1,Ze(),qn(),ud(),ld(),r(),e.isMobile||ie(),z(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&v(e.config.noCalendar?e.latestSelectedDateObj:void 0),dn(!1)),s();var p=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&p&&Pn(),Re("onReady")}function o(){var p;return((p=e.calendarContainer)===null||p===void 0?void 0:p.getRootNode()).activeElement||document.activeElement}function a(p){return p.bind(e)}function s(){var p=e.config;p.weekNumbers===!1&&p.showMonths===1||p.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)*p.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(p){if(e.selectedDates.length===0){var w=e.config.minDate===void 0||xt(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),M=da(e.config);w.setHours(M.hours,M.minutes,M.seconds,w.getMilliseconds()),e.selectedDates=[w],e.latestSelectedDateObj=w}p!==void 0&&p.type!=="blur"&&pd(p);var x=e._input.value;f(),dn(),e._input.value!==x&&e._debouncedChange()}function u(p,w){return p%12+12*Pt(w===e.l10n.amPM[1])}function m(p){switch(p%24){case 0:case 12:return 12;default:return p%12}}function f(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var p=(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&&(p=u(p,e.amPM.textContent));var x=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&xt(e.latestSelectedDateObj,e.config.minDate,!0)===0,$=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&xt(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=ua(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),he=ua(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),G=ua(p,w,M);if(G>he&&G<q){var ge=rd(q);p=ge[0],w=ge[1],M=ge[2]}}else{if($){var Z=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;p=Math.min(p,Z.getHours()),p===Z.getHours()&&(w=Math.min(w,Z.getMinutes())),w===Z.getMinutes()&&(M=Math.min(M,Z.getSeconds()))}if(x){var oe=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;p=Math.max(p,oe.getHours()),p===oe.getHours()&&w<oe.getMinutes()&&(w=oe.getMinutes()),w===oe.getMinutes()&&(M=Math.max(M,oe.getSeconds()))}}E(p,w,M)}}function v(p){var w=p||e.latestSelectedDateObj;w&&w instanceof Date&&E(w.getHours(),w.getMinutes(),w.getSeconds())}function E(p,w,M){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(p%24,w,M||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=tt(e.config.time_24hr?p:(12+p)%12+12*Pt(p%12===0)),e.minuteElement.value=tt(w),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[Pt(p>=12)]),e.secondElement!==void 0&&(e.secondElement.value=tt(M)))}function I(p){var w=It(p),M=parseInt(w.value)+(p.delta||0);(M/1e3>1||p.key==="Enter"&&!/[^\d]/.test(M.toString()))&&J(M)}function P(p,w,M,x){if(w instanceof Array)return w.forEach(function($){return P(p,$,M,x)});if(p instanceof Array)return p.forEach(function($){return P($,w,M,x)});p.addEventListener(w,M,x),e._handlers.push({remove:function(){return p.removeEventListener(w,M,x)}})}function L(){Re("onChange")}function z(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(M){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+M+"]"),function(x){return P(x,"click",e[M])})}),e.isMobile){dd();return}var p=lc(ve,50);if(e._debouncedChange=lc(L,hm),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&P(e.daysContainer,"mouseover",function(M){e.config.mode==="range"&&pe(It(M))}),P(e._input,"keydown",ce),e.calendarContainer!==void 0&&P(e.calendarContainer,"keydown",ce),!e.config.inline&&!e.config.static&&P(window,"resize",p),window.ontouchstart!==void 0?P(window.document,"touchstart",V):P(window.document,"mousedown",V),P(window.document,"focus",V,{capture:!0}),e.config.clickOpens===!0&&(P(e._input,"focus",e.open),P(e._input,"click",e.open)),e.daysContainer!==void 0&&(P(e.monthNav,"click",fd),P(e.monthNav,["keyup","increment"],I),P(e.daysContainer,"click",mc)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var w=function(M){return It(M).select()};P(e.timeContainer,["increment"],l),P(e.timeContainer,"blur",l,{capture:!0}),P(e.timeContainer,"click",K),P([e.hourElement,e.minuteElement],["focus","click"],w),e.secondElement!==void 0&&P(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&P(e.amPM,"click",function(M){l(M)})}e.config.allowInput&&P(e._input,"blur",ee)}function W(p,w){var M=p!==void 0?e.parseDate(p):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,$=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&&(Re("onYearChange"),Q()),w&&(e.currentYear!==x||e.currentMonth!==$)&&Re("onMonthChange"),e.redraw()}function K(p){var w=It(p);~w.className.indexOf("arrow")&&ne(p,w.classList.contains("arrowUp")?1:-1)}function ne(p,w,M){var x=p&&It(p),$=M||x&&x.parentNode&&x.parentNode.firstChild,q=pa("increment");q.delta=w,$&&$.dispatchEvent(q)}function ie(){var p=window.document.createDocumentFragment();if(e.calendarContainer=be("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(p.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(y()),e.daysContainer||(e.daysContainer=be("div","flatpickr-days"),e.daysContainer.tabIndex=-1),O(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),p.appendChild(e.innerContainer)}e.config.enableTime&&p.appendChild(d()),nt(e.calendarContainer,"rangeMode",e.config.mode==="range"),nt(e.calendarContainer,"animate",e.config.animate===!0),nt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(p);var $=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&&(!$&&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 le(p,w,M,x){var $=U(w,!0),q=be("span",p,w.getDate().toString());return q.dateObj=w,q.$i=x,q.setAttribute("aria-label",e.formatDate(w,e.config.ariaDateFormat)),p.indexOf("hidden")===-1&&xt(w,e.now)===0&&(e.todayDateElem=q,q.classList.add("today"),q.setAttribute("aria-current","date")),$?(q.tabIndex=-1,ga(w)&&(q.classList.add("selected"),e.selectedDateElem=q,e.config.mode==="range"&&(nt(q,"startRange",e.selectedDates[0]&&xt(w,e.selectedDates[0],!0)===0),nt(q,"endRange",e.selectedDates[1]&&xt(w,e.selectedDates[1],!0)===0),p==="nextMonthDay"&&q.classList.add("inRange")))):q.classList.add("flatpickr-disabled"),e.config.mode==="range"&&md(w)&&!ga(w)&&q.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&p!=="prevMonthDay"&&x%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(w)+"</span>"),Re("onDayCreate",q),q}function Me(p){p.focus(),e.config.mode==="range"&&pe(p)}function Ee(p){for(var w=p>0?0:e.config.showMonths-1,M=p>0?e.config.showMonths:-1,x=w;x!=M;x+=p)for(var $=e.daysContainer.children[x],q=p>0?0:$.children.length-1,he=p>0?$.children.length:-1,G=q;G!=he;G+=p){var ge=$.children[G];if(ge.className.indexOf("hidden")===-1&&U(ge.dateObj))return ge}}function re(p,w){for(var M=p.className.indexOf("Month")===-1?p.dateObj.getMonth():e.currentMonth,x=w>0?e.config.showMonths:-1,$=w>0?1:-1,q=M-e.currentMonth;q!=x;q+=$)for(var he=e.daysContainer.children[q],G=M-e.currentMonth===q?p.$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+=$){var oe=he.children[Z];if(oe.className.indexOf("hidden")===-1&&U(oe.dateObj)&&Math.abs(p.$i-Z)>=Math.abs(w))return Me(oe)}e.changeMonth($),N(Ee($),0)}function N(p,w){var M=o(),x=B(M||document.body),$=p!==void 0?p:x?M:e.selectedDateElem!==void 0&&B(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&B(e.todayDateElem)?e.todayDateElem:Ee(w>0?1:-1);$===void 0?e._input.focus():x?re($,w):Me($)}function F(p,w){for(var M=(new Date(p,w,1).getDay()-e.l10n.firstDayOfWeek+7)%7,x=e.utils.getDaysInMonth((w-1+12)%12,p),$=e.utils.getDaysInMonth(w,p),q=window.document.createDocumentFragment(),he=e.config.showMonths>1,G=he?"prevMonthDay hidden":"prevMonthDay",ge=he?"nextMonthDay hidden":"nextMonthDay",Z=x+1-M,oe=0;Z<=x;Z++,oe++)q.appendChild(le("flatpickr-day "+G,new Date(p,w-1,Z),Z,oe));for(Z=1;Z<=$;Z++,oe++)q.appendChild(le("flatpickr-day",new Date(p,w,Z),Z,oe));for(var Se=$+1;Se<=42-M&&(e.config.showMonths===1||oe%7!==0);Se++,oe++)q.appendChild(le("flatpickr-day "+ge,new Date(p,w+1,Se%$),Se,oe));var en=be("div","dayContainer");return en.appendChild(q),en}function O(){if(e.daysContainer!==void 0){Gi(e.daysContainer),e.weekNumbers&&Gi(e.weekNumbers);for(var p=document.createDocumentFragment(),w=0;w<e.config.showMonths;w++){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),p.appendChild(F(M.getFullYear(),M.getMonth()))}e.daysContainer.appendChild(p),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&pe()}}function Q(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var p=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(p(w)){var M=be("option","flatpickr-monthDropdown-month");M.value=new Date(e.currentYear,w).getMonth().toString(),M.textContent=Xi(w,e.config.shorthandCurrentMonth,e.l10n),M.tabIndex=-1,e.currentMonth===w&&(M.selected=!0),e.monthsDropdownContainer.appendChild(M)}}}function g(){var p=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),P(e.monthsDropdownContainer,"change",function(he){var G=It(he),ge=parseInt(G.value,10);e.changeMonth(ge-e.currentMonth),Re("onMonthChange")}),Q(),M=e.monthsDropdownContainer);var x=Ji("cur-year",{tabindex:"-1"}),$=x.getElementsByTagName("input")[0];$.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&$.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&($.setAttribute("max",e.config.maxDate.getFullYear().toString()),$.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),p.appendChild(w),{container:p,yearElement:$,monthElement:M}}function A(){Gi(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var p=e.config.showMonths;p--;){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(p){e.__hidePrevMonthArrow!==p&&(nt(e.prevMonthNav,"flatpickr-disabled",p),e.__hidePrevMonthArrow=p)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(p){e.__hideNextMonthArrow!==p&&(nt(e.nextMonthNav,"flatpickr-disabled",p),e.__hideNextMonthArrow=p)}}),e.currentYearElement=e.yearElements[0],no(),e.monthNav}function d(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var p=da(e.config);e.timeContainer=be("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var w=be("span","flatpickr-time-separator",":"),M=Ji("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=M.getElementsByTagName("input")[0];var x=Ji("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=x.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=tt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?p.hours:m(p.hours)),e.minuteElement.value=tt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():p.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 $=Ji("flatpickr-second");e.secondElement=$.getElementsByTagName("input")[0],e.secondElement.value=tt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():p.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($)}return e.config.time_24hr||(e.amPM=be("span","flatpickr-am-pm",e.l10n.amPM[Pt((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 y(){e.weekdayContainer?Gi(e.weekdayContainer):e.weekdayContainer=be("div","flatpickr-weekdays");for(var p=e.config.showMonths;p--;){var w=be("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(w)}return D(),e.weekdayContainer}function D(){if(e.weekdayContainer){var p=e.l10n.firstDayOfWeek,w=od(e.l10n.weekdays.shorthand);p>0&&p<w.length&&(w=od(w.splice(p,w.length),w.splice(0,p)));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 p=be("div","flatpickr-weekwrapper");p.appendChild(be("span","flatpickr-weekday",e.l10n.weekAbbreviation));var w=be("div","flatpickr-weeks");return p.appendChild(w),{weekWrapper:p,weekNumbers:w}}function _(p,w){w===void 0&&(w=!0);var M=w?p:p-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,xe("onYearChange"),Q()),O(),xe("onMonthChange"),no())}function T(p,w){if(p===void 0&&(p=!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=da(e.config),x=M.hours,$=M.minutes,q=M.seconds;E(x,$,q)}e.redraw(),p&&xe("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")),xe("onClose")}function Y(){e.config!==void 0&&xe("onDestroy");for(var p=e._handlers.length;p--;)e._handlers[p].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(p){return e.calendarContainer.contains(p)}function V(p){if(e.isOpen&&!e.config.inline){var w=It(p),M=R(w),x=w===e.input||w===e.altInput||e.element.contains(w)||p.path&&p.path.indexOf&&(~p.path.indexOf(e.input)||~p.path.indexOf(e.altInput)),$=!x&&!M&&!R(p.relatedTarget),q=!e.config.ignoredFocusElements.some(function(he){return he.contains(w)});$&&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(p){if(!(!p||e.config.minDate&&p<e.config.minDate.getFullYear()||e.config.maxDate&&p>e.config.maxDate.getFullYear())){var w=p,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(),xe("onYearChange"),Q())}}function U(p,w){var M;w===void 0&&(w=!0);var x=e.parseDate(p,void 0,w);if(e.config.minDate&&x&&xt(x,e.config.minDate,w!==void 0?w:!e.minDateHasTime)<0||e.config.maxDate&&x&&xt(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 $=!!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 $;if(G instanceof Date&&x!==void 0&&G.getTime()===x.getTime())return $;if(typeof G=="string"){var ge=e.parseDate(G,void 0,!0);return ge&&ge.getTime()===x.getTime()?$:!$}else if(typeof G=="object"&&x!==void 0&&G.from&&G.to&&x.getTime()>=G.from.getTime()&&x.getTime()<=G.to.getTime())return $}return!$}function B(p){return e.daysContainer!==void 0?p.className.indexOf("hidden")===-1&&p.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(p):!1}function ee(p){var w=p.target===e._input,M=e._input.value.trimEnd()!==ya();w&&M&&!(p.relatedTarget&&R(p.relatedTarget))&&e.setDate(e._input.value,!0,p.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function ce(p){var w=It(p),M=e.config.wrap?n.contains(w):w===e._input,x=e.config.allowInput,$=e.isOpen&&(!x||!M),q=e.config.inline&&M&&!x;if(p.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)||$||q){var he=!!e.timeContainer&&e.timeContainer.contains(w);switch(p.keyCode){case 13:he?(p.preventDefault(),l(),fa()):mc(p);break;case 27:p.preventDefault(),fa();break;case 8:case 46:M&&!e.config.allowInput&&(p.preventDefault(),e.clear());break;case 37:case 39:if(!he&&!M){p.preventDefault();var G=o();if(e.daysContainer!==void 0&&(x===!1||G&&B(G))){var ge=p.keyCode===39?1:-1;p.ctrlKey?(p.stopPropagation(),_(ge),N(Ee(1),0)):N(void 0,ge)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:p.preventDefault();var Z=p.keyCode===40?1:-1;e.daysContainer&&w.$i!==void 0||w===e.input||w===e.altInput?p.ctrlKey?(p.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(p),e._debouncedChange());break;case 9:if(he){var oe=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Rt){return Rt}),Se=oe.indexOf(w);if(Se!==-1){var en=oe[Se+(p.shiftKey?-1:1)];p.preventDefault(),(en||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(w)&&p.shiftKey&&(p.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&w===e.amPM)switch(p.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],f(),dn();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],f(),dn();break}(M||R(w))&&xe("onKeyDown",p)}function pe(p,w){if(w===void 0&&(w="flatpickr-day"),!(e.selectedDates.length!==1||p&&(!p.classList.contains(w)||p.classList.contains("flatpickr-disabled")))){for(var M=p?p.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),$=Math.min(M,e.selectedDates[0].getTime()),q=Math.max(M,e.selectedDates[0].getTime()),he=!1,G=0,ge=0,Z=$;Z<q;Z+=id.DAY)U(new Date(Z),!0)||(he=he||Z>$&&Z<q,Z<x&&(!G||Z>G)?G=Z:Z>x&&(!ge||Z<ge)&&(ge=Z));var oe=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+w));oe.forEach(function(Se){var en=Se.dateObj,Rt=en.getTime(),$r=G>0&&Rt<G||ge>0&&Rt>ge;if($r){Se.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(hr){Se.classList.remove(hr)});return}else if(he&&!$r)return;["startRange","inRange","endRange","notAllowed"].forEach(function(hr){Se.classList.remove(hr)}),p!==void 0&&(p.classList.add(M<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<M&&Rt===x?Se.classList.add("startRange"):x>M&&Rt===x&&Se.classList.add("endRange"),Rt>=G&&(ge===0||Rt<=ge)&&nd(Rt,x,M)&&Se.classList.add("inRange"))})}}function ve(){e.isOpen&&!e.config.static&&!e.config.inline&&Cn()}function Ce(p,w){if(w===void 0&&(w=e._positionElement),e.isMobile===!0){if(p){p.preventDefault();var M=It(p);M&&M.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),xe("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"),xe("onOpen"),Cn(w)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(p===void 0||!e.timeContainer.contains(p.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function je(p){return function(w){var M=e.config["_"+p+"Date"]=e.parseDate(w,e.config.dateFormat),x=e.config["_"+(p==="min"?"max":"min")+"Date"];M!==void 0&&(e[p==="min"?"minDateHasTime":"maxDateHasTime"]=M.getHours()>0||M.getMinutes()>0||M.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function($){return U($)}),!e.selectedDates.length&&p==="min"&&v(M),dn()),e.daysContainer&&(eo(),M!==void 0?e.currentYearElement[p]=M.getFullYear().toString():e.currentYearElement.removeAttribute(p),e.currentYearElement.disabled=!!x&&M!==void 0&&x.getFullYear()===M.getFullYear())}}function Ze(){var p=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],w=rt(rt({},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(oe){e.config._enable=pc(oe)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(oe){e.config._disable=pc(oe)}});var x=w.mode==="time";if(!w.dateFormat&&(w.enableTime||x)){var $=Be.defaultConfig.dateFormat||Vn.dateFormat;M.dateFormat=w.noCalendar||x?"H:i"+(w.enableSeconds?":S":""):$+" H:i"+(w.enableSeconds?":S":"")}if(w.altInput&&(w.enableTime||x)&&!w.altFormat){var q=Be.defaultConfig.altFormat||Vn.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(oe){return function(Se){e.config[oe==="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<p.length;G++)e.config[p[G]]=e.config[p[G]]===!0||e.config[p[G]]==="true";oa.filter(function(oe){return e.config[oe]!==void 0}).forEach(function(oe){e.config[oe]=ca(e.config[oe]||[]).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)oa.indexOf(Z)>-1?e.config[Z]=ca(ge[Z]).map(a).concat(e.config[Z]):typeof w[Z]>"u"&&(e.config[Z]=ge[Z])}w.altInputClass||(e.config.altInputClass=$t().className+" "+e.config.altInputClass),xe("onParseConfig")}function $t(){return e.config.wrap?n.querySelector("[data-input]"):n}function qn(){typeof e.config.locale!="object"&&typeof Be.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=rt(rt({},Be.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?Be.l10ns[e.config.locale]:void 0),Tn.D="("+e.l10n.weekdays.shorthand.join("|")+")",Tn.l="("+e.l10n.weekdays.longhand.join("|")+")",Tn.M="("+e.l10n.months.shorthand.join("|")+")",Tn.F="("+e.l10n.months.longhand.join("|")+")",Tn.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var p=rt(rt({},t),JSON.parse(JSON.stringify(n.dataset||{})));p.time_24hr===void 0&&Be.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=hc(e),e.parseDate=la({config:e.config,l10n:e.l10n})}function Cn(p){if(typeof e.config.position=="function")return void e.config.position(e,p);if(e.calendarContainer!==void 0){xe("onPreCalendarPosition");var w=p||e._positionElement,M=Array.prototype.reduce.call(e.calendarContainer.children,function(_d,Md){return _d+Md.offsetHeight},0),x=e.calendarContainer.offsetWidth,$=e.config.position.split(" "),q=$[0],he=$.length>1?$[1]:null,G=w.getBoundingClientRect(),ge=window.innerHeight-G.bottom,Z=q==="above"||q!=="below"&&ge<M&&G.top>M,oe=window.pageYOffset+G.top+(Z?-M-2:w.offsetHeight+2);if(nt(e.calendarContainer,"arrowTop",!Z),nt(e.calendarContainer,"arrowBottom",Z),!e.config.inline){var Se=window.pageXOffset+G.left,en=!1,Rt=!1;he==="center"?(Se-=(x-G.width)/2,en=!0):he==="right"&&(Se-=x-G.width,Rt=!0),nt(e.calendarContainer,"arrowLeft",!en&&!Rt),nt(e.calendarContainer,"arrowCenter",en),nt(e.calendarContainer,"arrowRight",Rt);var $r=window.document.body.offsetWidth-(window.pageXOffset+G.right),hr=Se+x>window.document.body.offsetWidth,gd=$r+x>window.document.body.offsetWidth;if(nt(e.calendarContainer,"rightMost",hr),!e.config.static)if(e.calendarContainer.style.top=oe+"px",!hr)e.calendarContainer.style.left=Se+"px",e.calendarContainer.style.right="auto";else if(!gd)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=$r+"px";else{var va=Br();if(va===void 0)return;var yd=window.document.body.offsetWidth,vd=Math.max(0,yd/2-x/2),wd=".flatpickr-calendar.centerMost:before",bd=".flatpickr-calendar.centerMost:after",Dd=va.cssRules.length,Ed="{left:"+G.left+"px;right:auto;}";nt(e.calendarContainer,"rightMost",!1),nt(e.calendarContainer,"centerMost",!0),va.insertRule(wd+","+bd+Ed,Dd),e.calendarContainer.style.left=vd+"px",e.calendarContainer.style.right="auto"}}}}function Br(){for(var p=null,w=0;w<document.styleSheets.length;w++){var M=document.styleSheets[w];if(M.cssRules){try{M.cssRules}catch{continue}p=M;break}}return p??Qi()}function Qi(){var p=document.createElement("style");return document.head.appendChild(p),p.sheet}function eo(){e.config.noCalendar||e.isMobile||(Q(),no(),O())}function fa(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function mc(p){p.preventDefault(),p.stopPropagation();var w=function(oe){return oe.classList&&oe.classList.contains("flatpickr-day")&&!oe.classList.contains("flatpickr-disabled")&&!oe.classList.contains("notAllowed")},M=uc(It(p),w);if(M!==void 0){var x=M,$=e.latestSelectedDateObj=new Date(x.dateObj.getTime()),q=($.getMonth()<e.currentMonth||$.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=x,e.config.mode==="single")e.selectedDates=[$];else if(e.config.mode==="multiple"){var he=ga($);he?e.selectedDates.splice(parseInt(he),1):e.selectedDates.push($)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=$,e.selectedDates.push($),xt($,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(oe,Se){return oe.getTime()-Se.getTime()}));if(f(),q){var G=e.currentYear!==$.getFullYear();e.currentYear=$.getFullYear(),e.currentMonth=$.getMonth(),G&&(xe("onYearChange"),Q()),xe("onMonthChange")}if(no(),O(),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)&&fa()}L()}}var to={locale:[qn,D],showMonths:[A,s,y],minDate:[W],maxDate:[W],positionElement:[gc],clickOpens:[function(){e.config.clickOpens===!0?(P(e._input,"focus",e.open),P(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function sd(p,w){if(p!==null&&typeof p=="object"){Object.assign(e.config,p);for(var M in p)to[M]!==void 0&&to[M].forEach(function(x){return x()})}else e.config[p]=w,to[p]!==void 0?to[p].forEach(function(x){return x()}):oa.indexOf(p)>-1&&(e.config[p]=ca(w));e.redraw(),dn(!0)}function fc(p,w){var M=[];if(p instanceof Array)M=p.map(function(x){return e.parseDate(x,w)});else if(p instanceof Date||typeof p=="number")M=[e.parseDate(p,w)];else if(typeof p=="string")switch(e.config.mode){case"single":case"time":M=[e.parseDate(p,w)];break;case"multiple":M=p.split(e.config.conjunction).map(function(x){return e.parseDate(x,w)});break;case"range":M=p.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(p)));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,$){return x.getTime()-$.getTime()})}function cd(p,w,M){if(w===void 0&&(w=!1),M===void 0&&(M=e.config.dateFormat),p!==0&&!p||p instanceof Array&&p.length===0)return e.clear(w);fc(p,M),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),W(void 0,w),v(),e.selectedDates.length===0&&e.clear(!1),dn(w),w&&xe("onChange")}function pc(p){return p.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 ld(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var p=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);p&&fc(p,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 ud(){if(e.input=$t(),!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"),gc()}function gc(){e._positionElement=e.config.positionElement||e._input}function dd(){var p=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=p,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=p==="datetime-local"?"Y-m-d\\TH:i:S":p==="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{}P(e.mobileInput,"change",function(w){e.setDate(It(w).value,!1,e.mobileFormatStr),xe("onChange"),xe("onClose")})}function hd(p){if(e.isOpen===!0)return e.close();e.open(p)}function xe(p,w){if(e.config!==void 0){var M=e.config[p];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);p==="onChange"&&(e.input.dispatchEvent(pa("change")),e.input.dispatchEvent(pa("input")))}}function pa(p){var w=document.createEvent("Event");return w.initEvent(p,!0,!0),w}function ga(p){for(var w=0;w<e.selectedDates.length;w++){var M=e.selectedDates[w];if(M instanceof Date&&xt(M,p)===0)return""+w}return!1}function md(p){return e.config.mode!=="range"||e.selectedDates.length<2?!1:xt(p,e.selectedDates[0])>=0&&xt(p,e.selectedDates[1])<=0}function no(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(p,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=Xi(M.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=M.getMonth().toString(),p.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 ya(p){var w=p||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(M){return e.formatDate(M,w)}).filter(function(M,x,$){return e.config.mode!=="range"||e.config.enableTime||$.indexOf(M)===x}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function dn(p){p===void 0&&(p=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=ya(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=ya(e.config.altFormat)),p!==!1&&xe("onValueUpdate")}function fd(p){var w=It(p),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 pd(p){p.preventDefault();var w=p.type==="keydown",M=It(p),x=M;e.amPM!==void 0&&M===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Pt(e.amPM.textContent===e.l10n.amPM[0])]);var $=parseFloat(x.getAttribute("min")),q=parseFloat(x.getAttribute("max")),he=parseFloat(x.getAttribute("step")),G=parseInt(x.value,10),ge=p.delta||(w?p.which===38?1:-1:0),Z=G+he*ge;if(typeof x.value<"u"&&x.value.length===2){var oe=x===e.hourElement,Se=x===e.minuteElement;Z<$?(Z=q+Z+Pt(!oe)+(Pt(oe)&&Pt(!e.amPM)),Se&&ne(void 0,-1,e.hourElement)):Z>q&&(Z=x===e.hourElement?Z-q-Pt(!e.amPM):$,Se&&ne(void 0,1,e.hourElement)),e.amPM&&oe&&(he===1?Z+G===23:Math.abs(Z-G)>he)&&(e.amPM.textContent=e.l10n.amPM[Pt(e.amPM.textContent===e.l10n.amPM[0])]),x.value=tt(Z)}}return i(),e}function jr(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=mm(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 jr(this,n)},HTMLElement.prototype.flatpickr=function(n){return jr([this],n)});var Be=function(n,t){return typeof n=="string"?jr(window.document.querySelectorAll(n),t):n instanceof Node?jr([n],t):jr(n,t)};Be.defaultConfig={};Be.l10ns={en:rt({},sa),default:rt({},sa)};Be.localize=function(n){Be.l10ns.default=rt(rt({},Be.l10ns.default),n)};Be.setDefaults=function(n){Be.defaultConfig=rt(rt({},Be.defaultConfig),n)};Be.parseDate=la({});Be.formatDate=hc({});Be.compareDates=xt;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return jr(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=Be);var ad=Be;var ha=class{constructor(t,e){this.dateInputEl=t;H(this,"minDate");H(this,"maxDate");H(this,"defaultReservationDays");H(this,"hasPrices",!1);H(this,"prices",{});H(this,"availability",{});H(this,"disabledDates",[]);H(this,"selectedStartDate");H(this,"selectedEndDate");H(this,"config");H(this,"instance");H(this,"destroyInstance");H(this,"currentDate");H(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??te.getCurrentDate(),defaultEndDate:e.defaultEndDate??te.getCurrentDate(),startWithEmptyDates:r},this.currentDate=te.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=te.toJSDate(t),r=this.selectedEndDate?te.toJSDate(this.selectedEndDate):e;this.selectedStartDate=t,this.instance instanceof ia.Core?this.instance.setStartDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setEndDate(t){let e=this.selectedStartDate?te.toJSDate(this.selectedStartDate):te.toJSDate(t),r=te.toJSDate(t);this.selectedEndDate=t,this.instance instanceof ia.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=te.toJSDate(t),i=te.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:Nu,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:[ra,na,ta],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 m=this.prices[u],f=l.querySelector(`.${Ko}`)||document.createElement("span");f.className=Ko,f.textContent=`${m.toLocaleString(In,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,f.style.color="#c64509",f.style.fontWeight="bold",f.style.fontSize="10px",l.append(f)}}),i.on("select",o=>{let{start:a,end:s}=o.detail;this.selectedStartDate=te.fromString(a.format("YYYY-MM-DD")),this.selectedEndDate=te.fromString(s.format("YYYY-MM-DD"));let l={startDate:a.format("YYYY-MM-DD").toString(),endDate:s.format("YYYY-MM-DD").toString()};At("date:changed",l)})}},r=new ia.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=bc(),r={mode:"range",showMonths:this.config.calendars,minDate:this.minDate.toString(),shorthandCurrentMonth:!0,monthSelectorType:"static",inline:!1,dateFormat:Lu,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=Kt("label",this.dateInputEl);if(o.length===1){if(this.selectedStartDate=te.fromJSDate(o[0]),this.selectedEndDate=null,At("date:changed",{startDate:this.selectedStartDate.toString(),endDate:""}),a){let s=this.formatDate(o[0]);a.textContent=s}}else if(o.length===2){this.selectedStartDate=te.fromJSDate(o[0]),this.selectedEndDate=te.fromJSDate(o[1]);let s={startDate:this.selectedStartDate.toString(),endDate:this.selectedEndDate.toString()};if(At("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(te.toJSDate(this.selectedStartDate))):(this.selectedEndDate=null,At("date:changed",{startDate:"",endDate:""}),a&&(a.textContent="Choose your dates"))},onDayCreate:async(o,a,s,l)=>{let u=l.dateObj,m=te.fromJSDate(u),f=te.formatForAPI(m);if(this.prices[f]){let v=this.prices[f],E=document.createElement("span");E.style.marginTop="2px",E.style.color="#c64509",E.style.fontSize="10px",E.style.fontWeight="bold",E.className=Ko,E.textContent=`${v.toLocaleString(In,{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=ad(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=te.fromJSDate(t),r=e.year,i=String(e.month).padStart(2,"0"),o=String(e.day).padStart(2,"0");return In==="en"?`${r}/${i}/${o}`:In==="fr-FR"||In==="de"?`${o}/${i}/${r}`:`${r}/${i}/${o}`}};var ma=class{constructor(t,e=Ou){this.fsListInstance=t;this.includePrices=e;H(this,"element");H(this,"form");H(this,"apartmentInputEl");H(this,"dateInputEl");H(this,"dateClearEl");H(this,"guestsInputEl");H(this,"couponInputEl");H(this,"submitButtonEl");H(this,"onSubmitCallback");H(this,"calendarInstance");H(this,"dateLabelPlaceholder","");H(this,"cmsAparthotels",[]);H(this,"datedPrices",{});H(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),Wn(this.apartmentInputEl,"change",async r=>{let i=r.target,o=Ur(i);At("apartment:changed",o)})});H(this,"populateCalendarInput",async t=>{if(!this.dateInputEl)return;this.dateInputEl.style.cursor="pointer";let e=new ha(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(Qs),e.setMaximumDate(Fu),e.includePrices(this.includePrices),this.includePrices){let r=await ed(this.cmsAparthotels.map(i=>i.id).filter(i=>i!==t||t==null));e.setPrices(r)}return e.initialize(),e});H(this,"populateGuestsInput",()=>{if(!this.guestsInputEl)return;let t=document.createDocumentFragment(),e=this.guestsInputEl.querySelector("option");e&&t.appendChild(e);let r=i=>`${i} ${Vr(i===1?"guestSingular":"guestPlural")}`;for(let i=1;i<=Hu;i++){let o=document.createElement("option");o.value=i.toString(),o.textContent=r(i),t.appendChild(o)}this.guestsInputEl.replaceChildren(t),Wn(this.guestsInputEl,"change",async i=>{let o=i.target,a=Ur(o);At("guests:changed",a)})});if(Pn("loading:start",r=>ec(!0,r)),Pn("loading:end",r=>ec(!1,r)),this.element=Kt("booking-component"),!this.element)throw new Error("Booking component not found");this.form=this.element.querySelector("form"),this.apartmentInputEl=Kt("location-input",this.element),this.dateInputEl=Kt("date-input",this.element),this.dateClearEl=Kt("date-clear",this.element),this.guestsInputEl=Kt("guests-input",this.element),this.couponInputEl=Kt("coupon-input",this.element),this.submitButtonEl=Kt("submit",this.element),this.onSubmitCallback=zr,this.cmsAparthotels=this.fsListInstance.items.value.map(r=>({id:r.fields["enterprise-id"].value,title:r.fields.title.value})),Pn("apartment:changed",async r=>{r.length===0?He.enterpriseId=null:He.enterpriseId=r,this.calendarInstance&&He.enterpriseId&&await this.updateCalendarForSelectedApartment(He.enterpriseId)}),Pn("date:changed",async r=>{He.startDate=r.startDate||null,He.endDate=r.endDate||null,this.updateDateClearVisibility()}),Pn("guests:changed",async r=>{He.guests=parseInt(r)}),Pn("coupon:changed",async r=>{He.coupon=r}),Pn(["apartment:changed","date:changed","guests:changed","coupon:changed"],async()=>{this.fsListInstance.triggerHook("filter")})}async init(){At("loading:start",this.element),He.enterpriseId=null,He.coupon=null,He.startDate=null,He.endDate=null,He.guests=2;try{if(this.initSubmitButton(),this.apartmentInputEl&&this.populateApartmentsInput(),this.dateInputEl){let t=Kt("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=He.enterpriseId||void 0;this.calendarInstance=await this.populateCalendarInput(r)}return e}),this.updateDateClearVisibility(),this.setupDateClearClickHandler()}return this.guestsInputEl&&this.populateGuestsInput(),this.couponInputEl&&Wn(this.couponInputEl,"change",async t=>{let e=t.target,r=Ur(e);At("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()}),Wn(this.submitButtonEl,"click",()=>{if(this.fsListInstance.renderedItems.size!==1||!He.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=!!(He.startDate&&He.endDate);this.dateClearEl.style.display=t?"flex":"none"}setupDateClearClickHandler(){this.dateClearEl&&Wn(this.dateClearEl,"click",t=>{t.preventDefault(),He.startDate=null,He.endDate=null,this.calendarInstance?.clear();let e=this.dateInputEl?Kt("label",this.dateInputEl):null;e&&(e.textContent=this.dateLabelPlaceholder),At("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)}}};function pm(n){let t=n.find(r=>r.instance==="apartments");if(!t){console.error("No apartments list instance found");return}new ma(t).init().then(r=>At("loading:end",r?.element)).catch(r=>{throw ju(!0,void 0),console.error("Error initializing booking component:",r),r})}window.FinsweetAttributes=window.FinsweetAttributes||[];window.FinsweetAttributes.push(["list",async n=>{pm(n)}]);export{pm as home};
7
+ `}}function b(){e.calendarContainer.classList.add("hasWeeks");var p=be("div","flatpickr-weekwrapper");p.appendChild(be("span","flatpickr-weekday",e.l10n.weekAbbreviation));var w=be("div","flatpickr-weeks");return p.appendChild(w),{weekWrapper:p,weekNumbers:w}}function _(p,w){w===void 0&&(w=!0);var M=w?p:p-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,Re("onYearChange"),Q()),O(),Re("onMonthChange"),no())}function T(p,w){if(p===void 0&&(p=!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=da(e.config),x=M.hours,$=M.minutes,q=M.seconds;E(x,$,q)}e.redraw(),p&&Re("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")),Re("onClose")}function Y(){e.config!==void 0&&Re("onDestroy");for(var p=e._handlers.length;p--;)e._handlers[p].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(p){return e.calendarContainer.contains(p)}function V(p){if(e.isOpen&&!e.config.inline){var w=It(p),M=R(w),x=w===e.input||w===e.altInput||e.element.contains(w)||p.path&&p.path.indexOf&&(~p.path.indexOf(e.input)||~p.path.indexOf(e.altInput)),$=!x&&!M&&!R(p.relatedTarget),q=!e.config.ignoredFocusElements.some(function(he){return he.contains(w)});$&&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(p){if(!(!p||e.config.minDate&&p<e.config.minDate.getFullYear()||e.config.maxDate&&p>e.config.maxDate.getFullYear())){var w=p,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(),Re("onYearChange"),Q())}}function U(p,w){var M;w===void 0&&(w=!0);var x=e.parseDate(p,void 0,w);if(e.config.minDate&&x&&xt(x,e.config.minDate,w!==void 0?w:!e.minDateHasTime)<0||e.config.maxDate&&x&&xt(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 $=!!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 $;if(G instanceof Date&&x!==void 0&&G.getTime()===x.getTime())return $;if(typeof G=="string"){var ge=e.parseDate(G,void 0,!0);return ge&&ge.getTime()===x.getTime()?$:!$}else if(typeof G=="object"&&x!==void 0&&G.from&&G.to&&x.getTime()>=G.from.getTime()&&x.getTime()<=G.to.getTime())return $}return!$}function B(p){return e.daysContainer!==void 0?p.className.indexOf("hidden")===-1&&p.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(p):!1}function ee(p){var w=p.target===e._input,M=e._input.value.trimEnd()!==ya();w&&M&&!(p.relatedTarget&&R(p.relatedTarget))&&e.setDate(e._input.value,!0,p.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function ce(p){var w=It(p),M=e.config.wrap?n.contains(w):w===e._input,x=e.config.allowInput,$=e.isOpen&&(!x||!M),q=e.config.inline&&M&&!x;if(p.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)||$||q){var he=!!e.timeContainer&&e.timeContainer.contains(w);switch(p.keyCode){case 13:he?(p.preventDefault(),l(),fa()):mc(p);break;case 27:p.preventDefault(),fa();break;case 8:case 46:M&&!e.config.allowInput&&(p.preventDefault(),e.clear());break;case 37:case 39:if(!he&&!M){p.preventDefault();var G=o();if(e.daysContainer!==void 0&&(x===!1||G&&B(G))){var ge=p.keyCode===39?1:-1;p.ctrlKey?(p.stopPropagation(),_(ge),N(Ee(1),0)):N(void 0,ge)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:p.preventDefault();var Z=p.keyCode===40?1:-1;e.daysContainer&&w.$i!==void 0||w===e.input||w===e.altInput?p.ctrlKey?(p.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(p),e._debouncedChange());break;case 9:if(he){var oe=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Rt){return Rt}),Se=oe.indexOf(w);if(Se!==-1){var en=oe[Se+(p.shiftKey?-1:1)];p.preventDefault(),(en||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(w)&&p.shiftKey&&(p.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&w===e.amPM)switch(p.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],f(),dn();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],f(),dn();break}(M||R(w))&&Re("onKeyDown",p)}function pe(p,w){if(w===void 0&&(w="flatpickr-day"),!(e.selectedDates.length!==1||p&&(!p.classList.contains(w)||p.classList.contains("flatpickr-disabled")))){for(var M=p?p.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),$=Math.min(M,e.selectedDates[0].getTime()),q=Math.max(M,e.selectedDates[0].getTime()),he=!1,G=0,ge=0,Z=$;Z<q;Z+=id.DAY)U(new Date(Z),!0)||(he=he||Z>$&&Z<q,Z<x&&(!G||Z>G)?G=Z:Z>x&&(!ge||Z<ge)&&(ge=Z));var oe=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+w));oe.forEach(function(Se){var en=Se.dateObj,Rt=en.getTime(),$r=G>0&&Rt<G||ge>0&&Rt>ge;if($r){Se.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(hr){Se.classList.remove(hr)});return}else if(he&&!$r)return;["startRange","inRange","endRange","notAllowed"].forEach(function(hr){Se.classList.remove(hr)}),p!==void 0&&(p.classList.add(M<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<M&&Rt===x?Se.classList.add("startRange"):x>M&&Rt===x&&Se.classList.add("endRange"),Rt>=G&&(ge===0||Rt<=ge)&&nd(Rt,x,M)&&Se.classList.add("inRange"))})}}function ve(){e.isOpen&&!e.config.static&&!e.config.inline&&Pn()}function Ce(p,w){if(w===void 0&&(w=e._positionElement),e.isMobile===!0){if(p){p.preventDefault();var M=It(p);M&&M.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),Re("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"),Re("onOpen"),Pn(w)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(p===void 0||!e.timeContainer.contains(p.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function je(p){return function(w){var M=e.config["_"+p+"Date"]=e.parseDate(w,e.config.dateFormat),x=e.config["_"+(p==="min"?"max":"min")+"Date"];M!==void 0&&(e[p==="min"?"minDateHasTime":"maxDateHasTime"]=M.getHours()>0||M.getMinutes()>0||M.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function($){return U($)}),!e.selectedDates.length&&p==="min"&&v(M),dn()),e.daysContainer&&(eo(),M!==void 0?e.currentYearElement[p]=M.getFullYear().toString():e.currentYearElement.removeAttribute(p),e.currentYearElement.disabled=!!x&&M!==void 0&&x.getFullYear()===M.getFullYear())}}function Ze(){var p=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],w=rt(rt({},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(oe){e.config._enable=pc(oe)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(oe){e.config._disable=pc(oe)}});var x=w.mode==="time";if(!w.dateFormat&&(w.enableTime||x)){var $=Be.defaultConfig.dateFormat||Vn.dateFormat;M.dateFormat=w.noCalendar||x?"H:i"+(w.enableSeconds?":S":""):$+" H:i"+(w.enableSeconds?":S":"")}if(w.altInput&&(w.enableTime||x)&&!w.altFormat){var q=Be.defaultConfig.altFormat||Vn.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(oe){return function(Se){e.config[oe==="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<p.length;G++)e.config[p[G]]=e.config[p[G]]===!0||e.config[p[G]]==="true";oa.filter(function(oe){return e.config[oe]!==void 0}).forEach(function(oe){e.config[oe]=ca(e.config[oe]||[]).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)oa.indexOf(Z)>-1?e.config[Z]=ca(ge[Z]).map(a).concat(e.config[Z]):typeof w[Z]>"u"&&(e.config[Z]=ge[Z])}w.altInputClass||(e.config.altInputClass=$t().className+" "+e.config.altInputClass),Re("onParseConfig")}function $t(){return e.config.wrap?n.querySelector("[data-input]"):n}function qn(){typeof e.config.locale!="object"&&typeof Be.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=rt(rt({},Be.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?Be.l10ns[e.config.locale]:void 0),Cn.D="("+e.l10n.weekdays.shorthand.join("|")+")",Cn.l="("+e.l10n.weekdays.longhand.join("|")+")",Cn.M="("+e.l10n.months.shorthand.join("|")+")",Cn.F="("+e.l10n.months.longhand.join("|")+")",Cn.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var p=rt(rt({},t),JSON.parse(JSON.stringify(n.dataset||{})));p.time_24hr===void 0&&Be.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=hc(e),e.parseDate=la({config:e.config,l10n:e.l10n})}function Pn(p){if(typeof e.config.position=="function")return void e.config.position(e,p);if(e.calendarContainer!==void 0){Re("onPreCalendarPosition");var w=p||e._positionElement,M=Array.prototype.reduce.call(e.calendarContainer.children,function(_d,Md){return _d+Md.offsetHeight},0),x=e.calendarContainer.offsetWidth,$=e.config.position.split(" "),q=$[0],he=$.length>1?$[1]:null,G=w.getBoundingClientRect(),ge=window.innerHeight-G.bottom,Z=q==="above"||q!=="below"&&ge<M&&G.top>M,oe=window.pageYOffset+G.top+(Z?-M-2:w.offsetHeight+2);if(nt(e.calendarContainer,"arrowTop",!Z),nt(e.calendarContainer,"arrowBottom",Z),!e.config.inline){var Se=window.pageXOffset+G.left,en=!1,Rt=!1;he==="center"?(Se-=(x-G.width)/2,en=!0):he==="right"&&(Se-=x-G.width,Rt=!0),nt(e.calendarContainer,"arrowLeft",!en&&!Rt),nt(e.calendarContainer,"arrowCenter",en),nt(e.calendarContainer,"arrowRight",Rt);var $r=window.document.body.offsetWidth-(window.pageXOffset+G.right),hr=Se+x>window.document.body.offsetWidth,gd=$r+x>window.document.body.offsetWidth;if(nt(e.calendarContainer,"rightMost",hr),!e.config.static)if(e.calendarContainer.style.top=oe+"px",!hr)e.calendarContainer.style.left=Se+"px",e.calendarContainer.style.right="auto";else if(!gd)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=$r+"px";else{var va=Br();if(va===void 0)return;var yd=window.document.body.offsetWidth,vd=Math.max(0,yd/2-x/2),wd=".flatpickr-calendar.centerMost:before",bd=".flatpickr-calendar.centerMost:after",Dd=va.cssRules.length,Ed="{left:"+G.left+"px;right:auto;}";nt(e.calendarContainer,"rightMost",!1),nt(e.calendarContainer,"centerMost",!0),va.insertRule(wd+","+bd+Ed,Dd),e.calendarContainer.style.left=vd+"px",e.calendarContainer.style.right="auto"}}}}function Br(){for(var p=null,w=0;w<document.styleSheets.length;w++){var M=document.styleSheets[w];if(M.cssRules){try{M.cssRules}catch{continue}p=M;break}}return p??Qi()}function Qi(){var p=document.createElement("style");return document.head.appendChild(p),p.sheet}function eo(){e.config.noCalendar||e.isMobile||(Q(),no(),O())}function fa(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function mc(p){p.preventDefault(),p.stopPropagation();var w=function(oe){return oe.classList&&oe.classList.contains("flatpickr-day")&&!oe.classList.contains("flatpickr-disabled")&&!oe.classList.contains("notAllowed")},M=uc(It(p),w);if(M!==void 0){var x=M,$=e.latestSelectedDateObj=new Date(x.dateObj.getTime()),q=($.getMonth()<e.currentMonth||$.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=x,e.config.mode==="single")e.selectedDates=[$];else if(e.config.mode==="multiple"){var he=ga($);he?e.selectedDates.splice(parseInt(he),1):e.selectedDates.push($)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=$,e.selectedDates.push($),xt($,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(oe,Se){return oe.getTime()-Se.getTime()}));if(f(),q){var G=e.currentYear!==$.getFullYear();e.currentYear=$.getFullYear(),e.currentMonth=$.getMonth(),G&&(Re("onYearChange"),Q()),Re("onMonthChange")}if(no(),O(),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)&&fa()}L()}}var to={locale:[qn,D],showMonths:[A,s,y],minDate:[W],maxDate:[W],positionElement:[gc],clickOpens:[function(){e.config.clickOpens===!0?(P(e._input,"focus",e.open),P(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function sd(p,w){if(p!==null&&typeof p=="object"){Object.assign(e.config,p);for(var M in p)to[M]!==void 0&&to[M].forEach(function(x){return x()})}else e.config[p]=w,to[p]!==void 0?to[p].forEach(function(x){return x()}):oa.indexOf(p)>-1&&(e.config[p]=ca(w));e.redraw(),dn(!0)}function fc(p,w){var M=[];if(p instanceof Array)M=p.map(function(x){return e.parseDate(x,w)});else if(p instanceof Date||typeof p=="number")M=[e.parseDate(p,w)];else if(typeof p=="string")switch(e.config.mode){case"single":case"time":M=[e.parseDate(p,w)];break;case"multiple":M=p.split(e.config.conjunction).map(function(x){return e.parseDate(x,w)});break;case"range":M=p.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(p)));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,$){return x.getTime()-$.getTime()})}function cd(p,w,M){if(w===void 0&&(w=!1),M===void 0&&(M=e.config.dateFormat),p!==0&&!p||p instanceof Array&&p.length===0)return e.clear(w);fc(p,M),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),W(void 0,w),v(),e.selectedDates.length===0&&e.clear(!1),dn(w),w&&Re("onChange")}function pc(p){return p.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 ld(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var p=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);p&&fc(p,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 ud(){if(e.input=$t(),!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"),gc()}function gc(){e._positionElement=e.config.positionElement||e._input}function dd(){var p=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=p,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=p==="datetime-local"?"Y-m-d\\TH:i:S":p==="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{}P(e.mobileInput,"change",function(w){e.setDate(It(w).value,!1,e.mobileFormatStr),Re("onChange"),Re("onClose")})}function hd(p){if(e.isOpen===!0)return e.close();e.open(p)}function Re(p,w){if(e.config!==void 0){var M=e.config[p];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);p==="onChange"&&(e.input.dispatchEvent(pa("change")),e.input.dispatchEvent(pa("input")))}}function pa(p){var w=document.createEvent("Event");return w.initEvent(p,!0,!0),w}function ga(p){for(var w=0;w<e.selectedDates.length;w++){var M=e.selectedDates[w];if(M instanceof Date&&xt(M,p)===0)return""+w}return!1}function md(p){return e.config.mode!=="range"||e.selectedDates.length<2?!1:xt(p,e.selectedDates[0])>=0&&xt(p,e.selectedDates[1])<=0}function no(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(p,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=Xi(M.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=M.getMonth().toString(),p.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 ya(p){var w=p||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(M){return e.formatDate(M,w)}).filter(function(M,x,$){return e.config.mode!=="range"||e.config.enableTime||$.indexOf(M)===x}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function dn(p){p===void 0&&(p=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=ya(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=ya(e.config.altFormat)),p!==!1&&Re("onValueUpdate")}function fd(p){var w=It(p),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 pd(p){p.preventDefault();var w=p.type==="keydown",M=It(p),x=M;e.amPM!==void 0&&M===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Pt(e.amPM.textContent===e.l10n.amPM[0])]);var $=parseFloat(x.getAttribute("min")),q=parseFloat(x.getAttribute("max")),he=parseFloat(x.getAttribute("step")),G=parseInt(x.value,10),ge=p.delta||(w?p.which===38?1:-1:0),Z=G+he*ge;if(typeof x.value<"u"&&x.value.length===2){var oe=x===e.hourElement,Se=x===e.minuteElement;Z<$?(Z=q+Z+Pt(!oe)+(Pt(oe)&&Pt(!e.amPM)),Se&&ne(void 0,-1,e.hourElement)):Z>q&&(Z=x===e.hourElement?Z-q-Pt(!e.amPM):$,Se&&ne(void 0,1,e.hourElement)),e.amPM&&oe&&(he===1?Z+G===23:Math.abs(Z-G)>he)&&(e.amPM.textContent=e.l10n.amPM[Pt(e.amPM.textContent===e.l10n.amPM[0])]),x.value=tt(Z)}}return i(),e}function jr(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=mm(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 jr(this,n)},HTMLElement.prototype.flatpickr=function(n){return jr([this],n)});var Be=function(n,t){return typeof n=="string"?jr(window.document.querySelectorAll(n),t):n instanceof Node?jr([n],t):jr(n,t)};Be.defaultConfig={};Be.l10ns={en:rt({},sa),default:rt({},sa)};Be.localize=function(n){Be.l10ns.default=rt(rt({},Be.l10ns.default),n)};Be.setDefaults=function(n){Be.defaultConfig=rt(rt({},Be.defaultConfig),n)};Be.parseDate=la({});Be.formatDate=hc({});Be.compareDates=xt;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return jr(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=Be);var ad=Be;var ha=class{constructor(t,e){this.dateInputEl=t;H(this,"minDate");H(this,"maxDate");H(this,"defaultReservationDays");H(this,"hasPrices",!1);H(this,"prices",{});H(this,"availability",{});H(this,"disabledDates",[]);H(this,"selectedStartDate");H(this,"selectedEndDate");H(this,"config");H(this,"instance");H(this,"destroyInstance");H(this,"currentDate");H(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??te.getCurrentDate(),defaultEndDate:e.defaultEndDate??te.getCurrentDate(),startWithEmptyDates:r},this.currentDate=te.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=te.toJSDate(t),r=this.selectedEndDate?te.toJSDate(this.selectedEndDate):e;this.selectedStartDate=t,this.instance instanceof ia.Core?this.instance.setStartDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setEndDate(t){let e=this.selectedStartDate?te.toJSDate(this.selectedStartDate):te.toJSDate(t),r=te.toJSDate(t);this.selectedEndDate=t,this.instance instanceof ia.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=te.toJSDate(t),i=te.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:Nu,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:[ra,na,ta],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 m=this.prices[u],f=l.querySelector(`.${Ko}`)||document.createElement("span");f.className=Ko,f.textContent=`${m.toLocaleString(In,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,f.style.color="#c64509",f.style.fontWeight="bold",f.style.fontSize="10px",l.append(f)}}),i.on("select",o=>{let{start:a,end:s}=o.detail;this.selectedStartDate=te.fromString(a.format("YYYY-MM-DD")),this.selectedEndDate=te.fromString(s.format("YYYY-MM-DD"));let l={startDate:a.format("YYYY-MM-DD").toString(),endDate:s.format("YYYY-MM-DD").toString()};At("date:changed",l)})}},r=new ia.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=bc(),r={mode:"range",showMonths:this.config.calendars,minDate:this.minDate.toString(),shorthandCurrentMonth:!0,monthSelectorType:"static",inline:!1,dateFormat:Lu,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=Kt("label",this.dateInputEl);if(o.length===1){if(this.selectedStartDate=te.fromJSDate(o[0]),this.selectedEndDate=null,At("date:changed",{startDate:this.selectedStartDate.toString(),endDate:""}),a){let s=this.formatDate(o[0]);a.textContent=s}}else if(o.length===2){this.selectedStartDate=te.fromJSDate(o[0]),this.selectedEndDate=te.fromJSDate(o[1]);let s={startDate:this.selectedStartDate.toString(),endDate:this.selectedEndDate.toString()};if(At("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(te.toJSDate(this.selectedStartDate))):(this.selectedEndDate=null,At("date:changed",{startDate:"",endDate:""}),a&&(a.textContent="Choose your dates"))},onDayCreate:async(o,a,s,l)=>{let u=l.dateObj,m=te.fromJSDate(u),f=te.formatForAPI(m);if(this.prices[f]){let v=this.prices[f],E=document.createElement("span");E.style.marginTop="2px",E.style.color="#c64509",E.style.fontSize="10px",E.style.fontWeight="bold",E.className=Ko,E.textContent=`${v.toLocaleString(In,{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=ad(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=te.fromJSDate(t),r=e.year,i=String(e.month).padStart(2,"0"),o=String(e.day).padStart(2,"0");return In==="en"?`${r}/${i}/${o}`:In==="fr-FR"||In==="de"?`${o}/${i}/${r}`:`${r}/${i}/${o}`}};var ma=class{constructor(t,e=Ou){this.fsListInstance=t;this.includePrices=e;H(this,"element");H(this,"form");H(this,"apartmentInputEl");H(this,"dateInputEl");H(this,"dateClearEl");H(this,"guestsInputEl");H(this,"couponInputEl");H(this,"submitButtonEl");H(this,"onSubmitCallback");H(this,"calendarInstance");H(this,"dateLabelPlaceholder","");H(this,"cmsAparthotels",[]);H(this,"datedPrices",{});H(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),Wn(this.apartmentInputEl,"change",async r=>{let i=r.target,o=Ur(i);At("apartment:changed",o)})});H(this,"populateCalendarInput",async t=>{if(!this.dateInputEl)return;this.dateInputEl.style.cursor="pointer";let e=new ha(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(Qs),e.setMaximumDate(Fu),e.includePrices(this.includePrices),this.includePrices){let r=await ed(this.cmsAparthotels.map(i=>i.id).filter(i=>i!==t||t==null));e.setPrices(r)}return e.initialize(),e});H(this,"populateGuestsInput",()=>{if(!this.guestsInputEl)return;let t=document.createDocumentFragment(),e=this.guestsInputEl.querySelector("option");e&&t.appendChild(e);let r=i=>`${i} ${Vr(i===1?"guestSingular":"guestPlural")}`;for(let i=1;i<=Hu;i++){let o=document.createElement("option");o.value=i.toString(),o.textContent=r(i),t.appendChild(o)}this.guestsInputEl.replaceChildren(t),Wn(this.guestsInputEl,"change",async i=>{let o=i.target,a=Ur(o);At("guests:changed",a)})});if(hn("loading:start",r=>ec(!0,r)),hn("loading:end",r=>ec(!1,r)),this.element=Kt("booking-component"),!this.element)throw new Error("Booking component not found");this.form=this.element.querySelector("form"),this.apartmentInputEl=Kt("location-input",this.element),this.dateInputEl=Kt("date-input",this.element),this.dateClearEl=Kt("date-clear",this.element),this.guestsInputEl=Kt("guests-input",this.element),this.couponInputEl=Kt("coupon-input",this.element),this.submitButtonEl=Kt("submit",this.element),this.onSubmitCallback=zr,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?xe.enterpriseId=null:xe.enterpriseId=r,this.calendarInstance&&xe.enterpriseId&&await this.updateCalendarForSelectedApartment(xe.enterpriseId)}),hn("date:changed",async r=>{xe.startDate=r.startDate||null,xe.endDate=r.endDate||null,this.updateDateClearVisibility()}),hn("guests:changed",async r=>{xe.guests=parseInt(r)}),hn("coupon:changed",async r=>{xe.coupon=r}),hn(["apartment:changed","guests:changed","coupon:changed"],async()=>{this.fsListInstance.triggerHook("filter")}),hn("date:changed",async()=>{(xe.startDate&&xe.endDate||!xe.startDate&&!xe.endDate)&&this.fsListInstance.triggerHook("filter")})}async init(){At("loading:start",this.element),xe.enterpriseId=null,xe.coupon=null,xe.startDate=null,xe.endDate=null,xe.guests=2;try{if(this.initSubmitButton(),this.apartmentInputEl&&this.populateApartmentsInput(),this.dateInputEl){let t=Kt("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=xe.enterpriseId||void 0;this.calendarInstance=await this.populateCalendarInput(r)}return e}),this.updateDateClearVisibility(),this.setupDateClearClickHandler()}return this.guestsInputEl&&this.populateGuestsInput(),this.couponInputEl&&Wn(this.couponInputEl,"change",async t=>{let e=t.target,r=Ur(e);At("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()}),Wn(this.submitButtonEl,"click",()=>{if(this.fsListInstance.renderedItems.size!==1||!xe.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=!!(xe.startDate&&xe.endDate);this.dateClearEl.style.display=t?"flex":"none"}setupDateClearClickHandler(){this.dateClearEl&&Wn(this.dateClearEl,"click",t=>{t.preventDefault(),xe.startDate=null,xe.endDate=null,this.calendarInstance?.clear();let e=this.dateInputEl?Kt("label",this.dateInputEl):null;e&&(e.textContent=this.dateLabelPlaceholder),At("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)}}};function pm(n){let t=n.find(r=>r.instance==="apartments");if(!t){console.error("No apartments list instance found");return}new ma(t).init().then(r=>At("loading:end",r?.element)).catch(r=>{throw ju(!0,void 0),console.error("Error initializing booking component:",r),r})}window.FinsweetAttributes=window.FinsweetAttributes||[];window.FinsweetAttributes.push(["list",async n=>{pm(n)}]);export{pm as home};
8
8
  /*! Bundled license information:
9
9
 
10
10
  @vue/shared/dist/shared.esm-bundler.js: