@dskripchenko/laravel-admin 1.1.20 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { ref as F, computed as v, defineComponent as L, openBlock as o, createElementBlock as c, createElementVNode as d, createBlock as b, unref as r, withCtx as m, Fragment as P, renderList as D, createTextVNode as x, toDisplayString as p, createCommentVNode as R, createVNode as $, renderSlot as Y, resolveDynamicComponent as se, normalizeClass as Z, createSlots as qe, h as Tt, watch as ee, onBeforeUnmount as Lt, resolveComponent as rt, Transition as Ze, withModifiers as ut, nextTick as _e, onMounted as Fe, withKeys as Pt, normalizeProps as Ue, mergeProps as Re, normalizeStyle as Te, inject as dt, provide as Mt, createApp as Nt, reactive as Bt } from "vue";
2
- import { defineStore as ne, createPinia as It } from "pinia";
3
- import { RouterLink as Dt, useRouter as ie, useRoute as be, createWebHistory as ct, createRouter as Vt } from "vue-router";
4
- import { UidMenu as mt, UidMenuItem as Oe, UidMenuSeparator as zt, UidAvatar as ft, UidSidebar as qt, UidSidebarGroup as Ot, UidSidebarItem as Wt, UidSidebarLayout as Kt, UidCard as j, UidButton as z, UidAlert as te, UidInput as de, UidCheckbox as vt, UidSkeleton as We, UidErrorState as jt, UidEmptyState as Gt, UidTable as Ke, UidPagination as Ht, UidBadge as je, UidSelect as Ee, UidStat as Ce, UidHeatmap as Xt, UidGauge as Yt, UidFormField as ke, UidTextarea as Jt, UidNumberInput as Qt, UidDatePicker as Zt, UidStack as en, UidGrid as tn, UidTabs as pt, UidTabPanel as gt, UidTab as Ae, UidDescriptionList as nn, UidDescriptionItem as an, UidDrawer as ln, UidStepper as sn, UidFileUpload as on, UidProgress as rn } from "@dskripchenko/ui";
5
- import un from "axios";
1
+ import { ref as R, computed as v, defineComponent as L, openBlock as o, createElementBlock as c, createElementVNode as d, createBlock as b, unref as r, withCtx as m, Fragment as P, renderList as D, createTextVNode as S, toDisplayString as h, createCommentVNode as U, createVNode as $, renderSlot as Y, resolveDynamicComponent as se, normalizeClass as Z, createSlots as qe, h as Lt, watch as ee, onBeforeUnmount as Pt, resolveComponent as rt, Transition as Ze, withModifiers as ut, nextTick as _e, onMounted as Re, withKeys as Mt, normalizeProps as Fe, mergeProps as Ue, normalizeStyle as Te, inject as dt, provide as Nt, createApp as Bt, reactive as It } from "vue";
2
+ import { defineStore as ne, createPinia as Dt } from "pinia";
3
+ import { RouterLink as Vt, useRouter as ie, useRoute as be, createWebHistory as ct, createRouter as zt } from "vue-router";
4
+ import { UidMenu as mt, UidMenuItem as Oe, UidMenuSeparator as qt, UidAvatar as ft, UidSidebar as Ot, UidSidebarGroup as Wt, UidSidebarItem as jt, UidSidebarLayout as Kt, UidCard as K, UidButton as z, UidAlert as te, UidInput as de, UidCheckbox as vt, UidSkeleton as We, UidErrorState as Gt, UidEmptyState as Ht, UidTable as je, UidPagination as Xt, UidBadge as Ke, UidSelect as Ee, UidStat as Ce, UidHeatmap as Yt, UidGauge as Jt, UidFormField as ke, UidTextarea as Qt, UidNumberInput as Zt, UidDatePicker as en, UidStack as tn, UidGrid as nn, UidTabs as pt, UidTabPanel as gt, UidTab as Ae, UidDescriptionList as an, UidDescriptionItem as ln, UidDrawer as sn, UidStepper as on, UidFileUpload as rn, UidProgress as un } from "@dskripchenko/ui";
5
+ import dn from "axios";
6
6
  import { p as ht, u as ce } from "./formState-DGNcH1XQ.js";
7
- import { t as xo } from "./formState-DGNcH1XQ.js";
7
+ import { t as So } from "./formState-DGNcH1XQ.js";
8
8
  let ye = null;
9
- function dn(e) {
9
+ function cn(e) {
10
10
  ye = e;
11
11
  }
12
12
  function H() {
@@ -16,14 +16,14 @@ function H() {
16
16
  );
17
17
  return ye;
18
18
  }
19
- function Yi() {
19
+ function Ji() {
20
20
  ye = null;
21
21
  }
22
- function Ji() {
22
+ function Qi() {
23
23
  return ye !== null;
24
24
  }
25
25
  const Ge = ne("admin-theme", () => {
26
- const e = F("light"), t = F(["light", "dark"]), n = v(() => e.value === "dark");
26
+ const e = R("light"), t = R(["light", "dark"]), n = v(() => e.value === "dark");
27
27
  function s(u) {
28
28
  e.value = u.theme, t.value = u.availableThemes, i(u.theme);
29
29
  }
@@ -39,8 +39,8 @@ const Ge = ne("admin-theme", () => {
39
39
  a(u);
40
40
  try {
41
41
  await H().post("/system/setTheme", { theme: u });
42
- } catch (g) {
43
- throw a(f), g;
42
+ } catch (p) {
43
+ throw a(f), p;
44
44
  }
45
45
  }
46
46
  function i(u) {
@@ -54,7 +54,7 @@ const Ge = ne("admin-theme", () => {
54
54
  applyLocal: a,
55
55
  setTheme: l
56
56
  };
57
- }), cn = ["aria-label", "aria-pressed"], mn = ["data-icon"], _t = /* @__PURE__ */ L({
57
+ }), mn = ["aria-label", "aria-pressed"], fn = ["data-icon"], _t = /* @__PURE__ */ L({
58
58
  __name: "ThemeToggle",
59
59
  setup(e) {
60
60
  const t = Ge(), n = v(() => t.current === "dark"), s = v(() => n.value ? "sun" : "moon"), a = v(
@@ -74,11 +74,11 @@ const Ge = ne("admin-theme", () => {
74
74
  d("span", {
75
75
  class: "admin-topbar__icon",
76
76
  "data-icon": s.value
77
- }, null, 8, mn)
78
- ], 8, cn));
77
+ }, null, 8, fn)
78
+ ], 8, mn));
79
79
  }
80
80
  }), He = ne("admin-locale", () => {
81
- const e = F("ru"), t = F(["ru", "en"]);
81
+ const e = R("ru"), t = R(["ru", "en"]);
82
82
  function n(i) {
83
83
  e.value = i.locale, t.value = i.availableLocales, l(i.locale);
84
84
  }
@@ -112,7 +112,7 @@ const Ge = ne("admin-theme", () => {
112
112
  applyLocal: s,
113
113
  setLocale: a
114
114
  };
115
- }), fn = {
115
+ }), vn = {
116
116
  type: "button",
117
117
  class: "admin-topbar__icon-btn",
118
118
  style: { width: "auto", padding: "0 8px", gap: "4px", "font-size": "12px" },
@@ -126,12 +126,12 @@ const Ge = ne("admin-theme", () => {
126
126
  }
127
127
  return (s, a) => (o(), b(r(mt), null, {
128
128
  trigger: m(() => [
129
- d("button", fn, [
129
+ d("button", vn, [
130
130
  a[0] || (a[0] = d("span", {
131
131
  class: "admin-topbar__icon",
132
132
  "data-icon": "globe"
133
133
  }, null, -1)),
134
- d("span", null, p((r(t).current ?? "").toUpperCase()), 1)
134
+ d("span", null, h((r(t).current ?? "").toUpperCase()), 1)
135
135
  ])
136
136
  ]),
137
137
  default: m(() => [
@@ -140,7 +140,7 @@ const Ge = ne("admin-theme", () => {
140
140
  onClick: (i) => n(l)
141
141
  }, {
142
142
  default: m(() => [
143
- x(p(l.toUpperCase()), 1)
143
+ S(h(l.toUpperCase()), 1)
144
144
  ]),
145
145
  _: 2
146
146
  }, 1032, ["onClick"]))), 128))
@@ -149,48 +149,48 @@ const Ge = ne("admin-theme", () => {
149
149
  }));
150
150
  }
151
151
  }), Xe = ne("admin-notifications", () => {
152
- const e = F([]), t = F(0), n = F(!1), s = F("all"), a = F(null), l = v(() => t.value > 0);
153
- function i(S) {
154
- t.value = S.unread_notifications_count;
152
+ const e = R([]), t = R(0), n = R(!1), s = R("all"), a = R(null), l = v(() => t.value > 0);
153
+ function i(x) {
154
+ t.value = x.unread_notifications_count;
155
155
  }
156
- async function u(S = "all", A = 1) {
156
+ async function u(x = "all", C = 1) {
157
157
  n.value = !0;
158
158
  try {
159
- const h = await H().get(`/notifications/list?type=${S}&page=${A}`);
160
- e.value = h.data, t.value = h.meta.unread_count, a.value = {
161
- page: h.meta.page,
162
- per_page: h.meta.per_page,
163
- total: h.meta.total,
164
- last_page: h.meta.last_page
165
- }, s.value = S;
159
+ const g = await H().get(`/notifications/list?type=${x}&page=${C}`);
160
+ e.value = g.data, t.value = g.meta.unread_count, a.value = {
161
+ page: g.meta.page,
162
+ per_page: g.meta.per_page,
163
+ total: g.meta.total,
164
+ last_page: g.meta.last_page
165
+ }, s.value = x;
166
166
  } finally {
167
167
  n.value = !1;
168
168
  }
169
169
  }
170
170
  async function f() {
171
- const A = await H().get(
171
+ const C = await H().get(
172
172
  "/notifications/unread"
173
173
  );
174
- t.value = A.count, s.value === "unread" && (e.value = A.data);
174
+ t.value = C.count, s.value === "unread" && (e.value = C.data);
175
175
  }
176
- async function g(S) {
177
- await H().post("/notifications/markAsRead", { id: S });
178
- const y = e.value.find((h) => h.id === S);
179
- y && y.read_at === null && (y.read_at = (/* @__PURE__ */ new Date()).toISOString(), t.value = Math.max(0, t.value - 1));
176
+ async function p(x) {
177
+ await H().post("/notifications/markAsRead", { id: x });
178
+ const _ = e.value.find((g) => g.id === x);
179
+ _ && _.read_at === null && (_.read_at = (/* @__PURE__ */ new Date()).toISOString(), t.value = Math.max(0, t.value - 1));
180
180
  }
181
- async function _() {
181
+ async function y() {
182
182
  await H().post("/notifications/markAllAsRead");
183
- const A = (/* @__PURE__ */ new Date()).toISOString();
184
- for (const y of e.value)
185
- y.read_at === null && (y.read_at = A);
183
+ const C = (/* @__PURE__ */ new Date()).toISOString();
184
+ for (const _ of e.value)
185
+ _.read_at === null && (_.read_at = C);
186
186
  t.value = 0;
187
187
  }
188
- async function k(S) {
189
- await H().post("/notifications/destroy", { id: S });
190
- const y = e.value.findIndex((h) => h.id === S);
191
- if (y !== -1) {
192
- const h = e.value[y].read_at === null;
193
- e.value.splice(y, 1), h && (t.value = Math.max(0, t.value - 1));
188
+ async function k(x) {
189
+ await H().post("/notifications/destroy", { id: x });
190
+ const _ = e.value.findIndex((g) => g.id === x);
191
+ if (_ !== -1) {
192
+ const g = e.value[_].read_at === null;
193
+ e.value.splice(_, 1), g && (t.value = Math.max(0, t.value - 1));
194
194
  }
195
195
  }
196
196
  return {
@@ -203,18 +203,18 @@ const Ge = ne("admin-theme", () => {
203
203
  hydrate: i,
204
204
  load: u,
205
205
  loadUnread: f,
206
- markAsRead: g,
207
- markAllAsRead: _,
206
+ markAsRead: p,
207
+ markAllAsRead: y,
208
208
  destroy: k
209
209
  };
210
- }), vn = ["title"], pn = /* @__PURE__ */ L({
210
+ }), pn = ["title"], gn = /* @__PURE__ */ L({
211
211
  __name: "NotificationBell",
212
212
  setup(e) {
213
213
  const t = Xe(), n = v(() => {
214
214
  const s = t.unreadCount;
215
215
  return s <= 0 ? null : s > 99 ? "99+" : String(s);
216
216
  });
217
- return (s, a) => (o(), b(r(Dt), {
217
+ return (s, a) => (o(), b(r(Vt), {
218
218
  to: "/notifications",
219
219
  class: "admin-topbar__icon-btn",
220
220
  "aria-label": "Уведомления"
@@ -228,7 +228,7 @@ const Ge = ne("admin-theme", () => {
228
228
  key: 0,
229
229
  class: "admin-topbar__bell-badge",
230
230
  title: `Непрочитанных: ${r(t).unreadCount}`
231
- }, p(n.value), 9, vn)) : R("", !0)
231
+ }, h(n.value), 9, pn)) : U("", !0)
232
232
  ]),
233
233
  _: 1
234
234
  }));
@@ -247,12 +247,12 @@ class bt extends ae {
247
247
  super(401, t), this.name = "UnauthenticatedError";
248
248
  }
249
249
  }
250
- class gn extends ae {
250
+ class hn extends ae {
251
251
  constructor(t) {
252
252
  super(403, t), this.name = "ForbiddenError";
253
253
  }
254
254
  }
255
- class hn extends ae {
255
+ class _n extends ae {
256
256
  constructor(t) {
257
257
  super(404, t), this.name = "NotFoundError";
258
258
  }
@@ -281,9 +281,9 @@ function et(e, t) {
281
281
  case 401:
282
282
  return new bt(t);
283
283
  case 403:
284
- return new gn(t);
285
- case 404:
286
284
  return new hn(t);
285
+ case 404:
286
+ return new _n(t);
287
287
  case 422:
288
288
  return new Le(t);
289
289
  default:
@@ -291,67 +291,67 @@ function et(e, t) {
291
291
  }
292
292
  }
293
293
  const Q = ne("admin-auth", () => {
294
- const e = F(null), t = F([]), n = F(null), s = v(() => e.value !== null), a = v(() => n.value !== null);
295
- function l(y) {
296
- e.value = y.user, t.value = y.permissions;
294
+ const e = R(null), t = R([]), n = R(null), s = v(() => e.value !== null), a = v(() => n.value !== null);
295
+ function l(_) {
296
+ e.value = _.user, t.value = _.permissions;
297
297
  }
298
- function i(y) {
299
- return t.value.includes("*") || t.value.includes(y) ? !0 : t.value.some((h) => {
300
- if (!h.endsWith(".*")) return !1;
301
- const U = h.slice(0, -1);
302
- return y.startsWith(U);
298
+ function i(_) {
299
+ return t.value.includes("*") || t.value.includes(_) ? !0 : t.value.some((g) => {
300
+ if (!g.endsWith(".*")) return !1;
301
+ const F = g.slice(0, -1);
302
+ return _.startsWith(F);
303
303
  });
304
304
  }
305
- function u(y) {
306
- return y.some(i);
305
+ function u(_) {
306
+ return _.some(i);
307
307
  }
308
- function f(y) {
309
- return y.every(i);
308
+ function f(_) {
309
+ return _.every(i);
310
310
  }
311
- async function g(y) {
312
- const h = H();
311
+ async function p(_) {
312
+ const g = H();
313
313
  try {
314
- const U = await h.post(
314
+ const F = await g.post(
315
315
  "/auth/login",
316
- y
316
+ _
317
317
  );
318
- return U?.user && (e.value = U.user), Array.isArray(U?.permissions) && (t.value = U.permissions), n.value = null, "authenticated";
319
- } catch (U) {
320
- if (U instanceof ae && U.errorKey === "two_factor_required") {
321
- const q = U.payload.challenge_token;
318
+ return F?.user && (e.value = F.user), Array.isArray(F?.permissions) && (t.value = F.permissions), n.value = null, "authenticated";
319
+ } catch (F) {
320
+ if (F instanceof ae && F.errorKey === "two_factor_required") {
321
+ const q = F.payload.challenge_token;
322
322
  return n.value = {
323
323
  challengeToken: typeof q == "string" ? q : "",
324
- remember: y.remember ?? !1
324
+ remember: _.remember ?? !1
325
325
  }, "two_factor_required";
326
326
  }
327
- throw U;
327
+ throw F;
328
328
  }
329
329
  }
330
- async function _(y) {
330
+ async function y(_) {
331
331
  if (n.value === null)
332
332
  throw new Error("No pending 2FA challenge");
333
- const U = await H().post("/auth/twoFactorChallenge", {
333
+ const F = await H().post("/auth/twoFactorChallenge", {
334
334
  challenge_token: n.value.challengeToken,
335
- code: y
335
+ code: _
336
336
  });
337
- e.value = U.user, n.value = null;
337
+ e.value = F.user, n.value = null;
338
338
  }
339
- async function k(y) {
339
+ async function k(_) {
340
340
  if (n.value === null)
341
341
  throw new Error("No pending 2FA challenge");
342
- const U = await H().post("/auth/twoFactorRecovery", {
342
+ const F = await H().post("/auth/twoFactorRecovery", {
343
343
  challenge_token: n.value.challengeToken,
344
- recovery_code: y
344
+ recovery_code: _
345
345
  });
346
- return e.value = U.user, n.value = null, { remaining: U.recovery_codes_remaining };
346
+ return e.value = F.user, n.value = null, { remaining: F.recovery_codes_remaining };
347
347
  }
348
- function S() {
348
+ function x() {
349
349
  n.value = null;
350
350
  }
351
- async function A() {
352
- const y = H();
351
+ async function C() {
352
+ const _ = H();
353
353
  try {
354
- await y.post("/auth/logout");
354
+ await _.post("/auth/logout");
355
355
  } finally {
356
356
  e.value = null, t.value = [], n.value = null;
357
357
  }
@@ -369,19 +369,19 @@ const Q = ne("admin-auth", () => {
369
369
  hasPermission: i,
370
370
  hasAnyPermission: u,
371
371
  hasAllPermissions: f,
372
- login: g,
373
- twoFactorChallenge: _,
372
+ login: p,
373
+ twoFactorChallenge: y,
374
374
  twoFactorRecovery: k,
375
- cancelChallenge: S,
376
- logout: A
375
+ cancelChallenge: x,
376
+ logout: C
377
377
  };
378
- }), _n = {
378
+ }), yn = {
379
379
  type: "button",
380
380
  class: "admin-topbar__icon-btn admin-user-menu__trigger",
381
381
  "aria-label": "Меню пользователя",
382
382
  "aria-haspopup": "menu",
383
383
  style: { width: "auto", padding: "0 4px", gap: "8px" }
384
- }, yn = /* @__PURE__ */ L({
384
+ }, bn = /* @__PURE__ */ L({
385
385
  __name: "UserMenu",
386
386
  setup(e) {
387
387
  const t = Q(), n = ie();
@@ -397,7 +397,7 @@ const Q = ne("admin-auth", () => {
397
397
  }
398
398
  return (l, i) => (o(), b(r(mt), null, {
399
399
  trigger: m(() => [
400
- d("button", _n, [
400
+ d("button", yn, [
401
401
  $(r(ft), {
402
402
  src: r(t).user?.avatar ?? void 0,
403
403
  name: r(t).user?.name ?? "?",
@@ -409,17 +409,17 @@ const Q = ne("admin-auth", () => {
409
409
  default: m(() => [
410
410
  $(r(Oe), { onClick: a }, {
411
411
  default: m(() => [...i[0] || (i[0] = [
412
- x("Профиль", -1)
412
+ S("Профиль", -1)
413
413
  ])]),
414
414
  _: 1
415
415
  }),
416
- $(r(zt)),
416
+ $(r(qt)),
417
417
  $(r(Oe), {
418
418
  variant: "danger",
419
419
  onClick: s
420
420
  }, {
421
421
  default: m(() => [...i[1] || (i[1] = [
422
- x("Выйти", -1)
422
+ S("Выйти", -1)
423
423
  ])]),
424
424
  _: 1
425
425
  })
@@ -427,10 +427,10 @@ const Q = ne("admin-auth", () => {
427
427
  _: 1
428
428
  }));
429
429
  }
430
- }), bn = { class: "admin-topbar" }, kn = { class: "admin-topbar__breadcrumbs" }, wn = {
430
+ }), kn = { class: "admin-topbar" }, wn = { class: "admin-topbar__breadcrumbs" }, $n = {
431
431
  key: 0,
432
432
  class: "sep"
433
- }, $n = /* @__PURE__ */ L({
433
+ }, xn = /* @__PURE__ */ L({
434
434
  __name: "AdminTopBar",
435
435
  props: {
436
436
  breadcrumbs: { default: () => [] },
@@ -439,7 +439,7 @@ const Q = ne("admin-auth", () => {
439
439
  emits: ["toggle-sidebar"],
440
440
  setup(e, { emit: t }) {
441
441
  const n = e, s = t, a = v(() => n.breadcrumbs.length - 1);
442
- return (l, i) => (o(), c("header", bn, [
442
+ return (l, i) => (o(), c("header", kn, [
443
443
  e.showCollapseToggle ? (o(), c("button", {
444
444
  key: 0,
445
445
  type: "button",
@@ -451,17 +451,17 @@ const Q = ne("admin-auth", () => {
451
451
  class: "admin-topbar__icon",
452
452
  "data-icon": "panel-left"
453
453
  }, null, -1)
454
- ])])) : R("", !0),
455
- d("div", kn, [
454
+ ])])) : U("", !0),
455
+ d("div", wn, [
456
456
  Y(l.$slots, "breadcrumbs", {}, () => [
457
457
  (o(!0), c(P, null, D(e.breadcrumbs, (u, f) => (o(), c(P, { key: f }, [
458
- f > 0 ? (o(), c("span", wn, "›")) : R("", !0),
458
+ f > 0 ? (o(), c("span", $n, "›")) : U("", !0),
459
459
  (o(), b(se(u.to ? "a" : "span"), {
460
460
  href: typeof u.to == "string" ? u.to : void 0,
461
461
  class: Z(f === a.value ? "cur" : "")
462
462
  }, {
463
463
  default: m(() => [
464
- x(p(u.label), 1)
464
+ S(h(u.label), 1)
465
465
  ]),
466
466
  _: 2
467
467
  }, 1032, ["href", "class"]))
@@ -484,49 +484,49 @@ const Q = ne("admin-auth", () => {
484
484
  ], -1))
485
485
  ]),
486
486
  Y(l.$slots, "actions"),
487
- $(pn),
487
+ $(gn),
488
488
  $(_t),
489
489
  $(yt),
490
- $(yn)
490
+ $(bn)
491
491
  ]));
492
492
  }
493
493
  }), kt = ne("admin-menu", () => {
494
- const e = F([]), t = F(!1), n = F(null), s = F(!1), a = v(() => {
495
- const g = Q(), _ = (k) => {
496
- if (Array.isArray(k.permissions) && k.permissions.length > 0 && !g.hasAnyPermission(k.permissions))
494
+ const e = R([]), t = R(!1), n = R(null), s = R(!1), a = v(() => {
495
+ const p = Q(), y = (k) => {
496
+ if (Array.isArray(k.permissions) && k.permissions.length > 0 && !p.hasAnyPermission(k.permissions))
497
497
  return null;
498
- const S = (k.children ?? []).map(_).filter((A) => A !== null);
499
- return { ...k, children: S };
498
+ const x = (k.children ?? []).map(y).filter((C) => C !== null);
499
+ return { ...k, children: x };
500
500
  };
501
- return e.value.map(_).filter((k) => k !== null);
501
+ return e.value.map(y).filter((k) => k !== null);
502
502
  }), l = v(() => {
503
- const g = /* @__PURE__ */ new Map();
503
+ const p = /* @__PURE__ */ new Map();
504
504
  for (const k of a.value) {
505
- const S = k.group ?? null;
506
- g.has(S) || g.set(S, []), g.get(S).push(k);
505
+ const x = k.group ?? null;
506
+ p.has(x) || p.set(x, []), p.get(x).push(k);
507
507
  }
508
- const _ = [];
509
- for (const [k, S] of g)
510
- S.sort((A, y) => {
511
- const h = (A.order ?? 0) - (y.order ?? 0);
512
- return h !== 0 ? h : A.label.localeCompare(y.label);
513
- }), _.push({ group: k, items: S });
514
- return _;
508
+ const y = [];
509
+ for (const [k, x] of p)
510
+ x.sort((C, _) => {
511
+ const g = (C.order ?? 0) - (_.order ?? 0);
512
+ return g !== 0 ? g : C.label.localeCompare(_.label);
513
+ }), y.push({ group: k, items: x });
514
+ return y;
515
515
  });
516
- async function i(g = !1) {
517
- if (s.value && !g) return e.value;
516
+ async function i(p = !1) {
517
+ if (s.value && !p) return e.value;
518
518
  t.value = !0, n.value = null;
519
519
  try {
520
520
  const k = await H().get("/system/menu");
521
521
  return e.value = Array.isArray(k.items) ? k.items : [], s.value = !0, e.value;
522
- } catch (_) {
523
- throw n.value = _ instanceof Error ? _ : new Error(String(_)), _;
522
+ } catch (y) {
523
+ throw n.value = y instanceof Error ? y : new Error(String(y)), y;
524
524
  } finally {
525
525
  t.value = !1;
526
526
  }
527
527
  }
528
- function u(g) {
529
- e.value = g, s.value = !0, n.value = null;
528
+ function u(p) {
529
+ e.value = p, s.value = !0, n.value = null;
530
530
  }
531
531
  function f() {
532
532
  e.value = [], s.value = !1, n.value = null, t.value = !1;
@@ -542,16 +542,16 @@ const Q = ne("admin-auth", () => {
542
542
  setItems: u,
543
543
  reset: f
544
544
  };
545
- }), xn = { class: "admin-sidebar-brand" }, Sn = { class: "admin-sidebar-brand__mark" }, Cn = {
545
+ }), Sn = { class: "admin-sidebar-brand" }, Cn = { class: "admin-sidebar-brand__mark" }, An = {
546
546
  key: 0,
547
547
  class: "admin-sidebar-brand__name"
548
- }, An = {
548
+ }, En = {
549
549
  key: 0,
550
550
  class: "admin-sidebar-tenant"
551
- }, En = { class: "admin-sidebar-foot" }, Fn = {
551
+ }, Rn = { class: "admin-sidebar-foot" }, Fn = {
552
552
  key: 0,
553
553
  class: "admin-sidebar-foot__text"
554
- }, Un = ["href"], Rn = /* @__PURE__ */ L({
554
+ }, Un = ["href"], Tn = /* @__PURE__ */ L({
555
555
  __name: "AdminSidebar",
556
556
  props: {
557
557
  collapsed: { type: Boolean, default: !1 },
@@ -568,37 +568,37 @@ const Q = ne("admin-auth", () => {
568
568
  }
569
569
  function l(u) {
570
570
  if (u)
571
- return () => Tt("span", { class: "admin-sidebar__icon", "data-icon": u });
571
+ return () => Lt("span", { class: "admin-sidebar__icon", "data-icon": u });
572
572
  }
573
573
  function i(u) {
574
574
  if (u.url) return u.url;
575
575
  if (u.routeName) return { name: u.routeName };
576
576
  }
577
- return (u, f) => (o(), b(r(qt), { collapsed: e.collapsed }, qe({
577
+ return (u, f) => (o(), b(r(Ot), { collapsed: e.collapsed }, qe({
578
578
  header: m(() => [
579
- d("div", xn, [
580
- d("div", Sn, p(e.brandMark), 1),
581
- e.collapsed ? R("", !0) : (o(), c("div", Cn, p(e.brandName), 1))
579
+ d("div", Sn, [
580
+ d("div", Cn, h(e.brandMark), 1),
581
+ e.collapsed ? U("", !0) : (o(), c("div", An, h(e.brandName), 1))
582
582
  ]),
583
- e.tenant && !e.collapsed ? (o(), c("div", An, [
584
- d("span", null, p(e.tenant.label), 1),
585
- d("b", null, p(e.tenant.name), 1)
586
- ])) : R("", !0)
583
+ e.tenant && !e.collapsed ? (o(), c("div", En, [
584
+ d("span", null, h(e.tenant.label), 1),
585
+ d("b", null, h(e.tenant.name), 1)
586
+ ])) : U("", !0)
587
587
  ]),
588
588
  nav: m(() => [
589
- (o(!0), c(P, null, D(s.value, (g, _) => (o(), b(r(Ot), {
590
- key: `grp-${_}`,
591
- title: g.group ?? void 0
589
+ (o(!0), c(P, null, D(s.value, (p, y) => (o(), b(r(Wt), {
590
+ key: `grp-${y}`,
591
+ title: p.group ?? void 0
592
592
  }, {
593
593
  default: m(() => [
594
- (o(!0), c(P, null, D(g.items, (k) => (o(), b(r(Wt), {
594
+ (o(!0), c(P, null, D(p.items, (k) => (o(), b(r(jt), {
595
595
  key: k.key,
596
596
  to: i(k),
597
597
  active: a(k),
598
598
  badge: k.badge ?? void 0
599
599
  }, qe({
600
600
  default: m(() => [
601
- x(" " + p(k.label), 1)
601
+ S(" " + h(k.label), 1)
602
602
  ]),
603
603
  _: 2
604
604
  }, [
@@ -619,24 +619,24 @@ const Q = ne("admin-auth", () => {
619
619
  e.version || e.docsUrl ? {
620
620
  name: "footer",
621
621
  fn: m(() => [
622
- d("div", En, [
623
- e.version ? (o(), c("span", Fn, p(e.version), 1)) : R("", !0),
622
+ d("div", Rn, [
623
+ e.version ? (o(), c("span", Fn, h(e.version), 1)) : U("", !0),
624
624
  e.docsUrl ? (o(), c("a", {
625
625
  key: 1,
626
626
  href: e.docsUrl,
627
627
  class: "admin-sidebar-foot__text admin-sidebar-foot__link"
628
- }, " Docs ", 8, Un)) : R("", !0)
628
+ }, " Docs ", 8, Un)) : U("", !0)
629
629
  ])
630
630
  ]),
631
631
  key: "0"
632
632
  } : void 0
633
633
  ]), 1032, ["collapsed"]));
634
634
  }
635
- }), Tn = { class: "admin-shell-root" }, Ln = {
635
+ }), Ln = { class: "admin-shell-root" }, Pn = {
636
636
  key: 0,
637
637
  class: "admin-impersonation-banner",
638
638
  role: "status"
639
- }, Ie = "data-admin-impersonating", Pn = /* @__PURE__ */ L({
639
+ }, Ie = "data-admin-impersonating", Mn = /* @__PURE__ */ L({
640
640
  __name: "AdminShell",
641
641
  props: {
642
642
  collapsed: { type: Boolean, default: !1 },
@@ -657,33 +657,33 @@ const Q = ne("admin-auth", () => {
657
657
  typeof document > "u" || (i !== null ? document.documentElement.setAttribute(Ie, "true") : document.documentElement.removeAttribute(Ie));
658
658
  },
659
659
  { immediate: !0 }
660
- ), Lt(() => {
660
+ ), Pt(() => {
661
661
  typeof document < "u" && document.documentElement.removeAttribute(Ie);
662
- }), (i, u) => (o(), c("div", Tn, [
663
- e.impersonation ? (o(), c("div", Ln, [
662
+ }), (i, u) => (o(), c("div", Ln, [
663
+ e.impersonation ? (o(), c("div", Pn, [
664
664
  d("span", null, [
665
- u[1] || (u[1] = x(" Вы вошли как ", -1)),
666
- d("b", null, p(e.impersonation.asName), 1),
667
- u[2] || (u[2] = x(" · режим имперсонации ", -1))
665
+ u[1] || (u[1] = S(" Вы вошли как ", -1)),
666
+ d("b", null, h(e.impersonation.asName), 1),
667
+ u[2] || (u[2] = S(" · режим имперсонации ", -1))
668
668
  ]),
669
669
  d("button", {
670
670
  type: "button",
671
671
  class: "admin-impersonation-banner__exit",
672
672
  onClick: l
673
673
  }, " Выйти из режима ")
674
- ])) : R("", !0),
674
+ ])) : U("", !0),
675
675
  $(r(Kt), {
676
676
  "model-value": e.collapsed,
677
677
  "onUpdate:modelValue": a
678
678
  }, {
679
679
  sidebar: m(() => [
680
680
  Y(i.$slots, "sidebar", {}, () => [
681
- $(Rn, { collapsed: e.collapsed }, null, 8, ["collapsed"])
681
+ $(Tn, { collapsed: e.collapsed }, null, 8, ["collapsed"])
682
682
  ])
683
683
  ]),
684
684
  header: m(() => [
685
685
  Y(i.$slots, "topbar", {}, () => [
686
- $($n, {
686
+ $(xn, {
687
687
  onToggleSidebar: u[0] || (u[0] = (f) => a(!e.collapsed))
688
688
  })
689
689
  ])
@@ -696,7 +696,7 @@ const Q = ne("admin-auth", () => {
696
696
  ]));
697
697
  }
698
698
  }), Ye = ne("admin-navigation", () => {
699
- const e = F(0), t = v(() => e.value > 0);
699
+ const e = R(0), t = v(() => e.value > 0);
700
700
  function n() {
701
701
  e.value += 1;
702
702
  }
@@ -707,10 +707,10 @@ const Q = ne("admin-auth", () => {
707
707
  e.value = 0;
708
708
  }
709
709
  return { pending: e, isLoading: t, start: n, end: s, reset: a };
710
- }), Mn = /* @__PURE__ */ L({
710
+ }), Nn = /* @__PURE__ */ L({
711
711
  __name: "AdminLoadingBar",
712
712
  setup(e) {
713
- const t = Ye(), n = F(!1);
713
+ const t = Ye(), n = R(!1);
714
714
  let s = null;
715
715
  ee(
716
716
  () => t.isLoading,
@@ -731,17 +731,17 @@ const Q = ne("admin-auth", () => {
731
731
  "aria-busy": "true"
732
732
  }, null, 2));
733
733
  }
734
- }), Nn = { class: "admin-page-host" }, Bn = /* @__PURE__ */ L({
734
+ }), Bn = { class: "admin-page-host" }, In = /* @__PURE__ */ L({
735
735
  __name: "AdminApp",
736
736
  setup(e) {
737
737
  const t = be(), n = v(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
738
738
  return (s, a) => {
739
739
  const l = rt("router-view");
740
740
  return o(), c(P, null, [
741
- $(Mn),
742
- n.value ? (o(), b(Pn, { key: 0 }, {
741
+ $(Nn),
742
+ n.value ? (o(), b(Mn, { key: 0 }, {
743
743
  default: m(() => [
744
- d("div", Nn, [
744
+ d("div", Bn, [
745
745
  $(l, null, {
746
746
  default: m(({ Component: i }) => [
747
747
  $(Ze, { name: "admin-page" }, {
@@ -771,30 +771,30 @@ const Q = ne("admin-auth", () => {
771
771
  };
772
772
  }
773
773
  }), oe = ne("admin-manifest", () => {
774
- const e = F(null), t = F(!1), n = F(null), s = v(() => e.value !== null), a = v(() => e.value?.version ?? null), l = v(() => e.value?.resources ?? []), i = v(() => e.value?.screens ?? []), u = v(() => e.value?.settings ?? []), f = v(() => e.value?.plugins ?? []);
775
- function g(y) {
776
- return l.value.find((h) => h.slug === y) ?? null;
774
+ const e = R(null), t = R(!1), n = R(null), s = v(() => e.value !== null), a = v(() => e.value?.version ?? null), l = v(() => e.value?.resources ?? []), i = v(() => e.value?.screens ?? []), u = v(() => e.value?.settings ?? []), f = v(() => e.value?.plugins ?? []);
775
+ function p(_) {
776
+ return l.value.find((g) => g.slug === _) ?? null;
777
777
  }
778
- function _(y) {
779
- return i.value.find((h) => h.slug === y) ?? null;
778
+ function y(_) {
779
+ return i.value.find((g) => g.slug === _) ?? null;
780
780
  }
781
- function k(y) {
782
- return u.value.find((h) => h.slug === y) ?? null;
781
+ function k(_) {
782
+ return u.value.find((g) => g.slug === _) ?? null;
783
783
  }
784
- async function S(y = !1) {
785
- if (e.value !== null && !y)
784
+ async function x(_ = !1) {
785
+ if (e.value !== null && !_)
786
786
  return e.value;
787
787
  t.value = !0, n.value = null;
788
788
  try {
789
- const U = await H().get("/system/manifest");
790
- return e.value = U, U;
791
- } catch (h) {
792
- throw n.value = h instanceof Error ? h : new Error(String(h)), h;
789
+ const F = await H().get("/system/manifest");
790
+ return e.value = F, F;
791
+ } catch (g) {
792
+ throw n.value = g instanceof Error ? g : new Error(String(g)), g;
793
793
  } finally {
794
794
  t.value = !1;
795
795
  }
796
796
  }
797
- function A() {
797
+ function C() {
798
798
  e.value = null, n.value = null, t.value = !1;
799
799
  }
800
800
  return {
@@ -810,55 +810,55 @@ const Q = ne("admin-auth", () => {
810
810
  settings: u,
811
811
  plugins: f,
812
812
  // actions
813
- getResource: g,
814
- getScreen: _,
813
+ getResource: p,
814
+ getScreen: y,
815
815
  getSettings: k,
816
- load: S,
817
- reset: A
816
+ load: x,
817
+ reset: C
818
818
  };
819
- }), In = { class: "admin-home" }, Dn = { class: "admin-home__title" }, Vn = {
819
+ }), Dn = { class: "admin-home" }, Vn = { class: "admin-home__title" }, zn = {
820
820
  key: 0,
821
821
  class: "admin-home__resources"
822
- }, zn = { class: "admin-home__grid" }, qn = ["onClick"], On = { class: "admin-home__card-label" }, Wn = { class: "admin-home__card-slug" }, Kn = /* @__PURE__ */ L({
822
+ }, qn = { class: "admin-home__grid" }, On = ["onClick"], Wn = { class: "admin-home__card-label" }, jn = { class: "admin-home__card-slug" }, Kn = /* @__PURE__ */ L({
823
823
  __name: "HomePage",
824
824
  setup(e) {
825
825
  const t = oe(), n = Q(), s = ie(), a = v(() => n.user?.name ?? ""), l = v(() => t.manifest?.resources ?? []);
826
- return (i, u) => (o(), c("div", In, [
827
- $(r(j), {
826
+ return (i, u) => (o(), c("div", Dn, [
827
+ $(r(K), {
828
828
  padding: "lg",
829
829
  class: "admin-home__hero"
830
830
  }, {
831
831
  default: m(() => [
832
- d("h1", Dn, "Добро пожаловать" + p(a.value ? ", " + a.value : ""), 1),
832
+ d("h1", Vn, "Добро пожаловать" + h(a.value ? ", " + a.value : ""), 1),
833
833
  u[0] || (u[0] = d("p", { class: "admin-home__lead" }, " Админ-панель готова. Воспользуйтесь сайдбаром или переходите к ресурсам ниже. ", -1))
834
834
  ]),
835
835
  _: 1
836
836
  }),
837
- l.value.length ? (o(), c("section", Vn, [
837
+ l.value.length ? (o(), c("section", zn, [
838
838
  u[1] || (u[1] = d("h2", { class: "admin-home__heading" }, "Ресурсы", -1)),
839
- d("ul", zn, [
839
+ d("ul", qn, [
840
840
  (o(!0), c(P, null, D(l.value, (f) => (o(), c("li", {
841
841
  key: f.slug
842
842
  }, [
843
843
  d("button", {
844
844
  type: "button",
845
845
  class: "admin-home__card",
846
- onClick: (g) => r(s).push({ name: `admin.resource.${f.slug}.index` })
846
+ onClick: (p) => r(s).push({ name: `admin.resource.${f.slug}.index` })
847
847
  }, [
848
- d("span", On, p(f.label), 1),
849
- d("span", Wn, p(f.slug), 1)
850
- ], 8, qn)
848
+ d("span", Wn, h(f.label), 1),
849
+ d("span", jn, h(f.slug), 1)
850
+ ], 8, On)
851
851
  ]))), 128))
852
852
  ])
853
- ])) : R("", !0)
853
+ ])) : U("", !0)
854
854
  ]));
855
855
  }
856
- }), jn = { class: "admin-status-page" }, Gn = /* @__PURE__ */ L({
856
+ }), Gn = { class: "admin-status-page" }, Hn = /* @__PURE__ */ L({
857
857
  __name: "ForbiddenPage",
858
858
  setup(e) {
859
859
  const t = ie();
860
- return (n, s) => (o(), c("div", jn, [
861
- $(r(j), {
860
+ return (n, s) => (o(), c("div", Gn, [
861
+ $(r(K), {
862
862
  padding: "lg",
863
863
  class: "admin-status-page__card"
864
864
  }, {
@@ -870,7 +870,7 @@ const Q = ne("admin-auth", () => {
870
870
  onClick: s[0] || (s[0] = (a) => r(t).replace({ name: "admin.home" }))
871
871
  }, {
872
872
  default: m(() => [...s[1] || (s[1] = [
873
- x(" На главную ", -1)
873
+ S(" На главную ", -1)
874
874
  ])]),
875
875
  _: 1
876
876
  })
@@ -879,12 +879,12 @@ const Q = ne("admin-auth", () => {
879
879
  })
880
880
  ]));
881
881
  }
882
- }), Hn = { class: "admin-status-page" }, Xn = /* @__PURE__ */ L({
882
+ }), Xn = { class: "admin-status-page" }, Yn = /* @__PURE__ */ L({
883
883
  __name: "NotFoundPage",
884
884
  setup(e) {
885
885
  const t = ie();
886
- return (n, s) => (o(), c("div", Hn, [
887
- $(r(j), {
886
+ return (n, s) => (o(), c("div", Xn, [
887
+ $(r(K), {
888
888
  padding: "lg",
889
889
  class: "admin-status-page__card"
890
890
  }, {
@@ -896,7 +896,7 @@ const Q = ne("admin-auth", () => {
896
896
  onClick: s[0] || (s[0] = (a) => r(t).replace({ name: "admin.home" }))
897
897
  }, {
898
898
  default: m(() => [...s[1] || (s[1] = [
899
- x(" На главную ", -1)
899
+ S(" На главную ", -1)
900
900
  ])]),
901
901
  _: 1
902
902
  })
@@ -905,51 +905,51 @@ const Q = ne("admin-auth", () => {
905
905
  })
906
906
  ]));
907
907
  }
908
- }), Yn = { class: "admin-settings-page" }, Jn = { class: "admin-settings-page__title" }, Qn = {
908
+ }), Jn = { class: "admin-settings-page" }, Qn = { class: "admin-settings-page__title" }, Zn = {
909
909
  key: 0,
910
910
  class: "admin-settings-page__hint"
911
- }, Zn = {
911
+ }, ea = {
912
912
  key: 1,
913
913
  class: "admin-settings-page__debug"
914
- }, ea = /* @__PURE__ */ L({
914
+ }, ta = /* @__PURE__ */ L({
915
915
  __name: "SettingsPage",
916
916
  setup(e) {
917
917
  const t = be(), n = oe(), s = v(() => String(t.params.slug ?? "")), a = v(() => n.manifest?.settings?.find((l) => l.slug === s.value) ?? null);
918
- return (l, i) => (o(), c("div", Yn, [
919
- $(r(j), { padding: "lg" }, {
918
+ return (l, i) => (o(), c("div", Jn, [
919
+ $(r(K), { padding: "lg" }, {
920
920
  default: m(() => [
921
- d("h1", Jn, p(a.value?.label ?? s.value), 1),
922
- a.value ? (o(), c("pre", Zn, p(JSON.stringify(a.value.fields, null, 2)), 1)) : (o(), c("p", Qn, " Settings «" + p(s.value) + "» не найдено в manifest'е. ", 1))
921
+ d("h1", Qn, h(a.value?.label ?? s.value), 1),
922
+ a.value ? (o(), c("pre", ea, h(JSON.stringify(a.value.fields, null, 2)), 1)) : (o(), c("p", Zn, " Settings «" + h(s.value) + "» не найдено в manifest'е. ", 1))
923
923
  ]),
924
924
  _: 1
925
925
  })
926
926
  ]));
927
927
  }
928
- }), ta = { class: "admin-status-page" }, na = { class: "admin-status-page__title" }, aa = { class: "admin-status-page__hint" }, la = /* @__PURE__ */ L({
928
+ }), na = { class: "admin-status-page" }, aa = { class: "admin-status-page__title" }, la = { class: "admin-status-page__hint" }, sa = /* @__PURE__ */ L({
929
929
  __name: "UnknownScreenPage",
930
930
  setup(e) {
931
931
  const t = be(), n = v(() => String(t.params.slug ?? "")), s = v(() => String(t.meta?.title ?? n.value));
932
- return (a, l) => (o(), c("div", ta, [
933
- $(r(j), {
932
+ return (a, l) => (o(), c("div", na, [
933
+ $(r(K), {
934
934
  padding: "lg",
935
935
  class: "admin-status-page__card"
936
936
  }, {
937
937
  default: m(() => [
938
- d("h1", na, p(s.value), 1),
939
- d("p", aa, [
940
- x(" Это заглушка для screen «" + p(n.value) + "». Передайте свой компонент через ", 1),
941
- l[0] || (l[0] = d("code", null, "createAdminApp(" + p("{") + " pages: " + p("{") + " screen: MyScreen " + p("}") + " " + p("}") + ")", -1)),
942
- l[1] || (l[1] = x(". ", -1))
938
+ d("h1", aa, h(s.value), 1),
939
+ d("p", la, [
940
+ S(" Это заглушка для screen «" + h(n.value) + "». Передайте свой компонент через ", 1),
941
+ l[0] || (l[0] = d("code", null, "createAdminApp(" + h("{") + " pages: " + h("{") + " screen: MyScreen " + h("}") + " " + h("}") + ")", -1)),
942
+ l[1] || (l[1] = S(". ", -1))
943
943
  ])
944
944
  ]),
945
945
  _: 1
946
946
  })
947
947
  ]));
948
948
  }
949
- }), sa = { class: "admin-auth-card__row" }, ia = ["href"], oa = {
949
+ }), ia = { class: "admin-auth-card__row" }, oa = ["href"], ra = {
950
950
  key: 1,
951
951
  style: { "text-align": "center", "font-size": "var(--uid-font-size-xs)", color: "var(--uid-text-secondary)", "padding-top": "4px" }
952
- }, ra = ["href"], ua = /* @__PURE__ */ L({
952
+ }, ua = ["href"], da = /* @__PURE__ */ L({
953
953
  __name: "LoginForm",
954
954
  props: {
955
955
  forgotUrl: { default: null },
@@ -958,28 +958,28 @@ const Q = ne("admin-auth", () => {
958
958
  },
959
959
  emits: ["success"],
960
960
  setup(e, { emit: t }) {
961
- const n = t, s = Q(), a = F(""), l = F(""), i = F(!1), u = F(!1), f = F(null), g = F({}), _ = v(() => g.value.email?.[0]), k = v(() => g.value.password?.[0]);
962
- async function S() {
961
+ const n = t, s = Q(), a = R(""), l = R(""), i = R(!1), u = R(!1), f = R(null), p = R({}), y = v(() => p.value.email?.[0]), k = v(() => p.value.password?.[0]);
962
+ async function x() {
963
963
  if (!u.value) {
964
- u.value = !0, f.value = null, g.value = {};
964
+ u.value = !0, f.value = null, p.value = {};
965
965
  try {
966
- const A = await s.login({
966
+ const C = await s.login({
967
967
  email: a.value,
968
968
  password: l.value,
969
969
  remember: i.value
970
970
  });
971
- n("success", A);
972
- } catch (A) {
973
- A instanceof Le ? (g.value = A.fields, f.value = A.firstFieldMessage()) : A instanceof Pe ? f.value = "Нет соединения с сервером" : A instanceof ae ? f.value = A.message || "Не удалось войти" : f.value = A.message;
971
+ n("success", C);
972
+ } catch (C) {
973
+ C instanceof Le ? (p.value = C.fields, f.value = C.firstFieldMessage()) : C instanceof Pe ? f.value = "Нет соединения с сервером" : C instanceof ae ? f.value = C.message || "Не удалось войти" : f.value = C.message;
974
974
  } finally {
975
975
  u.value = !1;
976
976
  }
977
977
  }
978
978
  }
979
- return (A, y) => (o(), c("form", {
979
+ return (C, _) => (o(), c("form", {
980
980
  class: "admin-auth-card__bd",
981
981
  novalidate: "",
982
- onSubmit: ut(S, ["prevent"])
982
+ onSubmit: ut(x, ["prevent"])
983
983
  }, [
984
984
  f.value ? (o(), b(r(te), {
985
985
  key: 0,
@@ -988,25 +988,25 @@ const Q = ne("admin-auth", () => {
988
988
  role: "alert"
989
989
  }, {
990
990
  default: m(() => [
991
- x(p(f.value), 1)
991
+ S(h(f.value), 1)
992
992
  ]),
993
993
  _: 1
994
- })) : R("", !0),
994
+ })) : U("", !0),
995
995
  $(r(de), {
996
996
  modelValue: a.value,
997
- "onUpdate:modelValue": y[0] || (y[0] = (h) => a.value = h),
997
+ "onUpdate:modelValue": _[0] || (_[0] = (g) => a.value = g),
998
998
  type: "email",
999
999
  label: "Email",
1000
1000
  placeholder: "you@company.com",
1001
1001
  autocomplete: "username",
1002
1002
  required: !0,
1003
1003
  disabled: u.value,
1004
- error: _.value,
1004
+ error: y.value,
1005
1005
  name: "email"
1006
1006
  }, null, 8, ["modelValue", "disabled", "error"]),
1007
1007
  $(r(de), {
1008
1008
  modelValue: l.value,
1009
- "onUpdate:modelValue": y[1] || (y[1] = (h) => l.value = h),
1009
+ "onUpdate:modelValue": _[1] || (_[1] = (g) => l.value = g),
1010
1010
  type: "password",
1011
1011
  label: "Пароль",
1012
1012
  autocomplete: "current-password",
@@ -1015,14 +1015,14 @@ const Q = ne("admin-auth", () => {
1015
1015
  error: k.value,
1016
1016
  name: "password"
1017
1017
  }, null, 8, ["modelValue", "disabled", "error"]),
1018
- d("div", sa, [
1018
+ d("div", ia, [
1019
1019
  $(r(vt), {
1020
1020
  modelValue: i.value,
1021
- "onUpdate:modelValue": y[2] || (y[2] = (h) => i.value = h),
1021
+ "onUpdate:modelValue": _[2] || (_[2] = (g) => i.value = g),
1022
1022
  disabled: u.value
1023
1023
  }, {
1024
- default: m(() => [...y[3] || (y[3] = [
1025
- x(" Запомнить меня ", -1)
1024
+ default: m(() => [..._[3] || (_[3] = [
1025
+ S(" Запомнить меня ", -1)
1026
1026
  ])]),
1027
1027
  _: 1
1028
1028
  }, 8, ["modelValue", "disabled"]),
@@ -1030,7 +1030,7 @@ const Q = ne("admin-auth", () => {
1030
1030
  key: 0,
1031
1031
  href: e.forgotUrl,
1032
1032
  class: "admin-auth-card__link"
1033
- }, " Забыли пароль? ", 8, ia)) : R("", !0)
1033
+ }, " Забыли пароль? ", 8, oa)) : U("", !0)
1034
1034
  ]),
1035
1035
  $(r(z), {
1036
1036
  type: "submit",
@@ -1040,35 +1040,35 @@ const Q = ne("admin-auth", () => {
1040
1040
  disabled: u.value
1041
1041
  }, {
1042
1042
  default: m(() => [
1043
- x(p(u.value ? "Вход…" : "Войти"), 1)
1043
+ S(h(u.value ? "Вход…" : "Войти"), 1)
1044
1044
  ]),
1045
1045
  _: 1
1046
1046
  }, 8, ["loading", "disabled"]),
1047
- e.ssoLinkLabel && e.ssoUrl ? (o(), c("div", oa, [
1048
- y[4] || (y[4] = x(" или войдите через ", -1)),
1047
+ e.ssoLinkLabel && e.ssoUrl ? (o(), c("div", ra, [
1048
+ _[4] || (_[4] = S(" или войдите через ", -1)),
1049
1049
  d("a", {
1050
1050
  href: e.ssoUrl,
1051
1051
  class: "admin-auth-card__link"
1052
- }, p(e.ssoLinkLabel), 9, ra)
1053
- ])) : R("", !0)
1052
+ }, h(e.ssoLinkLabel), 9, ua)
1053
+ ])) : U("", !0)
1054
1054
  ], 32));
1055
1055
  }
1056
- }), da = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ca = { class: "admin-auth-card__row" }, ma = /* @__PURE__ */ L({
1056
+ }), ca = ["value", "disabled", "aria-label", "onInput", "onKeydown"], ma = { class: "admin-auth-card__row" }, fa = /* @__PURE__ */ L({
1057
1057
  __name: "TwoFactorForm",
1058
1058
  emits: ["success", "cancel"],
1059
1059
  setup(e, { emit: t }) {
1060
- const n = t, s = Q(), a = F("totp"), l = F(["", "", "", "", "", ""]), i = F(""), u = F([]), f = F(!1), g = F(null), _ = F(null), k = v(() => l.value.join("")), S = v(() => a.value === "totp" ? k.value.length === 6 : i.value.trim().length > 0);
1061
- function A(w, V) {
1060
+ const n = t, s = Q(), a = R("totp"), l = R(["", "", "", "", "", ""]), i = R(""), u = R([]), f = R(!1), p = R(null), y = R(null), k = v(() => l.value.join("")), x = v(() => a.value === "totp" ? k.value.length === 6 : i.value.trim().length > 0);
1061
+ function C(w, V) {
1062
1062
  V instanceof HTMLInputElement && (u.value[w] = V);
1063
1063
  }
1064
- function y(w, V) {
1064
+ function _(w, V) {
1065
1065
  const W = V.target, G = W.value.replace(/\D/g, "").slice(-1);
1066
1066
  l.value[w] = G, W.value = G, G && w < l.value.length - 1 && _e(() => u.value[w + 1]?.focus()), k.value.length === l.value.length && q();
1067
1067
  }
1068
- function h(w, V) {
1068
+ function g(w, V) {
1069
1069
  V.key === "Backspace" && !l.value[w] && w > 0 ? _e(() => u.value[w - 1]?.focus()) : V.key === "ArrowLeft" && w > 0 ? (u.value[w - 1]?.focus(), V.preventDefault()) : V.key === "ArrowRight" && w < l.value.length - 1 && (u.value[w + 1]?.focus(), V.preventDefault());
1070
1070
  }
1071
- function U(w) {
1071
+ function F(w) {
1072
1072
  const W = (w.clipboardData?.getData("text") ?? "").replace(/\D/g, "").slice(0, l.value.length);
1073
1073
  if (W.length !== 0) {
1074
1074
  w.preventDefault();
@@ -1080,18 +1080,18 @@ const Q = ne("admin-auth", () => {
1080
1080
  }
1081
1081
  }
1082
1082
  async function q() {
1083
- if (!(f.value || !S.value)) {
1084
- f.value = !0, g.value = null;
1083
+ if (!(f.value || !x.value)) {
1084
+ f.value = !0, p.value = null;
1085
1085
  try {
1086
1086
  if (a.value === "totp")
1087
1087
  await s.twoFactorChallenge(k.value);
1088
1088
  else {
1089
1089
  const w = await s.twoFactorRecovery(i.value.trim());
1090
- _.value = w.remaining;
1090
+ y.value = w.remaining;
1091
1091
  }
1092
1092
  n("success");
1093
1093
  } catch (w) {
1094
- w instanceof Le ? g.value = w.firstFieldMessage() ?? "Неверный код" : w instanceof Pe ? g.value = "Нет соединения с сервером" : w instanceof ae ? g.value = w.message || "Не удалось проверить код" : g.value = w.message;
1094
+ w instanceof Le ? p.value = w.firstFieldMessage() ?? "Неверный код" : w instanceof Pe ? p.value = "Нет соединения с сервером" : w instanceof ae ? p.value = w.message || "Не удалось проверить код" : p.value = w.message;
1095
1095
  } finally {
1096
1096
  f.value = !1;
1097
1097
  }
@@ -1101,44 +1101,44 @@ const Q = ne("admin-auth", () => {
1101
1101
  s.cancelChallenge(), n("cancel");
1102
1102
  }
1103
1103
  function T() {
1104
- a.value = a.value === "totp" ? "recovery" : "totp", g.value = null;
1104
+ a.value = a.value === "totp" ? "recovery" : "totp", p.value = null;
1105
1105
  }
1106
1106
  return (w, V) => (o(), c("form", {
1107
1107
  class: "admin-auth-card__bd",
1108
1108
  novalidate: "",
1109
1109
  onSubmit: ut(q, ["prevent"])
1110
1110
  }, [
1111
- g.value ? (o(), b(r(te), {
1111
+ p.value ? (o(), b(r(te), {
1112
1112
  key: 0,
1113
1113
  variant: "danger",
1114
1114
  class: "admin-auth-card__alert",
1115
1115
  role: "alert"
1116
1116
  }, {
1117
1117
  default: m(() => [
1118
- x(p(g.value), 1)
1118
+ S(h(p.value), 1)
1119
1119
  ]),
1120
1120
  _: 1
1121
- })) : R("", !0),
1122
- _.value !== null ? (o(), b(r(te), {
1121
+ })) : U("", !0),
1122
+ y.value !== null ? (o(), b(r(te), {
1123
1123
  key: 1,
1124
1124
  variant: "info",
1125
1125
  class: "admin-auth-card__alert",
1126
1126
  role: "status"
1127
1127
  }, {
1128
1128
  default: m(() => [
1129
- x(" Использован recovery-код. Осталось: " + p(_.value), 1)
1129
+ S(" Использован recovery-код. Осталось: " + h(y.value), 1)
1130
1130
  ]),
1131
1131
  _: 1
1132
- })) : R("", !0),
1132
+ })) : U("", !0),
1133
1133
  a.value === "totp" ? (o(), c("div", {
1134
1134
  key: 2,
1135
1135
  class: "admin-code-input",
1136
- onPaste: U
1136
+ onPaste: F
1137
1137
  }, [
1138
1138
  (o(!0), c(P, null, D(l.value, (W, G) => (o(), c("input", {
1139
1139
  key: G,
1140
1140
  ref_for: !0,
1141
- ref: (C) => A(G, C),
1141
+ ref: (A) => C(G, A),
1142
1142
  value: l.value[G],
1143
1143
  type: "text",
1144
1144
  inputmode: "numeric",
@@ -1146,9 +1146,9 @@ const Q = ne("admin-auth", () => {
1146
1146
  maxlength: "1",
1147
1147
  disabled: f.value,
1148
1148
  "aria-label": `Цифра ${G + 1}`,
1149
- onInput: (C) => y(G, C),
1150
- onKeydown: (C) => h(G, C)
1151
- }, null, 40, da))), 128))
1149
+ onInput: (A) => _(G, A),
1150
+ onKeydown: (A) => g(G, A)
1151
+ }, null, 40, ca))), 128))
1152
1152
  ], 32)) : (o(), b(r(de), {
1153
1153
  key: 3,
1154
1154
  modelValue: i.value,
@@ -1164,23 +1164,23 @@ const Q = ne("admin-auth", () => {
1164
1164
  variant: "primary",
1165
1165
  size: "lg",
1166
1166
  loading: f.value,
1167
- disabled: f.value || !S.value
1167
+ disabled: f.value || !x.value
1168
1168
  }, {
1169
1169
  default: m(() => [
1170
- x(p(f.value ? "Проверка…" : "Подтвердить"), 1)
1170
+ S(h(f.value ? "Проверка…" : "Подтвердить"), 1)
1171
1171
  ]),
1172
1172
  _: 1
1173
1173
  }, 8, ["loading", "disabled"]),
1174
- d("div", ca, [
1174
+ d("div", ma, [
1175
1175
  d("button", {
1176
1176
  type: "button",
1177
1177
  class: "admin-auth-card__link",
1178
1178
  onClick: T
1179
1179
  }, [
1180
1180
  a.value === "totp" ? (o(), c(P, { key: 0 }, [
1181
- x("Использовать recovery-код")
1181
+ S("Использовать recovery-код")
1182
1182
  ], 64)) : (o(), c(P, { key: 1 }, [
1183
- x("Вернуться к коду из приложения")
1183
+ S("Вернуться к коду из приложения")
1184
1184
  ], 64))
1185
1185
  ]),
1186
1186
  d("button", {
@@ -1191,13 +1191,13 @@ const Q = ne("admin-auth", () => {
1191
1191
  ])
1192
1192
  ], 32));
1193
1193
  }
1194
- }), fa = { class: "admin-auth-page" }, va = {
1194
+ }), va = { class: "admin-auth-page" }, pa = {
1195
1195
  key: 0,
1196
1196
  class: "admin-auth-page__corner"
1197
- }, pa = { class: "admin-auth-card__hd" }, ga = ["src", "alt"], ha = {
1197
+ }, ga = { class: "admin-auth-card__hd" }, ha = ["src", "alt"], _a = {
1198
1198
  key: 1,
1199
1199
  "aria-hidden": "true"
1200
- }, _a = { key: 2 }, ya = { class: "admin-auth-card__title" }, ba = { class: "admin-auth-card__sub" }, ka = /* @__PURE__ */ L({
1200
+ }, ya = { key: 2 }, ba = { class: "admin-auth-card__title" }, ka = { class: "admin-auth-card__sub" }, wa = /* @__PURE__ */ L({
1201
1201
  __name: "LoginPage",
1202
1202
  props: {
1203
1203
  brandName: { default: "Laravel Admin" },
@@ -1225,19 +1225,19 @@ const Q = ne("admin-auth", () => {
1225
1225
  (i) => {
1226
1226
  i && l();
1227
1227
  }
1228
- ), Fe(() => {
1228
+ ), Re(() => {
1229
1229
  n.isAuthenticated && l();
1230
- }), (i, u) => (o(), c("div", fa, [
1231
- e.showCornerActions ? (o(), c("div", va, [
1230
+ }), (i, u) => (o(), c("div", va, [
1231
+ e.showCornerActions ? (o(), c("div", pa, [
1232
1232
  $(_t),
1233
1233
  $(yt)
1234
- ])) : R("", !0),
1235
- $(r(j), {
1234
+ ])) : U("", !0),
1235
+ $(r(K), {
1236
1236
  class: Z(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
1237
1237
  padding: "none"
1238
1238
  }, {
1239
1239
  default: m(() => [
1240
- d("div", pa, [
1240
+ d("div", ga, [
1241
1241
  d("div", {
1242
1242
  class: Z(["admin-auth-card__logo", r(n).isChallengePending ? "admin-auth-card__logo--accent" : ""])
1243
1243
  }, [
@@ -1245,30 +1245,30 @@ const Q = ne("admin-auth", () => {
1245
1245
  key: 0,
1246
1246
  src: e.brandLogo,
1247
1247
  alt: e.brandName
1248
- }, null, 8, ga)) : r(n).isChallengePending ? (o(), c("span", ha, "🛡")) : (o(), c("span", _a, p(e.brandMark), 1))
1248
+ }, null, 8, ha)) : r(n).isChallengePending ? (o(), c("span", _a, "🛡")) : (o(), c("span", ya, h(e.brandMark), 1))
1249
1249
  ], 2),
1250
- d("div", ya, [
1250
+ d("div", ba, [
1251
1251
  r(n).isChallengePending ? (o(), c(P, { key: 0 }, [
1252
- x("Двухфакторная проверка")
1252
+ S("Двухфакторная проверка")
1253
1253
  ], 64)) : (o(), c(P, { key: 1 }, [
1254
- x(p(e.brandName), 1)
1254
+ S(h(e.brandName), 1)
1255
1255
  ], 64))
1256
1256
  ]),
1257
- d("div", ba, [
1257
+ d("div", ka, [
1258
1258
  r(n).isChallengePending ? (o(), c(P, { key: 0 }, [
1259
- x(" Введите 6-значный код из приложения-аутентификатора ")
1259
+ S(" Введите 6-значный код из приложения-аутентификатора ")
1260
1260
  ], 64)) : (o(), c(P, { key: 1 }, [
1261
- x("Войдите, чтобы продолжить работу")
1261
+ S("Войдите, чтобы продолжить работу")
1262
1262
  ], 64))
1263
1263
  ])
1264
1264
  ]),
1265
- r(n).isChallengePending ? (o(), b(ma, {
1265
+ r(n).isChallengePending ? (o(), b(fa, {
1266
1266
  key: 0,
1267
1267
  onSuccess: u[0] || (u[0] = () => {
1268
1268
  }),
1269
1269
  onCancel: u[1] || (u[1] = () => {
1270
1270
  })
1271
- })) : (o(), b(ua, {
1271
+ })) : (o(), b(da, {
1272
1272
  key: 1,
1273
1273
  "forgot-url": e.forgotUrl,
1274
1274
  "sso-link-label": e.ssoLinkLabel,
@@ -1281,10 +1281,10 @@ const Q = ne("admin-auth", () => {
1281
1281
  }, 8, ["class"])
1282
1282
  ]));
1283
1283
  }
1284
- }), tt = { page: 1, per_page: 20, total: 0, last_page: 1 }, wa = ne("admin-resource-index", () => {
1285
- const e = F(null), t = F([]), n = F({ ...tt }), s = F(!1), a = F(!1), l = F(null);
1284
+ }), tt = { page: 1, per_page: 20, total: 0, last_page: 1 }, wt = ne("admin-resource-index", () => {
1285
+ const e = R(null), t = R([]), n = R({ ...tt }), s = R(!1), a = R(!1), l = R(null);
1286
1286
  let i = null;
1287
- const u = 200, f = F(""), g = F({}), _ = F(null), k = F(null), S = F(/* @__PURE__ */ new Set()), A = v(() => !s.value && l.value === null && t.value.length === 0), y = v(() => S.value.size), h = v(() => S.value.size > 0), U = v(() => l.value !== null), q = v(() => S.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((K) => S.value.has(M(K))) ? "all" : "mixed");
1287
+ const u = 200, f = R(""), p = R({}), y = R(null), k = R(null), x = R(/* @__PURE__ */ new Set()), C = v(() => !s.value && l.value === null && t.value.length === 0), _ = v(() => x.value.size), g = v(() => x.value.size > 0), F = v(() => l.value !== null), q = v(() => x.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((j) => x.value.has(M(j))) ? "all" : "mixed");
1288
1288
  function M(B) {
1289
1289
  return B.id ?? B.key ?? "";
1290
1290
  }
@@ -1292,20 +1292,20 @@ const Q = ne("admin-auth", () => {
1292
1292
  e.value !== B && (e.value = B, w(), s.value = !0);
1293
1293
  }
1294
1294
  function w() {
1295
- t.value = [], n.value = { ...tt }, s.value = !1, l.value = null, f.value = "", g.value = {}, _.value = null, k.value = null, S.value = /* @__PURE__ */ new Set();
1295
+ t.value = [], n.value = { ...tt }, s.value = !1, l.value = null, f.value = "", p.value = {}, y.value = null, k.value = null, x.value = /* @__PURE__ */ new Set();
1296
1296
  }
1297
1297
  function V(B = {}) {
1298
- const K = {
1298
+ const j = {
1299
1299
  page: B.page ?? n.value.page,
1300
1300
  per_page: B.per_page ?? n.value.per_page
1301
1301
  }, $e = B.search ?? f.value;
1302
- $e && (K.q = $e);
1303
- const ge = B.sort ?? _.value, Qe = B.direction ?? k.value;
1304
- ge && Qe !== null && (K.order = [{ column: ge, direction: Qe }]);
1305
- const Ut = B.filters ?? g.value, Be = {};
1306
- for (const [Rt, re] of Object.entries(Ut))
1307
- re == null || re === "" || (Be[Rt] = Array.isArray(re) ? re.join(",") : re);
1308
- return Object.keys(Be).length > 0 && (K.filters = Be), K;
1302
+ $e && (j.q = $e);
1303
+ const ge = B.sort ?? y.value, Qe = B.direction ?? k.value;
1304
+ ge && Qe !== null && (j.order = [{ column: ge, direction: Qe }]);
1305
+ const Ut = B.filters ?? p.value, Be = {};
1306
+ for (const [Tt, re] of Object.entries(Ut))
1307
+ re == null || re === "" || (Be[Tt] = Array.isArray(re) ? re.join(",") : re);
1308
+ return Object.keys(Be).length > 0 && (j.filters = Be), j;
1309
1309
  }
1310
1310
  async function W(B = {}) {
1311
1311
  if (!e.value)
@@ -1314,10 +1314,10 @@ const Q = ne("admin-auth", () => {
1314
1314
  a.value = !0;
1315
1315
  }, u);
1316
1316
  try {
1317
- const K = H(), $e = V(B), ge = await K.post(`/${e.value}/search`, $e);
1317
+ const j = H(), $e = V(B), ge = await j.post(`/${e.value}/search`, $e);
1318
1318
  t.value = ge.data, n.value = ge.meta;
1319
- } catch (K) {
1320
- throw l.value = K instanceof Error ? K : new Error(String(K)), K;
1319
+ } catch (j) {
1320
+ throw l.value = j instanceof Error ? j : new Error(String(j)), j;
1321
1321
  } finally {
1322
1322
  s.value = !1, a.value = !1, i !== null && (clearTimeout(i), i = null);
1323
1323
  }
@@ -1325,39 +1325,39 @@ const Q = ne("admin-auth", () => {
1325
1325
  async function G(B) {
1326
1326
  f.value = B, n.value.page = 1, await W();
1327
1327
  }
1328
- async function C(B, K) {
1329
- K == null || K === "" ? delete g.value[B] : g.value[B] = K, n.value.page = 1, await W();
1328
+ async function A(B, j) {
1329
+ j == null || j === "" ? delete p.value[B] : p.value[B] = j, n.value.page = 1, await W();
1330
1330
  }
1331
1331
  async function E() {
1332
- g.value = {}, n.value.page = 1, await W();
1332
+ p.value = {}, n.value.page = 1, await W();
1333
1333
  }
1334
- async function N(B, K = "asc") {
1335
- _.value = B, k.value = K, await W();
1334
+ async function N(B, j = "asc") {
1335
+ y.value = B, k.value = j, await W();
1336
1336
  }
1337
1337
  async function O(B) {
1338
- _.value === B ? k.value === "asc" ? k.value = "desc" : k.value === "desc" ? (_.value = null, k.value = null) : k.value = "asc" : (_.value = B, k.value = "asc"), await W();
1338
+ y.value === B ? k.value === "asc" ? k.value = "desc" : k.value === "desc" ? (y.value = null, k.value = null) : k.value = "asc" : (y.value = B, k.value = "asc"), await W();
1339
1339
  }
1340
1340
  async function X(B) {
1341
1341
  n.value.page = B, await W();
1342
1342
  }
1343
- function Ct(B) {
1344
- const K = new Set(S.value);
1345
- K.has(B) ? K.delete(B) : K.add(B), S.value = K;
1343
+ function At(B) {
1344
+ const j = new Set(x.value);
1345
+ j.has(B) ? j.delete(B) : j.add(B), x.value = j;
1346
1346
  }
1347
- function At() {
1347
+ function Et() {
1348
1348
  if (q.value === "all") {
1349
- S.value = /* @__PURE__ */ new Set();
1349
+ x.value = /* @__PURE__ */ new Set();
1350
1350
  return;
1351
1351
  }
1352
- const B = new Set(S.value);
1353
- for (const K of t.value) B.add(M(K));
1354
- S.value = B;
1352
+ const B = new Set(x.value);
1353
+ for (const j of t.value) B.add(M(j));
1354
+ x.value = B;
1355
1355
  }
1356
- function Et() {
1357
- S.value = /* @__PURE__ */ new Set();
1356
+ function Rt() {
1357
+ x.value = /* @__PURE__ */ new Set();
1358
1358
  }
1359
1359
  function Ft(B) {
1360
- return S.value.has(B);
1360
+ return x.value.has(B);
1361
1361
  }
1362
1362
  return {
1363
1363
  // state
@@ -1368,48 +1368,51 @@ const Q = ne("admin-auth", () => {
1368
1368
  slowLoading: a,
1369
1369
  error: l,
1370
1370
  search: f,
1371
- filters: g,
1372
- sortKey: _,
1371
+ filters: p,
1372
+ sortKey: y,
1373
1373
  sortDirection: k,
1374
- selection: S,
1374
+ selection: x,
1375
1375
  // getters
1376
- isEmpty: A,
1377
- hasError: U,
1378
- hasSelection: h,
1379
- selectedCount: y,
1376
+ isEmpty: C,
1377
+ hasError: F,
1378
+ hasSelection: g,
1379
+ selectedCount: _,
1380
1380
  selectionState: q,
1381
1381
  // actions
1382
1382
  setSlug: T,
1383
1383
  reset: w,
1384
1384
  load: W,
1385
1385
  setSearch: G,
1386
- setFilter: C,
1386
+ setFilter: A,
1387
1387
  clearFilters: E,
1388
1388
  setSort: N,
1389
1389
  toggleSort: O,
1390
1390
  setPage: X,
1391
- toggleRow: Ct,
1392
- toggleAllOnPage: At,
1393
- clearSelection: Et,
1391
+ toggleRow: At,
1392
+ toggleAllOnPage: Et,
1393
+ clearSelection: Rt,
1394
1394
  isSelected: Ft,
1395
1395
  rowId: M
1396
1396
  };
1397
- }), nt = "d.m.Y H:i:s", $a = "d.m.Y", xa = /^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}/;
1398
- function Sa(e, t, n = {}) {
1397
+ }), $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1398
+ __proto__: null,
1399
+ useResourceIndexStore: wt
1400
+ }, Symbol.toStringTag, { value: "Module" })), nt = "d.m.Y H:i:s", xa = "d.m.Y", Sa = /^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}/;
1401
+ function Ca(e, t, n = {}) {
1399
1402
  if (e == null) return "";
1400
- if (!t && typeof e == "string" && xa.test(e))
1403
+ if (!t && typeof e == "string" && Sa.test(e))
1401
1404
  return De(e, nt);
1402
1405
  switch (t) {
1403
1406
  case "date":
1404
- return De(String(e), n.format ?? $a);
1407
+ return De(String(e), n.format ?? xa);
1405
1408
  case "datetime":
1406
1409
  return De(String(e), n.format ?? nt);
1407
1410
  case "money":
1408
- return Ca(e, n.currency ?? "RUB", n.decimals ?? 2);
1411
+ return Aa(e, n.currency ?? "RUB", n.decimals ?? 2);
1409
1412
  case "boolean":
1410
- return Aa(e, n.trueLabel ?? "Да", n.falseLabel ?? "Нет");
1413
+ return Ea(e, n.trueLabel ?? "Да", n.falseLabel ?? "Нет");
1411
1414
  case "bytes":
1412
- return Ea(e);
1415
+ return Ra(e);
1413
1416
  default:
1414
1417
  return String(e);
1415
1418
  }
@@ -1442,37 +1445,37 @@ function De(e, t) {
1442
1445
  }
1443
1446
  return l;
1444
1447
  }
1445
- function Ca(e, t, n) {
1448
+ function Aa(e, t, n) {
1446
1449
  const s = typeof e == "number" ? e : Number(e);
1447
1450
  return isNaN(s) ? String(e) : `${s.toFixed(n)} ${t}`;
1448
1451
  }
1449
- function Aa(e, t, n) {
1452
+ function Ea(e, t, n) {
1450
1453
  return e === !0 || e === 1 || e === "1" || e === "true" ? t : n;
1451
1454
  }
1452
- function Ea(e) {
1455
+ function Ra(e) {
1453
1456
  const t = typeof e == "number" ? e : Number(e);
1454
1457
  return isNaN(t) ? String(e) : t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / 1024 / 1024).toFixed(1)} MB` : `${(t / 1024 / 1024 / 1024).toFixed(1)} GB`;
1455
1458
  }
1456
- const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-page__hd" }, Ra = { class: "admin-page__title-wrap" }, Ta = { class: "admin-page__title" }, La = {
1459
+ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-page__hd" }, Ta = { class: "admin-page__title-wrap" }, La = { class: "admin-page__title" }, Pa = {
1457
1460
  key: 0,
1458
1461
  class: "admin-page__count"
1459
- }, Pa = { class: "admin-page__actions" }, Ma = {
1462
+ }, Ma = { class: "admin-page__actions" }, Na = {
1460
1463
  key: 0,
1461
1464
  class: "admin-bulk-toolbar",
1462
1465
  role: "toolbar"
1463
- }, Na = { class: "admin-bulk-toolbar__count" }, Ba = {
1466
+ }, Ba = { class: "admin-bulk-toolbar__count" }, Ia = {
1464
1467
  key: 1,
1465
1468
  class: "admin-filter-bar"
1466
- }, Ia = ["value"], Da = {
1469
+ }, Da = ["value"], Va = {
1467
1470
  key: 2,
1468
1471
  class: "admin-resource-index__loading"
1469
- }, Va = {
1472
+ }, za = {
1470
1473
  key: 5,
1471
1474
  class: "admin-resource-index__table"
1472
- }, za = {
1475
+ }, qa = {
1473
1476
  key: 6,
1474
1477
  class: "admin-resource-index__footer"
1475
- }, qa = /* @__PURE__ */ L({
1478
+ }, Oa = /* @__PURE__ */ L({
1476
1479
  __name: "ResourceIndexPage",
1477
1480
  props: {
1478
1481
  slug: {},
@@ -1483,9 +1486,9 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1483
1486
  },
1484
1487
  emits: ["bulk-action", "row-click"],
1485
1488
  setup(e, { emit: t }) {
1486
- const n = e, s = t, a = wa(), l = oe(), i = Ye(), u = v(() => l.getResource(n.slug)), f = v(
1489
+ const n = e, s = t, a = wt(), l = oe(), i = Ye(), u = v(() => l.getResource(n.slug)), f = v(
1487
1490
  () => n.title ?? u.value?.label ?? n.slug
1488
- ), g = v(() => (u.value?.columns ?? []).map((E) => {
1491
+ ), p = v(() => (u.value?.columns ?? []).map((E) => {
1489
1492
  const N = E;
1490
1493
  return {
1491
1494
  key: String(N.key ?? N.name ?? ""),
@@ -1494,9 +1497,9 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1494
1497
  align: N.align ?? "left",
1495
1498
  width: typeof N.width == "string" ? N.width : void 0
1496
1499
  };
1497
- }).filter((E) => E.key)), _ = v(() => {
1498
- const C = u.value?.columns ?? [], E = {};
1499
- for (const N of C) {
1500
+ }).filter((E) => E.key)), y = v(() => {
1501
+ const A = u.value?.columns ?? [], E = {};
1502
+ for (const N of A) {
1500
1503
  const O = N, X = String(O.key ?? O.name ?? "");
1501
1504
  X && (E[X] = {
1502
1505
  preset: typeof O.preset == "string" ? O.preset : void 0,
@@ -1505,22 +1508,22 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1505
1508
  }
1506
1509
  return E;
1507
1510
  });
1508
- function k(C, E) {
1509
- const O = E?.row?.[C], X = _.value[C];
1510
- return Sa(O, X?.preset, X?.meta ?? {});
1511
+ function k(A, E) {
1512
+ const O = E?.row?.[A], X = y.value[A];
1513
+ return Ca(O, X?.preset, X?.meta ?? {});
1511
1514
  }
1512
- function S(C) {
1513
- return C?.row;
1515
+ function x(A) {
1516
+ return A?.row;
1514
1517
  }
1515
- const A = v(
1518
+ const C = v(
1516
1519
  () => a.search !== "" || Object.keys(a.filters).length > 0
1517
- ), y = v(
1518
- () => !a.isEmpty || A.value
1519
- ), h = v(() => {
1520
- const C = a.meta.total;
1521
- return C === 0 ? "" : `${a.items.length} из ${C}`;
1520
+ ), _ = v(
1521
+ () => !a.isEmpty || C.value
1522
+ ), g = v(() => {
1523
+ const A = a.meta.total;
1524
+ return A === 0 ? "" : `${a.items.length} из ${A}`;
1522
1525
  });
1523
- async function U() {
1526
+ async function F() {
1524
1527
  i.start();
1525
1528
  try {
1526
1529
  await a.load();
@@ -1529,71 +1532,71 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1529
1532
  i.end();
1530
1533
  }
1531
1534
  }
1532
- Fe(async () => {
1535
+ Re(async () => {
1533
1536
  a.setSlug(n.slug), l.manifest === null && await l.load().catch(() => {
1534
- }), await U();
1537
+ }), await F();
1535
1538
  }), ee(
1536
1539
  () => n.slug,
1537
- async (C, E) => {
1538
- C !== E && (a.setSlug(C), await U());
1540
+ async (A, E) => {
1541
+ A !== E && (a.setSlug(A), await F());
1539
1542
  }
1540
1543
  );
1541
- async function q(C) {
1542
- await _e(), await a.setSort(C, a.sortDirection);
1544
+ async function q(A) {
1545
+ await _e(), await a.setSort(A, a.sortDirection);
1543
1546
  }
1544
- async function M(C) {
1545
- await _e(), await a.setSort(a.sortKey, C);
1547
+ async function M(A) {
1548
+ await _e(), await a.setSort(a.sortKey, A);
1546
1549
  }
1547
- function T(C) {
1548
- a.selection = C;
1550
+ function T(A) {
1551
+ a.selection = A;
1549
1552
  }
1550
- async function w(C) {
1551
- await a.setPage(C);
1553
+ async function w(A) {
1554
+ await a.setPage(A);
1552
1555
  }
1553
- function V(C) {
1554
- s("row-click", C);
1556
+ function V(A) {
1557
+ s("row-click", A);
1555
1558
  }
1556
- function W(C) {
1557
- s("bulk-action", C, [...a.selection]);
1559
+ function W(A) {
1560
+ s("bulk-action", A, [...a.selection]);
1558
1561
  }
1559
1562
  async function G() {
1560
1563
  await a.load().catch(() => {
1561
1564
  });
1562
1565
  }
1563
- return (C, E) => (o(), c("section", Fa, [
1566
+ return (A, E) => (o(), c("section", Fa, [
1564
1567
  d("header", Ua, [
1565
- d("div", Ra, [
1566
- d("h1", Ta, p(f.value), 1),
1567
- e.subtitle || h.value ? (o(), c("div", La, [
1568
+ d("div", Ta, [
1569
+ d("h1", La, h(f.value), 1),
1570
+ e.subtitle || g.value ? (o(), c("div", Pa, [
1568
1571
  e.subtitle ? (o(), c(P, { key: 0 }, [
1569
- x(p(e.subtitle), 1)
1570
- ], 64)) : R("", !0),
1571
- e.subtitle && h.value ? (o(), c(P, { key: 1 }, [
1572
- x(" · ")
1573
- ], 64)) : R("", !0),
1574
- h.value ? (o(), c(P, { key: 2 }, [
1575
- x(p(h.value), 1)
1576
- ], 64)) : R("", !0)
1577
- ])) : R("", !0)
1572
+ S(h(e.subtitle), 1)
1573
+ ], 64)) : U("", !0),
1574
+ e.subtitle && g.value ? (o(), c(P, { key: 1 }, [
1575
+ S(" · ")
1576
+ ], 64)) : U("", !0),
1577
+ g.value ? (o(), c(P, { key: 2 }, [
1578
+ S(h(g.value), 1)
1579
+ ], 64)) : U("", !0)
1580
+ ])) : U("", !0)
1578
1581
  ]),
1579
- d("div", Pa, [
1580
- Y(C.$slots, "actions"),
1582
+ d("div", Ma, [
1583
+ Y(A.$slots, "actions"),
1581
1584
  e.createRouteName ? (o(), b(r(z), {
1582
1585
  key: 0,
1583
1586
  variant: "primary",
1584
- onClick: E[0] || (E[0] = (N) => C.$router.push({ name: e.createRouteName }))
1587
+ onClick: E[0] || (E[0] = (N) => A.$router.push({ name: e.createRouteName }))
1585
1588
  }, {
1586
1589
  default: m(() => [
1587
- x(p(e.createLabel), 1)
1590
+ S(h(e.createLabel), 1)
1588
1591
  ]),
1589
1592
  _: 1
1590
- })) : R("", !0)
1593
+ })) : U("", !0)
1591
1594
  ])
1592
1595
  ]),
1593
- r(a).hasSelection ? (o(), c("div", Ma, [
1594
- d("span", Na, [
1595
- E[7] || (E[7] = x(" Выбрано ", -1)),
1596
- d("b", null, p(r(a).selectedCount), 1)
1596
+ r(a).hasSelection ? (o(), c("div", Na, [
1597
+ d("span", Ba, [
1598
+ E[7] || (E[7] = S(" Выбрано ", -1)),
1599
+ d("b", null, h(r(a).selectedCount), 1)
1597
1600
  ]),
1598
1601
  E[13] || (E[13] = d("span", { class: "admin-bulk-toolbar__divider" }, null, -1)),
1599
1602
  $(r(z), {
@@ -1602,7 +1605,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1602
1605
  onClick: E[1] || (E[1] = (N) => W("publish"))
1603
1606
  }, {
1604
1607
  default: m(() => [...E[8] || (E[8] = [
1605
- x("Опубликовать", -1)
1608
+ S("Опубликовать", -1)
1606
1609
  ])]),
1607
1610
  _: 1
1608
1611
  }),
@@ -1612,7 +1615,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1612
1615
  onClick: E[2] || (E[2] = (N) => W("archive"))
1613
1616
  }, {
1614
1617
  default: m(() => [...E[9] || (E[9] = [
1615
- x("Архивировать", -1)
1618
+ S("Архивировать", -1)
1616
1619
  ])]),
1617
1620
  _: 1
1618
1621
  }),
@@ -1622,7 +1625,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1622
1625
  onClick: E[3] || (E[3] = (N) => W("export"))
1623
1626
  }, {
1624
1627
  default: m(() => [...E[10] || (E[10] = [
1625
- x("Экспорт", -1)
1628
+ S("Экспорт", -1)
1626
1629
  ])]),
1627
1630
  _: 1
1628
1631
  }),
@@ -1632,7 +1635,7 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1632
1635
  onClick: E[4] || (E[4] = (N) => W("delete"))
1633
1636
  }, {
1634
1637
  default: m(() => [...E[11] || (E[11] = [
1635
- x("Удалить", -1)
1638
+ S("Удалить", -1)
1636
1639
  ])]),
1637
1640
  _: 1
1638
1641
  }),
@@ -1643,19 +1646,19 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1643
1646
  onClick: r(a).clearSelection
1644
1647
  }, {
1645
1648
  default: m(() => [...E[12] || (E[12] = [
1646
- x(" Снять выделение ", -1)
1649
+ S(" Снять выделение ", -1)
1647
1650
  ])]),
1648
1651
  _: 1
1649
1652
  }, 8, ["onClick"])
1650
- ])) : y.value ? (o(), c("div", Ba, [
1653
+ ])) : _.value ? (o(), c("div", Ia, [
1651
1654
  d("input", {
1652
1655
  value: r(a).search,
1653
1656
  type: "search",
1654
1657
  placeholder: "Поиск…",
1655
1658
  class: "admin-filter-bar__search",
1656
- onKeydown: E[5] || (E[5] = Pt((N) => r(a).setSearch(N.target.value), ["enter"]))
1657
- }, null, 40, Ia),
1658
- Y(C.$slots, "filters", {
1659
+ onKeydown: E[5] || (E[5] = Mt((N) => r(a).setSearch(N.target.value), ["enter"]))
1660
+ }, null, 40, Da),
1661
+ Y(A.$slots, "filters", {
1659
1662
  filters: r(a).filters,
1660
1663
  setFilter: r(a).setFilter
1661
1664
  }),
@@ -1667,17 +1670,17 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1667
1670
  onClick: r(a).clearFilters
1668
1671
  }, {
1669
1672
  default: m(() => [...E[15] || (E[15] = [
1670
- x(" Сброс ", -1)
1673
+ S(" Сброс ", -1)
1671
1674
  ])]),
1672
1675
  _: 1
1673
- }, 8, ["onClick"])) : R("", !0)
1674
- ])) : R("", !0),
1675
- r(a).loading && r(a).items.length === 0 ? (o(), c("div", Da, [
1676
+ }, 8, ["onClick"])) : U("", !0)
1677
+ ])) : U("", !0),
1678
+ r(a).loading && r(a).items.length === 0 ? (o(), c("div", Va, [
1676
1679
  r(a).slowLoading ? (o(), c(P, { key: 0 }, D(8, (N) => $(r(We), {
1677
1680
  key: N,
1678
1681
  height: "40px"
1679
- })), 64)) : R("", !0)
1680
- ])) : r(a).hasError ? (o(), b(r(jt), {
1682
+ })), 64)) : U("", !0)
1683
+ ])) : r(a).hasError ? (o(), b(r(Gt), {
1681
1684
  key: 3,
1682
1685
  title: "Не удалось загрузить данные",
1683
1686
  description: r(a).error?.message ?? "Попробуйте обновить страницу.",
@@ -1689,13 +1692,13 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1689
1692
  onClick: G
1690
1693
  }, {
1691
1694
  default: m(() => [...E[17] || (E[17] = [
1692
- x("Обновить", -1)
1695
+ S("Обновить", -1)
1693
1696
  ])]),
1694
1697
  _: 1
1695
1698
  })
1696
1699
  ]),
1697
1700
  _: 1
1698
- }, 8, ["description"])) : r(a).isEmpty ? (o(), b(r(Gt), {
1701
+ }, 8, ["description"])) : r(a).isEmpty ? (o(), b(r(Ht), {
1699
1702
  key: 4,
1700
1703
  title: "Пока пусто",
1701
1704
  description: "Создайте первую запись или измените фильтры.",
@@ -1705,18 +1708,18 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1705
1708
  e.createRouteName ? (o(), b(r(z), {
1706
1709
  key: 0,
1707
1710
  variant: "primary",
1708
- onClick: E[6] || (E[6] = (N) => C.$router.push({ name: e.createRouteName }))
1711
+ onClick: E[6] || (E[6] = (N) => A.$router.push({ name: e.createRouteName }))
1709
1712
  }, {
1710
1713
  default: m(() => [
1711
- x(p(e.createLabel), 1)
1714
+ S(h(e.createLabel), 1)
1712
1715
  ]),
1713
1716
  _: 1
1714
- })) : R("", !0)
1717
+ })) : U("", !0)
1715
1718
  ]),
1716
1719
  _: 1
1717
- })) : (o(), c("div", Va, [
1718
- $(r(Ke), {
1719
- columns: g.value,
1720
+ })) : (o(), c("div", za, [
1721
+ $(r(je), {
1722
+ columns: p.value,
1720
1723
  data: r(a).items,
1721
1724
  "sort-key": r(a).sortKey,
1722
1725
  "sort-direction": r(a).sortDirection,
@@ -1728,70 +1731,70 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1728
1731
  "onUpdate:selection": T,
1729
1732
  onRowClick: V
1730
1733
  }, qe({ _: 2 }, [
1731
- D(g.value, (N) => ({
1734
+ D(p.value, (N) => ({
1732
1735
  name: N.key,
1733
1736
  fn: m((O) => [
1734
- Y(C.$slots, `cell-${N.key}`, {
1735
- row: S(O)
1737
+ Y(A.$slots, `cell-${N.key}`, {
1738
+ row: x(O)
1736
1739
  }, () => [
1737
- x(p(k(N.key, O)), 1)
1740
+ S(h(k(N.key, O)), 1)
1738
1741
  ])
1739
1742
  ])
1740
1743
  }))
1741
1744
  ]), 1032, ["columns", "data", "sort-key", "sort-direction", "selection", "row-key"])
1742
1745
  ])),
1743
- !r(a).loading && !r(a).hasError && !r(a).isEmpty ? (o(), c("footer", za, [
1744
- $(r(Ht), {
1746
+ !r(a).loading && !r(a).hasError && !r(a).isEmpty ? (o(), c("footer", qa, [
1747
+ $(r(Xt), {
1745
1748
  "model-value": r(a).meta.page,
1746
1749
  total: r(a).meta.total,
1747
1750
  "per-page": r(a).meta.per_page,
1748
1751
  "onUpdate:modelValue": w
1749
1752
  }, null, 8, ["model-value", "total", "per-page"])
1750
- ])) : R("", !0)
1753
+ ])) : U("", !0)
1751
1754
  ]));
1752
1755
  }
1753
- }), wt = ne("admin-resource-form", () => {
1754
- const e = F(null), t = F("create"), n = F(null), s = F({}), a = F({}), l = F({}), i = F(!1), u = F(!1), f = F(!1), g = F(null), _ = v(() => t.value === "create"), k = v(() => t.value === "edit"), S = v(() => t.value === "view"), A = v(() => g.value !== null), y = v(() => {
1755
- const C = s.value, E = a.value, N = /* @__PURE__ */ new Set([...Object.keys(C), ...Object.keys(E)]);
1756
+ }), $t = ne("admin-resource-form", () => {
1757
+ const e = R(null), t = R("create"), n = R(null), s = R({}), a = R({}), l = R({}), i = R(!1), u = R(!1), f = R(!1), p = R(null), y = v(() => t.value === "create"), k = v(() => t.value === "edit"), x = v(() => t.value === "view"), C = v(() => p.value !== null), _ = v(() => {
1758
+ const A = s.value, E = a.value, N = /* @__PURE__ */ new Set([...Object.keys(A), ...Object.keys(E)]);
1756
1759
  for (const O of N)
1757
- if (!Object.is(C[O], E[O]))
1758
- if (typeof C[O] == "object" || typeof E[O] == "object") {
1759
- if (JSON.stringify(C[O]) !== JSON.stringify(E[O])) return !0;
1760
+ if (!Object.is(A[O], E[O]))
1761
+ if (typeof A[O] == "object" || typeof E[O] == "object") {
1762
+ if (JSON.stringify(A[O]) !== JSON.stringify(E[O])) return !0;
1760
1763
  } else
1761
1764
  return !0;
1762
1765
  return !1;
1763
1766
  });
1764
- function h(C, E) {
1765
- for (const N of Object.keys(C)) delete C[N];
1766
- Object.assign(C, E);
1767
+ function g(A, E) {
1768
+ for (const N of Object.keys(A)) delete A[N];
1769
+ Object.assign(A, E);
1767
1770
  }
1768
- function U() {
1769
- h(s.value, {}), h(a.value, {}), l.value = {}, i.value = !1, u.value = !1, f.value = !1, g.value = null, n.value = null;
1771
+ function F() {
1772
+ g(s.value, {}), g(a.value, {}), l.value = {}, i.value = !1, u.value = !1, f.value = !1, p.value = null, n.value = null;
1770
1773
  }
1771
- function q(C, E = {}) {
1772
- e.value = C, t.value = "create", n.value = null, h(s.value, E), h(a.value, E), l.value = {}, g.value = null;
1774
+ function q(A, E = {}) {
1775
+ e.value = A, t.value = "create", n.value = null, g(s.value, E), g(a.value, E), l.value = {}, p.value = null;
1773
1776
  }
1774
- async function M(C, E, N = "edit") {
1775
- e.value = C, t.value = N, n.value = E, i.value = !0, g.value = null, l.value = {};
1777
+ async function M(A, E, N = "edit") {
1778
+ e.value = A, t.value = N, n.value = E, i.value = !0, p.value = null, l.value = {};
1776
1779
  try {
1777
- const X = await H().get(`/${C}/read`, {
1780
+ const X = await H().get(`/${A}/read`, {
1778
1781
  params: { id: E }
1779
1782
  });
1780
- h(s.value, X.record), h(a.value, X.record);
1783
+ g(s.value, X.record), g(a.value, X.record);
1781
1784
  } catch (O) {
1782
- throw g.value = O instanceof Error ? O : new Error(String(O)), O;
1785
+ throw p.value = O instanceof Error ? O : new Error(String(O)), O;
1783
1786
  } finally {
1784
1787
  i.value = !1;
1785
1788
  }
1786
1789
  }
1787
- function T(C, E) {
1788
- if (s.value[C] = E, l.value[C]) {
1790
+ function T(A, E) {
1791
+ if (s.value[A] = E, l.value[A]) {
1789
1792
  const N = { ...l.value };
1790
- delete N[C], l.value = N;
1793
+ delete N[A], l.value = N;
1791
1794
  }
1792
1795
  }
1793
- function w(C) {
1794
- l.value = { ...C };
1796
+ function w(A) {
1797
+ l.value = { ...A };
1795
1798
  }
1796
1799
  function V() {
1797
1800
  l.value = {};
@@ -1799,14 +1802,14 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1799
1802
  async function W() {
1800
1803
  if (!e.value) throw new Error("useResourceFormStore.save() before slug set");
1801
1804
  if (u.value) throw new Error("Already saving");
1802
- u.value = !0, g.value = null, l.value = {};
1805
+ u.value = !0, p.value = null, l.value = {};
1803
1806
  try {
1804
- const C = H(), E = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, N = t.value === "create" ? s.value : { id: n.value, ...s.value }, O = await C.post(E, N), X = O.record?.id ?? O.id;
1807
+ const A = H(), E = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, N = t.value === "create" ? s.value : { id: n.value, ...s.value }, O = await A.post(E, N), X = O.record?.id ?? O.id;
1805
1808
  if (X === void 0)
1806
1809
  throw new Error("save: backend response does not contain record.id");
1807
- return n.value = X, h(a.value, { ...s.value }), t.value = "edit", X;
1808
- } catch (C) {
1809
- throw C instanceof Le ? l.value = { ...C.fields } : (C instanceof ae || C instanceof Error) && (g.value = C), C;
1810
+ return n.value = X, g(a.value, { ...s.value }), t.value = "edit", X;
1811
+ } catch (A) {
1812
+ throw A instanceof Le ? l.value = { ...A.fields } : (A instanceof ae || A instanceof Error) && (p.value = A), A;
1810
1813
  } finally {
1811
1814
  u.value = !1;
1812
1815
  }
@@ -1815,11 +1818,11 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1815
1818
  if (!e.value || n.value === null)
1816
1819
  throw new Error("Nothing to delete");
1817
1820
  if (f.value) throw new Error("Already deleting");
1818
- f.value = !0, g.value = null;
1821
+ f.value = !0, p.value = null;
1819
1822
  try {
1820
1823
  await H().post(`/${e.value}/delete`, { id: n.value });
1821
- } catch (C) {
1822
- throw C instanceof Error && (g.value = C), C;
1824
+ } catch (A) {
1825
+ throw A instanceof Error && (p.value = A), A;
1823
1826
  } finally {
1824
1827
  f.value = !1;
1825
1828
  }
@@ -1835,15 +1838,15 @@ const Fa = { class: "admin-page admin-resource-index" }, Ua = { class: "admin-pa
1835
1838
  loading: i,
1836
1839
  saving: u,
1837
1840
  deleting: f,
1838
- error: g,
1841
+ error: p,
1839
1842
  // getters
1840
- isCreate: _,
1843
+ isCreate: y,
1841
1844
  isEdit: k,
1842
- isView: S,
1843
- isDirty: y,
1844
- hasError: A,
1845
+ isView: x,
1846
+ isDirty: _,
1847
+ hasError: C,
1845
1848
  // actions
1846
- reset: U,
1849
+ reset: F,
1847
1850
  prepareCreate: q,
1848
1851
  load: M,
1849
1852
  setField: T,
@@ -1877,14 +1880,14 @@ function Me() {
1877
1880
  }
1878
1881
  };
1879
1882
  }
1880
- const me = Me(), fe = Me(), Qi = me.register, $t = me.get, Zi = me.has, eo = me.list, to = fe.register, at = fe.get, no = fe.has, ao = fe.list;
1881
- function lo() {
1883
+ const me = Me(), fe = Me(), Zi = me.register, xt = me.get, eo = me.has, to = me.list, no = fe.register, at = fe.get, ao = fe.has, lo = fe.list;
1884
+ function so() {
1882
1885
  me.clear(), fe.clear();
1883
1886
  }
1884
- function Oa(e) {
1887
+ function Wa(e) {
1885
1888
  e.fields && me.registerBundle(e.fields), e.layouts && fe.registerBundle(e.layouts);
1886
1889
  }
1887
- const xt = /* @__PURE__ */ L({
1890
+ const St = /* @__PURE__ */ L({
1888
1891
  __name: "UnknownField",
1889
1892
  props: {
1890
1893
  type: {},
@@ -1893,30 +1896,30 @@ const xt = /* @__PURE__ */ L({
1893
1896
  setup(e) {
1894
1897
  return (t, n) => (o(), b(r(te), { variant: "warning" }, {
1895
1898
  title: m(() => [
1896
- x("Неизвестный тип поля: " + p(e.type), 1)
1899
+ S("Неизвестный тип поля: " + h(e.type), 1)
1897
1900
  ]),
1898
1901
  default: m(() => [
1899
1902
  e.name ? (o(), c(P, { key: 0 }, [
1900
- d("code", null, p(e.name), 1),
1901
- n[0] || (n[0] = x(" — зарегистрируйте field-компонент через ", -1)),
1902
- d("code", null, "registerField('" + p(e.type) + "', YourComponent)", 1),
1903
- n[1] || (n[1] = x(". ", -1))
1904
- ], 64)) : R("", !0)
1903
+ d("code", null, h(e.name), 1),
1904
+ n[0] || (n[0] = S(" — зарегистрируйте field-компонент через ", -1)),
1905
+ d("code", null, "registerField('" + h(e.type) + "', YourComponent)", 1),
1906
+ n[1] || (n[1] = S(". ", -1))
1907
+ ], 64)) : U("", !0)
1905
1908
  ]),
1906
1909
  _: 1
1907
1910
  }));
1908
1911
  }
1909
- }), St = /* @__PURE__ */ L({
1912
+ }), Ct = /* @__PURE__ */ L({
1910
1913
  __name: "FieldRenderer",
1911
1914
  props: {
1912
1915
  node: {}
1913
1916
  },
1914
1917
  setup(e) {
1915
- const t = e, n = v(() => $t(t.node.type)), s = v(() => {
1918
+ const t = e, n = v(() => xt(t.node.type)), s = v(() => {
1916
1919
  const { type: a, ...l } = t.node;
1917
1920
  return l;
1918
1921
  });
1919
- return (a, l) => n.value ? (o(), b(se(n.value), Ue(Re({ key: 0 }, s.value)), null, 16)) : (o(), b(xt, {
1922
+ return (a, l) => n.value ? (o(), b(se(n.value), Fe(Ue({ key: 0 }, s.value)), null, 16)) : (o(), b(St, {
1920
1923
  key: 1,
1921
1924
  type: e.node.type,
1922
1925
  name: e.node.name
@@ -1936,24 +1939,24 @@ const xt = /* @__PURE__ */ L({
1936
1939
  return i ? { kind: "layout", component: i } : { kind: "unknown" };
1937
1940
  }
1938
1941
  const l = at(t.node.type);
1939
- return l ? { kind: "layout", component: l } : $t(t.node.type) ? { kind: "field" } : { kind: "unknown" };
1942
+ return l ? { kind: "layout", component: l } : xt(t.node.type) ? { kind: "field" } : { kind: "unknown" };
1940
1943
  }), s = v(() => {
1941
1944
  const { type: l, kind: i, ...u } = t.node;
1942
1945
  return u;
1943
1946
  }), a = v(() => t.node);
1944
- return (l, i) => n.value.kind === "layout" && n.value.component ? (o(), b(se(n.value.component), Ue(Re({ key: 0 }, s.value)), null, 16)) : n.value.kind === "field" ? (o(), b(St, {
1947
+ return (l, i) => n.value.kind === "layout" && n.value.component ? (o(), b(se(n.value.component), Fe(Ue({ key: 0 }, s.value)), null, 16)) : n.value.kind === "field" ? (o(), b(Ct, {
1945
1948
  key: 1,
1946
1949
  node: a.value
1947
- }, null, 8, ["node"])) : (o(), b(xt, {
1950
+ }, null, 8, ["node"])) : (o(), b(St, {
1948
1951
  key: 2,
1949
1952
  type: e.node.type,
1950
1953
  name: e.node.name
1951
1954
  }, null, 8, ["type", "name"]));
1952
1955
  }
1953
- }), Wa = { class: "admin-page admin-resource-form" }, Ka = { class: "admin-page__hd" }, ja = { class: "admin-page__title-wrap" }, Ga = { class: "admin-page__title" }, Ha = { class: "admin-page__actions" }, Xa = {
1956
+ }), ja = { class: "admin-page admin-resource-form" }, Ka = { class: "admin-page__hd" }, Ga = { class: "admin-page__title-wrap" }, Ha = { class: "admin-page__title" }, Xa = { class: "admin-page__actions" }, Ya = {
1954
1957
  key: 1,
1955
1958
  class: "admin-resource-form__loading"
1956
- }, Ya = {
1959
+ }, Ja = {
1957
1960
  key: 3,
1958
1961
  class: "admin-resource-form__savebar"
1959
1962
  }, lt = /* @__PURE__ */ L({
@@ -1964,20 +1967,20 @@ const xt = /* @__PURE__ */ L({
1964
1967
  indexRouteName: { default: "admin.home" }
1965
1968
  },
1966
1969
  setup(e) {
1967
- const t = e, n = wt(), s = oe(), a = ie(), l = ht(n.state, n.errors);
1970
+ const t = e, n = $t(), s = oe(), a = ie(), l = ht(n.state, n.errors);
1968
1971
  ee(
1969
1972
  () => n.errors,
1970
- (y) => {
1971
- l.setErrors({ ...y });
1973
+ (_) => {
1974
+ l.setErrors({ ..._ });
1972
1975
  }
1973
1976
  );
1974
1977
  const i = v(() => s.getResource(t.slug)), u = v(
1975
1978
  () => i.value?.fields ?? []
1976
- ), f = v(() => n.isCreate ? `Создать: ${i.value?.label ?? t.slug}` : `${i.value?.label ?? t.slug}: запись #${t.id}`), g = v(() => {
1977
- const y = n.state.status;
1978
- return typeof y == "string" ? y : null;
1979
- }), _ = v(() => {
1980
- switch (g.value) {
1979
+ ), f = v(() => n.isCreate ? `Создать: ${i.value?.label ?? t.slug}` : `${i.value?.label ?? t.slug}: запись #${t.id}`), p = v(() => {
1980
+ const _ = n.state.status;
1981
+ return typeof _ == "string" ? _ : null;
1982
+ }), y = v(() => {
1983
+ switch (p.value) {
1981
1984
  case "published":
1982
1985
  return "success";
1983
1986
  case "review":
@@ -1989,63 +1992,63 @@ const xt = /* @__PURE__ */ L({
1989
1992
  return "default";
1990
1993
  }
1991
1994
  });
1992
- Fe(async () => {
1995
+ Re(async () => {
1993
1996
  s.manifest === null && await s.load().catch(() => {
1994
1997
  }), t.id !== null && t.id !== void 0 ? await n.load(t.slug, t.id, "edit").catch(() => {
1995
1998
  }) : n.prepareCreate(t.slug);
1996
1999
  }), ee(
1997
2000
  () => [t.slug, t.id],
1998
- async ([y, h]) => {
1999
- h != null ? await n.load(y, h, "edit").catch(() => {
2000
- }) : n.prepareCreate(y);
2001
+ async ([_, g]) => {
2002
+ g != null ? await n.load(_, g, "edit").catch(() => {
2003
+ }) : n.prepareCreate(_);
2001
2004
  }
2002
2005
  );
2003
2006
  async function k() {
2004
2007
  try {
2005
- const y = await n.save();
2008
+ const _ = await n.save();
2006
2009
  n.isCreate && a.push({
2007
2010
  name: `admin.resource.${t.slug}.edit`,
2008
- params: { id: y }
2011
+ params: { id: _ }
2009
2012
  }).catch(() => {
2010
2013
  });
2011
2014
  } catch {
2012
2015
  }
2013
2016
  }
2014
- async function S() {
2017
+ async function x() {
2015
2018
  confirm("Удалить запись?") && (await n.destroy().catch(() => {
2016
2019
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
2017
2020
  }));
2018
2021
  }
2019
- function A() {
2022
+ function C() {
2020
2023
  n.isDirty && !confirm("Несохранённые изменения будут потеряны. Продолжить?") || a.push({ name: t.indexRouteName }).catch(() => {
2021
2024
  });
2022
2025
  }
2023
- return (y, h) => (o(), c("section", Wa, [
2026
+ return (_, g) => (o(), c("section", ja, [
2024
2027
  d("header", Ka, [
2025
- d("div", ja, [
2028
+ d("div", Ga, [
2026
2029
  d("a", {
2027
2030
  class: "admin-resource-form__back",
2028
- onClick: A
2031
+ onClick: C
2029
2032
  }, "← Назад"),
2030
- d("h1", Ga, p(f.value), 1),
2031
- g.value ? (o(), b(r(je), {
2033
+ d("h1", Ha, h(f.value), 1),
2034
+ p.value ? (o(), b(r(Ke), {
2032
2035
  key: 0,
2033
- variant: _.value
2036
+ variant: y.value
2034
2037
  }, {
2035
2038
  default: m(() => [
2036
- x(p(g.value), 1)
2039
+ S(h(p.value), 1)
2037
2040
  ]),
2038
2041
  _: 1
2039
- }, 8, ["variant"])) : R("", !0)
2042
+ }, 8, ["variant"])) : U("", !0)
2040
2043
  ]),
2041
- d("div", Ha, [
2044
+ d("div", Xa, [
2042
2045
  $(r(z), {
2043
2046
  variant: "ghost",
2044
2047
  disabled: r(n).saving || r(n).deleting,
2045
- onClick: A
2048
+ onClick: C
2046
2049
  }, {
2047
- default: m(() => [...h[0] || (h[0] = [
2048
- x(" Отмена ", -1)
2050
+ default: m(() => [...g[0] || (g[0] = [
2051
+ S(" Отмена ", -1)
2049
2052
  ])]),
2050
2053
  _: 1
2051
2054
  }, 8, ["disabled"]),
@@ -2054,13 +2057,13 @@ const xt = /* @__PURE__ */ L({
2054
2057
  variant: "danger",
2055
2058
  disabled: r(n).saving || r(n).deleting,
2056
2059
  loading: r(n).deleting,
2057
- onClick: S
2060
+ onClick: x
2058
2061
  }, {
2059
- default: m(() => [...h[1] || (h[1] = [
2060
- x(" Удалить ", -1)
2062
+ default: m(() => [...g[1] || (g[1] = [
2063
+ S(" Удалить ", -1)
2061
2064
  ])]),
2062
2065
  _: 1
2063
- }, 8, ["disabled", "loading"])) : R("", !0),
2066
+ }, 8, ["disabled", "loading"])) : U("", !0),
2064
2067
  $(r(z), {
2065
2068
  variant: "primary",
2066
2069
  disabled: r(n).saving || r(n).loading,
@@ -2068,7 +2071,7 @@ const xt = /* @__PURE__ */ L({
2068
2071
  onClick: k
2069
2072
  }, {
2070
2073
  default: m(() => [
2071
- x(p(r(n).isCreate ? "Создать" : "Сохранить"), 1)
2074
+ S(h(r(n).isCreate ? "Создать" : "Сохранить"), 1)
2072
2075
  ]),
2073
2076
  _: 1
2074
2077
  }, 8, ["disabled", "loading"])
@@ -2081,37 +2084,37 @@ const xt = /* @__PURE__ */ L({
2081
2084
  role: "alert"
2082
2085
  }, {
2083
2086
  default: m(() => [
2084
- x(p(r(n).error?.message ?? "Не удалось сохранить запись"), 1)
2087
+ S(h(r(n).error?.message ?? "Не удалось сохранить запись"), 1)
2085
2088
  ]),
2086
2089
  _: 1
2087
- })) : R("", !0),
2088
- r(n).loading ? (o(), c("div", Xa, [
2089
- (o(), c(P, null, D(6, (U) => $(r(We), {
2090
- key: U,
2090
+ })) : U("", !0),
2091
+ r(n).loading ? (o(), c("div", Ya, [
2092
+ (o(), c(P, null, D(6, (F) => $(r(We), {
2093
+ key: F,
2091
2094
  height: "40px"
2092
2095
  })), 64))
2093
- ])) : (o(), b(r(j), {
2096
+ ])) : (o(), b(r(K), {
2094
2097
  key: 2,
2095
2098
  padding: "md",
2096
2099
  class: "admin-resource-form__body"
2097
2100
  }, {
2098
2101
  default: m(() => [
2099
- (o(!0), c(P, null, D(u.value, (U, q) => (o(), b(we, {
2102
+ (o(!0), c(P, null, D(u.value, (F, q) => (o(), b(we, {
2100
2103
  key: q,
2101
- node: U
2104
+ node: F
2102
2105
  }, null, 8, ["node"]))), 128))
2103
2106
  ]),
2104
2107
  _: 1
2105
2108
  })),
2106
- r(n).isDirty && !r(n).loading ? (o(), c("div", Ya, [
2107
- h[4] || (h[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
2109
+ r(n).isDirty && !r(n).loading ? (o(), c("div", Ja, [
2110
+ g[4] || (g[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
2108
2111
  $(r(z), {
2109
2112
  variant: "ghost",
2110
2113
  size: "sm",
2111
- onClick: A
2114
+ onClick: C
2112
2115
  }, {
2113
- default: m(() => [...h[2] || (h[2] = [
2114
- x("Отмена", -1)
2116
+ default: m(() => [...g[2] || (g[2] = [
2117
+ S("Отмена", -1)
2115
2118
  ])]),
2116
2119
  _: 1
2117
2120
  }),
@@ -2122,15 +2125,15 @@ const xt = /* @__PURE__ */ L({
2122
2125
  disabled: r(n).saving,
2123
2126
  onClick: k
2124
2127
  }, {
2125
- default: m(() => [...h[3] || (h[3] = [
2126
- x(" Сохранить ", -1)
2128
+ default: m(() => [...g[3] || (g[3] = [
2129
+ S(" Сохранить ", -1)
2127
2130
  ])]),
2128
2131
  _: 1
2129
2132
  }, 8, ["loading", "disabled"])
2130
- ])) : R("", !0)
2133
+ ])) : U("", !0)
2131
2134
  ]));
2132
2135
  }
2133
- }), ve = Me(), so = ve.register, st = ve.get, io = ve.has, oo = ve.list, ro = ve.clear, Ja = ve.registerBundle, Qa = /* @__PURE__ */ L({
2136
+ }), ve = Me(), io = ve.register, st = ve.get, oo = ve.has, ro = ve.list, uo = ve.clear, Qa = ve.registerBundle, Za = /* @__PURE__ */ L({
2134
2137
  __name: "UnknownEntry",
2135
2138
  props: {
2136
2139
  type: {},
@@ -2139,41 +2142,41 @@ const xt = /* @__PURE__ */ L({
2139
2142
  setup(e) {
2140
2143
  return (t, n) => (o(), b(r(te), { variant: "warning" }, {
2141
2144
  title: m(() => [
2142
- x("Неизвестный тип infolist-entry: " + p(e.type), 1)
2145
+ S("Неизвестный тип infolist-entry: " + h(e.type), 1)
2143
2146
  ]),
2144
2147
  default: m(() => [
2145
- n[0] || (n[0] = x(" Зарегистрируйте через ", -1)),
2146
- d("code", null, "registerInfolistEntry('" + p(e.type) + "', YourComponent)", 1),
2147
- n[1] || (n[1] = x(". ", -1))
2148
+ n[0] || (n[0] = S(" Зарегистрируйте через ", -1)),
2149
+ d("code", null, "registerInfolistEntry('" + h(e.type) + "', YourComponent)", 1),
2150
+ n[1] || (n[1] = S(". ", -1))
2148
2151
  ]),
2149
2152
  _: 1
2150
2153
  }));
2151
2154
  }
2152
- }), Za = {
2155
+ }), el = {
2153
2156
  key: 1,
2154
2157
  class: "admin-infolist-rows"
2155
- }, el = {
2158
+ }, tl = {
2156
2159
  key: 2,
2157
2160
  class: "admin-infolist-cols"
2158
- }, tl = {
2161
+ }, nl = {
2159
2162
  key: 3,
2160
2163
  class: "admin-infolist-section"
2161
- }, nl = {
2164
+ }, al = {
2162
2165
  key: 0,
2163
2166
  class: "admin-infolist-section__hd"
2164
- }, al = {
2167
+ }, ll = {
2165
2168
  key: 0,
2166
2169
  class: "admin-infolist-section__title"
2167
- }, ll = {
2170
+ }, sl = {
2168
2171
  key: 1,
2169
2172
  class: "admin-infolist-section__description"
2170
- }, sl = { class: "admin-infolist-section__body" }, il = {
2173
+ }, il = { class: "admin-infolist-section__body" }, ol = {
2171
2174
  key: 4,
2172
2175
  class: "admin-infolist-tabs"
2173
- }, ol = {
2176
+ }, rl = {
2174
2177
  class: "admin-infolist-tabs__list",
2175
2178
  role: "tablist"
2176
- }, rl = { class: "admin-infolist-tabs__panel" }, ul = /* @__PURE__ */ L({
2179
+ }, ul = { class: "admin-infolist-tabs__panel" }, dl = /* @__PURE__ */ L({
2177
2180
  __name: "InfolistRenderer",
2178
2181
  props: {
2179
2182
  node: {}
@@ -2188,64 +2191,64 @@ const xt = /* @__PURE__ */ L({
2188
2191
  return n.has(t.node.type) ? { kind: "layout", layoutType: t.node.type } : { kind: "unknown" };
2189
2192
  if (n.has(t.node.type))
2190
2193
  return { kind: "layout", layoutType: t.node.type };
2191
- const _ = st(t.node.type);
2192
- return _ ? { kind: "entry", component: _ } : { kind: "unknown" };
2194
+ const y = st(t.node.type);
2195
+ return y ? { kind: "entry", component: y } : { kind: "unknown" };
2193
2196
  }), a = v(() => {
2194
- const { type: _, kind: k, items: S, ...A } = t.node;
2195
- return A;
2197
+ const { type: y, kind: k, items: x, ...C } = t.node;
2198
+ return C;
2196
2199
  }), l = v(
2197
2200
  () => t.node.items ?? []
2198
2201
  ), i = v(() => t.node.title ?? null), u = v(
2199
2202
  () => t.node.description ?? null
2200
2203
  ), f = v(() => {
2201
- const _ = t.node.active;
2202
- return typeof _ == "number" ? _ : 0;
2203
- }), g = v(() => t.node.items ?? []);
2204
- return (_, k) => {
2205
- const S = rt("InfolistRenderer", !0);
2206
- return s.value.kind === "entry" ? (o(), b(se(s.value.component), Ue(Re({ key: 0 }, a.value)), null, 16)) : s.value.kind === "layout" && s.value.layoutType === "rows" ? (o(), c("div", Za, [
2207
- (o(!0), c(P, null, D(l.value, (A, y) => (o(), b(S, {
2208
- key: y,
2209
- node: A
2204
+ const y = t.node.active;
2205
+ return typeof y == "number" ? y : 0;
2206
+ }), p = v(() => t.node.items ?? []);
2207
+ return (y, k) => {
2208
+ const x = rt("InfolistRenderer", !0);
2209
+ return s.value.kind === "entry" ? (o(), b(se(s.value.component), Fe(Ue({ key: 0 }, a.value)), null, 16)) : s.value.kind === "layout" && s.value.layoutType === "rows" ? (o(), c("div", el, [
2210
+ (o(!0), c(P, null, D(l.value, (C, _) => (o(), b(x, {
2211
+ key: _,
2212
+ node: C
2210
2213
  }, null, 8, ["node"]))), 128))
2211
- ])) : s.value.kind === "layout" && s.value.layoutType === "columns" ? (o(), c("div", el, [
2212
- (o(!0), c(P, null, D(l.value, (A, y) => (o(), c("div", {
2213
- key: y,
2214
+ ])) : s.value.kind === "layout" && s.value.layoutType === "columns" ? (o(), c("div", tl, [
2215
+ (o(!0), c(P, null, D(l.value, (C, _) => (o(), c("div", {
2216
+ key: _,
2214
2217
  class: "admin-infolist-cols__item",
2215
2218
  style: Te({
2216
- gridColumn: `span ${typeof A.span == "number" ? A.span : Math.max(1, Math.floor(12 / l.value.length))}`
2219
+ gridColumn: `span ${typeof C.span == "number" ? C.span : Math.max(1, Math.floor(12 / l.value.length))}`
2217
2220
  })
2218
2221
  }, [
2219
- $(S, { node: A }, null, 8, ["node"])
2222
+ $(x, { node: C }, null, 8, ["node"])
2220
2223
  ], 4))), 128))
2221
- ])) : s.value.kind === "layout" && (s.value.layoutType === "section" || s.value.layoutType === "block") ? (o(), c("section", tl, [
2222
- i.value || u.value ? (o(), c("header", nl, [
2223
- i.value ? (o(), c("h3", al, p(i.value), 1)) : R("", !0),
2224
- u.value ? (o(), c("p", ll, p(u.value), 1)) : R("", !0)
2225
- ])) : R("", !0),
2226
- d("div", sl, [
2227
- (o(!0), c(P, null, D(l.value, (A, y) => (o(), b(S, {
2228
- key: y,
2229
- node: A
2224
+ ])) : s.value.kind === "layout" && (s.value.layoutType === "section" || s.value.layoutType === "block") ? (o(), c("section", nl, [
2225
+ i.value || u.value ? (o(), c("header", al, [
2226
+ i.value ? (o(), c("h3", ll, h(i.value), 1)) : U("", !0),
2227
+ u.value ? (o(), c("p", sl, h(u.value), 1)) : U("", !0)
2228
+ ])) : U("", !0),
2229
+ d("div", il, [
2230
+ (o(!0), c(P, null, D(l.value, (C, _) => (o(), b(x, {
2231
+ key: _,
2232
+ node: C
2230
2233
  }, null, 8, ["node"]))), 128))
2231
2234
  ])
2232
- ])) : s.value.kind === "layout" && s.value.layoutType === "tabs" ? (o(), c("div", il, [
2233
- d("ul", ol, [
2234
- (o(!0), c(P, null, D(g.value, (A, y) => (o(), c("li", {
2235
- key: A.key ?? y,
2235
+ ])) : s.value.kind === "layout" && s.value.layoutType === "tabs" ? (o(), c("div", ol, [
2236
+ d("ul", rl, [
2237
+ (o(!0), c(P, null, D(p.value, (C, _) => (o(), c("li", {
2238
+ key: C.key ?? _,
2236
2239
  class: Z([
2237
2240
  "admin-infolist-tabs__tab",
2238
- { "admin-infolist-tabs__tab--active": y === f.value }
2241
+ { "admin-infolist-tabs__tab--active": _ === f.value }
2239
2242
  ])
2240
- }, p(A.label), 3))), 128))
2243
+ }, h(C.label), 3))), 128))
2241
2244
  ]),
2242
- d("div", rl, [
2243
- (o(!0), c(P, null, D(g.value[f.value]?.items ?? [], (A, y) => (o(), b(S, {
2244
- key: y,
2245
- node: A
2245
+ d("div", ul, [
2246
+ (o(!0), c(P, null, D(p.value[f.value]?.items ?? [], (C, _) => (o(), b(x, {
2247
+ key: _,
2248
+ node: C
2246
2249
  }, null, 8, ["node"]))), 128))
2247
2250
  ])
2248
- ])) : (o(), b(Qa, {
2251
+ ])) : (o(), b(Za, {
2249
2252
  key: 5,
2250
2253
  type: e.node.type,
2251
2254
  name: e.node.name
@@ -2253,10 +2256,10 @@ const xt = /* @__PURE__ */ L({
2253
2256
  };
2254
2257
  }
2255
2258
  }), Je = /* @__PURE__ */ Symbol("admin.infolist-record");
2256
- function dl(e) {
2257
- Mt(Je, e);
2259
+ function cl(e) {
2260
+ Nt(Je, e);
2258
2261
  }
2259
- function uo() {
2262
+ function co() {
2260
2263
  const e = dt(Je);
2261
2264
  if (!e)
2262
2265
  throw new Error("useRecord() called outside of provideRecord() scope");
@@ -2265,10 +2268,10 @@ function uo() {
2265
2268
  function Ne() {
2266
2269
  return dt(Je, null);
2267
2270
  }
2268
- const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-page__hd" }, fl = { class: "admin-page__title-wrap" }, vl = { class: "admin-page__title" }, pl = { class: "admin-page__actions" }, gl = {
2271
+ const ml = { class: "admin-page admin-resource-view" }, fl = { class: "admin-page__hd" }, vl = { class: "admin-page__title-wrap" }, pl = { class: "admin-page__title" }, gl = { class: "admin-page__actions" }, hl = {
2269
2272
  key: 1,
2270
2273
  class: "admin-resource-view__loading"
2271
- }, hl = /* @__PURE__ */ L({
2274
+ }, _l = /* @__PURE__ */ L({
2272
2275
  __name: "ResourceViewPage",
2273
2276
  props: {
2274
2277
  slug: {},
@@ -2277,21 +2280,21 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2277
2280
  indexRouteName: { default: "admin.home" }
2278
2281
  },
2279
2282
  setup(e) {
2280
- const t = e, n = wt(), s = oe(), a = ie();
2281
- dl(n.state);
2283
+ const t = e, n = $t(), s = oe(), a = ie();
2284
+ cl(n.state);
2282
2285
  const l = v(() => s.getResource(t.slug)), i = v(
2283
2286
  () => l.value?.fields ?? []
2284
2287
  ), u = v(
2285
2288
  () => `${l.value?.label ?? t.slug}: запись #${t.id}`
2286
2289
  );
2287
- Fe(async () => {
2290
+ Re(async () => {
2288
2291
  s.manifest === null && await s.load().catch(() => {
2289
2292
  }), await n.load(t.slug, t.id, "view").catch(() => {
2290
2293
  });
2291
2294
  }), ee(
2292
2295
  () => [t.slug, t.id],
2293
- async ([_, k]) => {
2294
- await n.load(_, k, "view").catch(() => {
2296
+ async ([y, k]) => {
2297
+ await n.load(y, k, "view").catch(() => {
2295
2298
  });
2296
2299
  }
2297
2300
  );
@@ -2304,23 +2307,23 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2304
2307
  a.push({ name: t.editRouteName, params: { id: t.id } }).catch(() => {
2305
2308
  });
2306
2309
  }
2307
- async function g() {
2310
+ async function p() {
2308
2311
  confirm("Удалить запись?") && (await n.destroy().catch(() => {
2309
2312
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
2310
2313
  }));
2311
2314
  }
2312
- return (_, k) => (o(), c("section", cl, [
2313
- d("header", ml, [
2314
- d("div", fl, [
2315
- d("h1", vl, p(u.value), 1)
2315
+ return (y, k) => (o(), c("section", ml, [
2316
+ d("header", fl, [
2317
+ d("div", vl, [
2318
+ d("h1", pl, h(u.value), 1)
2316
2319
  ]),
2317
- d("div", pl, [
2320
+ d("div", gl, [
2318
2321
  $(r(z), {
2319
2322
  variant: "ghost",
2320
2323
  onClick: f
2321
2324
  }, {
2322
2325
  default: m(() => [...k[0] || (k[0] = [
2323
- x("Редактировать", -1)
2326
+ S("Редактировать", -1)
2324
2327
  ])]),
2325
2328
  _: 1
2326
2329
  }),
@@ -2328,10 +2331,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2328
2331
  variant: "danger",
2329
2332
  loading: r(n).deleting,
2330
2333
  disabled: r(n).deleting,
2331
- onClick: g
2334
+ onClick: p
2332
2335
  }, {
2333
2336
  default: m(() => [...k[1] || (k[1] = [
2334
- x(" Удалить ", -1)
2337
+ S(" Удалить ", -1)
2335
2338
  ])]),
2336
2339
  _: 1
2337
2340
  }, 8, ["loading", "disabled"])
@@ -2344,40 +2347,40 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2344
2347
  role: "alert"
2345
2348
  }, {
2346
2349
  default: m(() => [
2347
- x(p(r(n).error?.message ?? "Не удалось загрузить запись"), 1)
2350
+ S(h(r(n).error?.message ?? "Не удалось загрузить запись"), 1)
2348
2351
  ]),
2349
2352
  _: 1
2350
- })) : R("", !0),
2351
- r(n).loading ? (o(), c("div", gl, [
2352
- (o(), c(P, null, D(8, (S) => $(r(We), {
2353
- key: S,
2353
+ })) : U("", !0),
2354
+ r(n).loading ? (o(), c("div", hl, [
2355
+ (o(), c(P, null, D(8, (x) => $(r(We), {
2356
+ key: x,
2354
2357
  height: "24px"
2355
2358
  })), 64))
2356
- ])) : (o(), b(r(j), {
2359
+ ])) : (o(), b(r(K), {
2357
2360
  key: 2,
2358
2361
  padding: "md",
2359
2362
  class: "admin-resource-view__body"
2360
2363
  }, {
2361
2364
  default: m(() => [
2362
- (o(!0), c(P, null, D(i.value, (S, A) => (o(), b(ul, {
2363
- key: A,
2364
- node: S
2365
+ (o(!0), c(P, null, D(i.value, (x, C) => (o(), b(dl, {
2366
+ key: C,
2367
+ node: x
2365
2368
  }, null, 8, ["node"]))), 128))
2366
2369
  ]),
2367
2370
  _: 1
2368
2371
  }))
2369
2372
  ]));
2370
2373
  }
2371
- }), _l = { class: "admin-page admin-profile" }, yl = { class: "admin-page__hd" }, bl = { class: "admin-page__title-wrap" }, kl = { class: "admin-page__title" }, wl = { class: "admin-page__count" }, $l = { class: "admin-profile__layout" }, xl = {
2374
+ }), yl = { class: "admin-page admin-profile" }, bl = { class: "admin-page__hd" }, kl = { class: "admin-page__title-wrap" }, wl = { class: "admin-page__title" }, $l = { class: "admin-page__count" }, xl = { class: "admin-profile__layout" }, Sl = {
2372
2375
  class: "admin-profile__nav",
2373
2376
  "aria-label": "Profile sections"
2374
- }, Sl = ["onClick"], Cl = ["data-icon"], Al = { class: "admin-profile__content" }, El = { class: "admin-profile__hero" }, Fl = { class: "admin-profile__hero-text" }, Ul = { class: "admin-profile__hero-name" }, Rl = { class: "admin-profile__hero-meta" }, Tl = { class: "admin-profile__form" }, Ll = { class: "admin-profile__card-ft" }, Pl = { class: "admin-profile__card-hd" }, Ml = {
2377
+ }, Cl = ["onClick"], Al = ["data-icon"], El = { class: "admin-profile__content" }, Rl = { class: "admin-profile__hero" }, Fl = { class: "admin-profile__hero-text" }, Ul = { class: "admin-profile__hero-name" }, Tl = { class: "admin-profile__hero-meta" }, Ll = { class: "admin-profile__form" }, Pl = { class: "admin-profile__card-ft" }, Ml = { class: "admin-profile__card-hd" }, Nl = {
2375
2378
  key: 0,
2376
2379
  class: "admin-profile__hint"
2377
- }, Nl = {
2380
+ }, Bl = {
2378
2381
  key: 1,
2379
2382
  class: "admin-profile__hint"
2380
- }, Bl = { class: "admin-profile__card-ft" }, Il = { class: "admin-profile__hint" }, Dl = /* @__PURE__ */ L({
2383
+ }, Il = { class: "admin-profile__card-ft" }, Dl = { class: "admin-profile__hint" }, Vl = /* @__PURE__ */ L({
2381
2384
  __name: "ProfilePage",
2382
2385
  props: {
2383
2386
  title: { default: "Profile" },
@@ -2391,42 +2394,42 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2391
2394
  { id: "security", label: "Безопасность", icon: "shield" },
2392
2395
  { id: "tokens", label: "API токены", icon: "key" },
2393
2396
  { id: "sessions", label: "Сессии", icon: "monitor" }
2394
- ], f = F(n.section);
2395
- function g(M) {
2397
+ ], f = R(n.section);
2398
+ function p(M) {
2396
2399
  f.value = M, s("update:section", M);
2397
2400
  }
2398
- const _ = F({
2401
+ const y = R({
2399
2402
  name: a.user?.name ?? "",
2400
2403
  email: a.user?.email ?? "",
2401
2404
  locale: i.current,
2402
2405
  theme: l.current
2403
2406
  }), k = v(
2404
2407
  () => i.available.map((M) => ({ value: M, label: M.toUpperCase() }))
2405
- ), S = v(
2408
+ ), x = v(
2406
2409
  () => l.available.map((M) => ({ value: M, label: M === "dark" ? "Тёмная" : M === "light" ? "Светлая" : M }))
2407
2410
  );
2408
- function A() {
2409
- s("save", { ..._.value });
2411
+ function C() {
2412
+ s("save", { ...y.value });
2410
2413
  }
2411
- function y() {
2414
+ function _() {
2412
2415
  s("avatar-replace");
2413
2416
  }
2414
- function h() {
2417
+ function g() {
2415
2418
  s("two-factor-disable");
2416
2419
  }
2417
- function U() {
2420
+ function F() {
2418
2421
  s("two-factor-regenerate");
2419
2422
  }
2420
2423
  const q = v(() => !!a.user?.twoFactorEnabled);
2421
- return (M, T) => (o(), c("section", _l, [
2422
- d("header", yl, [
2423
- d("div", bl, [
2424
- d("h1", kl, p(e.title), 1),
2425
- d("div", wl, p(e.subtitle), 1)
2424
+ return (M, T) => (o(), c("section", yl, [
2425
+ d("header", bl, [
2426
+ d("div", kl, [
2427
+ d("h1", wl, h(e.title), 1),
2428
+ d("div", $l, h(e.subtitle), 1)
2426
2429
  ])
2427
2430
  ]),
2428
- d("div", $l, [
2429
- d("nav", xl, [
2431
+ d("div", xl, [
2432
+ d("nav", Sl, [
2430
2433
  (o(), c(P, null, D(u, (w) => d("button", {
2431
2434
  key: w.id,
2432
2435
  type: "button",
@@ -2434,17 +2437,17 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2434
2437
  "admin-profile__nav-item",
2435
2438
  { "admin-profile__nav-item--active": f.value === w.id }
2436
2439
  ]),
2437
- onClick: (V) => g(w.id)
2440
+ onClick: (V) => p(w.id)
2438
2441
  }, [
2439
2442
  d("span", {
2440
2443
  class: "admin-profile__nav-icon",
2441
2444
  "data-icon": w.icon
2442
- }, null, 8, Cl),
2443
- d("span", null, p(w.label), 1)
2444
- ], 10, Sl)), 64))
2445
+ }, null, 8, Al),
2446
+ d("span", null, h(w.label), 1)
2447
+ ], 10, Cl)), 64))
2445
2448
  ]),
2446
- d("div", Al, [
2447
- f.value === "general" ? (o(), b(r(j), {
2449
+ d("div", El, [
2450
+ f.value === "general" ? (o(), b(r(K), {
2448
2451
  key: 0,
2449
2452
  padding: "md"
2450
2453
  }, {
@@ -2452,104 +2455,104 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2452
2455
  T[7] || (T[7] = d("header", { class: "admin-profile__card-hd" }, [
2453
2456
  d("h3", { class: "admin-profile__card-title" }, "Профиль")
2454
2457
  ], -1)),
2455
- d("div", El, [
2458
+ d("div", Rl, [
2456
2459
  $(r(ft), {
2457
2460
  src: r(a).user?.avatar ?? void 0,
2458
2461
  name: r(a).user?.name ?? "?",
2459
2462
  size: "lg"
2460
2463
  }, null, 8, ["src", "name"]),
2461
2464
  d("div", Fl, [
2462
- d("div", Ul, p(r(a).user?.name ?? "—"), 1),
2463
- d("div", Rl, p(r(a).user?.email ?? "—"), 1)
2465
+ d("div", Ul, h(r(a).user?.name ?? "—"), 1),
2466
+ d("div", Tl, h(r(a).user?.email ?? "—"), 1)
2464
2467
  ]),
2465
2468
  T[5] || (T[5] = d("div", { style: { flex: "1" } }, null, -1)),
2466
2469
  $(r(z), {
2467
2470
  variant: "ghost",
2468
2471
  size: "sm",
2469
- onClick: y
2472
+ onClick: _
2470
2473
  }, {
2471
2474
  default: m(() => [...T[4] || (T[4] = [
2472
- x(" Заменить ", -1)
2475
+ S(" Заменить ", -1)
2473
2476
  ])]),
2474
2477
  _: 1
2475
2478
  })
2476
2479
  ]),
2477
- d("div", Tl, [
2480
+ d("div", Ll, [
2478
2481
  $(r(de), {
2479
- modelValue: _.value.name,
2480
- "onUpdate:modelValue": T[0] || (T[0] = (w) => _.value.name = w),
2482
+ modelValue: y.value.name,
2483
+ "onUpdate:modelValue": T[0] || (T[0] = (w) => y.value.name = w),
2481
2484
  label: "Имя",
2482
2485
  name: "name"
2483
2486
  }, null, 8, ["modelValue"]),
2484
2487
  $(r(de), {
2485
- modelValue: _.value.email,
2486
- "onUpdate:modelValue": T[1] || (T[1] = (w) => _.value.email = w),
2488
+ modelValue: y.value.email,
2489
+ "onUpdate:modelValue": T[1] || (T[1] = (w) => y.value.email = w),
2487
2490
  label: "Email",
2488
2491
  type: "email",
2489
2492
  name: "email"
2490
2493
  }, null, 8, ["modelValue"]),
2491
2494
  $(r(Ee), {
2492
- modelValue: _.value.locale,
2493
- "onUpdate:modelValue": T[2] || (T[2] = (w) => _.value.locale = w),
2495
+ modelValue: y.value.locale,
2496
+ "onUpdate:modelValue": T[2] || (T[2] = (w) => y.value.locale = w),
2494
2497
  options: k.value,
2495
2498
  label: "Язык"
2496
2499
  }, null, 8, ["modelValue", "options"]),
2497
2500
  $(r(Ee), {
2498
- modelValue: _.value.theme,
2499
- "onUpdate:modelValue": T[3] || (T[3] = (w) => _.value.theme = w),
2500
- options: S.value,
2501
+ modelValue: y.value.theme,
2502
+ "onUpdate:modelValue": T[3] || (T[3] = (w) => y.value.theme = w),
2503
+ options: x.value,
2501
2504
  label: "Тема"
2502
2505
  }, null, 8, ["modelValue", "options"])
2503
2506
  ]),
2504
- d("footer", Ll, [
2507
+ d("footer", Pl, [
2505
2508
  $(r(z), {
2506
2509
  variant: "primary",
2507
- onClick: A
2510
+ onClick: C
2508
2511
  }, {
2509
2512
  default: m(() => [...T[6] || (T[6] = [
2510
- x("Сохранить", -1)
2513
+ S("Сохранить", -1)
2511
2514
  ])]),
2512
2515
  _: 1
2513
2516
  })
2514
2517
  ])
2515
2518
  ]),
2516
2519
  _: 1
2517
- })) : f.value === "security" ? (o(), b(r(j), {
2520
+ })) : f.value === "security" ? (o(), b(r(K), {
2518
2521
  key: 1,
2519
2522
  padding: "md"
2520
2523
  }, {
2521
2524
  default: m(() => [
2522
- d("header", Pl, [
2525
+ d("header", Ml, [
2523
2526
  T[8] || (T[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
2524
- $(r(je), {
2527
+ $(r(Ke), {
2525
2528
  variant: q.value ? "success" : "default"
2526
2529
  }, {
2527
2530
  default: m(() => [
2528
- x(p(q.value ? "Включена" : "Отключена"), 1)
2531
+ S(h(q.value ? "Включена" : "Отключена"), 1)
2529
2532
  ]),
2530
2533
  _: 1
2531
2534
  }, 8, ["variant"])
2532
2535
  ]),
2533
- q.value ? (o(), c("p", Ml, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Nl, " Включите 2FA для дополнительной защиты аккаунта. ")),
2534
- d("footer", Bl, [
2536
+ q.value ? (o(), c("p", Nl, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Bl, " Включите 2FA для дополнительной защиты аккаунта. ")),
2537
+ d("footer", Il, [
2535
2538
  q.value ? (o(), c(P, { key: 0 }, [
2536
2539
  $(r(z), {
2537
2540
  variant: "ghost",
2538
2541
  size: "sm",
2539
- onClick: U
2542
+ onClick: F
2540
2543
  }, {
2541
2544
  default: m(() => [...T[9] || (T[9] = [
2542
- x(" Перегенерировать коды ", -1)
2545
+ S(" Перегенерировать коды ", -1)
2543
2546
  ])]),
2544
2547
  _: 1
2545
2548
  }),
2546
2549
  $(r(z), {
2547
2550
  variant: "danger",
2548
2551
  size: "sm",
2549
- onClick: h
2552
+ onClick: g
2550
2553
  }, {
2551
2554
  default: m(() => [...T[10] || (T[10] = [
2552
- x(" Отключить 2FA ", -1)
2555
+ S(" Отключить 2FA ", -1)
2553
2556
  ])]),
2554
2557
  _: 1
2555
2558
  })
@@ -2559,7 +2562,7 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2559
2562
  disabled: ""
2560
2563
  }, {
2561
2564
  default: m(() => [...T[11] || (T[11] = [
2562
- x(" Включить 2FA (host customize) ", -1)
2565
+ S(" Включить 2FA (host customize) ", -1)
2563
2566
  ])]),
2564
2567
  _: 1
2565
2568
  })
@@ -2571,9 +2574,9 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2571
2574
  key: 2,
2572
2575
  section: f.value
2573
2576
  }, () => [
2574
- $(r(j), { padding: "md" }, {
2577
+ $(r(K), { padding: "md" }, {
2575
2578
  default: m(() => [
2576
- d("p", Il, " Section «" + p(f.value) + "» не реализована библиотекой — host-проект подключает её через slot " + p(f.value) + ". ", 1)
2579
+ d("p", Dl, " Section «" + h(f.value) + "» не реализована библиотекой — host-проект подключает её через slot " + h(f.value) + ". ", 1)
2577
2580
  ]),
2578
2581
  _: 1
2579
2582
  })
@@ -2582,7 +2585,7 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2582
2585
  ])
2583
2586
  ]));
2584
2587
  }
2585
- }), pe = Me(), co = pe.register, Vl = pe.get, mo = pe.has, fo = pe.list, vo = pe.clear, zl = pe.registerBundle, ql = /* @__PURE__ */ L({
2588
+ }), pe = Me(), mo = pe.register, zl = pe.get, fo = pe.has, vo = pe.list, po = pe.clear, ql = pe.registerBundle, Ol = /* @__PURE__ */ L({
2586
2589
  __name: "UnknownWidget",
2587
2590
  props: {
2588
2591
  type: {}
@@ -2590,35 +2593,35 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2590
2593
  setup(e) {
2591
2594
  return (t, n) => (o(), b(r(te), { variant: "warning" }, {
2592
2595
  title: m(() => [
2593
- x("Неизвестный widget-тип: " + p(e.type), 1)
2596
+ S("Неизвестный widget-тип: " + h(e.type), 1)
2594
2597
  ]),
2595
2598
  default: m(() => [
2596
- n[0] || (n[0] = x(" Зарегистрируйте через ", -1)),
2597
- d("code", null, "registerWidget('" + p(e.type) + "', YourComponent)", 1),
2598
- n[1] || (n[1] = x(". ", -1))
2599
+ n[0] || (n[0] = S(" Зарегистрируйте через ", -1)),
2600
+ d("code", null, "registerWidget('" + h(e.type) + "', YourComponent)", 1),
2601
+ n[1] || (n[1] = S(". ", -1))
2599
2602
  ]),
2600
2603
  _: 1
2601
2604
  }));
2602
2605
  }
2603
- }), Ol = /* @__PURE__ */ L({
2606
+ }), Wl = /* @__PURE__ */ L({
2604
2607
  __name: "WidgetRenderer",
2605
2608
  props: {
2606
2609
  node: {}
2607
2610
  },
2608
2611
  setup(e) {
2609
- const t = e, n = v(() => Vl(t.node.type)), s = v(() => {
2612
+ const t = e, n = v(() => zl(t.node.type)), s = v(() => {
2610
2613
  const { type: a, span: l, ...i } = t.node;
2611
2614
  return i;
2612
2615
  });
2613
- return (a, l) => n.value ? (o(), b(se(n.value), Ue(Re({ key: 0 }, s.value)), null, 16)) : (o(), b(ql, {
2616
+ return (a, l) => n.value ? (o(), b(se(n.value), Fe(Ue({ key: 0 }, s.value)), null, 16)) : (o(), b(Ol, {
2614
2617
  key: 1,
2615
2618
  type: e.node.type
2616
2619
  }, null, 8, ["type"]));
2617
2620
  }
2618
- }), Wl = { class: "admin-page admin-dashboard" }, Kl = { class: "admin-page__hd" }, jl = { class: "admin-page__title-wrap" }, Gl = { class: "admin-page__title" }, Hl = {
2621
+ }), jl = { class: "admin-page admin-dashboard" }, Kl = { class: "admin-page__hd" }, Gl = { class: "admin-page__title-wrap" }, Hl = { class: "admin-page__title" }, Xl = {
2619
2622
  key: 0,
2620
2623
  class: "admin-page__count"
2621
- }, Xl = { class: "admin-page__actions" }, Yl = { class: "admin-dashboard__grid" }, Jl = /* @__PURE__ */ L({
2624
+ }, Yl = { class: "admin-page__actions" }, Jl = { class: "admin-dashboard__grid" }, Ql = /* @__PURE__ */ L({
2622
2625
  __name: "DashboardPage",
2623
2626
  props: {
2624
2627
  slug: { default: void 0 },
@@ -2627,37 +2630,37 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2627
2630
  subtitle: { default: void 0 }
2628
2631
  },
2629
2632
  setup(e) {
2630
- const t = e, n = oe(), s = v(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((g) => g.slug === t.slug) ?? null), a = v(() => t.widgets ? t.widgets : s.value ? s.value.widgets ?? [] : []), l = v(
2633
+ const t = e, n = oe(), s = v(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((p) => p.slug === t.slug) ?? null), a = v(() => t.widgets ? t.widgets : s.value ? s.value.widgets ?? [] : []), l = v(
2631
2634
  () => t.title ?? s.value?.label ?? "Dashboard"
2632
2635
  ), i = v(
2633
2636
  () => t.subtitle ?? s.value?.description ?? null
2634
2637
  );
2635
2638
  function u(f) {
2636
- const g = typeof f.span == "number" ? f.span : 12;
2637
- return Math.max(1, Math.min(12, g));
2639
+ const p = typeof f.span == "number" ? f.span : 12;
2640
+ return Math.max(1, Math.min(12, p));
2638
2641
  }
2639
- return (f, g) => (o(), c("section", Wl, [
2642
+ return (f, p) => (o(), c("section", jl, [
2640
2643
  d("header", Kl, [
2641
- d("div", jl, [
2642
- d("h1", Gl, p(l.value), 1),
2643
- i.value ? (o(), c("div", Hl, p(i.value), 1)) : R("", !0)
2644
+ d("div", Gl, [
2645
+ d("h1", Hl, h(l.value), 1),
2646
+ i.value ? (o(), c("div", Xl, h(i.value), 1)) : U("", !0)
2644
2647
  ]),
2645
- d("div", Xl, [
2648
+ d("div", Yl, [
2646
2649
  Y(f.$slots, "actions")
2647
2650
  ])
2648
2651
  ]),
2649
- d("div", Yl, [
2650
- (o(!0), c(P, null, D(a.value, (_, k) => (o(), c("div", {
2652
+ d("div", Jl, [
2653
+ (o(!0), c(P, null, D(a.value, (y, k) => (o(), c("div", {
2651
2654
  key: k,
2652
2655
  class: "admin-dashboard__cell",
2653
- style: Te({ gridColumn: `span ${u(_)} / span ${u(_)}` })
2656
+ style: Te({ gridColumn: `span ${u(y)} / span ${u(y)}` })
2654
2657
  }, [
2655
- $(Ol, { node: _ }, null, 8, ["node"])
2658
+ $(Wl, { node: y }, null, 8, ["node"])
2656
2659
  ], 4))), 128))
2657
2660
  ])
2658
2661
  ]));
2659
2662
  }
2660
- }), Ql = /* @__PURE__ */ L({
2663
+ }), Zl = /* @__PURE__ */ L({
2661
2664
  __name: "StatWidget",
2662
2665
  props: {
2663
2666
  title: { default: "" },
@@ -2688,16 +2691,16 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2688
2691
  loading: e.loading
2689
2692
  }, null, 8, ["title", "value", "prefix", "suffix", "trend", "precision", "tone", "loading"]));
2690
2693
  }
2691
- }), Zl = {
2694
+ }), es = {
2692
2695
  key: 0,
2693
2696
  class: "admin-widget__hd"
2694
- }, es = {
2697
+ }, ts = {
2695
2698
  key: 0,
2696
2699
  class: "admin-widget__title"
2697
- }, ts = {
2700
+ }, ns = {
2698
2701
  key: 1,
2699
2702
  class: "admin-widget__desc"
2700
- }, ns = ["viewBox", "height", "aria-label"], as = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ls = /* @__PURE__ */ L({
2703
+ }, as = ["viewBox", "height", "aria-label"], ls = ["x", "y", "width", "height", "fill", "data-label", "data-value"], ss = /* @__PURE__ */ L({
2701
2704
  __name: "BarChartWidget",
2702
2705
  props: {
2703
2706
  title: { default: "" },
@@ -2717,15 +2720,15 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2717
2720
  heightPct: i.value / n.value * 100
2718
2721
  }));
2719
2722
  });
2720
- return (a, l) => (o(), b(r(j), {
2723
+ return (a, l) => (o(), b(r(K), {
2721
2724
  padding: "md",
2722
2725
  class: "admin-widget"
2723
2726
  }, {
2724
2727
  default: m(() => [
2725
- e.title || e.description ? (o(), c("header", Zl, [
2726
- e.title ? (o(), c("h3", es, p(e.title), 1)) : R("", !0),
2727
- e.description ? (o(), c("p", ts, p(e.description), 1)) : R("", !0)
2728
- ])) : R("", !0),
2728
+ e.title || e.description ? (o(), c("header", es, [
2729
+ e.title ? (o(), c("h3", ts, h(e.title), 1)) : U("", !0),
2730
+ e.description ? (o(), c("p", ns, h(e.description), 1)) : U("", !0)
2731
+ ])) : U("", !0),
2729
2732
  (o(), c("svg", {
2730
2733
  class: "admin-widget-bar-chart",
2731
2734
  viewBox: `0 0 100 ${e.height}`,
@@ -2746,17 +2749,17 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2746
2749
  "data-label": i.label,
2747
2750
  "data-value": i.value
2748
2751
  }, [
2749
- d("title", null, p(i.label) + ": " + p(i.value), 1)
2750
- ], 8, as))), 128))
2751
- ], 8, ns))
2752
+ d("title", null, h(i.label) + ": " + h(i.value), 1)
2753
+ ], 8, ls))), 128))
2754
+ ], 8, as))
2752
2755
  ]),
2753
2756
  _: 1
2754
2757
  }));
2755
2758
  }
2756
- }), ss = {
2759
+ }), is = {
2757
2760
  key: 0,
2758
2761
  class: "admin-widget__hd"
2759
- }, is = { class: "admin-widget__title" }, os = { class: "admin-donut-widget__row" }, rs = ["aria-label"], us = ["d", "fill"], ds = { class: "admin-donut-widget__legend" }, cs = { class: "admin-donut-widget__label" }, ms = { class: "admin-donut-widget__value" }, fs = /* @__PURE__ */ L({
2762
+ }, os = { class: "admin-widget__title" }, rs = { class: "admin-donut-widget__row" }, us = ["aria-label"], ds = ["d", "fill"], cs = { class: "admin-donut-widget__legend" }, ms = { class: "admin-donut-widget__label" }, fs = { class: "admin-donut-widget__value" }, vs = /* @__PURE__ */ L({
2760
2763
  __name: "DonutChartWidget",
2761
2764
  props: {
2762
2765
  title: { default: "" },
@@ -2774,7 +2777,7 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2774
2777
  return t.data.map((i, u) => {
2775
2778
  const f = l / s.value * 2 * Math.PI;
2776
2779
  l += i.value;
2777
- const g = l / s.value * 2 * Math.PI, _ = 50, k = 60, S = 60, A = k + _ * Math.cos(f - Math.PI / 2), y = S + _ * Math.sin(f - Math.PI / 2), h = k + _ * Math.cos(g - Math.PI / 2), U = S + _ * Math.sin(g - Math.PI / 2), q = g - f > Math.PI ? 1 : 0, M = t.data.length === 1 ? `M ${k - _} ${S} a ${_} ${_} 0 1 0 ${_ * 2} 0 a ${_} ${_} 0 1 0 ${-_ * 2} 0` : `M ${k} ${S} L ${A} ${y} A ${_} ${_} 0 ${q} 1 ${h} ${U} Z`;
2780
+ const p = l / s.value * 2 * Math.PI, y = 50, k = 60, x = 60, C = k + y * Math.cos(f - Math.PI / 2), _ = x + y * Math.sin(f - Math.PI / 2), g = k + y * Math.cos(p - Math.PI / 2), F = x + y * Math.sin(p - Math.PI / 2), q = p - f > Math.PI ? 1 : 0, M = t.data.length === 1 ? `M ${k - y} ${x} a ${y} ${y} 0 1 0 ${y * 2} 0 a ${y} ${y} 0 1 0 ${-y * 2} 0` : `M ${k} ${x} L ${C} ${_} A ${y} ${y} 0 ${q} 1 ${g} ${F} Z`;
2778
2781
  return {
2779
2782
  ...i,
2780
2783
  path: M,
@@ -2783,15 +2786,15 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2783
2786
  };
2784
2787
  });
2785
2788
  });
2786
- return (l, i) => (o(), b(r(j), {
2789
+ return (l, i) => (o(), b(r(K), {
2787
2790
  padding: "md",
2788
2791
  class: "admin-widget admin-donut-widget"
2789
2792
  }, {
2790
2793
  default: m(() => [
2791
- e.title ? (o(), c("header", ss, [
2792
- d("h3", is, p(e.title), 1)
2793
- ])) : R("", !0),
2794
- d("div", os, [
2794
+ e.title ? (o(), c("header", is, [
2795
+ d("h3", os, h(e.title), 1)
2796
+ ])) : U("", !0),
2797
+ d("div", rs, [
2795
2798
  (o(), c("svg", {
2796
2799
  viewBox: "0 0 120 120",
2797
2800
  class: "admin-donut-widget__svg",
@@ -2803,23 +2806,23 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2803
2806
  d: u.path,
2804
2807
  fill: u.color
2805
2808
  }, [
2806
- d("title", null, p(u.label) + ": " + p(u.value) + " (" + p(u.pct) + "%)", 1)
2807
- ], 8, us))), 128)),
2809
+ d("title", null, h(u.label) + ": " + h(u.value) + " (" + h(u.pct) + "%)", 1)
2810
+ ], 8, ds))), 128)),
2808
2811
  i[0] || (i[0] = d("circle", {
2809
2812
  cx: "60",
2810
2813
  cy: "60",
2811
2814
  r: "30",
2812
2815
  fill: "var(--uid-surface-raised)"
2813
2816
  }, null, -1))
2814
- ], 8, rs)),
2815
- d("ul", ds, [
2817
+ ], 8, us)),
2818
+ d("ul", cs, [
2816
2819
  (o(!0), c(P, null, D(a.value, (u, f) => (o(), c("li", { key: f }, [
2817
2820
  d("span", {
2818
2821
  class: "admin-donut-widget__dot",
2819
2822
  style: Te({ background: u.color })
2820
2823
  }, null, 4),
2821
- d("span", cs, p(u.label), 1),
2822
- d("span", ms, p(u.pct) + "%", 1)
2824
+ d("span", ms, h(u.label), 1),
2825
+ d("span", fs, h(u.pct) + "%", 1)
2823
2826
  ]))), 128))
2824
2827
  ])
2825
2828
  ])
@@ -2827,10 +2830,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2827
2830
  _: 1
2828
2831
  }));
2829
2832
  }
2830
- }), vs = {
2833
+ }), ps = {
2831
2834
  key: 0,
2832
2835
  class: "admin-widget__hd"
2833
- }, ps = { class: "admin-widget__title" }, gs = /* @__PURE__ */ L({
2836
+ }, gs = { class: "admin-widget__title" }, hs = /* @__PURE__ */ L({
2834
2837
  __name: "RecentTableWidget",
2835
2838
  props: {
2836
2839
  title: { default: "" },
@@ -2839,15 +2842,15 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2839
2842
  emptyText: { default: "Нет данных" }
2840
2843
  },
2841
2844
  setup(e) {
2842
- return (t, n) => (o(), b(r(j), {
2845
+ return (t, n) => (o(), b(r(K), {
2843
2846
  padding: "md",
2844
2847
  class: "admin-widget"
2845
2848
  }, {
2846
2849
  default: m(() => [
2847
- e.title ? (o(), c("header", vs, [
2848
- d("h3", ps, p(e.title), 1)
2849
- ])) : R("", !0),
2850
- $(r(Ke), {
2850
+ e.title ? (o(), c("header", ps, [
2851
+ d("h3", gs, h(e.title), 1)
2852
+ ])) : U("", !0),
2853
+ $(r(je), {
2851
2854
  columns: e.columns,
2852
2855
  data: e.rows,
2853
2856
  "empty-text": e.emptyText
@@ -2856,10 +2859,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2856
2859
  _: 1
2857
2860
  }));
2858
2861
  }
2859
- }), hs = {
2862
+ }), _s = {
2860
2863
  key: 0,
2861
2864
  class: "admin-widget__hd"
2862
- }, _s = { class: "admin-widget__title" }, ys = /* @__PURE__ */ L({
2865
+ }, ys = { class: "admin-widget__title" }, bs = /* @__PURE__ */ L({
2863
2866
  __name: "HeatmapWidget",
2864
2867
  props: {
2865
2868
  title: { default: "" },
@@ -2869,15 +2872,15 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2869
2872
  gap: { default: 2 }
2870
2873
  },
2871
2874
  setup(e) {
2872
- return (t, n) => (o(), b(r(j), {
2875
+ return (t, n) => (o(), b(r(K), {
2873
2876
  padding: "md",
2874
2877
  class: "admin-widget"
2875
2878
  }, {
2876
2879
  default: m(() => [
2877
- e.title ? (o(), c("header", hs, [
2878
- d("h3", _s, p(e.title), 1)
2879
- ])) : R("", !0),
2880
- $(r(Xt), {
2880
+ e.title ? (o(), c("header", _s, [
2881
+ d("h3", ys, h(e.title), 1)
2882
+ ])) : U("", !0),
2883
+ $(r(Yt), {
2881
2884
  data: e.data,
2882
2885
  levels: e.levels,
2883
2886
  color: e.color,
@@ -2887,10 +2890,10 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2887
2890
  _: 1
2888
2891
  }));
2889
2892
  }
2890
- }), bs = {
2893
+ }), ks = {
2891
2894
  key: 0,
2892
2895
  class: "admin-widget__hd"
2893
- }, ks = { class: "admin-widget__title" }, ws = { style: { display: "flex", "justify-content": "center" } }, $s = /* @__PURE__ */ L({
2896
+ }, ws = { class: "admin-widget__title" }, $s = { style: { display: "flex", "justify-content": "center" } }, xs = /* @__PURE__ */ L({
2894
2897
  __name: "GaugeWidget",
2895
2898
  props: {
2896
2899
  title: { default: "" },
@@ -2912,16 +2915,16 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2912
2915
  warning: "warning",
2913
2916
  negative: "danger"
2914
2917
  }, s = v(() => n[t.tone]);
2915
- return (a, l) => (o(), b(r(j), {
2918
+ return (a, l) => (o(), b(r(K), {
2916
2919
  padding: "md",
2917
2920
  class: "admin-widget"
2918
2921
  }, {
2919
2922
  default: m(() => [
2920
- e.title ? (o(), c("header", bs, [
2921
- d("h3", ks, p(e.title), 1)
2922
- ])) : R("", !0),
2923
- d("div", ws, [
2924
- $(r(Yt), {
2923
+ e.title ? (o(), c("header", ks, [
2924
+ d("h3", ws, h(e.title), 1)
2925
+ ])) : U("", !0),
2926
+ d("div", $s, [
2927
+ $(r(Jt), {
2925
2928
  value: e.value,
2926
2929
  min: e.min,
2927
2930
  max: e.max,
@@ -2938,49 +2941,49 @@ const cl = { class: "admin-page admin-resource-view" }, ml = { class: "admin-pag
2938
2941
  _: 1
2939
2942
  }));
2940
2943
  }
2941
- }), xs = {
2944
+ }), Ss = {
2942
2945
  key: 0,
2943
2946
  class: "admin-widget__hd"
2944
- }, Ss = { class: "admin-widget__title" }, Cs = { class: "admin-markdown-widget" }, As = /* @__PURE__ */ L({
2947
+ }, Cs = { class: "admin-widget__title" }, As = { class: "admin-markdown-widget" }, Es = /* @__PURE__ */ L({
2945
2948
  __name: "MarkdownWidget",
2946
2949
  props: {
2947
2950
  title: { default: "" },
2948
2951
  content: {}
2949
2952
  },
2950
2953
  setup(e) {
2951
- return (t, n) => (o(), b(r(j), {
2954
+ return (t, n) => (o(), b(r(K), {
2952
2955
  padding: "md",
2953
2956
  class: "admin-widget"
2954
2957
  }, {
2955
2958
  default: m(() => [
2956
- e.title ? (o(), c("header", xs, [
2957
- d("h3", Ss, p(e.title), 1)
2958
- ])) : R("", !0),
2959
- d("div", Cs, p(e.content), 1)
2959
+ e.title ? (o(), c("header", Ss, [
2960
+ d("h3", Cs, h(e.title), 1)
2961
+ ])) : U("", !0),
2962
+ d("div", As, h(e.content), 1)
2960
2963
  ]),
2961
2964
  _: 1
2962
2965
  }));
2963
2966
  }
2964
2967
  });
2965
- function Es() {
2966
- zl({
2967
- stat: Ql,
2968
- "bar-chart": ls,
2969
- "donut-chart": fs,
2970
- "recent-table": gs,
2971
- heatmap: ys,
2972
- gauge: $s,
2973
- markdown: As
2968
+ function Rs() {
2969
+ ql({
2970
+ stat: Zl,
2971
+ "bar-chart": ss,
2972
+ "donut-chart": vs,
2973
+ "recent-table": hs,
2974
+ heatmap: bs,
2975
+ gauge: xs,
2976
+ markdown: Es
2974
2977
  });
2975
2978
  }
2976
2979
  function Fs(e) {
2977
2980
  return e.success === !0;
2978
2981
  }
2979
- function po(e) {
2982
+ function go(e) {
2980
2983
  return e.success === !1;
2981
2984
  }
2982
2985
  function Us(e) {
2983
- const t = un.create({
2986
+ const t = dn.create({
2984
2987
  baseURL: e.baseURL,
2985
2988
  withCredentials: !0,
2986
2989
  headers: {
@@ -2989,7 +2992,7 @@ function Us(e) {
2989
2992
  }
2990
2993
  });
2991
2994
  e.csrfToken && (t.defaults.headers.common["X-CSRF-TOKEN"] = e.csrfToken), e.locale && (t.defaults.headers.common["X-Admin-Locale"] = e.locale), t.interceptors.request.use((a) => {
2992
- const l = Rs("XSRF-TOKEN");
2995
+ const l = Ts("XSRF-TOKEN");
2993
2996
  return l && a.headers.set("X-XSRF-TOKEN", decodeURIComponent(l)), a;
2994
2997
  }), t.interceptors.response.use(
2995
2998
  (a) => {
@@ -3025,26 +3028,26 @@ function Us(e) {
3025
3028
  }
3026
3029
  };
3027
3030
  }
3028
- function Rs(e) {
3031
+ function Ts(e) {
3029
3032
  if (typeof document > "u") return null;
3030
- const t = document.cookie.match(new RegExp("(^|; )" + Ts(e) + "=([^;]*)"));
3033
+ const t = document.cookie.match(new RegExp("(^|; )" + Ls(e) + "=([^;]*)"));
3031
3034
  return t ? t[2] : null;
3032
3035
  }
3033
- function Ts(e) {
3036
+ function Ls(e) {
3034
3037
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3035
3038
  }
3036
3039
  function xe(e, t) {
3037
3040
  const n = e.permissions?.[t];
3038
3041
  return typeof n == "string" && n.length > 0 ? [n] : [];
3039
3042
  }
3040
- function Ls(e, t) {
3043
+ function Ps(e, t) {
3041
3044
  const n = e.permissions?.[t];
3042
3045
  return typeof n == "string" && n.length > 0 ? [n] : [];
3043
3046
  }
3044
- function Ps(e) {
3047
+ function Ms(e) {
3045
3048
  return Array.isArray(e.permission) ? e.permission : typeof e.permission == "string" && e.permission.length > 0 ? [e.permission] : [];
3046
3049
  }
3047
- function Ms(e, t) {
3050
+ function Ns(e, t) {
3048
3051
  const n = e.slug, s = `/r/${n}`;
3049
3052
  return [
3050
3053
  {
@@ -3105,7 +3108,7 @@ function Ms(e, t) {
3105
3108
  }
3106
3109
  ];
3107
3110
  }
3108
- function Ns(e, t) {
3111
+ function Bs(e, t) {
3109
3112
  return {
3110
3113
  path: `/screens/${e.slug}`,
3111
3114
  name: `admin.screen.${e.slug}`,
@@ -3115,11 +3118,11 @@ function Ns(e, t) {
3115
3118
  kind: "screen",
3116
3119
  slug: e.slug,
3117
3120
  title: e.name,
3118
- permissions: Ps(e)
3121
+ permissions: Ms(e)
3119
3122
  }
3120
3123
  };
3121
3124
  }
3122
- function Bs(e, t) {
3125
+ function Is(e, t) {
3123
3126
  return {
3124
3127
  path: `/settings/${e.slug}`,
3125
3128
  name: `admin.settings.${e.slug}`,
@@ -3129,11 +3132,11 @@ function Bs(e, t) {
3129
3132
  kind: "settings",
3130
3133
  slug: e.slug,
3131
3134
  title: e.label,
3132
- permissions: Ls(e, "view")
3135
+ permissions: Ps(e, "view")
3133
3136
  }
3134
3137
  };
3135
3138
  }
3136
- function Is(e, t) {
3139
+ function Ds(e, t) {
3137
3140
  if (typeof e.slug != "string" || e.slug.length === 0) return null;
3138
3141
  const n = e.permission, s = Array.isArray(n) ? n : typeof n == "string" && n.length > 0 ? [n] : [];
3139
3142
  return {
@@ -3149,22 +3152,22 @@ function Is(e, t) {
3149
3152
  }
3150
3153
  };
3151
3154
  }
3152
- function Ds(e, t) {
3155
+ function Vs(e, t) {
3153
3156
  if (e === null) return [];
3154
3157
  const n = [];
3155
3158
  for (const s of e.resources)
3156
- n.push(...Ms(s, t));
3159
+ n.push(...Ns(s, t));
3157
3160
  for (const s of e.screens)
3158
- n.push(Ns(s, t));
3159
- for (const s of e.settings)
3160
3161
  n.push(Bs(s, t));
3162
+ for (const s of e.settings)
3163
+ n.push(Is(s, t));
3161
3164
  for (const s of e.dashboards) {
3162
- const a = Is(s, t);
3165
+ const a = Ds(s, t);
3163
3166
  a && n.push(a);
3164
3167
  }
3165
3168
  return n;
3166
3169
  }
3167
- function Vs(e = {}) {
3170
+ function zs(e = {}) {
3168
3171
  const t = e.loginRouteName ?? "admin.login", n = e.forbiddenRouteName ?? "admin.forbidden", s = e.redirectQueryKey ?? "redirect";
3169
3172
  return (a) => {
3170
3173
  if (a.name === t)
@@ -3184,7 +3187,7 @@ function Vs(e = {}) {
3184
3187
  return Array.isArray(u) && u.length > 0 && !l.hasAnyPermission(u) ? { name: n } : !0;
3185
3188
  };
3186
3189
  }
3187
- function zs(e = {}) {
3190
+ function qs(e = {}) {
3188
3191
  const t = e.template, n = e.brand ?? "", s = e.fallback ?? "";
3189
3192
  return (a) => {
3190
3193
  if (typeof document > "u") return;
@@ -3193,16 +3196,16 @@ function zs(e = {}) {
3193
3196
  t ? i = t.replace("{title}", l).replace("{brand}", n) : l && n ? i = `${l} · ${n}` : i = l || n, document.title = i;
3194
3197
  };
3195
3198
  }
3196
- const qs = [
3199
+ const Os = [
3197
3200
  "admin.resource.",
3198
3201
  "admin.screen.",
3199
3202
  "admin.settings.",
3200
3203
  "admin.dashboard."
3201
3204
  ];
3202
- function Os(e) {
3203
- return typeof e != "string" ? !1 : qs.some((t) => e.startsWith(t));
3204
- }
3205
3205
  function Ws(e) {
3206
+ return typeof e != "string" ? !1 : Os.some((t) => e.startsWith(t));
3207
+ }
3208
+ function js(e) {
3206
3209
  const t = e.base ?? "/admin", n = e.history ?? ct(t), s = [
3207
3210
  {
3208
3211
  path: "/login",
@@ -3239,18 +3242,18 @@ function Ws(e) {
3239
3242
  name: "admin.notFound",
3240
3243
  component: e.components.notFound,
3241
3244
  meta: { kind: "system", title: "404" }
3242
- }, l = Vt({
3245
+ }, l = zt({
3243
3246
  history: n,
3244
3247
  routes: [...s, ...e.extraRoutes ?? [], a]
3245
3248
  });
3246
- return l.beforeEach(Vs(e.authGuard)), l.afterEach(zs(e.titleGuard)), l.replaceManifestRoutes = (i) => {
3249
+ return l.beforeEach(zs(e.authGuard)), l.afterEach(qs(e.titleGuard)), l.replaceManifestRoutes = (i) => {
3247
3250
  const u = l.getRoutes();
3248
- for (const g of u)
3249
- Os(g.name) && l.removeRoute(g.name);
3251
+ for (const p of u)
3252
+ Ws(p.name) && l.removeRoute(p.name);
3250
3253
  l.hasRoute("admin.notFound") && l.removeRoute("admin.notFound");
3251
- const f = Ds(i, e.components);
3252
- for (const g of f)
3253
- l.addRoute(g);
3254
+ const f = Vs(i, e.components);
3255
+ for (const p of f)
3256
+ l.addRoute(p);
3254
3257
  l.addRoute(a);
3255
3258
  }, l;
3256
3259
  }
@@ -3312,7 +3315,7 @@ const J = /* @__PURE__ */ L({
3312
3315
  disabled: e.disabled
3313
3316
  }, {
3314
3317
  default: m(() => [
3315
- $(r(Jt), {
3318
+ $(r(Qt), {
3316
3319
  "model-value": s.value,
3317
3320
  rows: e.rows,
3318
3321
  placeholder: e.placeholder ?? void 0,
@@ -3355,7 +3358,7 @@ const J = /* @__PURE__ */ L({
3355
3358
  disabled: e.disabled
3356
3359
  }, {
3357
3360
  default: m(() => [
3358
- $(r(Qt), {
3361
+ $(r(Zt), {
3359
3362
  "model-value": s.value,
3360
3363
  min: e.min ?? void 0,
3361
3364
  max: e.max ?? void 0,
@@ -3445,8 +3448,8 @@ const J = /* @__PURE__ */ L({
3445
3448
  }, {
3446
3449
  default: m(() => [
3447
3450
  e.inlineLabel ? (o(), c(P, { key: 0 }, [
3448
- x(p(e.inlineLabel), 1)
3449
- ], 64)) : R("", !0)
3451
+ S(h(e.inlineLabel), 1)
3452
+ ], 64)) : U("", !0)
3450
3453
  ]),
3451
3454
  _: 1
3452
3455
  }, 8, ["model-value", "disabled", "name"])
@@ -3482,7 +3485,7 @@ const J = /* @__PURE__ */ L({
3482
3485
  disabled: e.disabled
3483
3486
  }, {
3484
3487
  default: m(() => [
3485
- $(r(Zt), {
3488
+ $(r(en), {
3486
3489
  "model-value": s.value,
3487
3490
  min: e.min ?? void 0,
3488
3491
  max: e.max ?? void 0,
@@ -3501,7 +3504,7 @@ const J = /* @__PURE__ */ L({
3501
3504
  gap: { default: "var(--uid-space-md)" }
3502
3505
  },
3503
3506
  setup(e) {
3504
- return (t, n) => (o(), b(r(en), {
3507
+ return (t, n) => (o(), b(r(tn), {
3505
3508
  direction: "column",
3506
3509
  gap: e.gap,
3507
3510
  align: "stretch"
@@ -3528,7 +3531,7 @@ const J = /* @__PURE__ */ L({
3528
3531
  const l = a.span;
3529
3532
  return typeof l == "number" && l > 0 ? Math.min(l, t.cols) : n.value;
3530
3533
  }
3531
- return (a, l) => (o(), b(r(tn), {
3534
+ return (a, l) => (o(), b(r(nn), {
3532
3535
  cols: e.cols,
3533
3536
  gap: e.gap
3534
3537
  }, {
@@ -3544,16 +3547,16 @@ const J = /* @__PURE__ */ L({
3544
3547
  _: 1
3545
3548
  }, 8, ["cols", "gap"]));
3546
3549
  }
3547
- }), js = {
3550
+ }), Gs = {
3548
3551
  key: 0,
3549
3552
  class: "admin-section__header"
3550
- }, Gs = {
3553
+ }, Hs = {
3551
3554
  key: 0,
3552
3555
  class: "admin-section__title"
3553
- }, Hs = {
3556
+ }, Xs = {
3554
3557
  key: 1,
3555
3558
  class: "admin-section__description"
3556
- }, Xs = { class: "admin-section__body" }, he = /* @__PURE__ */ L({
3559
+ }, Ys = { class: "admin-section__body" }, he = /* @__PURE__ */ L({
3557
3560
  __name: "SectionLayout",
3558
3561
  props: {
3559
3562
  items: {},
@@ -3561,16 +3564,16 @@ const J = /* @__PURE__ */ L({
3561
3564
  description: { default: null }
3562
3565
  },
3563
3566
  setup(e) {
3564
- return (t, n) => (o(), b(r(j), {
3567
+ return (t, n) => (o(), b(r(K), {
3565
3568
  padding: "md",
3566
3569
  class: "admin-section"
3567
3570
  }, {
3568
3571
  default: m(() => [
3569
- e.title || e.description ? (o(), c("header", js, [
3570
- e.title ? (o(), c("h3", Gs, p(e.title), 1)) : R("", !0),
3571
- e.description ? (o(), c("p", Hs, p(e.description), 1)) : R("", !0)
3572
- ])) : R("", !0),
3573
- d("div", Xs, [
3572
+ e.title || e.description ? (o(), c("header", Gs, [
3573
+ e.title ? (o(), c("h3", Hs, h(e.title), 1)) : U("", !0),
3574
+ e.description ? (o(), c("p", Xs, h(e.description), 1)) : U("", !0)
3575
+ ])) : U("", !0),
3576
+ d("div", Ys, [
3574
3577
  (o(!0), c(P, null, D(e.items, (s, a) => (o(), b(we, {
3575
3578
  key: a,
3576
3579
  node: s
@@ -3580,7 +3583,7 @@ const J = /* @__PURE__ */ L({
3580
3583
  _: 1
3581
3584
  }));
3582
3585
  }
3583
- }), Ys = /* @__PURE__ */ L({
3586
+ }), Js = /* @__PURE__ */ L({
3584
3587
  __name: "TabsLayout",
3585
3588
  props: {
3586
3589
  items: {},
@@ -3592,7 +3595,7 @@ const J = /* @__PURE__ */ L({
3592
3595
  function a(u, f) {
3593
3596
  return u.key ?? f;
3594
3597
  }
3595
- const l = F(n.active ?? a(n.items[0] ?? {}, 0));
3598
+ const l = R(n.active ?? a(n.items[0] ?? {}, 0));
3596
3599
  function i(u) {
3597
3600
  l.value = u, s("update:active", u);
3598
3601
  }
@@ -3601,24 +3604,24 @@ const J = /* @__PURE__ */ L({
3601
3604
  "onUpdate:modelValue": i
3602
3605
  }, {
3603
3606
  list: m(() => [
3604
- (o(!0), c(P, null, D(e.items, (g, _) => (o(), b(r(Ae), {
3605
- key: a(g, _),
3606
- value: a(g, _)
3607
+ (o(!0), c(P, null, D(e.items, (p, y) => (o(), b(r(Ae), {
3608
+ key: a(p, y),
3609
+ value: a(p, y)
3607
3610
  }, {
3608
3611
  default: m(() => [
3609
- x(p(g.label), 1)
3612
+ S(h(p.label), 1)
3610
3613
  ]),
3611
3614
  _: 2
3612
3615
  }, 1032, ["value"]))), 128))
3613
3616
  ]),
3614
3617
  default: m(() => [
3615
- (o(!0), c(P, null, D(e.items, (g, _) => (o(), b(r(gt), {
3616
- key: `panel-${a(g, _)}`,
3617
- value: a(g, _)
3618
+ (o(!0), c(P, null, D(e.items, (p, y) => (o(), b(r(gt), {
3619
+ key: `panel-${a(p, y)}`,
3620
+ value: a(p, y)
3618
3621
  }, {
3619
3622
  default: m(() => [
3620
- (o(!0), c(P, null, D(g.items, (k, S) => (o(), b(we, {
3621
- key: S,
3623
+ (o(!0), c(P, null, D(p.items, (k, x) => (o(), b(we, {
3624
+ key: x,
3622
3625
  node: k
3623
3626
  }, null, 8, ["node"]))), 128))
3624
3627
  ]),
@@ -3629,8 +3632,8 @@ const J = /* @__PURE__ */ L({
3629
3632
  }, 8, ["model-value"]));
3630
3633
  }
3631
3634
  });
3632
- function Js() {
3633
- Oa({
3635
+ function Qs() {
3636
+ Wa({
3634
3637
  fields: {
3635
3638
  // Backend Field-классы из dskripchenko/laravel-admin отдают эти fieldType()
3636
3639
  // строки. Соответствие см. core/src/Field/{Input,TextArea,Select,...}.php.
@@ -3679,7 +3682,7 @@ function Js() {
3679
3682
  columns: Ks,
3680
3683
  section: he,
3681
3684
  block: he,
3682
- tabs: Ys,
3685
+ tabs: Js,
3683
3686
  accordion: he,
3684
3687
  group: it,
3685
3688
  step: he,
@@ -3703,12 +3706,12 @@ const I = /* @__PURE__ */ L({
3703
3706
  });
3704
3707
  return (a, l) => (o(), c("span", {
3705
3708
  class: Z(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
3706
- }, p(s.value), 3));
3709
+ }, h(s.value), 3));
3707
3710
  }
3708
- }), Qs = {
3711
+ }), Zs = {
3709
3712
  key: 1,
3710
3713
  class: "admin-infolist-text"
3711
- }, Zs = /* @__PURE__ */ L({
3714
+ }, ei = /* @__PURE__ */ L({
3712
3715
  __name: "BadgeEntry",
3713
3716
  props: {
3714
3717
  name: { default: "" },
@@ -3722,17 +3725,17 @@ const I = /* @__PURE__ */ L({
3722
3725
  let l = t.value;
3723
3726
  return l === void 0 && n && t.name && (l = n[t.name]), l == null ? "" : String(l);
3724
3727
  }), a = v(() => t.variant ? t.variant : t.map[s.value] ?? "default");
3725
- return (l, i) => s.value ? (o(), b(r(je), {
3728
+ return (l, i) => s.value ? (o(), b(r(Ke), {
3726
3729
  key: 0,
3727
3730
  variant: a.value
3728
3731
  }, {
3729
3732
  default: m(() => [
3730
- x(p(s.value), 1)
3733
+ S(h(s.value), 1)
3731
3734
  ]),
3732
3735
  _: 1
3733
- }, 8, ["variant"])) : (o(), c("span", Qs, "—"));
3736
+ }, 8, ["variant"])) : (o(), c("span", Zs, "—"));
3734
3737
  }
3735
- }), ei = ["data-icon"], ti = { key: 0 }, ni = /* @__PURE__ */ L({
3738
+ }), ti = ["data-icon"], ni = { key: 0 }, ai = /* @__PURE__ */ L({
3736
3739
  __name: "IconEntry",
3737
3740
  props: {
3738
3741
  name: { default: "" },
@@ -3754,11 +3757,11 @@ const I = /* @__PURE__ */ L({
3754
3757
  d("span", {
3755
3758
  class: "admin-infolist-icon__glyph",
3756
3759
  "data-icon": l.value
3757
- }, null, 8, ei),
3758
- a.value ? (o(), c("span", ti, p(a.value), 1)) : R("", !0)
3760
+ }, null, 8, ti),
3761
+ a.value ? (o(), c("span", ni, h(a.value), 1)) : U("", !0)
3759
3762
  ], 2));
3760
3763
  }
3761
- }), ai = {
3764
+ }), li = {
3762
3765
  key: 1,
3763
3766
  class: "admin-infolist-text"
3764
3767
  }, ot = /* @__PURE__ */ L({
@@ -3776,32 +3779,32 @@ const I = /* @__PURE__ */ L({
3776
3779
  function a(l) {
3777
3780
  return l == null ? "—" : typeof l == "object" ? JSON.stringify(l) : String(l);
3778
3781
  }
3779
- return (l, i) => s.value.length > 0 ? (o(), b(r(nn), {
3782
+ return (l, i) => s.value.length > 0 ? (o(), b(r(an), {
3780
3783
  key: 0,
3781
3784
  direction: "vertical",
3782
3785
  columns: 1
3783
3786
  }, {
3784
3787
  default: m(() => [
3785
- (o(!0), c(P, null, D(s.value, ([u, f]) => (o(), b(r(an), {
3788
+ (o(!0), c(P, null, D(s.value, ([u, f]) => (o(), b(r(ln), {
3786
3789
  key: u,
3787
3790
  label: u
3788
3791
  }, {
3789
3792
  default: m(() => [
3790
- x(p(a(f)), 1)
3793
+ S(h(a(f)), 1)
3791
3794
  ]),
3792
3795
  _: 2
3793
3796
  }, 1032, ["label"]))), 128))
3794
3797
  ]),
3795
3798
  _: 1
3796
- })) : (o(), c("span", ai, "—"));
3799
+ })) : (o(), c("span", li, "—"));
3797
3800
  }
3798
3801
  });
3799
- function li() {
3800
- Ja({
3802
+ function si() {
3803
+ Qa({
3801
3804
  // Дефолтные типы infolist (BadgeEntry::make() и т.п.).
3802
3805
  text: I,
3803
- badge: Zs,
3804
- icon: ni,
3806
+ badge: ei,
3807
+ icon: ai,
3805
3808
  keyvalue: ot,
3806
3809
  "key-value": ot,
3807
3810
  // Маппинг от backend Field::fieldType() → TextEntry для view-режима.
@@ -3842,30 +3845,30 @@ function li() {
3842
3845
  "color-picker": I
3843
3846
  });
3844
3847
  }
3845
- function go(e, t = {}) {
3846
- const n = t.pages ?? {}, s = t.base ?? si(e.baseUrl) ?? "/admin", a = Us({
3848
+ function ho(e, t = {}) {
3849
+ const n = t.pages ?? {}, s = t.base ?? ii(e.baseUrl) ?? "/admin", a = Us({
3847
3850
  baseURL: e.apiUrl,
3848
3851
  csrfToken: e.csrf
3849
3852
  });
3850
- dn(a);
3851
- const l = Nt(Bn), i = It();
3852
- l.use(i), Q().hydrate(e), He().hydrate(e), Ge().hydrate(e), Xe().hydrate(e), Js(), Es(), li();
3853
- const u = Ws({
3853
+ cn(a);
3854
+ const l = Bt(In), i = Dt();
3855
+ l.use(i), Q().hydrate(e), He().hydrate(e), Ge().hydrate(e), Xe().hydrate(e), Qs(), Rs(), si();
3856
+ const u = js({
3854
3857
  base: s,
3855
3858
  history: t.router?.history ?? ct(s),
3856
3859
  components: {
3857
- login: n.login ?? ka,
3860
+ login: n.login ?? wa,
3858
3861
  home: n.home ?? Kn,
3859
- forbidden: n.forbidden ?? Gn,
3860
- notFound: n.notFound ?? Xn,
3861
- profile: n.profile ?? Dl,
3862
- resourceIndex: n.resourceIndex ?? qa,
3862
+ forbidden: n.forbidden ?? Hn,
3863
+ notFound: n.notFound ?? Yn,
3864
+ profile: n.profile ?? Vl,
3865
+ resourceIndex: n.resourceIndex ?? Oa,
3863
3866
  resourceCreate: n.resourceCreate ?? lt,
3864
3867
  resourceEdit: n.resourceEdit ?? lt,
3865
- resourceView: n.resourceView ?? hl,
3866
- dashboard: n.dashboard ?? Jl,
3867
- settings: n.settings ?? ea,
3868
- screen: n.screen ?? la
3868
+ resourceView: n.resourceView ?? _l,
3869
+ dashboard: n.dashboard ?? Ql,
3870
+ settings: n.settings ?? ta,
3871
+ screen: n.screen ?? sa
3869
3872
  },
3870
3873
  extraRoutes: t.router?.extraRoutes,
3871
3874
  authGuard: t.router?.authGuard,
@@ -3873,33 +3876,46 @@ function go(e, t = {}) {
3873
3876
  });
3874
3877
  l.use(u);
3875
3878
  const f = Ye();
3876
- if (u.beforeEach((g, _, k) => {
3877
- g.fullPath !== _.fullPath && f.start(), k();
3879
+ if (u.beforeEach((p, y, k) => {
3880
+ p.fullPath !== y.fullPath && f.start(), k();
3878
3881
  }), u.afterEach(() => {
3879
3882
  f.end();
3880
3883
  }), u.onError(() => {
3881
3884
  f.end();
3885
+ }), u.beforeResolve(async (p, y, k) => {
3886
+ const x = typeof p.name == "string" ? p.name : null;
3887
+ if (x && x.startsWith("admin.resource.") && x.endsWith(".index")) {
3888
+ const C = p.params.slug ?? p.meta.slug;
3889
+ if (C)
3890
+ try {
3891
+ const { useResourceIndexStore: _ } = await Promise.resolve().then(() => $a), g = _();
3892
+ (g.slug !== C || g.items.length === 0) && (g.setSlug(C), await g.load().catch(() => {
3893
+ }));
3894
+ } catch {
3895
+ }
3896
+ }
3897
+ k();
3882
3898
  }), !t.skipManifestLoad) {
3883
- const g = oe(), _ = Q(), k = kt(), S = () => {
3899
+ const p = oe(), y = Q(), k = kt(), x = () => {
3884
3900
  k.load().catch(() => {
3885
- }), g.load().then((A) => {
3886
- u.replaceManifestRoutes(A);
3887
- const y = u.currentRoute.value;
3888
- y.name === "admin.notFound" && y.fullPath !== "/" && u.replace(y.fullPath);
3889
- }).catch((A) => {
3890
- typeof console < "u" && console.error("[laravel-admin] manifest load failed:", A);
3901
+ }), p.load().then((C) => {
3902
+ u.replaceManifestRoutes(C);
3903
+ const _ = u.currentRoute.value;
3904
+ _.name === "admin.notFound" && _.fullPath !== "/" && u.replace(_.fullPath);
3905
+ }).catch((C) => {
3906
+ typeof console < "u" && console.error("[laravel-admin] manifest load failed:", C);
3891
3907
  });
3892
3908
  };
3893
- _.isAuthenticated && S(), ee(
3894
- () => _.user,
3895
- (A, y) => {
3896
- A && !y && S();
3909
+ y.isAuthenticated && x(), ee(
3910
+ () => y.user,
3911
+ (C, _) => {
3912
+ C && !_ && x();
3897
3913
  }
3898
3914
  );
3899
3915
  }
3900
3916
  return t.onAppCreated?.(l), { app: l, router: u, client: a };
3901
3917
  }
3902
- function si(e) {
3918
+ function ii(e) {
3903
3919
  if (!e) return null;
3904
3920
  try {
3905
3921
  return new URL(e).pathname || "/admin";
@@ -3907,8 +3923,8 @@ function si(e) {
3907
3923
  return e.startsWith("/") ? e : null;
3908
3924
  }
3909
3925
  }
3910
- async function ho(e = {}) {
3911
- const t = ii();
3926
+ async function _o(e = {}) {
3927
+ const t = oi();
3912
3928
  if (t)
3913
3929
  return t;
3914
3930
  if (e.client)
@@ -3922,31 +3938,31 @@ async function ho(e = {}) {
3922
3938
  }
3923
3939
  return null;
3924
3940
  }
3925
- function ii() {
3941
+ function oi() {
3926
3942
  return typeof window > "u" ? null : window.__ADMIN_BOOTSTRAP__ ?? null;
3927
3943
  }
3928
- function _o() {
3944
+ function yo() {
3929
3945
  return typeof document > "u" ? null : document.querySelector('meta[name="csrf-token"]')?.getAttribute("content") ?? null;
3930
3946
  }
3931
- const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" }, ui = {
3947
+ const ri = { class: "admin-notifs__hd" }, ui = { class: "admin-notifs__title" }, di = {
3932
3948
  key: 0,
3933
3949
  class: "admin-notifs__count"
3934
- }, di = { class: "admin-notifs__list" }, ci = {
3950
+ }, ci = { class: "admin-notifs__list" }, mi = {
3935
3951
  key: 0,
3936
3952
  class: "admin-notifs__empty"
3937
- }, mi = {
3953
+ }, fi = {
3938
3954
  key: 1,
3939
3955
  class: "admin-notifs__empty"
3940
- }, fi = ["onClick"], vi = ["data-kind"], pi = { class: "admin-notifs__body" }, gi = { class: "admin-notifs__row1" }, hi = {
3956
+ }, vi = ["onClick"], pi = ["data-kind"], gi = { class: "admin-notifs__body" }, hi = { class: "admin-notifs__row1" }, _i = {
3941
3957
  key: 0,
3942
3958
  class: "admin-notifs__title-strong"
3943
- }, _i = {
3959
+ }, yi = {
3944
3960
  key: 1,
3945
3961
  class: "admin-notifs__title-soft"
3946
- }, yi = { class: "admin-notifs__time" }, bi = {
3962
+ }, bi = { class: "admin-notifs__time" }, ki = {
3947
3963
  key: 0,
3948
3964
  class: "admin-notifs__text"
3949
- }, ki = ["onClick"], yo = /* @__PURE__ */ L({
3965
+ }, wi = ["onClick"], bo = /* @__PURE__ */ L({
3950
3966
  __name: "NotificationsDrawer",
3951
3967
  props: {
3952
3968
  open: { type: Boolean }
@@ -3954,55 +3970,55 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
3954
3970
  emits: ["update:open", "select-item"],
3955
3971
  setup(e, { emit: t }) {
3956
3972
  const n = e, s = t, a = Xe();
3957
- function l(h) {
3958
- s("update:open", h);
3973
+ function l(g) {
3974
+ s("update:open", g);
3959
3975
  }
3960
3976
  ee(
3961
3977
  () => n.open,
3962
- async (h) => {
3963
- h && await a.load(a.lastFilter ?? "all", 1).catch(() => {
3978
+ async (g) => {
3979
+ g && await a.load(a.lastFilter ?? "all", 1).catch(() => {
3964
3980
  });
3965
3981
  },
3966
3982
  { immediate: !0 }
3967
3983
  );
3968
3984
  const i = v(() => a.lastFilter ?? "all");
3969
- async function u(h) {
3970
- await a.load(h, 1).catch(() => {
3985
+ async function u(g) {
3986
+ await a.load(g, 1).catch(() => {
3971
3987
  });
3972
3988
  }
3973
3989
  async function f() {
3974
3990
  await a.markAllAsRead().catch(() => {
3975
3991
  });
3976
3992
  }
3977
- async function g(h) {
3978
- s("select-item", h), h.read_at || await a.markAsRead(h.id).catch(() => {
3993
+ async function p(g) {
3994
+ s("select-item", g), g.read_at || await a.markAsRead(g.id).catch(() => {
3979
3995
  });
3980
3996
  }
3981
- async function _(h, U) {
3982
- U.stopPropagation(), await a.destroy(h.id).catch(() => {
3997
+ async function y(g, F) {
3998
+ F.stopPropagation(), await a.destroy(g.id).catch(() => {
3983
3999
  });
3984
4000
  }
3985
- function k(h) {
3986
- const U = h.data.level;
3987
- return U === "success" || U === "warning" || U === "danger" ? U : "info";
4001
+ function k(g) {
4002
+ const F = g.data.level;
4003
+ return F === "success" || F === "warning" || F === "danger" ? F : "info";
3988
4004
  }
3989
- function S(h) {
3990
- return h.data.title ?? "—";
4005
+ function x(g) {
4006
+ return g.data.title ?? "—";
3991
4007
  }
3992
- function A(h) {
3993
- return h.data.body ?? "";
4008
+ function C(g) {
4009
+ return g.data.body ?? "";
3994
4010
  }
3995
- function y(h) {
3996
- if (!h) return "";
3997
- const U = new Date(h), q = Math.max(0, Date.now() - U.getTime()), M = Math.floor(q / 6e4);
4011
+ function _(g) {
4012
+ if (!g) return "";
4013
+ const F = new Date(g), q = Math.max(0, Date.now() - F.getTime()), M = Math.floor(q / 6e4);
3998
4014
  if (M < 1) return "только что";
3999
4015
  if (M < 60) return `${M} мин назад`;
4000
4016
  const T = Math.floor(M / 60);
4001
4017
  if (T < 24) return `${T} ч назад`;
4002
4018
  const w = Math.floor(T / 24);
4003
- return w < 7 ? `${w} д назад` : U.toLocaleDateString("ru-RU");
4019
+ return w < 7 ? `${w} д назад` : F.toLocaleDateString("ru-RU");
4004
4020
  }
4005
- return (h, U) => (o(), b(r(ln), {
4021
+ return (g, F) => (o(), b(r(sn), {
4006
4022
  "model-value": e.open,
4007
4023
  side: "right",
4008
4024
  width: "400px",
@@ -4010,10 +4026,10 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4010
4026
  "onUpdate:modelValue": l
4011
4027
  }, {
4012
4028
  header: m(() => [
4013
- d("div", oi, [
4014
- d("h2", ri, [
4015
- U[0] || (U[0] = x(" Уведомления ", -1)),
4016
- r(a).unreadCount > 0 ? (o(), c("span", ui, " (" + p(r(a).unreadCount) + ") ", 1)) : R("", !0)
4029
+ d("div", ri, [
4030
+ d("h2", ui, [
4031
+ F[0] || (F[0] = S(" Уведомления ", -1)),
4032
+ r(a).unreadCount > 0 ? (o(), c("span", di, " (" + h(r(a).unreadCount) + ") ", 1)) : U("", !0)
4017
4033
  ]),
4018
4034
  r(a).unreadCount > 0 ? (o(), b(r(z), {
4019
4035
  key: 0,
@@ -4021,11 +4037,11 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4021
4037
  size: "sm",
4022
4038
  onClick: f
4023
4039
  }, {
4024
- default: m(() => [...U[1] || (U[1] = [
4025
- x(" Прочитать все ", -1)
4040
+ default: m(() => [...F[1] || (F[1] = [
4041
+ S(" Прочитать все ", -1)
4026
4042
  ])]),
4027
4043
  _: 1
4028
- })) : R("", !0)
4044
+ })) : U("", !0)
4029
4045
  ])
4030
4046
  ]),
4031
4047
  default: m(() => [
@@ -4035,23 +4051,23 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4035
4051
  }, {
4036
4052
  list: m(() => [
4037
4053
  $(r(Ae), { value: "all" }, {
4038
- default: m(() => [...U[2] || (U[2] = [
4039
- x("Все", -1)
4054
+ default: m(() => [...F[2] || (F[2] = [
4055
+ S("Все", -1)
4040
4056
  ])]),
4041
4057
  _: 1
4042
4058
  }),
4043
4059
  $(r(Ae), { value: "unread" }, {
4044
4060
  default: m(() => [
4045
- U[3] || (U[3] = x(" Непрочитанные", -1)),
4061
+ F[3] || (F[3] = S(" Непрочитанные", -1)),
4046
4062
  r(a).unreadCount > 0 ? (o(), c(P, { key: 0 }, [
4047
- x(" (" + p(r(a).unreadCount) + ") ", 1)
4048
- ], 64)) : R("", !0)
4063
+ S(" (" + h(r(a).unreadCount) + ") ", 1)
4064
+ ], 64)) : U("", !0)
4049
4065
  ]),
4050
4066
  _: 1
4051
4067
  }),
4052
4068
  $(r(Ae), { value: "read" }, {
4053
- default: m(() => [...U[4] || (U[4] = [
4054
- x("Прочитанные", -1)
4069
+ default: m(() => [...F[4] || (F[4] = [
4070
+ S("Прочитанные", -1)
4055
4071
  ])]),
4056
4072
  _: 1
4057
4073
  })
@@ -4062,8 +4078,8 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4062
4078
  value: q
4063
4079
  }, {
4064
4080
  default: m(() => [
4065
- d("ul", di, [
4066
- r(a).loading ? (o(), c("li", ci, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", mi, " Нет уведомлений ")) : R("", !0),
4081
+ d("ul", ci, [
4082
+ r(a).loading ? (o(), c("li", mi, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", fi, " Нет уведомлений ")) : U("", !0),
4067
4083
  (o(!0), c(P, null, D(r(a).items, (M) => (o(), c("li", {
4068
4084
  key: M.id,
4069
4085
  class: Z([
@@ -4071,26 +4087,26 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4071
4087
  `admin-notifs__item--${k(M)}`,
4072
4088
  { "admin-notifs__item--unread": !M.read_at }
4073
4089
  ]),
4074
- onClick: (T) => g(M)
4090
+ onClick: (T) => p(M)
4075
4091
  }, [
4076
4092
  d("span", {
4077
4093
  class: "admin-notifs__icon",
4078
4094
  "data-kind": k(M)
4079
- }, null, 8, vi),
4080
- d("div", pi, [
4081
- d("div", gi, [
4082
- M.read_at ? (o(), c("span", _i, p(S(M)), 1)) : (o(), c("strong", hi, p(S(M)), 1)),
4083
- d("span", yi, p(y(M.created_at)), 1)
4095
+ }, null, 8, pi),
4096
+ d("div", gi, [
4097
+ d("div", hi, [
4098
+ M.read_at ? (o(), c("span", yi, h(x(M)), 1)) : (o(), c("strong", _i, h(x(M)), 1)),
4099
+ d("span", bi, h(_(M.created_at)), 1)
4084
4100
  ]),
4085
- A(M) ? (o(), c("p", bi, p(A(M)), 1)) : R("", !0)
4101
+ C(M) ? (o(), c("p", ki, h(C(M)), 1)) : U("", !0)
4086
4102
  ]),
4087
4103
  d("button", {
4088
4104
  type: "button",
4089
4105
  class: "admin-notifs__close",
4090
4106
  "aria-label": "Удалить",
4091
- onClick: (T) => _(M, T)
4092
- }, " × ", 8, ki)
4093
- ], 10, fi))), 128))
4107
+ onClick: (T) => y(M, T)
4108
+ }, " × ", 8, wi)
4109
+ ], 10, vi))), 128))
4094
4110
  ])
4095
4111
  ]),
4096
4112
  _: 1
@@ -4102,22 +4118,22 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4102
4118
  _: 1
4103
4119
  }, 8, ["model-value"]));
4104
4120
  }
4105
- }), wi = { class: "admin-page admin-import-wizard" }, $i = { class: "admin-page__hd" }, xi = { class: "admin-page__title-wrap" }, Si = { class: "admin-page__title" }, Ci = { class: "admin-page__actions" }, Ai = {
4121
+ }), $i = { class: "admin-page admin-import-wizard" }, xi = { class: "admin-page__hd" }, Si = { class: "admin-page__title-wrap" }, Ci = { class: "admin-page__title" }, Ai = { class: "admin-page__actions" }, Ei = {
4106
4122
  key: 0,
4107
4123
  class: "admin-import-wizard__empty"
4108
- }, Ei = {
4124
+ }, Ri = {
4109
4125
  key: 1,
4110
4126
  class: "admin-import-wizard__mapping"
4111
4127
  }, Fi = { class: "admin-import-wizard__map-source" }, Ui = {
4112
4128
  key: 0,
4113
4129
  class: "admin-import-wizard__map-sample"
4114
- }, Ri = { class: "admin-import-wizard__card-hd" }, Ti = {
4130
+ }, Ti = { class: "admin-import-wizard__card-hd" }, Li = {
4115
4131
  key: 2,
4116
4132
  class: "admin-import-wizard__empty"
4117
- }, Li = {
4133
+ }, Pi = {
4118
4134
  key: 0,
4119
4135
  class: "admin-import-wizard__empty"
4120
- }, Pi = { class: "admin-import-wizard__kpi" }, Mi = { class: "admin-import-wizard__nav" }, bo = /* @__PURE__ */ L({
4136
+ }, Mi = { class: "admin-import-wizard__kpi" }, Ni = { class: "admin-import-wizard__nav" }, ko = /* @__PURE__ */ L({
4121
4137
  __name: "ImportWizardPage",
4122
4138
  props: {
4123
4139
  title: { default: "Импорт" },
@@ -4135,36 +4151,36 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4135
4151
  { label: "Сопоставление", description: "Колонки файла → поля" },
4136
4152
  { label: "Предпросмотр", description: "Проверка первых строк" },
4137
4153
  { label: "Импорт", description: "Запуск + сводка" }
4138
- ], l = F(0), i = v(() => n.step ?? l.value);
4154
+ ], l = R(0), i = v(() => n.step ?? l.value);
4139
4155
  function u(T) {
4140
4156
  n.step === void 0 && (T < 0 || T >= a.length || (l.value = T));
4141
4157
  }
4142
- const f = F([]);
4143
- function g(T) {
4158
+ const f = R([]);
4159
+ function p(T) {
4144
4160
  f.value = T, T.length > 0 && s("file-uploaded", T[0].file);
4145
4161
  }
4146
- const _ = F({});
4162
+ const y = R({});
4147
4163
  function k(T, w) {
4148
- _.value[T] = w === null || w === "" ? null : String(w);
4164
+ y.value[T] = w === null || w === "" ? null : String(w);
4149
4165
  }
4150
- function S() {
4166
+ function x() {
4151
4167
  return n.headers.map((T) => ({
4152
4168
  source: T.key,
4153
- target: _.value[T.key] ?? null
4169
+ target: y.value[T.key] ?? null
4154
4170
  }));
4155
4171
  }
4156
- function A() {
4157
- s("mapping-submit", S()), u(2);
4172
+ function C() {
4173
+ s("mapping-submit", x()), u(2);
4158
4174
  }
4159
- function y() {
4175
+ function _() {
4160
4176
  s("run-import"), u(3);
4161
4177
  }
4162
- const h = v(() => i.value > 0), U = v(() => {
4178
+ const g = v(() => i.value > 0), F = v(() => {
4163
4179
  switch (i.value) {
4164
4180
  case 0:
4165
4181
  return f.value.length > 0;
4166
4182
  case 1:
4167
- return Object.values(_.value).some((T) => T !== null);
4183
+ return Object.values(y.value).some((T) => T !== null);
4168
4184
  case 2:
4169
4185
  return !0;
4170
4186
  default:
@@ -4177,28 +4193,28 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4177
4193
  function M() {
4178
4194
  s("cancel");
4179
4195
  }
4180
- return (T, w) => (o(), c("section", wi, [
4181
- d("header", $i, [
4182
- d("div", xi, [
4183
- d("h1", Si, p(e.title), 1)
4196
+ return (T, w) => (o(), c("section", $i, [
4197
+ d("header", xi, [
4198
+ d("div", Si, [
4199
+ d("h1", Ci, h(e.title), 1)
4184
4200
  ]),
4185
- d("div", Ci, [
4201
+ d("div", Ai, [
4186
4202
  $(r(z), {
4187
4203
  variant: "ghost",
4188
4204
  onClick: M
4189
4205
  }, {
4190
4206
  default: m(() => [...w[2] || (w[2] = [
4191
- x("Отмена", -1)
4207
+ S("Отмена", -1)
4192
4208
  ])]),
4193
4209
  _: 1
4194
4210
  })
4195
4211
  ])
4196
4212
  ]),
4197
- $(r(sn), {
4213
+ $(r(on), {
4198
4214
  steps: a,
4199
4215
  current: i.value
4200
4216
  }, null, 8, ["current"]),
4201
- i.value === 0 ? (o(), b(r(j), {
4217
+ i.value === 0 ? (o(), b(r(K), {
4202
4218
  key: 0,
4203
4219
  padding: "md",
4204
4220
  class: "admin-import-wizard__card"
@@ -4208,18 +4224,18 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4208
4224
  d("h3", null, "1. Загрузите файл"),
4209
4225
  d("p", null, "CSV / TSV / XLSX, до 50 MB")
4210
4226
  ], -1)),
4211
- $(r(on), {
4227
+ $(r(rn), {
4212
4228
  "model-value": f.value,
4213
4229
  accept: ".csv,.tsv,.xlsx",
4214
4230
  "max-size": 50 * 1024 * 1024,
4215
4231
  "max-files": 1,
4216
4232
  "primary-text": "Перетащите файл сюда или",
4217
4233
  "secondary-text": "нажмите чтобы выбрать",
4218
- "onUpdate:modelValue": g
4234
+ "onUpdate:modelValue": p
4219
4235
  }, null, 8, ["model-value"])
4220
4236
  ]),
4221
4237
  _: 1
4222
- })) : i.value === 1 ? (o(), b(r(j), {
4238
+ })) : i.value === 1 ? (o(), b(r(K), {
4223
4239
  key: 1,
4224
4240
  padding: "md",
4225
4241
  class: "admin-import-wizard__card"
@@ -4229,18 +4245,18 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4229
4245
  d("h3", null, "2. Сопоставьте колонки"),
4230
4246
  d("p", null, "Выберите поле ресурса для каждой колонки файла")
4231
4247
  ], -1)),
4232
- e.headers.length === 0 ? (o(), c("div", Ai, " Нет данных — host ещё не отдал headers. Загрузите файл сначала. ")) : (o(), c("div", Ei, [
4248
+ e.headers.length === 0 ? (o(), c("div", Ei, " Нет данных — host ещё не отдал headers. Загрузите файл сначала. ")) : (o(), c("div", Ri, [
4233
4249
  (o(!0), c(P, null, D(e.headers, (V) => (o(), c("div", {
4234
4250
  key: V.key,
4235
4251
  class: "admin-import-wizard__map-row"
4236
4252
  }, [
4237
4253
  d("div", Fi, [
4238
- d("strong", null, p(V.label), 1),
4239
- V.sample ? (o(), c("span", Ui, " «" + p(V.sample) + "» ", 1)) : R("", !0)
4254
+ d("strong", null, h(V.label), 1),
4255
+ V.sample ? (o(), c("span", Ui, " «" + h(V.sample) + "» ", 1)) : U("", !0)
4240
4256
  ]),
4241
4257
  w[4] || (w[4] = d("span", { class: "admin-import-wizard__map-arrow" }, "→", -1)),
4242
4258
  $(r(Ee), {
4243
- "model-value": _.value[V.key] ?? "",
4259
+ "model-value": y.value[V.key] ?? "",
4244
4260
  options: q.value,
4245
4261
  placeholder: "Не импортировать",
4246
4262
  "onUpdate:modelValue": (W) => k(V.key, W)
@@ -4249,15 +4265,15 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4249
4265
  ]))
4250
4266
  ]),
4251
4267
  _: 1
4252
- })) : i.value === 2 ? (o(), b(r(j), {
4268
+ })) : i.value === 2 ? (o(), b(r(K), {
4253
4269
  key: 2,
4254
4270
  padding: "md",
4255
4271
  class: "admin-import-wizard__card"
4256
4272
  }, {
4257
4273
  default: m(() => [
4258
- d("header", Ri, [
4274
+ d("header", Ti, [
4259
4275
  w[6] || (w[6] = d("h3", null, "3. Предпросмотр", -1)),
4260
- d("p", null, "Первые " + p(e.preview.length) + " строк перед импортом", 1)
4276
+ d("p", null, "Первые " + h(e.preview.length) + " строк перед импортом", 1)
4261
4277
  ]),
4262
4278
  e.preview.some((V) => V.__warning) ? (o(), b(r(te), {
4263
4279
  key: 0,
@@ -4265,18 +4281,18 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4265
4281
  style: { "margin-bottom": "var(--uid-space-md)" }
4266
4282
  }, {
4267
4283
  default: m(() => [...w[7] || (w[7] = [
4268
- x(" Часть строк имеет предупреждения — проверьте перед импортом. ", -1)
4284
+ S(" Часть строк имеет предупреждения — проверьте перед импортом. ", -1)
4269
4285
  ])]),
4270
4286
  _: 1
4271
- })) : R("", !0),
4272
- e.previewColumns.length > 0 ? (o(), b(r(Ke), {
4287
+ })) : U("", !0),
4288
+ e.previewColumns.length > 0 ? (o(), b(r(je), {
4273
4289
  key: 1,
4274
4290
  columns: e.previewColumns,
4275
4291
  data: e.preview
4276
- }, null, 8, ["columns", "data"])) : (o(), c("div", Ti, " Host не передал previewColumns/preview. "))
4292
+ }, null, 8, ["columns", "data"])) : (o(), c("div", Li, " Host не передал previewColumns/preview. "))
4277
4293
  ]),
4278
4294
  _: 1
4279
- })) : (o(), b(r(j), {
4295
+ })) : (o(), b(r(K), {
4280
4296
  key: 3,
4281
4297
  padding: "md",
4282
4298
  class: "admin-import-wizard__card"
@@ -4286,12 +4302,12 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4286
4302
  d("h3", null, "4. Импорт")
4287
4303
  ], -1)),
4288
4304
  e.progress ? (o(), c(P, { key: 1 }, [
4289
- e.progress.total > 0 ? (o(), b(r(rn), {
4305
+ e.progress.total > 0 ? (o(), b(r(un), {
4290
4306
  key: 0,
4291
4307
  "model-value": e.progress.created + e.progress.updated + e.progress.errors,
4292
4308
  max: e.progress.total
4293
- }, null, 8, ["model-value", "max"])) : R("", !0),
4294
- d("div", Pi, [
4309
+ }, null, 8, ["model-value", "max"])) : U("", !0),
4310
+ d("div", Mi, [
4295
4311
  $(r(Ce), {
4296
4312
  title: "Создано",
4297
4313
  value: e.progress.created,
@@ -4308,56 +4324,56 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4308
4324
  tone: "danger"
4309
4325
  }, null, 8, ["value"])
4310
4326
  ])
4311
- ], 64)) : (o(), c("div", Li, " Запускается импорт… "))
4327
+ ], 64)) : (o(), c("div", Pi, " Запускается импорт… "))
4312
4328
  ]),
4313
4329
  _: 1
4314
4330
  })),
4315
- d("footer", Mi, [
4316
- h.value ? (o(), b(r(z), {
4331
+ d("footer", Ni, [
4332
+ g.value ? (o(), b(r(z), {
4317
4333
  key: 0,
4318
4334
  variant: "ghost",
4319
4335
  onClick: w[0] || (w[0] = (V) => u(i.value - 1))
4320
4336
  }, {
4321
4337
  default: m(() => [...w[9] || (w[9] = [
4322
- x(" Назад ", -1)
4338
+ S(" Назад ", -1)
4323
4339
  ])]),
4324
4340
  _: 1
4325
- })) : R("", !0),
4341
+ })) : U("", !0),
4326
4342
  w[13] || (w[13] = d("span", { style: { flex: "1" } }, null, -1)),
4327
4343
  i.value === 0 ? (o(), b(r(z), {
4328
4344
  key: 1,
4329
4345
  variant: "primary",
4330
- disabled: !U.value,
4346
+ disabled: !F.value,
4331
4347
  onClick: w[1] || (w[1] = (V) => u(1))
4332
4348
  }, {
4333
4349
  default: m(() => [...w[10] || (w[10] = [
4334
- x(" Далее ", -1)
4350
+ S(" Далее ", -1)
4335
4351
  ])]),
4336
4352
  _: 1
4337
4353
  }, 8, ["disabled"])) : i.value === 1 ? (o(), b(r(z), {
4338
4354
  key: 2,
4339
4355
  variant: "primary",
4340
- disabled: !U.value,
4341
- onClick: A
4356
+ disabled: !F.value,
4357
+ onClick: C
4342
4358
  }, {
4343
4359
  default: m(() => [...w[11] || (w[11] = [
4344
- x(" Подтвердить mapping ", -1)
4360
+ S(" Подтвердить mapping ", -1)
4345
4361
  ])]),
4346
4362
  _: 1
4347
4363
  }, 8, ["disabled"])) : i.value === 2 ? (o(), b(r(z), {
4348
4364
  key: 3,
4349
4365
  variant: "primary",
4350
- onClick: y
4366
+ onClick: _
4351
4367
  }, {
4352
4368
  default: m(() => [...w[12] || (w[12] = [
4353
- x(" Запустить импорт ", -1)
4369
+ S(" Запустить импорт ", -1)
4354
4370
  ])]),
4355
4371
  _: 1
4356
- })) : R("", !0)
4372
+ })) : U("", !0)
4357
4373
  ])
4358
4374
  ]));
4359
4375
  }
4360
- }), Ni = { class: "admin-page admin-field-gallery" }, Bi = { class: "admin-gallery__group-title" }, Ii = { class: "admin-gallery__grid" }, Di = { class: "admin-gallery__card-hd" }, Vi = { class: "admin-gallery__card-title" }, zi = { class: "admin-gallery__card-type" }, qi = { class: "admin-gallery__card-desc" }, Oi = { class: "admin-gallery__card-demo" }, ko = /* @__PURE__ */ L({
4376
+ }), Bi = { class: "admin-page admin-field-gallery" }, Ii = { class: "admin-gallery__group-title" }, Di = { class: "admin-gallery__grid" }, Vi = { class: "admin-gallery__card-hd" }, zi = { class: "admin-gallery__card-title" }, qi = { class: "admin-gallery__card-type" }, Oi = { class: "admin-gallery__card-desc" }, Wi = { class: "admin-gallery__card-demo" }, wo = /* @__PURE__ */ L({
4361
4377
  __name: "FieldGalleryPage",
4362
4378
  setup(e) {
4363
4379
  const t = [
@@ -4421,10 +4437,10 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4421
4437
  node: { type: "date", name: "demo_date", label: "Дата публикации", inputType: "date" },
4422
4438
  initial: { demo_date: "2026-05-01" }
4423
4439
  }
4424
- ], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), s = Bt(
4440
+ ], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), s = It(
4425
4441
  t.reduce((a, l) => Object.assign(a, l.initial), {})
4426
4442
  );
4427
- return ht(s), (a, l) => (o(), c("section", Ni, [
4443
+ return ht(s), (a, l) => (o(), c("section", Bi, [
4428
4444
  l[0] || (l[0] = d("header", { class: "admin-page__hd" }, [
4429
4445
  d("div", { class: "admin-page__title-wrap" }, [
4430
4446
  d("h1", { class: "admin-page__title" }, "Field Gallery"),
@@ -4435,21 +4451,21 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4435
4451
  key: u,
4436
4452
  class: "admin-gallery__group"
4437
4453
  }, [
4438
- d("h2", Bi, p(u), 1),
4439
- d("div", Ii, [
4440
- (o(!0), c(P, null, D(i, (f) => (o(), b(r(j), {
4454
+ d("h2", Ii, h(u), 1),
4455
+ d("div", Di, [
4456
+ (o(!0), c(P, null, D(i, (f) => (o(), b(r(K), {
4441
4457
  key: f.type + f.title,
4442
4458
  padding: "md",
4443
4459
  class: "admin-gallery__card"
4444
4460
  }, {
4445
4461
  default: m(() => [
4446
- d("header", Di, [
4447
- d("h3", Vi, p(f.title), 1),
4448
- d("code", zi, "type: " + p(f.type), 1)
4462
+ d("header", Vi, [
4463
+ d("h3", zi, h(f.title), 1),
4464
+ d("code", qi, "type: " + h(f.type), 1)
4449
4465
  ]),
4450
- d("p", qi, p(f.description), 1),
4451
- d("div", Oi, [
4452
- $(St, {
4466
+ d("p", Oi, h(f.description), 1),
4467
+ d("div", Wi, [
4468
+ $(Ct, {
4453
4469
  node: f.node
4454
4470
  }, null, 8, ["node"])
4455
4471
  ])
@@ -4462,108 +4478,108 @@ const oi = { class: "admin-notifs__hd" }, ri = { class: "admin-notifs__title" },
4462
4478
  }
4463
4479
  });
4464
4480
  export {
4465
- Bn as AdminApp,
4466
- Pn as AdminShell,
4467
- Rn as AdminSidebar,
4468
- $n as AdminTopBar,
4481
+ In as AdminApp,
4482
+ Mn as AdminShell,
4483
+ Tn as AdminSidebar,
4484
+ xn as AdminTopBar,
4469
4485
  ae as ApiError,
4470
- Zs as BadgeEntry,
4471
- ls as BarChartWidget,
4486
+ ei as BadgeEntry,
4487
+ ss as BarChartWidget,
4472
4488
  ze as CheckboxField,
4473
4489
  Ks as ColumnsLayout,
4474
- Jl as DashboardPage,
4490
+ Ql as DashboardPage,
4475
4491
  ue as DateField,
4476
- fs as DonutChartWidget,
4477
- ko as FieldGalleryPage,
4478
- St as FieldRenderer,
4479
- gn as ForbiddenError,
4480
- Gn as ForbiddenPage,
4481
- $s as GaugeWidget,
4482
- ys as HeatmapWidget,
4492
+ vs as DonutChartWidget,
4493
+ wo as FieldGalleryPage,
4494
+ Ct as FieldRenderer,
4495
+ hn as ForbiddenError,
4496
+ Hn as ForbiddenPage,
4497
+ xs as GaugeWidget,
4498
+ bs as HeatmapWidget,
4483
4499
  Kn as HomePage,
4484
- ni as IconEntry,
4485
- bo as ImportWizardPage,
4486
- ul as InfolistRenderer,
4500
+ ai as IconEntry,
4501
+ ko as ImportWizardPage,
4502
+ dl as InfolistRenderer,
4487
4503
  ot as KeyValueEntry,
4488
4504
  we as LayoutRenderer,
4489
4505
  yt as LocaleSwitcher,
4490
- ua as LoginForm,
4491
- ka as LoginPage,
4492
- As as MarkdownWidget,
4506
+ da as LoginForm,
4507
+ wa as LoginPage,
4508
+ Es as MarkdownWidget,
4493
4509
  Pe as NetworkError,
4494
- hn as NotFoundError,
4495
- Xn as NotFoundPage,
4496
- pn as NotificationBell,
4497
- yo as NotificationsDrawer,
4510
+ _n as NotFoundError,
4511
+ Yn as NotFoundPage,
4512
+ gn as NotificationBell,
4513
+ bo as NotificationsDrawer,
4498
4514
  Ve as NumberField,
4499
- Dl as ProfilePage,
4500
- gs as RecentTableWidget,
4515
+ Vl as ProfilePage,
4516
+ hs as RecentTableWidget,
4501
4517
  lt as ResourceFormPage,
4502
- qa as ResourceIndexPage,
4503
- hl as ResourceViewPage,
4518
+ Oa as ResourceIndexPage,
4519
+ _l as ResourceViewPage,
4504
4520
  it as RowsLayout,
4505
4521
  he as SectionLayout,
4506
4522
  le as SelectField,
4507
- ea as SettingsPage,
4508
- Ql as StatWidget,
4509
- Ys as TabsLayout,
4523
+ ta as SettingsPage,
4524
+ Zl as StatWidget,
4525
+ Js as TabsLayout,
4510
4526
  Se as TextAreaField,
4511
4527
  I as TextEntry,
4512
4528
  J as TextField,
4513
4529
  _t as ThemeToggle,
4514
- ma as TwoFactorForm,
4530
+ fa as TwoFactorForm,
4515
4531
  bt as UnauthenticatedError,
4516
- Qa as UnknownEntry,
4517
- xt as UnknownField,
4518
- la as UnknownScreenPage,
4519
- ql as UnknownWidget,
4520
- yn as UserMenu,
4532
+ Za as UnknownEntry,
4533
+ St as UnknownField,
4534
+ sa as UnknownScreenPage,
4535
+ Ol as UnknownWidget,
4536
+ bn as UserMenu,
4521
4537
  Le as ValidationError,
4522
- Ol as WidgetRenderer,
4523
- Ds as buildRoutesFromManifest,
4524
- Yi as clearAdminClient,
4525
- ro as clearInfolistRegistry,
4526
- lo as clearRegistry,
4527
- vo as clearWidgetRegistry,
4528
- go as createAdminApp,
4538
+ Wl as WidgetRenderer,
4539
+ Vs as buildRoutesFromManifest,
4540
+ Ji as clearAdminClient,
4541
+ uo as clearInfolistRegistry,
4542
+ so as clearRegistry,
4543
+ po as clearWidgetRegistry,
4544
+ ho as createAdminApp,
4529
4545
  Us as createAdminClient,
4530
- Ws as createAdminRouter,
4531
- Vs as createAuthGuard,
4532
- zs as createTitleGuard,
4546
+ js as createAdminRouter,
4547
+ zs as createAuthGuard,
4548
+ qs as createTitleGuard,
4533
4549
  H as getAdminClient,
4534
- $t as getField,
4550
+ xt as getField,
4535
4551
  st as getInfolistEntry,
4536
4552
  at as getLayout,
4537
- Vl as getWidget,
4538
- Ji as hasAdminClient,
4539
- Zi as hasField,
4540
- io as hasInfolistEntry,
4541
- no as hasLayout,
4542
- mo as hasWidget,
4543
- po as isError,
4553
+ zl as getWidget,
4554
+ Qi as hasAdminClient,
4555
+ eo as hasField,
4556
+ oo as hasInfolistEntry,
4557
+ ao as hasLayout,
4558
+ fo as hasWidget,
4559
+ go as isError,
4544
4560
  Fs as isSuccess,
4545
- eo as listFields,
4546
- oo as listInfolistEntries,
4547
- ao as listLayouts,
4548
- fo as listWidgets,
4549
- ho as loadBootstrap,
4561
+ to as listFields,
4562
+ ro as listInfolistEntries,
4563
+ lo as listLayouts,
4564
+ vo as listWidgets,
4565
+ _o as loadBootstrap,
4550
4566
  ht as provideFormState,
4551
- dl as provideRecord,
4552
- _o as readCsrfFromMeta,
4553
- ii as readInlineBootstrap,
4554
- Js as registerBuiltinComponents,
4555
- li as registerBuiltinInfolistEntries,
4556
- Es as registerBuiltinWidgets,
4557
- Oa as registerComponents,
4558
- Qi as registerField,
4559
- Ja as registerInfolistEntries,
4560
- so as registerInfolistEntry,
4561
- to as registerLayout,
4562
- co as registerWidget,
4563
- zl as registerWidgets,
4564
- dn as setAdminClient,
4567
+ cl as provideRecord,
4568
+ yo as readCsrfFromMeta,
4569
+ oi as readInlineBootstrap,
4570
+ Qs as registerBuiltinComponents,
4571
+ si as registerBuiltinInfolistEntries,
4572
+ Rs as registerBuiltinWidgets,
4573
+ Wa as registerComponents,
4574
+ Zi as registerField,
4575
+ Qa as registerInfolistEntries,
4576
+ io as registerInfolistEntry,
4577
+ no as registerLayout,
4578
+ mo as registerWidget,
4579
+ ql as registerWidgets,
4580
+ cn as setAdminClient,
4565
4581
  et as toApiError,
4566
- xo as tryUseFormState,
4582
+ So as tryUseFormState,
4567
4583
  Ne as tryUseRecord,
4568
4584
  Q as useAuthStore,
4569
4585
  ce as useFormState,
@@ -4571,9 +4587,9 @@ export {
4571
4587
  oe as useManifestStore,
4572
4588
  kt as useMenuStore,
4573
4589
  Xe as useNotificationsStore,
4574
- uo as useRecord,
4575
- wt as useResourceFormStore,
4576
- wa as useResourceIndexStore,
4590
+ co as useRecord,
4591
+ $t as useResourceFormStore,
4592
+ wt as useResourceIndexStore,
4577
4593
  Ge as useThemeStore
4578
4594
  };
4579
4595
  //# sourceMappingURL=index.mjs.map