@webx-ui/module-admin 0.16.0 → 0.16.1

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,10 +1,10 @@
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";
1
+ import { inject as ne, reactive as pe, defineComponent as R, useModel as de, 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 Ke, withModifiers as qe, useSlots as gt, useTemplateRef as Ye, normalizeClass as ae, renderSlot as F, createSlots as Ae, provide as Xe, normalizeProps as yt, guardReactiveProps as bt, resolveComponent as j, watchEffect as wt, onUnmounted as xt, isRef as Ge, createApp as kt, h as re, nextTick as Je, withKeys as Qe, onBeforeUnmount as Ze } from "vue";
2
+ import { RouterLink as _t, useRouter as ge, useRoute as et, createRouter as $t, createWebHistory as Tt, onBeforeRouteLeave as St } from "vue-router";
3
+ import { WxSortableList as tt, WxAction as se, WxBadge as ze, WxSelect as at, WxSegmented as Ct, WxAutocomplete as Be, WxText as G, WxInput as ye, WxCheckbox as Ie, WxActions as Wt, WxDropdownItem as Lt, useElementWidth as At, WxHeading as zt, WxButton as Z, WxIcon as Ve, WxTabs as Vt, WxCard as Se, WxRichText as Et, useLocales as nt, WxAlert as be, WxResult as Ut, useResponsiveShell as Rt, shellLayoutFor as Nt, WxToaster as Bt, WebxUI as It, dateLocaleKey as Pt, localesKey as Dt, useModal as Mt, WxDialog as lt, WxFormItem as Ft, WxSpace as Ot, createModal as Ht, WxSkeleton as ue, WxEmpty as ot, WxTooltip as st, toast as D, confirm as he, localizedValue as jt, WxBreadcrumb as Kt, WxBreadcrumbItem as Pe, WxActionBar as qt, WxPopover as Yt, WxAvatar as Xt, WxTextarea as De } from "@webx-ui/core";
4
+ import { watchSystemTheme as Gt, applyTheme as Jt, systemTheme as Qt } from "@webx-ui/tokens";
5
+ import { WxScreenRenderer as Zt } from "@webx-ui/schema";
6
6
  const we = /* @__PURE__ */ Symbol("webx-i18n");
7
- function Zt() {
7
+ function ea() {
8
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().");
@@ -14,7 +14,7 @@ function P(e) {
14
14
  const t = ne(we, null);
15
15
  return t === null ? Ee().scope(e) : t.scope(e);
16
16
  }
17
- function ea(e, t) {
17
+ function ta(e, t) {
18
18
  e.provide(we, t);
19
19
  }
20
20
  function Ee(e = {}) {
@@ -37,7 +37,7 @@ function Ee(e = {}) {
37
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 c === void 0 ? d : ta(d, c);
40
+ return c === void 0 ? d : aa(d, c);
41
41
  }
42
42
  return {
43
43
  state: a,
@@ -53,7 +53,7 @@ function Ee(e = {}) {
53
53
  t: (r, u) => o("", r, u)
54
54
  };
55
55
  }
56
- function ta(e, t) {
56
+ function aa(e, t) {
57
57
  let a = e;
58
58
  for (const [l, i] of Object.entries(t))
59
59
  a = a.replaceAll(`:${l}`, String(i));
@@ -76,12 +76,12 @@ function xe(e, t) {
76
76
  })
77
77
  };
78
78
  }
79
- function aa(e, t, a, l = null) {
79
+ function na(e, t, a, l = null) {
80
80
  const i = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`;
81
81
  return e.http.post(`${i}/reorder`, l === null ? { ids: a } : { ids: a, category: l }).then(() => {
82
82
  });
83
83
  }
84
- const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field__name" }, oa = /* @__PURE__ */ N({
84
+ const la = { class: "wx-categories-field" }, oa = { class: "wx-categories-field__name" }, sa = /* @__PURE__ */ R({
85
85
  name: "WxCategoriesField",
86
86
  __name: "CategoriesField",
87
87
  props: /* @__PURE__ */ oe({
@@ -99,7 +99,7 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
99
99
  }),
100
100
  emits: ["update:modelValue"],
101
101
  setup(e) {
102
- const t = e, a = ue(e, "modelValue"), l = X(), i = P("webx-admin"), s = W([]);
102
+ const t = e, a = de(e, "modelValue"), l = X(), i = P("webx-admin"), s = W([]);
103
103
  ee(
104
104
  () => t.source,
105
105
  async (v) => {
@@ -126,8 +126,8 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
126
126
  function m(v) {
127
127
  a.value = o.value.filter((d) => d !== v);
128
128
  }
129
- return (v, d) => (p(), T("div", na, [
130
- b(n(et), {
129
+ return (v, d) => (p(), T("div", la, [
130
+ b(n(tt), {
131
131
  modelValue: u.value,
132
132
  "onUpdate:modelValue": d[0] || (d[0] = (w) => u.value = w),
133
133
  plain: "",
@@ -138,7 +138,7 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
138
138
  "empty-text": t.emptyText ?? n(i)("categories.field-empty")
139
139
  }, {
140
140
  default: g(({ item: w, index: f }) => [
141
- O("span", la, L(w.name), 1),
141
+ O("span", oa, L(w.name), 1),
142
142
  t.main && f === 0 ? (p(), $(n(ze), {
143
143
  key: 0,
144
144
  type: "primary"
@@ -160,7 +160,7 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
160
160
  ]),
161
161
  _: 1
162
162
  }, 8, ["modelValue", "disabled", "empty-text"]),
163
- b(n(tt), {
163
+ b(n(at), {
164
164
  "model-value": null,
165
165
  options: c.value,
166
166
  placeholder: t.addText ?? n(i)("categories.field-add"),
@@ -178,8 +178,8 @@ const na = { class: "wx-categories-field" }, la = { class: "wx-categories-field_
178
178
  for (const [l, i] of t)
179
179
  a[l] = i;
180
180
  return a;
181
- }, sa = /* @__PURE__ */ Y(oa, [["__scopeId", "data-v-640cd836"]]);
182
- function ia() {
181
+ }, ia = /* @__PURE__ */ Y(sa, [["__scopeId", "data-v-640cd836"]]);
182
+ function ra() {
183
183
  return {
184
184
  target: "entity",
185
185
  entity_type: null,
@@ -190,7 +190,7 @@ function ia() {
190
190
  rel: []
191
191
  };
192
192
  }
193
- function ra(e) {
193
+ function ua(e) {
194
194
  const t = `${e.apiPath}/links`, a = (l) => l.data;
195
195
  return {
196
196
  sources: () => e.http.get(`${t}/sources`).then(a),
@@ -199,19 +199,19 @@ function ra(e) {
199
199
  routes: () => e.http.get(`${t}/routes`).then(a)
200
200
  };
201
201
  }
202
- const ua = { class: "wx-link-picker" }, da = {
202
+ const da = { class: "wx-link-picker" }, ca = {
203
203
  key: 0,
204
204
  class: "wx-link-picker__entity"
205
- }, ca = {
205
+ }, ma = {
206
206
  key: 1,
207
207
  class: "wx-link-picker__url"
208
- }, ma = {
208
+ }, va = {
209
209
  key: 2,
210
210
  class: "wx-link-picker__hash"
211
- }, va = {
211
+ }, fa = {
212
212
  key: 3,
213
213
  class: "wx-link-picker__attributes"
214
- }, fa = { class: "wx-link-picker__rel" }, pa = /* @__PURE__ */ N({
214
+ }, pa = { class: "wx-link-picker__rel" }, ha = /* @__PURE__ */ R({
215
215
  name: "WxLinkPicker",
216
216
  __name: "LinkPicker",
217
217
  props: /* @__PURE__ */ oe({
@@ -224,9 +224,9 @@ const ua = { class: "wx-link-picker" }, da = {
224
224
  }),
225
225
  emits: ["update:modelValue"],
226
226
  setup(e) {
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);
227
+ const t = e, a = de(e, "modelValue"), l = X(), i = ea(), s = ua(l), o = P("webx-admin"), r = W([]), u = W([]), c = W([]), h = W(!1), m = W(null), v = W(""), d = W(null);
228
228
  let w = null;
229
- const f = x(() => a.value ?? ia()), y = x(() => {
229
+ const f = x(() => a.value ?? ra()), y = x(() => {
230
230
  const _ = [
231
231
  { value: "entity", label: o("links.target-entity") },
232
232
  { value: "url", label: o("links.target-url") }
@@ -252,14 +252,14 @@ const ua = { class: "wx-link-picker" }, da = {
252
252
  }
253
253
  );
254
254
  async function S() {
255
- const { entity_type: _, entity_id: R } = f.value;
256
- if (_ === null || R === null) {
255
+ const { entity_type: _, entity_id: N } = f.value;
256
+ if (_ === null || N === null) {
257
257
  d.value = null, v.value = "";
258
258
  return;
259
259
  }
260
- if (d.value?.id === R)
260
+ if (d.value?.id === N)
261
261
  return;
262
- const [I] = await s.resolve([{ type: _, id: R }], i.state.locale);
262
+ const [I] = await s.resolve([{ type: _, id: N }], i.state.locale);
263
263
  d.value = I ?? null, v.value = I?.title ?? o("links.missing"), w = v.value;
264
264
  }
265
265
  async function B() {
@@ -286,8 +286,8 @@ const ua = { class: "wx-link-picker" }, da = {
286
286
  m.value = _ == null ? null : String(_), u.value = [], C("");
287
287
  }
288
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 });
289
+ const N = u.value.find((I) => I.id === _.id);
290
+ N === void 0 || m.value === null || (d.value = N, v.value = N.title, a.value = { ...f.value, entity_type: m.value, entity_id: N.id });
291
291
  }
292
292
  function le() {
293
293
  d.value = null, v.value = "", u.value = [], a.value = { ...f.value, entity_type: null, entity_id: null };
@@ -296,33 +296,33 @@ const ua = { class: "wx-link-picker" }, da = {
296
296
  a.value = { ...f.value, url: _ === "" ? null : _ };
297
297
  }
298
298
  function te(_) {
299
- const R = (typeof _ == "string" || typeof _ == "number" ? String(_) : "").replace(/^#+/, "").trim();
300
- a.value = { ...f.value, hash: R === "" ? null : R };
299
+ const N = (typeof _ == "string" || typeof _ == "number" ? String(_) : "").replace(/^#+/, "").trim();
300
+ a.value = { ...f.value, hash: N === "" ? null : N };
301
301
  }
302
302
  function ke(_) {
303
303
  a.value = { ...f.value, new_tab: _ };
304
304
  }
305
- function _e(_, R) {
305
+ function _e(_, N) {
306
306
  const I = f.value.rel.filter(($e) => $e !== _);
307
- a.value = { ...f.value, rel: R ? [...I, _] : I };
307
+ a.value = { ...f.value, rel: N ? [...I, _] : I };
308
308
  }
309
309
  function z(_) {
310
- const R = [_.hint, _.url ?? void 0].filter(
310
+ const N = [_.hint, _.url ?? void 0].filter(
311
311
  (I) => typeof I == "string" && I !== ""
312
312
  );
313
- return _.available || R.push(o("links.unavailable")), R.join(" · ");
313
+ return _.available || N.push(o("links.unavailable")), N.join(" · ");
314
314
  }
315
315
  const q = ["nofollow", "sponsored", "ugc"];
316
- return (_, R) => (p(), T("div", ua, [
317
- b(n(St), {
316
+ return (_, N) => (p(), T("div", da, [
317
+ b(n(Ct), {
318
318
  options: y.value,
319
319
  "model-value": f.value.target,
320
320
  disabled: t.disabled,
321
321
  "aria-label": n(o)("links.target-entity"),
322
322
  "onUpdate:modelValue": A
323
323
  }, null, 8, ["options", "model-value", "disabled", "aria-label"]),
324
- f.value.target === "entity" ? (p(), T("div", da, [
325
- k.value.length > 1 ? (p(), $(n(tt), {
324
+ f.value.target === "entity" ? (p(), T("div", ca, [
325
+ k.value.length > 1 ? (p(), $(n(at), {
326
326
  key: 0,
327
327
  class: "wx-link-picker__section",
328
328
  options: k.value,
@@ -343,12 +343,12 @@ const ua = { class: "wx-link-picker" }, da = {
343
343
  placeholder: n(o)("links.search"),
344
344
  "aria-label": n(o)("links.search"),
345
345
  disabled: t.disabled,
346
- "onUpdate:modelValue": R[0] || (R[0] = (I) => v.value = I),
346
+ "onUpdate:modelValue": N[0] || (N[0] = (I) => v.value = I),
347
347
  onSearch: C,
348
348
  onSelect: K,
349
349
  onClear: le
350
350
  }, null, 8, ["model-value", "options", "loading", "loading-text", "empty-text", "placeholder", "aria-label", "disabled"])
351
- ])) : f.value.target === "url" ? (p(), T("div", ca, [
351
+ ])) : f.value.target === "url" ? (p(), T("div", ma, [
352
352
  b(n(Be), {
353
353
  "model-value": f.value.url ?? "",
354
354
  options: J.value,
@@ -361,7 +361,7 @@ const ua = { class: "wx-link-picker" }, da = {
361
361
  "onUpdate:modelValue": ie
362
362
  }, null, 8, ["model-value", "options", "empty-text", "placeholder", "aria-label", "disabled"])
363
363
  ])) : U("", !0),
364
- f.value.target !== "none" ? (p(), T("label", ma, [
364
+ f.value.target !== "none" ? (p(), T("label", va, [
365
365
  b(n(G), {
366
366
  size: "sm",
367
367
  tone: "muted"
@@ -371,7 +371,7 @@ const ua = { class: "wx-link-picker" }, da = {
371
371
  ]),
372
372
  _: 1
373
373
  }),
374
- R[2] || (R[2] = O("span", {
374
+ N[2] || (N[2] = O("span", {
375
375
  class: "wx-link-picker__sign",
376
376
  "aria-hidden": "true"
377
377
  }, "#", -1)),
@@ -384,18 +384,18 @@ const ua = { class: "wx-link-picker" }, da = {
384
384
  "onUpdate:modelValue": te
385
385
  }, null, 8, ["model-value", "placeholder", "aria-label", "disabled"])
386
386
  ])) : U("", !0),
387
- t.attributes && f.value.target !== "none" ? (p(), T("div", va, [
387
+ t.attributes && f.value.target !== "none" ? (p(), T("div", fa, [
388
388
  b(n(Ie), {
389
389
  "model-value": f.value.new_tab,
390
390
  disabled: t.disabled,
391
- "onUpdate:modelValue": R[1] || (R[1] = (I) => ke(I))
391
+ "onUpdate:modelValue": N[1] || (N[1] = (I) => ke(I))
392
392
  }, {
393
393
  default: g(() => [
394
394
  V(L(n(o)("links.new-tab")), 1)
395
395
  ]),
396
396
  _: 1
397
397
  }, 8, ["model-value", "disabled"]),
398
- O("div", fa, [
398
+ O("div", pa, [
399
399
  b(n(G), {
400
400
  size: "sm",
401
401
  tone: "muted"
@@ -420,7 +420,7 @@ const ua = { class: "wx-link-picker" }, da = {
420
420
  ])) : U("", !0)
421
421
  ]));
422
422
  }
423
- }), ha = /* @__PURE__ */ Y(pa, [["__scopeId", "data-v-e54022e5"]]), ga = /* @__PURE__ */ N({
423
+ }), ga = /* @__PURE__ */ Y(ha, [["__scopeId", "data-v-e54022e5"]]), ya = /* @__PURE__ */ R({
424
424
  name: "WxLinkField",
425
425
  inheritAttrs: !1,
426
426
  __name: "LinkField",
@@ -434,8 +434,8 @@ const ua = { class: "wx-link-picker" }, da = {
434
434
  }),
435
435
  emits: ["update:modelValue"],
436
436
  setup(e) {
437
- const t = e, a = ue(e, "modelValue");
438
- return (l, i) => (p(), $(ha, je({
437
+ const t = e, a = de(e, "modelValue");
438
+ return (l, i) => (p(), $(ga, Ke({
439
439
  modelValue: a.value,
440
440
  "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s)
441
441
  }, l.$attrs, {
@@ -444,7 +444,7 @@ const ua = { class: "wx-link-picker" }, da = {
444
444
  disabled: t.disabled
445
445
  }), null, 16, ["modelValue", "allow-none", "attributes", "disabled"]));
446
446
  }
447
- }), ya = /* @__PURE__ */ N({
447
+ }), ba = /* @__PURE__ */ R({
448
448
  __name: "BackButton",
449
449
  props: {
450
450
  to: {},
@@ -456,17 +456,17 @@ const ua = { class: "wx-link-picker" }, da = {
456
456
  return (i, s) => (p(), $(n(se), {
457
457
  icon: "arrow-left",
458
458
  class: "wx-back-button",
459
- as: n(kt),
459
+ as: n(_t),
460
460
  to: e.to,
461
461
  title: l.value,
462
462
  size: e.size,
463
463
  "tooltip-side": "bottom"
464
464
  }, null, 8, ["as", "to", "title", "size"]));
465
465
  }
466
- }), ba = {
466
+ }), wa = {
467
467
  key: 0,
468
468
  class: "wx-dropdown__divider"
469
- }, wa = /* @__PURE__ */ N({
469
+ }, xa = /* @__PURE__ */ R({
470
470
  __name: "RowMenu",
471
471
  props: {
472
472
  actions: {},
@@ -481,14 +481,14 @@ const ua = { class: "wx-link-picker" }, da = {
481
481
  const s = l.value.find((o) => o.danger);
482
482
  return s && l.value[0] !== s ? s.key : null;
483
483
  });
484
- return (s, o) => l.value.length > 0 ? (p(), $(n(Ct), {
484
+ return (s, o) => l.value.length > 0 ? (p(), $(n(Wt), {
485
485
  key: 0,
486
486
  class: "wx-row-menu",
487
487
  collapse: "always",
488
488
  align: "end",
489
489
  size: e.size,
490
490
  "aria-label": e.label,
491
- onClick: o[0] || (o[0] = Ke(() => {
491
+ onClick: o[0] || (o[0] = qe(() => {
492
492
  }, ["stop"]))
493
493
  }, {
494
494
  trigger: g(() => [
@@ -502,8 +502,8 @@ const ua = { class: "wx-link-picker" }, da = {
502
502
  (p(!0), T(H, null, Q(l.value, (r) => (p(), T(H, {
503
503
  key: r.key
504
504
  }, [
505
- r.key === i.value ? (p(), T("hr", ba)) : U("", !0),
506
- b(n(Wt), {
505
+ r.key === i.value ? (p(), T("hr", wa)) : U("", !0),
506
+ b(n(Lt), {
507
507
  icon: r.icon,
508
508
  tone: r.danger ? "danger" : "default",
509
509
  href: r.href,
@@ -521,13 +521,13 @@ const ua = { class: "wx-link-picker" }, da = {
521
521
  _: 1
522
522
  }, 8, ["size", "aria-label"])) : U("", !0);
523
523
  }
524
- }), Ue = /* @__PURE__ */ Y(wa, [["__scopeId", "data-v-cab01f7f"]]), xa = ["data-level"], ka = {
524
+ }), Ue = /* @__PURE__ */ Y(xa, [["__scopeId", "data-v-cab01f7f"]]), ka = ["data-level"], _a = {
525
525
  key: 0,
526
526
  class: "wx-screen-head__trail"
527
- }, _a = { class: "wx-screen-head__name" }, $a = {
527
+ }, $a = { class: "wx-screen-head__name" }, Ta = {
528
528
  key: 4,
529
529
  class: "wx-screen-head__actions"
530
- }, Ta = /* @__PURE__ */ N({
530
+ }, Sa = /* @__PURE__ */ R({
531
531
  __name: "ScreenHead",
532
532
  props: {
533
533
  title: { default: void 0 },
@@ -541,7 +541,7 @@ const ua = { class: "wx-link-picker" }, da = {
541
541
  },
542
542
  emits: ["back"],
543
543
  setup(e, { emit: t }) {
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(
544
+ const a = e, l = t, i = P("webx-admin"), s = gt(), o = Ye("root"), r = At(o), u = x(() => r.value > 0 && r.value < a.collapseBelow), c = x(() => a.actions ?? []), h = x(
545
545
  () => c.value.find((f) => f.primary) ?? null
546
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
547
  () => a.back && a.back !== !0 ? a.back : null
@@ -559,10 +559,10 @@ const ua = { class: "wx-link-picker" }, da = {
559
559
  }]),
560
560
  "data-level": e.level
561
561
  }, [
562
- f.$slots.trail ? (p(), T("div", ka, [
562
+ f.$slots.trail ? (p(), T("div", _a, [
563
563
  F(f.$slots, "trail", {}, void 0, !0)
564
564
  ])) : U("", !0),
565
- d.value ? (p(), $(ya, {
565
+ d.value ? (p(), $(ba, {
566
566
  key: 1,
567
567
  class: "wx-screen-head__back",
568
568
  to: d.value,
@@ -577,8 +577,8 @@ const ua = { class: "wx-link-picker" }, da = {
577
577
  title: e.backLabel ?? n(i)("editor.back"),
578
578
  onClick: y[0] || (y[0] = (k) => l("back"))
579
579
  }, null, 8, ["title"])) : U("", !0),
580
- O("div", _a, [
581
- e.title ? (p(), $(n(At), {
580
+ O("div", $a, [
581
+ e.title ? (p(), $(n(zt), {
582
582
  key: 0,
583
583
  level: e.level,
584
584
  truncate: "",
@@ -605,7 +605,7 @@ const ua = { class: "wx-link-picker" }, da = {
605
605
  ]),
606
606
  _: 3
607
607
  })) : U("", !0),
608
- w.value ? (p(), T("div", $a, [
608
+ w.value ? (p(), T("div", Ta, [
609
609
  F(f.$slots, "extra", {}, void 0, !0),
610
610
  (p(!0), T(H, null, Q(m.value, (k) => (p(), $(n(Z), {
611
611
  key: k.key,
@@ -641,9 +641,9 @@ const ua = { class: "wx-link-picker" }, da = {
641
641
  label: e.title ?? n(i)("editor.more")
642
642
  }, null, 8, ["actions", "label"])) : U("", !0)
643
643
  ])) : U("", !0)
644
- ], 10, xa));
644
+ ], 10, ka));
645
645
  }
646
- }), st = /* @__PURE__ */ Y(Ta, [["__scopeId", "data-v-e27d184e"]]), Sa = ["data-wx-fill"], Ca = /* @__PURE__ */ N({
646
+ }), it = /* @__PURE__ */ Y(Sa, [["__scopeId", "data-v-e27d184e"]]), Ca = ["data-wx-fill"], Wa = /* @__PURE__ */ R({
647
647
  __name: "ListScreen",
648
648
  props: /* @__PURE__ */ oe({
649
649
  title: { default: void 0 },
@@ -662,12 +662,12 @@ const ua = { class: "wx-link-picker" }, da = {
662
662
  }),
663
663
  emits: ["update:view"],
664
664
  setup(e) {
665
- const t = ue(e, "view");
665
+ const t = de(e, "view");
666
666
  return (a, l) => (p(), T("div", {
667
667
  class: ae(["wx-list-screen", { "is-fill": e.fill }]),
668
668
  "data-wx-fill": e.fill ? "" : void 0
669
669
  }, [
670
- e.title || e.actions || a.$slots.actions ? (p(), $(st, {
670
+ e.title || e.actions || a.$slots.actions ? (p(), $(it, {
671
671
  key: 0,
672
672
  class: "wx-list-screen__head",
673
673
  title: e.title,
@@ -685,7 +685,7 @@ const ua = { class: "wx-link-picker" }, da = {
685
685
  key: "0"
686
686
  } : void 0
687
687
  ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : U("", !0),
688
- e.views && e.views.length > 0 ? (p(), $(n(zt), {
688
+ e.views && e.views.length > 0 ? (p(), $(n(Vt), {
689
689
  key: 1,
690
690
  modelValue: t.value,
691
691
  "onUpdate:modelValue": l[0] || (l[0] = (i) => t.value = i),
@@ -719,9 +719,9 @@ const ua = { class: "wx-link-picker" }, da = {
719
719
  _: 3
720
720
  }, 8, ["padding"])) : F(a.$slots, "default", {}, void 0, !0, 1)
721
721
  ], 64))
722
- ], 10, Sa));
722
+ ], 10, Ca));
723
723
  }
724
- }), it = /* @__PURE__ */ Y(Ca, [["__scopeId", "data-v-8c7e5ad1"]]), Wa = /* @__PURE__ */ N({
724
+ }), rt = /* @__PURE__ */ Y(Wa, [["__scopeId", "data-v-8c7e5ad1"]]), La = /* @__PURE__ */ R({
725
725
  name: "WxRichTextField",
726
726
  inheritAttrs: !1,
727
727
  __name: "RichTextField",
@@ -759,24 +759,24 @@ const ua = { class: "wx-link-picker" }, da = {
759
759
  cancel: a("rich-text.cancel"),
760
760
  uploading: a("rich-text.uploading")
761
761
  }));
762
- return (s, o) => (p(), $(n(Vt), je(s.$attrs, {
762
+ return (s, o) => (p(), $(n(Et), Ke(s.$attrs, {
763
763
  labels: i.value,
764
764
  "pick-image": l.value
765
765
  }), null, 16, ["labels", "pick-image"]));
766
766
  }
767
- }), rt = /* @__PURE__ */ Symbol("wx-record-address");
768
- function La(e) {
769
- Ye(rt, e);
767
+ }), ut = /* @__PURE__ */ Symbol("wx-record-address");
768
+ function Aa(e) {
769
+ Xe(ut, e);
770
770
  }
771
- function Aa() {
772
- return ne(rt, null);
771
+ function za() {
772
+ return ne(ut, null);
773
773
  }
774
- const za = { class: "wx-slug" }, Va = { class: "wx-slug__prefix" }, Ea = /* @__PURE__ */ N({
774
+ const Va = { class: "wx-slug" }, Ea = { class: "wx-slug__prefix" }, Ua = /* @__PURE__ */ R({
775
775
  name: "WxSlugField",
776
776
  inheritAttrs: !1,
777
777
  __name: "SlugField",
778
778
  setup(e) {
779
- const t = Aa(), a = at(), l = x(() => {
779
+ const t = za(), a = nt(), l = x(() => {
780
780
  const o = t?.prefix.value ?? "";
781
781
  return o === "" ? "/" : `/${o}/`;
782
782
  }), i = x(() => {
@@ -786,10 +786,10 @@ const za = { class: "wx-slug" }, Va = { class: "wx-slug__prefix" }, Ea = /* @__P
786
786
  const o = t?.path.value;
787
787
  return typeof o == "string" && i.value !== "" && `${l.value}${i.value}` != `/${o}`;
788
788
  });
789
- return (o, r) => (p(), T("div", za, [
790
- b(n(ye), gt(yt(o.$attrs)), {
789
+ return (o, r) => (p(), T("div", Va, [
790
+ b(n(ye), yt(bt(o.$attrs)), {
791
791
  prefix: g(() => [
792
- O("span", Va, L(l.value), 1)
792
+ O("span", Ea, L(l.value), 1)
793
793
  ]),
794
794
  _: 1
795
795
  }, 16),
@@ -801,25 +801,25 @@ const za = { class: "wx-slug" }, Va = { class: "wx-slug__prefix" }, Ea = /* @__P
801
801
  }, null, 8, ["description"])) : U("", !0)
802
802
  ]));
803
803
  }
804
- }), Me = /* @__PURE__ */ Y(Ea, [["__scopeId", "data-v-5921c0dd"]]), Ua = {
805
- "wx-list": { component: it, kind: "layout", labelProp: "title" },
804
+ }), Me = /* @__PURE__ */ Y(Ua, [["__scopeId", "data-v-5921c0dd"]]), Ra = {
805
+ "wx-list": { component: rt, kind: "layout", labelProp: "title" },
806
806
  // Full width: an editor shares a row with nothing, and a form of two columns would give it
807
807
  // half a line to write a page of text in.
808
- "wx-rich-text": { component: Wa, kind: "field", wide: !0 },
808
+ "wx-rich-text": { component: La, kind: "field", wide: !0 },
809
809
  // Wide as well: a row of the picker is a segmented switch, a section and a search box, and half
810
810
  // a form's width leaves the search box too narrow to read a page title in.
811
- "wx-link": { component: ga, kind: "field", wide: !0 },
812
- "wx-categories": { component: sa, kind: "field" },
811
+ "wx-link": { component: ya, kind: "field", wide: !0 },
812
+ "wx-categories": { component: ia, kind: "field" },
813
813
  "wx-slug": { component: Me, kind: "field" },
814
814
  "wx-category-slug": { component: Me, kind: "field" }
815
- }, ut = /* @__PURE__ */ Symbol("webx-admin");
815
+ }, dt = /* @__PURE__ */ Symbol("webx-admin");
816
816
  function X() {
817
- const e = ne(ut, null);
817
+ const e = ne(dt, null);
818
818
  if (e === null)
819
819
  throw new Error("useAdmin() was called outside a panel created by createAdmin().");
820
820
  return e;
821
821
  }
822
- function Ra(e) {
822
+ function Na(e) {
823
823
  const t = pe({
824
824
  status: "loading",
825
825
  manifest: null,
@@ -861,7 +861,7 @@ function Ra(e) {
861
861
  entries: f.get(y.id) ?? []
862
862
  }))
863
863
  };
864
- }), i = { ...Ua };
864
+ }), i = { ...Ra };
865
865
  for (const d of e.modules)
866
866
  Object.assign(i, d.types);
867
867
  Object.assign(i, e.types);
@@ -884,7 +884,7 @@ function Ra(e) {
884
884
  const d = await e.loadManifest();
885
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
886
  } catch (d) {
887
- if (Ba(d)) {
887
+ if (Ia(d)) {
888
888
  t.manifest = null, t.user = null, t.status = "unauthenticated";
889
889
  return;
890
890
  }
@@ -938,13 +938,13 @@ function Ra(e) {
938
938
  }
939
939
  };
940
940
  }
941
- function Na(e, t) {
942
- e.provide(ut, t);
941
+ function Ba(e, t) {
942
+ e.provide(dt, t);
943
943
  }
944
- function Ba(e) {
944
+ function Ia(e) {
945
945
  return typeof e == "object" && e !== null && "status" in e && e.status === 401;
946
946
  }
947
- const Ia = /* @__PURE__ */ N({
947
+ const Pa = /* @__PURE__ */ R({
948
948
  __name: "AdminLanding",
949
949
  props: {
950
950
  landing: { default: null }
@@ -960,21 +960,21 @@ const Ia = /* @__PURE__ */ N({
960
960
  o !== null && l.replace(o);
961
961
  },
962
962
  { immediate: !0 }
963
- ), (o, r) => s.value === null && n(a).state.status === "ready" ? (p(), $(n(Et), {
963
+ ), (o, r) => s.value === null && n(a).state.status === "ready" ? (p(), $(n(Ut), {
964
964
  key: 0,
965
965
  status: "info",
966
966
  title: n(i)("shell.empty-title"),
967
967
  description: n(i)("shell.empty-description")
968
968
  }, null, 8, ["title", "description"])) : U("", !0);
969
969
  }
970
- }), Pa = /* @__PURE__ */ N({
970
+ }), Da = /* @__PURE__ */ R({
971
971
  __name: "AdminNav",
972
972
  props: {
973
973
  collapsed: { type: Boolean }
974
974
  },
975
975
  emits: ["select"],
976
976
  setup(e, { emit: t }) {
977
- const a = t, l = X(), i = P("webx-admin"), s = ge(), o = Ze(), r = x({
977
+ const a = t, l = X(), i = P("webx-admin"), s = ge(), o = et(), r = x({
978
978
  /*
979
979
  * The longest path that contains this one, on a segment boundary: a section may live inside
980
980
  * another's path (`/services/categories` under `/services`), and the first match in the order
@@ -1023,37 +1023,37 @@ const Ia = /* @__PURE__ */ N({
1023
1023
  }, 8, ["modelValue", "collapsed", "label"]);
1024
1024
  };
1025
1025
  }
1026
- }), Da = {
1026
+ }), Ma = {
1027
1027
  key: 0,
1028
1028
  class: "wx-root wx-admin-plain"
1029
- }, Ma = {
1029
+ }, Fa = {
1030
1030
  key: 1,
1031
1031
  class: "wx-root wx-admin-plain"
1032
- }, Fa = {
1032
+ }, Oa = {
1033
1033
  key: 2,
1034
1034
  class: "wx-root wx-admin-plain"
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({
1035
+ }, Ha = ["src", "alt", "width", "height"], ja = ["src", "alt", "width", "height"], Ka = ["src", "alt"], qa = { class: "wx-admin__user" }, Ya = { class: "wx-admin__user wx-admin__user--drawer" }, Xa = /* @__PURE__ */ R({
1036
1036
  __name: "AdminShell",
1037
1037
  setup(e) {
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(
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 } = Rt(
1039
1039
  l,
1040
1040
  { persist: "webx-admin-shell" }
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(() => {
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(() => Nt(i.value, null));
1042
+ return wt(() => {
1043
1043
  typeof document > "u" || (document.documentElement.dataset.wxShell = w.value);
1044
- }), wt(() => {
1044
+ }), xt(() => {
1045
1045
  typeof document < "u" && delete document.documentElement.dataset.wxShell;
1046
1046
  }), (f, y) => {
1047
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
1048
  return p(), T(H, null, [
1049
- b(n(Nt)),
1050
- n(t).state.status === "unauthenticated" ? (p(), T("div", Da, [
1049
+ b(n(Bt), { placement: "bottom-center" }),
1050
+ n(t).state.status === "unauthenticated" ? (p(), T("div", Ma, [
1051
1051
  b(k)
1052
- ])) : n(t).state.status === "loading" ? (p(), T("div", Ma, [
1052
+ ])) : n(t).state.status === "loading" ? (p(), T("div", Fa, [
1053
1053
  b(M, {
1054
1054
  label: n(a)("shell.loading")
1055
1055
  }, null, 8, ["label"])
1056
- ])) : n(t).state.status === "error" ? (p(), T("div", Fa, [
1056
+ ])) : n(t).state.status === "error" ? (p(), T("div", Oa, [
1057
1057
  b(S, {
1058
1058
  status: "error",
1059
1059
  title: n(a)("shell.error-title"),
@@ -1110,7 +1110,7 @@ const Ia = /* @__PURE__ */ N({
1110
1110
  alt: m.value,
1111
1111
  width: v.value.width ?? void 0,
1112
1112
  height: v.value.height ?? void 0
1113
- }, null, 8, Oa)) : (p(), $(C, {
1113
+ }, null, 8, Ha)) : (p(), $(C, {
1114
1114
  key: 1,
1115
1115
  weight: "semibold",
1116
1116
  truncate: ""
@@ -1144,7 +1144,7 @@ const Ia = /* @__PURE__ */ N({
1144
1144
  class: "wx-admin__mark",
1145
1145
  src: d.value.url,
1146
1146
  alt: m.value
1147
- }, null, 8, ja)) : U("", !0) : F(f.$slots, "brand", {}, () => [
1147
+ }, null, 8, Ka)) : U("", !0) : F(f.$slots, "brand", {}, () => [
1148
1148
  v.value ? (p(), T("img", {
1149
1149
  key: 0,
1150
1150
  class: "wx-admin__logo",
@@ -1152,7 +1152,7 @@ const Ia = /* @__PURE__ */ N({
1152
1152
  alt: m.value,
1153
1153
  width: v.value.width ?? void 0,
1154
1154
  height: v.value.height ?? void 0
1155
- }, null, 8, Ha)) : (p(), $(C, {
1155
+ }, null, 8, ja)) : (p(), $(C, {
1156
1156
  key: 1,
1157
1157
  weight: "semibold",
1158
1158
  truncate: "",
@@ -1172,7 +1172,7 @@ const Ia = /* @__PURE__ */ N({
1172
1172
  ], 2)
1173
1173
  ]),
1174
1174
  bottom: g(() => [
1175
- O("div", Ka, [
1175
+ O("div", qa, [
1176
1176
  F(f.$slots, "user", {
1177
1177
  expanded: !n(o)
1178
1178
  }, void 0, !0)
@@ -1197,7 +1197,7 @@ const Ia = /* @__PURE__ */ N({
1197
1197
  }, 8, ["direction"]),
1198
1198
  b(ie, {
1199
1199
  open: n(u),
1200
- "onUpdate:open": y[1] || (y[1] = (te) => Xe(u) ? u.value = te : null),
1200
+ "onUpdate:open": y[1] || (y[1] = (te) => Ge(u) ? u.value = te : null),
1201
1201
  class: "wx-admin__drawer",
1202
1202
  title: m.value === "" ? n(a)("nav.menu") : m.value,
1203
1203
  side: "left",
@@ -1206,7 +1206,7 @@ const Ia = /* @__PURE__ */ N({
1206
1206
  closable: ""
1207
1207
  }, {
1208
1208
  footer: g(() => [
1209
- O("div", qa, [
1209
+ O("div", Ya, [
1210
1210
  F(f.$slots, "user", { expanded: !0 }, void 0, !0)
1211
1211
  ])
1212
1212
  ]),
@@ -1222,7 +1222,7 @@ const Ia = /* @__PURE__ */ N({
1222
1222
  ], 64);
1223
1223
  };
1224
1224
  }
1225
- }), Xa = /* @__PURE__ */ Y(Ya, [["__scopeId", "data-v-309fdb9d"]]);
1225
+ }), Ga = /* @__PURE__ */ Y(Xa, [["__scopeId", "data-v-819885ab"]]);
1226
1226
  class Ce extends Error {
1227
1227
  constructor(t, a, l = {}, i = null, s = null) {
1228
1228
  super(t), this.status = a, this.errors = l, this.retryAfter = i, this.body = s, this.name = "HttpError";
@@ -1242,15 +1242,15 @@ class Ce extends Error {
1242
1242
  return this.status === 429;
1243
1243
  }
1244
1244
  }
1245
- const Ga = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1246
- function Ja(e = {}) {
1245
+ const Ja = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1246
+ function Qa(e = {}) {
1247
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
1248
  let o = !1;
1249
1249
  async function r(c = !1) {
1250
1250
  o && !c && Fe("XSRF-TOKEN") !== null || (await l(a, { credentials: "same-origin" }), o = !0);
1251
1251
  }
1252
1252
  async function u(c, h, m, v = {}, d = !1) {
1253
- const w = Ga.has(c);
1253
+ const w = Ja.has(c);
1254
1254
  w && await r();
1255
1255
  const f = {
1256
1256
  Accept: "application/json",
@@ -1264,7 +1264,7 @@ function Ja(e = {}) {
1264
1264
  k !== null && (f["X-XSRF-TOKEN"] = k);
1265
1265
  }
1266
1266
  m !== void 0 && (f["Content-Type"] = "application/json");
1267
- const y = await l(Za(t, h, v.query), {
1267
+ const y = await l(en(t, h, v.query), {
1268
1268
  method: c,
1269
1269
  credentials: "same-origin",
1270
1270
  headers: f,
@@ -1274,7 +1274,7 @@ function Ja(e = {}) {
1274
1274
  if (y.status === 419 && w && !d)
1275
1275
  return await r(!0), u(c, h, m, v, !0);
1276
1276
  if (y.status === 401 && i?.(), !y.ok)
1277
- throw await Qa(y);
1277
+ throw await Za(y);
1278
1278
  if (y.status !== 204)
1279
1279
  return await y.json();
1280
1280
  }
@@ -1286,7 +1286,7 @@ function Ja(e = {}) {
1286
1286
  delete: (c, h) => u("DELETE", c, void 0, h)
1287
1287
  };
1288
1288
  }
1289
- async function Qa(e) {
1289
+ async function Za(e) {
1290
1290
  let t = null;
1291
1291
  try {
1292
1292
  t = await e.json();
@@ -1301,7 +1301,7 @@ async function Qa(e) {
1301
1301
  t
1302
1302
  );
1303
1303
  }
1304
- function Za(e, t, a) {
1304
+ function en(e, t, a) {
1305
1305
  const i = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
1306
1306
  if (a === void 0)
1307
1307
  return i;
@@ -1321,25 +1321,25 @@ function Fe(e) {
1321
1321
  }
1322
1322
  return null;
1323
1323
  }
1324
- const en = "webx.theme", dt = /* @__PURE__ */ Symbol("webx-theme");
1325
- function Gn() {
1326
- const e = ne(dt, null);
1324
+ const tn = "webx.theme", ct = /* @__PURE__ */ Symbol("webx-theme");
1325
+ function Jn() {
1326
+ const e = ne(ct, null);
1327
1327
  if (e === null)
1328
1328
  throw new Error("useTheme() was called outside a panel created by createAdmin().");
1329
1329
  return e;
1330
1330
  }
1331
- function tn(e, t) {
1332
- e.provide(dt, t);
1331
+ function an(e, t) {
1332
+ e.provide(ct, t);
1333
1333
  }
1334
- function an(e = {}) {
1335
- const t = e.storageKey === void 0 ? en : e.storageKey, a = pe({
1336
- preference: nn(t) ?? "system",
1334
+ function nn(e = {}) {
1335
+ const t = e.storageKey === void 0 ? tn : e.storageKey, a = pe({
1336
+ preference: ln(t) ?? "system",
1337
1337
  resolved: "light"
1338
1338
  });
1339
1339
  function l() {
1340
- Gt(a.preference), a.resolved = a.preference === "system" ? Jt() : a.preference;
1340
+ Jt(a.preference), a.resolved = a.preference === "system" ? Qt() : a.preference;
1341
1341
  }
1342
- return l(), Xt((i) => {
1342
+ return l(), Gt((i) => {
1343
1343
  a.preference === "system" && (a.resolved = i);
1344
1344
  }), {
1345
1345
  state: a,
@@ -1361,7 +1361,7 @@ function Oe(e, t) {
1361
1361
  } catch {
1362
1362
  }
1363
1363
  }
1364
- function nn(e) {
1364
+ function ln(e) {
1365
1365
  if (e === null)
1366
1366
  return null;
1367
1367
  try {
@@ -1371,7 +1371,7 @@ function nn(e) {
1371
1371
  return null;
1372
1372
  }
1373
1373
  }
1374
- const ct = {
1374
+ const mt = {
1375
1375
  shell: {
1376
1376
  loading: "Loading the panel…",
1377
1377
  "error-title": "The panel could not start",
@@ -1586,9 +1586,9 @@ const ct = {
1586
1586
  "order-locked": "Clear the search and the filters to change the order — only a whole list, or one category, can be dragged.",
1587
1587
  unknown: "One of the chosen categories is not there any more."
1588
1588
  }
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 ?? []];
1589
+ }, vt = "webx.locale";
1590
+ function Qn(e = {}) {
1591
+ const t = e.manifestUrl ?? cn() ?? "/api/cms/manifest", a = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), l = e.basePath ?? "/cms", i = e.modules ?? [], s = [...e.routes ?? []];
1592
1592
  for (const y of i)
1593
1593
  s.push(...y.routes ?? []);
1594
1594
  if (!s.some((y) => y.path === "/")) {
@@ -1596,14 +1596,14 @@ function Jn(e = {}) {
1596
1596
  s.push({
1597
1597
  path: "/",
1598
1598
  name: "webx.home",
1599
- component: Ia,
1599
+ component: Pa,
1600
1600
  props: { landing: y?.path ?? y?.routes?.[0]?.path ?? null }
1601
1601
  });
1602
1602
  }
1603
- const o = _t({
1604
- history: $t(l),
1603
+ const o = $t({
1604
+ history: Tt(l),
1605
1605
  routes: s
1606
- }), r = Ee({ locale: e.locale ?? on() }), u = an(), c = e.http ?? Ja({
1606
+ }), r = Ee({ locale: e.locale ?? sn() }), u = nn(), c = e.http ?? Qa({
1607
1607
  baseUrl: "",
1608
1608
  csrfUrl: `${a}/auth/csrf-cookie`,
1609
1609
  onUnauthenticated: () => {
@@ -1615,12 +1615,12 @@ function Jn(e = {}) {
1615
1615
  // signing in on a Russian sign-in screen lands in an English panel.
1616
1616
  headers: () => ({ "X-Webx-Locale": r.state.locale })
1617
1617
  });
1618
- r.defaults("webx-admin", ct);
1618
+ r.defaults("webx-admin", mt);
1619
1619
  async function h(y) {
1620
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);
1621
+ r.load(k.data.namespaces, k.data.locale, k.data.fallback), rn(k.data.locale), dn(k.data.locale, r.state.panelLocales);
1622
1622
  }
1623
- const m = Ra({
1623
+ const m = Na({
1624
1624
  http: c,
1625
1625
  theme: u,
1626
1626
  basePath: l,
@@ -1631,13 +1631,13 @@ function Jn(e = {}) {
1631
1631
  types: e.types,
1632
1632
  screens: e.screens,
1633
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);
1634
+ }), v = kt(on(e));
1635
+ v.use(It), Ba(v, m), ta(v, r), an(v, u);
1636
1636
  const d = W("");
1637
1637
  v.provide(
1638
- It,
1638
+ Pt,
1639
1639
  x(() => r.state.locale)
1640
- ), v.provide(Pt, {
1640
+ ), v.provide(Dt, {
1641
1641
  list: x(
1642
1642
  () => r.state.contentLocales.map((y) => ({
1643
1643
  code: y.code,
@@ -1670,40 +1670,40 @@ function Jn(e = {}) {
1670
1670
  y.install(w);
1671
1671
  return v.use(o), w;
1672
1672
  }
1673
- function ln(e) {
1673
+ function on(e) {
1674
1674
  const t = {
1675
1675
  // The menu is the panel's own: it is the manifest, drawn.
1676
1676
  // The shell hands in what a choice means where it drew the menu — in the drawer it is what
1677
1677
  // closes it, and a drawer that stays open over the section it just opened is a drawer the
1678
1678
  // reader has to dismiss by hand.
1679
- nav: (a) => de(Pa, { collapsed: a.collapsed === !0, onSelect: a.select })
1679
+ nav: (a) => re(Da, { collapsed: a.collapsed === !0, onSelect: a.select })
1680
1680
  };
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) };
1681
+ return e.brand !== void 0 && (t.brand = () => re(e.brand)), e.userMenu !== void 0 && (t.user = (a) => re(e.userMenu, { expanded: a.expanded === !0 })), { render: () => re(Ga, null, t) };
1682
1682
  }
1683
- function on() {
1684
- const e = rn(mt);
1683
+ function sn() {
1684
+ const e = un(vt);
1685
1685
  return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
1686
1686
  }
1687
- function sn(e) {
1687
+ function rn(e) {
1688
1688
  try {
1689
- localStorage.setItem(mt, e);
1689
+ localStorage.setItem(vt, e);
1690
1690
  } catch {
1691
1691
  }
1692
1692
  }
1693
- function rn(e) {
1693
+ function un(e) {
1694
1694
  try {
1695
1695
  return localStorage.getItem(e);
1696
1696
  } catch {
1697
1697
  return null;
1698
1698
  }
1699
1699
  }
1700
- function un(e, t) {
1700
+ function dn(e, t) {
1701
1701
  typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((a) => a.code === e)?.direction ?? "ltr");
1702
1702
  }
1703
- function dn() {
1703
+ function cn() {
1704
1704
  return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
1705
1705
  }
1706
- function cn(e) {
1706
+ function mn(e) {
1707
1707
  const t = e.replace(/\r\n?/g, `
1708
1708
  `).split(`
1709
1709
  `), a = [];
@@ -1768,7 +1768,7 @@ function Te(e) {
1768
1768
  function We(e) {
1769
1769
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1770
1770
  }
1771
- function mn(e) {
1771
+ function vn(e) {
1772
1772
  const t = e.scope("webx-admin"), a = /* @__PURE__ */ new Map();
1773
1773
  function l(s, o, r) {
1774
1774
  const u = e.state.locale, c = `${u}:${s}`;
@@ -1811,13 +1811,13 @@ function mn(e) {
1811
1811
  }
1812
1812
  };
1813
1813
  }
1814
- function vt() {
1814
+ function ft() {
1815
1815
  const e = ne(we, null);
1816
- return mn(e ?? vn());
1816
+ return vn(e ?? fn());
1817
1817
  }
1818
1818
  let ve = null;
1819
- function vn() {
1820
- return ve === null && (ve = Ee(), ve.defaults("webx-admin", ct)), ve;
1819
+ function fn() {
1820
+ return ve === null && (ve = Ee(), ve.defaults("webx-admin", mt)), ve;
1821
1821
  }
1822
1822
  function fe(e) {
1823
1823
  if (e == null || e === "")
@@ -1829,10 +1829,10 @@ function He(e, t) {
1829
1829
  const a = (l) => Date.UTC(l.getFullYear(), l.getMonth(), l.getDate());
1830
1830
  return Math.round((a(e) - a(t)) / 864e5);
1831
1831
  }
1832
- function fn(e, t, a) {
1833
- const l = e instanceof Ce ? e.status : pn(e);
1832
+ function pn(e, t, a) {
1833
+ const l = e instanceof Ce ? e.status : hn(e);
1834
1834
  if (l === 422)
1835
- return hn(e) ?? a ?? t("errors.unknown");
1835
+ return gn(e) ?? a ?? t("errors.unknown");
1836
1836
  if (l === 401) return t("errors.signed-out");
1837
1837
  if (l === 403) return t("errors.forbidden");
1838
1838
  if (l === 404) return t("errors.gone");
@@ -1845,17 +1845,17 @@ function fn(e, t, a) {
1845
1845
  }
1846
1846
  function Re() {
1847
1847
  const e = P("webx-admin");
1848
- return (t, a) => fn(t, e, a);
1848
+ return (t, a) => pn(t, e, a);
1849
1849
  }
1850
- function pn(e) {
1850
+ function hn(e) {
1851
1851
  const t = e?.status;
1852
1852
  return typeof t == "number" ? t : null;
1853
1853
  }
1854
- function hn(e) {
1854
+ function gn(e) {
1855
1855
  const a = e?.body?.message;
1856
1856
  return typeof a == "string" && a !== "" ? a : null;
1857
1857
  }
1858
- function gn(e, t, a) {
1858
+ function yn(e, t, a) {
1859
1859
  const l = `${e.apiPath}/entities/${t}/${a}/notes`, i = (o) => `${e.apiPath}/notes/${o}`, s = (o) => o.data;
1860
1860
  return {
1861
1861
  list: () => e.http.get(l).then(s),
@@ -1865,39 +1865,39 @@ function gn(e, t, a) {
1865
1865
  })
1866
1866
  };
1867
1867
  }
1868
- const ft = /* @__PURE__ */ Symbol("wx-category-editor");
1869
- function yn(e) {
1870
- Ye(ft, e);
1868
+ const pt = /* @__PURE__ */ Symbol("wx-category-editor");
1869
+ function bn(e) {
1870
+ Xe(pt, e);
1871
1871
  }
1872
- function Qn() {
1873
- return ne(ft, null);
1872
+ function Zn() {
1873
+ return ne(pt, null);
1874
1874
  }
1875
- function bn(e) {
1875
+ function wn(e) {
1876
1876
  return (e.q ?? "").trim() !== "" || e.filtered ? "locked" : e.category == null ? "all" : "category";
1877
1877
  }
1878
- function Zn(e, t) {
1879
- const a = X(), l = P("webx-admin"), i = x(() => bn(t()));
1878
+ function el(e, t) {
1879
+ const a = X(), l = P("webx-admin"), i = x(() => wn(t()));
1880
1880
  return {
1881
1881
  mode: i,
1882
1882
  sortable: x(() => i.value !== "locked"),
1883
1883
  hint: x(() => l(`categories.order-${i.value}`)),
1884
- move: (s) => aa(a, e, s, i.value === "category" ? t().category ?? null : null)
1884
+ move: (s) => na(a, e, s, i.value === "category" ? t().category ?? null : null)
1885
1885
  };
1886
1886
  }
1887
1887
  function Ne(e = {}) {
1888
1888
  const t = P("webx-admin");
1889
1889
  return (a, l) => t(e[a] ?? `webx-admin::categories.${a}`, l);
1890
1890
  }
1891
- const wn = /* @__PURE__ */ N({
1891
+ const xn = /* @__PURE__ */ R({
1892
1892
  name: "WxCategoryCreateDialog",
1893
1893
  __name: "CategoryCreateDialog",
1894
1894
  props: {
1895
1895
  options: {}
1896
1896
  },
1897
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");
1898
+ const t = e, { open: a, resolve: l, dismiss: i } = Mt(), s = xe(X(), t.options.api), o = Ne(t.options.words), r = W(""), u = W(!1), c = W({}), h = Ye("field");
1899
1899
  Le(async () => {
1900
- await Ge(), h.value?.querySelector("input")?.focus();
1900
+ await Je(), h.value?.querySelector("input")?.focus();
1901
1901
  });
1902
1902
  function m(d) {
1903
1903
  const w = Object.keys(c.value).find((f) => f === d || f.startsWith(`${d}.`));
@@ -1915,14 +1915,14 @@ const wn = /* @__PURE__ */ N({
1915
1915
  }
1916
1916
  }
1917
1917
  }
1918
- return (d, w) => (p(), $(n(nt), {
1918
+ return (d, w) => (p(), $(n(lt), {
1919
1919
  open: n(a),
1920
- "onUpdate:open": w[2] || (w[2] = (f) => Xe(a) ? a.value = f : null),
1920
+ "onUpdate:open": w[2] || (w[2] = (f) => Ge(a) ? a.value = f : null),
1921
1921
  title: n(o)("new"),
1922
1922
  width: 440
1923
1923
  }, {
1924
1924
  footer: g(() => [
1925
- b(n(Ft), { size: "sm" }, {
1925
+ b(n(Ot), { size: "sm" }, {
1926
1926
  default: g(() => [
1927
1927
  b(n(Z), {
1928
1928
  variant: "outline",
@@ -1949,7 +1949,7 @@ const wn = /* @__PURE__ */ N({
1949
1949
  })
1950
1950
  ]),
1951
1951
  default: g(() => [
1952
- b(n(Mt), {
1952
+ b(n(Ft), {
1953
1953
  label: n(o)("field-title"),
1954
1954
  error: m("title") ?? m("slug"),
1955
1955
  required: ""
@@ -1963,7 +1963,7 @@ const wn = /* @__PURE__ */ N({
1963
1963
  modelValue: r.value,
1964
1964
  "onUpdate:modelValue": w[0] || (w[0] = (f) => r.value = f),
1965
1965
  "aria-label": n(o)("field-title"),
1966
- onKeyup: Je(v, ["enter"])
1966
+ onKeyup: Qe(v, ["enter"])
1967
1967
  }, null, 8, ["modelValue", "aria-label"])
1968
1968
  ], 512)
1969
1969
  ]),
@@ -1973,7 +1973,7 @@ const wn = /* @__PURE__ */ N({
1973
1973
  _: 1
1974
1974
  }, 8, ["open", "title"]));
1975
1975
  }
1976
- }), xn = { class: "wx-category-row__name" }, kn = /* @__PURE__ */ N({
1976
+ }), kn = { class: "wx-category-row__name" }, _n = /* @__PURE__ */ R({
1977
1977
  name: "WxCategoriesPage",
1978
1978
  __name: "CategoriesPage",
1979
1979
  props: {
@@ -1982,7 +1982,7 @@ const wn = /* @__PURE__ */ N({
1982
1982
  setup(e) {
1983
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
1984
  () => a.state.manifest?.modules.find((S) => S.id === t.options.module)?.title ?? ""
1985
- ), m = Ot(wn), v = x(
1985
+ ), m = Ht(xn), v = x(
1986
1986
  () => c.value ? [{ key: "new", label: s("new"), icon: "plus", primary: !0, run: () => {
1987
1987
  y();
1988
1988
  } }] : []
@@ -2054,23 +2054,23 @@ const wn = /* @__PURE__ */ N({
2054
2054
  }
2055
2055
  return (S, B) => {
2056
2056
  const C = j("router-link");
2057
- return p(), $(it, {
2057
+ return p(), $(rt, {
2058
2058
  class: "wx-categories",
2059
2059
  title: h.value,
2060
2060
  actions: v.value,
2061
2061
  padding: "sm"
2062
2062
  }, {
2063
2063
  default: g(() => [
2064
- u.value ? (p(), $(n(re), {
2064
+ u.value ? (p(), $(n(ue), {
2065
2065
  key: 0,
2066
2066
  class: "wx-categories__loading",
2067
2067
  rows: 5
2068
- })) : r.value.length === 0 ? (p(), $(n(lt), {
2068
+ })) : r.value.length === 0 ? (p(), $(n(ot), {
2069
2069
  key: 1,
2070
2070
  title: n(s)("empty"),
2071
2071
  description: n(s)("empty-help")
2072
2072
  }, null, 8, ["title", "description"])) : (p(), T(H, { key: 2 }, [
2073
- b(n(et), {
2073
+ b(n(tt), {
2074
2074
  modelValue: r.value,
2075
2075
  "onUpdate:modelValue": B[0] || (B[0] = (A) => r.value = A),
2076
2076
  class: "wx-categories__list",
@@ -2086,7 +2086,7 @@ const wn = /* @__PURE__ */ N({
2086
2086
  to: `${t.options.path}/${A.id}`
2087
2087
  }, {
2088
2088
  default: g(() => [
2089
- O("span", xn, [
2089
+ O("span", kn, [
2090
2090
  b(n(G), {
2091
2091
  truncate: "",
2092
2092
  weight: "medium"
@@ -2096,7 +2096,7 @@ const wn = /* @__PURE__ */ N({
2096
2096
  ]),
2097
2097
  _: 2
2098
2098
  }, 1024),
2099
- A.is_visible ? U("", !0) : (p(), $(n(ot), {
2099
+ A.is_visible ? U("", !0) : (p(), $(n(st), {
2100
2100
  key: 0,
2101
2101
  content: n(s)("hidden")
2102
2102
  }, {
@@ -2152,11 +2152,11 @@ const wn = /* @__PURE__ */ N({
2152
2152
  }, 8, ["title", "actions"]);
2153
2153
  };
2154
2154
  }
2155
- }), _n = {
2155
+ }), $n = {
2156
2156
  class: "wx-save-state",
2157
2157
  role: "status",
2158
2158
  "aria-live": "polite"
2159
- }, $n = /* @__PURE__ */ N({
2159
+ }, Tn = /* @__PURE__ */ R({
2160
2160
  __name: "SaveState",
2161
2161
  props: {
2162
2162
  state: {},
@@ -2176,9 +2176,9 @@ const wn = /* @__PURE__ */ N({
2176
2176
  const s = x(
2177
2177
  () => t.state === "saving" ? "saving" : l.value ? "saved" : null
2178
2178
  );
2179
- return Qe(() => {
2179
+ return Ze(() => {
2180
2180
  i !== null && clearTimeout(i);
2181
- }), (o, r) => (p(), T("span", _n, [
2181
+ }), (o, r) => (p(), T("span", $n, [
2182
2182
  s.value ? (p(), $(n(Ve), {
2183
2183
  key: 0,
2184
2184
  class: ae(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
@@ -2188,7 +2188,7 @@ const wn = /* @__PURE__ */ N({
2188
2188
  }, null, 8, ["class", "name", "spin", "label"])) : U("", !0)
2189
2189
  ]));
2190
2190
  }
2191
- }), Tn = /* @__PURE__ */ Y($n, [["__scopeId", "data-v-216e5e44"]]), Sn = { class: "wx-screen-host" }, Cn = /* @__PURE__ */ N({
2191
+ }), Sn = /* @__PURE__ */ Y(Tn, [["__scopeId", "data-v-216e5e44"]]), Cn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
2192
2192
  __name: "Screen",
2193
2193
  props: /* @__PURE__ */ oe({
2194
2194
  name: {},
@@ -2203,7 +2203,7 @@ const wn = /* @__PURE__ */ N({
2203
2203
  }),
2204
2204
  emits: /* @__PURE__ */ oe(["loaded"], ["update:modelValue"]),
2205
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);
2206
+ const l = e, i = a, s = de(e, "modelValue"), o = X(), r = P("webx-admin"), u = W(null), c = W(null);
2207
2207
  async function h() {
2208
2208
  u.value = null, c.value = null;
2209
2209
  try {
@@ -2215,16 +2215,16 @@ const wn = /* @__PURE__ */ N({
2215
2215
  }
2216
2216
  return ee([() => l.name, () => o.i18n.state.locale], () => {
2217
2217
  h();
2218
- }, { immediate: !0 }), t({ reload: h }), (m, v) => (p(), T("div", Sn, [
2218
+ }, { immediate: !0 }), t({ reload: h }), (m, v) => (p(), T("div", Cn, [
2219
2219
  c.value ? (p(), $(n(be), {
2220
2220
  key: 0,
2221
2221
  type: "danger",
2222
2222
  title: n(r)("shell.error-title"),
2223
2223
  description: c.value
2224
- }, null, 8, ["title", "description"])) : u.value === null ? (p(), $(n(re), {
2224
+ }, null, 8, ["title", "description"])) : u.value === null ? (p(), $(n(ue), {
2225
2225
  key: 1,
2226
2226
  rows: 4
2227
- })) : (p(), $(n(Qt), {
2227
+ })) : (p(), $(n(Zt), {
2228
2228
  key: 2,
2229
2229
  modelValue: s.value,
2230
2230
  "onUpdate:modelValue": v[0] || (v[0] = (d) => s.value = d),
@@ -2241,20 +2241,20 @@ const wn = /* @__PURE__ */ N({
2241
2241
  }, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
2242
2242
  ]));
2243
2243
  }
2244
- }), Wn = /* @__PURE__ */ N({
2244
+ }), Ln = /* @__PURE__ */ R({
2245
2245
  name: "WxCategoryEditorPage",
2246
2246
  __name: "CategoryEditorPage",
2247
2247
  props: {
2248
2248
  options: {}
2249
2249
  },
2250
2250
  setup(e) {
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(
2251
+ const t = e, a = X(), l = xe(a, t.options.api), i = et(), s = ge(), o = nt(), 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
2252
  () => a.state.manifest?.modules.find((z) => z.id === t.options.module)?.title ?? ""
2253
2253
  ), A = x(() => {
2254
2254
  const z = v.value.title;
2255
- return Ht(z, o.active.value, m.value?.name ?? "") || r("untitled");
2255
+ return jt(z, o.active.value, m.value?.name ?? "") || r("untitled");
2256
2256
  });
2257
- yn({ category: m, values: v, prefix: d, moving: () => r("address-moving") }), La({
2257
+ bn({ category: m, values: v, prefix: d, moving: () => r("address-moving") }), Aa({
2258
2258
  values: v,
2259
2259
  prefix: d,
2260
2260
  path: x(() => m.value?.path),
@@ -2311,9 +2311,9 @@ const wn = /* @__PURE__ */ N({
2311
2311
  K();
2312
2312
  }), Le(() => {
2313
2313
  K(), window.addEventListener("beforeunload", te);
2314
- }), Qe(() => {
2314
+ }), Ze(() => {
2315
2315
  window.removeEventListener("beforeunload", te);
2316
- }), Tt(async () => !S.value || !M.value ? !0 : await he({
2316
+ }), St(async () => !S.value || !M.value ? !0 : await he({
2317
2317
  title: r("leave-title"),
2318
2318
  message: r("leave-text"),
2319
2319
  confirmText: r("leave"),
@@ -2338,19 +2338,19 @@ const wn = /* @__PURE__ */ N({
2338
2338
  onKeydown: ke
2339
2339
  }, [
2340
2340
  f.value || !m.value ? (p(), T(H, { key: 0 }, [
2341
- b(n(re), {
2341
+ b(n(ue), {
2342
2342
  class: "wx-category-editor__ghost",
2343
2343
  title: "",
2344
2344
  rows: 1
2345
2345
  }),
2346
2346
  b(n(Se), null, {
2347
2347
  default: g(() => [
2348
- b(n(re), { rows: 6 })
2348
+ b(n(ue), { rows: 6 })
2349
2349
  ]),
2350
2350
  _: 1
2351
2351
  })
2352
2352
  ], 64)) : (p(), T(H, { key: 1 }, [
2353
- b(st, {
2353
+ b(it, {
2354
2354
  divider: "",
2355
2355
  back: h.value,
2356
2356
  "back-label": C.value,
@@ -2359,7 +2359,7 @@ const wn = /* @__PURE__ */ N({
2359
2359
  actions: _e.value
2360
2360
  }, Ae({
2361
2361
  trail: g(() => [
2362
- b(n(jt), {
2362
+ b(n(Kt), {
2363
2363
  size: "sm",
2364
2364
  label: n(r)("trail")
2365
2365
  }, {
@@ -2398,16 +2398,16 @@ const wn = /* @__PURE__ */ N({
2398
2398
  key: "0"
2399
2399
  }
2400
2400
  ]), 1032, ["back", "back-label", "title", "subtitle", "actions"]),
2401
- b(Cn, {
2401
+ b(Wn, {
2402
2402
  modelValue: v.value,
2403
2403
  "onUpdate:modelValue": q[0] || (q[0] = (_) => v.value = _),
2404
2404
  name: t.options.screen,
2405
2405
  errors: k.value,
2406
2406
  disabled: !M.value || y.value
2407
2407
  }, null, 8, ["modelValue", "name", "errors", "disabled"]),
2408
- M.value ? (p(), $(n(Kt), { key: 0 }, {
2408
+ M.value ? (p(), $(n(qt), { key: 0 }, {
2409
2409
  state: g(() => [
2410
- b(Tn, { state: B.value }, null, 8, ["state"])
2410
+ b(Sn, { state: B.value }, null, 8, ["state"])
2411
2411
  ]),
2412
2412
  default: g(() => [
2413
2413
  b(n(Z), {
@@ -2427,19 +2427,24 @@ const wn = /* @__PURE__ */ N({
2427
2427
  ], 64))
2428
2428
  ], 32));
2429
2429
  }
2430
- }), Ln = /* @__PURE__ */ Y(Wn, [["__scopeId", "data-v-86d85f8c"]]);
2431
- function el(e) {
2430
+ }), An = /* @__PURE__ */ Y(Ln, [["__scopeId", "data-v-86d85f8c"]]);
2431
+ function je(e, t) {
2432
+ return R({
2433
+ name: "WxCategoriesView",
2434
+ setup: () => () => re(e, { options: t })
2435
+ });
2436
+ }
2437
+ function tl(e) {
2432
2438
  return [
2433
- { path: e.path, name: e.name, component: kn, props: { options: e } },
2439
+ { path: e.path, name: e.name, component: je(_n, e) },
2434
2440
  {
2435
2441
  path: `${e.path}/:id(\\d+)`,
2436
2442
  name: `${e.name}.edit`,
2437
- component: Ln,
2438
- props: { options: e }
2443
+ component: je(An, e)
2439
2444
  }
2440
2445
  ];
2441
2446
  }
2442
- const tl = 76, al = /* @__PURE__ */ N({
2447
+ const al = 76, nl = /* @__PURE__ */ R({
2443
2448
  __name: "FilterChips",
2444
2449
  props: {
2445
2450
  filters: {}
@@ -2459,7 +2464,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2459
2464
  _: 2
2460
2465
  }, 1032, ["onClose"]))), 128));
2461
2466
  }
2462
- }), An = { class: "wx-rename__footer" }, zn = /* @__PURE__ */ N({
2467
+ }), zn = { class: "wx-rename__footer" }, Vn = /* @__PURE__ */ R({
2463
2468
  __name: "RenameButton",
2464
2469
  props: {
2465
2470
  name: { default: "" },
@@ -2472,7 +2477,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2472
2477
  setup(e, { emit: t }) {
2473
2478
  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
2479
  ee(s, async (h) => {
2475
- h && (o.value = a.name, await Ge(), r.value?.focus(), r.value?.select());
2480
+ h && (o.value = a.name, await Je(), r.value?.focus(), r.value?.select());
2476
2481
  });
2477
2482
  function c() {
2478
2483
  const h = o.value.trim();
@@ -2482,7 +2487,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2482
2487
  }
2483
2488
  l("rename", h), s.value = !1;
2484
2489
  }
2485
- return (h, m) => (p(), $(n(qt), {
2490
+ return (h, m) => (p(), $(n(Yt), {
2486
2491
  open: s.value,
2487
2492
  "onUpdate:open": m[2] || (m[2] = (v) => s.value = v),
2488
2493
  title: u.value,
@@ -2502,7 +2507,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2502
2507
  default: g(() => [
2503
2508
  O("form", {
2504
2509
  class: "wx-rename",
2505
- onSubmit: Ke(c, ["prevent"])
2510
+ onSubmit: qe(c, ["prevent"])
2506
2511
  }, [
2507
2512
  b(n(ye), {
2508
2513
  ref_key: "field",
@@ -2511,9 +2516,9 @@ const tl = 76, al = /* @__PURE__ */ N({
2511
2516
  "onUpdate:modelValue": m[0] || (m[0] = (v) => o.value = v),
2512
2517
  "aria-label": u.value,
2513
2518
  placeholder: e.placeholder,
2514
- onKeydown: m[1] || (m[1] = Je((v) => s.value = !1, ["esc"]))
2519
+ onKeydown: m[1] || (m[1] = Qe((v) => s.value = !1, ["esc"]))
2515
2520
  }, null, 8, ["modelValue", "aria-label", "placeholder"]),
2516
- O("div", An, [
2521
+ O("div", zn, [
2517
2522
  b(n(Z), {
2518
2523
  type: "primary",
2519
2524
  size: "sm",
@@ -2530,7 +2535,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2530
2535
  _: 1
2531
2536
  }, 8, ["open", "title"]));
2532
2537
  }
2533
- }), nl = /* @__PURE__ */ Y(zn, [["__scopeId", "data-v-d879e8d3"]]), Vn = ["innerHTML"], En = /* @__PURE__ */ N({
2538
+ }), ll = /* @__PURE__ */ Y(Vn, [["__scopeId", "data-v-d879e8d3"]]), En = ["innerHTML"], Un = /* @__PURE__ */ R({
2534
2539
  __name: "HelpButton",
2535
2540
  props: {
2536
2541
  body: {},
@@ -2540,7 +2545,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2540
2545
  width: { default: 720 }
2541
2546
  },
2542
2547
  setup(e) {
2543
- const t = e, a = P("webx-admin"), l = W(!1), i = x(() => t.title ?? a("help.title")), s = x(() => cn(t.body));
2548
+ const t = e, a = P("webx-admin"), l = W(!1), i = x(() => t.title ?? a("help.title")), s = x(() => mn(t.body));
2544
2549
  return (o, r) => (p(), T(H, null, [
2545
2550
  b(n(se), {
2546
2551
  type: "details",
@@ -2550,7 +2555,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2550
2555
  title: e.label ?? i.value,
2551
2556
  onClick: r[0] || (r[0] = (u) => l.value = !0)
2552
2557
  }, null, 8, ["size", "title"]),
2553
- b(n(nt), {
2558
+ b(n(lt), {
2554
2559
  open: l.value,
2555
2560
  "onUpdate:open": r[1] || (r[1] = (u) => l.value = u),
2556
2561
  title: i.value,
@@ -2560,13 +2565,13 @@ const tl = 76, al = /* @__PURE__ */ N({
2560
2565
  O("div", {
2561
2566
  class: "wx-help",
2562
2567
  innerHTML: s.value
2563
- }, null, 8, Vn)
2568
+ }, null, 8, En)
2564
2569
  ]),
2565
2570
  _: 1
2566
2571
  }, 8, ["open", "title", "width"])
2567
2572
  ], 64));
2568
2573
  }
2569
- }), ll = /* @__PURE__ */ Y(En, [["__scopeId", "data-v-6c280d42"]]), pt = /* @__PURE__ */ N({
2574
+ }), ol = /* @__PURE__ */ Y(Un, [["__scopeId", "data-v-6c280d42"]]), ht = /* @__PURE__ */ R({
2570
2575
  name: "WxDate",
2571
2576
  __name: "DateText",
2572
2577
  props: {
@@ -2576,8 +2581,8 @@ const tl = 76, al = /* @__PURE__ */ N({
2576
2581
  tone: { default: "muted" }
2577
2582
  },
2578
2583
  setup(e) {
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), {
2584
+ const t = e, a = ft(), l = x(() => t.compact ? a.compact(t.value) : a.short(t.value)), i = x(() => a.exact(t.value)), s = x(() => a.iso(t.value));
2585
+ return (o, r) => i.value ? (p(), $(n(st), {
2581
2586
  key: 0,
2582
2587
  content: i.value
2583
2588
  }, {
@@ -2606,16 +2611,16 @@ const tl = 76, al = /* @__PURE__ */ N({
2606
2611
  _: 1
2607
2612
  }, 8, ["size", "tone"]));
2608
2613
  }
2609
- }), Un = { class: "wx-notes" }, Rn = {
2614
+ }), Rn = { class: "wx-notes" }, Nn = {
2610
2615
  key: 3,
2611
2616
  class: "wx-notes__list"
2612
- }, Nn = { class: "wx-note__body" }, Bn = { class: "wx-note__head" }, In = { class: "wx-note__buttons" }, Pn = {
2617
+ }, Bn = { class: "wx-note__body" }, In = { class: "wx-note__head" }, Pn = { class: "wx-note__buttons" }, Dn = {
2613
2618
  key: 1,
2614
2619
  class: "wx-note__text"
2615
- }, Dn = {
2620
+ }, Mn = {
2616
2621
  key: 4,
2617
2622
  class: "wx-notes__new"
2618
- }, Mn = /* @__PURE__ */ N({
2623
+ }, Fn = /* @__PURE__ */ R({
2619
2624
  name: "WxNotes",
2620
2625
  __name: "NotesFeed",
2621
2626
  props: {
@@ -2626,7 +2631,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2626
2631
  },
2627
2632
  emits: ["change"],
2628
2633
  setup(e, { emit: t }) {
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"));
2634
+ 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(() => yn(i, a.type, a.id)), w = x(() => a.title ?? s("notes.title"));
2630
2635
  async function f() {
2631
2636
  u.value = !0;
2632
2637
  try {
@@ -2701,7 +2706,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2701
2706
  function B(C) {
2702
2707
  return C.author?.name ?? s("notes.unknown-author");
2703
2708
  }
2704
- return (C, A) => (p(), T("section", Un, [
2709
+ return (C, A) => (p(), T("section", Rn, [
2705
2710
  w.value ? (p(), $(n(G), {
2706
2711
  key: 0,
2707
2712
  weight: "medium",
@@ -2712,25 +2717,25 @@ const tl = 76, al = /* @__PURE__ */ N({
2712
2717
  ]),
2713
2718
  _: 1
2714
2719
  })) : U("", !0),
2715
- u.value ? (p(), $(n(re), {
2720
+ u.value ? (p(), $(n(ue), {
2716
2721
  key: 1,
2717
2722
  rows: 2
2718
- })) : r.value.length === 0 ? (p(), $(n(lt), {
2723
+ })) : r.value.length === 0 ? (p(), $(n(ot), {
2719
2724
  key: 2,
2720
2725
  size: "sm",
2721
2726
  description: n(s)("notes.empty")
2722
- }, null, 8, ["description"])) : (p(), T("ul", Rn, [
2727
+ }, null, 8, ["description"])) : (p(), T("ul", Nn, [
2723
2728
  (p(!0), T(H, null, Q(r.value, (E) => (p(), T("li", {
2724
2729
  key: E.id,
2725
2730
  class: "wx-note"
2726
2731
  }, [
2727
- b(n(Yt), {
2732
+ b(n(Xt), {
2728
2733
  name: B(E),
2729
2734
  size: "sm",
2730
2735
  tone: "auto"
2731
2736
  }, null, 8, ["name"]),
2732
- O("div", Nn, [
2733
- O("div", Bn, [
2737
+ O("div", Bn, [
2738
+ O("div", In, [
2734
2739
  b(n(G), {
2735
2740
  size: "sm",
2736
2741
  weight: "medium",
@@ -2741,7 +2746,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2741
2746
  ]),
2742
2747
  _: 2
2743
2748
  }, 1024),
2744
- b(pt, {
2749
+ b(ht, {
2745
2750
  value: E.created_at
2746
2751
  }, null, 8, ["value"]),
2747
2752
  b(Ue, {
@@ -2755,7 +2760,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2755
2760
  "onUpdate:modelValue": A[0] || (A[0] = (K) => v.value = K),
2756
2761
  autosize: { minRows: 2, maxRows: 10 }
2757
2762
  }, null, 8, ["modelValue"]),
2758
- O("div", In, [
2763
+ O("div", Pn, [
2759
2764
  b(n(Z), {
2760
2765
  size: "sm",
2761
2766
  type: "primary",
@@ -2777,11 +2782,11 @@ const tl = 76, al = /* @__PURE__ */ N({
2777
2782
  _: 1
2778
2783
  })
2779
2784
  ])
2780
- ], 64)) : (p(), T("p", Pn, L(E.body), 1))
2785
+ ], 64)) : (p(), T("p", Dn, L(E.body), 1))
2781
2786
  ])
2782
2787
  ]))), 128))
2783
2788
  ])),
2784
- e.can ? (p(), T("div", Dn, [
2789
+ e.can ? (p(), T("div", Mn, [
2785
2790
  b(n(De), {
2786
2791
  modelValue: c.value,
2787
2792
  "onUpdate:modelValue": A[2] || (A[2] = (E) => c.value = E),
@@ -2803,18 +2808,18 @@ const tl = 76, al = /* @__PURE__ */ N({
2803
2808
  ])) : U("", !0)
2804
2809
  ]));
2805
2810
  }
2806
- }), ol = /* @__PURE__ */ Y(Mn, [["__scopeId", "data-v-71004c1a"]]), Fn = {
2811
+ }), sl = /* @__PURE__ */ Y(Fn, [["__scopeId", "data-v-71004c1a"]]), On = {
2807
2812
  key: 1,
2808
2813
  class: "wx-backup-note"
2809
- }, On = 48, Hn = /* @__PURE__ */ N({
2814
+ }, Hn = 48, jn = /* @__PURE__ */ R({
2810
2815
  name: "WxBackupNote",
2811
2816
  __name: "BackupNote",
2812
2817
  setup(e) {
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(() => {
2818
+ const t = X(), a = ft(), l = P("webx-admin"), i = x(() => t.state.manifest?.backup ?? null), s = x(() => i.value !== null && t.can("settings.view")), o = x(() => {
2814
2819
  const c = i.value?.at;
2815
2820
  if (c == null) return !0;
2816
2821
  const h = new Date(c).getTime();
2817
- return Number.isNaN(h) || Date.now() - h > On * 36e5;
2822
+ return Number.isNaN(h) || Date.now() - h > Hn * 36e5;
2818
2823
  }), r = x(() => {
2819
2824
  const c = i.value?.bytes;
2820
2825
  if (c == null) return "";
@@ -2836,7 +2841,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2836
2841
  type: "warning",
2837
2842
  variant: "soft",
2838
2843
  description: u.value
2839
- }, null, 8, ["description"])) : s.value ? (p(), T("p", Fn, [
2844
+ }, null, 8, ["description"])) : s.value ? (p(), T("p", On, [
2840
2845
  b(n(G), {
2841
2846
  size: "sm",
2842
2847
  tone: "muted"
@@ -2846,7 +2851,7 @@ const tl = 76, al = /* @__PURE__ */ N({
2846
2851
  ]),
2847
2852
  _: 1
2848
2853
  }),
2849
- b(pt, {
2854
+ b(ht, {
2850
2855
  value: i.value?.at
2851
2856
  }, null, 8, ["value"]),
2852
2857
  r.value ? (p(), $(n(G), {
@@ -2861,69 +2866,69 @@ const tl = 76, al = /* @__PURE__ */ N({
2861
2866
  })) : U("", !0)
2862
2867
  ])) : U("", !0);
2863
2868
  }
2864
- }), sl = /* @__PURE__ */ Y(Hn, [["__scopeId", "data-v-beeee67e"]]);
2869
+ }), il = /* @__PURE__ */ Y(jn, [["__scopeId", "data-v-beeee67e"]]);
2865
2870
  export {
2866
- Ia as AdminLanding,
2867
- Pa as AdminNav,
2868
- Xa as AdminShell,
2871
+ Pa as AdminLanding,
2872
+ Da as AdminNav,
2873
+ Ga as AdminShell,
2869
2874
  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,
2875
+ ba as WxBackButton,
2876
+ il as WxBackupNote,
2877
+ ia as WxCategoriesField,
2878
+ _n as WxCategoriesPage,
2879
+ xn as WxCategoryCreateDialog,
2880
+ An as WxCategoryEditorPage,
2876
2881
  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,
2882
+ ht as WxDate,
2883
+ nl as WxFilterChips,
2884
+ ol as WxHelpButton,
2885
+ ya as WxLinkField,
2886
+ ga as WxLinkPicker,
2887
+ rt as WxListScreen,
2888
+ sl as WxNotes,
2889
+ ll as WxRenameButton,
2890
+ La as WxRichTextField,
2886
2891
  Ue as WxRowMenu,
2887
- Tn as WxSaveState,
2888
- Cn as WxScreen,
2889
- st as WxScreenHead,
2892
+ Sn as WxSaveState,
2893
+ Wn as WxScreen,
2894
+ it as WxScreenHead,
2890
2895
  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,
2896
+ dt as adminKey,
2897
+ mt as adminMessages,
2898
+ Ra as adminTypes,
2899
+ tl as categoryRoutes,
2900
+ Qn as createAdmin,
2901
+ Na as createAdminContext,
2897
2902
  xe as createCategoriesApi,
2898
- mn as createDates,
2899
- Ja as createHttp,
2903
+ vn as createDates,
2904
+ Qa as createHttp,
2900
2905
  Ee as createI18n,
2901
- ra as createLinksApi,
2902
- gn as createNotesApi,
2903
- an as createTheme,
2904
- ia as emptyLink,
2905
- fn as errorText,
2906
+ ua as createLinksApi,
2907
+ yn as createNotesApi,
2908
+ nn as createTheme,
2909
+ ra as emptyLink,
2910
+ pn as errorText,
2906
2911
  we as i18nKey,
2907
- bn as itemOrderMode,
2908
- Na as provideAdmin,
2909
- ea as provideI18n,
2910
- La as provideRecordAddress,
2911
- tn as provideTheme,
2912
+ wn as itemOrderMode,
2913
+ Ba as provideAdmin,
2914
+ ta as provideI18n,
2915
+ Aa as provideRecordAddress,
2916
+ an as provideTheme,
2912
2917
  Fe as readCookie,
2913
- rt as recordAddressKey,
2914
- cn as renderMarkdown,
2915
- aa as reorderItems,
2916
- tl as rowMenuWidth,
2917
- dt as themeKey,
2918
+ ut as recordAddressKey,
2919
+ mn as renderMarkdown,
2920
+ na as reorderItems,
2921
+ al as rowMenuWidth,
2922
+ ct as themeKey,
2918
2923
  X as useAdmin,
2919
- Qn as useCategoryEditor,
2924
+ Zn as useCategoryEditor,
2920
2925
  Ne as useCategoryWords,
2921
- vt as useDates,
2926
+ ft as useDates,
2922
2927
  Re as useErrorText,
2923
- Zt as useI18n,
2924
- Zn as useItemOrder,
2925
- Aa as useRecordAddress,
2926
- Gn as useTheme,
2928
+ ea as useI18n,
2929
+ el as useItemOrder,
2930
+ za as useRecordAddress,
2931
+ Jn as useTheme,
2927
2932
  P as useTranslate
2928
2933
  };
2929
2934
  //# sourceMappingURL=index.js.map