@efficiency-point/design-system 0.1.23 → 0.1.25

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/README.md CHANGED
@@ -185,6 +185,25 @@ export function Example() {
185
185
  />
186
186
  ```
187
187
 
188
+ Для данных, уже разбитых сервером на страницы, используется явный controlled-режим.
189
+ `page` нумеруется с единицы, `totalCount` содержит общее число строк, а
190
+ `onPageChange` запускает загрузку выбранной страницы. В этом режиме `data` не
191
+ разбивается повторно; при `loading` пагинация остаётся видимой и временно
192
+ недоступной, если известен `totalCount`.
193
+
194
+ ```tsx
195
+ <DSDataTable
196
+ columns={columns}
197
+ data={currentPageRows}
198
+ pagination
199
+ paginationMode="server"
200
+ page={page}
201
+ pageSize={30}
202
+ totalCount={totalCount}
203
+ onPageChange={setPage}
204
+ />
205
+ ```
206
+
188
207
  `DSSort` можно использовать отдельно для сортировки по полям объектов или строковым значениям.
189
208
 
190
209
  ### DSFilters
@@ -57,13 +57,17 @@ export type DSDataTableProps<TData extends object> = {
57
57
  className?: string;
58
58
  onRowClick?: (row: TData) => void;
59
59
  pagination?: boolean;
60
+ paginationMode?: 'client' | 'server';
61
+ page?: number;
60
62
  pageSize?: number;
63
+ totalCount?: number;
64
+ onPageChange?: (page: number) => void;
61
65
  visibleColumnIds?: string[];
62
66
  };
63
67
  export type DSDataTablePaginationItem = number | 'ellipsis-start' | 'ellipsis-end';
64
68
  export declare const getDSDataTableColumnStyle: <TData extends object>(column: DSDataTableColumn<TData> | undefined) => CSSProperties | undefined;
65
69
  export declare const getDSDataTablePaginationItems: (currentPage: number, pageCount: number) => DSDataTablePaginationItem[];
66
70
  export declare const validateDSDataTableData: <TData extends object>(columns: DSDataTableColumn<TData>[], data: TData[]) => string | null;
67
- export declare const DSDataTable: <TData extends object>({ columns, data, tableOnMobile, breakpoint, sorting: controlledSorting, onSortingChange, renderMobileCard, getRowId, caption, ariaLabel, loading, error, emptyState, stickyHeader, maxHeight, className, onRowClick, pagination, pageSize, visibleColumnIds, }: DSDataTableProps<TData>) => import("react").JSX.Element;
71
+ export declare const DSDataTable: <TData extends object>({ columns, data, tableOnMobile, breakpoint, sorting: controlledSorting, onSortingChange, renderMobileCard, getRowId, caption, ariaLabel, loading, error, emptyState, stickyHeader, maxHeight, className, onRowClick, pagination, paginationMode, page, pageSize, totalCount, onPageChange, visibleColumnIds, }: DSDataTableProps<TData>) => import("react").JSX.Element;
68
72
  export {};
69
73
  //# sourceMappingURL=DSDataTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSDataTable.d.ts","sourceRoot":"","sources":["../../../src/components/DSDataTable/DSDataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAQH,KAAK,MAAM,EACX,KAAK,YAAY,EACpB,MAAM,uBAAuB,CAAC;AAO/B,QAAA,MAAM,iBAAiB;;;CAGrB,CAAC;AAEH,KAAK,mBAAmB,GAAG,OAAO,iBAAiB,CAAC;AAEpD,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AACpE,KAAK,mBAAmB,CAAC,KAAK,SAAS,MAAM,IACvC,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,CAAC,GAC5B,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC;AAEhC,KAAK,cAAc,CAAC,KAAK,SAAS,MAAM,IAAI,MAAM,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAE/E,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,MAAM,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEtD,MAAM,MAAM,2BAA2B,CAAC,KAAK,IAAI;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9C,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,MAAM,IAAI;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC;IACjD,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,2BAA2B,CAAC,KAAK,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,2BAA2B,CAAC,KAAK,SAAS,MAAM,IAAI;IAC5D,GAAG,EAAE,KAAK,CAAC;IACX,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,KAAK,SAAS,MAAM,IAAI;IACjD,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;IACpC,IAAI,EAAE,KAAK,EAAE,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;IAC9E,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEnF,eAAO,MAAM,yBAAyB,GAAI,KAAK,SAAS,MAAM,EAC1D,QAAQ,iBAAiB,CAAC,KAAK,CAAC,GAAG,SAAS,KAC7C,aAAa,GAAG,SAUlB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACtC,aAAa,MAAM,EACnB,WAAW,MAAM,KAClB,yBAAyB,EAc3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,KAAK,SAAS,MAAM,EACxD,SAAS,iBAAiB,CAAC,KAAK,CAAC,EAAE,EACnC,MAAM,KAAK,EAAE,KACd,MAAM,GAAG,IAoBX,CAAC;AA6IF,eAAO,MAAM,WAAW,GAAI,KAAK,SAAS,MAAM,EAAE,gQAqB/C,gBAAgB,CAAC,KAAK,CAAC,gCA+RzB,CAAC"}
1
+ {"version":3,"file":"DSDataTable.d.ts","sourceRoot":"","sources":["../../../src/components/DSDataTable/DSDataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAQH,KAAK,MAAM,EACX,KAAK,YAAY,EACpB,MAAM,uBAAuB,CAAC;AAO/B,QAAA,MAAM,iBAAiB;;;CAGrB,CAAC;AAEH,KAAK,mBAAmB,GAAG,OAAO,iBAAiB,CAAC;AAEpD,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AACpE,KAAK,mBAAmB,CAAC,KAAK,SAAS,MAAM,IACvC,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,CAAC,GAC5B,CAAC,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC;AAEhC,KAAK,cAAc,CAAC,KAAK,SAAS,MAAM,IAAI,MAAM,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAE/E,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,MAAM,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEtD,MAAM,MAAM,2BAA2B,CAAC,KAAK,IAAI;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9C,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,MAAM,IAAI;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC;IACjD,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE,2BAA2B,CAAC,KAAK,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,2BAA2B,CAAC,KAAK,SAAS,MAAM,IAAI;IAC5D,GAAG,EAAE,KAAK,CAAC;IACX,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,KAAK,SAAS,MAAM,IAAI;IACjD,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;IACpC,IAAI,EAAE,KAAK,EAAE,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;IAC9E,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEnF,eAAO,MAAM,yBAAyB,GAAI,KAAK,SAAS,MAAM,EAC1D,QAAQ,iBAAiB,CAAC,KAAK,CAAC,GAAG,SAAS,KAC7C,aAAa,GAAG,SAUlB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACtC,aAAa,MAAM,EACnB,WAAW,MAAM,KAClB,yBAAyB,EAc3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,KAAK,SAAS,MAAM,EACxD,SAAS,iBAAiB,CAAC,KAAK,CAAC,EAAE,EACnC,MAAM,KAAK,EAAE,KACd,MAAM,GAAG,IAoBX,CAAC;AA6IF,eAAO,MAAM,WAAW,GAAI,KAAK,SAAS,MAAM,EAAE,gTAyB/C,gBAAgB,CAAC,KAAK,CAAC,gCAgTzB,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("@tanstack/react-table"),i=require("zustand");var a={badge:`_badge_1xyff_1`,sm:`_sm_1xyff_29`,md:`_md_1xyff_39`,neutral:`_neutral_1xyff_49`,info:`_info_1xyff_61`,success:`_success_1xyff_73`,warning:`_warning_1xyff_85`,error:`_error_1xyff_97`,dot:`_dot_1xyff_109`,icon:`_icon_1xyff_125`,label:`_label_1xyff_135`},o=({children:t,variant:n=`neutral`,size:r=`md`,dot:i=!1,icon:o,className:s=``})=>(0,e.jsxs)(`span`,{className:`${a.badge} ${a[n]} ${a[r]} ${s}`,children:[i&&(0,e.jsx)(`span`,{className:a.dot,"aria-hidden":`true`}),o&&(0,e.jsx)(`span`,{className:a.icon,"aria-hidden":`true`,children:o}),(0,e.jsx)(`span`,{className:a.label,children:t})]}),s={container:`_container_1jyk1_1`,inner:`_inner_1jyk1_21`,line:`_line_1jyk1_39`,primary:`_primary_1jyk1_57`,secondary:`_secondary_1jyk1_65`,outline:`_outline_1jyk1_73`,ghost:`_ghost_1jyk1_81`,empty:`_empty_1jyk1_89`,destructive:`_destructive_1jyk1_97`,destructiveOutline:`_destructiveOutline_1jyk1_105`,grow:`_grow_1jyk1_1`},c=({variant:t=`primary`})=>(0,e.jsx)(`div`,{className:`${s.container} ${s[t]}`,children:(0,e.jsxs)(`div`,{className:`${s.inner} ${s[t]}`,children:[(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`})]})}),l={button:`_button_8341b_1`,sm:`_sm_8341b_59`,md:`_md_8341b_73`,lg:`_lg_8341b_87`,primary:`_primary_8341b_101`,secondary:`_secondary_8341b_115`,outline:`_outline_8341b_129`,ghost:`_ghost_8341b_143`,empty:`_empty_8341b_157`,destructive:`_destructive_8341b_171`,destructiveOutline:`_destructiveOutline_8341b_183`},u=(0,t.forwardRef)(({children:t,variant:n=`primary`,size:r=`md`,isLoading:i=!1,disabled:a,type:o=`button`,className:s=``,...u},d)=>(0,e.jsx)(`button`,{ref:d,className:`${l.button} ${l[n]} ${l[r]} ${s}`,disabled:a||i,"aria-busy":i||void 0,...u,type:o,children:i?(0,e.jsx)(c,{variant:n}):t}));u.displayName=`DSButton`;var d={label:`_label_1o819_1`,required:`_required_1o819_23`,error:`_error_1o819_25`,optional:`_optional_1o819_33`,hint:`_hint_1o819_35`,disabled:`_disabled_1o819_47`,message:`_message_1o819_55`,success:`_success_1o819_71`},f=({children:t,required:n=!1,optionalText:r,disabled:i=!1,className:a=``,...o})=>(0,e.jsxs)(`label`,{className:`${d.label} ${i?d.disabled:``} ${a}`,...o,children:[(0,e.jsx)(`span`,{children:t}),n&&(0,e.jsx)(`span`,{className:d.required,"aria-hidden":`true`,children:`*`}),r&&(0,e.jsx)(`span`,{className:d.optional,children:r})]}),p=({children:t,variant:n=`hint`,id:r,live:i=!1,className:a=``})=>(0,e.jsx)(`span`,{id:r,className:`${d.message} ${d[n]} ${a}`,role:i&&n===`error`?`alert`:void 0,"aria-live":i&&n!==`error`?`polite`:void 0,children:t}),m=({width:t=24,height:n=24,color:r,title:i,style:a,children:o,...s})=>(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:t,height:n,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,role:i?`img`:void 0,"aria-hidden":!i||void 0,focusable:`false`,style:r?{...a,color:r}:a,...s,children:[i&&(0,e.jsx)(`title`,{children:i}),o]}),h=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 7h16l-1 13H5L4 7zm3 0V4h10v3`})}),g=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`m5 12 4 4L19 6`})}),_=t=>(0,e.jsx)(m,{viewBox:`0 0 20 20`,...t,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`})}),v=({strokeWidth:t=2,...n})=>(0,e.jsx)(m,{strokeWidth:t,...n,children:(0,e.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),y=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 20h4L19 9l-4-4L4 16v4z`})}),b=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m15 9-6 6M9 9l6 6`})]}),x=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`path`,{d:`M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z`}),(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.5`})]}),S=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5`})}),C=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 10v7m0-10v.01`})}),w=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`M12 16v-4M12 8v.01`})]}),T=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M5 12h14`})}),E=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M8 5v14M16 5v14`,strokeWidth:`3`})}),D=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z`})}),O=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`m8 5 11 7-11 7V5Z`,fill:`currentColor`,stroke:`none`})}),k=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3`})}),A=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm7.4 5.2.1-1.7-.1-1.7 2-1.5-2-3.4-2.4 1a8 8 0 0 0-2.9-1.7L13.8 2h-3.9l-.4 2.7a8 8 0 0 0-2.8 1.7l-2.5-1-2 3.4 2.1 1.5-.1 1.7.1 1.7-2.1 1.5 2 3.4 2.5-1a8 8 0 0 0 2.8 1.7l.4 2.7h3.9l.3-2.7a8 8 0 0 0 2.9-1.7l2.4 1 2-3.4-2-1.5Z`})}),j=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5`})}),M=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5`})}),N=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4`})}),P=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11`})}),F=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4`})}),I=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3`})}),L=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 19V5m-5 5 5-5 5 5`})}),R=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 5v14m-5-5 5 5 5-5`})}),z=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),ee=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 19V5m-5 5 5-5 5 5`})}),B=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`path`,{d:`M12 3.5L21 19H3L12 3.5Z`}),(0,e.jsx)(`path`,{d:`M12 9v4.5M12 16.5v.01`})]}),V=n=>r=>(0,e.jsx)(m,{...r,children:n.map(([e,n],r)=>(0,t.createElement)(e,{...n,key:n.key??`${e}-${r}`}))}),H={IconActivity:V([[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),IconAlertTriangle:V([[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]]),IconArrowDown:V([[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),IconArrowLeft:V([[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),IconArrowRight:V([[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),IconArrowUp:V([[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),IconArrowUpRight:V([[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),IconBarChart3:V([[`path`,{d:`M3 3v18h18`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]]),IconBell:V([[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),IconBoxes:V([[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),IconBuilding2:V([[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),IconCamera:V([[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),IconChartNoAxesCombined:V([[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]),IconChevronRight:V([[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),IconCircleAlert:V([[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),IconClock3:V([[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),IconDownload:V([[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),IconExternalLink:V([[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),IconFactory:V([[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`,key:`1iv0i2`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),IconGauge:V([[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),IconGripVertical:V([[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),IconLayoutDashboard:V([[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),IconLockKeyhole:V([[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),IconLogOut:V([[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),IconMaximize2:V([[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),IconMenu:V([[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),IconPackageCheck:V([[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),IconRefreshCw:V([[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),IconRotateCw:V([[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),IconSearch:V([[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),IconSettings2:V([[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),IconShieldAlert:V([[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),IconShieldCheck:V([[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),IconSmartphone:V([[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),IconSparkles:V([[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),IconTable2:V([[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),IconThermometer:V([[`path`,{d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z`,key:`17jzev`}]]),IconTrendingUp:V([[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),IconUserCheck:V([[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),IconUserRound:V([[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),IconUsers:V([[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),IconUserX:V([[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`17`,x2:`22`,y1:`8`,y2:`13`,key:`3nzzx3`}],[`line`,{x1:`22`,x2:`17`,y1:`8`,y2:`13`,key:`1swrse`}]]),IconVideo:V([[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),IconVideoOff:V([[`path`,{d:`M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196`,key:`w8jjjt`}],[`path`,{d:`M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`,key:`1xawa7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),IconVolume2:V([[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),IconX:V([[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),IconBasket:h,IconCheck:g,IconChevron:_,IconCross:v,IconEdit:y,IconErrorCircle:b,IconEye:x,IconEyeOff:S,IconInfo:C,IconInfoCircle:w,IconMinus:T,IconPause:E,IconPictureInPicture:D,IconPlay:O,IconReplay:k,IconSettings:A,IconFullscreen:j,IconFullscreenExit:M,IconCaptions:N,IconVolume:P,IconVolumeMuted:F,IconSort:I,IconSortAscending:L,IconSortDescending:R,IconSuccessCircle:z,IconUpload:ee,IconWarning:B},U=({name:t,...n})=>{let r=H[t];return(0,e.jsx)(r,{...n})},W={wrapper:`_wrapper_1seon_1`,label:`_label_1seon_13`,input:`_input_1seon_35`,control:`_control_1seon_49`,disabled:`_disabled_1seon_95`,controlError:`_controlError_1seon_121`},te=({checked:n,onChange:r,label:i,hint:a,error:o,disabled:s=!1,readOnly:c=!1,className:l=``,name:u,id:d,indeterminate:f=!1,...m})=>{let h=(0,t.useId)(),g=d??`ds-checkbox-${u??h}`,_=(0,t.useRef)(null),v=a?`${g}-hint`:void 0,y=o?`${g}-error`:void 0;return(0,t.useEffect)(()=>{_.current&&(_.current.indeterminate=f&&!n)},[n,f]),(0,e.jsxs)(`div`,{className:`${W.wrapper} ${l}`,children:[(0,e.jsxs)(`label`,{className:`${W.label} ${s?W.disabled:``}`,htmlFor:g,children:[(0,e.jsx)(`input`,{ref:_,id:g,name:u,type:`checkbox`,checked:n,disabled:s,"aria-readonly":c||void 0,"aria-invalid":!!o,"aria-describedby":[v,y].filter(Boolean).join(` `)||void 0,className:W.input,onChange:e=>{c||r?.(e.target.checked,e)},...m}),(0,e.jsxs)(`span`,{className:`${W.control} ${o?W.controlError:``}`,"aria-hidden":`true`,children:[f&&!n&&(0,e.jsx)(U,{name:`IconMinus`,width:16,height:16}),n&&(0,e.jsx)(U,{name:`IconCheck`,width:16,height:16})]}),i&&(0,e.jsx)(`span`,{children:i})]}),a&&!o&&(0,e.jsx)(p,{id:v,children:a}),o&&(0,e.jsx)(p,{id:y,variant:`error`,children:o})]})},G={wrapper:`_wrapper_su17c_1`,trigger:`_trigger_su17c_17`,sm:`_sm_su17c_53`,md:`_md_su17c_65`,lg:`_lg_su17c_75`,chevron:`_chevron_su17c_89`,chevronOpen:`_chevronOpen_su17c_115`,nav:`_nav_su17c_127`,day:`_day_su17c_129`,monthSelect:`_monthSelect_su17c_131`,yearInput:`_yearInput_su17c_133`,timeInput:`_timeInput_su17c_135`,dateInput:`_dateInput_su17c_147`,timeValue:`_timeValue_su17c_189`,chevronButton:`_chevronButton_su17c_201`,disabled:`_disabled_su17c_235`,validationTooltip:`_validationTooltip_su17c_249`,"validation-tooltip-lifetime":`_validation-tooltip-lifetime_su17c_1`,value:`_value_su17c_319`,placeholder:`_placeholder_su17c_335`,error:`_error_su17c_343`,panel:`_panel_su17c_351`,calendarHeader:`_calendarHeader_su17c_377`,weekdays:`_weekdays_su17c_467`,days:`_days_su17c_469`,outside:`_outside_su17c_505`,selected:`_selected_su17c_513`,timeLabel:`_timeLabel_su17c_533`,previousMonth:`_previousMonth_su17c_593`,nextMonth:`_nextMonth_su17c_601`},ne=[`Пн`,`Вт`,`Ср`,`Чт`,`Пт`,`Сб`,`Вс`],re=[`Январь`,`Февраль`,`Март`,`Апрель`,`Май`,`Июнь`,`Июль`,`Август`,`Сентябрь`,`Октябрь`,`Ноябрь`,`Декабрь`],K=e=>String(e).padStart(2,`0`),ie=8,ae=`Некорректная дата`,oe=e=>e?`${K(e.getDate())}.${K(e.getMonth()+1)}.${e.getFullYear()}`:``,se=e=>{let t=e.replace(/\D/g,``).slice(0,ie);return[t.slice(0,2),t.slice(2,4),t.slice(4,8)].filter(Boolean).join(`.`)},ce=e=>{if(!e)return!0;let t=Number(e.padEnd(4,`0`));return Number(e.padEnd(4,`9`))>=1800&&t<=2500},le=e=>{if(!/^\d{0,8}$/.test(e))return!1;let t=e.slice(0,2),n=e.slice(2,4),r=e.slice(4,8);return t.length===1&&Number(t)>3||t.length===2&&(Number(t)<1||Number(t)>31)||n.length===1&&Number(n)>1||n.length===2&&(Number(n)<1||Number(n)>12)?!1:ce(r)},ue=e=>{let t=/^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]);if(i<1800||i>2500)return null;let a=new Date(i,r,n,12);return a.getFullYear()!==i||a.getMonth()!==r||a.getDate()!==n?null:a},q=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),de=(e,t)=>{if(!e)return``;let n=`${e.getFullYear()}-${K(e.getMonth()+1)}-${K(e.getDate())}`,r=`${K(e.getHours())}:${K(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n}T${r}`},fe=(e,t)=>{if(!e)return null;if(t===`time`){let t=/^(\d{2}):(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);if(n>23||r>59)return null;let i=new Date;return i.setHours(n,r,0,0),i}if(t===`date`){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]),a=new Date(n,r,i,12);return a.getFullYear()!==n||a.getMonth()!==r||a.getDate()!==i?null:a}let n=new Date(e);return Number.isNaN(n.getTime())?null:n},pe=(e,t)=>{if(!e)return``;let n=`${K(e.getDate())}.${K(e.getMonth()+1)}.${e.getFullYear()}`,r=`${K(e.getHours())}:${K(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n} ${r}`},me=e=>{let t=new Date(e.getFullYear(),e.getMonth(),1),n=(t.getDay()+6)%7,r=new Date(t);return r.setDate(t.getDate()-n),Array.from({length:42},(e,t)=>{let n=new Date(r);return n.setDate(r.getDate()+t),n})},he=(e,t)=>!!(e&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()),ge=(e,t,n)=>{let r=q(e).getTime();return!!(t&&r<q(t).getTime()||n&&r>q(n).getTime())},_e=8,ve=6,ye=({value:r,onChange:i,mode:a=`date`,label:o,placeholder:s,hint:c,error:l,disabled:u=!1,readOnly:d=!1,required:m=!1,min:h,max:g,size:_=`md`,id:v,name:y,className:b=``})=>{let x=(0,t.useId)(),S=v??`ds-date-time-${y??x}`,C=c?`${S}-hint`:void 0,w=l?`${S}-error`:void 0,T=(0,t.useRef)(null),E=(0,t.useRef)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(null),[k,A]=(0,t.useState)(!1),[j,M]=(0,t.useState)(r??new Date),[N,P]=(0,t.useState)(de(r,`time`)),[F,I]=(0,t.useState)(oe(r)),[L,R]=(0,t.useState)(``),[z,ee]=(0,t.useState)(0),[B,V]=(0,t.useState)(null),H=(0,t.useMemo)(()=>me(j),[j]),W=a!==`time`,te=a!==`date`;(0,t.useEffect)(()=>{r&&M(r),P(de(r,`time`)),I(oe(r))},[r]),(0,t.useEffect)(()=>()=>{O.current&&clearTimeout(O.current)},[]);let K=(0,t.useCallback)(()=>{let e=E.current,t=D.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-_e,o=n.top-_e,s=a<r.height&&o>a,c=Math.max(120,s?o:a),l=s?Math.max(_e,n.top-r.height-ve):n.bottom+ve,u=n.left,d=i-r.width-_e;V({top:l,left:Math.max(_e,Math.min(u,d)),maxHeight:c})},[]);(0,t.useLayoutEffect)(()=>{if(!k){V(null);return}return K(),window.addEventListener(`resize`,K),window.addEventListener(`scroll`,K,!0),()=>{window.removeEventListener(`resize`,K),window.removeEventListener(`scroll`,K,!0)}},[k,K,j,N]),(0,t.useEffect)(()=>{if(!k)return;let e=e=>{let t=e.target,n=T.current?.contains(t),r=D.current?.contains(t);!n&&!r&&A(!1)},t=e=>{e.key===`Escape`&&(A(!1),E.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[k]);let ce=e=>{if(ge(e,h,g))return;let t=a===`date`?fe(de(e,`date`),`date`):new Date(e);t&&(a!==`date`&&t.setHours(r?.getHours()??0,r?.getMinutes()??0,0,0),i?.(t),I(oe(t)),a===`date`&&A(!1))},q=()=>{R(ae),ee(e=>e+1),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{R(``),O.current=null},3e3)},ye=e=>{let t=e.replace(/\D/g,``).slice(0,ie);if(!le(t)){q();return}let n=se(t);if(I(n),!t){i?.(null);return}if(t.length<ie)return;let o=ue(n);if(!o||ge(o,h,g)){q();return}a===`datetime`&&o.setHours(r?.getHours()??0,r?.getMinutes()??0,0,0),i?.(o),M(o),A(!1),requestAnimationFrame(()=>E.current?.blur())},be=e=>{if(P(e),!e){i?.(null);return}let t=fe(e,`time`);if(!t)return;let n=new Date(a===`datetime`?r??j:new Date);n.setHours(t.getHours(),t.getMinutes(),0,0),!(h&&n<h||g&&n>g)&&i?.(n)},xe=s??(a===`date`?`ДД.ММ.ГГГГ`:a===`time`?`ЧЧ:ММ`:`ДД.ММ.ГГГГ ЧЧ:ММ`),Se=L?`${S}-validation`:void 0,Ce=[C,w,Se].filter(Boolean).join(` `)||void 0,we=k&&!d?(0,e.jsxs)(`div`,{ref:D,className:G.panel,role:`dialog`,"aria-label":o??xe,style:B?{top:B.top,left:B.left,maxHeight:B.maxHeight}:{visibility:`hidden`,top:0,left:0},children:[W&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(`div`,{className:G.calendarHeader,children:[(0,e.jsx)(`button`,{type:`button`,className:G.nav,"aria-label":`Предыдущий месяц`,onClick:()=>M(new Date(j.getFullYear(),j.getMonth()-1,1)),children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20,className:G.previousMonth})}),(0,e.jsx)(`select`,{className:G.monthSelect,"aria-label":`Месяц`,value:j.getMonth(),onChange:e=>M(new Date(j.getFullYear(),Number(e.target.value),1)),children:re.map((t,n)=>(0,e.jsx)(`option`,{value:n,children:t},t))}),(0,e.jsx)(`input`,{className:G.yearInput,type:`number`,"aria-label":`Год`,value:j.getFullYear(),onChange:e=>M(new Date(Number(e.target.value),j.getMonth(),1))}),(0,e.jsx)(`button`,{type:`button`,className:G.nav,"aria-label":`Следующий месяц`,onClick:()=>M(new Date(j.getFullYear(),j.getMonth()+1,1)),children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20,className:G.nextMonth})})]}),(0,e.jsx)(`div`,{className:G.weekdays,children:ne.map(t=>(0,e.jsx)(`span`,{children:t},t))}),(0,e.jsx)(`div`,{className:G.days,children:H.map(t=>{let n=he(r,t);return(0,e.jsx)(`button`,{type:`button`,className:`${G.day} ${t.getMonth()===j.getMonth()?``:G.outside} ${n?G.selected:``}`,disabled:ge(t,h,g),"aria-pressed":n,onClick:()=>ce(t),children:t.getDate()},t.toISOString())})})]}),te&&(0,e.jsxs)(`label`,{className:G.timeLabel,children:[(0,e.jsx)(`span`,{children:`Время`}),(0,e.jsx)(`input`,{className:G.timeInput,type:`time`,value:N,onChange:e=>be(e.target.value)})]})]}):null;return(0,e.jsxs)(`div`,{ref:T,className:`${G.wrapper} ${b}`,children:[o&&(0,e.jsx)(f,{htmlFor:S,required:m,disabled:u,children:o}),W?(0,e.jsxs)(`div`,{className:`${G.trigger} ${G[_]} ${l?G.error:``} ${u?G.disabled:``}`,children:[(0,e.jsx)(`input`,{ref:E,id:S,name:y,className:G.dateInput,value:F,placeholder:xe.split(` `)[0],inputMode:`numeric`,autoComplete:`off`,maxLength:10,disabled:u,readOnly:d,"aria-expanded":k,"aria-haspopup":`dialog`,"aria-describedby":Ce,"aria-invalid":!!(l||L)||void 0,onFocus:()=>{d||A(!0)},onClick:()=>{d||A(!0)},onChange:e=>ye(e.target.value)}),a===`datetime`&&N&&(0,e.jsx)(`span`,{className:G.timeValue,children:N}),(0,e.jsx)(`button`,{type:`button`,className:G.chevronButton,disabled:u||d,"aria-label":k?`Закрыть календарь`:`Открыть календарь`,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{A(e=>!e),E.current?.focus()},children:(0,e.jsx)(`span`,{className:`${G.chevron} ${we?G.chevronOpen:``}`,"aria-hidden":`true`,children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20})})})]}):(0,e.jsxs)(`button`,{ref:E,id:S,name:y,type:`button`,className:`${G.trigger} ${G[_]} ${l?G.error:``}`,disabled:u,"aria-readonly":d||void 0,"aria-expanded":k,"aria-haspopup":`dialog`,"aria-describedby":Ce,onClick:()=>{d||A(e=>!e)},children:[(0,e.jsx)(`span`,{className:r?G.value:G.placeholder,children:pe(r,a)||xe}),(0,e.jsx)(`span`,{className:`${G.chevron} ${we?G.chevronOpen:``}`,"aria-hidden":`true`,children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20})})]}),L&&(0,e.jsx)(`span`,{id:Se,className:G.validationTooltip,role:`status`,"aria-live":`polite`,children:L},z),we&&(0,n.createPortal)(we,document.body),c&&!l&&(0,e.jsx)(p,{id:C,children:c}),l&&(0,e.jsx)(p,{id:w,variant:`error`,children:l})]})},be={root:`_root_19vq2_1`,range:`_range_19vq2_21`},xe=e=>!!(e.from&&e.to&&e.from.getTime()<=e.to.getTime()),Se=({value:t,onChange:n,onDraftChange:r,mode:i=`date`,fromLabel:a=`От`,toLabel:o=`До`,hint:s,error:c,min:l,max:u,disabled:d=!1,readOnly:f=!1,required:m=!1,className:h=``})=>{let g=c??(t.from&&t.to&&t.from>t.to?`Дата «От» не может быть позже даты «До»`:void 0),_=e=>{r?.(e),xe(e)&&n?.(e)};return(0,e.jsxs)(`fieldset`,{className:`${be.root} ${h}`,disabled:d,children:[(0,e.jsxs)(`div`,{className:be.range,children:[(0,e.jsx)(ye,{value:t.from,mode:i===`datetime`?`datetime`:i,label:a,min:l,max:t.to??u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,from:e})}),(0,e.jsx)(ye,{value:t.to,mode:i===`datetime`?`datetime`:i,label:o,min:t.from??l,max:u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,to:e})})]}),s&&!g&&(0,e.jsx)(p,{children:s})]})},Ce={group:`_group_10ug0_1`,skeleton:`_skeleton_10ug0_15`,text:`_text_10ug0_27`,rectangular:`_rectangular_10ug0_37`,circular:`_circular_10ug0_47`,animated:`_animated_10ug0_59`,"ds-skeleton":`_ds-skeleton_10ug0_1`},we=({variant:t=`text`,width:n=`100%`,height:r,lines:i=1,animated:a=!0,className:o=``})=>(0,e.jsx)(`span`,{className:`${Ce.group} ${o}`,"aria-hidden":`true`,children:Array.from({length:Math.max(1,i)},(i,o)=>(0,e.jsx)(`span`,{className:`${Ce.skeleton} ${Ce[t]} ${a?Ce.animated:``}`,style:{width:n,height:r}},o))}),J={wrapper:`_wrapper_6g3qd_1`,container:`_container_6g3qd_17`,trigger:`_trigger_6g3qd_25`,disabledText:`_disabledText_6g3qd_27`,sm:`_sm_6g3qd_53`,md:`_md_6g3qd_67`,lg:`_lg_6g3qd_81`,value:`_value_6g3qd_147`,placeholder:`_placeholder_6g3qd_149`,chevron:`_chevron_6g3qd_205`,chevronOpen:`_chevronOpen_6g3qd_231`,menu:`_menu_6g3qd_239`,option:`_option_6g3qd_269`,selected:`_selected_6g3qd_339`,message:`_message_6g3qd_359`,error:`_error_6g3qd_361`,errorState:`_errorState_6g3qd_387`},Te=8,Ee=6,De=120,Oe=(e,t,n)=>{if(!e.length)return-1;for(let r=0;r<e.length;r+=1){let i=(t+r*n+e.length)%e.length;if(!e[i]?.disabled)return i}return-1},ke=e=>{if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return 1/0},Ae=({options:r,value:i,onChange:a,placeholder:o=`Выберите опцию`,disabled:s=!1,stringWhileDisabled:c=!1,label:l,error:u,size:d=`md`,hint:p,className:m=``,required:h=!1,name:g,id:_,needMark:v=!0,maxMenuHeight:y})=>{let b=(0,t.useId)(),x=_??`ds-dropdown-${g??b}`,S=`${x}-listbox`,[C,w]=(0,t.useState)(!1),[T,E]=(0,t.useState)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)([]),j=(0,t.useMemo)(()=>r.find(e=>e.value===i),[r,i]),M=p?`${x}-hint`:void 0,N=u?`${x}-error`:void 0,P=[M,N].filter(Boolean).join(` `)||void 0,F=s&&c,I=(0,t.useCallback)(()=>{let e=O.current,t=k.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-Te,o=n.top-Te,s=a<r.height&&o>a,c=Math.max(De,s?o:a),l=ke(y),u=Math.min(c,l),d=n.left,f=i-n.width-Te,p=Math.max(Te,Math.min(d,f)),m=s?Math.max(Te,n.top-r.height-Ee):n.bottom+Ee;E({top:m,left:p,width:n.width,maxHeight:u})},[y]);(0,t.useLayoutEffect)(()=>{if(!C){E(null);return}return I(),window.addEventListener(`resize`,I),window.addEventListener(`scroll`,I,!0),()=>{window.removeEventListener(`resize`,I),window.removeEventListener(`scroll`,I,!0)}},[C,I,r.length]),(0,t.useEffect)(()=>{if(!C)return;let e=e=>{let t=e.target,n=D.current?.contains(t),r=k.current?.contains(t);!n&&!r&&w(!1)},t=e=>{e.key===`Escape`&&(w(!1),O.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[C]);let L=(e,t)=>{let n=Oe(r,e,t);if(n===-1)return;let i=A.current[n];i?.focus(),i?.scrollIntoView({block:`nearest`})},R=e=>{e.disabled||(a?.(e.value,e),w(!1),O.current?.focus())},z=C?(0,e.jsx)(`ul`,{ref:k,id:S,className:J.menu,role:`listbox`,"aria-label":l,style:T?{position:`fixed`,top:T.top,left:T.left,width:T.width,maxHeight:T.maxHeight}:{position:`fixed`,top:0,left:0,visibility:`hidden`,maxHeight:0},children:r.map((t,n)=>{let a=t.value===i;return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{A.current[n]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:[J[d],J.option,a?J.selected:``].filter(Boolean).join(` `),onClick:()=>R(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;L(n+t,t)}if(e.key===`Tab`&&w(!1),e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;L(e.key===`Home`?0:r.length-1,t)}(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),R(t))},children:[(0,e.jsx)(`span`,{children:t.label}),a&&v&&(0,e.jsx)(U,{name:`IconCheck`,width:16,height:16})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:D,className:[J.wrapper,u?J.errorState:``,m].filter(Boolean).join(` `),children:[l&&(0,e.jsx)(f,{required:h,disabled:s,htmlFor:F?void 0:x,children:l}),(0,e.jsx)(`div`,{className:J.container,children:F?(0,e.jsx)(`div`,{id:x,className:J.disabledText,"aria-describedby":P,children:j?.label??o}):(0,e.jsxs)(`button`,{ref:O,id:x,type:`button`,name:g,className:`${J.trigger} ${J[d]}`,disabled:s,"aria-haspopup":`listbox`,"aria-expanded":C,"aria-controls":S,"aria-describedby":P,"aria-invalid":!!u,onClick:()=>w(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),w(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>{L(e.key===`ArrowDown`?0:r.length-1,t)})}if(e.key===`Enter`&&C){e.preventDefault();let t=r.findIndex(e=>e.value===i);L(t>=0?t:0,1)}},children:[(0,e.jsx)(`span`,{className:`${j?J.value:J.placeholder}
2
- ${J[d]}`,children:j?.label??o}),(0,e.jsx)(`span`,{className:[J.chevron,C?J.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20})})]})}),C&&(0,n.createPortal)(z,document.body),p&&!u&&(0,e.jsx)(`span`,{id:M,className:J.message,children:p}),u&&(0,e.jsx)(`span`,{id:N,className:J.error,children:u})]})},je=e=>`${e.id}:${e.direction}`,Me=({options:t,value:n,onChange:r,label:i=`Сортировка`,placeholder:a=`Выберите сортировку`,disabled:o=!1,className:s})=>{let c=t.flatMap(e=>[{value:je({id:e.id,direction:`asc`}),label:e.ascLabel??`${e.label} · по возрастанию`,disabled:e.disabled},{value:je({id:e.id,direction:`desc`}),label:e.descLabel??`${e.label} · по убыванию`,disabled:e.disabled}]);return(0,e.jsx)(Ae,{options:c,value:n?je(n):``,label:i,placeholder:a,disabled:o,className:s,onChange:e=>{let t=e.lastIndexOf(`:`);r?.({id:e.slice(0,t),direction:e.slice(t+1)})}})},Y={root:`_root_1jtuu_1`,tableWrap:`_tableWrap_1jtuu_15`,table:`_table_1jtuu_15`,sticky:`_sticky_1jtuu_81`,sortButton:`_sortButton_1jtuu_95`,state:`_state_1jtuu_133`,cards:`_cards_1jtuu_145`,mobileSort:`_mobileSort_1jtuu_145`,card:`_card_1jtuu_145`,spanTwo:`_spanTwo_1jtuu_233`,clickableRow:`_clickableRow_1jtuu_241`,pagination:`_pagination_1jtuu_249`,paginationRange:`_paginationRange_1jtuu_275`,paginationControls:`_paginationControls_1jtuu_287`,pageNumbers:`_pageNumbers_1jtuu_289`,pageButton:`_pageButton_1jtuu_301`,ellipsis:`_ellipsis_1jtuu_311`,previousIcon:`_previousIcon_1jtuu_323`,nextIcon:`_nextIcon_1jtuu_331`,default:`_default_1jtuu_371`,tableOnMobile:`_tableOnMobile_1jtuu_371`,wide:`_wide_1jtuu_401`},Ne=(0,r.tableFeatures)({rowSortingFeature:r.rowSortingFeature,sortedRowModel:(0,r.createSortedRowModel)()}),Pe=e=>{if(!(!e||e.width===void 0&&e.minWidth===void 0&&e.maxWidth===void 0))return{width:e.width,minWidth:e.minWidth,maxWidth:e.maxWidth}},Fe=(e,t)=>t<=7?Array.from({length:t},(e,t)=>t):e<=3?[0,1,2,3,4,`ellipsis-end`,t-1]:e>=t-4?[0,`ellipsis-start`,t-5,t-4,t-3,t-2,t-1]:[0,`ellipsis-start`,e-1,e,e+1,`ellipsis-end`,t-1],Ie=(e,t)=>{let n=new Set;for(let t of e){if(!t.id.trim())return`Идентификатор колонки не может быть пустым`;if(n.has(t.id))return`Идентификатор колонки «${t.id}» повторяется`;n.add(t.id)}for(let n=0;n<t.length;n+=1){let r=t[n];for(let t of e)if(typeof t.accessor==`string`&&!(t.accessor in r))return`В строке ${n+1} отсутствует колонка «${t.id}»`}return null},Le=(e,t)=>typeof e==`function`?e(t):t[e],Re=e=>{if(e==null||e===``)return null;let t=Date.parse(String(e));return Number.isNaN(t)?null:t},ze=(e,t,n)=>{let r=Re(e.getValue(n)),i=Re(t.getValue(n));return r===null&&i===null?0:r===null?-1:i===null?1:r-i},Be=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(r)-Number(i)},Ve=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(!!r)-Number(!!i)},He=(e,t,n)=>{let r=String(e.getValue(n)??``),i=String(t.getValue(n)??``);return r.localeCompare(i,void 0,{numeric:!0,sensitivity:`base`})},Ue=e=>{switch(e){case`date`:return ze;case`number`:return Be;case`boolean`:return Ve;case`text`:case void 0:return He;case`custom`:return}},We=e=>{let t=t=>Le(e.accessor,t),n=e.sortFn??Ue(e.dataType),r=e.enableSorting??(e.dataType!==`custom`&&n!==void 0),i={id:e.id,accessorFn:t,header:()=>e.header,cell:t=>{let n=t.getValue();return e.cell?.(t.row.original,n)??String(n??``)},enableSorting:r,sortDescFirst:e.sortDescFirst};return n!==void 0&&(i.sortFn=n),i},Ge=({columns:n,data:i,tableOnMobile:a=!1,breakpoint:o=`default`,sorting:s,onSortingChange:c,renderMobileCard:l,getRowId:d,caption:f,ariaLabel:p,loading:m=!1,error:h,emptyState:g=`Нет данных`,stickyHeader:_=!1,maxHeight:v,className:y=``,onRowClick:b,pagination:x=!1,pageSize:S=30,visibleColumnIds:C})=>{let[w,T]=(0,t.useState)([]),[E,D]=(0,t.useState)(0),O=s??w,k=O.map(e=>`${e.id}:${e.desc?`desc`:`asc`}`).join(`|`),A=Number.isFinite(S)&&S>0?Math.floor(S):30,j=(0,t.useMemo)(()=>{if(C===void 0)return n;let e=new Set(C);return n.filter(t=>e.has(t.id))},[n,C]),M=(0,t.useMemo)(()=>j.length===0?`Должна быть видима хотя бы одна колонка`:Ie(j,i),[i,j]),N=(0,t.useMemo)(()=>j.map(We),[j]),P=j.some(e=>Pe(e)!==void 0),F=(0,r.useTable)({features:Ne,columns:N,data:i,state:{sorting:O},onSortingChange:e=>{let t=typeof e==`function`?e(O):e;s===void 0&&T(t),D(0),c?.(t)},getRowId:d}),I=F.getRowModel().rows,L=x?Math.max(1,Math.ceil(I.length/A)):1,R=Math.min(E,L-1),z=(0,t.useMemo)(()=>x?I.slice(R*A,(R+1)*A):I,[A,x,R,I]),ee=(0,t.useMemo)(()=>j.filter(e=>e.enableSorting??e.dataType!==`custom`).map(e=>({id:e.id,label:typeof e.header==`string`?e.header:e.id})),[j]),B=(0,t.useMemo)(()=>Fe(R,L),[L,R]),V=[Y.root,o===`wide`?Y.wide:Y.default,a?Y.tableOnMobile:``,y].filter(Boolean).join(` `),H=M??h,W=x&&!m&&!H&&I.length>A,te=R*A+1,G=Math.min((R+1)*A,I.length);return(0,t.useEffect)(()=>{D(0)},[i,A,x,k]),(0,t.useEffect)(()=>{E>=L&&D(L-1)},[L,E]),(0,e.jsxs)(`section`,{className:V,"aria-busy":m,children:[!a&&!m&&!H&&z.length>0&&ee.length>0&&(0,e.jsx)(Me,{className:Y.mobileSort,options:ee,value:O[0]?{id:O[0].id,direction:O[0].desc?`desc`:`asc`}:null,onChange:e=>F.setSorting([{id:e.id,desc:e.direction===`desc`}])}),(0,e.jsx)(`div`,{className:Y.tableWrap,style:{maxHeight:v},children:(0,e.jsxs)(`table`,{className:Y.table,"aria-label":p,children:[f&&(0,e.jsx)(`caption`,{children:f}),P&&(0,e.jsx)(`colgroup`,{children:j.map(t=>(0,e.jsx)(`col`,{style:Pe(t)},t.id))}),(0,e.jsx)(`thead`,{className:_?Y.sticky:``,children:F.getHeaderGroups().map(t=>(0,e.jsx)(`tr`,{children:t.headers.map(t=>{let n=t.column.getIsSorted(),r=t.column.getCanSort(),i=t.column.getToggleSortingHandler();return(0,e.jsx)(`th`,{scope:`col`,"aria-sort":n===`asc`?`ascending`:n===`desc`?`descending`:`none`,style:Pe(j.find(e=>e.id===t.column.id)),children:(0,e.jsxs)(`button`,{type:`button`,className:Y.sortButton,disabled:!r,onClick:i,children:[(0,e.jsx)(F.FlexRender,{header:t}),(0,e.jsx)(U,{name:n===`asc`?`IconSortAscending`:n===`desc`?`IconSortDescending`:`IconSort`,width:16,height:16})]})},t.id)})},t.id))}),(0,e.jsx)(`tbody`,{children:m?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{colSpan:j.length,children:(0,e.jsx)(we,{lines:3})})}):H?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:Y.state,colSpan:j.length,children:H})}):z.length===0?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:Y.state,colSpan:j.length,children:g})}):z.map(t=>(0,e.jsx)(`tr`,{className:b?Y.clickableRow:void 0,onClick:()=>b?.(t.original),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b?.(t.original))},tabIndex:b?0:void 0,role:b?`button`:void 0,children:t.getAllCells().map(t=>(0,e.jsx)(`td`,{style:Pe(j.find(e=>e.id===t.column.id)),children:(0,e.jsx)(F.FlexRender,{cell:t})},t.id))},t.id))})]})}),!a&&(0,e.jsx)(`div`,{className:Y.cards,role:`list`,"aria-label":p??f,children:m?(0,e.jsx)(we,{lines:4}):H?(0,e.jsx)(`div`,{className:Y.state,children:H}):z.length===0?(0,e.jsx)(`div`,{className:Y.state,children:g}):z.map(t=>{if(l)return(0,e.jsx)(`div`,{role:`listitem`,children:l({row:t.original,columns:j})},t.id);let n=j.filter(e=>!e.mobile?.hideOnMobile).sort((e,t)=>(e.mobile?.mobileOrder??0)-(t.mobile?.mobileOrder??0)),r=n.find(e=>e.mobile?.primary)??n.find(e=>e.mobile?.mobileVariant!==`actions`),i=e=>Le(e.accessor,t.original),a=e=>e.mobile?.renderMobile?.(t.original,i(e))??e.cell?.(t.original,i(e))??String(i(e)??``);return(0,e.jsxs)(`article`,{role:`listitem`,className:Y.card,children:[(0,e.jsx)(`h3`,{children:r?a(r):`Строка ${t.index+1}`}),(0,e.jsx)(`dl`,{children:n.filter(e=>e!==r&&e.mobile?.mobileVariant!==`actions`).map(t=>(0,e.jsxs)(`div`,{className:t.mobile?.mobileSpan===2?Y.spanTwo:``,children:[(0,e.jsx)(`dt`,{children:t.mobile?.mobileLabel??t.header}),(0,e.jsx)(`dd`,{children:a(t)})]},t.id))}),n.filter(e=>e.mobile?.mobileVariant===`actions`).map(t=>(0,e.jsx)(`footer`,{children:a(t)},t.id))]},t.id)})}),W&&(0,e.jsxs)(`nav`,{className:Y.pagination,"aria-label":`Пагинация таблицы`,children:[(0,e.jsxs)(`span`,{className:Y.paginationRange,"aria-live":`polite`,children:[te,`–`,G,` из `,I.length]}),(0,e.jsxs)(`div`,{className:Y.paginationControls,children:[(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:R===0,"aria-label":`Предыдущая страница`,onClick:()=>{D(e=>Math.max(0,e-1))},children:[(0,e.jsx)(U,{name:`IconChevron`,width:18,height:18,className:Y.previousIcon}),(0,e.jsx)(`span`,{className:Y.paginationButtonLabel,children:`Назад`})]}),(0,e.jsx)(`div`,{className:Y.pageNumbers,children:B.map(t=>typeof t==`number`?(0,e.jsx)(u,{variant:t===R?`secondary`:`empty`,size:`md`,className:Y.pageButton,"aria-label":`Перейти на страницу ${t+1}`,"aria-current":t===R?`page`:void 0,onClick:()=>{D(t)},children:t+1},t):(0,e.jsx)(`span`,{className:Y.ellipsis,"aria-hidden":`true`,children:`…`},t))}),(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:R===L-1,"aria-label":`Следующая страница`,onClick:()=>{D(e=>Math.min(L-1,e+1))},children:[(0,e.jsx)(`span`,{className:Y.paginationButtonLabel,children:`Вперёд`}),(0,e.jsx)(U,{name:`IconChevron`,width:18,height:18,className:Y.nextIcon})]})]})]})]})},Ke=8,qe=6,Je=120,Ye=e=>{if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return 1/0},Xe=({options:r,value:i,onChange:a,placeholder:o=`Выберите опции`,disabled:s=!1,stringWhileDisabled:c=!1,label:l,error:u,size:d=`md`,required:p=!1,hint:m,className:h=``,name:g,id:_,closeOnSelect:v=!1,needMark:y=!0,maxMenuHeight:b})=>{let x=(0,t.useId)(),S=_??`ds-dropdown-multiple-${g??x}`,C=`${S}-listbox`,[w,T]=(0,t.useState)(!1),[E,D]=(0,t.useState)(null),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=(0,t.useRef)([]),M=(0,t.useMemo)(()=>r.filter(e=>i.includes(e.value)),[r,i]).map(e=>e.label).join(`, `),N=m?`${S}-hint`:void 0,P=u?`${S}-error`:void 0,F=[N,P].filter(Boolean).join(` `)||void 0,I=s&&c,L=(0,t.useCallback)(()=>{let e=k.current,t=A.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerHeight-n.bottom-Ke,a=n.top-Ke,o=i<r.height&&a>i,s=Math.max(Je,o?a:i),c=window.innerWidth-n.width-Ke;D({top:o?Math.max(Ke,n.top-r.height-qe):n.bottom+qe,left:Math.max(Ke,Math.min(n.left,c)),width:n.width,maxHeight:Math.min(s,Ye(b))})},[b]);(0,t.useLayoutEffect)(()=>{if(!w){D(null);return}return L(),window.addEventListener(`resize`,L),window.addEventListener(`scroll`,L,!0),()=>{window.removeEventListener(`resize`,L),window.removeEventListener(`scroll`,L,!0)}},[w,r.length,L]),(0,t.useEffect)(()=>{if(!w)return;let e=e=>{let t=e.target;!O.current?.contains(t)&&!A.current?.contains(t)&&T(!1)},t=e=>{e.key===`Escape`&&(T(!1),k.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[w]);let R=(e,t)=>{let n=Oe(r,e,t);n!==-1&&(j.current[n]?.focus(),j.current[n]?.scrollIntoView({block:`nearest`}))},z=e=>{if(e.disabled)return;let t=i.includes(e.value)?i.filter(t=>t!==e.value):[...i,e.value];a?.(t,r.filter(e=>t.includes(e.value))),v&&(T(!1),k.current?.focus())},ee=w?(0,e.jsx)(`ul`,{ref:A,id:C,className:J.menu,role:`listbox`,"aria-label":l,"aria-multiselectable":`true`,style:E?{position:`fixed`,top:E.top,left:E.left,width:E.width,maxHeight:E.maxHeight}:{position:`fixed`,top:0,left:0,visibility:`hidden`,maxHeight:0},children:r.map((t,n)=>{let a=i.includes(t.value);return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{j.current[n]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:[J[d],J.option,a?J.selected:``].filter(Boolean).join(` `),onClick:()=>z(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;R(n+t,t)}if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;R(e.key===`Home`?0:r.length-1,t)}(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),z(t)),e.key===`Tab`&&T(!1)},children:[(0,e.jsx)(`span`,{children:t.label}),a&&y&&(0,e.jsx)(U,{name:`IconCheck`,width:16,height:16})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:O,className:[J.wrapper,u?J.errorState:``,h].filter(Boolean).join(` `),children:[l&&(0,e.jsx)(f,{htmlFor:I?void 0:S,required:p,disabled:s,children:l}),(0,e.jsx)(`div`,{className:J.container,children:I?(0,e.jsx)(`div`,{id:S,className:`${J.disabledText} ${J[d]}`,"aria-describedby":F,children:M||o}):(0,e.jsxs)(`button`,{ref:k,id:S,type:`button`,name:g,className:`${J.trigger} ${J[d]}`,disabled:s,"aria-haspopup":`listbox`,"aria-expanded":w,"aria-controls":C,"aria-describedby":F,"aria-invalid":!!u,onClick:()=>T(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),T(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>R(e.key===`ArrowDown`?0:r.length-1,t))}},children:[(0,e.jsx)(`span`,{className:`${M?J.value:J.placeholder} ${J[d]}`,children:M||o}),(0,e.jsx)(`span`,{className:[J.chevron,w?J.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20})})]})}),w&&(0,n.createPortal)(ee,document.body),m&&!u&&(0,e.jsx)(`span`,{id:N,className:J.message,children:m}),u&&(0,e.jsx)(`span`,{id:P,className:J.error,children:u})]})},Ze={wrapper:`_wrapper_1izp1_1`,control:`_control_1izp1_15`,input:`_input_1izp1_25`,disabledText:`_disabledText_1izp1_25`,sm:`_sm_1izp1_107`,md:`_md_1izp1_123`,lg:`_lg_1izp1_139`,inputError:`_inputError_1izp1_155`,trailingAction:`_trailingAction_1izp1_163`},Qe=({value:n,onChange:r,type:i=`text`,placeholder:a=``,disabled:o=!1,readOnly:s=!1,stringWhileDisabled:c=!1,label:l,error:u,hint:d,className:m=``,name:h,id:g,size:_=`md`,clearable:v=!0,required:y=!1,selectTextOnFocus:b=!1,isPassword:x=!1,passwordVisibleLabel:S=`Скрыть пароль`,passwordHiddenLabel:C=`Показать пароль`,onFocus:w,...T})=>{let E=(0,t.useId)(),D=g??`ds-input-${h??E}`,O=(0,t.useRef)(null),[k,A]=(0,t.useState)(!1),j=d?`${D}-hint`:void 0,M=u?`${D}-error`:void 0,N=String(n??``),P=[j,M].filter(Boolean).join(` `)||void 0,F=x?k?`text`:`password`:i;return(0,t.useEffect)(()=>{x||A(!1)},[x]),(0,e.jsxs)(`div`,{className:`${Ze.wrapper} ${m}`,children:[l&&(0,e.jsx)(f,{htmlFor:D,required:y,disabled:o,children:l}),o&&c?(0,e.jsx)(`div`,{id:D,className:Ze.disabledText,"aria-describedby":P,children:N||a}):(0,e.jsxs)(`div`,{className:Ze.control,children:[(0,e.jsx)(`input`,{ref:O,id:D,name:h,type:F,value:N,placeholder:a,disabled:o,readOnly:s,required:y,"aria-invalid":!!u,"aria-describedby":P,className:`${Ze.input} ${Ze[_]} ${u?Ze.inputError:``}`,onChange:e=>{if(i===`number`&&!x){let t=e.target.value===``?``:Number(e.target.value);r?.(t,e);return}r?.(e.target.value,e)},onFocus:e=>{b&&e.currentTarget.value&&e.currentTarget.select(),w?.(e)},...T}),x&&(0,e.jsx)(`button`,{type:`button`,className:Ze.trailingAction,disabled:o,"aria-label":k?S:C,"aria-pressed":k,onClick:()=>A(e=>!e),children:(0,e.jsx)(U,{name:k?`IconEyeOff`:`IconEye`,width:20,height:20})}),!x&&v&&N&&!o&&!s&&(0,e.jsx)(`button`,{type:`button`,className:Ze.trailingAction,"aria-label":`Очистить поле`,onClick:()=>{let e=O.current;e&&((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus())},children:(0,e.jsx)(U,{name:`IconCross`,width:20,height:20})})]}),d&&!u&&(0,e.jsx)(p,{id:j,children:d}),u&&(0,e.jsx)(p,{id:M,variant:`error`,children:u})]})},$e=(e,t)=>{let n=t.trim().toLocaleLowerCase();return n?e.filter(e=>e.label.toLocaleLowerCase().includes(n)||e.value.toLocaleLowerCase().includes(n)):e},et=(e,t,n)=>{if(!e.length)return-1;for(let r=0;r<e.length;r+=1){let i=(t+r*n+e.length)%e.length;if(!e[i]?.disabled)return i}return-1},X={wrapper:`_wrapper_1v2s8_1`,control:`_control_1v2s8_17`,inputHost:`_inputHost_1v2s8_25`,sm:`_sm_1v2s8_41`,md:`_md_1v2s8_57`,lg:`_lg_1v2s8_71`,errorState:`_errorState_1v2s8_85`,disabledText:`_disabledText_1v2s8_93`,chevron:`_chevron_1v2s8_163`,chevronOpen:`_chevronOpen_1v2s8_197`,menu:`_menu_1v2s8_205`,menuEmpty:`_menuEmpty_1v2s8_233`,option:`_option_1v2s8_241`,empty:`_empty_1v2s8_241`,selected:`_selected_1v2s8_321`,active:`_active_1v2s8_321`,visuallyHidden:`_visuallyHidden_1v2s8_341`},tt=8,nt=6,rt=5,it=10,at={sm:30,md:40,lg:50},ot=({options:r,value:i,onChange:a,placeholder:o=`Начните вводить`,noResultsText:s=`Ничего не найдено`,disabled:c=!1,readOnly:l=!1,stringWhileDisabled:u=!1,label:d,error:m,hint:h,size:g=`md`,required:_=!1,className:v=``,name:y,id:b,needMark:x=!0})=>{let S=(0,t.useId)(),C=b??`ds-search-dropdown-${y??S}`,w=`${C}-listbox`,T=`${C}-status`,E=h?`${C}-hint`:void 0,D=m?`${C}-error`:void 0,O=[T,E,D].filter(Boolean).join(` `),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=(0,t.useRef)([]),[M,N]=(0,t.useState)(!1),[P,F]=(0,t.useState)(``),[I,L]=(0,t.useState)(-1),[R,z]=(0,t.useState)(null),ee=(0,t.useMemo)(()=>r.find(e=>e.value===i),[r,i]),B=(0,t.useMemo)(()=>$e(r,P),[r,P]),V=c&&u,H=I>=0?B[I]:void 0;(0,t.useEffect)(()=>F(ee?.label??``),[ee?.label,i]);let W=(0,t.useCallback)(()=>k.current?.querySelector(`input`)??null,[]),te=(0,t.useCallback)((e,t)=>et(B,e,t),[B]),G=(0,t.useCallback)(e=>{L(e),!(e<0)&&requestAnimationFrame(()=>j.current[e]?.scrollIntoView({block:`nearest`}))},[]),ne=(0,t.useCallback)(()=>{let e=W();if(!e)return;let t=e.getBoundingClientRect(),n=Math.max(1,Math.min(B.length,rt))*at[g]+it,r=window.innerHeight-t.bottom-tt,i=t.top-tt,a=r<n&&i>r,o=a?i:r,s=Math.max(at[g]+it,Math.min(n,o)),c=window.innerWidth-t.width-tt,l=Math.max(tt,Math.min(t.left,c)),u=a?Math.max(tt,t.top-s-nt):t.bottom+nt;z({top:u,left:l,width:t.width,maxHeight:s})},[B.length,W,g]);(0,t.useLayoutEffect)(()=>{if(!M){z(null);return}return ne(),window.addEventListener(`resize`,ne),window.addEventListener(`scroll`,ne,!0),()=>{window.removeEventListener(`resize`,ne),window.removeEventListener(`scroll`,ne,!0)}},[M,ne]),(0,t.useEffect)(()=>{if(!M)return;let e=e=>{let t=e.target;!k.current?.contains(t)&&!A.current?.contains(t)&&(N(!1),L(-1))};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[M]);let re=()=>{c||l||(N(!0),L(te(0,1)))},K=e=>{e.disabled||(F(e.label),N(!1),L(-1),a?.(e.value,e),W()?.focus())},ie=M?(0,e.jsx)(`ul`,{ref:A,id:w,className:`${X.menu} ${B.length===0?X.menuEmpty:``}`,role:`listbox`,"aria-label":d,style:R?{top:R.top,left:R.left,width:R.width,maxHeight:R.maxHeight}:{top:0,left:0,visibility:`hidden`,maxHeight:0},children:B.length===0?(0,e.jsx)(`li`,{className:`${X.empty} ${X[g]}`,children:s}):B.map((t,n)=>{let r=t.value===i,a=n===I;return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{j.current[n]=e},id:`${C}-option-${n}`,type:`button`,role:`option`,tabIndex:-1,disabled:t.disabled,"aria-disabled":t.disabled,"aria-selected":r,className:[X.option,X[g],r?X.selected:``,a?X.active:``].filter(Boolean).join(` `),onPointerMove:()=>{t.disabled||L(n)},onClick:()=>K(t),children:[(0,e.jsx)(`span`,{children:t.label}),r&&x&&(0,e.jsx)(U,{name:`IconCheck`,width:16,height:16})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:k,className:[X.wrapper,m?X.errorState:``,v].filter(Boolean).join(` `),children:[d&&(0,e.jsx)(f,{htmlFor:V?void 0:C,required:_,disabled:c,children:d}),V?(0,e.jsx)(`div`,{className:`${X.disabledText} ${X[g]}`,children:ee?.label??o}):(0,e.jsxs)(`div`,{className:X.control,children:[(0,e.jsx)(Qe,{id:C,name:y,value:P,placeholder:o,disabled:c,readOnly:l,required:_,size:g,clearable:!1,autoComplete:`off`,className:`${X.inputHost} ${X[g]}`,onFocus:re,onChange:e=>{let t=String(e),n=$e(r,t);F(t),N(!0),L(et(n,0,1))},role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":M,"aria-controls":w,"aria-activedescendant":H?`${C}-option-${I}`:void 0,"aria-invalid":!!m,"aria-describedby":O,onClick:re,onKeyDown:e=>{if(!(c||l)){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1,n=I>=0?I+t:t===1?0:B.length-1;N(!0),G(te(n,t))}else if(e.key===`Home`||e.key===`End`){if(!M)return;e.preventDefault();let t=e.key===`Home`?1:-1;G(te(e.key===`Home`?0:B.length-1,t))}else e.key===`Enter`&&M&&H?(e.preventDefault(),K(H)):e.key===`Escape`&&M?(e.preventDefault(),N(!1),L(-1)):e.key===`Tab`&&(N(!1),L(-1))}}}),(0,e.jsx)(`span`,{className:`${X.chevron} ${M?X.chevronOpen:``}`,"aria-hidden":`true`,children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20})})]}),M&&typeof document<`u`&&(0,n.createPortal)(ie,document.body),(0,e.jsxs)(`span`,{id:T,className:X.visuallyHidden,"aria-live":`polite`,children:[`Найдено вариантов: `,B.length]}),h&&!m&&(0,e.jsx)(p,{id:E,children:h}),m&&(0,e.jsx)(p,{id:D,variant:`error`,children:m})]})},st={root:`_root_11adi_1`,header:`_header_11adi_21`,title:`_title_11adi_41`,dismiss:`_dismiss_11adi_55`,content:`_content_11adi_65`},ct=({title:n,children:r,dismissible:i=!1,onDismiss:a,dismissLabel:o=`Закрыть информационный блок`,headingAs:s=`h3`,className:c=``})=>{let l=`ds-info-block-${(0,t.useId)()}`;return(0,e.jsxs)(`section`,{className:`${st.root} ${c}`,"aria-labelledby":l,children:[(0,e.jsxs)(`header`,{className:st.header,children:[(0,e.jsx)(s,{id:l,className:st.title,children:n}),i&&(0,e.jsx)(u,{className:st.dismiss,variant:`empty`,onClick:a,"aria-label":o,children:(0,e.jsx)(U,{name:`IconCross`,width:20,height:20})})]}),(0,e.jsx)(`div`,{className:st.content,children:r})]})},lt={wrapper:`_wrapper_1np4e_1`,input:`_input_1np4e_21`,switch:`_switch_1np4e_35`,thumb:`_thumb_1np4e_67`,label:`_label_1np4e_113`,disabled:`_disabled_1np4e_125`},ut=({checked:n,onChange:r,label:i,disabled:a=!1,readOnly:o=!1,className:s=``,name:c,id:l,value:u})=>{let d=(0,t.useId)(),f=l??`ds-radio-button-${c??d}`;return(0,e.jsxs)(`label`,{htmlFor:f,className:`${lt.wrapper} ${a?lt.disabled:``} ${s}`,children:[(0,e.jsx)(`input`,{id:f,className:lt.input,type:`checkbox`,role:`switch`,name:c,value:u,checked:n,disabled:a,"aria-readonly":o||void 0,onChange:e=>{o||r?.(e.target.checked,e)}}),(0,e.jsx)(`span`,{className:lt.switch,"aria-hidden":`true`,children:(0,e.jsx)(`span`,{className:lt.thumb})}),i&&(0,e.jsx)(`span`,{className:lt.label,children:i})]})},dt={root:`_root_1ecm3_1`,grid:`_grid_1ecm3_13`,actions:`_actions_1ecm3_27`},ft=({filters:t,values:n,onChange:r,onApply:i,onReset:a,applyMode:o=`instant`,loading:s=!1,disabled:c=!1,className:l=``})=>{let d=(e,t)=>{let a={...n,[e]:t};r?.(a,e),o===`instant`&&i?.(a)};return(0,e.jsxs)(`section`,{className:`${dt.root} ${l}`,"aria-label":`Фильтры`,"aria-busy":s,children:[(0,e.jsx)(`div`,{className:dt.grid,children:t.filter(e=>!e.hidden).map(t=>{let r=c||s||t.disabled,i=n[t.id];if(t.type===`input`){let n={label:t.label,hint:t.hint,placeholder:t.placeholder,disabled:r};return t.inputType===`number`?(0,e.jsx)(Qe,{...n,type:`number`,value:i??``,onChange:e=>d(t.id,e)},t.id):(0,e.jsx)(Qe,{...n,type:`text`,value:String(i??``),onChange:e=>d(t.id,e)},t.id)}if(t.type===`dropdown`)return(0,e.jsx)(Ae,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:String(i??``),disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`multiple`)return(0,e.jsx)(Xe,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:Array.isArray(i)?i:[],disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`checkbox`)return(0,e.jsx)(te,{label:t.label,hint:t.hint,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`radio`)return(0,e.jsx)(ut,{label:t.label,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);let a=i&&typeof i==`object`&&!Array.isArray(i)?i:{from:null,to:null};return(0,e.jsx)(Se,{hint:t.hint,mode:t.mode,min:t.min,max:t.max,value:a,disabled:r,onDraftChange:e=>d(t.id,e)},t.id)})}),(a||o===`manual`)&&(0,e.jsxs)(`div`,{className:dt.actions,children:[a&&(0,e.jsx)(u,{variant:`destructiveOutline`,disabled:c||s,onClick:a,children:`Сбросить`}),o===`manual`&&(0,e.jsx)(u,{isLoading:s,disabled:c,onClick:()=>i?.(n),children:`Применить`})]})]})},Z={wrapper:`_wrapper_i20hz_1`,dropzone:`_dropzone_i20hz_15`,dragActive:`_dragActive_i20hz_45`,disabled:`_disabled_i20hz_59`,error:`_error_i20hz_69`,nativeInput:`_nativeInput_i20hz_77`,empty:`_empty_i20hz_95`,uploadIcon:`_uploadIcon_i20hz_111`,files:`_files_i20hz_133`,file:`_file_i20hz_133`,fileName:`_fileName_i20hz_175`,fileSize:`_fileSize_i20hz_187`},pt=e=>`${e.name}:${e.size}:${e.lastModified}`,mt=e=>e<1024?`${e} Б`:e<1048576?`${(e/1024).toFixed(1)} КБ`:`${(e/1024/1024).toFixed(1)} МБ`,ht=(e,t)=>!t||t.split(`,`).map(e=>e.trim().toLowerCase()).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.startsWith(t.slice(0,-1)):e.type.toLowerCase()===t),gt=({value:n,onChange:r,multiple:i=!1,accept:a,maxSize:o,maxFiles:s,label:c,hint:l,error:d,required:m=!1,disabled:h=!1,readOnly:g=!1,name:_,id:v,className:y=``,dropLabel:b=`Перетащите файлы в эту область`,browseLabel:x=`Выбрать файлы`,addMoreLabel:S=`Добавить ещё`,onReject:C})=>{let w=(0,t.useId)(),T=v??`ds-file-input-${_??w}`,E=(0,t.useRef)(null),D=(0,t.useRef)(0),[O,k]=(0,t.useState)(!1),A=l?`${T}-hint`:void 0,j=d?`${T}-error`:void 0,M=[A,j].filter(Boolean).join(` `)||void 0,N=!h&&!g,P=e=>{let t=[],c=new Set(n.map(pt)),l=e.filter(e=>ht(e,a)?o!==void 0&&e.size>o?(t.push({file:e,reason:`maxSize`}),!1):!c.has(pt(e))&&(c.add(pt(e)),!0):(t.push({file:e,reason:`accept`}),!1)),u=i?s:1,d=i?[...n,...l]:l.slice(-1);u!==void 0&&d.length>u&&(d.slice(u).forEach(e=>t.push({file:e,reason:`maxFiles`})),d=d.slice(0,u)),t.length&&C?.(t),l.length&&r?.(d),E.current&&(E.current.value=``)};return(0,e.jsxs)(`div`,{className:`${Z.wrapper} ${y}`,children:[c&&(0,e.jsx)(f,{htmlFor:T,required:m,disabled:h,children:c}),(0,e.jsxs)(`div`,{className:`${Z.dropzone} ${O?Z.dragActive:``} ${h?Z.disabled:``} ${d?Z.error:``}`,onDragEnter:e=>{e.preventDefault(),N&&++D.current===1&&k(!0)},onDragOver:e=>e.preventDefault(),onDragLeave:e=>{e.preventDefault(),--D.current<=0&&(D.current=0,k(!1))},onDrop:e=>{e.preventDefault(),D.current=0,k(!1),N&&P(Array.from(e.dataTransfer.files))},children:[(0,e.jsx)(`input`,{ref:E,id:T,name:_,className:Z.nativeInput,type:`file`,multiple:i,accept:a,required:m&&n.length===0,disabled:!N,"aria-describedby":M,"aria-invalid":!!d,onChange:e=>P(Array.from(e.target.files??[]))}),n.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`ul`,{className:Z.files,"aria-live":`polite`,children:n.map((t,i)=>(0,e.jsxs)(`li`,{className:Z.file,children:[(0,e.jsx)(`span`,{className:Z.fileName,title:t.name,children:t.name}),(0,e.jsx)(`span`,{className:Z.fileSize,children:mt(t.size)}),N&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Удалить файл ${t.name}`,onClick:()=>r?.(n.filter((e,t)=>t!==i)),children:(0,e.jsx)(U,{name:`IconCross`,width:16,height:16})})]},pt(t)))}),N&&(i||n.length===0)&&(0,e.jsx)(u,{className:Z.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:S}),N&&!i&&(0,e.jsx)(u,{className:Z.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:x})]}):(0,e.jsxs)(`div`,{className:Z.empty,children:[(0,e.jsx)(`span`,{className:Z.uploadIcon,"aria-hidden":`true`,children:(0,e.jsx)(U,{name:`IconUpload`,width:24,height:24})}),(0,e.jsx)(`strong`,{children:O?`Отпустите файлы здесь`:b}),!O&&N&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`span`,{children:`или`}),(0,e.jsx)(u,{onClick:()=>E.current?.click(),children:x})]})]})]}),l&&!d&&(0,e.jsx)(p,{id:A,children:l}),d&&(0,e.jsx)(p,{id:j,variant:`error`,live:!0,children:d})]})},_t={wrapper:`_wrapper_x2gki_1`,control:`_control_x2gki_15`,textarea:`_textarea_x2gki_25`,disabledText:`_disabledText_x2gki_27`,sm:`_sm_x2gki_103`,md:`_md_x2gki_117`,lg:`_lg_x2gki_131`,autoResize:`_autoResize_x2gki_145`,manualResize:`_manualResize_x2gki_155`,textareaError:`_textareaError_x2gki_163`,clearAction:`_clearAction_x2gki_171`,messages:`_messages_x2gki_251`,counter:`_counter_x2gki_265`},vt=2;function yt(e){let t=window.getComputedStyle(e),n=Number.parseFloat(t.lineHeight);return Number.isFinite(n)?n:Number.parseFloat(t.fontSize)*1.4}function bt({value:n,onChange:r,placeholder:i=``,disabled:a=!1,readOnly:o=!1,stringWhileDisabled:s=!1,label:c,error:l,hint:u,className:d=``,name:m,id:h,size:g=`md`,clearable:_=!1,required:v=!1,maxLength:y,showCount:b=!1,minRows:x=vt,maxRows:S,autoResize:C=!0,...w}){let T=(0,t.useId)(),E=h??`ds-textarea-${m??T}`,D=(0,t.useRef)(null),O=u?`${E}-hint`:void 0,k=l?`${E}-error`:void 0,A=b&&y?`${E}-count`:void 0,j=[O,k,A].filter(Boolean).join(` `)||void 0,M=Math.max(1,x),N=S===void 0?void 0:Math.max(M,S),P=(0,t.useCallback)(()=>{let e=D.current;if(!e||!C)return;let t=window.getComputedStyle(e),n=yt(e),r=Number.parseFloat(t.paddingTop)+Number.parseFloat(t.paddingBottom)+Number.parseFloat(t.borderTopWidth)+Number.parseFloat(t.borderBottomWidth),i=n*M+r,a=N===void 0?1/0:n*N+r;e.style.height=`auto`;let o=Math.min(Math.max(e.scrollHeight,i),a);e.style.height=`${o}px`,e.style.overflowY=e.scrollHeight>a?`auto`:`hidden`},[C,N,M]);(0,t.useEffect)(()=>{P()},[P,n]),(0,t.useEffect)(()=>{if(!C)return;window.addEventListener(`resize`,P);let e=D.current?.parentElement,t;if(e&&typeof ResizeObserver<`u`){let n=e.getBoundingClientRect().width;t=new ResizeObserver(([e])=>{!e||e.contentRect.width===n||(n=e.contentRect.width,P())}),t.observe(e)}return()=>{window.removeEventListener(`resize`,P),t?.disconnect()}},[C,P]);let F=e=>{r?.(e.target.value,e),P()},I=()=>{let e=D.current;e&&((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus(),P())},L={"--ds-textarea-min-rows":M};return(0,e.jsxs)(`div`,{className:`${_t.wrapper} ${d}`,children:[c&&(0,e.jsx)(f,{htmlFor:E,required:v,disabled:a,children:c}),a&&s?(0,e.jsx)(`div`,{id:E,className:`${_t.disabledText} ${_t[g]}`,style:L,"aria-describedby":j,children:n||i}):(0,e.jsxs)(`div`,{className:_t.control,children:[(0,e.jsx)(`textarea`,{ref:D,id:E,name:m,value:n,placeholder:i,disabled:a,readOnly:o,required:v,maxLength:y,rows:M,style:L,"aria-invalid":!!l,"aria-describedby":j,className:`${_t.textarea} ${_t[g]} ${C?_t.autoResize:_t.manualResize} ${l?_t.textareaError:``}`,onChange:F,...w}),_&&n&&!a&&!o&&(0,e.jsx)(`button`,{type:`button`,className:_t.clearAction,"aria-label":`Очистить поле`,onClick:I,children:(0,e.jsx)(U,{name:`IconCross`,width:20,height:20})})]}),(u||l||A)&&(0,e.jsxs)(`div`,{className:_t.messages,children:[u&&!l&&(0,e.jsx)(p,{id:O,children:u}),l&&(0,e.jsx)(p,{id:k,variant:`error`,children:l}),A&&(0,e.jsxs)(`span`,{id:A,className:_t.counter,children:[n.length,` / `,y]})]})]})}var xt=0,Q=(0,i.create)((e,t)=>({modals:[],openModal:(t,n={},r={})=>{xt+=1;let i=`ds-modal-${xt}`;return e(e=>({modals:[...e.modals,{id:i,name:t,payload:n,title:r.title,description:r.description,closeOnEscape:r.closeOnEscape??!0,closeOnBackdrop:r.closeOnBackdrop??!0,onClose:r.onClose}]})),i},closeModal:n=>{let r=t().modals.find(e=>e.id===n);r&&(e(e=>({modals:e.modals.filter(e=>e.id!==n)})),r.onClose?.())},closeTopModal:()=>{let n=t().modals.at(-1);n&&(e(e=>({modals:e.modals.slice(0,-1)})),n.onClose?.())},closeAllModals:()=>{let n=t().modals;n.length&&(e({modals:[]}),n.forEach(e=>e.onClose?.()))}})),St=()=>{Q.getState().closeAllModals(),xt=0},Ct={layer:`_layer_1mvch_1`,backdrop:`_backdrop_1mvch_15`,panel:`_panel_1mvch_35`,header:`_header_1mvch_63`,title:`_title_1mvch_81`,description:`_description_1mvch_93`,content:`_content_1mvch_107`,close:`_close_1mvch_115`},wt=`button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,Tt=(0,t.createContext)({});function Et(e){if(e.key!==`Tab`)return;let t=Array.from(e.currentTarget.querySelectorAll(wt));if(!t.length){e.preventDefault();return}let n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())}var Dt=({children:n,title:r,description:i,modalId:a,closeLabel:o=`Закрыть модальное окно`,className:s=``,role:c=`dialog`})=>{let l=(0,t.useContext)(Tt),d=r??l.title,f=i??l.description,p=(0,t.useId)(),m=(0,t.useId)(),h=(0,t.useRef)(null),g=Q(e=>e.closeModal),_=d!=null,v=f!=null;return(0,t.useEffect)(()=>{let e=document.activeElement,t=h.current;return(t?.querySelector(wt)??t)?.focus(),()=>e?.focus()},[]),(0,e.jsxs)(`div`,{ref:h,className:`${Ct.panel} ${s}`,role:c,"aria-modal":`true`,"aria-labelledby":_?p:void 0,"aria-describedby":v?m:void 0,tabIndex:-1,onKeyDown:Et,children:[(_||o)&&(0,e.jsxs)(`header`,{className:Ct.header,children:[_&&(0,e.jsx)(`h2`,{id:p,className:Ct.title,children:d}),(0,e.jsx)(u,{className:Ct.close,variant:`empty`,size:`sm`,"aria-label":o,onClick:()=>g(a),children:(0,e.jsx)(U,{name:`IconCross`,width:24,height:24})})]}),v&&(0,e.jsx)(`p`,{id:m,className:Ct.description,children:f}),(0,e.jsx)(`div`,{className:Ct.content,children:n})]})},Ot=({registry:r})=>{let i=Q(e=>e.modals),a=Q(e=>e.closeModal),o=Q(e=>e.closeAllModals);return(0,t.useEffect)(()=>{let e=e=>{if(e.key!==`Escape`)return;let t=Q.getState().modals.at(-1);t?.closeOnEscape&&a(t.id)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),(0,t.useEffect)(()=>{i.forEach(e=>{r[e.name]||a(e.id)})},[a,i,r]),!i.length||typeof document>`u`?null:(0,n.createPortal)((0,e.jsx)(`div`,{className:Ct.layer,"aria-label":`Модальные окна`,children:i.map((t,n)=>{let s=r[t.name];return s?(0,e.jsx)(`div`,{className:Ct.backdrop,"aria-hidden":n!==i.length-1||void 0,inert:n!==i.length-1||void 0,onMouseDown:e=>{e.target===e.currentTarget&&t.closeOnBackdrop&&a(t.id)},children:(0,e.jsx)(Tt.Provider,{value:{title:t.title??t.payload.title,description:t.description??t.payload.description},children:(0,e.jsx)(s,{...t.payload,modalId:t.id,close:()=>a(t.id),closeAll:o})})},t.id):null})}),document.body)},kt=({registry:n,children:r,lockBodyScroll:i=!0})=>{let a=Q(e=>e.modals.length);return(0,t.useEffect)(()=>{if(!i||a===0)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[i,a]),(0,e.jsxs)(e.Fragment,{children:[r,(0,e.jsx)(Ot,{registry:n})]})},At=e=>e,jt={message:`_message_c23ie_1`,actions:`_actions_c23ie_13`},Mt=new Map,Nt=0,Pt=({modalId:t,close:n,title:r=`Подтверждение`,message:i=`Продолжить действие?`,confirmLabel:a=`Подтвердить`,cancelLabel:o=`Отмена`,tone:s=`default`,requestId:c})=>{let l=e=>{Mt.get(c)?.(e),Mt.delete(c),n()};return(0,e.jsxs)(Dt,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:jt.message,children:i}),(0,e.jsxs)(`div`,{className:jt.actions,children:[(0,e.jsx)(u,{variant:`outline`,onClick:()=>l(!1),children:o}),(0,e.jsx)(u,{variant:s===`danger`?`destructive`:`primary`,onClick:()=>l(!0),children:a})]})]})},Ft=({modalId:t,close:n,title:r=`Ошибка`,message:i,closeLabel:a=`Закрыть`})=>(0,e.jsxs)(Dt,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:jt.message,children:i}),(0,e.jsx)(`div`,{className:jt.actions,children:(0,e.jsx)(u,{onClick:n,children:a})})]}),It=At({ConfirmModal:Pt,ErrorModal:Ft}),Lt=()=>{let e=Q(e=>e.openModal);return(t={})=>new Promise(n=>{Nt+=1;let r=`confirm-${Nt}`;Mt.set(r,n),e(`ConfirmModal`,{...t,requestId:r},{closeOnEscape:!1,onClose:()=>{Mt.get(r)?.(!1),Mt.delete(r)}})})},Rt=e=>e instanceof Error?e.message:typeof e==`string`?e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:`Произошла неизвестная ошибка`,zt=()=>{let e=Q(e=>e.openModal);return{showError:(t,n)=>e(`ErrorModal`,{title:n,message:Rt(t)})}},Bt=(0,i.create)(()=>({})),Vt=(0,i.create)(()=>({})),Ht=()=>{let e=Q(e=>e.modals),n=Q(e=>e.openModal),r=Q(e=>e.closeModal),i=Q(e=>e.closeTopModal),a=Q(e=>e.closeAllModals),o=(0,t.useCallback)((e,t={},r)=>n(e,t,r),[n]),s=(0,t.useCallback)(t=>e.some(e=>e.name===t),[e]);return(0,t.useMemo)(()=>({openModal:o,closeModal:r,closeTopModal:i,closeAllModals:a,isOpen:s,count:e.length}),[a,r,i,s,e.length,o])},Ut={wrapper:`_wrapper_71h8n_1`,container:`_container_71h8n_15`,inner:`_inner_71h8n_35`,cube:`_cube_71h8n_53`,jump:`_jump_71h8n_1`,cube__inner:`_cube__inner_71h8n_67`,morph:`_morph_71h8n_1`},Wt=()=>(0,e.jsx)(`div`,{className:Ut.wrapper,children:(0,e.jsx)(`div`,{className:Ut.container,children:(0,e.jsxs)(`div`,{className:Ut.inner,children:[(0,e.jsx)(`div`,{className:Ut.cube,children:(0,e.jsx)(`div`,{className:Ut.cube__inner})}),(0,e.jsx)(`div`,{className:Ut.cube,children:(0,e.jsx)(`div`,{className:Ut.cube__inner})}),(0,e.jsx)(`div`,{className:Ut.cube,children:(0,e.jsx)(`div`,{className:Ut.cube__inner})})]})})}),Gt={viewport:`_viewport_3qpmj_1`,"top-right":`_top-right_3qpmj_21`,"top-left":`_top-left_3qpmj_31`,"bottom-right":`_bottom-right_3qpmj_41`,"bottom-left":`_bottom-left_3qpmj_51`,toast:`_toast_3qpmj_61`,body:`_body_3qpmj_89`,info:`_info_3qpmj_109`,success:`_success_3qpmj_117`,warning:`_warning_3qpmj_125`,error:`_error_3qpmj_133`},Kt={info:{name:`IconInfoCircle`,color:`var(--color-primary)`},success:{name:`IconSuccessCircle`,color:`var(--color-success)`},warning:{name:`IconWarning`,color:`var(--color-warning)`},error:{name:`IconWarning`,color:`var(--color-error)`}},qt=({toast:n,onClose:r})=>{let[i,a]=(0,t.useState)(!1),o=(0,t.useRef)(n.duration),s=(0,t.useRef)(Date.now());return(0,t.useEffect)(()=>{if(i||n.duration<=0)return;s.current=Date.now();let e=setTimeout(()=>r(n.id),o.current);return()=>{clearTimeout(e),o.current=Math.max(0,o.current-(Date.now()-s.current))}},[r,i,n.duration,n.id]),(0,e.jsxs)(`article`,{className:`${Gt.toast} ${Gt[n.variant]}`,role:n.variant===`error`?`alert`:`status`,"aria-live":n.variant===`error`?`assertive`:`polite`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[(0,e.jsx)(`div`,{children:(0,e.jsx)(U,{...Kt[n.variant],width:24,height:24})}),(0,e.jsxs)(`div`,{className:Gt.body,children:[n.title&&(0,e.jsx)(`strong`,{children:n.title}),(0,e.jsx)(`div`,{children:n.message}),n.action&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,onClick:()=>{n.action?.onClick(),(n.action?.dismissOnClick??!0)&&r(n.id)},children:n.action.label})]}),n.closable&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Закрыть уведомление`,onClick:()=>r(n.id),children:(0,e.jsx)(U,{name:`IconCross`,width:24,height:24})})]})},Jt=0,Yt=(0,i.create)(e=>({toasts:[],showToast:t=>{Jt+=1;let n=`ds-toast-${Jt}`;return e(e=>({toasts:[...e.toasts,{variant:`info`,duration:5e3,closable:!0,...t,id:n}]})),n},removeToast:t=>e(e=>({toasts:e.toasts.filter(e=>e.id!==t)})),clearToasts:()=>e({toasts:[]})})),Xt=()=>Yt.setState({toasts:[]}),Zt=({position:t=`top-right`})=>{let n=Yt(e=>e.toasts),r=Yt(e=>e.removeToast);return(0,e.jsx)(`div`,{className:`${Gt.viewport} ${Gt[t]}`,"aria-label":`Уведомления`,children:n.map(t=>(0,e.jsx)(qt,{toast:t,onClose:r},t.id))})},Qt=()=>{let e=Yt(e=>e.showToast),n=Yt(e=>e.removeToast),r=Yt(e=>e.clearToasts),i=(0,t.useCallback)(t=>e({...t,variant:`info`}),[e]),a=(0,t.useCallback)(t=>e({...t,variant:`success`}),[e]),o=(0,t.useCallback)(t=>e({...t,variant:`warning`}),[e]),s=(0,t.useCallback)(t=>e({...t,variant:`error`}),[e]);return(0,t.useMemo)(()=>({showToast:e,infoToast:i,successToast:a,warningToast:o,errorToast:s,removeToast:n,clearToasts:r}),[r,s,i,n,e,a,o])},$t={root:`_root_8dm5q_1`,tooltip:`_tooltip_8dm5q_11`,"ds-tooltip-in":`_ds-tooltip-in_8dm5q_1`,top:`_top_8dm5q_43`,bottom:`_bottom_8dm5q_55`,left:`_left_8dm5q_67`,right:`_right_8dm5q_79`},en=({content:n,children:r,placement:i=`top`,delay:a=450,disabled:o=!1,maxWidth:s=280,className:c=``})=>{let l=(0,t.useId)(),[u,d]=(0,t.useState)(!1),f=(0,t.useRef)(null),p=()=>{o||!n||(f.current=setTimeout(()=>d(!0),a))},m=()=>{f.current&&clearTimeout(f.current),d(!1)};if((0,t.useEffect)(()=>{let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),f.current&&clearTimeout(f.current)}},[]),!(0,t.isValidElement)(r))return r;let h=(0,t.cloneElement)(r,{"aria-describedby":u?l:void 0,onMouseEnter:p,onMouseLeave:m,onFocus:p,onBlur:m});return(0,e.jsxs)(`span`,{className:`${$t.root} ${c}`,onPointerDown:u?m:p,children:[h,u&&(0,e.jsx)(`span`,{id:l,role:`tooltip`,className:`${$t.tooltip} ${$t[i]}`,style:{maxWidth:s},children:n})]})},tn=e=>{if(!Number.isFinite(e)||e<0)return`00:00`;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=`${String(r).padStart(2,`0`)}:${String(i).padStart(2,`0`)}`;return n?`${n}:${a}`:a},$={root:`_root_1h73w_1`,frame:`_frame_1h73w_35`,video:`_video_1h73w_65`,overlay:`_overlay_1h73w_81`,state:`_state_1h73w_83`,buffering:`_buffering_1h73w_85`,loaderViewport:`_loaderViewport_1h73w_145`,loaderScale:`_loaderScale_1h73w_157`,stateIcon:`_stateIcon_1h73w_171`,empty:`_empty_1h73w_203`,error:`_error_1h73w_213`,replay:`_replay_1h73w_225`,controlsLayer:`_controlsLayer_1h73w_261`,controlsVisible:`_controlsVisible_1h73w_287`,controls:`_controls_1h73w_261`,controlGroup:`_controlGroup_1h73w_311`,controlButton:`_controlButton_1h73w_337`,settingsAction:`_settingsAction_1h73w_369`,timeline:`_timeline_1h73w_401`,volume:`_volume_1h73w_403`,settings:`_settings_1h73w_369`,playButton:`_playButton_1h73w_417`,volumeGroup:`_volumeGroup_1h73w_431`,timelineGroup:`_timelineGroup_1h73w_455`,time:`_time_1h73w_401`,settingsActionLabel:`_settingsActionLabel_1h73w_693`,caption:`_caption_1h73w_705`,fullscreen:`_fullscreen_1h73w_719`},nn=2500,rn=5,an=.05,on=[.5,.75,1,1.25,1.5,2],sn=({sources:n,tracks:r=[],title:i,aspectRatio:a=`16 / 9`,objectFit:o=`contain`,loading:s=!1,error:l,fallback:d,className:f=``,controls:p=!0,playsInline:m=!0,...h})=>{let g=(0,t.useRef)(null),_=(0,t.useRef)(null),v=(0,t.useRef)(null),y=(0,t.useRef)(void 0),[b,x]=(0,t.useState)(!1),[S,C]=(0,t.useState)(n.length>0),[w,T]=(0,t.useState)(!1),[E,D]=(0,t.useState)(!1),[O,k]=(0,t.useState)(!1),[A,j]=(0,t.useState)(0),[M,N]=(0,t.useState)(0),[P,F]=(0,t.useState)(0),[I,L]=(0,t.useState)(1),[R,z]=(0,t.useState)(!!h.muted),[ee,B]=(0,t.useState)(1),[V,H]=(0,t.useState)(!!h.loop),[W,te]=(0,t.useState)(-1),[G,ne]=(0,t.useState)(!1),[re,K]=(0,t.useState)(!0),[ie,ae]=(0,t.useState)(!1),[oe,se]=(0,t.useState)(!1),ce=n.map(({src:e,type:t})=>`${e}:${t??``}`).join(`|`),le=r.map((e,t)=>({track:e,index:t})).filter(({track:e})=>e.kind===`captions`||e.kind===`subtitles`),ue=l??(b?`Не удалось воспроизвести видео`:void 0),q=s||S&&!ue&&n.length>0,de=!q&&!ue&&n.length===0,fe=typeof document<`u`&&`pictureInPictureEnabled`in document&&document.pictureInPictureEnabled,pe=(0,t.useCallback)(()=>{K(!0),window.clearTimeout(y.current),E&&!G&&(y.current=window.setTimeout(()=>K(!1),nn))},[E,G]);(0,t.useEffect)(()=>{x(!1),C(n.length>0),T(!1),D(!1),k(!1),j(0),N(0),F(0)},[ce,n.length]),(0,t.useEffect)(()=>(pe(),()=>window.clearTimeout(y.current)),[pe]),(0,t.useEffect)(()=>{let e=()=>ae(document.fullscreenElement===_.current),t=()=>se(document.pictureInPictureElement===v.current);return document.addEventListener(`fullscreenchange`,e),document.addEventListener(`enterpictureinpicture`,t),document.addEventListener(`leavepictureinpicture`,t),()=>{document.removeEventListener(`fullscreenchange`,e),document.removeEventListener(`enterpictureinpicture`,t),document.removeEventListener(`leavepictureinpicture`,t)}},[]),(0,t.useEffect)(()=>{if(!G)return;let e=e=>{g.current?.contains(e.target)||ne(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[G]);let me=async()=>{let e=v.current;if(!(!e||ue||q)){if(e.paused||e.ended){e.ended&&(e.currentTime=0);try{await e.play()}catch{x(!0)}}else e.pause()}},he=()=>{let e=v.current;e&&(e.muted=!e.muted)},ge=e=>{let t=v.current;t&&(t.volume=Math.min(1,Math.max(0,e)),t.muted=t.volume===0)},_e=e=>{let t=v.current;!t||!M||(t.currentTime=Math.min(M,Math.max(0,e)),j(t.currentTime))},ve=async()=>{if(_.current)try{document.fullscreenElement?await document.exitFullscreen():await _.current.requestFullscreen()}catch{ae(!1)}},ye=async()=>{let e=v.current;if(!(!e||!fe))try{document.pictureInPictureElement?await document.exitPictureInPicture():await e.requestPictureInPicture()}catch{se(!1)}},be=e=>{let t=v.current;t&&(Array.from(t.textTracks).forEach((t,n)=>{t.mode=n===e?`showing`:`disabled`}),te(e))},xe=e=>{let t=e.target;if(/^(INPUT|SELECT|BUTTON)$/.test(t.tagName))return;let n=e.key.toLowerCase();n===` `||n===`k`?(e.preventDefault(),me()):n===`m`?(e.preventDefault(),he()):n===`f`?(e.preventDefault(),ve()):n===`c`&&le.length?(e.preventDefault(),be(W===-1?le[0].index:-1)):e.key===`ArrowLeft`||e.key===`ArrowRight`?(e.preventDefault(),_e(A+(e.key===`ArrowRight`?rn:-5))):e.key===`ArrowUp`||e.key===`ArrowDown`?(e.preventDefault(),ge(I+(e.key===`ArrowUp`?an:-.05))):e.key===`Escape`&&ne(!1),pe()},Se=()=>{let e=v.current;x(!1),C(!0),e?.load()},Ce={"--video-progress":`${M?A/M*100:0}%`,"--video-buffered":`${P*100}%`};return(0,e.jsxs)(`figure`,{ref:g,className:`${$.root} ${f}`,onKeyDown:xe,children:[(0,e.jsxs)(`div`,{ref:_,className:`${$.frame} ${ie?$.fullscreen:``}`,style:{aspectRatio:a},"aria-busy":q||void 0,tabIndex:p&&n.length?0:void 0,onPointerMove:pe,onPointerDown:pe,onFocusCapture:pe,onMouseLeave:()=>{E&&!G&&K(!1)},children:[n.length>0&&(0,e.jsxs)(`video`,{...h,ref:v,"aria-label":i,controls:!1,playsInline:m,loop:V,className:$.video,style:{objectFit:o},onClick:e=>{h.onClick?.(e),me()},onDoubleClick:e=>{h.onDoubleClick?.(e),ve()},onLoadStart:e=>{C(!0),h.onLoadStart?.(e)},onLoadedMetadata:e=>{N(e.currentTarget.duration||0);let t=le.find(({track:e})=>e.default);be(t?.index??-1),h.onLoadedMetadata?.(e)},onDurationChange:e=>{N(e.currentTarget.duration||0),h.onDurationChange?.(e)},onTimeUpdate:e=>{j(e.currentTarget.currentTime),h.onTimeUpdate?.(e)},onProgress:e=>{let t=e.currentTarget;t.duration&&t.buffered.length&&F(t.buffered.end(t.buffered.length-1)/t.duration),h.onProgress?.(e)},onLoadedData:e=>{C(!1),T(!1),h.onLoadedData?.(e)},onCanPlay:e=>{C(!1),T(!1),h.onCanPlay?.(e)},onWaiting:e=>{T(!0),h.onWaiting?.(e)},onPlaying:e=>{D(!0),k(!1),T(!1),h.onPlaying?.(e)},onPlay:e=>{D(!0),h.onPlay?.(e)},onPause:e=>{D(!1),h.onPause?.(e)},onEnded:e=>{D(!1),k(!0),K(!0),h.onEnded?.(e)},onVolumeChange:e=>{L(e.currentTarget.volume),z(e.currentTarget.muted),h.onVolumeChange?.(e)},onRateChange:e=>{B(e.currentTarget.playbackRate),h.onRateChange?.(e)},onError:e=>{C(!1),T(!1),x(!0),h.onError?.(e)},children:[n.map(t=>(0,e.jsx)(`source`,{...t},`${t.src}-${t.type}`)),r.map(t=>(0,e.jsx)(`track`,{...t},`${t.src}-${t.srcLang}`))]}),q&&(0,e.jsxs)(`div`,{className:$.overlay,role:`status`,"aria-live":`polite`,children:[(0,e.jsx)(`div`,{className:$.loaderViewport,"aria-hidden":`true`,children:(0,e.jsx)(`div`,{className:$.loaderScale,children:(0,e.jsx)(Wt,{})})}),(0,e.jsx)(`span`,{children:`Загрузка видео`})]}),!q&&w&&!ue&&(0,e.jsx)(`div`,{className:$.buffering,role:`status`,"aria-label":`Буферизация видео`,children:(0,e.jsx)(c,{variant:`empty`})}),de&&(0,e.jsxs)(`div`,{className:`${$.state} ${$.empty}`,role:`status`,children:[(0,e.jsx)(U,{name:`IconInfoCircle`,className:$.stateIcon,width:40,height:40}),(0,e.jsx)(`strong`,{children:`Видео отсутствует`}),d??(0,e.jsx)(`span`,{children:`Источник видео не указан`})]}),!q&&ue&&(0,e.jsxs)(`div`,{className:`${$.state} ${$.error}`,role:`alert`,children:[(0,e.jsx)(U,{name:`IconWarning`,className:$.stateIcon,width:40,height:40}),d??(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`strong`,{children:`Видео недоступно`}),(0,e.jsx)(`span`,{children:ue})]}),n.length>0&&(0,e.jsx)(u,{size:`sm`,variant:`secondary`,onClick:Se,children:`Повторить`})]}),!q&&!ue&&O&&(0,e.jsx)(`button`,{type:`button`,className:$.replay,"aria-label":`Воспроизвести заново`,onClick:()=>void me(),children:(0,e.jsx)(U,{name:`IconReplay`,width:28,height:28})}),p&&n.length>0&&!q&&!ue&&(0,e.jsxs)(`div`,{className:`${$.controlsLayer} ${re||!E?$.controlsVisible:``}`,onClick:e=>e.stopPropagation(),children:[G&&(0,e.jsxs)(`div`,{className:$.settings,role:`dialog`,"aria-label":`Настройки видео`,children:[(0,e.jsxs)(`label`,{children:[(0,e.jsx)(`span`,{children:`Скорость`}),(0,e.jsx)(`select`,{value:ee,onChange:e=>{let t=Number(e.target.value);v.current&&(v.current.playbackRate=t)},children:on.map(t=>(0,e.jsxs)(`option`,{value:t,children:[t,`×`]},t))})]}),le.length>0&&(0,e.jsxs)(`label`,{children:[(0,e.jsx)(`span`,{children:`Субтитры`}),(0,e.jsxs)(`select`,{value:W,onChange:e=>be(Number(e.target.value)),children:[(0,e.jsx)(`option`,{value:-1,children:`Выключены`}),le.map(({track:t,index:n})=>(0,e.jsx)(`option`,{value:n,children:t.label},`${t.srcLang}-${t.label}`))]})]}),(0,e.jsxs)(`button`,{type:`button`,className:$.settingsAction,"aria-pressed":V,onClick:()=>H(e=>!e),children:[(0,e.jsx)(`span`,{children:`Повтор`}),(0,e.jsx)(`span`,{children:V?`Вкл.`:`Выкл.`})]}),fe&&(0,e.jsx)(`button`,{type:`button`,className:$.settingsAction,"aria-pressed":oe,onClick:()=>void ye(),children:(0,e.jsxs)(`span`,{className:$.settingsActionLabel,children:[(0,e.jsx)(U,{name:`IconPictureInPicture`,width:18,height:18}),`Картинка в картинке`]})})]}),(0,e.jsxs)(`div`,{className:$.controls,children:[(0,e.jsx)(`div`,{className:$.controlGroup,children:(0,e.jsx)(`button`,{type:`button`,className:`${$.controlButton} ${$.playButton}`,"aria-label":E?`Пауза`:`Воспроизвести`,title:E?`Пауза (K)`:`Воспроизвести (K)`,onClick:()=>void me(),children:(0,e.jsx)(U,{name:E?`IconPause`:`IconPlay`,width:24,height:24})})}),(0,e.jsxs)(`div`,{className:`${$.controlGroup} ${$.volumeGroup}`,children:[(0,e.jsx)(`button`,{type:`button`,className:$.controlButton,"aria-label":R?`Включить звук`:`Выключить звук`,"aria-pressed":R,title:`Звук (M)`,onClick:he,children:(0,e.jsx)(U,{name:R||I===0?`IconVolumeMuted`:`IconVolume`,width:22,height:22})}),(0,e.jsx)(`input`,{className:$.volume,type:`range`,min:0,max:1,step:.05,value:R?0:I,"aria-label":`Громкость`,"aria-valuetext":`${Math.round((R?0:I)*100)}%`,onChange:e=>ge(Number(e.target.value))})]}),(0,e.jsxs)(`div`,{className:`${$.controlGroup} ${$.timelineGroup}`,children:[(0,e.jsx)(`span`,{className:$.time,children:tn(A)}),(0,e.jsx)(`input`,{className:$.timeline,style:Ce,type:`range`,min:0,max:M||0,step:.01,value:Math.min(A,M||0),"aria-label":`Позиция воспроизведения`,"aria-valuetext":`${tn(A)} из ${tn(M)}`,onChange:e=>_e(Number(e.target.value))}),(0,e.jsx)(`span`,{className:$.time,children:tn(M)})]}),(0,e.jsxs)(`div`,{className:$.controlGroup,children:[(0,e.jsx)(`button`,{type:`button`,className:$.controlButton,"aria-label":`Настройки`,"aria-expanded":G,title:`Настройки`,onClick:()=>ne(e=>!e),children:(0,e.jsx)(U,{name:`IconSettings`,width:22,height:22})}),(0,e.jsx)(`button`,{type:`button`,className:$.controlButton,"aria-label":ie?`Выйти из полноэкранного режима`:`Полноэкранный режим`,title:`Полноэкранный режим (F)`,onClick:()=>void ve(),children:(0,e.jsx)(U,{name:ie?`IconFullscreenExit`:`IconFullscreen`,width:22,height:22})})]})]})]})]}),(0,e.jsx)(`figcaption`,{className:$.caption,children:i})]})},cn={root:`_root_ymidq_1`,trigger:`_trigger_ymidq_15`,heading:`_heading_ymidq_41`,title:`_title_ymidq_51`,subtitle:`_subtitle_ymidq_59`,icon:`_icon_ymidq_69`,open:`_open_ymidq_91`,content:`_content_ymidq_99`,contentInner:`_contentInner_ymidq_119`},ln=(e,t,n,r=16)=>{if(t>Math.max(0,n-r*2)){let t=e-r;return Math.abs(t)<=1?{alignment:`none`,delta:0}:{alignment:`start`,delta:t}}let i=e+t,a=n-r;return i>a?{alignment:`end`,delta:i-a}:e<r?{alignment:`start`,delta:e-r}:{alignment:`none`,delta:0}},un=({title:n,subtitle:r,children:i,defaultOpen:a=!1,open:o,onOpenChange:s,autoScrollOnOpen:c=!0,scrollOffset:l=16,className:u=``})=>{let d=(0,t.useId)(),[f,p]=(0,t.useState)(a),m=o??f,h=(0,t.useRef)(null),g=(0,t.useRef)(null),_=(0,t.useRef)(m);return(0,t.useEffect)(()=>{let e=_.current;if(_.current=m,!m||e||!c)return;let t=h.current,n=g.current;if(!t||!n||typeof window>`u`)return;let r=!1,i=()=>{if(r)return;r=!0;let e=t.getBoundingClientRect(),n=ln(e.top,e.height,window.innerHeight,l);if(n.alignment===`none`)return;let i=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;window.scrollBy({top:n.delta,behavior:i?`auto`:`smooth`})},a=e=>{e.target===n&&e.propertyName===`grid-template-rows`&&i()};n.addEventListener(`transitionend`,a);let o=window.setTimeout(i,280);return()=>{n.removeEventListener(`transitionend`,a),window.clearTimeout(o)}},[c,m,l]),(0,e.jsxs)(`section`,{ref:h,className:`${cn.root} ${m?cn.open:``} ${u}`,children:[(0,e.jsxs)(`button`,{type:`button`,className:cn.trigger,"aria-expanded":m,"aria-controls":d,onClick:()=>{let e=!m;o===void 0&&p(e),s?.(e)},children:[(0,e.jsxs)(`span`,{className:cn.heading,children:[(0,e.jsx)(`span`,{className:cn.title,children:n}),r&&(0,e.jsx)(`span`,{className:cn.subtitle,children:r})]}),(0,e.jsx)(`span`,{className:cn.icon,"aria-hidden":`true`,children:(0,e.jsx)(U,{name:`IconChevron`,width:20,height:20})})]}),(0,e.jsx)(`div`,{ref:g,id:d,className:cn.content,"aria-hidden":!m,children:(0,e.jsx)(`div`,{className:cn.contentInner,children:i})})]})},dn=({children:e,containerId:r=`overlay-root`})=>{let[i,a]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e=document.getElementById(r);if(e){a(e);return}let t=document.createElement(`div`);return t.id=r,document.body.appendChild(t),a(t),()=>{t.childElementCount===0&&t.parentElement&&t.remove()}},[r]),i?(0,n.createPortal)(e,i):null};exports.ConfirmModal=Pt,exports.DSAccordion=un,exports.DSBadge=o,exports.DSButton=u,exports.DSCheckbox=te,exports.DSDataTable=Ge,exports.DSDateRange=Se,exports.DSDateTimePicker=ye,exports.DSDropDown=Ae,exports.DSDropDownMultiple=Xe,exports.DSFieldLabel=f,exports.DSFieldMessage=p,exports.DSFileInput=gt,exports.DSFilters=ft,exports.DSIcon=U,exports.DSInfoBlock=ct,exports.DSInput=Qe,exports.DSLoader=c,exports.DSModal=Ot,exports.DSModalFrame=Dt,exports.DSPageLoader=Wt,exports.DSPortal=dn,exports.DSRadioButton=ut,exports.DSSearchDropDown=ot,exports.DSSkeleton=we,exports.DSSort=Me,exports.DSTextarea=bt,exports.DSToast=qt,exports.DSToastProvider=Zt,exports.DSTooltip=en,exports.DSVideoPlayerFrame=sn,exports.ErrorModal=Ft,exports.ModalSystemProvider=kt,exports.builtInModalRegistry=It,exports.defineModalRegistry=At,exports.formatDateInputValue=oe,exports.formatDateTimeLocalValue=de,exports.getDSAccordionScrollTarget=ln,exports.getDSDataTableColumnStyle=Pe,exports.getDSDataTablePaginationItems=Fe,exports.getErrorMessage=Rt,exports.getNextEnabledOptionIndex=Oe,exports.isValidDateInputPrefix=le,exports.isValidDateRange=xe,exports.maskDateInputValue=se,exports.parseDateInputValue=ue,exports.parseDateTimeLocalValue=fe,exports.resetModalStore=St,exports.resetToastStore=Xt,exports.useConfirmModal=Lt,exports.useConfirmModalStore=Bt,exports.useErrorModal=zt,exports.useErrorModalStore=Vt,exports.useModals=Ht,exports.useModalsStore=Q,exports.useToast=Qt,exports.useToastStore=Yt,exports.validateDSDataTableData=Ie;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("@tanstack/react-table"),i=require("zustand");var a={badge:`_badge_1erxk_1`,sm:`_sm_1erxk_29`,md:`_md_1erxk_39`,neutral:`_neutral_1erxk_49`,info:`_info_1erxk_61`,success:`_success_1erxk_73`,warning:`_warning_1erxk_85`,error:`_error_1erxk_97`,dot:`_dot_1erxk_109`,icon:`_icon_1erxk_125`,label:`_label_1erxk_135`},o=({children:t,variant:n=`neutral`,size:r=`md`,dot:i=!1,icon:o,className:s=``})=>(0,e.jsxs)(`span`,{className:`${a.badge} ${a[n]} ${a[r]} ${s}`,children:[i&&(0,e.jsx)(`span`,{className:a.dot,"aria-hidden":`true`}),o&&(0,e.jsx)(`span`,{className:a.icon,"aria-hidden":`true`,children:o}),(0,e.jsx)(`span`,{className:a.label,children:t})]}),s={container:`_container_1jyk1_1`,inner:`_inner_1jyk1_21`,line:`_line_1jyk1_39`,primary:`_primary_1jyk1_57`,secondary:`_secondary_1jyk1_65`,outline:`_outline_1jyk1_73`,ghost:`_ghost_1jyk1_81`,empty:`_empty_1jyk1_89`,destructive:`_destructive_1jyk1_97`,destructiveOutline:`_destructiveOutline_1jyk1_105`,grow:`_grow_1jyk1_1`},c=({variant:t=`primary`})=>(0,e.jsx)(`div`,{className:`${s.container} ${s[t]}`,children:(0,e.jsxs)(`div`,{className:`${s.inner} ${s[t]}`,children:[(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`}),(0,e.jsx)(`div`,{className:`${s.line} ${s[t]}`})]})}),l={button:`_button_8341b_1`,sm:`_sm_8341b_59`,md:`_md_8341b_73`,lg:`_lg_8341b_87`,primary:`_primary_8341b_101`,secondary:`_secondary_8341b_115`,outline:`_outline_8341b_129`,ghost:`_ghost_8341b_143`,empty:`_empty_8341b_157`,destructive:`_destructive_8341b_171`,destructiveOutline:`_destructiveOutline_8341b_183`},u=(0,t.forwardRef)(({children:t,variant:n=`primary`,size:r=`md`,isLoading:i=!1,disabled:a,type:o=`button`,className:s=``,...u},d)=>(0,e.jsx)(`button`,{ref:d,className:`${l.button} ${l[n]} ${l[r]} ${s}`,disabled:a||i,"aria-busy":i||void 0,...u,type:o,children:i?(0,e.jsx)(c,{variant:n}):t}));u.displayName=`DSButton`;var d={label:`_label_1o819_1`,required:`_required_1o819_23`,error:`_error_1o819_25`,optional:`_optional_1o819_33`,hint:`_hint_1o819_35`,disabled:`_disabled_1o819_47`,message:`_message_1o819_55`,success:`_success_1o819_71`},f=({children:t,required:n=!1,optionalText:r,disabled:i=!1,className:a=``,...o})=>(0,e.jsxs)(`label`,{className:`${d.label} ${i?d.disabled:``} ${a}`,...o,children:[(0,e.jsx)(`span`,{children:t}),n&&(0,e.jsx)(`span`,{className:d.required,"aria-hidden":`true`,children:`*`}),r&&(0,e.jsx)(`span`,{className:d.optional,children:r})]}),p=({children:t,variant:n=`hint`,id:r,live:i=!1,className:a=``})=>(0,e.jsx)(`span`,{id:r,className:`${d.message} ${d[n]} ${a}`,role:i&&n===`error`?`alert`:void 0,"aria-live":i&&n!==`error`?`polite`:void 0,children:t}),m=({width:t=24,height:n=24,color:r,title:i,style:a,children:o,...s})=>(0,e.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:t,height:n,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,role:i?`img`:void 0,"aria-hidden":!i||void 0,focusable:`false`,style:r?{...a,color:r}:a,...s,children:[i&&(0,e.jsx)(`title`,{children:i}),o]}),h=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 7h16l-1 13H5L4 7zm3 0V4h10v3`})}),g=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`m5 12 4 4L19 6`})}),_=t=>(0,e.jsx)(m,{viewBox:`0 0 20 20`,...t,children:(0,e.jsx)(`path`,{d:`M5 7.5L10 12.5L15 7.5`})}),v=({strokeWidth:t=2,...n})=>(0,e.jsx)(m,{strokeWidth:t,...n,children:(0,e.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),y=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 20h4L19 9l-4-4L4 16v4z`})}),b=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m15 9-6 6M9 9l6 6`})]}),x=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`path`,{d:`M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z`}),(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.5`})]}),S=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5`})}),C=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 10v7m0-10v.01`})}),w=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`M12 16v-4M12 8v.01`})]}),T=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M5 12h14`})}),E=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M8 5v14M16 5v14`,strokeWidth:`3`})}),D=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z`})}),O=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`m8 5 11 7-11 7V5Z`,fill:`currentColor`,stroke:`none`})}),k=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3`})}),A=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm7.4 5.2.1-1.7-.1-1.7 2-1.5-2-3.4-2.4 1a8 8 0 0 0-2.9-1.7L13.8 2h-3.9l-.4 2.7a8 8 0 0 0-2.8 1.7l-2.5-1-2 3.4 2.1 1.5-.1 1.7.1 1.7-2.1 1.5 2 3.4 2.5-1a8 8 0 0 0 2.8 1.7l.4 2.7h3.9l.3-2.7a8 8 0 0 0 2.9-1.7l2.4 1 2-3.4-2-1.5Z`})}),j=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5`})}),M=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5`})}),N=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4`})}),P=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11`})}),F=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4`})}),I=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3`})}),L=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 19V5m-5 5 5-5 5 5`})}),R=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 5v14m-5-5 5 5 5-5`})}),ee=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),te=t=>(0,e.jsx)(m,{...t,children:(0,e.jsx)(`path`,{d:`M12 19V5m-5 5 5-5 5 5`})}),z=t=>(0,e.jsxs)(m,{...t,children:[(0,e.jsx)(`path`,{d:`M12 3.5L21 19H3L12 3.5Z`}),(0,e.jsx)(`path`,{d:`M12 9v4.5M12 16.5v.01`})]}),B=n=>r=>(0,e.jsx)(m,{...r,children:n.map(([e,n],r)=>(0,t.createElement)(e,{...n,key:n.key??`${e}-${r}`}))}),V={IconActivity:B([[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),IconAlertTriangle:B([[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}],[`path`,{d:`M12 9v4`}],[`path`,{d:`M12 17h.01`}]]),IconArrowDown:B([[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),IconArrowLeft:B([[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),IconArrowRight:B([[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),IconArrowUp:B([[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),IconArrowUpRight:B([[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),IconBarChart3:B([[`path`,{d:`M3 3v18h18`}],[`path`,{d:`M18 17V9`}],[`path`,{d:`M13 17V5`}],[`path`,{d:`M8 17v-3`}]]),IconBell:B([[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),IconBoxes:B([[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),IconBuilding2:B([[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),IconCamera:B([[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),IconChartNoAxesCombined:B([[`path`,{d:`M12 16v5`,key:`zza2cw`}],[`path`,{d:`M16 14.639V21`,key:`1s85h0`}],[`path`,{d:`M20 10.656V21`,key:`q45596`}],[`path`,{d:`m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15`,key:`1fw8x9`}],[`path`,{d:`M4 18.463V21`,key:`1otddq`}],[`path`,{d:`M8 14.656V21`,key:`1t2idw`}]]),IconChevronRight:B([[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),IconCircleAlert:B([[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),IconClock3:B([[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),IconDownload:B([[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),IconExternalLink:B([[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),IconFactory:B([[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`,key:`1iv0i2`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),IconGauge:B([[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),IconGripVertical:B([[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),IconLayoutDashboard:B([[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),IconLockKeyhole:B([[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),IconLogOut:B([[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),IconMaximize2:B([[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),IconMenu:B([[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),IconPackageCheck:B([[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),IconRefreshCw:B([[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),IconRotateCw:B([[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),IconSearch:B([[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),IconSettings2:B([[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),IconShieldAlert:B([[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),IconShieldCheck:B([[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),IconSmartphone:B([[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),IconSparkles:B([[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),IconTable2:B([[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),IconThermometer:B([[`path`,{d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z`,key:`17jzev`}]]),IconTrendingUp:B([[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),IconUserCheck:B([[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),IconUserRound:B([[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),IconUsers:B([[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),IconUserX:B([[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`17`,x2:`22`,y1:`8`,y2:`13`,key:`3nzzx3`}],[`line`,{x1:`22`,x2:`17`,y1:`8`,y2:`13`,key:`1swrse`}]]),IconVideo:B([[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),IconVideoOff:B([[`path`,{d:`M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196`,key:`w8jjjt`}],[`path`,{d:`M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`,key:`1xawa7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),IconVolume2:B([[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),IconX:B([[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),IconBasket:h,IconCheck:g,IconChevron:_,IconCross:v,IconEdit:y,IconErrorCircle:b,IconEye:x,IconEyeOff:S,IconInfo:C,IconInfoCircle:w,IconMinus:T,IconPause:E,IconPictureInPicture:D,IconPlay:O,IconReplay:k,IconSettings:A,IconFullscreen:j,IconFullscreenExit:M,IconCaptions:N,IconVolume:P,IconVolumeMuted:F,IconSort:I,IconSortAscending:L,IconSortDescending:R,IconSuccessCircle:ee,IconUpload:te,IconWarning:z},H=({name:t,...n})=>{let r=V[t];return(0,e.jsx)(r,{...n})},U={wrapper:`_wrapper_1seon_1`,label:`_label_1seon_13`,input:`_input_1seon_35`,control:`_control_1seon_49`,disabled:`_disabled_1seon_95`,controlError:`_controlError_1seon_121`},W=({checked:n,onChange:r,label:i,hint:a,error:o,disabled:s=!1,readOnly:c=!1,className:l=``,name:u,id:d,indeterminate:f=!1,...m})=>{let h=(0,t.useId)(),g=d??`ds-checkbox-${u??h}`,_=(0,t.useRef)(null),v=a?`${g}-hint`:void 0,y=o?`${g}-error`:void 0;return(0,t.useEffect)(()=>{_.current&&(_.current.indeterminate=f&&!n)},[n,f]),(0,e.jsxs)(`div`,{className:`${U.wrapper} ${l}`,children:[(0,e.jsxs)(`label`,{className:`${U.label} ${s?U.disabled:``}`,htmlFor:g,children:[(0,e.jsx)(`input`,{ref:_,id:g,name:u,type:`checkbox`,checked:n,disabled:s,"aria-readonly":c||void 0,"aria-invalid":!!o,"aria-describedby":[v,y].filter(Boolean).join(` `)||void 0,className:U.input,onChange:e=>{c||r?.(e.target.checked,e)},...m}),(0,e.jsxs)(`span`,{className:`${U.control} ${o?U.controlError:``}`,"aria-hidden":`true`,children:[f&&!n&&(0,e.jsx)(H,{name:`IconMinus`,width:16,height:16}),n&&(0,e.jsx)(H,{name:`IconCheck`,width:16,height:16})]}),i&&(0,e.jsx)(`span`,{children:i})]}),a&&!o&&(0,e.jsx)(p,{id:v,children:a}),o&&(0,e.jsx)(p,{id:y,variant:`error`,children:o})]})},G={wrapper:`_wrapper_su17c_1`,trigger:`_trigger_su17c_17`,sm:`_sm_su17c_53`,md:`_md_su17c_65`,lg:`_lg_su17c_75`,chevron:`_chevron_su17c_89`,chevronOpen:`_chevronOpen_su17c_115`,nav:`_nav_su17c_127`,day:`_day_su17c_129`,monthSelect:`_monthSelect_su17c_131`,yearInput:`_yearInput_su17c_133`,timeInput:`_timeInput_su17c_135`,dateInput:`_dateInput_su17c_147`,timeValue:`_timeValue_su17c_189`,chevronButton:`_chevronButton_su17c_201`,disabled:`_disabled_su17c_235`,validationTooltip:`_validationTooltip_su17c_249`,"validation-tooltip-lifetime":`_validation-tooltip-lifetime_su17c_1`,value:`_value_su17c_319`,placeholder:`_placeholder_su17c_335`,error:`_error_su17c_343`,panel:`_panel_su17c_351`,calendarHeader:`_calendarHeader_su17c_377`,weekdays:`_weekdays_su17c_467`,days:`_days_su17c_469`,outside:`_outside_su17c_505`,selected:`_selected_su17c_513`,timeLabel:`_timeLabel_su17c_533`,previousMonth:`_previousMonth_su17c_593`,nextMonth:`_nextMonth_su17c_601`},ne=[`Пн`,`Вт`,`Ср`,`Чт`,`Пт`,`Сб`,`Вс`],re=[`Январь`,`Февраль`,`Март`,`Апрель`,`Май`,`Июнь`,`Июль`,`Август`,`Сентябрь`,`Октябрь`,`Ноябрь`,`Декабрь`],K=e=>String(e).padStart(2,`0`),q=8,ie=`Некорректная дата`,ae=e=>e?`${K(e.getDate())}.${K(e.getMonth()+1)}.${e.getFullYear()}`:``,oe=e=>{let t=e.replace(/\D/g,``).slice(0,q);return[t.slice(0,2),t.slice(2,4),t.slice(4,8)].filter(Boolean).join(`.`)},se=e=>{if(!e)return!0;let t=Number(e.padEnd(4,`0`));return Number(e.padEnd(4,`9`))>=1800&&t<=2500},ce=e=>{if(!/^\d{0,8}$/.test(e))return!1;let t=e.slice(0,2),n=e.slice(2,4),r=e.slice(4,8);return t.length===1&&Number(t)>3||t.length===2&&(Number(t)<1||Number(t)>31)||n.length===1&&Number(n)>1||n.length===2&&(Number(n)<1||Number(n)>12)?!1:se(r)},le=e=>{let t=/^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]);if(i<1800||i>2500)return null;let a=new Date(i,r,n,12);return a.getFullYear()!==i||a.getMonth()!==r||a.getDate()!==n?null:a},ue=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),de=(e,t)=>{if(!e)return``;let n=`${e.getFullYear()}-${K(e.getMonth()+1)}-${K(e.getDate())}`,r=`${K(e.getHours())}:${K(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n}T${r}`},fe=(e,t)=>{if(!e)return null;if(t===`time`){let t=/^(\d{2}):(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);if(n>23||r>59)return null;let i=new Date;return i.setHours(n,r,0,0),i}if(t===`date`){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]),a=new Date(n,r,i,12);return a.getFullYear()!==n||a.getMonth()!==r||a.getDate()!==i?null:a}let n=new Date(e);return Number.isNaN(n.getTime())?null:n},pe=(e,t)=>{if(!e)return``;let n=`${K(e.getDate())}.${K(e.getMonth()+1)}.${e.getFullYear()}`,r=`${K(e.getHours())}:${K(e.getMinutes())}`;return t===`date`?n:t===`time`?r:`${n} ${r}`},me=e=>{let t=new Date(e.getFullYear(),e.getMonth(),1),n=(t.getDay()+6)%7,r=new Date(t);return r.setDate(t.getDate()-n),Array.from({length:42},(e,t)=>{let n=new Date(r);return n.setDate(r.getDate()+t),n})},he=(e,t)=>!!(e&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()),ge=(e,t,n)=>{let r=ue(e).getTime();return!!(t&&r<ue(t).getTime()||n&&r>ue(n).getTime())},_e=8,ve=6,ye=({value:r,onChange:i,mode:a=`date`,label:o,placeholder:s,hint:c,error:l,disabled:u=!1,readOnly:d=!1,required:m=!1,min:h,max:g,size:_=`md`,id:v,name:y,className:b=``})=>{let x=(0,t.useId)(),S=v??`ds-date-time-${y??x}`,C=c?`${S}-hint`:void 0,w=l?`${S}-error`:void 0,T=(0,t.useRef)(null),E=(0,t.useRef)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(null),[k,A]=(0,t.useState)(!1),[j,M]=(0,t.useState)(r??new Date),[N,P]=(0,t.useState)(de(r,`time`)),[F,I]=(0,t.useState)(ae(r)),[L,R]=(0,t.useState)(``),[ee,te]=(0,t.useState)(0),[z,B]=(0,t.useState)(null),V=(0,t.useMemo)(()=>me(j),[j]),U=a!==`time`,W=a!==`date`;(0,t.useEffect)(()=>{r&&M(r),P(de(r,`time`)),I(ae(r))},[r]),(0,t.useEffect)(()=>()=>{O.current&&clearTimeout(O.current)},[]);let K=(0,t.useCallback)(()=>{let e=E.current,t=D.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-_e,o=n.top-_e,s=a<r.height&&o>a,c=Math.max(120,s?o:a),l=s?Math.max(_e,n.top-r.height-ve):n.bottom+ve,u=n.left,d=i-r.width-_e;B({top:l,left:Math.max(_e,Math.min(u,d)),maxHeight:c})},[]);(0,t.useLayoutEffect)(()=>{if(!k){B(null);return}return K(),window.addEventListener(`resize`,K),window.addEventListener(`scroll`,K,!0),()=>{window.removeEventListener(`resize`,K),window.removeEventListener(`scroll`,K,!0)}},[k,K,j,N]),(0,t.useEffect)(()=>{if(!k)return;let e=e=>{let t=e.target,n=T.current?.contains(t),r=D.current?.contains(t);!n&&!r&&A(!1)},t=e=>{e.key===`Escape`&&(A(!1),E.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[k]);let se=e=>{if(ge(e,h,g))return;let t=a===`date`?fe(de(e,`date`),`date`):new Date(e);t&&(a!==`date`&&t.setHours(r?.getHours()??0,r?.getMinutes()??0,0,0),i?.(t),I(ae(t)),a===`date`&&A(!1))},ue=()=>{R(ie),te(e=>e+1),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{R(``),O.current=null},3e3)},ye=e=>{let t=e.replace(/\D/g,``).slice(0,q);if(!ce(t)){ue();return}let n=oe(t);if(I(n),!t){i?.(null);return}if(t.length<q)return;let o=le(n);if(!o||ge(o,h,g)){ue();return}a===`datetime`&&o.setHours(r?.getHours()??0,r?.getMinutes()??0,0,0),i?.(o),M(o),A(!1),requestAnimationFrame(()=>E.current?.blur())},be=e=>{if(P(e),!e){i?.(null);return}let t=fe(e,`time`);if(!t)return;let n=new Date(a===`datetime`?r??j:new Date);n.setHours(t.getHours(),t.getMinutes(),0,0),!(h&&n<h||g&&n>g)&&i?.(n)},xe=s??(a===`date`?`ДД.ММ.ГГГГ`:a===`time`?`ЧЧ:ММ`:`ДД.ММ.ГГГГ ЧЧ:ММ`),Se=L?`${S}-validation`:void 0,Ce=[C,w,Se].filter(Boolean).join(` `)||void 0,we=k&&!d?(0,e.jsxs)(`div`,{ref:D,className:G.panel,role:`dialog`,"aria-label":o??xe,style:z?{top:z.top,left:z.left,maxHeight:z.maxHeight}:{visibility:`hidden`,top:0,left:0},children:[U&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(`div`,{className:G.calendarHeader,children:[(0,e.jsx)(`button`,{type:`button`,className:G.nav,"aria-label":`Предыдущий месяц`,onClick:()=>M(new Date(j.getFullYear(),j.getMonth()-1,1)),children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20,className:G.previousMonth})}),(0,e.jsx)(`select`,{className:G.monthSelect,"aria-label":`Месяц`,value:j.getMonth(),onChange:e=>M(new Date(j.getFullYear(),Number(e.target.value),1)),children:re.map((t,n)=>(0,e.jsx)(`option`,{value:n,children:t},t))}),(0,e.jsx)(`input`,{className:G.yearInput,type:`number`,"aria-label":`Год`,value:j.getFullYear(),onChange:e=>M(new Date(Number(e.target.value),j.getMonth(),1))}),(0,e.jsx)(`button`,{type:`button`,className:G.nav,"aria-label":`Следующий месяц`,onClick:()=>M(new Date(j.getFullYear(),j.getMonth()+1,1)),children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20,className:G.nextMonth})})]}),(0,e.jsx)(`div`,{className:G.weekdays,children:ne.map(t=>(0,e.jsx)(`span`,{children:t},t))}),(0,e.jsx)(`div`,{className:G.days,children:V.map(t=>{let n=he(r,t);return(0,e.jsx)(`button`,{type:`button`,className:`${G.day} ${t.getMonth()===j.getMonth()?``:G.outside} ${n?G.selected:``}`,disabled:ge(t,h,g),"aria-pressed":n,onClick:()=>se(t),children:t.getDate()},t.toISOString())})})]}),W&&(0,e.jsxs)(`label`,{className:G.timeLabel,children:[(0,e.jsx)(`span`,{children:`Время`}),(0,e.jsx)(`input`,{className:G.timeInput,type:`time`,value:N,onChange:e=>be(e.target.value)})]})]}):null;return(0,e.jsxs)(`div`,{ref:T,className:`${G.wrapper} ${b}`,children:[o&&(0,e.jsx)(f,{htmlFor:S,required:m,disabled:u,children:o}),U?(0,e.jsxs)(`div`,{className:`${G.trigger} ${G[_]} ${l?G.error:``} ${u?G.disabled:``}`,children:[(0,e.jsx)(`input`,{ref:E,id:S,name:y,className:G.dateInput,value:F,placeholder:xe.split(` `)[0],inputMode:`numeric`,autoComplete:`off`,maxLength:10,disabled:u,readOnly:d,"aria-expanded":k,"aria-haspopup":`dialog`,"aria-describedby":Ce,"aria-invalid":!!(l||L)||void 0,onFocus:()=>{d||A(!0)},onClick:()=>{d||A(!0)},onChange:e=>ye(e.target.value)}),a===`datetime`&&N&&(0,e.jsx)(`span`,{className:G.timeValue,children:N}),(0,e.jsx)(`button`,{type:`button`,className:G.chevronButton,disabled:u||d,"aria-label":k?`Закрыть календарь`:`Открыть календарь`,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{A(e=>!e),E.current?.focus()},children:(0,e.jsx)(`span`,{className:`${G.chevron} ${we?G.chevronOpen:``}`,"aria-hidden":`true`,children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20})})})]}):(0,e.jsxs)(`button`,{ref:E,id:S,name:y,type:`button`,className:`${G.trigger} ${G[_]} ${l?G.error:``}`,disabled:u,"aria-readonly":d||void 0,"aria-expanded":k,"aria-haspopup":`dialog`,"aria-describedby":Ce,onClick:()=>{d||A(e=>!e)},children:[(0,e.jsx)(`span`,{className:r?G.value:G.placeholder,children:pe(r,a)||xe}),(0,e.jsx)(`span`,{className:`${G.chevron} ${we?G.chevronOpen:``}`,"aria-hidden":`true`,children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20})})]}),L&&(0,e.jsx)(`span`,{id:Se,className:G.validationTooltip,role:`status`,"aria-live":`polite`,children:L},ee),we&&(0,n.createPortal)(we,document.body),c&&!l&&(0,e.jsx)(p,{id:C,children:c}),l&&(0,e.jsx)(p,{id:w,variant:`error`,children:l})]})},be={root:`_root_19vq2_1`,range:`_range_19vq2_21`},xe=e=>!!(e.from&&e.to&&e.from.getTime()<=e.to.getTime()),Se=({value:t,onChange:n,onDraftChange:r,mode:i=`date`,fromLabel:a=`От`,toLabel:o=`До`,hint:s,error:c,min:l,max:u,disabled:d=!1,readOnly:f=!1,required:m=!1,className:h=``})=>{let g=c??(t.from&&t.to&&t.from>t.to?`Дата «От» не может быть позже даты «До»`:void 0),_=e=>{r?.(e),xe(e)&&n?.(e)};return(0,e.jsxs)(`fieldset`,{className:`${be.root} ${h}`,disabled:d,children:[(0,e.jsxs)(`div`,{className:be.range,children:[(0,e.jsx)(ye,{value:t.from,mode:i===`datetime`?`datetime`:i,label:a,min:l,max:t.to??u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,from:e})}),(0,e.jsx)(ye,{value:t.to,mode:i===`datetime`?`datetime`:i,label:o,min:t.from??l,max:u,disabled:d,readOnly:f,required:m,error:g,onChange:e=>_({...t,to:e})})]}),s&&!g&&(0,e.jsx)(p,{children:s})]})},Ce={group:`_group_10ug0_1`,skeleton:`_skeleton_10ug0_15`,text:`_text_10ug0_27`,rectangular:`_rectangular_10ug0_37`,circular:`_circular_10ug0_47`,animated:`_animated_10ug0_59`,"ds-skeleton":`_ds-skeleton_10ug0_1`},we=({variant:t=`text`,width:n=`100%`,height:r,lines:i=1,animated:a=!0,className:o=``})=>(0,e.jsx)(`span`,{className:`${Ce.group} ${o}`,"aria-hidden":`true`,children:Array.from({length:Math.max(1,i)},(i,o)=>(0,e.jsx)(`span`,{className:`${Ce.skeleton} ${Ce[t]} ${a?Ce.animated:``}`,style:{width:n,height:r}},o))}),J={wrapper:`_wrapper_6g3qd_1`,container:`_container_6g3qd_17`,trigger:`_trigger_6g3qd_25`,disabledText:`_disabledText_6g3qd_27`,sm:`_sm_6g3qd_53`,md:`_md_6g3qd_67`,lg:`_lg_6g3qd_81`,value:`_value_6g3qd_147`,placeholder:`_placeholder_6g3qd_149`,chevron:`_chevron_6g3qd_205`,chevronOpen:`_chevronOpen_6g3qd_231`,menu:`_menu_6g3qd_239`,option:`_option_6g3qd_269`,selected:`_selected_6g3qd_339`,message:`_message_6g3qd_359`,error:`_error_6g3qd_361`,errorState:`_errorState_6g3qd_387`},Te=8,Ee=6,De=120,Oe=(e,t,n)=>{if(!e.length)return-1;for(let r=0;r<e.length;r+=1){let i=(t+r*n+e.length)%e.length;if(!e[i]?.disabled)return i}return-1},ke=e=>{if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return 1/0},Ae=({options:r,value:i,onChange:a,placeholder:o=`Выберите опцию`,disabled:s=!1,stringWhileDisabled:c=!1,label:l,error:u,size:d=`md`,hint:p,className:m=``,required:h=!1,name:g,id:_,needMark:v=!0,maxMenuHeight:y})=>{let b=(0,t.useId)(),x=_??`ds-dropdown-${g??b}`,S=`${x}-listbox`,[C,w]=(0,t.useState)(!1),[T,E]=(0,t.useState)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)([]),j=(0,t.useMemo)(()=>r.find(e=>e.value===i),[r,i]),M=p?`${x}-hint`:void 0,N=u?`${x}-error`:void 0,P=[M,N].filter(Boolean).join(` `)||void 0,F=s&&c,I=(0,t.useCallback)(()=>{let e=O.current,t=k.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight-n.bottom-Te,o=n.top-Te,s=a<r.height&&o>a,c=Math.max(De,s?o:a),l=ke(y),u=Math.min(c,l),d=n.left,f=i-n.width-Te,p=Math.max(Te,Math.min(d,f)),m=s?Math.max(Te,n.top-r.height-Ee):n.bottom+Ee;E({top:m,left:p,width:n.width,maxHeight:u})},[y]);(0,t.useLayoutEffect)(()=>{if(!C){E(null);return}return I(),window.addEventListener(`resize`,I),window.addEventListener(`scroll`,I,!0),()=>{window.removeEventListener(`resize`,I),window.removeEventListener(`scroll`,I,!0)}},[C,I,r.length]),(0,t.useEffect)(()=>{if(!C)return;let e=e=>{let t=e.target,n=D.current?.contains(t),r=k.current?.contains(t);!n&&!r&&w(!1)},t=e=>{e.key===`Escape`&&(w(!1),O.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[C]);let L=(e,t)=>{let n=Oe(r,e,t);if(n===-1)return;let i=A.current[n];i?.focus(),i?.scrollIntoView({block:`nearest`})},R=e=>{e.disabled||(a?.(e.value,e),w(!1),O.current?.focus())},ee=C?(0,e.jsx)(`ul`,{ref:k,id:S,className:J.menu,role:`listbox`,"aria-label":l,style:T?{position:`fixed`,top:T.top,left:T.left,width:T.width,maxHeight:T.maxHeight}:{position:`fixed`,top:0,left:0,visibility:`hidden`,maxHeight:0},children:r.map((t,n)=>{let a=t.value===i;return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{A.current[n]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:[J[d],J.option,a?J.selected:``].filter(Boolean).join(` `),onClick:()=>R(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;L(n+t,t)}if(e.key===`Tab`&&w(!1),e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;L(e.key===`Home`?0:r.length-1,t)}(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),R(t))},children:[(0,e.jsx)(`span`,{children:t.label}),a&&v&&(0,e.jsx)(H,{name:`IconCheck`,width:16,height:16})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:D,className:[J.wrapper,u?J.errorState:``,m].filter(Boolean).join(` `),children:[l&&(0,e.jsx)(f,{required:h,disabled:s,htmlFor:F?void 0:x,children:l}),(0,e.jsx)(`div`,{className:J.container,children:F?(0,e.jsx)(`div`,{id:x,className:J.disabledText,"aria-describedby":P,children:j?.label??o}):(0,e.jsxs)(`button`,{ref:O,id:x,type:`button`,name:g,className:`${J.trigger} ${J[d]}`,disabled:s,"aria-haspopup":`listbox`,"aria-expanded":C,"aria-controls":S,"aria-describedby":P,"aria-invalid":!!u,onClick:()=>w(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),w(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>{L(e.key===`ArrowDown`?0:r.length-1,t)})}if(e.key===`Enter`&&C){e.preventDefault();let t=r.findIndex(e=>e.value===i);L(t>=0?t:0,1)}},children:[(0,e.jsx)(`span`,{className:`${j?J.value:J.placeholder}
2
+ ${J[d]}`,children:j?.label??o}),(0,e.jsx)(`span`,{className:[J.chevron,C?J.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20})})]})}),C&&(0,n.createPortal)(ee,document.body),p&&!u&&(0,e.jsx)(`span`,{id:M,className:J.message,children:p}),u&&(0,e.jsx)(`span`,{id:N,className:J.error,children:u})]})},je=e=>`${e.id}:${e.direction}`,Me=({options:t,value:n,onChange:r,label:i=`Сортировка`,placeholder:a=`Выберите сортировку`,disabled:o=!1,className:s})=>{let c=t.flatMap(e=>[{value:je({id:e.id,direction:`asc`}),label:e.ascLabel??`${e.label} · по возрастанию`,disabled:e.disabled},{value:je({id:e.id,direction:`desc`}),label:e.descLabel??`${e.label} · по убыванию`,disabled:e.disabled}]);return(0,e.jsx)(Ae,{options:c,value:n?je(n):``,label:i,placeholder:a,disabled:o,className:s,onChange:e=>{let t=e.lastIndexOf(`:`);r?.({id:e.slice(0,t),direction:e.slice(t+1)})}})},Y={root:`_root_1jtuu_1`,tableWrap:`_tableWrap_1jtuu_15`,table:`_table_1jtuu_15`,sticky:`_sticky_1jtuu_81`,sortButton:`_sortButton_1jtuu_95`,state:`_state_1jtuu_133`,cards:`_cards_1jtuu_145`,mobileSort:`_mobileSort_1jtuu_145`,card:`_card_1jtuu_145`,spanTwo:`_spanTwo_1jtuu_233`,clickableRow:`_clickableRow_1jtuu_241`,pagination:`_pagination_1jtuu_249`,paginationRange:`_paginationRange_1jtuu_275`,paginationControls:`_paginationControls_1jtuu_287`,pageNumbers:`_pageNumbers_1jtuu_289`,pageButton:`_pageButton_1jtuu_301`,ellipsis:`_ellipsis_1jtuu_311`,previousIcon:`_previousIcon_1jtuu_323`,nextIcon:`_nextIcon_1jtuu_331`,default:`_default_1jtuu_371`,tableOnMobile:`_tableOnMobile_1jtuu_371`,wide:`_wide_1jtuu_401`},Ne=(0,r.tableFeatures)({rowSortingFeature:r.rowSortingFeature,sortedRowModel:(0,r.createSortedRowModel)()}),Pe=e=>{if(!(!e||e.width===void 0&&e.minWidth===void 0&&e.maxWidth===void 0))return{width:e.width,minWidth:e.minWidth,maxWidth:e.maxWidth}},Fe=(e,t)=>t<=7?Array.from({length:t},(e,t)=>t):e<=3?[0,1,2,3,4,`ellipsis-end`,t-1]:e>=t-4?[0,`ellipsis-start`,t-5,t-4,t-3,t-2,t-1]:[0,`ellipsis-start`,e-1,e,e+1,`ellipsis-end`,t-1],Ie=(e,t)=>{let n=new Set;for(let t of e){if(!t.id.trim())return`Идентификатор колонки не может быть пустым`;if(n.has(t.id))return`Идентификатор колонки «${t.id}» повторяется`;n.add(t.id)}for(let n=0;n<t.length;n+=1){let r=t[n];for(let t of e)if(typeof t.accessor==`string`&&!(t.accessor in r))return`В строке ${n+1} отсутствует колонка «${t.id}»`}return null},Le=(e,t)=>typeof e==`function`?e(t):t[e],Re=e=>{if(e==null||e===``)return null;let t=Date.parse(String(e));return Number.isNaN(t)?null:t},ze=(e,t,n)=>{let r=Re(e.getValue(n)),i=Re(t.getValue(n));return r===null&&i===null?0:r===null?-1:i===null?1:r-i},Be=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(r)-Number(i)},Ve=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r==null&&i==null?0:r==null?-1:i==null?1:Number(!!r)-Number(!!i)},He=(e,t,n)=>{let r=String(e.getValue(n)??``),i=String(t.getValue(n)??``);return r.localeCompare(i,void 0,{numeric:!0,sensitivity:`base`})},Ue=e=>{switch(e){case`date`:return ze;case`number`:return Be;case`boolean`:return Ve;case`text`:case void 0:return He;case`custom`:return}},We=e=>{let t=t=>Le(e.accessor,t),n=e.sortFn??Ue(e.dataType),r=e.enableSorting??(e.dataType!==`custom`&&n!==void 0),i={id:e.id,accessorFn:t,header:()=>e.header,cell:t=>{let n=t.getValue();return e.cell?.(t.row.original,n)??String(n??``)},enableSorting:r,sortDescFirst:e.sortDescFirst};return n!==void 0&&(i.sortFn=n),i},Ge=({columns:n,data:i,tableOnMobile:a=!1,breakpoint:o=`default`,sorting:s,onSortingChange:c,renderMobileCard:l,getRowId:d,caption:f,ariaLabel:p,loading:m=!1,error:h,emptyState:g=`Нет данных`,stickyHeader:_=!1,maxHeight:v,className:y=``,onRowClick:b,pagination:x=!1,paginationMode:S=`client`,page:C=1,pageSize:w=30,totalCount:T,onPageChange:E,visibleColumnIds:D})=>{let[O,k]=(0,t.useState)([]),[A,j]=(0,t.useState)(0),M=s??O,N=M.map(e=>`${e.id}:${e.desc?`desc`:`asc`}`).join(`|`),P=Number.isFinite(w)&&w>0?Math.floor(w):30,F=x&&S===`server`,I=(0,t.useMemo)(()=>{if(D===void 0)return n;let e=new Set(D);return n.filter(t=>e.has(t.id))},[n,D]),L=(0,t.useMemo)(()=>I.length===0?`Должна быть видима хотя бы одна колонка`:Ie(I,i),[i,I]),R=(0,t.useMemo)(()=>I.map(We),[I]),ee=I.some(e=>Pe(e)!==void 0),te=(0,r.useTable)({features:Ne,columns:R,data:i,state:{sorting:M},onSortingChange:e=>{let t=typeof e==`function`?e(M):e;s===void 0&&k(t),j(0),c?.(t)},getRowId:d}),z=te.getRowModel().rows,B=F&&Number.isFinite(T)&&Number(T)>=0?Math.floor(Number(T)):z.length,V=x?Math.max(1,Math.ceil(B/P)):1,U=Number.isFinite(C)&&C>0?Math.floor(C)-1:0,W=Math.min(F?U:A,V-1),G=(0,t.useMemo)(()=>x&&!F?z.slice(W*P,(W+1)*P):z,[F,P,x,W,z]),ne=(0,t.useMemo)(()=>I.filter(e=>e.enableSorting??e.dataType!==`custom`).map(e=>({id:e.id,label:typeof e.header==`string`?e.header:e.id})),[I]),re=(0,t.useMemo)(()=>Fe(W,V),[V,W]),K=[Y.root,o===`wide`?Y.wide:Y.default,a?Y.tableOnMobile:``,y].filter(Boolean).join(` `),q=L??h,ie=x&&!q&&B>P&&(!m||F),ae=W*P+1,oe=Math.min((W+1)*P,B),se=e=>{let t=Math.max(0,Math.min(V-1,e));if(F){t!==W&&E?.(t+1);return}j(t)};return(0,t.useEffect)(()=>{F||j(0)},[i,F,P,x,N]),(0,t.useEffect)(()=>{!F&&A>=V&&j(V-1)},[F,V,A]),(0,e.jsxs)(`section`,{className:K,"aria-busy":m,children:[!a&&!m&&!q&&G.length>0&&ne.length>0&&(0,e.jsx)(Me,{className:Y.mobileSort,options:ne,value:M[0]?{id:M[0].id,direction:M[0].desc?`desc`:`asc`}:null,onChange:e=>te.setSorting([{id:e.id,desc:e.direction===`desc`}])}),(0,e.jsx)(`div`,{className:Y.tableWrap,style:{maxHeight:v},children:(0,e.jsxs)(`table`,{className:Y.table,"aria-label":p,children:[f&&(0,e.jsx)(`caption`,{children:f}),ee&&(0,e.jsx)(`colgroup`,{children:I.map(t=>(0,e.jsx)(`col`,{style:Pe(t)},t.id))}),(0,e.jsx)(`thead`,{className:_?Y.sticky:``,children:te.getHeaderGroups().map(t=>(0,e.jsx)(`tr`,{children:t.headers.map(t=>{let n=t.column.getIsSorted(),r=t.column.getCanSort(),i=t.column.getToggleSortingHandler();return(0,e.jsx)(`th`,{scope:`col`,"aria-sort":n===`asc`?`ascending`:n===`desc`?`descending`:`none`,style:Pe(I.find(e=>e.id===t.column.id)),children:(0,e.jsxs)(`button`,{type:`button`,className:Y.sortButton,disabled:!r,onClick:i,children:[(0,e.jsx)(te.FlexRender,{header:t}),(0,e.jsx)(H,{name:n===`asc`?`IconSortAscending`:n===`desc`?`IconSortDescending`:`IconSort`,width:16,height:16})]})},t.id)})},t.id))}),(0,e.jsx)(`tbody`,{children:m?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{colSpan:I.length,children:(0,e.jsx)(we,{lines:3,height:65})})}):q?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:Y.state,colSpan:I.length,children:q})}):G.length===0?(0,e.jsx)(`tr`,{children:(0,e.jsx)(`td`,{className:Y.state,colSpan:I.length,children:g})}):G.map(t=>(0,e.jsx)(`tr`,{className:b?Y.clickableRow:void 0,onClick:()=>b?.(t.original),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b?.(t.original))},tabIndex:b?0:void 0,role:b?`button`:void 0,children:t.getAllCells().map(t=>(0,e.jsx)(`td`,{style:Pe(I.find(e=>e.id===t.column.id)),children:(0,e.jsx)(te.FlexRender,{cell:t})},t.id))},t.id))})]})}),!a&&(0,e.jsx)(`div`,{className:Y.cards,role:`list`,"aria-label":p??f,children:m?(0,e.jsx)(we,{lines:4,height:65}):q?(0,e.jsx)(`div`,{className:Y.state,children:q}):G.length===0?(0,e.jsx)(`div`,{className:Y.state,children:g}):G.map(t=>{if(l)return(0,e.jsx)(`div`,{role:`listitem`,children:l({row:t.original,columns:I})},t.id);let n=I.filter(e=>!e.mobile?.hideOnMobile).sort((e,t)=>(e.mobile?.mobileOrder??0)-(t.mobile?.mobileOrder??0)),r=n.find(e=>e.mobile?.primary)??n.find(e=>e.mobile?.mobileVariant!==`actions`),i=e=>Le(e.accessor,t.original),a=e=>e.mobile?.renderMobile?.(t.original,i(e))??e.cell?.(t.original,i(e))??String(i(e)??``);return(0,e.jsxs)(`article`,{role:`listitem`,className:Y.card,children:[(0,e.jsx)(`h3`,{children:r?a(r):`Строка ${t.index+1}`}),(0,e.jsx)(`dl`,{children:n.filter(e=>e!==r&&e.mobile?.mobileVariant!==`actions`).map(t=>(0,e.jsxs)(`div`,{className:t.mobile?.mobileSpan===2?Y.spanTwo:``,children:[(0,e.jsx)(`dt`,{children:t.mobile?.mobileLabel??t.header}),(0,e.jsx)(`dd`,{children:a(t)})]},t.id))}),n.filter(e=>e.mobile?.mobileVariant===`actions`).map(t=>(0,e.jsx)(`footer`,{children:a(t)},t.id))]},t.id)})}),ie&&(0,e.jsxs)(`nav`,{className:Y.pagination,"aria-label":`Пагинация таблицы`,children:[(0,e.jsxs)(`span`,{className:Y.paginationRange,"aria-live":`polite`,children:[ae,`–`,oe,` из `,B]}),(0,e.jsxs)(`div`,{className:Y.paginationControls,children:[(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:m||W===0,"aria-label":`Предыдущая страница`,onClick:()=>{se(W-1)},children:[(0,e.jsx)(H,{name:`IconChevron`,width:18,height:18,className:Y.previousIcon}),(0,e.jsx)(`span`,{className:Y.paginationButtonLabel,children:`Назад`})]}),(0,e.jsx)(`div`,{className:Y.pageNumbers,children:re.map(t=>typeof t==`number`?(0,e.jsx)(u,{variant:t===W?`secondary`:`empty`,size:`md`,className:Y.pageButton,"aria-label":`Перейти на страницу ${t+1}`,"aria-current":t===W?`page`:void 0,disabled:m,onClick:()=>{se(t)},children:t+1},t):(0,e.jsx)(`span`,{className:Y.ellipsis,"aria-hidden":`true`,children:`…`},t))}),(0,e.jsxs)(u,{variant:`empty`,size:`md`,disabled:m||W===V-1,"aria-label":`Следующая страница`,onClick:()=>{se(W+1)},children:[(0,e.jsx)(`span`,{className:Y.paginationButtonLabel,children:`Вперёд`}),(0,e.jsx)(H,{name:`IconChevron`,width:18,height:18,className:Y.nextIcon})]})]})]})]})},Ke=8,qe=6,Je=120,Ye=e=>{if(typeof e==`number`)return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return 1/0},Xe=({options:r,value:i,onChange:a,placeholder:o=`Выберите опции`,disabled:s=!1,stringWhileDisabled:c=!1,label:l,error:u,size:d=`md`,required:p=!1,hint:m,className:h=``,name:g,id:_,closeOnSelect:v=!1,needMark:y=!0,maxMenuHeight:b})=>{let x=(0,t.useId)(),S=_??`ds-dropdown-multiple-${g??x}`,C=`${S}-listbox`,[w,T]=(0,t.useState)(!1),[E,D]=(0,t.useState)(null),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=(0,t.useRef)([]),M=(0,t.useMemo)(()=>r.filter(e=>i.includes(e.value)),[r,i]).map(e=>e.label).join(`, `),N=m?`${S}-hint`:void 0,P=u?`${S}-error`:void 0,F=[N,P].filter(Boolean).join(` `)||void 0,I=s&&c,L=(0,t.useCallback)(()=>{let e=k.current,t=A.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerHeight-n.bottom-Ke,a=n.top-Ke,o=i<r.height&&a>i,s=Math.max(Je,o?a:i),c=window.innerWidth-n.width-Ke;D({top:o?Math.max(Ke,n.top-r.height-qe):n.bottom+qe,left:Math.max(Ke,Math.min(n.left,c)),width:n.width,maxHeight:Math.min(s,Ye(b))})},[b]);(0,t.useLayoutEffect)(()=>{if(!w){D(null);return}return L(),window.addEventListener(`resize`,L),window.addEventListener(`scroll`,L,!0),()=>{window.removeEventListener(`resize`,L),window.removeEventListener(`scroll`,L,!0)}},[w,r.length,L]),(0,t.useEffect)(()=>{if(!w)return;let e=e=>{let t=e.target;!O.current?.contains(t)&&!A.current?.contains(t)&&T(!1)},t=e=>{e.key===`Escape`&&(T(!1),k.current?.focus())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[w]);let R=(e,t)=>{let n=Oe(r,e,t);n!==-1&&(j.current[n]?.focus(),j.current[n]?.scrollIntoView({block:`nearest`}))},ee=e=>{if(e.disabled)return;let t=i.includes(e.value)?i.filter(t=>t!==e.value):[...i,e.value];a?.(t,r.filter(e=>t.includes(e.value))),v&&(T(!1),k.current?.focus())},te=w?(0,e.jsx)(`ul`,{ref:A,id:C,className:J.menu,role:`listbox`,"aria-label":l,"aria-multiselectable":`true`,style:E?{position:`fixed`,top:E.top,left:E.left,width:E.width,maxHeight:E.maxHeight}:{position:`fixed`,top:0,left:0,visibility:`hidden`,maxHeight:0},children:r.map((t,n)=>{let a=i.includes(t.value);return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{j.current[n]=e},type:`button`,role:`option`,"aria-selected":a,disabled:t.disabled,className:[J[d],J.option,a?J.selected:``].filter(Boolean).join(` `),onClick:()=>ee(t),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;R(n+t,t)}if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?1:-1;R(e.key===`Home`?0:r.length-1,t)}(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),ee(t)),e.key===`Tab`&&T(!1)},children:[(0,e.jsx)(`span`,{children:t.label}),a&&y&&(0,e.jsx)(H,{name:`IconCheck`,width:16,height:16})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:O,className:[J.wrapper,u?J.errorState:``,h].filter(Boolean).join(` `),children:[l&&(0,e.jsx)(f,{htmlFor:I?void 0:S,required:p,disabled:s,children:l}),(0,e.jsx)(`div`,{className:J.container,children:I?(0,e.jsx)(`div`,{id:S,className:`${J.disabledText} ${J[d]}`,"aria-describedby":F,children:M||o}):(0,e.jsxs)(`button`,{ref:k,id:S,type:`button`,name:g,className:`${J.trigger} ${J[d]}`,disabled:s,"aria-haspopup":`listbox`,"aria-expanded":w,"aria-controls":C,"aria-describedby":F,"aria-invalid":!!u,onClick:()=>T(e=>!e),onKeyDown:e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),T(!0);let t=e.key===`ArrowDown`?1:-1;requestAnimationFrame(()=>R(e.key===`ArrowDown`?0:r.length-1,t))}},children:[(0,e.jsx)(`span`,{className:`${M?J.value:J.placeholder} ${J[d]}`,children:M||o}),(0,e.jsx)(`span`,{className:[J.chevron,w?J.chevronOpen:``].filter(Boolean).join(` `),"aria-hidden":`true`,children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20})})]})}),w&&(0,n.createPortal)(te,document.body),m&&!u&&(0,e.jsx)(`span`,{id:N,className:J.message,children:m}),u&&(0,e.jsx)(`span`,{id:P,className:J.error,children:u})]})},Ze={wrapper:`_wrapper_1izp1_1`,control:`_control_1izp1_15`,input:`_input_1izp1_25`,disabledText:`_disabledText_1izp1_25`,sm:`_sm_1izp1_107`,md:`_md_1izp1_123`,lg:`_lg_1izp1_139`,inputError:`_inputError_1izp1_155`,trailingAction:`_trailingAction_1izp1_163`},Qe=({value:n,onChange:r,type:i=`text`,placeholder:a=``,disabled:o=!1,readOnly:s=!1,stringWhileDisabled:c=!1,label:l,error:u,hint:d,className:m=``,name:h,id:g,size:_=`md`,clearable:v=!0,required:y=!1,selectTextOnFocus:b=!1,isPassword:x=!1,passwordVisibleLabel:S=`Скрыть пароль`,passwordHiddenLabel:C=`Показать пароль`,onFocus:w,...T})=>{let E=(0,t.useId)(),D=g??`ds-input-${h??E}`,O=(0,t.useRef)(null),[k,A]=(0,t.useState)(!1),j=d?`${D}-hint`:void 0,M=u?`${D}-error`:void 0,N=String(n??``),P=[j,M].filter(Boolean).join(` `)||void 0,F=x?k?`text`:`password`:i;return(0,t.useEffect)(()=>{x||A(!1)},[x]),(0,e.jsxs)(`div`,{className:`${Ze.wrapper} ${m}`,children:[l&&(0,e.jsx)(f,{htmlFor:D,required:y,disabled:o,children:l}),o&&c?(0,e.jsx)(`div`,{id:D,className:Ze.disabledText,"aria-describedby":P,children:N||a}):(0,e.jsxs)(`div`,{className:Ze.control,children:[(0,e.jsx)(`input`,{ref:O,id:D,name:h,type:F,value:N,placeholder:a,disabled:o,readOnly:s,required:y,"aria-invalid":!!u,"aria-describedby":P,className:`${Ze.input} ${Ze[_]} ${u?Ze.inputError:``}`,onChange:e=>{if(i===`number`&&!x){let t=e.target.value===``?``:Number(e.target.value);r?.(t,e);return}r?.(e.target.value,e)},onFocus:e=>{b&&e.currentTarget.value&&e.currentTarget.select(),w?.(e)},...T}),x&&(0,e.jsx)(`button`,{type:`button`,className:Ze.trailingAction,disabled:o,"aria-label":k?S:C,"aria-pressed":k,onClick:()=>A(e=>!e),children:(0,e.jsx)(H,{name:k?`IconEyeOff`:`IconEye`,width:20,height:20})}),!x&&v&&N&&!o&&!s&&(0,e.jsx)(`button`,{type:`button`,className:Ze.trailingAction,"aria-label":`Очистить поле`,onClick:()=>{let e=O.current;e&&((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus())},children:(0,e.jsx)(H,{name:`IconCross`,width:20,height:20})})]}),d&&!u&&(0,e.jsx)(p,{id:j,children:d}),u&&(0,e.jsx)(p,{id:M,variant:`error`,children:u})]})},$e=(e,t)=>{let n=t.trim().toLocaleLowerCase();return n?e.filter(e=>e.label.toLocaleLowerCase().includes(n)||e.value.toLocaleLowerCase().includes(n)):e},et=(e,t,n)=>{if(!e.length)return-1;for(let r=0;r<e.length;r+=1){let i=(t+r*n+e.length)%e.length;if(!e[i]?.disabled)return i}return-1},X={wrapper:`_wrapper_1v2s8_1`,control:`_control_1v2s8_17`,inputHost:`_inputHost_1v2s8_25`,sm:`_sm_1v2s8_41`,md:`_md_1v2s8_57`,lg:`_lg_1v2s8_71`,errorState:`_errorState_1v2s8_85`,disabledText:`_disabledText_1v2s8_93`,chevron:`_chevron_1v2s8_163`,chevronOpen:`_chevronOpen_1v2s8_197`,menu:`_menu_1v2s8_205`,menuEmpty:`_menuEmpty_1v2s8_233`,option:`_option_1v2s8_241`,empty:`_empty_1v2s8_241`,selected:`_selected_1v2s8_321`,active:`_active_1v2s8_321`,visuallyHidden:`_visuallyHidden_1v2s8_341`},tt=8,nt=6,rt=5,it=10,at={sm:30,md:40,lg:50},ot=({options:r,value:i,onChange:a,placeholder:o=`Начните вводить`,noResultsText:s=`Ничего не найдено`,disabled:c=!1,readOnly:l=!1,stringWhileDisabled:u=!1,label:d,error:m,hint:h,size:g=`md`,required:_=!1,className:v=``,name:y,id:b,needMark:x=!0})=>{let S=(0,t.useId)(),C=b??`ds-search-dropdown-${y??S}`,w=`${C}-listbox`,T=`${C}-status`,E=h?`${C}-hint`:void 0,D=m?`${C}-error`:void 0,O=[T,E,D].filter(Boolean).join(` `),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=(0,t.useRef)([]),[M,N]=(0,t.useState)(!1),[P,F]=(0,t.useState)(``),[I,L]=(0,t.useState)(-1),[R,ee]=(0,t.useState)(null),te=(0,t.useMemo)(()=>r.find(e=>e.value===i),[r,i]),z=(0,t.useMemo)(()=>$e(r,P),[r,P]),B=c&&u,V=I>=0?z[I]:void 0;(0,t.useEffect)(()=>F(te?.label??``),[te?.label,i]);let U=(0,t.useCallback)(()=>k.current?.querySelector(`input`)??null,[]),W=(0,t.useCallback)((e,t)=>et(z,e,t),[z]),G=(0,t.useCallback)(e=>{L(e),!(e<0)&&requestAnimationFrame(()=>j.current[e]?.scrollIntoView({block:`nearest`}))},[]),ne=(0,t.useCallback)(()=>{let e=U();if(!e)return;let t=e.getBoundingClientRect(),n=Math.max(1,Math.min(z.length,rt))*at[g]+it,r=window.innerHeight-t.bottom-tt,i=t.top-tt,a=r<n&&i>r,o=a?i:r,s=Math.max(at[g]+it,Math.min(n,o)),c=window.innerWidth-t.width-tt,l=Math.max(tt,Math.min(t.left,c)),u=a?Math.max(tt,t.top-s-nt):t.bottom+nt;ee({top:u,left:l,width:t.width,maxHeight:s})},[z.length,U,g]);(0,t.useLayoutEffect)(()=>{if(!M){ee(null);return}return ne(),window.addEventListener(`resize`,ne),window.addEventListener(`scroll`,ne,!0),()=>{window.removeEventListener(`resize`,ne),window.removeEventListener(`scroll`,ne,!0)}},[M,ne]),(0,t.useEffect)(()=>{if(!M)return;let e=e=>{let t=e.target;!k.current?.contains(t)&&!A.current?.contains(t)&&(N(!1),L(-1))};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[M]);let re=()=>{c||l||(N(!0),L(W(0,1)))},K=e=>{e.disabled||(F(e.label),N(!1),L(-1),a?.(e.value,e),U()?.focus())},q=M?(0,e.jsx)(`ul`,{ref:A,id:w,className:`${X.menu} ${z.length===0?X.menuEmpty:``}`,role:`listbox`,"aria-label":d,style:R?{top:R.top,left:R.left,width:R.width,maxHeight:R.maxHeight}:{top:0,left:0,visibility:`hidden`,maxHeight:0},children:z.length===0?(0,e.jsx)(`li`,{className:`${X.empty} ${X[g]}`,children:s}):z.map((t,n)=>{let r=t.value===i,a=n===I;return(0,e.jsx)(`li`,{role:`presentation`,children:(0,e.jsxs)(`button`,{ref:e=>{j.current[n]=e},id:`${C}-option-${n}`,type:`button`,role:`option`,tabIndex:-1,disabled:t.disabled,"aria-disabled":t.disabled,"aria-selected":r,className:[X.option,X[g],r?X.selected:``,a?X.active:``].filter(Boolean).join(` `),onPointerMove:()=>{t.disabled||L(n)},onClick:()=>K(t),children:[(0,e.jsx)(`span`,{children:t.label}),r&&x&&(0,e.jsx)(H,{name:`IconCheck`,width:16,height:16})]})},t.value)})}):null;return(0,e.jsxs)(`div`,{ref:k,className:[X.wrapper,m?X.errorState:``,v].filter(Boolean).join(` `),children:[d&&(0,e.jsx)(f,{htmlFor:B?void 0:C,required:_,disabled:c,children:d}),B?(0,e.jsx)(`div`,{className:`${X.disabledText} ${X[g]}`,children:te?.label??o}):(0,e.jsxs)(`div`,{className:X.control,children:[(0,e.jsx)(Qe,{id:C,name:y,value:P,placeholder:o,disabled:c,readOnly:l,required:_,size:g,clearable:!1,autoComplete:`off`,className:`${X.inputHost} ${X[g]}`,onFocus:re,onChange:e=>{let t=String(e),n=$e(r,t);F(t),N(!0),L(et(n,0,1))},role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":M,"aria-controls":w,"aria-activedescendant":V?`${C}-option-${I}`:void 0,"aria-invalid":!!m,"aria-describedby":O,onClick:re,onKeyDown:e=>{if(!(c||l)){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault();let t=e.key===`ArrowDown`?1:-1,n=I>=0?I+t:t===1?0:z.length-1;N(!0),G(W(n,t))}else if(e.key===`Home`||e.key===`End`){if(!M)return;e.preventDefault();let t=e.key===`Home`?1:-1;G(W(e.key===`Home`?0:z.length-1,t))}else e.key===`Enter`&&M&&V?(e.preventDefault(),K(V)):e.key===`Escape`&&M?(e.preventDefault(),N(!1),L(-1)):e.key===`Tab`&&(N(!1),L(-1))}}}),(0,e.jsx)(`span`,{className:`${X.chevron} ${M?X.chevronOpen:``}`,"aria-hidden":`true`,children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20})})]}),M&&typeof document<`u`&&(0,n.createPortal)(q,document.body),(0,e.jsxs)(`span`,{id:T,className:X.visuallyHidden,"aria-live":`polite`,children:[`Найдено вариантов: `,z.length]}),h&&!m&&(0,e.jsx)(p,{id:E,children:h}),m&&(0,e.jsx)(p,{id:D,variant:`error`,children:m})]})},st={root:`_root_11adi_1`,header:`_header_11adi_21`,title:`_title_11adi_41`,dismiss:`_dismiss_11adi_55`,content:`_content_11adi_65`},ct=({title:n,children:r,dismissible:i=!1,onDismiss:a,dismissLabel:o=`Закрыть информационный блок`,headingAs:s=`h3`,className:c=``})=>{let l=`ds-info-block-${(0,t.useId)()}`;return(0,e.jsxs)(`section`,{className:`${st.root} ${c}`,"aria-labelledby":l,children:[(0,e.jsxs)(`header`,{className:st.header,children:[(0,e.jsx)(s,{id:l,className:st.title,children:n}),i&&(0,e.jsx)(u,{className:st.dismiss,variant:`empty`,onClick:a,"aria-label":o,children:(0,e.jsx)(H,{name:`IconCross`,width:20,height:20})})]}),(0,e.jsx)(`div`,{className:st.content,children:r})]})},lt={wrapper:`_wrapper_1np4e_1`,input:`_input_1np4e_21`,switch:`_switch_1np4e_35`,thumb:`_thumb_1np4e_67`,label:`_label_1np4e_113`,disabled:`_disabled_1np4e_125`},ut=({checked:n,onChange:r,label:i,disabled:a=!1,readOnly:o=!1,className:s=``,name:c,id:l,value:u})=>{let d=(0,t.useId)(),f=l??`ds-radio-button-${c??d}`;return(0,e.jsxs)(`label`,{htmlFor:f,className:`${lt.wrapper} ${a?lt.disabled:``} ${s}`,children:[(0,e.jsx)(`input`,{id:f,className:lt.input,type:`checkbox`,role:`switch`,name:c,value:u,checked:n,disabled:a,"aria-readonly":o||void 0,onChange:e=>{o||r?.(e.target.checked,e)}}),(0,e.jsx)(`span`,{className:lt.switch,"aria-hidden":`true`,children:(0,e.jsx)(`span`,{className:lt.thumb})}),i&&(0,e.jsx)(`span`,{className:lt.label,children:i})]})},dt={root:`_root_1ecm3_1`,grid:`_grid_1ecm3_13`,actions:`_actions_1ecm3_27`},ft=({filters:t,values:n,onChange:r,onApply:i,onReset:a,applyMode:o=`instant`,loading:s=!1,disabled:c=!1,className:l=``})=>{let d=(e,t)=>{let a={...n,[e]:t};r?.(a,e),o===`instant`&&i?.(a)};return(0,e.jsxs)(`section`,{className:`${dt.root} ${l}`,"aria-label":`Фильтры`,"aria-busy":s,children:[(0,e.jsx)(`div`,{className:dt.grid,children:t.filter(e=>!e.hidden).map(t=>{let r=c||s||t.disabled,i=n[t.id];if(t.type===`input`){let n={label:t.label,hint:t.hint,placeholder:t.placeholder,disabled:r};return t.inputType===`number`?(0,e.jsx)(Qe,{...n,type:`number`,value:i??``,onChange:e=>d(t.id,e)},t.id):(0,e.jsx)(Qe,{...n,type:`text`,value:String(i??``),onChange:e=>d(t.id,e)},t.id)}if(t.type===`dropdown`)return(0,e.jsx)(Ae,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:String(i??``),disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`multiple`)return(0,e.jsx)(Xe,{label:t.label,hint:t.hint,placeholder:t.placeholder,options:t.options,value:Array.isArray(i)?i:[],disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`checkbox`)return(0,e.jsx)(W,{label:t.label,hint:t.hint,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);if(t.type===`radio`)return(0,e.jsx)(ut,{label:t.label,checked:!!i,disabled:r,onChange:e=>d(t.id,e)},t.id);let a=i&&typeof i==`object`&&!Array.isArray(i)?i:{from:null,to:null};return(0,e.jsx)(Se,{hint:t.hint,mode:t.mode,min:t.min,max:t.max,value:a,disabled:r,onDraftChange:e=>d(t.id,e)},t.id)})}),(a||o===`manual`)&&(0,e.jsxs)(`div`,{className:dt.actions,children:[a&&(0,e.jsx)(u,{variant:`destructiveOutline`,disabled:c||s,onClick:a,children:`Сбросить`}),o===`manual`&&(0,e.jsx)(u,{isLoading:s,disabled:c,onClick:()=>i?.(n),children:`Применить`})]})]})},Z={wrapper:`_wrapper_i20hz_1`,dropzone:`_dropzone_i20hz_15`,dragActive:`_dragActive_i20hz_45`,disabled:`_disabled_i20hz_59`,error:`_error_i20hz_69`,nativeInput:`_nativeInput_i20hz_77`,empty:`_empty_i20hz_95`,uploadIcon:`_uploadIcon_i20hz_111`,files:`_files_i20hz_133`,file:`_file_i20hz_133`,fileName:`_fileName_i20hz_175`,fileSize:`_fileSize_i20hz_187`},pt=e=>`${e.name}:${e.size}:${e.lastModified}`,mt=e=>e<1024?`${e} Б`:e<1048576?`${(e/1024).toFixed(1)} КБ`:`${(e/1024/1024).toFixed(1)} МБ`,ht=(e,t)=>!t||t.split(`,`).map(e=>e.trim().toLowerCase()).some(t=>t.startsWith(`.`)?e.name.toLowerCase().endsWith(t):t.endsWith(`/*`)?e.type.startsWith(t.slice(0,-1)):e.type.toLowerCase()===t),gt=({value:n,onChange:r,multiple:i=!1,accept:a,maxSize:o,maxFiles:s,label:c,hint:l,error:d,required:m=!1,disabled:h=!1,readOnly:g=!1,name:_,id:v,className:y=``,dropLabel:b=`Перетащите файлы в эту область`,browseLabel:x=`Выбрать файлы`,addMoreLabel:S=`Добавить ещё`,onReject:C})=>{let w=(0,t.useId)(),T=v??`ds-file-input-${_??w}`,E=(0,t.useRef)(null),D=(0,t.useRef)(0),[O,k]=(0,t.useState)(!1),A=l?`${T}-hint`:void 0,j=d?`${T}-error`:void 0,M=[A,j].filter(Boolean).join(` `)||void 0,N=!h&&!g,P=e=>{let t=[],c=new Set(n.map(pt)),l=e.filter(e=>ht(e,a)?o!==void 0&&e.size>o?(t.push({file:e,reason:`maxSize`}),!1):!c.has(pt(e))&&(c.add(pt(e)),!0):(t.push({file:e,reason:`accept`}),!1)),u=i?s:1,d=i?[...n,...l]:l.slice(-1);u!==void 0&&d.length>u&&(d.slice(u).forEach(e=>t.push({file:e,reason:`maxFiles`})),d=d.slice(0,u)),t.length&&C?.(t),l.length&&r?.(d),E.current&&(E.current.value=``)};return(0,e.jsxs)(`div`,{className:`${Z.wrapper} ${y}`,children:[c&&(0,e.jsx)(f,{htmlFor:T,required:m,disabled:h,children:c}),(0,e.jsxs)(`div`,{className:`${Z.dropzone} ${O?Z.dragActive:``} ${h?Z.disabled:``} ${d?Z.error:``}`,onDragEnter:e=>{e.preventDefault(),N&&++D.current===1&&k(!0)},onDragOver:e=>e.preventDefault(),onDragLeave:e=>{e.preventDefault(),--D.current<=0&&(D.current=0,k(!1))},onDrop:e=>{e.preventDefault(),D.current=0,k(!1),N&&P(Array.from(e.dataTransfer.files))},children:[(0,e.jsx)(`input`,{ref:E,id:T,name:_,className:Z.nativeInput,type:`file`,multiple:i,accept:a,required:m&&n.length===0,disabled:!N,"aria-describedby":M,"aria-invalid":!!d,onChange:e=>P(Array.from(e.target.files??[]))}),n.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`ul`,{className:Z.files,"aria-live":`polite`,children:n.map((t,i)=>(0,e.jsxs)(`li`,{className:Z.file,children:[(0,e.jsx)(`span`,{className:Z.fileName,title:t.name,children:t.name}),(0,e.jsx)(`span`,{className:Z.fileSize,children:mt(t.size)}),N&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Удалить файл ${t.name}`,onClick:()=>r?.(n.filter((e,t)=>t!==i)),children:(0,e.jsx)(H,{name:`IconCross`,width:16,height:16})})]},pt(t)))}),N&&(i||n.length===0)&&(0,e.jsx)(u,{className:Z.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:S}),N&&!i&&(0,e.jsx)(u,{className:Z.browseButton,size:`sm`,onClick:()=>E.current?.click(),children:x})]}):(0,e.jsxs)(`div`,{className:Z.empty,children:[(0,e.jsx)(`span`,{className:Z.uploadIcon,"aria-hidden":`true`,children:(0,e.jsx)(H,{name:`IconUpload`,width:24,height:24})}),(0,e.jsx)(`strong`,{children:O?`Отпустите файлы здесь`:b}),!O&&N&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`span`,{children:`или`}),(0,e.jsx)(u,{onClick:()=>E.current?.click(),children:x})]})]})]}),l&&!d&&(0,e.jsx)(p,{id:A,children:l}),d&&(0,e.jsx)(p,{id:j,variant:`error`,live:!0,children:d})]})},_t={wrapper:`_wrapper_x2gki_1`,control:`_control_x2gki_15`,textarea:`_textarea_x2gki_25`,disabledText:`_disabledText_x2gki_27`,sm:`_sm_x2gki_103`,md:`_md_x2gki_117`,lg:`_lg_x2gki_131`,autoResize:`_autoResize_x2gki_145`,manualResize:`_manualResize_x2gki_155`,textareaError:`_textareaError_x2gki_163`,clearAction:`_clearAction_x2gki_171`,messages:`_messages_x2gki_251`,counter:`_counter_x2gki_265`},vt=2;function yt(e){let t=window.getComputedStyle(e),n=Number.parseFloat(t.lineHeight);return Number.isFinite(n)?n:Number.parseFloat(t.fontSize)*1.4}function bt({value:n,onChange:r,placeholder:i=``,disabled:a=!1,readOnly:o=!1,stringWhileDisabled:s=!1,label:c,error:l,hint:u,className:d=``,name:m,id:h,size:g=`md`,clearable:_=!1,required:v=!1,maxLength:y,showCount:b=!1,minRows:x=vt,maxRows:S,autoResize:C=!0,...w}){let T=(0,t.useId)(),E=h??`ds-textarea-${m??T}`,D=(0,t.useRef)(null),O=u?`${E}-hint`:void 0,k=l?`${E}-error`:void 0,A=b&&y?`${E}-count`:void 0,j=[O,k,A].filter(Boolean).join(` `)||void 0,M=Math.max(1,x),N=S===void 0?void 0:Math.max(M,S),P=(0,t.useCallback)(()=>{let e=D.current;if(!e||!C)return;let t=window.getComputedStyle(e),n=yt(e),r=Number.parseFloat(t.paddingTop)+Number.parseFloat(t.paddingBottom)+Number.parseFloat(t.borderTopWidth)+Number.parseFloat(t.borderBottomWidth),i=n*M+r,a=N===void 0?1/0:n*N+r;e.style.height=`auto`;let o=Math.min(Math.max(e.scrollHeight,i),a);e.style.height=`${o}px`,e.style.overflowY=e.scrollHeight>a?`auto`:`hidden`},[C,N,M]);(0,t.useEffect)(()=>{P()},[P,n]),(0,t.useEffect)(()=>{if(!C)return;window.addEventListener(`resize`,P);let e=D.current?.parentElement,t;if(e&&typeof ResizeObserver<`u`){let n=e.getBoundingClientRect().width;t=new ResizeObserver(([e])=>{!e||e.contentRect.width===n||(n=e.contentRect.width,P())}),t.observe(e)}return()=>{window.removeEventListener(`resize`,P),t?.disconnect()}},[C,P]);let F=e=>{r?.(e.target.value,e),P()},I=()=>{let e=D.current;e&&((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus(),P())},L={"--ds-textarea-min-rows":M};return(0,e.jsxs)(`div`,{className:`${_t.wrapper} ${d}`,children:[c&&(0,e.jsx)(f,{htmlFor:E,required:v,disabled:a,children:c}),a&&s?(0,e.jsx)(`div`,{id:E,className:`${_t.disabledText} ${_t[g]}`,style:L,"aria-describedby":j,children:n||i}):(0,e.jsxs)(`div`,{className:_t.control,children:[(0,e.jsx)(`textarea`,{ref:D,id:E,name:m,value:n,placeholder:i,disabled:a,readOnly:o,required:v,maxLength:y,rows:M,style:L,"aria-invalid":!!l,"aria-describedby":j,className:`${_t.textarea} ${_t[g]} ${C?_t.autoResize:_t.manualResize} ${l?_t.textareaError:``}`,onChange:F,...w}),_&&n&&!a&&!o&&(0,e.jsx)(`button`,{type:`button`,className:_t.clearAction,"aria-label":`Очистить поле`,onClick:I,children:(0,e.jsx)(H,{name:`IconCross`,width:20,height:20})})]}),(u||l||A)&&(0,e.jsxs)(`div`,{className:_t.messages,children:[u&&!l&&(0,e.jsx)(p,{id:O,children:u}),l&&(0,e.jsx)(p,{id:k,variant:`error`,children:l}),A&&(0,e.jsxs)(`span`,{id:A,className:_t.counter,children:[n.length,` / `,y]})]})]})}var xt=0,Q=(0,i.create)((e,t)=>({modals:[],openModal:(t,n={},r={})=>{xt+=1;let i=`ds-modal-${xt}`;return e(e=>({modals:[...e.modals,{id:i,name:t,payload:n,title:r.title,description:r.description,closeOnEscape:r.closeOnEscape??!0,closeOnBackdrop:r.closeOnBackdrop??!0,onClose:r.onClose}]})),i},closeModal:n=>{let r=t().modals.find(e=>e.id===n);r&&(e(e=>({modals:e.modals.filter(e=>e.id!==n)})),r.onClose?.())},closeTopModal:()=>{let n=t().modals.at(-1);n&&(e(e=>({modals:e.modals.slice(0,-1)})),n.onClose?.())},closeAllModals:()=>{let n=t().modals;n.length&&(e({modals:[]}),n.forEach(e=>e.onClose?.()))}})),St=()=>{Q.getState().closeAllModals(),xt=0},Ct={layer:`_layer_1mvch_1`,backdrop:`_backdrop_1mvch_15`,panel:`_panel_1mvch_35`,header:`_header_1mvch_63`,title:`_title_1mvch_81`,description:`_description_1mvch_93`,content:`_content_1mvch_107`,close:`_close_1mvch_115`},wt=`button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,Tt=(0,t.createContext)({});function Et(e){if(e.key!==`Tab`)return;let t=Array.from(e.currentTarget.querySelectorAll(wt));if(!t.length){e.preventDefault();return}let n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())}var Dt=({children:n,title:r,description:i,modalId:a,closeLabel:o=`Закрыть модальное окно`,className:s=``,role:c=`dialog`})=>{let l=(0,t.useContext)(Tt),d=r??l.title,f=i??l.description,p=(0,t.useId)(),m=(0,t.useId)(),h=(0,t.useRef)(null),g=Q(e=>e.closeModal),_=d!=null,v=f!=null;return(0,t.useEffect)(()=>{let e=document.activeElement,t=h.current;return(t?.querySelector(wt)??t)?.focus(),()=>e?.focus()},[]),(0,e.jsxs)(`div`,{ref:h,className:`${Ct.panel} ${s}`,role:c,"aria-modal":`true`,"aria-labelledby":_?p:void 0,"aria-describedby":v?m:void 0,tabIndex:-1,onKeyDown:Et,children:[(_||o)&&(0,e.jsxs)(`header`,{className:Ct.header,children:[_&&(0,e.jsx)(`h2`,{id:p,className:Ct.title,children:d}),(0,e.jsx)(u,{className:Ct.close,variant:`empty`,size:`sm`,"aria-label":o,onClick:()=>g(a),children:(0,e.jsx)(H,{name:`IconCross`,width:24,height:24})})]}),v&&(0,e.jsx)(`p`,{id:m,className:Ct.description,children:f}),(0,e.jsx)(`div`,{className:Ct.content,children:n})]})},Ot=({registry:r})=>{let i=Q(e=>e.modals),a=Q(e=>e.closeModal),o=Q(e=>e.closeAllModals);return(0,t.useEffect)(()=>{let e=e=>{if(e.key!==`Escape`)return;let t=Q.getState().modals.at(-1);t?.closeOnEscape&&a(t.id)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),(0,t.useEffect)(()=>{i.forEach(e=>{r[e.name]||a(e.id)})},[a,i,r]),!i.length||typeof document>`u`?null:(0,n.createPortal)((0,e.jsx)(`div`,{className:Ct.layer,"aria-label":`Модальные окна`,children:i.map((t,n)=>{let s=r[t.name];return s?(0,e.jsx)(`div`,{className:Ct.backdrop,"aria-hidden":n!==i.length-1||void 0,inert:n!==i.length-1||void 0,onMouseDown:e=>{e.target===e.currentTarget&&t.closeOnBackdrop&&a(t.id)},children:(0,e.jsx)(Tt.Provider,{value:{title:t.title??t.payload.title,description:t.description??t.payload.description},children:(0,e.jsx)(s,{...t.payload,modalId:t.id,close:()=>a(t.id),closeAll:o})})},t.id):null})}),document.body)},kt=({registry:n,children:r,lockBodyScroll:i=!0})=>{let a=Q(e=>e.modals.length);return(0,t.useEffect)(()=>{if(!i||a===0)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[i,a]),(0,e.jsxs)(e.Fragment,{children:[r,(0,e.jsx)(Ot,{registry:n})]})},At=e=>e,jt={message:`_message_c23ie_1`,actions:`_actions_c23ie_13`},Mt=new Map,Nt=0,Pt=({modalId:t,close:n,title:r=`Подтверждение`,message:i=`Продолжить действие?`,confirmLabel:a=`Подтвердить`,cancelLabel:o=`Отмена`,tone:s=`default`,requestId:c})=>{let l=e=>{Mt.get(c)?.(e),Mt.delete(c),n()};return(0,e.jsxs)(Dt,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:jt.message,children:i}),(0,e.jsxs)(`div`,{className:jt.actions,children:[(0,e.jsx)(u,{variant:`outline`,onClick:()=>l(!1),children:o}),(0,e.jsx)(u,{variant:s===`danger`?`destructive`:`primary`,onClick:()=>l(!0),children:a})]})]})},Ft=({modalId:t,close:n,title:r=`Ошибка`,message:i,closeLabel:a=`Закрыть`})=>(0,e.jsxs)(Dt,{modalId:t,title:r,role:`alertdialog`,children:[(0,e.jsx)(`p`,{className:jt.message,children:i}),(0,e.jsx)(`div`,{className:jt.actions,children:(0,e.jsx)(u,{onClick:n,children:a})})]}),It=At({ConfirmModal:Pt,ErrorModal:Ft}),Lt=()=>{let e=Q(e=>e.openModal);return(t={})=>new Promise(n=>{Nt+=1;let r=`confirm-${Nt}`;Mt.set(r,n),e(`ConfirmModal`,{...t,requestId:r},{closeOnEscape:!1,onClose:()=>{Mt.get(r)?.(!1),Mt.delete(r)}})})},Rt=e=>e instanceof Error?e.message:typeof e==`string`?e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`?e.message:`Произошла неизвестная ошибка`,zt=()=>{let e=Q(e=>e.openModal);return{showError:(t,n)=>e(`ErrorModal`,{title:n,message:Rt(t)})}},Bt=(0,i.create)(()=>({})),Vt=(0,i.create)(()=>({})),Ht=()=>{let e=Q(e=>e.modals),n=Q(e=>e.openModal),r=Q(e=>e.closeModal),i=Q(e=>e.closeTopModal),a=Q(e=>e.closeAllModals),o=(0,t.useCallback)((e,t={},r)=>n(e,t,r),[n]),s=(0,t.useCallback)(t=>e.some(e=>e.name===t),[e]);return(0,t.useMemo)(()=>({openModal:o,closeModal:r,closeTopModal:i,closeAllModals:a,isOpen:s,count:e.length}),[a,r,i,s,e.length,o])},Ut={wrapper:`_wrapper_71h8n_1`,container:`_container_71h8n_15`,inner:`_inner_71h8n_35`,cube:`_cube_71h8n_53`,jump:`_jump_71h8n_1`,cube__inner:`_cube__inner_71h8n_67`,morph:`_morph_71h8n_1`},Wt=()=>(0,e.jsx)(`div`,{className:Ut.wrapper,children:(0,e.jsx)(`div`,{className:Ut.container,children:(0,e.jsxs)(`div`,{className:Ut.inner,children:[(0,e.jsx)(`div`,{className:Ut.cube,children:(0,e.jsx)(`div`,{className:Ut.cube__inner})}),(0,e.jsx)(`div`,{className:Ut.cube,children:(0,e.jsx)(`div`,{className:Ut.cube__inner})}),(0,e.jsx)(`div`,{className:Ut.cube,children:(0,e.jsx)(`div`,{className:Ut.cube__inner})})]})})}),Gt={viewport:`_viewport_3qpmj_1`,"top-right":`_top-right_3qpmj_21`,"top-left":`_top-left_3qpmj_31`,"bottom-right":`_bottom-right_3qpmj_41`,"bottom-left":`_bottom-left_3qpmj_51`,toast:`_toast_3qpmj_61`,body:`_body_3qpmj_89`,info:`_info_3qpmj_109`,success:`_success_3qpmj_117`,warning:`_warning_3qpmj_125`,error:`_error_3qpmj_133`},Kt={info:{name:`IconInfoCircle`,color:`var(--color-primary)`},success:{name:`IconSuccessCircle`,color:`var(--color-success)`},warning:{name:`IconWarning`,color:`var(--color-warning)`},error:{name:`IconWarning`,color:`var(--color-error)`}},qt=({toast:n,onClose:r})=>{let[i,a]=(0,t.useState)(!1),o=(0,t.useRef)(n.duration),s=(0,t.useRef)(Date.now());return(0,t.useEffect)(()=>{if(i||n.duration<=0)return;s.current=Date.now();let e=setTimeout(()=>r(n.id),o.current);return()=>{clearTimeout(e),o.current=Math.max(0,o.current-(Date.now()-s.current))}},[r,i,n.duration,n.id]),(0,e.jsxs)(`article`,{className:`${Gt.toast} ${Gt[n.variant]}`,role:n.variant===`error`?`alert`:`status`,"aria-live":n.variant===`error`?`assertive`:`polite`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[(0,e.jsx)(`div`,{children:(0,e.jsx)(H,{...Kt[n.variant],width:24,height:24})}),(0,e.jsxs)(`div`,{className:Gt.body,children:[n.title&&(0,e.jsx)(`strong`,{children:n.title}),(0,e.jsx)(`div`,{children:n.message}),n.action&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,onClick:()=>{n.action?.onClick(),(n.action?.dismissOnClick??!0)&&r(n.id)},children:n.action.label})]}),n.closable&&(0,e.jsx)(u,{variant:`empty`,size:`sm`,"aria-label":`Закрыть уведомление`,onClick:()=>r(n.id),children:(0,e.jsx)(H,{name:`IconCross`,width:24,height:24})})]})},Jt=0,Yt=(0,i.create)(e=>({toasts:[],showToast:t=>{Jt+=1;let n=`ds-toast-${Jt}`;return e(e=>({toasts:[...e.toasts,{variant:`info`,duration:5e3,closable:!0,...t,id:n}]})),n},removeToast:t=>e(e=>({toasts:e.toasts.filter(e=>e.id!==t)})),clearToasts:()=>e({toasts:[]})})),Xt=()=>Yt.setState({toasts:[]}),Zt=({position:t=`top-right`})=>{let n=Yt(e=>e.toasts),r=Yt(e=>e.removeToast);return(0,e.jsx)(`div`,{className:`${Gt.viewport} ${Gt[t]}`,"aria-label":`Уведомления`,children:n.map(t=>(0,e.jsx)(qt,{toast:t,onClose:r},t.id))})},Qt=()=>{let e=Yt(e=>e.showToast),n=Yt(e=>e.removeToast),r=Yt(e=>e.clearToasts),i=(0,t.useCallback)(t=>e({...t,variant:`info`}),[e]),a=(0,t.useCallback)(t=>e({...t,variant:`success`}),[e]),o=(0,t.useCallback)(t=>e({...t,variant:`warning`}),[e]),s=(0,t.useCallback)(t=>e({...t,variant:`error`}),[e]);return(0,t.useMemo)(()=>({showToast:e,infoToast:i,successToast:a,warningToast:o,errorToast:s,removeToast:n,clearToasts:r}),[r,s,i,n,e,a,o])},$t={root:`_root_8dm5q_1`,tooltip:`_tooltip_8dm5q_11`,"ds-tooltip-in":`_ds-tooltip-in_8dm5q_1`,top:`_top_8dm5q_43`,bottom:`_bottom_8dm5q_55`,left:`_left_8dm5q_67`,right:`_right_8dm5q_79`},en=({content:n,children:r,placement:i=`top`,delay:a=450,disabled:o=!1,maxWidth:s=280,className:c=``})=>{let l=(0,t.useId)(),[u,d]=(0,t.useState)(!1),f=(0,t.useRef)(null),p=()=>{o||!n||(f.current=setTimeout(()=>d(!0),a))},m=()=>{f.current&&clearTimeout(f.current),d(!1)};if((0,t.useEffect)(()=>{let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),f.current&&clearTimeout(f.current)}},[]),!(0,t.isValidElement)(r))return r;let h=(0,t.cloneElement)(r,{"aria-describedby":u?l:void 0,onMouseEnter:p,onMouseLeave:m,onFocus:p,onBlur:m});return(0,e.jsxs)(`span`,{className:`${$t.root} ${c}`,onPointerDown:u?m:p,children:[h,u&&(0,e.jsx)(`span`,{id:l,role:`tooltip`,className:`${$t.tooltip} ${$t[i]}`,style:{maxWidth:s},children:n})]})},tn=e=>{if(!Number.isFinite(e)||e<0)return`00:00`;let t=Math.floor(e),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=`${String(r).padStart(2,`0`)}:${String(i).padStart(2,`0`)}`;return n?`${n}:${a}`:a},$={root:`_root_1h73w_1`,frame:`_frame_1h73w_35`,video:`_video_1h73w_65`,overlay:`_overlay_1h73w_81`,state:`_state_1h73w_83`,buffering:`_buffering_1h73w_85`,loaderViewport:`_loaderViewport_1h73w_145`,loaderScale:`_loaderScale_1h73w_157`,stateIcon:`_stateIcon_1h73w_171`,empty:`_empty_1h73w_203`,error:`_error_1h73w_213`,replay:`_replay_1h73w_225`,controlsLayer:`_controlsLayer_1h73w_261`,controlsVisible:`_controlsVisible_1h73w_287`,controls:`_controls_1h73w_261`,controlGroup:`_controlGroup_1h73w_311`,controlButton:`_controlButton_1h73w_337`,settingsAction:`_settingsAction_1h73w_369`,timeline:`_timeline_1h73w_401`,volume:`_volume_1h73w_403`,settings:`_settings_1h73w_369`,playButton:`_playButton_1h73w_417`,volumeGroup:`_volumeGroup_1h73w_431`,timelineGroup:`_timelineGroup_1h73w_455`,time:`_time_1h73w_401`,settingsActionLabel:`_settingsActionLabel_1h73w_693`,caption:`_caption_1h73w_705`,fullscreen:`_fullscreen_1h73w_719`},nn=2500,rn=5,an=.05,on=[.5,.75,1,1.25,1.5,2],sn=({sources:n,tracks:r=[],title:i,aspectRatio:a=`16 / 9`,objectFit:o=`contain`,loading:s=!1,error:l,fallback:d,className:f=``,controls:p=!0,playsInline:m=!0,...h})=>{let g=(0,t.useRef)(null),_=(0,t.useRef)(null),v=(0,t.useRef)(null),y=(0,t.useRef)(void 0),[b,x]=(0,t.useState)(!1),[S,C]=(0,t.useState)(n.length>0),[w,T]=(0,t.useState)(!1),[E,D]=(0,t.useState)(!1),[O,k]=(0,t.useState)(!1),[A,j]=(0,t.useState)(0),[M,N]=(0,t.useState)(0),[P,F]=(0,t.useState)(0),[I,L]=(0,t.useState)(1),[R,ee]=(0,t.useState)(!!h.muted),[te,z]=(0,t.useState)(1),[B,V]=(0,t.useState)(!!h.loop),[U,W]=(0,t.useState)(-1),[G,ne]=(0,t.useState)(!1),[re,K]=(0,t.useState)(!0),[q,ie]=(0,t.useState)(!1),[ae,oe]=(0,t.useState)(!1),se=n.map(({src:e,type:t})=>`${e}:${t??``}`).join(`|`),ce=r.map((e,t)=>({track:e,index:t})).filter(({track:e})=>e.kind===`captions`||e.kind===`subtitles`),le=l??(b?`Не удалось воспроизвести видео`:void 0),ue=s||S&&!le&&n.length>0,de=!ue&&!le&&n.length===0,fe=typeof document<`u`&&`pictureInPictureEnabled`in document&&document.pictureInPictureEnabled,pe=(0,t.useCallback)(()=>{K(!0),window.clearTimeout(y.current),E&&!G&&(y.current=window.setTimeout(()=>K(!1),nn))},[E,G]);(0,t.useEffect)(()=>{x(!1),C(n.length>0),T(!1),D(!1),k(!1),j(0),N(0),F(0)},[se,n.length]),(0,t.useEffect)(()=>(pe(),()=>window.clearTimeout(y.current)),[pe]),(0,t.useEffect)(()=>{let e=()=>ie(document.fullscreenElement===_.current),t=()=>oe(document.pictureInPictureElement===v.current);return document.addEventListener(`fullscreenchange`,e),document.addEventListener(`enterpictureinpicture`,t),document.addEventListener(`leavepictureinpicture`,t),()=>{document.removeEventListener(`fullscreenchange`,e),document.removeEventListener(`enterpictureinpicture`,t),document.removeEventListener(`leavepictureinpicture`,t)}},[]),(0,t.useEffect)(()=>{if(!G)return;let e=e=>{g.current?.contains(e.target)||ne(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[G]);let me=async()=>{let e=v.current;if(!(!e||le||ue)){if(e.paused||e.ended){e.ended&&(e.currentTime=0);try{await e.play()}catch{x(!0)}}else e.pause()}},he=()=>{let e=v.current;e&&(e.muted=!e.muted)},ge=e=>{let t=v.current;t&&(t.volume=Math.min(1,Math.max(0,e)),t.muted=t.volume===0)},_e=e=>{let t=v.current;!t||!M||(t.currentTime=Math.min(M,Math.max(0,e)),j(t.currentTime))},ve=async()=>{if(_.current)try{document.fullscreenElement?await document.exitFullscreen():await _.current.requestFullscreen()}catch{ie(!1)}},ye=async()=>{let e=v.current;if(!(!e||!fe))try{document.pictureInPictureElement?await document.exitPictureInPicture():await e.requestPictureInPicture()}catch{oe(!1)}},be=e=>{let t=v.current;t&&(Array.from(t.textTracks).forEach((t,n)=>{t.mode=n===e?`showing`:`disabled`}),W(e))},xe=e=>{let t=e.target;if(/^(INPUT|SELECT|BUTTON)$/.test(t.tagName))return;let n=e.key.toLowerCase();n===` `||n===`k`?(e.preventDefault(),me()):n===`m`?(e.preventDefault(),he()):n===`f`?(e.preventDefault(),ve()):n===`c`&&ce.length?(e.preventDefault(),be(U===-1?ce[0].index:-1)):e.key===`ArrowLeft`||e.key===`ArrowRight`?(e.preventDefault(),_e(A+(e.key===`ArrowRight`?rn:-5))):e.key===`ArrowUp`||e.key===`ArrowDown`?(e.preventDefault(),ge(I+(e.key===`ArrowUp`?an:-.05))):e.key===`Escape`&&ne(!1),pe()},Se=()=>{let e=v.current;x(!1),C(!0),e?.load()},Ce={"--video-progress":`${M?A/M*100:0}%`,"--video-buffered":`${P*100}%`};return(0,e.jsxs)(`figure`,{ref:g,className:`${$.root} ${f}`,onKeyDown:xe,children:[(0,e.jsxs)(`div`,{ref:_,className:`${$.frame} ${q?$.fullscreen:``}`,style:{aspectRatio:a},"aria-busy":ue||void 0,tabIndex:p&&n.length?0:void 0,onPointerMove:pe,onPointerDown:pe,onFocusCapture:pe,onMouseLeave:()=>{E&&!G&&K(!1)},children:[n.length>0&&(0,e.jsxs)(`video`,{...h,ref:v,"aria-label":i,controls:!1,playsInline:m,loop:B,className:$.video,style:{objectFit:o},onClick:e=>{h.onClick?.(e),me()},onDoubleClick:e=>{h.onDoubleClick?.(e),ve()},onLoadStart:e=>{C(!0),h.onLoadStart?.(e)},onLoadedMetadata:e=>{N(e.currentTarget.duration||0);let t=ce.find(({track:e})=>e.default);be(t?.index??-1),h.onLoadedMetadata?.(e)},onDurationChange:e=>{N(e.currentTarget.duration||0),h.onDurationChange?.(e)},onTimeUpdate:e=>{j(e.currentTarget.currentTime),h.onTimeUpdate?.(e)},onProgress:e=>{let t=e.currentTarget;t.duration&&t.buffered.length&&F(t.buffered.end(t.buffered.length-1)/t.duration),h.onProgress?.(e)},onLoadedData:e=>{C(!1),T(!1),h.onLoadedData?.(e)},onCanPlay:e=>{C(!1),T(!1),h.onCanPlay?.(e)},onWaiting:e=>{T(!0),h.onWaiting?.(e)},onPlaying:e=>{D(!0),k(!1),T(!1),h.onPlaying?.(e)},onPlay:e=>{D(!0),h.onPlay?.(e)},onPause:e=>{D(!1),h.onPause?.(e)},onEnded:e=>{D(!1),k(!0),K(!0),h.onEnded?.(e)},onVolumeChange:e=>{L(e.currentTarget.volume),ee(e.currentTarget.muted),h.onVolumeChange?.(e)},onRateChange:e=>{z(e.currentTarget.playbackRate),h.onRateChange?.(e)},onError:e=>{C(!1),T(!1),x(!0),h.onError?.(e)},children:[n.map(t=>(0,e.jsx)(`source`,{...t},`${t.src}-${t.type}`)),r.map(t=>(0,e.jsx)(`track`,{...t},`${t.src}-${t.srcLang}`))]}),ue&&(0,e.jsxs)(`div`,{className:$.overlay,role:`status`,"aria-live":`polite`,children:[(0,e.jsx)(`div`,{className:$.loaderViewport,"aria-hidden":`true`,children:(0,e.jsx)(`div`,{className:$.loaderScale,children:(0,e.jsx)(Wt,{})})}),(0,e.jsx)(`span`,{children:`Загрузка видео`})]}),!ue&&w&&!le&&(0,e.jsx)(`div`,{className:$.buffering,role:`status`,"aria-label":`Буферизация видео`,children:(0,e.jsx)(c,{variant:`empty`})}),de&&(0,e.jsxs)(`div`,{className:`${$.state} ${$.empty}`,role:`status`,children:[(0,e.jsx)(H,{name:`IconInfoCircle`,className:$.stateIcon,width:40,height:40}),(0,e.jsx)(`strong`,{children:`Видео отсутствует`}),d??(0,e.jsx)(`span`,{children:`Источник видео не указан`})]}),!ue&&le&&(0,e.jsxs)(`div`,{className:`${$.state} ${$.error}`,role:`alert`,children:[(0,e.jsx)(H,{name:`IconWarning`,className:$.stateIcon,width:40,height:40}),d??(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(`strong`,{children:`Видео недоступно`}),(0,e.jsx)(`span`,{children:le})]}),n.length>0&&(0,e.jsx)(u,{size:`sm`,variant:`secondary`,onClick:Se,children:`Повторить`})]}),!ue&&!le&&O&&(0,e.jsx)(`button`,{type:`button`,className:$.replay,"aria-label":`Воспроизвести заново`,onClick:()=>void me(),children:(0,e.jsx)(H,{name:`IconReplay`,width:28,height:28})}),p&&n.length>0&&!ue&&!le&&(0,e.jsxs)(`div`,{className:`${$.controlsLayer} ${re||!E?$.controlsVisible:``}`,onClick:e=>e.stopPropagation(),children:[G&&(0,e.jsxs)(`div`,{className:$.settings,role:`dialog`,"aria-label":`Настройки видео`,children:[(0,e.jsxs)(`label`,{children:[(0,e.jsx)(`span`,{children:`Скорость`}),(0,e.jsx)(`select`,{value:te,onChange:e=>{let t=Number(e.target.value);v.current&&(v.current.playbackRate=t)},children:on.map(t=>(0,e.jsxs)(`option`,{value:t,children:[t,`×`]},t))})]}),ce.length>0&&(0,e.jsxs)(`label`,{children:[(0,e.jsx)(`span`,{children:`Субтитры`}),(0,e.jsxs)(`select`,{value:U,onChange:e=>be(Number(e.target.value)),children:[(0,e.jsx)(`option`,{value:-1,children:`Выключены`}),ce.map(({track:t,index:n})=>(0,e.jsx)(`option`,{value:n,children:t.label},`${t.srcLang}-${t.label}`))]})]}),(0,e.jsxs)(`button`,{type:`button`,className:$.settingsAction,"aria-pressed":B,onClick:()=>V(e=>!e),children:[(0,e.jsx)(`span`,{children:`Повтор`}),(0,e.jsx)(`span`,{children:B?`Вкл.`:`Выкл.`})]}),fe&&(0,e.jsx)(`button`,{type:`button`,className:$.settingsAction,"aria-pressed":ae,onClick:()=>void ye(),children:(0,e.jsxs)(`span`,{className:$.settingsActionLabel,children:[(0,e.jsx)(H,{name:`IconPictureInPicture`,width:18,height:18}),`Картинка в картинке`]})})]}),(0,e.jsxs)(`div`,{className:$.controls,children:[(0,e.jsx)(`div`,{className:$.controlGroup,children:(0,e.jsx)(`button`,{type:`button`,className:`${$.controlButton} ${$.playButton}`,"aria-label":E?`Пауза`:`Воспроизвести`,title:E?`Пауза (K)`:`Воспроизвести (K)`,onClick:()=>void me(),children:(0,e.jsx)(H,{name:E?`IconPause`:`IconPlay`,width:24,height:24})})}),(0,e.jsxs)(`div`,{className:`${$.controlGroup} ${$.volumeGroup}`,children:[(0,e.jsx)(`button`,{type:`button`,className:$.controlButton,"aria-label":R?`Включить звук`:`Выключить звук`,"aria-pressed":R,title:`Звук (M)`,onClick:he,children:(0,e.jsx)(H,{name:R||I===0?`IconVolumeMuted`:`IconVolume`,width:22,height:22})}),(0,e.jsx)(`input`,{className:$.volume,type:`range`,min:0,max:1,step:.05,value:R?0:I,"aria-label":`Громкость`,"aria-valuetext":`${Math.round((R?0:I)*100)}%`,onChange:e=>ge(Number(e.target.value))})]}),(0,e.jsxs)(`div`,{className:`${$.controlGroup} ${$.timelineGroup}`,children:[(0,e.jsx)(`span`,{className:$.time,children:tn(A)}),(0,e.jsx)(`input`,{className:$.timeline,style:Ce,type:`range`,min:0,max:M||0,step:.01,value:Math.min(A,M||0),"aria-label":`Позиция воспроизведения`,"aria-valuetext":`${tn(A)} из ${tn(M)}`,onChange:e=>_e(Number(e.target.value))}),(0,e.jsx)(`span`,{className:$.time,children:tn(M)})]}),(0,e.jsxs)(`div`,{className:$.controlGroup,children:[(0,e.jsx)(`button`,{type:`button`,className:$.controlButton,"aria-label":`Настройки`,"aria-expanded":G,title:`Настройки`,onClick:()=>ne(e=>!e),children:(0,e.jsx)(H,{name:`IconSettings`,width:22,height:22})}),(0,e.jsx)(`button`,{type:`button`,className:$.controlButton,"aria-label":q?`Выйти из полноэкранного режима`:`Полноэкранный режим`,title:`Полноэкранный режим (F)`,onClick:()=>void ve(),children:(0,e.jsx)(H,{name:q?`IconFullscreenExit`:`IconFullscreen`,width:22,height:22})})]})]})]})]}),(0,e.jsx)(`figcaption`,{className:$.caption,children:i})]})},cn={root:`_root_ymidq_1`,trigger:`_trigger_ymidq_15`,heading:`_heading_ymidq_41`,title:`_title_ymidq_51`,subtitle:`_subtitle_ymidq_59`,icon:`_icon_ymidq_69`,open:`_open_ymidq_91`,content:`_content_ymidq_99`,contentInner:`_contentInner_ymidq_119`},ln=(e,t,n,r=16)=>{if(t>Math.max(0,n-r*2)){let t=e-r;return Math.abs(t)<=1?{alignment:`none`,delta:0}:{alignment:`start`,delta:t}}let i=e+t,a=n-r;return i>a?{alignment:`end`,delta:i-a}:e<r?{alignment:`start`,delta:e-r}:{alignment:`none`,delta:0}},un=({title:n,subtitle:r,children:i,defaultOpen:a=!1,open:o,onOpenChange:s,autoScrollOnOpen:c=!0,scrollOffset:l=16,className:u=``})=>{let d=(0,t.useId)(),[f,p]=(0,t.useState)(a),m=o??f,h=(0,t.useRef)(null),g=(0,t.useRef)(null),_=(0,t.useRef)(m);return(0,t.useEffect)(()=>{let e=_.current;if(_.current=m,!m||e||!c)return;let t=h.current,n=g.current;if(!t||!n||typeof window>`u`)return;let r=!1,i=()=>{if(r)return;r=!0;let e=t.getBoundingClientRect(),n=ln(e.top,e.height,window.innerHeight,l);if(n.alignment===`none`)return;let i=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;window.scrollBy({top:n.delta,behavior:i?`auto`:`smooth`})},a=e=>{e.target===n&&e.propertyName===`grid-template-rows`&&i()};n.addEventListener(`transitionend`,a);let o=window.setTimeout(i,280);return()=>{n.removeEventListener(`transitionend`,a),window.clearTimeout(o)}},[c,m,l]),(0,e.jsxs)(`section`,{ref:h,className:`${cn.root} ${m?cn.open:``} ${u}`,children:[(0,e.jsxs)(`button`,{type:`button`,className:cn.trigger,"aria-expanded":m,"aria-controls":d,onClick:()=>{let e=!m;o===void 0&&p(e),s?.(e)},children:[(0,e.jsxs)(`span`,{className:cn.heading,children:[(0,e.jsx)(`span`,{className:cn.title,children:n}),r&&(0,e.jsx)(`span`,{className:cn.subtitle,children:r})]}),(0,e.jsx)(`span`,{className:cn.icon,"aria-hidden":`true`,children:(0,e.jsx)(H,{name:`IconChevron`,width:20,height:20})})]}),(0,e.jsx)(`div`,{ref:g,id:d,className:cn.content,"aria-hidden":!m,children:(0,e.jsx)(`div`,{className:cn.contentInner,children:i})})]})},dn=({children:e,containerId:r=`overlay-root`})=>{let[i,a]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e=document.getElementById(r);if(e){a(e);return}let t=document.createElement(`div`);return t.id=r,document.body.appendChild(t),a(t),()=>{t.childElementCount===0&&t.parentElement&&t.remove()}},[r]),i?(0,n.createPortal)(e,i):null};exports.ConfirmModal=Pt,exports.DSAccordion=un,exports.DSBadge=o,exports.DSButton=u,exports.DSCheckbox=W,exports.DSDataTable=Ge,exports.DSDateRange=Se,exports.DSDateTimePicker=ye,exports.DSDropDown=Ae,exports.DSDropDownMultiple=Xe,exports.DSFieldLabel=f,exports.DSFieldMessage=p,exports.DSFileInput=gt,exports.DSFilters=ft,exports.DSIcon=H,exports.DSInfoBlock=ct,exports.DSInput=Qe,exports.DSLoader=c,exports.DSModal=Ot,exports.DSModalFrame=Dt,exports.DSPageLoader=Wt,exports.DSPortal=dn,exports.DSRadioButton=ut,exports.DSSearchDropDown=ot,exports.DSSkeleton=we,exports.DSSort=Me,exports.DSTextarea=bt,exports.DSToast=qt,exports.DSToastProvider=Zt,exports.DSTooltip=en,exports.DSVideoPlayerFrame=sn,exports.ErrorModal=Ft,exports.ModalSystemProvider=kt,exports.builtInModalRegistry=It,exports.defineModalRegistry=At,exports.formatDateInputValue=ae,exports.formatDateTimeLocalValue=de,exports.getDSAccordionScrollTarget=ln,exports.getDSDataTableColumnStyle=Pe,exports.getDSDataTablePaginationItems=Fe,exports.getErrorMessage=Rt,exports.getNextEnabledOptionIndex=Oe,exports.isValidDateInputPrefix=ce,exports.isValidDateRange=xe,exports.maskDateInputValue=oe,exports.parseDateInputValue=le,exports.parseDateTimeLocalValue=fe,exports.resetModalStore=St,exports.resetToastStore=Xt,exports.useConfirmModal=Lt,exports.useConfirmModalStore=Bt,exports.useErrorModal=zt,exports.useErrorModalStore=Vt,exports.useModals=Ht,exports.useModalsStore=Q,exports.useToast=Qt,exports.useToastStore=Yt,exports.validateDSDataTableData=Ie;