@byuckchon-frontend/utils 1.1.1 → 1.2.0
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.mjs +653 -601
- package/dist/index.umd.js +5 -5
- package/dist/src/DateUtils/index.d.ts +3 -1
- package/dist/src/DateUtils/type.d.ts +16 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(q,ce){typeof exports=="object"&&typeof module<"u"?ce(exports):typeof define=="function"&&define.amd?define(["exports"],ce):(q=typeof globalThis<"u"?globalThis:q||self,ce(q.index={}))})(this,(function(q){"use strict";const ce=()=>({formatPhoneNumber:i=>{const a=(i??"").replace(/\D/g,"");if(/^1[568]\d{7}$/.test(a))return a.replace(/^(\d{4})(\d{4})$/,"$1-$2");if(a.startsWith("02")){if(a.length===9)return a.replace(/^(\d{2})(\d{3})(\d{4})$/,"$1-$2-$3");if(a.length===10)return a.replace(/^(\d{2})(\d{4})(\d{4})$/,"$1-$2-$3")}if(/^0\d+/.test(a)){if(a.length===10)return a.replace(/^(\d{3})(\d{3})(\d{4})$/,"$1-$2-$3");if(a.length===11)return a.replace(/^(\d{3})(\d{4})(\d{4})$/,"$1-$2-$3")}return i},formatBizNumber:i=>{const a=(i??"").replace(/\D/g,"");return a.length===10?a.replace(/^(\d{3})(\d{2})(\d{5})$/,"$1-$2-$3"):a.length===13?a.replace(/^(\d{6})(\d{7})$/,"$1-$2"):String(i??"")},formatDate:i=>{if(!(i instanceof Date)||isNaN(i.getTime()))return"";const a=i.getHours(),f=i.getMinutes(),l=a<12?"오전":"오후",u=a%12===0?12:a%12;return`${l} ${u}시 ${f}분`},Masker:{maskName:i=>{const a=(i??"").trim(),f=[...a].length;if(f<=0)return"";if(f===1)return"*";if(f===2){const[b]=[...a];return`${b}*`}const l=[...a],u=l[0],m=l[f-1],p="*".repeat(f-2);return`${u}${p}${m}`},maskPhoneNumber:i=>{if(i.includes("-")){const m=i.split("-");if(m.length===3){const[p,b,d]=m;return`${p}-${"*".repeat(b.replace(/\D/g,"").length||4)}-${d}`}if(m.length===2){const[p,b]=m,d=b.replace(/\D/g,""),w=d.slice(-4),h=Math.max(1,d.length-w.length);return`${p}-${"*".repeat(h)}${w}`}return i}const a=i.replace(/\D/g,"");if(a.length<8)return i;const f=a.slice(0,3),l=a.slice(-4),u=Math.max(1,a.length-(f.length+l.length));return`${f}${"*".repeat(u)}${l}`}},commanizeData:i=>{const a=String(i??"").trim();if(!a)return"";const f=a.replace(/,/g,""),l=f.startsWith("-")?"-":"",u=f.replace(/^-/,""),[m,p]=u.split("."),b=m.replace(/\B(?=(\d{3})+(?!\d))/g,",");return l+b+(p!==void 0?`.${p}`:"")},decommanizeData:i=>i.replace(/,/g,"")}),Tn=/^[A-Za-z0-9]([A-Za-z0-9_.+-]*[A-Za-z0-9])?@[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\.[A-Za-z]{2,}$/,En=/^010(\d{4})(\d{4})$/,Pn=/^(070|02|031|032|033|034|035|036|037|038|039|041|042|043|051|052|053|054|055|061|062|063|064|070|071|072)[0-9]{3,4}[0-9]{4}$/,Dn=/([0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[1,2][0-9]|3[0,1]))/,Mn=/^(19[0-9][0-9]|20\d{2})(0[0-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$/,Rn=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+~`\-={}[\]:;"'<>,.?/\\]).{10,}$/,kn=/^d{2}([0]\d|[1][0-2])([0][1-9]|[1-2]\d|[3][0-1])[-]*[1-4]\d{6}$/,An=/^(?:[0-9]{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[1,2][0-9]|3[0,1]))-[1-8][0-9]{6}$/,_n=/^https?:\/\/(?:[-\w.])+(?:\.[a-zA-Z]{2,})+(?::\d+)?(?:\/[^\s]*)?$/i,Nn=/\.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|ppt|pptx|txt|zip|rar)$/i;function Sn(t){return Tn.test(t)}function Cn(t){return En.test(t)}function Fn(t){return Pn.test(t)}function Ln(t){return Dn.test(t)}function $n(t){return Mn.test(t)}function qn(t){return Rn.test(t)}function Hn(t){return kn.test(t)}function vn(t){return An.test(t)}function Bn(t){const e=t.replace(/-/gi,"").split("").map(n=>parseInt(n,10));if(e.length===10){if(e.every(o=>o===0))return!1;const n=[1,3,7,1,3,7,1,3,5];let r=0;for(let o=0;o<9;o++)r+=n[o]*e[o];const s=(10-r%10)%10;return e[9]===s}return!1}function In(t){return _n.test(t)}function Yn(t,e=10){const n=typeof t=="string"?t:t.name;return!(!Nn.test(n)||t instanceof File&&t.size/1048576>e)}const Wn={email:Sn,phone:Cn,homePhone:Fn,birth6:Ln,birth8:$n,password:qn,juminAfter2020:vn,juminBefore2020:Hn,corporateRegiNumber:Bn,url:In,file:Yn};function et(t,e){return function(){return t.apply(e,arguments)}}const{toString:jn}=Object.prototype,{getPrototypeOf:Ce}=Object,{iterator:ge,toStringTag:tt}=Symbol,be=(t=>e=>{const n=jn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),H=t=>(t=t.toLowerCase(),e=>be(e)===t),xe=t=>e=>typeof e===t,{isArray:te}=Array,ne=xe("undefined");function ue(t){return t!==null&&!ne(t)&&t.constructor!==null&&!ne(t.constructor)&&C(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const nt=H("ArrayBuffer");function Un(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&nt(t.buffer),e}const zn=xe("string"),C=xe("function"),rt=xe("number"),le=t=>t!==null&&typeof t=="object",Qn=t=>t===!0||t===!1,Oe=t=>{if(be(t)!=="object")return!1;const e=Ce(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(tt in t)&&!(ge in t)},Xn=t=>{if(!le(t)||ue(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Vn=H("Date"),Jn=H("File"),Gn=H("Blob"),Kn=H("FileList"),Zn=t=>le(t)&&C(t.pipe),er=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||C(t.append)&&((e=be(t))==="formdata"||e==="object"&&C(t.toString)&&t.toString()==="[object FormData]"))},tr=H("URLSearchParams"),[nr,rr,sr,or]=["ReadableStream","Request","Response","Headers"].map(H),ir=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fe(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),te(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(ue(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function st(t,e){if(ue(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const V=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ot=t=>!ne(t)&&t!==V;function Fe(){const{caseless:t,skipUndefined:e}=ot(this)&&this||{},n={},r=(s,o)=>{const i=t&&st(n,o)||o;Oe(n[i])&&Oe(s)?n[i]=Fe(n[i],s):Oe(s)?n[i]=Fe({},s):te(s)?n[i]=s.slice():(!e||!ne(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&fe(arguments[s],r);return n}const ar=(t,e,n,{allOwnKeys:r}={})=>(fe(e,(s,o)=>{n&&C(s)?t[o]=et(s,n):t[o]=s},{allOwnKeys:r}),t),cr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ur=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},lr=(t,e,n,r)=>{let s,o,i;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&Ce(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},fr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},dr=t=>{if(!t)return null;if(te(t))return t;let e=t.length;if(!rt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},hr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ce(Uint8Array)),mr=(t,e)=>{const r=(t&&t[ge]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},pr=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},wr=H("HTMLFormElement"),yr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),it=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),gr=H("RegExp"),at=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};fe(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},br=t=>{at(t,(e,n)=>{if(C(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(C(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},xr=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return te(t)?r(t):r(String(t).split(e)),n},Or=()=>{},Tr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Er(t){return!!(t&&C(t.append)&&t[tt]==="FormData"&&t[ge])}const Pr=t=>{const e=new Array(10),n=(r,s)=>{if(le(r)){if(e.indexOf(r)>=0)return;if(ue(r))return r;if(!("toJSON"in r)){e[s]=r;const o=te(r)?[]:{};return fe(r,(i,a)=>{const f=n(i,s+1);!ne(f)&&(o[a]=f)}),e[s]=void 0,o}}return r};return n(t,0)},Dr=H("AsyncFunction"),Mr=t=>t&&(le(t)||C(t))&&C(t.then)&&C(t.catch),ct=((t,e)=>t?setImmediate:e?((n,r)=>(V.addEventListener("message",({source:s,data:o})=>{s===V&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),V.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",C(V.postMessage)),Rr=typeof queueMicrotask<"u"?queueMicrotask.bind(V):typeof process<"u"&&process.nextTick||ct,c={isArray:te,isArrayBuffer:nt,isBuffer:ue,isFormData:er,isArrayBufferView:Un,isString:zn,isNumber:rt,isBoolean:Qn,isObject:le,isPlainObject:Oe,isEmptyObject:Xn,isReadableStream:nr,isRequest:rr,isResponse:sr,isHeaders:or,isUndefined:ne,isDate:Vn,isFile:Jn,isBlob:Gn,isRegExp:gr,isFunction:C,isStream:Zn,isURLSearchParams:tr,isTypedArray:hr,isFileList:Kn,forEach:fe,merge:Fe,extend:ar,trim:ir,stripBOM:cr,inherits:ur,toFlatObject:lr,kindOf:be,kindOfTest:H,endsWith:fr,toArray:dr,forEachEntry:mr,matchAll:pr,isHTMLForm:wr,hasOwnProperty:it,hasOwnProp:it,reduceDescriptors:at,freezeMethods:br,toObjectSet:xr,toCamelCase:yr,noop:Or,toFiniteNumber:Tr,findKey:st,global:V,isContextDefined:ot,isSpecCompliantForm:Er,toJSONObject:Pr,isAsyncFn:Dr,isThenable:Mr,setImmediate:ct,asap:Rr,isIterable:t=>t!=null&&C(t[ge])};function y(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const ut=y.prototype,lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{lt[t]={value:t}}),Object.defineProperties(y,lt),Object.defineProperty(ut,"isAxiosError",{value:!0}),y.from=(t,e,n,r,s,o)=>{const i=Object.create(ut);c.toFlatObject(t,i,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const a=t&&t.message?t.message:"Error",f=e==null&&t?t.code:e;return y.call(i,a,f,n,r,s),t&&i.cause==null&&Object.defineProperty(i,"cause",{value:t,configurable:!0}),i.name=t&&t.name||"Error",o&&Object.assign(i,o),i};const kr=null;function Le(t){return c.isPlainObject(t)||c.isArray(t)}function ft(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function dt(t,e,n){return t?t.concat(e).map(function(s,o){return s=ft(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function Ar(t){return c.isArray(t)&&!t.some(Le)}const _r=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function Te(t,e,n){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,h){return!c.isUndefined(h[w])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!f&&c.isBlob(d))throw new y("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,w,h){let g=d;if(d&&!h&&typeof d=="object"){if(c.endsWith(w,"{}"))w=r?w:w.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Ar(d)||(c.isFileList(d)||c.endsWith(w,"[]"))&&(g=c.toArray(d)))return w=ft(w),g.forEach(function(A,N){!(c.isUndefined(A)||A===null)&&e.append(i===!0?dt([w],N,o):i===null?w:w+"[]",l(A))}),!1}return Le(d)?!0:(e.append(dt(h,w,o),l(d)),!1)}const m=[],p=Object.assign(_r,{defaultVisitor:u,convertValue:l,isVisitable:Le});function b(d,w){if(!c.isUndefined(d)){if(m.indexOf(d)!==-1)throw Error("Circular reference detected in "+w.join("."));m.push(d),c.forEach(d,function(g,P){(!(c.isUndefined(g)||g===null)&&s.call(e,g,c.isString(P)?P.trim():P,w,p))===!0&&b(g,w?w.concat(P):[P])}),m.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return b(t),e}function ht(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function $e(t,e){this._pairs=[],t&&Te(t,this,e)}const mt=$e.prototype;mt.append=function(e,n){this._pairs.push([e,n])},mt.toString=function(e){const n=e?function(r){return e.call(this,r,ht)}:ht;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Nr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pt(t,e,n){if(!e)return t;const r=n&&n.encode||Nr;c.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(e,n):o=c.isURLSearchParams(e)?e.toString():new $e(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class wt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(r){r!==null&&e(r)})}}const yt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Sr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:$e,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},qe=typeof window<"u"&&typeof document<"u",He=typeof navigator=="object"&&navigator||void 0,Cr=qe&&(!He||["ReactNative","NativeScript","NS"].indexOf(He.product)<0),Fr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lr=qe&&window.location.href||"http://localhost",S={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qe,hasStandardBrowserEnv:Cr,hasStandardBrowserWebWorkerEnv:Fr,navigator:He,origin:Lr},Symbol.toStringTag,{value:"Module"})),...Sr};function $r(t,e){return Te(t,new S.classes.URLSearchParams,{visitor:function(n,r,s,o){return S.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function qr(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Hr(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function gt(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=o>=n.length;return i=!i&&c.isArray(s)?s.length:i,f?(c.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!c.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&c.isArray(s[i])&&(s[i]=Hr(s[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const n={};return c.forEachEntry(t,(r,s)=>{e(qr(r),s,n,0)}),n}return null}function vr(t,e,n){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const de={transitional:yt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=c.isObject(e);if(o&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return s?JSON.stringify(gt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $r(e,this.formSerializer).toString();if((a=c.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Te(a?{"files[]":e}:e,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),vr(e)):e}],transformResponse:[function(e){const n=this.transitional||de.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?y.from(a,y.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{de.headers[t]={}});const Br=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ir=t=>{const e={};let n,r,s;return t&&t.split(`
|
|
2
|
-
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[bt]=this[bt]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=he(i);r[a]||(Ur(s,i),r[a]=!0)}return c.isArray(e)?e.forEach(o):o(e),this}};F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(F.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),c.freezeMethods(F);function Be(t,e){const n=this||de,r=e||n,s=F.from(r.headers);let o=r.data;return c.forEach(t,function(a){o=a.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function xt(t){return!!(t&&t.__CANCEL__)}function re(t,e,n){y.call(this,t??"canceled",y.ERR_CANCELED,e,n),this.name="CanceledError"}c.inherits(re,y,{__CANCEL__:!0});function Ot(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Qr(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),u=r[o];i||(i=l),n[s]=f,r[s]=l;let m=o,p=0;for(;m!==s;)p+=n[m++],m=m%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-i<e)return;const b=u&&l-u;return b?Math.round(p*1e3/b):void 0}}function Xr(t,e){let n=0,r=1e3/e,s,o;const i=(l,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),t(...l)};return[(...l)=>{const u=Date.now(),m=u-n;m>=r?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-m)))},()=>s&&i(s)]}const Pe=(t,e,n=3)=>{let r=0;const s=Qr(50,250);return Xr(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,f=i-r,l=s(f),u=i<=a;r=i;const m={loaded:i,total:a,progress:a?i/a:void 0,bytes:f,rate:l||void 0,estimated:l&&a&&u?(a-i)/l:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(m)},n)},Tt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Et=t=>(...e)=>c.asap(()=>t(...e)),Vr=S.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,S.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(S.origin),S.navigator&&/(msie|trident)/i.test(S.navigator.userAgent)):()=>!0,Jr=S.hasStandardBrowserEnv?{write(t,e,n,r,s,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Gr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Kr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Pt(t,e,n){let r=!Gr(e);return t&&(r||n==!1)?Kr(t,e):e}const Dt=t=>t instanceof F?{...t}:t;function J(t,e){e=e||{};const n={};function r(l,u,m,p){return c.isPlainObject(l)&&c.isPlainObject(u)?c.merge.call({caseless:p},l,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function s(l,u,m,p){if(c.isUndefined(u)){if(!c.isUndefined(l))return r(void 0,l,m,p)}else return r(l,u,m,p)}function o(l,u){if(!c.isUndefined(u))return r(void 0,u)}function i(l,u){if(c.isUndefined(u)){if(!c.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,m){if(m in e)return r(l,u);if(m in t)return r(void 0,l)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,u,m)=>s(Dt(l),Dt(u),m,!0)};return c.forEach(Object.keys({...t,...e}),function(u){const m=f[u]||s,p=m(t[u],e[u],u);c.isUndefined(p)&&m!==a||(n[u]=p)}),n}const Mt=t=>{const e=J({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=e;if(e.headers=i=F.from(i),e.url=pt(Pt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const f=n.getHeaders(),l=["content-type","content-length"];Object.entries(f).forEach(([u,m])=>{l.includes(u.toLowerCase())&&i.set(u,m)})}}if(S.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(e)),r||r!==!1&&Vr(e.url))){const f=s&&o&&Jr.read(o);f&&i.set(s,f)}return e},Zr=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const s=Mt(t);let o=s.data;const i=F.from(s.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:l}=s,u,m,p,b,d;function w(){b&&b(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function g(){if(!h)return;const A=F.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),L={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:A,config:t,request:h};Ot(function($){n($),w()},function($){r($),w()},L),h=null}"onloadend"in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(g)},h.onabort=function(){h&&(r(new y("Request aborted",y.ECONNABORTED,t,h)),h=null)},h.onerror=function(N){const L=N&&N.message?N.message:"Network Error",Y=new y(L,y.ERR_NETWORK,t,h);Y.event=N||null,r(Y),h=null},h.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const L=s.transitional||yt;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),r(new y(N,L.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,t,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&c.forEach(i.toJSON(),function(N,L){h.setRequestHeader(L,N)}),c.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),a&&a!=="json"&&(h.responseType=s.responseType),l&&([p,d]=Pe(l,!0),h.addEventListener("progress",p)),f&&h.upload&&([m,b]=Pe(f),h.upload.addEventListener("progress",m),h.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(u=A=>{h&&(r(!A||A.type?new re(null,t,h):A),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const P=zr(s.url);if(P&&S.protocols.indexOf(P)===-1){r(new y("Unsupported protocol "+P+":",y.ERR_BAD_REQUEST,t));return}h.send(o||null)})},es=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;r.abort(u instanceof y?u:new re(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new y(`timeout ${e} of ms exceeded`,y.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>c.asap(a),f}},ts=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},ns=async function*(t,e){for await(const n of rs(t))yield*ts(n,e)},rs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Rt=(t,e,n,r)=>{const s=ns(t,e);let o=0,i,a=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){a(),f.close();return}let m=u.byteLength;if(n){let p=o+=m;n(p)}f.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(f){return a(f),s.return()}},{highWaterMark:2})},kt=64*1024,{isFunction:De}=c,ss=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:At,TextEncoder:_t}=c.global,Nt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},os=t=>{t=c.merge.call({skipUndefined:!0},ss,t);const{fetch:e,Request:n,Response:r}=t,s=e?De(e):typeof fetch=="function",o=De(n),i=De(r);if(!s)return!1;const a=s&&De(At),f=s&&(typeof _t=="function"?(d=>w=>d.encode(w))(new _t):async d=>new Uint8Array(await new n(d).arrayBuffer())),l=o&&a&&Nt(()=>{let d=!1;const w=new n(S.origin,{body:new At,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!w}),u=i&&a&&Nt(()=>c.isReadableStream(new r("").body)),m={stream:u&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!m[d]&&(m[d]=(w,h)=>{let g=w&&w[d];if(g)return g.call(w);throw new y(`Response type '${d}' is not supported`,y.ERR_NOT_SUPPORT,h)})});const p=async d=>{if(d==null)return 0;if(c.isBlob(d))return d.size;if(c.isSpecCompliantForm(d))return(await new n(S.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(c.isArrayBufferView(d)||c.isArrayBuffer(d))return d.byteLength;if(c.isURLSearchParams(d)&&(d=d+""),c.isString(d))return(await f(d)).byteLength},b=async(d,w)=>{const h=c.toFiniteNumber(d.getContentLength());return h??p(w)};return async d=>{let{url:w,method:h,data:g,signal:P,cancelToken:A,timeout:N,onDownloadProgress:L,onUploadProgress:Y,responseType:$,headers:Ke,withCredentials:_e="same-origin",fetchOptions:pn}=Mt(d),wn=e||fetch;$=$?($+"").toLowerCase():"text";let Ne=es([P,A&&A.toAbortSignal()],N),ye=null;const ee=Ne&&Ne.unsubscribe&&(()=>{Ne.unsubscribe()});let yn;try{if(Y&&l&&h!=="get"&&h!=="head"&&(yn=await b(Ke,g))!==0){let X=new n(w,{method:"POST",body:g,duplex:"half"}),ae;if(c.isFormData(g)&&(ae=X.headers.get("content-type"))&&Ke.setContentType(ae),X.body){const[Ze,Se]=Tt(yn,Pe(Et(Y)));g=Rt(X.body,kt,Ze,Se)}}c.isString(_e)||(_e=_e?"include":"omit");const W=o&&"credentials"in n.prototype,gn={...pn,signal:Ne,method:h.toUpperCase(),headers:Ke.normalize().toJSON(),body:g,duplex:"half",credentials:W?_e:void 0};ye=o&&new n(w,gn);let Q=await(o?wn(ye,pn):wn(w,gn));const bn=u&&($==="stream"||$==="response");if(u&&(L||bn&&ee)){const X={};["status","statusText","headers"].forEach(xn=>{X[xn]=Q[xn]});const ae=c.toFiniteNumber(Q.headers.get("content-length")),[Ze,Se]=L&&Tt(ae,Pe(Et(L),!0))||[];Q=new r(Rt(Q.body,kt,Ze,()=>{Se&&Se(),ee&&ee()}),X)}$=$||"text";let _i=await m[c.findKey(m,$)||"text"](Q,d);return!bn&&ee&&ee(),await new Promise((X,ae)=>{Ot(X,ae,{data:_i,headers:F.from(Q.headers),status:Q.status,statusText:Q.statusText,config:d,request:ye})})}catch(W){throw ee&&ee(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,d,ye),{cause:W.cause||W}):y.from(W,W&&W.code,d,ye)}}},is=new Map,St=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,o=[r,s,n];let i=o.length,a=i,f,l,u=is;for(;a--;)f=o[a],l=u.get(f),l===void 0&&u.set(f,l=a?new Map:os(e)),u=l;return l};St();const Ie={http:kr,xhr:Zr,fetch:{get:St}};c.forEach(Ie,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ct=t=>`- ${t}`,as=t=>c.isFunction(t)||t===null||t===!1;function cs(t,e){t=c.isArray(t)?t:[t];const{length:n}=t;let r,s;const o={};for(let i=0;i<n;i++){r=t[i];let a;if(s=r,!as(r)&&(s=Ie[(a=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${a}'`);if(s&&(c.isFunction(s)||(s=s.get(e))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
1
|
+
(function(H,ce){typeof exports=="object"&&typeof module<"u"?ce(exports):typeof define=="function"&&define.amd?define(["exports"],ce):(H=typeof globalThis<"u"?globalThis:H||self,ce(H.index={}))})(this,(function(H){"use strict";const ce=()=>({formatPhoneNumber:i=>{const a=(i??"").replace(/\D/g,"");if(/^1[568]\d{7}$/.test(a))return a.replace(/^(\d{4})(\d{4})$/,"$1-$2");if(a.startsWith("02")){if(a.length===9)return a.replace(/^(\d{2})(\d{3})(\d{4})$/,"$1-$2-$3");if(a.length===10)return a.replace(/^(\d{2})(\d{4})(\d{4})$/,"$1-$2-$3")}if(/^0\d+/.test(a)){if(a.length===10)return a.replace(/^(\d{3})(\d{3})(\d{4})$/,"$1-$2-$3");if(a.length===11)return a.replace(/^(\d{3})(\d{4})(\d{4})$/,"$1-$2-$3")}return i},formatBizNumber:i=>{const a=(i??"").replace(/\D/g,"");return a.length===10?a.replace(/^(\d{3})(\d{2})(\d{5})$/,"$1-$2-$3"):a.length===13?a.replace(/^(\d{6})(\d{7})$/,"$1-$2"):String(i??"")},formatDate:i=>{if(!(i instanceof Date)||isNaN(i.getTime()))return"";const a=i.getHours(),f=i.getMinutes(),l=a<12?"오전":"오후",u=a%12===0?12:a%12;return`${l} ${u}시 ${f}분`},Masker:{maskName:i=>{const a=(i??"").trim(),f=[...a].length;if(f<=0)return"";if(f===1)return"*";if(f===2){const[g]=[...a];return`${g}*`}const l=[...a],u=l[0],m=l[f-1],p="*".repeat(f-2);return`${u}${p}${m}`},maskPhoneNumber:i=>{if(i.includes("-")){const m=i.split("-");if(m.length===3){const[p,g,d]=m;return`${p}-${"*".repeat(g.replace(/\D/g,"").length||4)}-${d}`}if(m.length===2){const[p,g]=m,d=g.replace(/\D/g,""),w=d.slice(-4),h=Math.max(1,d.length-w.length);return`${p}-${"*".repeat(h)}${w}`}return i}const a=i.replace(/\D/g,"");if(a.length<8)return i;const f=a.slice(0,3),l=a.slice(-4),u=Math.max(1,a.length-(f.length+l.length));return`${f}${"*".repeat(u)}${l}`}},commanizeData:i=>{const a=String(i??"").trim();if(!a)return"";const f=a.replace(/,/g,""),l=f.startsWith("-")?"-":"",u=f.replace(/^-/,""),[m,p]=u.split("."),g=m.replace(/\B(?=(\d{3})+(?!\d))/g,",");return l+g+(p!==void 0?`.${p}`:"")},decommanizeData:i=>i.replace(/,/g,"")}),En=/^[A-Za-z0-9]([A-Za-z0-9_.+-]*[A-Za-z0-9])?@[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\.[A-Za-z]{2,}$/,Pn=/^010(\d{4})(\d{4})$/,Dn=/^(070|02|031|032|033|034|035|036|037|038|039|041|042|043|051|052|053|054|055|061|062|063|064|070|071|072)[0-9]{3,4}[0-9]{4}$/,Mn=/([0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[1,2][0-9]|3[0,1]))/,Rn=/^(19[0-9][0-9]|20\d{2})(0[0-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$/,kn=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+~`\-={}[\]:;"'<>,.?/\\]).{10,}$/,An=/^d{2}([0]\d|[1][0-2])([0][1-9]|[1-2]\d|[3][0-1])[-]*[1-4]\d{6}$/,Sn=/^(?:[0-9]{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[1,2][0-9]|3[0,1]))-[1-8][0-9]{6}$/,_n=/^https?:\/\/(?:[-\w.])+(?:\.[a-zA-Z]{2,})+(?::\d+)?(?:\/[^\s]*)?$/i,Nn=/\.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|ppt|pptx|txt|zip|rar)$/i;function Cn(t){return En.test(t)}function Fn(t){return Pn.test(t)}function Ln(t){return Dn.test(t)}function $n(t){return Mn.test(t)}function Hn(t){return Rn.test(t)}function qn(t){return kn.test(t)}function vn(t){return An.test(t)}function Bn(t){return Sn.test(t)}function In(t){const e=t.replace(/-/gi,"").split("").map(n=>parseInt(n,10));if(e.length===10){if(e.every(o=>o===0))return!1;const n=[1,3,7,1,3,7,1,3,5];let r=0;for(let o=0;o<9;o++)r+=n[o]*e[o];const s=(10-r%10)%10;return e[9]===s}return!1}function Yn(t){return _n.test(t)}function Wn(t,e=10){const n=typeof t=="string"?t:t.name;return!(!Nn.test(n)||t instanceof File&&t.size/1048576>e)}const jn={email:Cn,phone:Fn,homePhone:Ln,birth6:$n,birth8:Hn,password:qn,juminAfter2020:Bn,juminBefore2020:vn,corporateRegiNumber:In,url:Yn,file:Wn};function et(t,e){return function(){return t.apply(e,arguments)}}const{toString:Un}=Object.prototype,{getPrototypeOf:Ce}=Object,{iterator:ge,toStringTag:tt}=Symbol,be=(t=>e=>{const n=Un.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),q=t=>(t=t.toLowerCase(),e=>be(e)===t),xe=t=>e=>typeof e===t,{isArray:te}=Array,ne=xe("undefined");function ue(t){return t!==null&&!ne(t)&&t.constructor!==null&&!ne(t.constructor)&&F(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const nt=q("ArrayBuffer");function zn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&nt(t.buffer),e}const Qn=xe("string"),F=xe("function"),rt=xe("number"),le=t=>t!==null&&typeof t=="object",Xn=t=>t===!0||t===!1,Te=t=>{if(be(t)!=="object")return!1;const e=Ce(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(tt in t)&&!(ge in t)},Vn=t=>{if(!le(t)||ue(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Jn=q("Date"),Gn=q("File"),Kn=q("Blob"),Zn=q("FileList"),er=t=>le(t)&&F(t.pipe),tr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||F(t.append)&&((e=be(t))==="formdata"||e==="object"&&F(t.toString)&&t.toString()==="[object FormData]"))},nr=q("URLSearchParams"),[rr,sr,or,ir]=["ReadableStream","Request","Response","Headers"].map(q),ar=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fe(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),te(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(ue(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function st(t,e){if(ue(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const V=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ot=t=>!ne(t)&&t!==V;function Fe(){const{caseless:t,skipUndefined:e}=ot(this)&&this||{},n={},r=(s,o)=>{const i=t&&st(n,o)||o;Te(n[i])&&Te(s)?n[i]=Fe(n[i],s):Te(s)?n[i]=Fe({},s):te(s)?n[i]=s.slice():(!e||!ne(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&fe(arguments[s],r);return n}const cr=(t,e,n,{allOwnKeys:r}={})=>(fe(e,(s,o)=>{n&&F(s)?t[o]=et(s,n):t[o]=s},{allOwnKeys:r}),t),ur=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),lr=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},fr=(t,e,n,r)=>{let s,o,i;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&Ce(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},dr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},hr=t=>{if(!t)return null;if(te(t))return t;let e=t.length;if(!rt(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},mr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ce(Uint8Array)),pr=(t,e)=>{const r=(t&&t[ge]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},wr=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},yr=q("HTMLFormElement"),gr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),it=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),br=q("RegExp"),at=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};fe(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},xr=t=>{at(t,(e,n)=>{if(F(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(F(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Tr=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return te(t)?r(t):r(String(t).split(e)),n},Or=()=>{},Er=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Pr(t){return!!(t&&F(t.append)&&t[tt]==="FormData"&&t[ge])}const Dr=t=>{const e=new Array(10),n=(r,s)=>{if(le(r)){if(e.indexOf(r)>=0)return;if(ue(r))return r;if(!("toJSON"in r)){e[s]=r;const o=te(r)?[]:{};return fe(r,(i,a)=>{const f=n(i,s+1);!ne(f)&&(o[a]=f)}),e[s]=void 0,o}}return r};return n(t,0)},Mr=q("AsyncFunction"),Rr=t=>t&&(le(t)||F(t))&&F(t.then)&&F(t.catch),ct=((t,e)=>t?setImmediate:e?((n,r)=>(V.addEventListener("message",({source:s,data:o})=>{s===V&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),V.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",F(V.postMessage)),kr=typeof queueMicrotask<"u"?queueMicrotask.bind(V):typeof process<"u"&&process.nextTick||ct,c={isArray:te,isArrayBuffer:nt,isBuffer:ue,isFormData:tr,isArrayBufferView:zn,isString:Qn,isNumber:rt,isBoolean:Xn,isObject:le,isPlainObject:Te,isEmptyObject:Vn,isReadableStream:rr,isRequest:sr,isResponse:or,isHeaders:ir,isUndefined:ne,isDate:Jn,isFile:Gn,isBlob:Kn,isRegExp:br,isFunction:F,isStream:er,isURLSearchParams:nr,isTypedArray:mr,isFileList:Zn,forEach:fe,merge:Fe,extend:cr,trim:ar,stripBOM:ur,inherits:lr,toFlatObject:fr,kindOf:be,kindOfTest:q,endsWith:dr,toArray:hr,forEachEntry:pr,matchAll:wr,isHTMLForm:yr,hasOwnProperty:it,hasOwnProp:it,reduceDescriptors:at,freezeMethods:xr,toObjectSet:Tr,toCamelCase:gr,noop:Or,toFiniteNumber:Er,findKey:st,global:V,isContextDefined:ot,isSpecCompliantForm:Pr,toJSONObject:Dr,isAsyncFn:Mr,isThenable:Rr,setImmediate:ct,asap:kr,isIterable:t=>t!=null&&F(t[ge])};function b(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(b,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const ut=b.prototype,lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{lt[t]={value:t}}),Object.defineProperties(b,lt),Object.defineProperty(ut,"isAxiosError",{value:!0}),b.from=(t,e,n,r,s,o)=>{const i=Object.create(ut);c.toFlatObject(t,i,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const a=t&&t.message?t.message:"Error",f=e==null&&t?t.code:e;return b.call(i,a,f,n,r,s),t&&i.cause==null&&Object.defineProperty(i,"cause",{value:t,configurable:!0}),i.name=t&&t.name||"Error",o&&Object.assign(i,o),i};const Ar=null;function Le(t){return c.isPlainObject(t)||c.isArray(t)}function ft(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function dt(t,e,n){return t?t.concat(e).map(function(s,o){return s=ft(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function Sr(t){return c.isArray(t)&&!t.some(Le)}const _r=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function Oe(t,e,n){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,h){return!c.isUndefined(h[w])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!f&&c.isBlob(d))throw new b("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function u(d,w,h){let y=d;if(d&&!h&&typeof d=="object"){if(c.endsWith(w,"{}"))w=r?w:w.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Sr(d)||(c.isFileList(d)||c.endsWith(w,"[]"))&&(y=c.toArray(d)))return w=ft(w),y.forEach(function(E,D){!(c.isUndefined(E)||E===null)&&e.append(i===!0?dt([w],D,o):i===null?w:w+"[]",l(E))}),!1}return Le(d)?!0:(e.append(dt(h,w,o),l(d)),!1)}const m=[],p=Object.assign(_r,{defaultVisitor:u,convertValue:l,isVisitable:Le});function g(d,w){if(!c.isUndefined(d)){if(m.indexOf(d)!==-1)throw Error("Circular reference detected in "+w.join("."));m.push(d),c.forEach(d,function(y,P){(!(c.isUndefined(y)||y===null)&&s.call(e,y,c.isString(P)?P.trim():P,w,p))===!0&&g(y,w?w.concat(P):[P])}),m.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return g(t),e}function ht(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function $e(t,e){this._pairs=[],t&&Oe(t,this,e)}const mt=$e.prototype;mt.append=function(e,n){this._pairs.push([e,n])},mt.toString=function(e){const n=e?function(r){return e.call(this,r,ht)}:ht;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Nr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pt(t,e,n){if(!e)return t;const r=n&&n.encode||Nr;c.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(e,n):o=c.isURLSearchParams(e)?e.toString():new $e(e,n).toString(r),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class wt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(r){r!==null&&e(r)})}}const yt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:$e,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",qe=typeof navigator=="object"&&navigator||void 0,Fr=He&&(!qe||["ReactNative","NativeScript","NS"].indexOf(qe.product)<0),Lr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$r=He&&window.location.href||"http://localhost",C={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:Fr,hasStandardBrowserWebWorkerEnv:Lr,navigator:qe,origin:$r},Symbol.toStringTag,{value:"Module"})),...Cr};function Hr(t,e){return Oe(t,new C.classes.URLSearchParams,{visitor:function(n,r,s,o){return C.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function qr(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function vr(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function gt(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=o>=n.length;return i=!i&&c.isArray(s)?s.length:i,f?(c.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!c.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&c.isArray(s[i])&&(s[i]=vr(s[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const n={};return c.forEachEntry(t,(r,s)=>{e(qr(r),s,n,0)}),n}return null}function Br(t,e,n){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const de={transitional:yt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=c.isObject(e);if(o&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return s?JSON.stringify(gt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Hr(e,this.formSerializer).toString();if((a=c.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Oe(a?{"files[]":e}:e,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Br(e)):e}],transformResponse:[function(e){const n=this.transitional||de.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?b.from(a,b.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{de.headers[t]={}});const Ir=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yr=t=>{const e={};let n,r,s;return t&&t.split(`
|
|
2
|
+
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&Ir[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},bt=Symbol("internals");function he(t){return t&&String(t).trim().toLowerCase()}function Ee(t){return t===!1||t==null?t:c.isArray(t)?t.map(Ee):String(t)}function Wr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const jr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ve(t,e,n,r,s){if(c.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function Ur(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function zr(t,e){const n=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,o,i){return this[r].call(this,e,s,o,i)},configurable:!0})})}let L=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(a,f,l){const u=he(f);if(!u)throw new Error("header name must be a non-empty string");const m=c.findKey(s,u);(!m||s[m]===void 0||l===!0||l===void 0&&s[m]!==!1)&&(s[m||f]=Ee(a))}const i=(a,f)=>c.forEach(a,(l,u)=>o(l,u,f));if(c.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(c.isString(e)&&(e=e.trim())&&!jr(e))i(Yr(e),n);else if(c.isObject(e)&&c.isIterable(e)){let a={},f,l;for(const u of e){if(!c.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[l=u[0]]=(f=a[l])?c.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}i(a,n)}else e!=null&&o(n,e,r);return this}get(e,n){if(e=he(e),e){const r=c.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return Wr(s);if(c.isFunction(n))return n.call(this,s,r);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=he(e),e){const r=c.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ve(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(i){if(i=he(i),i){const a=c.findKey(r,i);a&&(!n||ve(r,r[a],a,n))&&(delete r[a],s=!0)}}return c.isArray(e)?e.forEach(o):o(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!e||ve(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const n=this,r={};return c.forEach(this,(s,o)=>{const i=c.findKey(r,o);if(i){n[i]=Ee(s),delete n[o];return}const a=e?Ur(o):String(o).trim();a!==o&&delete n[o],n[a]=Ee(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return c.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[bt]=this[bt]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=he(i);r[a]||(zr(s,i),r[a]=!0)}return c.isArray(e)?e.forEach(o):o(e),this}};L.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(L.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),c.freezeMethods(L);function Be(t,e){const n=this||de,r=e||n,s=L.from(r.headers);let o=r.data;return c.forEach(t,function(a){o=a.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function xt(t){return!!(t&&t.__CANCEL__)}function re(t,e,n){b.call(this,t??"canceled",b.ERR_CANCELED,e,n),this.name="CanceledError"}c.inherits(re,b,{__CANCEL__:!0});function Tt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new b("Request failed with status code "+n.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Qr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Xr(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),u=r[o];i||(i=l),n[s]=f,r[s]=l;let m=o,p=0;for(;m!==s;)p+=n[m++],m=m%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-i<e)return;const g=u&&l-u;return g?Math.round(p*1e3/g):void 0}}function Vr(t,e){let n=0,r=1e3/e,s,o;const i=(l,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),t(...l)};return[(...l)=>{const u=Date.now(),m=u-n;m>=r?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-m)))},()=>s&&i(s)]}const Pe=(t,e,n=3)=>{let r=0;const s=Xr(50,250);return Vr(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,f=i-r,l=s(f),u=i<=a;r=i;const m={loaded:i,total:a,progress:a?i/a:void 0,bytes:f,rate:l||void 0,estimated:l&&a&&u?(a-i)/l:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(m)},n)},Ot=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Et=t=>(...e)=>c.asap(()=>t(...e)),Jr=C.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,C.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0,Gr=C.hasStandardBrowserEnv?{write(t,e,n,r,s,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Kr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Zr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Pt(t,e,n){let r=!Kr(e);return t&&(r||n==!1)?Zr(t,e):e}const Dt=t=>t instanceof L?{...t}:t;function J(t,e){e=e||{};const n={};function r(l,u,m,p){return c.isPlainObject(l)&&c.isPlainObject(u)?c.merge.call({caseless:p},l,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function s(l,u,m,p){if(c.isUndefined(u)){if(!c.isUndefined(l))return r(void 0,l,m,p)}else return r(l,u,m,p)}function o(l,u){if(!c.isUndefined(u))return r(void 0,u)}function i(l,u){if(c.isUndefined(u)){if(!c.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,m){if(m in e)return r(l,u);if(m in t)return r(void 0,l)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,u,m)=>s(Dt(l),Dt(u),m,!0)};return c.forEach(Object.keys({...t,...e}),function(u){const m=f[u]||s,p=m(t[u],e[u],u);c.isUndefined(p)&&m!==a||(n[u]=p)}),n}const Mt=t=>{const e=J({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=e;if(e.headers=i=L.from(i),e.url=pt(Pt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const f=n.getHeaders(),l=["content-type","content-length"];Object.entries(f).forEach(([u,m])=>{l.includes(u.toLowerCase())&&i.set(u,m)})}}if(C.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(e)),r||r!==!1&&Jr(e.url))){const f=s&&o&&Gr.read(o);f&&i.set(s,f)}return e},es=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const s=Mt(t);let o=s.data;const i=L.from(s.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:l}=s,u,m,p,g,d;function w(){g&&g(),d&&d(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function y(){if(!h)return;const E=L.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:t,request:h};Tt(function($){n($),w()},function($){r($),w()},_),h=null}"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(y)},h.onabort=function(){h&&(r(new b("Request aborted",b.ECONNABORTED,t,h)),h=null)},h.onerror=function(D){const _=D&&D.message?D.message:"Network Error",Y=new b(_,b.ERR_NETWORK,t,h);Y.event=D||null,r(Y),h=null},h.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const _=s.transitional||yt;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new b(D,_.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&c.forEach(i.toJSON(),function(D,_){h.setRequestHeader(_,D)}),c.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),a&&a!=="json"&&(h.responseType=s.responseType),l&&([p,d]=Pe(l,!0),h.addEventListener("progress",p)),f&&h.upload&&([m,g]=Pe(f),h.upload.addEventListener("progress",m),h.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=E=>{h&&(r(!E||E.type?new re(null,t,h):E),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const P=Qr(s.url);if(P&&C.protocols.indexOf(P)===-1){r(new b("Unsupported protocol "+P+":",b.ERR_BAD_REQUEST,t));return}h.send(o||null)})},ts=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;r.abort(u instanceof b?u:new re(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>c.asap(a),f}},ns=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},rs=async function*(t,e){for await(const n of ss(t))yield*ns(n,e)},ss=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Rt=(t,e,n,r)=>{const s=rs(t,e);let o=0,i,a=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){a(),f.close();return}let m=u.byteLength;if(n){let p=o+=m;n(p)}f.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(f){return a(f),s.return()}},{highWaterMark:2})},kt=64*1024,{isFunction:De}=c,os=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:At,TextEncoder:St}=c.global,_t=(t,...e)=>{try{return!!t(...e)}catch{return!1}},is=t=>{t=c.merge.call({skipUndefined:!0},os,t);const{fetch:e,Request:n,Response:r}=t,s=e?De(e):typeof fetch=="function",o=De(n),i=De(r);if(!s)return!1;const a=s&&De(At),f=s&&(typeof St=="function"?(d=>w=>d.encode(w))(new St):async d=>new Uint8Array(await new n(d).arrayBuffer())),l=o&&a&&_t(()=>{let d=!1;const w=new n(C.origin,{body:new At,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!w}),u=i&&a&&_t(()=>c.isReadableStream(new r("").body)),m={stream:u&&(d=>d.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!m[d]&&(m[d]=(w,h)=>{let y=w&&w[d];if(y)return y.call(w);throw new b(`Response type '${d}' is not supported`,b.ERR_NOT_SUPPORT,h)})});const p=async d=>{if(d==null)return 0;if(c.isBlob(d))return d.size;if(c.isSpecCompliantForm(d))return(await new n(C.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(c.isArrayBufferView(d)||c.isArrayBuffer(d))return d.byteLength;if(c.isURLSearchParams(d)&&(d=d+""),c.isString(d))return(await f(d)).byteLength},g=async(d,w)=>{const h=c.toFiniteNumber(d.getContentLength());return h??p(w)};return async d=>{let{url:w,method:h,data:y,signal:P,cancelToken:E,timeout:D,onDownloadProgress:_,onUploadProgress:Y,responseType:$,headers:Ke,withCredentials:Se="same-origin",fetchOptions:wn}=Mt(d),yn=e||fetch;$=$?($+"").toLowerCase():"text";let _e=ts([P,E&&E.toAbortSignal()],D),ye=null;const ee=_e&&_e.unsubscribe&&(()=>{_e.unsubscribe()});let gn;try{if(Y&&l&&h!=="get"&&h!=="head"&&(gn=await g(Ke,y))!==0){let X=new n(w,{method:"POST",body:y,duplex:"half"}),ae;if(c.isFormData(y)&&(ae=X.headers.get("content-type"))&&Ke.setContentType(ae),X.body){const[Ze,Ne]=Ot(gn,Pe(Et(Y)));y=Rt(X.body,kt,Ze,Ne)}}c.isString(Se)||(Se=Se?"include":"omit");const W=o&&"credentials"in n.prototype,bn={...wn,signal:_e,method:h.toUpperCase(),headers:Ke.normalize().toJSON(),body:y,duplex:"half",credentials:W?Se:void 0};ye=o&&new n(w,bn);let Q=await(o?yn(ye,wn):yn(w,bn));const xn=u&&($==="stream"||$==="response");if(u&&(_||xn&&ee)){const X={};["status","statusText","headers"].forEach(Tn=>{X[Tn]=Q[Tn]});const ae=c.toFiniteNumber(Q.headers.get("content-length")),[Ze,Ne]=_&&Ot(ae,Pe(Et(_),!0))||[];Q=new r(Rt(Q.body,kt,Ze,()=>{Ne&&Ne(),ee&&ee()}),X)}$=$||"text";let Ni=await m[c.findKey(m,$)||"text"](Q,d);return!xn&&ee&&ee(),await new Promise((X,ae)=>{Tt(X,ae,{data:Ni,headers:L.from(Q.headers),status:Q.status,statusText:Q.statusText,config:d,request:ye})})}catch(W){throw ee&&ee(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,d,ye),{cause:W.cause||W}):b.from(W,W&&W.code,d,ye)}}},as=new Map,Nt=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,o=[r,s,n];let i=o.length,a=i,f,l,u=as;for(;a--;)f=o[a],l=u.get(f),l===void 0&&u.set(f,l=a?new Map:is(e)),u=l;return l};Nt();const Ie={http:Ar,xhr:es,fetch:{get:Nt}};c.forEach(Ie,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ct=t=>`- ${t}`,cs=t=>c.isFunction(t)||t===null||t===!1;function us(t,e){t=c.isArray(t)?t:[t];const{length:n}=t;let r,s;const o={};for(let i=0;i<n;i++){r=t[i];let a;if(s=r,!cs(r)&&(s=Ie[(a=String(r)).toLowerCase()],s===void 0))throw new b(`Unknown adapter '${a}'`);if(s&&(c.isFunction(s)||(s=s.get(e))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
4
4
|
`+i.map(Ct).join(`
|
|
5
|
-
`):" "+Ct(i[0]):"as no adapter specified";throw new
|
|
6
|
-
`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=J(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Re.assertOptions(r,{silentJSONParsing:v.transitional(v.boolean),forcedJSONParsing:v.transitional(v.boolean),clarifyTimeoutError:v.transitional(v.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:Re.assertOptions(s,{encode:v.function,serialize:v.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Re.assertOptions(n,{baseUrl:v.spelling("baseURL"),withXsrfToken:v.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&c.merge(o.common,o[n.method]);o&&c.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=F.concat(i,o);const a=[];let f=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(f=f&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const l=[];this.interceptors.response.forEach(function(w){l.push(w.fulfilled,w.rejected)});let u,m=0,p;if(!f){const d=[Lt.bind(this),void 0];for(d.unshift(...a),d.push(...l),p=d.length,u=Promise.resolve(n);m<p;)u=u.then(d[m++],d[m++]);return u}p=a.length;let b=n;for(;m<p;){const d=a[m++],w=a[m++];try{b=d(b)}catch(h){w.call(this,h);break}}try{u=Lt.call(this,b)}catch(d){return Promise.reject(d)}for(m=0,p=l.length;m<p;)u=u.then(l[m++],l[m++]);return u}getUri(e){e=J(this.defaults,e);const n=Pt(e.baseURL,e.url,e.allowAbsoluteUrls);return pt(n,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){G.prototype[e]=function(n,r){return this.request(J(r||{},{method:e,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(e){function n(r){return function(o,i,a){return this.request(J(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}G.prototype[e]=n(),G.prototype[e+"Form"]=n(!0)});let ls=class On{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,a){r.reason||(r.reason=new re(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new On(function(s){e=s}),cancel:e}}};function fs(t){return function(n){return t.apply(null,n)}}function ds(t){return c.isObject(t)&&t.isAxiosError===!0}const We={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(We).forEach(([t,e])=>{We[e]=t});function Ht(t){const e=new G(t),n=et(G.prototype.request,e);return c.extend(n,G.prototype,e,{allOwnKeys:!0}),c.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return Ht(J(t,s))},n}const M=Ht(de);M.Axios=G,M.CanceledError=re,M.CancelToken=ls,M.isCancel=xt,M.VERSION=$t,M.toFormData=Te,M.AxiosError=y,M.Cancel=M.CanceledError,M.all=function(e){return Promise.all(e)},M.spread=fs,M.isAxiosError=ds,M.mergeConfig=J,M.AxiosHeaders=F,M.formToJSON=t=>gt(c.isHTMLForm(t)?new FormData(t):t),M.getAdapter=Ft.getAdapter,M.HttpStatusCode=We,M.default=M;const{Axios:qi,AxiosError:Hi,CanceledError:vi,isCancel:Bi,CancelToken:Ii,VERSION:Yi,all:Wi,Cancel:ji,isAxiosError:Ui,spread:zi,toFormData:Qi,AxiosHeaders:Xi,HttpStatusCode:Vi,formToJSON:Ji,getAdapter:Gi,mergeConfig:Ki}=M,hs=({error:t,message:e="알 수 없는 에러가 발생했습니다.",callback:n})=>M.isAxiosError(t)?(n?.(),{type:"axios",message:t.response?.data?.message??e,status:t.response?.status}):t instanceof Error?(n?.(),{type:"client",message:t.message||e}):(n?.(),{type:"unknown",message:e}),vt=(t,e={})=>{const{removeUndefined:n=!0,removeNull:r=!0,removeEmptyString:s=!0,removeEmptyArray:o=!0,removeEmptyObject:i=!0,normalizeNumbers:a=!1,normalizeBooleans:f=!1,normalizeNested:l=!1}=e,u=p=>{switch(!0){case(n&&p===void 0):return!0;case(r&&p===null):return!0;case(s&&p===""):return!0;case(o&&Array.isArray(p)&&p.length===0):return!0;case(i&&typeof p=="object"&&p!==null&&!Array.isArray(p)&&Object.keys(p).length===0):return!0;default:return!1}},m=p=>{if(typeof p=="object"&&p!==null){if(Array.isArray(p))return l?p.map(b=>m(b)).filter(b=>!u(b)):p;if(typeof p=="object")return l?vt(p,e):p}if(typeof p=="string"){const b=p.trim();if(f){const d=b.toLowerCase();if(d==="true")return!0;if(d==="false")return!1}return b}return a&&typeof p=="number"?String(p):p};return Object.fromEntries(Object.entries(t).map(([p,b])=>[p,m(b)]).filter(([,p])=>!u(p)))};function j(){return typeof window>"u"||"Deno"in globalThis}function ms(){return!j()}function Bt(){return j()?!1:/ipad|iphone/i.test(navigator.userAgent)}function It(){return j()?!1:/Macintosh|MacIntel|MacPPC|Mac68K/.test(navigator.platform)}function Yt(){return j()?!1:/Android/i.test(navigator.userAgent)}function ps(){return j()?!1:/MSIE|Trident/i.test(navigator.userAgent)}function Wt(){return j()?!1:/KAKAOTALK/i.test(navigator.userAgent)}function je(){return j()?!1:Bt()?"ios":Yt()?"android":"web"}function ws(){const t=je();return t==="ios"||t==="android"}function ys(){if(j())return"server";if(Wt())return"kakao";const t=je();return t==="ios"||t==="android"?t:It()?"macos":"web"}const gs={isServer:j,isClient:ms,isIOS:Bt,isAndroid:Yt,isMacOS:It,isIE:ps,isKakaoWebView:Wt,isMobileWeb:ws,getOSByUserAgent:je,getPlatform:ys},jt=6048e5,bs=864e5,Ut=6e4,zt=36e5,xs=1e3,Qt=Symbol.for("constructDateFrom");function _(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Qt in t?t[Qt](e):t instanceof Date?new t.constructor(e):new Date(e)}function O(t,e){return _(e||t,t)}function Xt(t,e,n){const r=O(t,n?.in);return isNaN(e)?_(n?.in||t,NaN):(e&&r.setDate(r.getDate()+e),r)}let Os={};function se(){return Os}function U(t,e){const n=se(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=O(t,e?.in),o=s.getDay(),i=(o<r?7:0)+o-r;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function oe(t,e){return U(t,{...e,weekStartsOn:1})}function Vt(t,e){const n=O(t,e?.in),r=n.getFullYear(),s=_(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const o=oe(s),i=_(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=oe(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function ke(t){const e=O(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function K(t,...e){const n=_.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function Jt(t,e){const n=O(t,e?.in);return n.setHours(0,0,0,0),n}function Gt(t,e,n){const[r,s]=K(n?.in,t,e),o=Jt(r),i=Jt(s),a=+o-ke(o),f=+i-ke(i);return Math.round((a-f)/bs)}function Ts(t,e){const n=Vt(t,e),r=_(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),oe(r)}function me(t,e){const n=+O(t)-+O(e);return n<0?-1:n>0?1:n}function Es(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Ps(t){return!(!Es(t)&&typeof t!="number"||isNaN(+O(t)))}function Ds(t,e,n){const[r,s]=K(n?.in,t,e),o=r.getFullYear()-s.getFullYear(),i=r.getMonth()-s.getMonth();return o*12+i}function Ms(t,e,n){const[r,s]=K(n?.in,t,e);return r.getFullYear()-s.getFullYear()}function Kt(t,e,n){const[r,s]=K(n?.in,t,e),o=Zt(r,s),i=Math.abs(Gt(r,s));r.setDate(r.getDate()-o*i);const a=+(Zt(r,s)===-o),f=o*(i-a);return f===0?0:f}function Zt(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function Ue(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function Rs(t,e,n){const[r,s]=K(n?.in,t,e),o=(+r-+s)/zt;return Ue(n?.roundingMethod)(o)}function ks(t,e){return+O(t)-+O(e)}function As(t,e,n){const r=ks(t,e)/Ut;return Ue(n?.roundingMethod)(r)}function _s(t,e){const n=O(t,e?.in);return n.setHours(23,59,59,999),n}function Ns(t,e){const n=O(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Ss(t,e){const n=O(t,e?.in);return+_s(n,e)==+Ns(n,e)}function Cs(t,e,n){const[r,s,o]=K(n?.in,t,t,e),i=me(s,o),a=Math.abs(Ds(s,o));if(a<1)return 0;s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-i*a);let f=me(s,o)===-i;Ss(r)&&a===1&&me(r,o)===1&&(f=!1);const l=i*(a-+f);return l===0?0:l}function Fs(t,e,n){const r=Kt(t,e,n)/7;return Ue(n?.roundingMethod)(r)}function Ls(t,e,n){const[r,s]=K(n?.in,t,e),o=me(r,s),i=Math.abs(Ms(r,s));r.setFullYear(1584),s.setFullYear(1584);const a=me(r,s)===-o,f=o*(i-+a);return f===0?0:f}function $s(t,e){const n=O(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const qs={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"}},Hs=(t,e,n)=>{let r;const s=qs[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ze(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const vs={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Bs={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Is={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ys={date:ze({formats:vs,defaultWidth:"full"}),time:ze({formats:Bs,defaultWidth:"full"}),dateTime:ze({formats:Is,defaultWidth:"full"})},Ws={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},js=(t,e,n,r)=>Ws[t];function pe(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const Us={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zs={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qs={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"]},Xs={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"]},Vs={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"}},Js={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"}},Gs={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:pe({values:Us,defaultWidth:"wide"}),quarter:pe({values:zs,defaultWidth:"wide",argumentCallback:t=>t-1}),month:pe({values:Qs,defaultWidth:"wide"}),day:pe({values:Xs,defaultWidth:"wide"}),dayPeriod:pe({values:Vs,defaultWidth:"wide",formattingValues:Js,defaultFormattingWidth:"wide"})};function we(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(a)?Zs(a,m=>m.test(i)):Ks(a,m=>m.test(i));let l;l=t.valueCallback?t.valueCallback(f):f,l=n.valueCallback?n.valueCallback(l):l;const u=e.slice(i.length);return{value:l,rest:u}}}function Ks(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Zs(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function eo(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const to=/^(\d+)(th|st|nd|rd)?/i,no=/\d+/i,ro={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},so={any:[/^b/i,/^(a|c)/i]},oo={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},io={any:[/1/i,/2/i,/3/i,/4/i]},ao={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},co={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]},uo={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},lo={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]},fo={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},ho={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}},mo={ordinalNumber:eo({matchPattern:to,parsePattern:no,valueCallback:t=>parseInt(t,10)}),era:we({matchPatterns:ro,defaultMatchWidth:"wide",parsePatterns:so,defaultParseWidth:"any"}),quarter:we({matchPatterns:oo,defaultMatchWidth:"wide",parsePatterns:io,defaultParseWidth:"any",valueCallback:t=>t+1}),month:we({matchPatterns:ao,defaultMatchWidth:"wide",parsePatterns:co,defaultParseWidth:"any"}),day:we({matchPatterns:uo,defaultMatchWidth:"wide",parsePatterns:lo,defaultParseWidth:"any"}),dayPeriod:we({matchPatterns:fo,defaultMatchWidth:"any",parsePatterns:ho,defaultParseWidth:"any"})},en={code:"en-US",formatDistance:Hs,formatLong:Ys,formatRelative:js,localize:Gs,match:mo,options:{weekStartsOn:0,firstWeekContainsDate:1}};function po(t,e){const n=O(t,e?.in);return Gt(n,$s(n))+1}function tn(t,e){const n=O(t,e?.in),r=+oe(n)-+Ts(n);return Math.round(r/jt)+1}function Qe(t,e){const n=O(t,e?.in),r=n.getFullYear(),s=se(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=_(e?.in||t,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const a=U(i,e),f=_(e?.in||t,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const l=U(f,e);return+n>=+a?r+1:+n>=+l?r:r-1}function wo(t,e){const n=se(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Qe(t,e),o=_(e?.in||t,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),U(o,e)}function nn(t,e){const n=O(t,e?.in),r=+U(n,e)-+wo(n,e);return Math.round(r/jt)+1}function x(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const z={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return x(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):x(n+1,2)},d(t,e){return x(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return x(t.getHours()%12||12,e.length)},H(t,e){return x(t.getHours(),e.length)},m(t,e){return x(t.getMinutes(),e.length)},s(t,e){return x(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return x(s,e.length)}},ie={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},rn={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return z.y(t,e)},Y:function(t,e,n,r){const s=Qe(t,r),o=s>0?s:1-s;if(e==="YY"){const i=o%100;return x(i,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):x(o,e.length)},R:function(t,e){const n=Vt(t);return x(n,e.length)},u:function(t,e){const n=t.getFullYear();return x(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return x(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return x(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return z.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return x(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=nn(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):x(s,e.length)},I:function(t,e,n){const r=tn(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):x(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):z.d(t,e)},D:function(t,e,n){const r=po(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):x(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return x(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return x(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return x(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=ie.noon:r===0?s=ie.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=ie.evening:r>=12?s=ie.afternoon:r>=4?s=ie.morning:s=ie.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return z.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):z.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):x(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):x(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):z.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):z.s(t,e)},S:function(t,e){return z.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return on(r);case"XXXX":case"XX":return Z(r);case"XXXXX":case"XXX":default:return Z(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return on(r);case"xxxx":case"xx":return Z(r);case"xxxxx":case"xxx":default:return Z(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sn(r,":");case"OOOO":default:return"GMT"+Z(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sn(r,":");case"zzzz":default:return"GMT"+Z(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return x(r,e.length)},T:function(t,e,n){return x(+t,e.length)}};function sn(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+e+x(o,2)}function on(t,e){return t%60===0?(t>0?"-":"+")+x(Math.abs(t)/60,2):Z(t,e)}function Z(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=x(Math.trunc(r/60),2),o=x(r%60,2);return n+s+e+o}const an=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},cn=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Xe={p:cn,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return an(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",an(r,e)).replace("{{time}}",cn(s,e))}},yo=/^D+$/,go=/^Y+$/,bo=["D","DD","YY","YYYY"];function un(t){return yo.test(t)}function ln(t){return go.test(t)}function Ve(t,e,n){const r=xo(t,e,n);if(console.warn(r),bo.includes(t))throw new RangeError(r)}function xo(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Oo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,To=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Eo=/^'([^]*?)'?$/,Po=/''/g,Do=/[a-zA-Z]/;function Mo(t,e,n){const r=se(),s=r.locale??en,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=O(t,n?.in);if(!Ps(a))throw new RangeError("Invalid time value");let f=e.match(To).map(u=>{const m=u[0];if(m==="p"||m==="P"){const p=Xe[m];return p(u,s.formatLong)}return u}).join("").match(Oo).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const m=u[0];if(m==="'")return{isToken:!1,value:Ro(u)};if(rn[m])return{isToken:!0,value:u};if(m.match(Do))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:u}});s.localize.preprocessor&&(f=s.localize.preprocessor(a,f));const l={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return f.map(u=>{if(!u.isToken)return u.value;const m=u.value;(ln(m)||un(m))&&Ve(m,e,String(t));const p=rn[m[0]];return p(a,m,s.localize,l)}).join("")}function Ro(t){const e=t.match(Eo);return e?e[1].replace(Po,"'"):t}function ko(t,e){const n=O(t,e?.in);if(isNaN(+n))throw new RangeError("Invalid time value");let r="",s="";const o="-",i=":";{const a=x(n.getDate(),2),f=x(n.getMonth()+1,2);r=`${x(n.getFullYear(),4)}${o}${f}${o}${a}`}{const a=n.getTimezoneOffset();if(a!==0){const b=Math.abs(a),d=x(Math.trunc(b/60),2),w=x(b%60,2);s=`${a<0?"+":"-"}${d}:${w}`}else s="Z";const f=x(n.getHours(),2),l=x(n.getMinutes(),2),u=x(n.getSeconds(),2),m=r===""?"":"T",p=[f,l,u].join(i);r=`${r}${m}${p}${s}`}return r}function Ao(){return Object.assign({},se())}function _o(t,e){const n=O(t,e?.in).getDay();return n===0?7:n}function No(t,e){return+O(t)>+O(e)}function So(t,e){return+O(t)<+O(e)}function Co(t,e){const n=Fo(e)?new e(0):_(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function Fo(t){return typeof t=="function"&&t.prototype?.constructor===t}const Lo=10;class fn{subPriority=0;validate(e,n){return!0}}class $o extends fn{constructor(e,n,r,s,o){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=s,o&&(this.subPriority=o)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}}class qo extends fn{priority=Lo;subPriority=-1;constructor(e,n){super(),this.context=e||(r=>_(n,r))}set(e,n){return n.timestampIsSet?e:_(e,Co(e,this.context))}}class T{run(e,n,r,s){const o=this.parse(e,n,r,s);return o?{setter:new $o(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,n,r){return!0}}class Ho extends T{priority=140;parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const R={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}/},B={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 k(t,e){return t&&{value:e(t.value),rest:t.rest}}function E(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function I(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(s*zt+o*Ut+i*xs),rest:e.slice(n[0].length)}}function dn(t){return E(R.anyDigitsSigned,t)}function D(t,e){switch(t){case 1:return E(R.singleDigit,e);case 2:return E(R.twoDigits,e);case 3:return E(R.threeDigits,e);case 4:return E(R.fourDigits,e);default:return E(new RegExp("^\\d{1,"+t+"}"),e)}}function Ae(t,e){switch(t){case 1:return E(R.singleDigitSigned,e);case 2:return E(R.twoDigitsSigned,e);case 3:return E(R.threeDigitsSigned,e);case 4:return E(R.fourDigitsSigned,e);default:return E(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Je(t){switch(t){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 hn(t,e){const n=e>0,r=n?e:1-e;let s;if(r<=50)s=t||100;else{const o=r+50,i=Math.trunc(o/100)*100,a=t>=o%100;s=t+i-(a?100:0)}return n?s:1-s}function mn(t){return t%400===0||t%4===0&&t%100!==0}class vo extends T{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return k(D(4,e),s);case"yo":return k(r.ordinalNumber(e,{unit:"year"}),s);default:return k(D(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const s=e.getFullYear();if(r.isTwoDigitYear){const i=hn(r.year,s);return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}const o=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Bo extends T{priority=130;parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return k(D(4,e),s);case"Yo":return k(r.ordinalNumber(e,{unit:"year"}),s);default:return k(D(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,s){const o=Qe(e,s);if(r.isTwoDigitYear){const a=hn(r.year,o);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),U(e,s)}const i=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(i,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),U(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Io extends T{priority=130;parse(e,n){return Ae(n==="R"?4:n.length,e)}set(e,n,r){const s=_(e,0);return s.setFullYear(r,0,4),s.setHours(0,0,0,0),oe(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Yo extends T{priority=130;parse(e,n){return Ae(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class Wo extends T{priority=120;parse(e,n,r){switch(n){case"Q":case"QQ":return D(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class jo extends T{priority=120;parse(e,n,r){switch(n){case"q":case"qq":return D(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class Uo extends T{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"M":return k(E(R.month,e),s);case"MM":return k(D(2,e),s);case"Mo":return k(r.ordinalNumber(e,{unit:"month"}),s);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class zo extends T{priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"L":return k(E(R.month,e),s);case"LL":return k(D(2,e),s);case"Lo":return k(r.ordinalNumber(e,{unit:"month"}),s);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Qo(t,e,n){const r=O(t,n?.in),s=nn(r,n)-e;return r.setDate(r.getDate()-s*7),O(r,n?.in)}class Xo extends T{priority=100;parse(e,n,r){switch(n){case"w":return E(R.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return D(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,s){return U(Qo(e,r,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Vo(t,e,n){const r=O(t,n?.in),s=tn(r,n)-e;return r.setDate(r.getDate()-s*7),r}class Jo extends T{priority=100;parse(e,n,r){switch(n){case"I":return E(R.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return D(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return oe(Vo(e,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Go=[31,28,31,30,31,30,31,31,30,31,30,31],Ko=[31,29,31,30,31,30,31,31,30,31,30,31];class Zo extends T{priority=90;subPriority=1;parse(e,n,r){switch(n){case"d":return E(R.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return D(n.length,e)}}validate(e,n){const r=e.getFullYear(),s=mn(r),o=e.getMonth();return s?n>=1&&n<=Ko[o]:n>=1&&n<=Go[o]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class ei extends T{priority=90;subpriority=1;parse(e,n,r){switch(n){case"D":case"DD":return E(R.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return D(n.length,e)}}validate(e,n){const r=e.getFullYear();return mn(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Ge(t,e,n){const r=se(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=O(t,n?.in),i=o.getDay(),f=(e%7+7)%7,l=7-s,u=e<0||e>6?e-(i+l)%7:(f+l)%7-(i+l)%7;return Xt(o,u,n)}class ti extends T{priority=90;parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=Ge(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class ni extends T{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return k(D(n.length,e),o);case"eo":return k(r.ordinalNumber(e,{unit:"day"}),o);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=Ge(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class ri extends T{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return k(D(n.length,e),o);case"co":return k(r.ordinalNumber(e,{unit:"day"}),o);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=Ge(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function si(t,e,n){const r=O(t,n?.in),s=_o(r,n),o=e-s;return Xt(r,o,n)}class oi extends T{priority=90;parse(e,n,r){const s=o=>o===0?7:o;switch(n){case"i":case"ii":return D(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return k(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return k(r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return k(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return k(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=si(e,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class ii extends T{priority=80;parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(Je(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class ai extends T{priority=80;parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(Je(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class ci extends T{priority=80;parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(Je(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class ui extends T{priority=70;parse(e,n,r){switch(n){case"h":return E(R.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return D(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const s=e.getHours()>=12;return s&&r<12?e.setHours(r+12,0,0,0):!s&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class li extends T{priority=70;parse(e,n,r){switch(n){case"H":return E(R.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return D(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class fi extends T{priority=70;parse(e,n,r){switch(n){case"K":return E(R.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return D(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class di extends T{priority=70;parse(e,n,r){switch(n){case"k":return E(R.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return D(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const s=r<=24?r%24:r;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class hi extends T{priority=60;parse(e,n,r){switch(n){case"m":return E(R.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return D(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]}class mi extends T{priority=50;parse(e,n,r){switch(n){case"s":return E(R.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return D(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]}class pi extends T{priority=30;parse(e,n){const r=s=>Math.trunc(s*Math.pow(10,-n.length+3));return k(D(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]}class wi extends T{priority=10;parse(e,n){switch(n){case"X":return I(B.basicOptionalMinutes,e);case"XX":return I(B.basic,e);case"XXXX":return I(B.basicOptionalSeconds,e);case"XXXXX":return I(B.extendedOptionalSeconds,e);case"XXX":default:return I(B.extended,e)}}set(e,n,r){return n.timestampIsSet?e:_(e,e.getTime()-ke(e)-r)}incompatibleTokens=["t","T","x"]}class yi extends T{priority=10;parse(e,n){switch(n){case"x":return I(B.basicOptionalMinutes,e);case"xx":return I(B.basic,e);case"xxxx":return I(B.basicOptionalSeconds,e);case"xxxxx":return I(B.extendedOptionalSeconds,e);case"xxx":default:return I(B.extended,e)}}set(e,n,r){return n.timestampIsSet?e:_(e,e.getTime()-ke(e)-r)}incompatibleTokens=["t","T","X"]}class gi extends T{priority=40;parse(e){return dn(e)}set(e,n,r){return[_(e,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class bi extends T{priority=20;parse(e){return dn(e)}set(e,n,r){return[_(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const xi={G:new Ho,y:new vo,Y:new Bo,R:new Io,u:new Yo,Q:new Wo,q:new jo,M:new Uo,L:new zo,w:new Xo,I:new Jo,d:new Zo,D:new ei,E:new ti,e:new ni,c:new ri,i:new oi,a:new ii,b:new ai,B:new ci,h:new ui,H:new li,K:new fi,k:new di,m:new hi,s:new mi,S:new pi,X:new wi,x:new yi,t:new gi,T:new bi},Oi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ti=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ei=/^'([^]*?)'?$/,Pi=/''/g,Di=/\S/,Mi=/[a-zA-Z]/;function Ri(t,e,n,r){const s=()=>_(n,NaN),o=Ao(),i=o.locale??en,a=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,f=o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!e)return t?s():O(n,r?.in);const l={firstWeekContainsDate:a,weekStartsOn:f,locale:i},u=[new qo(r?.in,n)],m=e.match(Ti).map(h=>{const g=h[0];if(g in Xe){const P=Xe[g];return P(h,i.formatLong)}return h}).join("").match(Oi),p=[];for(let h of m){ln(h)&&Ve(h,e,t),un(h)&&Ve(h,e,t);const g=h[0],P=xi[g];if(P){const{incompatibleTokens:A}=P;if(Array.isArray(A)){const L=p.find(Y=>A.includes(Y.token)||Y.token===g);if(L)throw new RangeError(`The format string mustn't contain \`${L.fullToken}\` and \`${h}\` at the same time`)}else if(P.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);p.push({token:g,fullToken:h});const N=P.run(t,h,i.match,l);if(!N)return s();u.push(N.setter),t=N.rest}else{if(g.match(Mi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");if(h==="''"?h="'":g==="'"&&(h=ki(h)),t.indexOf(h)===0)t=t.slice(h.length);else return s()}}if(t.length>0&&Di.test(t))return s();const b=u.map(h=>h.priority).sort((h,g)=>g-h).filter((h,g,P)=>P.indexOf(h)===g).map(h=>u.filter(g=>g.priority===h).sort((g,P)=>P.subPriority-g.subPriority)).map(h=>h[0]);let d=O(n,r?.in);if(isNaN(+d))return s();const w={};for(const h of b){if(!h.validate(d,l))return s();const g=h.set(d,w,l);Array.isArray(g)?(d=g[0],Object.assign(w,g[1])):d=g}return d}function ki(t){return t.match(Ei)[1].replace(Pi,"'")}const Ai=Object.freeze(Object.defineProperty({__proto__:null,afterDate:(t,e)=>No(t,e)?t:e,beforeDate:(t,e)=>So(t,e)?t:e,formatDate:(t,e="yyyy-MM-dd")=>Mo(t,e),parseDate:(t,e)=>Ri(t,e??"yyyy-MM-dd",new Date),relativeTime:(t,e)=>{const n=new Date,r=n>=t,o={...{direction:r?"전":"후",seconds:r?"방금":"잠시",minutes:"분",hours:"시간",days:"일",weeks:"주",months:"개월",years:"년"},...e},i=[{diffFunc:As,limit:60,label:o.minutes},{diffFunc:Rs,limit:24,label:o.hours},{diffFunc:Kt,limit:7,label:o.days},{diffFunc:Fs,limit:5,label:o.weeks},{diffFunc:Cs,limit:12,label:o.months},{diffFunc:Ls,limit:1/0,label:o.years}];for(const a of i){const f=Math.abs(a.diffFunc(n,t));if(f>=1&&f<a.limit)return`${f}${a.label} ${o.direction}`}return r?`${o.seconds} ${o.direction}`:`${o.seconds} ${o.direction}`},toISO:t=>ko(t),utcToKst:t=>new Date(t.getTime()+324e5)},Symbol.toStringTag,{value:"Module"}));q.FormatData=ce,q.dateUtils=Ai,q.filterParams=vt,q.handleError=hs,q.userAgent=gs,q.validate=Wn,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
|
|
5
|
+
`):" "+Ct(i[0]):"as no adapter specified";throw new b("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const Ft={getAdapter:us,adapters:Ie};function Ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new re(null,t)}function Lt(t){return Ye(t),t.headers=L.from(t.headers),t.data=Be.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ft.getAdapter(t.adapter||de.adapter,t)(t).then(function(r){return Ye(t),r.data=Be.call(t,t.transformResponse,r),r.headers=L.from(r.headers),r},function(r){return xt(r)||(Ye(t),r&&r.response&&(r.response.data=Be.call(t,t.transformResponse,r.response),r.response.headers=L.from(r.response.headers))),Promise.reject(r)})}const $t="1.13.2",Me={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Me[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ht={};Me.transitional=function(e,n,r){function s(o,i){return"[Axios v"+$t+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(e===!1)throw new b(s(i," has been removed"+(n?" in "+n:"")),b.ERR_DEPRECATED);return n&&!Ht[i]&&(Ht[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,i,a):!0}},Me.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function ls(t,e,n){if(typeof t!="object")throw new b("options must be an object",b.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=e[o];if(i){const a=t[o],f=a===void 0||i(a,o,t);if(f!==!0)throw new b("option "+o+" must be "+f,b.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new b("Unknown option "+o,b.ERR_BAD_OPTION)}}const Re={assertOptions:ls,validators:Me},v=Re.validators;let G=class{constructor(e){this.defaults=e||{},this.interceptors={request:new wt,response:new wt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=J(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Re.assertOptions(r,{silentJSONParsing:v.transitional(v.boolean),forcedJSONParsing:v.transitional(v.boolean),clarifyTimeoutError:v.transitional(v.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:Re.assertOptions(s,{encode:v.function,serialize:v.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Re.assertOptions(n,{baseUrl:v.spelling("baseURL"),withXsrfToken:v.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&c.merge(o.common,o[n.method]);o&&c.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=L.concat(i,o);const a=[];let f=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(f=f&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const l=[];this.interceptors.response.forEach(function(w){l.push(w.fulfilled,w.rejected)});let u,m=0,p;if(!f){const d=[Lt.bind(this),void 0];for(d.unshift(...a),d.push(...l),p=d.length,u=Promise.resolve(n);m<p;)u=u.then(d[m++],d[m++]);return u}p=a.length;let g=n;for(;m<p;){const d=a[m++],w=a[m++];try{g=d(g)}catch(h){w.call(this,h);break}}try{u=Lt.call(this,g)}catch(d){return Promise.reject(d)}for(m=0,p=l.length;m<p;)u=u.then(l[m++],l[m++]);return u}getUri(e){e=J(this.defaults,e);const n=Pt(e.baseURL,e.url,e.allowAbsoluteUrls);return pt(n,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){G.prototype[e]=function(n,r){return this.request(J(r||{},{method:e,url:n,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(e){function n(r){return function(o,i,a){return this.request(J(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}G.prototype[e]=n(),G.prototype[e+"Form"]=n(!0)});let fs=class On{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,a){r.reason||(r.reason=new re(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new On(function(s){e=s}),cancel:e}}};function ds(t){return function(n){return t.apply(null,n)}}function hs(t){return c.isObject(t)&&t.isAxiosError===!0}const We={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(We).forEach(([t,e])=>{We[e]=t});function qt(t){const e=new G(t),n=et(G.prototype.request,e);return c.extend(n,G.prototype,e,{allOwnKeys:!0}),c.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return qt(J(t,s))},n}const k=qt(de);k.Axios=G,k.CanceledError=re,k.CancelToken=fs,k.isCancel=xt,k.VERSION=$t,k.toFormData=Oe,k.AxiosError=b,k.Cancel=k.CanceledError,k.all=function(e){return Promise.all(e)},k.spread=ds,k.isAxiosError=hs,k.mergeConfig=J,k.AxiosHeaders=L,k.formToJSON=t=>gt(c.isHTMLForm(t)?new FormData(t):t),k.getAdapter=Ft.getAdapter,k.HttpStatusCode=We,k.default=k;const{Axios:vi,AxiosError:Bi,CanceledError:Ii,isCancel:Yi,CancelToken:Wi,VERSION:ji,all:Ui,Cancel:zi,isAxiosError:Qi,spread:Xi,toFormData:Vi,AxiosHeaders:Ji,HttpStatusCode:Gi,formToJSON:Ki,getAdapter:Zi,mergeConfig:ea}=k,ms=({error:t,message:e="알 수 없는 에러가 발생했습니다.",callback:n})=>k.isAxiosError(t)?(n?.(),{type:"axios",message:t.response?.data?.message??e,status:t.response?.status}):t instanceof Error?(n?.(),{type:"client",message:t.message||e}):(n?.(),{type:"unknown",message:e}),vt=(t,e={})=>{const{removeUndefined:n=!0,removeNull:r=!0,removeEmptyString:s=!0,removeEmptyArray:o=!0,removeEmptyObject:i=!0,normalizeNumbers:a=!1,normalizeBooleans:f=!1,normalizeNested:l=!1}=e,u=p=>{switch(!0){case(n&&p===void 0):return!0;case(r&&p===null):return!0;case(s&&p===""):return!0;case(o&&Array.isArray(p)&&p.length===0):return!0;case(i&&typeof p=="object"&&p!==null&&!Array.isArray(p)&&Object.keys(p).length===0):return!0;default:return!1}},m=p=>{if(typeof p=="object"&&p!==null){if(Array.isArray(p))return l?p.map(g=>m(g)).filter(g=>!u(g)):p;if(typeof p=="object")return l?vt(p,e):p}if(typeof p=="string"){const g=p.trim();if(f){const d=g.toLowerCase();if(d==="true")return!0;if(d==="false")return!1}return g}return a&&typeof p=="number"?String(p):p};return Object.fromEntries(Object.entries(t).map(([p,g])=>[p,m(g)]).filter(([,p])=>!u(p)))};function j(){return typeof window>"u"||"Deno"in globalThis}function ps(){return!j()}function Bt(){return j()?!1:/ipad|iphone/i.test(navigator.userAgent)}function It(){return j()?!1:/Macintosh|MacIntel|MacPPC|Mac68K/.test(navigator.platform)}function Yt(){return j()?!1:/Android/i.test(navigator.userAgent)}function ws(){return j()?!1:/MSIE|Trident/i.test(navigator.userAgent)}function Wt(){return j()?!1:/KAKAOTALK/i.test(navigator.userAgent)}function je(){return j()?!1:Bt()?"ios":Yt()?"android":"web"}function ys(){const t=je();return t==="ios"||t==="android"}function gs(){if(j())return"server";if(Wt())return"kakao";const t=je();return t==="ios"||t==="android"?t:It()?"macos":"web"}const bs={isServer:j,isClient:ps,isIOS:Bt,isAndroid:Yt,isMacOS:It,isIE:ws,isKakaoWebView:Wt,isMobileWeb:ys,getOSByUserAgent:je,getPlatform:gs},jt=6048e5,xs=864e5,Ut=6e4,zt=36e5,Ts=1e3,Qt=Symbol.for("constructDateFrom");function N(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Qt in t?t[Qt](e):t instanceof Date?new t.constructor(e):new Date(e)}function T(t,e){return N(e||t,t)}function Xt(t,e,n){const r=T(t,n?.in);return isNaN(e)?N(n?.in||t,NaN):(e&&r.setDate(r.getDate()+e),r)}let Os={};function se(){return Os}function U(t,e){const n=se(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=T(t,e?.in),o=s.getDay(),i=(o<r?7:0)+o-r;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function oe(t,e){return U(t,{...e,weekStartsOn:1})}function Vt(t,e){const n=T(t,e?.in),r=n.getFullYear(),s=N(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const o=oe(s),i=N(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=oe(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function ke(t){const e=T(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function K(t,...e){const n=N.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function Jt(t,e){const n=T(t,e?.in);return n.setHours(0,0,0,0),n}function Gt(t,e,n){const[r,s]=K(n?.in,t,e),o=Jt(r),i=Jt(s),a=+o-ke(o),f=+i-ke(i);return Math.round((a-f)/xs)}function Es(t,e){const n=Vt(t,e),r=N(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),oe(r)}function me(t,e){const n=+T(t)-+T(e);return n<0?-1:n>0?1:n}function Ps(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Ds(t){return!(!Ps(t)&&typeof t!="number"||isNaN(+T(t)))}function Ms(t,e,n){const[r,s]=K(n?.in,t,e),o=r.getFullYear()-s.getFullYear(),i=r.getMonth()-s.getMonth();return o*12+i}function Rs(t,e,n){const[r,s]=K(n?.in,t,e);return r.getFullYear()-s.getFullYear()}function Kt(t,e,n){const[r,s]=K(n?.in,t,e),o=Zt(r,s),i=Math.abs(Gt(r,s));r.setDate(r.getDate()-o*i);const a=+(Zt(r,s)===-o),f=o*(i-a);return f===0?0:f}function Zt(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function Ue(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function ks(t,e,n){const[r,s]=K(n?.in,t,e),o=(+r-+s)/zt;return Ue(n?.roundingMethod)(o)}function As(t,e){return+T(t)-+T(e)}function Ss(t,e,n){const r=As(t,e)/Ut;return Ue(n?.roundingMethod)(r)}function _s(t,e){const n=T(t,e?.in);return n.setHours(23,59,59,999),n}function Ns(t,e){const n=T(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Cs(t,e){const n=T(t,e?.in);return+_s(n,e)==+Ns(n,e)}function Fs(t,e,n){const[r,s,o]=K(n?.in,t,t,e),i=me(s,o),a=Math.abs(Ms(s,o));if(a<1)return 0;s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-i*a);let f=me(s,o)===-i;Cs(r)&&a===1&&me(r,o)===1&&(f=!1);const l=i*(a-+f);return l===0?0:l}function Ls(t,e,n){const r=Kt(t,e,n)/7;return Ue(n?.roundingMethod)(r)}function $s(t,e,n){const[r,s]=K(n?.in,t,e),o=me(r,s),i=Math.abs(Rs(r,s));r.setFullYear(1584),s.setFullYear(1584);const a=me(r,s)===-o,f=o*(i-+a);return f===0?0:f}function Hs(t,e){const n=T(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const qs={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"}},vs=(t,e,n)=>{let r;const s=qs[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ze(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Bs={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Is={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ys={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ws={date:ze({formats:Bs,defaultWidth:"full"}),time:ze({formats:Is,defaultWidth:"full"}),dateTime:ze({formats:Ys,defaultWidth:"full"})},js={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Us=(t,e,n,r)=>js[t];function pe(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const zs={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qs={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xs={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"]},Vs={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"]},Js={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"}},Gs={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"}},Ks={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:pe({values:zs,defaultWidth:"wide"}),quarter:pe({values:Qs,defaultWidth:"wide",argumentCallback:t=>t-1}),month:pe({values:Xs,defaultWidth:"wide"}),day:pe({values:Vs,defaultWidth:"wide"}),dayPeriod:pe({values:Js,defaultWidth:"wide",formattingValues:Gs,defaultFormattingWidth:"wide"})};function we(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(a)?eo(a,m=>m.test(i)):Zs(a,m=>m.test(i));let l;l=t.valueCallback?t.valueCallback(f):f,l=n.valueCallback?n.valueCallback(l):l;const u=e.slice(i.length);return{value:l,rest:u}}}function Zs(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function eo(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function to(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const no=/^(\d+)(th|st|nd|rd)?/i,ro=/\d+/i,so={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},oo={any:[/^b/i,/^(a|c)/i]},io={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ao={any:[/1/i,/2/i,/3/i,/4/i]},co={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},uo={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]},lo={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},fo={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]},ho={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},mo={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}},po={ordinalNumber:to({matchPattern:no,parsePattern:ro,valueCallback:t=>parseInt(t,10)}),era:we({matchPatterns:so,defaultMatchWidth:"wide",parsePatterns:oo,defaultParseWidth:"any"}),quarter:we({matchPatterns:io,defaultMatchWidth:"wide",parsePatterns:ao,defaultParseWidth:"any",valueCallback:t=>t+1}),month:we({matchPatterns:co,defaultMatchWidth:"wide",parsePatterns:uo,defaultParseWidth:"any"}),day:we({matchPatterns:lo,defaultMatchWidth:"wide",parsePatterns:fo,defaultParseWidth:"any"}),dayPeriod:we({matchPatterns:ho,defaultMatchWidth:"any",parsePatterns:mo,defaultParseWidth:"any"})},en={code:"en-US",formatDistance:vs,formatLong:Ws,formatRelative:Us,localize:Ks,match:po,options:{weekStartsOn:0,firstWeekContainsDate:1}};function wo(t,e){const n=T(t,e?.in);return Gt(n,Hs(n))+1}function tn(t,e){const n=T(t,e?.in),r=+oe(n)-+Es(n);return Math.round(r/jt)+1}function Qe(t,e){const n=T(t,e?.in),r=n.getFullYear(),s=se(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=N(e?.in||t,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const a=U(i,e),f=N(e?.in||t,0);f.setFullYear(r,0,o),f.setHours(0,0,0,0);const l=U(f,e);return+n>=+a?r+1:+n>=+l?r:r-1}function yo(t,e){const n=se(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=Qe(t,e),o=N(e?.in||t,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),U(o,e)}function nn(t,e){const n=T(t,e?.in),r=+U(n,e)-+yo(n,e);return Math.round(r/jt)+1}function x(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const z={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return x(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):x(n+1,2)},d(t,e){return x(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return x(t.getHours()%12||12,e.length)},H(t,e){return x(t.getHours(),e.length)},m(t,e){return x(t.getMinutes(),e.length)},s(t,e){return x(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return x(s,e.length)}},ie={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},rn={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return z.y(t,e)},Y:function(t,e,n,r){const s=Qe(t,r),o=s>0?s:1-s;if(e==="YY"){const i=o%100;return x(i,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):x(o,e.length)},R:function(t,e){const n=Vt(t);return x(n,e.length)},u:function(t,e){const n=t.getFullYear();return x(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return x(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return x(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return z.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return x(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=nn(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):x(s,e.length)},I:function(t,e,n){const r=tn(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):x(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):z.d(t,e)},D:function(t,e,n){const r=wo(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):x(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return x(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return x(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return x(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=ie.noon:r===0?s=ie.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=ie.evening:r>=12?s=ie.afternoon:r>=4?s=ie.morning:s=ie.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return z.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):z.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):x(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):x(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):z.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):z.s(t,e)},S:function(t,e){return z.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return on(r);case"XXXX":case"XX":return Z(r);case"XXXXX":case"XXX":default:return Z(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return on(r);case"xxxx":case"xx":return Z(r);case"xxxxx":case"xxx":default:return Z(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sn(r,":");case"OOOO":default:return"GMT"+Z(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sn(r,":");case"zzzz":default:return"GMT"+Z(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return x(r,e.length)},T:function(t,e,n){return x(+t,e.length)}};function sn(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+e+x(o,2)}function on(t,e){return t%60===0?(t>0?"-":"+")+x(Math.abs(t)/60,2):Z(t,e)}function Z(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=x(Math.trunc(r/60),2),o=x(r%60,2);return n+s+e+o}const an=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},cn=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Xe={p:cn,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return an(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",an(r,e)).replace("{{time}}",cn(s,e))}},go=/^D+$/,bo=/^Y+$/,xo=["D","DD","YY","YYYY"];function un(t){return go.test(t)}function ln(t){return bo.test(t)}function Ve(t,e,n){const r=To(t,e,n);if(console.warn(r),xo.includes(t))throw new RangeError(r)}function To(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Oo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Eo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Po=/^'([^]*?)'?$/,Do=/''/g,Mo=/[a-zA-Z]/;function Ro(t,e,n){const r=se(),s=r.locale??en,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=T(t,n?.in);if(!Ds(a))throw new RangeError("Invalid time value");let f=e.match(Eo).map(u=>{const m=u[0];if(m==="p"||m==="P"){const p=Xe[m];return p(u,s.formatLong)}return u}).join("").match(Oo).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const m=u[0];if(m==="'")return{isToken:!1,value:ko(u)};if(rn[m])return{isToken:!0,value:u};if(m.match(Mo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:u}});s.localize.preprocessor&&(f=s.localize.preprocessor(a,f));const l={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return f.map(u=>{if(!u.isToken)return u.value;const m=u.value;(ln(m)||un(m))&&Ve(m,e,String(t));const p=rn[m[0]];return p(a,m,s.localize,l)}).join("")}function ko(t){const e=t.match(Po);return e?e[1].replace(Do,"'"):t}function Ao(t,e){const n=T(t,e?.in);if(isNaN(+n))throw new RangeError("Invalid time value");let r="",s="";const o="-",i=":";{const a=x(n.getDate(),2),f=x(n.getMonth()+1,2);r=`${x(n.getFullYear(),4)}${o}${f}${o}${a}`}{const a=n.getTimezoneOffset();if(a!==0){const g=Math.abs(a),d=x(Math.trunc(g/60),2),w=x(g%60,2);s=`${a<0?"+":"-"}${d}:${w}`}else s="Z";const f=x(n.getHours(),2),l=x(n.getMinutes(),2),u=x(n.getSeconds(),2),m=r===""?"":"T",p=[f,l,u].join(i);r=`${r}${m}${p}${s}`}return r}function So(){return Object.assign({},se())}function _o(t,e){const n=T(t,e?.in).getDay();return n===0?7:n}function No(t,e){return+T(t)>+T(e)}function Co(t,e){return+T(t)<+T(e)}function Fo(t,e){const n=Lo(e)?new e(0):N(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function Lo(t){return typeof t=="function"&&t.prototype?.constructor===t}const $o=10;class fn{subPriority=0;validate(e,n){return!0}}class Ho extends fn{constructor(e,n,r,s,o){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=s,o&&(this.subPriority=o)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}}class qo extends fn{priority=$o;subPriority=-1;constructor(e,n){super(),this.context=e||(r=>N(n,r))}set(e,n){return n.timestampIsSet?e:N(e,Fo(e,this.context))}}class O{run(e,n,r,s){const o=this.parse(e,n,r,s);return o?{setter:new Ho(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,n,r){return!0}}class vo extends O{priority=140;parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const A={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}/},B={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 S(t,e){return t&&{value:e(t.value),rest:t.rest}}function M(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function I(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(s*zt+o*Ut+i*Ts),rest:e.slice(n[0].length)}}function dn(t){return M(A.anyDigitsSigned,t)}function R(t,e){switch(t){case 1:return M(A.singleDigit,e);case 2:return M(A.twoDigits,e);case 3:return M(A.threeDigits,e);case 4:return M(A.fourDigits,e);default:return M(new RegExp("^\\d{1,"+t+"}"),e)}}function Ae(t,e){switch(t){case 1:return M(A.singleDigitSigned,e);case 2:return M(A.twoDigitsSigned,e);case 3:return M(A.threeDigitsSigned,e);case 4:return M(A.fourDigitsSigned,e);default:return M(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Je(t){switch(t){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 hn(t,e){const n=e>0,r=n?e:1-e;let s;if(r<=50)s=t||100;else{const o=r+50,i=Math.trunc(o/100)*100,a=t>=o%100;s=t+i-(a?100:0)}return n?s:1-s}function mn(t){return t%400===0||t%4===0&&t%100!==0}class Bo extends O{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return S(R(4,e),s);case"yo":return S(r.ordinalNumber(e,{unit:"year"}),s);default:return S(R(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const s=e.getFullYear();if(r.isTwoDigitYear){const i=hn(r.year,s);return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}const o=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Io extends O{priority=130;parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return S(R(4,e),s);case"Yo":return S(r.ordinalNumber(e,{unit:"year"}),s);default:return S(R(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,s){const o=Qe(e,s);if(r.isTwoDigitYear){const a=hn(r.year,o);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),U(e,s)}const i=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(i,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),U(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Yo extends O{priority=130;parse(e,n){return Ae(n==="R"?4:n.length,e)}set(e,n,r){const s=N(e,0);return s.setFullYear(r,0,4),s.setHours(0,0,0,0),oe(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Wo extends O{priority=130;parse(e,n){return Ae(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class jo extends O{priority=120;parse(e,n,r){switch(n){case"Q":case"QQ":return R(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class Uo extends O{priority=120;parse(e,n,r){switch(n){case"q":case"qq":return R(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class zo extends O{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"M":return S(M(A.month,e),s);case"MM":return S(R(2,e),s);case"Mo":return S(r.ordinalNumber(e,{unit:"month"}),s);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class Qo extends O{priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"L":return S(M(A.month,e),s);case"LL":return S(R(2,e),s);case"Lo":return S(r.ordinalNumber(e,{unit:"month"}),s);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Xo(t,e,n){const r=T(t,n?.in),s=nn(r,n)-e;return r.setDate(r.getDate()-s*7),T(r,n?.in)}class Vo extends O{priority=100;parse(e,n,r){switch(n){case"w":return M(A.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return R(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,s){return U(Xo(e,r,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Jo(t,e,n){const r=T(t,n?.in),s=tn(r,n)-e;return r.setDate(r.getDate()-s*7),r}class Go extends O{priority=100;parse(e,n,r){switch(n){case"I":return M(A.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return R(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return oe(Jo(e,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Ko=[31,28,31,30,31,30,31,31,30,31,30,31],Zo=[31,29,31,30,31,30,31,31,30,31,30,31];class ei extends O{priority=90;subPriority=1;parse(e,n,r){switch(n){case"d":return M(A.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return R(n.length,e)}}validate(e,n){const r=e.getFullYear(),s=mn(r),o=e.getMonth();return s?n>=1&&n<=Zo[o]:n>=1&&n<=Ko[o]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class ti extends O{priority=90;subpriority=1;parse(e,n,r){switch(n){case"D":case"DD":return M(A.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return R(n.length,e)}}validate(e,n){const r=e.getFullYear();return mn(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Ge(t,e,n){const r=se(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=T(t,n?.in),i=o.getDay(),f=(e%7+7)%7,l=7-s,u=e<0||e>6?e-(i+l)%7:(f+l)%7-(i+l)%7;return Xt(o,u,n)}class ni extends O{priority=90;parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=Ge(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class ri extends O{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return S(R(n.length,e),o);case"eo":return S(r.ordinalNumber(e,{unit:"day"}),o);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=Ge(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class si extends O{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return S(R(n.length,e),o);case"co":return S(r.ordinalNumber(e,{unit:"day"}),o);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=Ge(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function oi(t,e,n){const r=T(t,n?.in),s=_o(r,n),o=e-s;return Xt(r,o,n)}class ii extends O{priority=90;parse(e,n,r){const s=o=>o===0?7:o;switch(n){case"i":case"ii":return R(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return S(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return S(r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return S(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return S(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=oi(e,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class ai extends O{priority=80;parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(Je(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class ci extends O{priority=80;parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(Je(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class ui extends O{priority=80;parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(Je(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class li extends O{priority=70;parse(e,n,r){switch(n){case"h":return M(A.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return R(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const s=e.getHours()>=12;return s&&r<12?e.setHours(r+12,0,0,0):!s&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class fi extends O{priority=70;parse(e,n,r){switch(n){case"H":return M(A.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return R(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class di extends O{priority=70;parse(e,n,r){switch(n){case"K":return M(A.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return R(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class hi extends O{priority=70;parse(e,n,r){switch(n){case"k":return M(A.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return R(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const s=r<=24?r%24:r;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class mi extends O{priority=60;parse(e,n,r){switch(n){case"m":return M(A.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return R(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]}class pi extends O{priority=50;parse(e,n,r){switch(n){case"s":return M(A.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return R(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]}class wi extends O{priority=30;parse(e,n){const r=s=>Math.trunc(s*Math.pow(10,-n.length+3));return S(R(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]}class yi extends O{priority=10;parse(e,n){switch(n){case"X":return I(B.basicOptionalMinutes,e);case"XX":return I(B.basic,e);case"XXXX":return I(B.basicOptionalSeconds,e);case"XXXXX":return I(B.extendedOptionalSeconds,e);case"XXX":default:return I(B.extended,e)}}set(e,n,r){return n.timestampIsSet?e:N(e,e.getTime()-ke(e)-r)}incompatibleTokens=["t","T","x"]}class gi extends O{priority=10;parse(e,n){switch(n){case"x":return I(B.basicOptionalMinutes,e);case"xx":return I(B.basic,e);case"xxxx":return I(B.basicOptionalSeconds,e);case"xxxxx":return I(B.extendedOptionalSeconds,e);case"xxx":default:return I(B.extended,e)}}set(e,n,r){return n.timestampIsSet?e:N(e,e.getTime()-ke(e)-r)}incompatibleTokens=["t","T","X"]}class bi extends O{priority=40;parse(e){return dn(e)}set(e,n,r){return[N(e,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class xi extends O{priority=20;parse(e){return dn(e)}set(e,n,r){return[N(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const Ti={G:new vo,y:new Bo,Y:new Io,R:new Yo,u:new Wo,Q:new jo,q:new Uo,M:new zo,L:new Qo,w:new Vo,I:new Go,d:new ei,D:new ti,E:new ni,e:new ri,c:new si,i:new ii,a:new ai,b:new ci,B:new ui,h:new li,H:new fi,K:new di,k:new hi,m:new mi,s:new pi,S:new wi,X:new yi,x:new gi,t:new bi,T:new xi},Oi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ei=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pi=/^'([^]*?)'?$/,Di=/''/g,Mi=/\S/,Ri=/[a-zA-Z]/;function ki(t,e,n,r){const s=()=>N(n,NaN),o=So(),i=o.locale??en,a=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,f=o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!e)return t?s():T(n,r?.in);const l={firstWeekContainsDate:a,weekStartsOn:f,locale:i},u=[new qo(r?.in,n)],m=e.match(Ei).map(h=>{const y=h[0];if(y in Xe){const P=Xe[y];return P(h,i.formatLong)}return h}).join("").match(Oi),p=[];for(let h of m){ln(h)&&Ve(h,e,t),un(h)&&Ve(h,e,t);const y=h[0],P=Ti[y];if(P){const{incompatibleTokens:E}=P;if(Array.isArray(E)){const _=p.find(Y=>E.includes(Y.token)||Y.token===y);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${h}\` at the same time`)}else if(P.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);p.push({token:y,fullToken:h});const D=P.run(t,h,i.match,l);if(!D)return s();u.push(D.setter),t=D.rest}else{if(y.match(Ri))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(h==="''"?h="'":y==="'"&&(h=Ai(h)),t.indexOf(h)===0)t=t.slice(h.length);else return s()}}if(t.length>0&&Mi.test(t))return s();const g=u.map(h=>h.priority).sort((h,y)=>y-h).filter((h,y,P)=>P.indexOf(h)===y).map(h=>u.filter(y=>y.priority===h).sort((y,P)=>P.subPriority-y.subPriority)).map(h=>h[0]);let d=T(n,r?.in);if(isNaN(+d))return s();const w={};for(const h of g){if(!h.validate(d,l))return s();const y=h.set(d,w,l);Array.isArray(y)?(d=y[0],Object.assign(w,y[1])):d=y}return d}function Ai(t){return t.match(Pi)[1].replace(Di,"'")}const Si=t=>new Date(t.getTime()+324e5),pn=(t,e="yyyy-MM-dd")=>{const n=typeof t=="string"?new Date(t):t;if(isNaN(n.getTime()))throw new Error("올바른 날짜 형식이 아닙니다.");return Ro(n,e)},_i=Object.freeze(Object.defineProperty({__proto__:null,afterDate:(t,e)=>No(t,e)?t:e,beforeDate:(t,e)=>Co(t,e)?t:e,formatDate:pn,formatToCustomKoreanTime:(t,e={})=>{const{use12Hour:n=!0,showPeriod:r=!0,showSeconds:s=!1,includeDate:o=!1,includeWeekday:i=!1,timeSeparator:a=":",dateFormat:f="yyyy-MM-dd",dateTimeSeparator:l=" ",padHours:u=!0,periodLabels:m={am:"오전",pm:"오후"},weekdayLabels:p=["일","월","화","수","목","금","토"]}=e,g=typeof t=="string"?new Date(t):t;if(isNaN(g.getTime()))throw new Error("올바른 날짜 형식이 아닙니다.");const d=g.getHours(),w=g.getMinutes(),h=g.getSeconds();let y="";if(n){const E=d<12?m.am:m.pm,D=d%12||12,_=u?D.toString().padStart(2,"0"):D.toString();y=r?`${E} ${_}`:_}else y=u?d.toString().padStart(2,"0"):d.toString();const P=w.toString().padStart(2,"0");if(y+=`${a}${P}`,s){const E=h.toString().padStart(2,"0");y+=`${a}${E}`}if(o){let D=pn(g,f);if(i){const _=p[g.getDay()];D+=` (${_})`}return`${D}${l}${y}`}return y},parseDate:(t,e)=>ki(t,e??"yyyy-MM-dd",new Date),relativeTime:(t,e)=>{const n=new Date,r=n>=t,o={...{direction:r?"전":"후",seconds:r?"방금":"잠시",minutes:"분",hours:"시간",days:"일",weeks:"주",months:"개월",years:"년"},...e},i=[{diffFunc:Ss,limit:60,label:o.minutes},{diffFunc:ks,limit:24,label:o.hours},{diffFunc:Kt,limit:7,label:o.days},{diffFunc:Ls,limit:5,label:o.weeks},{diffFunc:Fs,limit:12,label:o.months},{diffFunc:$s,limit:1/0,label:o.years}];for(const a of i){const f=Math.abs(a.diffFunc(n,t));if(f>=1&&f<a.limit)return`${f}${a.label} ${o.direction}`}return r?`${o.seconds} ${o.direction}`:`${o.seconds} ${o.direction}`},toISO:t=>Ao(t),utcToKst:Si},Symbol.toStringTag,{value:"Module"}));H.FormatData=ce,H.dateUtils=_i,H.filterParams=vt,H.handleError=ms,H.userAgent=bs,H.validate=jn,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { FormatTimeOptions } from './type';
|
|
1
2
|
/** utc -> kst 시간 변환 함수 */
|
|
2
3
|
export declare const utcToKst: (utcDate: Date) => Date;
|
|
3
4
|
/** 날짜 형식 변환 함수 ( ex: yyyy-MM-dd ) */
|
|
4
|
-
export declare const formatDate: (date: Date, pattern?: string) => string;
|
|
5
|
+
export declare const formatDate: (date: Date | string, pattern?: string) => string;
|
|
5
6
|
/** 날짜 ISO 형식 변환 함수 */
|
|
6
7
|
export declare const toISO: (date: Date) => string;
|
|
7
8
|
/** 날짜 파싱 함수 */
|
|
@@ -12,3 +13,4 @@ export declare const beforeDate: (firstDate: Date, secondDate: Date) => Date;
|
|
|
12
13
|
export declare const afterDate: (firstDate: Date, secondDate: Date) => Date;
|
|
13
14
|
/** 현재 시간을 기준으로 상대 시간 반환 함수 */
|
|
14
15
|
export declare const relativeTime: (date: Date, labels?: Partial<Record<"direction" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years", string>>) => string;
|
|
16
|
+
export declare const formatToCustomKoreanTime: (isoString: Date | string, options?: FormatTimeOptions) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface FormatTimeOptions {
|
|
2
|
+
use12Hour?: boolean;
|
|
3
|
+
showPeriod?: boolean;
|
|
4
|
+
showSeconds?: boolean;
|
|
5
|
+
includeDate?: boolean;
|
|
6
|
+
includeWeekday?: boolean;
|
|
7
|
+
timeSeparator?: string;
|
|
8
|
+
dateFormat?: string;
|
|
9
|
+
dateTimeSeparator?: string;
|
|
10
|
+
padHours?: boolean;
|
|
11
|
+
periodLabels?: {
|
|
12
|
+
am?: string;
|
|
13
|
+
pm?: string;
|
|
14
|
+
};
|
|
15
|
+
weekdayLabels?: string[];
|
|
16
|
+
}
|