prlg-ui 1.8.299 → 1.8.301

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rekaUI.d.ts CHANGED
@@ -129,7 +129,6 @@ import { PaginationEllipsisProps } from 'reka-ui';
129
129
  import { PaginationFirstProps } from 'reka-ui';
130
130
  import { PaginationLastProps } from 'reka-ui';
131
131
  import { PaginationListItemProps } from 'reka-ui';
132
- import { PaginationListProps } from 'reka-ui';
133
132
  import { PaginationNextProps } from 'reka-ui';
134
133
  import { PaginationPrevProps } from 'reka-ui';
135
134
  import { PaginationRoot } from 'reka-ui';
@@ -414,7 +413,9 @@ outlined: boolean;
414
413
  type: "error" | "info" | "warning";
415
414
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
416
415
 
417
- declare const __VLS_component_54: DefineComponent<PaginationListProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PaginationListProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
416
+ declare const __VLS_component_54: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {} | {
417
+ [x: string]: any;
418
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
418
419
 
419
420
  declare const __VLS_component_55: DefineComponent<PaginationListItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<PaginationListItemProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
420
421
 
@@ -465,8 +466,8 @@ swipeDirection: "left" | "right" | "up" | "down";
465
466
 
466
467
  declare const __VLS_component_63: DefineComponent<IToastRootProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
467
468
  pause: () => any;
468
- "update:open": (value: boolean) => any;
469
469
  escapeKeyDown: (event: KeyboardEvent) => any;
470
+ "update:open": (value: boolean) => any;
470
471
  resume: () => any;
471
472
  swipeStart: (event: {
472
473
  currentTarget: EventTarget & HTMLElement;
@@ -506,8 +507,8 @@ y: number;
506
507
  }>, "currentTarget">) => any;
507
508
  }, string, PublicProps, Readonly<IToastRootProps> & Readonly<{
508
509
  onPause?: (() => any) | undefined;
509
- "onUpdate:open"?: ((value: boolean) => any) | undefined;
510
510
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
511
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
511
512
  onResume?: (() => any) | undefined;
512
513
  onSwipeStart?: ((event: {
513
514
  currentTarget: EventTarget & HTMLElement;
@@ -2246,19 +2247,19 @@ export declare const Badge: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, Compo
2246
2247
 
2247
2248
  export declare const Breadcrumb: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2248
2249
 
2249
- export declare const breakpoints: Record<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl", ComputedRef<boolean>> & {
2250
- greaterOrEqual: (k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">) => ComputedRef<boolean>;
2251
- smallerOrEqual: (k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">) => ComputedRef<boolean>;
2252
- greater(k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): ComputedRef<boolean>;
2253
- smaller(k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): ComputedRef<boolean>;
2254
- between(a: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">, b: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): ComputedRef<boolean>;
2255
- isGreater(k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): boolean;
2256
- isGreaterOrEqual(k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): boolean;
2257
- isSmaller(k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): boolean;
2258
- isSmallerOrEqual(k: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): boolean;
2259
- isInBetween(a: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">, b: MaybeRefOrGetter<"sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">): boolean;
2260
- current: () => ComputedRef<("sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl")[]>;
2261
- active(): ComputedRef<"" | "sm" | "lg" | "xl" | "mobile" | "md" | "xxl" | "xxxl">;
2250
+ export declare const breakpoints: Record<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl", ComputedRef<boolean>> & {
2251
+ greaterOrEqual: (k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">) => ComputedRef<boolean>;
2252
+ smallerOrEqual: (k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">) => ComputedRef<boolean>;
2253
+ greater(k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): ComputedRef<boolean>;
2254
+ smaller(k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): ComputedRef<boolean>;
2255
+ between(a: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">, b: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): ComputedRef<boolean>;
2256
+ isGreater(k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): boolean;
2257
+ isGreaterOrEqual(k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): boolean;
2258
+ isSmaller(k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): boolean;
2259
+ isSmallerOrEqual(k: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): boolean;
2260
+ isInBetween(a: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">, b: MaybeRefOrGetter<"mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">): boolean;
2261
+ current: () => ComputedRef<("mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl")[]>;
2262
+ active(): ComputedRef<"" | "mobile" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">;
2262
2263
  };
2263
2264
 
2264
2265
  export declare const Button: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, __VLS_TemplateResult_12["slots"]>;
@@ -2872,6 +2873,7 @@ declare type InputTextProps = {
2872
2873
  readonly?: boolean;
2873
2874
  maxlength?: number;
2874
2875
  showMaxLength?: boolean;
2876
+ showSearch?: boolean;
2875
2877
  };
2876
2878
 
2877
2879
  declare type InputTextProps_2 = InputPhoneProps;
@@ -3154,7 +3156,7 @@ export declare function useToast(): {
3154
3156
  __isFragment?: never;
3155
3157
  __isTeleport?: never;
3156
3158
  __isSuspense?: never;
3157
- } | {
3159
+ } | AsTag | {
3158
3160
  [x: string]: any;
3159
3161
  setup?: ((this: void, props: LooseRequired<any>, ctx: {
3160
3162
  attrs: {
@@ -3270,7 +3272,7 @@ export declare function useToast(): {
3270
3272
  beforeRouteEnter?: (TypesConfig extends Record<"beforeRouteEnter", infer T> ? T : NavigationGuardWithThis<undefined>) | undefined;
3271
3273
  beforeRouteUpdate?: (TypesConfig extends Record<"beforeRouteUpdate", infer T> ? T : NavigationGuard) | undefined;
3272
3274
  beforeRouteLeave?: (TypesConfig extends Record<"beforeRouteLeave", infer T> ? T : NavigationGuard) | undefined;
3273
- } | AsTag | undefined;
3275
+ } | undefined;
3274
3276
  id: string;
3275
3277
  title?: string | undefined;
3276
3278
  description?: StringOrVNode | undefined;
@@ -1,8 +1,8 @@
1
- @use './reset.scss';
2
- @use './colors.scss';
3
- @use './root-vars.scss';
4
- @use './mixins.scss' as *;
5
- @use './fonts.scss';
1
+ @use "./reset.scss";
2
+ @use "./colors.scss";
3
+ @use "./root-vars.scss";
4
+ @use "./mixins.scss" as *;
5
+ @use "./fonts.scss";
6
6
 
7
7
  .container {
8
8
  width: 100%;
@@ -32,5 +32,4 @@
32
32
  font-size: 24px;
33
33
  line-height: 120%;
34
34
  color: var(--theme-neutral-text-title);
35
- text-transform: uppercase;
36
- }
35
+ }
@@ -1,7 +1,7 @@
1
1
  import { p as o } from "./parseFileSize.util-BAG-MLFl.js";
2
- function s(e) {
2
+ function p(e) {
3
3
  if (!e) return;
4
- const a = Array.isArray(e) ? e : [e], i = {
4
+ const n = Array.isArray(e) ? e : [e], i = {
5
5
  image: ["image/*"],
6
6
  pdf: ["application/pdf"],
7
7
  excel: [
@@ -14,24 +14,33 @@ function s(e) {
14
14
  ],
15
15
  all: ["*/*"]
16
16
  };
17
- return a.flatMap((l) => i[l] || []).join(",");
17
+ return n.flatMap((l) => i[l] || []).join(",");
18
18
  }
19
- function p(e = {}) {
20
- return new Promise((a) => {
19
+ function f(e = {}) {
20
+ return new Promise((n) => {
21
21
  const i = document.createElement("input");
22
22
  i.type = "file", i.style.display = "none", e.multiple && e.maxFiles && e.maxFiles > 1 && (i.multiple = !0);
23
- const l = s(e.accept);
23
+ const l = p(e.accept);
24
24
  l && (i.accept = l), i.addEventListener("change", (r) => {
25
- const n = r.target;
25
+ const m = r.target;
26
26
  let t = [];
27
- if (n.files && n.files.length > 0 && (t = Array.from(n.files), e.maxFiles && t.length > e.maxFiles && (t = t.slice(0, e.maxFiles)), e.maxFileSize)) {
28
- const m = o(e.maxFileSize);
29
- t = t.filter((c) => c.size <= m);
27
+ if (m.files && m.files.length > 0 && (t = Array.from(m.files), e.maxFiles && t.length > e.maxFiles && (t = t.slice(0, e.maxFiles)), e.maxFileSize)) {
28
+ const a = o(e.maxFileSize);
29
+ t = t.filter((s) => s.size <= a);
30
30
  }
31
- a(t), document.body.removeChild(i);
31
+ const c = t.map((a) => ({
32
+ id: crypto.randomUUID(),
33
+ // Генерируем уникальный ID. Требует HTTPS в продакшене.
34
+ url: URL.createObjectURL(a),
35
+ // Создаем временный URL для файла
36
+ name: a.name,
37
+ mime: a.type,
38
+ size: a.size
39
+ }));
40
+ n(c), document.body.removeChild(i);
32
41
  }), document.body.appendChild(i), i.click();
33
42
  });
34
43
  }
35
44
  export {
36
- p as o
45
+ f as o
37
46
  };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("./parseFileSize.util-zKz6zjwq.cjs");function p(e){if(!e)return;const n=Array.isArray(e)?e:[e],i={image:["image/*"],pdf:["application/pdf"],excel:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],word:["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],all:["*/*"]};return n.flatMap(a=>i[a]||[]).join(",")}function d(e={}){return new Promise(n=>{const i=document.createElement("input");i.type="file",i.style.display="none",e.multiple&&e.maxFiles&&e.maxFiles>1&&(i.multiple=!0);const a=p(e.accept);a&&(i.accept=a),i.addEventListener("change",c=>{const r=c.target;let t=[];if(r.files&&r.files.length>0&&(t=Array.from(r.files),e.maxFiles&&t.length>e.maxFiles&&(t=t.slice(0,e.maxFiles)),e.maxFileSize)){const l=o.parseFileSize(e.maxFileSize);t=t.filter(s=>s.size<=l)}const m=t.map(l=>({id:crypto.randomUUID(),url:URL.createObjectURL(l),name:l.name,mime:l.type,size:l.size}));n(m),document.body.removeChild(i)}),document.body.appendChild(i),i.click()})}exports.openFileDialog=d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../eventBus.util-K9Yq6hZm.cjs"),z=require("../dayjs.util-DVNMZ0pw.cjs"),I=require("../uploadFile.util-DUsZt4gt.cjs"),J=require("../parseFileSize.util-zKz6zjwq.cjs"),X=6048e5,U=864e5,Y=Symbol.for("constructDateFrom");function b(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Y in t?t[Y](e):t instanceof Date?new t.constructor(e):new Date(e)}function m(t,e){return b(e||t,t)}let K={};function D(){return K}function p(t,e){const n=D(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=m(t,e?.in),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function k(t,e){return p(t,{...e,weekStartsOn:1})}function L(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=b(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=k(a),o=b(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const u=k(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function N(t){const e=m(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function S(t,...e){const n=b.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function T(t,e){const n=m(t,e?.in);return n.setHours(0,0,0,0),n}function Q(t,e,n){const[r,a]=S(n?.in,t,e),i=T(r),o=T(a),u=+i-N(i),d=+o-N(o);return Math.round((u-d)/U)}function Z(t,e){const n=L(t,e),r=b(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),k(r)}function tt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function et(t){return!(!tt(t)&&typeof t!="number"||isNaN(+m(t)))}function nt(t,e,n){const[r,a]=S(n?.in,t,e),i=F(r,a),o=Math.abs(Q(r,a));r.setDate(r.getDate()-i*o);const u=+(F(r,a)===-i),d=i*(o-u);return d===0?0:d}function F(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function rt(t,e){const n=m(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const at={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"}},it=(t,e,n)=>{let r;const a=at[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function M(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ot={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:M({formats:ot,defaultWidth:"full"}),time:M({formats:st,defaultWidth:"full"}),dateTime:M({formats:ut,defaultWidth:"full"})},dt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lt=(t,e,n,r)=>dt[t];function h(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,u=n?.width?String(n.width):o;a=t.formattingValues[u]||t.formattingValues[o]}else{const o=t.defaultWidth,u=n?.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const ft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ht={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"]},gt={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"]},wt={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"}},yt={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"}},bt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vt={ordinalNumber:bt,era:h({values:ft,defaultWidth:"wide"}),quarter:h({values:mt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:ht,defaultWidth:"wide"}),day:h({values:gt,defaultWidth:"wide"}),dayPeriod:h({values:wt,defaultWidth:"wide",formattingValues:yt,defaultFormattingWidth:"wide"})};function g(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(u)?Pt(u,c=>c.test(o)):pt(u,c=>c.test(o));let w;w=t.valueCallback?t.valueCallback(d):d,w=n.valueCallback?n.valueCallback(w):w;const l=e.slice(o.length);return{value:w,rest:l}}}function pt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Pt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function B(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=e.slice(a.length);return{value:o,rest:u}}}const Mt=/^(\d+)(th|st|nd|rd)?/i,Wt=/\d+/i,kt={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},Dt={any:[/^b/i,/^(a|c)/i]},Ot={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},St={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},Gt={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]},Yt={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},Nt={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]},Tt={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},Ft={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}},Et={ordinalNumber:B({matchPattern:Mt,parsePattern:Wt,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:kt,defaultMatchWidth:"wide",parsePatterns:Dt,defaultParseWidth:"any"}),quarter:g({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Gt,defaultParseWidth:"any"}),day:g({matchPatterns:Yt,defaultMatchWidth:"wide",parsePatterns:Nt,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Tt,defaultMatchWidth:"any",parsePatterns:Ft,defaultParseWidth:"any"})},Ct={code:"en-US",formatDistance:it,formatLong:ct,formatRelative:lt,localize:vt,match:Et,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qt(t,e){const n=m(t,e?.in);return Q(n,rt(n))+1}function $t(t,e){const n=m(t,e?.in),r=+k(n)-+Z(n);return Math.round(r/X)+1}function V(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=D(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=b(e?.in||t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=p(o,e),d=b(e?.in||t,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const w=p(d,e);return+n>=+u?r+1:+n>=+w?r:r-1}function Ht(t,e){const n=D(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=V(t,e),i=b(e?.in||t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),p(i,e)}function _t(t,e){const n=m(t,e?.in),r=+p(n,e)-+Ht(n,e);return Math.round(r/X)+1}function s(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return s(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):s(n+1,2)},d(t,e){return s(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return s(t.getHours()%12||12,e.length)},H(t,e){return s(t.getHours(),e.length)},m(t,e){return s(t.getMinutes(),e.length)},s(t,e){return s(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return s(a,e.length)}},P={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=V(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return s(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):s(i,e.length)},R:function(t,e){const n=L(t);return s(n,e.length)},u:function(t,e){const n=t.getFullYear();return s(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=_t(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):s(a,e.length)},I:function(t,e,n){const r=$t(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=qt(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return s(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return s(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return s(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=P.noon:r===0?a=P.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=P.evening:r>=12?a=P.afternoon:r>=4?a=P.morning:a=P.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return q(r);case"XXXX":case"XX":return v(r);case"XXXXX":case"XXX":default:return v(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return q(r);case"xxxx":case"xx":return v(r);case"xxxxx":case"xxx":default:return v(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+C(r,":");case"OOOO":default:return"GMT"+v(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+C(r,":");case"zzzz":default:return"GMT"+v(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return s(r,e.length)},T:function(t,e,n){return s(+t,e.length)}};function C(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+s(i,2)}function q(t,e){return t%60===0?(t>0?"-":"+")+s(Math.abs(t)/60,2):v(t,e)}function v(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=s(Math.trunc(r/60),2),i=s(r%60,2);return n+a+e+i}const $=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},j=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Xt=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return $(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",$(r,e)).replace("{{time}}",j(a,e))},Lt={p:j,P:Xt},Qt=/^D+$/,Bt=/^Y+$/,Vt=["D","DD","YY","YYYY"];function jt(t){return Qt.test(t)}function Rt(t){return Bt.test(t)}function At(t,e,n){const r=zt(t,e,n);if(console.warn(r),Vt.includes(t))throw new RangeError(r)}function zt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const It=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ut=/^'([^]*?)'?$/,Kt=/''/g,Zt=/[a-zA-Z]/;function R(t,e,n){const r=D(),a=n?.locale??r.locale??Ct,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=m(t,n?.in);if(!et(u))throw new RangeError("Invalid time value");let d=e.match(Jt).map(l=>{const c=l[0];if(c==="p"||c==="P"){const O=Lt[c];return O(l,a.formatLong)}return l}).join("").match(It).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const c=l[0];if(c==="'")return{isToken:!1,value:te(l)};if(E[c])return{isToken:!0,value:l};if(c.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+c+"`");return{isToken:!1,value:l}});a.localize.preprocessor&&(d=a.localize.preprocessor(u,d));const w={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return d.map(l=>{if(!l.isToken)return l.value;const c=l.value;(!n?.useAdditionalWeekYearTokens&&Rt(c)||!n?.useAdditionalDayOfYearTokens&&jt(c))&&At(c,e,String(t));const O=E[c[0]];return O(u,c,a.localize,w)}).join("")}function te(t){const e=t.match(Ut);return e?e[1].replace(Kt,"'"):t}function ee(t,e){return+m(t)>+m(e)}function H(t,e,n){const[r,a]=S(n?.in,t,e);return+p(r,n)==+p(a,n)}function W(t,e){if(t.one!==void 0&&e===1)return t.one;const n=e%10,r=e%100;return n===1&&r!==11?t.singularNominative.replace("{{count}}",String(e)):n>=2&&n<=4&&(r<10||r>20)?t.singularGenitive.replace("{{count}}",String(e)):t.pluralGenitive.replace("{{count}}",String(e))}function f(t){return(e,n)=>n?.addSuffix?n.comparison&&n.comparison>0?t.future?W(t.future,e):"через "+W(t.regular,e):t.past?W(t.past,e):W(t.regular,e)+" назад":W(t.regular,e)}const ne={lessThanXSeconds:f({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:f({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(t,e)=>e?.addSuffix?e.comparison&&e.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:f({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:f({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:f({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:f({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:f({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:f({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:f({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:f({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:f({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:f({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:f({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:f({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:f({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},re=(t,e,n)=>ne[t](e,n),ae={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},ie={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},oe={any:"{{date}}, {{time}}"},se={date:M({formats:ae,defaultWidth:"full"}),time:M({formats:ie,defaultWidth:"full"}),dateTime:M({formats:oe,defaultWidth:"any"})},G=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ue(t){const e=G[t];switch(t){case 0:return"'в прошлое "+e+" в' p";case 1:case 2:case 4:return"'в прошлый "+e+" в' p";case 3:case 5:case 6:return"'в прошлую "+e+" в' p"}}function _(t){const e=G[t];return t===2?"'во "+e+" в' p":"'в "+e+" в' p"}function ce(t){const e=G[t];switch(t){case 0:return"'в следующее "+e+" в' p";case 1:case 2:case 4:return"'в следующий "+e+" в' p";case 3:case 5:case 6:return"'в следующую "+e+" в' p"}}const de={lastWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ue(r)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ce(r)},other:"P"},le=(t,e,n,r)=>{const a=de[t];return typeof a=="function"?a(e,n,r):a},fe={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},me={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},he={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},ge={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},we={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},ye={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},be={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},ve=(t,e)=>{const n=Number(t),r=e?.unit;let a;return r==="date"?a="-е":r==="week"||r==="minute"||r==="second"?a="-я":a="-й",n+a},pe={ordinalNumber:ve,era:h({values:fe,defaultWidth:"wide"}),quarter:h({values:me,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:he,defaultWidth:"wide",formattingValues:ge,defaultFormattingWidth:"wide"}),day:h({values:we,defaultWidth:"wide"}),dayPeriod:h({values:ye,defaultWidth:"any",formattingValues:be,defaultFormattingWidth:"wide"})},Pe=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,Me=/\d+/i,We={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},ke={any:[/^д/i,/^н/i]},De={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},Oe={any:[/1/i,/2/i,/3/i,/4/i]},xe={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},Se={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},Ge={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},Ye={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},Ne={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},Te={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},Fe={ordinalNumber:B({matchPattern:Pe,parsePattern:Me,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:We,defaultMatchWidth:"wide",parsePatterns:ke,defaultParseWidth:"any"}),quarter:g({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Se,defaultParseWidth:"any"}),day:g({matchPatterns:Ge,defaultMatchWidth:"wide",parsePatterns:Ye,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Ne,defaultMatchWidth:"wide",parsePatterns:Te,defaultParseWidth:"any"})},A={code:"ru",formatDistance:re,formatLong:se,formatRelative:le,localize:pe,match:Fe,options:{weekStartsOn:1,firstWeekContainsDate:1}};function Ee(t){return R(new Date(t),"d MMMM yyyy",{locale:A})}function Ce(t){return R(new Date(t),"d MMMM, HH:mm",{locale:A})}function qe(t,e){return nt(new Date(e),new Date(t))}function $e(t){return ee(new Date,new Date(t))}function He(t,e="₽",n=2){return`${t.toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).replace(/,/g," ")} ${e}`}function _e(t){return t.reduce((e,n)=>e+n,0)}function Xe(t){const e=t.replace(/[^\d.,]/g,"").replace(",",".");return parseFloat(e)||0}exports.EventBus=x.EventBus;exports.Portal=x._sfc_main;exports.useBodyScroll=x.useBodyScroll;exports.onClickOutside=z.onClickOutside;exports.openFileDialog=I.openFileDialog;exports.dayjs=J.dayjs;exports.formatDateReadable=Ee;exports.formatDateWithTime=Ce;exports.formatPrice=He;exports.getDaysBetween=qe;exports.isExpired=$e;exports.parsePrice=Xe;exports.sumPrices=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../eventBus.util-K9Yq6hZm.cjs"),z=require("../dayjs.util-DVNMZ0pw.cjs"),I=require("../uploadFile.util-DRxx7S8i.cjs"),J=require("../parseFileSize.util-zKz6zjwq.cjs"),X=6048e5,U=864e5,Y=Symbol.for("constructDateFrom");function b(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Y in t?t[Y](e):t instanceof Date?new t.constructor(e):new Date(e)}function m(t,e){return b(e||t,t)}let K={};function D(){return K}function p(t,e){const n=D(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=m(t,e?.in),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function k(t,e){return p(t,{...e,weekStartsOn:1})}function L(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=b(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=k(a),o=b(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const u=k(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function N(t){const e=m(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function S(t,...e){const n=b.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function T(t,e){const n=m(t,e?.in);return n.setHours(0,0,0,0),n}function Q(t,e,n){const[r,a]=S(n?.in,t,e),i=T(r),o=T(a),u=+i-N(i),d=+o-N(o);return Math.round((u-d)/U)}function Z(t,e){const n=L(t,e),r=b(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),k(r)}function tt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function et(t){return!(!tt(t)&&typeof t!="number"||isNaN(+m(t)))}function nt(t,e,n){const[r,a]=S(n?.in,t,e),i=F(r,a),o=Math.abs(Q(r,a));r.setDate(r.getDate()-i*o);const u=+(F(r,a)===-i),d=i*(o-u);return d===0?0:d}function F(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function rt(t,e){const n=m(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const at={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"}},it=(t,e,n)=>{let r;const a=at[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function M(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ot={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:M({formats:ot,defaultWidth:"full"}),time:M({formats:st,defaultWidth:"full"}),dateTime:M({formats:ut,defaultWidth:"full"})},dt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lt=(t,e,n,r)=>dt[t];function h(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,u=n?.width?String(n.width):o;a=t.formattingValues[u]||t.formattingValues[o]}else{const o=t.defaultWidth,u=n?.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const ft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ht={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"]},gt={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"]},wt={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"}},yt={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"}},bt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vt={ordinalNumber:bt,era:h({values:ft,defaultWidth:"wide"}),quarter:h({values:mt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:ht,defaultWidth:"wide"}),day:h({values:gt,defaultWidth:"wide"}),dayPeriod:h({values:wt,defaultWidth:"wide",formattingValues:yt,defaultFormattingWidth:"wide"})};function g(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(u)?Pt(u,c=>c.test(o)):pt(u,c=>c.test(o));let w;w=t.valueCallback?t.valueCallback(d):d,w=n.valueCallback?n.valueCallback(w):w;const l=e.slice(o.length);return{value:w,rest:l}}}function pt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Pt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function B(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=e.slice(a.length);return{value:o,rest:u}}}const Mt=/^(\d+)(th|st|nd|rd)?/i,Wt=/\d+/i,kt={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},Dt={any:[/^b/i,/^(a|c)/i]},Ot={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},St={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},Gt={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]},Yt={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},Nt={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]},Tt={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},Ft={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}},Et={ordinalNumber:B({matchPattern:Mt,parsePattern:Wt,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:kt,defaultMatchWidth:"wide",parsePatterns:Dt,defaultParseWidth:"any"}),quarter:g({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Gt,defaultParseWidth:"any"}),day:g({matchPatterns:Yt,defaultMatchWidth:"wide",parsePatterns:Nt,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Tt,defaultMatchWidth:"any",parsePatterns:Ft,defaultParseWidth:"any"})},Ct={code:"en-US",formatDistance:it,formatLong:ct,formatRelative:lt,localize:vt,match:Et,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qt(t,e){const n=m(t,e?.in);return Q(n,rt(n))+1}function $t(t,e){const n=m(t,e?.in),r=+k(n)-+Z(n);return Math.round(r/X)+1}function V(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=D(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=b(e?.in||t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=p(o,e),d=b(e?.in||t,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const w=p(d,e);return+n>=+u?r+1:+n>=+w?r:r-1}function Ht(t,e){const n=D(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=V(t,e),i=b(e?.in||t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),p(i,e)}function _t(t,e){const n=m(t,e?.in),r=+p(n,e)-+Ht(n,e);return Math.round(r/X)+1}function s(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return s(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):s(n+1,2)},d(t,e){return s(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return s(t.getHours()%12||12,e.length)},H(t,e){return s(t.getHours(),e.length)},m(t,e){return s(t.getMinutes(),e.length)},s(t,e){return s(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return s(a,e.length)}},P={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=V(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return s(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):s(i,e.length)},R:function(t,e){const n=L(t);return s(n,e.length)},u:function(t,e){const n=t.getFullYear();return s(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=_t(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):s(a,e.length)},I:function(t,e,n){const r=$t(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=qt(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return s(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return s(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return s(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=P.noon:r===0?a=P.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=P.evening:r>=12?a=P.afternoon:r>=4?a=P.morning:a=P.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return q(r);case"XXXX":case"XX":return v(r);case"XXXXX":case"XXX":default:return v(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return q(r);case"xxxx":case"xx":return v(r);case"xxxxx":case"xxx":default:return v(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+C(r,":");case"OOOO":default:return"GMT"+v(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+C(r,":");case"zzzz":default:return"GMT"+v(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return s(r,e.length)},T:function(t,e,n){return s(+t,e.length)}};function C(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+s(i,2)}function q(t,e){return t%60===0?(t>0?"-":"+")+s(Math.abs(t)/60,2):v(t,e)}function v(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=s(Math.trunc(r/60),2),i=s(r%60,2);return n+a+e+i}const $=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},j=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Xt=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return $(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",$(r,e)).replace("{{time}}",j(a,e))},Lt={p:j,P:Xt},Qt=/^D+$/,Bt=/^Y+$/,Vt=["D","DD","YY","YYYY"];function jt(t){return Qt.test(t)}function Rt(t){return Bt.test(t)}function At(t,e,n){const r=zt(t,e,n);if(console.warn(r),Vt.includes(t))throw new RangeError(r)}function zt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const It=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ut=/^'([^]*?)'?$/,Kt=/''/g,Zt=/[a-zA-Z]/;function R(t,e,n){const r=D(),a=n?.locale??r.locale??Ct,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=m(t,n?.in);if(!et(u))throw new RangeError("Invalid time value");let d=e.match(Jt).map(l=>{const c=l[0];if(c==="p"||c==="P"){const O=Lt[c];return O(l,a.formatLong)}return l}).join("").match(It).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const c=l[0];if(c==="'")return{isToken:!1,value:te(l)};if(E[c])return{isToken:!0,value:l};if(c.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+c+"`");return{isToken:!1,value:l}});a.localize.preprocessor&&(d=a.localize.preprocessor(u,d));const w={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return d.map(l=>{if(!l.isToken)return l.value;const c=l.value;(!n?.useAdditionalWeekYearTokens&&Rt(c)||!n?.useAdditionalDayOfYearTokens&&jt(c))&&At(c,e,String(t));const O=E[c[0]];return O(u,c,a.localize,w)}).join("")}function te(t){const e=t.match(Ut);return e?e[1].replace(Kt,"'"):t}function ee(t,e){return+m(t)>+m(e)}function H(t,e,n){const[r,a]=S(n?.in,t,e);return+p(r,n)==+p(a,n)}function W(t,e){if(t.one!==void 0&&e===1)return t.one;const n=e%10,r=e%100;return n===1&&r!==11?t.singularNominative.replace("{{count}}",String(e)):n>=2&&n<=4&&(r<10||r>20)?t.singularGenitive.replace("{{count}}",String(e)):t.pluralGenitive.replace("{{count}}",String(e))}function f(t){return(e,n)=>n?.addSuffix?n.comparison&&n.comparison>0?t.future?W(t.future,e):"через "+W(t.regular,e):t.past?W(t.past,e):W(t.regular,e)+" назад":W(t.regular,e)}const ne={lessThanXSeconds:f({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:f({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(t,e)=>e?.addSuffix?e.comparison&&e.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:f({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:f({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:f({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:f({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:f({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:f({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:f({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:f({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:f({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:f({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:f({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:f({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:f({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},re=(t,e,n)=>ne[t](e,n),ae={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},ie={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},oe={any:"{{date}}, {{time}}"},se={date:M({formats:ae,defaultWidth:"full"}),time:M({formats:ie,defaultWidth:"full"}),dateTime:M({formats:oe,defaultWidth:"any"})},G=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ue(t){const e=G[t];switch(t){case 0:return"'в прошлое "+e+" в' p";case 1:case 2:case 4:return"'в прошлый "+e+" в' p";case 3:case 5:case 6:return"'в прошлую "+e+" в' p"}}function _(t){const e=G[t];return t===2?"'во "+e+" в' p":"'в "+e+" в' p"}function ce(t){const e=G[t];switch(t){case 0:return"'в следующее "+e+" в' p";case 1:case 2:case 4:return"'в следующий "+e+" в' p";case 3:case 5:case 6:return"'в следующую "+e+" в' p"}}const de={lastWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ue(r)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ce(r)},other:"P"},le=(t,e,n,r)=>{const a=de[t];return typeof a=="function"?a(e,n,r):a},fe={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},me={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},he={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},ge={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},we={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},ye={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},be={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},ve=(t,e)=>{const n=Number(t),r=e?.unit;let a;return r==="date"?a="-е":r==="week"||r==="minute"||r==="second"?a="-я":a="-й",n+a},pe={ordinalNumber:ve,era:h({values:fe,defaultWidth:"wide"}),quarter:h({values:me,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:he,defaultWidth:"wide",formattingValues:ge,defaultFormattingWidth:"wide"}),day:h({values:we,defaultWidth:"wide"}),dayPeriod:h({values:ye,defaultWidth:"any",formattingValues:be,defaultFormattingWidth:"wide"})},Pe=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,Me=/\d+/i,We={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},ke={any:[/^д/i,/^н/i]},De={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},Oe={any:[/1/i,/2/i,/3/i,/4/i]},xe={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},Se={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},Ge={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},Ye={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},Ne={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},Te={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},Fe={ordinalNumber:B({matchPattern:Pe,parsePattern:Me,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:We,defaultMatchWidth:"wide",parsePatterns:ke,defaultParseWidth:"any"}),quarter:g({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Se,defaultParseWidth:"any"}),day:g({matchPatterns:Ge,defaultMatchWidth:"wide",parsePatterns:Ye,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Ne,defaultMatchWidth:"wide",parsePatterns:Te,defaultParseWidth:"any"})},A={code:"ru",formatDistance:re,formatLong:se,formatRelative:le,localize:pe,match:Fe,options:{weekStartsOn:1,firstWeekContainsDate:1}};function Ee(t){return R(new Date(t),"d MMMM yyyy",{locale:A})}function Ce(t){return R(new Date(t),"d MMMM, HH:mm",{locale:A})}function qe(t,e){return nt(new Date(e),new Date(t))}function $e(t){return ee(new Date,new Date(t))}function He(t,e="₽",n=2){return`${t.toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).replace(/,/g," ")} ${e}`}function _e(t){return t.reduce((e,n)=>e+n,0)}function Xe(t){const e=t.replace(/[^\d.,]/g,"").replace(",",".");return parseFloat(e)||0}exports.EventBus=x.EventBus;exports.Portal=x._sfc_main;exports.useBodyScroll=x.useBodyScroll;exports.onClickOutside=z.onClickOutside;exports.openFileDialog=I.openFileDialog;exports.dayjs=J.dayjs;exports.formatDateReadable=Ee;exports.formatDateWithTime=Ce;exports.formatPrice=He;exports.getDaysBetween=qe;exports.isExpired=$e;exports.parsePrice=Xe;exports.sumPrices=_e;
@@ -1,6 +1,6 @@
1
1
  import { E as Xe, _ as _e, u as Le } from "../eventBus.util-msbJpg6N.js";
2
2
  import { o as Ve } from "../dayjs.util-DSjkslnJ.js";
3
- import { o as Re } from "../uploadFile.util-CTWK4zza.js";
3
+ import { o as Re } from "../uploadFile.util-CVNZsSl4.js";
4
4
  import { d as Ae } from "../parseFileSize.util-BAG-MLFl.js";
5
5
  const X = 6048e5, A = 864e5, G = Symbol.for("constructDateFrom");
6
6
  function b(t, e) {
@@ -1,43 +1,44 @@
1
- import { parseFileSize } from '@/utils/parseFileSize.util'
1
+ import type { IFile } from "@/reka-ui";
2
+ import { parseFileSize } from "@/utils/parseFileSize.util";
2
3
 
3
- type FileType = 'image' | 'pdf' | 'excel' | 'word' | 'all';
4
+ type FileType = "image" | "pdf" | "excel" | "word" | "all";
4
5
 
5
6
  interface OpenFileDialogOptions {
6
- accept?: FileType | FileType[];
7
- maxFileSize?: string; // например, "5mb"
8
- maxFiles?: number;
9
- multiple?: boolean;
7
+ accept?: FileType | FileType[];
8
+ maxFileSize?: string; // например, "5mb"
9
+ maxFiles?: number;
10
+ multiple?: boolean;
10
11
  }
11
12
 
12
13
  /**
13
14
  * Преобразует типы файлов в accept-строку для input[type="file"]
14
15
  */
15
16
  function getAcceptString(accept?: FileType | FileType[]): string | undefined {
16
- if (!accept) return undefined;
17
- const types = Array.isArray(accept) ? accept : [accept];
18
- const map: Record<FileType, string[]> = {
19
- image: ['image/*'],
20
- pdf: ['application/pdf'],
21
- excel: [
22
- 'application/vnd.ms-excel',
23
- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
24
- ],
25
- word: [
26
- 'application/msword',
27
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
28
- ],
29
- all: ['*/*']
30
- };
31
- return types.flatMap(type => map[type] || []).join(',');
17
+ if (!accept) return undefined;
18
+ const types = Array.isArray(accept) ? accept : [accept];
19
+ const map: Record<FileType, string[]> = {
20
+ image: ["image/*"],
21
+ pdf: ["application/pdf"],
22
+ excel: [
23
+ "application/vnd.ms-excel",
24
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
25
+ ],
26
+ word: [
27
+ "application/msword",
28
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
29
+ ],
30
+ all: ["*/*"],
31
+ };
32
+ return types.flatMap((type) => map[type] || []).join(",");
32
33
  }
33
34
 
34
35
  /**
35
36
  * Открывает окно выбора файла для загрузки с ограничениями.
36
37
  * @param options - настройки выбора файлов
37
- * @returns {Promise<File[]>} - промис с выбранными файлами
38
+ * @returns {Promise<IFile[]>} - промис с выбранными файлами
38
39
  *
39
40
  * Пример использования:
40
- *
41
+ *
41
42
  * openFileDialog({
42
43
  * accept: ['image', 'pdf'],
43
44
  * maxFileSize: '5mb',
@@ -47,48 +48,56 @@ function getAcceptString(accept?: FileType | FileType[]): string | undefined {
47
48
  * console.log(files);
48
49
  * });
49
50
  */
50
- export function openFileDialog(options: OpenFileDialogOptions = {}): Promise<File[]> {
51
- return new Promise((resolve) => {
52
- const input = document.createElement('input');
53
- input.type = 'file';
54
- input.style.display = 'none';
51
+ export function openFileDialog(
52
+ options: OpenFileDialogOptions = {}
53
+ ): Promise<IFile[]> {
54
+ return new Promise((resolve) => {
55
+ const input = document.createElement("input");
56
+ input.type = "file";
57
+ input.style.display = "none";
55
58
 
56
- if (options.multiple && options.maxFiles && options.maxFiles > 1) {
57
- input.multiple = true;
58
- }
59
+ if (options.multiple && options.maxFiles && options.maxFiles > 1) {
60
+ input.multiple = true;
61
+ }
59
62
 
60
- const acceptString = getAcceptString(options.accept);
61
- if (acceptString) {
62
- input.accept = acceptString;
63
- }
63
+ const acceptString = getAcceptString(options.accept);
64
+ if (acceptString) {
65
+ input.accept = acceptString;
66
+ }
64
67
 
65
- input.addEventListener('change', (event: Event) => {
66
- const target = event.target as HTMLInputElement;
67
- let files: File[] = [];
68
-
69
- if (target.files && target.files.length > 0) {
70
- files = Array.from(target.files);
68
+ input.addEventListener("change", (event: Event) => {
69
+ const target = event.target as HTMLInputElement;
70
+ let files: File[] = [];
71
71
 
72
- // Ограничение по количеству файлов
73
- if (options.maxFiles && files.length > options.maxFiles) {
74
- files = files.slice(0, options.maxFiles);
75
- }
72
+ if (target.files && target.files.length > 0) {
73
+ files = Array.from(target.files);
76
74
 
77
- // Ограничение по размеру файла
78
- if (options.maxFileSize) {
79
- const maxSize = parseFileSize(options.maxFileSize);
80
- files = files.filter(file => file.size <= maxSize);
81
- }
82
- }
83
-
84
- resolve(files);
85
- document.body.removeChild(input);
86
- });
75
+ // Ограничение по количеству файлов
76
+ if (options.maxFiles && files.length > options.maxFiles) {
77
+ files = files.slice(0, options.maxFiles);
78
+ }
87
79
 
88
- document.body.appendChild(input);
89
- input.click();
90
- });
91
- }
80
+ // Ограничение по размеру файла
81
+ if (options.maxFileSize) {
82
+ const maxSize = parseFileSize(options.maxFileSize);
83
+ files = files.filter((file) => file.size <= maxSize);
84
+ }
85
+ }
92
86
 
87
+ // Преобразуем массив объектов File в массив объектов IFile
88
+ const iFiles: IFile[] = files.map((file) => ({
89
+ id: crypto.randomUUID(), // Генерируем уникальный ID. Требует HTTPS в продакшене.
90
+ url: URL.createObjectURL(file), // Создаем временный URL для файла
91
+ name: file.name,
92
+ mime: file.type,
93
+ size: file.size,
94
+ }));
93
95
 
96
+ resolve(iFiles);
97
+ document.body.removeChild(input);
98
+ });
94
99
 
100
+ document.body.appendChild(input);
101
+ input.click();
102
+ });
103
+ }
package/dist/utils.d.ts CHANGED
@@ -35,7 +35,7 @@ export { dayjs }
35
35
 
36
36
  export declare function EventBus<Events extends Record<string, any>>(): TypedEventBus<Events>;
37
37
 
38
- declare type FileType = 'image' | 'pdf' | 'excel' | 'word' | 'all';
38
+ declare type FileType = "image" | "pdf" | "excel" | "word" | "all";
39
39
 
40
40
  /**
41
41
  * Форматирует дату в человекочитаемый вид: 20 июня 2025
@@ -62,6 +62,14 @@ export declare function getDaysBetween(start: string | Date, end: string | Date)
62
62
 
63
63
  export declare type Handler<T> = (event: T) => void;
64
64
 
65
+ declare interface IFile {
66
+ id: string;
67
+ url: string;
68
+ name?: string;
69
+ mime: string | null;
70
+ size: number | null;
71
+ }
72
+
65
73
  /**
66
74
  * Проверяет, истекла ли дата
67
75
  */
@@ -82,7 +90,7 @@ export declare interface OnClickOutsideOptions {
82
90
  /**
83
91
  * Открывает окно выбора файла для загрузки с ограничениями.
84
92
  * @param options - настройки выбора файлов
85
- * @returns {Promise<File[]>} - промис с выбранными файлами
93
+ * @returns {Promise<IFile[]>} - промис с выбранными файлами
86
94
  *
87
95
  * Пример использования:
88
96
  *
@@ -95,7 +103,7 @@ export declare interface OnClickOutsideOptions {
95
103
  * console.log(files);
96
104
  * });
97
105
  */
98
- export declare function openFileDialog(options?: OpenFileDialogOptions): Promise<File[]>;
106
+ export declare function openFileDialog(options?: OpenFileDialogOptions): Promise<IFile[]>;
99
107
 
100
108
  declare interface OpenFileDialogOptions {
101
109
  accept?: FileType | FileType[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prlg-ui",
3
3
  "private": false,
4
- "version": "1.8.299",
4
+ "version": "1.8.301",
5
5
  "type": "module",
6
6
  "main": "dist/prlg-ui.umd.js",
7
7
  "module": "dist/prlg-ui.es.js",
Binary file
@@ -1 +0,0 @@
1
- "use strict";const s=require("./parseFileSize.util-zKz6zjwq.cjs");function o(e){if(!e)return;const a=Array.isArray(e)?e:[e],i={image:["image/*"],pdf:["application/pdf"],excel:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],word:["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],all:["*/*"]};return a.flatMap(t=>i[t]||[]).join(",")}function d(e={}){return new Promise(a=>{const i=document.createElement("input");i.type="file",i.style.display="none",e.multiple&&e.maxFiles&&e.maxFiles>1&&(i.multiple=!0);const t=o(e.accept);t&&(i.accept=t),i.addEventListener("change",r=>{const n=r.target;let l=[];if(n.files&&n.files.length>0&&(l=Array.from(n.files),e.maxFiles&&l.length>e.maxFiles&&(l=l.slice(0,e.maxFiles)),e.maxFileSize)){const c=s.parseFileSize(e.maxFileSize);l=l.filter(m=>m.size<=c)}a(l),document.body.removeChild(i)}),document.body.appendChild(i),i.click()})}exports.openFileDialog=d;