@webx-ui/module-admin 0.14.4 → 0.16.0

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.js CHANGED
@@ -1,65 +1,185 @@
1
- import { inject as te, reactive as ue, defineComponent as E, useModel as de, ref as C, computed as x, onMounted as je, watch as J, openBlock as f, createElementBlock as $, createVNode as k, unref as o, createBlock as S, createCommentVNode as z, withCtx as g, createTextVNode as R, toDisplayString as W, createElementVNode as M, Fragment as D, renderList as K, mergeModels as ee, mergeProps as Te, withModifiers as Le, useSlots as Ke, useTemplateRef as qe, normalizeClass as G, renderSlot as N, createSlots as Ae, resolveComponent as I, watchEffect as Ye, onUnmounted as Xe, isRef as Ge, createApp as Je, h as le, onBeforeUnmount as Qe, nextTick as Ze, withKeys as et } from "vue";
2
- import { RouterLink as tt, useRouter as We, useRoute as nt, createRouter as at, createWebHistory as lt } from "vue-router";
3
- import { WxSegmented as st, WxSelect as ot, WxAutocomplete as ye, WxText as H, WxInput as Ce, WxCheckbox as we, WxAction as ne, WxActions as it, WxDropdownItem as rt, useElementWidth as ut, WxHeading as dt, WxButton as Z, WxIcon as ze, WxTabs as ct, WxCard as xe, WxRichText as mt, WxResult as ft, useResponsiveShell as vt, shellLayoutFor as ht, WxToaster as pt, WebxUI as bt, dateLocaleKey as gt, localesKey as yt, WxAlert as Re, WxSkeleton as Ue, WxBadge as wt, WxPopover as xt, WxDialog as kt, WxTooltip as _t, WxEmpty as $t, WxAvatar as St, WxTextarea as ke, toast as X, confirm as Tt } from "@webx-ui/core";
4
- import { watchSystemTheme as Lt, applyTheme as At, systemTheme as Wt } from "@webx-ui/tokens";
5
- import { WxScreenRenderer as Ct } from "@webx-ui/schema";
6
- const ce = /* @__PURE__ */ Symbol("webx-i18n");
7
- function zt() {
8
- const e = te(ce, null);
1
+ import { inject as ne, reactive as pe, defineComponent as N, useModel as ue, ref as W, watch as ee, computed as x, openBlock as p, createElementBlock as T, createVNode as b, unref as n, withCtx as g, createElementVNode as O, toDisplayString as L, createBlock as $, createTextVNode as V, createCommentVNode as U, mergeModels as oe, onMounted as Le, Fragment as H, renderList as Q, mergeProps as je, withModifiers as Ke, useSlots as ht, useTemplateRef as qe, normalizeClass as ae, renderSlot as F, createSlots as Ae, provide as Ye, normalizeProps as gt, guardReactiveProps as yt, resolveComponent as j, watchEffect as bt, onUnmounted as wt, isRef as Xe, createApp as xt, h as de, nextTick as Ge, withKeys as Je, onBeforeUnmount as Qe } from "vue";
2
+ import { RouterLink as kt, useRouter as ge, useRoute as Ze, createRouter as _t, createWebHistory as $t, onBeforeRouteLeave as Tt } from "vue-router";
3
+ import { WxSortableList as et, WxAction as se, WxBadge as ze, WxSelect as tt, WxSegmented as St, WxAutocomplete as Be, WxText as G, WxInput as ye, WxCheckbox as Ie, WxActions as Ct, WxDropdownItem as Wt, useElementWidth as Lt, WxHeading as At, WxButton as Z, WxIcon as Ve, WxTabs as zt, WxCard as Se, WxRichText as Vt, useLocales as at, WxAlert as be, WxResult as Et, useResponsiveShell as Ut, shellLayoutFor as Rt, WxToaster as Nt, WebxUI as Bt, dateLocaleKey as It, localesKey as Pt, useModal as Dt, WxDialog as nt, WxFormItem as Mt, WxSpace as Ft, createModal as Ot, WxSkeleton as re, WxEmpty as lt, WxTooltip as ot, toast as D, confirm as he, localizedValue as Ht, WxBreadcrumb as jt, WxBreadcrumbItem as Pe, WxActionBar as Kt, WxPopover as qt, WxAvatar as Yt, WxTextarea as De } from "@webx-ui/core";
4
+ import { watchSystemTheme as Xt, applyTheme as Gt, systemTheme as Jt } from "@webx-ui/tokens";
5
+ import { WxScreenRenderer as Qt } from "@webx-ui/schema";
6
+ const we = /* @__PURE__ */ Symbol("webx-i18n");
7
+ function Zt() {
8
+ const e = ne(we, null);
9
9
  if (e === null)
10
10
  throw new Error("useI18n() was called outside a panel created by createAdmin().");
11
11
  return e;
12
12
  }
13
- function V(e) {
14
- const t = te(ce, null);
15
- return t === null ? ge().scope(e) : t.scope(e);
13
+ function P(e) {
14
+ const t = ne(we, null);
15
+ return t === null ? Ee().scope(e) : t.scope(e);
16
16
  }
17
- function Rt(e, t) {
18
- e.provide(ce, t);
17
+ function ea(e, t) {
18
+ e.provide(we, t);
19
19
  }
20
- function ge(e = {}) {
21
- const t = e.fallback ?? "en", n = ue({
20
+ function Ee(e = {}) {
21
+ const t = e.fallback ?? "en", a = pe({
22
22
  locale: e.locale ?? t,
23
23
  fallback: t,
24
24
  panelLocales: [],
25
25
  contentLocales: []
26
- }), a = {}, i = ue({ value: {} });
27
- function s(r, u, d) {
28
- let v = r[u]?.[d[0] ?? ""];
29
- for (const m of d.slice(1)) {
30
- if (typeof v != "object" || v === null)
26
+ }), l = {}, i = pe({ value: {} });
27
+ function s(r, u, c) {
28
+ let h = r[u]?.[c[0] ?? ""];
29
+ for (const m of c.slice(1)) {
30
+ if (typeof h != "object" || h === null)
31
31
  return null;
32
- v = v[m];
32
+ h = h[m];
33
33
  }
34
- return typeof v == "string" ? v : null;
34
+ return typeof h == "string" ? h : null;
35
35
  }
36
- function l(r, u, d) {
37
- const [v, m] = u.includes("::") ? u.split("::", 2) : [r, u], p = m.split("."), c = s(i.value, v, p) ?? s(a, v, p) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
36
+ function o(r, u, c) {
37
+ const [h, m] = u.includes("::") ? u.split("::", 2) : [r, u], v = m.split("."), d = s(i.value, h, v) ?? s(l, h, v) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
38
38
  // label says nothing to anybody trying to fix it.
39
39
  u;
40
- return d === void 0 ? c : Ut(c, d);
40
+ return c === void 0 ? d : ta(d, c);
41
41
  }
42
42
  return {
43
- state: n,
43
+ state: a,
44
44
  defaults(r, u) {
45
- a[r] = { ...a[r], ...u };
45
+ l[r] = { ...l[r], ...u };
46
46
  },
47
- load(r, u, d) {
48
- i.value = r ?? {}, n.locale = u ?? n.locale, d !== void 0 && (n.fallback = d);
47
+ load(r, u, c) {
48
+ i.value = r ?? {}, a.locale = u ?? a.locale, c !== void 0 && (a.fallback = c);
49
49
  },
50
50
  scope(r) {
51
- return (u, d) => l(r, u, d);
51
+ return (u, c) => o(r, u, c);
52
52
  },
53
- t: (r, u) => l("", r, u)
53
+ t: (r, u) => o("", r, u)
54
54
  };
55
55
  }
56
- function Ut(e, t) {
57
- let n = e;
58
- for (const [a, i] of Object.entries(t))
59
- n = n.replaceAll(`:${a}`, String(i));
60
- return n;
56
+ function ta(e, t) {
57
+ let a = e;
58
+ for (const [l, i] of Object.entries(t))
59
+ a = a.replaceAll(`:${l}`, String(i));
60
+ return a;
61
61
  }
62
- function Et() {
62
+ function xe(e, t) {
63
+ const a = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`, l = (i) => i.data;
64
+ return {
65
+ list: (i = {}) => {
66
+ const s = new URLSearchParams();
67
+ return i.q && s.set("q", i.q), i.visible && s.set("visible", "1"), e.http.get(s.size > 0 ? `${a}?${s}` : a);
68
+ },
69
+ create: (i) => e.http.post(a, i).then(l),
70
+ get: (i) => e.http.get(`${a}/${i}`).then(l),
71
+ save: (i, s) => e.http.put(`${a}/${i}`, { values: s }).then(l),
72
+ remove: (i) => e.http.delete(`${a}/${i}`).then(() => {
73
+ }),
74
+ restore: (i) => e.http.post(`${a}/${i}/restore`, {}).then(l),
75
+ reorder: (i) => e.http.post(`${a}/reorder`, { ids: i }).then(() => {
76
+ })
77
+ };
78
+ }
79
+ function aa(e, t, a, l = null) {
80
+ const i = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`;
81
+ return e.http.post(`${i}/reorder`, l === null ? { ids: a } : { ids: a, category: l }).then(() => {
82
+ });
83
+ }
84
+ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field__name" }, oa = /* @__PURE__ */ N({
85
+ name: "WxCategoriesField",
86
+ __name: "CategoriesField",
87
+ props: /* @__PURE__ */ oe({
88
+ source: {},
89
+ main: { type: Boolean, default: !0 },
90
+ disabled: { type: Boolean, default: !1 },
91
+ mainText: { default: void 0 },
92
+ addText: { default: void 0 },
93
+ removeText: { default: void 0 },
94
+ emptyText: { default: void 0 },
95
+ noneLeftText: { default: void 0 }
96
+ }, {
97
+ modelValue: { default: () => [] },
98
+ modelModifiers: {}
99
+ }),
100
+ emits: ["update:modelValue"],
101
+ setup(e) {
102
+ const t = e, a = ue(e, "modelValue"), l = X(), i = P("webx-admin"), s = W([]);
103
+ ee(
104
+ () => t.source,
105
+ async (v) => {
106
+ try {
107
+ const d = await xe(l, v).list();
108
+ s.value = d.data.map((w) => ({ id: w.id, name: w.name }));
109
+ } catch {
110
+ s.value = [];
111
+ }
112
+ },
113
+ { immediate: !0 }
114
+ );
115
+ const o = x(() => Array.isArray(a.value) ? a.value : []), r = x(() => new Map(s.value.map((v) => [v.id, v.name]))), u = x({
116
+ get: () => o.value.map((v) => ({ id: v, name: r.value.get(v) ?? `#${v}` })),
117
+ set: (v) => {
118
+ a.value = v.map((d) => d.id);
119
+ }
120
+ }), c = x(
121
+ () => s.value.filter((v) => !o.value.includes(v.id)).map((v) => ({ label: v.name, value: v.id }))
122
+ );
123
+ function h(v) {
124
+ typeof v != "number" || o.value.includes(v) || (a.value = [...o.value, v]);
125
+ }
126
+ function m(v) {
127
+ a.value = o.value.filter((d) => d !== v);
128
+ }
129
+ return (v, d) => (p(), T("div", na, [
130
+ b(n(et), {
131
+ modelValue: u.value,
132
+ "onUpdate:modelValue": d[0] || (d[0] = (w) => u.value = w),
133
+ plain: "",
134
+ size: "sm",
135
+ "item-key": "id",
136
+ "item-label": "name",
137
+ disabled: t.disabled,
138
+ "empty-text": t.emptyText ?? n(i)("categories.field-empty")
139
+ }, {
140
+ default: g(({ item: w, index: f }) => [
141
+ O("span", la, L(w.name), 1),
142
+ t.main && f === 0 ? (p(), $(n(ze), {
143
+ key: 0,
144
+ type: "primary"
145
+ }, {
146
+ default: g(() => [
147
+ V(L(t.mainText ?? n(i)("categories.field-main")), 1)
148
+ ]),
149
+ _: 1
150
+ })) : U("", !0)
151
+ ]),
152
+ actions: g(({ item: w }) => [
153
+ b(n(se), {
154
+ type: "remove",
155
+ size: "sm",
156
+ disabled: t.disabled,
157
+ title: t.removeText ?? n(i)("categories.field-remove"),
158
+ onClick: (f) => m(w.id)
159
+ }, null, 8, ["disabled", "title", "onClick"])
160
+ ]),
161
+ _: 1
162
+ }, 8, ["modelValue", "disabled", "empty-text"]),
163
+ b(n(tt), {
164
+ "model-value": null,
165
+ options: c.value,
166
+ placeholder: t.addText ?? n(i)("categories.field-add"),
167
+ disabled: t.disabled || c.value.length === 0,
168
+ "empty-text": t.noneLeftText ?? n(i)("categories.field-none-left"),
169
+ filterable: "",
170
+ teleport: "",
171
+ "aria-label": t.addText ?? n(i)("categories.field-add"),
172
+ "onUpdate:modelValue": h
173
+ }, null, 8, ["options", "placeholder", "disabled", "empty-text", "aria-label"])
174
+ ]));
175
+ }
176
+ }), Y = (e, t) => {
177
+ const a = e.__vccOpts || e;
178
+ for (const [l, i] of t)
179
+ a[l] = i;
180
+ return a;
181
+ }, sa = /* @__PURE__ */ Y(oa, [["__scopeId", "data-v-640cd836"]]);
182
+ function ia() {
63
183
  return {
64
184
  target: "entity",
65
185
  entity_type: null,
@@ -70,31 +190,31 @@ function Et() {
70
190
  rel: []
71
191
  };
72
192
  }
73
- function Bt(e) {
74
- const t = `${e.apiPath}/links`, n = (a) => a.data;
193
+ function ra(e) {
194
+ const t = `${e.apiPath}/links`, a = (l) => l.data;
75
195
  return {
76
- sources: () => e.http.get(`${t}/sources`).then(n),
77
- search: (a, i, s) => e.http.get(`${t}/search`, { query: { type: a, q: i, locale: s } }).then(n),
78
- resolve: (a, i) => e.http.post(`${t}/resolve`, { links: a, locale: i }).then(n),
79
- routes: () => e.http.get(`${t}/routes`).then(n)
196
+ sources: () => e.http.get(`${t}/sources`).then(a),
197
+ search: (l, i, s) => e.http.get(`${t}/search`, { query: { type: l, q: i, locale: s } }).then(a),
198
+ resolve: (l, i) => e.http.post(`${t}/resolve`, { links: l, locale: i }).then(a),
199
+ routes: () => e.http.get(`${t}/routes`).then(a)
80
200
  };
81
201
  }
82
- const Nt = { class: "wx-link-picker" }, Vt = {
202
+ const ua = { class: "wx-link-picker" }, da = {
83
203
  key: 0,
84
204
  class: "wx-link-picker__entity"
85
- }, It = {
205
+ }, ca = {
86
206
  key: 1,
87
207
  class: "wx-link-picker__url"
88
- }, Dt = {
208
+ }, ma = {
89
209
  key: 2,
90
210
  class: "wx-link-picker__hash"
91
- }, Mt = {
211
+ }, va = {
92
212
  key: 3,
93
213
  class: "wx-link-picker__attributes"
94
- }, Pt = { class: "wx-link-picker__rel" }, Ft = /* @__PURE__ */ E({
214
+ }, fa = { class: "wx-link-picker__rel" }, pa = /* @__PURE__ */ N({
95
215
  name: "WxLinkPicker",
96
216
  __name: "LinkPicker",
97
- props: /* @__PURE__ */ ee({
217
+ props: /* @__PURE__ */ oe({
98
218
  allowNone: { type: Boolean, default: !0 },
99
219
  attributes: { type: Boolean, default: !0 },
100
220
  disabled: { type: Boolean, default: !1 }
@@ -104,212 +224,207 @@ const Nt = { class: "wx-link-picker" }, Vt = {
104
224
  }),
105
225
  emits: ["update:modelValue"],
106
226
  setup(e) {
107
- const t = e, n = de(e, "modelValue"), a = q(), i = zt(), s = Bt(a), l = V("webx-admin"), r = C([]), u = C([]), d = C([]), v = C(!1), m = C(null), p = C(""), c = C(null);
108
- let _ = null;
109
- const h = x(() => n.value ?? Et()), b = x(() => {
110
- const y = [
111
- { value: "entity", label: l("links.target-entity") },
112
- { value: "url", label: l("links.target-url") }
227
+ const t = e, a = ue(e, "modelValue"), l = X(), i = Zt(), s = ra(l), o = P("webx-admin"), r = W([]), u = W([]), c = W([]), h = W(!1), m = W(null), v = W(""), d = W(null);
228
+ let w = null;
229
+ const f = x(() => a.value ?? ia()), y = x(() => {
230
+ const _ = [
231
+ { value: "entity", label: o("links.target-entity") },
232
+ { value: "url", label: o("links.target-url") }
113
233
  ];
114
- return t.allowNone ? [...y, { value: "none", label: l("links.target-none") }] : y;
115
- }), w = x(
116
- () => r.value.map((y) => ({ value: y.type, label: y.title }))
117
- ), O = x(
118
- () => u.value.map((y) => ({
119
- value: y.title,
120
- description: He(y),
121
- id: y.id
234
+ return t.allowNone ? [..._, { value: "none", label: o("links.target-none") }] : _;
235
+ }), k = x(
236
+ () => r.value.map((_) => ({ value: _.type, label: _.title }))
237
+ ), M = x(
238
+ () => u.value.map((_) => ({
239
+ value: _.title,
240
+ description: z(_),
241
+ id: _.id
122
242
  }))
123
- ), Q = x(
124
- () => d.value.map((y) => ({ value: y.path, description: y.name }))
243
+ ), J = x(
244
+ () => c.value.map((_) => ({ value: _.path, description: _.name }))
125
245
  );
126
- je(async () => {
127
- r.value = await s.sources(), m.value = h.value.entity_type ?? r.value[0]?.type ?? null, await Promise.all([Y(), j()]);
128
- }), J(
129
- () => [h.value.entity_type, h.value.entity_id].join(":"),
246
+ Le(async () => {
247
+ r.value = await s.sources(), m.value = f.value.entity_type ?? r.value[0]?.type ?? null, await Promise.all([S(), B()]);
248
+ }), ee(
249
+ () => [f.value.entity_type, f.value.entity_id].join(":"),
130
250
  () => {
131
- Y();
251
+ S();
132
252
  }
133
253
  );
134
- async function Y() {
135
- const { entity_type: y, entity_id: A } = h.value;
136
- if (y === null || A === null) {
137
- c.value = null, p.value = "";
254
+ async function S() {
255
+ const { entity_type: _, entity_id: R } = f.value;
256
+ if (_ === null || R === null) {
257
+ d.value = null, v.value = "";
138
258
  return;
139
259
  }
140
- if (c.value?.id === A)
260
+ if (d.value?.id === R)
141
261
  return;
142
- const [U] = await s.resolve([{ type: y, id: A }], i.state.locale);
143
- c.value = U ?? null, p.value = U?.title ?? l("links.missing"), _ = p.value;
262
+ const [I] = await s.resolve([{ type: _, id: R }], i.state.locale);
263
+ d.value = I ?? null, v.value = I?.title ?? o("links.missing"), w = v.value;
144
264
  }
145
- async function j() {
146
- d.value = await s.routes();
265
+ async function B() {
266
+ c.value = await s.routes();
147
267
  }
148
- async function T(y) {
149
- if (y === _) {
150
- _ = null;
268
+ async function C(_) {
269
+ if (_ === w) {
270
+ w = null;
151
271
  return;
152
272
  }
153
- if (_ = null, m.value !== null) {
154
- v.value = !0;
273
+ if (w = null, m.value !== null) {
274
+ h.value = !0;
155
275
  try {
156
- u.value = await s.search(m.value, y, i.state.locale);
276
+ u.value = await s.search(m.value, _, i.state.locale);
157
277
  } finally {
158
- v.value = !1;
278
+ h.value = !1;
159
279
  }
160
280
  }
161
281
  }
162
- function B(y) {
163
- y !== void 0 && (n.value = { ...h.value, target: y });
282
+ function A(_) {
283
+ _ !== void 0 && (a.value = { ...f.value, target: _ });
164
284
  }
165
- function L(y) {
166
- m.value = y == null ? null : String(y), u.value = [], T("");
285
+ function E(_) {
286
+ m.value = _ == null ? null : String(_), u.value = [], C("");
167
287
  }
168
- function P(y) {
169
- const A = u.value.find((U) => U.id === y.id);
170
- A === void 0 || m.value === null || (c.value = A, p.value = A.title, n.value = { ...h.value, entity_type: m.value, entity_id: A.id });
288
+ function K(_) {
289
+ const R = u.value.find((I) => I.id === _.id);
290
+ R === void 0 || m.value === null || (d.value = R, v.value = R.title, a.value = { ...f.value, entity_type: m.value, entity_id: R.id });
171
291
  }
172
- function me() {
173
- c.value = null, p.value = "", u.value = [], n.value = { ...h.value, entity_type: null, entity_id: null };
292
+ function le() {
293
+ d.value = null, v.value = "", u.value = [], a.value = { ...f.value, entity_type: null, entity_id: null };
174
294
  }
175
- function fe(y) {
176
- n.value = { ...h.value, url: y === "" ? null : y };
295
+ function ie(_) {
296
+ a.value = { ...f.value, url: _ === "" ? null : _ };
177
297
  }
178
- function ae(y) {
179
- const A = (typeof y == "string" || typeof y == "number" ? String(y) : "").replace(/^#+/, "").trim();
180
- n.value = { ...h.value, hash: A === "" ? null : A };
298
+ function te(_) {
299
+ const R = (typeof _ == "string" || typeof _ == "number" ? String(_) : "").replace(/^#+/, "").trim();
300
+ a.value = { ...f.value, hash: R === "" ? null : R };
181
301
  }
182
- function Pe(y) {
183
- n.value = { ...h.value, new_tab: y };
302
+ function ke(_) {
303
+ a.value = { ...f.value, new_tab: _ };
184
304
  }
185
- function Fe(y, A) {
186
- const U = h.value.rel.filter((ve) => ve !== y);
187
- n.value = { ...h.value, rel: A ? [...U, y] : U };
305
+ function _e(_, R) {
306
+ const I = f.value.rel.filter(($e) => $e !== _);
307
+ a.value = { ...f.value, rel: R ? [...I, _] : I };
188
308
  }
189
- function He(y) {
190
- const A = [y.hint, y.url ?? void 0].filter(
191
- (U) => typeof U == "string" && U !== ""
309
+ function z(_) {
310
+ const R = [_.hint, _.url ?? void 0].filter(
311
+ (I) => typeof I == "string" && I !== ""
192
312
  );
193
- return y.available || A.push(l("links.unavailable")), A.join(" · ");
313
+ return _.available || R.push(o("links.unavailable")), R.join(" · ");
194
314
  }
195
- const Oe = ["nofollow", "sponsored", "ugc"];
196
- return (y, A) => (f(), $("div", Nt, [
197
- k(o(st), {
198
- options: b.value,
199
- "model-value": h.value.target,
315
+ const q = ["nofollow", "sponsored", "ugc"];
316
+ return (_, R) => (p(), T("div", ua, [
317
+ b(n(St), {
318
+ options: y.value,
319
+ "model-value": f.value.target,
200
320
  disabled: t.disabled,
201
- "aria-label": o(l)("links.target-entity"),
202
- "onUpdate:modelValue": B
321
+ "aria-label": n(o)("links.target-entity"),
322
+ "onUpdate:modelValue": A
203
323
  }, null, 8, ["options", "model-value", "disabled", "aria-label"]),
204
- h.value.target === "entity" ? (f(), $("div", Vt, [
205
- w.value.length > 1 ? (f(), S(o(ot), {
324
+ f.value.target === "entity" ? (p(), T("div", da, [
325
+ k.value.length > 1 ? (p(), $(n(tt), {
206
326
  key: 0,
207
327
  class: "wx-link-picker__section",
208
- options: w.value,
328
+ options: k.value,
209
329
  "model-value": m.value,
210
330
  disabled: t.disabled,
211
- "aria-label": o(l)("links.section"),
212
- "onUpdate:modelValue": L
213
- }, null, 8, ["options", "model-value", "disabled", "aria-label"])) : z("", !0),
214
- k(o(ye), {
331
+ "aria-label": n(o)("links.section"),
332
+ "onUpdate:modelValue": E
333
+ }, null, 8, ["options", "model-value", "disabled", "aria-label"])) : U("", !0),
334
+ b(n(Be), {
215
335
  class: "wx-link-picker__search",
216
- "model-value": p.value,
217
- options: O.value,
336
+ "model-value": v.value,
337
+ options: M.value,
218
338
  remote: "",
219
339
  clearable: "",
220
- loading: v.value,
221
- "loading-text": o(l)("links.searching"),
222
- "empty-text": o(l)("links.empty"),
223
- placeholder: o(l)("links.search"),
224
- "aria-label": o(l)("links.search"),
340
+ loading: h.value,
341
+ "loading-text": n(o)("links.searching"),
342
+ "empty-text": n(o)("links.empty"),
343
+ placeholder: n(o)("links.search"),
344
+ "aria-label": n(o)("links.search"),
225
345
  disabled: t.disabled,
226
- "onUpdate:modelValue": A[0] || (A[0] = (U) => p.value = U),
227
- onSearch: T,
228
- onSelect: P,
229
- onClear: me
346
+ "onUpdate:modelValue": R[0] || (R[0] = (I) => v.value = I),
347
+ onSearch: C,
348
+ onSelect: K,
349
+ onClear: le
230
350
  }, null, 8, ["model-value", "options", "loading", "loading-text", "empty-text", "placeholder", "aria-label", "disabled"])
231
- ])) : h.value.target === "url" ? (f(), $("div", It, [
232
- k(o(ye), {
233
- "model-value": h.value.url ?? "",
234
- options: Q.value,
351
+ ])) : f.value.target === "url" ? (p(), T("div", ca, [
352
+ b(n(Be), {
353
+ "model-value": f.value.url ?? "",
354
+ options: J.value,
235
355
  clearable: "",
236
356
  "open-on-focus": "",
237
- "empty-text": o(l)("links.url-routes"),
238
- placeholder: o(l)("links.url-placeholder"),
239
- "aria-label": o(l)("links.url-label"),
357
+ "empty-text": n(o)("links.url-routes"),
358
+ placeholder: n(o)("links.url-placeholder"),
359
+ "aria-label": n(o)("links.url-label"),
240
360
  disabled: t.disabled,
241
- "onUpdate:modelValue": fe
361
+ "onUpdate:modelValue": ie
242
362
  }, null, 8, ["model-value", "options", "empty-text", "placeholder", "aria-label", "disabled"])
243
- ])) : z("", !0),
244
- h.value.target !== "none" ? (f(), $("label", Dt, [
245
- k(o(H), {
363
+ ])) : U("", !0),
364
+ f.value.target !== "none" ? (p(), T("label", ma, [
365
+ b(n(G), {
246
366
  size: "sm",
247
367
  tone: "muted"
248
368
  }, {
249
369
  default: g(() => [
250
- R(W(o(l)("links.hash")), 1)
370
+ V(L(n(o)("links.hash")), 1)
251
371
  ]),
252
372
  _: 1
253
373
  }),
254
- A[2] || (A[2] = M("span", {
374
+ R[2] || (R[2] = O("span", {
255
375
  class: "wx-link-picker__sign",
256
376
  "aria-hidden": "true"
257
377
  }, "#", -1)),
258
- k(o(Ce), {
259
- "model-value": h.value.hash ?? "",
260
- placeholder: o(l)("links.hash-placeholder"),
261
- "aria-label": o(l)("links.hash"),
378
+ b(n(ye), {
379
+ "model-value": f.value.hash ?? "",
380
+ placeholder: n(o)("links.hash-placeholder"),
381
+ "aria-label": n(o)("links.hash"),
262
382
  disabled: t.disabled,
263
383
  clearable: "",
264
- "onUpdate:modelValue": ae
384
+ "onUpdate:modelValue": te
265
385
  }, null, 8, ["model-value", "placeholder", "aria-label", "disabled"])
266
- ])) : z("", !0),
267
- t.attributes && h.value.target !== "none" ? (f(), $("div", Mt, [
268
- k(o(we), {
269
- "model-value": h.value.new_tab,
386
+ ])) : U("", !0),
387
+ t.attributes && f.value.target !== "none" ? (p(), T("div", va, [
388
+ b(n(Ie), {
389
+ "model-value": f.value.new_tab,
270
390
  disabled: t.disabled,
271
- "onUpdate:modelValue": A[1] || (A[1] = (U) => Pe(U))
391
+ "onUpdate:modelValue": R[1] || (R[1] = (I) => ke(I))
272
392
  }, {
273
393
  default: g(() => [
274
- R(W(o(l)("links.new-tab")), 1)
394
+ V(L(n(o)("links.new-tab")), 1)
275
395
  ]),
276
396
  _: 1
277
397
  }, 8, ["model-value", "disabled"]),
278
- M("div", Pt, [
279
- k(o(H), {
398
+ O("div", fa, [
399
+ b(n(G), {
280
400
  size: "sm",
281
401
  tone: "muted"
282
402
  }, {
283
403
  default: g(() => [
284
- R(W(o(l)("links.rel")), 1)
404
+ V(L(n(o)("links.rel")), 1)
285
405
  ]),
286
406
  _: 1
287
407
  }),
288
- (f(), $(D, null, K(Oe, (U) => k(o(we), {
289
- key: U,
290
- "model-value": h.value.rel.includes(U),
408
+ (p(), T(H, null, Q(q, (I) => b(n(Ie), {
409
+ key: I,
410
+ "model-value": f.value.rel.includes(I),
291
411
  disabled: t.disabled,
292
- "onUpdate:modelValue": (ve) => Fe(U, ve)
412
+ "onUpdate:modelValue": ($e) => _e(I, $e)
293
413
  }, {
294
414
  default: g(() => [
295
- R(W(o(l)(`links.rel-${U}`)), 1)
415
+ V(L(n(o)(`links.rel-${I}`)), 1)
296
416
  ]),
297
417
  _: 2
298
418
  }, 1032, ["model-value", "disabled", "onUpdate:modelValue"])), 64))
299
419
  ])
300
- ])) : z("", !0)
420
+ ])) : U("", !0)
301
421
  ]));
302
422
  }
303
- }), F = (e, t) => {
304
- const n = e.__vccOpts || e;
305
- for (const [a, i] of t)
306
- n[a] = i;
307
- return n;
308
- }, Ht = /* @__PURE__ */ F(Ft, [["__scopeId", "data-v-e54022e5"]]), Ot = /* @__PURE__ */ E({
423
+ }), ha = /* @__PURE__ */ Y(pa, [["__scopeId", "data-v-e54022e5"]]), ga = /* @__PURE__ */ N({
309
424
  name: "WxLinkField",
310
425
  inheritAttrs: !1,
311
426
  __name: "LinkField",
312
- props: /* @__PURE__ */ ee({
427
+ props: /* @__PURE__ */ oe({
313
428
  allowNone: { type: Boolean, default: !0 },
314
429
  attributes: { type: Boolean, default: !0 },
315
430
  disabled: { type: Boolean, default: !1 }
@@ -319,17 +434,17 @@ const Nt = { class: "wx-link-picker" }, Vt = {
319
434
  }),
320
435
  emits: ["update:modelValue"],
321
436
  setup(e) {
322
- const t = e, n = de(e, "modelValue");
323
- return (a, i) => (f(), S(Ht, Te({
324
- modelValue: n.value,
325
- "onUpdate:modelValue": i[0] || (i[0] = (s) => n.value = s)
326
- }, a.$attrs, {
437
+ const t = e, a = ue(e, "modelValue");
438
+ return (l, i) => (p(), $(ha, je({
439
+ modelValue: a.value,
440
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s)
441
+ }, l.$attrs, {
327
442
  "allow-none": t.allowNone,
328
443
  attributes: t.attributes,
329
444
  disabled: t.disabled
330
445
  }), null, 16, ["modelValue", "allow-none", "attributes", "disabled"]));
331
446
  }
332
- }), jt = /* @__PURE__ */ E({
447
+ }), ya = /* @__PURE__ */ N({
333
448
  __name: "BackButton",
334
449
  props: {
335
450
  to: {},
@@ -337,21 +452,21 @@ const Nt = { class: "wx-link-picker" }, Vt = {
337
452
  size: { default: "sm" }
338
453
  },
339
454
  setup(e) {
340
- const t = e, n = V("webx-admin"), a = x(() => t.label ?? n("editor.back"));
341
- return (i, s) => (f(), S(o(ne), {
455
+ const t = e, a = P("webx-admin"), l = x(() => t.label ?? a("editor.back"));
456
+ return (i, s) => (p(), $(n(se), {
342
457
  icon: "arrow-left",
343
458
  class: "wx-back-button",
344
- as: o(tt),
459
+ as: n(kt),
345
460
  to: e.to,
346
- title: a.value,
461
+ title: l.value,
347
462
  size: e.size,
348
463
  "tooltip-side": "bottom"
349
464
  }, null, 8, ["as", "to", "title", "size"]));
350
465
  }
351
- }), Kt = {
466
+ }), ba = {
352
467
  key: 0,
353
468
  class: "wx-dropdown__divider"
354
- }, qt = /* @__PURE__ */ E({
469
+ }, wa = /* @__PURE__ */ N({
355
470
  __name: "RowMenu",
356
471
  props: {
357
472
  actions: {},
@@ -359,36 +474,36 @@ const Nt = { class: "wx-link-picker" }, Vt = {
359
474
  size: { default: "sm" }
360
475
  },
361
476
  setup(e) {
362
- const t = V("webx-admin"), n = e, a = x(() => [
363
- ...n.actions.filter((s) => !s.danger),
364
- ...n.actions.filter((s) => s.danger)
477
+ const t = P("webx-admin"), a = e, l = x(() => [
478
+ ...a.actions.filter((s) => !s.danger),
479
+ ...a.actions.filter((s) => s.danger)
365
480
  ]), i = x(() => {
366
- const s = a.value.find((l) => l.danger);
367
- return s && a.value[0] !== s ? s.key : null;
481
+ const s = l.value.find((o) => o.danger);
482
+ return s && l.value[0] !== s ? s.key : null;
368
483
  });
369
- return (s, l) => a.value.length > 0 ? (f(), S(o(it), {
484
+ return (s, o) => l.value.length > 0 ? (p(), $(n(Ct), {
370
485
  key: 0,
371
486
  class: "wx-row-menu",
372
487
  collapse: "always",
373
488
  align: "end",
374
489
  size: e.size,
375
490
  "aria-label": e.label,
376
- onClick: l[0] || (l[0] = Le(() => {
491
+ onClick: o[0] || (o[0] = Ke(() => {
377
492
  }, ["stop"]))
378
493
  }, {
379
494
  trigger: g(() => [
380
- k(o(ne), {
495
+ b(n(se), {
381
496
  type: "more",
382
497
  size: e.size,
383
- title: o(t)("editor.more")
498
+ title: n(t)("editor.more")
384
499
  }, null, 8, ["size", "title"])
385
500
  ]),
386
501
  collapsed: g(() => [
387
- (f(!0), $(D, null, K(a.value, (r) => (f(), $(D, {
502
+ (p(!0), T(H, null, Q(l.value, (r) => (p(), T(H, {
388
503
  key: r.key
389
504
  }, [
390
- r.key === i.value ? (f(), $("hr", Kt)) : z("", !0),
391
- k(o(rt), {
505
+ r.key === i.value ? (p(), T("hr", ba)) : U("", !0),
506
+ b(n(Wt), {
392
507
  icon: r.icon,
393
508
  tone: r.danger ? "danger" : "default",
394
509
  href: r.href,
@@ -397,22 +512,22 @@ const Nt = { class: "wx-link-picker" }, Vt = {
397
512
  onClick: (u) => r.run?.()
398
513
  }, {
399
514
  default: g(() => [
400
- R(W(r.label), 1)
515
+ V(L(r.label), 1)
401
516
  ]),
402
517
  _: 2
403
518
  }, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
404
519
  ], 64))), 128))
405
520
  ]),
406
521
  _: 1
407
- }, 8, ["size", "aria-label"])) : z("", !0);
522
+ }, 8, ["size", "aria-label"])) : U("", !0);
408
523
  }
409
- }), Ee = /* @__PURE__ */ F(qt, [["__scopeId", "data-v-cab01f7f"]]), Yt = ["data-level"], Xt = {
524
+ }), Ue = /* @__PURE__ */ Y(wa, [["__scopeId", "data-v-cab01f7f"]]), xa = ["data-level"], ka = {
410
525
  key: 0,
411
526
  class: "wx-screen-head__trail"
412
- }, Gt = { class: "wx-screen-head__name" }, Jt = {
527
+ }, _a = { class: "wx-screen-head__name" }, $a = {
413
528
  key: 4,
414
529
  class: "wx-screen-head__actions"
415
- }, Qt = /* @__PURE__ */ E({
530
+ }, Ta = /* @__PURE__ */ N({
416
531
  __name: "ScreenHead",
417
532
  props: {
418
533
  title: { default: void 0 },
@@ -426,57 +541,57 @@ const Nt = { class: "wx-link-picker" }, Vt = {
426
541
  },
427
542
  emits: ["back"],
428
543
  setup(e, { emit: t }) {
429
- const n = e, a = t, i = V("webx-admin"), s = Ke(), l = qe("root"), r = ut(l), u = x(() => r.value > 0 && r.value < n.collapseBelow), d = x(() => n.actions ?? []), v = x(
430
- () => d.value.find((h) => h.primary) ?? null
431
- ), m = x(() => u.value ? v.value ? [v.value] : [] : d.value.filter((h) => !h.menu && !h.danger)), p = x(() => u.value ? d.value.filter((h) => h !== v.value) : d.value.filter((h) => h.menu || h.danger)), c = x(
432
- () => n.back && n.back !== !0 ? n.back : null
433
- ), _ = x(
434
- () => m.value.length > 0 || p.value.length > 0 || !!s.extra
544
+ const a = e, l = t, i = P("webx-admin"), s = ht(), o = qe("root"), r = Lt(o), u = x(() => r.value > 0 && r.value < a.collapseBelow), c = x(() => a.actions ?? []), h = x(
545
+ () => c.value.find((f) => f.primary) ?? null
546
+ ), m = x(() => u.value ? h.value ? [h.value] : [] : c.value.filter((f) => !f.menu && !f.danger)), v = x(() => u.value ? c.value.filter((f) => f !== h.value) : c.value.filter((f) => f.menu || f.danger)), d = x(
547
+ () => a.back && a.back !== !0 ? a.back : null
548
+ ), w = x(
549
+ () => m.value.length > 0 || v.value.length > 0 || !!s.extra
435
550
  );
436
- return (h, b) => (f(), $("div", {
551
+ return (f, y) => (p(), T("div", {
437
552
  ref_key: "root",
438
- ref: l,
439
- class: G(["wx-screen-head", {
553
+ ref: o,
554
+ class: ae(["wx-screen-head", {
440
555
  "is-narrow": u.value,
441
556
  "has-button": m.value.length > 0,
442
- "has-trail": !!h.$slots.trail,
557
+ "has-trail": !!f.$slots.trail,
443
558
  "has-divider": e.divider
444
559
  }]),
445
560
  "data-level": e.level
446
561
  }, [
447
- h.$slots.trail ? (f(), $("div", Xt, [
448
- N(h.$slots, "trail", {}, void 0, !0)
449
- ])) : z("", !0),
450
- c.value ? (f(), S(jt, {
562
+ f.$slots.trail ? (p(), T("div", ka, [
563
+ F(f.$slots, "trail", {}, void 0, !0)
564
+ ])) : U("", !0),
565
+ d.value ? (p(), $(ya, {
451
566
  key: 1,
452
567
  class: "wx-screen-head__back",
453
- to: c.value,
568
+ to: d.value,
454
569
  label: e.backLabel,
455
570
  "tooltip-side": "bottom"
456
- }, null, 8, ["to", "label"])) : e.back ? (f(), S(o(ne), {
571
+ }, null, 8, ["to", "label"])) : e.back ? (p(), $(n(se), {
457
572
  key: 2,
458
573
  class: "wx-screen-head__back",
459
574
  icon: "arrow-left",
460
575
  size: "sm",
461
576
  "tooltip-side": "bottom",
462
- title: e.backLabel ?? o(i)("editor.back"),
463
- onClick: b[0] || (b[0] = (w) => a("back"))
464
- }, null, 8, ["title"])) : z("", !0),
465
- M("div", Gt, [
466
- e.title ? (f(), S(o(dt), {
577
+ title: e.backLabel ?? n(i)("editor.back"),
578
+ onClick: y[0] || (y[0] = (k) => l("back"))
579
+ }, null, 8, ["title"])) : U("", !0),
580
+ O("div", _a, [
581
+ e.title ? (p(), $(n(At), {
467
582
  key: 0,
468
583
  level: e.level,
469
584
  truncate: "",
470
585
  class: "wx-screen-head__title"
471
586
  }, {
472
587
  default: g(() => [
473
- R(W(e.title), 1)
588
+ V(L(e.title), 1)
474
589
  ]),
475
590
  _: 1
476
- }, 8, ["level"])) : z("", !0),
477
- N(h.$slots, "title-after", {}, void 0, !0)
591
+ }, 8, ["level"])) : U("", !0),
592
+ F(f.$slots, "title-after", {}, void 0, !0)
478
593
  ]),
479
- e.subtitle || h.$slots.subtitle ? (f(), S(o(H), {
594
+ e.subtitle || f.$slots.subtitle ? (p(), $(n(G), {
480
595
  key: 3,
481
596
  class: "wx-screen-head__subtitle",
482
597
  size: "sm",
@@ -484,53 +599,53 @@ const Nt = { class: "wx-link-picker" }, Vt = {
484
599
  truncate: ""
485
600
  }, {
486
601
  default: g(() => [
487
- N(h.$slots, "subtitle", {}, () => [
488
- R(W(e.subtitle), 1)
602
+ F(f.$slots, "subtitle", {}, () => [
603
+ V(L(e.subtitle), 1)
489
604
  ], !0)
490
605
  ]),
491
606
  _: 3
492
- })) : z("", !0),
493
- _.value ? (f(), $("div", Jt, [
494
- N(h.$slots, "extra", {}, void 0, !0),
495
- (f(!0), $(D, null, K(m.value, (w) => (f(), S(o(Z), {
496
- key: w.key,
497
- class: G(["wx-screen-head__button", { "is-primary": w.primary }]),
498
- type: w.primary ? "primary" : "default",
499
- variant: w.primary ? "solid" : w.variant ?? "outline",
500
- loading: w.loading,
501
- disabled: w.disabled,
502
- href: w.href,
503
- target: w.href ? w.target ?? "_blank" : void 0,
504
- rel: w.href ? "noopener" : void 0,
505
- onClick: (O) => w.run?.()
607
+ })) : U("", !0),
608
+ w.value ? (p(), T("div", $a, [
609
+ F(f.$slots, "extra", {}, void 0, !0),
610
+ (p(!0), T(H, null, Q(m.value, (k) => (p(), $(n(Z), {
611
+ key: k.key,
612
+ class: ae(["wx-screen-head__button", { "is-primary": k.primary }]),
613
+ type: k.primary ? "primary" : "default",
614
+ variant: k.primary ? "solid" : k.variant ?? "outline",
615
+ loading: k.loading,
616
+ disabled: k.disabled,
617
+ href: k.href,
618
+ target: k.href ? k.target ?? "_blank" : void 0,
619
+ rel: k.href ? "noopener" : void 0,
620
+ onClick: (M) => k.run?.()
506
621
  }, Ae({
507
622
  default: g(() => [
508
- R(" " + W(w.label), 1)
623
+ V(" " + L(k.label), 1)
509
624
  ]),
510
625
  _: 2
511
626
  }, [
512
- w.icon ? {
627
+ k.icon ? {
513
628
  name: "icon",
514
629
  fn: g(() => [
515
- k(o(ze), {
516
- name: w.icon
630
+ b(n(Ve), {
631
+ name: k.icon
517
632
  }, null, 8, ["name"])
518
633
  ]),
519
634
  key: "0"
520
635
  } : void 0
521
636
  ]), 1032, ["class", "type", "variant", "loading", "disabled", "href", "target", "rel", "onClick"]))), 128)),
522
- p.value.length > 0 ? (f(), S(Ee, {
637
+ v.value.length > 0 ? (p(), $(Ue, {
523
638
  key: 0,
524
- actions: p.value,
639
+ actions: v.value,
525
640
  size: "lg",
526
- label: e.title ?? o(i)("editor.more")
527
- }, null, 8, ["actions", "label"])) : z("", !0)
528
- ])) : z("", !0)
529
- ], 10, Yt));
641
+ label: e.title ?? n(i)("editor.more")
642
+ }, null, 8, ["actions", "label"])) : U("", !0)
643
+ ])) : U("", !0)
644
+ ], 10, xa));
530
645
  }
531
- }), Zt = /* @__PURE__ */ F(Qt, [["__scopeId", "data-v-e27d184e"]]), en = ["data-wx-fill"], tn = /* @__PURE__ */ E({
646
+ }), st = /* @__PURE__ */ Y(Ta, [["__scopeId", "data-v-e27d184e"]]), Sa = ["data-wx-fill"], Ca = /* @__PURE__ */ N({
532
647
  __name: "ListScreen",
533
- props: /* @__PURE__ */ ee({
648
+ props: /* @__PURE__ */ oe({
534
649
  title: { default: void 0 },
535
650
  subtitle: { default: void 0 },
536
651
  back: { default: void 0 },
@@ -547,12 +662,12 @@ const Nt = { class: "wx-link-picker" }, Vt = {
547
662
  }),
548
663
  emits: ["update:view"],
549
664
  setup(e) {
550
- const t = de(e, "view");
551
- return (n, a) => (f(), $("div", {
552
- class: G(["wx-list-screen", { "is-fill": e.fill }]),
665
+ const t = ue(e, "view");
666
+ return (a, l) => (p(), T("div", {
667
+ class: ae(["wx-list-screen", { "is-fill": e.fill }]),
553
668
  "data-wx-fill": e.fill ? "" : void 0
554
669
  }, [
555
- e.title || e.actions || n.$slots.actions ? (f(), S(Zt, {
670
+ e.title || e.actions || a.$slots.actions ? (p(), $(st, {
556
671
  key: 0,
557
672
  class: "wx-list-screen__head",
558
673
  title: e.title,
@@ -562,196 +677,236 @@ const Nt = { class: "wx-link-picker" }, Vt = {
562
677
  actions: e.actions,
563
678
  "collapse-below": 480
564
679
  }, Ae({ _: 2 }, [
565
- n.$slots.actions ? {
680
+ a.$slots.actions ? {
566
681
  name: "extra",
567
682
  fn: g(() => [
568
- N(n.$slots, "actions", {}, void 0, !0)
683
+ F(a.$slots, "actions", {}, void 0, !0)
569
684
  ]),
570
685
  key: "0"
571
686
  } : void 0
572
- ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : z("", !0),
573
- e.views && e.views.length > 0 ? (f(), S(o(ct), {
687
+ ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : U("", !0),
688
+ e.views && e.views.length > 0 ? (p(), $(n(zt), {
574
689
  key: 1,
575
690
  modelValue: t.value,
576
- "onUpdate:modelValue": a[0] || (a[0] = (i) => t.value = i),
691
+ "onUpdate:modelValue": l[0] || (l[0] = (i) => t.value = i),
577
692
  class: "wx-list-screen__views",
578
693
  items: e.views,
579
694
  "collapse-below": e.collapseBelow,
580
695
  "aria-label": e.title
581
696
  }, {
582
697
  default: g(() => [
583
- e.card ? (f(), S(o(xe), {
698
+ e.card ? (p(), $(n(Se), {
584
699
  key: 0,
585
700
  class: "wx-list-screen__card",
586
701
  padding: e.padding
587
702
  }, {
588
703
  default: g(() => [
589
- N(n.$slots, "default", {}, void 0, !0)
704
+ F(a.$slots, "default", {}, void 0, !0)
590
705
  ]),
591
706
  _: 3
592
- }, 8, ["padding"])) : N(n.$slots, "default", {}, void 0, !0, 1)
707
+ }, 8, ["padding"])) : F(a.$slots, "default", {}, void 0, !0, 1)
593
708
  ]),
594
709
  _: 3
595
- }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (f(), $(D, { key: 2 }, [
596
- e.card ? (f(), S(o(xe), {
710
+ }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (p(), T(H, { key: 2 }, [
711
+ e.card ? (p(), $(n(Se), {
597
712
  key: 0,
598
713
  class: "wx-list-screen__card",
599
714
  padding: e.padding
600
715
  }, {
601
716
  default: g(() => [
602
- N(n.$slots, "default", {}, void 0, !0)
717
+ F(a.$slots, "default", {}, void 0, !0)
603
718
  ]),
604
719
  _: 3
605
- }, 8, ["padding"])) : N(n.$slots, "default", {}, void 0, !0, 1)
720
+ }, 8, ["padding"])) : F(a.$slots, "default", {}, void 0, !0, 1)
606
721
  ], 64))
607
- ], 10, en));
722
+ ], 10, Sa));
608
723
  }
609
- }), nn = /* @__PURE__ */ F(tn, [["__scopeId", "data-v-8c7e5ad1"]]), an = /* @__PURE__ */ E({
724
+ }), it = /* @__PURE__ */ Y(Ca, [["__scopeId", "data-v-8c7e5ad1"]]), Wa = /* @__PURE__ */ N({
610
725
  name: "WxRichTextField",
611
726
  inheritAttrs: !1,
612
727
  __name: "RichTextField",
613
728
  setup(e) {
614
- const t = q(), n = V("webx-admin"), a = x(() => t.pickImage ?? void 0), i = x(() => ({
615
- bold: n("rich-text.bold"),
616
- italic: n("rich-text.italic"),
617
- strike: n("rich-text.strike"),
618
- code: n("rich-text.code"),
619
- h2: n("rich-text.h2"),
620
- h3: n("rich-text.h3"),
621
- h4: n("rich-text.h4"),
622
- bulletList: n("rich-text.bullet-list"),
623
- orderedList: n("rich-text.ordered-list"),
624
- blockquote: n("rich-text.blockquote"),
625
- hr: n("rich-text.hr"),
626
- link: n("rich-text.link"),
627
- table: n("rich-text.table"),
628
- image: n("rich-text.image"),
629
- youtube: n("rich-text.youtube"),
630
- undo: n("rich-text.undo"),
631
- redo: n("rich-text.redo"),
632
- addRowAfter: n("rich-text.row-below"),
633
- addRowBefore: n("rich-text.row-above"),
634
- addColumnAfter: n("rich-text.column-after"),
635
- addColumnBefore: n("rich-text.column-before"),
636
- deleteRow: n("rich-text.delete-row"),
637
- deleteColumn: n("rich-text.delete-column"),
638
- mergeOrSplit: n("rich-text.merge-cells"),
639
- deleteTable: n("rich-text.delete-table"),
640
- toolbar: n("rich-text.toolbar"),
641
- linkAddress: n("rich-text.link-address"),
642
- youtubeAddress: n("rich-text.youtube-address"),
643
- apply: n("rich-text.apply"),
644
- cancel: n("rich-text.cancel"),
645
- uploading: n("rich-text.uploading")
729
+ const t = X(), a = P("webx-admin"), l = x(() => t.pickImage ?? void 0), i = x(() => ({
730
+ bold: a("rich-text.bold"),
731
+ italic: a("rich-text.italic"),
732
+ strike: a("rich-text.strike"),
733
+ code: a("rich-text.code"),
734
+ h2: a("rich-text.h2"),
735
+ h3: a("rich-text.h3"),
736
+ h4: a("rich-text.h4"),
737
+ bulletList: a("rich-text.bullet-list"),
738
+ orderedList: a("rich-text.ordered-list"),
739
+ blockquote: a("rich-text.blockquote"),
740
+ hr: a("rich-text.hr"),
741
+ link: a("rich-text.link"),
742
+ table: a("rich-text.table"),
743
+ image: a("rich-text.image"),
744
+ youtube: a("rich-text.youtube"),
745
+ undo: a("rich-text.undo"),
746
+ redo: a("rich-text.redo"),
747
+ addRowAfter: a("rich-text.row-below"),
748
+ addRowBefore: a("rich-text.row-above"),
749
+ addColumnAfter: a("rich-text.column-after"),
750
+ addColumnBefore: a("rich-text.column-before"),
751
+ deleteRow: a("rich-text.delete-row"),
752
+ deleteColumn: a("rich-text.delete-column"),
753
+ mergeOrSplit: a("rich-text.merge-cells"),
754
+ deleteTable: a("rich-text.delete-table"),
755
+ toolbar: a("rich-text.toolbar"),
756
+ linkAddress: a("rich-text.link-address"),
757
+ youtubeAddress: a("rich-text.youtube-address"),
758
+ apply: a("rich-text.apply"),
759
+ cancel: a("rich-text.cancel"),
760
+ uploading: a("rich-text.uploading")
646
761
  }));
647
- return (s, l) => (f(), S(o(mt), Te(s.$attrs, {
762
+ return (s, o) => (p(), $(n(Vt), je(s.$attrs, {
648
763
  labels: i.value,
649
- "pick-image": a.value
764
+ "pick-image": l.value
650
765
  }), null, 16, ["labels", "pick-image"]));
651
766
  }
652
- }), ln = {
653
- "wx-list": { component: nn, kind: "layout", labelProp: "title" },
767
+ }), rt = /* @__PURE__ */ Symbol("wx-record-address");
768
+ function La(e) {
769
+ Ye(rt, e);
770
+ }
771
+ function Aa() {
772
+ return ne(rt, null);
773
+ }
774
+ const za = { class: "wx-slug" }, Va = { class: "wx-slug__prefix" }, Ea = /* @__PURE__ */ N({
775
+ name: "WxSlugField",
776
+ inheritAttrs: !1,
777
+ __name: "SlugField",
778
+ setup(e) {
779
+ const t = Aa(), a = at(), l = x(() => {
780
+ const o = t?.prefix.value ?? "";
781
+ return o === "" ? "/" : `/${o}/`;
782
+ }), i = x(() => {
783
+ const o = t?.values.value.slug;
784
+ return typeof o == "string" ? o : o?.[a.active.value] ?? "";
785
+ }), s = x(() => {
786
+ const o = t?.path.value;
787
+ return typeof o == "string" && i.value !== "" && `${l.value}${i.value}` != `/${o}`;
788
+ });
789
+ return (o, r) => (p(), T("div", za, [
790
+ b(n(ye), gt(yt(o.$attrs)), {
791
+ prefix: g(() => [
792
+ O("span", Va, L(l.value), 1)
793
+ ]),
794
+ _: 1
795
+ }, 16),
796
+ s.value && n(t) ? (p(), $(n(be), {
797
+ key: 0,
798
+ type: "info",
799
+ variant: "soft",
800
+ description: n(t).moving()
801
+ }, null, 8, ["description"])) : U("", !0)
802
+ ]));
803
+ }
804
+ }), Me = /* @__PURE__ */ Y(Ea, [["__scopeId", "data-v-5921c0dd"]]), Ua = {
805
+ "wx-list": { component: it, kind: "layout", labelProp: "title" },
654
806
  // Full width: an editor shares a row with nothing, and a form of two columns would give it
655
807
  // half a line to write a page of text in.
656
- "wx-rich-text": { component: an, kind: "field", wide: !0 },
808
+ "wx-rich-text": { component: Wa, kind: "field", wide: !0 },
657
809
  // Wide as well: a row of the picker is a segmented switch, a section and a search box, and half
658
810
  // a form's width leaves the search box too narrow to read a page title in.
659
- "wx-link": { component: Ot, kind: "field", wide: !0 }
660
- }, Be = /* @__PURE__ */ Symbol("webx-admin");
661
- function q() {
662
- const e = te(Be, null);
811
+ "wx-link": { component: ga, kind: "field", wide: !0 },
812
+ "wx-categories": { component: sa, kind: "field" },
813
+ "wx-slug": { component: Me, kind: "field" },
814
+ "wx-category-slug": { component: Me, kind: "field" }
815
+ }, ut = /* @__PURE__ */ Symbol("webx-admin");
816
+ function X() {
817
+ const e = ne(ut, null);
663
818
  if (e === null)
664
819
  throw new Error("useAdmin() was called outside a panel created by createAdmin().");
665
820
  return e;
666
821
  }
667
- function sn(e) {
668
- const t = ue({
822
+ function Ra(e) {
823
+ const t = pe({
669
824
  status: "loading",
670
825
  manifest: null,
671
826
  user: null,
672
827
  error: null
673
- }), n = x(() => {
674
- const c = t.manifest;
675
- if (c === null)
828
+ }), a = x(() => {
829
+ const d = t.manifest;
830
+ if (d === null)
676
831
  return [];
677
- const _ = [];
678
- for (const h of c.modules) {
679
- const b = e.modules.find((O) => O.id === h.id);
680
- if (b === void 0)
832
+ const w = [];
833
+ for (const f of d.modules) {
834
+ const y = e.modules.find((M) => M.id === f.id);
835
+ if (y === void 0)
681
836
  continue;
682
- const w = b.path ?? b.routes?.[0]?.path;
683
- w !== void 0 && _.push({
684
- id: h.id,
685
- title: h.title,
686
- icon: h.icon,
687
- path: w,
688
- group: h.group ?? null
837
+ const k = y.path ?? y.routes?.[0]?.path;
838
+ k !== void 0 && w.push({
839
+ id: f.id,
840
+ title: f.title,
841
+ icon: f.icon,
842
+ path: k,
843
+ group: f.group ?? null
689
844
  });
690
845
  }
691
- return _;
692
- }), a = x(() => {
693
- const c = t.manifest?.groups ?? [], _ = [], h = /* @__PURE__ */ new Map();
694
- for (const b of n.value)
695
- if (b.group !== null && c.some((w) => w.id === b.group)) {
696
- const w = h.get(b.group) ?? [];
697
- w.push(b), h.set(b.group, w);
846
+ return w;
847
+ }), l = x(() => {
848
+ const d = t.manifest?.groups ?? [], w = [], f = /* @__PURE__ */ new Map();
849
+ for (const y of a.value)
850
+ if (y.group !== null && d.some((k) => k.id === y.group)) {
851
+ const k = f.get(y.group) ?? [];
852
+ k.push(y), f.set(y.group, k);
698
853
  } else
699
- _.push(b);
854
+ w.push(y);
700
855
  return {
701
- top: _,
702
- groups: c.filter((b) => h.has(b.id)).map((b) => ({
703
- id: b.id,
704
- title: b.title,
705
- icon: b.icon ?? null,
706
- entries: h.get(b.id) ?? []
856
+ top: w,
857
+ groups: d.filter((y) => f.has(y.id)).map((y) => ({
858
+ id: y.id,
859
+ title: y.title,
860
+ icon: y.icon ?? null,
861
+ entries: f.get(y.id) ?? []
707
862
  }))
708
863
  };
709
- }), i = { ...ln };
710
- for (const c of e.modules)
711
- Object.assign(i, c.types);
864
+ }), i = { ...Ua };
865
+ for (const d of e.modules)
866
+ Object.assign(i, d.types);
712
867
  Object.assign(i, e.types);
713
- const s = e.modules.find((c) => c.pickImage !== void 0)?.pickImage, l = /* @__PURE__ */ new Map();
714
- async function r(c) {
715
- const _ = `${e.i18n.state.locale}:${c}`;
716
- let h = l.get(_);
717
- return h === void 0 && (h = e.http.get(`${e.apiPath}/screens/${c}`).then((b) => b.data.root).catch((b) => {
718
- throw l.delete(_), b;
719
- }), l.set(_, h)), h;
868
+ const s = e.modules.find((d) => d.pickImage !== void 0)?.pickImage, o = /* @__PURE__ */ new Map();
869
+ async function r(d) {
870
+ const w = `${e.i18n.state.locale}:${d}`;
871
+ let f = o.get(w);
872
+ return f === void 0 && (f = e.http.get(`${e.apiPath}/screens/${d}`).then((y) => y.data.root).catch((y) => {
873
+ throw o.delete(w), y;
874
+ }), o.set(w, f)), f;
720
875
  }
721
876
  let u = null;
722
- async function d() {
877
+ async function c() {
723
878
  t.status = "loading", t.error = null;
724
879
  try {
725
880
  if (u !== null && (t.user = await u(), m(t.user), t.user === null)) {
726
881
  t.manifest = null, t.status = "unauthenticated";
727
882
  return;
728
883
  }
729
- const c = await e.loadManifest();
730
- t.manifest = c, e.i18n.state.contentLocales = c.locales ?? [], e.i18n.state.panelLocales = c.panelLocales ?? e.i18n.state.panelLocales, c.locale !== void 0 && c.locale !== e.i18n.state.locale && await p(c.locale), t.status = "ready";
731
- } catch (c) {
732
- if (rn(c)) {
884
+ const d = await e.loadManifest();
885
+ t.manifest = d, e.i18n.state.contentLocales = d.locales ?? [], e.i18n.state.panelLocales = d.panelLocales ?? e.i18n.state.panelLocales, d.locale !== void 0 && d.locale !== e.i18n.state.locale && await v(d.locale), t.status = "ready";
886
+ } catch (d) {
887
+ if (Ba(d)) {
733
888
  t.manifest = null, t.user = null, t.status = "unauthenticated";
734
889
  return;
735
890
  }
736
- t.error = c instanceof Error ? c.message : String(c), t.status = "error";
891
+ t.error = d instanceof Error ? d.message : String(d), t.status = "error";
737
892
  }
738
893
  }
739
- async function v() {
894
+ async function h() {
740
895
  if (t.manifest !== null)
741
896
  try {
742
897
  t.manifest = await e.loadManifest();
743
898
  } catch {
744
899
  }
745
900
  }
746
- function m(c) {
747
- c !== null && e.theme?.adopt(c.theme);
901
+ function m(d) {
902
+ d !== null && e.theme?.adopt(d.theme);
748
903
  }
749
- async function p(c) {
904
+ async function v(d) {
750
905
  if (e.loadDictionary === void 0) {
751
- e.i18n.state.locale = c;
906
+ e.i18n.state.locale = d;
752
907
  return;
753
908
  }
754
- await e.loadDictionary(c), await v();
909
+ await e.loadDictionary(d), await h();
755
910
  }
756
911
  return {
757
912
  http: e.http,
@@ -760,100 +915,105 @@ function sn(e) {
760
915
  state: t,
761
916
  i18n: e.i18n,
762
917
  modules: e.modules,
763
- nav: n,
764
- groups: a,
918
+ nav: a,
919
+ groups: l,
765
920
  types: i,
766
921
  pickImage: s ?? null,
767
- reload: d,
768
- refreshManifest: v,
769
- setLocale: p,
770
- setUser(c) {
771
- t.user = c, m(c);
922
+ reload: c,
923
+ refreshManifest: h,
924
+ setLocale: v,
925
+ setUser(d) {
926
+ t.user = d, m(d);
772
927
  },
773
- useSessionLoader(c) {
774
- u = c;
928
+ useSessionLoader(d) {
929
+ u = d;
775
930
  },
776
- can(c) {
777
- const _ = t.user;
778
- return _ === null ? !1 : _.isSuper || _.permissions.includes(c);
931
+ can(d) {
932
+ const w = t.user;
933
+ return w === null ? !1 : w.isSuper || w.permissions.includes(d);
779
934
  },
780
935
  loadScreen: r,
781
- screenPatch(c) {
782
- return e.screens?.[c] ?? [];
936
+ screenPatch(d) {
937
+ return e.screens?.[d] ?? [];
783
938
  }
784
939
  };
785
940
  }
786
- function on(e, t) {
787
- e.provide(Be, t);
941
+ function Na(e, t) {
942
+ e.provide(ut, t);
788
943
  }
789
- function rn(e) {
944
+ function Ba(e) {
790
945
  return typeof e == "object" && e !== null && "status" in e && e.status === 401;
791
946
  }
792
- const un = /* @__PURE__ */ E({
947
+ const Ia = /* @__PURE__ */ N({
793
948
  __name: "AdminLanding",
794
949
  props: {
795
950
  landing: { default: null }
796
951
  },
797
952
  setup(e) {
798
- const t = e, n = q(), a = We(), i = V("webx-admin"), s = x(() => {
799
- const l = n.nav.value;
800
- return l.length === 0 ? null : ((t.landing === null ? void 0 : l.find((u) => u.path === t.landing)) ?? l[0])?.path ?? null;
953
+ const t = e, a = X(), l = ge(), i = P("webx-admin"), s = x(() => {
954
+ const o = a.nav.value;
955
+ return o.length === 0 ? null : ((t.landing === null ? void 0 : o.find((u) => u.path === t.landing)) ?? o[0])?.path ?? null;
801
956
  });
802
- return J(
957
+ return ee(
803
958
  s,
804
- (l) => {
805
- l !== null && a.replace(l);
959
+ (o) => {
960
+ o !== null && l.replace(o);
806
961
  },
807
962
  { immediate: !0 }
808
- ), (l, r) => s.value === null && o(n).state.status === "ready" ? (f(), S(o(ft), {
963
+ ), (o, r) => s.value === null && n(a).state.status === "ready" ? (p(), $(n(Et), {
809
964
  key: 0,
810
965
  status: "info",
811
- title: o(i)("shell.empty-title"),
812
- description: o(i)("shell.empty-description")
813
- }, null, 8, ["title", "description"])) : z("", !0);
966
+ title: n(i)("shell.empty-title"),
967
+ description: n(i)("shell.empty-description")
968
+ }, null, 8, ["title", "description"])) : U("", !0);
814
969
  }
815
- }), dn = /* @__PURE__ */ E({
970
+ }), Pa = /* @__PURE__ */ N({
816
971
  __name: "AdminNav",
817
972
  props: {
818
973
  collapsed: { type: Boolean }
819
974
  },
820
975
  emits: ["select"],
821
976
  setup(e, { emit: t }) {
822
- const n = t, a = q(), i = V("webx-admin"), s = We(), l = nt(), r = x({
823
- get: () => a.nav.value.find((d) => l.path.startsWith(d.path))?.id ?? "",
977
+ const a = t, l = X(), i = P("webx-admin"), s = ge(), o = Ze(), r = x({
978
+ /*
979
+ * The longest path that contains this one, on a segment boundary: a section may live inside
980
+ * another's path (`/services/categories` under `/services`), and the first match in the order
981
+ * of the menu would light up the outer one.
982
+ */
983
+ get: () => l.nav.value.filter((c) => o.path === c.path || o.path.startsWith(`${c.path}/`)).sort((c, h) => h.path.length - c.path.length)[0]?.id ?? "",
824
984
  set: (u) => {
825
- const d = a.nav.value.find((v) => v.id === u);
826
- d !== void 0 && s.push(d.path);
985
+ const c = l.nav.value.find((h) => h.id === u);
986
+ c !== void 0 && s.push(c.path);
827
987
  }
828
988
  });
829
- return (u, d) => {
830
- const v = I("wx-menu-item"), m = I("wx-submenu"), p = I("wx-menu");
831
- return f(), S(p, {
989
+ return (u, c) => {
990
+ const h = j("wx-menu-item"), m = j("wx-submenu"), v = j("wx-menu");
991
+ return p(), $(v, {
832
992
  modelValue: r.value,
833
- "onUpdate:modelValue": d[0] || (d[0] = (c) => r.value = c),
993
+ "onUpdate:modelValue": c[0] || (c[0] = (d) => r.value = d),
834
994
  collapsed: e.collapsed,
835
- label: o(i)("nav.sections"),
836
- onSelect: d[1] || (d[1] = (c) => n("select"))
995
+ label: n(i)("nav.sections"),
996
+ onSelect: c[1] || (c[1] = (d) => a("select"))
837
997
  }, {
838
998
  default: g(() => [
839
- (f(!0), $(D, null, K(o(a).groups.value.top, (c) => (f(), S(v, {
840
- key: c.id,
841
- value: c.id,
842
- icon: c.icon ?? void 0,
843
- label: c.title
999
+ (p(!0), T(H, null, Q(n(l).groups.value.top, (d) => (p(), $(h, {
1000
+ key: d.id,
1001
+ value: d.id,
1002
+ icon: d.icon ?? void 0,
1003
+ label: d.title
844
1004
  }, null, 8, ["value", "icon", "label"]))), 128)),
845
- (f(!0), $(D, null, K(o(a).groups.value.groups, (c) => (f(), S(m, {
846
- key: c.id,
847
- value: `group:${c.id}`,
848
- title: c.title,
849
- icon: c.icon ?? "gear"
1005
+ (p(!0), T(H, null, Q(n(l).groups.value.groups, (d) => (p(), $(m, {
1006
+ key: d.id,
1007
+ value: `group:${d.id}`,
1008
+ title: d.title,
1009
+ icon: d.icon ?? "gear"
850
1010
  }, {
851
1011
  default: g(() => [
852
- (f(!0), $(D, null, K(c.entries, (_) => (f(), S(v, {
853
- key: _.id,
854
- value: _.id,
855
- icon: _.icon ?? void 0,
856
- label: _.title
1012
+ (p(!0), T(H, null, Q(d.entries, (w) => (p(), $(h, {
1013
+ key: w.id,
1014
+ value: w.id,
1015
+ icon: w.icon ?? void 0,
1016
+ label: w.title
857
1017
  }, null, 8, ["value", "icon", "label"]))), 128))
858
1018
  ]),
859
1019
  _: 2
@@ -863,68 +1023,68 @@ const un = /* @__PURE__ */ E({
863
1023
  }, 8, ["modelValue", "collapsed", "label"]);
864
1024
  };
865
1025
  }
866
- }), cn = {
1026
+ }), Da = {
867
1027
  key: 0,
868
1028
  class: "wx-root wx-admin-plain"
869
- }, mn = {
1029
+ }, Ma = {
870
1030
  key: 1,
871
1031
  class: "wx-root wx-admin-plain"
872
- }, fn = {
1032
+ }, Fa = {
873
1033
  key: 2,
874
1034
  class: "wx-root wx-admin-plain"
875
- }, vn = ["src", "alt", "width", "height"], hn = ["src", "alt", "width", "height"], pn = ["src", "alt"], bn = { class: "wx-admin__user" }, gn = { class: "wx-admin__user wx-admin__user--drawer" }, yn = /* @__PURE__ */ E({
1035
+ }, Oa = ["src", "alt", "width", "height"], Ha = ["src", "alt", "width", "height"], ja = ["src", "alt"], Ka = { class: "wx-admin__user" }, qa = { class: "wx-admin__user wx-admin__user--drawer" }, Ya = /* @__PURE__ */ N({
876
1036
  __name: "AdminShell",
877
1037
  setup(e) {
878
- const t = q(), n = V("webx-admin"), a = C(null), { width: i, layout: s, collapsed: l, showAside: r, drawerOpen: u, toggle: d, close: v } = vt(
879
- a,
1038
+ const t = X(), a = P("webx-admin"), l = W(null), { width: i, layout: s, collapsed: o, showAside: r, drawerOpen: u, toggle: c, close: h } = Ut(
1039
+ l,
880
1040
  { persist: "webx-admin-shell" }
881
- ), m = x(() => t.state.manifest?.title ?? ""), p = x(() => t.state.manifest?.branding?.logo ?? null), c = x(() => t.state.manifest?.branding?.mark ?? null), _ = x(() => ht(i.value, null));
882
- return Ye(() => {
883
- typeof document > "u" || (document.documentElement.dataset.wxShell = _.value);
884
- }), Xe(() => {
1041
+ ), m = x(() => t.state.manifest?.title ?? ""), v = x(() => t.state.manifest?.branding?.logo ?? null), d = x(() => t.state.manifest?.branding?.mark ?? null), w = x(() => Rt(i.value, null));
1042
+ return bt(() => {
1043
+ typeof document > "u" || (document.documentElement.dataset.wxShell = w.value);
1044
+ }), wt(() => {
885
1045
  typeof document < "u" && delete document.documentElement.dataset.wxShell;
886
- }), (h, b) => {
887
- const w = I("router-view"), O = I("wx-loading"), Q = I("wx-button"), Y = I("wx-result"), j = I("wx-action"), T = I("wx-text"), B = I("wx-header"), L = I("wx-aside"), P = I("wx-main"), me = I("wx-container"), fe = I("wx-drawer");
888
- return f(), $(D, null, [
889
- k(o(pt)),
890
- o(t).state.status === "unauthenticated" ? (f(), $("div", cn, [
891
- k(w)
892
- ])) : o(t).state.status === "loading" ? (f(), $("div", mn, [
893
- k(O, {
894
- label: o(n)("shell.loading")
1046
+ }), (f, y) => {
1047
+ const k = j("router-view"), M = j("wx-loading"), J = j("wx-button"), S = j("wx-result"), B = j("wx-action"), C = j("wx-text"), A = j("wx-header"), E = j("wx-aside"), K = j("wx-main"), le = j("wx-container"), ie = j("wx-drawer");
1048
+ return p(), T(H, null, [
1049
+ b(n(Nt)),
1050
+ n(t).state.status === "unauthenticated" ? (p(), T("div", Da, [
1051
+ b(k)
1052
+ ])) : n(t).state.status === "loading" ? (p(), T("div", Ma, [
1053
+ b(M, {
1054
+ label: n(a)("shell.loading")
895
1055
  }, null, 8, ["label"])
896
- ])) : o(t).state.status === "error" ? (f(), $("div", fn, [
897
- k(Y, {
1056
+ ])) : n(t).state.status === "error" ? (p(), T("div", Fa, [
1057
+ b(S, {
898
1058
  status: "error",
899
- title: o(n)("shell.error-title"),
900
- description: o(t).state.error
1059
+ title: n(a)("shell.error-title"),
1060
+ description: n(t).state.error
901
1061
  }, {
902
1062
  default: g(() => [
903
- k(Q, {
1063
+ b(J, {
904
1064
  type: "primary",
905
- onClick: b[0] || (b[0] = (ae) => o(t).reload())
1065
+ onClick: y[0] || (y[0] = (te) => n(t).reload())
906
1066
  }, {
907
1067
  default: g(() => [
908
- R(W(o(n)("shell.retry")), 1)
1068
+ V(L(n(a)("shell.retry")), 1)
909
1069
  ]),
910
1070
  _: 1
911
1071
  })
912
1072
  ]),
913
1073
  _: 1
914
1074
  }, 8, ["title", "description"])
915
- ])) : (f(), $("div", {
1075
+ ])) : (p(), T("div", {
916
1076
  key: 3,
917
1077
  ref_key: "shellEl",
918
- ref: a,
919
- class: G(["wx-root wx-admin", `wx-admin--${_.value}`])
1078
+ ref: l,
1079
+ class: ae(["wx-root wx-admin", `wx-admin--${w.value}`])
920
1080
  }, [
921
- k(me, {
922
- direction: o(s) === "drawer" ? "vertical" : "horizontal",
1081
+ b(le, {
1082
+ direction: n(s) === "drawer" ? "vertical" : "horizontal",
923
1083
  "full-height": "",
924
1084
  class: "wx-admin__frame"
925
1085
  }, {
926
1086
  default: g(() => [
927
- o(s) === "drawer" ? (f(), S(B, {
1087
+ n(s) === "drawer" ? (p(), $(A, {
928
1088
  key: 0,
929
1089
  class: "wx-admin__header",
930
1090
  floating: "",
@@ -934,126 +1094,126 @@ const un = /* @__PURE__ */ E({
934
1094
  height: "var(--wx-admin-header-height)"
935
1095
  }, {
936
1096
  end: g(() => [
937
- N(h.$slots, "user", { expanded: !1 }, void 0, !0)
1097
+ F(f.$slots, "user", { expanded: !1 }, void 0, !0)
938
1098
  ]),
939
1099
  default: g(() => [
940
- k(j, {
1100
+ b(B, {
941
1101
  icon: "menu",
942
- title: o(n)("nav.menu"),
943
- onClick: o(d)
1102
+ title: n(a)("nav.menu"),
1103
+ onClick: n(c)
944
1104
  }, null, 8, ["title", "onClick"]),
945
- N(h.$slots, "brand", {}, () => [
946
- p.value ? (f(), $("img", {
1105
+ F(f.$slots, "brand", {}, () => [
1106
+ v.value ? (p(), T("img", {
947
1107
  key: 0,
948
1108
  class: "wx-admin__logo",
949
- src: p.value.url,
1109
+ src: v.value.url,
950
1110
  alt: m.value,
951
- width: p.value.width ?? void 0,
952
- height: p.value.height ?? void 0
953
- }, null, 8, vn)) : (f(), S(T, {
1111
+ width: v.value.width ?? void 0,
1112
+ height: v.value.height ?? void 0
1113
+ }, null, 8, Oa)) : (p(), $(C, {
954
1114
  key: 1,
955
1115
  weight: "semibold",
956
1116
  truncate: ""
957
1117
  }, {
958
1118
  default: g(() => [
959
- R(W(m.value), 1)
1119
+ V(L(m.value), 1)
960
1120
  ]),
961
1121
  _: 1
962
1122
  }))
963
1123
  ], !0)
964
1124
  ]),
965
1125
  _: 3
966
- })) : z("", !0),
967
- o(r) ? (f(), S(L, {
1126
+ })) : U("", !0),
1127
+ n(r) ? (p(), $(E, {
968
1128
  key: 1,
969
1129
  class: "wx-admin__aside",
970
1130
  sticky: "",
971
1131
  floating: "",
972
1132
  scroll: "",
973
1133
  bordered: !1,
974
- collapsed: o(l),
1134
+ collapsed: n(o),
975
1135
  width: 220,
976
1136
  "collapsed-width": 56
977
1137
  }, {
978
1138
  top: g(() => [
979
- M("div", {
980
- class: G(["wx-admin__brand", { "wx-admin__brand--stacked": o(l) && c.value }])
1139
+ O("div", {
1140
+ class: ae(["wx-admin__brand", { "wx-admin__brand--stacked": n(o) && d.value }])
981
1141
  }, [
982
- o(l) ? c.value ? (f(), $("img", {
1142
+ n(o) ? d.value ? (p(), T("img", {
983
1143
  key: 1,
984
1144
  class: "wx-admin__mark",
985
- src: c.value.url,
1145
+ src: d.value.url,
986
1146
  alt: m.value
987
- }, null, 8, pn)) : z("", !0) : N(h.$slots, "brand", {}, () => [
988
- p.value ? (f(), $("img", {
1147
+ }, null, 8, ja)) : U("", !0) : F(f.$slots, "brand", {}, () => [
1148
+ v.value ? (p(), T("img", {
989
1149
  key: 0,
990
1150
  class: "wx-admin__logo",
991
- src: p.value.url,
1151
+ src: v.value.url,
992
1152
  alt: m.value,
993
- width: p.value.width ?? void 0,
994
- height: p.value.height ?? void 0
995
- }, null, 8, hn)) : (f(), S(T, {
1153
+ width: v.value.width ?? void 0,
1154
+ height: v.value.height ?? void 0
1155
+ }, null, 8, Ha)) : (p(), $(C, {
996
1156
  key: 1,
997
1157
  weight: "semibold",
998
1158
  truncate: "",
999
1159
  class: "wx-admin__title"
1000
1160
  }, {
1001
1161
  default: g(() => [
1002
- R(W(m.value), 1)
1162
+ V(L(m.value), 1)
1003
1163
  ]),
1004
1164
  _: 1
1005
1165
  }))
1006
1166
  ], !0, 0),
1007
- k(j, {
1167
+ b(B, {
1008
1168
  icon: "sidebar",
1009
- title: o(l) ? o(n)("nav.expand") : o(n)("nav.collapse"),
1010
- onClick: o(d)
1169
+ title: n(o) ? n(a)("nav.expand") : n(a)("nav.collapse"),
1170
+ onClick: n(c)
1011
1171
  }, null, 8, ["title", "onClick"])
1012
1172
  ], 2)
1013
1173
  ]),
1014
1174
  bottom: g(() => [
1015
- M("div", bn, [
1016
- N(h.$slots, "user", {
1017
- expanded: !o(l)
1175
+ O("div", Ka, [
1176
+ F(f.$slots, "user", {
1177
+ expanded: !n(o)
1018
1178
  }, void 0, !0)
1019
1179
  ])
1020
1180
  ]),
1021
1181
  default: g(() => [
1022
- N(h.$slots, "nav", { collapsed: o(l) }, void 0, !0)
1182
+ F(f.$slots, "nav", { collapsed: n(o) }, void 0, !0)
1023
1183
  ]),
1024
1184
  _: 3
1025
- }, 8, ["collapsed"])) : z("", !0),
1026
- k(P, {
1185
+ }, 8, ["collapsed"])) : U("", !0),
1186
+ b(K, {
1027
1187
  padding: "none",
1028
1188
  class: "wx-admin__screen"
1029
1189
  }, {
1030
1190
  default: g(() => [
1031
- k(w)
1191
+ b(k)
1032
1192
  ]),
1033
1193
  _: 1
1034
1194
  })
1035
1195
  ]),
1036
1196
  _: 3
1037
1197
  }, 8, ["direction"]),
1038
- k(fe, {
1039
- open: o(u),
1040
- "onUpdate:open": b[1] || (b[1] = (ae) => Ge(u) ? u.value = ae : null),
1198
+ b(ie, {
1199
+ open: n(u),
1200
+ "onUpdate:open": y[1] || (y[1] = (te) => Xe(u) ? u.value = te : null),
1041
1201
  class: "wx-admin__drawer",
1042
- title: m.value === "" ? o(n)("nav.menu") : m.value,
1202
+ title: m.value === "" ? n(a)("nav.menu") : m.value,
1043
1203
  side: "left",
1044
1204
  size: 260,
1045
1205
  "full-screen": !1,
1046
1206
  closable: ""
1047
1207
  }, {
1048
1208
  footer: g(() => [
1049
- M("div", gn, [
1050
- N(h.$slots, "user", { expanded: !0 }, void 0, !0)
1209
+ O("div", qa, [
1210
+ F(f.$slots, "user", { expanded: !0 }, void 0, !0)
1051
1211
  ])
1052
1212
  ]),
1053
1213
  default: g(() => [
1054
- N(h.$slots, "nav", {
1214
+ F(f.$slots, "nav", {
1055
1215
  collapsed: !1,
1056
- select: o(v)
1216
+ select: n(h)
1057
1217
  }, void 0, !0)
1058
1218
  ]),
1059
1219
  _: 3
@@ -1062,10 +1222,10 @@ const un = /* @__PURE__ */ E({
1062
1222
  ], 64);
1063
1223
  };
1064
1224
  }
1065
- }), wn = /* @__PURE__ */ F(yn, [["__scopeId", "data-v-309fdb9d"]]);
1066
- class pe extends Error {
1067
- constructor(t, n, a = {}, i = null, s = null) {
1068
- super(t), this.status = n, this.errors = a, this.retryAfter = i, this.body = s, this.name = "HttpError";
1225
+ }), Xa = /* @__PURE__ */ Y(Ya, [["__scopeId", "data-v-309fdb9d"]]);
1226
+ class Ce extends Error {
1227
+ constructor(t, a, l = {}, i = null, s = null) {
1228
+ super(t), this.status = a, this.errors = l, this.retryAfter = i, this.body = s, this.name = "HttpError";
1069
1229
  }
1070
1230
  status;
1071
1231
  errors;
@@ -1082,126 +1242,126 @@ class pe extends Error {
1082
1242
  return this.status === 429;
1083
1243
  }
1084
1244
  }
1085
- const xn = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1086
- function kn(e = {}) {
1087
- const t = (e.baseUrl ?? "").replace(/\/$/, ""), n = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), i = e.onUnauthenticated, s = e.headers;
1088
- let l = !1;
1089
- async function r(d = !1) {
1090
- l && !d && _e("XSRF-TOKEN") !== null || (await a(n, { credentials: "same-origin" }), l = !0);
1245
+ const Ga = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1246
+ function Ja(e = {}) {
1247
+ const t = (e.baseUrl ?? "").replace(/\/$/, ""), a = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", l = e.fetch ?? globalThis.fetch.bind(globalThis), i = e.onUnauthenticated, s = e.headers;
1248
+ let o = !1;
1249
+ async function r(c = !1) {
1250
+ o && !c && Fe("XSRF-TOKEN") !== null || (await l(a, { credentials: "same-origin" }), o = !0);
1091
1251
  }
1092
- async function u(d, v, m, p = {}, c = !1) {
1093
- const _ = xn.has(d);
1094
- _ && await r();
1095
- const h = {
1252
+ async function u(c, h, m, v = {}, d = !1) {
1253
+ const w = Ga.has(c);
1254
+ w && await r();
1255
+ const f = {
1096
1256
  Accept: "application/json",
1097
1257
  "X-Requested-With": "XMLHttpRequest",
1098
1258
  // Standing headers first, so a caller can still override one for a single request.
1099
1259
  ...s?.(),
1100
- ...p.headers
1260
+ ...v.headers
1101
1261
  };
1102
- if (_) {
1103
- const w = _e("XSRF-TOKEN");
1104
- w !== null && (h["X-XSRF-TOKEN"] = w);
1262
+ if (w) {
1263
+ const k = Fe("XSRF-TOKEN");
1264
+ k !== null && (f["X-XSRF-TOKEN"] = k);
1105
1265
  }
1106
- m !== void 0 && (h["Content-Type"] = "application/json");
1107
- const b = await a($n(t, v, p.query), {
1108
- method: d,
1266
+ m !== void 0 && (f["Content-Type"] = "application/json");
1267
+ const y = await l(Za(t, h, v.query), {
1268
+ method: c,
1109
1269
  credentials: "same-origin",
1110
- headers: h,
1111
- signal: p.signal,
1270
+ headers: f,
1271
+ signal: v.signal,
1112
1272
  body: m === void 0 ? void 0 : JSON.stringify(m)
1113
1273
  });
1114
- if (b.status === 419 && _ && !c)
1115
- return await r(!0), u(d, v, m, p, !0);
1116
- if (b.status === 401 && i?.(), !b.ok)
1117
- throw await _n(b);
1118
- if (b.status !== 204)
1119
- return await b.json();
1274
+ if (y.status === 419 && w && !d)
1275
+ return await r(!0), u(c, h, m, v, !0);
1276
+ if (y.status === 401 && i?.(), !y.ok)
1277
+ throw await Qa(y);
1278
+ if (y.status !== 204)
1279
+ return await y.json();
1120
1280
  }
1121
1281
  return {
1122
- get: (d, v) => u("GET", d, void 0, v),
1123
- post: (d, v, m) => u("POST", d, v, m),
1124
- put: (d, v, m) => u("PUT", d, v, m),
1125
- patch: (d, v, m) => u("PATCH", d, v, m),
1126
- delete: (d, v) => u("DELETE", d, void 0, v)
1282
+ get: (c, h) => u("GET", c, void 0, h),
1283
+ post: (c, h, m) => u("POST", c, h, m),
1284
+ put: (c, h, m) => u("PUT", c, h, m),
1285
+ patch: (c, h, m) => u("PATCH", c, h, m),
1286
+ delete: (c, h) => u("DELETE", c, void 0, h)
1127
1287
  };
1128
1288
  }
1129
- async function _n(e) {
1289
+ async function Qa(e) {
1130
1290
  let t = null;
1131
1291
  try {
1132
1292
  t = await e.json();
1133
1293
  } catch {
1134
1294
  }
1135
- const n = t ?? {}, a = typeof n.message == "string" && n.message !== "" ? n.message : e.statusText || `Request failed with ${e.status}`, i = n.errors !== null && typeof n.errors == "object" ? n.errors : {}, s = e.headers.get("Retry-After"), l = s === null ? null : Number.parseInt(s, 10);
1136
- return new pe(
1137
- a,
1295
+ const a = t ?? {}, l = typeof a.message == "string" && a.message !== "" ? a.message : e.statusText || `Request failed with ${e.status}`, i = a.errors !== null && typeof a.errors == "object" ? a.errors : {}, s = e.headers.get("Retry-After"), o = s === null ? null : Number.parseInt(s, 10);
1296
+ return new Ce(
1297
+ l,
1138
1298
  e.status,
1139
1299
  i,
1140
- Number.isFinite(l) ? l : null,
1300
+ Number.isFinite(o) ? o : null,
1141
1301
  t
1142
1302
  );
1143
1303
  }
1144
- function $n(e, t, n) {
1304
+ function Za(e, t, a) {
1145
1305
  const i = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
1146
- if (n === void 0)
1306
+ if (a === void 0)
1147
1307
  return i;
1148
1308
  const s = new URLSearchParams();
1149
- for (const [r, u] of Object.entries(n))
1309
+ for (const [r, u] of Object.entries(a))
1150
1310
  u != null && s.set(r, String(u));
1151
- const l = s.toString();
1152
- return l === "" ? i : `${i}${i.includes("?") ? "&" : "?"}${l}`;
1311
+ const o = s.toString();
1312
+ return o === "" ? i : `${i}${i.includes("?") ? "&" : "?"}${o}`;
1153
1313
  }
1154
- function _e(e) {
1314
+ function Fe(e) {
1155
1315
  if (typeof document > "u")
1156
1316
  return null;
1157
1317
  for (const t of document.cookie.split(";")) {
1158
- const [n, ...a] = t.trim().split("=");
1159
- if (n === e)
1160
- return decodeURIComponent(a.join("="));
1318
+ const [a, ...l] = t.trim().split("=");
1319
+ if (a === e)
1320
+ return decodeURIComponent(l.join("="));
1161
1321
  }
1162
1322
  return null;
1163
1323
  }
1164
- const Sn = "webx.theme", Ne = /* @__PURE__ */ Symbol("webx-theme");
1165
- function ma() {
1166
- const e = te(Ne, null);
1324
+ const en = "webx.theme", dt = /* @__PURE__ */ Symbol("webx-theme");
1325
+ function Gn() {
1326
+ const e = ne(dt, null);
1167
1327
  if (e === null)
1168
1328
  throw new Error("useTheme() was called outside a panel created by createAdmin().");
1169
1329
  return e;
1170
1330
  }
1171
- function Tn(e, t) {
1172
- e.provide(Ne, t);
1331
+ function tn(e, t) {
1332
+ e.provide(dt, t);
1173
1333
  }
1174
- function Ln(e = {}) {
1175
- const t = e.storageKey === void 0 ? Sn : e.storageKey, n = ue({
1176
- preference: An(t) ?? "system",
1334
+ function an(e = {}) {
1335
+ const t = e.storageKey === void 0 ? en : e.storageKey, a = pe({
1336
+ preference: nn(t) ?? "system",
1177
1337
  resolved: "light"
1178
1338
  });
1179
- function a() {
1180
- At(n.preference), n.resolved = n.preference === "system" ? Wt() : n.preference;
1339
+ function l() {
1340
+ Gt(a.preference), a.resolved = a.preference === "system" ? Jt() : a.preference;
1181
1341
  }
1182
- return a(), Lt((i) => {
1183
- n.preference === "system" && (n.resolved = i);
1342
+ return l(), Xt((i) => {
1343
+ a.preference === "system" && (a.resolved = i);
1184
1344
  }), {
1185
- state: n,
1345
+ state: a,
1186
1346
  set(i) {
1187
- n.preference = i, a(), $e(t, i);
1347
+ a.preference = i, l(), Oe(t, i);
1188
1348
  },
1189
1349
  adopt(i) {
1190
1350
  if (i === void 0)
1191
1351
  return;
1192
1352
  const s = i ?? "system";
1193
- s !== n.preference && (n.preference = s, a(), $e(t, s));
1353
+ s !== a.preference && (a.preference = s, l(), Oe(t, s));
1194
1354
  }
1195
1355
  };
1196
1356
  }
1197
- function $e(e, t) {
1357
+ function Oe(e, t) {
1198
1358
  if (e !== null)
1199
1359
  try {
1200
1360
  localStorage.setItem(e, t);
1201
1361
  } catch {
1202
1362
  }
1203
1363
  }
1204
- function An(e) {
1364
+ function nn(e) {
1205
1365
  if (e === null)
1206
1366
  return null;
1207
1367
  try {
@@ -1211,7 +1371,7 @@ function An(e) {
1211
1371
  return null;
1212
1372
  }
1213
1373
  }
1214
- const Ve = {
1374
+ const ct = {
1215
1375
  shell: {
1216
1376
  loading: "Loading the panel…",
1217
1377
  "error-title": "The panel could not start",
@@ -1381,27 +1541,71 @@ const Ve = {
1381
1541
  "hash-length": "An anchor may be at most :max characters long.",
1382
1542
  "hash-shape": "An anchor is a name on the page: no spaces in it.",
1383
1543
  "not-localized": "A link is the same in every language and cannot be translated."
1544
+ },
1545
+ // The categories every module shares: the refusals the server says, and the words of the
1546
+ // shared screens under a module's own.
1547
+ categories: {
1548
+ "in-use": "There are :count entries in it. Move them to another category first.",
1549
+ "slug-shape": "Letters, digits and single hyphens between them.",
1550
+ new: "New category",
1551
+ empty: "No categories yet.",
1552
+ "empty-help": "A category groups entries. One entry can be in several of them.",
1553
+ order: "The order here is the order on the site",
1554
+ hidden: "Hidden from the site",
1555
+ "no-address": "No address in this language",
1556
+ count: "Entries: :count",
1557
+ "show-items": "Show its entries",
1558
+ edit: "Edit",
1559
+ "open-on-site": "Open on the site",
1560
+ delete: "Delete",
1561
+ "delete-blocked": "While it holds entries it cannot go — move them first.",
1562
+ "delete-title": "Delete “:name”?",
1563
+ "delete-text": "It goes to the bin and comes off the site, and its address is free again.",
1564
+ deleted: "The category is in the bin.",
1565
+ cancel: "Cancel",
1566
+ create: "Create",
1567
+ save: "Save",
1568
+ saved: "Saved.",
1569
+ "save-failed": "Not saved — look at the marked fields.",
1570
+ "reorder-failed": "The new order was not saved.",
1571
+ "field-title": "Name",
1572
+ "field-slug": "Address",
1573
+ "address-moving": "The address is changing. The old one keeps working and leads to the new one.",
1574
+ untitled: "Untitled",
1575
+ trail: "Where you are",
1576
+ "leave-title": "Leave without saving?",
1577
+ "leave-text": "What was changed here since the last save will be lost.",
1578
+ leave: "Leave",
1579
+ "field-main": "Main",
1580
+ "field-add": "Add a category",
1581
+ "field-remove": "Take out of this category",
1582
+ "field-empty": "In no category yet.",
1583
+ "field-none-left": "Every category is already chosen.",
1584
+ "order-all": "Drag to change the order on the site.",
1585
+ "order-category": "Drag to change the order inside this category. The rest of the list keeps its own.",
1586
+ "order-locked": "Clear the search and the filters to change the order — only a whole list, or one category, can be dragged.",
1587
+ unknown: "One of the chosen categories is not there any more."
1384
1588
  }
1385
- }, Ie = "webx.locale";
1386
- function fa(e = {}) {
1387
- const t = e.manifestUrl ?? En() ?? "/api/cms/manifest", n = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", i = e.modules ?? [], s = [...e.routes ?? []];
1388
- for (const b of i)
1389
- s.push(...b.routes ?? []);
1390
- if (!s.some((b) => b.path === "/")) {
1391
- const b = i.find((w) => w.landing === !0);
1589
+ }, mt = "webx.locale";
1590
+ function Jn(e = {}) {
1591
+ const t = e.manifestUrl ?? dn() ?? "/api/cms/manifest", a = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), l = e.basePath ?? "/cms", i = e.modules ?? [], s = [...e.routes ?? []];
1592
+ for (const y of i)
1593
+ s.push(...y.routes ?? []);
1594
+ if (!s.some((y) => y.path === "/")) {
1595
+ const y = i.find((k) => k.landing === !0);
1392
1596
  s.push({
1393
1597
  path: "/",
1394
1598
  name: "webx.home",
1395
- component: un,
1396
- props: { landing: b?.path ?? b?.routes?.[0]?.path ?? null }
1599
+ component: Ia,
1600
+ props: { landing: y?.path ?? y?.routes?.[0]?.path ?? null }
1397
1601
  });
1398
1602
  }
1399
- const l = at({
1400
- history: lt(a),
1603
+ const o = _t({
1604
+ history: $t(l),
1401
1605
  routes: s
1402
- }), r = ge({ locale: e.locale ?? Cn() }), u = Ln(), d = e.http ?? kn({
1606
+ }), r = Ee({ locale: e.locale ?? on() }), u = an(), c = e.http ?? Ja({
1403
1607
  baseUrl: "",
1404
- csrfUrl: `${n}/auth/csrf-cookie`,
1608
+ csrfUrl: `${a}/auth/csrf-cookie`,
1405
1609
  onUnauthenticated: () => {
1406
1610
  m.setUser(null), m.state.status = "unauthenticated";
1407
1611
  },
@@ -1411,174 +1615,174 @@ function fa(e = {}) {
1411
1615
  // signing in on a Russian sign-in screen lands in an English panel.
1412
1616
  headers: () => ({ "X-Webx-Locale": r.state.locale })
1413
1617
  });
1414
- r.defaults("webx-admin", Ve);
1415
- async function v(b) {
1416
- const w = await d.get(`${n}/translations/${b}`);
1417
- r.load(w.data.namespaces, w.data.locale, w.data.fallback), zn(w.data.locale), Un(w.data.locale, r.state.panelLocales);
1618
+ r.defaults("webx-admin", ct);
1619
+ async function h(y) {
1620
+ const k = await c.get(`${a}/translations/${y}`);
1621
+ r.load(k.data.namespaces, k.data.locale, k.data.fallback), sn(k.data.locale), un(k.data.locale, r.state.panelLocales);
1418
1622
  }
1419
- const m = sn({
1420
- http: d,
1623
+ const m = Ra({
1624
+ http: c,
1421
1625
  theme: u,
1422
- basePath: a,
1423
- apiPath: n,
1626
+ basePath: l,
1627
+ apiPath: a,
1424
1628
  modules: i,
1425
1629
  i18n: r,
1426
- loadDictionary: v,
1630
+ loadDictionary: h,
1427
1631
  types: e.types,
1428
1632
  screens: e.screens,
1429
- loadManifest: async () => (await d.get(t)).data
1430
- }), p = Je(Wn(e));
1431
- p.use(bt), on(p, m), Rt(p, r), Tn(p, u);
1432
- const c = C("");
1433
- p.provide(
1434
- gt,
1633
+ loadManifest: async () => (await c.get(t)).data
1634
+ }), v = xt(ln(e));
1635
+ v.use(Bt), Na(v, m), ea(v, r), tn(v, u);
1636
+ const d = W("");
1637
+ v.provide(
1638
+ It,
1435
1639
  x(() => r.state.locale)
1436
- ), p.provide(yt, {
1640
+ ), v.provide(Pt, {
1437
1641
  list: x(
1438
- () => r.state.contentLocales.map((b) => ({
1439
- code: b.code,
1440
- label: b.code.toUpperCase()
1642
+ () => r.state.contentLocales.map((y) => ({
1643
+ code: y.code,
1644
+ label: y.code.toUpperCase()
1441
1645
  }))
1442
1646
  ),
1443
1647
  active: x({
1444
- get: () => c.value || (r.state.contentLocales[0]?.code ?? ""),
1445
- set: (b) => {
1446
- c.value = b;
1648
+ get: () => d.value || (r.state.contentLocales[0]?.code ?? ""),
1649
+ set: (y) => {
1650
+ d.value = y;
1447
1651
  }
1448
1652
  })
1449
1653
  });
1450
- const _ = {
1451
- app: p,
1452
- router: l,
1654
+ const w = {
1655
+ app: v,
1656
+ router: o,
1453
1657
  context: m,
1454
1658
  i18n: r,
1455
1659
  theme: u,
1456
1660
  async mount() {
1457
- await Promise.all([h(), v(r.state.locale)]).catch(() => {
1458
- }), p.mount(e.el ?? "#webx-app"), await m.reload();
1661
+ await Promise.all([f(), h(r.state.locale)]).catch(() => {
1662
+ }), v.mount(e.el ?? "#webx-app"), await m.reload();
1459
1663
  }
1460
1664
  };
1461
- async function h() {
1462
- const b = await d.get(`${n}/locales`);
1463
- r.state.panelLocales = b.data.panel, r.state.contentLocales = b.data.content;
1665
+ async function f() {
1666
+ const y = await c.get(`${a}/locales`);
1667
+ r.state.panelLocales = y.data.panel, r.state.contentLocales = y.data.content;
1464
1668
  }
1465
- for (const b of e.plugins ?? [])
1466
- b.install(_);
1467
- return p.use(l), _;
1669
+ for (const y of e.plugins ?? [])
1670
+ y.install(w);
1671
+ return v.use(o), w;
1468
1672
  }
1469
- function Wn(e) {
1673
+ function ln(e) {
1470
1674
  const t = {
1471
1675
  // The menu is the panel's own: it is the manifest, drawn.
1472
1676
  // The shell hands in what a choice means where it drew the menu — in the drawer it is what
1473
1677
  // closes it, and a drawer that stays open over the section it just opened is a drawer the
1474
1678
  // reader has to dismiss by hand.
1475
- nav: (n) => le(dn, { collapsed: n.collapsed === !0, onSelect: n.select })
1679
+ nav: (a) => de(Pa, { collapsed: a.collapsed === !0, onSelect: a.select })
1476
1680
  };
1477
- return e.brand !== void 0 && (t.brand = () => le(e.brand)), e.userMenu !== void 0 && (t.user = (n) => le(e.userMenu, { expanded: n.expanded === !0 })), { render: () => le(wn, null, t) };
1681
+ return e.brand !== void 0 && (t.brand = () => de(e.brand)), e.userMenu !== void 0 && (t.user = (a) => de(e.userMenu, { expanded: a.expanded === !0 })), { render: () => de(Xa, null, t) };
1478
1682
  }
1479
- function Cn() {
1480
- const e = Rn(Ie);
1683
+ function on() {
1684
+ const e = rn(mt);
1481
1685
  return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
1482
1686
  }
1483
- function zn(e) {
1687
+ function sn(e) {
1484
1688
  try {
1485
- localStorage.setItem(Ie, e);
1689
+ localStorage.setItem(mt, e);
1486
1690
  } catch {
1487
1691
  }
1488
1692
  }
1489
- function Rn(e) {
1693
+ function rn(e) {
1490
1694
  try {
1491
1695
  return localStorage.getItem(e);
1492
1696
  } catch {
1493
1697
  return null;
1494
1698
  }
1495
1699
  }
1496
- function Un(e, t) {
1497
- typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((n) => n.code === e)?.direction ?? "ltr");
1700
+ function un(e, t) {
1701
+ typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((a) => a.code === e)?.direction ?? "ltr");
1498
1702
  }
1499
- function En() {
1703
+ function dn() {
1500
1704
  return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
1501
1705
  }
1502
- function Bn(e) {
1706
+ function cn(e) {
1503
1707
  const t = e.replace(/\r\n?/g, `
1504
1708
  `).split(`
1505
- `), n = [];
1506
- let a = 0;
1507
- for (; a < t.length; ) {
1508
- const i = t[a] ?? "";
1709
+ `), a = [];
1710
+ let l = 0;
1711
+ for (; l < t.length; ) {
1712
+ const i = t[l] ?? "";
1509
1713
  if (i.trim() === "") {
1510
- a += 1;
1714
+ l += 1;
1511
1715
  continue;
1512
1716
  }
1513
1717
  if (/^```([\w-]*)\s*$/.exec(i)) {
1514
1718
  const u = [];
1515
- for (a += 1; a < t.length && !/^```\s*$/.test(t[a] ?? ""); )
1516
- u.push(t[a] ?? ""), a += 1;
1517
- a += 1, n.push(`<pre><code>${be(u.join(`
1719
+ for (l += 1; l < t.length && !/^```\s*$/.test(t[l] ?? ""); )
1720
+ u.push(t[l] ?? ""), l += 1;
1721
+ l += 1, a.push(`<pre><code>${We(u.join(`
1518
1722
  `))}</code></pre>`);
1519
1723
  continue;
1520
1724
  }
1521
- const l = /^(#{1,4})\s+(.*)$/.exec(i);
1522
- if (l) {
1523
- const u = Math.min(l[1].length + 1, 5);
1524
- n.push(`<h${u}>${he(l[2] ?? "")}</h${u}>`), a += 1;
1725
+ const o = /^(#{1,4})\s+(.*)$/.exec(i);
1726
+ if (o) {
1727
+ const u = Math.min(o[1].length + 1, 5);
1728
+ a.push(`<h${u}>${Te(o[2] ?? "")}</h${u}>`), l += 1;
1525
1729
  continue;
1526
1730
  }
1527
- if (oe(i)) {
1528
- const u = /^\s*\d+[.)]\s+/.test(i), d = [];
1529
- for (; a < t.length && oe(t[a] ?? ""); )
1530
- for (d.push((t[a] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), a += 1; a < t.length; ) {
1531
- const m = t[a] ?? "";
1532
- if (m.trim() === "" || oe(m) || /^(#{1,4})\s/.test(m) || /^```/.test(m))
1731
+ if (me(i)) {
1732
+ const u = /^\s*\d+[.)]\s+/.test(i), c = [];
1733
+ for (; l < t.length && me(t[l] ?? ""); )
1734
+ for (c.push((t[l] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), l += 1; l < t.length; ) {
1735
+ const m = t[l] ?? "";
1736
+ if (m.trim() === "" || me(m) || /^(#{1,4})\s/.test(m) || /^```/.test(m))
1533
1737
  break;
1534
- d[d.length - 1] += ` ${m.trim()}`, a += 1;
1738
+ c[c.length - 1] += ` ${m.trim()}`, l += 1;
1535
1739
  }
1536
- const v = u ? "ol" : "ul";
1537
- n.push(`<${v}>${d.map((m) => `<li>${he(m)}</li>`).join("")}</${v}>`);
1740
+ const h = u ? "ol" : "ul";
1741
+ a.push(`<${h}>${c.map((m) => `<li>${Te(m)}</li>`).join("")}</${h}>`);
1538
1742
  continue;
1539
1743
  }
1540
1744
  const r = [];
1541
- for (; a < t.length; ) {
1542
- const u = t[a] ?? "";
1543
- if (u.trim() === "" || oe(u) || /^(#{1,4})\s/.test(u) || /^```/.test(u)) break;
1544
- r.push(u.trim()), a += 1;
1745
+ for (; l < t.length; ) {
1746
+ const u = t[l] ?? "";
1747
+ if (u.trim() === "" || me(u) || /^(#{1,4})\s/.test(u) || /^```/.test(u)) break;
1748
+ r.push(u.trim()), l += 1;
1545
1749
  }
1546
- n.push(`<p>${he(r.join(" "))}</p>`);
1750
+ a.push(`<p>${Te(r.join(" "))}</p>`);
1547
1751
  }
1548
- return n.join("");
1752
+ return a.join("");
1549
1753
  }
1550
- const se = "\0";
1551
- function oe(e) {
1754
+ const ce = "\0";
1755
+ function me(e) {
1552
1756
  return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
1553
1757
  }
1554
- function he(e) {
1555
- const t = [], n = e.replace(/`([^`]+)`/g, (i, s) => (t.push(`<code>${be(s)}</code>`), `${se}${t.length - 1}${se}`));
1556
- return be(n).replace(
1758
+ function Te(e) {
1759
+ const t = [], a = e.replace(/`([^`]+)`/g, (i, s) => (t.push(`<code>${We(s)}</code>`), `${ce}${t.length - 1}${ce}`));
1760
+ return We(a).replace(
1557
1761
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
1558
1762
  '<a href="$2" target="_blank" rel="noopener">$1</a>'
1559
1763
  ).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
1560
- new RegExp(`${se}(\\d+)${se}`, "g"),
1764
+ new RegExp(`${ce}(\\d+)${ce}`, "g"),
1561
1765
  (i, s) => t[Number(s)] ?? ""
1562
1766
  );
1563
1767
  }
1564
- function be(e) {
1768
+ function We(e) {
1565
1769
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1566
1770
  }
1567
- function Nn(e) {
1568
- const t = e.scope("webx-admin"), n = /* @__PURE__ */ new Map();
1569
- function a(s, l, r) {
1570
- const u = e.state.locale, d = `${u}:${s}`;
1571
- let v = n.get(d);
1572
- return v === void 0 && (v = new Intl.DateTimeFormat(u, l), n.set(d, v)), v.format(r);
1771
+ function mn(e) {
1772
+ const t = e.scope("webx-admin"), a = /* @__PURE__ */ new Map();
1773
+ function l(s, o, r) {
1774
+ const u = e.state.locale, c = `${u}:${s}`;
1775
+ let h = a.get(c);
1776
+ return h === void 0 && (h = new Intl.DateTimeFormat(u, o), a.set(c, h)), h.format(r);
1573
1777
  }
1574
- const i = (s) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, s);
1778
+ const i = (s) => l("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, s);
1575
1779
  return {
1576
1780
  short(s) {
1577
- const l = re(s);
1578
- if (l === null)
1781
+ const o = fe(s);
1782
+ if (o === null)
1579
1783
  return t("dates.never");
1580
- const r = /* @__PURE__ */ new Date(), u = Se(l, r);
1581
- return u === 0 ? t("dates.today", { time: i(l) }) : u === -1 ? t("dates.yesterday", { time: i(l) }) : l.getFullYear() === r.getFullYear() ? a(
1784
+ const r = /* @__PURE__ */ new Date(), u = He(o, r);
1785
+ return u === 0 ? t("dates.today", { time: i(o) }) : u === -1 ? t("dates.yesterday", { time: i(o) }) : o.getFullYear() === r.getFullYear() ? l(
1582
1786
  "this-year",
1583
1787
  {
1584
1788
  day: "numeric",
@@ -1587,83 +1791,406 @@ function Nn(e) {
1587
1791
  minute: "2-digit",
1588
1792
  hourCycle: "h23"
1589
1793
  },
1590
- l
1591
- ) : a("earlier", { day: "numeric", month: "long", year: "numeric" }, l);
1794
+ o
1795
+ ) : l("earlier", { day: "numeric", month: "long", year: "numeric" }, o);
1592
1796
  },
1593
1797
  compact(s) {
1594
- const l = re(s);
1595
- if (l === null)
1798
+ const o = fe(s);
1799
+ if (o === null)
1596
1800
  return t("dates.never");
1597
1801
  const r = /* @__PURE__ */ new Date();
1598
- return Se(l, r) === 0 ? i(l) : l.getFullYear() === r.getFullYear() ? a("compact", { day: "numeric", month: "short" }, l) : a("compact-earlier", { dateStyle: "short" }, l);
1802
+ return He(o, r) === 0 ? i(o) : o.getFullYear() === r.getFullYear() ? l("compact", { day: "numeric", month: "short" }, o) : l("compact-earlier", { dateStyle: "short" }, o);
1599
1803
  },
1600
1804
  exact(s) {
1601
- const l = re(s);
1602
- return l === null ? "" : a("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, l);
1805
+ const o = fe(s);
1806
+ return o === null ? "" : l("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, o);
1603
1807
  },
1604
1808
  iso(s) {
1605
- const l = re(s);
1606
- return l === null ? "" : l.toISOString();
1809
+ const o = fe(s);
1810
+ return o === null ? "" : o.toISOString();
1607
1811
  }
1608
1812
  };
1609
1813
  }
1610
- function De() {
1611
- const e = te(ce, null);
1612
- return Nn(e ?? Vn());
1814
+ function vt() {
1815
+ const e = ne(we, null);
1816
+ return mn(e ?? vn());
1613
1817
  }
1614
- let ie = null;
1615
- function Vn() {
1616
- return ie === null && (ie = ge(), ie.defaults("webx-admin", Ve)), ie;
1818
+ let ve = null;
1819
+ function vn() {
1820
+ return ve === null && (ve = Ee(), ve.defaults("webx-admin", ct)), ve;
1617
1821
  }
1618
- function re(e) {
1822
+ function fe(e) {
1619
1823
  if (e == null || e === "")
1620
1824
  return null;
1621
1825
  const t = e instanceof Date ? e : new Date(e);
1622
1826
  return Number.isNaN(t.getTime()) ? null : t;
1623
1827
  }
1624
- function Se(e, t) {
1625
- const n = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
1626
- return Math.round((n(e) - n(t)) / 864e5);
1828
+ function He(e, t) {
1829
+ const a = (l) => Date.UTC(l.getFullYear(), l.getMonth(), l.getDate());
1830
+ return Math.round((a(e) - a(t)) / 864e5);
1627
1831
  }
1628
- function In(e, t, n) {
1629
- const a = e instanceof pe ? e.status : Mn(e);
1630
- if (a === 422)
1631
- return Pn(e) ?? n ?? t("errors.unknown");
1632
- if (a === 401) return t("errors.signed-out");
1633
- if (a === 403) return t("errors.forbidden");
1634
- if (a === 404) return t("errors.gone");
1635
- if (a === 409) return t("errors.conflict");
1636
- if (a === 429) {
1637
- const i = e instanceof pe ? e.retryAfter : null;
1832
+ function fn(e, t, a) {
1833
+ const l = e instanceof Ce ? e.status : pn(e);
1834
+ if (l === 422)
1835
+ return hn(e) ?? a ?? t("errors.unknown");
1836
+ if (l === 401) return t("errors.signed-out");
1837
+ if (l === 403) return t("errors.forbidden");
1838
+ if (l === 404) return t("errors.gone");
1839
+ if (l === 409) return t("errors.conflict");
1840
+ if (l === 429) {
1841
+ const i = e instanceof Ce ? e.retryAfter : null;
1638
1842
  return i === null ? t("errors.throttled") : t("errors.throttled-in", { seconds: i });
1639
1843
  }
1640
- return a !== null && a >= 500 ? t("errors.server") : a === null ? t("errors.offline") : n ?? t("errors.unknown");
1844
+ return l !== null && l >= 500 ? t("errors.server") : l === null ? t("errors.offline") : a ?? t("errors.unknown");
1641
1845
  }
1642
- function Dn() {
1643
- const e = V("webx-admin");
1644
- return (t, n) => In(t, e, n);
1846
+ function Re() {
1847
+ const e = P("webx-admin");
1848
+ return (t, a) => fn(t, e, a);
1645
1849
  }
1646
- function Mn(e) {
1850
+ function pn(e) {
1647
1851
  const t = e?.status;
1648
1852
  return typeof t == "number" ? t : null;
1649
1853
  }
1650
- function Pn(e) {
1651
- const n = e?.body?.message;
1652
- return typeof n == "string" && n !== "" ? n : null;
1854
+ function hn(e) {
1855
+ const a = e?.body?.message;
1856
+ return typeof a == "string" && a !== "" ? a : null;
1653
1857
  }
1654
- function Fn(e, t, n) {
1655
- const a = `${e.apiPath}/entities/${t}/${n}/notes`, i = (l) => `${e.apiPath}/notes/${l}`, s = (l) => l.data;
1858
+ function gn(e, t, a) {
1859
+ const l = `${e.apiPath}/entities/${t}/${a}/notes`, i = (o) => `${e.apiPath}/notes/${o}`, s = (o) => o.data;
1656
1860
  return {
1657
- list: () => e.http.get(a).then(s),
1658
- add: (l) => e.http.post(a, { body: l }).then(s),
1659
- save: (l, r) => e.http.put(i(l), { body: r }).then(s),
1660
- remove: (l) => e.http.delete(i(l)).then(() => {
1861
+ list: () => e.http.get(l).then(s),
1862
+ add: (o) => e.http.post(l, { body: o }).then(s),
1863
+ save: (o, r) => e.http.put(i(o), { body: r }).then(s),
1864
+ remove: (o) => e.http.delete(i(o)).then(() => {
1661
1865
  })
1662
1866
  };
1663
1867
  }
1664
- const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1868
+ const ft = /* @__PURE__ */ Symbol("wx-category-editor");
1869
+ function yn(e) {
1870
+ Ye(ft, e);
1871
+ }
1872
+ function Qn() {
1873
+ return ne(ft, null);
1874
+ }
1875
+ function bn(e) {
1876
+ return (e.q ?? "").trim() !== "" || e.filtered ? "locked" : e.category == null ? "all" : "category";
1877
+ }
1878
+ function Zn(e, t) {
1879
+ const a = X(), l = P("webx-admin"), i = x(() => bn(t()));
1880
+ return {
1881
+ mode: i,
1882
+ sortable: x(() => i.value !== "locked"),
1883
+ hint: x(() => l(`categories.order-${i.value}`)),
1884
+ move: (s) => aa(a, e, s, i.value === "category" ? t().category ?? null : null)
1885
+ };
1886
+ }
1887
+ function Ne(e = {}) {
1888
+ const t = P("webx-admin");
1889
+ return (a, l) => t(e[a] ?? `webx-admin::categories.${a}`, l);
1890
+ }
1891
+ const wn = /* @__PURE__ */ N({
1892
+ name: "WxCategoryCreateDialog",
1893
+ __name: "CategoryCreateDialog",
1894
+ props: {
1895
+ options: {}
1896
+ },
1897
+ setup(e) {
1898
+ const t = e, { open: a, resolve: l, dismiss: i } = Dt(), s = xe(X(), t.options.api), o = Ne(t.options.words), r = W(""), u = W(!1), c = W({}), h = qe("field");
1899
+ Le(async () => {
1900
+ await Ge(), h.value?.querySelector("input")?.focus();
1901
+ });
1902
+ function m(d) {
1903
+ const w = Object.keys(c.value).find((f) => f === d || f.startsWith(`${d}.`));
1904
+ return w === void 0 ? void 0 : c.value[w]?.[0];
1905
+ }
1906
+ async function v() {
1907
+ if (!(r.value.trim() === "" || u.value)) {
1908
+ u.value = !0, c.value = {};
1909
+ try {
1910
+ l(await s.create({ title: r.value.trim() }));
1911
+ } catch (d) {
1912
+ c.value = d.body?.errors ?? {};
1913
+ } finally {
1914
+ u.value = !1;
1915
+ }
1916
+ }
1917
+ }
1918
+ return (d, w) => (p(), $(n(nt), {
1919
+ open: n(a),
1920
+ "onUpdate:open": w[2] || (w[2] = (f) => Xe(a) ? a.value = f : null),
1921
+ title: n(o)("new"),
1922
+ width: 440
1923
+ }, {
1924
+ footer: g(() => [
1925
+ b(n(Ft), { size: "sm" }, {
1926
+ default: g(() => [
1927
+ b(n(Z), {
1928
+ variant: "outline",
1929
+ onClick: w[1] || (w[1] = (f) => n(i)())
1930
+ }, {
1931
+ default: g(() => [
1932
+ V(L(n(o)("cancel")), 1)
1933
+ ]),
1934
+ _: 1
1935
+ }),
1936
+ b(n(Z), {
1937
+ type: "primary",
1938
+ loading: u.value,
1939
+ disabled: r.value.trim() === "",
1940
+ onClick: v
1941
+ }, {
1942
+ default: g(() => [
1943
+ V(L(n(o)("create")), 1)
1944
+ ]),
1945
+ _: 1
1946
+ }, 8, ["loading", "disabled"])
1947
+ ]),
1948
+ _: 1
1949
+ })
1950
+ ]),
1951
+ default: g(() => [
1952
+ b(n(Mt), {
1953
+ label: n(o)("field-title"),
1954
+ error: m("title") ?? m("slug"),
1955
+ required: ""
1956
+ }, {
1957
+ default: g(() => [
1958
+ O("div", {
1959
+ ref_key: "field",
1960
+ ref: h
1961
+ }, [
1962
+ b(n(ye), {
1963
+ modelValue: r.value,
1964
+ "onUpdate:modelValue": w[0] || (w[0] = (f) => r.value = f),
1965
+ "aria-label": n(o)("field-title"),
1966
+ onKeyup: Je(v, ["enter"])
1967
+ }, null, 8, ["modelValue", "aria-label"])
1968
+ ], 512)
1969
+ ]),
1970
+ _: 1
1971
+ }, 8, ["label", "error"])
1972
+ ]),
1973
+ _: 1
1974
+ }, 8, ["open", "title"]));
1975
+ }
1976
+ }), xn = { class: "wx-category-row__name" }, kn = /* @__PURE__ */ N({
1977
+ name: "WxCategoriesPage",
1978
+ __name: "CategoriesPage",
1979
+ props: {
1980
+ options: {}
1981
+ },
1982
+ setup(e) {
1983
+ const t = e, a = X(), l = xe(a, t.options.api), i = ge(), s = Ne(t.options.words), o = Re(), r = W([]), u = W(!0), c = x(() => a.can(t.options.manage)), h = x(
1984
+ () => a.state.manifest?.modules.find((S) => S.id === t.options.module)?.title ?? ""
1985
+ ), m = Ot(wn), v = x(
1986
+ () => c.value ? [{ key: "new", label: s("new"), icon: "plus", primary: !0, run: () => {
1987
+ y();
1988
+ } }] : []
1989
+ );
1990
+ function d(S) {
1991
+ return Number(S[t.options.count] ?? 0);
1992
+ }
1993
+ async function w() {
1994
+ u.value = !0;
1995
+ try {
1996
+ r.value = (await l.list()).data;
1997
+ } catch (S) {
1998
+ D.danger(o(S));
1999
+ } finally {
2000
+ u.value = !1;
2001
+ }
2002
+ }
2003
+ w();
2004
+ function f(S) {
2005
+ i.push(`${t.options.path}/${S.id}`);
2006
+ }
2007
+ async function y() {
2008
+ const S = await m({ options: t.options });
2009
+ S !== void 0 && f(S);
2010
+ }
2011
+ async function k(S) {
2012
+ if (d(S) > 0) {
2013
+ D.warning(s("delete-blocked"));
2014
+ return;
2015
+ }
2016
+ if (await he({
2017
+ title: s("delete-title", { name: S.name }),
2018
+ message: s("delete-text"),
2019
+ confirmText: s("delete"),
2020
+ cancelText: s("cancel"),
2021
+ tone: "danger"
2022
+ }))
2023
+ try {
2024
+ await l.remove(S.id), D.success(s("deleted")), await w();
2025
+ } catch (C) {
2026
+ D.danger(o(C));
2027
+ }
2028
+ }
2029
+ function M(S) {
2030
+ const B = [{ key: "edit", label: s("edit"), icon: "edit", run: () => f(S) }], C = t.options.items;
2031
+ return C && d(S) > 0 && B.push({
2032
+ key: "items",
2033
+ label: s("show-items"),
2034
+ icon: "file-txt",
2035
+ run: () => {
2036
+ i.push(C(S.id));
2037
+ }
2038
+ }), S.url && S.is_visible && B.push({ key: "site", label: s("open-on-site"), icon: "link", href: S.url }), c.value && B.push({
2039
+ key: "delete",
2040
+ label: s("delete"),
2041
+ icon: "trash",
2042
+ danger: !0,
2043
+ run: () => {
2044
+ k(S);
2045
+ }
2046
+ }), B;
2047
+ }
2048
+ async function J() {
2049
+ try {
2050
+ await l.reorder(r.value.map((S) => S.id));
2051
+ } catch (S) {
2052
+ D.danger(o(S, s("reorder-failed"))), await w();
2053
+ }
2054
+ }
2055
+ return (S, B) => {
2056
+ const C = j("router-link");
2057
+ return p(), $(it, {
2058
+ class: "wx-categories",
2059
+ title: h.value,
2060
+ actions: v.value,
2061
+ padding: "sm"
2062
+ }, {
2063
+ default: g(() => [
2064
+ u.value ? (p(), $(n(re), {
2065
+ key: 0,
2066
+ class: "wx-categories__loading",
2067
+ rows: 5
2068
+ })) : r.value.length === 0 ? (p(), $(n(lt), {
2069
+ key: 1,
2070
+ title: n(s)("empty"),
2071
+ description: n(s)("empty-help")
2072
+ }, null, 8, ["title", "description"])) : (p(), T(H, { key: 2 }, [
2073
+ b(n(et), {
2074
+ modelValue: r.value,
2075
+ "onUpdate:modelValue": B[0] || (B[0] = (A) => r.value = A),
2076
+ class: "wx-categories__list",
2077
+ plain: "",
2078
+ "item-key": "id",
2079
+ "item-label": (A) => A.name,
2080
+ disabled: !c.value,
2081
+ onMove: J
2082
+ }, {
2083
+ default: g(({ item: A }) => [
2084
+ b(C, {
2085
+ class: ae(["wx-category-row", { "is-hidden": !A.is_visible }]),
2086
+ to: `${t.options.path}/${A.id}`
2087
+ }, {
2088
+ default: g(() => [
2089
+ O("span", xn, [
2090
+ b(n(G), {
2091
+ truncate: "",
2092
+ weight: "medium"
2093
+ }, {
2094
+ default: g(() => [
2095
+ V(L(A.name), 1)
2096
+ ]),
2097
+ _: 2
2098
+ }, 1024),
2099
+ A.is_visible ? U("", !0) : (p(), $(n(ot), {
2100
+ key: 0,
2101
+ content: n(s)("hidden")
2102
+ }, {
2103
+ default: g(() => [
2104
+ b(n(Ve), {
2105
+ name: "eye-off",
2106
+ size: "sm"
2107
+ })
2108
+ ]),
2109
+ _: 1
2110
+ }, 8, ["content"]))
2111
+ ]),
2112
+ b(n(G), {
2113
+ size: "sm",
2114
+ tone: "muted",
2115
+ truncate: ""
2116
+ }, {
2117
+ default: g(() => [
2118
+ V(L(A.path === null ? n(s)("no-address") : `/${A.path}`), 1)
2119
+ ]),
2120
+ _: 2
2121
+ }, 1024)
2122
+ ]),
2123
+ _: 2
2124
+ }, 1032, ["class", "to"])
2125
+ ]),
2126
+ actions: g(({ item: A }) => [
2127
+ b(n(G), {
2128
+ class: "wx-category-row__count",
2129
+ size: "sm",
2130
+ tone: "muted"
2131
+ }, {
2132
+ default: g(() => [
2133
+ V(L(n(s)("count", { count: d(A) })), 1)
2134
+ ]),
2135
+ _: 2
2136
+ }, 1024),
2137
+ b(Ue, {
2138
+ actions: M(A),
2139
+ label: A.name
2140
+ }, null, 8, ["actions", "label"])
2141
+ ]),
2142
+ _: 1
2143
+ }, 8, ["modelValue", "item-label", "disabled"]),
2144
+ b(n(be), {
2145
+ class: "wx-categories__note",
2146
+ type: "info",
2147
+ description: n(s)("order")
2148
+ }, null, 8, ["description"])
2149
+ ], 64))
2150
+ ]),
2151
+ _: 1
2152
+ }, 8, ["title", "actions"]);
2153
+ };
2154
+ }
2155
+ }), _n = {
2156
+ class: "wx-save-state",
2157
+ role: "status",
2158
+ "aria-live": "polite"
2159
+ }, $n = /* @__PURE__ */ N({
2160
+ __name: "SaveState",
2161
+ props: {
2162
+ state: {},
2163
+ linger: { default: 2e3 }
2164
+ },
2165
+ setup(e) {
2166
+ const t = e, a = P("webx-admin"), l = W(!1);
2167
+ let i = null;
2168
+ ee(
2169
+ () => t.state,
2170
+ (o, r) => {
2171
+ i !== null && clearTimeout(i), l.value = r === "saving" && o === "saved", l.value && (i = window.setTimeout(() => {
2172
+ l.value = !1, i = null;
2173
+ }, t.linger));
2174
+ }
2175
+ );
2176
+ const s = x(
2177
+ () => t.state === "saving" ? "saving" : l.value ? "saved" : null
2178
+ );
2179
+ return Qe(() => {
2180
+ i !== null && clearTimeout(i);
2181
+ }), (o, r) => (p(), T("span", _n, [
2182
+ s.value ? (p(), $(n(Ve), {
2183
+ key: 0,
2184
+ class: ae(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
2185
+ name: s.value === "saving" ? "loader" : "check",
2186
+ spin: s.value === "saving",
2187
+ label: n(a)(`editor.${s.value}`)
2188
+ }, null, 8, ["class", "name", "spin", "label"])) : U("", !0)
2189
+ ]));
2190
+ }
2191
+ }), Tn = /* @__PURE__ */ Y($n, [["__scopeId", "data-v-216e5e44"]]), Sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ N({
1665
2192
  __name: "Screen",
1666
- props: /* @__PURE__ */ ee({
2193
+ props: /* @__PURE__ */ oe({
1667
2194
  name: {},
1668
2195
  errors: { default: void 0 },
1669
2196
  disabled: { type: Boolean, default: !1 },
@@ -1674,39 +2201,39 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1674
2201
  modelValue: { default: () => ({}) },
1675
2202
  modelModifiers: {}
1676
2203
  }),
1677
- emits: /* @__PURE__ */ ee(["loaded"], ["update:modelValue"]),
1678
- setup(e, { expose: t, emit: n }) {
1679
- const a = e, i = n, s = de(e, "modelValue"), l = q(), r = V("webx-admin"), u = C(null), d = C(null);
1680
- async function v() {
1681
- u.value = null, d.value = null;
2204
+ emits: /* @__PURE__ */ oe(["loaded"], ["update:modelValue"]),
2205
+ setup(e, { expose: t, emit: a }) {
2206
+ const l = e, i = a, s = ue(e, "modelValue"), o = X(), r = P("webx-admin"), u = W(null), c = W(null);
2207
+ async function h() {
2208
+ u.value = null, c.value = null;
1682
2209
  try {
1683
- const m = await l.loadScreen(a.name);
2210
+ const m = await o.loadScreen(l.name);
1684
2211
  u.value = m, i("loaded", m);
1685
2212
  } catch (m) {
1686
- d.value = m instanceof Error ? m.message : String(m);
2213
+ c.value = m instanceof Error ? m.message : String(m);
1687
2214
  }
1688
2215
  }
1689
- return J([() => a.name, () => l.i18n.state.locale], () => {
1690
- v();
1691
- }, { immediate: !0 }), t({ reload: v }), (m, p) => (f(), $("div", Hn, [
1692
- d.value ? (f(), S(o(Re), {
2216
+ return ee([() => l.name, () => o.i18n.state.locale], () => {
2217
+ h();
2218
+ }, { immediate: !0 }), t({ reload: h }), (m, v) => (p(), T("div", Sn, [
2219
+ c.value ? (p(), $(n(be), {
1693
2220
  key: 0,
1694
2221
  type: "danger",
1695
- title: o(r)("shell.error-title"),
1696
- description: d.value
1697
- }, null, 8, ["title", "description"])) : u.value === null ? (f(), S(o(Ue), {
2222
+ title: n(r)("shell.error-title"),
2223
+ description: c.value
2224
+ }, null, 8, ["title", "description"])) : u.value === null ? (p(), $(n(re), {
1698
2225
  key: 1,
1699
2226
  rows: 4
1700
- })) : (f(), S(o(Ct), {
2227
+ })) : (p(), $(n(Qt), {
1701
2228
  key: 2,
1702
2229
  modelValue: s.value,
1703
- "onUpdate:modelValue": p[0] || (p[0] = (c) => s.value = c),
2230
+ "onUpdate:modelValue": v[0] || (v[0] = (d) => s.value = d),
1704
2231
  root: u.value,
1705
- patch: o(l).screenPatch(e.name),
1706
- types: o(l).types,
2232
+ patch: n(o).screenPatch(e.name),
2233
+ types: n(o).types,
1707
2234
  errors: e.errors,
1708
- translate: o(l).i18n.t,
1709
- can: o(l).can,
2235
+ translate: n(o).i18n.t,
2236
+ can: n(o).can,
1710
2237
  disabled: e.disabled,
1711
2238
  "label-position": e.labelPosition,
1712
2239
  "label-width": e.labelWidth,
@@ -1714,63 +2241,225 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1714
2241
  }, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
1715
2242
  ]));
1716
2243
  }
1717
- }), ha = 76, On = {
1718
- class: "wx-save-state",
1719
- role: "status",
1720
- "aria-live": "polite"
1721
- }, jn = /* @__PURE__ */ E({
1722
- __name: "SaveState",
2244
+ }), Wn = /* @__PURE__ */ N({
2245
+ name: "WxCategoryEditorPage",
2246
+ __name: "CategoryEditorPage",
1723
2247
  props: {
1724
- state: {},
1725
- linger: { default: 2e3 }
2248
+ options: {}
1726
2249
  },
1727
2250
  setup(e) {
1728
- const t = e, n = V("webx-admin"), a = C(!1);
1729
- let i = null;
1730
- J(
1731
- () => t.state,
1732
- (l, r) => {
1733
- i !== null && clearTimeout(i), a.value = r === "saving" && l === "saved", a.value && (i = window.setTimeout(() => {
1734
- a.value = !1, i = null;
1735
- }, t.linger));
2251
+ const t = e, a = X(), l = xe(a, t.options.api), i = Ze(), s = ge(), o = at(), r = Ne(t.options.words), u = Re(), c = x(() => Number(i.params.id)), h = x(() => t.options.path), m = W(null), v = W({}), d = W(null), w = W(""), f = W(!0), y = W(!1), k = W({}), M = x(() => a.can(t.options.manage)), J = x(() => JSON.stringify(v.value)), S = x(() => w.value !== "" && J.value !== w.value), B = x(() => y.value ? "saving" : S.value ? "unsaved" : "saved"), C = x(
2252
+ () => a.state.manifest?.modules.find((z) => z.id === t.options.module)?.title ?? ""
2253
+ ), A = x(() => {
2254
+ const z = v.value.title;
2255
+ return Ht(z, o.active.value, m.value?.name ?? "") || r("untitled");
2256
+ });
2257
+ yn({ category: m, values: v, prefix: d, moving: () => r("address-moving") }), La({
2258
+ values: v,
2259
+ prefix: d,
2260
+ path: x(() => m.value?.path),
2261
+ moving: () => r("address-moving")
2262
+ });
2263
+ function E(z) {
2264
+ m.value = z.category, v.value = z.values, d.value = z.prefix, w.value = JSON.stringify(z.values);
2265
+ }
2266
+ async function K() {
2267
+ f.value = !0;
2268
+ try {
2269
+ E(await l.get(c.value));
2270
+ } catch (z) {
2271
+ D.danger(u(z)), s.push(h.value);
2272
+ } finally {
2273
+ f.value = !1;
1736
2274
  }
1737
- );
1738
- const s = x(
1739
- () => t.state === "saving" ? "saving" : a.value ? "saved" : null
1740
- );
1741
- return Qe(() => {
1742
- i !== null && clearTimeout(i);
1743
- }), (l, r) => (f(), $("span", On, [
1744
- s.value ? (f(), S(o(ze), {
1745
- key: 0,
1746
- class: G(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
1747
- name: s.value === "saving" ? "loader" : "check",
1748
- spin: s.value === "saving",
1749
- label: o(n)(`editor.${s.value}`)
1750
- }, null, 8, ["class", "name", "spin", "label"])) : z("", !0)
1751
- ]));
2275
+ }
2276
+ async function le() {
2277
+ if (!(!m.value || y.value || !M.value)) {
2278
+ y.value = !0, k.value = {};
2279
+ try {
2280
+ E(await l.save(m.value.id, v.value)), D.success(r("saved"));
2281
+ } catch (z) {
2282
+ const q = z.body;
2283
+ q?.errors ? (k.value = q.errors, D.danger(r("save-failed"))) : D.danger(u(z));
2284
+ } finally {
2285
+ y.value = !1;
2286
+ }
2287
+ }
2288
+ }
2289
+ async function ie() {
2290
+ const z = m.value;
2291
+ if (!(!z || !await he({
2292
+ title: r("delete-title", { name: z.name }),
2293
+ message: r("delete-text"),
2294
+ confirmText: r("delete"),
2295
+ cancelText: r("cancel"),
2296
+ tone: "danger"
2297
+ })))
2298
+ try {
2299
+ await l.remove(z.id), D.success(r("deleted")), w.value = J.value, s.push(h.value);
2300
+ } catch (_) {
2301
+ D.danger(u(_));
2302
+ }
2303
+ }
2304
+ function te(z) {
2305
+ S.value && z.preventDefault();
2306
+ }
2307
+ function ke(z) {
2308
+ (z.ctrlKey || z.metaKey) && z.key.toLowerCase() === "s" && (z.preventDefault(), S.value && le());
2309
+ }
2310
+ ee(c, () => {
2311
+ K();
2312
+ }), Le(() => {
2313
+ K(), window.addEventListener("beforeunload", te);
2314
+ }), Qe(() => {
2315
+ window.removeEventListener("beforeunload", te);
2316
+ }), Tt(async () => !S.value || !M.value ? !0 : await he({
2317
+ title: r("leave-title"),
2318
+ message: r("leave-text"),
2319
+ confirmText: r("leave"),
2320
+ cancelText: r("cancel"),
2321
+ tone: "danger"
2322
+ }));
2323
+ const _e = x(() => {
2324
+ const z = m.value, q = [];
2325
+ return z && (z.url && z.is_visible && q.push({ key: "site", label: r("open-on-site"), icon: "link", href: z.url }), M.value && q.push({
2326
+ key: "delete",
2327
+ label: r("delete"),
2328
+ icon: "trash",
2329
+ danger: !0,
2330
+ menu: !0,
2331
+ run: () => {
2332
+ ie();
2333
+ }
2334
+ })), q;
2335
+ });
2336
+ return (z, q) => (p(), T("div", {
2337
+ class: "wx-category-editor",
2338
+ onKeydown: ke
2339
+ }, [
2340
+ f.value || !m.value ? (p(), T(H, { key: 0 }, [
2341
+ b(n(re), {
2342
+ class: "wx-category-editor__ghost",
2343
+ title: "",
2344
+ rows: 1
2345
+ }),
2346
+ b(n(Se), null, {
2347
+ default: g(() => [
2348
+ b(n(re), { rows: 6 })
2349
+ ]),
2350
+ _: 1
2351
+ })
2352
+ ], 64)) : (p(), T(H, { key: 1 }, [
2353
+ b(st, {
2354
+ divider: "",
2355
+ back: h.value,
2356
+ "back-label": C.value,
2357
+ title: A.value,
2358
+ subtitle: m.value.path === null ? void 0 : `/${m.value.path}`,
2359
+ actions: _e.value
2360
+ }, Ae({
2361
+ trail: g(() => [
2362
+ b(n(jt), {
2363
+ size: "sm",
2364
+ label: n(r)("trail")
2365
+ }, {
2366
+ default: g(() => [
2367
+ b(n(Pe), {
2368
+ as: "router-link",
2369
+ to: h.value
2370
+ }, {
2371
+ default: g(() => [
2372
+ V(L(C.value), 1)
2373
+ ]),
2374
+ _: 1
2375
+ }, 8, ["to"]),
2376
+ b(n(Pe), { current: "" }, {
2377
+ default: g(() => [
2378
+ V(L(A.value), 1)
2379
+ ]),
2380
+ _: 1
2381
+ })
2382
+ ]),
2383
+ _: 1
2384
+ }, 8, ["label"])
2385
+ ]),
2386
+ _: 2
2387
+ }, [
2388
+ m.value.is_visible ? void 0 : {
2389
+ name: "title-after",
2390
+ fn: g(() => [
2391
+ b(n(ze), { dot: "" }, {
2392
+ default: g(() => [
2393
+ V(L(n(r)("hidden")), 1)
2394
+ ]),
2395
+ _: 1
2396
+ })
2397
+ ]),
2398
+ key: "0"
2399
+ }
2400
+ ]), 1032, ["back", "back-label", "title", "subtitle", "actions"]),
2401
+ b(Cn, {
2402
+ modelValue: v.value,
2403
+ "onUpdate:modelValue": q[0] || (q[0] = (_) => v.value = _),
2404
+ name: t.options.screen,
2405
+ errors: k.value,
2406
+ disabled: !M.value || y.value
2407
+ }, null, 8, ["modelValue", "name", "errors", "disabled"]),
2408
+ M.value ? (p(), $(n(Kt), { key: 0 }, {
2409
+ state: g(() => [
2410
+ b(Tn, { state: B.value }, null, 8, ["state"])
2411
+ ]),
2412
+ default: g(() => [
2413
+ b(n(Z), {
2414
+ type: "primary",
2415
+ loading: y.value,
2416
+ disabled: !S.value,
2417
+ onClick: le
2418
+ }, {
2419
+ default: g(() => [
2420
+ V(L(n(r)("save")), 1)
2421
+ ]),
2422
+ _: 1
2423
+ }, 8, ["loading", "disabled"])
2424
+ ]),
2425
+ _: 1
2426
+ })) : U("", !0)
2427
+ ], 64))
2428
+ ], 32));
1752
2429
  }
1753
- }), pa = /* @__PURE__ */ F(jn, [["__scopeId", "data-v-216e5e44"]]), ba = /* @__PURE__ */ E({
2430
+ }), Ln = /* @__PURE__ */ Y(Wn, [["__scopeId", "data-v-86d85f8c"]]);
2431
+ function el(e) {
2432
+ return [
2433
+ { path: e.path, name: e.name, component: kn, props: { options: e } },
2434
+ {
2435
+ path: `${e.path}/:id(\\d+)`,
2436
+ name: `${e.name}.edit`,
2437
+ component: Ln,
2438
+ props: { options: e }
2439
+ }
2440
+ ];
2441
+ }
2442
+ const tl = 76, al = /* @__PURE__ */ N({
1754
2443
  __name: "FilterChips",
1755
2444
  props: {
1756
2445
  filters: {}
1757
2446
  },
1758
2447
  setup(e) {
1759
- return (t, n) => (f(!0), $(D, null, K(e.filters, (a) => (f(), S(o(wt), {
1760
- key: a.key,
2448
+ return (t, a) => (p(!0), T(H, null, Q(e.filters, (l) => (p(), $(n(ze), {
2449
+ key: l.key,
1761
2450
  class: "wx-filter-chip",
1762
2451
  size: "sm",
1763
2452
  round: "",
1764
2453
  closable: "",
1765
- onClose: (i) => a.clear()
2454
+ onClose: (i) => l.clear()
1766
2455
  }, {
1767
2456
  default: g(() => [
1768
- R(W(a.label), 1)
2457
+ V(L(l.label), 1)
1769
2458
  ]),
1770
2459
  _: 2
1771
2460
  }, 1032, ["onClose"]))), 128));
1772
2461
  }
1773
- }), Kn = { class: "wx-rename__footer" }, qn = /* @__PURE__ */ E({
2462
+ }), An = { class: "wx-rename__footer" }, zn = /* @__PURE__ */ N({
1774
2463
  __name: "RenameButton",
1775
2464
  props: {
1776
2465
  name: { default: "" },
@@ -1781,21 +2470,21 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1781
2470
  },
1782
2471
  emits: ["rename"],
1783
2472
  setup(e, { emit: t }) {
1784
- const n = e, a = t, i = V("webx-admin"), s = C(!1), l = C(n.name), r = C(null), u = x(() => n.label ?? i("editor.rename"));
1785
- J(s, async (v) => {
1786
- v && (l.value = n.name, await Ze(), r.value?.focus(), r.value?.select());
2473
+ const a = e, l = t, i = P("webx-admin"), s = W(!1), o = W(a.name), r = W(null), u = x(() => a.label ?? i("editor.rename"));
2474
+ ee(s, async (h) => {
2475
+ h && (o.value = a.name, await Ge(), r.value?.focus(), r.value?.select());
1787
2476
  });
1788
- function d() {
1789
- const v = l.value.trim();
1790
- if (v === "" || v === n.name) {
2477
+ function c() {
2478
+ const h = o.value.trim();
2479
+ if (h === "" || h === a.name) {
1791
2480
  s.value = !1;
1792
2481
  return;
1793
2482
  }
1794
- a("rename", v), s.value = !1;
2483
+ l("rename", h), s.value = !1;
1795
2484
  }
1796
- return (v, m) => (f(), S(o(xt), {
2485
+ return (h, m) => (p(), $(n(qt), {
1797
2486
  open: s.value,
1798
- "onUpdate:open": m[2] || (m[2] = (p) => s.value = p),
2487
+ "onUpdate:open": m[2] || (m[2] = (v) => s.value = v),
1799
2488
  title: u.value,
1800
2489
  width: 320,
1801
2490
  side: "bottom",
@@ -1803,7 +2492,7 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1803
2492
  teleport: ""
1804
2493
  }, {
1805
2494
  trigger: g(() => [
1806
- k(o(ne), {
2495
+ b(n(se), {
1807
2496
  type: "edit",
1808
2497
  title: u.value,
1809
2498
  size: e.size,
@@ -1811,27 +2500,27 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1811
2500
  }, null, 8, ["title", "size", "disabled"])
1812
2501
  ]),
1813
2502
  default: g(() => [
1814
- M("form", {
2503
+ O("form", {
1815
2504
  class: "wx-rename",
1816
- onSubmit: Le(d, ["prevent"])
2505
+ onSubmit: Ke(c, ["prevent"])
1817
2506
  }, [
1818
- k(o(Ce), {
2507
+ b(n(ye), {
1819
2508
  ref_key: "field",
1820
2509
  ref: r,
1821
- modelValue: l.value,
1822
- "onUpdate:modelValue": m[0] || (m[0] = (p) => l.value = p),
2510
+ modelValue: o.value,
2511
+ "onUpdate:modelValue": m[0] || (m[0] = (v) => o.value = v),
1823
2512
  "aria-label": u.value,
1824
2513
  placeholder: e.placeholder,
1825
- onKeydown: m[1] || (m[1] = et((p) => s.value = !1, ["esc"]))
2514
+ onKeydown: m[1] || (m[1] = Je((v) => s.value = !1, ["esc"]))
1826
2515
  }, null, 8, ["modelValue", "aria-label", "placeholder"]),
1827
- M("div", Kn, [
1828
- k(o(Z), {
2516
+ O("div", An, [
2517
+ b(n(Z), {
1829
2518
  type: "primary",
1830
2519
  size: "sm",
1831
2520
  "native-type": "submit"
1832
2521
  }, {
1833
2522
  default: g(() => [
1834
- R(W(o(i)("editor.save")), 1)
2523
+ V(L(n(i)("editor.save")), 1)
1835
2524
  ]),
1836
2525
  _: 1
1837
2526
  })
@@ -1841,7 +2530,7 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1841
2530
  _: 1
1842
2531
  }, 8, ["open", "title"]));
1843
2532
  }
1844
- }), ga = /* @__PURE__ */ F(qn, [["__scopeId", "data-v-d879e8d3"]]), Yn = ["innerHTML"], Xn = /* @__PURE__ */ E({
2533
+ }), nl = /* @__PURE__ */ Y(zn, [["__scopeId", "data-v-d879e8d3"]]), Vn = ["innerHTML"], En = /* @__PURE__ */ N({
1845
2534
  __name: "HelpButton",
1846
2535
  props: {
1847
2536
  body: {},
@@ -1851,33 +2540,33 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1851
2540
  width: { default: 720 }
1852
2541
  },
1853
2542
  setup(e) {
1854
- const t = e, n = V("webx-admin"), a = C(!1), i = x(() => t.title ?? n("help.title")), s = x(() => Bn(t.body));
1855
- return (l, r) => (f(), $(D, null, [
1856
- k(o(ne), {
2543
+ const t = e, a = P("webx-admin"), l = W(!1), i = x(() => t.title ?? a("help.title")), s = x(() => cn(t.body));
2544
+ return (o, r) => (p(), T(H, null, [
2545
+ b(n(se), {
1857
2546
  type: "details",
1858
2547
  icon: "question",
1859
2548
  tone: "neutral",
1860
2549
  size: e.size,
1861
2550
  title: e.label ?? i.value,
1862
- onClick: r[0] || (r[0] = (u) => a.value = !0)
2551
+ onClick: r[0] || (r[0] = (u) => l.value = !0)
1863
2552
  }, null, 8, ["size", "title"]),
1864
- k(o(kt), {
1865
- open: a.value,
1866
- "onUpdate:open": r[1] || (r[1] = (u) => a.value = u),
2553
+ b(n(nt), {
2554
+ open: l.value,
2555
+ "onUpdate:open": r[1] || (r[1] = (u) => l.value = u),
1867
2556
  title: i.value,
1868
2557
  width: e.width
1869
2558
  }, {
1870
2559
  default: g(() => [
1871
- M("div", {
2560
+ O("div", {
1872
2561
  class: "wx-help",
1873
2562
  innerHTML: s.value
1874
- }, null, 8, Yn)
2563
+ }, null, 8, Vn)
1875
2564
  ]),
1876
2565
  _: 1
1877
2566
  }, 8, ["open", "title", "width"])
1878
2567
  ], 64));
1879
2568
  }
1880
- }), ya = /* @__PURE__ */ F(Xn, [["__scopeId", "data-v-6c280d42"]]), Me = /* @__PURE__ */ E({
2569
+ }), ll = /* @__PURE__ */ Y(En, [["__scopeId", "data-v-6c280d42"]]), pt = /* @__PURE__ */ N({
1881
2570
  name: "WxDate",
1882
2571
  __name: "DateText",
1883
2572
  props: {
@@ -1887,46 +2576,46 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1887
2576
  tone: { default: "muted" }
1888
2577
  },
1889
2578
  setup(e) {
1890
- const t = e, n = De(), a = x(() => t.compact ? n.compact(t.value) : n.short(t.value)), i = x(() => n.exact(t.value)), s = x(() => n.iso(t.value));
1891
- return (l, r) => i.value ? (f(), S(o(_t), {
2579
+ const t = e, a = vt(), l = x(() => t.compact ? a.compact(t.value) : a.short(t.value)), i = x(() => a.exact(t.value)), s = x(() => a.iso(t.value));
2580
+ return (o, r) => i.value ? (p(), $(n(ot), {
1892
2581
  key: 0,
1893
2582
  content: i.value
1894
2583
  }, {
1895
2584
  default: g(() => [
1896
- k(o(H), {
2585
+ b(n(G), {
1897
2586
  as: "time",
1898
2587
  datetime: s.value,
1899
2588
  size: e.size,
1900
2589
  tone: e.tone
1901
2590
  }, {
1902
2591
  default: g(() => [
1903
- R(W(a.value), 1)
2592
+ V(L(l.value), 1)
1904
2593
  ]),
1905
2594
  _: 1
1906
2595
  }, 8, ["datetime", "size", "tone"])
1907
2596
  ]),
1908
2597
  _: 1
1909
- }, 8, ["content"])) : (f(), S(o(H), {
2598
+ }, 8, ["content"])) : (p(), $(n(G), {
1910
2599
  key: 1,
1911
2600
  size: e.size,
1912
2601
  tone: e.tone
1913
2602
  }, {
1914
2603
  default: g(() => [
1915
- R(W(a.value), 1)
2604
+ V(L(l.value), 1)
1916
2605
  ]),
1917
2606
  _: 1
1918
2607
  }, 8, ["size", "tone"]));
1919
2608
  }
1920
- }), Gn = { class: "wx-notes" }, Jn = {
2609
+ }), Un = { class: "wx-notes" }, Rn = {
1921
2610
  key: 3,
1922
2611
  class: "wx-notes__list"
1923
- }, Qn = { class: "wx-note__body" }, Zn = { class: "wx-note__head" }, ea = { class: "wx-note__buttons" }, ta = {
2612
+ }, Nn = { class: "wx-note__body" }, Bn = { class: "wx-note__head" }, In = { class: "wx-note__buttons" }, Pn = {
1924
2613
  key: 1,
1925
2614
  class: "wx-note__text"
1926
- }, na = {
2615
+ }, Dn = {
1927
2616
  key: 4,
1928
2617
  class: "wx-notes__new"
1929
- }, aa = /* @__PURE__ */ E({
2618
+ }, Mn = /* @__PURE__ */ N({
1930
2619
  name: "WxNotes",
1931
2620
  __name: "NotesFeed",
1932
2621
  props: {
@@ -1937,52 +2626,52 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1937
2626
  },
1938
2627
  emits: ["change"],
1939
2628
  setup(e, { emit: t }) {
1940
- const n = e, a = t, i = q(), s = V("webx-admin"), l = Dn(), r = C([]), u = C(!0), d = C(""), v = C(!1), m = C(null), p = C(""), c = x(() => Fn(i, n.type, n.id)), _ = x(() => n.title ?? s("notes.title"));
1941
- async function h() {
2629
+ const a = e, l = t, i = X(), s = P("webx-admin"), o = Re(), r = W([]), u = W(!0), c = W(""), h = W(!1), m = W(null), v = W(""), d = x(() => gn(i, a.type, a.id)), w = x(() => a.title ?? s("notes.title"));
2630
+ async function f() {
1942
2631
  u.value = !0;
1943
2632
  try {
1944
- r.value = await c.value.list();
1945
- } catch (T) {
1946
- X.danger(l(T));
2633
+ r.value = await d.value.list();
2634
+ } catch (C) {
2635
+ D.danger(o(C));
1947
2636
  } finally {
1948
2637
  u.value = !1;
1949
2638
  }
1950
2639
  }
1951
- J(
1952
- () => [n.type, n.id],
2640
+ ee(
2641
+ () => [a.type, a.id],
1953
2642
  () => {
1954
- m.value = null, d.value = "", h();
2643
+ m.value = null, c.value = "", f();
1955
2644
  },
1956
2645
  { immediate: !0 }
1957
2646
  );
1958
- async function b() {
1959
- const T = d.value.trim();
1960
- if (!(T === "" || v.value)) {
1961
- v.value = !0;
2647
+ async function y() {
2648
+ const C = c.value.trim();
2649
+ if (!(C === "" || h.value)) {
2650
+ h.value = !0;
1962
2651
  try {
1963
- r.value = [...r.value, await c.value.add(T)], d.value = "", a("change");
1964
- } catch (B) {
1965
- X.danger(l(B));
2652
+ r.value = [...r.value, await d.value.add(C)], c.value = "", l("change");
2653
+ } catch (A) {
2654
+ D.danger(o(A));
1966
2655
  } finally {
1967
- v.value = !1;
2656
+ h.value = !1;
1968
2657
  }
1969
2658
  }
1970
2659
  }
1971
- function w(T) {
1972
- m.value = T.id, p.value = T.body;
2660
+ function k(C) {
2661
+ m.value = C.id, v.value = C.body;
1973
2662
  }
1974
- async function O(T) {
1975
- const B = p.value.trim();
1976
- if (B !== "")
2663
+ async function M(C) {
2664
+ const A = v.value.trim();
2665
+ if (A !== "")
1977
2666
  try {
1978
- const L = await c.value.save(T.id, B);
1979
- r.value = r.value.map((P) => P.id === L.id ? L : P), m.value = null, X.success(s("notes.saved")), a("change");
1980
- } catch (L) {
1981
- X.danger(l(L));
2667
+ const E = await d.value.save(C.id, A);
2668
+ r.value = r.value.map((K) => K.id === E.id ? E : K), m.value = null, D.success(s("notes.saved")), l("change");
2669
+ } catch (E) {
2670
+ D.danger(o(E));
1982
2671
  }
1983
2672
  }
1984
- async function Q(T) {
1985
- if (await Tt({
2673
+ async function J(C) {
2674
+ if (await he({
1986
2675
  title: s("notes.delete-title"),
1987
2676
  message: s("notes.delete-text"),
1988
2677
  confirmText: s("notes.delete"),
@@ -1990,235 +2679,251 @@ const Hn = { class: "wx-screen-host" }, va = /* @__PURE__ */ E({
1990
2679
  tone: "danger"
1991
2680
  }))
1992
2681
  try {
1993
- await c.value.remove(T.id), r.value = r.value.filter((L) => L.id !== T.id), X.success(s("notes.deleted")), a("change");
1994
- } catch (L) {
1995
- X.danger(l(L));
2682
+ await d.value.remove(C.id), r.value = r.value.filter((E) => E.id !== C.id), D.success(s("notes.deleted")), l("change");
2683
+ } catch (E) {
2684
+ D.danger(o(E));
1996
2685
  }
1997
2686
  }
1998
- function Y(T) {
1999
- return !n.can || !T.is_mine ? [] : [
2000
- { key: "edit", icon: "edit", label: s("notes.edit"), run: () => w(T) },
2687
+ function S(C) {
2688
+ return !a.can || !C.is_mine ? [] : [
2689
+ { key: "edit", icon: "edit", label: s("notes.edit"), run: () => k(C) },
2001
2690
  {
2002
2691
  key: "delete",
2003
2692
  icon: "trash",
2004
2693
  label: s("notes.delete"),
2005
2694
  danger: !0,
2006
2695
  run: () => {
2007
- Q(T);
2696
+ J(C);
2008
2697
  }
2009
2698
  }
2010
2699
  ];
2011
2700
  }
2012
- function j(T) {
2013
- return T.author?.name ?? s("notes.unknown-author");
2701
+ function B(C) {
2702
+ return C.author?.name ?? s("notes.unknown-author");
2014
2703
  }
2015
- return (T, B) => (f(), $("section", Gn, [
2016
- _.value ? (f(), S(o(H), {
2704
+ return (C, A) => (p(), T("section", Un, [
2705
+ w.value ? (p(), $(n(G), {
2017
2706
  key: 0,
2018
2707
  weight: "medium",
2019
2708
  class: "wx-notes__title"
2020
2709
  }, {
2021
2710
  default: g(() => [
2022
- R(W(_.value), 1)
2711
+ V(L(w.value), 1)
2023
2712
  ]),
2024
2713
  _: 1
2025
- })) : z("", !0),
2026
- u.value ? (f(), S(o(Ue), {
2714
+ })) : U("", !0),
2715
+ u.value ? (p(), $(n(re), {
2027
2716
  key: 1,
2028
2717
  rows: 2
2029
- })) : r.value.length === 0 ? (f(), S(o($t), {
2718
+ })) : r.value.length === 0 ? (p(), $(n(lt), {
2030
2719
  key: 2,
2031
2720
  size: "sm",
2032
- description: o(s)("notes.empty")
2033
- }, null, 8, ["description"])) : (f(), $("ul", Jn, [
2034
- (f(!0), $(D, null, K(r.value, (L) => (f(), $("li", {
2035
- key: L.id,
2721
+ description: n(s)("notes.empty")
2722
+ }, null, 8, ["description"])) : (p(), T("ul", Rn, [
2723
+ (p(!0), T(H, null, Q(r.value, (E) => (p(), T("li", {
2724
+ key: E.id,
2036
2725
  class: "wx-note"
2037
2726
  }, [
2038
- k(o(St), {
2039
- name: j(L),
2727
+ b(n(Yt), {
2728
+ name: B(E),
2040
2729
  size: "sm",
2041
2730
  tone: "auto"
2042
2731
  }, null, 8, ["name"]),
2043
- M("div", Qn, [
2044
- M("div", Zn, [
2045
- k(o(H), {
2732
+ O("div", Nn, [
2733
+ O("div", Bn, [
2734
+ b(n(G), {
2046
2735
  size: "sm",
2047
2736
  weight: "medium",
2048
2737
  truncate: ""
2049
2738
  }, {
2050
2739
  default: g(() => [
2051
- R(W(j(L)), 1)
2740
+ V(L(B(E)), 1)
2052
2741
  ]),
2053
2742
  _: 2
2054
2743
  }, 1024),
2055
- k(Me, {
2056
- value: L.created_at
2744
+ b(pt, {
2745
+ value: E.created_at
2057
2746
  }, null, 8, ["value"]),
2058
- k(Ee, {
2059
- actions: Y(L),
2060
- label: j(L)
2747
+ b(Ue, {
2748
+ actions: S(E),
2749
+ label: B(E)
2061
2750
  }, null, 8, ["actions", "label"])
2062
2751
  ]),
2063
- m.value === L.id ? (f(), $(D, { key: 0 }, [
2064
- k(o(ke), {
2065
- modelValue: p.value,
2066
- "onUpdate:modelValue": B[0] || (B[0] = (P) => p.value = P),
2752
+ m.value === E.id ? (p(), T(H, { key: 0 }, [
2753
+ b(n(De), {
2754
+ modelValue: v.value,
2755
+ "onUpdate:modelValue": A[0] || (A[0] = (K) => v.value = K),
2067
2756
  autosize: { minRows: 2, maxRows: 10 }
2068
2757
  }, null, 8, ["modelValue"]),
2069
- M("div", ea, [
2070
- k(o(Z), {
2758
+ O("div", In, [
2759
+ b(n(Z), {
2071
2760
  size: "sm",
2072
2761
  type: "primary",
2073
- onClick: (P) => O(L)
2762
+ onClick: (K) => M(E)
2074
2763
  }, {
2075
2764
  default: g(() => [
2076
- R(W(o(s)("notes.save")), 1)
2765
+ V(L(n(s)("notes.save")), 1)
2077
2766
  ]),
2078
2767
  _: 1
2079
2768
  }, 8, ["onClick"]),
2080
- k(o(Z), {
2769
+ b(n(Z), {
2081
2770
  size: "sm",
2082
2771
  variant: "text",
2083
- onClick: B[1] || (B[1] = (P) => m.value = null)
2772
+ onClick: A[1] || (A[1] = (K) => m.value = null)
2084
2773
  }, {
2085
2774
  default: g(() => [
2086
- R(W(o(s)("notes.cancel")), 1)
2775
+ V(L(n(s)("notes.cancel")), 1)
2087
2776
  ]),
2088
2777
  _: 1
2089
2778
  })
2090
2779
  ])
2091
- ], 64)) : (f(), $("p", ta, W(L.body), 1))
2780
+ ], 64)) : (p(), T("p", Pn, L(E.body), 1))
2092
2781
  ])
2093
2782
  ]))), 128))
2094
2783
  ])),
2095
- e.can ? (f(), $("div", na, [
2096
- k(o(ke), {
2097
- modelValue: d.value,
2098
- "onUpdate:modelValue": B[2] || (B[2] = (L) => d.value = L),
2099
- placeholder: o(s)("notes.placeholder"),
2784
+ e.can ? (p(), T("div", Dn, [
2785
+ b(n(De), {
2786
+ modelValue: c.value,
2787
+ "onUpdate:modelValue": A[2] || (A[2] = (E) => c.value = E),
2788
+ placeholder: n(s)("notes.placeholder"),
2100
2789
  autosize: { minRows: 2, maxRows: 8 }
2101
2790
  }, null, 8, ["modelValue", "placeholder"]),
2102
- k(o(Z), {
2791
+ b(n(Z), {
2103
2792
  size: "sm",
2104
2793
  type: "primary",
2105
- disabled: d.value.trim() === "",
2106
- loading: v.value,
2107
- onClick: b
2794
+ disabled: c.value.trim() === "",
2795
+ loading: h.value,
2796
+ onClick: y
2108
2797
  }, {
2109
2798
  default: g(() => [
2110
- R(W(o(s)("notes.add")), 1)
2799
+ V(L(n(s)("notes.add")), 1)
2111
2800
  ]),
2112
2801
  _: 1
2113
2802
  }, 8, ["disabled", "loading"])
2114
- ])) : z("", !0)
2803
+ ])) : U("", !0)
2115
2804
  ]));
2116
2805
  }
2117
- }), wa = /* @__PURE__ */ F(aa, [["__scopeId", "data-v-71004c1a"]]), la = {
2806
+ }), ol = /* @__PURE__ */ Y(Mn, [["__scopeId", "data-v-71004c1a"]]), Fn = {
2118
2807
  key: 1,
2119
2808
  class: "wx-backup-note"
2120
- }, sa = 48, oa = /* @__PURE__ */ E({
2809
+ }, On = 48, Hn = /* @__PURE__ */ N({
2121
2810
  name: "WxBackupNote",
2122
2811
  __name: "BackupNote",
2123
2812
  setup(e) {
2124
- const t = q(), n = De(), a = V("webx-admin"), i = x(() => t.state.manifest?.backup ?? null), s = x(() => i.value !== null && t.can("settings.view")), l = x(() => {
2125
- const d = i.value?.at;
2126
- if (d == null) return !0;
2127
- const v = new Date(d).getTime();
2128
- return Number.isNaN(v) || Date.now() - v > sa * 36e5;
2813
+ const t = X(), a = vt(), l = P("webx-admin"), i = x(() => t.state.manifest?.backup ?? null), s = x(() => i.value !== null && t.can("settings.view")), o = x(() => {
2814
+ const c = i.value?.at;
2815
+ if (c == null) return !0;
2816
+ const h = new Date(c).getTime();
2817
+ return Number.isNaN(h) || Date.now() - h > On * 36e5;
2129
2818
  }), r = x(() => {
2130
- const d = i.value?.bytes;
2131
- if (d == null) return "";
2132
- const v = ["byte", "kilobyte", "megabyte", "gigabyte", "terabyte"];
2133
- let m = d, p = 0;
2134
- for (; m >= 1024 && p < v.length - 1; )
2135
- m /= 1024, p++;
2819
+ const c = i.value?.bytes;
2820
+ if (c == null) return "";
2821
+ const h = ["byte", "kilobyte", "megabyte", "gigabyte", "terabyte"];
2822
+ let m = c, v = 0;
2823
+ for (; m >= 1024 && v < h.length - 1; )
2824
+ m /= 1024, v++;
2136
2825
  return new Intl.NumberFormat(t.i18n.state.locale, {
2137
2826
  style: "unit",
2138
- unit: v[p],
2827
+ unit: h[v],
2139
2828
  unitDisplay: "short",
2140
- maximumFractionDigits: m >= 10 || p === 0 ? 0 : 1
2829
+ maximumFractionDigits: m >= 10 || v === 0 ? 0 : 1
2141
2830
  }).format(m);
2142
2831
  }), u = x(
2143
- () => i.value?.at == null ? a("backup.never") : a("backup.stale", { date: n.short(i.value.at) })
2832
+ () => i.value?.at == null ? l("backup.never") : l("backup.stale", { date: a.short(i.value.at) })
2144
2833
  );
2145
- return (d, v) => s.value && l.value ? (f(), S(o(Re), {
2834
+ return (c, h) => s.value && o.value ? (p(), $(n(be), {
2146
2835
  key: 0,
2147
2836
  type: "warning",
2148
2837
  variant: "soft",
2149
2838
  description: u.value
2150
- }, null, 8, ["description"])) : s.value ? (f(), $("p", la, [
2151
- k(o(H), {
2839
+ }, null, 8, ["description"])) : s.value ? (p(), T("p", Fn, [
2840
+ b(n(G), {
2152
2841
  size: "sm",
2153
2842
  tone: "muted"
2154
2843
  }, {
2155
2844
  default: g(() => [
2156
- R(W(o(a)("backup.title")), 1)
2845
+ V(L(n(l)("backup.title")), 1)
2157
2846
  ]),
2158
2847
  _: 1
2159
2848
  }),
2160
- k(Me, {
2849
+ b(pt, {
2161
2850
  value: i.value?.at
2162
2851
  }, null, 8, ["value"]),
2163
- r.value ? (f(), S(o(H), {
2852
+ r.value ? (p(), $(n(G), {
2164
2853
  key: 0,
2165
2854
  size: "sm",
2166
2855
  tone: "muted"
2167
2856
  }, {
2168
2857
  default: g(() => [
2169
- R("· " + W(r.value), 1)
2858
+ V("· " + L(r.value), 1)
2170
2859
  ]),
2171
2860
  _: 1
2172
- })) : z("", !0)
2173
- ])) : z("", !0);
2861
+ })) : U("", !0)
2862
+ ])) : U("", !0);
2174
2863
  }
2175
- }), xa = /* @__PURE__ */ F(oa, [["__scopeId", "data-v-beeee67e"]]);
2864
+ }), sl = /* @__PURE__ */ Y(Hn, [["__scopeId", "data-v-beeee67e"]]);
2176
2865
  export {
2177
- un as AdminLanding,
2178
- dn as AdminNav,
2179
- wn as AdminShell,
2180
- pe as HttpError,
2181
- jt as WxBackButton,
2182
- xa as WxBackupNote,
2183
- Me as WxDate,
2184
- ba as WxFilterChips,
2185
- ya as WxHelpButton,
2186
- Ot as WxLinkField,
2187
- Ht as WxLinkPicker,
2188
- nn as WxListScreen,
2189
- wa as WxNotes,
2190
- ga as WxRenameButton,
2191
- an as WxRichTextField,
2192
- Ee as WxRowMenu,
2193
- pa as WxSaveState,
2194
- va as WxScreen,
2195
- Zt as WxScreenHead,
2196
- Be as adminKey,
2197
- Ve as adminMessages,
2198
- ln as adminTypes,
2199
- fa as createAdmin,
2200
- sn as createAdminContext,
2201
- Nn as createDates,
2202
- kn as createHttp,
2203
- ge as createI18n,
2204
- Bt as createLinksApi,
2205
- Fn as createNotesApi,
2206
- Ln as createTheme,
2207
- Et as emptyLink,
2208
- In as errorText,
2209
- ce as i18nKey,
2210
- on as provideAdmin,
2211
- Rt as provideI18n,
2212
- Tn as provideTheme,
2213
- _e as readCookie,
2214
- Bn as renderMarkdown,
2215
- ha as rowMenuWidth,
2216
- Ne as themeKey,
2217
- q as useAdmin,
2218
- De as useDates,
2219
- Dn as useErrorText,
2220
- zt as useI18n,
2221
- ma as useTheme,
2222
- V as useTranslate
2866
+ Ia as AdminLanding,
2867
+ Pa as AdminNav,
2868
+ Xa as AdminShell,
2869
+ Ce as HttpError,
2870
+ ya as WxBackButton,
2871
+ sl as WxBackupNote,
2872
+ sa as WxCategoriesField,
2873
+ kn as WxCategoriesPage,
2874
+ wn as WxCategoryCreateDialog,
2875
+ Ln as WxCategoryEditorPage,
2876
+ Me as WxCategorySlug,
2877
+ pt as WxDate,
2878
+ al as WxFilterChips,
2879
+ ll as WxHelpButton,
2880
+ ga as WxLinkField,
2881
+ ha as WxLinkPicker,
2882
+ it as WxListScreen,
2883
+ ol as WxNotes,
2884
+ nl as WxRenameButton,
2885
+ Wa as WxRichTextField,
2886
+ Ue as WxRowMenu,
2887
+ Tn as WxSaveState,
2888
+ Cn as WxScreen,
2889
+ st as WxScreenHead,
2890
+ Me as WxSlugField,
2891
+ ut as adminKey,
2892
+ ct as adminMessages,
2893
+ Ua as adminTypes,
2894
+ el as categoryRoutes,
2895
+ Jn as createAdmin,
2896
+ Ra as createAdminContext,
2897
+ xe as createCategoriesApi,
2898
+ mn as createDates,
2899
+ Ja as createHttp,
2900
+ Ee as createI18n,
2901
+ ra as createLinksApi,
2902
+ gn as createNotesApi,
2903
+ an as createTheme,
2904
+ ia as emptyLink,
2905
+ fn as errorText,
2906
+ we as i18nKey,
2907
+ bn as itemOrderMode,
2908
+ Na as provideAdmin,
2909
+ ea as provideI18n,
2910
+ La as provideRecordAddress,
2911
+ tn as provideTheme,
2912
+ Fe as readCookie,
2913
+ rt as recordAddressKey,
2914
+ cn as renderMarkdown,
2915
+ aa as reorderItems,
2916
+ tl as rowMenuWidth,
2917
+ dt as themeKey,
2918
+ X as useAdmin,
2919
+ Qn as useCategoryEditor,
2920
+ Ne as useCategoryWords,
2921
+ vt as useDates,
2922
+ Re as useErrorText,
2923
+ Zt as useI18n,
2924
+ Zn as useItemOrder,
2925
+ Aa as useRecordAddress,
2926
+ Gn as useTheme,
2927
+ P as useTranslate
2223
2928
  };
2224
2929
  //# sourceMappingURL=index.js.map