@rikdotcodes/temporal-polyfill 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/global.min.js ADDED
@@ -0,0 +1 @@
1
+ !function(){"use strict";function n(n,r,e,o,i){return t(r,((n,t)=>{const r=n[t];if(void 0===r)throw new TypeError(Ao(t));return r})(n,r),e,o,i)}function t(n,t,r,e,o,i){const u=b(t,r,e);if(o&&t!==u)throw new RangeError(Wo(n,t,r,e,i));return u}function r(n){return null!==n&&/object|function/.test(typeof n)}function e(n,t=Map){const r=new t;return(t,...e)=>{if(r.has(t))return r.get(t);const o=n(t,...e);return r.set(t,o),o}}function o(n){return i({name:n},1)}function i(n,t){return a((n=>({value:n,configurable:1,writable:!t})),n)}function u(n){return a((n=>({get:n,configurable:1})),n)}function c(n){return{[Symbol.toStringTag]:{value:n,configurable:1}}}function s(n,t){const r={};let e=n.length;for(const o of t)r[n[--e]]=o;return r}function a(n,t,r){const e={};for(const o in t)e[o]=n(t[o],o,r);return e}function f(n,t,r){const e={};for(let o=0;o<t.length;o++){const i=t[o];e[i]=n(i,o,r)}return e}function h(n,t,r){const e={};for(let o=0;o<n.length;o++)e[t[o]]=r[n[o]];return e}function l(n,t){const r=Object.create(null);for(const e of n)r[e]=t[e];return r}function d(n,t){for(const r of t)if(r in n)return 1;return 0}function w(n,t,r){for(const e of n)if(t[e]!==r[e])return 0;return 1}function m(n,t,r){const e={...r};for(let r=0;r<t;r++)e[n[r]]=0;return e}function g(n,...t){return(...r)=>n(...t,...r)}function y(n){return n[0].toUpperCase()+n.substring(1)}function v(n){return n.slice().sort()}function p(n,t){return String(t).padStart(n,"0")}function M(n,t){return Math.sign(n-t)}function b(n,t,r){return Math.min(Math.max(n,t),r)}function E(n,t){return[Math.floor(n/t),R(n,t)]}function R(n,t){return(n%t+t)%t}function I(n,t){return[T(n,t),O(n,t)]}function T(n,t){return Math.trunc(n/t)||0}function O(n,t){return n%t||0}function S(n){return.5===Math.abs(n%1)}function P(n,t,r){let e=0,o=0;for(let i=0;i<=t;i++){const t=n[r[i]],u=ki[i],c=$i/u,[s,a]=I(t,c);e+=a*u,o+=s}const[i,u]=I(e,$i);return[o+i,u]}function D(n,t,r){const e={};for(let o=t;o>=0;o--){const t=ki[o];e[r[o]]=T(n,t),n=O(n,t)}return e}function N(n,t){let[r,e]=I(t,$i),o=n+r;const i=Math.sign(o);return i&&i===-Math.sign(e)&&(o-=i,e+=i*$i),[o,e]}function Y(n,t,r=1){return N(n[0]+t[0]*r,n[1]+t[1]*r)}function j(n,t){return N(n[0],n[1]+t)}function C(n,t){return Y(t,n,-1)}function Z(n,t){return M(n[0],t[0])||M(n[1],t[1])}function $(n,t,r){return-1===Z(n,t)||1===Z(n,r)}function k(n,t=1){const r=BigInt($i/t);return[Number(n/r),Number(n%r)*t]}function F(n,t=1){const r=$i/t,[e,o]=I(n,r);return[e,o*t]}function L(n,t=1,r){const[e,o]=n,[i,u]=I(o,t);return e*($i/t)+(i+(r?u/t:0))}function W(n,t,r=E){const[e,o]=n,[i,u]=r(o,t);return[e*($i/t)+i,u]}function B(n){if(void 0!==n)return U(n)}function A(n){return _(U(n))}function U(n){return H(Wi(n))}function q(n,t){if(null==t)throw new RangeError(Ao(n));return t}function x(n){if(!r(n))throw new TypeError(Lo);return n}function J(n,t,r=n){if(typeof t!==n)throw new TypeError(Bo(r,t));return t}function H(n,t="number"){if(!Number.isInteger(n))throw new RangeError(jo(t,n));return n||0}function _(n,t="number"){if(n<=0)throw new RangeError(Co(t,n));return n}function z(n){if("symbol"==typeof n)throw new TypeError(Fo);return String(n)}function G(n,t){return r(n)?String(n):Fi(n,t)}function V(n){if("string"==typeof n)return BigInt(n);if("bigint"!=typeof n)throw new TypeError(ko(n));return n}function K(n,t="number"){if("bigint"==typeof n)throw new TypeError($o(t));if(n=Number(n),!Number.isFinite(n))throw new RangeError(Zo(t,n));return n}function Q(n,t){return Math.trunc(K(n,t))||0}function X(n,t){return H(K(n,t),t)}function nn(n,t){return _(Q(n,t),t)}function tn(t){return n(t,"isoYear",Yu,Nu,1),t.isoYear===Yu?n(t,"isoMonth",4,12,1):t.isoYear===Nu&&n(t,"isoMonth",1,9,1),t}function rn(n){return en({...n,...Iu,isoHour:12}),n}function en(t){const r=n(t,"isoYear",Yu,Nu,1),e=r===Yu?1:r===Nu?-1:0;return e&&on(fn({...t,isoDay:t.isoDay+e,isoNanosecond:t.isoNanosecond-e})),t}function on(n){if(!n||$(n,Du,Pu))throw new RangeError(li);return n}function un(n){return P(n,5,vu)[1]}function cn(n){const[t,r]=E(n,$i);return[D(r,5,vu),t]}function sn(n){return W(n,ji)}function an(n){return dn(n.isoYear,n.isoMonth,n.isoDay,n.isoHour,n.isoMinute,n.isoSecond,n.isoMillisecond)}function fn(n){const t=an(n);if(void 0!==t){const[r,e]=I(t,Pi);return[r,e*Yi+(n.isoMicrosecond||0)*Ni+(n.isoNanosecond||0)]}}function hn(n,t){const[r,e]=cn(un(n)-t);return on(fn({...n,isoDay:n.isoDay+e,...r}))}function ln(...n){return dn(...n)/Di}function dn(...n){const[t,r]=wn(...n),e=t.valueOf();if(!isNaN(e))return e-r*Pi}function wn(n,t=1,r=1,e=0,o=0,i=0,u=0){const c=n===Yu?1:n===Nu?-1:0,s=new Date(0);return s.setUTCHours(e,o,i,u),s.setUTCFullYear(n,t-1,r+c),[s,c]}function mn(n,t){let[r,e]=j(n,t);e<0&&(e+=$i,r-=1);const[o,i]=E(e,Yi),[u,c]=E(i,Ni);return gn(r*Pi+o,u,c)}function gn(n,t=0,r=0){const e=Math.ceil(Math.max(0,Math.abs(n)-Su)/Pi)*Math.sign(n),o=new Date(n-e*Pi);return s(Mu,[o.getUTCFullYear(),o.getUTCMonth()+1,o.getUTCDate()+e,o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds(),t,r])}function yn(n,t){if(t<-Su)throw new RangeError(li);const r=n.formatToParts(t),e={};for(const n of r)e[n.type]=n.value;return e}function vn(n){return[n.isoYear,n.isoMonth,n.isoDay]}function pn(n,t){return[t,0]}function Mn(){return ku}function bn(n,t){switch(t){case 2:return Rn(n)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function En(n){return Rn(n)?366:365}function Rn(n){return n%4==0&&(n%100!=0||n%400==0)}function In(n){const[t,r]=wn(n.isoYear,n.isoMonth,n.isoDay);return R(t.getUTCDay()-r,7)||7}function Tn(n){return this.id===du?(({isoYear:n})=>n<1?["gregory-inverse",1-n]:["gregory",n])(n):this.id===wu?Lu(n):[]}function On(n){return Sn(n),Nn(n,1),n}function Sn(n){return Dn(n,1),n}function Pn(n){return w(pu,n,Dn(n))}function Dn(t,r){const{isoYear:e}=t,o=n(t,"isoMonth",1,Mn(),r);return{isoYear:e,isoMonth:o,isoDay:n(t,"isoDay",1,bn(e,o),r)}}function Nn(t,r){return s(vu,[n(t,"isoHour",0,23,r),n(t,"isoMinute",0,59,r),n(t,"isoSecond",0,59,r),n(t,"isoMillisecond",0,999,r),n(t,"isoMicrosecond",0,999,r),n(t,"isoNanosecond",0,999,r)])}function Yn(n){return e((t=>{const r=an(t);return n(r)}),WeakMap)}function jn(n){const t=n(0).year-Zu;return e((r=>{let e,o=dn(r-t),i=0;const u=[],c=[];do{o+=400*Pi}while((e=n(o)).year<=r);do{if(o+=(1-e.day)*Pi,e.year===r&&(u.push(o),c.push(e.C)),o-=Pi,++i>100||o<-Su)throw new RangeError(ri)}while((e=n(o)).year>=r);return{q:u.reverse(),j:Ri(c.reverse())}}))}function Cn(n,t){let r,e,o=Zn(n);if(n.era){const i=mu[t],u=gu[t]||{};void 0!==i&&(r="islamic"===t?"ah":n.era.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g,""),"bc"===r||"b"===r?r="bce":"ad"===r||"a"===r?r="ce":"beforeroc"===r&&(r="broc"),r=u[r]||r,e=o,o=nt(e,i[r]||0))}return{era:r,eraYear:e,year:o}}function Zn(n){return parseInt(n.relatedYear||n.year)}function $n(n){const{year:t,C:r,day:e}=this.R(n),{j:o}=this.U(t);return[t,o[r]+1,e]}function kn(n,t=1,r=1){return this.U(n).q[t-1]+(r-1)*Pi}function Fn(n,t){const r=Ln.call(this,n);return[Xn(t,r),r===t]}function Ln(n){const t=qn(this,n),r=qn(this,n-1),e=t.length;if(e>r.length){const n=rt(this);if(n<0)return-n;for(let n=0;n<e;n++)if(t[n]!==r[n])return n+1}}function Wn(n){return Hr(kn.call(this,n),kn.call(this,n+1))}function Bn(n,t){const{q:r}=this.U(n);let e=t+1,o=r;return e>r.length&&(e=1,o=this.U(n+1).q),Hr(r[t-1],o[e-1])}function An(n){return this.U(n).q.length}function Un(n){const t=this.R(n);return[t.era,t.eraYear]}function qn(n,t){return Object.keys(n.U(t).j)}function xn(n){return Jn(Fi(n))}function Jn(n){if((n=n.toLowerCase())!==lu&&n!==du){const t=xu(n).resolvedOptions().calendar;if(Hn(n)!==Hn(t))throw new RangeError(ei(n));return t}return n}function Hn(n){return"islamicc"===n&&(n="islamic"),n.split("-")[0]}function _n(n){return this.B(n)[0]}function zn(n){return this.B(n)[1]}function Gn(n){const[t]=this.I(n);return Hr(this.k(t),an(n))+1}function Vn(n){const t=Ju.exec(n);if(!t)throw new RangeError(Qo(n));return[parseInt(t[1]),Boolean(t[2])]}function Kn(n,t){return"M"+Ti(n)+(t?"L":"")}function Qn(n,t,r){return n+(t||r&&n>=r?1:0)}function Xn(n,t){return n-(t&&n>=t?1:0)}function nt(n,t){return(t+n)*(Math.sign(t)||1)||0}function tt(n){return mu[et(n)]}function rt(n){return yu[et(n)]}function et(n){return Hn(n.id||lu)}function ot(n){return void 0===n?0:oc(x(n))}function it(n,t=0){n=mt(n);const r=ic(n),e=uc(n,t);return[oc(n),e,r]}function ut(n,t,r,e=9,o=0,i=4){t=mt(t);let u=rc(t,e,o),c=lt(t),s=fc(t,i);const a=tc(t,e,o,1);return null==u?u=Math.max(r,a):Mt(u,a),c=dt(c,a,1),n&&(s=(n=>n<4?(n+2)%4:n)(s)),[u,a,c,s]}function ct(n,t=6,r){let e=lt(n=gt(n,Hu));const o=fc(n,7);let i=tc(n,t);return i=q(Hu,i),e=dt(e,i,void 0,r),[i,e,o]}function st(n){return cc(mt(n))}function at(n,t){return ft(mt(n),t)}function ft(n,t=4){const r=wt(n);return[fc(n,4),...ht(tc(n,t),r)]}function ht(n,t){return null!=n?[ki[n],n<4?9-3*n:-1]:[void 0===t?1:10**(9-t),t]}function lt(n){const t=n[zu];return void 0===t?1:Q(t,zu)}function dt(n,r,e,o){const i=o?$i:ki[r+1];if(i){const e=ki[r];if(i%((n=t(zu,n,1,i/e-(o?0:1),1))*e))throw new RangeError(Bo(zu,n))}else n=t(zu,n,1,e?10**9:1,1);return n}function wt(n){let r=n[Gu];if(void 0!==r){if("number"!=typeof r){if("auto"===z(r))return;throw new RangeError(Bo(Gu,r))}r=t(Gu,Math.floor(r),0,9,1)}return r}function mt(n){return void 0===n?{}:x(n)}function gt(n,t){return"string"==typeof n?{[t]:n}:x(n)}function yt(n){return{overflow:Xu[n]}}function vt(n,r,e=9,o=0,i){let u=r[n];if(void 0===u)return i?o:void 0;if(u=z(u),"auto"===u)return i?o:null;let c=Oi[u];if(void 0===c&&(c=Ji[u]),void 0===c)throw new RangeError(Jo(n,u,Oi));return t(n,c,o,e,1,Si),c}function pt(n,t,r,e=0){const o=r[n];if(void 0===o)return e;const i=z(o),u=t[i];if(void 0===u)throw new RangeError(Jo(n,i,t));return u}function Mt(n,t){if(t>n)throw new RangeError(yi)}function bt(n){return{branding:yc,epochNanoseconds:n}}function Et(n,t,r){return{branding:gc,calendar:r,timeZone:t,epochNanoseconds:n}}function Rt(n,t=n.calendar){return{branding:wc,calendar:t,...l(Ru,n)}}function It(n,t=n.calendar){return{branding:dc,calendar:t,...l(bu,n)}}function Tt(n,t=n.calendar){return{branding:hc,calendar:t,...l(bu,n)}}function Ot(n,t=n.calendar){return{branding:lc,calendar:t,...l(bu,n)}}function St(n){return{branding:mc,...l(Eu,n)}}function Pt(n){return{branding:vc,sign:oe(n),...l(Ai,n)}}function Dt(n){return W(n.epochNanoseconds,Yi)[0]}function Nt(n){return n.epochNanoseconds}function Yt(n,t){return L(ce(n),ki[t],1)}function jt(n,t,r,e,o,i,u){const c=Bi[r],s={...t,[c]:t[c]+e},a=u(n,o,t),f=u(n,o,s);return[i(a),i(f)]}function Ct(n,t,r){const e=L(C(t,r));if(!e)throw new RangeError(ri);return L(C(t,n))/e}function Zt(n,t,r,e){return $t(n,Lt(t,r),e)}function $t(n,t,r){const[e,o]=kt(n,t,r);return en({...Yr(n,o),...e})}function kt(n,t,r){return cn(Jt(un(n),t,r))}function Ft(n){return Jt(n,Ci,7)}function Lt(n,t){return ki[n]*t}function Wt(n){const t=Bt(n);return[t,Yr(t,1)]}function Bt(n){return Tu(6,n)}function At(n,t,r){const e=Math.min(he(n),6);return se(xt(ce(n,e),t,r),e)}function Ut(n,t,r,e,o,i,u,c,s,a){if(0===e&&1===o)return n;const f=ne(e,c)?Xr(c)&&e<6&&r>=6?zt:_t:Gt;let[h,l,d]=f(n,t,r,e,o,i,u,c,s,a);return d&&7!==e&&(h=((n,t,r,e,o,i,u,c)=>{const s=oe(n);for(let a=e+1;a<=r;a++){if(7===a&&7!==r)continue;const e=zi(a,n);e[Bi[a]]+=s;const f=L(C(u(c(o,i,e)),t));if(f&&Math.sign(f)!==s)break;n=e}return n})(h,l,r,Math.max(6,e),u,c,s,a)),h}function qt(n,t,r,e,o){if(6===t){const t=(n=>n[0]+n[1]/$i)(n);return[Jt(t,r,e),0]}return xt(n,Lt(t,r),e,o)}function xt(n,t,r,e){let[o,i]=n;e&&i<0&&(i+=$i,o-=1);const[u,c]=E(Jt(i,t,r),$i);return N(o+u,c)}function Jt(n,t,r){return Ht(n/t,r)*t}function Ht(n,t){return pc[t](n)}function _t(n,t,r,e,o,i){const u=oe(n),c=ce(n),s=qt(c,e,o,i),a=C(c,s),f=Math.sign(s[0]-c[0])===u,h=se(s,Math.min(r,6));return[{...n,...h},Y(t,a),f]}function zt(n,t,r,e,o,i,u,c,s,a){const f=oe(n)||1,h=L(ce(n,5)),l=Lt(e,o);let d=Jt(h,l,i);const[w,m]=jt(u,{...n,..._i},6,f,c,s,a),g=d-L(C(w,m));let y=0;g&&Math.sign(g)!==f?t=j(w,d):(y+=f,d=Jt(g,l,i),t=j(m,d));const v=ae(d);return[{...n,...v,days:n.days+y},t,Boolean(y)]}function Gt(n,t,r,e,o,i,u,c,s,a){const f=oe(n),h=Bi[e],l=zi(e,n);7===e&&(n={...n,weeks:n.weeks+Math.trunc(n.days/7)});const d=T(n[h],o)*o;l[h]=d;const[w,m]=jt(u,l,e,o*f,c,s,a),g=d+Ct(t,w,m)*f*o,y=Jt(g,o,i),v=Math.sign(y-g)===f;return l[h]=y,[l,v?m:w,v]}function Vt(n,t,r,e){const[o,i,u,c]=(n=>{const t=ft(n=mt(n));return[n.timeZone,...t]})(e),s=void 0!==o;return((n,t,r,e,o,i)=>{r=xt(r,o,e,1);const u=t.u(r);return ur(mn(r,u),i)+(n?hr(Ft(u)):"Z")})(s,t(s?n(o):Wu),r.epochNanoseconds,i,u,c)}function Kt(n,t,r){const[e,o,i,u,c,s]=(n=>{n=mt(n);const t=cc(n),r=wt(n),e=ac(n),o=fc(n,4),i=tc(n,4);return[t,sc(n),e,o,...ht(i,r)]})(r);return((n,t,r,e,o,i,u,c,s,a)=>{e=xt(e,s,c,1);const f=n(r).u(e);return ur(mn(e,f),a)+hr(Ft(f),u)+((n,t)=>1!==t?"["+(2===t?"!":"")+n+"]":"")(r,i)+lr(t,o)})(n,t.calendar,t.timeZone,t.epochNanoseconds,e,o,i,u,c,s)}function Qt(n,t){const[r,e,o,i]=(n=>(n=mt(n),[cc(n),...ft(n)]))(t);return u=n.calendar,c=r,s=i,ur($t(n,o,e),s)+lr(u,c);var u,c,s}function Xt(n,t){return r=n.calendar,e=n,o=st(t),cr(e)+lr(r,o);var r,e,o}function nr(n,t){return or(n.calendar,sr,n,st(t))}function tr(n,t){return or(n.calendar,ar,n,st(t))}function rr(n,t){const[r,e,o]=at(t);return i=o,fr(kt(n,e,r)[0],i);var i}function er(n,t){const[r,e,o]=at(t,3);return e>1&&ie(n={...n,...At(n,e,r)}),((n,t)=>{const{sign:r}=n,e=-1===r?ee(n):n,{hours:o,minutes:i}=e,[u,c]=W(ce(e,3),ji,I);ue(u);const s=wr(c,t),a=t>=0||!r||s;return(r<0?"-":"")+"P"+ir({Y:gr(e.years),M:gr(e.months),W:gr(e.weeks),D:gr(e.days)})+(o||i||u||a?"T"+ir({H:gr(o),M:gr(i),S:gr(u,a)+s}):"")})(n,o)}function or(n,t,r,e){const o=e>1||0===e&&n!==lu;return 1===e?n===lu?t(r):cr(r):o?cr(r)+dr(n,2===e):t(r)}function ir(n){const t=[];for(const r in n){const e=n[r];e&&t.push(e,r)}return t.join("")}function ur(n,t){return cr(n)+"T"+fr(n,t)}function cr(n){return sr(n)+"-"+Ti(n.isoDay)}function sr(n){const{isoYear:t}=n;return(t<0||t>9999?mr(t)+p(6,Math.abs(t)):p(4,t))+"-"+Ti(n.isoMonth)}function ar(n){return Ti(n.isoMonth)+"-"+Ti(n.isoDay)}function fr(n,t){const r=[Ti(n.isoHour),Ti(n.isoMinute)];return-1!==t&&r.push(Ti(n.isoSecond)+((n,t,r,e)=>wr(n*Yi+t*Ni+r,e))(n.isoMillisecond,n.isoMicrosecond,n.isoNanosecond,t)),r.join(":")}function hr(n,t=0){if(1===t)return"";const[r,e]=E(Math.abs(n),Zi),[o,i]=E(e,Ci),[u,c]=E(i,ji);return mr(n)+Ti(r)+":"+Ti(o)+(u||c?":"+Ti(u)+wr(c):"")}function lr(n,t){return 1!==t&&(t>1||0===t&&n!==lu)?dr(n,2===t):""}function dr(n,t){return"["+(t?"!":"")+"u-ca="+n+"]"}function wr(n,t){let r=p(9,n);return r=void 0===t?r.replace(Mc,""):r.slice(0,t),r?"."+r:""}function mr(n){return n<0?"-":"+"}function gr(n,t){return n||t?n.toLocaleString("fullwide",{useGrouping:0}):""}function yr(n,t,r,e=0,o=0,i,u){if(void 0!==r&&1===e&&(1===e||u))return hn(t,r);const c=n.l(t);if(void 0!==r&&3!==e){const n=((n,t,r,e)=>{const o=fn(t);e&&(r=Ft(r));for(const t of n){let n=L(C(t,o));if(e&&(n=Ft(n)),n===r)return t}})(c,t,r,i);if(void 0!==n)return n;if(0===e)throw new RangeError(fi)}return u?fn(t):vr(n,t,o,c)}function vr(n,t,r=0,e=n.l(t)){if(1===e.length)return e[0];if(1===r)throw new RangeError(hi);if(e.length)return e[3===r?1:0];const o=fn(t),i=((n,t)=>{const r=n.u(j(t,-$i));return(n=>{if(n>$i)throw new RangeError(ai);return n})(n.u(j(t,$i))-r)})(n,o),u=i*(2===r?-1:1);return(e=n.l(mn(o,u)))[2===r?0:e.length-1]}function pr(n,t){const r=n.l(t);if(r.length)return r[0];const e=j(fn(t),-$i);return n.i(e,1)}function Mr(n,t,r){return bt(on(Y(t.epochNanoseconds,(n=>{if(fe(n))throw new RangeError(gi);return ce(n,5)})(n?ee(r):r))))}function br(n,t,r,e,o,i=Object.create(null)){const u=t(e.timeZone),c=n(e.calendar);return{...e,...Or(u,c,e,r?ee(o):o,i)}}function Er(n,t,r,e,o=Object.create(null)){const{calendar:i}=r;return Rt(Sr(n(i),r,t?ee(e):e,o),i)}function Rr(n,t,r,e,o){const{calendar:i}=r;return It(Pr(n(i),r,t?ee(e):e,o),i)}function Ir(n,t,r,e,o){const i=r.calendar,u=n(i);let c=rn(Dr(u,r));t&&(e=re(e)),e.sign<0&&(c=u.m(c,{...Hi,months:1}),c=Yr(c,-1));const s=u.m(c,e,o);return Tt(Dr(u,s),i)}function Tr(n,t,r){return St(Nr(t,n?ee(r):r)[0])}function Or(n,t,r,e,o){const i=ce(e,5);let u=r.epochNanoseconds;if(fe(e)){const c=bc(r,n);u=Y(vr(n,{...Pr(t,c,{...e,..._i},o),...l(vu,c)}),i)}else u=Y(u,i),ot(o);return{epochNanoseconds:on(u)}}function Sr(n,t,r,e){const[o,i]=Nr(t,r);return en({...Pr(n,t,{...r,..._i,days:r.days+i},e),...o})}function Pr(n,t,r,e){if(r.years||r.months||r.weeks)return n.m(t,r,e);ot(e);const o=r.days+ce(r,5)[0];return o?rn(Yr(t,o)):t}function Dr(n,t,r=1){return Yr(t,r-n.day(t))}function Nr(n,t){const[r,e]=ce(t,5),[o,i]=cn(un(n)+e);return[o,r+i]}function Yr(n,t){return t?{...n,...gn(an(n)+t*Pi)}:n}function jr(n,t,r,e){const o=ut(n,e,3,5),i=qr(t.epochNanoseconds,r.epochNanoseconds,...o);return Pt(n?ee(i):i)}function Cr(n,t,r,e,o,i){const u=zr(e.calendar,o.calendar),[c,s,a,f]=ut(r,i,5),h=e.epochNanoseconds,l=o.epochNanoseconds,d=Z(l,h);let w;if(d)if(c<6)w=qr(h,l,c,s,a,f);else{const r=t(((n,t)=>{if(!Be(n,t))throw new RangeError(ui);return n})(e.timeZone,o.timeZone)),h=n(u);w=Ar(h,r,e,o,d,c,i),w=Ut(w,l,c,s,a,f,h,e,Nt,g(Or,r))}else w=Hi;return Pt(r?ee(w):w)}function Zr(n,t,r,e,o){const i=zr(r.calendar,e.calendar),[u,c,s,a]=ut(t,o,6),f=fn(r),h=fn(e),l=Z(h,f);let d;if(l)if(u<=6)d=qr(f,h,u,c,s,a);else{const t=n(i);d=Ur(t,r,e,l,u,o),d=Ut(d,h,u,c,s,a,t,r,fn,Sr)}else d=Hi;return Pt(t?ee(d):d)}function $r(n,t,r,e,o){const i=zr(r.calendar,e.calendar);return Fr(t,(()=>n(i)),r,e,...ut(t,o,6,9,6))}function kr(n,t,r,e,o){const i=zr(r.calendar,e.calendar),u=ut(t,o,9,9,8),c=n(i),s=Dr(c,r),a=Dr(c,e);return s.isoYear===a.isoYear&&s.isoMonth===a.isoMonth&&s.isoDay===a.isoDay?Pt(Hi):Fr(t,(()=>c),rn(s),rn(a),...u,8)}function Fr(n,t,r,e,o,i,u,c,s=6){const a=fn(r),f=fn(e);if(void 0===a||void 0===f)throw new RangeError(li);let h;if(Z(f,a))if(6===o)h=qr(a,f,o,i,u,c);else{const n=t();h=n.O(r,e,o),i===s&&1===u||(h=Ut(h,f,o,i,u,c,n,r,fn,Pr))}else h=Hi;return Pt(n?ee(h):h)}function Lr(n,t,r,e){const[o,i,u,c]=ut(n,e,5,5),s=Jt(_r(t,r),Lt(i,u),c),a={...Hi,...ae(s,o)};return Pt(n?ee(a):a)}function Wr(n,t,r,e,o,i){const u=Z(e.epochNanoseconds,r.epochNanoseconds);return u?o<6?xr(r.epochNanoseconds,e.epochNanoseconds,o):Ar(t,n,r,e,u,o,i):Hi}function Br(n,t,r,e,o){const i=fn(t),u=fn(r),c=Z(u,i);return c?e<=6?xr(i,u,e):Ur(n,t,r,c,e,o):Hi}function Ar(n,t,r,e,o,i,u){const[c,s,a]=((n,t,r,e)=>{function o(){return h={...Yr(c,a++*-e),...u},d=vr(n,h),Z(s,d)===-e}const i=bc(t,n),u=l(vu,i),c=bc(r,n),s=r.epochNanoseconds;let a=0;const f=_r(i,c);let h,d;if(Math.sign(f)===-e&&a++,o()&&(-1===e||o()))throw new RangeError(ri);const w=L(C(d,s));return[i,h,w]})(t,r,e,o);var f,h;return{...6===i?(f=c,h=s,{...Hi,days:Jr(f,h)}):n.O(c,s,i,u),...ae(a)}}function Ur(n,t,r,e,o,i){const[u,c,s]=((n,t,r)=>{let e=t,o=_r(n,t);return Math.sign(o)===-r&&(e=Yr(t,-r),o+=$i*r),[n,e,o]})(t,r,e);return{...n.O(u,c,o,i),...ae(s)}}function qr(n,t,r,e,o,i){return{...Hi,...se(qt(C(n,t),e,o,i),r)}}function xr(n,t,r){return{...Hi,...se(C(n,t),r)}}function Jr(n,t){return Hr(an(n),an(t))}function Hr(n,t){return Math.trunc((t-n)/Pi)}function _r(n,t){return un(t)-un(n)}function zr(n,t){if(n!==t)throw new RangeError(oi);return n}function Gr(n,t,r){const e=n(r.calendar);return Xr(r)?[r,e,t(r.timeZone)]:[{...r,...Iu},e]}function Vr(n){return n?Nt:fn}function Kr(n){return n?g(Or,n):Sr}function Qr(n){return n?g(Wr,n):Br}function Xr(n){return n&&n.epochNanoseconds}function ne(n,t){return n<=6-(Xr(t)?1:0)}function te(n,t,r,e,o,i,u){const c=n(mt(u).relativeTo),s=Math.max(he(o),he(i));if(ne(s,c))return Pt(ie(((n,t,r,e)=>{const o=Y(ce(n),ce(t),e?-1:1);if(!Number.isFinite(o[0]))throw new RangeError(li);return{...Hi,...se(o,r)}})(o,i,s,e)));if(!c)throw new RangeError(mi);e&&(i=ee(i));const[a,f,h]=Gr(t,r,c),l=Kr(h),d=Qr(h),w=l(f,a,o);return Pt(d(f,a,l(f,w,i),s))}function re(n){return Pt(ee(n))}function ee(n){const t={};for(const r of Bi)t[r]=-1*n[r]||0;return t}function oe(n,t=Bi){let r=0;for(const e of t){const t=Math.sign(n[e]);if(t){if(r&&r!==t)throw new RangeError(wi);r=t}}return r}function ie(n){for(const r of xi)t(r,n[r],-Ec,Ec,1);return ue(L(ce(n),ji)),n}function ue(n){if(!Number.isSafeInteger(n))throw new RangeError(di)}function ce(n,t=6){return P(n,t,Bi)}function se(n,t=6){const[r,e]=n,o=D(e,t,Bi);if(o[Bi[t]]+=r*($i/ki[t]),!Number.isFinite(o[Bi[t]]))throw new RangeError(li);return o}function ae(n,t=5){return D(n,t,Bi)}function fe(n){return Boolean(oe(n,qi))}function he(n){let t=9;for(;t>0&&!n[Bi[t]];t--);return t}function le(n,t){return[n,t]}function de(n){const t=Math.floor(n/Bu)*Bu;return[t,t+Bu]}function we(n){const t=Ie(n);if(void 0===t)throw new RangeError(vi(n));return t}function me(n,t,r){let e=be(Fi(n));if(!e||e.p)throw new RangeError(vi(n));return t?e.calendar===lu&&(e=-271821===e.isoYear&&4===e.isoMonth?{...e,isoDay:20,...Iu}:{...e,isoDay:1,...Iu}):r&&e.calendar===lu&&(e={...e,isoYear:$u}),It(e.h?ve(e):pe(e))}function ge(n){if(n.calendar!==lu)throw new RangeError(pi(n.calendar))}function ye(n,t,r=0,e=0){const o=je(n.timeZone),i=Rc(o);let u;return On(n),u=n.h?yr(i,n,t,r,e,!i.F,n.p):pr(i,n),Et(u,o,Jn(n.calendar))}function ve(n){return Me(en(On(n)))}function pe(n){return Me(rn(Sn(n)))}function Me(n){return{...n,calendar:Jn(n.calendar)}}function be(n){const t=kc.exec(n);return t?(n=>{const t=n[10],r="Z"===(t||"").toUpperCase();return{isoYear:Te(n),isoMonth:parseInt(n[4]),isoDay:parseInt(n[5]),...Oe(n.slice(5)),...Se(n[16]),h:Boolean(n[6]),p:r,offset:r?void 0:t}})(t):void 0}function Ee(n){const t=Zc.exec(n);return t?(n=>({isoYear:Te(n),isoMonth:parseInt(n[4]),isoDay:1,...Se(n[5])}))(t):void 0}function Re(n){const t=$c.exec(n);return t?(n=>({isoYear:$u,isoMonth:parseInt(n[1]),isoDay:parseInt(n[2]),...Se(n[3])}))(t):void 0}function Ie(n,t){const r=Lc.exec(n);return r?((n,t)=>{const r=n[4]||n[5];if(t&&r)throw new RangeError(pi(r));return(n=>{if(Math.abs(n)>=$i)throw new RangeError(si);return n})((Ye(n[2])*Zi+Ye(n[3])*Ci+Ye(n[4])*ji+Pe(n[5]||""))*Ne(n[1]))})(r,t):void 0}function Te(n){const t=Ne(n[1]),r=parseInt(n[2]||n[3]);if(t<0&&!r)throw new RangeError(pi(-0));return t*r}function Oe(n){const t=Ye(n[3]);return{...cn(Pe(n[4]||""))[0],isoHour:Ye(n[1]),isoMinute:Ye(n[2]),isoSecond:60===t?59:t}}function Se(n){let t,r;const e=[];if(n.replace(Wc,((n,o,i)=>{const u=Boolean(o),[c,s]=i.split("=").reverse();if(s){if("u-ca"===s)e.push(c),t||(t=u);else if(u||/[A-Z]/.test(s))throw new RangeError(pi(n))}else{if(r)throw new RangeError(pi(n));r=c}return""})),e.length>1&&t)throw new RangeError(pi(n));return{timeZone:r,calendar:e[0]||lu}}function Pe(n){return parseInt(n.padEnd(9,"0"))}function De(n){return new RegExp(`^${n}$`,"i")}function Ne(n){return n&&"+"!==n?-1:1}function Ye(n){return void 0===n?0:parseInt(n)}function je(n){const t=Ze(n);return"number"==typeof t?hr(t):t?(n=>{if(qc.test(n))throw new RangeError(ii(n));if(Uc.test(n))throw new RangeError(ci);return n.toLowerCase().split("/").map(((n,t)=>(n.length<=3||/\d/.test(n))&&!/etc|yap/.test(n)?n.toUpperCase():n.replace(/baja|dumont|[a-z]+/g,((n,r)=>n.length<=2&&!t||"in"===n||"chat"===n?n.toUpperCase():n.length>2||!r?y(n).replace(/island|noronha|murdo|rivadavia|urville/,y):n)))).join("/")})(n):Wu}function Ce(n){const t=Ze(n);return"number"==typeof t?t:t?t.resolvedOptions().timeZone:Wu}function Ze(n){const t=Ie(n=n.toUpperCase(),1);return void 0!==t?t:n!==Wu?Ac(n):void 0}function $e(n,t){return Z(n.epochNanoseconds,t.epochNanoseconds)}function ke(n,t){return Z(n.epochNanoseconds,t.epochNanoseconds)}function Fe(n,t){return Le(n,t)||We(n,t)}function Le(n,t){return M(an(n),an(t))}function We(n,t){return M(un(n),un(t))}function Be(n,t){if(n===t)return 1;try{return Ce(n)===Ce(t)}catch(n){}}function Ae(n,t){return r=>r===lu?n:r===du||r===wu?Object.assign(Object.create(n),{id:r}):Object.assign(Object.create(t),qu(r))}function Ue(n,t,r,e=[],o=[]){return qe(t,[...n.fields(r),...o].sort(),e)}function qe(n,t,r,e=!r){const o={};let i,u=0;for(const e of t){if(e===i)throw new RangeError(qo(e));if("constructor"===e||"__proto__"===e)throw new RangeError(Uo(e));let t=n[e];if(void 0!==t)u=1,Xc[e]&&(t=Xc[e](t,e)),o[e]=t;else if(r){if(r.includes(e))throw new TypeError(Ao(e));o[e]=hu[e]}i=e}if(e&&!u)throw new TypeError(xo(t));return o}function xe(n,t){return Nn(ns({...hu,...n}),t)}function Je(n,t,r,e,o){t=l(r=n.fields(r),t),e=qe(e,o=n.fields(o),[]);let i=n.V(t,e);return i=qe(i,[...r,...o].sort(),[]),n.L(i)}function He(n,t){const r=tt(n),e=gu[n.id||""]||{};let{era:o,eraYear:i,year:u}=t;if(void 0!==o||void 0!==i){if(void 0===o||void 0===i)throw new TypeError(zo);if(!r)throw new RangeError(_o);const n=r[e[o]||o];if(void 0===n)throw new RangeError(Vo(o));const t=nt(i,n);if(void 0!==u&&u!==t)throw new RangeError(Go);u=t}else if(void 0===u)throw new TypeError(Ko(r));return u}function _e(n,r,e,o){let{month:i,monthCode:u}=r;if(void 0!==u){const t=((n,t,r,e)=>{const o=n._(r),[i,u]=Vn(t);let c=Qn(i,u,o);if(u){const t=rt(n);if(void 0===t)throw new RangeError(ti);if(t>0){if(c>t)throw new RangeError(ti);if(void 0===o){if(1===e)throw new RangeError(ti);c--}}else{if(c!==-t)throw new RangeError(ti);if(void 0===o&&1===e)throw new RangeError(ti)}}return c})(n,u,e,o);if(void 0!==i&&i!==t)throw new RangeError(Xo);i=t,o=1}else if(void 0===i)throw new TypeError(ni);return t("month",i,1,n.J(e),o)}function ze(t,r,e,o,i){return n(r,"day",1,t.K(o,e),i)}function Ge(n,t,r,e){let o=0;const i=[];for(const n of r)void 0!==t[n]?o=1:i.push(n);if(Object.assign(n,t),o)for(const t of e||i)delete n[t]}function Ve(n){const t=Kc(n.calendar),[r,e,o]=t.I(n),[i,u]=t.N(r,e);return{year:r,monthCode:Kn(i,u),day:o}}function Ke(n,t){return Rt(bc(t,n))}function Qe(n,t){return It(bc(t,n))}function Xe(n,t){return St(bc(t,n))}function no(n,t,r,e,s){function f(...n){if(!(this instanceof f))throw new TypeError(Ho);os(this,t(...n))}function h(n,t){return Object.defineProperties((function(...t){return n.call(this,l(this),...t)}),o(t))}function l(t){const r=es(t);if(!r||r.branding!==n)throw new TypeError(Ho);return r}return Object.defineProperties(f.prototype,{...u(a(h,r)),...i(a(h,e)),...c("Temporal."+n)}),Object.defineProperties(f,{...i(s),...o(n)}),[f,n=>{const t=Object.create(f.prototype);return os(t,n),t},l]}function to(n){if(es(n)||void 0!==n.calendar||void 0!==n.timeZone)throw new TypeError("Invalid bag");return n}function ro(n){return eo(n)||lu}function eo(n){const{calendar:t}=n;if(void 0!==t)return oo(t)}function oo(n){if(r(n)){const{calendar:t}=es(n)||{};if(!t)throw new TypeError(ei(n));return t}return(n=>Jn((n=>{const t=be(n)||Ee(n)||Re(n);return t?t.calendar:n})(Fi(n))))(n)}function io(n){const t={};for(const r in n)t[r]=n=>{const{calendar:t}=n;return Qc(t)[r](n)};return t}function uo(){throw new TypeError("Cannot use valueOf")}function co(n){if(r(n)){const{timeZone:t}=es(n)||{};if(!t)throw new TypeError(ii(n));return t}return(n=>je((n=>{const t=be(n);return t&&(t.timeZone||t.p&&Wu||t.offset)||n})(Fi(n))))(n)}function so(n){if(r(n)){const t=es(n);return t&&t.branding===vc?t:(n=>{const t=qe(n,Ai);return Pt(ie({...Hi,...t}))})(n)}return(n=>{const t=(n=>{const t=Bc.exec(n);return t?(n=>{function t(n,t,i){let u=0,c=0;if(i&&([u,o]=E(o,ki[i])),void 0!==n){if(e)throw new RangeError(pi(n));c=(n=>{const t=parseInt(n);if(!Number.isFinite(t))throw new RangeError(pi(n));return t})(n),r=1,t&&(o=Pe(t)*(ki[i]/ji),e=1)}return u+c}let r=0,e=0,o=0,i={...s(Bi,[t(n[2]),t(n[3]),t(n[4]),t(n[5]),t(n[6],n[7],5),t(n[8],n[9],4),t(n[10],n[11],3)]),...D(o,2,Bi)};if(!r)throw new RangeError(xo(Bi));return Ne(n[1])<0&&(i=ee(i)),i})(t):void 0})(Fi(n));if(!t)throw new RangeError(vi(n));return Pt(ie(t))})(n)}function ao(n){if(void 0!==n){if(r(n)){const t=es(n)||{};switch(t.branding){case gc:case dc:return t;case wc:return It(t)}const r=ro(n);return{...((n,t,r,e)=>{const o=Ue(r,e,su,[],Xi);if(void 0!==o.timeZone){const e=r.L(o),i=xe(o),u=n(o.timeZone);return{epochNanoseconds:yr(t(u),{...e,...i},void 0!==o.offset?we(o.offset):void 0),timeZone:u}}return{...r.L(o),...Iu}})(co,Rc,Qc(r),n),calendar:r}}return(n=>{const t=be(Fi(n));if(!t)throw new RangeError(vi(n));if(t.timeZone)return ye(t,t.offset?we(t.offset):void 0);if(t.p)throw new RangeError(vi(n));return pe(t)})(n)}}function fo(n,t,r){const e=new Set(r);return(o,i)=>{const u=r&&d(o,r);if(!d(o=((n,t)=>{const r={};for(const e in t)n.has(e)||(r[e]=t[e]);return r})(e,o),n)){if(i&&u)throw new TypeError("Invalid formatting options");o={...t,...o}}return r&&(o.timeZone=Wu,["full","long"].includes(o.X)&&(o.X="medium")),o}}function ho(n,t=lo,r=0){const[e,,,o]=n;return(i,u=zs,...c)=>{const s=t(o&&o(...c),i,u,e,r),a=s.resolvedOptions();return[s,...wo(n,a,c)]}}function lo(n,t,r,e,o){if(r=e(r,o),n){if(void 0!==r.timeZone)throw new TypeError(Ei);r.timeZone=n}return new ju(t,r)}function wo(n,t,r){const[,e,o]=n;return r.map((n=>(n.calendar&&((n,t,r)=>{if((r||n!==lu)&&n!==t)throw new RangeError(oi)})(n.calendar,t.calendar,o),e(n,t))))}function mo(n,t){return{...n,calendar:t}}function go(n,t){if(r(n)){const r=es(n)||{};switch(r.branding){case mc:return ot(t),r;case wc:return ot(t),St(r);case gc:return ot(t),Xe(Rc,r)}return((n,t)=>St(xe(qe(n,Vi,[],1),ot(t))))(n,t)}const e=(n=>{let t,r=(n=>{const t=Fc.exec(n);return t?(Se(t[10]),Oe(t)):void 0})(Fi(n));if(!r){if(r=be(n),!r)throw new RangeError(vi(n));if(!r.h)throw new RangeError(vi(n));if(r.p)throw new RangeError(pi("Z"));ge(r)}if((t=Ee(n))&&Pn(t))throw new RangeError(vi(n));if((t=Re(n))&&Pn(t))throw new RangeError(vi(n));return St(Nn(r,1))})(n);return ot(t),e}function yo(n){return void 0===n?void 0:go(n)}function vo(n,t){if(r(n)){const r=es(n)||{};switch(r.branding){case wc:return ot(t),r;case dc:return ot(t),Rt({...r,...Iu});case gc:return ot(t),Ke(Rc,r)}return((n,t,r)=>{const e=Ue(n,t,su,[],Gi),o=ot(r);return Rt(en({...n.L(e,yt(o)),...xe(e,o)}))})(Qc(ro(n)),n,t)}const e=(n=>{const t=be(Fi(n));if(!t||t.p)throw new RangeError(vi(n));return Rt(ve(t))})(n);return ot(t),e}function po(n,t){if(r(n)){const r=es(n);if(r&&r.branding===lc)return ot(t),r;const e=eo(n);return((n,t,r,e)=>{const o=Ue(n,r,su,iu);return t&&void 0!==o.month&&void 0===o.monthCode&&void 0===o.year&&(o.year=$u),n.G(o,e)})(Qc(e||lu),!e,n,t)}const e=((n,t)=>{const r=Re(Fi(t));if(r)return ge(r),Ot(Sn(r));const e=me(t,0,1),{calendar:o}=e,i=n(o),[u,c,s]=i.I(e),[a,f]=i.N(u,c),[h,l]=i.v(a,f,s);return Ot(rn(i.P(h,l,s)),o)})(Qc,n);return ot(t),e}function Mo(n,t){if(r(n)){const r=es(n);return r&&r.branding===hc?(ot(t),r):((n,t,r)=>{const e=Ue(n,t,uu,void 0);return n.$(e,r)})(Qc(ro(n)),n,t)}const e=((n,t)=>{const r=Ee(Fi(t));if(r)return ge(r),Tt(tn(Sn(r)));const e=me(t,1);return Tt(Dr(n(e.calendar),e))})(Qc,n);return ot(t),e}function bo(n,t){if(r(n)){const r=es(n)||{};switch(r.branding){case dc:return ot(t),r;case wc:return ot(t),It(r);case gc:return ot(t),Qe(Rc,r)}return((n,t,r,e=[])=>{const o=Ue(n,t,su,e);return n.L(o,r)})(Qc(ro(n)),n,t)}const e=me(n);return ot(t),e}function Eo(n,t){if(r(n)){const r=es(n);if(r&&r.branding===gc)return it(t),r;const e=ro(n);return((n,t,r,e,o,i)=>{const u=Ue(r,o,su,Ki,Xi),c=n(u.timeZone),[s,a,f]=it(i),h=r.L(u,yt(s)),l=xe(u,s);return Et(yr(t(c),{...h,...l},void 0!==u.offset?we(u.offset):void 0,a,f),c,e)})(co,Rc,Qc(e),e,n,t)}return((n,t)=>{const r=be(Fi(n));if(!r||!r.timeZone)throw new RangeError(vi(n));const{offset:e}=r,o=e?we(e):void 0,[,i,u]=it(t);return ye(r,o,i,u)})(n,t)}function Ro(n){return a((n=>t=>n(Io(t))),n)}function Io(n){return bc(n,Rc)}function To(n){if(r(n)){const t=es(n);if(t)switch(t.branding){case yc:return t;case gc:return bt(t.epochNanoseconds)}}return(n=>{const t=be(n=G(n));if(!t)throw new RangeError(vi(n));let r;if(t.p)r=0;else{if(!t.offset)throw new RangeError(vi(n));r=we(t.offset)}return t.timeZone&&Ie(t.timeZone,1),bt(hn(On(t),r))})(n)}function Oo(n){return Object.defineProperties((function(...t){const r=Na.get(this),[e,...o]=r(n.includes("Range"),...t);return e[n](...o)}),o(n))}function So(n){return Object.defineProperties((function(...t){return Na.get(this).o[n](...t)}),o(n))}function Po(n){const t=ea[n];if(!t)throw new TypeError(Mi(n));return ho(t,e(lo),1)}function Do(n){const t=No();return mn(t,n.u(t))}function No(){return F(Date.now(),Yi)}function Yo(){return Ya||(Ya=(new ju).resolvedOptions().timeZone)}const jo=(n,t)=>`Non-integer ${n}: ${t}`,Co=(n,t)=>`Non-positive ${n}: ${t}`,Zo=(n,t)=>`Non-finite ${n}: ${t}`,$o=n=>`Cannot convert bigint to ${n}`,ko=n=>`Invalid bigint: ${n}`,Fo="Cannot convert Symbol to string",Lo="Invalid object",Wo=(n,t,r,e,o)=>o?Wo(n,o[t],o[r],o[e]):Bo(n,t)+`; must be between ${r}-${e}`,Bo=(n,t)=>`Invalid ${n}: ${t}`,Ao=n=>`Missing ${n}`,Uo=n=>`Invalid field ${n}`,qo=n=>`Duplicate field ${n}`,xo=n=>"No valid fields: "+n.join(),Jo=(n,t,r)=>Bo(n,t)+"; must be "+Object.keys(r).join(),Ho="Invalid calling context",_o="Forbidden era/eraYear",zo="Mismatching era/eraYear",Go="Mismatching year/eraYear",Vo=n=>`Invalid era: ${n}`,Ko=n=>"Missing year"+(n?"/era/eraYear":""),Qo=n=>`Invalid monthCode: ${n}`,Xo="Mismatching month/monthCode",ni="Missing month/monthCode",ti="Invalid leap month",ri="Invalid protocol results",ei=n=>Bo("Calendar",n),oi="Mismatching Calendars",ii=n=>Bo("TimeZone",n),ui="Mismatching TimeZones",ci="Forbidden ICU TimeZone",si="Out-of-bounds offset",ai="Out-of-bounds TimeZone gap",fi="Invalid TimeZone offset",hi="Ambiguous offset",li="Out-of-bounds date",di="Out-of-bounds duration",wi="Cannot mix duration signs",mi="Missing relativeTo",gi="Cannot use large units",yi="smallestUnit > largestUnit",vi=n=>`Cannot parse: ${n}`,pi=n=>`Invalid substring: ${n}`,Mi=n=>`Cannot format ${n}`,bi="Mismatching types for formatting",Ei="Cannot specify TimeZone",Ri=g(f,((n,t)=>t)),Ii=g(f,((n,t,r)=>r)),Ti=g(p,2),Oi={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},Si=Object.keys(Oi),Pi=864e5,Di=1e3,Ni=1e3,Yi=1e6,ji=1e9,Ci=6e10,Zi=36e11,$i=864e11,ki=[1,Ni,Yi,ji,Ci,Zi,$i],Fi=g(J,"string"),Li=g(J,"boolean"),Wi=g(J,"number"),Bi=Si.map((n=>n+"s")),Ai=v(Bi),Ui=Bi.slice(0,6),qi=Bi.slice(6),xi=qi.slice(1),Ji=Ri(Bi),Hi=Ii(Bi,0),_i=Ii(Ui,0),zi=g(m,Bi),Gi=Si.slice(0,6),Vi=v(Gi),Ki=["timeZone"],Qi=[...Gi,"offset"],Xi=[...Qi,...Ki],nu=["era","eraYear"],tu=[...nu,"year"],ru=["year"],eu=["monthCode"],ou=["month",...eu],iu=["day"],uu=[...ou,...ru],cu=[...eu,...ru],su=[...iu,...uu],au=[...iu,...ou],fu=[...iu,...eu],hu=Ii(Gi,0),lu="iso8601",du="gregory",wu="japanese",mu={[du]:{"gregory-inverse":-1,gregory:0},[wu]:{"japanese-inverse":-1,japanese:0,meiji:1867,taisho:1911,showa:1925,heisei:1988,reiwa:2018},ethiopic:{ethioaa:0,ethiopic:5500},coptic:{"coptic-inverse":-1,coptic:0},roc:{"roc-inverse":-1,roc:0},buddhist:{be:0},islamic:{ah:0},indian:{saka:0},persian:{ap:0}},gu={[du]:{bce:"gregory-inverse",ce:"gregory"},[wu]:{bce:"japanese-inverse",ce:"japanese"},ethiopic:{era0:"ethioaa",era1:"ethiopic"},coptic:{era0:"coptic-inverse",era1:"coptic"},roc:{broc:"roc-inverse",minguo:"roc"}},yu={chinese:13,dangi:13,hebrew:-6},vu=["isoNanosecond","isoMicrosecond","isoMillisecond","isoSecond","isoMinute","isoHour"],pu=["isoDay","isoMonth","isoYear"],Mu=[...vu,...pu],bu=v(pu),Eu=v(vu),Ru=v(Mu),Iu=Ii(Eu,0),Tu=g(m,Mu),Ou=1e8,Su=Ou*Pi,Pu=[Ou,0],Du=[-Ou,0],Nu=275760,Yu=-271821,ju=Intl.DateTimeFormat,Cu="en-GB",Zu=1970,$u=1972,ku=12,Fu=dn(1868,9,8),Lu=e((n=>{const t=an(n);if(t<Fu){const{isoYear:t}=n;return t<1?["japanese-inverse",1-t]:["japanese",t]}const r=yn(xu(wu),t),{era:e,eraYear:o}=Cn(r,wu);return[e,o]}),WeakMap),Wu="UTC",Bu=5184e3,Au=ln(1847),Uu=ln(new Date(0).getUTCFullYear()+10),qu=e((n=>{function t(n){return((n,t)=>({...Cn(n,t),C:n.month,day:parseInt(n.day)}))(yn(r,n),e)}const r=xu(n),e=Hn(n);return{id:n,R:Yn(t),U:jn(t)}})),xu=e((n=>new ju(Cu,{calendar:n,timeZone:Wu,era:"short",year:"numeric",month:"short",day:"numeric"}))),Ju=/^M(\d{2})(L?)$/,Hu="smallestUnit",_u="unit",zu="roundingIncrement",Gu="fractionalSecondDigits",Vu="relativeTo",Ku="direction",Qu={constrain:0,reject:1},Xu=Object.keys(Qu),nc={previous:-1,next:1},tc=g(vt,Hu),rc=g(vt,"largestUnit"),ec=g(vt,_u),oc=g(pt,"overflow",Qu),ic=g(pt,"disambiguation",{compatible:0,reject:1,earlier:2,later:3}),uc=g(pt,"offset",{reject:0,use:1,prefer:2,ignore:3}),cc=g(pt,"calendarName",{auto:0,never:1,critical:2,always:3}),sc=g(pt,"timeZoneName",{auto:0,never:1,critical:2}),ac=g(pt,"offset",{auto:0,never:1}),fc=g(pt,"roundingMode",{floor:0,halfFloor:1,ceil:2,halfCeil:3,trunc:4,halfTrunc:5,expand:6,halfExpand:7,halfEven:8}),hc="PlainYearMonth",lc="PlainMonthDay",dc="PlainDate",wc="PlainDateTime",mc="PlainTime",gc="ZonedDateTime",yc="Instant",vc="Duration",pc=[Math.floor,n=>S(n)?Math.floor(n):Math.round(n),Math.ceil,n=>S(n)?Math.ceil(n):Math.round(n),Math.trunc,n=>S(n)?Math.trunc(n)||0:Math.round(n),n=>n<0?Math.floor(n):Math.ceil(n),n=>Math.sign(n)*Math.round(Math.abs(n))||0,n=>S(n)?(n=Math.trunc(n)||0)+n%2:Math.round(n)],Mc=/0+$/,bc=e(((n,t)=>{const{epochNanoseconds:r}=n,e=(t.u?t:t(n.timeZone)).u(r),o=mn(r,e);return{calendar:n.calendar,...o,offsetNanoseconds:e}}),WeakMap),Ec=2**32-1,Rc=e((n=>{const t=Ze(n);return"object"==typeof t?new Tc(t):new Ic(t||0)}));class Ic{constructor(n){this.F=n}u(){return this.F}l(n){return(n=>{const t=fn({...n,...Iu});if(!t||Math.abs(t[0])>1e8)throw new RangeError(li)})(n),[hn(n,this.F)]}i(){}}class Tc{constructor(n){this.ee=(n=>{function t(n){const t=b(n,u,c),[e,s]=de(t),a=o(e),f=o(s);return a===f?a:r(i(e,s),a,f,n)}function r(t,r,e,o){let i,u;for(;(void 0===o||void 0===(i=o<t[0]?r:o>=t[1]?e:void 0))&&(u=t[1]-t[0]);){const r=t[0]+Math.floor(u/2);n(r)===e?t[1]=r:t[0]=r+1}return i}const o=e(n),i=e(le);let u=Au,c=Uu;return{ne(n){const r=t(n-86400),e=t(n+86400),o=n-r,i=n-e;if(r===e)return[o];const u=t(o);return u===t(i)?[n-u]:r>e?[o,i]:[]},te:t,i(n,t){const e=b(n,u,c);let[s,a]=de(e);const f=Bu*t,h=t<0?()=>a>u||(u=e,0):()=>s<c||(c=e,0);for(;h();){const e=o(s),u=o(a);if(e!==u){const o=i(s,a);r(o,e,u);const c=o[0];if((M(c,n)||1)===t)return c}s+=f,a+=f}}}})((n=>t=>{const r=yn(n,t*Di);return ln(Zn(r),parseInt(r.month),parseInt(r.day),parseInt(r.hour),parseInt(r.minute),parseInt(r.second))-t})(n))}u(n){return this.ee.te((n=>sn(n)[0])(n))*ji}l(n){const[t,r]=[ln((e=n).isoYear,e.isoMonth,e.isoDay,e.isoHour,e.isoMinute,e.isoSecond),e.isoMillisecond*Yi+e.isoMicrosecond*Ni+e.isoNanosecond];var e;return this.ee.ne(t).map((n=>on(j(F(n,ji),r))))}i(n,t){const[r,e]=sn(n),o=this.ee.i(r+(t>0||e?1:0),t);if(void 0!==o)return F(o,ji)}}const Oc="([+-])",Sc="(?:[.,](\\d{1,9}))?",Pc=`(?:(?:${Oc}(\\d{6}))|(\\d{4}))-?(\\d{2})`,Dc="(\\d{2})(?::?(\\d{2})(?::?(\\d{2})"+Sc+")?)?",Nc=Oc+Dc,Yc=Pc+"-?(\\d{2})(?:[T ]"+Dc+"(Z|"+Nc+")?)?",jc="\\[(!?)([^\\]]*)\\]",Cc=`((?:${jc}){0,9})`,Zc=De(Pc+Cc),$c=De("(?:--)?(\\d{2})-?(\\d{2})"+Cc),kc=De(Yc+Cc),Fc=De("T?"+Dc+"(?:"+Nc+")?"+Cc),Lc=De(Nc),Wc=new RegExp(jc,"g"),Bc=De(`${Oc}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${Sc}H)?(?:(\\d+)${Sc}M)?(?:(\\d+)${Sc}S)?)?`),Ac=e((n=>new ju(Cu,{timeZone:n,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}))),Uc=/^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,qc=/[^\w\/:+-]+/,xc={m(n,r,e){const o=ot(e);let i,{years:u,months:c,weeks:s,days:a}=r;if(a+=ce(r,5)[0],u||c)i=((n,r,e,o,i)=>{let[u,c,s]=n.I(r);if(e){const[r,o]=n.N(u,c);u+=e,c=Qn(r,o,n._(u)),c=t("month",c,1,n.J(u),i)}return o&&([u,c]=n.oe(u,c,o)),s=t("day",s,1,n.K(u,c),i),n.k(u,c,s)})(this,n,u,c,o);else{if(!s&&!a)return n;i=an(n)}if(void 0===i)throw new RangeError(li);return i+=(7*s+a)*Pi,rn(gn(i))},O(n,t,r){if(r<=7){let e=0,o=Jr({...n,...Iu},{...t,...Iu});return 7===r&&([e,o]=I(o,7)),{...Hi,weeks:e,days:o}}const e=this.I(n),o=this.I(t);let[i,u,c]=((n,t,r,e,o,i,u)=>{let c=o-t,s=i-r,a=u-e;if(c||s){const f=Math.sign(c||s);let h=n.K(o,i),l=0;if(Math.sign(a)===-f){const e=h;[o,i]=n.oe(o,i,-f),c=o-t,s=i-r,h=n.K(o,i),l=f<0?-e:h}if(a=u-Math.min(e,h)+l,c){const[e,u]=n.N(t,r),[a,h]=n.N(o,i);if(s=a-e||Number(h)-Number(u),Math.sign(s)===-f){const r=f<0&&-n.J(o);c=(o-=f)-t,s=i-Qn(e,u,n._(o))+(r||n.J(o))}}}return[c,s,a]})(this,...e,...o);return 8===r&&(u+=this.re(i,e[0]),i=0),{...Hi,years:i,months:u,days:c}},L(n,t){const r=ot(t),e=He(this,n),o=_e(this,n,e,r),i=ze(this,n,o,e,r);return It(rn(this.P(e,o,i)),this.id||lu)},$(n,t){const r=ot(t),e=He(this,n),o=_e(this,n,e,r);return Tt(tn(this.P(e,o,1)),this.id||lu)},G(n,t){const r=ot(t);let e,o,i,u=void 0!==n.eraYear||void 0!==n.year?He(this,n):void 0;const c=!this.id;if(void 0===u&&c&&(u=$u),void 0!==u){const t=_e(this,n,u,r);e=ze(this,n,t,u,r);const c=this._(u);o=Xn(t,c),i=t===c}else{if(void 0===n.monthCode)throw new TypeError(ni);if([o,i]=Vn(n.monthCode),this.id&&this.id!==du&&this.id!==wu)if(this.id&&"coptic"===Hn(this.id)&&0===r){const t=i||13!==o?30:6;e=n.day,e=b(e,1,t)}else if(this.id&&"chinese"===Hn(this.id)&&0===r){const t=!i||1!==o&&9!==o&&10!==o&&11!==o&&12!==o?30:29;e=n.day,e=b(e,1,t)}else e=n.day;else e=ze(this,n,_e(this,n,$u,r),$u,r)}const s=this.v(o,i,e);if(!s)throw new RangeError("Cannot guess year");const[a,f]=s;return Ot(rn(this.P(a,f,e)),this.id||lu)},fields(n){return tt(this)&&n.includes("year")?[...n,...nu]:n},V(n,t){const r=Object.assign(Object.create(null),n);return Ge(r,t,ou),tt(this)&&(Ge(r,t,tu),this.id===wu&&Ge(r,t,au,nu)),r},inLeapYear(n){const[t]=this.I(n);return this.ie(t)},monthsInYear(n){const[t]=this.I(n);return this.J(t)},daysInMonth(n){const[t,r]=this.I(n);return this.K(t,r)},daysInYear(n){const[t]=this.I(n);return this.ae(t)},dayOfYear:Gn,era(n){return this.se(n)[0]},eraYear(n){return this.se(n)[1]},monthCode(n){const[t,r]=this.I(n),[e,o]=this.N(t,r);return Kn(e,o)},dayOfWeek:In,daysInWeek(){return 7}},Jc={I:vn,se:Tn,N:pn},Hc={dayOfYear:Gn,I:vn,k:dn,weekOfYear:_n,yearOfWeek:zn,B(n){function t(n){return(7-n<e?7:0)-n}function r(n){const r=En(l+n),e=n||1,o=t(R(s+r*e,7));return f=(r+(o-a)*e)/7}const e=this.id?1:4,o=In(n),i=this.dayOfYear(n),u=R(o-1,7),c=i-1,s=R(u-c,7),a=t(s);let f,h=Math.floor((c-a)/7)+1,l=n.isoYear;return h?h>r(0)&&(h=1,l++):(h=r(-1),l--),[h,l,f]}},_c={...xc,...Hc,I:vn,se:Tn,N:pn,v(n,t){if(!t)return[$u,n]},ie:Rn,_(){},J:Mn,re:n=>n*ku,K:bn,ae:En,P(n,t,r){return{isoYear:n,isoMonth:t,isoDay:r}},k:dn,oe(n,t,r){return n+=T(r,ku),(t+=O(r,ku))<1?(n--,t+=ku):t>ku&&(n++,t-=ku),[n,t]},year(n){return n.isoYear},month(n){return n.isoMonth},day:n=>n.isoDay},zc={I:$n,se:Un,N:Fn},Gc={dayOfYear:Gn,I:$n,k:kn,weekOfYear:_n,yearOfWeek:zn,B(){return[]}},Vc={...xc,...Gc,I:$n,se:Un,N:Fn,v(n,t,r){const e=this.id&&"chinese"===Hn(this.id)?((n,t,r)=>{if(t)switch(n){case 1:return 1651;case 2:return r<30?1947:1765;case 3:return r<30?1966:1955;case 4:return r<30?1963:1944;case 5:return r<30?1971:1952;case 6:return r<30?1960:1941;case 7:return r<30?1968:1938;case 8:return r<30?1957:1718;case 9:return 1832;case 10:return 1870;case 11:return 1814;case 12:return 1890}return 1972})(n,t,r):$u;let[o,i,u]=$n.call(this,{isoYear:e,isoMonth:ku,isoDay:31});const c=Ln.call(this,o),s=i===c;1===(M(n,Xn(i,c))||M(Number(t),Number(s))||M(r,u))&&o--;for(let e=0;e<100;e++){const i=o-e,u=Ln.call(this,i),c=Qn(n,t,u);if(t===(c===u)&&r<=Bn.call(this,i,c))return[i,c]}},ie(n){const t=Wn.call(this,n);return t>Wn.call(this,n-1)&&t>Wn.call(this,n+1)},_:Ln,J:An,re(n,t){const r=t+n,e=Math.sign(n),o=e<0?-1:0;let i=0;for(let n=t;n!==r;n+=e)i+=An.call(this,n+o);return i},K:Bn,ae:Wn,P(n,t,r){return gn(kn.call(this,n,t,r))},k:kn,oe(n,t,r){if(r){if(t+=r,!Number.isSafeInteger(t))throw new RangeError(li);if(r<0)for(;t<1;)t+=An.call(this,--n);else{let r;for(;t>(r=An.call(this,n));)t-=r,n++}}return[n,t]},year(n){return this.R(n).year},month(n){const{year:t,C:r}=this.R(n),{j:e}=this.U(t);return e[r]+1},day(n){return this.R(n).day}},Kc=Ae(Jc,zc),Qc=Ae(_c,Vc),Xc={...{era:G,eraYear:Q,year:Q,month:nn,monthCode(n){const t=G(n);return Vn(t),t},day:nn},...Ii(Gi,Q),...Ii(Bi,X),offset(n){const t=G(n);return we(t),t}},ns=g(h,Gi,vu),ts=g(h,vu,Gi),rs=new WeakMap,es=rs.get.bind(rs),os=rs.set.bind(rs),is={era(n){if(void 0!==n)return Fi(n)},eraYear:B,year:U,month:A,daysInMonth:A,daysInYear:A,inLeapYear:Li,monthsInYear:A},us={monthCode:Fi},cs={day:A},ss={dayOfWeek:A,dayOfYear:A,weekOfYear(n){if(void 0!==n)return A(n)},yearOfWeek:B,daysInWeek:A},as=io({...is,...us,...cs,...ss}),fs=io({...is,...us}),hs=io({...us,...cs}),ls={calendarId:n=>n.calendar},ds=f((n=>t=>t[n]),Bi.concat("sign")),ws=f(((n,t)=>n=>n[vu[t]]),Gi),ms={epochMilliseconds:Dt,epochNanoseconds(n){return((n,t=1)=>{const[r,e]=n,o=Math.floor(e/t),i=$i/t;return BigInt(r)*BigInt(i)+BigInt(o)})(n.epochNanoseconds)}},[gs,ys,vs]=no(vc,((n=0,t=0,r=0,e=0,o=0,i=0,u=0,c=0,f=0,h=0)=>Pt(ie(a(X,s(Bi,[n,t,r,e,o,i,u,c,f,h]))))),{...ds,blank(n){return!n.sign}},{with:(n,t)=>ys(((n,t)=>{return Pt((r=n,e=t,ie({...r,...qe(e,Ai)})));var r,e})(n,t)),negated:n=>ys(re(n)),abs:n=>ys((n=>-1===n.sign?re(n):n)(n)),add:(n,t,r)=>ys(te(ao,Qc,Rc,0,n,so(t),r)),subtract:(n,t,r)=>ys(te(ao,Qc,Rc,1,n,so(t),r)),round:(n,t)=>ys(((n,t,r,e,o)=>{const i=he(e),[u,c,s,a,f]=((n,t,r)=>{n=gt(n,Hu);let e=rc(n);const o=r(n[Vu]);let i=lt(n);const u=fc(n,7);let c=tc(n);if(void 0===e&&void 0===c)throw new RangeError("Required smallestUnit or largestUnit");if(null==c&&(c=0),null==e&&(e=Math.max(c,t)),Mt(e,c),i=dt(i,c,1),i>1&&c>5&&e!==c)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");return[e,c,i,u,o]})(o,i,n),h=Math.max(i,u);if(!f&&h<=6)return Pt(ie(((n,t,r,e,o)=>{const i=qt(ce(n),r,e,o);return{...Hi,...se(i,t)}})(e,u,c,s,a)));if(!Xr(f)&&!e.sign)return e;if(!f)throw new RangeError(mi);const[l,d,w]=Gr(t,r,f),m=Vr(w),g=Kr(w),y=Qr(w),v=g(d,l,e);Xr(f)||(en(l),en(v));let p=y(d,l,v,u);const M=e.sign,b=oe(p);if(M&&b&&M!==b)throw new RangeError(ri);return p=Ut(p,m(v),u,c,s,a,d,l,m,g),Pt(p)})(ao,Qc,Rc,n,t)),total:(n,t)=>((n,t,r,e,o)=>{const i=he(e),[u,c]=((n,t)=>{const r=t((n=gt(n,_u))[Vu]);let e=ec(n);return e=q(_u,e),[e,r]})(o,n),s=Math.max(u,i);if(!c&&ne(s,c))return Yt(e,u);if(!c)throw new RangeError(mi);if(!e.sign)return 0;const[a,f,h]=Gr(t,r,c),l=Vr(h),d=Kr(h),w=Qr(h),m=d(f,a,e);Xr(c)||(en(a),en(m));const g=w(f,a,m,u);return ne(u,c)?Yt(g,u):((n,t,r,e,o,i,u)=>{const c=oe(n),[s,a]=jt(e,zi(r,n),r,c,o,i,u),f=Ct(t,s,a);return n[Bi[r]]+f*c})(g,l(m),u,f,a,l,d)})(ao,Qc,Rc,n,t),toLocaleString(n,t,r){return Intl.DurationFormat?new Intl.DurationFormat(t,r).format(this):er(n)},toString:er,toJSON:n=>er(n),valueOf:uo},{from:n=>ys(so(n)),compare:(n,t,r)=>((n,t,r,e,o,i)=>{const u=n(mt(i).relativeTo),c=Math.max(he(e),he(o));if(w(Bi,e,o))return 0;if(ne(c,u))return Z(ce(e),ce(o));if(!u)throw new RangeError(mi);const[s,a,f]=Gr(t,r,u),h=Vr(f),l=Kr(f);return Z(h(l(a,s,e)),h(l(a,s,o)))})(ao,Qc,Rc,so(n),so(t),r)}),ps="numeric",Ms=["timeZoneName"],bs={month:ps,day:ps},Es={year:ps,month:ps},Rs={...Es,day:ps},Is={hour:ps,minute:ps,second:ps},Ts={...Rs,...Is},Os={...Ts,timeZoneName:"short"},Ss=Object.keys(Es),Ps=Object.keys(bs),Ds=Object.keys(Rs),Ns=Object.keys(Is),Ys=["dateStyle"],js=[...Ss,...Ys],Cs=[...Ps,...Ys],Zs=[...Ds,...Ys,"weekday"],$s=[...Ns,"dayPeriod","timeStyle","fractionalSecondDigits"],ks=[...Zs,...$s],Fs=[...Ms,...$s],Ls=[...Ms,...Zs],Ws=[...Ms,"day","weekday",...$s],Bs=[...Ms,"year","weekday",...$s],As=fo(ks,Ts),Us=fo(ks,Os),qs=fo(ks,Ts,Ms),xs=fo(Zs,Rs,Fs),Js=fo($s,Is,Ls),Hs=fo(js,Es,Ws),_s=fo(Cs,bs,Bs),zs={},Gs=new ju(void 0,{calendar:lu}).resolvedOptions().calendar===lu,Vs=[As,Dt],Ks=[Us,Dt,0,(n,t)=>{const r=n.timeZone;if(t&&t.timeZone!==r)throw new RangeError(ui);return r}],Qs=[qs,an],Xs=[xs,an],na=[Js,n=>un(n)/Yi],ta=[Hs,an,Gs],ra=[_s,an,Gs],ea={Instant:Vs,PlainDateTime:Qs,PlainDate:Xs,PlainTime:na,PlainYearMonth:ta,PlainMonthDay:ra},oa=ho(Vs),ia=ho(Ks),ua=ho(Qs),ca=ho(Xs),sa=ho(na),aa=ho(ta),fa=ho(ra),[ha,la]=no(mc,((n=0,t=0,r=0,e=0,o=0,i=0)=>St(Nn(a(Q,s(vu,[n,t,r,e,o,i])),1))),ws,{with(n,t,r){return la(((n,t,r)=>St(((n,t,r)=>xe({...l(Vi,n),...qe(t,Vi)},ot(r)))(n,t,r)))(this,to(t),r))},add:(n,t)=>la(Tr(0,n,so(t))),subtract:(n,t)=>la(Tr(1,n,so(t))),until:(n,t,r)=>ys(Lr(0,n,go(t),r)),since:(n,t,r)=>ys(Lr(1,n,go(t),r)),round:(n,t)=>la(((n,t)=>{const[r,e,o]=ct(t,5);var i;return St((i=o,kt(n,Lt(r,e),i)[0]))})(n,t)),equals(n,t){return!We(n,go(t))},toLocaleString(n,t,r){const[e,o]=sa(t,r,n);return e.format(o)},toString:rr,toJSON:n=>rr(n),valueOf:uo},{from:(n,t)=>la(go(n,t)),compare:(n,t)=>We(go(n),go(t))}),[da,wa]=no(wc,g(((n,t,r,e,o=0,i=0,u=0,c=0,f=0,h=0,l=lu)=>Rt(en(On(a(Q,s(Mu,[t,r,e,o,i,u,c,f,h])))),n(l))),xn),{...ls,...as,...ws},{with:(n,t,r)=>wa(((n,t,r,e)=>{const o=n(t.calendar),i=[...o.fields(su),...Gi].sort(),u={...Ve(c=t),hour:c.isoHour,minute:c.isoMinute,second:c.isoSecond,millisecond:c.isoMillisecond,microsecond:c.isoMicrosecond,nanosecond:c.isoNanosecond};var c;const s=qe(r,i),a=ot(e),f=o.V(u,s),h={...u,...s};return Rt(en({...o.L(f,yt(a)),...Nn(ns(h),a)}))})(Qc,n,to(t),r)),withCalendar:(n,t)=>wa(mo(n,oo(t))),withPlainTime:(n,t)=>wa(((n,t=Iu)=>Rt(en({...n,...t})))(n,yo(t))),add:(n,t,r)=>wa(Er(Qc,0,n,so(t),r)),subtract:(n,t,r)=>wa(Er(Qc,1,n,so(t),r)),until:(n,t,r)=>ys(Zr(Qc,0,n,vo(t),r)),since:(n,t,r)=>ys(Zr(Qc,1,n,vo(t),r)),round:(n,t)=>wa(((n,t)=>Rt(Zt(n,...ct(t)),n.calendar))(n,t)),equals(n,t){return!Fe(r=n,e=vo(t))&&r.calendar===e.calendar;var r,e},toZonedDateTime:(n,t,r)=>Ta(((n,t,r,e)=>{const o=((n,t,r,e)=>{const o=(n=>ic(mt(n)))(e);return vr(n(t),r,o)})(n,r,t,e);return Et(on(o),r,t.calendar)})(Rc,n,co(t),r)),toPlainDate:n=>Ea(It(n)),toPlainTime:n=>la(St(n)),toLocaleString(n,t,r){const[e,o]=ua(t,r,n);return e.format(o)},toString:Qt,toJSON:n=>Qt(n),valueOf:uo},{from:(n,t)=>wa(vo(n,t)),compare:(n,t)=>Fe(vo(n),vo(t))}),[ma,ga,ya]=no(lc,g(((n,t,r,e=lu,o=$u)=>{const i=Q(t),u=Q(r),c=n(e);return Ot(rn(Sn({isoYear:Q(o),isoMonth:i,isoDay:u})),c)}),xn),{...ls,...hs},{with:(n,t,r)=>ga(((n,t,r,e)=>{const o=n(t.calendar),i=o.fields(su).sort(),u=(n=>{const t=Kc(n.calendar),[r,e,o]=t.I(n),[i,u]=t.N(r,e);return{monthCode:Kn(i,u),day:o}})(t),c=qe(r,i),s=o.V(u,c);return o.G(s,e)})(Qc,n,to(t),r)),equals(n,t){return!Le(r=n,e=po(t))&&r.calendar===e.calendar;var r,e},toPlainDate(n,t){return Ea(((n,t,r,e)=>((n,t,r)=>Je(n,t,fu,x(r),ru))(n(t.calendar),r,e))(Qc,n,this,t))},toLocaleString(n,t,r){const[e,o]=fa(t,r,n);return e.format(o)},toString:tr,toJSON:n=>tr(n),valueOf:uo},{from:(n,t)=>ga(po(n,t))}),[va,pa,Ma]=no(hc,g(((n,t,r,e=lu,o=1)=>{const i=Q(t),u=Q(r),c=n(e);return Tt(tn(Sn({isoYear:i,isoMonth:u,isoDay:Q(o)})),c)}),xn),{...ls,...fs},{with:(n,t,r)=>pa(((n,t,r,e)=>{const o=n(t.calendar),i=o.fields(uu).sort(),u=(n=>{const t=Kc(n.calendar),[r,e]=t.I(n),[o,i]=t.N(r,e);return{year:r,monthCode:Kn(o,i)}})(t),c=qe(r,i),s=o.V(u,c);return o.$(s,e)})(Qc,n,to(t),r)),add:(n,t,r)=>pa(Ir(Qc,0,n,so(t),r)),subtract:(n,t,r)=>pa(Ir(Qc,1,n,so(t),r)),until:(n,t,r)=>ys(kr(Qc,0,n,Mo(t),r)),since:(n,t,r)=>ys(kr(Qc,1,n,Mo(t),r)),equals(n,t){return!Le(r=n,e=Mo(t))&&r.calendar===e.calendar;var r,e},toPlainDate(n,t){return Ea(((n,t,r,e)=>((n,t,r)=>Je(n,t,cu,x(r),iu))(n(t.calendar),r,e))(Qc,n,this,t))},toLocaleString(n,t,r){const[e,o]=aa(t,r,n);return e.format(o)},toString:nr,toJSON:n=>nr(n),valueOf:uo},{from:(n,t)=>pa(Mo(n,t)),compare:(n,t)=>Le(Mo(n),Mo(t))}),[ba,Ea,Ra]=no(dc,g(((n,t,r,e,o=lu)=>It(rn(Sn(a(Q,{isoYear:t,isoMonth:r,isoDay:e}))),n(o))),xn),{...ls,...as},{with:(n,t,r)=>Ea(((n,t,r,e)=>{const o=n(t.calendar),i=o.fields(su).sort(),u=Ve(t),c=qe(r,i),s=o.V(u,c);return o.L(s,e)})(Qc,n,to(t),r)),withCalendar:(n,t)=>Ea(mo(n,oo(t))),add:(n,t,r)=>Ea(Rr(Qc,0,n,so(t),r)),subtract:(n,t,r)=>Ea(Rr(Qc,1,n,so(t),r)),until:(n,t,r)=>ys($r(Qc,0,n,bo(t),r)),since:(n,t,r)=>ys($r(Qc,1,n,bo(t),r)),equals(n,t){return!Le(r=n,e=bo(t))&&r.calendar===e.calendar;var r,e},toZonedDateTime(n,t){const e=r(t)?t:{timeZone:t};return Ta(((n,t,r,e,o)=>{const i=n(o.timeZone),u=o.plainTime,c=void 0!==u?t(u):void 0,s=r(i);let a;return a=c?vr(s,{...e,...c}):pr(s,{...e,...Iu}),Et(a,i,e.calendar)})(co,go,Rc,n,e))},toPlainDateTime:(n,t)=>wa(((n,t=Iu)=>Rt(en({...n,...t})))(n,yo(t))),toPlainYearMonth(n){return pa((this,((n,t)=>{const r=Ue(n,t,cu);return n.$(r,void 0)})(Qc(n.calendar),this)))},toPlainMonthDay(n){return ga((this,((n,t)=>{const r=Ue(n,t,fu);return n.G(r)})(Qc(n.calendar),this)))},toLocaleString(n,t,r){const[e,o]=ca(t,r,n);return e.format(o)},toString:Xt,toJSON:n=>Xt(n),valueOf:uo},{from:(n,t)=>Ea(bo(n,t)),compare:(n,t)=>Le(bo(n),bo(t))}),[Ia,Ta]=no(gc,g(((n,t,r,e,o=lu)=>Et(on(k(V(r))),t(e),n(o))),xn,(n=>je(Fi(n)))),{...ms,...ls,...Ro(as),...Ro(ws),offset:n=>hr(Io(n).offsetNanoseconds),offsetNanoseconds:n=>Io(n).offsetNanoseconds,timeZoneId:n=>n.timeZone,hoursInDay:n=>((n,t)=>{const r=n(t.timeZone),e=bc(t,r),[o,i]=Wt(e),u=L(C(pr(r,o),pr(r,i)),Zi,1);if(u<=0)throw new RangeError(ri);return u})(Rc,n)},{with:(n,t,r)=>Ta(((n,t,r,e,o)=>{const{calendar:i,timeZone:u}=r,c=n(i),s=t(u),a=[...c.fields(su),...Qi].sort(),f=(n=>{const t=bc(n,Rc),r=hr(t.offsetNanoseconds),e=Kc(n.calendar),[o,i,u]=e.I(t),[c,s]=e.N(o,i),a=Kn(c,s);return{...ts(t),year:o,monthCode:a,day:u,offset:r}})(r),h=qe(e,a),l=c.V(f,h),d={...f,...h},[w,m,g]=it(o,2);return Et(yr(s,{...c.L(l,yt(w)),...Nn(ns(d),w)},we(d.offset),m,g),u,i)})(Qc,Rc,n,to(t),r)),withCalendar:(n,t)=>Ta(mo(n,oo(t))),withTimeZone:(n,t)=>Ta(((n,t)=>({...n,timeZone:t}))(n,co(t))),withPlainTime:(n,t)=>Ta(((n,t,r)=>{const e=t.timeZone,o=n(e),i={...bc(t,o),...r||Iu};let u;return u=r?yr(o,i,i.offsetNanoseconds,2):pr(o,i),Et(u,e,t.calendar)})(Rc,n,yo(t))),add:(n,t,r)=>Ta(br(Qc,Rc,0,n,so(t),r)),subtract:(n,t,r)=>Ta(br(Qc,Rc,1,n,so(t),r)),until:(n,t,r)=>ys(Pt(Cr(Qc,Rc,0,n,Eo(t),r))),since:(n,t,r)=>ys(Pt(Cr(Qc,Rc,1,n,Eo(t),r))),round:(n,t)=>Ta(((n,t,r)=>{let{epochNanoseconds:e,timeZone:o,calendar:i}=t;const[u,c,s]=ct(r);if(0===u&&1===c)return t;const a=n(o);if(6===u)e=((n,t,r,e)=>{const o=bc(r,t),[i,u]=n(o),c=r.epochNanoseconds,s=pr(t,i),a=pr(t,u);if($(c,s,a))throw new RangeError(ri);return Ht(Ct(c,s,a),e)?a:s})(Wt,a,t,s);else{const n=a.u(e);e=yr(a,Zt(mn(e,n),u,c,s),n,2,0,1)}return Et(e,o,i)})(Rc,n,t)),startOfDay:n=>Ta(((n,t)=>{const{timeZone:r,calendar:e}=t,o=((n,t,r)=>pr(t,n(bc(r,t))))(Bt,n(r),t);return Et(o,r,e)})(Rc,n)),equals(n,t){return!ke(r=n,e=Eo(t))&&!!Be(r.timeZone,e.timeZone)&&r.calendar===e.calendar;var r,e},toInstant:n=>Sa(bt(n.epochNanoseconds)),toPlainDateTime:n=>wa(Ke(Rc,n)),toPlainDate:n=>Ea(Qe(Rc,n)),toPlainTime:n=>la(Xe(Rc,n)),toLocaleString(n,t,r={}){const[e,o]=ia(t,r,n);return e.format(o)},toString:(n,t)=>Kt(Rc,n,t),toJSON:n=>Kt(Rc,n),valueOf:uo,getTimeZoneTransition(n,t){const{timeZone:r,epochNanoseconds:e}=n,o=(n=>{const t=gt(n,Ku),r=pt(Ku,nc,t,0);if(!r)throw new RangeError(Bo(Ku,r));return r})(t),i=Rc(r).i(e,o);return i?Ta({...n,epochNanoseconds:i}):null}},{from:(n,t)=>Ta(Eo(n,t)),compare:(n,t)=>ke(Eo(n),Eo(t))}),[Oa,Sa,Pa]=no(yc,(n=>bt(on(k(V(n))))),ms,{add:(n,t)=>Sa(Mr(0,n,so(t))),subtract:(n,t)=>Sa(Mr(1,n,so(t))),until:(n,t,r)=>ys(jr(0,n,To(t),r)),since:(n,t,r)=>ys(jr(1,n,To(t),r)),round:(n,t)=>Sa(((n,t)=>{const[r,e,o]=ct(t,5,1);return bt(qt(n.epochNanoseconds,r,e,o,1))})(n,t)),equals(n,t){return!$e(n,To(t))},toZonedDateTimeISO:(n,t)=>Ta(((n,t,r=lu)=>Et(n.epochNanoseconds,t,r))(n,co(t))),toLocaleString(n,t,r){const[e,o]=oa(t,r,n);return e.format(o)},toString:(n,t)=>Vt(co,Rc,n,t),toJSON:n=>Vt(co,Rc,n),valueOf:uo},{from:n=>Sa(To(n)),fromEpochMilliseconds:n=>Sa((n=>bt(on(F(X(n),Yi))))(n)),fromEpochNanoseconds:n=>Sa((n=>bt(on(k(V(n)))))(n)),compare:(n,t)=>$e(To(n),To(t))}),Da=function(){function n(n,r){return new t(n,r)}function t(n,t=Object.create(null)){Na.set(this,((n,t)=>{const r=new ju(n,t),o=r.resolvedOptions(),i=o.locale,u=l(Object.keys(t),o),c=e(Po),s=(n,...t)=>{if(n){if(2!==t.length)throw new TypeError(bi);for(const n of t)if(void 0===n)throw new TypeError(bi)}n||void 0!==t[0]||(t=[]);const e=t.map((n=>es(n)||Number(n)));let o,s=0;for(const n of e){const t="object"==typeof n?n.branding:void 0;if(s++&&t!==o)throw new TypeError(bi);o=t}return o?c(o)(i,u,...e):[r,...e]};return s.o=r,s})(n,t))}const r=ju.prototype,i=Object.getOwnPropertyDescriptors(r),u=Object.getOwnPropertyDescriptors(ju);for(const t in i){const r=i[t],e=t.startsWith("format")&&Oo(t);"function"==typeof r.value?r.value="constructor"===t?n:e||So(t):e&&(r.get=function(){if(!Na.has(this))throw new TypeError(Ho);return(...n)=>e.apply(this,n)},Object.defineProperties(r.get,o(`get ${t}`)))}return u.prototype.value=t.prototype=Object.create({},i),Object.defineProperties(n,u),n}(),Na=new WeakMap;let Ya;const ja=Object.defineProperties({},{...c("Temporal.Now"),...i({timeZoneId:()=>Yo(),instant:()=>Sa(bt(No())),zonedDateTimeISO:(n=Yo())=>Ta(Et(No(),co(n),lu)),plainDateTimeISO:(n=Yo())=>wa(Rt(Do(Rc(co(n))),lu)),plainDateISO:(n=Yo())=>Ea(It(Do(Rc(co(n))),lu)),plainTimeISO:(n=Yo())=>la(St(Do(Rc(co(n)))))})}),Ca=Object.defineProperties({},{...c("Temporal"),...i({PlainYearMonth:va,PlainMonthDay:ma,PlainDate:ba,PlainTime:ha,PlainDateTime:da,ZonedDateTime:Ia,Instant:Oa,Duration:gs,Now:ja})});Object.defineProperties(globalThis,i({Temporal:Ca})),Object.defineProperties(Intl,i({DateTimeFormat:Da})),Object.defineProperties(Date.prototype,i({toTemporalInstant(){const n=Date.prototype.valueOf.call(this);return Sa(bt(F(H(n),Yi)))}}))}();
package/impl.cjs ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ var classApi = require("./chunks/classApi.cjs");
4
+
5
+ exports.Intl = classApi.IntlExtended, exports.Temporal = classApi.Temporal, exports.toTemporalInstant = classApi.toTemporalInstant;
package/impl.d.cts ADDED
@@ -0,0 +1 @@
1
+ export * from 'temporal-spec';
package/impl.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from 'temporal-spec';
package/impl.js ADDED
@@ -0,0 +1 @@
1
+ export { IntlExtended as Intl, Temporal, toTemporalInstant } from "./chunks/classApi.js";
package/index.cjs ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ var classApi = require("./chunks/classApi.cjs");
4
+
5
+ exports.Intl = classApi.IntlExtended, exports.Temporal = classApi.Temporal, exports.toTemporalInstant = classApi.toTemporalInstant;
package/index.d.cts ADDED
@@ -0,0 +1 @@
1
+ export * from 'temporal-spec';
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from 'temporal-spec';
package/index.js ADDED
@@ -0,0 +1 @@
1
+ export { IntlExtended as Intl, Temporal, toTemporalInstant } from "./chunks/classApi.js";
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@rikdotcodes/temporal-polyfill",
3
+ "version": "0.3.1",
4
+ "title": "Temporal Polyfill (Next.js-compatible)",
5
+ "description": "A lightweight polyfill for Temporal, successor to the JavaScript Date object [forked for Next.js Cache components)",
6
+ "author": {
7
+ "name": "Adam Shaw",
8
+ "email": "arshaw@users.noreply.github.com",
9
+ "url": "http://arshaw.com/"
10
+ },
11
+ "contributors": [
12
+ {
13
+ "name": "Ishaan Bharal",
14
+ "email": "ishbharal@gmail.com"
15
+ },
16
+ {
17
+ "name": "Rik Brown",
18
+ "email": "rik@rik.codes"
19
+ }
20
+ ],
21
+ "maintainers": [
22
+ {
23
+ "name": "Rik Brown",
24
+ "email": "rik@rik.codes"
25
+ }
26
+ ],
27
+ "license": "MIT",
28
+ "copyright": "2024 Adam Shaw",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/fullcalendar/temporal-polyfill.git"
32
+ },
33
+ "type": "module",
34
+ "dependencies": {
35
+ "temporal-spec": "0.3.0"
36
+ },
37
+ "main": "./index.cjs",
38
+ "types": "./index.d.ts",
39
+ "module": "./index.js",
40
+ "exports": {
41
+ ".": {
42
+ "require": "./index.cjs",
43
+ "import": "./index.js"
44
+ },
45
+ "./impl": {
46
+ "require": "./impl.cjs",
47
+ "import": "./impl.js"
48
+ },
49
+ "./global": {
50
+ "require": "./global.cjs",
51
+ "import": {
52
+ "types": "./global.d.ts",
53
+ "default": "./global.esm.js"
54
+ }
55
+ }
56
+ },
57
+ "jsdelivr": "./global.min.js",
58
+ "unpkg": "./global.min.js",
59
+ "sideEffects": [
60
+ "./global.cjs",
61
+ "./global.esm.js",
62
+ "./global.js",
63
+ "./global.min.js"
64
+ ]
65
+ }