UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1 lines 268 kB
(function(z,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("../dynamic-form/index.umd.js"),require("lodash-es"),require("../common/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../property-panel/index.umd.js"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../../designer/checkbox/index.umd.js"),require("../../designer/checkbox-group/index.umd.js"),require("../combo-list/index.umd.js"),require("../combo-tree/index.umd.js"),require("../component/index.umd.js"),require("../color-picker/index.umd.js"),require("../content-container/index.umd.js"),require("../date-picker/index.umd.js"),require("../../designer/data-grid/index.umd.js"),require("../dropdown/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../field-selector/index.umd.js"),require("../binding-selector/index.umd.js"),require("../image-cropper/index.umd.js"),require("../../designer/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("../mapping-editor/index.umd.js"),require("../nav/index.umd.js"),require("../number-range/index.umd.js"),require("../number-spinner/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../../designer/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("../search-box/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("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../schema-selector/index.umd.js"),require("../tree-grid/index.umd.js"),require("../event-parameter/index.umd.js"),require("../filter-condition-editor/index.umd.js"),require("../fieldset/index.umd.js"),require("../sort-condition-editor/index.umd.js"),require("../menu-lookup/index.umd.js"),require("../drawer/index.umd.js"),require("../json-editor/index.umd.js"),require("../property-editor/index.umd.js"),require("../expression-editor/index.umd.js"),require("../code-editor/index.umd.js"),require("../html-template/index.umd.js"),require("../external-container/index.umd.js"),require("@vueuse/core"),require("../data-view/index.umd.js"),require("../modal/index.umd.js"),require("../condition/index.umd.js"),require("../checkbox/index.umd.js"),require("../tooltip/index.umd.js"),require("../button/index.umd.js"),require("../notify/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","../dynamic-form/index.umd.js","lodash-es","../common/index.umd.js","../dynamic-resolver/index.umd.js","../designer-canvas/index.umd.js","../property-panel/index.umd.js","../accordion/index.umd.js","../avatar/index.umd.js","../../designer/button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../../designer/checkbox/index.umd.js","../../designer/checkbox-group/index.umd.js","../combo-list/index.umd.js","../combo-tree/index.umd.js","../component/index.umd.js","../color-picker/index.umd.js","../content-container/index.umd.js","../date-picker/index.umd.js","../../designer/data-grid/index.umd.js","../dropdown/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../field-selector/index.umd.js","../binding-selector/index.umd.js","../image-cropper/index.umd.js","../../designer/input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../mapping-editor/index.umd.js","../nav/index.umd.js","../number-range/index.umd.js","../number-spinner/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../../designer/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","../search-box/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../transfer/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../schema-selector/index.umd.js","../tree-grid/index.umd.js","../event-parameter/index.umd.js","../filter-condition-editor/index.umd.js","../fieldset/index.umd.js","../sort-condition-editor/index.umd.js","../menu-lookup/index.umd.js","../drawer/index.umd.js","../json-editor/index.umd.js","../property-editor/index.umd.js","../expression-editor/index.umd.js","../code-editor/index.umd.js","../html-template/index.umd.js","../external-container/index.umd.js","@vueuse/core","../data-view/index.umd.js","../modal/index.umd.js","../condition/index.umd.js","../checkbox/index.umd.js","../tooltip/index.umd.js","../button/index.umd.js","../notify/index.umd.js"],i):(z=typeof globalThis<"u"?globalThis:z||self,i(z.condition={},z.Vue,z.FDynamicForm,z.LodashES,z.common,z.dynamicResolver,null,null,z.FAccordion,z.FAvatar,z.FButtonEdit,z.FButtonGroup,z.FCalendar,z.FCapsule,z.FCheckbox,z.FCheckboxGroup,z.FComboList,z.FComboTree,z.FComponent,z.FColorPicker,z.FContentContainer,z.FDatePicker,z.FDataGrid,z.FDropdown,z.FEventsEditor,z.FFilterBar,z.FFieldSelector,z.FBindingSelector,z.FImageCropper,z.FInputGroup,z.FLayout,z.FListNav,z.FListView,z.FLookup,z.FMappingEditor,z.FNav,z.FNumberRange,z.FNumberSpinner,z.FOrder,z.FPageHeader,z.FPageFooter,z.FPagination,z.FProgress,z.FQuerySolution,z.FRadioGroup,z.FRate,z.FResponseToolbar,z.FResponseLayout,z.FResponseLayoutEditorSetting,z.FSearchBox,z.FSection,z.FSmokeDetector,z.FSplitter,z.FStep,z.FSwitch,z.FTabs,z.FTags,z.FText,z.FTimePicker,z.FTransfer,z.FTreeview,z.FUploader,z.FVerifyDetail,z.FVideo,z.FTextArea,z.FSchemaSelector,z.FTreeGrid$1,z.FEventParameter,z.FFilterConditionEditor,z.FFieldset,z.FSortConditionEditor,z.FMenuLookup,z.FDrawer,z.FJsonEditor,z.FPropertyEditor,z.FExpressionEditor,z.FCodeEditor,z.FHtmlTemplate,null,z.VueUseCore,z.dataView,null,null,z.checkbox,z.FTooltip,z.FButton))})(this,function(z,i,gt,$e,Ve,Cr,rc,oc,xr,_r,Sr,Tr,kr,Fr,Fn,Mn,Kt,Mr,Er,Nr,Or,Vr,Ir,Dr,Pr,jr,Br,Rr,Hr,$r,Wr,Lr,qr,Ar,zr,Gr,Yr,Ur,Xr,Qr,Kr,Jr,Zr,eo,to,no,ro,oo,io,ao,so,lo,co,uo,fo,mo,po,ho,go,vo,yo,wo,bo,Co,xo,_o,So,To,ko,Fo,Mo,Eo,No,Oo,Vo,Io,Do,Po,ic,En,Te,ac,sc,jo,Nn,Bo){"use strict";var tc=Object.defineProperty;var nc=(z,i,gt)=>i in z?tc(z,i,{enumerable:!0,configurable:!0,writable:!0,value:gt}):z[i]=gt;var j=(z,i,gt)=>nc(z,typeof i!="symbol"?i+"":i,gt);const Jt={conditions:{type:Array,default:[]},fields:{type:Array,default:[]},key:{type:String,default:""},isControlInline:{type:Boolean,default:!0}};class Zt{constructor(t={value:[]}){j(this,"editorType","check-box");j(this,"value");j(this,"valueType","boolean");const r=(Array.isArray(t.value)?t.value:typeof t.value=="string"?t.value.split(","):[]).map(o=>JSON.parse(o));this.value=r}clear(){this.value=[]}setValue(t){this.value=t}getValue(){return this.value}getDisplayText(){return this.value.map(t=>t?"是":"否").join(",")}isEmpty(){return this.value.length===0}}class en{constructor(t={textValue:"",value:"",valueField:""}){j(this,"editorType","combo-lookup");j(this,"textValue");j(this,"value");j(this,"valueField");j(this,"valueType","text");this.textValue=t.textValue,this.value=t.value,this.valueField=t.valueField}clear(){this.value="",this.valueField="",this.textValue=""}getPropValue(t,e){if(e.length>1){const r=e.shift();return t[r]?this.getPropValue(t[r],e):null}return t[e[0]]}getTextValue(t){const e=t.split("."),r=this.value.split(",").map(o=>this.getPropValue(o,$e.cloneDeep(e)));return r&&r.length?r.join(","):""}getValue(){const t=this.valueField.split("."),e=this.value.split(",").map(r=>this.getPropValue(r,$e.cloneDeep(t)));return e&&e.length?e.join(","):""}getDisplayText(){return this.getValue()}setValue(t){throw new Error("Method not implemented.")}isEmpty(){return!this.valueField}}function Ye(n){const t=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&t==="[object Date]"?new n.constructor(+n):typeof n=="number"||t==="[object Number]"||typeof n=="string"||t==="[object String]"?new Date(n):new Date(NaN)}function We(n,t){return n instanceof Date?new n.constructor(t):new Date(t)}function On(n,t){const e=Ye(n);return isNaN(t)?We(n,NaN):(t&&e.setDate(e.getDate()+t),e)}const Vn=6048e5,Ro=864e5,Ho=6e4,$o=36e5,Wo=1e3;let Lo={};function Ot(){return Lo}function vt(n,t){var l,c,u,d;const e=Ot(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??e.weekStartsOn??((d=(u=e.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=Ye(n),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Vt(n){return vt(n,{weekStartsOn:1})}function In(n){const t=Ye(n),e=t.getFullYear(),r=We(n,0);r.setFullYear(e+1,0,4),r.setHours(0,0,0,0);const o=Vt(r),a=We(n,0);a.setFullYear(e,0,4),a.setHours(0,0,0,0);const s=Vt(a);return t.getTime()>=o.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function Dn(n){const t=Ye(n);return t.setHours(0,0,0,0),t}function At(n){const t=Ye(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function qo(n,t){const e=Dn(n),r=Dn(t),o=+e-At(e),a=+r-At(r);return Math.round((o-a)/Ro)}function Ao(n){const t=In(n),e=We(n,0);return e.setFullYear(t,0,4),e.setHours(0,0,0,0),Vt(e)}function zo(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Go(n){if(!zo(n)&&typeof n!="number")return!1;const t=Ye(n);return!isNaN(Number(t))}function Yo(n){const t=Ye(n),e=We(n,0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Uo={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"}},Xo=(n,t,e)=>{let r;const o=Uo[n];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function tn(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Qo={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ko={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Jo={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zo={date:tn({formats:Qo,defaultWidth:"full"}),time:tn({formats:Ko,defaultWidth:"full"}),dateTime:tn({formats:Jo,defaultWidth:"full"})},ei={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ti=(n,t,e,r)=>ei[n];function Bt(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let o;if(r==="formatting"&&n.formattingValues){const s=n.defaultFormattingWidth||n.defaultWidth,l=e!=null&&e.width?String(e.width):s;o=n.formattingValues[l]||n.formattingValues[s]}else{const s=n.defaultWidth,l=e!=null&&e.width?String(e.width):n.defaultWidth;o=n.values[l]||n.values[s]}const a=n.argumentCallback?n.argumentCallback(t):t;return o[a]}}const ni={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ri={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oi={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"]},ii={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"]},ai={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"}},si={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"}},li={ordinalNumber:(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Bt({values:ni,defaultWidth:"wide"}),quarter:Bt({values:ri,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Bt({values:oi,defaultWidth:"wide"}),day:Bt({values:ii,defaultWidth:"wide"}),dayPeriod:Bt({values:ai,defaultWidth:"wide",formattingValues:si,defaultFormattingWidth:"wide"})};function Rt(n){return(t,e={})=>{const r=e.width,o=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],l=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(l)?ui(l,f=>f.test(s)):ci(l,f=>f.test(s));let u;u=n.valueCallback?n.valueCallback(c):c,u=e.valueCallback?e.valueCallback(u):u;const d=t.slice(s.length);return{value:u,rest:d}}}function ci(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function ui(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function di(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const o=r[0],a=t.match(n.parsePattern);if(!a)return null;let s=n.valueCallback?n.valueCallback(a[0]):a[0];s=e.valueCallback?e.valueCallback(s):s;const l=t.slice(o.length);return{value:s,rest:l}}}const fi=/^(\d+)(th|st|nd|rd)?/i,mi=/\d+/i,pi={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},hi={any:[/^b/i,/^(a|c)/i]},gi={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vi={any:[/1/i,/2/i,/3/i,/4/i]},yi={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},wi={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]},bi={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},Ci={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]},xi={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}},Si={ordinalNumber:di({matchPattern:fi,parsePattern:mi,valueCallback:n=>parseInt(n,10)}),era:Rt({matchPatterns:pi,defaultMatchWidth:"wide",parsePatterns:hi,defaultParseWidth:"any"}),quarter:Rt({matchPatterns:gi,defaultMatchWidth:"wide",parsePatterns:vi,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Rt({matchPatterns:yi,defaultMatchWidth:"wide",parsePatterns:wi,defaultParseWidth:"any"}),day:Rt({matchPatterns:bi,defaultMatchWidth:"wide",parsePatterns:Ci,defaultParseWidth:"any"}),dayPeriod:Rt({matchPatterns:xi,defaultMatchWidth:"any",parsePatterns:_i,defaultParseWidth:"any"})},Pn={code:"en-US",formatDistance:Xo,formatLong:Zo,formatRelative:ti,localize:li,match:Si,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ti(n){const t=Ye(n);return qo(t,Yo(t))+1}function jn(n){const t=Ye(n),e=+Vt(t)-+Ao(t);return Math.round(e/Vn)+1}function nn(n,t){var d,f,p,h;const e=Ye(n),r=e.getFullYear(),o=Ot(),a=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=We(n,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const l=vt(s,t),c=We(n,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=vt(c,t);return e.getTime()>=l.getTime()?r+1:e.getTime()>=u.getTime()?r:r-1}function ki(n,t){var l,c,u,d;const e=Ot(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??e.firstWeekContainsDate??((d=(u=e.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=nn(n,t),a=We(n,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),vt(a,t)}function Bn(n,t){const e=Ye(n),r=+vt(e,t)-+ki(e,t);return Math.round(r/Vn)+1}function Me(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const yt={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return Me(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):Me(e+1,2)},d(n,t){return Me(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){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(n,t){return Me(n.getHours()%12||12,t.length)},H(n,t){return Me(n.getHours(),t.length)},m(n,t){return Me(n.getMinutes(),t.length)},s(n,t){return Me(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),o=Math.trunc(r*Math.pow(10,e-3));return Me(o,t.length)}},It={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rn={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),o=r>0?r:1-r;return e.ordinalNumber(o,{unit:"year"})}return yt.y(n,t)},Y:function(n,t,e,r){const o=nn(n,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return Me(s,2)}return t==="Yo"?e.ordinalNumber(a,{unit:"year"}):Me(a,t.length)},R:function(n,t){const e=In(n);return Me(e,t.length)},u:function(n,t){const e=n.getFullYear();return Me(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Me(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Me(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return yt.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return Me(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const o=Bn(n,r);return t==="wo"?e.ordinalNumber(o,{unit:"week"}):Me(o,t.length)},I:function(n,t,e){const r=jn(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):Me(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):yt.d(n,t)},D:function(n,t,e){const r=Ti(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):Me(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":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"})}},e:function(n,t,e,r){const o=n.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Me(a,2);case"eo":return e.ordinalNumber(a,{unit:"day"});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"})}},c:function(n,t,e,r){const o=n.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Me(a,t.length);case"co":return e.ordinalNumber(a,{unit:"day"});case"ccc":return e.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(o,{width:"narrow",context:"standalone"});case"cccccc":return e.day(o,{width:"short",context:"standalone"});case"cccc":default:return e.day(o,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return Me(o,t.length);case"io":return e.ordinalNumber(o,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const o=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let o;switch(r===12?o=It.noon:r===0?o=It.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let o;switch(r>=17?o=It.evening:r>=12?o=It.afternoon:r>=4?o=It.morning:o=It.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return yt.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):yt.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):Me(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):yt.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):yt.s(n,t)},S:function(n,t){return yt.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $n(r);case"XXXX":case"XX":return St(r);case"XXXXX":case"XXX":default:return St(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return $n(r);case"xxxx":case"xx":return St(r);case"xxxxx":case"xxx":default:return St(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Hn(r,":");case"OOOO":default:return"GMT"+St(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Hn(r,":");case"zzzz":default:return"GMT"+St(r,":")}},t:function(n,t,e){const r=Math.trunc(n.getTime()/1e3);return Me(r,t.length)},T:function(n,t,e){const r=n.getTime();return Me(r,t.length)}};function Hn(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),o=Math.trunc(r/60),a=r%60;return a===0?e+String(o):e+String(o)+t+Me(a,2)}function $n(n,t){return n%60===0?(n>0?"-":"+")+Me(Math.abs(n)/60,2):St(n,t)}function St(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),o=Me(Math.trunc(r/60),2),a=Me(r%60,2);return e+o+t+a}const Wn=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ln=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},rn={p:Ln,P:(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],o=e[2];if(!o)return Wn(n,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Wn(r,t)).replace("{{time}}",Ln(o,t))}},Fi=/^D+$/,Mi=/^Y+$/,Ei=["D","DD","YY","YYYY"];function qn(n){return Fi.test(n)}function An(n){return Mi.test(n)}function on(n,t,e){const r=Ni(n,t,e);if(console.warn(r),Ei.includes(n))throw new RangeError(r)}function Ni(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Oi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vi=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ii=/^'([^]*?)'?$/,Di=/''/g,Pi=/[a-zA-Z]/;function zn(n,t,e){var d,f,p,h;const r=Ot(),o=r.locale??Pn,a=r.firstWeekContainsDate??((f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.weekStartsOn)??0,l=Ye(n);if(!Go(l))throw new RangeError("Invalid time value");let c=t.match(Vi).map(g=>{const E=g[0];if(E==="p"||E==="P"){const S=rn[E];return S(g,o.formatLong)}return g}).join("").match(Oi).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const E=g[0];if(E==="'")return{isToken:!1,value:ji(g)};if(Rn[E])return{isToken:!0,value:g};if(E.match(Pi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:g}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(g=>{if(!g.isToken)return g.value;const E=g.value;(An(E)||qn(E))&&on(E,t,String(n));const S=Rn[E[0]];return S(l,E,o.localize,u)}).join("")}function ji(n){const t=n.match(Ii);return t?t[1].replace(Di,"'"):n}function Bi(){return Object.assign({},Ot())}function Ri(n){let e=Ye(n).getDay();return e===0&&(e=7),e}function Hi(n,t){const e=t instanceof Date?We(t,0):new t(0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}const $i=10;class Gn{constructor(){j(this,"subPriority",0)}validate(t,e){return!0}}class Wi extends Gn{constructor(t,e,r,o,a){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=o,a&&(this.subPriority=a)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}}class Li extends Gn{constructor(){super(...arguments);j(this,"priority",$i);j(this,"subPriority",-1)}set(e,r){return r.timestampIsSet?e:We(e,Hi(e,Date))}}class Fe{run(t,e,r,o){const a=this.parse(t,e,r,o);return a?{setter:new Wi(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}validate(t,e,r){return!0}}class qi extends Fe{constructor(){super(...arguments);j(this,"priority",140);j(this,"incompatibleTokens",["R","u","t","T"])}parse(e,r,o){switch(r){case"G":case"GG":case"GGG":return o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"});case"GGGGG":return o.era(e,{width:"narrow"});case"GGGG":default:return o.era(e,{width:"wide"})||o.era(e,{width:"abbreviated"})||o.era(e,{width:"narrow"})}}set(e,r,o){return r.era=o,e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}const qe={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}/},lt={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 Ae(n,t){return n&&{value:t(n.value),rest:n.rest}}function Re(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function ct(n,t){const e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};const r=e[1]==="+"?1:-1,o=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:r*(o*$o+a*Ho+s*Wo),rest:t.slice(e[0].length)}}function Yn(n){return Re(qe.anyDigitsSigned,n)}function Le(n,t){switch(n){case 1:return Re(qe.singleDigit,t);case 2:return Re(qe.twoDigits,t);case 3:return Re(qe.threeDigits,t);case 4:return Re(qe.fourDigits,t);default:return Re(new RegExp("^\\d{1,"+n+"}"),t)}}function zt(n,t){switch(n){case 1:return Re(qe.singleDigitSigned,t);case 2:return Re(qe.twoDigitsSigned,t);case 3:return Re(qe.threeDigitsSigned,t);case 4:return Re(qe.fourDigitsSigned,t);default:return Re(new RegExp("^-?\\d{1,"+n+"}"),t)}}function an(n){switch(n){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 Un(n,t){const e=t>0,r=e?t:1-t;let o;if(r<=50)o=n||100;else{const a=r+50,s=Math.trunc(a/100)*100,l=n>=a%100;o=n+s-(l?100:0)}return e?o:1-o}function Xn(n){return n%400===0||n%4===0&&n%100!==0}class Ai extends Fe{constructor(){super(...arguments);j(this,"priority",130);j(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,r,o){const a=s=>({year:s,isTwoDigitYear:r==="yy"});switch(r){case"y":return Ae(Le(4,e),a);case"yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae(Le(r.length,e),a)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,o){const a=e.getFullYear();if(o.isTwoDigitYear){const l=Un(o.year,a);return e.setFullYear(l,0,1),e.setHours(0,0,0,0),e}const s=!("era"in r)||r.era===1?o.year:1-o.year;return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}}class zi extends Fe{constructor(){super(...arguments);j(this,"priority",130);j(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,r,o){const a=s=>({year:s,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Ae(Le(4,e),a);case"Yo":return Ae(o.ordinalNumber(e,{unit:"year"}),a);default:return Ae(Le(r.length,e),a)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,o,a){const s=nn(e,a);if(o.isTwoDigitYear){const c=Un(o.year,s);return e.setFullYear(c,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),vt(e,a)}const l=!("era"in r)||r.era===1?o.year:1-o.year;return e.setFullYear(l,0,a.firstWeekContainsDate),e.setHours(0,0,0,0),vt(e,a)}}class Gi extends Fe{constructor(){super(...arguments);j(this,"priority",130);j(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,r){return zt(r==="R"?4:r.length,e)}set(e,r,o){const a=We(e,0);return a.setFullYear(o,0,4),a.setHours(0,0,0,0),Vt(a)}}class Yi extends Fe{constructor(){super(...arguments);j(this,"priority",130);j(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,r){return zt(r==="u"?4:r.length,e)}set(e,r,o){return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class Ui extends Fe{constructor(){super(...arguments);j(this,"priority",120);j(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,o){switch(r){case"Q":case"QQ":return Le(r.length,e);case"Qo":return o.ordinalNumber(e,{unit:"quarter"});case"QQQ":return o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(e,{width:"wide",context:"formatting"})||o.quarter(e,{width:"abbreviated",context:"formatting"})||o.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class Xi extends Fe{constructor(){super(...arguments);j(this,"priority",120);j(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,r,o){switch(r){case"q":case"qq":return Le(r.length,e);case"qo":return o.ordinalNumber(e,{unit:"quarter"});case"qqq":return o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return o.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(e,{width:"wide",context:"standalone"})||o.quarter(e,{width:"abbreviated",context:"standalone"})||o.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,o){return e.setMonth((o-1)*3,1),e.setHours(0,0,0,0),e}}class Qi extends Fe{constructor(){super(...arguments);j(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);j(this,"priority",110)}parse(e,r,o){const a=s=>s-1;switch(r){case"M":return Ae(Re(qe.month,e),a);case"MM":return Ae(Le(2,e),a);case"Mo":return Ae(o.ordinalNumber(e,{unit:"month"}),a);case"MMM":return o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return o.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(e,{width:"wide",context:"formatting"})||o.month(e,{width:"abbreviated",context:"formatting"})||o.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}class Ki extends Fe{constructor(){super(...arguments);j(this,"priority",110);j(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,r,o){const a=s=>s-1;switch(r){case"L":return Ae(Re(qe.month,e),a);case"LL":return Ae(Le(2,e),a);case"Lo":return Ae(o.ordinalNumber(e,{unit:"month"}),a);case"LLL":return o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return o.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(e,{width:"wide",context:"standalone"})||o.month(e,{width:"abbreviated",context:"standalone"})||o.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,o){return e.setMonth(o,1),e.setHours(0,0,0,0),e}}function Ji(n,t,e){const r=Ye(n),o=Bn(r,e)-t;return r.setDate(r.getDate()-o*7),r}class Zi extends Fe{constructor(){super(...arguments);j(this,"priority",100);j(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,r,o){switch(r){case"w":return Re(qe.week,e);case"wo":return o.ordinalNumber(e,{unit:"week"});default:return Le(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,o,a){return vt(Ji(e,o,a),a)}}function ea(n,t){const e=Ye(n),r=jn(e)-t;return e.setDate(e.getDate()-r*7),e}class ta extends Fe{constructor(){super(...arguments);j(this,"priority",100);j(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,r,o){switch(r){case"I":return Re(qe.week,e);case"Io":return o.ordinalNumber(e,{unit:"week"});default:return Le(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,o){return Vt(ea(e,o))}}const na=[31,28,31,30,31,30,31,31,30,31,30,31],ra=[31,29,31,30,31,30,31,31,30,31,30,31];class oa extends Fe{constructor(){super(...arguments);j(this,"priority",90);j(this,"subPriority",1);j(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,r,o){switch(r){case"d":return Re(qe.date,e);case"do":return o.ordinalNumber(e,{unit:"date"});default:return Le(r.length,e)}}validate(e,r){const o=e.getFullYear(),a=Xn(o),s=e.getMonth();return a?r>=1&&r<=ra[s]:r>=1&&r<=na[s]}set(e,r,o){return e.setDate(o),e.setHours(0,0,0,0),e}}class ia extends Fe{constructor(){super(...arguments);j(this,"priority",90);j(this,"subpriority",1);j(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,r,o){switch(r){case"D":case"DD":return Re(qe.dayOfYear,e);case"Do":return o.ordinalNumber(e,{unit:"date"});default:return Le(r.length,e)}}validate(e,r){const o=e.getFullYear();return Xn(o)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,o){return e.setMonth(0,o),e.setHours(0,0,0,0),e}}function sn(n,t,e){var f,p,h,g;const r=Ot(),o=(e==null?void 0:e.weekStartsOn)??((p=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((g=(h=r.locale)==null?void 0:h.options)==null?void 0:g.weekStartsOn)??0,a=Ye(n),s=a.getDay(),c=(t%7+7)%7,u=7-o,d=t<0||t>6?t-(s+u)%7:(c+u)%7-(s+u)%7;return On(a,d)}class aa extends Fe{constructor(){super(...arguments);j(this,"priority",90);j(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,r,o){switch(r){case"E":case"EE":case"EEE":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return o.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,o,a){return e=sn(e,o,a),e.setHours(0,0,0,0),e}}class sa extends Fe{constructor(){super(...arguments);j(this,"priority",90);j(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,r,o,a){const s=l=>{const c=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return Ae(Le(r.length,e),s);case"eo":return Ae(o.ordinalNumber(e,{unit:"day"}),s);case"eee":return o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeeee":return o.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,o,a){return e=sn(e,o,a),e.setHours(0,0,0,0),e}}class la extends Fe{constructor(){super(...arguments);j(this,"priority",90);j(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,r,o,a){const s=l=>{const c=Math.floor((l-1)/7)*7;return(l+a.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return Ae(Le(r.length,e),s);case"co":return Ae(o.ordinalNumber(e,{unit:"day"}),s);case"ccc":return o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"ccccc":return o.day(e,{width:"narrow",context:"standalone"});case"cccccc":return o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return o.day(e,{width:"wide",context:"standalone"})||o.day(e,{width:"abbreviated",context:"standalone"})||o.day(e,{width:"short",context:"standalone"})||o.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,o,a){return e=sn(e,o,a),e.setHours(0,0,0,0),e}}function ca(n,t){const e=Ye(n),r=Ri(e),o=t-r;return On(e,o)}class ua extends Fe{constructor(){super(...arguments);j(this,"priority",90);j(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,r,o){const a=s=>s===0?7:s;switch(r){case"i":case"ii":return Le(r.length,e);case"io":return o.ordinalNumber(e,{unit:"day"});case"iii":return Ae(o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiii":return Ae(o.day(e,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Ae(o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Ae(o.day(e,{width:"wide",context:"formatting"})||o.day(e,{width:"abbreviated",context:"formatting"})||o.day(e,{width:"short",context:"formatting"})||o.day(e,{width:"narrow",context:"formatting"}),a)}}validate(e,r){return r>=1&&r<=7}set(e,r,o){return e=ca(e,o),e.setHours(0,0,0,0),e}}class da extends Fe{constructor(){super(...arguments);j(this,"priority",80);j(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,r,o){switch(r){case"a":case"aa":case"aaa":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,o){return e.setHours(an(o),0,0,0),e}}class fa extends Fe{constructor(){super(...arguments);j(this,"priority",80);j(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,r,o){switch(r){case"b":case"bb":case"bbb":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,o){return e.setHours(an(o),0,0,0),e}}class ma extends Fe{constructor(){super(...arguments);j(this,"priority",80);j(this,"incompatibleTokens",["a","b","t","T"])}parse(e,r,o){switch(r){case"B":case"BB":case"BBB":return o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return o.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(e,{width:"wide",context:"formatting"})||o.dayPeriod(e,{width:"abbreviated",context:"formatting"})||o.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,o){return e.setHours(an(o),0,0,0),e}}class pa extends Fe{constructor(){super(...arguments);j(this,"priority",70);j(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,r,o){switch(r){case"h":return Re(qe.hour12h,e);case"ho":return o.ordinalNumber(e,{unit:"hour"});default:return Le(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,o){const a=e.getHours()>=12;return a&&o<12?e.setHours(o+12,0,0,0):!a&&o===12?e.setHours(0,0,0,0):e.setHours(o,0,0,0),e}}class ha extends Fe{constructor(){super(...arguments);j(this,"priority",70);j(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,r,o){switch(r){case"H":return Re(qe.hour23h,e);case"Ho":return o.ordinalNumber(e,{unit:"hour"});default:return Le(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,o){return e.setHours(o,0,0,0),e}}class ga extends Fe{constructor(){super(...arguments);j(this,"priority",70);j(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,r,o){switch(r){case"K":return Re(qe.hour11h,e);case"Ko":return o.ordinalNumber(e,{unit:"hour"});default:return Le(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,o){return e.getHours()>=12&&o<12?e.setHours(o+12,0,0,0):e.setHours(o,0,0,0),e}}class va extends Fe{constructor(){super(...arguments);j(this,"priority",70);j(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,r,o){switch(r){case"k":return Re(qe.hour24h,e);case"ko":return o.ordinalNumber(e,{unit:"hour"});default:return Le(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,o){const a=o<=24?o%24:o;return e.setHours(a,0,0,0),e}}class ya extends Fe{constructor(){super(...arguments);j(this,"priority",60);j(this,"incompatibleTokens",["t","T"])}parse(e,r,o){switch(r){case"m":return Re(qe.minute,e);case"mo":return o.ordinalNumber(e,{unit:"minute"});default:return Le(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,o){return e.setMinutes(o,0,0),e}}class wa extends Fe{constructor(){super(...arguments);j(this,"priority",50);j(this,"incompatibleTokens",["t","T"])}parse(e,r,o){switch(r){case"s":return Re(qe.second,e);case"so":return o.ordinalNumber(e,{unit:"second"});default:return Le(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,o){return e.setSeconds(o,0),e}}class ba extends Fe{constructor(){super(...arguments);j(this,"priority",30);j(this,"incompatibleTokens",["t","T"])}parse(e,r){const o=a=>Math.trunc(a*Math.pow(10,-r.length+3));return Ae(Le(r.length,e),o)}set(e,r,o){return e.setMilliseconds(o),e}}class Ca extends Fe{constructor(){super(...arguments);j(this,"priority",10);j(this,"incompatibleTokens",["t","T","x"])}parse(e,r){switch(r){case"X":return ct(lt.basicOptionalMinutes,e);case"XX":return ct(lt.basic,e);case"XXXX":return ct(lt.basicOptionalSeconds,e);case"XXXXX":return ct(lt.extendedOptionalSeconds,e);case"XXX":default:return ct(lt.extended,e)}}set(e,r,o){return r.timestampIsSet?e:We(e,e.getTime()-At(e)-o)}}class xa extends Fe{constructor(){super(...arguments);j(this,"priority",10);j(this,"incompatibleTokens",["t","T","X"])}parse(e,r){switch(r){case"x":return ct(lt.basicOptionalMinutes,e);case"xx":return ct(lt.basic,e);case"xxxx":return ct(lt.basicOptionalSeconds,e);case"xxxxx":return ct(lt.extendedOptionalSeconds,e);case"xxx":default:return ct(lt.extended,e)}}set(e,r,o){return r.timestampIsSet?e:We(e,e.getTime()-At(e)-o)}}class _a extends Fe{constructor(){super(...arguments);j(this,"priority",40);j(this,"incompatibleTokens","*")}parse(e){return Yn(e)}set(e,r,o){return[We(e,o*1e3),{timestampIsSet:!0}]}}class Sa extends Fe{constructor(){super(...arguments);j(this,"priority",20);j(this,"incompatibleTokens","*")}parse(e){return Yn(e)}set(e,r,o){return[We(e,o),{timestampIsSet:!0}]}}const Ta={G:new qi,y:new Ai,Y:new zi,R:new Gi,u:new Yi,Q:new Ui,q:new Xi,M:new Qi,L:new Ki,w:new Zi,I:new ta,d:new oa,D:new ia,E:new aa,e:new sa,c:new la,i:new ua,a:new da,b:new fa,B:new ma,h:new pa,H:new ha,K:new ga,k:new va,m:new ya,s:new wa,S:new ba,X:new Ca,x:new xa,t:new _a,T:new Sa},ka=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ma=/^'([^]*?)'?$/,Ea=/''/g,Na=/\S/,Oa=/[a-zA-Z]/;function Qn(n,t,e,r){var E,S,w,b;const o=Bi(),a=o.locale??Pn,s=o.firstWeekContainsDate??((S=(E=o.locale)==null?void 0