urfu-ui-kit-react 2.1.4 → 2.1.6

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.
Files changed (195) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +1 -1
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Accordion/Accordion.js +9 -8
  4. package/dist/components/Accordion/Accordion.types.d.ts +2 -0
  5. package/dist/components/Accordion/Accordion.types.d.ts.map +1 -1
  6. package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
  7. package/dist/components/BreadCrumbs/BreadCrumbs.js +20 -19
  8. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  9. package/dist/components/Calendar/Calendar.js +145 -144
  10. package/dist/components/Calendar/Calendar.types.d.ts +9 -4
  11. package/dist/components/Calendar/Calendar.types.d.ts.map +1 -1
  12. package/dist/components/Card/Card.d.ts.map +1 -1
  13. package/dist/components/Card/Card.js +37 -31
  14. package/dist/components/ColumnSettings/ColumnSettings.d.ts.map +1 -1
  15. package/dist/components/ColumnSettings/ColumnSettings.js +72 -72
  16. package/dist/components/Drawer/Drawer.d.ts +11 -0
  17. package/dist/components/Drawer/Drawer.d.ts.map +1 -0
  18. package/dist/components/Drawer/Drawer.js +87 -0
  19. package/dist/components/Drawer/Drawer.types.d.ts +44 -0
  20. package/dist/components/Drawer/Drawer.types.d.ts.map +1 -0
  21. package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
  22. package/dist/components/ErrorScreen/ErrorScreen.js +172 -138
  23. package/dist/components/FormField/FormField.d.ts +1 -1
  24. package/dist/components/FormField/FormField.d.ts.map +1 -1
  25. package/dist/components/FormField/FormField.js +42 -29
  26. package/dist/components/FormField/FormField.types.d.ts +6 -0
  27. package/dist/components/FormField/FormField.types.d.ts.map +1 -1
  28. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +22 -0
  29. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts.map +1 -0
  30. package/dist/components/InfiniteScroll/InfiniteScroll.js +27 -0
  31. package/dist/components/InputText/InputText.d.ts +39 -2
  32. package/dist/components/InputText/InputText.d.ts.map +1 -1
  33. package/dist/components/InputText/InputText.js +103 -94
  34. package/dist/components/InputText/InputText.types.d.ts +11 -0
  35. package/dist/components/InputText/InputText.types.d.ts.map +1 -1
  36. package/dist/components/InputTime/inputTimeKeyDown.d.ts +17 -2
  37. package/dist/components/InputTime/inputTimeKeyDown.d.ts.map +1 -1
  38. package/dist/components/InputTime/useInputTimeWheel.d.ts +13 -1
  39. package/dist/components/InputTime/useInputTimeWheel.d.ts.map +1 -1
  40. package/dist/components/Menu/Menu.d.ts.map +1 -1
  41. package/dist/components/Menu/Menu.js +54 -49
  42. package/dist/components/Modal/Modal.d.ts.map +1 -1
  43. package/dist/components/Modal/Modal.js +52 -49
  44. package/dist/components/Modal/Modal.types.d.ts +4 -2
  45. package/dist/components/Modal/Modal.types.d.ts.map +1 -1
  46. package/dist/components/Notification/Notification.d.ts.map +1 -1
  47. package/dist/components/Notification/Notification.js +97 -86
  48. package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
  49. package/dist/components/OfflineBanner/OfflineBanner.js +40 -32
  50. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  51. package/dist/components/Pagination/Pagination.js +61 -66
  52. package/dist/components/SearchSelect/SearchSelect.d.ts.map +1 -1
  53. package/dist/components/SearchSelect/SearchSelect.js +137 -134
  54. package/dist/components/TabPanels/TabPanels.d.ts +13 -0
  55. package/dist/components/TabPanels/TabPanels.d.ts.map +1 -0
  56. package/dist/components/TabPanels/TabPanels.js +8 -0
  57. package/dist/components/Table/Filter/Filter.d.ts.map +1 -1
  58. package/dist/components/Table/Filter/Filter.js +47 -47
  59. package/dist/components/Table/Filter/Filter.types.d.ts +2 -1
  60. package/dist/components/Table/Filter/Filter.types.d.ts.map +1 -1
  61. package/dist/components/Table/Filter/SelectFilter.d.ts.map +1 -1
  62. package/dist/components/Table/Filter/SelectFilter.js +9 -9
  63. package/dist/components/Table/Table.d.ts +1 -1
  64. package/dist/components/Table/Table.d.ts.map +1 -1
  65. package/dist/components/Table/Table.dataPipeline.d.ts +4 -3
  66. package/dist/components/Table/Table.dataPipeline.d.ts.map +1 -1
  67. package/dist/components/Table/Table.dataPipeline.js +64 -63
  68. package/dist/components/Table/Table.js +299 -299
  69. package/dist/components/Table/Table.rowTypes.d.ts +6 -0
  70. package/dist/components/Table/Table.rowTypes.d.ts.map +1 -0
  71. package/dist/components/Table/Table.types.d.ts +10 -3
  72. package/dist/components/Table/Table.types.d.ts.map +1 -1
  73. package/dist/components/Table/TableHead.d.ts +27 -19
  74. package/dist/components/Table/TableHead.d.ts.map +1 -1
  75. package/dist/components/Table/TableHead.js +1 -1
  76. package/dist/components/Table/TableMobileCard.d.ts +11 -11
  77. package/dist/components/Table/TableMobileCard.d.ts.map +1 -1
  78. package/dist/components/Table/TableMobileCard.js +81 -84
  79. package/dist/components/Table/TableMobileView.d.ts +7 -5
  80. package/dist/components/Table/TableMobileView.d.ts.map +1 -1
  81. package/dist/components/Table/TableRow.d.ts +10 -8
  82. package/dist/components/Table/TableRow.d.ts.map +1 -1
  83. package/dist/components/Table/TableRow.js +116 -112
  84. package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
  85. package/dist/components/Table/useTableVirtualization.d.ts +5 -5
  86. package/dist/components/Table/useTableVirtualization.d.ts.map +1 -1
  87. package/dist/components/Tabs/Tabs.d.ts +1 -1
  88. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  89. package/dist/components/Tabs/Tabs.js +110 -99
  90. package/dist/components/Tabs/Tabs.types.d.ts +29 -1
  91. package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
  92. package/dist/components/Tabs/distributeTabs.d.ts +6 -0
  93. package/dist/components/Tabs/distributeTabs.d.ts.map +1 -1
  94. package/dist/components/Tabs/tabsIndicator.d.ts +18 -0
  95. package/dist/components/Tabs/tabsIndicator.d.ts.map +1 -0
  96. package/dist/components/Tabs/tabsScroll.d.ts +20 -0
  97. package/dist/components/Tabs/tabsScroll.d.ts.map +1 -0
  98. package/dist/components/Tabs/useTabsIndicator.d.ts +6 -0
  99. package/dist/components/Tabs/useTabsIndicator.d.ts.map +1 -0
  100. package/dist/components/Tabs/useTabsIndicator.js +14 -0
  101. package/dist/components/Tabs/useTabsOverflow.d.ts +3 -1
  102. package/dist/components/Tabs/useTabsOverflow.d.ts.map +1 -1
  103. package/dist/components/Tabs/useTabsOverflow.js +33 -33
  104. package/dist/components/Tabs/useTabsScroll.d.ts +4 -0
  105. package/dist/components/Tabs/useTabsScroll.d.ts.map +1 -0
  106. package/dist/components/Tabs/useTabsScroll.js +17 -0
  107. package/dist/components/Textarea/Textarea.d.ts +22 -2
  108. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  109. package/dist/components/Textarea/Textarea.js +48 -43
  110. package/dist/components/Textarea/Textarea.types.d.ts +1 -0
  111. package/dist/components/Textarea/Textarea.types.d.ts.map +1 -1
  112. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  113. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  114. package/dist/components/Tooltip/Tooltip.js +150 -131
  115. package/dist/components/Tooltip/Tooltip.types.d.ts +7 -2
  116. package/dist/components/Tooltip/Tooltip.types.d.ts.map +1 -1
  117. package/dist/components/TreeView/TreeView.js +95 -95
  118. package/dist/components/TreeView/TreeView.types.d.ts +1 -1
  119. package/dist/components/TreeView/TreeView.types.d.ts.map +1 -1
  120. package/dist/components/VirtualList/VirtualList.d.ts +45 -0
  121. package/dist/components/VirtualList/VirtualList.d.ts.map +1 -0
  122. package/dist/components/VirtualList/VirtualList.js +62 -0
  123. package/dist/dev/index.js +1306 -584
  124. package/dist/dev/types/react/src/dev/index.d.ts +1 -1
  125. package/dist/dev/types/vanilla/src/core/motion.d.ts +41 -0
  126. package/dist/dev/types/vanilla/src/core/requestLog.d.ts +29 -0
  127. package/dist/dev/types/vanilla/src/dev/highlight.d.ts +32 -0
  128. package/dist/dev/types/vanilla/src/dev/intercept.d.ts +4 -1
  129. package/dist/dev/types/vanilla/src/dev/motionModes.d.ts +30 -0
  130. package/dist/dev/types/vanilla/src/dev/panelKit.d.ts +49 -0
  131. package/dist/dev/types/vanilla/src/dev/panelStyles.d.ts +7 -0
  132. package/dist/dev/types/vanilla/src/dev/rules.d.ts +31 -0
  133. package/dist/dev/types/vanilla/src/dev/store.d.ts +7 -4
  134. package/dist/dev/types/vanilla/src/dev/types.d.ts +14 -3
  135. package/dist/dev/types/vanilla/src/dev/viewModes.d.ts +22 -0
  136. package/dist/fonts/icons/urfu-ui-icon-font.eot +0 -0
  137. package/dist/fonts/icons/urfu-ui-icon-font.svg +2 -2
  138. package/dist/fonts/icons/urfu-ui-icon-font.ttf +0 -0
  139. package/dist/fonts/icons/urfu-ui-icon-font.woff +0 -0
  140. package/dist/fonts/icons/urfu-ui-icon-font.woff2 +0 -0
  141. package/dist/hooks/useCollapseMotion.d.ts +18 -0
  142. package/dist/hooks/useCollapseMotion.d.ts.map +1 -0
  143. package/dist/hooks/useCollapseMotion.js +9 -0
  144. package/dist/hooks/useDismiss.d.ts +7 -1
  145. package/dist/hooks/useDismiss.d.ts.map +1 -1
  146. package/dist/hooks/useDismiss.js +19 -17
  147. package/dist/hooks/useEnterMotion.d.ts +9 -0
  148. package/dist/hooks/useEnterMotion.d.ts.map +1 -0
  149. package/dist/hooks/useEnterMotion.js +10 -0
  150. package/dist/hooks/useForwardedRef.d.ts +8 -0
  151. package/dist/hooks/useForwardedRef.d.ts.map +1 -0
  152. package/dist/hooks/useForwardedRef.js +8 -0
  153. package/dist/hooks/useInfiniteScroll.d.ts +27 -0
  154. package/dist/hooks/useInfiniteScroll.d.ts.map +1 -0
  155. package/dist/hooks/useInfiniteScroll.js +13 -0
  156. package/dist/hooks/useMountTransition.d.ts +1 -1
  157. package/dist/hooks/useMountTransition.d.ts.map +1 -1
  158. package/dist/hooks/useMountTransition.js +14 -13
  159. package/dist/hooks/useVirtualList.d.ts +34 -0
  160. package/dist/hooks/useVirtualList.d.ts.map +1 -0
  161. package/dist/hooks/useVirtualList.js +21 -0
  162. package/dist/index.d.ts +15 -1
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/shared/collapseMotion.d.ts +32 -0
  165. package/dist/shared/collapseMotion.d.ts.map +1 -0
  166. package/dist/shared/infiniteScroll.d.ts +42 -0
  167. package/dist/shared/infiniteScroll.d.ts.map +1 -0
  168. package/dist/shared/kitCopy.js +1 -1
  169. package/dist/shared/linkClick.d.ts +7 -0
  170. package/dist/shared/linkClick.d.ts.map +1 -0
  171. package/dist/shared/motion.d.ts +42 -0
  172. package/dist/shared/motion.d.ts.map +1 -0
  173. package/dist/shared/popupTransition.d.ts +10 -2
  174. package/dist/shared/popupTransition.d.ts.map +1 -1
  175. package/dist/shared/popupTransition.js +6 -5
  176. package/dist/shared/virtualList.d.ts +103 -0
  177. package/dist/shared/virtualList.d.ts.map +1 -0
  178. package/dist/style-no-fonts.css +1 -1
  179. package/dist/style.css +1 -1
  180. package/dist/style.layer.css +2 -2
  181. package/dist/style.shell.css +5 -5
  182. package/dist/urfu-ui-kit-react.js +53 -45
  183. package/dist/utils/describeError.d.ts +12 -1
  184. package/dist/utils/describeError.d.ts.map +1 -1
  185. package/dist/vanilla/core/collapseMotion.js +58 -0
  186. package/dist/vanilla/core/describeError.js +172 -115
  187. package/dist/vanilla/core/distributeTabs.js +23 -20
  188. package/dist/vanilla/core/infiniteScroll.js +79 -0
  189. package/dist/vanilla/core/linkClick.js +2 -0
  190. package/dist/vanilla/core/motion.js +29 -0
  191. package/dist/vanilla/core/requestLog.js +40 -0
  192. package/dist/vanilla/core/tabsIndicator.js +41 -0
  193. package/dist/vanilla/core/tabsScroll.js +29 -0
  194. package/dist/vanilla/core/virtualList.js +213 -0
  195. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
- const A = {
1
+ import { startRequestLog$u as j, getRequestLog$u as k } from "./requestLog.js";
2
+ const N = {
2
3
  auth: { title: "Требуется вход", text: "Сессия закончилась. Войдите снова — данные на странице сохранятся.", action: "login", actionLabel: "Войти снова" },
3
4
  forbidden: { title: "Нет доступа", text: "У вашей роли нет прав на это действие или раздел. Если доступ нужен для работы, обратитесь к руководителю подразделения.", action: "home", actionLabel: "На главную" },
4
5
  notFound: { title: "Страница не найдена", text: "Возможно, её удалили или в адресе ошибка.", action: "home", actionLabel: "На главную" },
@@ -12,166 +13,169 @@ const A = {
12
13
  parsing: { title: "Сервер вернул неожиданный ответ", text: "Попробуйте ещё раз. Если ошибка повторится, обратитесь в техническую поддержку.", action: "retry", actionLabel: "Повторить" },
13
14
  render: { title: "Что-то пошло не так", text: "Не удалось показать страницу. Обновите её — если ошибка повторится, обратитесь в техническую поддержку.", action: "reload", actionLabel: "Обновить страницу" }
14
15
  };
15
- let m = { ...A };
16
- function K(t) {
17
- const n = m;
18
- m = { ...m };
16
+ let p = { ...N };
17
+ function nt(t) {
18
+ const n = p;
19
+ p = { ...p };
19
20
  for (const [e, o] of Object.entries(t))
20
- m[e] = { ...m[e], ...o };
21
+ p[e] = { ...p[e], ...o };
21
22
  return () => {
22
- m = n;
23
+ p = n;
23
24
  };
24
25
  }
25
- const S = /failed to fetch|network\s?error|network request failed|load failed|connection appears to be offline/i;
26
- function b(t) {
26
+ const q = /failed to fetch|network\s?error|network request failed|load failed|connection appears to be offline/i;
27
+ function $(t) {
27
28
  return t === 401 ? "auth" : t === 403 ? "forbidden" : t === 404 || t === 410 ? "notFound" : t === 400 || t === 422 ? "invalid" : t === 409 || t === 412 ? "conflict" : t === 413 ? "tooLarge" : t === 429 ? "rateLimit" : t === 408 || t === 504 ? "timeout" : "server";
28
29
  }
29
- const f = (t) => typeof t == "object" && t !== null;
30
- function R(t) {
31
- const n = t, e = f(n.response) ? n.response : void 0;
32
- return [n.status, n.statusCode, e == null ? void 0 : e.status].find((i) => typeof i == "number");
30
+ const d = (t) => typeof t == "object" && t !== null;
31
+ function L(t) {
32
+ const n = t, e = d(n.response) ? n.response : void 0;
33
+ return [n.status, n.statusCode, e == null ? void 0 : e.status].find((r) => typeof r == "number");
33
34
  }
34
35
  const h = (t) => [t.message, t.error].find((n) => typeof n == "string");
35
- function F(t) {
36
+ function B(t) {
36
37
  const n = typeof t.name == "string" ? t.name : "", e = typeof t.code == "string" ? t.code : "", o = h(t) ?? "";
37
38
  if (n === "AbortError" || n === "CanceledError" || e === "ERR_CANCELED" || /^AbortError\b/.test(o)) return "aborted";
38
39
  if (n === "TimeoutError" || e === "ECONNABORTED" || e === "ETIMEDOUT" || /timeout of \d+ms exceeded/i.test(o)) return "timeout";
39
- if (e === "ERR_NETWORK" || t.status === "FETCH_ERROR" || S.test(o)) return "network";
40
+ if (e === "ERR_NETWORK" || t.status === "FETCH_ERROR" || q.test(o)) return "network";
40
41
  }
41
- function I(t) {
42
+ function C(t) {
42
43
  if (typeof t == "string") return t.trim() || void 0;
43
- if (f(t))
44
+ if (d(t))
44
45
  for (const n of ["message", "detail", "title", "error_description", "error"]) {
45
46
  const e = t[n];
46
47
  if (typeof e == "string" && e.trim()) return e.trim();
47
48
  if (Array.isArray(e) && e.every((o) => typeof o == "string") && e.length) return e.join("; ");
48
49
  }
49
50
  }
50
- function j(t) {
51
- if (f(t))
51
+ function D(t) {
52
+ if (d(t))
52
53
  for (const n of ["requestId", "request_id", "traceId", "trace_id", "correlationId"]) {
53
54
  const e = t[n];
54
55
  if (typeof e == "string" && e) return e;
55
56
  }
56
57
  }
57
- function T(t) {
58
+ function A(t) {
58
59
  return !t || t.length > 300 || /\n\s+at |<\/?[a-z][\s\S]*>|Exception|Error:|ОШИБКА:|SQLSTATE|^[A-Z_]+$/.test(t) ? !1 : /[А-Яа-яЁё]/.test(t);
59
60
  }
60
- function w(t) {
61
- if (typeof t == "number") return { group: b(t), code: t };
62
- if (typeof Response < "u" && t instanceof Response) return { group: b(t.status), code: t.status };
63
- if (!f(t)) return { group: "server", code: null };
64
- if (R(t) === void 0) {
65
- const i = typeof t.status == "string" ? t.status : void 0;
66
- if (i === "TIMEOUT_ERROR") return { group: "timeout", code: null, status: i, message: h(t) };
67
- const r = F(t);
68
- if (r) return { group: r, code: null, status: i, message: h(t) };
69
- if (t instanceof Error && i === void 0) return { group: "render", code: null, message: t.message };
61
+ function O(t) {
62
+ if (typeof t == "number") return { group: $(t), code: t };
63
+ if (typeof Response < "u" && t instanceof Response) return { group: $(t.status), code: t.status };
64
+ if (!d(t)) return { group: "server", code: null };
65
+ if (L(t) === void 0) {
66
+ const r = typeof t.status == "string" ? t.status : void 0;
67
+ if (r === "TIMEOUT_ERROR") return { group: "timeout", code: null, status: r, message: h(t) };
68
+ const i = B(t);
69
+ if (i) return { group: i, code: null, status: r, message: h(t) };
70
+ if (t instanceof Error && r === void 0) return { group: "render", code: null, message: t.message };
70
71
  }
71
- const n = f(t.response) ? t.response : void 0, e = R(t) ?? t.status, o = "data" in t ? t.data : n == null ? void 0 : n.data;
72
- if (typeof e == "number") return { group: b(e), code: e, body: o, message: I(o) };
72
+ const n = d(t.response) ? t.response : void 0, e = L(t) ?? t.status, o = "data" in t ? t.data : n == null ? void 0 : n.data;
73
+ if (typeof e == "number") return { group: $(e), code: e, body: o, message: C(o) };
73
74
  if (e === "PARSING_ERROR") {
74
- const i = typeof t.originalStatus == "number" ? t.originalStatus : null, r = i !== null && i >= 400 ? i : null;
75
- return { group: r ? b(r) : "parsing", code: r, status: e, body: o, message: typeof t.error == "string" ? t.error : void 0 };
75
+ const r = typeof t.originalStatus == "number" ? t.originalStatus : null, i = r !== null && r >= 400 ? r : null;
76
+ return { group: i ? $(i) : "parsing", code: i, status: e, body: o, message: typeof t.error == "string" ? t.error : void 0 };
76
77
  }
77
78
  return { group: "server", code: null, status: typeof e == "string" ? e : void 0, message: h(t) };
78
79
  }
79
- function N(t) {
80
+ function P(t) {
80
81
  return t === "forbidden" || t === "auth" ? "forbidden" : t === "notFound" ? "notFound" : "serverError";
81
82
  }
82
- function $(t, n = {}) {
83
- const e = w(t);
83
+ function w(t, n = {}) {
84
+ const e = O(t);
84
85
  let o = e.group;
85
86
  o === "notFound" && n.notFoundIsPage === !1 && (o = "server");
86
- const i = {
87
+ const r = {
87
88
  code: e.code,
88
89
  status: e.status,
89
90
  method: n.method,
90
91
  url: n.url,
91
92
  serverMessage: e.message,
92
- requestId: j(e.body),
93
+ requestId: D(e.body),
93
94
  time: (/* @__PURE__ */ new Date()).toISOString()
94
95
  };
95
96
  if (o === "aborted")
96
- return { group: o, code: null, variant: "serverError", title: "", text: "", action: "none", actionLabel: "", message: "", details: i };
97
- const r = m[o], a = n.operation ? `Не удалось ${n.operation}` : n.subject ? `Не удалось загрузить ${n.subject}` : void 0, l = (a && (o === "server" || o === "parsing") ? a : void 0) ?? r.title, g = T(e.message) ? e.message : void 0, v = a && (o === "network" || o === "timeout") ? `${a}. ${r.text}` : void 0, y = g ?? v ?? r.text, E = g ? `${l}. ${g}` : l;
98
- return { group: o, code: e.code, variant: N(o), title: l, text: y, action: r.action, actionLabel: r.actionLabel, message: E, details: i };
97
+ return { group: o, code: null, variant: "serverError", title: "", text: "", action: "none", actionLabel: "", message: "", details: r };
98
+ const i = p[o], a = n.operation ? `Не удалось ${n.operation}` : n.subject ? `Не удалось загрузить ${n.subject}` : void 0, f = (a && (o === "server" || o === "parsing") ? a : void 0) ?? i.title, m = A(e.message) ? e.message : void 0, v = a && (o === "network" || o === "timeout") ? `${a}. ${i.text}` : void 0, y = m ?? v ?? i.text, E = m ? `${f}. ${m}` : f;
99
+ return { group: o, code: e.code, variant: P(o), title: f, text: y, action: i.action, actionLabel: i.actionLabel, message: E, details: r };
99
100
  }
100
- const k = ["field", "property", "path", "name", "key"], P = ["message", "msg", "detail", "error"];
101
- function _(t) {
101
+ const U = ["field", "property", "path", "name", "key"], W = ["message", "msg", "detail", "error"];
102
+ function R(t) {
102
103
  if (typeof t == "string") return t.trim() || void 0;
103
104
  if (Array.isArray(t)) {
104
105
  const n = t.filter((e) => typeof e == "string" && !!e.trim());
105
106
  return n.length ? n.join("; ") : void 0;
106
107
  }
107
108
  }
108
- function C(t) {
109
- for (const n of k) {
109
+ function M(t) {
110
+ for (const n of U) {
110
111
  const e = t[n];
111
112
  if (typeof e == "string" && e) return e;
112
113
  if (Array.isArray(e) && e.length && e.every((o) => typeof o == "string" || typeof o == "number")) return e.join(".");
113
114
  }
114
115
  }
115
- function B(t) {
116
- for (const n of P) {
117
- const e = _(t[n]);
116
+ function K(t) {
117
+ for (const n of W) {
118
+ const e = R(t[n]);
118
119
  if (e) return e;
119
120
  }
120
- return f(t.constraints) ? _(Object.values(t.constraints)) : void 0;
121
+ return d(t.constraints) ? R(Object.values(t.constraints)) : void 0;
121
122
  }
122
- function X(t, n = {}) {
123
- const { requiredText: e = "Заполните обязательное поле", ...o } = n, i = w(t), r = i.group === "invalid" && f(i.body) ? i.body : void 0, a = /* @__PURE__ */ new Map(), p = [], l = (s, d) => {
124
- const u = a.get(s);
125
- a.set(s, u && u !== d ? `${u}; ${d}` : d);
123
+ function ot(t, n = {}) {
124
+ const { requiredText: e = "Заполните обязательное поле", ...o } = n, r = O(t), i = r.group === "invalid" && d(r.body) ? r.body : void 0, a = /* @__PURE__ */ new Map(), l = [], f = (u, g) => {
125
+ const c = a.get(u);
126
+ a.set(u, c && c !== g ? `${c}; ${g}` : g);
126
127
  };
127
- let g = !1;
128
- if (r && Array.isArray(r.errors)) {
129
- g = !0;
130
- for (const s of r.errors) {
131
- if (typeof s == "string") {
132
- s.trim() && p.push(s.trim());
128
+ let m = !1;
129
+ if (i && Array.isArray(i.errors)) {
130
+ m = !0;
131
+ for (const u of i.errors) {
132
+ if (typeof u == "string") {
133
+ u.trim() && l.push(u.trim());
133
134
  continue;
134
135
  }
135
- if (!f(s)) continue;
136
- const d = C(s), u = B(s);
137
- d ? l(d, u ?? e) : u && p.push(u);
136
+ if (!d(u)) continue;
137
+ const g = M(u), c = K(u);
138
+ g ? f(g, c ?? e) : c && l.push(c);
138
139
  }
139
- } else if (r && f(r.errors)) {
140
- g = !0;
141
- for (const [s, d] of Object.entries(r.errors)) {
142
- const u = _(d);
143
- u && l(s, u);
140
+ } else if (i && d(i.errors)) {
141
+ m = !0;
142
+ for (const [u, g] of Object.entries(i.errors)) {
143
+ const c = R(g);
144
+ c && f(u, c);
144
145
  }
145
146
  }
146
- if (r && Array.isArray(r.missingFields))
147
- for (const s of r.missingFields)
148
- typeof s == "string" && s && !a.has(s) && l(s, e);
147
+ if (i && Array.isArray(i.missingFields))
148
+ for (const u of i.missingFields)
149
+ typeof u == "string" && u && !a.has(u) && f(u, e);
149
150
  const v = Object.fromEntries(a), y = [...a.keys()];
150
- if (!y.length) return { fields: v, message: $(t, o).message };
151
- if (!g)
152
- return { fields: v, firstField: y[0], message: $(t, o).message };
153
- const E = p.filter(T), O = E.length ? E.join("; ") : p.length ? $(t, o).title : "";
154
- return { fields: v, firstField: y[0], message: O };
155
- }
156
- const D = "support@urfu.ru", Y = "Написать в техподдержку";
157
- let c = {};
158
- function H(t) {
159
- const n = c;
160
- return c = { ...c, ...t }, () => {
161
- c = n;
151
+ if (!y.length) return { fields: v, message: w(t, o).message };
152
+ if (!m)
153
+ return { fields: v, firstField: y[0], message: w(t, o).message };
154
+ const E = l.filter(A), I = E.length ? E.join("; ") : l.length ? w(t, o).title : "";
155
+ return { fields: v, firstField: y[0], message: I };
156
+ }
157
+ const Y = "support@urfu.ru", rt = "Написать в техподдержку";
158
+ let s = {}, b = null;
159
+ function _() {
160
+ s.diagnostics && !b ? b = j() : !s.diagnostics && b && (b(), b = null);
161
+ }
162
+ function it(t) {
163
+ const n = s;
164
+ return s = { ...s, ...t }, _(), () => {
165
+ s = n, _();
162
166
  };
163
167
  }
164
- function Q() {
165
- return c;
168
+ function st() {
169
+ return s;
166
170
  }
167
- const x = "__qiankun_microapp_wrapper_for_";
168
- function L() {
169
- if (c.service) return c.service;
171
+ const T = "__qiankun_microapp_wrapper_for_";
172
+ function S() {
173
+ if (s.service) return s.service;
170
174
  if (typeof document > "u") return;
171
- const t = document.querySelector(`[id^="${x}"]`);
172
- return t ? t.id.slice(x.length).replace(/_+$/, "").replace(/_/g, "-") : typeof location > "u" ? void 0 : location.host;
175
+ const t = document.querySelector(`[id^="${T}"]`);
176
+ return t ? t.id.slice(T.length).replace(/_+$/, "").replace(/_/g, "-") : typeof location > "u" ? void 0 : location.host;
173
177
  }
174
- function M(t) {
178
+ function X(t) {
175
179
  const n = [
176
180
  [/YaBrowser\/(\d+)/, "Яндекс Браузер"],
177
181
  [/Edg\/(\d+)/, "Edge"],
@@ -181,12 +185,12 @@ function M(t) {
181
185
  [/Version\/(\d+)[\d.]* .*Safari/, "Safari"]
182
186
  ];
183
187
  for (const [e, o] of n) {
184
- const i = t.match(e);
185
- if (i) return `${o} ${i[1]}`;
188
+ const r = t.match(e);
189
+ if (r) return `${o} ${r[1]}`;
186
190
  }
187
191
  return t.slice(0, 120);
188
192
  }
189
- function U(t) {
193
+ function H(t) {
190
194
  if (/Windows NT 10/.test(t)) return "Windows 10 или 11";
191
195
  if (/Windows NT 6\.3/.test(t)) return "Windows 8.1";
192
196
  if (/Windows NT 6\.1/.test(t)) return "Windows 7";
@@ -195,7 +199,7 @@ function U(t) {
195
199
  const e = t.match(/(?:iPhone|iPad).*OS ([\d_]+)/);
196
200
  return e ? `iOS ${e[1].replace(/_/g, ".")}` : /Mac OS X/.test(t) ? "macOS" : /Linux/.test(t) ? "Linux" : "не определена";
197
201
  }
198
- function W(t) {
202
+ function Q(t) {
199
203
  const n = new Date(t);
200
204
  return Number.isNaN(n.getTime()) ? t : `${n.toLocaleString("ru-RU", {
201
205
  timeZone: "Asia/Yekaterinburg",
@@ -207,37 +211,90 @@ function W(t) {
207
211
  second: "2-digit"
208
212
  })} по Екатеринбургу (${t})`;
209
213
  }
210
- function q(t) {
211
- const { details: n } = t, e = typeof window < "u", o = typeof navigator > "u" ? "" : navigator.userAgent, i = L(), r = e && !!window.__POWERED_BY_QIANKUN__;
214
+ function V(t) {
215
+ return new Date(t).toLocaleTimeString("ru-RU", { timeZone: "Asia/Yekaterinburg", hour12: !1 });
216
+ }
217
+ function Z(t) {
218
+ return `${V(t.time)} ${t.status ? t.status : "—"} ${t.path} ${t.duration} мс`;
219
+ }
220
+ function G() {
221
+ if (typeof document > "u" || typeof window > "u") return;
222
+ const t = document.documentElement, n = t.getAttribute("data-u-viewport");
223
+ if (n && t.getAttribute("data-u-responsive") === "urfu") return n;
224
+ const e = window.innerWidth;
225
+ return `${e <= 576 ? "mobile" : e <= 900 ? "tablet" : "desktop"} (по ширине окна, шкала urfu не включена)`;
226
+ }
227
+ function x() {
228
+ return "2.1.6";
229
+ }
230
+ function z(t) {
231
+ if (!(!s.roles && !t))
232
+ try {
233
+ const n = s.roles ? s.roles() : t ?? [];
234
+ return `Роли: ${n.length ? n.join(", ") : "нет"}`;
235
+ } catch {
236
+ return "Роли: не удалось получить";
237
+ }
238
+ }
239
+ function J() {
240
+ var n, e;
241
+ if (typeof document > "u") return null;
242
+ const t = document.defaultView;
243
+ try {
244
+ return ((e = (n = t == null ? void 0 : t[/* @__PURE__ */ Symbol.for("urfu-ui-kit.dev-panel")]) == null ? void 0 : n.diagnostics) == null ? void 0 : e.call(n)) ?? null;
245
+ } catch {
246
+ return null;
247
+ }
248
+ }
249
+ function tt(t, n) {
250
+ const e = G(), o = z(n == null ? void 0 : n.roles);
251
+ if (!t)
252
+ return ["Дополнительные сведения: " + [`кит ${x()}`, e && `брейкпоинт ${e.split(" ")[0]}`, o && o.charAt(0).toLowerCase() + o.slice(1)].filter(Boolean).join("; ")];
253
+ const r = n ? n.requests : k();
254
+ return [
255
+ "",
256
+ "Дополнительные сведения:",
257
+ `Версия кита: ${x()}`,
258
+ e ? `Брейкпоинт: ${e}` : void 0,
259
+ o,
260
+ ...r.length ? ["Последние запросы (время по Екатеринбургу):", ...r.map(Z)] : ["Последние запросы: нет"]
261
+ ];
262
+ }
263
+ function ut(t) {
264
+ return F(t, !0);
265
+ }
266
+ function F(t, n) {
267
+ const { details: e } = t, o = typeof window < "u", r = typeof navigator > "u" ? "" : navigator.userAgent, i = S(), a = o && !!window.__POWERED_BY_QIANKUN__, l = s.diagnostics === void 0 ? J() : null;
212
268
  return [
213
269
  `Ошибка: ${t.title}`,
214
- n.code !== null ? `Код: ${n.code}` : n.status ? `Статус: ${n.status}` : "Код: нет ответа сервера",
215
- i ? `Сервис: ${[i, c.version].filter(Boolean).join(", ")}` : void 0,
216
- e ? `Где открыт: ${r ? "в личном кабинете" : "отдельно, без личного кабинета"}` : void 0,
217
- e ? `Страница: ${window.location.href}` : void 0,
218
- n.method || n.url ? `Запрос: ${[n.method, n.url].filter(Boolean).join(" ")}` : void 0,
219
- n.requestId ? `ID запроса: ${n.requestId}` : void 0,
220
- n.serverMessage ? `Сообщение сервера: ${n.serverMessage}` : void 0,
221
- `Время: ${W(n.time)}`,
222
- o ? `Браузер: ${M(o)}` : void 0,
223
- o ? `Система: ${U(o)}` : void 0,
224
- e ? `Окно: ${window.innerWidth}×${window.innerHeight}, масштаб ${Math.round((window.devicePixelRatio || 1) * 100)}%` : void 0,
270
+ e.code !== null ? `Код: ${e.code}` : e.status ? `Статус: ${e.status}` : "Код: нет ответа сервера",
271
+ i ? `Сервис: ${[i, s.version].filter(Boolean).join(", ")}` : void 0,
272
+ o ? `Где открыт: ${a ? "в личном кабинете" : "отдельно, без личного кабинета"}` : void 0,
273
+ o ? `Страница: ${window.location.href}` : void 0,
274
+ e.method || e.url ? `Запрос: ${[e.method, e.url].filter(Boolean).join(" ")}` : void 0,
275
+ e.requestId ? `ID запроса: ${e.requestId}` : void 0,
276
+ e.serverMessage ? `Сообщение сервера: ${e.serverMessage}` : void 0,
277
+ `Время: ${Q(e.time)}`,
278
+ r ? `Браузер: ${X(r)}` : void 0,
279
+ r ? `Система: ${H(r)}` : void 0,
280
+ o ? `Окно: ${window.innerWidth}×${window.innerHeight}, масштаб ${Math.round((window.devicePixelRatio || 1) * 100)}%` : void 0,
225
281
  typeof navigator < "u" && navigator.onLine === !1 ? "Сеть: браузер без связи" : void 0,
226
- c.user ? `Пользователь: ${c.user}` : void 0
227
- ].filter(Boolean).join(`
282
+ s.user ? `Пользователь: ${s.user}` : void 0,
283
+ ...s.diagnostics || l ? tt(n, l) : []
284
+ ].filter((f) => f !== void 0).join(`
228
285
  `);
229
286
  }
230
- function G(t, n = D) {
231
- const e = t.code !== null ? ` (${t.code})` : "", o = L(), i = `Ошибка в личном кабинете: ${o ? `${o} — ` : ""}${t.title}${e}`, r = [
287
+ function at(t, n = Y) {
288
+ const e = t.code !== null ? ` (${t.code})` : "", o = S(), r = `Ошибка в личном кабинете: ${o ? `${o} — ` : ""}${t.title}${e}`, i = [
232
289
  "Здравствуйте!",
233
290
  "",
234
291
  "Что я делал(а), когда появилась ошибка:",
235
292
  "",
236
293
  "",
237
294
  "Подробности для технической поддержки:",
238
- q(t)
295
+ F(t, !1)
239
296
  ].join(`\r
240
297
  `);
241
- return `mailto:${n}?subject=${encodeURIComponent(i)}&body=${encodeURIComponent(r)}`;
298
+ return `mailto:${n}?subject=${encodeURIComponent(r)}&body=${encodeURIComponent(i)}`;
242
299
  }
243
- export { A as DEFAULT_ERROR_TEXTS$u, D as DEFAULT_SUPPORT_EMAIL$u, Y as DEFAULT_SUPPORT_LABEL$u, H as configureErrorReport$u, K as configureErrorTexts$u, $ as describeError$u, X as describeFieldErrors$u, q as formatErrorDetails$u, Q as getErrorReportConfig$u, T as isHumanMessage$u, G as supportMailto$u };
300
+ export { N as DEFAULT_ERROR_TEXTS$u, Y as DEFAULT_SUPPORT_EMAIL$u, rt as DEFAULT_SUPPORT_LABEL$u, it as configureErrorReport$u, nt as configureErrorTexts$u, w as describeError$u, ot as describeFieldErrors$u, ut as formatErrorDetails$u, st as getErrorReportConfig$u, A as isHumanMessage$u, at as supportMailto$u };
@@ -1,25 +1,28 @@
1
- const O = 0.4, A = (e, o, a, h, p, l, u) => {
2
- const b = e.length + Number(u), f = e.reduce((t, s) => t + o[s], 0) + (u ? l : 0) + Math.max(0, b - 1) * p - h;
3
- if (f <= 0.01) return 0;
4
- const c = e.reduce((t, s) => t + (a[s] ?? 0), 0);
5
- return c > 0 ? Math.min(1, (f + 0.5) / c) : 0;
6
- }, I = (e, o, a, h, p, l, u = !1, b = []) => {
7
- const r = (n) => n <= a + 0.01, f = (n) => o[n] - (u ? 0 : b[n] ?? 0), c = (n, m) => {
8
- const g = u ? Math.max(0, ...n.map((i) => o[i])) * n.length : n.reduce((i, N) => i + f(N), 0), x = n.length + Number(m);
9
- return g + (m ? p : 0) + Math.max(0, x - 1) * h;
1
+ const T = 0.4, O = (n, u, o, l, r, c, f) => {
2
+ const b = n.length + Number(f), h = n.reduce((t, s) => t + u[s], 0) + (f ? c : 0) + Math.max(0, b - 1) * r - l;
3
+ if (h <= 0.01) return 0;
4
+ const a = n.reduce((t, s) => t + (o[s] ?? 0), 0);
5
+ return a > 0 ? Math.min(1, (h + 0.5) / a) : 0;
6
+ }, q = (n, u, o, l, r) => {
7
+ const c = O(n, u, o, l, r, 0, !1);
8
+ return c < 1 ? c : 0;
9
+ }, z = (n, u, o, l, r, c, f = !1, b = []) => {
10
+ const m = (e) => e <= o + 0.01, h = (e) => u[e] - (f ? 0 : b[e] ?? 0), a = (e, p) => {
11
+ const g = f ? Math.max(0, ...e.map((i) => u[i])) * e.length : e.reduce((i, N) => i + h(N), 0), x = e.length + Number(p);
12
+ return g + (p ? r : 0) + Math.max(0, x - 1) * l;
10
13
  };
11
- if (a <= 0 || r(c(e, !1)))
12
- return { visible: e, overflow: [] };
14
+ if (o <= 0 || m(a(n, !1)))
15
+ return { visible: n, overflow: [] };
13
16
  const t = [];
14
- for (const n of e) {
15
- if (!r(c([...t, n], !0))) break;
16
- t.push(n);
17
+ for (const e of n) {
18
+ if (!m(a([...t, e], !0))) break;
19
+ t.push(e);
17
20
  }
18
- const s = e.includes(l) ? l : e[0];
19
- for (s !== void 0 && !t.includes(s) && (t.length && t.pop(), t.push(s)); t.length > 1 && !r(c(t, !0)); ) {
20
- const n = t.map((m) => m !== s).lastIndexOf(!0);
21
- t.splice(n, 1);
21
+ const s = n.includes(c) ? c : n[0];
22
+ for (s !== void 0 && !t.includes(s) && (t.length && t.pop(), t.push(s)); t.length > 1 && !m(a(t, !0)); ) {
23
+ const e = t.map((p) => p !== s).lastIndexOf(!0);
24
+ t.splice(e, 1);
22
25
  }
23
- return { visible: t, overflow: e.filter((n) => !t.includes(n)) };
26
+ return { visible: t, overflow: n.filter((e) => !t.includes(e)) };
24
27
  };
25
- export { O as TAB_PADDING_MIN_RATIO$u, I as distributeTabs$u, A as tabsSqueeze$u };
28
+ export { T as TAB_PADDING_MIN_RATIO$u, z as distributeTabs$u, q as lineTabsSqueeze$u, O as tabsSqueeze$u };
@@ -0,0 +1,79 @@
1
+ var c = Object.defineProperty;
2
+ var f = (i, e, t) => e in i ? c(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var s = (i, e, t) => f(i, typeof e != "symbol" ? e + "" : e, t);
4
+ import { findScrollParent$u as d } from "./virtualList.js";
5
+ const g = (i) => typeof i == "object" && i !== null && typeof i.then == "function";
6
+ class p {
7
+ constructor() {
8
+ s(this, "options", { onLoadMore: () => {
9
+ }, hasMore: !1 });
10
+ s(this, "sentinel", null);
11
+ s(this, "observer", null);
12
+ s(this, "intersecting", !1);
13
+ s(this, "locked", !1);
14
+ s(this, "failed", !1);
15
+ s(this, "generation", 0);
16
+ }
17
+ setOptions(e) {
18
+ const t = this.options;
19
+ if (this.options = e, this.sentinel && (t.rootMargin !== e.rootMargin || t.root !== e.root)) {
20
+ this.attach(this.sentinel);
21
+ return;
22
+ }
23
+ if (this.locked && t.loading && !e.loading) {
24
+ this.release(!0);
25
+ return;
26
+ }
27
+ this.maybeLoad();
28
+ }
29
+ /** Подключает датчик; `null` — отключить. */
30
+ attach(e) {
31
+ var o;
32
+ if ((o = this.observer) == null || o.disconnect(), this.observer = null, this.sentinel = e, this.intersecting = !1, !e || typeof IntersectionObserver > "u") return;
33
+ const t = this.options.root === void 0 ? d(e.parentElement) : this.options.root;
34
+ this.observer = new IntersectionObserver((a) => {
35
+ const r = a[a.length - 1];
36
+ if (!r) return;
37
+ const n = this.intersecting;
38
+ this.intersecting = r.isIntersecting, this.intersecting && !n && (this.failed = !1), this.maybeLoad();
39
+ }, { root: t, rootMargin: this.options.rootMargin ?? "200px" }), this.observer.observe(e);
40
+ }
41
+ /** Повторить подгрузку после ошибки. */
42
+ retry() {
43
+ this.failed = !1, this.maybeLoad();
44
+ }
45
+ destroy() {
46
+ this.generation++, this.attach(null);
47
+ }
48
+ maybeLoad() {
49
+ const { hasMore: e, loading: t, disabled: o, onLoadMore: a } = this.options;
50
+ if (this.locked || this.failed || !this.intersecting || !e || t || o) return;
51
+ this.locked = !0;
52
+ const r = ++this.generation;
53
+ let n;
54
+ try {
55
+ n = a();
56
+ } catch (h) {
57
+ throw this.locked = !1, this.failed = !0, h;
58
+ }
59
+ if (g(n)) {
60
+ n.then(
61
+ () => {
62
+ r === this.generation && this.release(!0);
63
+ },
64
+ () => {
65
+ r === this.generation && (this.failed = !0, this.release(!1));
66
+ }
67
+ );
68
+ return;
69
+ }
70
+ const l = typeof requestAnimationFrame == "function" ? requestAnimationFrame : (h) => setTimeout(h, 16);
71
+ l(() => l(() => {
72
+ r === this.generation && this.locked && !this.options.loading && this.release(!0);
73
+ }));
74
+ }
75
+ release(e) {
76
+ this.locked = !1, !(!e || !this.observer || !this.sentinel) && (this.intersecting = !1, this.observer.unobserve(this.sentinel), this.observer.observe(this.sentinel));
77
+ }
78
+ }
79
+ export { p as InfiniteScrollCore$u };
@@ -0,0 +1,2 @@
1
+ const i = (t) => t.button === 0 && !t.ctrlKey && !t.metaKey && !t.shiftKey && !t.altKey;
2
+ export { i as isPlainLeftClick$u };
@@ -0,0 +1,29 @@
1
+ const i = { instant: 100, fast: 150, base: 200, moderate: 250, slow: 300 }, r = {
2
+ move: "cubic-bezier(.2, 0, 0, 1)",
3
+ enter: "cubic-bezier(0, 0, .2, 1)",
4
+ exit: "cubic-bezier(.4, 0, 1, 1)"
5
+ }, a = 4, s = "data-u-motion", u = "data-u-motion-scale", c = () => typeof document > "u" ? null : document.documentElement, d = () => {
6
+ var t, e;
7
+ return ((t = c()) == null ? void 0 : t.getAttribute(s)) === "reduce" || typeof window < "u" && ((e = window.matchMedia) == null ? void 0 : e.call(window, "(prefers-reduced-motion: reduce)").matches) === !0;
8
+ }, f = () => {
9
+ var e;
10
+ const t = Number((e = c()) == null ? void 0 : e.getAttribute(u));
11
+ return Number.isFinite(t) && t > 0 ? t : 1;
12
+ }, m = (t) => (typeof t == "number" ? t : i[t]) * f(), n = /* @__PURE__ */ new WeakMap(), b = (t) => {
13
+ var o;
14
+ if (!t) return () => {
15
+ };
16
+ if ((o = n.get(t)) == null || o.cancel(), n.delete(t), typeof t.animate != "function" || d()) return () => {
17
+ };
18
+ const e = t.animate(
19
+ [
20
+ { opacity: 0, transform: `translateY(${a}px)` },
21
+ { opacity: 1, transform: "none" }
22
+ ],
23
+ { duration: m("base"), easing: r.enter }
24
+ );
25
+ return n.set(t, e), () => {
26
+ e.cancel(), n.get(t) === e && n.delete(t);
27
+ };
28
+ };
29
+ export { r as MOTION_EASE$u, i as MOTION_MS$u, s as MOTION_REDUCE_ATTR$u, u as MOTION_SCALE_ATTR$u, a as MOTION_SHIFT_SM$u, m as motionMs$u, f as motionScale$u, b as playEnterMotion$u, d as prefersReducedMotion$u };
@@ -0,0 +1,40 @@
1
+ const c = 10, i = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]);
2
+ let r = [];
3
+ function s(t, n = typeof location > "u" ? "" : location.href) {
4
+ try {
5
+ const e = new URL(t, n || void 0), o = n ? new URL(n).origin : "";
6
+ return e.origin === o ? e.pathname : `${e.host}${e.pathname}`;
7
+ } catch {
8
+ return t.split(/[?#]/)[0];
9
+ }
10
+ }
11
+ function u(t) {
12
+ for (const n of t) {
13
+ const e = n;
14
+ i.has(e.initiatorType) && r.push({
15
+ time: Math.round((performance.timeOrigin || 0) + e.startTime),
16
+ path: s(e.name),
17
+ status: typeof e.responseStatus == "number" ? e.responseStatus : void 0,
18
+ duration: Math.round(e.duration)
19
+ });
20
+ }
21
+ r.length > 10 && (r = r.slice(-10));
22
+ }
23
+ function a() {
24
+ return r;
25
+ }
26
+ function f() {
27
+ if (typeof PerformanceObserver > "u") return () => {
28
+ };
29
+ let t;
30
+ try {
31
+ t = new PerformanceObserver((n) => u(n.getEntries())), t.observe({ type: "resource", buffered: !0 });
32
+ } catch {
33
+ return () => {
34
+ };
35
+ }
36
+ return () => {
37
+ t.disconnect(), r = [];
38
+ };
39
+ }
40
+ export { c as REQUEST_LOG_SIZE$u, a as getRequestLog$u, s as sanitizeRequestUrl$u, f as startRequestLog$u };