@farris/ui-vue
Version:
Farris Vue, a Farris Design based Vue3 component library.
1 lines • 298 kB
JavaScript
(function(U,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("lodash-es"),require("../button-edit/index.umd.js"),require("bignumber.js"),require("../common/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../tags/index.umd.js"),require("../popover/index.umd.js"),require("../designer-canvas/index.umd.js"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../modal/index.umd.js"),require("../transfer/index.umd.js"),require("../tabs/index.umd.js"),require("../order/index.umd.js"),require("../condition/index.umd.js"),require("../checkbox/index.umd.js"),require("../filter-bar/index.umd.js"),require("../tooltip/index.umd.js"),require("../pagination/index.umd.js"),require("../button/index.umd.js"),require("../search-box/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../binding-selector/index.umd.js"),require("../notify/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../fieldset/index.umd.js"),require("../drawer/index.umd.js"),require("../combo-tree/index.umd.js"),require("../field-selector/index.umd.js"),require("../mapping-editor/index.umd.js"),require("../schema-selector/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../button-edit/index.umd.js","bignumber.js","../common/index.umd.js","../dynamic-resolver/index.umd.js","../tags/index.umd.js","../popover/index.umd.js","../designer-canvas/index.umd.js","@vueuse/core","../data-view/index.umd.js","../modal/index.umd.js","../transfer/index.umd.js","../tabs/index.umd.js","../order/index.umd.js","../condition/index.umd.js","../checkbox/index.umd.js","../filter-bar/index.umd.js","../tooltip/index.umd.js","../pagination/index.umd.js","../button/index.umd.js","../search-box/index.umd.js","../dynamic-form/index.umd.js","../binding-selector/index.umd.js","../notify/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../fieldset/index.umd.js","../drawer/index.umd.js","../combo-tree/index.umd.js","../field-selector/index.umd.js","../mapping-editor/index.umd.js","../schema-selector/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js"],i):(U=typeof globalThis<"u"?globalThis:U||self,i(U["time-picker"]={},U.Vue,U.LodashES,U.FButtonEdit$1,U.BigNumber,U.common,U.dynamicResolver,U.FTags,U.FPopover,U.designerCanvas,U.VueUseCore,U.dataView,null,U.FTransfer,U.FTabs,U.FOrder,null,U.FCheckBox,U.FFilterBar,U.FTooltip,U.FPagination,U.FButton,U.FSearchBox,U.FDynamicForm,U.FBindingSelector,null,U.FAccordion,U.FAvatar,U.FButtonGroup,U.FCalendar,U.FCapsule,U.FColorPicker,U.FComboList,U.FContentContainer,U.FDataGrid,U.FDatePicker,U.FDropdown,null,U.FEventsEditor,U.FImageCropper,U.FInputGroup,U.FLayout,U.FListNav,U.FListView,U.FLookup,U.FNav,U.FNumberSpinner,U.FNumberRange,U.FPageHeader,U.FPageFooter,U.FProgress,U.FQuerySolution,U.FRadioGroup,U.FRate,U.FResponseToolbar,U.FResponseLayout,U.FResponseLayoutEditorSetting,U.FSection,U.FSmokeDetector,U.FSplitter,U.FStep,U.FSwitch,U.FText,U.FTimePicker$1,U.FTreeview,U.FUploader,U.FVerifyDetail,U.FComponent,U.FVideo,U.FTextArea,U.FTreeGrid$1,U.FFieldset,U.FDrawer,U.FComboTree,U.FFieldSelector,U.FMappingEditor,U.FSchemaSelector,U.FEventParameter,U.FFilterConditionEditor,U.FSortConditionEditor,U.FMenuLookup))})(this,function(U,i,We,vn,Hu,Me,bn,wn,Bo,Xt,Cn,we,$u,Po,jo,Ho,Ru,xn,$o,_n,Ro,Lo,Wo,Qt,qo,Lu,Ao,Go,zo,Yo,Uo,Xo,Kt,Qo,Ko,Jo,Zo,Wu,er,tr,nr,or,rr,ir,ar,sr,lr,ur,cr,dr,fr,pr,mr,hr,gr,yr,vr,br,wr,Cr,xr,_r,Tr,Sr,kr,Mr,Vr,Nr,Fr,Or,Er,Ir,Dr,Br,Pr,jr,Hr,$r,Rr,Lr,Wr){"use strict";var Pu=Object.defineProperty;var ju=(U,i,We)=>i in U?Pu(U,i,{enumerable:!0,configurable:!0,writable:!0,value:We}):U[i]=We;var O=(U,i,We)=>ju(U,typeof i!="symbol"?i+"":i,We);const Tn={},Sn={};function Jt(t){const{properties:n,title:e,ignore:o}=t,r=o&&Array.isArray(o),a=Object.keys(n).reduce((s,l)=>((!r||!o.find(c=>c===l))&&(s[l]=n[l].type==="object"&&n[l].properties?Jt(n[l]):We.cloneDeep(n[l].default)),s),{});if(e&&(!r||!o.find(s=>s==="id"))){const s=e.toLowerCase().replace(/-/g,"_");a.id=`${s}_${Math.random().toString().slice(2,6)}`}return a}function qr(t){const{properties:n,title:e,required:o}=t;if(o&&Array.isArray(o)){const r=o.reduce((a,s)=>(a[s]=n[s].type==="object"&&n[s].properties?Jt(n[s]):We.cloneDeep(n[s].default),a),{});if(e&&o.find(a=>a==="id")){const a=e.toLowerCase().replace(/-/g,"_");r.id=`${a}_${Math.random().toString().slice(2,6)}`}return r}return{type:e}}function kn(t,n={},e){const o=Tn[t];if(o){let r=qr(o);const a=Sn[t];return r=a?a({getSchemaByType:kn},r,n,e):r,r}return null}function Ar(t,n){const e=Jt(n);return Object.keys(e).reduce((o,r)=>(Object.prototype.hasOwnProperty.call(t,r)&&(o[r]&&We.isPlainObject(o[r])&&We.isPlainObject(t[r]||!t[r])?Object.assign(o[r],t[r]||{}):o[r]=t[r]),o),e),e}function Mn(t,n){return Object.keys(t).filter(o=>t[o]!=null).reduce((o,r)=>{if(n.has(r)){const a=n.get(r);if(typeof a=="string")o[a]=t[r];else{const s=a(r,t[r],t);Object.assign(o,s)}}else o[r]=t[r];return o},{})}function Gr(t,n,e=new Map){const o=Ar(t,n);return Mn(o,e)}function zr(t={}){function n(p,f,u,d){if(typeof u=="number")return d[p].length===u;if(typeof u=="object"){const g=Object.keys(u)[0],h=u[g];if(g==="not")return Number(d[p].length)!==Number(h);if(g==="moreThan")return Number(d[p].length)>=Number(h);if(g==="lessThan")return Number(d[p].length)<=Number(h)}return!1}function e(p,f,u,d){return d[p]&&d[p].propertyValue&&String(d[p].propertyValue.value)===String(u)}const o=new Map([["length",n],["getProperty",e]]);Object.keys(t).reduce((p,f)=>(p.set(f,t[f]),p),o);function r(p,f){const u=p;return typeof f=="number"?[{target:u,operator:"length",param:null,value:Number(f)}]:typeof f=="boolean"?[{target:u,operator:"getProperty",param:p,value:!!f}]:typeof f=="object"?Object.keys(f).map(d=>{if(d==="length")return{target:u,operator:"length",param:null,value:f[d]};const g=d,h=f[d];return{target:u,operator:"getProperty",param:g,value:h}}):[]}function a(p){return Object.keys(p).reduce((u,d)=>{const g=r(d,p[d]);return u.push(...g),u},[])}function s(p,f){if(o.has(p.operator)){const u=o.get(p.operator);return u&&u(p.target,p.param,p.value,f)||!1}return!1}function l(p,f){return a(p).reduce((g,h)=>g&&s(h,f),!0)}function c(p,f){const u=Object.keys(p),d=u.includes("allOf"),g=u.includes("anyOf"),h=d||g,v=(h?p[h?d?"allOf":"anyOf":"allOf"]:[p]).map(w=>l(w,f));return d?!v.includes(!1):v.includes(!0)}return{parseValueSchema:c}}const ie={button:{type:"button",name:"按钮"},"response-toolbar":{type:"response-toolbar",name:"工具栏"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮"},"content-container":{type:"content-container",name:"容器"},"input-group":{type:"input-group",name:"文本"},textarea:{type:"textarea",name:"多行文本"},lookup:{type:"lookup",name:"帮助"},"number-spinner":{type:"number-spinner",name:"数值"},"date-picker":{type:"date-picker",name:"日期"},switch:{type:"switch",name:"开关"},"radio-group":{type:"radio-group",name:"单选组"},"check-box":{type:"check-box",name:"复选框"},"check-group":{type:"check-group",name:"复选框组"},"combo-list":{type:"combo-list",name:"下拉列表"},"response-form":{type:"response-form",name:"卡片面板"},"response-layout":{type:"response-layout",name:"布局容器",icon:"response-layout-3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"response-layout-1"},"tree-grid":{type:"tree-grid",name:"树表格"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块"},component:{type:"component",name:"组件"},tabs:{type:"tabs",name:"标签页"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮"},"time-picker":{type:"time-picker",name:"时间选择"},section:{type:"section",name:"分组面板"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传"},"page-header":{type:"page-header",name:"页头"},"page-footer":{type:"page-footer",name:"页脚"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏"},fieldset:{type:"fieldset",name:"分组"},"query-solution":{type:"query-solution",name:"筛选方案"},drawer:{type:"drawer",name:"抽屉"}},Yr={},Ur={};zr();function mt(t,n,e=new Map,o=(s,l,c,p)=>l,r={},a=s=>s){return Tn[n.title]=n,Sn[n.title]=o,Yr[n.title]=r,Ur[n.title]=a,(s={},l=!0)=>{if(!l)return Mn(s,e);const c=Gr(s,n,e),p=Object.keys(t).reduce((f,u)=>(f[u]=t[u].default,f),{});return Object.assign(p,c)}}function Ot(t,n){return{customClass:n.class,customStyle:n.style}}function Xr(){function t(n,e){const{dataSource:o}=n||{};return o===void 0?{}:{}}return{resolve:t}}function Qr(){function t(n,e){return n.selectItemById(e)}return{selectItemById:t}}function Kr(){function t(n,e){const{columns:o}=e;return n.updateColumns(o)}return{updateColumns:t}}const Jr=new Map([["appearance",Ot]]),Zr={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/time-picker.schema.json",title:"time-picker",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a time picker",type:"string"},type:{description:"The type string of time picker component",type:"string",default:"time-picker"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0},format:{description:"",type:"enum",default:"HH:mm:ss"},showHeader:{description:"",type:"boolean",default:!1},use12Hours:{description:"",type:"boolean",default:!1},hourStep:{description:"",type:"number",default:1},minuteStep:{description:"",type:"number",default:1},secondStep:{description:"",type:"number",default:1}},required:["type"],ignore:["id","appearance","binding","visible"]};function ei(t,n,e){return n}const Ht={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},popupClassName:{type:String,default:""},placeholder:{type:String,default:""},defaultOpenValue:{type:Date,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},hideDisabledElements:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},editable:{type:Boolean,default:!0}},Zt=mt(Ht,Zr,Jr,ei),Vn={modelValue:{type:String,default:""},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},defaultOpenValue:{type:Date,default:null},disabledHours:{type:Function,default:null},disabledMinutes:{type:Function,default:null},disabledSeconds:{type:Function,default:null},format:{type:String,default:"HH:mm:ss"},isOpen:{type:Boolean,default:!1},use12Hours:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!1},hideDisabledElements:{type:Boolean,default:!1}};function He(t){const n=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&n==="[object Date]"?new t.constructor(+t):typeof t=="number"||n==="[object Number]"||typeof t=="string"||n==="[object String]"?new Date(t):new Date(NaN)}function Oe(t,n){return t instanceof Date?new t.constructor(n):new Date(n)}function Nn(t,n){const e=He(t);return isNaN(n)?Oe(t,NaN):(n&&e.setDate(e.getDate()+n),e)}const Fn=6048e5,ti=864e5,ni=6e4,oi=36e5,ri=1e3;let ii={};function Mt(){return ii}function yt(t,n){var l,c,p,f;const e=Mt(),o=(n==null?void 0:n.weekStartsOn)??((c=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??e.weekStartsOn??((f=(p=e.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,r=He(t),a=r.getDay(),s=(a<o?7:0)+a-o;return r.setDate(r.getDate()-s),r.setHours(0,0,0,0),r}function Vt(t){return yt(t,{weekStartsOn:1})}function On(t){const n=He(t),e=n.getFullYear(),o=Oe(t,0);o.setFullYear(e+1,0,4),o.setHours(0,0,0,0);const r=Vt(o),a=Oe(t,0);a.setFullYear(e,0,4),a.setHours(0,0,0,0);const s=Vt(a);return n.getTime()>=r.getTime()?e+1:n.getTime()>=s.getTime()?e:e-1}function En(t){const n=He(t);return n.setHours(0,0,0,0),n}function $t(t){const n=He(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function ai(t,n){const e=En(t),o=En(n),r=+e-$t(e),a=+o-$t(o);return Math.round((r-a)/ti)}function si(t){const n=On(t),e=Oe(t,0);return e.setFullYear(n,0,4),e.setHours(0,0,0,0),Vt(e)}function li(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function In(t){if(!li(t)&&typeof t!="number")return!1;const n=He(t);return!isNaN(Number(n))}function ui(t){const n=He(t),e=Oe(t,0);return e.setFullYear(n.getFullYear(),0,1),e.setHours(0,0,0,0),e}const ci={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"}},di=(t,n,e)=>{let o;const r=ci[t];return typeof r=="string"?o=r:n===1?o=r.one:o=r.other.replace("{{count}}",n.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+o:o+" ago":o};function en(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const fi={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},pi={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mi={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hi={date:en({formats:fi,defaultWidth:"full"}),time:en({formats:pi,defaultWidth:"full"}),dateTime:en({formats:mi,defaultWidth:"full"})},gi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yi=(t,n,e,o)=>gi[t];function Et(t){return(n,e)=>{const o=e!=null&&e.context?String(e.context):"standalone";let r;if(o==="formatting"&&t.formattingValues){const s=t.defaultFormattingWidth||t.defaultWidth,l=e!=null&&e.width?String(e.width):s;r=t.formattingValues[l]||t.formattingValues[s]}else{const s=t.defaultWidth,l=e!=null&&e.width?String(e.width):t.defaultWidth;r=t.values[l]||t.values[s]}const a=t.argumentCallback?t.argumentCallback(n):n;return r[a]}}const vi={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bi={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wi={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"]},Ci={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"]},xi={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"}},_i={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"}},Ti={ordinalNumber:(t,n)=>{const e=Number(t),o=e%100;if(o>20||o<10)switch(o%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Et({values:vi,defaultWidth:"wide"}),quarter:Et({values:bi,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Et({values:wi,defaultWidth:"wide"}),day:Et({values:Ci,defaultWidth:"wide"}),dayPeriod:Et({values:xi,defaultWidth:"wide",formattingValues:_i,defaultFormattingWidth:"wide"})};function It(t){return(n,e={})=>{const o=e.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],a=n.match(r);if(!a)return null;const s=a[0],l=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?ki(l,u=>u.test(s)):Si(l,u=>u.test(s));let p;p=t.valueCallback?t.valueCallback(c):c,p=e.valueCallback?e.valueCallback(p):p;const f=n.slice(s.length);return{value:p,rest:f}}}function Si(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function ki(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function Mi(t){return(n,e={})=>{const o=n.match(t.matchPattern);if(!o)return null;const r=o[0],a=n.match(t.parsePattern);if(!a)return null;let s=t.valueCallback?t.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;const l=n.slice(r.length);return{value:s,rest:l}}}const Vi=/^(\d+)(th|st|nd|rd)?/i,Ni=/\d+/i,Fi={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},Oi={any:[/^b/i,/^(a|c)/i]},Ei={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ii={any:[/1/i,/2/i,/3/i,/4/i]},Di={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},Bi={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]},Pi={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},ji={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]},Hi={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},$i={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}},Ri={ordinalNumber:Mi({matchPattern:Vi,parsePattern:Ni,valueCallback:t=>parseInt(t,10)}),era:It({matchPatterns:Fi,defaultMatchWidth:"wide",parsePatterns:Oi,defaultParseWidth:"any"}),quarter:It({matchPatterns:Ei,defaultMatchWidth:"wide",parsePatterns:Ii,defaultParseWidth:"any",valueCallback:t=>t+1}),month:It({matchPatterns:Di,defaultMatchWidth:"wide",parsePatterns:Bi,defaultParseWidth:"any"}),day:It({matchPatterns:Pi,defaultMatchWidth:"wide",parsePatterns:ji,defaultParseWidth:"any"}),dayPeriod:It({matchPatterns:Hi,defaultMatchWidth:"any",parsePatterns:$i,defaultParseWidth:"any"})},Dn={code:"en-US",formatDistance:di,formatLong:hi,formatRelative:yi,localize:Ti,match:Ri,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Li(t){const n=He(t);return ai(n,ui(n))+1}function Bn(t){const n=He(t),e=+Vt(n)-+si(n);return Math.round(e/Fn)+1}function tn(t,n){var f,u,d,g;const e=He(t),o=e.getFullYear(),r=Mt(),a=(n==null?void 0:n.firstWeekContainsDate)??((u=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(d=r.locale)==null?void 0:d.options)==null?void 0:g.firstWeekContainsDate)??1,s=Oe(t,0);s.setFullYear(o+1,0,a),s.setHours(0,0,0,0);const l=yt(s,n),c=Oe(t,0);c.setFullYear(o,0,a),c.setHours(0,0,0,0);const p=yt(c,n);return e.getTime()>=l.getTime()?o+1:e.getTime()>=p.getTime()?o:o-1}function Wi(t,n){var l,c,p,f;const e=Mt(),o=(n==null?void 0:n.firstWeekContainsDate)??((c=(l=n==null?void 0:n.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??e.firstWeekContainsDate??((f=(p=e.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,r=tn(t,n),a=Oe(t,0);return a.setFullYear(r,0,o),a.setHours(0,0,0,0),yt(a,n)}function Pn(t,n){const e=He(t),o=+yt(e,n)-+Wi(e,n);return Math.round(o/Fn)+1}function Te(t,n){const e=t<0?"-":"",o=Math.abs(t).toString().padStart(n,"0");return e+o}const vt={y(t,n){const e=t.getFullYear(),o=e>0?e:1-e;return Te(n==="yy"?o%100:o,n.length)},M(t,n){const e=t.getMonth();return n==="M"?String(e+1):Te(e+1,2)},d(t,n){return Te(t.getDate(),n.length)},a(t,n){const e=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(t,n){return Te(t.getHours()%12||12,n.length)},H(t,n){return Te(t.getHours(),n.length)},m(t,n){return Te(t.getMinutes(),n.length)},s(t,n){return Te(t.getSeconds(),n.length)},S(t,n){const e=n.length,o=t.getMilliseconds(),r=Math.trunc(o*Math.pow(10,e-3));return Te(r,n.length)}},Nt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},jn={G:function(t,n,e){const o=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(o,{width:"abbreviated"});case"GGGGG":return e.era(o,{width:"narrow"});case"GGGG":default:return e.era(o,{width:"wide"})}},y:function(t,n,e){if(n==="yo"){const o=t.getFullYear(),r=o>0?o:1-o;return e.ordinalNumber(r,{unit:"year"})}return vt.y(t,n)},Y:function(t,n,e,o){const r=tn(t,o),a=r>0?r:1-r;if(n==="YY"){const s=a%100;return Te(s,2)}return n==="Yo"?e.ordinalNumber(a,{unit:"year"}):Te(a,n.length)},R:function(t,n){const e=On(t);return Te(e,n.length)},u:function(t,n){const e=t.getFullYear();return Te(e,n.length)},Q:function(t,n,e){const o=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(o);case"QQ":return Te(o,2);case"Qo":return e.ordinalNumber(o,{unit:"quarter"});case"QQQ":return e.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,n,e){const o=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(o);case"qq":return Te(o,2);case"qo":return e.ordinalNumber(o,{unit:"quarter"});case"qqq":return e.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,n,e){const o=t.getMonth();switch(n){case"M":case"MM":return vt.M(t,n);case"Mo":return e.ordinalNumber(o+1,{unit:"month"});case"MMM":return e.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(o,{width:"wide",context:"formatting"})}},L:function(t,n,e){const o=t.getMonth();switch(n){case"L":return String(o+1);case"LL":return Te(o+1,2);case"Lo":return e.ordinalNumber(o+1,{unit:"month"});case"LLL":return e.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(o,{width:"wide",context:"standalone"})}},w:function(t,n,e,o){const r=Pn(t,o);return n==="wo"?e.ordinalNumber(r,{unit:"week"}):Te(r,n.length)},I:function(t,n,e){const o=Bn(t);return n==="Io"?e.ordinalNumber(o,{unit:"week"}):Te(o,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):vt.d(t,n)},D:function(t,n,e){const o=Li(t);return n==="Do"?e.ordinalNumber(o,{unit:"dayOfYear"}):Te(o,n.length)},E:function(t,n,e){const o=t.getDay();switch(n){case"E":case"EE":case"EEE":return e.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(o,{width:"short",context:"formatting"});case"EEEE":default:return e.day(o,{width:"wide",context:"formatting"})}},e:function(t,n,e,o){const r=t.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return Te(a,2);case"eo":return e.ordinalNumber(a,{unit:"day"});case"eee":return e.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(r,{width:"short",context:"formatting"});case"eeee":default:return e.day(r,{width:"wide",context:"formatting"})}},c:function(t,n,e,o){const r=t.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return Te(a,n.length);case"co":return e.ordinalNumber(a,{unit:"day"});case"ccc":return e.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(r,{width:"narrow",context:"standalone"});case"cccccc":return e.day(r,{width:"short",context:"standalone"});case"cccc":default:return e.day(r,{width:"wide",context:"standalone"})}},i:function(t,n,e){const o=t.getDay(),r=o===0?7:o;switch(n){case"i":return String(r);case"ii":return Te(r,n.length);case"io":return e.ordinalNumber(r,{unit:"day"});case"iii":return e.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(o,{width:"short",context:"formatting"});case"iiii":default:return e.day(o,{width:"wide",context:"formatting"})}},a:function(t,n,e){const r=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,n,e){const o=t.getHours();let r;switch(o===12?r=Nt.noon:o===0?r=Nt.midnight:r=o/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,n,e){const o=t.getHours();let r;switch(o>=17?r=Nt.evening:o>=12?r=Nt.afternoon:o>=4?r=Nt.morning:r=Nt.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let o=t.getHours()%12;return o===0&&(o=12),e.ordinalNumber(o,{unit:"hour"})}return vt.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):vt.H(t,n)},K:function(t,n,e){const o=t.getHours()%12;return n==="Ko"?e.ordinalNumber(o,{unit:"hour"}):Te(o,n.length)},k:function(t,n,e){let o=t.getHours();return o===0&&(o=24),n==="ko"?e.ordinalNumber(o,{unit:"hour"}):Te(o,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):vt.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):vt.s(t,n)},S:function(t,n){return vt.S(t,n)},X:function(t,n,e){const o=t.getTimezoneOffset();if(o===0)return"Z";switch(n){case"X":return $n(o);case"XXXX":case"XX":return Tt(o);case"XXXXX":case"XXX":default:return Tt(o,":")}},x:function(t,n,e){const o=t.getTimezoneOffset();switch(n){case"x":return $n(o);case"xxxx":case"xx":return Tt(o);case"xxxxx":case"xxx":default:return Tt(o,":")}},O:function(t,n,e){const o=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Hn(o,":");case"OOOO":default:return"GMT"+Tt(o,":")}},z:function(t,n,e){const o=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Hn(o,":");case"zzzz":default:return"GMT"+Tt(o,":")}},t:function(t,n,e){const o=Math.trunc(t.getTime()/1e3);return Te(o,n.length)},T:function(t,n,e){const o=t.getTime();return Te(o,n.length)}};function Hn(t,n=""){const e=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),a=o%60;return a===0?e+String(r):e+String(r)+n+Te(a,2)}function $n(t,n){return t%60===0?(t>0?"-":"+")+Te(Math.abs(t)/60,2):Tt(t,n)}function Tt(t,n=""){const e=t>0?"-":"+",o=Math.abs(t),r=Te(Math.trunc(o/60),2),a=Te(o%60,2);return e+r+n+a}const Rn=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Ln=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},nn={p:Ln,P:(t,n)=>{const e=t.match(/(P+)(p+)?/)||[],o=e[1],r=e[2];if(!r)return Rn(t,n);let a;switch(o){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",Rn(o,n)).replace("{{time}}",Ln(r,n))}},qi=/^D+$/,Ai=/^Y+$/,Gi=["D","DD","YY","YYYY"];function Wn(t){return qi.test(t)}function qn(t){return Ai.test(t)}function on(t,n,e){const o=zi(t,n,e);if(console.warn(o),Gi.includes(t))throw new RangeError(o)}function zi(t,n,e){const o=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${o} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Yi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ui=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xi=/^'([^]*?)'?$/,Qi=/''/g,Ki=/[a-zA-Z]/;function An(t,n,e){var f,u,d,g;const o=Mt(),r=o.locale??Dn,a=o.firstWeekContainsDate??((u=(f=o.locale)==null?void 0:f.options)==null?void 0:u.firstWeekContainsDate)??1,s=o.weekStartsOn??((g=(d=o.locale)==null?void 0:d.options)==null?void 0:g.weekStartsOn)??0,l=He(t);if(!In(l))throw new RangeError("Invalid time value");let c=n.match(Ui).map(h=>{const M=h[0];if(M==="p"||M==="P"){const _=nn[M];return _(h,r.formatLong)}return h}).join("").match(Yi).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const M=h[0];if(M==="'")return{isToken:!1,value:Ji(h)};if(jn[M])return{isToken:!0,value:h};if(M.match(Ki))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:h}});r.localize.preprocessor&&(c=r.localize.preprocessor(l,c));const p={firstWeekContainsDate:a,weekStartsOn:s,locale:r};return c.map(h=>{if(!h.isToken)return h.value;const M=h.value;(qn(M)||Wn(M))&&on(M,n,String(t));const _=jn[M[0]];return _(l,M,r.localize,p)}).join("")}function Ji(t){const n=t.match(Xi);return n?n[1].replace(Qi,"'"):t}function Zi(){return Object.assign({},Mt())}function ea(t){let e=He(t).getDay();return e===0&&(e=7),e}function ta(t,n){const e=n instanceof Date?Oe(n,0):new n(0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e}const na=10;class Gn{constructor(){O(this,"subPriority",0)}validate(n,e){return!0}}class oa extends Gn{constructor(n,e,o,r,a){super(),this.value=n,this.validateValue=e,this.setValue=o,this.priority=r,a&&(this.subPriority=a)}validate(n,e){return this.validateValue(n,this.value,e)}set(n,e,o){return this.setValue(n,e,this.value,o)}}class ra extends Gn{constructor(){super(...arguments);O(this,"priority",na);O(this,"subPriority",-1)}set(e,o){return o.timestampIsSet?e:Oe(e,ta(e,Date))}}class Ce{run(n,e,o,r){const a=this.parse(n,e,o,r);return a?{setter:new oa(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(n,e,o){return!0}}class ia extends Ce{constructor(){super(...arguments);O(this,"priority",140);O(this,"incompatibleTokens",["R","u","t","T"])}parse(e,o,r){switch(o){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,o,r){return o.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const Ie={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}/},st={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 De(t,n){return t&&{value:n(t.value),rest:t.rest}}function Fe(t,n){const e=n.match(t);return e?{value:parseInt(e[0],10),rest:n.slice(e[0].length)}:null}function lt(t,n){const e=n.match(t);if(!e)return null;if(e[0]==="Z")return{value:0,rest:n.slice(1)};const o=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,a=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:o*(r*oi+a*ni+s*ri),rest:n.slice(e[0].length)}}function zn(t){return Fe(Ie.anyDigitsSigned,t)}function Ee(t,n){switch(t){case 1:return Fe(Ie.singleDigit,n);case 2:return Fe(Ie.twoDigits,n);case 3:return Fe(Ie.threeDigits,n);case 4:return Fe(Ie.fourDigits,n);default:return Fe(new RegExp("^\\d{1,"+t+"}"),n)}}function Rt(t,n){switch(t){case 1:return Fe(Ie.singleDigitSigned,n);case 2:return Fe(Ie.twoDigitsSigned,n);case 3:return Fe(Ie.threeDigitsSigned,n);case 4:return Fe(Ie.fourDigitsSigned,n);default:return Fe(new RegExp("^-?\\d{1,"+t+"}"),n)}}function rn(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 Yn(t,n){const e=n>0,o=e?n:1-n;let r;if(o<=50)r=t||100;else{const a=o+50,s=Math.trunc(a/100)*100,l=t>=a%100;r=t+s-(l?100:0)}return e?r:1-r}function Un(t){return t%400===0||t%4===0&&t%100!==0}class aa extends Ce{constructor(){super(...arguments);O(this,"priority",130);O(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,o,r){const a=s=>({year:s,isTwoDigitYear:o==="yy"});switch(o){case"y":return De(Ee(4,e),a);case"yo":return De(r.ordinalNumber(e,{unit:"year"}),a);default:return De(Ee(o.length,e),a)}}validate(e,o){return o.isTwoDigitYear||o.year>0}set(e,o,r){const a=e.getFullYear();if(r.isTwoDigitYear){const l=Yn(r.year,a);return e.setFullYear(l,0,1),e.setHours(0,0,0,0),e}const s=!("era"in o)||o.era===1?r.year:1-r.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}}class sa extends Ce{constructor(){super(...arguments);O(this,"priority",130);O(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,o,r){const a=s=>({year:s,isTwoDigitYear:o==="YY"});switch(o){case"Y":return De(Ee(4,e),a);case"Yo":return De(r.ordinalNumber(e,{unit:"year"}),a);default:return De(Ee(o.length,e),a)}}validate(e,o){return o.isTwoDigitYear||o.year>0}set(e,o,r,a){const s=tn(e,a);if(r.isTwoDigitYear){const c=Yn(r.year,s);return e.setFullYear(c,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),yt(e,a)}const l=!("era"in o)||o.era===1?r.year:1-r.year;return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),yt(e,a)}}class la extends Ce{constructor(){super(...arguments);O(this,"priority",130);O(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,o){return Rt(o==="R"?4:o.length,e)}set(e,o,r){const a=Oe(e,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),Vt(a)}}class ua extends Ce{constructor(){super(...arguments);O(this,"priority",130);O(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,o){return Rt(o==="u"?4:o.length,e)}set(e,o,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class ca extends Ce{constructor(){super(...arguments);O(this,"priority",120);O(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,o,r){switch(o){case"Q":case"QQ":return Ee(o.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,o){return o>=1&&o<=4}set(e,o,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class da extends Ce{constructor(){super(...arguments);O(this,"priority",120);O(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,o,r){switch(o){case"q":case"qq":return Ee(o.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,o){return o>=1&&o<=4}set(e,o,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class fa extends Ce{constructor(){super(...arguments);O(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);O(this,"priority",110)}parse(e,o,r){const a=s=>s-1;switch(o){case"M":return De(Fe(Ie.month,e),a);case"MM":return De(Ee(2,e),a);case"Mo":return De(r.ordinalNumber(e,{unit:"month"}),a);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,o){return o>=0&&o<=11}set(e,o,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class pa extends Ce{constructor(){super(...arguments);O(this,"priority",110);O(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,o,r){const a=s=>s-1;switch(o){case"L":return De(Fe(Ie.month,e),a);case"LL":return De(Ee(2,e),a);case"Lo":return De(r.ordinalNumber(e,{unit:"month"}),a);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,o){return o>=0&&o<=11}set(e,o,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}function ma(t,n,e){const o=He(t),r=Pn(o,e)-n;return o.setDate(o.getDate()-r*7),o}class ha extends Ce{constructor(){super(...arguments);O(this,"priority",100);O(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,o,r){switch(o){case"w":return Fe(Ie.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Ee(o.length,e)}}validate(e,o){return o>=1&&o<=53}set(e,o,r,a){return yt(ma(e,r,a),a)}}function ga(t,n){const e=He(t),o=Bn(e)-n;return e.setDate(e.getDate()-o*7),e}class ya extends Ce{constructor(){super(...arguments);O(this,"priority",100);O(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,o,r){switch(o){case"I":return Fe(Ie.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Ee(o.length,e)}}validate(e,o){return o>=1&&o<=53}set(e,o,r){return Vt(ga(e,r))}}const va=[31,28,31,30,31,30,31,31,30,31,30,31],ba=[31,29,31,30,31,30,31,31,30,31,30,31];class wa extends Ce{constructor(){super(...arguments);O(this,"priority",90);O(this,"subPriority",1);O(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,o,r){switch(o){case"d":return Fe(Ie.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Ee(o.length,e)}}validate(e,o){const r=e.getFullYear(),a=Un(r),s=e.getMonth();return a?o>=1&&o<=ba[s]:o>=1&&o<=va[s]}set(e,o,r){return e.setDate(r),e.setHours(0,0,0,0),e}}class Ca extends Ce{constructor(){super(...arguments);O(this,"priority",90);O(this,"subpriority",1);O(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,o,r){switch(o){case"D":case"DD":return Fe(Ie.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Ee(o.length,e)}}validate(e,o){const r=e.getFullYear();return Un(r)?o>=1&&o<=366:o>=1&&o<=365}set(e,o,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function an(t,n,e){var u,d,g,h;const o=Mt(),r=(e==null?void 0:e.weekStartsOn)??((d=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??o.weekStartsOn??((h=(g=o.locale)==null?void 0:g.options)==null?void 0:h.weekStartsOn)??0,a=He(t),s=a.getDay(),c=(n%7+7)%7,p=7-r,f=n<0||n>6?n-(s+p)%7:(c+p)%7-(s+p)%7;return Nn(a,f)}class xa extends Ce{constructor(){super(...arguments);O(this,"priority",90);O(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,o,r){switch(o){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,o){return o>=0&&o<=6}set(e,o,r,a){return e=an(e,r,a),e.setHours(0,0,0,0),e}}class _a extends Ce{constructor(){super(...arguments);O(this,"priority",90);O(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,o,r,a){const s=l=>{const c=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+c};switch(o){case"e":case"ee":return De(Ee(o.length,e),s);case"eo":return De(r.ordinalNumber(e,{unit:"day"}),s);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,o){return o>=0&&o<=6}set(e,o,r,a){return e=an(e,r,a),e.setHours(0,0,0,0),e}}class Ta extends Ce{constructor(){super(...arguments);O(this,"priority",90);O(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,o,r,a){const s=l=>{const c=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+c};switch(o){case"c":case"cc":return De(Ee(o.length,e),s);case"co":return De(r.ordinalNumber(e,{unit:"day"}),s);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,o){return o>=0&&o<=6}set(e,o,r,a){return e=an(e,r,a),e.setHours(0,0,0,0),e}}function Sa(t,n){const e=He(t),o=ea(e),r=n-o;return Nn(e,r)}class ka extends Ce{constructor(){super(...arguments);O(this,"priority",90);O(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,o,r){const a=s=>s===0?7:s;switch(o){case"i":case"ii":return Ee(o.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return De(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return De(r.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return De(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return De(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"}),a)}}validate(e,o){return o>=1&&o<=7}set(e,o,r){return e=Sa(e,r),e.setHours(0,0,0,0),e}}class Ma extends Ce{constructor(){super(...arguments);O(this,"priority",80);O(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,o,r){switch(o){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"