fui-material 2.7.16 → 2.7.17

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.
@@ -7,32 +7,32 @@ import { renderToStaticMarkup } from "react-dom/server";
7
7
  import { initializeModule as initializeModule$1, installFormatCode } from "allorion-exporting-html-to-xlsx";
8
8
  import axios from "axios";
9
9
  import { useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
10
- import './index.css';const btn = "_btn_u1cjw_1";
11
- const disabled$4 = "_disabled_u1cjw_31";
12
- const stylesBtn = {
10
+ import './index.css';const btn = "_btn_1s0n3_1";
11
+ const disabled$4 = "_disabled_1s0n3_31";
12
+ const styles$A = {
13
13
  btn,
14
14
  disabled: disabled$4,
15
- "btn-xs": "_btn-xs_u1cjw_40",
16
- "btn-sm": "_btn-sm_u1cjw_51",
17
- "btn-lg": "_btn-lg_u1cjw_62",
18
- "btn-primary": "_btn-primary_u1cjw_73",
19
- "btn-outline-primary": "_btn-outline-primary_u1cjw_87",
20
- "btn-secondary": "_btn-secondary_u1cjw_104",
21
- "btn-outline-secondary": "_btn-outline-secondary_u1cjw_118",
22
- "btn-success": "_btn-success_u1cjw_135",
23
- "btn-outline-success": "_btn-outline-success_u1cjw_149",
24
- "btn-danger": "_btn-danger_u1cjw_166",
25
- "btn-outline-danger": "_btn-outline-danger_u1cjw_180",
26
- "btn-warning": "_btn-warning_u1cjw_197",
27
- "btn-outline-warning": "_btn-outline-warning_u1cjw_211",
28
- "btn-info": "_btn-info_u1cjw_228",
29
- "btn-outline-info": "_btn-outline-info_u1cjw_242",
30
- "btn-light": "_btn-light_u1cjw_259",
31
- "btn-outline-light": "_btn-outline-light_u1cjw_274",
32
- "btn-dark": "_btn-dark_u1cjw_291",
33
- "btn-outline-dark": "_btn-outline-dark_u1cjw_305",
34
- "btn-link": "_btn-link_u1cjw_322",
35
- "btn-outline-link": "_btn-outline-link_u1cjw_338"
15
+ "btn-xs": "_btn-xs_1s0n3_40",
16
+ "btn-sm": "_btn-sm_1s0n3_51",
17
+ "btn-lg": "_btn-lg_1s0n3_62",
18
+ "btn-primary": "_btn-primary_1s0n3_73",
19
+ "btn-outline-primary": "_btn-outline-primary_1s0n3_87",
20
+ "btn-secondary": "_btn-secondary_1s0n3_104",
21
+ "btn-outline-secondary": "_btn-outline-secondary_1s0n3_118",
22
+ "btn-success": "_btn-success_1s0n3_135",
23
+ "btn-outline-success": "_btn-outline-success_1s0n3_149",
24
+ "btn-danger": "_btn-danger_1s0n3_166",
25
+ "btn-outline-danger": "_btn-outline-danger_1s0n3_180",
26
+ "btn-warning": "_btn-warning_1s0n3_197",
27
+ "btn-outline-warning": "_btn-outline-warning_1s0n3_211",
28
+ "btn-info": "_btn-info_1s0n3_228",
29
+ "btn-outline-info": "_btn-outline-info_1s0n3_242",
30
+ "btn-light": "_btn-light_1s0n3_259",
31
+ "btn-outline-light": "_btn-outline-light_1s0n3_274",
32
+ "btn-dark": "_btn-dark_1s0n3_291",
33
+ "btn-outline-dark": "_btn-outline-dark_1s0n3_305",
34
+ "btn-link": "_btn-link_1s0n3_322",
35
+ "btn-outline-link": "_btn-outline-link_1s0n3_338"
36
36
  };
37
37
  const FButton = forwardRef(({
38
38
  children,
@@ -55,9 +55,9 @@ const FButton = forwardRef(({
55
55
  };
56
56
  const variantClass = variant === "contained" ? `btn-${color}` : `btn-outline-${color}`;
57
57
  const buttonClasses = [
58
- stylesBtn["btn"],
59
- stylesBtn[size],
60
- stylesBtn[variantClass],
58
+ styles$A["btn"],
59
+ styles$A[size],
60
+ styles$A[variantClass],
61
61
  className
62
62
  ].filter(Boolean).join(" ");
63
63
  return /* @__PURE__ */ jsx(
@@ -75,8 +75,8 @@ const FButton = forwardRef(({
75
75
  });
76
76
  FButton.displayName = "FButton";
77
77
  const defaultStyles = {
78
- "f-button-file": "_f-button-file_i2hex_1",
79
- "file-preview-list": "_file-preview-list_i2hex_1"
78
+ "f-button-file": "_f-button-file_7ljnt_1",
79
+ "file-preview-list": "_file-preview-list_7ljnt_1"
80
80
  };
81
81
  const FTrashIcon = React.forwardRef(({
82
82
  color = "primary",
@@ -120,15 +120,15 @@ const FTrashIcon = React.forwardRef(({
120
120
  );
121
121
  });
122
122
  FTrashIcon.displayName = "FTrashIcon";
123
- const progressBar = "_progressBar_1xp9s_48";
124
- const completed = "_completed_1xp9s_60";
125
- const progress = "_progress_1xp9s_48";
123
+ const progressBar = "_progressBar_1iwax_48";
124
+ const completed = "_completed_1iwax_60";
125
+ const progress = "_progress_1iwax_48";
126
126
  const styles$z = {
127
- "file-preview-card": "_file-preview-card_1xp9s_1",
128
- "file-preview-info": "_file-preview-info_1xp9s_22",
129
- "file-preview-name": "_file-preview-name_1xp9s_28",
130
- "file-preview-size": "_file-preview-size_1xp9s_36",
131
- "trash-icon": "_trash-icon_1xp9s_42",
127
+ "file-preview-card": "_file-preview-card_1iwax_1",
128
+ "file-preview-info": "_file-preview-info_1iwax_22",
129
+ "file-preview-name": "_file-preview-name_1iwax_28",
130
+ "file-preview-size": "_file-preview-size_1iwax_36",
131
+ "trash-icon": "_trash-icon_1iwax_42",
132
132
  progressBar,
133
133
  completed,
134
134
  progress
@@ -715,26 +715,26 @@ const FPaper = ({
715
715
  }
716
716
  );
717
717
  };
718
- const bordered = "_bordered_ld5gh_18";
719
- const left$1 = "_left_ld5gh_40";
720
- const center = "_center_ld5gh_43";
721
- const right = "_right_ld5gh_46";
718
+ const bordered = "_bordered_1blpv_18";
719
+ const left$1 = "_left_1blpv_40";
720
+ const center = "_center_1blpv_43";
721
+ const right = "_right_1blpv_46";
722
722
  const styles$t = {
723
- "f-table-component": "_f-table-component_ld5gh_1",
724
- "f-table-component__table": "_f-table-component__table_ld5gh_7",
723
+ "f-table-component": "_f-table-component_1blpv_1",
724
+ "f-table-component__table": "_f-table-component__table_1blpv_7",
725
725
  bordered,
726
- "bordered-half": "_bordered-half_ld5gh_22",
727
- "f-table-component__table_header": "_f-table-component__table_header_ld5gh_25",
728
- "is-sticky": "_is-sticky_ld5gh_29",
729
- "f-table-component__table_header-cell": "_f-table-component__table_header-cell_ld5gh_37",
726
+ "bordered-half": "_bordered-half_1blpv_22",
727
+ "f-table-component__table_header": "_f-table-component__table_header_1blpv_25",
728
+ "is-sticky": "_is-sticky_1blpv_29",
729
+ "f-table-component__table_header-cell": "_f-table-component__table_header-cell_1blpv_37",
730
730
  left: left$1,
731
731
  center,
732
732
  right,
733
- "f-table-component__table_body": "_f-table-component__table_body_ld5gh_65",
734
- "f-table-component__table_row": "_f-table-component__table_row_ld5gh_68",
735
- "f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_ld5gh_68",
736
- "f-table-component__table_body-cell": "_f-table-component__table_body-cell_ld5gh_81",
737
- "f-table-component__table_footer": "_f-table-component__table_footer_ld5gh_97"
733
+ "f-table-component__table_body": "_f-table-component__table_body_1blpv_65",
734
+ "f-table-component__table_row": "_f-table-component__table_row_1blpv_68",
735
+ "f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_1blpv_68",
736
+ "f-table-component__table_body-cell": "_f-table-component__table_body-cell_1blpv_81",
737
+ "f-table-component__table_footer": "_f-table-component__table_footer_1blpv_97"
738
738
  };
739
739
  const FTableHead = ({
740
740
  st,
@@ -1021,20 +1021,20 @@ const FTableFooter = ({
1021
1021
  }
1022
1022
  );
1023
1023
  };
1024
- const entering = "_entering_dwagt_17";
1025
- const exiting = "_exiting_dwagt_23";
1026
- const hide = "_hide_dwagt_45";
1024
+ const entering = "_entering_wcyn4_19";
1025
+ const exiting = "_exiting_wcyn4_25";
1026
+ const hide = "_hide_wcyn4_50";
1027
1027
  const styles$s = {
1028
- "f-dialog": "_f-dialog_dwagt_1",
1028
+ "f-dialog": "_f-dialog_wcyn4_1",
1029
1029
  entering,
1030
- "f-dialog__content": "_f-dialog__content_dwagt_20",
1030
+ "f-dialog__content": "_f-dialog__content_wcyn4_22",
1031
1031
  exiting,
1032
1032
  hide,
1033
- "f-dialog__header": "_f-dialog__header_dwagt_49",
1034
- "f-dialog__header_title": "_f-dialog__header_title_dwagt_61",
1035
- "f-dialog__header_close": "_f-dialog__header_close_dwagt_72",
1036
- "f-dialog__body": "_f-dialog__body_dwagt_87",
1037
- "f-dialog__footer": "_f-dialog__footer_dwagt_92"
1033
+ "f-dialog__header": "_f-dialog__header_wcyn4_61",
1034
+ "f-dialog__header_title": "_f-dialog__header_title_wcyn4_73",
1035
+ "f-dialog__header_close": "_f-dialog__header_close_wcyn4_84",
1036
+ "f-dialog__body": "_f-dialog__body_wcyn4_110",
1037
+ "f-dialog__footer": "_f-dialog__footer_wcyn4_134"
1038
1038
  };
1039
1039
  let openDialogsCount = 0;
1040
1040
  const FDialog = ({
@@ -1164,14 +1164,22 @@ FCloseIcon.displayName = "FCloseIcon";
1164
1164
  const FDialogHeader = ({ title: title2, handleClose }) => {
1165
1165
  return /* @__PURE__ */ jsxs("div", { className: styles$s["f-dialog__header"], children: [
1166
1166
  /* @__PURE__ */ jsx("h3", { className: styles$s["f-dialog__header_title"], children: title2 }),
1167
- handleClose && /* @__PURE__ */ jsx("div", { className: styles$s["f-dialog__header_close"], children: /* @__PURE__ */ jsx(
1168
- FCloseIcon,
1167
+ handleClose && /* @__PURE__ */ jsx(
1168
+ "button",
1169
1169
  {
1170
- handleClose,
1171
- color: "primary",
1172
- size: 30
1170
+ type: "button",
1171
+ className: styles$s["f-dialog__header_close"],
1172
+ onClick: handleClose,
1173
+ "aria-label": "Закрыть диалог",
1174
+ children: /* @__PURE__ */ jsx(
1175
+ FCloseIcon,
1176
+ {
1177
+ color: "secondary",
1178
+ size: 18
1179
+ }
1180
+ )
1173
1181
  }
1174
- ) })
1182
+ )
1175
1183
  ] });
1176
1184
  };
1177
1185
  const FDialogBody = ({ st, children, scroll = true }) => {
@@ -1192,26 +1200,26 @@ const FDialogFooter = ({ children, className, st, id }) => {
1192
1200
  }
1193
1201
  );
1194
1202
  };
1195
- const loader = "_loader_1lhk7_1";
1196
- const primary = "_primary_1lhk7_42";
1197
- const secondary = "_secondary_1lhk7_46";
1198
- const success$1 = "_success_1lhk7_50";
1199
- const danger = "_danger_1lhk7_54";
1200
- const warning$4 = "_warning_1lhk7_58";
1201
- const info$2 = "_info_1lhk7_62";
1202
- const light = "_light_1lhk7_66";
1203
- const dark = "_dark_1lhk7_70";
1204
- const link = "_link_1lhk7_74";
1203
+ const loader = "_loader_1glrn_1";
1204
+ const primary = "_primary_1glrn_42";
1205
+ const secondary = "_secondary_1glrn_46";
1206
+ const success$2 = "_success_1glrn_50";
1207
+ const danger = "_danger_1glrn_54";
1208
+ const warning$5 = "_warning_1glrn_58";
1209
+ const info$3 = "_info_1glrn_62";
1210
+ const light = "_light_1glrn_66";
1211
+ const dark = "_dark_1glrn_70";
1212
+ const link = "_link_1glrn_74";
1205
1213
  const styles$r = {
1206
- "authorization-spinner": "_authorization-spinner_1lhk7_1",
1207
- "spinner-item": "_spinner-item_1lhk7_7",
1214
+ "authorization-spinner": "_authorization-spinner_1glrn_1",
1215
+ "spinner-item": "_spinner-item_1glrn_7",
1208
1216
  loader,
1209
1217
  primary,
1210
1218
  secondary,
1211
- success: success$1,
1219
+ success: success$2,
1212
1220
  danger,
1213
- warning: warning$4,
1214
- info: info$2,
1221
+ warning: warning$5,
1222
+ info: info$3,
1215
1223
  light,
1216
1224
  dark,
1217
1225
  link
@@ -1261,7 +1269,7 @@ const FPreloader = ({
1261
1269
  );
1262
1270
  };
1263
1271
  const styles$p = {
1264
- "f-checkbox": "_f-checkbox_9rvqg_1"
1272
+ "f-checkbox": "_f-checkbox_1j5ck_1"
1265
1273
  };
1266
1274
  const FCheckbox = forwardRef(
1267
1275
  ({
@@ -1284,7 +1292,7 @@ const FCheckbox = forwardRef(
1284
1292
  }
1285
1293
  );
1286
1294
  const styles$o = {
1287
- "f-radio": "_f-radio_cwhmx_1"
1295
+ "f-radio": "_f-radio_1oidm_1"
1288
1296
  };
1289
1297
  const FRadioButton = forwardRef(
1290
1298
  ({
@@ -1353,14 +1361,14 @@ const usePagination = ({
1353
1361
  }, [totalCount, pageSize, siblingCount, currentPage]);
1354
1362
  return paginationRange;
1355
1363
  };
1356
- const dots = "_dots_aham2_29";
1357
- const selected$1 = "_selected_aham2_33";
1358
- const disabled$3 = "_disabled_aham2_37";
1359
- const arrow = "_arrow_aham2_43";
1360
- const left = "_left_aham2_56";
1364
+ const dots = "_dots_uiqea_29";
1365
+ const selected$1 = "_selected_uiqea_33";
1366
+ const disabled$3 = "_disabled_uiqea_37";
1367
+ const arrow = "_arrow_uiqea_43";
1368
+ const left = "_left_uiqea_56";
1361
1369
  const styles$n = {
1362
- "pagination-container": "_pagination-container_aham2_1",
1363
- "pagination-item": "_pagination-item_aham2_9",
1370
+ "pagination-container": "_pagination-container_uiqea_1",
1371
+ "pagination-item": "_pagination-item_uiqea_9",
1364
1372
  dots,
1365
1373
  selected: selected$1,
1366
1374
  disabled: disabled$3,
@@ -1673,16 +1681,16 @@ const FOpenImgFull = ({
1673
1681
  }
1674
1682
  );
1675
1683
  };
1676
- const card$2 = "_card_1pttw_1";
1677
- const warning$3 = "_warning_1pttw_16";
1678
- const info$1 = "_info_1pttw_24";
1679
- const alert = "_alert_1pttw_32";
1684
+ const card$2 = "_card_1wjhl_1";
1685
+ const warning$4 = "_warning_1wjhl_16";
1686
+ const info$2 = "_info_1wjhl_24";
1687
+ const alert = "_alert_1wjhl_32";
1680
1688
  const styles$k = {
1681
1689
  card: card$2,
1682
- warning: warning$3,
1683
- info: info$1,
1690
+ warning: warning$4,
1691
+ info: info$2,
1684
1692
  alert,
1685
- "fv-accord-title": "_fv-accord-title_1pttw_57"
1693
+ "fv-accord-title": "_fv-accord-title_1wjhl_57"
1686
1694
  };
1687
1695
  const FAccordion = ({
1688
1696
  variant = "info",
@@ -1722,14 +1730,14 @@ const FAccordion = ({
1722
1730
  }
1723
1731
  );
1724
1732
  };
1725
- const container$1 = "_container_6r9j2_1";
1733
+ const container$1 = "_container_qk7bc_1";
1726
1734
  const styles$j = {
1727
1735
  container: container$1,
1728
- "custom-file": "_custom-file_6r9j2_6",
1729
- "custom-file-input": "_custom-file-input_6r9j2_9",
1730
- "custom-file-dropzone": "_custom-file-dropzone_6r9j2_24",
1731
- "custom-file-label": "_custom-file-label_6r9j2_24",
1732
- "custom-files-preview": "_custom-files-preview_6r9j2_71"
1736
+ "custom-file": "_custom-file_qk7bc_6",
1737
+ "custom-file-input": "_custom-file-input_qk7bc_9",
1738
+ "custom-file-dropzone": "_custom-file-dropzone_qk7bc_24",
1739
+ "custom-file-label": "_custom-file-label_qk7bc_24",
1740
+ "custom-files-preview": "_custom-files-preview_qk7bc_71"
1733
1741
  };
1734
1742
  const FInputFileForm = ({
1735
1743
  id,
@@ -2068,15 +2076,15 @@ const FFullDateField = forwardRef(
2068
2076
  );
2069
2077
  }
2070
2078
  );
2071
- const active$3 = "_active_yhck3_41";
2079
+ const active$3 = "_active_1h0yy_41";
2072
2080
  const styles$h = {
2073
- "f-select-search-db": "_f-select-search-db_yhck3_1",
2074
- "f-select-search-db__input": "_f-select-search-db__input_yhck3_7",
2075
- "f-select-search-db__input_field": "_f-select-search-db__input_field_yhck3_11",
2076
- "f-select-search-db__input_arrow": "_f-select-search-db__input_arrow_yhck3_14",
2077
- "f-select-search-db__dropdown": "_f-select-search-db__dropdown_yhck3_21",
2081
+ "f-select-search-db": "_f-select-search-db_1h0yy_1",
2082
+ "f-select-search-db__input": "_f-select-search-db__input_1h0yy_7",
2083
+ "f-select-search-db__input_field": "_f-select-search-db__input_field_1h0yy_11",
2084
+ "f-select-search-db__input_arrow": "_f-select-search-db__input_arrow_1h0yy_14",
2085
+ "f-select-search-db__dropdown": "_f-select-search-db__dropdown_1h0yy_21",
2078
2086
  active: active$3,
2079
- "f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_yhck3_45"
2087
+ "f-select-search-db__dropdown_content": "_f-select-search-db__dropdown_content_1h0yy_45"
2080
2088
  };
2081
2089
  const FSelectSearchDb = ({
2082
2090
  fetchingFunc,
@@ -2427,8 +2435,8 @@ const FAlert = ({
2427
2435
  buttonClose = false,
2428
2436
  size
2429
2437
  }) => {
2430
- const visible = useRef();
2431
- const hidden = useRef();
2438
+ const visible2 = useRef();
2439
+ const hidden2 = useRef();
2432
2440
  const close = useRef();
2433
2441
  const [randomId] = useState(fGenerateUniqueId());
2434
2442
  let newTime = displayTime;
@@ -2446,7 +2454,7 @@ const FAlert = ({
2446
2454
  });
2447
2455
  }
2448
2456
  }
2449
- visible.current = setTimeout(() => {
2457
+ visible2.current = setTimeout(() => {
2450
2458
  if (open) {
2451
2459
  const el = document.querySelector(`#f-block-alert-${randomId}`);
2452
2460
  if (el !== null) {
@@ -2461,7 +2469,7 @@ const FAlert = ({
2461
2469
  const el = document.querySelector(`#f-block-alert-${randomId}`);
2462
2470
  if (el !== null) {
2463
2471
  progress2.style.transition = `${newTime}s linear`;
2464
- hidden.current = setTimeout(() => {
2472
+ hidden2.current = setTimeout(() => {
2465
2473
  el.classList.remove("f-alert-visible");
2466
2474
  el.classList.add("f-alert-hidden");
2467
2475
  }, (newTime - 1) * 1e3);
@@ -2616,8 +2624,8 @@ const FAlert = ({
2616
2624
  onClose(false);
2617
2625
  el.classList.remove("f-alert-visible");
2618
2626
  el.classList.remove("f-alert-hidden");
2619
- clearTimeout(visible.current);
2620
- clearTimeout(hidden.current);
2627
+ clearTimeout(visible2.current);
2628
+ clearTimeout(hidden2.current);
2621
2629
  clearTimeout(close.current);
2622
2630
  }
2623
2631
  }
@@ -2707,14 +2715,14 @@ const FNative = ({
2707
2715
  )
2708
2716
  ] });
2709
2717
  };
2710
- const horizontal = "_horizontal_zlvc7_1";
2711
- const vertical = "_vertical_zlvc7_7";
2712
- const active$2 = "_active_zlvc7_50";
2718
+ const horizontal = "_horizontal_hbjfv_1";
2719
+ const vertical = "_vertical_hbjfv_7";
2720
+ const active$2 = "_active_hbjfv_50";
2713
2721
  const styles$f = {
2714
- "f-tabs": "_f-tabs_zlvc7_1",
2722
+ "f-tabs": "_f-tabs_hbjfv_1",
2715
2723
  horizontal,
2716
2724
  vertical,
2717
- "f-tabs__tab": "_f-tabs__tab_zlvc7_16",
2725
+ "f-tabs__tab": "_f-tabs__tab_hbjfv_16",
2718
2726
  active: active$2
2719
2727
  };
2720
2728
  const FTabs = ({
@@ -3081,9 +3089,9 @@ const FCarouselItem = ({
3081
3089
  }) => {
3082
3090
  return /* @__PURE__ */ jsx("div", { className: `${styles$c["f-carousel-item"]} ${className || ""}`, id, children });
3083
3091
  };
3084
- const skeleton = "_skeleton_1ojrt_1";
3092
+ const skeleton = "_skeleton_3ica6_1";
3085
3093
  const styles$b = {
3086
- "skeleton-block": "_skeleton-block_1ojrt_1",
3094
+ "skeleton-block": "_skeleton-block_3ica6_1",
3087
3095
  skeleton
3088
3096
  };
3089
3097
  const FSkeleton = ({ children, enable, width, height }) => {
@@ -4571,161 +4579,301 @@ const FArrowDownCircleIcon = React.forwardRef(({
4571
4579
  );
4572
4580
  });
4573
4581
  FArrowDownCircleIcon.displayName = "FArrowDownCircleIcon";
4582
+ const visible$2 = "_visible_1ryqy_19";
4583
+ const hidden$2 = "_hidden_1ryqy_22";
4584
+ const info$1 = "_info_1ryqy_71";
4585
+ const success$1 = "_success_1ryqy_79";
4586
+ const warning$3 = "_warning_1ryqy_83";
4587
+ const error$1 = "_error_1ryqy_75";
4574
4588
  const styles$5 = {
4575
- "f-function-block-alert": "_f-function-block-alert_1jotv_1",
4576
- "f-function-alert": "_f-function-alert_1jotv_16",
4577
- "f-function-alert-ico": "_f-function-alert-ico_1jotv_24",
4578
- "info-alert": "_info-alert_1jotv_31",
4579
- "error-alert": "_error-alert_1jotv_36",
4580
- "success-alert": "_success-alert_1jotv_41",
4581
- "warning-alert": "_warning-alert_1jotv_46",
4582
- "f-function-alert-inside": "_f-function-alert-inside_1jotv_51",
4583
- "f-function-alert-header": "_f-function-alert-header_1jotv_58",
4584
- "f-function-alert-body": "_f-function-alert-body_1jotv_68",
4585
- "f-function-alert-footer": "_f-function-alert-footer_1jotv_83"
4589
+ "f-function-block-alert": "_f-function-block-alert_1ryqy_1",
4590
+ visible: visible$2,
4591
+ hidden: hidden$2,
4592
+ "f-function-alert": "_f-function-alert_1ryqy_27",
4593
+ "f-function-alert-top": "_f-function-alert-top_1ryqy_51",
4594
+ "f-function-alert-ico": "_f-function-alert-ico_1ryqy_57",
4595
+ "info-alert": "_info-alert_1ryqy_71",
4596
+ "error-alert": "_error-alert_1ryqy_75",
4597
+ "success-alert": "_success-alert_1ryqy_79",
4598
+ "warning-alert": "_warning-alert_1ryqy_83",
4599
+ "f-function-alert-inside": "_f-function-alert-inside_1ryqy_87",
4600
+ "f-function-alert-header": "_f-function-alert-header_1ryqy_94",
4601
+ "f-function-alert-body": "_f-function-alert-body_1ryqy_112",
4602
+ "f-function-alert-footer": "_f-function-alert-footer_1ryqy_128",
4603
+ "btn-action": "_btn-action_1ryqy_135",
4604
+ info: info$1,
4605
+ success: success$1,
4606
+ warning: warning$3,
4607
+ error: error$1,
4608
+ "close-btn": "_close-btn_1ryqy_197"
4586
4609
  };
4587
4610
  const fAlert = ({ title: title2, body, variant = "info" }) => {
4588
- let ico = "";
4589
- switch (variant) {
4590
- case "info":
4591
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>';
4592
- break;
4593
- case "success":
4594
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 0 1 .02-.022z"/>';
4595
- break;
4596
- case "error":
4597
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>';
4598
- break;
4599
- case "warning":
4600
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>';
4601
- break;
4602
- }
4603
- const arrBody = [];
4604
- body.split("\n").forEach((opt) => {
4605
- arrBody.push(`<span>${opt}</span>`);
4606
- });
4607
- window.document.body.insertAdjacentHTML(
4608
- "afterbegin",
4609
- `
4610
- <div class='${styles$5["f-function-block-alert"]}' id='f-function-block-alert'>
4611
+ return new Promise((resolve) => {
4612
+ let ico = "";
4613
+ switch (variant) {
4614
+ case "info":
4615
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4616
+ <circle cx="12" cy="12" r="10"/>
4617
+ <line x1="12" y1="16" x2="12" y2="12"/>
4618
+ <line x1="12" y1="8" x2="12.01" y2="8"/>
4619
+ </svg>`;
4620
+ break;
4621
+ case "success":
4622
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4623
+ <circle cx="12" cy="12" r="10"/>
4624
+ <path d="m9 12 2 2 4-4"/>
4625
+ </svg>`;
4626
+ break;
4627
+ case "error":
4628
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4629
+ <circle cx="12" cy="12" r="10"/>
4630
+ <line x1="15" y1="9" x2="9" y2="15"/>
4631
+ <line x1="9" y1="9" x2="15" y2="15"/>
4632
+ </svg>`;
4633
+ break;
4634
+ case "warning":
4635
+ ico = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4636
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
4637
+ <line x1="12" y1="9" x2="12" y2="13"/>
4638
+ <line x1="12" y1="17" x2="12.01" y2="17"/>
4639
+ </svg>`;
4640
+ break;
4641
+ }
4642
+ const arrBody = body.split("\n").map((opt) => `<span>${opt}</span>`);
4643
+ const blockId = "f-function-block-alert-" + fGenerateUniqueId();
4644
+ const alertHtml = `
4645
+ <div class='${styles$5["f-function-block-alert"]}' id='${blockId}'>
4611
4646
  <div class='${styles$5["f-function-alert"]}'>
4612
- <div class='${styles$5["f-function-alert-ico"]} ${styles$5[`${variant}-alert`]}' style='color: inherit; fill: inherit'>
4613
- <svg width="28" height="28" viewBox="0 0 16 16">
4647
+ <div class='${styles$5["f-function-alert-top"]}'>
4648
+ <div class='${styles$5["f-function-alert-ico"]} ${styles$5[`${variant}-alert`]}'>
4614
4649
  ${ico}
4615
- </svg>
4616
- </div>
4617
- <div class='${styles$5["f-function-alert-inside"]}'>
4650
+ </div>
4618
4651
  <div class='${styles$5["f-function-alert-header"]}'>
4619
4652
  <h4>${title2 || ""}</h4>
4620
4653
  </div>
4621
- <div class='${styles$5["f-function-alert-body"]}'>
4622
- ${arrBody.join("")}
4623
- </div>
4624
- <div class='${styles$5["f-function-alert-footer"]}'>
4625
- <FButton
4626
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-primary"]}'
4627
- onclick='document.querySelector("#f-function-block-alert").remove()'
4628
- >
4629
- Закрыть
4630
- </FButton>
4631
- </div>
4654
+ <button type="button" aria-label="Закрыть" class="${styles$5["close-btn"]}" id="${blockId}-close-x">
4655
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
4656
+ <line x1="18" y1="6" x2="6" y2="18"/>
4657
+ <line x1="6" y1="6" x2="18" y2="18"/>
4658
+ </svg>
4659
+ </button>
4660
+ </div>
4661
+ <div class='${styles$5["f-function-alert-body"]}'>
4662
+ ${arrBody.join("")}
4663
+ </div>
4664
+ <div class='${styles$5["f-function-alert-footer"]}'>
4665
+ <button
4666
+ type="button"
4667
+ class='${styles$5["btn-action"]} ${styles$5[variant]}'
4668
+ id='${blockId}-ok'
4669
+ >
4670
+ Закрыть
4671
+ </button>
4632
4672
  </div>
4633
4673
  </div>
4634
4674
  </div>
4635
- `
4636
- );
4675
+ `;
4676
+ window.document.body.insertAdjacentHTML("afterbegin", alertHtml);
4677
+ const block = document.getElementById(blockId);
4678
+ const okBtn = document.getElementById(`${blockId}-ok`);
4679
+ const closeXBtn = document.getElementById(`${blockId}-close-x`);
4680
+ if (!block) {
4681
+ resolve();
4682
+ return;
4683
+ }
4684
+ if (typeof requestAnimationFrame === "function") {
4685
+ requestAnimationFrame(() => {
4686
+ requestAnimationFrame(() => {
4687
+ block.classList.add(styles$5["visible"]);
4688
+ });
4689
+ });
4690
+ } else {
4691
+ setTimeout(() => {
4692
+ block.classList.add(styles$5["visible"]);
4693
+ }, 20);
4694
+ }
4695
+ let isClosing = false;
4696
+ const closeModal = () => {
4697
+ if (isClosing) return;
4698
+ isClosing = true;
4699
+ window.removeEventListener("keydown", handleKeyDown);
4700
+ block.classList.remove(styles$5["visible"]);
4701
+ block.classList.add(styles$5["hidden"]);
4702
+ let isCleanedUp = false;
4703
+ const cleanup = () => {
4704
+ if (isCleanedUp) return;
4705
+ isCleanedUp = true;
4706
+ block.remove();
4707
+ resolve();
4708
+ };
4709
+ block.addEventListener("transitionend", (e) => {
4710
+ if (e.target === block) {
4711
+ cleanup();
4712
+ }
4713
+ });
4714
+ setTimeout(cleanup, 280);
4715
+ };
4716
+ const handleKeyDown = (e) => {
4717
+ if (e.key === "Escape" || e.key === "Enter") {
4718
+ e.preventDefault();
4719
+ closeModal();
4720
+ }
4721
+ };
4722
+ block.addEventListener("click", (e) => {
4723
+ if (e.target === block) {
4724
+ closeModal();
4725
+ }
4726
+ });
4727
+ okBtn == null ? void 0 : okBtn.addEventListener("click", closeModal);
4728
+ closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", closeModal);
4729
+ window.addEventListener("keydown", handleKeyDown);
4730
+ });
4637
4731
  };
4638
- const warning$2 = "_warning_de5a5_31";
4732
+ const visible$1 = "_visible_1jeyg_19";
4733
+ const hidden$1 = "_hidden_1jeyg_22";
4734
+ const warning$2 = "_warning_1jeyg_73";
4639
4735
  const styles$4 = {
4640
- "f-function-block-confirm": "_f-function-block-confirm_de5a5_1",
4641
- "f-function-confirm": "_f-function-confirm_de5a5_16",
4642
- "f-function-confirm-ico": "_f-function-confirm-ico_de5a5_24",
4736
+ "f-function-block-confirm": "_f-function-block-confirm_1jeyg_1",
4737
+ visible: visible$1,
4738
+ hidden: hidden$1,
4739
+ "f-function-confirm": "_f-function-confirm_1jeyg_27",
4740
+ "f-function-confirm-top": "_f-function-confirm-top_1jeyg_51",
4741
+ "f-function-confirm-ico": "_f-function-confirm-ico_1jeyg_57",
4643
4742
  warning: warning$2,
4644
- "f-function-confirm-inside": "_f-function-confirm-inside_de5a5_36",
4645
- "f-function-confirm-header": "_f-function-confirm-header_de5a5_43",
4646
- "f-function-confirm-body": "_f-function-confirm-body_de5a5_51",
4647
- "f-function-confirm-footer": "_f-function-confirm-footer_de5a5_65"
4743
+ "f-function-confirm-header": "_f-function-confirm-header_1jeyg_84",
4744
+ "f-function-confirm-body": "_f-function-confirm-body_1jeyg_102",
4745
+ "f-function-confirm-footer": "_f-function-confirm-footer_1jeyg_118",
4746
+ "btn-cancel": "_btn-cancel_1jeyg_125",
4747
+ "btn-ok": "_btn-ok_1jeyg_147",
4748
+ "close-btn": "_close-btn_1jeyg_171"
4648
4749
  };
4649
4750
  const fConfirm = ({ title: title2, body }) => {
4650
4751
  return new Promise((resolve) => {
4752
+ const blockId = "f-function-block-confirm-" + fGenerateUniqueId();
4651
4753
  window.document.body.insertAdjacentHTML(
4652
4754
  "afterbegin",
4653
4755
  `
4654
- <div class='${styles$4["f-function-block-confirm"]}' id='f-function-block-confirm'>
4756
+ <div class='${styles$4["f-function-block-confirm"]}' id='${blockId}'>
4655
4757
  <div class='${styles$4["f-function-confirm"]}'>
4656
- <div class='${styles$4["f-function-confirm-ico"]} ${styles$4.warning}'>
4657
- <svg width="28" height="28" viewBox="0 0 16 16">
4658
- <path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
4659
- <path d="M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/>
4660
- </svg>
4661
- </div>
4662
- <div class='${styles$4["f-function-confirm-inside"]}'>
4758
+ <div class='${styles$4["f-function-confirm-top"]}'>
4759
+ <div class='${styles$4["f-function-confirm-ico"]} ${styles$4.warning}'>
4760
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4761
+ <path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
4762
+ <line x1="12" y1="9" x2="12" y2="13"/>
4763
+ <line x1="12" y1="17" x2="12.01" y2="17"/>
4764
+ </svg>
4765
+ </div>
4663
4766
  <div class='${styles$4["f-function-confirm-header"]}'>
4664
4767
  <h4>${title2 || ""}</h4>
4665
4768
  </div>
4666
- <div class='${styles$4["f-function-confirm-body"]}'>
4667
- <span>${body}</span>
4668
- </div>
4669
- <div class='${styles$4["f-function-confirm-footer"]}'>
4670
- <button
4671
- id="f-function-confirm-ok"
4672
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-success"]}'
4673
- >
4674
- Ок
4675
- </button>
4676
- <button
4677
- id="f-function-confirm-cancellation"
4678
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-danger"]}'
4679
- >
4680
- Отменить
4681
- </button>
4682
- </div>
4769
+ <button type="button" aria-label="Закрыть" class="${styles$4["close-btn"]}" id="${blockId}-close-x">
4770
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
4771
+ <line x1="18" y1="6" x2="6" y2="18"/>
4772
+ <line x1="6" y1="6" x2="18" y2="18"/>
4773
+ </svg>
4774
+ </button>
4775
+ </div>
4776
+ <div class='${styles$4["f-function-confirm-body"]}'>
4777
+ <span>${body}</span>
4778
+ </div>
4779
+ <div class='${styles$4["f-function-confirm-footer"]}'>
4780
+ <button
4781
+ type="button"
4782
+ id="${blockId}-cancel"
4783
+ class='${styles$4["btn-cancel"]}'
4784
+ >
4785
+ Отменить
4786
+ </button>
4787
+ <button
4788
+ type="button"
4789
+ id="${blockId}-ok"
4790
+ class='${styles$4["btn-ok"]}'
4791
+ >
4792
+ Ок
4793
+ </button>
4683
4794
  </div>
4684
4795
  </div>
4685
4796
  </div>
4686
4797
  `
4687
4798
  );
4688
- const modalBlock = document.getElementById("f-function-block-confirm");
4689
- const okBtn = document.getElementById("f-function-confirm-ok");
4690
- const cancelBtn = document.getElementById("f-function-confirm-cancellation");
4691
- const closeModal = () => {
4692
- window.removeEventListener("keydown", handleKeyDown);
4693
- okBtn == null ? void 0 : okBtn.removeEventListener("click", handleOk);
4694
- cancelBtn == null ? void 0 : cancelBtn.removeEventListener("click", handleCancel);
4695
- modalBlock == null ? void 0 : modalBlock.remove();
4696
- };
4697
- const handleOk = () => {
4698
- closeModal();
4699
- resolve(true);
4700
- };
4701
- const handleCancel = () => {
4702
- closeModal();
4799
+ const block = document.getElementById(blockId);
4800
+ const okBtn = document.getElementById(`${blockId}-ok`);
4801
+ const cancelBtn = document.getElementById(`${blockId}-cancel`);
4802
+ const closeXBtn = document.getElementById(`${blockId}-close-x`);
4803
+ if (!block) {
4703
4804
  resolve(false);
4805
+ return;
4806
+ }
4807
+ if (typeof requestAnimationFrame === "function") {
4808
+ requestAnimationFrame(() => {
4809
+ requestAnimationFrame(() => {
4810
+ block.classList.add(styles$4["visible"]);
4811
+ });
4812
+ });
4813
+ } else {
4814
+ setTimeout(() => {
4815
+ block.classList.add(styles$4["visible"]);
4816
+ }, 20);
4817
+ }
4818
+ let isClosing = false;
4819
+ const closeModal = (result) => {
4820
+ if (isClosing) return;
4821
+ isClosing = true;
4822
+ window.removeEventListener("keydown", handleKeyDown);
4823
+ block.classList.remove(styles$4["visible"]);
4824
+ block.classList.add(styles$4["hidden"]);
4825
+ let isCleanedUp = false;
4826
+ const cleanup = () => {
4827
+ if (isCleanedUp) return;
4828
+ isCleanedUp = true;
4829
+ block.remove();
4830
+ resolve(result);
4831
+ };
4832
+ block.addEventListener("transitionend", (e) => {
4833
+ if (e.target === block) {
4834
+ cleanup();
4835
+ }
4836
+ });
4837
+ setTimeout(cleanup, 280);
4704
4838
  };
4705
4839
  const handleKeyDown = (e) => {
4706
4840
  if (e.key === "Enter") {
4707
4841
  e.preventDefault();
4708
- handleOk();
4709
- }
4710
- if (e.key === "Escape") {
4711
- handleCancel();
4842
+ closeModal(true);
4843
+ } else if (e.key === "Escape") {
4844
+ e.preventDefault();
4845
+ closeModal(false);
4712
4846
  }
4713
4847
  };
4714
- okBtn == null ? void 0 : okBtn.addEventListener("click", handleOk);
4715
- cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", handleCancel);
4848
+ block.addEventListener("click", (e) => {
4849
+ if (e.target === block) {
4850
+ closeModal(false);
4851
+ }
4852
+ });
4853
+ okBtn == null ? void 0 : okBtn.addEventListener("click", () => closeModal(true));
4854
+ cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", () => closeModal(false));
4855
+ closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", () => closeModal(false));
4716
4856
  window.addEventListener("keydown", handleKeyDown);
4717
4857
  });
4718
4858
  };
4719
- const warning$1 = "_warning_1o5ku_31";
4859
+ const visible = "_visible_1nxa7_19";
4860
+ const hidden = "_hidden_1nxa7_22";
4861
+ const warning$1 = "_warning_1nxa7_73";
4720
4862
  const styles$3 = {
4721
- "f-function-block-prompt": "_f-function-block-prompt_1o5ku_1",
4722
- "f-function-prompt": "_f-function-prompt_1o5ku_16",
4723
- "f-function-prompt-ico": "_f-function-prompt-ico_1o5ku_24",
4863
+ "f-function-block-prompt": "_f-function-block-prompt_1nxa7_1",
4864
+ visible,
4865
+ hidden,
4866
+ "f-function-prompt": "_f-function-prompt_1nxa7_27",
4867
+ "f-function-prompt-top": "_f-function-prompt-top_1nxa7_51",
4868
+ "f-function-prompt-ico": "_f-function-prompt-ico_1nxa7_57",
4724
4869
  warning: warning$1,
4725
- "f-function-prompt-inside": "_f-function-prompt-inside_1o5ku_36",
4726
- "f-function-prompt-header": "_f-function-prompt-header_1o5ku_43",
4727
- "f-function-prompt-body": "_f-function-prompt-body_1o5ku_51",
4728
- "f-function-prompt-footer": "_f-function-prompt-footer_1o5ku_66"
4870
+ "f-function-prompt-header": "_f-function-prompt-header_1nxa7_84",
4871
+ "f-function-prompt-body": "_f-function-prompt-body_1nxa7_102",
4872
+ "f-function-prompt-input": "_f-function-prompt-input_1nxa7_121",
4873
+ "f-function-prompt-footer": "_f-function-prompt-footer_1nxa7_142",
4874
+ "btn-cancel": "_btn-cancel_1nxa7_149",
4875
+ "btn-ok": "_btn-ok_1nxa7_171",
4876
+ "close-btn": "_close-btn_1nxa7_195"
4729
4877
  };
4730
4878
  function getValue(element) {
4731
4879
  if (element) {
@@ -4736,59 +4884,119 @@ function getValue(element) {
4736
4884
  }
4737
4885
  const fPrompt = ({ title: title2, body }) => {
4738
4886
  return new Promise((resolve) => {
4887
+ const blockId = "f-function-block-prompt-" + fGenerateUniqueId();
4739
4888
  window.document.body.insertAdjacentHTML(
4740
4889
  "afterbegin",
4741
4890
  `
4742
- <div class='${styles$3["f-function-block-prompt"]}' id='f-function-block-prompt'>
4891
+ <div class='${styles$3["f-function-block-prompt"]}' id='${blockId}'>
4743
4892
  <div class='${styles$3["f-function-prompt"]}'>
4744
- <div class='${styles$3["f-function-prompt-ico"]} ${styles$3.warning}'>
4745
- <svg width="28" height="28" viewBox="0 0 16 16">
4746
- <path d="M14 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-2.5a2 2 0 0 0-1.6.8L8 14.333 6.1 11.8a2 2 0 0 0-1.6-.8H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2.5a1 1 0 0 1 .8.4l1.9 2.533a1 1 0 0 0 1.6 0l1.9-2.533a1 1 0 0 1 .8-.4H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
4747
- <path d="M5 6a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
4748
- </svg>
4749
- </div>
4750
- <div class='${styles$3["f-function-prompt-inside"]}'>
4893
+ <div class='${styles$3["f-function-prompt-top"]}'>
4894
+ <div class='${styles$3["f-function-prompt-ico"]} ${styles$3.warning}'>
4895
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
4896
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
4897
+ </svg>
4898
+ </div>
4751
4899
  <div class='${styles$3["f-function-prompt-header"]}'>
4752
4900
  <h4>${title2 || ""}</h4>
4753
4901
  </div>
4754
- <div class='${styles$3["f-function-prompt-body"]}'>
4755
- <span>${body || ""}</span>
4756
- <input
4757
- type="text"
4758
- id="f-function-prompt-input"
4759
- class="form-control ${styles$3["f-function-prompt-input"]}"
4760
- />
4761
- </div>
4762
- <div class='${styles$3["f-function-prompt-footer"]}'>
4763
- <button
4764
- id="f-function-prompt-ok"
4765
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-success"]}'
4766
- onclick='document.querySelector("#f-function-block-prompt").remove()'
4767
- >
4768
- Ок
4769
- </button>
4770
- <button
4771
- id="f-function-prompt-cancellation"
4772
- class='${stylesBtn["btn"]} ${stylesBtn["btn-sm"]} ${stylesBtn["btn-danger"]}'
4773
- onclick='document.querySelector("#f-function-block-prompt").remove()'
4774
- >
4775
- Отменить
4776
- </button>
4777
- </div>
4902
+ <button type="button" aria-label="Закрыть" class="${styles$3["close-btn"]}" id="${blockId}-close-x">
4903
+ <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
4904
+ <line x1="18" y1="6" x2="6" y2="18"/>
4905
+ <line x1="6" y1="6" x2="18" y2="18"/>
4906
+ </svg>
4907
+ </button>
4908
+ </div>
4909
+ <div class='${styles$3["f-function-prompt-body"]}'>
4910
+ ${body ? `<span>${body}</span>` : ""}
4911
+ <input
4912
+ type="text"
4913
+ id="${blockId}-input"
4914
+ class="${styles$3["f-function-prompt-input"]}"
4915
+ placeholder="Введите значение..."
4916
+ autocomplete="off"
4917
+ />
4918
+ </div>
4919
+ <div class='${styles$3["f-function-prompt-footer"]}'>
4920
+ <button
4921
+ type="button"
4922
+ id="${blockId}-cancel"
4923
+ class='${styles$3["btn-cancel"]}'
4924
+ >
4925
+ Отменить
4926
+ </button>
4927
+ <button
4928
+ type="button"
4929
+ id="${blockId}-ok"
4930
+ class='${styles$3["btn-ok"]}'
4931
+ >
4932
+ Ок
4933
+ </button>
4778
4934
  </div>
4779
4935
  </div>
4780
4936
  </div>
4781
4937
  `
4782
4938
  );
4783
- const ok = document.querySelector("#f-function-prompt-ok");
4784
- const cancellation = document.querySelector("#f-function-prompt-cancellation");
4785
- const submit = document.querySelector("#f-function-prompt-input");
4786
- ok.addEventListener("click", function() {
4787
- resolve(getValue(submit));
4788
- });
4789
- cancellation.addEventListener("click", function() {
4939
+ const block = document.getElementById(blockId);
4940
+ const okBtn = document.getElementById(`${blockId}-ok`);
4941
+ const cancelBtn = document.getElementById(`${blockId}-cancel`);
4942
+ const closeXBtn = document.getElementById(`${blockId}-close-x`);
4943
+ const input = document.getElementById(`${blockId}-input`);
4944
+ if (!block) {
4790
4945
  resolve(null);
4946
+ return;
4947
+ }
4948
+ if (typeof requestAnimationFrame === "function") {
4949
+ requestAnimationFrame(() => {
4950
+ requestAnimationFrame(() => {
4951
+ block.classList.add(styles$3["visible"]);
4952
+ input == null ? void 0 : input.focus();
4953
+ });
4954
+ });
4955
+ } else {
4956
+ setTimeout(() => {
4957
+ block.classList.add(styles$3["visible"]);
4958
+ input == null ? void 0 : input.focus();
4959
+ }, 20);
4960
+ }
4961
+ let isClosing = false;
4962
+ const closeModal = (result) => {
4963
+ if (isClosing) return;
4964
+ isClosing = true;
4965
+ window.removeEventListener("keydown", handleKeyDown);
4966
+ block.classList.remove(styles$3["visible"]);
4967
+ block.classList.add(styles$3["hidden"]);
4968
+ let isCleanedUp = false;
4969
+ const cleanup = () => {
4970
+ if (isCleanedUp) return;
4971
+ isCleanedUp = true;
4972
+ block.remove();
4973
+ resolve(result);
4974
+ };
4975
+ block.addEventListener("transitionend", (e) => {
4976
+ if (e.target === block) {
4977
+ cleanup();
4978
+ }
4979
+ });
4980
+ setTimeout(cleanup, 280);
4981
+ };
4982
+ const handleKeyDown = (e) => {
4983
+ if (e.key === "Enter") {
4984
+ e.preventDefault();
4985
+ closeModal(getValue(input));
4986
+ } else if (e.key === "Escape") {
4987
+ e.preventDefault();
4988
+ closeModal(null);
4989
+ }
4990
+ };
4991
+ block.addEventListener("click", (e) => {
4992
+ if (e.target === block) {
4993
+ closeModal(null);
4994
+ }
4791
4995
  });
4996
+ okBtn == null ? void 0 : okBtn.addEventListener("click", () => closeModal(getValue(input)));
4997
+ cancelBtn == null ? void 0 : cancelBtn.addEventListener("click", () => closeModal(null));
4998
+ closeXBtn == null ? void 0 : closeXBtn.addEventListener("click", () => closeModal(null));
4999
+ window.addEventListener("keydown", handleKeyDown);
4792
5000
  });
4793
5001
  };
4794
5002
  class TSZip {
@@ -7786,34 +7994,61 @@ const fExportingHtmlToXlsx = async (data) => {
7786
7994
  }
7787
7995
  };
7788
7996
  const fInstallFormatCodeXlsx = (data) => installFormatCode(data);
7789
- const info = "_info_1da8u_75";
7790
- const error = "_error_1da8u_80";
7791
- const success = "_success_1da8u_85";
7792
- const warning = "_warning_1da8u_90";
7997
+ const info = "_info_1s6rj_93";
7998
+ const error = "_error_1s6rj_97";
7999
+ const success = "_success_1s6rj_101";
8000
+ const warning = "_warning_1s6rj_105";
7793
8001
  const styles$1 = {
7794
- "f-function-block-notification": "_f-function-block-notification_1da8u_51",
7795
- "f-function-notification": "_f-function-notification_1da8u_55",
7796
- "f-function-notification-ico": "_f-function-notification-ico_1da8u_67",
7797
- "info-notification": "_info-notification_1da8u_75",
7798
- "error-notification": "_error-notification_1da8u_80",
7799
- "success-notification": "_success-notification_1da8u_85",
7800
- "warning-notification": "_warning-notification_1da8u_90",
7801
- "f-function-notification-inside": "_f-function-notification-inside_1da8u_95",
7802
- "f-function-notification-header": "_f-function-notification-header_1da8u_101",
7803
- "f-function-notification-body": "_f-function-notification-body_1da8u_113",
7804
- "f-function-notification-visible": "_f-function-notification-visible_1da8u_127",
7805
- "notification-fade-in": "_notification-fade-in_1da8u_1",
7806
- "f-function-notification-hidden": "_f-function-notification-hidden_1da8u_133",
7807
- "notification-fade-out": "_notification-fade-out_1da8u_1",
7808
- "f-notification-progress": "_f-notification-progress_1da8u_169",
7809
- "f-notification-progress-bar": "_f-notification-progress-bar_1da8u_176",
7810
- "f-notification-progress-value": "_f-notification-progress-value_1da8u_183",
8002
+ "f-function-block-notification": "_f-function-block-notification_1s6rj_35",
8003
+ "f-function-notification-visible": "_f-function-notification-visible_1s6rj_45",
8004
+ "f-function-notification-hidden": "_f-function-notification-hidden_1s6rj_50",
8005
+ "f-function-notification": "_f-function-notification_1s6rj_45",
8006
+ "f-function-notification-ico": "_f-function-notification-ico_1s6rj_79",
8007
+ "info-notification": "_info-notification_1s6rj_93",
8008
+ "error-notification": "_error-notification_1s6rj_97",
8009
+ "success-notification": "_success-notification_1s6rj_101",
8010
+ "warning-notification": "_warning-notification_1s6rj_105",
8011
+ "f-function-notification-inside": "_f-function-notification-inside_1s6rj_109",
8012
+ "f-function-notification-header": "_f-function-notification-header_1s6rj_117",
8013
+ "f-function-notification-body": "_f-function-notification-body_1s6rj_136",
8014
+ "close-not": "_close-not_1s6rj_153",
8015
+ "f-notification-progress": "_f-notification-progress_1s6rj_179",
8016
+ "f-notification-progress-bar": "_f-notification-progress-bar_1s6rj_188",
8017
+ "f-notification-progress-value": "_f-notification-progress-value_1s6rj_193",
8018
+ "notification-progress-shrink": "_notification-progress-shrink_1s6rj_1",
7811
8019
  info,
7812
8020
  error,
7813
8021
  success,
7814
- warning,
7815
- "close-not": "_close-not_1da8u_205",
7816
- "notification-progress-animated": "_notification-progress-animated_1da8u_1"
8022
+ warning
8023
+ };
8024
+ const dismissNotificationElement = (el) => {
8025
+ if (!el || el.dataset.closing === "true") return;
8026
+ el.dataset.closing = "true";
8027
+ const cancelTimer = el._cancelTimer;
8028
+ if (typeof cancelTimer === "function") {
8029
+ cancelTimer();
8030
+ }
8031
+ el.classList.remove(styles$1["f-function-notification-visible"]);
8032
+ el.classList.add(styles$1["f-function-notification-hidden"]);
8033
+ let isCleanedUp = false;
8034
+ const cleanup = () => {
8035
+ var _a;
8036
+ if (isCleanedUp) return;
8037
+ isCleanedUp = true;
8038
+ if (el.parentNode) {
8039
+ el.parentNode.removeChild(el);
8040
+ }
8041
+ const blockNotification = document.querySelector("#block-notification");
8042
+ if (blockNotification && blockNotification.children.length === 0) {
8043
+ (_a = blockNotification.parentNode) == null ? void 0 : _a.removeChild(blockNotification);
8044
+ }
8045
+ };
8046
+ el.addEventListener("transitionend", (e) => {
8047
+ if (e.target === el) {
8048
+ cleanup();
8049
+ }
8050
+ });
8051
+ setTimeout(cleanup, 360);
7817
8052
  };
7818
8053
  const fNotification = ({
7819
8054
  title: title2,
@@ -7827,54 +8062,61 @@ const fNotification = ({
7827
8062
  let ico = "";
7828
8063
  switch (variant) {
7829
8064
  case "info":
7830
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>';
8065
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8066
+ <circle cx="12" cy="12" r="10"/>
8067
+ <line x1="12" y1="16" x2="12" y2="12"/>
8068
+ <line x1="12" y1="8" x2="12.01" y2="8"/>
8069
+ </svg>`;
7831
8070
  break;
7832
8071
  case "success":
7833
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 0 1 .02-.022z"/>';
8072
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8073
+ <circle cx="12" cy="12" r="10"/>
8074
+ <path d="m9 12 2 2 4-4"/>
8075
+ </svg>`;
7834
8076
  break;
7835
8077
  case "error":
7836
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>';
8078
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8079
+ <circle cx="12" cy="12" r="10"/>
8080
+ <line x1="15" y1="9" x2="9" y2="15"/>
8081
+ <line x1="9" y1="9" x2="15" y2="15"/>
8082
+ </svg>`;
7837
8083
  break;
7838
8084
  case "warning":
7839
- ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>';
8085
+ ico = `<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
8086
+ <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
8087
+ <line x1="12" y1="9" x2="12" y2="13"/>
8088
+ <line x1="12" y1="17" x2="12.01" y2="17"/>
8089
+ </svg>`;
7840
8090
  break;
7841
8091
  }
7842
- const arrBody = [];
7843
- body.split("\n").map((opt) => {
7844
- arrBody.push(
7845
- `<span>${opt}</span>`
7846
- );
7847
- });
8092
+ const arrBody = body.split("\n").map((opt) => `<span>${opt}</span>`);
7848
8093
  const randId = fGenerateUniqueId();
7849
- const idFuncBlockNot = "f-function-block-notification-" + randId;
8094
+ const elementId = id !== void 0 ? id : "f-function-block-notification-" + randId;
7850
8095
  const not = `
7851
- <div class='${styles$1["f-function-block-notification"]}' id="${id === void 0 ? idFuncBlockNot : id}">
8096
+ <div class='${styles$1["f-function-block-notification"]}' id="${elementId}">
7852
8097
  <div class='${styles$1["f-function-notification"]}'>
7853
8098
  <div class='${styles$1["f-function-notification-ico"]} ${styles$1[variant + "-notification"]}'>
7854
- <svg width="28" height="28" viewBox="0 0 16 16">
7855
- ${ico}
7856
- </svg>
8099
+ ${ico}
7857
8100
  </div>
7858
8101
  <div class='${styles$1["f-function-notification-inside"]}'>
7859
8102
  <div class='${styles$1["f-function-notification-header"]}'>
7860
8103
  <h4>${title2 !== void 0 ? title2 : ""}</h4>
7861
- ${buttonClose ? `<svg
7862
- width="25"
7863
- class="bi bi-x-lg primary ${styles$1["close-not"]}"
7864
- viewBox="0 0 16 16"
7865
- >
7866
- <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
7867
- </svg>` : ""}
8104
+ ${buttonClose ? `<button type="button" aria-label="Закрыть" class="${styles$1["close-not"]}">
8105
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
8106
+ <line x1="18" y1="6" x2="6" y2="18"/>
8107
+ <line x1="6" y1="6" x2="18" y2="18"/>
8108
+ </svg>
8109
+ </button>` : ""}
7868
8110
  </div>
7869
8111
  <div class='${styles$1["f-function-notification-body"]}'>
7870
8112
  ${arrBody.join("")}
7871
8113
  </div>
7872
8114
  </div>
7873
- ${timeSecClose ? `<div class="${styles$1["f-notification-progress"]}">
7874
- <div class="${styles$1["f-notification-progress-bar"]}">
7875
- <div class="${styles$1["f-notification-progress-value"]} ${styles$1[variant]}" id="f-notification-progress-value-${randId}" style="animation: notification-progress-animated ${timeSecClose}s linear;"/>
7876
- </div>
7877
- </div>` : ""}
8115
+ ${timeSecClose ? `<div class="${styles$1["f-notification-progress"]}">
8116
+ <div class="${styles$1["f-notification-progress-bar"]}">
8117
+ <div class="${styles$1["f-notification-progress-value"]} ${styles$1[variant]}" style="animation-duration: ${timeSecClose}s;"></div>
8118
+ </div>
8119
+ </div>` : ""}
7878
8120
  </div>
7879
8121
  </div>
7880
8122
  `;
@@ -7887,70 +8129,82 @@ const fNotification = ({
7887
8129
  }
7888
8130
  return blockNotification2;
7889
8131
  };
7890
- const removeEmptyNotificationBlock = () => {
7891
- var _a;
7892
- const blockNotification2 = document.querySelector("#block-notification");
7893
- if (blockNotification2 && blockNotification2.children.length === 0) {
7894
- (_a = blockNotification2.parentNode) == null ? void 0 : _a.removeChild(blockNotification2);
7895
- }
7896
- };
7897
8132
  const blockNotification = getOrCreateNotificationBlock();
7898
8133
  blockNotification.insertAdjacentHTML("afterbegin", not);
7899
8134
  blockNotification.scrollTo({ top: 0, behavior: "smooth" });
7900
- if (buttonClose) {
7901
- const el = window.document.querySelector(`#${idFuncBlockNot}`);
7902
- if (el !== null) {
7903
- const svgElement = el.querySelector(`.${styles$1["close-not"]}`);
7904
- if (svgElement !== null) {
7905
- svgElement.addEventListener("click", () => {
7906
- el.classList.remove(styles$1["f-function-notification-visible"]);
7907
- el.classList.add(styles$1["f-function-notification-hidden"]);
7908
- setTimeout(() => {
7909
- if (el.parentNode) {
7910
- el.parentNode.removeChild(el);
7911
- }
7912
- removeEmptyNotificationBlock();
7913
- }, 1e3);
8135
+ const el = window.document.querySelector(`#${elementId}`);
8136
+ if (el !== null) {
8137
+ el._dismiss = () => dismissNotificationElement(el);
8138
+ if (typeof requestAnimationFrame === "function") {
8139
+ requestAnimationFrame(() => {
8140
+ requestAnimationFrame(() => {
8141
+ el.classList.add(styles$1["f-function-notification-visible"]);
7914
8142
  });
7915
- }
8143
+ });
8144
+ } else {
8145
+ setTimeout(() => {
8146
+ el.classList.add(styles$1["f-function-notification-visible"]);
8147
+ }, 20);
7916
8148
  }
7917
- }
7918
- setTimeout(() => {
7919
- const el = window.document.querySelector(`#${idFuncBlockNot}`);
7920
- if (el !== null && el !== void 0) {
7921
- el.className += " " + styles$1["f-function-notification-visible"];
8149
+ if (buttonClose) {
8150
+ const closeBtn = el.querySelector(`.${styles$1["close-not"]}`);
8151
+ if (closeBtn !== null) {
8152
+ closeBtn.addEventListener("click", (e) => {
8153
+ e.stopPropagation();
8154
+ dismissNotificationElement(el);
8155
+ });
8156
+ }
7922
8157
  }
7923
- });
7924
- if (timeSecClose !== void 0) {
7925
- const el = window.document.querySelector(`#${idFuncBlockNot}`);
7926
- if (el !== null) {
7927
- setTimeout(() => {
7928
- el.className = styles$1["f-function-notification-hidden"];
7929
- }, (timeSecClose - 1) * 1e3);
7930
- setTimeout(() => {
7931
- if (el.parentNode) {
7932
- el.parentNode.removeChild(el);
8158
+ if (timeSecClose !== void 0 && timeSecClose > 0) {
8159
+ let timer = null;
8160
+ let startTime = Date.now();
8161
+ let remaining = timeSecClose * 1e3;
8162
+ const startTimer = () => {
8163
+ startTime = Date.now();
8164
+ timer = setTimeout(() => {
8165
+ dismissNotificationElement(el);
8166
+ }, remaining);
8167
+ };
8168
+ const pauseTimer = () => {
8169
+ if (timer) {
8170
+ clearTimeout(timer);
8171
+ timer = null;
8172
+ remaining -= Date.now() - startTime;
8173
+ }
8174
+ };
8175
+ const resumeTimer = () => {
8176
+ if (remaining > 0 && el.dataset.closing !== "true") {
8177
+ startTimer();
8178
+ }
8179
+ };
8180
+ el._cancelTimer = () => {
8181
+ if (timer) {
8182
+ clearTimeout(timer);
8183
+ timer = null;
7933
8184
  }
7934
- removeEmptyNotificationBlock();
7935
- }, timeSecClose * 1e3);
8185
+ el.removeEventListener("mouseenter", pauseTimer);
8186
+ el.removeEventListener("mouseleave", resumeTimer);
8187
+ };
8188
+ el.addEventListener("mouseenter", pauseTimer);
8189
+ el.addEventListener("mouseleave", resumeTimer);
8190
+ startTimer();
7936
8191
  }
7937
8192
  }
7938
- resolve(`#${idFuncBlockNot}`);
8193
+ resolve(`#${elementId}`);
7939
8194
  });
7940
8195
  };
7941
8196
  const fNotificationDelete = (id) => {
7942
- const el = window.document.querySelector(id);
8197
+ if (!id) return;
8198
+ const selector = id.startsWith("#") ? id : `#${id}`;
8199
+ let el = window.document.querySelector(selector);
8200
+ if (!el) {
8201
+ try {
8202
+ el = window.document.querySelector(id);
8203
+ } catch {
8204
+ }
8205
+ }
7943
8206
  if (!el) return;
7944
- const container2 = document.getElementById("block-notification");
7945
- if (!container2) return;
7946
- el.className = styles$1["f-function-notification-hidden"];
7947
- setTimeout(() => {
7948
- el.classList.remove(styles$1["f-function-notification-visible"]);
7949
- }, 1e3);
7950
- setTimeout(() => {
7951
- if (el.parentNode) el.parentNode.removeChild(el);
7952
- if (container2.children.length === 0) container2.remove();
7953
- }, 2e3);
8207
+ dismissNotificationElement(el);
7954
8208
  };
7955
8209
  const fConvertFileToBase64 = (file, deletePrefix = false) => {
7956
8210
  return new Promise((resolve, reject) => {