@ctlyst.id/utils 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),tt=o=>o!=null&&typeof o=="object"&&"nodeType"in o&&o.nodeType===Node.ELEMENT_NODE,Ne=o=>tt(o)?o.ownerDocument??document:document,be=(o,a)=>{var r;const t=o.target;return o.button>0||t&&!Ne(t).contains(t)?!1:!((r=a.current)!=null&&r.contains(t))},rt=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),at=rt(),Dt=(o,a=[])=>{const t=P.useRef(o);return P.useEffect(()=>{t.current=o}),P.useCallback((...r)=>{var e;return(e=t.current)==null?void 0:e.call(t,...r)},a)},Te=Dt;var Mt=function(){var o=document.getSelection();if(!o.rangeCount)return function(){};for(var a=document.activeElement,t=[],r=0;r<o.rangeCount;r++)t.push(o.getRangeAt(r));switch(a.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":a.blur();break;default:a=null;break}return o.removeAllRanges(),function(){o.type==="Caret"&&o.removeAllRanges(),o.rangeCount||t.forEach(function(e){o.addRange(e)}),a&&a.focus()}},Pt=Mt,Be={"text/plain":"Text","text/html":"Url",default:"Text"},kt="Copy to clipboard: #{key}, Enter";function Ct(o){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,a)}function xt(o,a){var t,r,e,i,n,u,s=!1;a||(a={}),t=a.debug||!1;try{e=Pt(),i=document.createRange(),n=document.getSelection(),u=document.createElement("span"),u.textContent=o,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(d){if(d.stopPropagation(),a.format)if(d.preventDefault(),typeof d.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=Be[a.format]||Be.default;window.clipboardData.setData(m,o)}else d.clipboardData.clearData(),d.clipboardData.setData(a.format,o);a.onCopy&&(d.preventDefault(),a.onCopy(d.clipboardData))}),document.body.appendChild(u),i.selectNodeContents(u),n.addRange(i);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");s=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",o),a.onCopy&&a.onCopy(window.clipboardData),s=!0}catch(m){t&&console.error("unable to copy using clipboardData: ",m),t&&console.error("falling back to prompt"),r=Ct("message"in a?a.message:kt),window.prompt(r,o)}}finally{n&&(typeof n.removeRange=="function"?n.removeRange(i):n.removeAllRanges()),u&&document.body.removeChild(u),e()}return s}var Ot=xt;const Et=({value:o="",optionsOrTimeout:a={}}={})=>{const[t,r]=P.useState(!1),[e,i]=P.useState(o);P.useEffect(()=>i(o),[o]);const{timeout:n=1500,...u}=typeof a=="number"?{timeout:a}:a,s=P.useCallback(()=>{const l=Ot(e,u);r(l)},[e,u]);return P.useEffect(()=>{let l=null;return t&&(l=window.setTimeout(()=>{r(!1)},n)),()=>{l&&window.clearTimeout(l)}},[n,t]),{value:e,setValue:i,onCopy:s,hasCopied:t}},Ut=Et,$t=({value:o,delay:a=500})=>{const[t,r]=P.useState(o);return P.useEffect(()=>{const e=setTimeout(()=>r(o),a||500);return()=>{clearTimeout(e)}},[o,a]),t},Wt=$t;var Yt=process.env.NODE_ENV==="production",Ee="Invariant failed";function je(o,a){if(!o){if(Yt)throw new Error(Ee);var t=typeof a=="function"?a():a,r=t?"".concat(Ee,": ").concat(t):Ee;throw new Error(r)}}var ye=function(a){var t=a.top,r=a.right,e=a.bottom,i=a.left,n=r-i,u=e-t,s={top:t,right:r,bottom:e,left:i,width:n,height:u,x:i,y:t,center:{x:(r+i)/2,y:(e+t)/2}};return s},Nt=function(a,t){return{top:a.top-t.top,left:a.left-t.left,bottom:a.bottom+t.bottom,right:a.right+t.right}},Ve=function(a,t){return{top:a.top+t.top,left:a.left+t.left,bottom:a.bottom-t.bottom,right:a.right-t.right}},Ue={top:0,right:0,bottom:0,left:0},_t=function(a){var t=a.borderBox,r=a.margin,e=r===void 0?Ue:r,i=a.border,n=i===void 0?Ue:i,u=a.padding,s=u===void 0?Ue:u,l=ye(Nt(t,e)),d=ye(Ve(t,n)),m=ye(Ve(d,s));return{marginBox:l,borderBox:ye(t),paddingBox:d,contentBox:m,margin:e,border:n,padding:s}},F=function(a){var t=a.slice(0,-2),r=a.slice(-2);if(r!=="px")return 0;var e=Number(t);return isNaN(e)&&(process.env.NODE_ENV!=="production"?je(!1,"Could not parse value [raw: "+a+", without suffix: "+t+"]"):je(!1)),e},At=function(a,t){var r={top:F(t.marginTop),right:F(t.marginRight),bottom:F(t.marginBottom),left:F(t.marginLeft)},e={top:F(t.paddingTop),right:F(t.paddingRight),bottom:F(t.paddingBottom),left:F(t.paddingLeft)},i={top:F(t.borderTopWidth),right:F(t.borderRightWidth),bottom:F(t.borderBottomWidth),left:F(t.borderLeftWidth)};return _t({borderBox:a,margin:r,padding:e,border:i})},St=function(a){var t=a.getBoundingClientRect(),r=window.getComputedStyle(a);return At(t,r)};const Lt=at?P.useLayoutEffect:P.useEffect,nt=Lt,Rt=(o,a)=>{const[t,r]=P.useState(null),e=P.useRef();return nt(()=>{const i=()=>{const n=o.current;n&&(e.current=requestAnimationFrame(()=>{const u=St(n);r(u)}))};return i(),a&&(window.addEventListener("resize",i),window.addEventListener("scroll",i)),()=>{a&&(window.removeEventListener("resize",i),window.removeEventListener("scroll",i)),e.current&&cancelAnimationFrame(e.current)}},[a]),t},Ht=Rt,It=({onClose:o,onOpen:a,isOpen:t,defaultIsOpen:r,id:e}={})=>{const[i,n]=P.useState(r||!1),u=t!==void 0?t:i,s=t!==void 0,l=P.useId(),d=e??`disclosure-${l}`,m=Te(a),h=Te(o),v=P.useCallback(()=>{s||n(!1),h==null||h()},[s,h]),D=P.useCallback(()=>{s||n(!0),m==null||m()},[s,m]),$=P.useCallback(()=>{u?v():D()},[u,D,v]);return{onClose:v,onOpen:D,onToggle:$,getButtonProps:({onClick:Y,...H}={})=>({...H,"aria-expanded":u,"aria-controls":d,onClick(I){Y==null||Y(I),$()}}),getDisclosureProps:({...Y}={})=>({...Y,hidden:!u,id:d}),isOpen:u}},qt=It,Ft=(o,a={})=>{const{ssr:t=!0,fallback:r}=a,e=Array.isArray(o)?o:[o];let i=Array.isArray(r)?r:[r];i=i.filter(s=>s!=null);const[n,u]=P.useState(()=>e.map((s,l)=>({media:s,matches:t?!!i[l]:window.matchMedia(s).matches})));return P.useEffect(()=>{const s=window;u(e.map(m=>({media:m,matches:s.matchMedia(m).matches})));const l=e.map(m=>s.matchMedia(m)),d=m=>{u(h=>h.slice().map(v=>v.media===m.media?{...v,matches:m.matches}:v))};return l.forEach(m=>{m.addEventListener("change",d)}),()=>{l.forEach(m=>{m.removeEventListener("change",d)})}},[window]),n.map(s=>s.matches)},Qt=Ft,Bt=({value:o,thousandSeparator:a=".",decimalLength:t,decimalSeparator:r=",",prefix:e=""})=>{const n=(u=>{const s=u.toString().split("."),l=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,a);let d="";return t!==void 0?s.length>1&&t>0?d=r+s[1].padEnd(t,"0").slice(0,t):t>0&&(d=r+"0".repeat(t)):s.length>1&&(d=r+s[1]),l+d})(o);return n.charAt(0)==="-"?n.replace(/^-/g,`-${e}`):`${e}${n}`},ue=Bt,jt=()=>{const[o,a]=P.useState(navigator.onLine);return P.useEffect(()=>{const t=()=>a(navigator.onLine);return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}},[]),{isOnline:o,isOffline:!o}},Vt=jt,Xt=({enabled:o=!0,ref:a,handler:t})=>{const r=Te(t),i=P.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;P.useEffect(()=>{if(!o)return;const n=d=>{be(d,a)&&(i.isPointerDown=!0)},u=d=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&t&&be(d,a)&&(i.isPointerDown=!1,r(d))},s=d=>{i.ignoreEmulatedMouseEvents=!0,t&&i.isPointerDown&&be(d,a)&&(i.isPointerDown=!1,r(d))},l=Ne(a.current);return l.addEventListener("mousedown",n,!0),l.addEventListener("mouseup",u,!0),l.addEventListener("touchstart",n,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",n,!0),l.removeEventListener("mouseup",u,!0),l.removeEventListener("touchstart",n,!0),l.removeEventListener("touchend",s,!0)}},[t,a,r,i,o])},Gt=Xt;var B=(o=>(o.product="Product",o.order="Order",o.gift="Gift",o.freeShipping="Free Shipping",o.freeInsurance="Free Insurance",o.bundling="Bundling",o))(B||{}),De=(o=>(o.percentage="percentage",o.amount="amount",o))(De||{});function Kt(o){let a="";const{type:t,collections:r=[],brands:e=[],eligibilityType:i}=o;return t===B.product&&(r.length>0?a=`Voucher hanya berlaku untuk collection ${r.map(n=>n.name).join(", ")}.`:e.length>0?a=`Voucher hanya berlaku untuk produk brand ${e.map(n=>n.name).join(", ")}.`:i==="selected_products"&&(a="Voucher hanya berlaku untuk produk tertentu.")),a}function J(o){return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},J(o)}function L(o){if(o===null||o===!0||o===!1)return NaN;var a=Number(o);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function E(o,a){if(a.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+a.length+" present")}function A(o){E(1,arguments);var a=Object.prototype.toString.call(o);return o instanceof Date||J(o)==="object"&&a==="[object Date]"?new Date(o.getTime()):typeof o=="number"||a==="[object Number]"?new Date(o):((typeof o=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Jt(o,a){E(2,arguments);var t=A(o).getTime(),r=L(a);return new Date(t+r)}var zt={};function ce(){return zt}function it(o){var a=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return a.setUTCFullYear(o.getFullYear()),o.getTime()-a.getTime()}var Zt=6e4,er=36e5,tr=1e3;function rr(o){return E(1,arguments),o instanceof Date||J(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function $e(o){if(E(1,arguments),!rr(o)&&typeof o!="number")return!1;var a=A(o);return!isNaN(Number(a))}function ot(o,a){E(2,arguments);var t=L(a);return Jt(o,-t)}var ar=864e5;function nr(o){E(1,arguments);var a=A(o),t=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var r=a.getTime(),e=t-r;return Math.floor(e/ar)+1}function le(o){E(1,arguments);var a=1,t=A(o),r=t.getUTCDay(),e=(r<a?7:0)+r-a;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function ut(o){E(1,arguments);var a=A(o),t=a.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var e=le(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var n=le(i);return a.getTime()>=e.getTime()?t+1:a.getTime()>=n.getTime()?t:t-1}function ir(o){E(1,arguments);var a=ut(o),t=new Date(0);t.setUTCFullYear(a,0,4),t.setUTCHours(0,0,0,0);var r=le(t);return r}var or=6048e5;function st(o){E(1,arguments);var a=A(o),t=le(a).getTime()-ir(a).getTime();return Math.round(t/or)+1}function ie(o,a){var t,r,e,i,n,u,s,l;E(1,arguments);var d=ce(),m=L((t=(r=(e=(i=a==null?void 0:a.weekStartsOn)!==null&&i!==void 0?i:a==null||(n=a.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:d.weekStartsOn)!==null&&r!==void 0?r:(s=d.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=A(o),v=h.getUTCDay(),D=(v<m?7:0)+v-m;return h.setUTCDate(h.getUTCDate()-D),h.setUTCHours(0,0,0,0),h}function _e(o,a){var t,r,e,i,n,u,s,l;E(1,arguments);var d=A(o),m=d.getUTCFullYear(),h=ce(),v=L((t=(r=(e=(i=a==null?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:a==null||(n=a.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:h.firstWeekContainsDate)!==null&&r!==void 0?r:(s=h.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=new Date(0);D.setUTCFullYear(m+1,0,v),D.setUTCHours(0,0,0,0);var $=ie(D,a),W=new Date(0);W.setUTCFullYear(m,0,v),W.setUTCHours(0,0,0,0);var U=ie(W,a);return d.getTime()>=$.getTime()?m+1:d.getTime()>=U.getTime()?m:m-1}function ur(o,a){var t,r,e,i,n,u,s,l;E(1,arguments);var d=ce(),m=L((t=(r=(e=(i=a==null?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:a==null||(n=a.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:d.firstWeekContainsDate)!==null&&r!==void 0?r:(s=d.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=_e(o,a),v=new Date(0);v.setUTCFullYear(h,0,m),v.setUTCHours(0,0,0,0);var D=ie(v,a);return D}var sr=6048e5;function lt(o,a){E(1,arguments);var t=A(o),r=ie(t,a).getTime()-ur(t,a).getTime();return Math.round(r/sr)+1}function T(o,a){for(var t=o<0?"-":"",r=Math.abs(o).toString();r.length<a;)r="0"+r;return t+r}var lr={y:function(a,t){var r=a.getUTCFullYear(),e=r>0?r:1-r;return T(t==="yy"?e%100:e,t.length)},M:function(a,t){var r=a.getUTCMonth();return t==="M"?String(r+1):T(r+1,2)},d:function(a,t){return T(a.getUTCDate(),t.length)},a:function(a,t){var r=a.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(a,t){return T(a.getUTCHours()%12||12,t.length)},H:function(a,t){return T(a.getUTCHours(),t.length)},m:function(a,t){return T(a.getUTCMinutes(),t.length)},s:function(a,t){return T(a.getUTCSeconds(),t.length)},S:function(a,t){var r=t.length,e=a.getUTCMilliseconds(),i=Math.floor(e*Math.pow(10,r-3));return T(i,t.length)}};const ee=lr;var oe={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cr={G:function(a,t,r){var e=a.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})}},y:function(a,t,r){if(t==="yo"){var e=a.getUTCFullYear(),i=e>0?e:1-e;return r.ordinalNumber(i,{unit:"year"})}return ee.y(a,t)},Y:function(a,t,r,e){var i=_e(a,e),n=i>0?i:1-i;if(t==="YY"){var u=n%100;return T(u,2)}return t==="Yo"?r.ordinalNumber(n,{unit:"year"}):T(n,t.length)},R:function(a,t){var r=ut(a);return T(r,t.length)},u:function(a,t){var r=a.getUTCFullYear();return T(r,t.length)},Q:function(a,t,r){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(t){case"Q":return String(e);case"QQ":return T(e,2);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})}},q:function(a,t,r){var e=Math.ceil((a.getUTCMonth()+1)/3);switch(t){case"q":return String(e);case"qq":return T(e,2);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})}},M:function(a,t,r){var e=a.getUTCMonth();switch(t){case"M":case"MM":return ee.M(a,t);case"Mo":return r.ordinalNumber(e+1,{unit:"month"});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})}},L:function(a,t,r){var e=a.getUTCMonth();switch(t){case"L":return String(e+1);case"LL":return T(e+1,2);case"Lo":return r.ordinalNumber(e+1,{unit:"month"});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})}},w:function(a,t,r,e){var i=lt(a,e);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):T(i,t.length)},I:function(a,t,r){var e=st(a);return t==="Io"?r.ordinalNumber(e,{unit:"week"}):T(e,t.length)},d:function(a,t,r){return t==="do"?r.ordinalNumber(a.getUTCDate(),{unit:"date"}):ee.d(a,t)},D:function(a,t,r){var e=nr(a);return t==="Do"?r.ordinalNumber(e,{unit:"dayOfYear"}):T(e,t.length)},E:function(a,t,r){var e=a.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})}},e:function(a,t,r,e){var i=a.getUTCDay(),n=(i-e.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return T(n,2);case"eo":return r.ordinalNumber(n,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(a,t,r,e){var i=a.getUTCDay(),n=(i-e.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return T(n,t.length);case"co":return r.ordinalNumber(n,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(a,t,r){var e=a.getUTCDay(),i=e===0?7:e;switch(t){case"i":return String(i);case"ii":return T(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(e,{width:"short",context:"formatting"});case"iiii":default:return r.day(e,{width:"wide",context:"formatting"})}},a:function(a,t,r){var e=a.getUTCHours(),i=e/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(a,t,r){var e=a.getUTCHours(),i;switch(e===12?i=oe.noon:e===0?i=oe.midnight:i=e/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(a,t,r){var e=a.getUTCHours(),i;switch(e>=17?i=oe.evening:e>=12?i=oe.afternoon:e>=4?i=oe.morning:i=oe.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(a,t,r){if(t==="ho"){var e=a.getUTCHours()%12;return e===0&&(e=12),r.ordinalNumber(e,{unit:"hour"})}return ee.h(a,t)},H:function(a,t,r){return t==="Ho"?r.ordinalNumber(a.getUTCHours(),{unit:"hour"}):ee.H(a,t)},K:function(a,t,r){var e=a.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(e,{unit:"hour"}):T(e,t.length)},k:function(a,t,r){var e=a.getUTCHours();return e===0&&(e=24),t==="ko"?r.ordinalNumber(e,{unit:"hour"}):T(e,t.length)},m:function(a,t,r){return t==="mo"?r.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):ee.m(a,t)},s:function(a,t,r){return t==="so"?r.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):ee.s(a,t)},S:function(a,t){return ee.S(a,t)},X:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Ge(n);case"XXXX":case"XX":return ne(n);case"XXXXX":case"XXX":default:return ne(n,":")}},x:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();switch(t){case"x":return Ge(n);case"xxxx":case"xx":return ne(n);case"xxxxx":case"xxx":default:return ne(n,":")}},O:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xe(n,":");case"OOOO":default:return"GMT"+ne(n,":")}},z:function(a,t,r,e){var i=e._originalDate||a,n=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xe(n,":");case"zzzz":default:return"GMT"+ne(n,":")}},t:function(a,t,r,e){var i=e._originalDate||a,n=Math.floor(i.getTime()/1e3);return T(n,t.length)},T:function(a,t,r,e){var i=e._originalDate||a,n=i.getTime();return T(n,t.length)}};function Xe(o,a){var t=o>0?"-":"+",r=Math.abs(o),e=Math.floor(r/60),i=r%60;if(i===0)return t+String(e);var n=a||"";return t+String(e)+n+T(i,2)}function Ge(o,a){if(o%60===0){var t=o>0?"-":"+";return t+T(Math.abs(o)/60,2)}return ne(o,a)}function ne(o,a){var t=a||"",r=o>0?"-":"+",e=Math.abs(o),i=T(Math.floor(e/60),2),n=T(e%60,2);return r+i+t+n}const dr=cr;var Ke=function(a,t){switch(a){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ct=function(a,t){switch(a){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},fr=function(a,t){var r=a.match(/(P+)(p+)?/)||[],e=r[1],i=r[2];if(!i)return Ke(a,t);var n;switch(e){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",Ke(e,t)).replace("{{time}}",ct(i,t))},mr={p:ct,P:fr};const We=mr;var vr=["D","DD"],hr=["YY","YYYY"];function dt(o){return vr.indexOf(o)!==-1}function ft(o){return hr.indexOf(o)!==-1}function Me(o,a,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var gr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},wr=function(a,t,r){var e,i=gr[a];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+e:e+" ago":e};const pr=wr;function se(o){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):o.defaultWidth,r=o.formats[t]||o.formats[o.defaultWidth];return r}}var yr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},br={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Tr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dr={date:se({formats:yr,defaultWidth:"full"}),time:se({formats:br,defaultWidth:"full"}),dateTime:se({formats:Tr,defaultWidth:"full"})};const Mr=Dr;var Pr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kr=function(a,t,r,e){return Pr[a]};const Cr=kr;function j(o){return function(a,t){var r=t!=null&&t.context?String(t.context):"standalone",e;if(r==="formatting"&&o.formattingValues){var i=o.defaultFormattingWidth||o.defaultWidth,n=t!=null&&t.width?String(t.width):i;e=o.formattingValues[n]||o.formattingValues[i]}else{var u=o.defaultWidth,s=t!=null&&t.width?String(t.width):o.defaultWidth;e=o.values[s]||o.values[u]}var l=o.argumentCallback?o.argumentCallback(a):a;return e[l]}}var xr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Or={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Er={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ur={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$r={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Wr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Yr=function(a,t){var r=Number(a),e=r%100;if(e>20||e<10)switch(e%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Nr={ordinalNumber:Yr,era:j({values:xr,defaultWidth:"wide"}),quarter:j({values:Or,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:j({values:Er,defaultWidth:"wide"}),day:j({values:Ur,defaultWidth:"wide"}),dayPeriod:j({values:$r,defaultWidth:"wide",formattingValues:Wr,defaultFormattingWidth:"wide"})};const _r=Nr;function V(o){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,e=r&&o.matchPatterns[r]||o.matchPatterns[o.defaultMatchWidth],i=a.match(e);if(!i)return null;var n=i[0],u=r&&o.parsePatterns[r]||o.parsePatterns[o.defaultParseWidth],s=Array.isArray(u)?Sr(u,function(m){return m.test(n)}):Ar(u,function(m){return m.test(n)}),l;l=o.valueCallback?o.valueCallback(s):s,l=t.valueCallback?t.valueCallback(l):l;var d=a.slice(n.length);return{value:l,rest:d}}}function Ar(o,a){for(var t in o)if(o.hasOwnProperty(t)&&a(o[t]))return t}function Sr(o,a){for(var t=0;t<o.length;t++)if(a(o[t]))return t}function mt(o){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.match(o.matchPattern);if(!r)return null;var e=r[0],i=a.match(o.parsePattern);if(!i)return null;var n=o.valueCallback?o.valueCallback(i[0]):i[0];n=t.valueCallback?t.valueCallback(n):n;var u=a.slice(e.length);return{value:n,rest:u}}}var Lr=/^(\d+)(th|st|nd|rd)?/i,Rr=/\d+/i,Hr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ir={any:[/^b/i,/^(a|c)/i]},qr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Fr={any:[/1/i,/2/i,/3/i,/4/i]},Qr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Br={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Gr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Kr={ordinalNumber:mt({matchPattern:Lr,parsePattern:Rr,valueCallback:function(a){return parseInt(a,10)}}),era:V({matchPatterns:Hr,defaultMatchWidth:"wide",parsePatterns:Ir,defaultParseWidth:"any"}),quarter:V({matchPatterns:qr,defaultMatchWidth:"wide",parsePatterns:Fr,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:V({matchPatterns:Qr,defaultMatchWidth:"wide",parsePatterns:Br,defaultParseWidth:"any"}),day:V({matchPatterns:jr,defaultMatchWidth:"wide",parsePatterns:Vr,defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:Xr,defaultMatchWidth:"any",parsePatterns:Gr,defaultParseWidth:"any"})};const Jr=Kr;var zr={code:"en-US",formatDistance:pr,formatLong:Mr,formatRelative:Cr,localize:_r,match:Jr,options:{weekStartsOn:0,firstWeekContainsDate:1}};const vt=zr;var Zr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ea=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ta=/^'([^]*?)'?$/,ra=/''/g,aa=/[a-zA-Z]/;function te(o,a,t){var r,e,i,n,u,s,l,d,m,h,v,D,$,W,U,Y,H,I;E(2,arguments);var de=String(a),S=ce(),Q=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:S.locale)!==null&&r!==void 0?r:vt,K=L((i=(n=(u=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(l=t.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&u!==void 0?u:S.firstWeekContainsDate)!==null&&n!==void 0?n:(m=S.locale)===null||m===void 0||(h=m.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(K>=1&&K<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=L((v=(D=($=(W=t==null?void 0:t.weekStartsOn)!==null&&W!==void 0?W:t==null||(U=t.locale)===null||U===void 0||(Y=U.options)===null||Y===void 0?void 0:Y.weekStartsOn)!==null&&$!==void 0?$:S.weekStartsOn)!==null&&D!==void 0?D:(H=S.locale)===null||H===void 0||(I=H.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&v!==void 0?v:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Q.localize)throw new RangeError("locale must contain localize property");if(!Q.formatLong)throw new RangeError("locale must contain formatLong property");var Z=A(o);if(!$e(Z))throw new RangeError("Invalid time value");var fe=it(Z),me=ot(Z,fe),ve={firstWeekContainsDate:K,weekStartsOn:z,locale:Q,_originalDate:Z},Ce=de.match(ea).map(function(_){var R=_[0];if(R==="p"||R==="P"){var ae=We[R];return ae(_,Q.formatLong)}return _}).join("").match(Zr).map(function(_){if(_==="''")return"'";var R=_[0];if(R==="'")return na(_);var ae=dr[R];if(ae)return!(t!=null&&t.useAdditionalWeekYearTokens)&&ft(_)&&Me(_,a,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&dt(_)&&Me(_,a,String(o)),ae(me,_,Q.localize,ve);if(R.match(aa))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");return _}).join("");return Ce}function na(o){var a=o.match(ta);return a?a[1].replace(ra,"'"):o}function ia(o,a){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(o[t]=a[t]);return o}function Je(o,a){(a==null||a>o.length)&&(a=o.length);for(var t=0,r=new Array(a);t<a;t++)r[t]=o[t];return r}function oa(o,a){if(o){if(typeof o=="string")return Je(o,a);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Je(o,a)}}function ze(o,a){var t=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=oa(o))||a&&o&&typeof o.length=="number"){t&&(o=t);var r=0,e=function(){};return{s:e,n:function(){return r>=o.length?{done:!0}:{done:!1,value:o[r++]}},e:function(l){throw l},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,n=!1,u;return{s:function(){t=t.call(o)},n:function(){var l=t.next();return i=l.done,l},e:function(l){n=!0,u=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(n)throw u}}}}function f(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Ye(o,a){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},Ye(o,a)}function p(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),a&&Ye(o,a)}function Pe(o){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pe(o)}function ua(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sa(o,a){if(a&&(J(a)==="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(o)}function y(o){var a=ua();return function(){var r=Pe(o),e;if(a){var i=Pe(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return sa(this,e)}}function g(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function la(o,a){if(J(o)!=="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,a||"default");if(J(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(o)}function ht(o){var a=la(o,"string");return J(a)==="symbol"?a:String(a)}function Ze(o,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,ht(r.key),r)}}function w(o,a,t){return a&&Ze(o.prototype,a),t&&Ze(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function c(o,a,t){return a=ht(a),a in o?Object.defineProperty(o,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[a]=t,o}var ca=10,gt=function(){function o(){g(this,o),c(this,"priority",void 0),c(this,"subPriority",0)}return w(o,[{key:"validate",value:function(t,r){return!0}}]),o}(),da=function(o){p(t,o);var a=y(t);function t(r,e,i,n,u){var s;return g(this,t),s=a.call(this),s.value=r,s.validateValue=e,s.setValue=i,s.priority=n,u&&(s.subPriority=u),s}return w(t,[{key:"validate",value:function(e,i){return this.validateValue(e,this.value,i)}},{key:"set",value:function(e,i,n){return this.setValue(e,i,this.value,n)}}]),t}(gt),fa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",ca),c(f(r),"subPriority",-1),r}return w(t,[{key:"set",value:function(e,i){if(i.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),t}(gt),b=function(){function o(){g(this,o),c(this,"incompatibleTokens",void 0),c(this,"priority",void 0),c(this,"subPriority",void 0)}return w(o,[{key:"run",value:function(t,r,e,i){var n=this.parse(t,r,e,i);return n?{setter:new da(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}},{key:"validate",value:function(t,r,e){return!0}}]),o}(),ma=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",140),c(f(r),"incompatibleTokens",["R","u","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,i,n){return i.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),x={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},X={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function O(o,a){return o&&{value:a(o.value),rest:o.rest}}function k(o,a){var t=a.match(o);return t?{value:parseInt(t[0],10),rest:a.slice(t[0].length)}:null}function G(o,a){var t=a.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:a.slice(1)};var r=t[1]==="+"?1:-1,e=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,n=t[5]?parseInt(t[5],10):0;return{value:r*(e*er+i*Zt+n*tr),rest:a.slice(t[0].length)}}function wt(o){return k(x.anyDigitsSigned,o)}function C(o,a){switch(o){case 1:return k(x.singleDigit,a);case 2:return k(x.twoDigits,a);case 3:return k(x.threeDigits,a);case 4:return k(x.fourDigits,a);default:return k(new RegExp("^\\d{1,"+o+"}"),a)}}function ke(o,a){switch(o){case 1:return k(x.singleDigitSigned,a);case 2:return k(x.twoDigitsSigned,a);case 3:return k(x.threeDigitsSigned,a);case 4:return k(x.fourDigitsSigned,a);default:return k(new RegExp("^-?\\d{1,"+o+"}"),a)}}function Ae(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function pt(o,a){var t=a>0,r=t?a:1-a,e;if(r<=50)e=o||100;else{var i=r+50,n=Math.floor(i/100)*100,u=o>=i%100;e=o+n-(u?100:0)}return t?e:1-e}function yt(o){return o%400===0||o%4===0&&o%100!==0}var va=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return O(C(4,e),u);case"yo":return O(n.ordinalNumber(e,{unit:"year"}),u);default:return O(C(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,n){var u=e.getUTCFullYear();if(n.isTwoDigitYear){var s=pt(n.year,u);return e.setUTCFullYear(s,0,1),e.setUTCHours(0,0,0,0),e}var l=!("era"in i)||i.era===1?n.year:1-n.year;return e.setUTCFullYear(l,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),ha=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return O(C(4,e),u);case"Yo":return O(n.ordinalNumber(e,{unit:"year"}),u);default:return O(C(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,n,u){var s=_e(e,u);if(n.isTwoDigitYear){var l=pt(n.year,s);return e.setUTCFullYear(l,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ie(e,u)}var d=!("era"in i)||i.era===1?n.year:1-n.year;return e.setUTCFullYear(d,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ie(e,u)}}]),t}(b),ga=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i){return ke(i==="R"?4:i.length,e)}},{key:"set",value:function(e,i,n){var u=new Date(0);return u.setUTCFullYear(n,0,4),u.setUTCHours(0,0,0,0),le(u)}}]),t}(b),wa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",130),c(f(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i){return ke(i==="u"?4:i.length,e)}},{key:"set",value:function(e,i,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),pa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",120),c(f(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"Q":case"QQ":return C(i.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,n){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),ya=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",120),c(f(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"q":case"qq":return C(i.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,n){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),ba=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),c(f(r),"priority",110),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return l-1};switch(i){case"M":return O(k(x.month,e),u);case"MM":return O(C(2,e),u);case"Mo":return O(n.ordinalNumber(e,{unit:"month"}),u);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),t}(b),Ta=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",110),c(f(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return l-1};switch(i){case"L":return O(k(x.month,e),u);case"LL":return O(C(2,e),u);case"Lo":return O(n.ordinalNumber(e,{unit:"month"}),u);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),t}(b);function Da(o,a,t){E(2,arguments);var r=A(o),e=L(a),i=lt(r,t)-e;return r.setUTCDate(r.getUTCDate()-i*7),r}var Ma=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",100),c(f(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"w":return k(x.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,n,u){return ie(Da(e,n,u),u)}}]),t}(b);function Pa(o,a){E(2,arguments);var t=A(o),r=L(a),e=st(t)-r;return t.setUTCDate(t.getUTCDate()-e*7),t}var ka=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",100),c(f(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"I":return k(x.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,n){return le(Pa(e,n))}}]),t}(b),Ca=[31,28,31,30,31,30,31,31,30,31,30,31],xa=[31,29,31,30,31,30,31,31,30,31,30,31],Oa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"subPriority",1),c(f(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"d":return k(x.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){var n=e.getUTCFullYear(),u=yt(n),s=e.getUTCMonth();return u?i>=1&&i<=xa[s]:i>=1&&i<=Ca[s]}},{key:"set",value:function(e,i,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),t}(b),Ea=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"subpriority",1),c(f(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"D":case"DD":return k(x.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){var n=e.getUTCFullYear(),u=yt(n);return u?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(e,i,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),t}(b);function Se(o,a,t){var r,e,i,n,u,s,l,d;E(2,arguments);var m=ce(),h=L((r=(e=(i=(n=t==null?void 0:t.weekStartsOn)!==null&&n!==void 0?n:t==null||(u=t.locale)===null||u===void 0||(s=u.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:m.weekStartsOn)!==null&&e!==void 0?e:(l=m.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=A(o),D=L(a),$=v.getUTCDay(),W=D%7,U=(W+7)%7,Y=(U<h?7:0)+D-$;return v.setUTCDate(v.getUTCDate()+Y),v}var Ua=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,n,u){return e=Se(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(b),$a=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n,u){var s=function(d){var m=Math.floor((d-1)/7)*7;return(d+u.weekStartsOn+6)%7+m};switch(i){case"e":case"ee":return O(C(i.length,e),s);case"eo":return O(n.ordinalNumber(e,{unit:"day"}),s);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,n,u){return e=Se(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(b),Wa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n,u){var s=function(d){var m=Math.floor((d-1)/7)*7;return(d+u.weekStartsOn+6)%7+m};switch(i){case"c":case"cc":return O(C(i.length,e),s);case"co":return O(n.ordinalNumber(e,{unit:"day"}),s);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,n,u){return e=Se(e,n,u),e.setUTCHours(0,0,0,0),e}}]),t}(b);function Ya(o,a){E(2,arguments);var t=L(a);t%7===0&&(t=t-7);var r=1,e=A(o),i=e.getUTCDay(),n=t%7,u=(n+7)%7,s=(u<r?7:0)+t-i;return e.setUTCDate(e.getUTCDate()+s),e}var Na=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",90),c(f(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){var u=function(l){return l===0?7:l};switch(i){case"i":case"ii":return C(i.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return O(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return O(n.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return O(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return O(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),u)}}},{key:"validate",value:function(e,i){return i>=1&&i<=7}},{key:"set",value:function(e,i,n){return e=Ya(e,n),e.setUTCHours(0,0,0,0),e}}]),t}(b),_a=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",80),c(f(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,n){return e.setUTCHours(Ae(n),0,0,0),e}}]),t}(b),Aa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",80),c(f(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,n){return e.setUTCHours(Ae(n),0,0,0),e}}]),t}(b),Sa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",80),c(f(r),"incompatibleTokens",["a","b","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,n){return e.setUTCHours(Ae(n),0,0,0),e}}]),t}(b),La=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["H","K","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"h":return k(x.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=12}},{key:"set",value:function(e,i,n){var u=e.getUTCHours()>=12;return u&&n<12?e.setUTCHours(n+12,0,0,0):!u&&n===12?e.setUTCHours(0,0,0,0):e.setUTCHours(n,0,0,0),e}}]),t}(b),Ra=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"H":return k(x.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=23}},{key:"set",value:function(e,i,n){return e.setUTCHours(n,0,0,0),e}}]),t}(b),Ha=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["h","H","k","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"K":return k(x.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,n){var u=e.getUTCHours()>=12;return u&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),t}(b),Ia=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",70),c(f(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"k":return k(x.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=24}},{key:"set",value:function(e,i,n){var u=n<=24?n%24:n;return e.setUTCHours(u,0,0,0),e}}]),t}(b),qa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",60),c(f(r),"incompatibleTokens",["t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"m":return k(x.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,n){return e.setUTCMinutes(n,0,0),e}}]),t}(b),Fa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",50),c(f(r),"incompatibleTokens",["t","T"]),r}return w(t,[{key:"parse",value:function(e,i,n){switch(i){case"s":return k(x.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return C(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,n){return e.setUTCSeconds(n,0),e}}]),t}(b),Qa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",30),c(f(r),"incompatibleTokens",["t","T"]),r}return w(t,[{key:"parse",value:function(e,i){var n=function(s){return Math.floor(s*Math.pow(10,-i.length+3))};return O(C(i.length,e),n)}},{key:"set",value:function(e,i,n){return e.setUTCMilliseconds(n),e}}]),t}(b),Ba=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",10),c(f(r),"incompatibleTokens",["t","T","x"]),r}return w(t,[{key:"parse",value:function(e,i){switch(i){case"X":return G(X.basicOptionalMinutes,e);case"XX":return G(X.basic,e);case"XXXX":return G(X.basicOptionalSeconds,e);case"XXXXX":return G(X.extendedOptionalSeconds,e);case"XXX":default:return G(X.extended,e)}}},{key:"set",value:function(e,i,n){return i.timestampIsSet?e:new Date(e.getTime()-n)}}]),t}(b),ja=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",10),c(f(r),"incompatibleTokens",["t","T","X"]),r}return w(t,[{key:"parse",value:function(e,i){switch(i){case"x":return G(X.basicOptionalMinutes,e);case"xx":return G(X.basic,e);case"xxxx":return G(X.basicOptionalSeconds,e);case"xxxxx":return G(X.extendedOptionalSeconds,e);case"xxx":default:return G(X.extended,e)}}},{key:"set",value:function(e,i,n){return i.timestampIsSet?e:new Date(e.getTime()-n)}}]),t}(b),Va=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",40),c(f(r),"incompatibleTokens","*"),r}return w(t,[{key:"parse",value:function(e){return wt(e)}},{key:"set",value:function(e,i,n){return[new Date(n*1e3),{timestampIsSet:!0}]}}]),t}(b),Xa=function(o){p(t,o);var a=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return r=a.call.apply(a,[this].concat(i)),c(f(r),"priority",20),c(f(r),"incompatibleTokens","*"),r}return w(t,[{key:"parse",value:function(e){return wt(e)}},{key:"set",value:function(e,i,n){return[new Date(n),{timestampIsSet:!0}]}}]),t}(b),Ga={G:new ma,y:new va,Y:new ha,R:new ga,u:new wa,Q:new pa,q:new ya,M:new ba,L:new Ta,w:new Ma,I:new ka,d:new Oa,D:new Ea,E:new Ua,e:new $a,c:new Wa,i:new Na,a:new _a,b:new Aa,B:new Sa,h:new La,H:new Ra,K:new Ha,k:new Ia,m:new qa,s:new Fa,S:new Qa,X:new Ba,x:new ja,t:new Va,T:new Xa},Ka=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ja=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,za=/^'([^]*?)'?$/,Za=/''/g,en=/\S/,tn=/[a-zA-Z]/;function et(o,a,t,r){var e,i,n,u,s,l,d,m,h,v,D,$,W,U,Y,H,I,de;E(3,arguments);var S=String(o),Q=String(a),K=ce(),z=(e=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:K.locale)!==null&&e!==void 0?e:vt;if(!z.match)throw new RangeError("locale must contain match property");var Z=L((n=(u=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(d=r.locale)===null||d===void 0||(m=d.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&s!==void 0?s:K.firstWeekContainsDate)!==null&&u!==void 0?u:(h=K.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(Z>=1&&Z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var fe=L((D=($=(W=(U=r==null?void 0:r.weekStartsOn)!==null&&U!==void 0?U:r==null||(Y=r.locale)===null||Y===void 0||(H=Y.options)===null||H===void 0?void 0:H.weekStartsOn)!==null&&W!==void 0?W:K.weekStartsOn)!==null&&$!==void 0?$:(I=K.locale)===null||I===void 0||(de=I.options)===null||de===void 0?void 0:de.weekStartsOn)!==null&&D!==void 0?D:0);if(!(fe>=0&&fe<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(Q==="")return S===""?A(t):new Date(NaN);var me={firstWeekContainsDate:Z,weekStartsOn:fe,locale:z},ve=[new fa],Ce=Q.match(Ja).map(function(N){var M=N[0];if(M in We){var q=We[M];return q(N,z.formatLong)}return N}).join("").match(Ka),_=[],R=ze(Ce),ae;try{var bt=function(){var M=ae.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ft(M)&&Me(M,Q,o),!(r!=null&&r.useAdditionalDayOfYearTokens)&&dt(M)&&Me(M,Q,o);var q=M[0],pe=Ga[q];if(pe){var qe=pe.incompatibleTokens;if(Array.isArray(qe)){var Fe=_.find(function(Qe){return qe.includes(Qe.token)||Qe.token===q});if(Fe)throw new RangeError("The format string mustn't contain `".concat(Fe.fullToken,"` and `").concat(M,"` at the same time"))}else if(pe.incompatibleTokens==="*"&&_.length>0)throw new RangeError("The format string mustn't contain `".concat(M,"` and any other token at the same time"));_.push({token:q,fullToken:M});var Oe=pe.run(S,M,z.match,me);if(!Oe)return{v:new Date(NaN)};ve.push(Oe.setter),S=Oe.rest}else{if(q.match(tn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");if(M==="''"?M="'":q==="'"&&(M=rn(M)),S.indexOf(M)===0)S=S.slice(M.length);else return{v:new Date(NaN)}}};for(R.s();!(ae=R.n()).done;){var Le=bt();if(J(Le)==="object")return Le.v}}catch(N){R.e(N)}finally{R.f()}if(S.length>0&&en.test(S))return new Date(NaN);var Tt=ve.map(function(N){return N.priority}).sort(function(N,M){return M-N}).filter(function(N,M,q){return q.indexOf(N)===M}).map(function(N){return ve.filter(function(M){return M.priority===N}).sort(function(M,q){return q.subPriority-M.subPriority})}).map(function(N){return N[0]}),xe=A(t);if(isNaN(xe.getTime()))return new Date(NaN);var he=ot(xe,it(xe)),Re={},ge=ze(Tt),He;try{for(ge.s();!(He=ge.n()).done;){var Ie=He.value;if(!Ie.validate(he,me))return new Date(NaN);var we=Ie.set(he,Re,me);Array.isArray(we)?(he=we[0],ia(Re,we[1])):he=we}}catch(N){ge.e(N)}finally{ge.f()}return he}function rn(o){return o.match(za)[1].replace(Za,"'")}var an={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},nn=function(a,t,r){var e,i=an[a];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"dalam waktu "+e:e+" yang lalu":e};const on=nn;var un={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},sn={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},ln={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cn={date:se({formats:un,defaultWidth:"full"}),time:se({formats:sn,defaultWidth:"full"}),dateTime:se({formats:ln,defaultWidth:"full"})};const dn=cn;var fn={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},mn=function(a,t,r,e){return fn[a]};const vn=mn;var hn={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},gn={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},wn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},pn={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},yn={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},bn={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},Tn=function(a,t){var r=Number(a);return"ke-"+r},Dn={ordinalNumber:Tn,era:j({values:hn,defaultWidth:"wide"}),quarter:j({values:gn,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:j({values:wn,defaultWidth:"wide"}),day:j({values:pn,defaultWidth:"wide"}),dayPeriod:j({values:yn,defaultWidth:"wide",formattingValues:bn,defaultFormattingWidth:"wide"})};const Mn=Dn;var Pn=/^ke-(\d+)?/i,kn=/\d+/i,Cn={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},xn={any:[/^s/i,/^(m|e)/i]},On={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},En={any:[/1/i,/2/i,/3/i,/4/i]},Un={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},$n={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wn={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},Yn={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},Nn={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},_n={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},An={ordinalNumber:mt({matchPattern:Pn,parsePattern:kn,valueCallback:function(a){return parseInt(a,10)}}),era:V({matchPatterns:Cn,defaultMatchWidth:"wide",parsePatterns:xn,defaultParseWidth:"any"}),quarter:V({matchPatterns:On,defaultMatchWidth:"wide",parsePatterns:En,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:V({matchPatterns:Un,defaultMatchWidth:"wide",parsePatterns:$n,defaultParseWidth:"any"}),day:V({matchPatterns:Wn,defaultMatchWidth:"wide",parsePatterns:Yn,defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:Nn,defaultMatchWidth:"any",parsePatterns:_n,defaultParseWidth:"any"})};const Sn=An;var Ln={code:"id",formatDistance:on,formatLong:dn,formatRelative:vn,localize:Mn,match:Sn,options:{weekStartsOn:1,firstWeekContainsDate:1}};const re=Ln;function Rn(o){let a="";const{dateStart:t,dateEnd:r}=o,e=$e(et(t,"yyyy-MM-dd HH:mm",new Date)),i=$e(et(r,"yyyy-MM-dd HH:mm",new Date));if(e&&i){const n=t.split(" "),u=n[0].split("-"),s=u[0],l=u[1],d=r.split(" "),m=d[0].split("-"),h=m[0],v=m[1];n[0]===d[0]?a=`Voucher hanya berlaku di tanggal ${te(new Date(t),"d MMM yyyy",{locale:re})}.`:s!==h?a=`Voucher berlaku dari ${te(new Date(t),"d MMM yyyy",{locale:re})} - ${te(new Date(r),"d MMM yyyy",{locale:re})}.`:s===h&&(l===v?a=`Voucher berlaku dari ${te(new Date(t),"d",{locale:re})} - ${te(new Date(r),"d MMM yyyy",{locale:re})}.`:a=`Voucher berlaku dari ${te(new Date(t),"d MMM",{locale:re})} - ${te(new Date(r),"d MMM yyyy",{locale:re})}.`)}else e&&!i&&(a=`Voucher berlaku dari ${te(new Date(t),"d MMM yyyy",{locale:re})}.`);return a}function Hn(o){let a="";const{type:t,discountType:r,discountValue:e,isCheckedMaxFee:i,maxDiscountAmount:n,transactionTerms:u,termsMinTotalAmount:s,termsMinQty:l,limitFee:d}=o,m=U=>typeof U=="number"?U:Number.isNaN(Number(U))?0:Number(U),h=ue({value:m(n),prefix:"Rp"}),v=ue({value:m(e),prefix:"Rp"}),D=ue({value:m(d),prefix:"Rp"}),$=ue({value:m(s),prefix:"Rp"}),W=ue({value:m(l)});switch(t===B.product||t===B.order||t===B.gift?r===De.percentage&&t!==B.gift?(a=`Diskon ${e||0}%`,i&&(a+=` (hingga ${h})`)):r===De.amount&&t!==B.gift?a=`Potongan ${v}`:a=`Potongan ${D}`:t===B.freeShipping?(a="Shipping fee ditanggung oleh voilà.id",i&&(a+=` (hingga ${D})`)):t===B.freeInsurance&&(a="Insurance fee ditanggung oleh voilà.id",i&&(a+=` (hingga ${D})`)),u){case 0:a+=" tanpa minimum pembelian.";break;case 1:a+=` dengan min. pembelian ${$}.`;break;case 2:a+=` dengan min. pembelian ${l?W:0} item.`;break;default:a+=""}return a}const In=o=>{const a=[],{dateEnd:t,dateStart:r,type:e,discountType:i,discountValue:n,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:d,termsMinQty:m,limitFee:h,collections:v,brands:D,eligibilityType:$,isOneTimeUsage:W,quota:U}=o,Y=Rn({dateStart:r,dateEnd:t}),H=Kt({type:e,collections:v,brands:D,eligibilityType:$}),I=Hn({type:e,discountType:i,discountValue:n,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:d,termsMinQty:m,limitFee:h});return Y&&a.push(Y),I&&a.push(I),H&&a.push(H),W&&a.push("Voucher hanya dapat digunakan 1x per member selama masa berlaku."),U>0&&a.push("Kuota voucher terbatas."),a},qn=In;exports.DiscountType=De;exports.VoucherType=B;exports.canUseDOM=rt;exports.getOwnerDocument=Ne;exports.isBrowser=at;exports.isElement=tt;exports.isValidEvent=be;exports.useCallbackRef=Te;exports.useClipboard=Ut;exports.useDebounce=Wt;exports.useDimensions=Ht;exports.useDisclosure=qt;exports.useMediaQuery=Qt;exports.useNumberFormatter=ue;exports.useOnlineStatus=Vt;exports.useOutsideClick=Gt;exports.useSafeLayoutEffect=nt;exports.useVoucherTnc=qn;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),tt=o=>o!=null&&typeof o=="object"&&"nodeType"in o&&o.nodeType===Node.ELEMENT_NODE,Ye=o=>tt(o)?o.ownerDocument??document:document,be=(o,n)=>{var r;const t=o.target;return o.button>0||t&&!Ye(t).contains(t)?!1:!((r=n.current)!=null&&r.contains(t))},rt=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),nt=rt(),kt=(o,n=[])=>{const t=P.useRef(o);return P.useEffect(()=>{t.current=o}),P.useCallback((...r)=>{var e;return(e=t.current)==null?void 0:e.call(t,...r)},n)},Te=kt;var Dt=function(){var o=document.getSelection();if(!o.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<o.rangeCount;r++)t.push(o.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return o.removeAllRanges(),function(){o.type==="Caret"&&o.removeAllRanges(),o.rangeCount||t.forEach(function(e){o.addRange(e)}),n&&n.focus()}},Pt=Dt,Qe={"text/plain":"Text","text/html":"Url",default:"Text"},Mt="Copy to clipboard: #{key}, Enter";function Ct(o){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,n)}function xt(o,n){var t,r,e,i,a,u,s=!1;n||(n={}),t=n.debug||!1;try{e=Pt(),i=document.createRange(),a=document.getSelection(),u=document.createElement("span"),u.textContent=o,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(c){if(c.stopPropagation(),n.format)if(c.preventDefault(),typeof c.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=Qe[n.format]||Qe.default;window.clipboardData.setData(f,o)}else c.clipboardData.clearData(),c.clipboardData.setData(n.format,o);n.onCopy&&(c.preventDefault(),n.onCopy(c.clipboardData))}),document.body.appendChild(u),i.selectNodeContents(u),a.addRange(i);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");s=!0}catch(c){t&&console.error("unable to copy using execCommand: ",c),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",o),n.onCopy&&n.onCopy(window.clipboardData),s=!0}catch(f){t&&console.error("unable to copy using clipboardData: ",f),t&&console.error("falling back to prompt"),r=Ct("message"in n?n.message:Mt),window.prompt(r,o)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(i):a.removeAllRanges()),u&&document.body.removeChild(u),e()}return s}var Ot=xt;const Et=({value:o="",optionsOrTimeout:n={}}={})=>{const[t,r]=P.useState(!1),[e,i]=P.useState(o);P.useEffect(()=>i(o),[o]);const{timeout:a=1500,...u}=typeof n=="number"?{timeout:n}:n,s=P.useCallback(()=>{const l=Ot(e,u);r(l)},[e,u]);return P.useEffect(()=>{let l=null;return t&&(l=window.setTimeout(()=>{r(!1)},a)),()=>{l&&window.clearTimeout(l)}},[a,t]),{value:e,setValue:i,onCopy:s,hasCopied:t}},Ut=Et,$t=({value:o,delay:n=500})=>{const[t,r]=P.useState(o);return P.useEffect(()=>{const e=setTimeout(()=>r(o),n||500);return()=>{clearTimeout(e)}},[o,n]),t},Wt=$t;var Nt=process.env.NODE_ENV==="production",Ee="Invariant failed";function je(o,n){if(!o){if(Nt)throw new Error(Ee);var t=typeof n=="function"?n():n,r=t?"".concat(Ee,": ").concat(t):Ee;throw new Error(r)}}var ye=function(n){var t=n.top,r=n.right,e=n.bottom,i=n.left,a=r-i,u=e-t,s={top:t,right:r,bottom:e,left:i,width:a,height:u,x:i,y:t,center:{x:(r+i)/2,y:(e+t)/2}};return s},Yt=function(n,t){return{top:n.top-t.top,left:n.left-t.left,bottom:n.bottom+t.bottom,right:n.right+t.right}},Ve=function(n,t){return{top:n.top+t.top,left:n.left+t.left,bottom:n.bottom-t.bottom,right:n.right-t.right}},Ue={top:0,right:0,bottom:0,left:0},_t=function(n){var t=n.borderBox,r=n.margin,e=r===void 0?Ue:r,i=n.border,a=i===void 0?Ue:i,u=n.padding,s=u===void 0?Ue:u,l=ye(Yt(t,e)),c=ye(Ve(t,a)),f=ye(Ve(c,s));return{marginBox:l,borderBox:ye(t),paddingBox:c,contentBox:f,margin:e,border:a,padding:s}},V=function(n){var t=n.slice(0,-2),r=n.slice(-2);if(r!=="px")return 0;var e=Number(t);return isNaN(e)&&(process.env.NODE_ENV!=="production"?je(!1,"Could not parse value [raw: "+n+", without suffix: "+t+"]"):je(!1)),e},At=function(n,t){var r={top:V(t.marginTop),right:V(t.marginRight),bottom:V(t.marginBottom),left:V(t.marginLeft)},e={top:V(t.paddingTop),right:V(t.paddingRight),bottom:V(t.paddingBottom),left:V(t.paddingLeft)},i={top:V(t.borderTopWidth),right:V(t.borderRightWidth),bottom:V(t.borderBottomWidth),left:V(t.borderLeftWidth)};return _t({borderBox:n,margin:r,padding:e,border:i})},St=function(n){var t=n.getBoundingClientRect(),r=window.getComputedStyle(n);return At(t,r)};const Lt=nt?P.useLayoutEffect:P.useEffect,at=Lt,It=(o,n)=>{const[t,r]=P.useState(null),e=P.useRef();return at(()=>{const i=()=>{const a=o.current;a&&(e.current=requestAnimationFrame(()=>{const u=St(a);r(u)}))};return i(),n&&(window.addEventListener("resize",i),window.addEventListener("scroll",i)),()=>{n&&(window.removeEventListener("resize",i),window.removeEventListener("scroll",i)),e.current&&cancelAnimationFrame(e.current)}},[n]),t},Rt=It,Ht=({onClose:o,onOpen:n,isOpen:t,defaultIsOpen:r,id:e}={})=>{const[i,a]=P.useState(r||!1),u=t!==void 0?t:i,s=t!==void 0,l=P.useId(),c=e??`disclosure-${l}`,f=Te(n),h=Te(o),v=P.useCallback(()=>{s||a(!1),h==null||h()},[s,h]),b=P.useCallback(()=>{s||a(!0),f==null||f()},[s,f]),x=P.useCallback(()=>{u?v():b()},[u,b,v]);return{onClose:v,onOpen:b,onToggle:x,getButtonProps:({onClick:Y,...R}={})=>({...R,"aria-expanded":u,"aria-controls":c,onClick(M){Y==null||Y(M),x()}}),getDisclosureProps:({...Y}={})=>({...Y,hidden:!u,id:c}),isOpen:u}},qt=Ht,Ft=(o,n={})=>{const{ssr:t=!0,fallback:r}=n,e=Array.isArray(o)?o:[o];let i=Array.isArray(r)?r:[r];i=i.filter(s=>s!=null);const[a,u]=P.useState(()=>e.map((s,l)=>({media:s,matches:t?!!i[l]:window.matchMedia(s).matches})));return P.useEffect(()=>{const s=window;u(e.map(f=>({media:f,matches:s.matchMedia(f).matches})));const l=e.map(f=>s.matchMedia(f)),c=f=>{u(h=>h.slice().map(v=>v.media===f.media?{...v,matches:f.matches}:v))};return l.forEach(f=>{f.addEventListener("change",c)}),()=>{l.forEach(f=>{f.removeEventListener("change",c)})}},[window]),a.map(s=>s.matches)},Bt=Ft,Qt=({value:o,thousandSeparator:n=".",decimalLength:t,decimalSeparator:r=",",prefix:e=""})=>{const a=(u=>{const s=u.toString().split("."),l=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,n);let c="";return t!==void 0?s.length>1&&t>0?c=r+s[1].padEnd(t,"0").slice(0,t):t>0&&(c=r+"0".repeat(t)):s.length>1&&(c=r+s[1]),l+c})(o);return a.charAt(0)==="-"?a.replace(/^-/g,`-${e}`):`${e}${a}`},le=Qt,jt=()=>{const[o,n]=P.useState(navigator.onLine);return P.useEffect(()=>{const t=()=>n(navigator.onLine);return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}},[]),{isOnline:o,isOffline:!o}},Vt=jt,Xt=({enabled:o=!0,ref:n,handler:t})=>{const r=Te(t),i=P.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;P.useEffect(()=>{if(!o)return;const a=c=>{be(c,n)&&(i.isPointerDown=!0)},u=c=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&t&&be(c,n)&&(i.isPointerDown=!1,r(c))},s=c=>{i.ignoreEmulatedMouseEvents=!0,t&&i.isPointerDown&&be(c,n)&&(i.isPointerDown=!1,r(c))},l=Ye(n.current);return l.addEventListener("mousedown",a,!0),l.addEventListener("mouseup",u,!0),l.addEventListener("touchstart",a,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",a,!0),l.removeEventListener("mouseup",u,!0),l.removeEventListener("touchstart",a,!0),l.removeEventListener("touchend",s,!0)}},[t,n,r,i,o])},Gt=Xt;var X=(o=>(o.product="Product",o.order="Order",o.gift="Gift",o.freeShipping="Free Shipping",o.freeInsurance="Free Insurance",o.bundling="Bundling",o.payment="Payment",o))(X||{}),ke=(o=>(o.percentage="percentage",o.amount="amount",o))(ke||{});function Kt(o){let n="";const{type:t,collections:r=[],brands:e=[],eligibilityType:i,payment:a}=o;if(t===X.product)r.length>0?n=`Voucher hanya berlaku untuk collection ${r.map(u=>u.name).join(", ")}.`:e.length>0?n=`Voucher hanya berlaku untuk produk brand ${e.map(u=>u.name).join(", ")}.`:i==="selected_products"&&(n="Voucher hanya berlaku untuk produk tertentu.");else if(t===X.payment){const{bankName:u,paymentMethod:s,creditBinGroup:l,debitBinGroup:c}=a||{},f=(s||[]).some(M=>(M||"").includes("(Full Payment)")),h=(s||[]).some(M=>(M||"").includes("(Cicilan 3x)")),v=(s||[]).some(M=>(M||"").includes("(Cicilan 6x)")),b=(s||[]).some(M=>(M||"").includes("(Cicilan 12x)")),x=h||v||b,E=f||x,Y=[...(s||[]).some(M=>(M||"").includes("Debit Card"))&&(c||[]).length>0?["Kartu Debit"]:[],...E&&(l||[]).length>0?["Kartu Kredit"]:[]];let R="";if(E){const M=[...f?["sistem pembayaran penuh"]:[],...x?["sistem cicilan"]:[]],G=[...h?["3"]:[],...v?["6"]:[],...b?["12"]:[]],U=G.join(", "),L=U.lastIndexOf(","),H=U.slice(0,L),q=U.slice(L+1,U.length),B=G.length>1?[H,q].join(" dan"):q;R=["dengan",M.join(" dan "),...x?[`(${B} bulan)`]:[]].join(" ")}Y.length>0&&(n=["Voucher berlaku untuk pembayaran menggunakan",Y.join(" dan "),u,R].join(" "))}return n}function Jt(o){const{bankName:n,creditBinGroup:t,debitBinGroup:r}=o,e=(t||[]).join(", "),i=(r||[]).join(", ");return[...n&&e?[`Voucher berlaku untuk Kartu Kredit ${n} dengan 6-digit Bank Identification Number (BIN): ${e}.`]:[],...n&&i?[`Voucher berlaku untuk Kartu Debit ${n} dengan 6-digit Bank Identification Number (BIN): ${i}.`]:[]]}function ee(o){return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ee(o)}function F(o){if(o===null||o===!0||o===!1)return NaN;var n=Number(o);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function _(o,n){if(n.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+n.length+" present")}function I(o){_(1,arguments);var n=Object.prototype.toString.call(o);return o instanceof Date||ee(o)==="object"&&n==="[object Date]"?new Date(o.getTime()):typeof o=="number"||n==="[object Number]"?new Date(o):((typeof o=="string"||n==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function zt(o,n){_(2,arguments);var t=I(o).getTime(),r=F(n);return new Date(t+r)}var Zt={};function fe(){return Zt}function it(o){var n=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return n.setUTCFullYear(o.getFullYear()),o.getTime()-n.getTime()}var er=6e4,tr=36e5,rr=1e3;function nr(o){return _(1,arguments),o instanceof Date||ee(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function $e(o){if(_(1,arguments),!nr(o)&&typeof o!="number")return!1;var n=I(o);return!isNaN(Number(n))}function ot(o,n){_(2,arguments);var t=F(n);return zt(o,-t)}var ar=864e5;function ir(o){_(1,arguments);var n=I(o),t=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var r=n.getTime(),e=t-r;return Math.floor(e/ar)+1}function de(o){_(1,arguments);var n=1,t=I(o),r=t.getUTCDay(),e=(r<n?7:0)+r-n;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function ut(o){_(1,arguments);var n=I(o),t=n.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var e=de(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var a=de(i);return n.getTime()>=e.getTime()?t+1:n.getTime()>=a.getTime()?t:t-1}function or(o){_(1,arguments);var n=ut(o),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var r=de(t);return r}var ur=6048e5;function st(o){_(1,arguments);var n=I(o),t=de(n).getTime()-or(n).getTime();return Math.round(t/ur)+1}function ue(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=fe(),f=F((t=(r=(e=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&r!==void 0?r:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=I(o),v=h.getUTCDay(),b=(v<f?7:0)+v-f;return h.setUTCDate(h.getUTCDate()-b),h.setUTCHours(0,0,0,0),h}function _e(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=I(o),f=c.getUTCFullYear(),h=fe(),v=F((t=(r=(e=(i=n==null?void 0:n.firstWeekContainsDate)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:h.firstWeekContainsDate)!==null&&r!==void 0?r:(s=h.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(f+1,0,v),b.setUTCHours(0,0,0,0);var x=ue(b,n),E=new Date(0);E.setUTCFullYear(f,0,v),E.setUTCHours(0,0,0,0);var N=ue(E,n);return c.getTime()>=x.getTime()?f+1:c.getTime()>=N.getTime()?f:f-1}function sr(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=fe(),f=F((t=(r=(e=(i=n==null?void 0:n.firstWeekContainsDate)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:c.firstWeekContainsDate)!==null&&r!==void 0?r:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=_e(o,n),v=new Date(0);v.setUTCFullYear(h,0,f),v.setUTCHours(0,0,0,0);var b=ue(v,n);return b}var lr=6048e5;function lt(o,n){_(1,arguments);var t=I(o),r=ue(t,n).getTime()-sr(t,n).getTime();return Math.round(r/lr)+1}function k(o,n){for(var t=o<0?"-":"",r=Math.abs(o).toString();r.length<n;)r="0"+r;return t+r}var cr={y:function(n,t){var r=n.getUTCFullYear(),e=r>0?r:1-r;return k(t==="yy"?e%100:e,t.length)},M:function(n,t){var r=n.getUTCMonth();return t==="M"?String(r+1):k(r+1,2)},d:function(n,t){return k(n.getUTCDate(),t.length)},a:function(n,t){var r=n.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(n,t){return k(n.getUTCHours()%12||12,t.length)},H:function(n,t){return k(n.getUTCHours(),t.length)},m:function(n,t){return k(n.getUTCMinutes(),t.length)},s:function(n,t){return k(n.getUTCSeconds(),t.length)},S:function(n,t){var r=t.length,e=n.getUTCMilliseconds(),i=Math.floor(e*Math.pow(10,r-3));return k(i,t.length)}};const re=cr;var se={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dr={G:function(n,t,r){var e=n.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})}},y:function(n,t,r){if(t==="yo"){var e=n.getUTCFullYear(),i=e>0?e:1-e;return r.ordinalNumber(i,{unit:"year"})}return re.y(n,t)},Y:function(n,t,r,e){var i=_e(n,e),a=i>0?i:1-i;if(t==="YY"){var u=a%100;return k(u,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):k(a,t.length)},R:function(n,t){var r=ut(n);return k(r,t.length)},u:function(n,t){var r=n.getUTCFullYear();return k(r,t.length)},Q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"Q":return String(e);case"QQ":return k(e,2);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"q":return String(e);case"qq":return k(e,2);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,t,r){var e=n.getUTCMonth();switch(t){case"M":case"MM":return re.M(n,t);case"Mo":return r.ordinalNumber(e+1,{unit:"month"});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})}},L:function(n,t,r){var e=n.getUTCMonth();switch(t){case"L":return String(e+1);case"LL":return k(e+1,2);case"Lo":return r.ordinalNumber(e+1,{unit:"month"});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})}},w:function(n,t,r,e){var i=lt(n,e);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):k(i,t.length)},I:function(n,t,r){var e=st(n);return t==="Io"?r.ordinalNumber(e,{unit:"week"}):k(e,t.length)},d:function(n,t,r){return t==="do"?r.ordinalNumber(n.getUTCDate(),{unit:"date"}):re.d(n,t)},D:function(n,t,r){var e=ir(n);return t==="Do"?r.ordinalNumber(e,{unit:"dayOfYear"}):k(e,t.length)},E:function(n,t,r){var e=n.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})}},e:function(n,t,r,e){var i=n.getUTCDay(),a=(i-e.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return k(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(n,t,r,e){var i=n.getUTCDay(),a=(i-e.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return k(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(n,t,r){var e=n.getUTCDay(),i=e===0?7:e;switch(t){case"i":return String(i);case"ii":return k(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(e,{width:"short",context:"formatting"});case"iiii":default:return r.day(e,{width:"wide",context:"formatting"})}},a:function(n,t,r){var e=n.getUTCHours(),i=e/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,t,r){var e=n.getUTCHours(),i;switch(e===12?i=se.noon:e===0?i=se.midnight:i=e/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,t,r){var e=n.getUTCHours(),i;switch(e>=17?i=se.evening:e>=12?i=se.afternoon:e>=4?i=se.morning:i=se.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,t,r){if(t==="ho"){var e=n.getUTCHours()%12;return e===0&&(e=12),r.ordinalNumber(e,{unit:"hour"})}return re.h(n,t)},H:function(n,t,r){return t==="Ho"?r.ordinalNumber(n.getUTCHours(),{unit:"hour"}):re.H(n,t)},K:function(n,t,r){var e=n.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(e,{unit:"hour"}):k(e,t.length)},k:function(n,t,r){var e=n.getUTCHours();return e===0&&(e=24),t==="ko"?r.ordinalNumber(e,{unit:"hour"}):k(e,t.length)},m:function(n,t,r){return t==="mo"?r.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):re.m(n,t)},s:function(n,t,r){return t==="so"?r.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):re.s(n,t)},S:function(n,t){return re.S(n,t)},X:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Ge(a);case"XXXX":case"XX":return oe(a);case"XXXXX":case"XXX":default:return oe(a,":")}},x:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"x":return Ge(a);case"xxxx":case"xx":return oe(a);case"xxxxx":case"xxx":default:return oe(a,":")}},O:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xe(a,":");case"OOOO":default:return"GMT"+oe(a,":")}},z:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xe(a,":");case"zzzz":default:return"GMT"+oe(a,":")}},t:function(n,t,r,e){var i=e._originalDate||n,a=Math.floor(i.getTime()/1e3);return k(a,t.length)},T:function(n,t,r,e){var i=e._originalDate||n,a=i.getTime();return k(a,t.length)}};function Xe(o,n){var t=o>0?"-":"+",r=Math.abs(o),e=Math.floor(r/60),i=r%60;if(i===0)return t+String(e);var a=n||"";return t+String(e)+a+k(i,2)}function Ge(o,n){if(o%60===0){var t=o>0?"-":"+";return t+k(Math.abs(o)/60,2)}return oe(o,n)}function oe(o,n){var t=n||"",r=o>0?"-":"+",e=Math.abs(o),i=k(Math.floor(e/60),2),a=k(e%60,2);return r+i+t+a}const fr=dr;var Ke=function(n,t){switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ct=function(n,t){switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},mr=function(n,t){var r=n.match(/(P+)(p+)?/)||[],e=r[1],i=r[2];if(!i)return Ke(n,t);var a;switch(e){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ke(e,t)).replace("{{time}}",ct(i,t))},vr={p:ct,P:mr};const We=vr;var hr=["D","DD"],gr=["YY","YYYY"];function dt(o){return hr.indexOf(o)!==-1}function ft(o){return gr.indexOf(o)!==-1}function De(o,n,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var pr={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},wr=function(n,t,r){var e,i=pr[n];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+e:e+" ago":e};const yr=wr;function ce(o){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.width?String(n.width):o.defaultWidth,r=o.formats[t]||o.formats[o.defaultWidth];return r}}var br={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dr={date:ce({formats:br,defaultWidth:"full"}),time:ce({formats:Tr,defaultWidth:"full"}),dateTime:ce({formats:kr,defaultWidth:"full"})};const Pr=Dr;var Mr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cr=function(n,t,r,e){return Mr[n]};const xr=Cr;function K(o){return function(n,t){var r=t!=null&&t.context?String(t.context):"standalone",e;if(r==="formatting"&&o.formattingValues){var i=o.defaultFormattingWidth||o.defaultWidth,a=t!=null&&t.width?String(t.width):i;e=o.formattingValues[a]||o.formattingValues[i]}else{var u=o.defaultWidth,s=t!=null&&t.width?String(t.width):o.defaultWidth;e=o.values[s]||o.values[u]}var l=o.argumentCallback?o.argumentCallback(n):n;return e[l]}}var Or={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Er={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ur={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$r={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Wr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Nr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Yr=function(n,t){var r=Number(n),e=r%100;if(e>20||e<10)switch(e%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},_r={ordinalNumber:Yr,era:K({values:Or,defaultWidth:"wide"}),quarter:K({values:Er,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:K({values:Ur,defaultWidth:"wide"}),day:K({values:$r,defaultWidth:"wide"}),dayPeriod:K({values:Wr,defaultWidth:"wide",formattingValues:Nr,defaultFormattingWidth:"wide"})};const Ar=_r;function J(o){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,e=r&&o.matchPatterns[r]||o.matchPatterns[o.defaultMatchWidth],i=n.match(e);if(!i)return null;var a=i[0],u=r&&o.parsePatterns[r]||o.parsePatterns[o.defaultParseWidth],s=Array.isArray(u)?Lr(u,function(f){return f.test(a)}):Sr(u,function(f){return f.test(a)}),l;l=o.valueCallback?o.valueCallback(s):s,l=t.valueCallback?t.valueCallback(l):l;var c=n.slice(a.length);return{value:l,rest:c}}}function Sr(o,n){for(var t in o)if(o.hasOwnProperty(t)&&n(o[t]))return t}function Lr(o,n){for(var t=0;t<o.length;t++)if(n(o[t]))return t}function mt(o){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.match(o.matchPattern);if(!r)return null;var e=r[0],i=n.match(o.parsePattern);if(!i)return null;var a=o.valueCallback?o.valueCallback(i[0]):i[0];a=t.valueCallback?t.valueCallback(a):a;var u=n.slice(e.length);return{value:a,rest:u}}}var Ir=/^(\d+)(th|st|nd|rd)?/i,Rr=/\d+/i,Hr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qr={any:[/^b/i,/^(a|c)/i]},Fr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Br={any:[/1/i,/2/i,/3/i,/4/i]},Qr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},jr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Vr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Xr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Gr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Kr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jr={ordinalNumber:mt({matchPattern:Ir,parsePattern:Rr,valueCallback:function(n){return parseInt(n,10)}}),era:J({matchPatterns:Hr,defaultMatchWidth:"wide",parsePatterns:qr,defaultParseWidth:"any"}),quarter:J({matchPatterns:Fr,defaultMatchWidth:"wide",parsePatterns:Br,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:J({matchPatterns:Qr,defaultMatchWidth:"wide",parsePatterns:jr,defaultParseWidth:"any"}),day:J({matchPatterns:Vr,defaultMatchWidth:"wide",parsePatterns:Xr,defaultParseWidth:"any"}),dayPeriod:J({matchPatterns:Gr,defaultMatchWidth:"any",parsePatterns:Kr,defaultParseWidth:"any"})};const zr=Jr;var Zr={code:"en-US",formatDistance:yr,formatLong:Pr,formatRelative:xr,localize:Ar,match:zr,options:{weekStartsOn:0,firstWeekContainsDate:1}};const vt=Zr;var en=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rn=/^'([^]*?)'?$/,nn=/''/g,an=/[a-zA-Z]/;function ne(o,n,t){var r,e,i,a,u,s,l,c,f,h,v,b,x,E,N,Y,R,M;_(2,arguments);var G=String(n),U=fe(),L=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:U.locale)!==null&&r!==void 0?r:vt,H=F((i=(a=(u=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(l=t.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&u!==void 0?u:U.firstWeekContainsDate)!==null&&a!==void 0?a:(f=U.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=F((v=(b=(x=(E=t==null?void 0:t.weekStartsOn)!==null&&E!==void 0?E:t==null||(N=t.locale)===null||N===void 0||(Y=N.options)===null||Y===void 0?void 0:Y.weekStartsOn)!==null&&x!==void 0?x:U.weekStartsOn)!==null&&b!==void 0?b:(R=U.locale)===null||R===void 0||(M=R.options)===null||M===void 0?void 0:M.weekStartsOn)!==null&&v!==void 0?v:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var B=I(o);if(!$e(B))throw new RangeError("Invalid time value");var te=it(B),me=ot(B,te),ve={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:B},Ce=G.match(tn).map(function(S){var Q=S[0];if(Q==="p"||Q==="P"){var ie=We[Q];return ie(S,L.formatLong)}return S}).join("").match(en).map(function(S){if(S==="''")return"'";var Q=S[0];if(Q==="'")return on(S);var ie=fr[Q];if(ie)return!(t!=null&&t.useAdditionalWeekYearTokens)&&ft(S)&&De(S,n,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&dt(S)&&De(S,n,String(o)),ie(me,S,L.localize,ve);if(Q.match(an))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");return S}).join("");return Ce}function on(o){var n=o.match(rn);return n?n[1].replace(nn,"'"):o}function un(o,n){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t]);return o}function Je(o,n){(n==null||n>o.length)&&(n=o.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=o[t];return r}function sn(o,n){if(o){if(typeof o=="string")return Je(o,n);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Je(o,n)}}function ze(o,n){var t=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=sn(o))||n&&o&&typeof o.length=="number"){t&&(o=t);var r=0,e=function(){};return{s:e,n:function(){return r>=o.length?{done:!0}:{done:!1,value:o[r++]}},e:function(l){throw l},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,u;return{s:function(){t=t.call(o)},n:function(){var l=t.next();return i=l.done,l},e:function(l){a=!0,u=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(a)throw u}}}}function m(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Ne(o,n){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},Ne(o,n)}function w(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),n&&Ne(o,n)}function Pe(o){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pe(o)}function ln(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cn(o,n){if(n&&(ee(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m(o)}function y(o){var n=ln();return function(){var r=Pe(o),e;if(n){var i=Pe(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return cn(this,e)}}function g(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function dn(o,n){if(ee(o)!=="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,n||"default");if(ee(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(o)}function ht(o){var n=dn(o,"string");return ee(n)==="symbol"?n:String(n)}function Ze(o,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,ht(r.key),r)}}function p(o,n,t){return n&&Ze(o.prototype,n),t&&Ze(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function d(o,n,t){return n=ht(n),n in o?Object.defineProperty(o,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[n]=t,o}var fn=10,gt=function(){function o(){g(this,o),d(this,"priority",void 0),d(this,"subPriority",0)}return p(o,[{key:"validate",value:function(t,r){return!0}}]),o}(),mn=function(o){w(t,o);var n=y(t);function t(r,e,i,a,u){var s;return g(this,t),s=n.call(this),s.value=r,s.validateValue=e,s.setValue=i,s.priority=a,u&&(s.subPriority=u),s}return p(t,[{key:"validate",value:function(e,i){return this.validateValue(e,this.value,i)}},{key:"set",value:function(e,i,a){return this.setValue(e,i,this.value,a)}}]),t}(gt),vn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",fn),d(m(r),"subPriority",-1),r}return p(t,[{key:"set",value:function(e,i){if(i.timestampIsSet)return e;var a=new Date(0);return a.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),a.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),a}}]),t}(gt),T=function(){function o(){g(this,o),d(this,"incompatibleTokens",void 0),d(this,"priority",void 0),d(this,"subPriority",void 0)}return p(o,[{key:"run",value:function(t,r,e,i){var a=this.parse(t,r,e,i);return a?{setter:new mn(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(t,r,e){return!0}}]),o}(),hn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",140),d(m(r),"incompatibleTokens",["R","u","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"G":case"GG":case"GGG":return a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"});case"GGGGG":return a.era(e,{width:"narrow"});case"GGGG":default:return a.era(e,{width:"wide"})||a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"})}}},{key:"set",value:function(e,i,a){return i.era=a,e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),$={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},z={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function W(o,n){return o&&{value:n(o.value),rest:o.rest}}function C(o,n){var t=n.match(o);return t?{value:parseInt(t[0],10),rest:n.slice(t[0].length)}:null}function Z(o,n){var t=n.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:n.slice(1)};var r=t[1]==="+"?1:-1,e=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,a=t[5]?parseInt(t[5],10):0;return{value:r*(e*tr+i*er+a*rr),rest:n.slice(t[0].length)}}function pt(o){return C($.anyDigitsSigned,o)}function O(o,n){switch(o){case 1:return C($.singleDigit,n);case 2:return C($.twoDigits,n);case 3:return C($.threeDigits,n);case 4:return C($.fourDigits,n);default:return C(new RegExp("^\\d{1,"+o+"}"),n)}}function Me(o,n){switch(o){case 1:return C($.singleDigitSigned,n);case 2:return C($.twoDigitsSigned,n);case 3:return C($.threeDigitsSigned,n);case 4:return C($.fourDigitsSigned,n);default:return C(new RegExp("^-?\\d{1,"+o+"}"),n)}}function Ae(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function wt(o,n){var t=n>0,r=t?n:1-n,e;if(r<=50)e=o||100;else{var i=r+50,a=Math.floor(i/100)*100,u=o>=i%100;e=o+a-(u?100:0)}return t?e:1-e}function yt(o){return o%400===0||o%4===0&&o%100!==0}var gn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return W(O(4,e),u);case"yo":return W(a.ordinalNumber(e,{unit:"year"}),u);default:return W(O(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,a){var u=e.getUTCFullYear();if(a.isTwoDigitYear){var s=wt(a.year,u);return e.setUTCFullYear(s,0,1),e.setUTCHours(0,0,0,0),e}var l=!("era"in i)||i.era===1?a.year:1-a.year;return e.setUTCFullYear(l,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),pn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return W(O(4,e),u);case"Yo":return W(a.ordinalNumber(e,{unit:"year"}),u);default:return W(O(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,a,u){var s=_e(e,u);if(a.isTwoDigitYear){var l=wt(a.year,s);return e.setUTCFullYear(l,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ue(e,u)}var c=!("era"in i)||i.era===1?a.year:1-a.year;return e.setUTCFullYear(c,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ue(e,u)}}]),t}(T),wn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i){return Me(i==="R"?4:i.length,e)}},{key:"set",value:function(e,i,a){var u=new Date(0);return u.setUTCFullYear(a,0,4),u.setUTCHours(0,0,0,0),de(u)}}]),t}(T),yn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i){return Me(i==="u"?4:i.length,e)}},{key:"set",value:function(e,i,a){return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),bn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",120),d(m(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"Q":case"QQ":return O(i.length,e);case"Qo":return a.ordinalNumber(e,{unit:"quarter"});case"QQQ":return a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(e,{width:"wide",context:"formatting"})||a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),Tn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",120),d(m(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"q":case"qq":return O(i.length,e);case"qo":return a.ordinalNumber(e,{unit:"quarter"});case"qqq":return a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(e,{width:"wide",context:"standalone"})||a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),kn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),d(m(r),"priority",110),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l-1};switch(i){case"M":return W(C($.month,e),u);case"MM":return W(O(2,e),u);case"Mo":return W(a.ordinalNumber(e,{unit:"month"}),u);case"MMM":return a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(e,{width:"wide",context:"formatting"})||a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),Dn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",110),d(m(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l-1};switch(i){case"L":return W(C($.month,e),u);case"LL":return W(O(2,e),u);case"Lo":return W(a.ordinalNumber(e,{unit:"month"}),u);case"LLL":return a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(e,{width:"wide",context:"standalone"})||a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(T);function Pn(o,n,t){_(2,arguments);var r=I(o),e=F(n),i=lt(r,t)-e;return r.setUTCDate(r.getUTCDate()-i*7),r}var Mn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",100),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"w":return C($.week,e);case"wo":return a.ordinalNumber(e,{unit:"week"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,a,u){return ue(Pn(e,a,u),u)}}]),t}(T);function Cn(o,n){_(2,arguments);var t=I(o),r=F(n),e=st(t)-r;return t.setUTCDate(t.getUTCDate()-e*7),t}var xn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",100),d(m(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"I":return C($.week,e);case"Io":return a.ordinalNumber(e,{unit:"week"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,a){return de(Cn(e,a))}}]),t}(T),On=[31,28,31,30,31,30,31,31,30,31,30,31],En=[31,29,31,30,31,30,31,31,30,31,30,31],Un=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"subPriority",1),d(m(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"d":return C($.date,e);case"do":return a.ordinalNumber(e,{unit:"date"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){var a=e.getUTCFullYear(),u=yt(a),s=e.getUTCMonth();return u?i>=1&&i<=En[s]:i>=1&&i<=On[s]}},{key:"set",value:function(e,i,a){return e.setUTCDate(a),e.setUTCHours(0,0,0,0),e}}]),t}(T),$n=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"subpriority",1),d(m(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"D":case"DD":return C($.dayOfYear,e);case"Do":return a.ordinalNumber(e,{unit:"date"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){var a=e.getUTCFullYear(),u=yt(a);return u?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(e,i,a){return e.setUTCMonth(0,a),e.setUTCHours(0,0,0,0),e}}]),t}(T);function Se(o,n,t){var r,e,i,a,u,s,l,c;_(2,arguments);var f=fe(),h=F((r=(e=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(u=t.locale)===null||u===void 0||(s=u.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&e!==void 0?e:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=I(o),b=F(n),x=v.getUTCDay(),E=b%7,N=(E+7)%7,Y=(N<h?7:0)+b-x;return v.setUTCDate(v.getUTCDate()+Y),v}var Wn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"E":case"EE":case"EEE":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T),Nn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a,u){var s=function(c){var f=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+f};switch(i){case"e":case"ee":return W(O(i.length,e),s);case"eo":return W(a.ordinalNumber(e,{unit:"day"}),s);case"eee":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeeee":return a.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T),Yn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a,u){var s=function(c){var f=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+f};switch(i){case"c":case"cc":return W(O(i.length,e),s);case"co":return W(a.ordinalNumber(e,{unit:"day"}),s);case"ccc":return a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"ccccc":return a.day(e,{width:"narrow",context:"standalone"});case"cccccc":return a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(e,{width:"wide",context:"standalone"})||a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T);function _n(o,n){_(2,arguments);var t=F(n);t%7===0&&(t=t-7);var r=1,e=I(o),i=e.getUTCDay(),a=t%7,u=(a+7)%7,s=(u<r?7:0)+t-i;return e.setUTCDate(e.getUTCDate()+s),e}var An=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l===0?7:l};switch(i){case"i":case"ii":return O(i.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return W(a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return W(a.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return W(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return W(a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u)}}},{key:"validate",value:function(e,i){return i>=1&&i<=7}},{key:"set",value:function(e,i,a){return e=_n(e,a),e.setUTCHours(0,0,0,0),e}}]),t}(T),Sn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"a":case"aa":case"aaa":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),Ln=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"b":case"bb":case"bbb":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),In=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["a","b","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"B":case"BB":case"BBB":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),Rn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["H","K","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"h":return C($.hour12h,e);case"ho":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=12}},{key:"set",value:function(e,i,a){var u=e.getUTCHours()>=12;return u&&a<12?e.setUTCHours(a+12,0,0,0):!u&&a===12?e.setUTCHours(0,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(T),Hn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"H":return C($.hour23h,e);case"Ho":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=23}},{key:"set",value:function(e,i,a){return e.setUTCHours(a,0,0,0),e}}]),t}(T),qn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["h","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"K":return C($.hour11h,e);case"Ko":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){var u=e.getUTCHours()>=12;return u&&a<12?e.setUTCHours(a+12,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(T),Fn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"k":return C($.hour24h,e);case"ko":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=24}},{key:"set",value:function(e,i,a){var u=a<=24?a%24:a;return e.setUTCHours(u,0,0,0),e}}]),t}(T),Bn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",60),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"m":return C($.minute,e);case"mo":return a.ordinalNumber(e,{unit:"minute"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,a){return e.setUTCMinutes(a,0,0),e}}]),t}(T),Qn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",50),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"s":return C($.second,e);case"so":return a.ordinalNumber(e,{unit:"second"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,a){return e.setUTCSeconds(a,0),e}}]),t}(T),jn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",30),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i){var a=function(s){return Math.floor(s*Math.pow(10,-i.length+3))};return W(O(i.length,e),a)}},{key:"set",value:function(e,i,a){return e.setUTCMilliseconds(a),e}}]),t}(T),Vn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",10),d(m(r),"incompatibleTokens",["t","T","x"]),r}return p(t,[{key:"parse",value:function(e,i){switch(i){case"X":return Z(z.basicOptionalMinutes,e);case"XX":return Z(z.basic,e);case"XXXX":return Z(z.basicOptionalSeconds,e);case"XXXXX":return Z(z.extendedOptionalSeconds,e);case"XXX":default:return Z(z.extended,e)}}},{key:"set",value:function(e,i,a){return i.timestampIsSet?e:new Date(e.getTime()-a)}}]),t}(T),Xn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",10),d(m(r),"incompatibleTokens",["t","T","X"]),r}return p(t,[{key:"parse",value:function(e,i){switch(i){case"x":return Z(z.basicOptionalMinutes,e);case"xx":return Z(z.basic,e);case"xxxx":return Z(z.basicOptionalSeconds,e);case"xxxxx":return Z(z.extendedOptionalSeconds,e);case"xxx":default:return Z(z.extended,e)}}},{key:"set",value:function(e,i,a){return i.timestampIsSet?e:new Date(e.getTime()-a)}}]),t}(T),Gn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",40),d(m(r),"incompatibleTokens","*"),r}return p(t,[{key:"parse",value:function(e){return pt(e)}},{key:"set",value:function(e,i,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),t}(T),Kn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",20),d(m(r),"incompatibleTokens","*"),r}return p(t,[{key:"parse",value:function(e){return pt(e)}},{key:"set",value:function(e,i,a){return[new Date(a),{timestampIsSet:!0}]}}]),t}(T),Jn={G:new hn,y:new gn,Y:new pn,R:new wn,u:new yn,Q:new bn,q:new Tn,M:new kn,L:new Dn,w:new Mn,I:new xn,d:new Un,D:new $n,E:new Wn,e:new Nn,c:new Yn,i:new An,a:new Sn,b:new Ln,B:new In,h:new Rn,H:new Hn,K:new qn,k:new Fn,m:new Bn,s:new Qn,S:new jn,X:new Vn,x:new Xn,t:new Gn,T:new Kn},zn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ea=/^'([^]*?)'?$/,ta=/''/g,ra=/\S/,na=/[a-zA-Z]/;function et(o,n,t,r){var e,i,a,u,s,l,c,f,h,v,b,x,E,N,Y,R,M,G;_(3,arguments);var U=String(o),L=String(n),H=fe(),q=(e=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:H.locale)!==null&&e!==void 0?e:vt;if(!q.match)throw new RangeError("locale must contain match property");var B=F((a=(u=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(c=r.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:H.firstWeekContainsDate)!==null&&u!==void 0?u:(h=H.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(B>=1&&B<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var te=F((b=(x=(E=(N=r==null?void 0:r.weekStartsOn)!==null&&N!==void 0?N:r==null||(Y=r.locale)===null||Y===void 0||(R=Y.options)===null||R===void 0?void 0:R.weekStartsOn)!==null&&E!==void 0?E:H.weekStartsOn)!==null&&x!==void 0?x:(M=H.locale)===null||M===void 0||(G=M.options)===null||G===void 0?void 0:G.weekStartsOn)!==null&&b!==void 0?b:0);if(!(te>=0&&te<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(L==="")return U===""?I(t):new Date(NaN);var me={firstWeekContainsDate:B,weekStartsOn:te,locale:q},ve=[new vn],Ce=L.match(Zn).map(function(A){var D=A[0];if(D in We){var j=We[D];return j(A,q.formatLong)}return A}).join("").match(zn),S=[],Q=ze(Ce),ie;try{var bt=function(){var D=ie.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ft(D)&&De(D,L,o),!(r!=null&&r.useAdditionalDayOfYearTokens)&&dt(D)&&De(D,L,o);var j=D[0],we=Jn[j];if(we){var qe=we.incompatibleTokens;if(Array.isArray(qe)){var Fe=S.find(function(Be){return qe.includes(Be.token)||Be.token===j});if(Fe)throw new RangeError("The format string mustn't contain `".concat(Fe.fullToken,"` and `").concat(D,"` at the same time"))}else if(we.incompatibleTokens==="*"&&S.length>0)throw new RangeError("The format string mustn't contain `".concat(D,"` and any other token at the same time"));S.push({token:j,fullToken:D});var Oe=we.run(U,D,q.match,me);if(!Oe)return{v:new Date(NaN)};ve.push(Oe.setter),U=Oe.rest}else{if(j.match(na))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");if(D==="''"?D="'":j==="'"&&(D=aa(D)),U.indexOf(D)===0)U=U.slice(D.length);else return{v:new Date(NaN)}}};for(Q.s();!(ie=Q.n()).done;){var Le=bt();if(ee(Le)==="object")return Le.v}}catch(A){Q.e(A)}finally{Q.f()}if(U.length>0&&ra.test(U))return new Date(NaN);var Tt=ve.map(function(A){return A.priority}).sort(function(A,D){return D-A}).filter(function(A,D,j){return j.indexOf(A)===D}).map(function(A){return ve.filter(function(D){return D.priority===A}).sort(function(D,j){return j.subPriority-D.subPriority})}).map(function(A){return A[0]}),xe=I(t);if(isNaN(xe.getTime()))return new Date(NaN);var he=ot(xe,it(xe)),Ie={},ge=ze(Tt),Re;try{for(ge.s();!(Re=ge.n()).done;){var He=Re.value;if(!He.validate(he,me))return new Date(NaN);var pe=He.set(he,Ie,me);Array.isArray(pe)?(he=pe[0],un(Ie,pe[1])):he=pe}}catch(A){ge.e(A)}finally{ge.f()}return he}function aa(o){return o.match(ea)[1].replace(ta,"'")}var ia={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},oa=function(n,t,r){var e,i=ia[n];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"dalam waktu "+e:e+" yang lalu":e};const ua=oa;var sa={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},la={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},ca={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},da={date:ce({formats:sa,defaultWidth:"full"}),time:ce({formats:la,defaultWidth:"full"}),dateTime:ce({formats:ca,defaultWidth:"full"})};const fa=da;var ma={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},va=function(n,t,r,e){return ma[n]};const ha=va;var ga={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},pa={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},wa={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},ya={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},ba={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},Ta={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},ka=function(n,t){var r=Number(n);return"ke-"+r},Da={ordinalNumber:ka,era:K({values:ga,defaultWidth:"wide"}),quarter:K({values:pa,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:K({values:wa,defaultWidth:"wide"}),day:K({values:ya,defaultWidth:"wide"}),dayPeriod:K({values:ba,defaultWidth:"wide",formattingValues:Ta,defaultFormattingWidth:"wide"})};const Pa=Da;var Ma=/^ke-(\d+)?/i,Ca=/\d+/i,xa={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},Oa={any:[/^s/i,/^(m|e)/i]},Ea={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},Ua={any:[/1/i,/2/i,/3/i,/4/i]},$a={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},Wa={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Na={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},Ya={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},_a={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},Aa={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},Sa={ordinalNumber:mt({matchPattern:Ma,parsePattern:Ca,valueCallback:function(n){return parseInt(n,10)}}),era:J({matchPatterns:xa,defaultMatchWidth:"wide",parsePatterns:Oa,defaultParseWidth:"any"}),quarter:J({matchPatterns:Ea,defaultMatchWidth:"wide",parsePatterns:Ua,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:J({matchPatterns:$a,defaultMatchWidth:"wide",parsePatterns:Wa,defaultParseWidth:"any"}),day:J({matchPatterns:Na,defaultMatchWidth:"wide",parsePatterns:Ya,defaultParseWidth:"any"}),dayPeriod:J({matchPatterns:_a,defaultMatchWidth:"any",parsePatterns:Aa,defaultParseWidth:"any"})};const La=Sa;var Ia={code:"id",formatDistance:ua,formatLong:fa,formatRelative:ha,localize:Pa,match:La,options:{weekStartsOn:1,firstWeekContainsDate:1}};const ae=Ia;function Ra(o){let n="";const{dateStart:t,dateEnd:r}=o,e=$e(et(t,"yyyy-MM-dd HH:mm",new Date)),i=$e(et(r,"yyyy-MM-dd HH:mm",new Date));if(e&&i){const a=t.split(" "),u=a[0].split("-"),s=u[0],l=u[1],c=r.split(" "),f=c[0].split("-"),h=f[0],v=f[1];a[0]===c[0]?n=`Voucher hanya berlaku di tanggal ${ne(new Date(t),"d MMM yyyy",{locale:ae})}.`:s!==h?n=`Voucher berlaku dari ${ne(new Date(t),"d MMM yyyy",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`:s===h&&(l===v?n=`Voucher berlaku dari ${ne(new Date(t),"d",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`:n=`Voucher berlaku dari ${ne(new Date(t),"d MMM",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`)}else e&&!i&&(n=`Voucher berlaku dari ${ne(new Date(t),"d MMM yyyy",{locale:ae})}.`);return n}function Ha(o){const{isOneTimeUsage:n,isOneTimeUsagePerCard:t}=o;if(!n&&!t)return"";let r="";return n&&(r="Voucher hanya dapat digunakan 1x per member selama masa berlaku."),t&&(r="Voucher hanya dapat digunakan 1x per kartu selama masa berlaku."),n&&t&&(r="Voucher hanya dapat digunakan 1x transaksi untuk 1 kartu dan 1 member selama masa berlaku."),r}function qa(o){let n="";const{type:t,discountType:r,discountValue:e,isCheckedMaxFee:i,maxDiscountAmount:a,transactionTerms:u,termsMinTotalAmount:s,termsMinQty:l,limitFee:c}=o,f=N=>typeof N=="number"?N:Number.isNaN(Number(N))?0:Number(N),h=le({value:f(a),prefix:"Rp"}),v=le({value:f(e),prefix:"Rp"}),b=le({value:f(c),prefix:"Rp"}),x=le({value:f(s),prefix:"Rp"}),E=le({value:f(l)});switch(t===X.product||t===X.order||t===X.gift||t===X.payment?r===ke.percentage&&t!==X.gift?(n=`Diskon ${e||0}%`,i&&(n+=` (hingga ${h})`)):r===ke.amount&&t!==X.gift?n=`Potongan ${v}`:n=`Potongan ${b}`:t===X.freeShipping?(n="Shipping fee ditanggung oleh voilà.id",i&&(n+=` (hingga ${b})`)):t===X.freeInsurance&&(n="Insurance fee ditanggung oleh voilà.id",i&&(n+=` (hingga ${b})`)),u){case 0:n+=" tanpa minimum pembelian.";break;case 1:n+=` dengan min. pembelian ${x}.`;break;case 2:n+=` dengan min. pembelian ${l?E:0} item.`;break;default:n+=""}return n}const Fa=o=>{const n=[],{dateEnd:t,dateStart:r,type:e,discountType:i,discountValue:a,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:c,termsMinQty:f,limitFee:h,collections:v,brands:b,eligibilityType:x,isOneTimeUsage:E,quota:N,isOneTimeUsagePerCard:Y,payment:R}=o,{bankName:M="",creditBinGroup:G=[],debitBinGroup:U=[]}=R||{},L=Ra({dateStart:r,dateEnd:t}),H=Kt({type:e,collections:v,brands:b,eligibilityType:x,payment:R}),q=qa({type:e,discountType:i,discountValue:a,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:c,termsMinQty:f,limitFee:h}),B=Ha({isOneTimeUsage:E,isOneTimeUsagePerCard:Y}),te=Jt({bankName:M,creditBinGroup:G,debitBinGroup:U});return L&&n.push(L),q&&n.push(q),H&&n.push(H),B&&n.push(B),N>0&&n.push("Kuota voucher terbatas."),(te||[]).length>0&&n.push(...te),n},Ba=Fa;exports.DiscountType=ke;exports.VoucherType=X;exports.canUseDOM=rt;exports.getOwnerDocument=Ye;exports.isBrowser=nt;exports.isElement=tt;exports.isValidEvent=be;exports.useCallbackRef=Te;exports.useClipboard=Ut;exports.useDebounce=Wt;exports.useDimensions=Rt;exports.useDisclosure=qt;exports.useMediaQuery=Bt;exports.useNumberFormatter=le;exports.useOnlineStatus=Vt;exports.useOutsideClick=Gt;exports.useSafeLayoutEffect=at;exports.useVoucherTnc=Ba;
|