Files
2026-01-30 23:31:00 -06:00

2 lines
18 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var e;if("undefined"!=typeof navigator){const t=navigator;e=Array.isArray(t.languages)?t.languages[0]:t.language}else if("undefined"!=typeof process){const t=process.env;e=t.LC_ALL||t.LC_MESSAGES||t.LANG||t.LANGUAGE}var t=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch(e){return"en-US"}}(e||"en-US"),n=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},o={};for(let e=1;e<100;e++){o[(e<=9?"0":"")+e]=e+(e>51?1900:2e3)}var a=o,r={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},s="[1234567890一二三四五六七八九〇\\d]",i={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"":0,"":1,"":2,"":3,"":4,"":5,"":6,"":7,"":8,"":9,"":0,"一":1,"二":2,"三":3,"四":4,"五":5,"六":6,"七":7,"八":8,"九":9},m={};var l={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},d={zone:l,year:a,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},T={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(l).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[±−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},u={...T,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[±−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},c={},h=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(n=t){return c[n.toLowerCase()]||(c[n.toLowerCase()]=new e(n)),c[n.toLowerCase()]}constructor(e=t){this.locale=e,this.lookups={...d},this.vars={...T};const n=new Intl.NumberFormat(this.locale);this.numberingSystem=n.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){const t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;const t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;const t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;const n=this.lookups.meridiem[t?.toLowerCase()]||0;let o=this.toInt(e);return o<12&&12===n&&(o+=12),12===o&&0===n&&(o=0),o}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;const t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){const[,e,n,o]=t;return("-"===e||""===e?-1:1)*(60*this.toInt(n)+this.toInt(o||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=i:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){const{group:e,lookup:t}=function(e){if(m[e])return m[e];if("fullwide"===e||"hanidec"===e)return{group:s,lookup:{...i}};const t=r[e];if(!t)return{group:"\\d",lookup:{...i}};const n=String.fromCharCode(t),o=String.fromCharCode(t+9),a={};for(let e=0;e<10;e++)a[String.fromCharCode(t+e)]=e;return m[e]={group:`[${n}-${o}]`,lookup:a},m[e]}(this.numberingSystem);this.lookups.digit=t;for(const t in u)u.hasOwnProperty(t)&&(this.vars[t]=u[t].replace(/\*/g,e))}buildMonthNames(){const e={},t={};if(/^fi/i.test(this.locale)){"tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu".split("|").forEach(((n,o)=>{["","k","kuu","kuuta"].forEach(((a,r)=>{e[n+a+(r<2?"\\.?":"")]=!0,t[n+a]=o+1}))}))}else{const n=[],o=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));const a=["full","long","medium"];for(const r of a){const a=Intl.DateTimeFormat(this.locale,{dateStyle:r});for(let s=0;s<12;s++){let i=a.formatToParts(n[s]).find(o).value.toLocaleLowerCase(this.locale);/^\d+$/.test(i)||(/^ko/i.test(this.locale)&&(i+="월"),"medium"===r?(i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0):e[i]=!0,t[i]=s+1)}}const r=Intl.DateTimeFormat(this.locale,{month:"short"});for(let a=0;a<12;a++){let s=r.formatToParts(n[a]).find(o).value.toLocaleLowerCase(this.locale);s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0,t[s]=a+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){const e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));const n=["long","short"],o=[],a={};for(const r of n){const n=Intl.DateTimeFormat(this.locale,{weekday:r});for(let s=0;s<7;s++){let i=n.formatToParts(e[s]).find(t).value.toLocaleLowerCase(this.locale);"short"===r?(i=i.replace(/\.$/,""),o.push(`${i}\\.?`)):o.push(i),a[i]=s}}this.vars.DAYNAME=o.join("|"),this.lookups.dayname=a}buildMeridiems(){const e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],o={},a=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let r=0;r<2;r++){const s=a.formatToParts(e[r]).find(t);if(!s)return;const i=s.value.toLocaleLowerCase(this.locale);n.push(i),o[i]=12*r}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=o}compile(e){const t=e.replace(/_([A-Z0-9]+)_/g,((e,t)=>{if(!this.vars[t])throw new Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}));return new RegExp(t,"i")}},_=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],f={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},y={now:()=>new Date};function g(e){return function(t){const n={};for(let o=0,a=e.length;o<a;o++){const a=e[o];a&&(n[a]=t[o])}return n}}function p(e){const t=[{name:"timestampWithOffset",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:g(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:g(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:e.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:g(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:e.compile(`^(${s}{2,4})\\s*年\\s*(${s}{1,2})\\s*月\\s*(${s}{1,2})\\s*日$`),handler:g(["","year","month","day"])},{name:"korean",regex:e.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:g(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:g(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){const t=y.now(),n=864e5,o=e[0].toLowerCase(),a={now:0,today:0,tomorrow:n,yesterday:-1*n}[o];0!==a&&t.setTime(t.getTime()+a);const r={year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};return"now"===o?{...r,hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisecond:t.getMilliseconds()}:r}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,n,o]){t=parseFloat(t),"week"===(n=n.length<=2?f[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||o)&&(t*=-1);const a=y.now();return"millisecond"===n?a.setUTCMilliseconds(a.getUTCMilliseconds()+t):"second"===n?a.setUTCSeconds(a.getUTCSeconds()+t):"minute"===n?a.setUTCMinutes(a.getUTCMinutes()+t):"hour"===n?a.setUTCHours(a.getUTCHours()+t):"day"===n?a.setUTCDate(a.getUTCDate()+t):"month"===n?a.setUTCMonth(a.getUTCMonth()+t):"year"===n&&a.setUTCFullYear(a.getUTCFullYear()+t),{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){const t=parseInt(e[1],10),n=new Date(1e3*t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){const t=parseInt(e[1],10),n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:e.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:g(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:e.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:g(["","hour","minute","second","millisecond","zone"])},{name:"hms12WithOffset",regex:e.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)\\s*(_OFFSET_)"),handler:g(["","hour","minute","second","meridiem","offset"])},{name:"hms12",regex:e.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:g(["","hour","minute","second","meridiem"])},{name:"hms24",regex:e.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:g(["","hour","minute","second","millisecond"])},{name:"hm12",regex:e.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:g(["","hour","minute","meridiem"])},{name:"hm24",regex:e.compile("(_H24_):(_MIN_)"),handler:g(["","hour","minute"])},{name:"h12",regex:e.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:g(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:g(["","year","month","day"])},{name:"yearMonthnameDay",regex:e.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:g(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:e.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:g(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:e.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:g(["","monthname","day","","year"])},{name:"dayMonthname",regex:e.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:g(["","day","","monthname"])},{name:"monthnameDay",regex:e.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:g(["","monthname","day"])},{name:"hmsNoMeridiem",regex:e.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:g(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:e.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:g(["","hour","minute"])},{name:"ymd",regex:e.compile("(_YEAR4_)([./-])(_MONTH_)\\2+(_DAY_)"),handler:g(["","year","","month","day"])},{name:"mdy",regex:e.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:g(["","month","","day","year"])},{name:"dmy",regex:e.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:g(["","day","month","year"])},{name:"yearLoose",regex:e.compile("_YEAR4_"),handler:g(["year"])},{name:"dayMonthnameLoose",regex:e.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:g(["","day","monthname"])},{name:"monthnameDayLoose",regex:e.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:g(["","monthname","day"])},{name:"monthname",regex:e.compile("_MONTHNAME_"),handler:g(["monthname"])},{name:"year4",regex:e.compile("_YEAR4_"),handler:g(["year"])},{name:"md",regex:e.compile("(_MONTH_)[/-](_DAY_)"),handler:g(["","month","day"])},{name:"dm",regex:e.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:g(["","day","month"])},{name:"day",regex:e.compile("_DAY_"),handler:g(["day"])},{name:"year2",regex:e.compile("_YEAR2_"),handler:g(["year"])},{name:"onlyZone",regex:e.compile("_ZONE_"),handler:g(["zone"])},{name:"onlyOffset",regex:e.compile("_OFFSET_"),handler:g(["offset"])}],n=e.baseName.slice(0,5);return _.includes(n)?t:t.filter((e=>!["mdy","md"].includes(e.name)))}var M=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:o}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=o}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim();const n={};let o=!1;for(const e of this.patterns){const a=t.match(e.regex);if(!a)continue;o=!0;const r=e.handler(a);if(r){for(const[e,t]of Object.entries(r))e in n||void 0===t||(n[e]=t);if(t=t.slice(0,a.index)+t.slice(a.index+a[0].length+1),t=t.trim(),this.doneChecker(n,t))break}}return o?this.formatter(n):this.fallback(e)}},A=["year","month","day","hour","minute","second","millisecond","offset"],S={};function E(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}function C(e){return function(t){let n=String(t).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${e}"`}}}function D(e){return function(t){const n={};for(const[o,a]of Object.entries(t))if("monthname"===o){if(a){const t=e.monthNameToInt(a);void 0!==t&&(n.month=t)}}else if("hour"===o&&t.meridiem){const o=e.h12ToInt(a,t.meridiem);void 0!==o&&(n.hour=o)}else if("zone"===o){if(a){const t=e.zoneToOffset(a);void 0!==t&&(n.offset=t)}}else if("offset"===o){const t=e.offsetToMinutes(a);void 0!==t&&(n.offset=t)}else if("millisecond"===o){const t=e.millisecondToInt(a);"number"==typeof t&&(n.millisecond=t)}else if(A.includes(o)){const t=e.toInt(a);"number"==typeof t&&(n[o]=t)}return n.year<100&&(n.year=a[n.year]),n.year&&"buddhist"===e.dateOptions.calendar&&(n.year-=543),n}}var N=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],O={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...N],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:N,id:N,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function I(e,n=t){const o=function(e){if(!S[e]){const t=h.factory(e);S[e]=new M({doneChecker:E,fallback:C(e),patterns:p(t),formatter:D(t)})}return S[e]}(n),a=function(e,t){const n=t.slice(0,2).toLowerCase(),o=O[n];if(!o)return e;for(const[t,n]of o)e=e.replace(t,n);return e}(e,n);return o.attempt(a)}function b(e){e.month&&e.day&&void 0===e.year&&(e.year=(new Date).getFullYear()),60===e.second&&(e.second=59);const t=new n(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new n(t.valueOf()-60*e.offset*1e3):t}function H(e,o=t){const a=I(e,o),r=a.invalid?new n(NaN):b(a);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function w(e,o=t){return e instanceof Date?new n(e.valueOf()):"number"==typeof e?new n(e):H(e,o)}Date.fromString=n.fromString=H,Date.fromAny=n.fromAny=w;var Y={fromString:H,fromAny:w,fromObject:b,attempt:I};"undefined"!=typeof window&&(window.anyDateParser=Y);var $=Y;export{I as attempt,$ as default,w as fromAny,b as fromObject,H as fromString};