@dskripchenko/laravel-admin 1.1.14 → 1.1.15

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,7 +1,7 @@
1
- import { ref as R, computed as g, defineComponent as T, openBlock as o, createElementBlock as c, createElementVNode as d, createBlock as k, unref as r, withCtx as f, Fragment as M, renderList as D, createTextVNode as $, toDisplayString as h, createCommentVNode as F, createVNode as w, renderSlot as X, resolveDynamicComponent as de, normalizeClass as ne, createSlots as qe, h as At, watch as ae, onBeforeUnmount as Et, resolveComponent as it, withModifiers as ot, nextTick as ye, onMounted as Ue, withKeys as Ut, normalizeProps as Re, mergeProps as Fe, normalizeStyle as Te, inject as rt, provide as Rt, createApp as Ft, reactive as Tt } from "vue";
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 f, Fragment as P, renderList as D, createTextVNode as $, toDisplayString as g, createCommentVNode as T, createVNode as w, renderSlot as X, resolveDynamicComponent as de, normalizeClass as ne, createSlots as qe, h as At, watch as ae, onBeforeUnmount as Et, resolveComponent as it, withModifiers as ot, nextTick as ye, onMounted as Fe, withKeys as Ft, normalizeProps as Ue, mergeProps as Re, normalizeStyle as Te, inject as rt, provide as Ut, createApp as Rt, reactive as Tt } from "vue";
2
2
  import { defineStore as le, createPinia as Lt } from "pinia";
3
3
  import { RouterLink as Mt, useRouter as se, useRoute as be, createWebHistory as ut, createRouter as Pt } from "vue-router";
4
- import { UidMenu as dt, UidMenuItem as Oe, UidMenuSeparator as Nt, UidAvatar as ct, UidSidebar as Bt, UidSidebarGroup as It, UidSidebarItem as Dt, UidSidebarLayout as Vt, UidCard as W, UidButton as V, UidAlert as Q, UidInput as ue, UidCheckbox as mt, UidSkeleton as We, UidErrorState as zt, UidEmptyState as qt, UidTable as Ke, UidPagination as Ot, UidBadge as je, UidSelect as Ee, UidStat as Ce, UidHeatmap as Wt, UidGauge as Kt, UidFormField as ke, UidTextarea as jt, UidNumberInput as Gt, UidDatePicker as Ht, UidStack as Xt, UidGrid as Yt, UidTabs as ft, UidTabPanel as vt, UidTab as Ae, UidDescriptionList as Jt, UidDescriptionItem as Qt, UidDrawer as Zt, UidStepper as en, UidFileUpload as tn, UidProgress as nn } from "@dskripchenko/ui";
4
+ import { UidMenu as dt, UidMenuItem as Oe, UidMenuSeparator as Nt, UidAvatar as ct, UidSidebar as Bt, UidSidebarGroup as It, UidSidebarItem as Dt, UidSidebarLayout as Vt, UidCard as K, UidButton as z, UidAlert as Q, UidInput as ue, UidCheckbox as mt, UidSkeleton as We, UidErrorState as zt, UidEmptyState as qt, UidTable as Ke, UidPagination as Ot, UidBadge as je, UidSelect as Ee, UidStat as Ce, UidHeatmap as Wt, UidGauge as Kt, UidFormField as ke, UidTextarea as jt, UidNumberInput as Gt, UidDatePicker as Ht, UidStack as Xt, UidGrid as Yt, UidTabs as ft, UidTabPanel as vt, UidTab as Ae, UidDescriptionList as Jt, UidDescriptionItem as Qt, UidDrawer as Zt, UidStepper as en, UidFileUpload as tn, UidProgress as nn } from "@dskripchenko/ui";
5
5
  import an from "axios";
6
6
  import { p as pt, u as ce } from "./formState-DGNcH1XQ.js";
7
7
  import { t as ho } from "./formState-DGNcH1XQ.js";
@@ -9,7 +9,7 @@ let _e = null;
9
9
  function ln(e) {
10
10
  _e = e;
11
11
  }
12
- function j() {
12
+ function G() {
13
13
  if (_e === null)
14
14
  throw new Error(
15
15
  "[admin] AdminClient is not registered. Call setAdminClient(...) before using stores."
@@ -23,7 +23,7 @@ function Wi() {
23
23
  return _e !== null;
24
24
  }
25
25
  const Ge = le("admin-theme", () => {
26
- const e = R("light"), t = R(["light", "dark"]), n = g(() => e.value === "dark");
26
+ const e = R("light"), t = R(["light", "dark"]), n = v(() => e.value === "dark");
27
27
  function i(u) {
28
28
  e.value = u.theme, t.value = u.availableThemes, s(u.theme);
29
29
  }
@@ -38,7 +38,7 @@ const Ge = le("admin-theme", () => {
38
38
  const m = e.value;
39
39
  a(u);
40
40
  try {
41
- await j().post("/system/setTheme", { theme: u });
41
+ await G().post("/system/setTheme", { theme: u });
42
42
  } catch (p) {
43
43
  throw a(m), p;
44
44
  }
@@ -54,10 +54,10 @@ const Ge = le("admin-theme", () => {
54
54
  applyLocal: a,
55
55
  setTheme: l
56
56
  };
57
- }), sn = ["aria-label", "aria-pressed"], on = ["data-icon"], gt = /* @__PURE__ */ T({
57
+ }), sn = ["aria-label", "aria-pressed"], on = ["data-icon"], gt = /* @__PURE__ */ L({
58
58
  __name: "ThemeToggle",
59
59
  setup(e) {
60
- const t = Ge(), n = g(() => t.current === "dark"), i = g(() => n.value ? "sun" : "moon"), a = g(
60
+ const t = Ge(), n = v(() => t.current === "dark"), i = v(() => n.value ? "sun" : "moon"), a = v(
61
61
  () => n.value ? "Переключить на светлую тему" : "Переключить на тёмную тему"
62
62
  );
63
63
  async function l() {
@@ -93,7 +93,7 @@ const Ge = le("admin-theme", () => {
93
93
  const u = e.value;
94
94
  i(s);
95
95
  try {
96
- await j().post("/system/setLocale", { locale: s });
96
+ await G().post("/system/setLocale", { locale: s });
97
97
  } catch (m) {
98
98
  throw i(u), m;
99
99
  }
@@ -101,7 +101,7 @@ const Ge = le("admin-theme", () => {
101
101
  function l(s) {
102
102
  typeof document < "u" && document.documentElement && document.documentElement.setAttribute("lang", s);
103
103
  try {
104
- j().setLocale(s);
104
+ G().setLocale(s);
105
105
  } catch {
106
106
  }
107
107
  }
@@ -117,30 +117,30 @@ const Ge = le("admin-theme", () => {
117
117
  class: "admin-topbar__icon-btn",
118
118
  style: { width: "auto", padding: "0 8px", gap: "4px", "font-size": "12px" },
119
119
  "aria-label": "Сменить локаль"
120
- }, ht = /* @__PURE__ */ T({
120
+ }, ht = /* @__PURE__ */ L({
121
121
  __name: "LocaleSwitcher",
122
122
  setup(e) {
123
123
  const t = He();
124
124
  async function n(i) {
125
125
  i !== t.current && await t.setLocale(i);
126
126
  }
127
- return (i, a) => (o(), k(r(dt), null, {
127
+ return (i, a) => (o(), b(r(dt), null, {
128
128
  trigger: f(() => [
129
129
  d("button", rn, [
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, h((r(t).current ?? "").toUpperCase()), 1)
134
+ d("span", null, g((r(t).current ?? "").toUpperCase()), 1)
135
135
  ])
136
136
  ]),
137
137
  default: f(() => [
138
- (o(!0), c(M, null, D(r(t).available, (l) => (o(), k(r(Oe), {
138
+ (o(!0), c(P, null, D(r(t).available, (l) => (o(), b(r(Oe), {
139
139
  key: l,
140
140
  onClick: (s) => n(l)
141
141
  }, {
142
142
  default: f(() => [
143
- $(h(l.toUpperCase()), 1)
143
+ $(g(l.toUpperCase()), 1)
144
144
  ]),
145
145
  _: 2
146
146
  }, 1032, ["onClick"]))), 128))
@@ -149,48 +149,48 @@ const Ge = le("admin-theme", () => {
149
149
  }));
150
150
  }
151
151
  }), Xe = le("admin-notifications", () => {
152
- const e = R([]), t = R(0), n = R(!1), i = R("all"), a = R(null), l = g(() => t.value > 0);
152
+ const e = R([]), t = R(0), n = R(!1), i = R("all"), a = R(null), l = v(() => t.value > 0);
153
153
  function s(A) {
154
154
  t.value = A.unread_notifications_count;
155
155
  }
156
- async function u(A = "all", C = 1) {
156
+ async function u(A = "all", S = 1) {
157
157
  n.value = !0;
158
158
  try {
159
- const y = await j().get(`/notifications/list?type=${A}&page=${C}`);
160
- e.value = y.data, t.value = y.meta.unread_count, a.value = {
161
- page: y.meta.page,
162
- per_page: y.meta.per_page,
163
- total: y.meta.total,
164
- last_page: y.meta.last_page
159
+ const h = await G().get(`/notifications/list?type=${A}&page=${S}`);
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
165
  }, i.value = A;
166
166
  } finally {
167
167
  n.value = !1;
168
168
  }
169
169
  }
170
170
  async function m() {
171
- const C = await j().get(
171
+ const S = await G().get(
172
172
  "/notifications/unread"
173
173
  );
174
- t.value = C.count, i.value === "unread" && (e.value = C.data);
174
+ t.value = S.count, i.value === "unread" && (e.value = S.data);
175
175
  }
176
176
  async function p(A) {
177
- await j().post("/notifications/markAsRead", { id: A });
178
- const _ = e.value.find((y) => y.id === A);
179
- _ && _.read_at === null && (_.read_at = (/* @__PURE__ */ new Date()).toISOString(), t.value = Math.max(0, t.value - 1));
177
+ await G().post("/notifications/markAsRead", { id: A });
178
+ const y = e.value.find((h) => h.id === A);
179
+ y && y.read_at === null && (y.read_at = (/* @__PURE__ */ new Date()).toISOString(), t.value = Math.max(0, t.value - 1));
180
180
  }
181
- async function b() {
182
- await j().post("/notifications/markAllAsRead");
183
- const C = (/* @__PURE__ */ new Date()).toISOString();
184
- for (const _ of e.value)
185
- _.read_at === null && (_.read_at = C);
181
+ async function _() {
182
+ await G().post("/notifications/markAllAsRead");
183
+ const S = (/* @__PURE__ */ new Date()).toISOString();
184
+ for (const y of e.value)
185
+ y.read_at === null && (y.read_at = S);
186
186
  t.value = 0;
187
187
  }
188
- async function S(A) {
189
- await j().post("/notifications/destroy", { id: A });
190
- const _ = e.value.findIndex((y) => y.id === A);
191
- if (_ !== -1) {
192
- const y = e.value[_].read_at === null;
193
- e.value.splice(_, 1), y && (t.value = Math.max(0, t.value - 1));
188
+ async function x(A) {
189
+ await G().post("/notifications/destroy", { id: A });
190
+ const y = e.value.findIndex((h) => h.id === A);
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));
194
194
  }
195
195
  }
196
196
  return {
@@ -204,17 +204,17 @@ const Ge = le("admin-theme", () => {
204
204
  load: u,
205
205
  loadUnread: m,
206
206
  markAsRead: p,
207
- markAllAsRead: b,
208
- destroy: S
207
+ markAllAsRead: _,
208
+ destroy: x
209
209
  };
210
- }), un = ["title"], dn = /* @__PURE__ */ T({
210
+ }), un = ["title"], dn = /* @__PURE__ */ L({
211
211
  __name: "NotificationBell",
212
212
  setup(e) {
213
- const t = Xe(), n = g(() => {
213
+ const t = Xe(), n = v(() => {
214
214
  const i = t.unreadCount;
215
215
  return i <= 0 ? null : i > 99 ? "99+" : String(i);
216
216
  });
217
- return (i, a) => (o(), k(r(Mt), {
217
+ return (i, a) => (o(), b(r(Mt), {
218
218
  to: "/notifications",
219
219
  class: "admin-topbar__icon-btn",
220
220
  "aria-label": "Уведомления"
@@ -228,7 +228,7 @@ const Ge = le("admin-theme", () => {
228
228
  key: 0,
229
229
  class: "admin-topbar__bell-badge",
230
230
  title: `Непрочитанных: ${r(t).unreadCount}`
231
- }, h(n.value), 9, un)) : F("", !0)
231
+ }, g(n.value), 9, un)) : T("", !0)
232
232
  ]),
233
233
  _: 1
234
234
  }));
@@ -291,29 +291,29 @@ function Qe(e, t) {
291
291
  }
292
292
  }
293
293
  const J = le("admin-auth", () => {
294
- const e = R(null), t = R([]), n = R(null), i = g(() => e.value !== null), a = g(() => n.value !== null);
295
- function l(_) {
296
- e.value = _.user, t.value = _.permissions;
294
+ const e = R(null), t = R([]), n = R(null), i = v(() => e.value !== null), a = v(() => n.value !== null);
295
+ function l(y) {
296
+ e.value = y.user, t.value = y.permissions;
297
297
  }
298
- function s(_) {
299
- return t.value.includes("*") || t.value.includes(_) ? !0 : t.value.some((y) => {
300
- if (!y.endsWith(".*")) return !1;
301
- const U = y.slice(0, -1);
302
- return _.startsWith(U);
298
+ function s(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);
303
303
  });
304
304
  }
305
- function u(_) {
306
- return _.some(s);
305
+ function u(y) {
306
+ return y.some(s);
307
307
  }
308
- function m(_) {
309
- return _.every(s);
308
+ function m(y) {
309
+ return y.every(s);
310
310
  }
311
- async function p(_) {
312
- const y = j();
311
+ async function p(y) {
312
+ const h = G();
313
313
  try {
314
- const U = await y.post(
314
+ const U = await h.post(
315
315
  "/auth/login",
316
- _
316
+ y
317
317
  );
318
318
  return U?.user && (e.value = U.user), Array.isArray(U?.permissions) && (t.value = U.permissions), n.value = null, "authenticated";
319
319
  } catch (U) {
@@ -321,37 +321,37 @@ const J = le("admin-auth", () => {
321
321
  const q = U.payload.challenge_token;
322
322
  return n.value = {
323
323
  challengeToken: typeof q == "string" ? q : "",
324
- remember: _.remember ?? !1
324
+ remember: y.remember ?? !1
325
325
  }, "two_factor_required";
326
326
  }
327
327
  throw U;
328
328
  }
329
329
  }
330
- async function b(_) {
330
+ async function _(y) {
331
331
  if (n.value === null)
332
332
  throw new Error("No pending 2FA challenge");
333
- const U = await j().post("/auth/twoFactorChallenge", {
333
+ const U = await G().post("/auth/twoFactorChallenge", {
334
334
  challenge_token: n.value.challengeToken,
335
- code: _
335
+ code: y
336
336
  });
337
337
  e.value = U.user, n.value = null;
338
338
  }
339
- async function S(_) {
339
+ async function x(y) {
340
340
  if (n.value === null)
341
341
  throw new Error("No pending 2FA challenge");
342
- const U = await j().post("/auth/twoFactorRecovery", {
342
+ const U = await G().post("/auth/twoFactorRecovery", {
343
343
  challenge_token: n.value.challengeToken,
344
- recovery_code: _
344
+ recovery_code: y
345
345
  });
346
346
  return e.value = U.user, n.value = null, { remaining: U.recovery_codes_remaining };
347
347
  }
348
348
  function A() {
349
349
  n.value = null;
350
350
  }
351
- async function C() {
352
- const _ = j();
351
+ async function S() {
352
+ const y = G();
353
353
  try {
354
- await _.post("/auth/logout");
354
+ await y.post("/auth/logout");
355
355
  } finally {
356
356
  e.value = null, t.value = [], n.value = null;
357
357
  }
@@ -370,10 +370,10 @@ const J = le("admin-auth", () => {
370
370
  hasAnyPermission: u,
371
371
  hasAllPermissions: m,
372
372
  login: p,
373
- twoFactorChallenge: b,
374
- twoFactorRecovery: S,
373
+ twoFactorChallenge: _,
374
+ twoFactorRecovery: x,
375
375
  cancelChallenge: A,
376
- logout: C
376
+ logout: S
377
377
  };
378
378
  }), fn = {
379
379
  type: "button",
@@ -381,7 +381,7 @@ const J = le("admin-auth", () => {
381
381
  "aria-label": "Меню пользователя",
382
382
  "aria-haspopup": "menu",
383
383
  style: { width: "auto", padding: "0 4px", gap: "8px" }
384
- }, vn = /* @__PURE__ */ T({
384
+ }, vn = /* @__PURE__ */ L({
385
385
  __name: "UserMenu",
386
386
  setup(e) {
387
387
  const t = J(), n = se();
@@ -395,7 +395,7 @@ const J = le("admin-auth", () => {
395
395
  function a() {
396
396
  n.push({ name: "admin.profile" });
397
397
  }
398
- return (l, s) => (o(), k(r(dt), null, {
398
+ return (l, s) => (o(), b(r(dt), null, {
399
399
  trigger: f(() => [
400
400
  d("button", fn, [
401
401
  w(r(ct), {
@@ -430,7 +430,7 @@ const J = le("admin-auth", () => {
430
430
  }), pn = { class: "admin-topbar" }, gn = { class: "admin-topbar__breadcrumbs" }, hn = {
431
431
  key: 0,
432
432
  class: "sep"
433
- }, yn = /* @__PURE__ */ T({
433
+ }, yn = /* @__PURE__ */ L({
434
434
  __name: "AdminTopBar",
435
435
  props: {
436
436
  breadcrumbs: { default: () => [] },
@@ -438,7 +438,7 @@ const J = le("admin-auth", () => {
438
438
  },
439
439
  emits: ["toggle-sidebar"],
440
440
  setup(e, { emit: t }) {
441
- const n = e, i = t, a = g(() => n.breadcrumbs.length - 1);
441
+ const n = e, i = t, a = v(() => n.breadcrumbs.length - 1);
442
442
  return (l, s) => (o(), c("header", pn, [
443
443
  e.showCollapseToggle ? (o(), c("button", {
444
444
  key: 0,
@@ -451,17 +451,17 @@ const J = le("admin-auth", () => {
451
451
  class: "admin-topbar__icon",
452
452
  "data-icon": "panel-left"
453
453
  }, null, -1)
454
- ])])) : F("", !0),
454
+ ])])) : T("", !0),
455
455
  d("div", gn, [
456
456
  X(l.$slots, "breadcrumbs", {}, () => [
457
- (o(!0), c(M, null, D(e.breadcrumbs, (u, m) => (o(), c(M, { key: m }, [
458
- m > 0 ? (o(), c("span", hn, "›")) : F("", !0),
459
- (o(), k(de(u.to ? "a" : "span"), {
457
+ (o(!0), c(P, null, D(e.breadcrumbs, (u, m) => (o(), c(P, { key: m }, [
458
+ m > 0 ? (o(), c("span", hn, "›")) : T("", !0),
459
+ (o(), b(de(u.to ? "a" : "span"), {
460
460
  href: typeof u.to == "string" ? u.to : void 0,
461
461
  class: ne(m === a.value ? "cur" : "")
462
462
  }, {
463
463
  default: f(() => [
464
- $(h(u.label), 1)
464
+ $(g(u.label), 1)
465
465
  ]),
466
466
  _: 2
467
467
  }, 1032, ["href", "class"]))
@@ -491,36 +491,36 @@ const J = le("admin-auth", () => {
491
491
  ]));
492
492
  }
493
493
  }), _t = le("admin-menu", () => {
494
- const e = R([]), t = R(!1), n = R(null), i = R(!1), a = g(() => {
495
- const p = J(), b = (S) => {
496
- if (Array.isArray(S.permissions) && S.permissions.length > 0 && !p.hasAnyPermission(S.permissions))
494
+ const e = R([]), t = R(!1), n = R(null), i = R(!1), a = v(() => {
495
+ const p = J(), _ = (x) => {
496
+ if (Array.isArray(x.permissions) && x.permissions.length > 0 && !p.hasAnyPermission(x.permissions))
497
497
  return null;
498
- const A = (S.children ?? []).map(b).filter((C) => C !== null);
499
- return { ...S, children: A };
498
+ const A = (x.children ?? []).map(_).filter((S) => S !== null);
499
+ return { ...x, children: A };
500
500
  };
501
- return e.value.map(b).filter((S) => S !== null);
502
- }), l = g(() => {
501
+ return e.value.map(_).filter((x) => x !== null);
502
+ }), l = v(() => {
503
503
  const p = /* @__PURE__ */ new Map();
504
- for (const S of a.value) {
505
- const A = S.group ?? null;
506
- p.has(A) || p.set(A, []), p.get(A).push(S);
504
+ for (const x of a.value) {
505
+ const A = x.group ?? null;
506
+ p.has(A) || p.set(A, []), p.get(A).push(x);
507
507
  }
508
- const b = [];
509
- for (const [S, A] of p)
510
- A.sort((C, _) => {
511
- const y = (C.order ?? 0) - (_.order ?? 0);
512
- return y !== 0 ? y : C.label.localeCompare(_.label);
513
- }), b.push({ group: S, items: A });
514
- return b;
508
+ const _ = [];
509
+ for (const [x, A] of p)
510
+ A.sort((S, y) => {
511
+ const h = (S.order ?? 0) - (y.order ?? 0);
512
+ return h !== 0 ? h : S.label.localeCompare(y.label);
513
+ }), _.push({ group: x, items: A });
514
+ return _;
515
515
  });
516
516
  async function s(p = !1) {
517
517
  if (i.value && !p) return e.value;
518
518
  t.value = !0, n.value = null;
519
519
  try {
520
- const S = await j().get("/system/menu");
521
- return e.value = Array.isArray(S.items) ? S.items : [], i.value = !0, e.value;
522
- } catch (b) {
523
- throw n.value = b instanceof Error ? b : new Error(String(b)), b;
520
+ const x = await G().get("/system/menu");
521
+ return e.value = Array.isArray(x.items) ? x.items : [], i.value = !0, e.value;
522
+ } catch (_) {
523
+ throw n.value = _ instanceof Error ? _ : new Error(String(_)), _;
524
524
  } finally {
525
525
  t.value = !1;
526
526
  }
@@ -551,7 +551,7 @@ const J = le("admin-auth", () => {
551
551
  }, $n = { class: "admin-sidebar-foot" }, xn = {
552
552
  key: 0,
553
553
  class: "admin-sidebar-foot__text"
554
- }, Sn = ["href"], Cn = /* @__PURE__ */ T({
554
+ }, Sn = ["href"], Cn = /* @__PURE__ */ L({
555
555
  __name: "AdminSidebar",
556
556
  props: {
557
557
  collapsed: { type: Boolean, default: !1 },
@@ -562,7 +562,7 @@ const J = le("admin-auth", () => {
562
562
  docsUrl: { default: null }
563
563
  },
564
564
  setup(e) {
565
- const t = _t(), n = be(), i = g(() => t.groupedItems);
565
+ const t = _t(), n = be(), i = v(() => t.groupedItems);
566
566
  function a(u) {
567
567
  return !!(u.routeName && n.name === u.routeName || u.url && n.path === u.url);
568
568
  }
@@ -574,38 +574,38 @@ const J = le("admin-auth", () => {
574
574
  if (u.url) return u.url;
575
575
  if (u.routeName) return { name: u.routeName };
576
576
  }
577
- return (u, m) => (o(), k(r(Bt), { collapsed: e.collapsed }, qe({
577
+ return (u, m) => (o(), b(r(Bt), { collapsed: e.collapsed }, qe({
578
578
  header: f(() => [
579
579
  d("div", _n, [
580
- d("div", bn, h(e.brandMark), 1),
581
- e.collapsed ? F("", !0) : (o(), c("div", kn, h(e.brandName), 1))
580
+ d("div", bn, g(e.brandMark), 1),
581
+ e.collapsed ? T("", !0) : (o(), c("div", kn, g(e.brandName), 1))
582
582
  ]),
583
583
  e.tenant && !e.collapsed ? (o(), c("div", wn, [
584
- d("span", null, h(e.tenant.label), 1),
585
- d("b", null, h(e.tenant.name), 1)
586
- ])) : F("", !0)
584
+ d("span", null, g(e.tenant.label), 1),
585
+ d("b", null, g(e.tenant.name), 1)
586
+ ])) : T("", !0)
587
587
  ]),
588
588
  nav: f(() => [
589
- (o(!0), c(M, null, D(i.value, (p, b) => (o(), k(r(It), {
590
- key: `grp-${b}`,
589
+ (o(!0), c(P, null, D(i.value, (p, _) => (o(), b(r(It), {
590
+ key: `grp-${_}`,
591
591
  title: p.group ?? void 0
592
592
  }, {
593
593
  default: f(() => [
594
- (o(!0), c(M, null, D(p.items, (S) => (o(), k(r(Dt), {
595
- key: S.key,
596
- to: s(S),
597
- active: a(S),
598
- badge: S.badge ?? void 0
594
+ (o(!0), c(P, null, D(p.items, (x) => (o(), b(r(Dt), {
595
+ key: x.key,
596
+ to: s(x),
597
+ active: a(x),
598
+ badge: x.badge ?? void 0
599
599
  }, qe({
600
600
  default: f(() => [
601
- $(" " + h(S.label), 1)
601
+ $(" " + g(x.label), 1)
602
602
  ]),
603
603
  _: 2
604
604
  }, [
605
- S.icon ? {
605
+ x.icon ? {
606
606
  name: "icon",
607
607
  fn: f(() => [
608
- (o(), k(de(l(S.icon))))
608
+ (o(), b(de(l(x.icon))))
609
609
  ]),
610
610
  key: "0"
611
611
  } : void 0
@@ -620,12 +620,12 @@ const J = le("admin-auth", () => {
620
620
  name: "footer",
621
621
  fn: f(() => [
622
622
  d("div", $n, [
623
- e.version ? (o(), c("span", xn, h(e.version), 1)) : F("", !0),
623
+ e.version ? (o(), c("span", xn, g(e.version), 1)) : T("", !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, Sn)) : F("", !0)
628
+ }, " Docs ", 8, Sn)) : T("", !0)
629
629
  ])
630
630
  ]),
631
631
  key: "0"
@@ -636,7 +636,7 @@ const J = le("admin-auth", () => {
636
636
  key: 0,
637
637
  class: "admin-impersonation-banner",
638
638
  role: "status"
639
- }, Ie = "data-admin-impersonating", Un = /* @__PURE__ */ T({
639
+ }, Ie = "data-admin-impersonating", Fn = /* @__PURE__ */ L({
640
640
  __name: "AdminShell",
641
641
  props: {
642
642
  collapsed: { type: Boolean, default: !1 },
@@ -663,7 +663,7 @@ const J = le("admin-auth", () => {
663
663
  e.impersonation ? (o(), c("div", En, [
664
664
  d("span", null, [
665
665
  u[1] || (u[1] = $(" Вы вошли как ", -1)),
666
- d("b", null, h(e.impersonation.asName), 1),
666
+ d("b", null, g(e.impersonation.asName), 1),
667
667
  u[2] || (u[2] = $(" · режим имперсонации ", -1))
668
668
  ]),
669
669
  d("button", {
@@ -671,7 +671,7 @@ const J = le("admin-auth", () => {
671
671
  class: "admin-impersonation-banner__exit",
672
672
  onClick: l
673
673
  }, " Выйти из режима ")
674
- ])) : F("", !0),
674
+ ])) : T("", !0),
675
675
  w(r(Vt), {
676
676
  "model-value": e.collapsed,
677
677
  "onUpdate:modelValue": a
@@ -695,45 +695,45 @@ const J = le("admin-auth", () => {
695
695
  }, 8, ["model-value"])
696
696
  ]));
697
697
  }
698
- }), Rn = /* @__PURE__ */ T({
698
+ }), Un = /* @__PURE__ */ L({
699
699
  __name: "AdminApp",
700
700
  setup(e) {
701
- const t = be(), n = g(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
701
+ const t = be(), n = v(() => !(t.meta?.fullscreen === !0 || t.meta?.kind === "auth" || t.name === "admin.notFound"));
702
702
  return (i, a) => {
703
703
  const l = it("router-view");
704
- return n.value ? (o(), k(Un, { key: 0 }, {
704
+ return n.value ? (o(), b(Fn, { key: 0 }, {
705
705
  default: f(() => [
706
706
  w(l)
707
707
  ]),
708
708
  _: 1
709
- })) : (o(), k(l, { key: 1 }));
709
+ })) : (o(), b(l, { key: 1 }));
710
710
  };
711
711
  }
712
712
  }), ie = le("admin-manifest", () => {
713
- const e = R(null), t = R(!1), n = R(null), i = g(() => e.value !== null), a = g(() => e.value?.version ?? null), l = g(() => e.value?.resources ?? []), s = g(() => e.value?.screens ?? []), u = g(() => e.value?.settings ?? []), m = g(() => e.value?.plugins ?? []);
714
- function p(_) {
715
- return l.value.find((y) => y.slug === _) ?? null;
713
+ const e = R(null), t = R(!1), n = R(null), i = v(() => e.value !== null), a = v(() => e.value?.version ?? null), l = v(() => e.value?.resources ?? []), s = v(() => e.value?.screens ?? []), u = v(() => e.value?.settings ?? []), m = v(() => e.value?.plugins ?? []);
714
+ function p(y) {
715
+ return l.value.find((h) => h.slug === y) ?? null;
716
716
  }
717
- function b(_) {
718
- return s.value.find((y) => y.slug === _) ?? null;
717
+ function _(y) {
718
+ return s.value.find((h) => h.slug === y) ?? null;
719
719
  }
720
- function S(_) {
721
- return u.value.find((y) => y.slug === _) ?? null;
720
+ function x(y) {
721
+ return u.value.find((h) => h.slug === y) ?? null;
722
722
  }
723
- async function A(_ = !1) {
724
- if (e.value !== null && !_)
723
+ async function A(y = !1) {
724
+ if (e.value !== null && !y)
725
725
  return e.value;
726
726
  t.value = !0, n.value = null;
727
727
  try {
728
- const U = await j().get("/system/manifest");
728
+ const U = await G().get("/system/manifest");
729
729
  return e.value = U, U;
730
- } catch (y) {
731
- throw n.value = y instanceof Error ? y : new Error(String(y)), y;
730
+ } catch (h) {
731
+ throw n.value = h instanceof Error ? h : new Error(String(h)), h;
732
732
  } finally {
733
733
  t.value = !1;
734
734
  }
735
735
  }
736
- function C() {
736
+ function S() {
737
737
  e.value = null, n.value = null, t.value = !1;
738
738
  }
739
739
  return {
@@ -750,25 +750,25 @@ const J = le("admin-auth", () => {
750
750
  plugins: m,
751
751
  // actions
752
752
  getResource: p,
753
- getScreen: b,
754
- getSettings: S,
753
+ getScreen: _,
754
+ getSettings: x,
755
755
  load: A,
756
- reset: C
756
+ reset: S
757
757
  };
758
- }), Fn = { class: "admin-home" }, Tn = { class: "admin-home__title" }, Ln = {
758
+ }), Rn = { class: "admin-home" }, Tn = { class: "admin-home__title" }, Ln = {
759
759
  key: 0,
760
760
  class: "admin-home__resources"
761
- }, Mn = { class: "admin-home__grid" }, Pn = ["onClick"], Nn = { class: "admin-home__card-label" }, Bn = { class: "admin-home__card-slug" }, In = /* @__PURE__ */ T({
761
+ }, Mn = { class: "admin-home__grid" }, Pn = ["onClick"], Nn = { class: "admin-home__card-label" }, Bn = { class: "admin-home__card-slug" }, In = /* @__PURE__ */ L({
762
762
  __name: "HomePage",
763
763
  setup(e) {
764
- const t = ie(), n = J(), i = se(), a = g(() => n.user?.name ?? ""), l = g(() => t.manifest?.resources ?? []);
765
- return (s, u) => (o(), c("div", Fn, [
766
- w(r(W), {
764
+ const t = ie(), n = J(), i = se(), a = v(() => n.user?.name ?? ""), l = v(() => t.manifest?.resources ?? []);
765
+ return (s, u) => (o(), c("div", Rn, [
766
+ w(r(K), {
767
767
  padding: "lg",
768
768
  class: "admin-home__hero"
769
769
  }, {
770
770
  default: f(() => [
771
- d("h1", Tn, "Добро пожаловать" + h(a.value ? ", " + a.value : ""), 1),
771
+ d("h1", Tn, "Добро пожаловать" + g(a.value ? ", " + a.value : ""), 1),
772
772
  u[0] || (u[0] = d("p", { class: "admin-home__lead" }, " Админ-панель готова. Воспользуйтесь сайдбаром или переходите к ресурсам ниже. ", -1))
773
773
  ]),
774
774
  _: 1
@@ -776,7 +776,7 @@ const J = le("admin-auth", () => {
776
776
  l.value.length ? (o(), c("section", Ln, [
777
777
  u[1] || (u[1] = d("h2", { class: "admin-home__heading" }, "Ресурсы", -1)),
778
778
  d("ul", Mn, [
779
- (o(!0), c(M, null, D(l.value, (m) => (o(), c("li", {
779
+ (o(!0), c(P, null, D(l.value, (m) => (o(), c("li", {
780
780
  key: m.slug
781
781
  }, [
782
782
  d("button", {
@@ -784,27 +784,27 @@ const J = le("admin-auth", () => {
784
784
  class: "admin-home__card",
785
785
  onClick: (p) => r(i).push({ name: `admin.resource.${m.slug}.index` })
786
786
  }, [
787
- d("span", Nn, h(m.label), 1),
788
- d("span", Bn, h(m.slug), 1)
787
+ d("span", Nn, g(m.label), 1),
788
+ d("span", Bn, g(m.slug), 1)
789
789
  ], 8, Pn)
790
790
  ]))), 128))
791
791
  ])
792
- ])) : F("", !0)
792
+ ])) : T("", !0)
793
793
  ]));
794
794
  }
795
- }), Dn = { class: "admin-status-page" }, Vn = /* @__PURE__ */ T({
795
+ }), Dn = { class: "admin-status-page" }, Vn = /* @__PURE__ */ L({
796
796
  __name: "ForbiddenPage",
797
797
  setup(e) {
798
798
  const t = se();
799
799
  return (n, i) => (o(), c("div", Dn, [
800
- w(r(W), {
800
+ w(r(K), {
801
801
  padding: "lg",
802
802
  class: "admin-status-page__card"
803
803
  }, {
804
804
  default: f(() => [
805
805
  i[2] || (i[2] = d("h1", { class: "admin-status-page__code" }, "403", -1)),
806
806
  i[3] || (i[3] = d("p", { class: "admin-status-page__message" }, "Доступ запрещён.", -1)),
807
- w(r(V), {
807
+ w(r(z), {
808
808
  variant: "ghost",
809
809
  onClick: i[0] || (i[0] = (a) => r(t).replace({ name: "admin.home" }))
810
810
  }, {
@@ -818,19 +818,19 @@ const J = le("admin-auth", () => {
818
818
  })
819
819
  ]));
820
820
  }
821
- }), zn = { class: "admin-status-page" }, qn = /* @__PURE__ */ T({
821
+ }), zn = { class: "admin-status-page" }, qn = /* @__PURE__ */ L({
822
822
  __name: "NotFoundPage",
823
823
  setup(e) {
824
824
  const t = se();
825
825
  return (n, i) => (o(), c("div", zn, [
826
- w(r(W), {
826
+ w(r(K), {
827
827
  padding: "lg",
828
828
  class: "admin-status-page__card"
829
829
  }, {
830
830
  default: f(() => [
831
831
  i[2] || (i[2] = d("h1", { class: "admin-status-page__code" }, "404", -1)),
832
832
  i[3] || (i[3] = d("p", { class: "admin-status-page__message" }, "Страница не найдена.", -1)),
833
- w(r(V), {
833
+ w(r(z), {
834
834
  variant: "ghost",
835
835
  onClick: i[0] || (i[0] = (a) => r(t).replace({ name: "admin.home" }))
836
836
  }, {
@@ -850,34 +850,34 @@ const J = le("admin-auth", () => {
850
850
  }, jn = {
851
851
  key: 1,
852
852
  class: "admin-settings-page__debug"
853
- }, Gn = /* @__PURE__ */ T({
853
+ }, Gn = /* @__PURE__ */ L({
854
854
  __name: "SettingsPage",
855
855
  setup(e) {
856
- const t = be(), n = ie(), i = g(() => String(t.params.slug ?? "")), a = g(() => n.manifest?.settings?.find((l) => l.slug === i.value) ?? null);
856
+ const t = be(), n = ie(), i = v(() => String(t.params.slug ?? "")), a = v(() => n.manifest?.settings?.find((l) => l.slug === i.value) ?? null);
857
857
  return (l, s) => (o(), c("div", On, [
858
- w(r(W), { padding: "lg" }, {
858
+ w(r(K), { padding: "lg" }, {
859
859
  default: f(() => [
860
- d("h1", Wn, h(a.value?.label ?? i.value), 1),
861
- a.value ? (o(), c("pre", jn, h(JSON.stringify(a.value.fields, null, 2)), 1)) : (o(), c("p", Kn, " Settings «" + h(i.value) + "» не найдено в manifest'е. ", 1))
860
+ d("h1", Wn, g(a.value?.label ?? i.value), 1),
861
+ a.value ? (o(), c("pre", jn, g(JSON.stringify(a.value.fields, null, 2)), 1)) : (o(), c("p", Kn, " Settings «" + g(i.value) + "» не найдено в manifest'е. ", 1))
862
862
  ]),
863
863
  _: 1
864
864
  })
865
865
  ]));
866
866
  }
867
- }), Hn = { class: "admin-status-page" }, Xn = { class: "admin-status-page__title" }, Yn = { class: "admin-status-page__hint" }, Jn = /* @__PURE__ */ T({
867
+ }), Hn = { class: "admin-status-page" }, Xn = { class: "admin-status-page__title" }, Yn = { class: "admin-status-page__hint" }, Jn = /* @__PURE__ */ L({
868
868
  __name: "UnknownScreenPage",
869
869
  setup(e) {
870
- const t = be(), n = g(() => String(t.params.slug ?? "")), i = g(() => String(t.meta?.title ?? n.value));
870
+ const t = be(), n = v(() => String(t.params.slug ?? "")), i = v(() => String(t.meta?.title ?? n.value));
871
871
  return (a, l) => (o(), c("div", Hn, [
872
- w(r(W), {
872
+ w(r(K), {
873
873
  padding: "lg",
874
874
  class: "admin-status-page__card"
875
875
  }, {
876
876
  default: f(() => [
877
- d("h1", Xn, h(i.value), 1),
877
+ d("h1", Xn, g(i.value), 1),
878
878
  d("p", Yn, [
879
- $(" Это заглушка для screen «" + h(n.value) + "». Передайте свой компонент через ", 1),
880
- l[0] || (l[0] = d("code", null, "createAdminApp(" + h("{") + " pages: " + h("{") + " screen: MyScreen " + h("}") + " " + h("}") + ")", -1)),
879
+ $(" Это заглушка для screen «" + g(n.value) + "». Передайте свой компонент через ", 1),
880
+ l[0] || (l[0] = d("code", null, "createAdminApp(" + g("{") + " pages: " + g("{") + " screen: MyScreen " + g("}") + " " + g("}") + ")", -1)),
881
881
  l[1] || (l[1] = $(". ", -1))
882
882
  ])
883
883
  ]),
@@ -888,7 +888,7 @@ const J = le("admin-auth", () => {
888
888
  }), Qn = { class: "admin-auth-card__row" }, Zn = ["href"], ea = {
889
889
  key: 1,
890
890
  style: { "text-align": "center", "font-size": "var(--uid-font-size-xs)", color: "var(--uid-text-secondary)", "padding-top": "4px" }
891
- }, ta = ["href"], na = /* @__PURE__ */ T({
891
+ }, ta = ["href"], na = /* @__PURE__ */ L({
892
892
  __name: "LoginForm",
893
893
  props: {
894
894
  forgotUrl: { default: null },
@@ -897,70 +897,70 @@ const J = le("admin-auth", () => {
897
897
  },
898
898
  emits: ["success"],
899
899
  setup(e, { emit: t }) {
900
- const n = t, i = J(), a = R(""), l = R(""), s = R(!1), u = R(!1), m = R(null), p = R({}), b = g(() => p.value.email?.[0]), S = g(() => p.value.password?.[0]);
900
+ const n = t, i = J(), a = R(""), l = R(""), s = R(!1), u = R(!1), m = R(null), p = R({}), _ = v(() => p.value.email?.[0]), x = v(() => p.value.password?.[0]);
901
901
  async function A() {
902
902
  if (!u.value) {
903
903
  u.value = !0, m.value = null, p.value = {};
904
904
  try {
905
- const C = await i.login({
905
+ const S = await i.login({
906
906
  email: a.value,
907
907
  password: l.value,
908
908
  remember: s.value
909
909
  });
910
- n("success", C);
911
- } catch (C) {
912
- C instanceof Le ? (p.value = C.fields, m.value = C.firstFieldMessage()) : C instanceof Me ? m.value = "Нет соединения с сервером" : C instanceof Z ? m.value = C.message || "Не удалось войти" : m.value = C.message;
910
+ n("success", S);
911
+ } catch (S) {
912
+ S instanceof Le ? (p.value = S.fields, m.value = S.firstFieldMessage()) : S instanceof Me ? m.value = "Нет соединения с сервером" : S instanceof Z ? m.value = S.message || "Не удалось войти" : m.value = S.message;
913
913
  } finally {
914
914
  u.value = !1;
915
915
  }
916
916
  }
917
917
  }
918
- return (C, _) => (o(), c("form", {
918
+ return (S, y) => (o(), c("form", {
919
919
  class: "admin-auth-card__bd",
920
920
  novalidate: "",
921
921
  onSubmit: ot(A, ["prevent"])
922
922
  }, [
923
- m.value ? (o(), k(r(Q), {
923
+ m.value ? (o(), b(r(Q), {
924
924
  key: 0,
925
925
  variant: "danger",
926
926
  class: "admin-auth-card__alert",
927
927
  role: "alert"
928
928
  }, {
929
929
  default: f(() => [
930
- $(h(m.value), 1)
930
+ $(g(m.value), 1)
931
931
  ]),
932
932
  _: 1
933
- })) : F("", !0),
933
+ })) : T("", !0),
934
934
  w(r(ue), {
935
935
  modelValue: a.value,
936
- "onUpdate:modelValue": _[0] || (_[0] = (y) => a.value = y),
936
+ "onUpdate:modelValue": y[0] || (y[0] = (h) => a.value = h),
937
937
  type: "email",
938
938
  label: "Email",
939
939
  placeholder: "you@company.com",
940
940
  autocomplete: "username",
941
941
  required: !0,
942
942
  disabled: u.value,
943
- error: b.value,
943
+ error: _.value,
944
944
  name: "email"
945
945
  }, null, 8, ["modelValue", "disabled", "error"]),
946
946
  w(r(ue), {
947
947
  modelValue: l.value,
948
- "onUpdate:modelValue": _[1] || (_[1] = (y) => l.value = y),
948
+ "onUpdate:modelValue": y[1] || (y[1] = (h) => l.value = h),
949
949
  type: "password",
950
950
  label: "Пароль",
951
951
  autocomplete: "current-password",
952
952
  required: !0,
953
953
  disabled: u.value,
954
- error: S.value,
954
+ error: x.value,
955
955
  name: "password"
956
956
  }, null, 8, ["modelValue", "disabled", "error"]),
957
957
  d("div", Qn, [
958
958
  w(r(mt), {
959
959
  modelValue: s.value,
960
- "onUpdate:modelValue": _[2] || (_[2] = (y) => s.value = y),
960
+ "onUpdate:modelValue": y[2] || (y[2] = (h) => s.value = h),
961
961
  disabled: u.value
962
962
  }, {
963
- default: f(() => [..._[3] || (_[3] = [
963
+ default: f(() => [...y[3] || (y[3] = [
964
964
  $(" Запомнить меня ", -1)
965
965
  ])]),
966
966
  _: 1
@@ -969,9 +969,9 @@ const J = le("admin-auth", () => {
969
969
  key: 0,
970
970
  href: e.forgotUrl,
971
971
  class: "admin-auth-card__link"
972
- }, " Забыли пароль? ", 8, Zn)) : F("", !0)
972
+ }, " Забыли пароль? ", 8, Zn)) : T("", !0)
973
973
  ]),
974
- w(r(V), {
974
+ w(r(z), {
975
975
  type: "submit",
976
976
  variant: "primary",
977
977
  size: "lg",
@@ -979,42 +979,42 @@ const J = le("admin-auth", () => {
979
979
  disabled: u.value
980
980
  }, {
981
981
  default: f(() => [
982
- $(h(u.value ? "Вход…" : "Войти"), 1)
982
+ $(g(u.value ? "Вход…" : "Войти"), 1)
983
983
  ]),
984
984
  _: 1
985
985
  }, 8, ["loading", "disabled"]),
986
986
  e.ssoLinkLabel && e.ssoUrl ? (o(), c("div", ea, [
987
- _[4] || (_[4] = $(" или войдите через ", -1)),
987
+ y[4] || (y[4] = $(" или войдите через ", -1)),
988
988
  d("a", {
989
989
  href: e.ssoUrl,
990
990
  class: "admin-auth-card__link"
991
- }, h(e.ssoLinkLabel), 9, ta)
992
- ])) : F("", !0)
991
+ }, g(e.ssoLinkLabel), 9, ta)
992
+ ])) : T("", !0)
993
993
  ], 32));
994
994
  }
995
- }), aa = ["value", "disabled", "aria-label", "onInput", "onKeydown"], la = { class: "admin-auth-card__row" }, sa = /* @__PURE__ */ T({
995
+ }), aa = ["value", "disabled", "aria-label", "onInput", "onKeydown"], la = { class: "admin-auth-card__row" }, sa = /* @__PURE__ */ L({
996
996
  __name: "TwoFactorForm",
997
997
  emits: ["success", "cancel"],
998
998
  setup(e, { emit: t }) {
999
- const n = t, i = J(), a = R("totp"), l = R(["", "", "", "", "", ""]), s = R(""), u = R([]), m = R(!1), p = R(null), b = R(null), S = g(() => l.value.join("")), A = g(() => a.value === "totp" ? S.value.length === 6 : s.value.trim().length > 0);
1000
- function C(v, x) {
1001
- x instanceof HTMLInputElement && (u.value[v] = x);
999
+ const n = t, i = J(), a = R("totp"), l = R(["", "", "", "", "", ""]), s = R(""), u = R([]), m = R(!1), p = R(null), _ = R(null), x = v(() => l.value.join("")), A = v(() => a.value === "totp" ? x.value.length === 6 : s.value.trim().length > 0);
1000
+ function S(k, V) {
1001
+ V instanceof HTMLInputElement && (u.value[k] = V);
1002
1002
  }
1003
- function _(v, x) {
1004
- const N = x.target, z = N.value.replace(/\D/g, "").slice(-1);
1005
- l.value[v] = z, N.value = z, z && v < l.value.length - 1 && ye(() => u.value[v + 1]?.focus()), S.value.length === l.value.length && q();
1003
+ function y(k, V) {
1004
+ const M = V.target, E = M.value.replace(/\D/g, "").slice(-1);
1005
+ l.value[k] = E, M.value = E, E && k < l.value.length - 1 && ye(() => u.value[k + 1]?.focus()), x.value.length === l.value.length && q();
1006
1006
  }
1007
- function y(v, x) {
1008
- x.key === "Backspace" && !l.value[v] && v > 0 ? ye(() => u.value[v - 1]?.focus()) : x.key === "ArrowLeft" && v > 0 ? (u.value[v - 1]?.focus(), x.preventDefault()) : x.key === "ArrowRight" && v < l.value.length - 1 && (u.value[v + 1]?.focus(), x.preventDefault());
1007
+ function h(k, V) {
1008
+ V.key === "Backspace" && !l.value[k] && k > 0 ? ye(() => u.value[k - 1]?.focus()) : V.key === "ArrowLeft" && k > 0 ? (u.value[k - 1]?.focus(), V.preventDefault()) : V.key === "ArrowRight" && k < l.value.length - 1 && (u.value[k + 1]?.focus(), V.preventDefault());
1009
1009
  }
1010
- function U(v) {
1011
- const N = (v.clipboardData?.getData("text") ?? "").replace(/\D/g, "").slice(0, l.value.length);
1012
- if (N.length !== 0) {
1013
- v.preventDefault();
1014
- for (let z = 0; z < l.value.length; z++)
1015
- l.value[z] = N[z] ?? "";
1010
+ function U(k) {
1011
+ const M = (k.clipboardData?.getData("text") ?? "").replace(/\D/g, "").slice(0, l.value.length);
1012
+ if (M.length !== 0) {
1013
+ k.preventDefault();
1014
+ for (let E = 0; E < l.value.length; E++)
1015
+ l.value[E] = M[E] ?? "";
1016
1016
  ye(() => {
1017
- u.value[Math.min(N.length, l.value.length - 1)]?.focus(), N.length === l.value.length && q();
1017
+ u.value[Math.min(M.length, l.value.length - 1)]?.focus(), M.length === l.value.length && q();
1018
1018
  });
1019
1019
  }
1020
1020
  }
@@ -1023,82 +1023,82 @@ const J = le("admin-auth", () => {
1023
1023
  m.value = !0, p.value = null;
1024
1024
  try {
1025
1025
  if (a.value === "totp")
1026
- await i.twoFactorChallenge(S.value);
1026
+ await i.twoFactorChallenge(x.value);
1027
1027
  else {
1028
- const v = await i.twoFactorRecovery(s.value.trim());
1029
- b.value = v.remaining;
1028
+ const k = await i.twoFactorRecovery(s.value.trim());
1029
+ _.value = k.remaining;
1030
1030
  }
1031
1031
  n("success");
1032
- } catch (v) {
1033
- v instanceof Le ? p.value = v.firstFieldMessage() ?? "Неверный код" : v instanceof Me ? p.value = "Нет соединения с сервером" : v instanceof Z ? p.value = v.message || "Не удалось проверить код" : p.value = v.message;
1032
+ } catch (k) {
1033
+ k instanceof Le ? p.value = k.firstFieldMessage() ?? "Неверный код" : k instanceof Me ? p.value = "Нет соединения с сервером" : k instanceof Z ? p.value = k.message || "Не удалось проверить код" : p.value = k.message;
1034
1034
  } finally {
1035
1035
  m.value = !1;
1036
1036
  }
1037
1037
  }
1038
1038
  }
1039
- function P() {
1039
+ function N() {
1040
1040
  i.cancelChallenge(), n("cancel");
1041
1041
  }
1042
- function E() {
1042
+ function F() {
1043
1043
  a.value = a.value === "totp" ? "recovery" : "totp", p.value = null;
1044
1044
  }
1045
- return (v, x) => (o(), c("form", {
1045
+ return (k, V) => (o(), c("form", {
1046
1046
  class: "admin-auth-card__bd",
1047
1047
  novalidate: "",
1048
1048
  onSubmit: ot(q, ["prevent"])
1049
1049
  }, [
1050
- p.value ? (o(), k(r(Q), {
1050
+ p.value ? (o(), b(r(Q), {
1051
1051
  key: 0,
1052
1052
  variant: "danger",
1053
1053
  class: "admin-auth-card__alert",
1054
1054
  role: "alert"
1055
1055
  }, {
1056
1056
  default: f(() => [
1057
- $(h(p.value), 1)
1057
+ $(g(p.value), 1)
1058
1058
  ]),
1059
1059
  _: 1
1060
- })) : F("", !0),
1061
- b.value !== null ? (o(), k(r(Q), {
1060
+ })) : T("", !0),
1061
+ _.value !== null ? (o(), b(r(Q), {
1062
1062
  key: 1,
1063
1063
  variant: "info",
1064
1064
  class: "admin-auth-card__alert",
1065
1065
  role: "status"
1066
1066
  }, {
1067
1067
  default: f(() => [
1068
- $(" Использован recovery-код. Осталось: " + h(b.value), 1)
1068
+ $(" Использован recovery-код. Осталось: " + g(_.value), 1)
1069
1069
  ]),
1070
1070
  _: 1
1071
- })) : F("", !0),
1071
+ })) : T("", !0),
1072
1072
  a.value === "totp" ? (o(), c("div", {
1073
1073
  key: 2,
1074
1074
  class: "admin-code-input",
1075
1075
  onPaste: U
1076
1076
  }, [
1077
- (o(!0), c(M, null, D(l.value, (N, z) => (o(), c("input", {
1078
- key: z,
1077
+ (o(!0), c(P, null, D(l.value, (M, E) => (o(), c("input", {
1078
+ key: E,
1079
1079
  ref_for: !0,
1080
- ref: (L) => C(z, L),
1081
- value: l.value[z],
1080
+ ref: (C) => S(E, C),
1081
+ value: l.value[E],
1082
1082
  type: "text",
1083
1083
  inputmode: "numeric",
1084
1084
  autocomplete: "one-time-code",
1085
1085
  maxlength: "1",
1086
1086
  disabled: m.value,
1087
- "aria-label": `Цифра ${z + 1}`,
1088
- onInput: (L) => _(z, L),
1089
- onKeydown: (L) => y(z, L)
1087
+ "aria-label": `Цифра ${E + 1}`,
1088
+ onInput: (C) => y(E, C),
1089
+ onKeydown: (C) => h(E, C)
1090
1090
  }, null, 40, aa))), 128))
1091
- ], 32)) : (o(), k(r(ue), {
1091
+ ], 32)) : (o(), b(r(ue), {
1092
1092
  key: 3,
1093
1093
  modelValue: s.value,
1094
- "onUpdate:modelValue": x[0] || (x[0] = (N) => s.value = N),
1094
+ "onUpdate:modelValue": V[0] || (V[0] = (M) => s.value = M),
1095
1095
  type: "text",
1096
1096
  label: "Recovery-код",
1097
1097
  autocomplete: "one-time-code",
1098
1098
  disabled: m.value,
1099
1099
  name: "recovery-code"
1100
1100
  }, null, 8, ["modelValue", "disabled"])),
1101
- w(r(V), {
1101
+ w(r(z), {
1102
1102
  type: "submit",
1103
1103
  variant: "primary",
1104
1104
  size: "lg",
@@ -1106,7 +1106,7 @@ const J = le("admin-auth", () => {
1106
1106
  disabled: m.value || !A.value
1107
1107
  }, {
1108
1108
  default: f(() => [
1109
- $(h(m.value ? "Проверка…" : "Подтвердить"), 1)
1109
+ $(g(m.value ? "Проверка…" : "Подтвердить"), 1)
1110
1110
  ]),
1111
1111
  _: 1
1112
1112
  }, 8, ["loading", "disabled"]),
@@ -1114,18 +1114,18 @@ const J = le("admin-auth", () => {
1114
1114
  d("button", {
1115
1115
  type: "button",
1116
1116
  class: "admin-auth-card__link",
1117
- onClick: E
1117
+ onClick: F
1118
1118
  }, [
1119
- a.value === "totp" ? (o(), c(M, { key: 0 }, [
1119
+ a.value === "totp" ? (o(), c(P, { key: 0 }, [
1120
1120
  $("Использовать recovery-код")
1121
- ], 64)) : (o(), c(M, { key: 1 }, [
1121
+ ], 64)) : (o(), c(P, { key: 1 }, [
1122
1122
  $("Вернуться к коду из приложения")
1123
1123
  ], 64))
1124
1124
  ]),
1125
1125
  d("button", {
1126
1126
  type: "button",
1127
1127
  class: "admin-auth-card__link",
1128
- onClick: P
1128
+ onClick: N
1129
1129
  }, " Отмена ")
1130
1130
  ])
1131
1131
  ], 32));
@@ -1136,7 +1136,7 @@ const J = le("admin-auth", () => {
1136
1136
  }, ra = { class: "admin-auth-card__hd" }, ua = ["src", "alt"], da = {
1137
1137
  key: 1,
1138
1138
  "aria-hidden": "true"
1139
- }, ca = { key: 2 }, ma = { class: "admin-auth-card__title" }, fa = { class: "admin-auth-card__sub" }, va = /* @__PURE__ */ T({
1139
+ }, ca = { key: 2 }, ma = { class: "admin-auth-card__title" }, fa = { class: "admin-auth-card__sub" }, va = /* @__PURE__ */ L({
1140
1140
  __name: "LoginPage",
1141
1141
  props: {
1142
1142
  brandName: { default: "Laravel Admin" },
@@ -1164,14 +1164,14 @@ const J = le("admin-auth", () => {
1164
1164
  (s) => {
1165
1165
  s && l();
1166
1166
  }
1167
- ), Ue(() => {
1167
+ ), Fe(() => {
1168
1168
  n.isAuthenticated && l();
1169
1169
  }), (s, u) => (o(), c("div", ia, [
1170
1170
  e.showCornerActions ? (o(), c("div", oa, [
1171
1171
  w(gt),
1172
1172
  w(ht)
1173
- ])) : F("", !0),
1174
- w(r(W), {
1173
+ ])) : T("", !0),
1174
+ w(r(K), {
1175
1175
  class: ne(["admin-auth-card", r(n).isChallengePending ? "admin-auth-card--wide" : ""]),
1176
1176
  padding: "none"
1177
1177
  }, {
@@ -1184,30 +1184,30 @@ const J = le("admin-auth", () => {
1184
1184
  key: 0,
1185
1185
  src: e.brandLogo,
1186
1186
  alt: e.brandName
1187
- }, null, 8, ua)) : r(n).isChallengePending ? (o(), c("span", da, "🛡")) : (o(), c("span", ca, h(e.brandMark), 1))
1187
+ }, null, 8, ua)) : r(n).isChallengePending ? (o(), c("span", da, "🛡")) : (o(), c("span", ca, g(e.brandMark), 1))
1188
1188
  ], 2),
1189
1189
  d("div", ma, [
1190
- r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
1190
+ r(n).isChallengePending ? (o(), c(P, { key: 0 }, [
1191
1191
  $("Двухфакторная проверка")
1192
- ], 64)) : (o(), c(M, { key: 1 }, [
1193
- $(h(e.brandName), 1)
1192
+ ], 64)) : (o(), c(P, { key: 1 }, [
1193
+ $(g(e.brandName), 1)
1194
1194
  ], 64))
1195
1195
  ]),
1196
1196
  d("div", fa, [
1197
- r(n).isChallengePending ? (o(), c(M, { key: 0 }, [
1197
+ r(n).isChallengePending ? (o(), c(P, { key: 0 }, [
1198
1198
  $(" Введите 6-значный код из приложения-аутентификатора ")
1199
- ], 64)) : (o(), c(M, { key: 1 }, [
1199
+ ], 64)) : (o(), c(P, { key: 1 }, [
1200
1200
  $("Войдите, чтобы продолжить работу")
1201
1201
  ], 64))
1202
1202
  ])
1203
1203
  ]),
1204
- r(n).isChallengePending ? (o(), k(sa, {
1204
+ r(n).isChallengePending ? (o(), b(sa, {
1205
1205
  key: 0,
1206
1206
  onSuccess: u[0] || (u[0] = () => {
1207
1207
  }),
1208
1208
  onCancel: u[1] || (u[1] = () => {
1209
1209
  })
1210
- })) : (o(), k(na, {
1210
+ })) : (o(), b(na, {
1211
1211
  key: 1,
1212
1212
  "forgot-url": e.forgotUrl,
1213
1213
  "sso-link-label": e.ssoLinkLabel,
@@ -1221,8 +1221,8 @@ const J = le("admin-auth", () => {
1221
1221
  ]));
1222
1222
  }
1223
1223
  }), Ze = { page: 1, per_page: 20, total: 0, last_page: 1 }, pa = le("admin-resource-index", () => {
1224
- const e = R(null), t = R([]), n = R({ ...Ze }), i = R(!1), a = R(null), l = R(""), s = R({}), u = R(null), m = R(null), p = R(/* @__PURE__ */ new Set()), b = g(() => !i.value && a.value === null && t.value.length === 0), S = g(() => p.value.size), A = g(() => p.value.size > 0), C = g(() => a.value !== null), _ = g(() => p.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((O) => p.value.has(y(O))) ? "all" : "mixed");
1225
- function y(B) {
1224
+ const e = R(null), t = R([]), n = R({ ...Ze }), i = R(!1), a = R(null), l = R(""), s = R({}), u = R(null), m = R(null), p = R(/* @__PURE__ */ new Set()), _ = v(() => !i.value && a.value === null && t.value.length === 0), x = v(() => p.value.size), A = v(() => p.value.size > 0), S = v(() => a.value !== null), y = v(() => p.value.size === 0 || t.value.length === 0 ? "none" : t.value.every((W) => p.value.has(h(W))) ? "all" : "mixed");
1225
+ function h(B) {
1226
1226
  return B.id ?? B.key ?? "";
1227
1227
  }
1228
1228
  function U(B) {
@@ -1231,61 +1231,61 @@ const J = le("admin-auth", () => {
1231
1231
  function q() {
1232
1232
  t.value = [], n.value = { ...Ze }, i.value = !1, a.value = null, l.value = "", s.value = {}, u.value = null, m.value = null, p.value = /* @__PURE__ */ new Set();
1233
1233
  }
1234
- function P(B = {}) {
1235
- const O = {
1234
+ function N(B = {}) {
1235
+ const W = {
1236
1236
  page: B.page ?? n.value.page,
1237
1237
  per_page: B.per_page ?? n.value.per_page
1238
1238
  }, $e = B.search ?? l.value;
1239
- $e && (O.q = $e);
1239
+ $e && (W.q = $e);
1240
1240
  const ge = B.sort ?? u.value, Je = B.direction ?? m.value;
1241
- ge && Je !== null && (O.order = [{ column: ge, direction: Je }]);
1241
+ ge && Je !== null && (W.order = [{ column: ge, direction: Je }]);
1242
1242
  const St = B.filters ?? s.value, Be = {};
1243
1243
  for (const [Ct, oe] of Object.entries(St))
1244
1244
  oe == null || oe === "" || (Be[Ct] = Array.isArray(oe) ? oe.join(",") : oe);
1245
- return Object.keys(Be).length > 0 && (O.filters = Be), O;
1245
+ return Object.keys(Be).length > 0 && (W.filters = Be), W;
1246
1246
  }
1247
- async function E(B = {}) {
1247
+ async function F(B = {}) {
1248
1248
  if (!e.value)
1249
1249
  throw new Error("useResourceIndexStore.load() called before setSlug()");
1250
1250
  i.value = !0, a.value = null;
1251
1251
  try {
1252
- const O = j(), $e = P(B), ge = await O.post(`/${e.value}/search`, $e);
1252
+ const W = G(), $e = N(B), ge = await W.post(`/${e.value}/search`, $e);
1253
1253
  t.value = ge.data, n.value = ge.meta;
1254
- } catch (O) {
1255
- throw a.value = O instanceof Error ? O : new Error(String(O)), O;
1254
+ } catch (W) {
1255
+ throw a.value = W instanceof Error ? W : new Error(String(W)), W;
1256
1256
  } finally {
1257
1257
  i.value = !1;
1258
1258
  }
1259
1259
  }
1260
- async function v(B) {
1261
- l.value = B, n.value.page = 1, await E();
1260
+ async function k(B) {
1261
+ l.value = B, n.value.page = 1, await F();
1262
1262
  }
1263
- async function x(B, O) {
1264
- O == null || O === "" ? delete s.value[B] : s.value[B] = O, n.value.page = 1, await E();
1263
+ async function V(B, W) {
1264
+ W == null || W === "" ? delete s.value[B] : s.value[B] = W, n.value.page = 1, await F();
1265
1265
  }
1266
- async function N() {
1267
- s.value = {}, n.value.page = 1, await E();
1266
+ async function M() {
1267
+ s.value = {}, n.value.page = 1, await F();
1268
1268
  }
1269
- async function z(B, O = "asc") {
1270
- u.value = B, m.value = O, await E();
1269
+ async function E(B, W = "asc") {
1270
+ u.value = B, m.value = W, await F();
1271
1271
  }
1272
- async function L(B) {
1273
- u.value === B ? m.value === "asc" ? m.value = "desc" : m.value === "desc" ? (u.value = null, m.value = null) : m.value = "asc" : (u.value = B, m.value = "asc"), await E();
1272
+ async function C(B) {
1273
+ u.value === B ? m.value === "asc" ? m.value = "desc" : m.value === "desc" ? (u.value = null, m.value = null) : m.value = "asc" : (u.value = B, m.value = "asc"), await F();
1274
1274
  }
1275
- async function K(B) {
1276
- n.value.page = B, await E();
1275
+ async function O(B) {
1276
+ n.value.page = B, await F();
1277
1277
  }
1278
- function H(B) {
1279
- const O = new Set(p.value);
1280
- O.has(B) ? O.delete(B) : O.add(B), p.value = O;
1278
+ function j(B) {
1279
+ const W = new Set(p.value);
1280
+ W.has(B) ? W.delete(B) : W.add(B), p.value = W;
1281
1281
  }
1282
- function G() {
1283
- if (_.value === "all") {
1282
+ function H() {
1283
+ if (y.value === "all") {
1284
1284
  p.value = /* @__PURE__ */ new Set();
1285
1285
  return;
1286
1286
  }
1287
1287
  const B = new Set(p.value);
1288
- for (const O of t.value) B.add(y(O));
1288
+ for (const W of t.value) B.add(h(W));
1289
1289
  p.value = B;
1290
1290
  }
1291
1291
  function ee() {
@@ -1307,26 +1307,26 @@ const J = le("admin-auth", () => {
1307
1307
  sortDirection: m,
1308
1308
  selection: p,
1309
1309
  // getters
1310
- isEmpty: b,
1311
- hasError: C,
1310
+ isEmpty: _,
1311
+ hasError: S,
1312
1312
  hasSelection: A,
1313
- selectedCount: S,
1314
- selectionState: _,
1313
+ selectedCount: x,
1314
+ selectionState: y,
1315
1315
  // actions
1316
1316
  setSlug: U,
1317
1317
  reset: q,
1318
- load: E,
1319
- setSearch: v,
1320
- setFilter: x,
1321
- clearFilters: N,
1322
- setSort: z,
1323
- toggleSort: L,
1324
- setPage: K,
1325
- toggleRow: H,
1326
- toggleAllOnPage: G,
1318
+ load: F,
1319
+ setSearch: k,
1320
+ setFilter: V,
1321
+ clearFilters: M,
1322
+ setSort: E,
1323
+ toggleSort: C,
1324
+ setPage: O,
1325
+ toggleRow: j,
1326
+ toggleAllOnPage: H,
1327
1327
  clearSelection: ee,
1328
1328
  isSelected: xt,
1329
- rowId: y
1329
+ rowId: h
1330
1330
  };
1331
1331
  }), et = "d.m.Y H:i:s", ga = "d.m.Y", ha = /^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}/;
1332
1332
  function ya(e, t, n = {}) {
@@ -1394,10 +1394,10 @@ const wa = { class: "admin-page admin-resource-index" }, $a = { class: "admin-pa
1394
1394
  key: 0,
1395
1395
  class: "admin-bulk-toolbar",
1396
1396
  role: "toolbar"
1397
- }, Ua = { class: "admin-bulk-toolbar__count" }, Ra = {
1397
+ }, Fa = { class: "admin-bulk-toolbar__count" }, Ua = {
1398
1398
  key: 1,
1399
1399
  class: "admin-filter-bar"
1400
- }, Fa = ["value"], Ta = {
1400
+ }, Ra = ["value"], Ta = {
1401
1401
  key: 2,
1402
1402
  class: "admin-resource-index__loading"
1403
1403
  }, La = {
@@ -1406,7 +1406,7 @@ const wa = { class: "admin-page admin-resource-index" }, $a = { class: "admin-pa
1406
1406
  }, Ma = {
1407
1407
  key: 6,
1408
1408
  class: "admin-resource-index__footer"
1409
- }, Pa = /* @__PURE__ */ T({
1409
+ }, Pa = /* @__PURE__ */ L({
1410
1410
  __name: "ResourceIndexPage",
1411
1411
  props: {
1412
1412
  slug: {},
@@ -1417,224 +1417,228 @@ const wa = { class: "admin-page admin-resource-index" }, $a = { class: "admin-pa
1417
1417
  },
1418
1418
  emits: ["bulk-action", "row-click"],
1419
1419
  setup(e, { emit: t }) {
1420
- const n = e, i = t, a = pa(), l = ie(), s = g(() => l.getResource(n.slug)), u = g(
1420
+ const n = e, i = t, a = pa(), l = ie(), s = v(() => l.getResource(n.slug)), u = v(
1421
1421
  () => n.title ?? s.value?.label ?? n.slug
1422
- ), m = g(() => (s.value?.columns ?? []).map((x) => {
1423
- const N = x;
1422
+ ), m = v(() => (s.value?.columns ?? []).map((E) => {
1423
+ const C = E;
1424
1424
  return {
1425
- key: String(N.key ?? N.name ?? ""),
1426
- label: String(N.label ?? N.name ?? ""),
1427
- sortable: !!N.sortable,
1428
- align: N.align ?? "left",
1429
- width: typeof N.width == "string" ? N.width : void 0
1425
+ key: String(C.key ?? C.name ?? ""),
1426
+ label: String(C.label ?? C.name ?? ""),
1427
+ sortable: !!C.sortable,
1428
+ align: C.align ?? "left",
1429
+ width: typeof C.width == "string" ? C.width : void 0
1430
1430
  };
1431
- }).filter((x) => x.key)), p = g(() => {
1432
- const v = s.value?.columns ?? [], x = {};
1433
- for (const N of v) {
1434
- const z = N, L = String(z.key ?? z.name ?? "");
1435
- L && (x[L] = {
1436
- preset: typeof z.preset == "string" ? z.preset : void 0,
1437
- meta: z.meta ?? {}
1431
+ }).filter((E) => E.key)), p = v(() => {
1432
+ const M = s.value?.columns ?? [], E = {};
1433
+ for (const C of M) {
1434
+ const O = C, j = String(O.key ?? O.name ?? "");
1435
+ j && (E[j] = {
1436
+ preset: typeof O.preset == "string" ? O.preset : void 0,
1437
+ meta: O.meta ?? {}
1438
1438
  });
1439
1439
  }
1440
- return x;
1440
+ return E;
1441
1441
  });
1442
- function b(v, x) {
1443
- const z = x?.row?.[v], L = p.value[v];
1444
- return ya(z, L?.preset, L?.meta ?? {});
1442
+ function _(M, E) {
1443
+ const O = E?.row?.[M], j = p.value[M];
1444
+ return ya(O, j?.preset, j?.meta ?? {});
1445
1445
  }
1446
- function S(v) {
1447
- return v?.row;
1446
+ function x(M) {
1447
+ return M?.row;
1448
1448
  }
1449
- const A = g(() => {
1450
- const v = a.meta.total;
1451
- return v === 0 ? "" : `${a.items.length} из ${v}`;
1449
+ const A = v(
1450
+ () => a.search !== "" || Object.keys(a.filters).length > 0
1451
+ ), S = v(
1452
+ () => !a.isEmpty || A.value
1453
+ ), y = v(() => {
1454
+ const M = a.meta.total;
1455
+ return M === 0 ? "" : `${a.items.length} из ${M}`;
1452
1456
  });
1453
- Ue(async () => {
1457
+ Fe(async () => {
1454
1458
  a.setSlug(n.slug), l.manifest === null && await l.load().catch(() => {
1455
1459
  }), await a.load().catch(() => {
1456
1460
  });
1457
1461
  }), ae(
1458
1462
  () => n.slug,
1459
- async (v, x) => {
1460
- v !== x && (a.setSlug(v), await a.load().catch(() => {
1463
+ async (M, E) => {
1464
+ M !== E && (a.setSlug(M), await a.load().catch(() => {
1461
1465
  }));
1462
1466
  }
1463
1467
  );
1464
- async function C(v) {
1465
- await ye(), await a.setSort(v, a.sortDirection);
1468
+ async function h(M) {
1469
+ await ye(), await a.setSort(M, a.sortDirection);
1466
1470
  }
1467
- async function _(v) {
1468
- await ye(), await a.setSort(a.sortKey, v);
1471
+ async function U(M) {
1472
+ await ye(), await a.setSort(a.sortKey, M);
1469
1473
  }
1470
- function y(v) {
1471
- a.selection = v;
1474
+ function q(M) {
1475
+ a.selection = M;
1472
1476
  }
1473
- async function U(v) {
1474
- await a.setPage(v);
1477
+ async function N(M) {
1478
+ await a.setPage(M);
1475
1479
  }
1476
- function q(v) {
1477
- i("row-click", v);
1480
+ function F(M) {
1481
+ i("row-click", M);
1478
1482
  }
1479
- function P(v) {
1480
- i("bulk-action", v, [...a.selection]);
1483
+ function k(M) {
1484
+ i("bulk-action", M, [...a.selection]);
1481
1485
  }
1482
- async function E() {
1486
+ async function V() {
1483
1487
  await a.load().catch(() => {
1484
1488
  });
1485
1489
  }
1486
- return (v, x) => (o(), c("section", wa, [
1490
+ return (M, E) => (o(), c("section", wa, [
1487
1491
  d("header", $a, [
1488
1492
  d("div", xa, [
1489
- d("h1", Sa, h(u.value), 1),
1490
- e.subtitle || A.value ? (o(), c("div", Ca, [
1491
- e.subtitle ? (o(), c(M, { key: 0 }, [
1492
- $(h(e.subtitle), 1)
1493
- ], 64)) : F("", !0),
1494
- e.subtitle && A.value ? (o(), c(M, { key: 1 }, [
1493
+ d("h1", Sa, g(u.value), 1),
1494
+ e.subtitle || y.value ? (o(), c("div", Ca, [
1495
+ e.subtitle ? (o(), c(P, { key: 0 }, [
1496
+ $(g(e.subtitle), 1)
1497
+ ], 64)) : T("", !0),
1498
+ e.subtitle && y.value ? (o(), c(P, { key: 1 }, [
1495
1499
  $(" · ")
1496
- ], 64)) : F("", !0),
1497
- A.value ? (o(), c(M, { key: 2 }, [
1498
- $(h(A.value), 1)
1499
- ], 64)) : F("", !0)
1500
- ])) : F("", !0)
1500
+ ], 64)) : T("", !0),
1501
+ y.value ? (o(), c(P, { key: 2 }, [
1502
+ $(g(y.value), 1)
1503
+ ], 64)) : T("", !0)
1504
+ ])) : T("", !0)
1501
1505
  ]),
1502
1506
  d("div", Aa, [
1503
- X(v.$slots, "actions"),
1504
- e.createRouteName ? (o(), k(r(V), {
1507
+ X(M.$slots, "actions"),
1508
+ e.createRouteName ? (o(), b(r(z), {
1505
1509
  key: 0,
1506
1510
  variant: "primary",
1507
- onClick: x[0] || (x[0] = (N) => v.$router.push({ name: e.createRouteName }))
1511
+ onClick: E[0] || (E[0] = (C) => M.$router.push({ name: e.createRouteName }))
1508
1512
  }, {
1509
1513
  default: f(() => [
1510
- $(h(e.createLabel), 1)
1514
+ $(g(e.createLabel), 1)
1511
1515
  ]),
1512
1516
  _: 1
1513
- })) : F("", !0)
1517
+ })) : T("", !0)
1514
1518
  ])
1515
1519
  ]),
1516
1520
  r(a).hasSelection ? (o(), c("div", Ea, [
1517
- d("span", Ua, [
1518
- x[7] || (x[7] = $(" Выбрано ", -1)),
1519
- d("b", null, h(r(a).selectedCount), 1)
1521
+ d("span", Fa, [
1522
+ E[7] || (E[7] = $(" Выбрано ", -1)),
1523
+ d("b", null, g(r(a).selectedCount), 1)
1520
1524
  ]),
1521
- x[13] || (x[13] = d("span", { class: "admin-bulk-toolbar__divider" }, null, -1)),
1522
- w(r(V), {
1525
+ E[13] || (E[13] = d("span", { class: "admin-bulk-toolbar__divider" }, null, -1)),
1526
+ w(r(z), {
1523
1527
  size: "sm",
1524
1528
  variant: "ghost",
1525
- onClick: x[1] || (x[1] = (N) => P("publish"))
1529
+ onClick: E[1] || (E[1] = (C) => k("publish"))
1526
1530
  }, {
1527
- default: f(() => [...x[8] || (x[8] = [
1531
+ default: f(() => [...E[8] || (E[8] = [
1528
1532
  $("Опубликовать", -1)
1529
1533
  ])]),
1530
1534
  _: 1
1531
1535
  }),
1532
- w(r(V), {
1536
+ w(r(z), {
1533
1537
  size: "sm",
1534
1538
  variant: "ghost",
1535
- onClick: x[2] || (x[2] = (N) => P("archive"))
1539
+ onClick: E[2] || (E[2] = (C) => k("archive"))
1536
1540
  }, {
1537
- default: f(() => [...x[9] || (x[9] = [
1541
+ default: f(() => [...E[9] || (E[9] = [
1538
1542
  $("Архивировать", -1)
1539
1543
  ])]),
1540
1544
  _: 1
1541
1545
  }),
1542
- w(r(V), {
1546
+ w(r(z), {
1543
1547
  size: "sm",
1544
1548
  variant: "ghost",
1545
- onClick: x[3] || (x[3] = (N) => P("export"))
1549
+ onClick: E[3] || (E[3] = (C) => k("export"))
1546
1550
  }, {
1547
- default: f(() => [...x[10] || (x[10] = [
1551
+ default: f(() => [...E[10] || (E[10] = [
1548
1552
  $("Экспорт", -1)
1549
1553
  ])]),
1550
1554
  _: 1
1551
1555
  }),
1552
- w(r(V), {
1556
+ w(r(z), {
1553
1557
  size: "sm",
1554
1558
  variant: "danger",
1555
- onClick: x[4] || (x[4] = (N) => P("delete"))
1559
+ onClick: E[4] || (E[4] = (C) => k("delete"))
1556
1560
  }, {
1557
- default: f(() => [...x[11] || (x[11] = [
1561
+ default: f(() => [...E[11] || (E[11] = [
1558
1562
  $("Удалить", -1)
1559
1563
  ])]),
1560
1564
  _: 1
1561
1565
  }),
1562
- x[14] || (x[14] = d("span", { class: "admin-bulk-toolbar__spacer" }, null, -1)),
1563
- w(r(V), {
1566
+ E[14] || (E[14] = d("span", { class: "admin-bulk-toolbar__spacer" }, null, -1)),
1567
+ w(r(z), {
1564
1568
  size: "sm",
1565
1569
  variant: "ghost",
1566
1570
  onClick: r(a).clearSelection
1567
1571
  }, {
1568
- default: f(() => [...x[12] || (x[12] = [
1572
+ default: f(() => [...E[12] || (E[12] = [
1569
1573
  $(" Снять выделение ", -1)
1570
1574
  ])]),
1571
1575
  _: 1
1572
1576
  }, 8, ["onClick"])
1573
- ])) : (o(), c("div", Ra, [
1577
+ ])) : S.value ? (o(), c("div", Ua, [
1574
1578
  d("input", {
1575
1579
  value: r(a).search,
1576
1580
  type: "search",
1577
1581
  placeholder: "Поиск…",
1578
1582
  class: "admin-filter-bar__search",
1579
- onKeydown: x[5] || (x[5] = Ut((N) => r(a).setSearch(N.target.value), ["enter"]))
1580
- }, null, 40, Fa),
1581
- X(v.$slots, "filters", {
1583
+ onKeydown: E[5] || (E[5] = Ft((C) => r(a).setSearch(C.target.value), ["enter"]))
1584
+ }, null, 40, Ra),
1585
+ X(M.$slots, "filters", {
1582
1586
  filters: r(a).filters,
1583
1587
  setFilter: r(a).setFilter
1584
1588
  }),
1585
- x[16] || (x[16] = d("span", { class: "admin-filter-bar__spacer" }, null, -1)),
1586
- Object.keys(r(a).filters).length > 0 ? (o(), k(r(V), {
1589
+ E[16] || (E[16] = d("span", { class: "admin-filter-bar__spacer" }, null, -1)),
1590
+ Object.keys(r(a).filters).length > 0 ? (o(), b(r(z), {
1587
1591
  key: 0,
1588
1592
  size: "sm",
1589
1593
  variant: "ghost",
1590
1594
  onClick: r(a).clearFilters
1591
1595
  }, {
1592
- default: f(() => [...x[15] || (x[15] = [
1596
+ default: f(() => [...E[15] || (E[15] = [
1593
1597
  $(" Сброс ", -1)
1594
1598
  ])]),
1595
1599
  _: 1
1596
- }, 8, ["onClick"])) : F("", !0)
1597
- ])),
1600
+ }, 8, ["onClick"])) : T("", !0)
1601
+ ])) : T("", !0),
1598
1602
  r(a).loading ? (o(), c("div", Ta, [
1599
- (o(), c(M, null, D(8, (N) => w(r(We), {
1600
- key: N,
1603
+ (o(), c(P, null, D(8, (C) => w(r(We), {
1604
+ key: C,
1601
1605
  height: "40px"
1602
1606
  })), 64))
1603
- ])) : r(a).hasError ? (o(), k(r(zt), {
1607
+ ])) : r(a).hasError ? (o(), b(r(zt), {
1604
1608
  key: 3,
1605
1609
  title: "Не удалось загрузить данные",
1606
1610
  description: r(a).error?.message ?? "Попробуйте обновить страницу.",
1607
1611
  class: "admin-resource-index__state"
1608
1612
  }, {
1609
1613
  actions: f(() => [
1610
- w(r(V), {
1614
+ w(r(z), {
1611
1615
  variant: "primary",
1612
- onClick: E
1616
+ onClick: V
1613
1617
  }, {
1614
- default: f(() => [...x[17] || (x[17] = [
1618
+ default: f(() => [...E[17] || (E[17] = [
1615
1619
  $("Обновить", -1)
1616
1620
  ])]),
1617
1621
  _: 1
1618
1622
  })
1619
1623
  ]),
1620
1624
  _: 1
1621
- }, 8, ["description"])) : r(a).isEmpty ? (o(), k(r(qt), {
1625
+ }, 8, ["description"])) : r(a).isEmpty ? (o(), b(r(qt), {
1622
1626
  key: 4,
1623
1627
  title: "Пока пусто",
1624
1628
  description: "Создайте первую запись или измените фильтры.",
1625
1629
  class: "admin-resource-index__state"
1626
1630
  }, {
1627
1631
  actions: f(() => [
1628
- e.createRouteName ? (o(), k(r(V), {
1632
+ e.createRouteName ? (o(), b(r(z), {
1629
1633
  key: 0,
1630
1634
  variant: "primary",
1631
- onClick: x[6] || (x[6] = (N) => v.$router.push({ name: e.createRouteName }))
1635
+ onClick: E[6] || (E[6] = (C) => M.$router.push({ name: e.createRouteName }))
1632
1636
  }, {
1633
1637
  default: f(() => [
1634
- $(h(e.createLabel), 1)
1638
+ $(g(e.createLabel), 1)
1635
1639
  ]),
1636
1640
  _: 1
1637
- })) : F("", !0)
1641
+ })) : T("", !0)
1638
1642
  ]),
1639
1643
  _: 1
1640
1644
  })) : (o(), c("div", La, [
@@ -1645,19 +1649,19 @@ const wa = { class: "admin-page admin-resource-index" }, $a = { class: "admin-pa
1645
1649
  "sort-direction": r(a).sortDirection,
1646
1650
  selectable: "",
1647
1651
  selection: r(a).selection,
1648
- "row-key": (N) => r(a).rowId(N),
1649
- "onUpdate:sortKey": C,
1650
- "onUpdate:sortDirection": _,
1651
- "onUpdate:selection": y,
1652
- onRowClick: q
1652
+ "row-key": (C) => r(a).rowId(C),
1653
+ "onUpdate:sortKey": h,
1654
+ "onUpdate:sortDirection": U,
1655
+ "onUpdate:selection": q,
1656
+ onRowClick: F
1653
1657
  }, qe({ _: 2 }, [
1654
- D(m.value, (N) => ({
1655
- name: N.key,
1656
- fn: f((z) => [
1657
- X(v.$slots, `cell-${N.key}`, {
1658
- row: S(z)
1658
+ D(m.value, (C) => ({
1659
+ name: C.key,
1660
+ fn: f((O) => [
1661
+ X(M.$slots, `cell-${C.key}`, {
1662
+ row: x(O)
1659
1663
  }, () => [
1660
- $(h(b(N.key, z)), 1)
1664
+ $(g(_(C.key, O)), 1)
1661
1665
  ])
1662
1666
  ])
1663
1667
  }))
@@ -1668,81 +1672,81 @@ const wa = { class: "admin-page admin-resource-index" }, $a = { class: "admin-pa
1668
1672
  "model-value": r(a).meta.page,
1669
1673
  total: r(a).meta.total,
1670
1674
  "per-page": r(a).meta.per_page,
1671
- "onUpdate:modelValue": U
1675
+ "onUpdate:modelValue": N
1672
1676
  }, null, 8, ["model-value", "total", "per-page"])
1673
- ])) : F("", !0)
1677
+ ])) : T("", !0)
1674
1678
  ]));
1675
1679
  }
1676
1680
  }), bt = le("admin-resource-form", () => {
1677
- const e = R(null), t = R("create"), n = R(null), i = R({}), a = R({}), l = R({}), s = R(!1), u = R(!1), m = R(!1), p = R(null), b = g(() => t.value === "create"), S = g(() => t.value === "edit"), A = g(() => t.value === "view"), C = g(() => p.value !== null), _ = g(() => {
1678
- const L = i.value, K = a.value, H = /* @__PURE__ */ new Set([...Object.keys(L), ...Object.keys(K)]);
1679
- for (const G of H)
1680
- if (!Object.is(L[G], K[G]))
1681
- if (typeof L[G] == "object" || typeof K[G] == "object") {
1682
- if (JSON.stringify(L[G]) !== JSON.stringify(K[G])) return !0;
1681
+ const e = R(null), t = R("create"), n = R(null), i = R({}), a = R({}), l = R({}), s = R(!1), u = R(!1), m = R(!1), p = R(null), _ = v(() => t.value === "create"), x = v(() => t.value === "edit"), A = v(() => t.value === "view"), S = v(() => p.value !== null), y = v(() => {
1682
+ const C = i.value, O = a.value, j = /* @__PURE__ */ new Set([...Object.keys(C), ...Object.keys(O)]);
1683
+ for (const H of j)
1684
+ if (!Object.is(C[H], O[H]))
1685
+ if (typeof C[H] == "object" || typeof O[H] == "object") {
1686
+ if (JSON.stringify(C[H]) !== JSON.stringify(O[H])) return !0;
1683
1687
  } else
1684
1688
  return !0;
1685
1689
  return !1;
1686
1690
  });
1687
- function y(L, K) {
1688
- for (const H of Object.keys(L)) delete L[H];
1689
- Object.assign(L, K);
1691
+ function h(C, O) {
1692
+ for (const j of Object.keys(C)) delete C[j];
1693
+ Object.assign(C, O);
1690
1694
  }
1691
1695
  function U() {
1692
- y(i.value, {}), y(a.value, {}), l.value = {}, s.value = !1, u.value = !1, m.value = !1, p.value = null, n.value = null;
1696
+ h(i.value, {}), h(a.value, {}), l.value = {}, s.value = !1, u.value = !1, m.value = !1, p.value = null, n.value = null;
1693
1697
  }
1694
- function q(L, K = {}) {
1695
- e.value = L, t.value = "create", n.value = null, y(i.value, K), y(a.value, K), l.value = {}, p.value = null;
1698
+ function q(C, O = {}) {
1699
+ e.value = C, t.value = "create", n.value = null, h(i.value, O), h(a.value, O), l.value = {}, p.value = null;
1696
1700
  }
1697
- async function P(L, K, H = "edit") {
1698
- e.value = L, t.value = H, n.value = K, s.value = !0, p.value = null, l.value = {};
1701
+ async function N(C, O, j = "edit") {
1702
+ e.value = C, t.value = j, n.value = O, s.value = !0, p.value = null, l.value = {};
1699
1703
  try {
1700
- const ee = await j().get(`/${L}/read`, {
1701
- params: { id: K }
1704
+ const ee = await G().get(`/${C}/read`, {
1705
+ params: { id: O }
1702
1706
  });
1703
- y(i.value, ee.record), y(a.value, ee.record);
1704
- } catch (G) {
1705
- throw p.value = G instanceof Error ? G : new Error(String(G)), G;
1707
+ h(i.value, ee.record), h(a.value, ee.record);
1708
+ } catch (H) {
1709
+ throw p.value = H instanceof Error ? H : new Error(String(H)), H;
1706
1710
  } finally {
1707
1711
  s.value = !1;
1708
1712
  }
1709
1713
  }
1710
- function E(L, K) {
1711
- if (i.value[L] = K, l.value[L]) {
1712
- const H = { ...l.value };
1713
- delete H[L], l.value = H;
1714
+ function F(C, O) {
1715
+ if (i.value[C] = O, l.value[C]) {
1716
+ const j = { ...l.value };
1717
+ delete j[C], l.value = j;
1714
1718
  }
1715
1719
  }
1716
- function v(L) {
1717
- l.value = { ...L };
1720
+ function k(C) {
1721
+ l.value = { ...C };
1718
1722
  }
1719
- function x() {
1723
+ function V() {
1720
1724
  l.value = {};
1721
1725
  }
1722
- async function N() {
1726
+ async function M() {
1723
1727
  if (!e.value) throw new Error("useResourceFormStore.save() before slug set");
1724
1728
  if (u.value) throw new Error("Already saving");
1725
1729
  u.value = !0, p.value = null, l.value = {};
1726
1730
  try {
1727
- const L = j(), K = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, H = t.value === "create" ? i.value : { id: n.value, ...i.value }, G = await L.post(K, H), ee = G.record?.id ?? G.id;
1731
+ const C = G(), O = t.value === "create" ? `/${e.value}/create` : `/${e.value}/update`, j = t.value === "create" ? i.value : { id: n.value, ...i.value }, H = await C.post(O, j), ee = H.record?.id ?? H.id;
1728
1732
  if (ee === void 0)
1729
1733
  throw new Error("save: backend response does not contain record.id");
1730
- return n.value = ee, y(a.value, { ...i.value }), t.value = "edit", ee;
1731
- } catch (L) {
1732
- throw L instanceof Le ? l.value = { ...L.fields } : (L instanceof Z || L instanceof Error) && (p.value = L), L;
1734
+ return n.value = ee, h(a.value, { ...i.value }), t.value = "edit", ee;
1735
+ } catch (C) {
1736
+ throw C instanceof Le ? l.value = { ...C.fields } : (C instanceof Z || C instanceof Error) && (p.value = C), C;
1733
1737
  } finally {
1734
1738
  u.value = !1;
1735
1739
  }
1736
1740
  }
1737
- async function z() {
1741
+ async function E() {
1738
1742
  if (!e.value || n.value === null)
1739
1743
  throw new Error("Nothing to delete");
1740
1744
  if (m.value) throw new Error("Already deleting");
1741
1745
  m.value = !0, p.value = null;
1742
1746
  try {
1743
- await j().post(`/${e.value}/delete`, { id: n.value });
1744
- } catch (L) {
1745
- throw L instanceof Error && (p.value = L), L;
1747
+ await G().post(`/${e.value}/delete`, { id: n.value });
1748
+ } catch (C) {
1749
+ throw C instanceof Error && (p.value = C), C;
1746
1750
  } finally {
1747
1751
  m.value = !1;
1748
1752
  }
@@ -1760,20 +1764,20 @@ const wa = { class: "admin-page admin-resource-index" }, $a = { class: "admin-pa
1760
1764
  deleting: m,
1761
1765
  error: p,
1762
1766
  // getters
1763
- isCreate: b,
1764
- isEdit: S,
1767
+ isCreate: _,
1768
+ isEdit: x,
1765
1769
  isView: A,
1766
- isDirty: _,
1767
- hasError: C,
1770
+ isDirty: y,
1771
+ hasError: S,
1768
1772
  // actions
1769
1773
  reset: U,
1770
1774
  prepareCreate: q,
1771
- load: P,
1772
- setField: E,
1773
- setErrors: v,
1774
- clearErrors: x,
1775
- save: N,
1776
- destroy: z
1775
+ load: N,
1776
+ setField: F,
1777
+ setErrors: k,
1778
+ clearErrors: V,
1779
+ save: M,
1780
+ destroy: E
1777
1781
  };
1778
1782
  });
1779
1783
  function Pe() {
@@ -1807,51 +1811,51 @@ function Ji() {
1807
1811
  function Na(e) {
1808
1812
  e.fields && me.registerBundle(e.fields), e.layouts && fe.registerBundle(e.layouts);
1809
1813
  }
1810
- const wt = /* @__PURE__ */ T({
1814
+ const wt = /* @__PURE__ */ L({
1811
1815
  __name: "UnknownField",
1812
1816
  props: {
1813
1817
  type: {},
1814
1818
  name: {}
1815
1819
  },
1816
1820
  setup(e) {
1817
- return (t, n) => (o(), k(r(Q), { variant: "warning" }, {
1821
+ return (t, n) => (o(), b(r(Q), { variant: "warning" }, {
1818
1822
  title: f(() => [
1819
- $("Неизвестный тип поля: " + h(e.type), 1)
1823
+ $("Неизвестный тип поля: " + g(e.type), 1)
1820
1824
  ]),
1821
1825
  default: f(() => [
1822
- e.name ? (o(), c(M, { key: 0 }, [
1823
- d("code", null, h(e.name), 1),
1826
+ e.name ? (o(), c(P, { key: 0 }, [
1827
+ d("code", null, g(e.name), 1),
1824
1828
  n[0] || (n[0] = $(" — зарегистрируйте field-компонент через ", -1)),
1825
- d("code", null, "registerField('" + h(e.type) + "', YourComponent)", 1),
1829
+ d("code", null, "registerField('" + g(e.type) + "', YourComponent)", 1),
1826
1830
  n[1] || (n[1] = $(". ", -1))
1827
- ], 64)) : F("", !0)
1831
+ ], 64)) : T("", !0)
1828
1832
  ]),
1829
1833
  _: 1
1830
1834
  }));
1831
1835
  }
1832
- }), $t = /* @__PURE__ */ T({
1836
+ }), $t = /* @__PURE__ */ L({
1833
1837
  __name: "FieldRenderer",
1834
1838
  props: {
1835
1839
  node: {}
1836
1840
  },
1837
1841
  setup(e) {
1838
- const t = e, n = g(() => kt(t.node.type)), i = g(() => {
1842
+ const t = e, n = v(() => kt(t.node.type)), i = v(() => {
1839
1843
  const { type: a, ...l } = t.node;
1840
1844
  return l;
1841
1845
  });
1842
- return (a, l) => n.value ? (o(), k(de(n.value), Re(Fe({ key: 0 }, i.value)), null, 16)) : (o(), k(wt, {
1846
+ return (a, l) => n.value ? (o(), b(de(n.value), Ue(Re({ key: 0 }, i.value)), null, 16)) : (o(), b(wt, {
1843
1847
  key: 1,
1844
1848
  type: e.node.type,
1845
1849
  name: e.node.name
1846
1850
  }, null, 8, ["type", "name"]));
1847
1851
  }
1848
- }), we = /* @__PURE__ */ T({
1852
+ }), we = /* @__PURE__ */ L({
1849
1853
  __name: "LayoutRenderer",
1850
1854
  props: {
1851
1855
  node: {}
1852
1856
  },
1853
1857
  setup(e) {
1854
- const t = e, n = g(() => {
1858
+ const t = e, n = v(() => {
1855
1859
  if (t.node.kind === "field")
1856
1860
  return { kind: "field" };
1857
1861
  if (t.node.kind === "layout") {
@@ -1860,14 +1864,14 @@ const wt = /* @__PURE__ */ T({
1860
1864
  }
1861
1865
  const l = tt(t.node.type);
1862
1866
  return l ? { kind: "layout", component: l } : kt(t.node.type) ? { kind: "field" } : { kind: "unknown" };
1863
- }), i = g(() => {
1867
+ }), i = v(() => {
1864
1868
  const { type: l, kind: s, ...u } = t.node;
1865
1869
  return u;
1866
- }), a = g(() => t.node);
1867
- return (l, s) => n.value.kind === "layout" && n.value.component ? (o(), k(de(n.value.component), Re(Fe({ key: 0 }, i.value)), null, 16)) : n.value.kind === "field" ? (o(), k($t, {
1870
+ }), a = v(() => t.node);
1871
+ return (l, s) => n.value.kind === "layout" && n.value.component ? (o(), b(de(n.value.component), Ue(Re({ key: 0 }, i.value)), null, 16)) : n.value.kind === "field" ? (o(), b($t, {
1868
1872
  key: 1,
1869
1873
  node: a.value
1870
- }, null, 8, ["node"])) : (o(), k(wt, {
1874
+ }, null, 8, ["node"])) : (o(), b(wt, {
1871
1875
  key: 2,
1872
1876
  type: e.node.type,
1873
1877
  name: e.node.name
@@ -1879,7 +1883,7 @@ const wt = /* @__PURE__ */ T({
1879
1883
  }, Oa = {
1880
1884
  key: 3,
1881
1885
  class: "admin-resource-form__savebar"
1882
- }, nt = /* @__PURE__ */ T({
1886
+ }, nt = /* @__PURE__ */ L({
1883
1887
  __name: "ResourceFormPage",
1884
1888
  props: {
1885
1889
  slug: {},
@@ -1890,16 +1894,16 @@ const wt = /* @__PURE__ */ T({
1890
1894
  const t = e, n = bt(), i = ie(), a = se(), l = pt(n.state, n.errors);
1891
1895
  ae(
1892
1896
  () => n.errors,
1893
- (_) => {
1894
- l.setErrors({ ..._ });
1897
+ (y) => {
1898
+ l.setErrors({ ...y });
1895
1899
  }
1896
1900
  );
1897
- const s = g(() => i.getResource(t.slug)), u = g(
1901
+ const s = v(() => i.getResource(t.slug)), u = v(
1898
1902
  () => s.value?.fields ?? []
1899
- ), m = g(() => n.isCreate ? `Создать: ${s.value?.label ?? t.slug}` : `${s.value?.label ?? t.slug}: запись #${t.id}`), p = g(() => {
1900
- const _ = n.state.status;
1901
- return typeof _ == "string" ? _ : null;
1902
- }), b = g(() => {
1903
+ ), m = v(() => n.isCreate ? `Создать: ${s.value?.label ?? t.slug}` : `${s.value?.label ?? t.slug}: запись #${t.id}`), p = v(() => {
1904
+ const y = n.state.status;
1905
+ return typeof y == "string" ? y : null;
1906
+ }), _ = v(() => {
1903
1907
  switch (p.value) {
1904
1908
  case "published":
1905
1909
  return "success";
@@ -1912,23 +1916,23 @@ const wt = /* @__PURE__ */ T({
1912
1916
  return "default";
1913
1917
  }
1914
1918
  });
1915
- Ue(async () => {
1919
+ Fe(async () => {
1916
1920
  i.manifest === null && await i.load().catch(() => {
1917
1921
  }), t.id !== null && t.id !== void 0 ? await n.load(t.slug, t.id, "edit").catch(() => {
1918
1922
  }) : n.prepareCreate(t.slug);
1919
1923
  }), ae(
1920
1924
  () => [t.slug, t.id],
1921
- async ([_, y]) => {
1922
- y != null ? await n.load(_, y, "edit").catch(() => {
1923
- }) : n.prepareCreate(_);
1925
+ async ([y, h]) => {
1926
+ h != null ? await n.load(y, h, "edit").catch(() => {
1927
+ }) : n.prepareCreate(y);
1924
1928
  }
1925
1929
  );
1926
- async function S() {
1930
+ async function x() {
1927
1931
  try {
1928
- const _ = await n.save();
1932
+ const y = await n.save();
1929
1933
  n.isCreate && a.push({
1930
1934
  name: `admin.resource.${t.slug}.edit`,
1931
- params: { id: _ }
1935
+ params: { id: y }
1932
1936
  }).catch(() => {
1933
1937
  });
1934
1938
  } catch {
@@ -1939,87 +1943,87 @@ const wt = /* @__PURE__ */ T({
1939
1943
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
1940
1944
  }));
1941
1945
  }
1942
- function C() {
1946
+ function S() {
1943
1947
  n.isDirty && !confirm("Несохранённые изменения будут потеряны. Продолжить?") || a.push({ name: t.indexRouteName }).catch(() => {
1944
1948
  });
1945
1949
  }
1946
- return (_, y) => (o(), c("section", Ba, [
1950
+ return (y, h) => (o(), c("section", Ba, [
1947
1951
  d("header", Ia, [
1948
1952
  d("div", Da, [
1949
1953
  d("a", {
1950
1954
  class: "admin-resource-form__back",
1951
- onClick: C
1955
+ onClick: S
1952
1956
  }, "← Назад"),
1953
- d("h1", Va, h(m.value), 1),
1954
- p.value ? (o(), k(r(je), {
1957
+ d("h1", Va, g(m.value), 1),
1958
+ p.value ? (o(), b(r(je), {
1955
1959
  key: 0,
1956
- variant: b.value
1960
+ variant: _.value
1957
1961
  }, {
1958
1962
  default: f(() => [
1959
- $(h(p.value), 1)
1963
+ $(g(p.value), 1)
1960
1964
  ]),
1961
1965
  _: 1
1962
- }, 8, ["variant"])) : F("", !0)
1966
+ }, 8, ["variant"])) : T("", !0)
1963
1967
  ]),
1964
1968
  d("div", za, [
1965
- w(r(V), {
1969
+ w(r(z), {
1966
1970
  variant: "ghost",
1967
1971
  disabled: r(n).saving || r(n).deleting,
1968
- onClick: C
1972
+ onClick: S
1969
1973
  }, {
1970
- default: f(() => [...y[0] || (y[0] = [
1974
+ default: f(() => [...h[0] || (h[0] = [
1971
1975
  $(" Отмена ", -1)
1972
1976
  ])]),
1973
1977
  _: 1
1974
1978
  }, 8, ["disabled"]),
1975
- r(n).isEdit ? (o(), k(r(V), {
1979
+ r(n).isEdit ? (o(), b(r(z), {
1976
1980
  key: 0,
1977
1981
  variant: "danger",
1978
1982
  disabled: r(n).saving || r(n).deleting,
1979
1983
  loading: r(n).deleting,
1980
1984
  onClick: A
1981
1985
  }, {
1982
- default: f(() => [...y[1] || (y[1] = [
1986
+ default: f(() => [...h[1] || (h[1] = [
1983
1987
  $(" Удалить ", -1)
1984
1988
  ])]),
1985
1989
  _: 1
1986
- }, 8, ["disabled", "loading"])) : F("", !0),
1987
- w(r(V), {
1990
+ }, 8, ["disabled", "loading"])) : T("", !0),
1991
+ w(r(z), {
1988
1992
  variant: "primary",
1989
1993
  disabled: r(n).saving || r(n).loading,
1990
1994
  loading: r(n).saving,
1991
- onClick: S
1995
+ onClick: x
1992
1996
  }, {
1993
1997
  default: f(() => [
1994
- $(h(r(n).isCreate ? "Создать" : "Сохранить"), 1)
1998
+ $(g(r(n).isCreate ? "Создать" : "Сохранить"), 1)
1995
1999
  ]),
1996
2000
  _: 1
1997
2001
  }, 8, ["disabled", "loading"])
1998
2002
  ])
1999
2003
  ]),
2000
- r(n).hasError ? (o(), k(r(Q), {
2004
+ r(n).hasError ? (o(), b(r(Q), {
2001
2005
  key: 0,
2002
2006
  variant: "danger",
2003
2007
  class: "admin-resource-form__alert",
2004
2008
  role: "alert"
2005
2009
  }, {
2006
2010
  default: f(() => [
2007
- $(h(r(n).error?.message ?? "Не удалось сохранить запись"), 1)
2011
+ $(g(r(n).error?.message ?? "Не удалось сохранить запись"), 1)
2008
2012
  ]),
2009
2013
  _: 1
2010
- })) : F("", !0),
2014
+ })) : T("", !0),
2011
2015
  r(n).loading ? (o(), c("div", qa, [
2012
- (o(), c(M, null, D(6, (U) => w(r(We), {
2016
+ (o(), c(P, null, D(6, (U) => w(r(We), {
2013
2017
  key: U,
2014
2018
  height: "40px"
2015
2019
  })), 64))
2016
- ])) : (o(), k(r(W), {
2020
+ ])) : (o(), b(r(K), {
2017
2021
  key: 2,
2018
2022
  padding: "md",
2019
2023
  class: "admin-resource-form__body"
2020
2024
  }, {
2021
2025
  default: f(() => [
2022
- (o(!0), c(M, null, D(u.value, (U, q) => (o(), k(we, {
2026
+ (o(!0), c(P, null, D(u.value, (U, q) => (o(), b(we, {
2023
2027
  key: q,
2024
2028
  node: U
2025
2029
  }, null, 8, ["node"]))), 128))
@@ -2027,46 +2031,46 @@ const wt = /* @__PURE__ */ T({
2027
2031
  _: 1
2028
2032
  })),
2029
2033
  r(n).isDirty && !r(n).loading ? (o(), c("div", Oa, [
2030
- y[4] || (y[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
2031
- w(r(V), {
2034
+ h[4] || (h[4] = d("span", { class: "admin-resource-form__savebar-hint" }, " Есть несохранённые изменения ", -1)),
2035
+ w(r(z), {
2032
2036
  variant: "ghost",
2033
2037
  size: "sm",
2034
- onClick: C
2038
+ onClick: S
2035
2039
  }, {
2036
- default: f(() => [...y[2] || (y[2] = [
2040
+ default: f(() => [...h[2] || (h[2] = [
2037
2041
  $("Отмена", -1)
2038
2042
  ])]),
2039
2043
  _: 1
2040
2044
  }),
2041
- w(r(V), {
2045
+ w(r(z), {
2042
2046
  variant: "primary",
2043
2047
  size: "sm",
2044
2048
  loading: r(n).saving,
2045
2049
  disabled: r(n).saving,
2046
- onClick: S
2050
+ onClick: x
2047
2051
  }, {
2048
- default: f(() => [...y[3] || (y[3] = [
2052
+ default: f(() => [...h[3] || (h[3] = [
2049
2053
  $(" Сохранить ", -1)
2050
2054
  ])]),
2051
2055
  _: 1
2052
2056
  }, 8, ["loading", "disabled"])
2053
- ])) : F("", !0)
2057
+ ])) : T("", !0)
2054
2058
  ]));
2055
2059
  }
2056
- }), ve = Pe(), Qi = ve.register, at = ve.get, Zi = ve.has, eo = ve.list, to = ve.clear, Wa = ve.registerBundle, Ka = /* @__PURE__ */ T({
2060
+ }), ve = Pe(), Qi = ve.register, at = ve.get, Zi = ve.has, eo = ve.list, to = ve.clear, Wa = ve.registerBundle, Ka = /* @__PURE__ */ L({
2057
2061
  __name: "UnknownEntry",
2058
2062
  props: {
2059
2063
  type: {},
2060
2064
  name: {}
2061
2065
  },
2062
2066
  setup(e) {
2063
- return (t, n) => (o(), k(r(Q), { variant: "warning" }, {
2067
+ return (t, n) => (o(), b(r(Q), { variant: "warning" }, {
2064
2068
  title: f(() => [
2065
- $("Неизвестный тип infolist-entry: " + h(e.type), 1)
2069
+ $("Неизвестный тип infolist-entry: " + g(e.type), 1)
2066
2070
  ]),
2067
2071
  default: f(() => [
2068
2072
  n[0] || (n[0] = $(" Зарегистрируйте через ", -1)),
2069
- d("code", null, "registerInfolistEntry('" + h(e.type) + "', YourComponent)", 1),
2073
+ d("code", null, "registerInfolistEntry('" + g(e.type) + "', YourComponent)", 1),
2070
2074
  n[1] || (n[1] = $(". ", -1))
2071
2075
  ]),
2072
2076
  _: 1
@@ -2096,79 +2100,79 @@ const wt = /* @__PURE__ */ T({
2096
2100
  }, el = {
2097
2101
  class: "admin-infolist-tabs__list",
2098
2102
  role: "tablist"
2099
- }, tl = { class: "admin-infolist-tabs__panel" }, nl = /* @__PURE__ */ T({
2103
+ }, tl = { class: "admin-infolist-tabs__panel" }, nl = /* @__PURE__ */ L({
2100
2104
  __name: "InfolistRenderer",
2101
2105
  props: {
2102
2106
  node: {}
2103
2107
  },
2104
2108
  setup(e) {
2105
- const t = e, n = /* @__PURE__ */ new Set(["rows", "columns", "section", "block", "tabs"]), i = g(() => {
2109
+ const t = e, n = /* @__PURE__ */ new Set(["rows", "columns", "section", "block", "tabs"]), i = v(() => {
2106
2110
  if (t.node.kind === "entry") {
2107
- const S = at(t.node.type);
2108
- return S ? { kind: "entry", component: S } : { kind: "unknown" };
2111
+ const x = at(t.node.type);
2112
+ return x ? { kind: "entry", component: x } : { kind: "unknown" };
2109
2113
  }
2110
2114
  if (t.node.kind === "layout")
2111
2115
  return n.has(t.node.type) ? { kind: "layout", layoutType: t.node.type } : { kind: "unknown" };
2112
2116
  if (n.has(t.node.type))
2113
2117
  return { kind: "layout", layoutType: t.node.type };
2114
- const b = at(t.node.type);
2115
- return b ? { kind: "entry", component: b } : { kind: "unknown" };
2116
- }), a = g(() => {
2117
- const { type: b, kind: S, items: A, ...C } = t.node;
2118
- return C;
2119
- }), l = g(
2118
+ const _ = at(t.node.type);
2119
+ return _ ? { kind: "entry", component: _ } : { kind: "unknown" };
2120
+ }), a = v(() => {
2121
+ const { type: _, kind: x, items: A, ...S } = t.node;
2122
+ return S;
2123
+ }), l = v(
2120
2124
  () => t.node.items ?? []
2121
- ), s = g(() => t.node.title ?? null), u = g(
2125
+ ), s = v(() => t.node.title ?? null), u = v(
2122
2126
  () => t.node.description ?? null
2123
- ), m = g(() => {
2124
- const b = t.node.active;
2125
- return typeof b == "number" ? b : 0;
2126
- }), p = g(() => t.node.items ?? []);
2127
- return (b, S) => {
2127
+ ), m = v(() => {
2128
+ const _ = t.node.active;
2129
+ return typeof _ == "number" ? _ : 0;
2130
+ }), p = v(() => t.node.items ?? []);
2131
+ return (_, x) => {
2128
2132
  const A = it("InfolistRenderer", !0);
2129
- return i.value.kind === "entry" ? (o(), k(de(i.value.component), Re(Fe({ key: 0 }, a.value)), null, 16)) : i.value.kind === "layout" && i.value.layoutType === "rows" ? (o(), c("div", ja, [
2130
- (o(!0), c(M, null, D(l.value, (C, _) => (o(), k(A, {
2131
- key: _,
2132
- node: C
2133
+ return i.value.kind === "entry" ? (o(), b(de(i.value.component), Ue(Re({ key: 0 }, a.value)), null, 16)) : i.value.kind === "layout" && i.value.layoutType === "rows" ? (o(), c("div", ja, [
2134
+ (o(!0), c(P, null, D(l.value, (S, y) => (o(), b(A, {
2135
+ key: y,
2136
+ node: S
2133
2137
  }, null, 8, ["node"]))), 128))
2134
2138
  ])) : i.value.kind === "layout" && i.value.layoutType === "columns" ? (o(), c("div", Ga, [
2135
- (o(!0), c(M, null, D(l.value, (C, _) => (o(), c("div", {
2136
- key: _,
2139
+ (o(!0), c(P, null, D(l.value, (S, y) => (o(), c("div", {
2140
+ key: y,
2137
2141
  class: "admin-infolist-cols__item",
2138
2142
  style: Te({
2139
- gridColumn: `span ${typeof C.span == "number" ? C.span : Math.max(1, Math.floor(12 / l.value.length))}`
2143
+ gridColumn: `span ${typeof S.span == "number" ? S.span : Math.max(1, Math.floor(12 / l.value.length))}`
2140
2144
  })
2141
2145
  }, [
2142
- w(A, { node: C }, null, 8, ["node"])
2146
+ w(A, { node: S }, null, 8, ["node"])
2143
2147
  ], 4))), 128))
2144
2148
  ])) : i.value.kind === "layout" && (i.value.layoutType === "section" || i.value.layoutType === "block") ? (o(), c("section", Ha, [
2145
2149
  s.value || u.value ? (o(), c("header", Xa, [
2146
- s.value ? (o(), c("h3", Ya, h(s.value), 1)) : F("", !0),
2147
- u.value ? (o(), c("p", Ja, h(u.value), 1)) : F("", !0)
2148
- ])) : F("", !0),
2150
+ s.value ? (o(), c("h3", Ya, g(s.value), 1)) : T("", !0),
2151
+ u.value ? (o(), c("p", Ja, g(u.value), 1)) : T("", !0)
2152
+ ])) : T("", !0),
2149
2153
  d("div", Qa, [
2150
- (o(!0), c(M, null, D(l.value, (C, _) => (o(), k(A, {
2151
- key: _,
2152
- node: C
2154
+ (o(!0), c(P, null, D(l.value, (S, y) => (o(), b(A, {
2155
+ key: y,
2156
+ node: S
2153
2157
  }, null, 8, ["node"]))), 128))
2154
2158
  ])
2155
2159
  ])) : i.value.kind === "layout" && i.value.layoutType === "tabs" ? (o(), c("div", Za, [
2156
2160
  d("ul", el, [
2157
- (o(!0), c(M, null, D(p.value, (C, _) => (o(), c("li", {
2158
- key: C.key ?? _,
2161
+ (o(!0), c(P, null, D(p.value, (S, y) => (o(), c("li", {
2162
+ key: S.key ?? y,
2159
2163
  class: ne([
2160
2164
  "admin-infolist-tabs__tab",
2161
- { "admin-infolist-tabs__tab--active": _ === m.value }
2165
+ { "admin-infolist-tabs__tab--active": y === m.value }
2162
2166
  ])
2163
- }, h(C.label), 3))), 128))
2167
+ }, g(S.label), 3))), 128))
2164
2168
  ]),
2165
2169
  d("div", tl, [
2166
- (o(!0), c(M, null, D(p.value[m.value]?.items ?? [], (C, _) => (o(), k(A, {
2167
- key: _,
2168
- node: C
2170
+ (o(!0), c(P, null, D(p.value[m.value]?.items ?? [], (S, y) => (o(), b(A, {
2171
+ key: y,
2172
+ node: S
2169
2173
  }, null, 8, ["node"]))), 128))
2170
2174
  ])
2171
- ])) : (o(), k(Ka, {
2175
+ ])) : (o(), b(Ka, {
2172
2176
  key: 5,
2173
2177
  type: e.node.type,
2174
2178
  name: e.node.name
@@ -2177,7 +2181,7 @@ const wt = /* @__PURE__ */ T({
2177
2181
  }
2178
2182
  }), Ye = /* @__PURE__ */ Symbol("admin.infolist-record");
2179
2183
  function al(e) {
2180
- Rt(Ye, e);
2184
+ Ut(Ye, e);
2181
2185
  }
2182
2186
  function no() {
2183
2187
  const e = rt(Ye);
@@ -2191,7 +2195,7 @@ function Ne() {
2191
2195
  const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-page__hd" }, il = { class: "admin-page__title-wrap" }, ol = { class: "admin-page__title" }, rl = { class: "admin-page__actions" }, ul = {
2192
2196
  key: 1,
2193
2197
  class: "admin-resource-view__loading"
2194
- }, dl = /* @__PURE__ */ T({
2198
+ }, dl = /* @__PURE__ */ L({
2195
2199
  __name: "ResourceViewPage",
2196
2200
  props: {
2197
2201
  slug: {},
@@ -2202,19 +2206,19 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2202
2206
  setup(e) {
2203
2207
  const t = e, n = bt(), i = ie(), a = se();
2204
2208
  al(n.state);
2205
- const l = g(() => i.getResource(t.slug)), s = g(
2209
+ const l = v(() => i.getResource(t.slug)), s = v(
2206
2210
  () => l.value?.fields ?? []
2207
- ), u = g(
2211
+ ), u = v(
2208
2212
  () => `${l.value?.label ?? t.slug}: запись #${t.id}`
2209
2213
  );
2210
- Ue(async () => {
2214
+ Fe(async () => {
2211
2215
  i.manifest === null && await i.load().catch(() => {
2212
2216
  }), await n.load(t.slug, t.id, "view").catch(() => {
2213
2217
  });
2214
2218
  }), ae(
2215
2219
  () => [t.slug, t.id],
2216
- async ([b, S]) => {
2217
- await n.load(b, S, "view").catch(() => {
2220
+ async ([_, x]) => {
2221
+ await n.load(_, x, "view").catch(() => {
2218
2222
  });
2219
2223
  }
2220
2224
  );
@@ -2232,58 +2236,58 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2232
2236
  }), n.hasError || a.push({ name: t.indexRouteName }).catch(() => {
2233
2237
  }));
2234
2238
  }
2235
- return (b, S) => (o(), c("section", ll, [
2239
+ return (_, x) => (o(), c("section", ll, [
2236
2240
  d("header", sl, [
2237
2241
  d("div", il, [
2238
- d("h1", ol, h(u.value), 1)
2242
+ d("h1", ol, g(u.value), 1)
2239
2243
  ]),
2240
2244
  d("div", rl, [
2241
- w(r(V), {
2245
+ w(r(z), {
2242
2246
  variant: "ghost",
2243
2247
  onClick: m
2244
2248
  }, {
2245
- default: f(() => [...S[0] || (S[0] = [
2249
+ default: f(() => [...x[0] || (x[0] = [
2246
2250
  $("Редактировать", -1)
2247
2251
  ])]),
2248
2252
  _: 1
2249
2253
  }),
2250
- w(r(V), {
2254
+ w(r(z), {
2251
2255
  variant: "danger",
2252
2256
  loading: r(n).deleting,
2253
2257
  disabled: r(n).deleting,
2254
2258
  onClick: p
2255
2259
  }, {
2256
- default: f(() => [...S[1] || (S[1] = [
2260
+ default: f(() => [...x[1] || (x[1] = [
2257
2261
  $(" Удалить ", -1)
2258
2262
  ])]),
2259
2263
  _: 1
2260
2264
  }, 8, ["loading", "disabled"])
2261
2265
  ])
2262
2266
  ]),
2263
- r(n).hasError ? (o(), k(r(Q), {
2267
+ r(n).hasError ? (o(), b(r(Q), {
2264
2268
  key: 0,
2265
2269
  variant: "danger",
2266
2270
  class: "admin-resource-view__alert",
2267
2271
  role: "alert"
2268
2272
  }, {
2269
2273
  default: f(() => [
2270
- $(h(r(n).error?.message ?? "Не удалось загрузить запись"), 1)
2274
+ $(g(r(n).error?.message ?? "Не удалось загрузить запись"), 1)
2271
2275
  ]),
2272
2276
  _: 1
2273
- })) : F("", !0),
2277
+ })) : T("", !0),
2274
2278
  r(n).loading ? (o(), c("div", ul, [
2275
- (o(), c(M, null, D(8, (A) => w(r(We), {
2279
+ (o(), c(P, null, D(8, (A) => w(r(We), {
2276
2280
  key: A,
2277
2281
  height: "24px"
2278
2282
  })), 64))
2279
- ])) : (o(), k(r(W), {
2283
+ ])) : (o(), b(r(K), {
2280
2284
  key: 2,
2281
2285
  padding: "md",
2282
2286
  class: "admin-resource-view__body"
2283
2287
  }, {
2284
2288
  default: f(() => [
2285
- (o(!0), c(M, null, D(s.value, (A, C) => (o(), k(nl, {
2286
- key: C,
2289
+ (o(!0), c(P, null, D(s.value, (A, S) => (o(), b(nl, {
2290
+ key: S,
2287
2291
  node: A
2288
2292
  }, null, 8, ["node"]))), 128))
2289
2293
  ]),
@@ -2297,10 +2301,10 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2297
2301
  }, yl = ["onClick"], _l = ["data-icon"], bl = { class: "admin-profile__content" }, kl = { class: "admin-profile__hero" }, wl = { class: "admin-profile__hero-text" }, $l = { class: "admin-profile__hero-name" }, xl = { class: "admin-profile__hero-meta" }, Sl = { class: "admin-profile__form" }, Cl = { class: "admin-profile__card-ft" }, Al = { class: "admin-profile__card-hd" }, El = {
2298
2302
  key: 0,
2299
2303
  class: "admin-profile__hint"
2300
- }, Ul = {
2304
+ }, Fl = {
2301
2305
  key: 1,
2302
2306
  class: "admin-profile__hint"
2303
- }, Rl = { class: "admin-profile__card-ft" }, Fl = { class: "admin-profile__hint" }, Tl = /* @__PURE__ */ T({
2307
+ }, Ul = { class: "admin-profile__card-ft" }, Rl = { class: "admin-profile__hint" }, Tl = /* @__PURE__ */ L({
2304
2308
  __name: "ProfilePage",
2305
2309
  props: {
2306
2310
  title: { default: "Profile" },
@@ -2315,64 +2319,64 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2315
2319
  { id: "tokens", label: "API токены", icon: "key" },
2316
2320
  { id: "sessions", label: "Сессии", icon: "monitor" }
2317
2321
  ], m = R(n.section);
2318
- function p(P) {
2319
- m.value = P, i("update:section", P);
2322
+ function p(N) {
2323
+ m.value = N, i("update:section", N);
2320
2324
  }
2321
- const b = R({
2325
+ const _ = R({
2322
2326
  name: a.user?.name ?? "",
2323
2327
  email: a.user?.email ?? "",
2324
2328
  locale: s.current,
2325
2329
  theme: l.current
2326
- }), S = g(
2327
- () => s.available.map((P) => ({ value: P, label: P.toUpperCase() }))
2328
- ), A = g(
2329
- () => l.available.map((P) => ({ value: P, label: P === "dark" ? "Тёмная" : P === "light" ? "Светлая" : P }))
2330
+ }), x = v(
2331
+ () => s.available.map((N) => ({ value: N, label: N.toUpperCase() }))
2332
+ ), A = v(
2333
+ () => l.available.map((N) => ({ value: N, label: N === "dark" ? "Тёмная" : N === "light" ? "Светлая" : N }))
2330
2334
  );
2331
- function C() {
2332
- i("save", { ...b.value });
2335
+ function S() {
2336
+ i("save", { ..._.value });
2333
2337
  }
2334
- function _() {
2338
+ function y() {
2335
2339
  i("avatar-replace");
2336
2340
  }
2337
- function y() {
2341
+ function h() {
2338
2342
  i("two-factor-disable");
2339
2343
  }
2340
2344
  function U() {
2341
2345
  i("two-factor-regenerate");
2342
2346
  }
2343
- const q = g(() => !!a.user?.twoFactorEnabled);
2344
- return (P, E) => (o(), c("section", cl, [
2347
+ const q = v(() => !!a.user?.twoFactorEnabled);
2348
+ return (N, F) => (o(), c("section", cl, [
2345
2349
  d("header", ml, [
2346
2350
  d("div", fl, [
2347
- d("h1", vl, h(e.title), 1),
2348
- d("div", pl, h(e.subtitle), 1)
2351
+ d("h1", vl, g(e.title), 1),
2352
+ d("div", pl, g(e.subtitle), 1)
2349
2353
  ])
2350
2354
  ]),
2351
2355
  d("div", gl, [
2352
2356
  d("nav", hl, [
2353
- (o(), c(M, null, D(u, (v) => d("button", {
2354
- key: v.id,
2357
+ (o(), c(P, null, D(u, (k) => d("button", {
2358
+ key: k.id,
2355
2359
  type: "button",
2356
2360
  class: ne([
2357
2361
  "admin-profile__nav-item",
2358
- { "admin-profile__nav-item--active": m.value === v.id }
2362
+ { "admin-profile__nav-item--active": m.value === k.id }
2359
2363
  ]),
2360
- onClick: (x) => p(v.id)
2364
+ onClick: (V) => p(k.id)
2361
2365
  }, [
2362
2366
  d("span", {
2363
2367
  class: "admin-profile__nav-icon",
2364
- "data-icon": v.icon
2368
+ "data-icon": k.icon
2365
2369
  }, null, 8, _l),
2366
- d("span", null, h(v.label), 1)
2370
+ d("span", null, g(k.label), 1)
2367
2371
  ], 10, yl)), 64))
2368
2372
  ]),
2369
2373
  d("div", bl, [
2370
- m.value === "general" ? (o(), k(r(W), {
2374
+ m.value === "general" ? (o(), b(r(K), {
2371
2375
  key: 0,
2372
2376
  padding: "md"
2373
2377
  }, {
2374
2378
  default: f(() => [
2375
- E[7] || (E[7] = d("header", { class: "admin-profile__card-hd" }, [
2379
+ F[7] || (F[7] = d("header", { class: "admin-profile__card-hd" }, [
2376
2380
  d("h3", { class: "admin-profile__card-title" }, "Профиль")
2377
2381
  ], -1)),
2378
2382
  d("div", kl, [
@@ -2382,16 +2386,16 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2382
2386
  size: "lg"
2383
2387
  }, null, 8, ["src", "name"]),
2384
2388
  d("div", wl, [
2385
- d("div", $l, h(r(a).user?.name ?? "—"), 1),
2386
- d("div", xl, h(r(a).user?.email ?? "—"), 1)
2389
+ d("div", $l, g(r(a).user?.name ?? "—"), 1),
2390
+ d("div", xl, g(r(a).user?.email ?? "—"), 1)
2387
2391
  ]),
2388
- E[5] || (E[5] = d("div", { style: { flex: "1" } }, null, -1)),
2389
- w(r(V), {
2392
+ F[5] || (F[5] = d("div", { style: { flex: "1" } }, null, -1)),
2393
+ w(r(z), {
2390
2394
  variant: "ghost",
2391
2395
  size: "sm",
2392
- onClick: _
2396
+ onClick: y
2393
2397
  }, {
2394
- default: f(() => [...E[4] || (E[4] = [
2398
+ default: f(() => [...F[4] || (F[4] = [
2395
2399
  $(" Заменить ", -1)
2396
2400
  ])]),
2397
2401
  _: 1
@@ -2399,37 +2403,37 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2399
2403
  ]),
2400
2404
  d("div", Sl, [
2401
2405
  w(r(ue), {
2402
- modelValue: b.value.name,
2403
- "onUpdate:modelValue": E[0] || (E[0] = (v) => b.value.name = v),
2406
+ modelValue: _.value.name,
2407
+ "onUpdate:modelValue": F[0] || (F[0] = (k) => _.value.name = k),
2404
2408
  label: "Имя",
2405
2409
  name: "name"
2406
2410
  }, null, 8, ["modelValue"]),
2407
2411
  w(r(ue), {
2408
- modelValue: b.value.email,
2409
- "onUpdate:modelValue": E[1] || (E[1] = (v) => b.value.email = v),
2412
+ modelValue: _.value.email,
2413
+ "onUpdate:modelValue": F[1] || (F[1] = (k) => _.value.email = k),
2410
2414
  label: "Email",
2411
2415
  type: "email",
2412
2416
  name: "email"
2413
2417
  }, null, 8, ["modelValue"]),
2414
2418
  w(r(Ee), {
2415
- modelValue: b.value.locale,
2416
- "onUpdate:modelValue": E[2] || (E[2] = (v) => b.value.locale = v),
2417
- options: S.value,
2419
+ modelValue: _.value.locale,
2420
+ "onUpdate:modelValue": F[2] || (F[2] = (k) => _.value.locale = k),
2421
+ options: x.value,
2418
2422
  label: "Язык"
2419
2423
  }, null, 8, ["modelValue", "options"]),
2420
2424
  w(r(Ee), {
2421
- modelValue: b.value.theme,
2422
- "onUpdate:modelValue": E[3] || (E[3] = (v) => b.value.theme = v),
2425
+ modelValue: _.value.theme,
2426
+ "onUpdate:modelValue": F[3] || (F[3] = (k) => _.value.theme = k),
2423
2427
  options: A.value,
2424
2428
  label: "Тема"
2425
2429
  }, null, 8, ["modelValue", "options"])
2426
2430
  ]),
2427
2431
  d("footer", Cl, [
2428
- w(r(V), {
2432
+ w(r(z), {
2429
2433
  variant: "primary",
2430
- onClick: C
2434
+ onClick: S
2431
2435
  }, {
2432
- default: f(() => [...E[6] || (E[6] = [
2436
+ default: f(() => [...F[6] || (F[6] = [
2433
2437
  $("Сохранить", -1)
2434
2438
  ])]),
2435
2439
  _: 1
@@ -2437,51 +2441,51 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2437
2441
  ])
2438
2442
  ]),
2439
2443
  _: 1
2440
- })) : m.value === "security" ? (o(), k(r(W), {
2444
+ })) : m.value === "security" ? (o(), b(r(K), {
2441
2445
  key: 1,
2442
2446
  padding: "md"
2443
2447
  }, {
2444
2448
  default: f(() => [
2445
2449
  d("header", Al, [
2446
- E[8] || (E[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
2450
+ F[8] || (F[8] = d("h3", { class: "admin-profile__card-title" }, "Двухфакторная аутентификация", -1)),
2447
2451
  w(r(je), {
2448
2452
  variant: q.value ? "success" : "default"
2449
2453
  }, {
2450
2454
  default: f(() => [
2451
- $(h(q.value ? "Включена" : "Отключена"), 1)
2455
+ $(g(q.value ? "Включена" : "Отключена"), 1)
2452
2456
  ]),
2453
2457
  _: 1
2454
2458
  }, 8, ["variant"])
2455
2459
  ]),
2456
- q.value ? (o(), c("p", El, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Ul, " Включите 2FA для дополнительной защиты аккаунта. ")),
2457
- d("footer", Rl, [
2458
- q.value ? (o(), c(M, { key: 0 }, [
2459
- w(r(V), {
2460
+ q.value ? (o(), c("p", El, " 2FA включена. У вас остались recovery-коды на случай потери устройства. ")) : (o(), c("p", Fl, " Включите 2FA для дополнительной защиты аккаунта. ")),
2461
+ d("footer", Ul, [
2462
+ q.value ? (o(), c(P, { key: 0 }, [
2463
+ w(r(z), {
2460
2464
  variant: "ghost",
2461
2465
  size: "sm",
2462
2466
  onClick: U
2463
2467
  }, {
2464
- default: f(() => [...E[9] || (E[9] = [
2468
+ default: f(() => [...F[9] || (F[9] = [
2465
2469
  $(" Перегенерировать коды ", -1)
2466
2470
  ])]),
2467
2471
  _: 1
2468
2472
  }),
2469
- w(r(V), {
2473
+ w(r(z), {
2470
2474
  variant: "danger",
2471
2475
  size: "sm",
2472
- onClick: y
2476
+ onClick: h
2473
2477
  }, {
2474
- default: f(() => [...E[10] || (E[10] = [
2478
+ default: f(() => [...F[10] || (F[10] = [
2475
2479
  $(" Отключить 2FA ", -1)
2476
2480
  ])]),
2477
2481
  _: 1
2478
2482
  })
2479
- ], 64)) : X(P.$slots, "enable-2fa", { key: 1 }, () => [
2480
- w(r(V), {
2483
+ ], 64)) : X(N.$slots, "enable-2fa", { key: 1 }, () => [
2484
+ w(r(z), {
2481
2485
  variant: "primary",
2482
2486
  disabled: ""
2483
2487
  }, {
2484
- default: f(() => [...E[11] || (E[11] = [
2488
+ default: f(() => [...F[11] || (F[11] = [
2485
2489
  $(" Включить 2FA (host customize) ", -1)
2486
2490
  ])]),
2487
2491
  _: 1
@@ -2490,13 +2494,13 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2490
2494
  ])
2491
2495
  ]),
2492
2496
  _: 3
2493
- })) : X(P.$slots, m.value, {
2497
+ })) : X(N.$slots, m.value, {
2494
2498
  key: 2,
2495
2499
  section: m.value
2496
2500
  }, () => [
2497
- w(r(W), { padding: "md" }, {
2501
+ w(r(K), { padding: "md" }, {
2498
2502
  default: f(() => [
2499
- d("p", Fl, " Section «" + h(m.value) + "» не реализована библиотекой — host-проект подключает её через slot " + h(m.value) + ". ", 1)
2503
+ d("p", Rl, " Section «" + g(m.value) + "» не реализована библиотекой — host-проект подключает её через slot " + g(m.value) + ". ", 1)
2500
2504
  ]),
2501
2505
  _: 1
2502
2506
  })
@@ -2505,35 +2509,35 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2505
2509
  ])
2506
2510
  ]));
2507
2511
  }
2508
- }), pe = Pe(), ao = pe.register, Ll = pe.get, lo = pe.has, so = pe.list, io = pe.clear, Ml = pe.registerBundle, Pl = /* @__PURE__ */ T({
2512
+ }), pe = Pe(), ao = pe.register, Ll = pe.get, lo = pe.has, so = pe.list, io = pe.clear, Ml = pe.registerBundle, Pl = /* @__PURE__ */ L({
2509
2513
  __name: "UnknownWidget",
2510
2514
  props: {
2511
2515
  type: {}
2512
2516
  },
2513
2517
  setup(e) {
2514
- return (t, n) => (o(), k(r(Q), { variant: "warning" }, {
2518
+ return (t, n) => (o(), b(r(Q), { variant: "warning" }, {
2515
2519
  title: f(() => [
2516
- $("Неизвестный widget-тип: " + h(e.type), 1)
2520
+ $("Неизвестный widget-тип: " + g(e.type), 1)
2517
2521
  ]),
2518
2522
  default: f(() => [
2519
2523
  n[0] || (n[0] = $(" Зарегистрируйте через ", -1)),
2520
- d("code", null, "registerWidget('" + h(e.type) + "', YourComponent)", 1),
2524
+ d("code", null, "registerWidget('" + g(e.type) + "', YourComponent)", 1),
2521
2525
  n[1] || (n[1] = $(". ", -1))
2522
2526
  ]),
2523
2527
  _: 1
2524
2528
  }));
2525
2529
  }
2526
- }), Nl = /* @__PURE__ */ T({
2530
+ }), Nl = /* @__PURE__ */ L({
2527
2531
  __name: "WidgetRenderer",
2528
2532
  props: {
2529
2533
  node: {}
2530
2534
  },
2531
2535
  setup(e) {
2532
- const t = e, n = g(() => Ll(t.node.type)), i = g(() => {
2536
+ const t = e, n = v(() => Ll(t.node.type)), i = v(() => {
2533
2537
  const { type: a, span: l, ...s } = t.node;
2534
2538
  return s;
2535
2539
  });
2536
- return (a, l) => n.value ? (o(), k(de(n.value), Re(Fe({ key: 0 }, i.value)), null, 16)) : (o(), k(Pl, {
2540
+ return (a, l) => n.value ? (o(), b(de(n.value), Ue(Re({ key: 0 }, i.value)), null, 16)) : (o(), b(Pl, {
2537
2541
  key: 1,
2538
2542
  type: e.node.type
2539
2543
  }, null, 8, ["type"]));
@@ -2541,7 +2545,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2541
2545
  }), Bl = { class: "admin-page admin-dashboard" }, Il = { class: "admin-page__hd" }, Dl = { class: "admin-page__title-wrap" }, Vl = { class: "admin-page__title" }, zl = {
2542
2546
  key: 0,
2543
2547
  class: "admin-page__count"
2544
- }, ql = { class: "admin-page__actions" }, Ol = { class: "admin-dashboard__grid" }, Wl = /* @__PURE__ */ T({
2548
+ }, ql = { class: "admin-page__actions" }, Ol = { class: "admin-dashboard__grid" }, Wl = /* @__PURE__ */ L({
2545
2549
  __name: "DashboardPage",
2546
2550
  props: {
2547
2551
  slug: { default: void 0 },
@@ -2550,9 +2554,9 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2550
2554
  subtitle: { default: void 0 }
2551
2555
  },
2552
2556
  setup(e) {
2553
- const t = e, n = ie(), i = g(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((p) => p.slug === t.slug) ?? null), a = g(() => t.widgets ? t.widgets : i.value ? i.value.widgets ?? [] : []), l = g(
2557
+ const t = e, n = ie(), i = v(() => !t.slug || !n.manifest ? null : n.manifest.dashboards?.find((p) => p.slug === t.slug) ?? null), a = v(() => t.widgets ? t.widgets : i.value ? i.value.widgets ?? [] : []), l = v(
2554
2558
  () => t.title ?? i.value?.label ?? "Dashboard"
2555
- ), s = g(
2559
+ ), s = v(
2556
2560
  () => t.subtitle ?? i.value?.description ?? null
2557
2561
  );
2558
2562
  function u(m) {
@@ -2562,25 +2566,25 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2562
2566
  return (m, p) => (o(), c("section", Bl, [
2563
2567
  d("header", Il, [
2564
2568
  d("div", Dl, [
2565
- d("h1", Vl, h(l.value), 1),
2566
- s.value ? (o(), c("div", zl, h(s.value), 1)) : F("", !0)
2569
+ d("h1", Vl, g(l.value), 1),
2570
+ s.value ? (o(), c("div", zl, g(s.value), 1)) : T("", !0)
2567
2571
  ]),
2568
2572
  d("div", ql, [
2569
2573
  X(m.$slots, "actions")
2570
2574
  ])
2571
2575
  ]),
2572
2576
  d("div", Ol, [
2573
- (o(!0), c(M, null, D(a.value, (b, S) => (o(), c("div", {
2574
- key: S,
2577
+ (o(!0), c(P, null, D(a.value, (_, x) => (o(), c("div", {
2578
+ key: x,
2575
2579
  class: "admin-dashboard__cell",
2576
- style: Te({ gridColumn: `span ${u(b)} / span ${u(b)}` })
2580
+ style: Te({ gridColumn: `span ${u(_)} / span ${u(_)}` })
2577
2581
  }, [
2578
- w(Nl, { node: b }, null, 8, ["node"])
2582
+ w(Nl, { node: _ }, null, 8, ["node"])
2579
2583
  ], 4))), 128))
2580
2584
  ])
2581
2585
  ]));
2582
2586
  }
2583
- }), Kl = /* @__PURE__ */ T({
2587
+ }), Kl = /* @__PURE__ */ L({
2584
2588
  __name: "StatWidget",
2585
2589
  props: {
2586
2590
  title: { default: "" },
@@ -2599,8 +2603,8 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2599
2603
  negative: "danger",
2600
2604
  warning: "warning",
2601
2605
  info: "info"
2602
- }, i = g(() => n[t.tone]);
2603
- return (a, l) => (o(), k(r(Ce), {
2606
+ }, i = v(() => n[t.tone]);
2607
+ return (a, l) => (o(), b(r(Ce), {
2604
2608
  title: e.title,
2605
2609
  value: e.value,
2606
2610
  prefix: e.prefix,
@@ -2620,7 +2624,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2620
2624
  }, Hl = {
2621
2625
  key: 1,
2622
2626
  class: "admin-widget__desc"
2623
- }, Xl = ["viewBox", "height", "aria-label"], Yl = ["x", "y", "width", "height", "fill", "data-label", "data-value"], Jl = /* @__PURE__ */ T({
2627
+ }, Xl = ["viewBox", "height", "aria-label"], Yl = ["x", "y", "width", "height", "fill", "data-label", "data-value"], Jl = /* @__PURE__ */ L({
2624
2628
  __name: "BarChartWidget",
2625
2629
  props: {
2626
2630
  title: { default: "" },
@@ -2630,7 +2634,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2630
2634
  height: { default: 200 }
2631
2635
  },
2632
2636
  setup(e) {
2633
- const t = e, n = g(() => Math.max(1, ...t.data.map((a) => a.value))), i = g(() => {
2637
+ const t = e, n = v(() => Math.max(1, ...t.data.map((a) => a.value))), i = v(() => {
2634
2638
  const l = 100 / Math.max(1, t.data.length);
2635
2639
  return t.data.map((s, u) => ({
2636
2640
  label: s.label,
@@ -2640,15 +2644,15 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2640
2644
  heightPct: s.value / n.value * 100
2641
2645
  }));
2642
2646
  });
2643
- return (a, l) => (o(), k(r(W), {
2647
+ return (a, l) => (o(), b(r(K), {
2644
2648
  padding: "md",
2645
2649
  class: "admin-widget"
2646
2650
  }, {
2647
2651
  default: f(() => [
2648
2652
  e.title || e.description ? (o(), c("header", jl, [
2649
- e.title ? (o(), c("h3", Gl, h(e.title), 1)) : F("", !0),
2650
- e.description ? (o(), c("p", Hl, h(e.description), 1)) : F("", !0)
2651
- ])) : F("", !0),
2653
+ e.title ? (o(), c("h3", Gl, g(e.title), 1)) : T("", !0),
2654
+ e.description ? (o(), c("p", Hl, g(e.description), 1)) : T("", !0)
2655
+ ])) : T("", !0),
2652
2656
  (o(), c("svg", {
2653
2657
  class: "admin-widget-bar-chart",
2654
2658
  viewBox: `0 0 100 ${e.height}`,
@@ -2658,7 +2662,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2658
2662
  role: "img",
2659
2663
  "aria-label": e.title || "Bar chart"
2660
2664
  }, [
2661
- (o(!0), c(M, null, D(i.value, (s, u) => (o(), c("rect", {
2665
+ (o(!0), c(P, null, D(i.value, (s, u) => (o(), c("rect", {
2662
2666
  key: u,
2663
2667
  x: s.x,
2664
2668
  y: e.height - s.heightPct / 100 * e.height,
@@ -2669,7 +2673,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2669
2673
  "data-label": s.label,
2670
2674
  "data-value": s.value
2671
2675
  }, [
2672
- d("title", null, h(s.label) + ": " + h(s.value), 1)
2676
+ d("title", null, g(s.label) + ": " + g(s.value), 1)
2673
2677
  ], 8, Yl))), 128))
2674
2678
  ], 8, Xl))
2675
2679
  ]),
@@ -2679,7 +2683,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2679
2683
  }), Ql = {
2680
2684
  key: 0,
2681
2685
  class: "admin-widget__hd"
2682
- }, Zl = { class: "admin-widget__title" }, es = { class: "admin-donut-widget__row" }, ts = ["aria-label"], ns = ["d", "fill"], as = { class: "admin-donut-widget__legend" }, ls = { class: "admin-donut-widget__label" }, ss = { class: "admin-donut-widget__value" }, is = /* @__PURE__ */ T({
2686
+ }, Zl = { class: "admin-widget__title" }, es = { class: "admin-donut-widget__row" }, ts = ["aria-label"], ns = ["d", "fill"], as = { class: "admin-donut-widget__legend" }, ls = { class: "admin-donut-widget__label" }, ss = { class: "admin-donut-widget__value" }, is = /* @__PURE__ */ L({
2683
2687
  __name: "DonutChartWidget",
2684
2688
  props: {
2685
2689
  title: { default: "" },
@@ -2692,28 +2696,28 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2692
2696
  "var(--uid-color-amber-400, #fbbf24)",
2693
2697
  "var(--uid-color-rose-400, #fb7185)",
2694
2698
  "var(--uid-color-blue-400, #60a5fa)"
2695
- ], i = g(() => t.data.reduce((l, s) => l + s.value, 0) || 1), a = g(() => {
2699
+ ], i = v(() => t.data.reduce((l, s) => l + s.value, 0) || 1), a = v(() => {
2696
2700
  let l = 0;
2697
2701
  return t.data.map((s, u) => {
2698
2702
  const m = l / i.value * 2 * Math.PI;
2699
2703
  l += s.value;
2700
- const p = l / i.value * 2 * Math.PI, b = 50, S = 60, A = 60, C = S + b * Math.cos(m - Math.PI / 2), _ = A + b * Math.sin(m - Math.PI / 2), y = S + b * Math.cos(p - Math.PI / 2), U = A + b * Math.sin(p - Math.PI / 2), q = p - m > Math.PI ? 1 : 0, P = t.data.length === 1 ? `M ${S - b} ${A} a ${b} ${b} 0 1 0 ${b * 2} 0 a ${b} ${b} 0 1 0 ${-b * 2} 0` : `M ${S} ${A} L ${C} ${_} A ${b} ${b} 0 ${q} 1 ${y} ${U} Z`;
2704
+ const p = l / i.value * 2 * Math.PI, _ = 50, x = 60, A = 60, S = x + _ * Math.cos(m - Math.PI / 2), y = A + _ * Math.sin(m - Math.PI / 2), h = x + _ * Math.cos(p - Math.PI / 2), U = A + _ * Math.sin(p - Math.PI / 2), q = p - m > Math.PI ? 1 : 0, N = t.data.length === 1 ? `M ${x - _} ${A} a ${_} ${_} 0 1 0 ${_ * 2} 0 a ${_} ${_} 0 1 0 ${-_ * 2} 0` : `M ${x} ${A} L ${S} ${y} A ${_} ${_} 0 ${q} 1 ${h} ${U} Z`;
2701
2705
  return {
2702
2706
  ...s,
2703
- path: P,
2707
+ path: N,
2704
2708
  color: s.color ?? n[u % n.length],
2705
2709
  pct: (s.value / i.value * 100).toFixed(1)
2706
2710
  };
2707
2711
  });
2708
2712
  });
2709
- return (l, s) => (o(), k(r(W), {
2713
+ return (l, s) => (o(), b(r(K), {
2710
2714
  padding: "md",
2711
2715
  class: "admin-widget admin-donut-widget"
2712
2716
  }, {
2713
2717
  default: f(() => [
2714
2718
  e.title ? (o(), c("header", Ql, [
2715
- d("h3", Zl, h(e.title), 1)
2716
- ])) : F("", !0),
2719
+ d("h3", Zl, g(e.title), 1)
2720
+ ])) : T("", !0),
2717
2721
  d("div", es, [
2718
2722
  (o(), c("svg", {
2719
2723
  viewBox: "0 0 120 120",
@@ -2721,12 +2725,12 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2721
2725
  role: "img",
2722
2726
  "aria-label": e.title
2723
2727
  }, [
2724
- (o(!0), c(M, null, D(a.value, (u, m) => (o(), c("path", {
2728
+ (o(!0), c(P, null, D(a.value, (u, m) => (o(), c("path", {
2725
2729
  key: m,
2726
2730
  d: u.path,
2727
2731
  fill: u.color
2728
2732
  }, [
2729
- d("title", null, h(u.label) + ": " + h(u.value) + " (" + h(u.pct) + "%)", 1)
2733
+ d("title", null, g(u.label) + ": " + g(u.value) + " (" + g(u.pct) + "%)", 1)
2730
2734
  ], 8, ns))), 128)),
2731
2735
  s[0] || (s[0] = d("circle", {
2732
2736
  cx: "60",
@@ -2736,13 +2740,13 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2736
2740
  }, null, -1))
2737
2741
  ], 8, ts)),
2738
2742
  d("ul", as, [
2739
- (o(!0), c(M, null, D(a.value, (u, m) => (o(), c("li", { key: m }, [
2743
+ (o(!0), c(P, null, D(a.value, (u, m) => (o(), c("li", { key: m }, [
2740
2744
  d("span", {
2741
2745
  class: "admin-donut-widget__dot",
2742
2746
  style: Te({ background: u.color })
2743
2747
  }, null, 4),
2744
- d("span", ls, h(u.label), 1),
2745
- d("span", ss, h(u.pct) + "%", 1)
2748
+ d("span", ls, g(u.label), 1),
2749
+ d("span", ss, g(u.pct) + "%", 1)
2746
2750
  ]))), 128))
2747
2751
  ])
2748
2752
  ])
@@ -2753,7 +2757,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2753
2757
  }), os = {
2754
2758
  key: 0,
2755
2759
  class: "admin-widget__hd"
2756
- }, rs = { class: "admin-widget__title" }, us = /* @__PURE__ */ T({
2760
+ }, rs = { class: "admin-widget__title" }, us = /* @__PURE__ */ L({
2757
2761
  __name: "RecentTableWidget",
2758
2762
  props: {
2759
2763
  title: { default: "" },
@@ -2762,14 +2766,14 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2762
2766
  emptyText: { default: "Нет данных" }
2763
2767
  },
2764
2768
  setup(e) {
2765
- return (t, n) => (o(), k(r(W), {
2769
+ return (t, n) => (o(), b(r(K), {
2766
2770
  padding: "md",
2767
2771
  class: "admin-widget"
2768
2772
  }, {
2769
2773
  default: f(() => [
2770
2774
  e.title ? (o(), c("header", os, [
2771
- d("h3", rs, h(e.title), 1)
2772
- ])) : F("", !0),
2775
+ d("h3", rs, g(e.title), 1)
2776
+ ])) : T("", !0),
2773
2777
  w(r(Ke), {
2774
2778
  columns: e.columns,
2775
2779
  data: e.rows,
@@ -2782,7 +2786,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2782
2786
  }), ds = {
2783
2787
  key: 0,
2784
2788
  class: "admin-widget__hd"
2785
- }, cs = { class: "admin-widget__title" }, ms = /* @__PURE__ */ T({
2789
+ }, cs = { class: "admin-widget__title" }, ms = /* @__PURE__ */ L({
2786
2790
  __name: "HeatmapWidget",
2787
2791
  props: {
2788
2792
  title: { default: "" },
@@ -2792,14 +2796,14 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2792
2796
  gap: { default: 2 }
2793
2797
  },
2794
2798
  setup(e) {
2795
- return (t, n) => (o(), k(r(W), {
2799
+ return (t, n) => (o(), b(r(K), {
2796
2800
  padding: "md",
2797
2801
  class: "admin-widget"
2798
2802
  }, {
2799
2803
  default: f(() => [
2800
2804
  e.title ? (o(), c("header", ds, [
2801
- d("h3", cs, h(e.title), 1)
2802
- ])) : F("", !0),
2805
+ d("h3", cs, g(e.title), 1)
2806
+ ])) : T("", !0),
2803
2807
  w(r(Wt), {
2804
2808
  data: e.data,
2805
2809
  levels: e.levels,
@@ -2813,7 +2817,7 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2813
2817
  }), fs = {
2814
2818
  key: 0,
2815
2819
  class: "admin-widget__hd"
2816
- }, vs = { class: "admin-widget__title" }, ps = { style: { display: "flex", "justify-content": "center" } }, gs = /* @__PURE__ */ T({
2820
+ }, vs = { class: "admin-widget__title" }, ps = { style: { display: "flex", "justify-content": "center" } }, gs = /* @__PURE__ */ L({
2817
2821
  __name: "GaugeWidget",
2818
2822
  props: {
2819
2823
  title: { default: "" },
@@ -2834,15 +2838,15 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2834
2838
  positive: "success",
2835
2839
  warning: "warning",
2836
2840
  negative: "danger"
2837
- }, i = g(() => n[t.tone]);
2838
- return (a, l) => (o(), k(r(W), {
2841
+ }, i = v(() => n[t.tone]);
2842
+ return (a, l) => (o(), b(r(K), {
2839
2843
  padding: "md",
2840
2844
  class: "admin-widget"
2841
2845
  }, {
2842
2846
  default: f(() => [
2843
2847
  e.title ? (o(), c("header", fs, [
2844
- d("h3", vs, h(e.title), 1)
2845
- ])) : F("", !0),
2848
+ d("h3", vs, g(e.title), 1)
2849
+ ])) : T("", !0),
2846
2850
  d("div", ps, [
2847
2851
  w(r(Kt), {
2848
2852
  value: e.value,
@@ -2864,22 +2868,22 @@ const ll = { class: "admin-page admin-resource-view" }, sl = { class: "admin-pag
2864
2868
  }), hs = {
2865
2869
  key: 0,
2866
2870
  class: "admin-widget__hd"
2867
- }, ys = { class: "admin-widget__title" }, _s = { class: "admin-markdown-widget" }, bs = /* @__PURE__ */ T({
2871
+ }, ys = { class: "admin-widget__title" }, _s = { class: "admin-markdown-widget" }, bs = /* @__PURE__ */ L({
2868
2872
  __name: "MarkdownWidget",
2869
2873
  props: {
2870
2874
  title: { default: "" },
2871
2875
  content: {}
2872
2876
  },
2873
2877
  setup(e) {
2874
- return (t, n) => (o(), k(r(W), {
2878
+ return (t, n) => (o(), b(r(K), {
2875
2879
  padding: "md",
2876
2880
  class: "admin-widget"
2877
2881
  }, {
2878
2882
  default: f(() => [
2879
2883
  e.title ? (o(), c("header", hs, [
2880
- d("h3", ys, h(e.title), 1)
2881
- ])) : F("", !0),
2882
- d("div", _s, h(e.content), 1)
2884
+ d("h3", ys, g(e.title), 1)
2885
+ ])) : T("", !0),
2886
+ d("div", _s, g(e.content), 1)
2883
2887
  ]),
2884
2888
  _: 1
2885
2889
  }));
@@ -3028,7 +3032,7 @@ function Es(e, t) {
3028
3032
  }
3029
3033
  ];
3030
3034
  }
3031
- function Us(e, t) {
3035
+ function Fs(e, t) {
3032
3036
  return {
3033
3037
  path: `/screens/${e.slug}`,
3034
3038
  name: `admin.screen.${e.slug}`,
@@ -3042,7 +3046,7 @@ function Us(e, t) {
3042
3046
  }
3043
3047
  };
3044
3048
  }
3045
- function Rs(e, t) {
3049
+ function Us(e, t) {
3046
3050
  return {
3047
3051
  path: `/settings/${e.slug}`,
3048
3052
  name: `admin.settings.${e.slug}`,
@@ -3056,7 +3060,7 @@ function Rs(e, t) {
3056
3060
  }
3057
3061
  };
3058
3062
  }
3059
- function Fs(e, t) {
3063
+ function Rs(e, t) {
3060
3064
  if (typeof e.slug != "string" || e.slug.length === 0) return null;
3061
3065
  const n = e.permission, i = Array.isArray(n) ? n : typeof n == "string" && n.length > 0 ? [n] : [];
3062
3066
  return {
@@ -3078,11 +3082,11 @@ function Ts(e, t) {
3078
3082
  for (const i of e.resources)
3079
3083
  n.push(...Es(i, t));
3080
3084
  for (const i of e.screens)
3081
- n.push(Us(i, t));
3085
+ n.push(Fs(i, t));
3082
3086
  for (const i of e.settings)
3083
- n.push(Rs(i, t));
3087
+ n.push(Us(i, t));
3084
3088
  for (const i of e.dashboards) {
3085
- const a = Fs(i, t);
3089
+ const a = Rs(i, t);
3086
3090
  a && n.push(a);
3087
3091
  }
3088
3092
  return n;
@@ -3177,7 +3181,7 @@ function Bs(e) {
3177
3181
  l.addRoute(a);
3178
3182
  }, l;
3179
3183
  }
3180
- const Y = /* @__PURE__ */ T({
3184
+ const Y = /* @__PURE__ */ L({
3181
3185
  __name: "TextField",
3182
3186
  props: {
3183
3187
  name: {},
@@ -3191,11 +3195,11 @@ const Y = /* @__PURE__ */ T({
3191
3195
  autocomplete: { default: null }
3192
3196
  },
3193
3197
  setup(e) {
3194
- const t = e, n = ce(), i = g(() => n.getField(t.name) ?? ""), a = g(() => n.errors[t.name]?.[0]);
3198
+ const t = e, n = ce(), i = v(() => n.getField(t.name) ?? ""), a = v(() => n.errors[t.name]?.[0]);
3195
3199
  function l(s) {
3196
3200
  n.setField(t.name, s);
3197
3201
  }
3198
- return (s, u) => (o(), k(r(ue), {
3202
+ return (s, u) => (o(), b(r(ue), {
3199
3203
  "model-value": i.value,
3200
3204
  type: e.inputType,
3201
3205
  label: e.label ?? void 0,
@@ -3210,7 +3214,7 @@ const Y = /* @__PURE__ */ T({
3210
3214
  "onUpdate:modelValue": l
3211
3215
  }, null, 8, ["model-value", "type", "label", "hint", "error", "placeholder", "required", "disabled", "readonly", "name", "autocomplete"]));
3212
3216
  }
3213
- }), Se = /* @__PURE__ */ T({
3217
+ }), Se = /* @__PURE__ */ L({
3214
3218
  __name: "TextAreaField",
3215
3219
  props: {
3216
3220
  name: {},
@@ -3223,11 +3227,11 @@ const Y = /* @__PURE__ */ T({
3223
3227
  readonly: { type: Boolean, default: !1 }
3224
3228
  },
3225
3229
  setup(e) {
3226
- const t = e, n = ce(), i = g(() => n.getField(t.name) ?? ""), a = g(() => n.errors[t.name]?.[0]);
3230
+ const t = e, n = ce(), i = v(() => n.getField(t.name) ?? ""), a = v(() => n.errors[t.name]?.[0]);
3227
3231
  function l(s) {
3228
3232
  n.setField(t.name, s);
3229
3233
  }
3230
- return (s, u) => (o(), k(r(ke), {
3234
+ return (s, u) => (o(), b(r(ke), {
3231
3235
  label: e.label ?? void 0,
3232
3236
  hint: e.help ?? void 0,
3233
3237
  error: a.value,
@@ -3248,7 +3252,7 @@ const Y = /* @__PURE__ */ T({
3248
3252
  _: 1
3249
3253
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3250
3254
  }
3251
- }), Ve = /* @__PURE__ */ T({
3255
+ }), Ve = /* @__PURE__ */ L({
3252
3256
  __name: "NumberField",
3253
3257
  props: {
3254
3258
  name: {},
@@ -3263,14 +3267,14 @@ const Y = /* @__PURE__ */ T({
3263
3267
  readonly: { type: Boolean, default: !1 }
3264
3268
  },
3265
3269
  setup(e) {
3266
- const t = e, n = ce(), i = g(() => {
3270
+ const t = e, n = ce(), i = v(() => {
3267
3271
  const s = n.getField(t.name);
3268
3272
  return s == null || s === "" ? null : typeof s == "number" ? s : Number(s);
3269
- }), a = g(() => n.errors[t.name]?.[0]);
3273
+ }), a = v(() => n.errors[t.name]?.[0]);
3270
3274
  function l(s) {
3271
3275
  n.setField(t.name, s);
3272
3276
  }
3273
- return (s, u) => (o(), k(r(ke), {
3277
+ return (s, u) => (o(), b(r(ke), {
3274
3278
  label: e.label ?? void 0,
3275
3279
  hint: e.help ?? void 0,
3276
3280
  error: a.value,
@@ -3293,7 +3297,7 @@ const Y = /* @__PURE__ */ T({
3293
3297
  _: 1
3294
3298
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3295
3299
  }
3296
- }), te = /* @__PURE__ */ T({
3300
+ }), te = /* @__PURE__ */ L({
3297
3301
  __name: "SelectField",
3298
3302
  props: {
3299
3303
  name: {},
@@ -3308,14 +3312,14 @@ const Y = /* @__PURE__ */ T({
3308
3312
  size: { default: "md" }
3309
3313
  },
3310
3314
  setup(e) {
3311
- const t = e, n = ce(), i = g(() => {
3315
+ const t = e, n = ce(), i = v(() => {
3312
3316
  const s = n.getField(t.name);
3313
3317
  return s == null || s === "" ? null : s;
3314
- }), a = g(() => n.errors[t.name]?.[0]);
3318
+ }), a = v(() => n.errors[t.name]?.[0]);
3315
3319
  function l(s) {
3316
3320
  n.setField(t.name, s);
3317
3321
  }
3318
- return (s, u) => (o(), k(r(ke), {
3322
+ return (s, u) => (o(), b(r(ke), {
3319
3323
  label: e.label ?? void 0,
3320
3324
  hint: e.help ?? void 0,
3321
3325
  error: a.value,
@@ -3337,7 +3341,7 @@ const Y = /* @__PURE__ */ T({
3337
3341
  _: 1
3338
3342
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3339
3343
  }
3340
- }), ze = /* @__PURE__ */ T({
3344
+ }), ze = /* @__PURE__ */ L({
3341
3345
  __name: "CheckboxField",
3342
3346
  props: {
3343
3347
  name: {},
@@ -3348,11 +3352,11 @@ const Y = /* @__PURE__ */ T({
3348
3352
  disabled: { type: Boolean, default: !1 }
3349
3353
  },
3350
3354
  setup(e) {
3351
- const t = e, n = ce(), i = g(() => !!n.getField(t.name)), a = g(() => n.errors[t.name]?.[0]);
3355
+ const t = e, n = ce(), i = v(() => !!n.getField(t.name)), a = v(() => n.errors[t.name]?.[0]);
3352
3356
  function l(s) {
3353
3357
  n.setField(t.name, s);
3354
3358
  }
3355
- return (s, u) => (o(), k(r(ke), {
3359
+ return (s, u) => (o(), b(r(ke), {
3356
3360
  label: e.label ?? void 0,
3357
3361
  hint: e.help ?? void 0,
3358
3362
  error: a.value,
@@ -3367,9 +3371,9 @@ const Y = /* @__PURE__ */ T({
3367
3371
  "onUpdate:modelValue": l
3368
3372
  }, {
3369
3373
  default: f(() => [
3370
- e.inlineLabel ? (o(), c(M, { key: 0 }, [
3371
- $(h(e.inlineLabel), 1)
3372
- ], 64)) : F("", !0)
3374
+ e.inlineLabel ? (o(), c(P, { key: 0 }, [
3375
+ $(g(e.inlineLabel), 1)
3376
+ ], 64)) : T("", !0)
3373
3377
  ]),
3374
3378
  _: 1
3375
3379
  }, 8, ["model-value", "disabled", "name"])
@@ -3377,7 +3381,7 @@ const Y = /* @__PURE__ */ T({
3377
3381
  _: 1
3378
3382
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3379
3383
  }
3380
- }), re = /* @__PURE__ */ T({
3384
+ }), re = /* @__PURE__ */ L({
3381
3385
  __name: "DateField",
3382
3386
  props: {
3383
3387
  name: {},
@@ -3390,14 +3394,14 @@ const Y = /* @__PURE__ */ T({
3390
3394
  disabled: { type: Boolean, default: !1 }
3391
3395
  },
3392
3396
  setup(e) {
3393
- const t = e, n = ce(), i = g(() => {
3397
+ const t = e, n = ce(), i = v(() => {
3394
3398
  const s = n.getField(t.name);
3395
3399
  return s == null || s === "" ? null : String(s);
3396
- }), a = g(() => n.errors[t.name]?.[0]);
3400
+ }), a = v(() => n.errors[t.name]?.[0]);
3397
3401
  function l(s) {
3398
3402
  n.setField(t.name, s);
3399
3403
  }
3400
- return (s, u) => (o(), k(r(ke), {
3404
+ return (s, u) => (o(), b(r(ke), {
3401
3405
  label: e.label ?? void 0,
3402
3406
  hint: e.help ?? void 0,
3403
3407
  error: a.value,
@@ -3417,20 +3421,20 @@ const Y = /* @__PURE__ */ T({
3417
3421
  _: 1
3418
3422
  }, 8, ["label", "hint", "error", "required", "disabled"]));
3419
3423
  }
3420
- }), lt = /* @__PURE__ */ T({
3424
+ }), lt = /* @__PURE__ */ L({
3421
3425
  __name: "RowsLayout",
3422
3426
  props: {
3423
3427
  items: {},
3424
3428
  gap: { default: "var(--uid-space-md)" }
3425
3429
  },
3426
3430
  setup(e) {
3427
- return (t, n) => (o(), k(r(Xt), {
3431
+ return (t, n) => (o(), b(r(Xt), {
3428
3432
  direction: "column",
3429
3433
  gap: e.gap,
3430
3434
  align: "stretch"
3431
3435
  }, {
3432
3436
  default: f(() => [
3433
- (o(!0), c(M, null, D(e.items, (i, a) => (o(), k(we, {
3437
+ (o(!0), c(P, null, D(e.items, (i, a) => (o(), b(we, {
3434
3438
  key: a,
3435
3439
  node: i
3436
3440
  }, null, 8, ["node"]))), 128))
@@ -3438,7 +3442,7 @@ const Y = /* @__PURE__ */ T({
3438
3442
  _: 1
3439
3443
  }, 8, ["gap"]));
3440
3444
  }
3441
- }), Is = /* @__PURE__ */ T({
3445
+ }), Is = /* @__PURE__ */ L({
3442
3446
  __name: "ColumnsLayout",
3443
3447
  props: {
3444
3448
  items: {},
@@ -3446,17 +3450,17 @@ const Y = /* @__PURE__ */ T({
3446
3450
  cols: { default: 12 }
3447
3451
  },
3448
3452
  setup(e) {
3449
- const t = e, n = g(() => t.items.length === 0 ? t.cols : Math.max(1, Math.floor(t.cols / t.items.length)));
3453
+ const t = e, n = v(() => t.items.length === 0 ? t.cols : Math.max(1, Math.floor(t.cols / t.items.length)));
3450
3454
  function i(a) {
3451
3455
  const l = a.span;
3452
3456
  return typeof l == "number" && l > 0 ? Math.min(l, t.cols) : n.value;
3453
3457
  }
3454
- return (a, l) => (o(), k(r(Yt), {
3458
+ return (a, l) => (o(), b(r(Yt), {
3455
3459
  cols: e.cols,
3456
3460
  gap: e.gap
3457
3461
  }, {
3458
3462
  default: f(() => [
3459
- (o(!0), c(M, null, D(e.items, (s, u) => (o(), c("div", {
3463
+ (o(!0), c(P, null, D(e.items, (s, u) => (o(), c("div", {
3460
3464
  key: u,
3461
3465
  class: "admin-columns__item",
3462
3466
  style: Te({ gridColumn: `span ${i(s)} / span ${i(s)}` })
@@ -3476,7 +3480,7 @@ const Y = /* @__PURE__ */ T({
3476
3480
  }, zs = {
3477
3481
  key: 1,
3478
3482
  class: "admin-section__description"
3479
- }, qs = { class: "admin-section__body" }, he = /* @__PURE__ */ T({
3483
+ }, qs = { class: "admin-section__body" }, he = /* @__PURE__ */ L({
3480
3484
  __name: "SectionLayout",
3481
3485
  props: {
3482
3486
  items: {},
@@ -3484,17 +3488,17 @@ const Y = /* @__PURE__ */ T({
3484
3488
  description: { default: null }
3485
3489
  },
3486
3490
  setup(e) {
3487
- return (t, n) => (o(), k(r(W), {
3491
+ return (t, n) => (o(), b(r(K), {
3488
3492
  padding: "md",
3489
3493
  class: "admin-section"
3490
3494
  }, {
3491
3495
  default: f(() => [
3492
3496
  e.title || e.description ? (o(), c("header", Ds, [
3493
- e.title ? (o(), c("h3", Vs, h(e.title), 1)) : F("", !0),
3494
- e.description ? (o(), c("p", zs, h(e.description), 1)) : F("", !0)
3495
- ])) : F("", !0),
3497
+ e.title ? (o(), c("h3", Vs, g(e.title), 1)) : T("", !0),
3498
+ e.description ? (o(), c("p", zs, g(e.description), 1)) : T("", !0)
3499
+ ])) : T("", !0),
3496
3500
  d("div", qs, [
3497
- (o(!0), c(M, null, D(e.items, (i, a) => (o(), k(we, {
3501
+ (o(!0), c(P, null, D(e.items, (i, a) => (o(), b(we, {
3498
3502
  key: a,
3499
3503
  node: i
3500
3504
  }, null, 8, ["node"]))), 128))
@@ -3503,7 +3507,7 @@ const Y = /* @__PURE__ */ T({
3503
3507
  _: 1
3504
3508
  }));
3505
3509
  }
3506
- }), Os = /* @__PURE__ */ T({
3510
+ }), Os = /* @__PURE__ */ L({
3507
3511
  __name: "TabsLayout",
3508
3512
  props: {
3509
3513
  items: {},
@@ -3519,30 +3523,30 @@ const Y = /* @__PURE__ */ T({
3519
3523
  function s(u) {
3520
3524
  l.value = u, i("update:active", u);
3521
3525
  }
3522
- return (u, m) => (o(), k(r(ft), {
3526
+ return (u, m) => (o(), b(r(ft), {
3523
3527
  "model-value": l.value,
3524
3528
  "onUpdate:modelValue": s
3525
3529
  }, {
3526
3530
  list: f(() => [
3527
- (o(!0), c(M, null, D(e.items, (p, b) => (o(), k(r(Ae), {
3528
- key: a(p, b),
3529
- value: a(p, b)
3531
+ (o(!0), c(P, null, D(e.items, (p, _) => (o(), b(r(Ae), {
3532
+ key: a(p, _),
3533
+ value: a(p, _)
3530
3534
  }, {
3531
3535
  default: f(() => [
3532
- $(h(p.label), 1)
3536
+ $(g(p.label), 1)
3533
3537
  ]),
3534
3538
  _: 2
3535
3539
  }, 1032, ["value"]))), 128))
3536
3540
  ]),
3537
3541
  default: f(() => [
3538
- (o(!0), c(M, null, D(e.items, (p, b) => (o(), k(r(vt), {
3539
- key: `panel-${a(p, b)}`,
3540
- value: a(p, b)
3542
+ (o(!0), c(P, null, D(e.items, (p, _) => (o(), b(r(vt), {
3543
+ key: `panel-${a(p, _)}`,
3544
+ value: a(p, _)
3541
3545
  }, {
3542
3546
  default: f(() => [
3543
- (o(!0), c(M, null, D(p.items, (S, A) => (o(), k(we, {
3547
+ (o(!0), c(P, null, D(p.items, (x, A) => (o(), b(we, {
3544
3548
  key: A,
3545
- node: S
3549
+ node: x
3546
3550
  }, null, 8, ["node"]))), 128))
3547
3551
  ]),
3548
3552
  _: 2
@@ -3610,7 +3614,7 @@ function Ws() {
3610
3614
  }
3611
3615
  });
3612
3616
  }
3613
- const I = /* @__PURE__ */ T({
3617
+ const I = /* @__PURE__ */ L({
3614
3618
  __name: "TextEntry",
3615
3619
  props: {
3616
3620
  name: { default: "" },
@@ -3620,18 +3624,18 @@ const I = /* @__PURE__ */ T({
3620
3624
  mono: { type: Boolean, default: !1 }
3621
3625
  },
3622
3626
  setup(e) {
3623
- const t = e, n = Ne(), i = g(() => {
3627
+ const t = e, n = Ne(), i = v(() => {
3624
3628
  let a = t.value;
3625
3629
  return a === void 0 && n && t.name && (a = n[t.name]), a == null || a === "" ? t.placeholder : String(a);
3626
3630
  });
3627
3631
  return (a, l) => (o(), c("span", {
3628
3632
  class: ne(["admin-infolist-text", e.mono ? "admin-infolist-text--mono" : ""])
3629
- }, h(i.value), 3));
3633
+ }, g(i.value), 3));
3630
3634
  }
3631
3635
  }), Ks = {
3632
3636
  key: 1,
3633
3637
  class: "admin-infolist-text"
3634
- }, js = /* @__PURE__ */ T({
3638
+ }, js = /* @__PURE__ */ L({
3635
3639
  __name: "BadgeEntry",
3636
3640
  props: {
3637
3641
  name: { default: "" },
@@ -3641,21 +3645,21 @@ const I = /* @__PURE__ */ T({
3641
3645
  variant: { default: void 0 }
3642
3646
  },
3643
3647
  setup(e) {
3644
- const t = e, n = Ne(), i = g(() => {
3648
+ const t = e, n = Ne(), i = v(() => {
3645
3649
  let l = t.value;
3646
3650
  return l === void 0 && n && t.name && (l = n[t.name]), l == null ? "" : String(l);
3647
- }), a = g(() => t.variant ? t.variant : t.map[i.value] ?? "default");
3648
- return (l, s) => i.value ? (o(), k(r(je), {
3651
+ }), a = v(() => t.variant ? t.variant : t.map[i.value] ?? "default");
3652
+ return (l, s) => i.value ? (o(), b(r(je), {
3649
3653
  key: 0,
3650
3654
  variant: a.value
3651
3655
  }, {
3652
3656
  default: f(() => [
3653
- $(h(i.value), 1)
3657
+ $(g(i.value), 1)
3654
3658
  ]),
3655
3659
  _: 1
3656
3660
  }, 8, ["variant"])) : (o(), c("span", Ks, "—"));
3657
3661
  }
3658
- }), Gs = ["data-icon"], Hs = { key: 0 }, Xs = /* @__PURE__ */ T({
3662
+ }), Gs = ["data-icon"], Hs = { key: 0 }, Xs = /* @__PURE__ */ L({
3659
3663
  __name: "IconEntry",
3660
3664
  props: {
3661
3665
  name: { default: "" },
@@ -3667,10 +3671,10 @@ const I = /* @__PURE__ */ T({
3667
3671
  falseLabel: { default: "" }
3668
3672
  },
3669
3673
  setup(e) {
3670
- const t = e, n = Ne(), i = g(() => {
3674
+ const t = e, n = Ne(), i = v(() => {
3671
3675
  let s = t.value;
3672
3676
  return s === void 0 && n && t.name && (s = n[t.name]), !!s;
3673
- }), a = g(() => i.value ? t.trueLabel : t.falseLabel), l = g(() => i.value ? t.trueIcon : t.falseIcon);
3677
+ }), a = v(() => i.value ? t.trueLabel : t.falseLabel), l = v(() => i.value ? t.trueIcon : t.falseIcon);
3674
3678
  return (s, u) => (o(), c("span", {
3675
3679
  class: ne(["admin-infolist-icon", i.value ? "admin-infolist-icon--on" : "admin-infolist-icon--off"])
3676
3680
  }, [
@@ -3678,13 +3682,13 @@ const I = /* @__PURE__ */ T({
3678
3682
  class: "admin-infolist-icon__glyph",
3679
3683
  "data-icon": l.value
3680
3684
  }, null, 8, Gs),
3681
- a.value ? (o(), c("span", Hs, h(a.value), 1)) : F("", !0)
3685
+ a.value ? (o(), c("span", Hs, g(a.value), 1)) : T("", !0)
3682
3686
  ], 2));
3683
3687
  }
3684
3688
  }), Ys = {
3685
3689
  key: 1,
3686
3690
  class: "admin-infolist-text"
3687
- }, st = /* @__PURE__ */ T({
3691
+ }, st = /* @__PURE__ */ L({
3688
3692
  __name: "KeyValueEntry",
3689
3693
  props: {
3690
3694
  name: { default: "" },
@@ -3692,25 +3696,25 @@ const I = /* @__PURE__ */ T({
3692
3696
  value: { default: void 0 }
3693
3697
  },
3694
3698
  setup(e) {
3695
- const t = e, n = Ne(), i = g(() => {
3699
+ const t = e, n = Ne(), i = v(() => {
3696
3700
  let l = t.value;
3697
3701
  return l === void 0 && n && t.name && (l = n[t.name]), l == null ? [] : typeof l != "object" ? [] : Object.entries(l);
3698
3702
  });
3699
3703
  function a(l) {
3700
3704
  return l == null ? "—" : typeof l == "object" ? JSON.stringify(l) : String(l);
3701
3705
  }
3702
- return (l, s) => i.value.length > 0 ? (o(), k(r(Jt), {
3706
+ return (l, s) => i.value.length > 0 ? (o(), b(r(Jt), {
3703
3707
  key: 0,
3704
3708
  direction: "vertical",
3705
3709
  columns: 1
3706
3710
  }, {
3707
3711
  default: f(() => [
3708
- (o(!0), c(M, null, D(i.value, ([u, m]) => (o(), k(r(Qt), {
3712
+ (o(!0), c(P, null, D(i.value, ([u, m]) => (o(), b(r(Qt), {
3709
3713
  key: u,
3710
3714
  label: u
3711
3715
  }, {
3712
3716
  default: f(() => [
3713
- $(h(a(m)), 1)
3717
+ $(g(a(m)), 1)
3714
3718
  ]),
3715
3719
  _: 2
3716
3720
  }, 1032, ["label"]))), 128))
@@ -3771,7 +3775,7 @@ function ro(e, t = {}) {
3771
3775
  csrfToken: e.csrf
3772
3776
  });
3773
3777
  ln(a);
3774
- const l = Ft(Rn), s = Lt();
3778
+ const l = Rt(Un), s = Lt();
3775
3779
  l.use(s), J().hydrate(e), He().hydrate(e), Ge().hydrate(e), Xe().hydrate(e), Ws(), ks(), Js();
3776
3780
  const u = Bs({
3777
3781
  base: i,
@@ -3795,20 +3799,20 @@ function ro(e, t = {}) {
3795
3799
  titleGuard: t.router?.titleGuard
3796
3800
  });
3797
3801
  if (l.use(u), !t.skipManifestLoad) {
3798
- const m = ie(), p = J(), b = _t(), S = () => {
3799
- b.load().catch(() => {
3802
+ const m = ie(), p = J(), _ = _t(), x = () => {
3803
+ _.load().catch(() => {
3800
3804
  }), m.load().then((A) => {
3801
3805
  u.replaceManifestRoutes(A);
3802
- const C = u.currentRoute.value;
3803
- C.name === "admin.notFound" && C.fullPath !== "/" && u.replace(C.fullPath);
3806
+ const S = u.currentRoute.value;
3807
+ S.name === "admin.notFound" && S.fullPath !== "/" && u.replace(S.fullPath);
3804
3808
  }).catch((A) => {
3805
3809
  typeof console < "u" && console.error("[laravel-admin] manifest load failed:", A);
3806
3810
  });
3807
3811
  };
3808
- p.isAuthenticated && S(), ae(
3812
+ p.isAuthenticated && x(), ae(
3809
3813
  () => p.user,
3810
- (A, C) => {
3811
- A && !C && S();
3814
+ (A, S) => {
3815
+ A && !S && x();
3812
3816
  }
3813
3817
  );
3814
3818
  }
@@ -3861,7 +3865,7 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
3861
3865
  }, mi = { class: "admin-notifs__time" }, fi = {
3862
3866
  key: 0,
3863
3867
  class: "admin-notifs__text"
3864
- }, vi = ["onClick"], mo = /* @__PURE__ */ T({
3868
+ }, vi = ["onClick"], mo = /* @__PURE__ */ L({
3865
3869
  __name: "NotificationsDrawer",
3866
3870
  props: {
3867
3871
  open: { type: Boolean }
@@ -3869,55 +3873,55 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
3869
3873
  emits: ["update:open", "select-item"],
3870
3874
  setup(e, { emit: t }) {
3871
3875
  const n = e, i = t, a = Xe();
3872
- function l(y) {
3873
- i("update:open", y);
3876
+ function l(h) {
3877
+ i("update:open", h);
3874
3878
  }
3875
3879
  ae(
3876
3880
  () => n.open,
3877
- async (y) => {
3878
- y && await a.load(a.lastFilter ?? "all", 1).catch(() => {
3881
+ async (h) => {
3882
+ h && await a.load(a.lastFilter ?? "all", 1).catch(() => {
3879
3883
  });
3880
3884
  },
3881
3885
  { immediate: !0 }
3882
3886
  );
3883
- const s = g(() => a.lastFilter ?? "all");
3884
- async function u(y) {
3885
- await a.load(y, 1).catch(() => {
3887
+ const s = v(() => a.lastFilter ?? "all");
3888
+ async function u(h) {
3889
+ await a.load(h, 1).catch(() => {
3886
3890
  });
3887
3891
  }
3888
3892
  async function m() {
3889
3893
  await a.markAllAsRead().catch(() => {
3890
3894
  });
3891
3895
  }
3892
- async function p(y) {
3893
- i("select-item", y), y.read_at || await a.markAsRead(y.id).catch(() => {
3896
+ async function p(h) {
3897
+ i("select-item", h), h.read_at || await a.markAsRead(h.id).catch(() => {
3894
3898
  });
3895
3899
  }
3896
- async function b(y, U) {
3897
- U.stopPropagation(), await a.destroy(y.id).catch(() => {
3900
+ async function _(h, U) {
3901
+ U.stopPropagation(), await a.destroy(h.id).catch(() => {
3898
3902
  });
3899
3903
  }
3900
- function S(y) {
3901
- const U = y.data.level;
3904
+ function x(h) {
3905
+ const U = h.data.level;
3902
3906
  return U === "success" || U === "warning" || U === "danger" ? U : "info";
3903
3907
  }
3904
- function A(y) {
3905
- return y.data.title ?? "—";
3908
+ function A(h) {
3909
+ return h.data.title ?? "—";
3906
3910
  }
3907
- function C(y) {
3908
- return y.data.body ?? "";
3911
+ function S(h) {
3912
+ return h.data.body ?? "";
3909
3913
  }
3910
- function _(y) {
3911
- if (!y) return "";
3912
- const U = new Date(y), q = Math.max(0, Date.now() - U.getTime()), P = Math.floor(q / 6e4);
3913
- if (P < 1) return "только что";
3914
- if (P < 60) return `${P} мин назад`;
3915
- const E = Math.floor(P / 60);
3916
- if (E < 24) return `${E} ч назад`;
3917
- const v = Math.floor(E / 24);
3918
- return v < 7 ? `${v} д назад` : U.toLocaleDateString("ru-RU");
3914
+ function y(h) {
3915
+ if (!h) return "";
3916
+ const U = new Date(h), q = Math.max(0, Date.now() - U.getTime()), N = Math.floor(q / 6e4);
3917
+ if (N < 1) return "только что";
3918
+ if (N < 60) return `${N} мин назад`;
3919
+ const F = Math.floor(N / 60);
3920
+ if (F < 24) return `${F} ч назад`;
3921
+ const k = Math.floor(F / 24);
3922
+ return k < 7 ? `${k} д назад` : U.toLocaleDateString("ru-RU");
3919
3923
  }
3920
- return (y, U) => (o(), k(r(Zt), {
3924
+ return (h, U) => (o(), b(r(Zt), {
3921
3925
  "model-value": e.open,
3922
3926
  side: "right",
3923
3927
  width: "400px",
@@ -3928,9 +3932,9 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
3928
3932
  d("div", ei, [
3929
3933
  d("h2", ti, [
3930
3934
  U[0] || (U[0] = $(" Уведомления ", -1)),
3931
- r(a).unreadCount > 0 ? (o(), c("span", ni, " (" + h(r(a).unreadCount) + ") ", 1)) : F("", !0)
3935
+ r(a).unreadCount > 0 ? (o(), c("span", ni, " (" + g(r(a).unreadCount) + ") ", 1)) : T("", !0)
3932
3936
  ]),
3933
- r(a).unreadCount > 0 ? (o(), k(r(V), {
3937
+ r(a).unreadCount > 0 ? (o(), b(r(z), {
3934
3938
  key: 0,
3935
3939
  variant: "ghost",
3936
3940
  size: "sm",
@@ -3940,7 +3944,7 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
3940
3944
  $(" Прочитать все ", -1)
3941
3945
  ])]),
3942
3946
  _: 1
3943
- })) : F("", !0)
3947
+ })) : T("", !0)
3944
3948
  ])
3945
3949
  ]),
3946
3950
  default: f(() => [
@@ -3958,9 +3962,9 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
3958
3962
  w(r(Ae), { value: "unread" }, {
3959
3963
  default: f(() => [
3960
3964
  U[3] || (U[3] = $(" Непрочитанные", -1)),
3961
- r(a).unreadCount > 0 ? (o(), c(M, { key: 0 }, [
3962
- $(" (" + h(r(a).unreadCount) + ") ", 1)
3963
- ], 64)) : F("", !0)
3965
+ r(a).unreadCount > 0 ? (o(), c(P, { key: 0 }, [
3966
+ $(" (" + g(r(a).unreadCount) + ") ", 1)
3967
+ ], 64)) : T("", !0)
3964
3968
  ]),
3965
3969
  _: 1
3966
3970
  }),
@@ -3972,38 +3976,38 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
3972
3976
  })
3973
3977
  ]),
3974
3978
  default: f(() => [
3975
- (o(), c(M, null, D(["all", "unread", "read"], (q) => w(r(vt), {
3979
+ (o(), c(P, null, D(["all", "unread", "read"], (q) => w(r(vt), {
3976
3980
  key: q,
3977
3981
  value: q
3978
3982
  }, {
3979
3983
  default: f(() => [
3980
3984
  d("ul", ai, [
3981
- r(a).loading ? (o(), c("li", li, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", si, " Нет уведомлений ")) : F("", !0),
3982
- (o(!0), c(M, null, D(r(a).items, (P) => (o(), c("li", {
3983
- key: P.id,
3985
+ r(a).loading ? (o(), c("li", li, " Загрузка… ")) : r(a).items.length === 0 ? (o(), c("li", si, " Нет уведомлений ")) : T("", !0),
3986
+ (o(!0), c(P, null, D(r(a).items, (N) => (o(), c("li", {
3987
+ key: N.id,
3984
3988
  class: ne([
3985
3989
  "admin-notifs__item",
3986
- `admin-notifs__item--${S(P)}`,
3987
- { "admin-notifs__item--unread": !P.read_at }
3990
+ `admin-notifs__item--${x(N)}`,
3991
+ { "admin-notifs__item--unread": !N.read_at }
3988
3992
  ]),
3989
- onClick: (E) => p(P)
3993
+ onClick: (F) => p(N)
3990
3994
  }, [
3991
3995
  d("span", {
3992
3996
  class: "admin-notifs__icon",
3993
- "data-kind": S(P)
3997
+ "data-kind": x(N)
3994
3998
  }, null, 8, oi),
3995
3999
  d("div", ri, [
3996
4000
  d("div", ui, [
3997
- P.read_at ? (o(), c("span", ci, h(A(P)), 1)) : (o(), c("strong", di, h(A(P)), 1)),
3998
- d("span", mi, h(_(P.created_at)), 1)
4001
+ N.read_at ? (o(), c("span", ci, g(A(N)), 1)) : (o(), c("strong", di, g(A(N)), 1)),
4002
+ d("span", mi, g(y(N.created_at)), 1)
3999
4003
  ]),
4000
- C(P) ? (o(), c("p", fi, h(C(P)), 1)) : F("", !0)
4004
+ S(N) ? (o(), c("p", fi, g(S(N)), 1)) : T("", !0)
4001
4005
  ]),
4002
4006
  d("button", {
4003
4007
  type: "button",
4004
4008
  class: "admin-notifs__close",
4005
4009
  "aria-label": "Удалить",
4006
- onClick: (E) => b(P, E)
4010
+ onClick: (F) => _(N, F)
4007
4011
  }, " × ", 8, vi)
4008
4012
  ], 10, ii))), 128))
4009
4013
  ])
@@ -4032,7 +4036,7 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
4032
4036
  }, Ci = {
4033
4037
  key: 0,
4034
4038
  class: "admin-import-wizard__empty"
4035
- }, Ai = { class: "admin-import-wizard__kpi" }, Ei = { class: "admin-import-wizard__nav" }, fo = /* @__PURE__ */ T({
4039
+ }, Ai = { class: "admin-import-wizard__kpi" }, Ei = { class: "admin-import-wizard__nav" }, fo = /* @__PURE__ */ L({
4036
4040
  __name: "ImportWizardPage",
4037
4041
  props: {
4038
4042
  title: { default: "Импорт" },
@@ -4050,59 +4054,59 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
4050
4054
  { label: "Сопоставление", description: "Колонки файла → поля" },
4051
4055
  { label: "Предпросмотр", description: "Проверка первых строк" },
4052
4056
  { label: "Импорт", description: "Запуск + сводка" }
4053
- ], l = R(0), s = g(() => n.step ?? l.value);
4054
- function u(E) {
4055
- n.step === void 0 && (E < 0 || E >= a.length || (l.value = E));
4057
+ ], l = R(0), s = v(() => n.step ?? l.value);
4058
+ function u(F) {
4059
+ n.step === void 0 && (F < 0 || F >= a.length || (l.value = F));
4056
4060
  }
4057
4061
  const m = R([]);
4058
- function p(E) {
4059
- m.value = E, E.length > 0 && i("file-uploaded", E[0].file);
4062
+ function p(F) {
4063
+ m.value = F, F.length > 0 && i("file-uploaded", F[0].file);
4060
4064
  }
4061
- const b = R({});
4062
- function S(E, v) {
4063
- b.value[E] = v === null || v === "" ? null : String(v);
4065
+ const _ = R({});
4066
+ function x(F, k) {
4067
+ _.value[F] = k === null || k === "" ? null : String(k);
4064
4068
  }
4065
4069
  function A() {
4066
- return n.headers.map((E) => ({
4067
- source: E.key,
4068
- target: b.value[E.key] ?? null
4070
+ return n.headers.map((F) => ({
4071
+ source: F.key,
4072
+ target: _.value[F.key] ?? null
4069
4073
  }));
4070
4074
  }
4071
- function C() {
4075
+ function S() {
4072
4076
  i("mapping-submit", A()), u(2);
4073
4077
  }
4074
- function _() {
4078
+ function y() {
4075
4079
  i("run-import"), u(3);
4076
4080
  }
4077
- const y = g(() => s.value > 0), U = g(() => {
4081
+ const h = v(() => s.value > 0), U = v(() => {
4078
4082
  switch (s.value) {
4079
4083
  case 0:
4080
4084
  return m.value.length > 0;
4081
4085
  case 1:
4082
- return Object.values(b.value).some((E) => E !== null);
4086
+ return Object.values(_.value).some((F) => F !== null);
4083
4087
  case 2:
4084
4088
  return !0;
4085
4089
  default:
4086
4090
  return !1;
4087
4091
  }
4088
- }), q = g(() => [
4092
+ }), q = v(() => [
4089
4093
  { value: "", label: "Не импортировать" },
4090
4094
  ...n.fieldOptions
4091
4095
  ]);
4092
- function P() {
4096
+ function N() {
4093
4097
  i("cancel");
4094
4098
  }
4095
- return (E, v) => (o(), c("section", pi, [
4099
+ return (F, k) => (o(), c("section", pi, [
4096
4100
  d("header", gi, [
4097
4101
  d("div", hi, [
4098
- d("h1", yi, h(e.title), 1)
4102
+ d("h1", yi, g(e.title), 1)
4099
4103
  ]),
4100
4104
  d("div", _i, [
4101
- w(r(V), {
4105
+ w(r(z), {
4102
4106
  variant: "ghost",
4103
- onClick: P
4107
+ onClick: N
4104
4108
  }, {
4105
- default: f(() => [...v[2] || (v[2] = [
4109
+ default: f(() => [...k[2] || (k[2] = [
4106
4110
  $("Отмена", -1)
4107
4111
  ])]),
4108
4112
  _: 1
@@ -4113,13 +4117,13 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
4113
4117
  steps: a,
4114
4118
  current: s.value
4115
4119
  }, null, 8, ["current"]),
4116
- s.value === 0 ? (o(), k(r(W), {
4120
+ s.value === 0 ? (o(), b(r(K), {
4117
4121
  key: 0,
4118
4122
  padding: "md",
4119
4123
  class: "admin-import-wizard__card"
4120
4124
  }, {
4121
4125
  default: f(() => [
4122
- v[3] || (v[3] = d("header", { class: "admin-import-wizard__card-hd" }, [
4126
+ k[3] || (k[3] = d("header", { class: "admin-import-wizard__card-hd" }, [
4123
4127
  d("h3", null, "1. Загрузите файл"),
4124
4128
  d("p", null, "CSV / TSV / XLSX, до 50 MB")
4125
4129
  ], -1)),
@@ -4134,78 +4138,78 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
4134
4138
  }, null, 8, ["model-value"])
4135
4139
  ]),
4136
4140
  _: 1
4137
- })) : s.value === 1 ? (o(), k(r(W), {
4141
+ })) : s.value === 1 ? (o(), b(r(K), {
4138
4142
  key: 1,
4139
4143
  padding: "md",
4140
4144
  class: "admin-import-wizard__card"
4141
4145
  }, {
4142
4146
  default: f(() => [
4143
- v[5] || (v[5] = d("header", { class: "admin-import-wizard__card-hd" }, [
4147
+ k[5] || (k[5] = d("header", { class: "admin-import-wizard__card-hd" }, [
4144
4148
  d("h3", null, "2. Сопоставьте колонки"),
4145
4149
  d("p", null, "Выберите поле ресурса для каждой колонки файла")
4146
4150
  ], -1)),
4147
4151
  e.headers.length === 0 ? (o(), c("div", bi, " Нет данных — host ещё не отдал headers. Загрузите файл сначала. ")) : (o(), c("div", ki, [
4148
- (o(!0), c(M, null, D(e.headers, (x) => (o(), c("div", {
4149
- key: x.key,
4152
+ (o(!0), c(P, null, D(e.headers, (V) => (o(), c("div", {
4153
+ key: V.key,
4150
4154
  class: "admin-import-wizard__map-row"
4151
4155
  }, [
4152
4156
  d("div", wi, [
4153
- d("strong", null, h(x.label), 1),
4154
- x.sample ? (o(), c("span", $i, " «" + h(x.sample) + "» ", 1)) : F("", !0)
4157
+ d("strong", null, g(V.label), 1),
4158
+ V.sample ? (o(), c("span", $i, " «" + g(V.sample) + "» ", 1)) : T("", !0)
4155
4159
  ]),
4156
- v[4] || (v[4] = d("span", { class: "admin-import-wizard__map-arrow" }, "→", -1)),
4160
+ k[4] || (k[4] = d("span", { class: "admin-import-wizard__map-arrow" }, "→", -1)),
4157
4161
  w(r(Ee), {
4158
- "model-value": b.value[x.key] ?? "",
4162
+ "model-value": _.value[V.key] ?? "",
4159
4163
  options: q.value,
4160
4164
  placeholder: "Не импортировать",
4161
- "onUpdate:modelValue": (N) => S(x.key, N)
4165
+ "onUpdate:modelValue": (M) => x(V.key, M)
4162
4166
  }, null, 8, ["model-value", "options", "onUpdate:modelValue"])
4163
4167
  ]))), 128))
4164
4168
  ]))
4165
4169
  ]),
4166
4170
  _: 1
4167
- })) : s.value === 2 ? (o(), k(r(W), {
4171
+ })) : s.value === 2 ? (o(), b(r(K), {
4168
4172
  key: 2,
4169
4173
  padding: "md",
4170
4174
  class: "admin-import-wizard__card"
4171
4175
  }, {
4172
4176
  default: f(() => [
4173
4177
  d("header", xi, [
4174
- v[6] || (v[6] = d("h3", null, "3. Предпросмотр", -1)),
4175
- d("p", null, "Первые " + h(e.preview.length) + " строк перед импортом", 1)
4178
+ k[6] || (k[6] = d("h3", null, "3. Предпросмотр", -1)),
4179
+ d("p", null, "Первые " + g(e.preview.length) + " строк перед импортом", 1)
4176
4180
  ]),
4177
- e.preview.some((x) => x.__warning) ? (o(), k(r(Q), {
4181
+ e.preview.some((V) => V.__warning) ? (o(), b(r(Q), {
4178
4182
  key: 0,
4179
4183
  variant: "warning",
4180
4184
  style: { "margin-bottom": "var(--uid-space-md)" }
4181
4185
  }, {
4182
- default: f(() => [...v[7] || (v[7] = [
4186
+ default: f(() => [...k[7] || (k[7] = [
4183
4187
  $(" Часть строк имеет предупреждения — проверьте перед импортом. ", -1)
4184
4188
  ])]),
4185
4189
  _: 1
4186
- })) : F("", !0),
4187
- e.previewColumns.length > 0 ? (o(), k(r(Ke), {
4190
+ })) : T("", !0),
4191
+ e.previewColumns.length > 0 ? (o(), b(r(Ke), {
4188
4192
  key: 1,
4189
4193
  columns: e.previewColumns,
4190
4194
  data: e.preview
4191
4195
  }, null, 8, ["columns", "data"])) : (o(), c("div", Si, " Host не передал previewColumns/preview. "))
4192
4196
  ]),
4193
4197
  _: 1
4194
- })) : (o(), k(r(W), {
4198
+ })) : (o(), b(r(K), {
4195
4199
  key: 3,
4196
4200
  padding: "md",
4197
4201
  class: "admin-import-wizard__card"
4198
4202
  }, {
4199
4203
  default: f(() => [
4200
- v[8] || (v[8] = d("header", { class: "admin-import-wizard__card-hd" }, [
4204
+ k[8] || (k[8] = d("header", { class: "admin-import-wizard__card-hd" }, [
4201
4205
  d("h3", null, "4. Импорт")
4202
4206
  ], -1)),
4203
- e.progress ? (o(), c(M, { key: 1 }, [
4204
- e.progress.total > 0 ? (o(), k(r(nn), {
4207
+ e.progress ? (o(), c(P, { key: 1 }, [
4208
+ e.progress.total > 0 ? (o(), b(r(nn), {
4205
4209
  key: 0,
4206
4210
  "model-value": e.progress.created + e.progress.updated + e.progress.errors,
4207
4211
  max: e.progress.total
4208
- }, null, 8, ["model-value", "max"])) : F("", !0),
4212
+ }, null, 8, ["model-value", "max"])) : T("", !0),
4209
4213
  d("div", Ai, [
4210
4214
  w(r(Ce), {
4211
4215
  title: "Создано",
@@ -4228,51 +4232,51 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
4228
4232
  _: 1
4229
4233
  })),
4230
4234
  d("footer", Ei, [
4231
- y.value ? (o(), k(r(V), {
4235
+ h.value ? (o(), b(r(z), {
4232
4236
  key: 0,
4233
4237
  variant: "ghost",
4234
- onClick: v[0] || (v[0] = (x) => u(s.value - 1))
4238
+ onClick: k[0] || (k[0] = (V) => u(s.value - 1))
4235
4239
  }, {
4236
- default: f(() => [...v[9] || (v[9] = [
4240
+ default: f(() => [...k[9] || (k[9] = [
4237
4241
  $(" Назад ", -1)
4238
4242
  ])]),
4239
4243
  _: 1
4240
- })) : F("", !0),
4241
- v[13] || (v[13] = d("span", { style: { flex: "1" } }, null, -1)),
4242
- s.value === 0 ? (o(), k(r(V), {
4244
+ })) : T("", !0),
4245
+ k[13] || (k[13] = d("span", { style: { flex: "1" } }, null, -1)),
4246
+ s.value === 0 ? (o(), b(r(z), {
4243
4247
  key: 1,
4244
4248
  variant: "primary",
4245
4249
  disabled: !U.value,
4246
- onClick: v[1] || (v[1] = (x) => u(1))
4250
+ onClick: k[1] || (k[1] = (V) => u(1))
4247
4251
  }, {
4248
- default: f(() => [...v[10] || (v[10] = [
4252
+ default: f(() => [...k[10] || (k[10] = [
4249
4253
  $(" Далее ", -1)
4250
4254
  ])]),
4251
4255
  _: 1
4252
- }, 8, ["disabled"])) : s.value === 1 ? (o(), k(r(V), {
4256
+ }, 8, ["disabled"])) : s.value === 1 ? (o(), b(r(z), {
4253
4257
  key: 2,
4254
4258
  variant: "primary",
4255
4259
  disabled: !U.value,
4256
- onClick: C
4260
+ onClick: S
4257
4261
  }, {
4258
- default: f(() => [...v[11] || (v[11] = [
4262
+ default: f(() => [...k[11] || (k[11] = [
4259
4263
  $(" Подтвердить mapping ", -1)
4260
4264
  ])]),
4261
4265
  _: 1
4262
- }, 8, ["disabled"])) : s.value === 2 ? (o(), k(r(V), {
4266
+ }, 8, ["disabled"])) : s.value === 2 ? (o(), b(r(z), {
4263
4267
  key: 3,
4264
4268
  variant: "primary",
4265
- onClick: _
4269
+ onClick: y
4266
4270
  }, {
4267
- default: f(() => [...v[12] || (v[12] = [
4271
+ default: f(() => [...k[12] || (k[12] = [
4268
4272
  $(" Запустить импорт ", -1)
4269
4273
  ])]),
4270
4274
  _: 1
4271
- })) : F("", !0)
4275
+ })) : T("", !0)
4272
4276
  ])
4273
4277
  ]));
4274
4278
  }
4275
- }), Ui = { class: "admin-page admin-field-gallery" }, Ri = { class: "admin-gallery__group-title" }, Fi = { class: "admin-gallery__grid" }, Ti = { class: "admin-gallery__card-hd" }, Li = { class: "admin-gallery__card-title" }, Mi = { class: "admin-gallery__card-type" }, Pi = { class: "admin-gallery__card-desc" }, Ni = { class: "admin-gallery__card-demo" }, vo = /* @__PURE__ */ T({
4279
+ }), Fi = { class: "admin-page admin-field-gallery" }, Ui = { class: "admin-gallery__group-title" }, Ri = { class: "admin-gallery__grid" }, Ti = { class: "admin-gallery__card-hd" }, Li = { class: "admin-gallery__card-title" }, Mi = { class: "admin-gallery__card-type" }, Pi = { class: "admin-gallery__card-desc" }, Ni = { class: "admin-gallery__card-demo" }, vo = /* @__PURE__ */ L({
4276
4280
  __name: "FieldGalleryPage",
4277
4281
  setup(e) {
4278
4282
  const t = [
@@ -4339,30 +4343,30 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
4339
4343
  ], n = t.reduce((a, l) => (a[l.group] || (a[l.group] = []), a[l.group].push(l), a), {}), i = Tt(
4340
4344
  t.reduce((a, l) => Object.assign(a, l.initial), {})
4341
4345
  );
4342
- return pt(i), (a, l) => (o(), c("section", Ui, [
4346
+ return pt(i), (a, l) => (o(), c("section", Fi, [
4343
4347
  l[0] || (l[0] = d("header", { class: "admin-page__hd" }, [
4344
4348
  d("div", { class: "admin-page__title-wrap" }, [
4345
4349
  d("h1", { class: "admin-page__title" }, "Field Gallery"),
4346
4350
  d("div", { class: "admin-page__count" }, " Каталог встроенных field-компонентов library + примеры использования ")
4347
4351
  ])
4348
4352
  ], -1)),
4349
- (o(!0), c(M, null, D(r(n), (s, u) => (o(), c("section", {
4353
+ (o(!0), c(P, null, D(r(n), (s, u) => (o(), c("section", {
4350
4354
  key: u,
4351
4355
  class: "admin-gallery__group"
4352
4356
  }, [
4353
- d("h2", Ri, h(u), 1),
4354
- d("div", Fi, [
4355
- (o(!0), c(M, null, D(s, (m) => (o(), k(r(W), {
4357
+ d("h2", Ui, g(u), 1),
4358
+ d("div", Ri, [
4359
+ (o(!0), c(P, null, D(s, (m) => (o(), b(r(K), {
4356
4360
  key: m.type + m.title,
4357
4361
  padding: "md",
4358
4362
  class: "admin-gallery__card"
4359
4363
  }, {
4360
4364
  default: f(() => [
4361
4365
  d("header", Ti, [
4362
- d("h3", Li, h(m.title), 1),
4363
- d("code", Mi, "type: " + h(m.type), 1)
4366
+ d("h3", Li, g(m.title), 1),
4367
+ d("code", Mi, "type: " + g(m.type), 1)
4364
4368
  ]),
4365
- d("p", Pi, h(m.description), 1),
4369
+ d("p", Pi, g(m.description), 1),
4366
4370
  d("div", Ni, [
4367
4371
  w($t, {
4368
4372
  node: m.node
@@ -4377,8 +4381,8 @@ const ei = { class: "admin-notifs__hd" }, ti = { class: "admin-notifs__title" },
4377
4381
  }
4378
4382
  });
4379
4383
  export {
4380
- Rn as AdminApp,
4381
- Un as AdminShell,
4384
+ Un as AdminApp,
4385
+ Fn as AdminShell,
4382
4386
  Cn as AdminSidebar,
4383
4387
  yn as AdminTopBar,
4384
4388
  Z as ApiError,
@@ -4445,7 +4449,7 @@ export {
4445
4449
  Bs as createAdminRouter,
4446
4450
  Ls as createAuthGuard,
4447
4451
  Ms as createTitleGuard,
4448
- j as getAdminClient,
4452
+ G as getAdminClient,
4449
4453
  kt as getField,
4450
4454
  at as getInfolistEntry,
4451
4455
  tt as getLayout,