@webx-ui/module-admin 0.8.0 → 0.9.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,16 +1,16 @@
1
- import { defineComponent as U, useModel as he, openBlock as f, createElementBlock as x, normalizeClass as le, createBlock as b, unref as d, withCtx as g, createTextVNode as C, toDisplayString as E, createCommentVNode as W, renderSlot as L, Fragment as R, mergeModels as se, inject as G, reactive as oe, computed as S, watch as J, resolveComponent as z, renderList as j, ref as A, watchEffect as $e, onUnmounted as Se, createVNode as y, createElementVNode as M, isRef as Te, createApp as ze, h as O, withModifiers as pe, nextTick as Ee, withKeys as Ae } from "vue";
2
- import { useRouter as we, useRoute as Ce, createRouter as Le, createWebHistory as We, RouterLink as Ue } from "vue-router";
3
- import { WxHeading as Re, WxTabs as Me, WxCard as me, WxResult as Ne, useResponsiveShell as Pe, shellLayoutFor as Ve, WxToaster as De, WebxUI as Ie, localesKey as Be, WxAlert as je, WxSkeleton as ge, WxActions as He, WxDropdownItem as Oe, WxAction as ue, WxPopover as Fe, WxInput as Ke, WxButton as X, WxDialog as qe, WxTooltip as Xe, WxText as Y, WxEmpty as Ye, WxAvatar as Ge, WxTextarea as fe, toast as I, confirm as Je } from "@webx-ui/core";
4
- import { WxScreenRenderer as Qe } from "@webx-ui/schema";
5
- const Ze = ["data-wx-fill"], et = {
1
+ import { defineComponent as W, useModel as pe, openBlock as p, createElementBlock as b, normalizeClass as le, createBlock as _, unref as r, withCtx as g, createTextVNode as R, toDisplayString as C, createCommentVNode as E, renderSlot as z, Fragment as U, mergeModels as oe, inject as G, reactive as se, computed as k, mergeProps as $e, watch as J, resolveComponent as A, renderList as F, ref as L, watchEffect as Te, onUnmounted as Se, createVNode as x, createElementVNode as M, isRef as Ae, createApp as Ce, h as O, withModifiers as ve, nextTick as Le, withKeys as Re } from "vue";
2
+ import { useRouter as ge, useRoute as ze, createRouter as We, createWebHistory as Ee, RouterLink as Ue } from "vue-router";
3
+ import { WxHeading as Ie, WxTabs as De, WxCard as me, WxRichText as Me, WxResult as Be, useResponsiveShell as Ne, shellLayoutFor as Pe, WxToaster as Ve, WebxUI as He, localesKey as Fe, WxAlert as Oe, WxSkeleton as we, WxActions as je, WxDropdownItem as qe, WxAction as de, WxPopover as Ke, WxInput as Ye, WxButton as Y, WxDialog as Xe, WxTooltip as Ge, WxText as X, WxEmpty as Je, WxAvatar as Qe, WxTextarea as fe, toast as P, confirm as Ze } from "@webx-ui/core";
4
+ import { WxScreenRenderer as et } from "@webx-ui/schema";
5
+ const tt = ["data-wx-fill"], nt = {
6
6
  key: 0,
7
7
  class: "wx-list-screen__head"
8
- }, tt = {
8
+ }, at = {
9
9
  key: 1,
10
10
  class: "wx-list-screen__actions"
11
- }, nt = /* @__PURE__ */ U({
11
+ }, lt = /* @__PURE__ */ W({
12
12
  __name: "ListScreen",
13
- props: /* @__PURE__ */ se({
13
+ props: /* @__PURE__ */ oe({
14
14
  title: { default: void 0 },
15
15
  views: { default: void 0 },
16
16
  card: { type: Boolean, default: !0 },
@@ -23,69 +23,171 @@ const Ze = ["data-wx-fill"], et = {
23
23
  }),
24
24
  emits: ["update:view"],
25
25
  setup(e) {
26
- const t = he(e, "view");
27
- return (n, a) => (f(), x("div", {
26
+ const n = pe(e, "view");
27
+ return (t, a) => (p(), b("div", {
28
28
  class: le(["wx-list-screen", { "is-fill": e.fill }]),
29
29
  "data-wx-fill": e.fill ? "" : void 0
30
30
  }, [
31
- e.title || n.$slots.actions ? (f(), x("div", et, [
32
- e.title ? (f(), b(d(Re), {
31
+ e.title || t.$slots.actions ? (p(), b("div", nt, [
32
+ e.title ? (p(), _(r(Ie), {
33
33
  key: 0,
34
34
  level: 2,
35
35
  class: "wx-list-screen__title"
36
36
  }, {
37
37
  default: g(() => [
38
- C(E(e.title), 1)
38
+ R(C(e.title), 1)
39
39
  ]),
40
40
  _: 1
41
- })) : W("", !0),
42
- n.$slots.actions ? (f(), x("div", tt, [
43
- L(n.$slots, "actions", {}, void 0, !0)
44
- ])) : W("", !0)
45
- ])) : W("", !0),
46
- e.views && e.views.length > 0 ? (f(), b(d(Me), {
41
+ })) : E("", !0),
42
+ t.$slots.actions ? (p(), b("div", at, [
43
+ z(t.$slots, "actions", {}, void 0, !0)
44
+ ])) : E("", !0)
45
+ ])) : E("", !0),
46
+ e.views && e.views.length > 0 ? (p(), _(r(De), {
47
47
  key: 1,
48
- modelValue: t.value,
49
- "onUpdate:modelValue": a[0] || (a[0] = (r) => t.value = r),
48
+ modelValue: n.value,
49
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => n.value = i),
50
50
  class: "wx-list-screen__views",
51
51
  items: e.views,
52
52
  "collapse-below": e.collapseBelow,
53
53
  "aria-label": e.title
54
54
  }, {
55
55
  default: g(() => [
56
- e.card ? (f(), b(d(me), {
56
+ e.card ? (p(), _(r(me), {
57
57
  key: 0,
58
58
  class: "wx-list-screen__card",
59
59
  padding: e.padding
60
60
  }, {
61
61
  default: g(() => [
62
- L(n.$slots, "default", {}, void 0, !0)
62
+ z(t.$slots, "default", {}, void 0, !0)
63
63
  ]),
64
64
  _: 3
65
- }, 8, ["padding"])) : L(n.$slots, "default", {}, void 0, !0, 1)
65
+ }, 8, ["padding"])) : z(t.$slots, "default", {}, void 0, !0, 1)
66
66
  ]),
67
67
  _: 3
68
- }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (f(), x(R, { key: 2 }, [
69
- e.card ? (f(), b(d(me), {
68
+ }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (p(), b(U, { key: 2 }, [
69
+ e.card ? (p(), _(r(me), {
70
70
  key: 0,
71
71
  class: "wx-list-screen__card",
72
72
  padding: e.padding
73
73
  }, {
74
74
  default: g(() => [
75
- L(n.$slots, "default", {}, void 0, !0)
75
+ z(t.$slots, "default", {}, void 0, !0)
76
76
  ]),
77
77
  _: 3
78
- }, 8, ["padding"])) : L(n.$slots, "default", {}, void 0, !0, 1)
78
+ }, 8, ["padding"])) : z(t.$slots, "default", {}, void 0, !0, 1)
79
79
  ], 64))
80
- ], 10, Ze));
80
+ ], 10, tt));
81
81
  }
82
- }), B = (e, t) => {
83
- const n = e.__vccOpts || e;
84
- for (const [a, r] of t)
85
- n[a] = r;
86
- return n;
87
- }, at = /* @__PURE__ */ B(nt, [["__scopeId", "data-v-7586ed04"]]), lt = {
88
- "wx-list": { component: at, kind: "layout", labelProp: "title" }
82
+ }), V = (e, n) => {
83
+ const t = e.__vccOpts || e;
84
+ for (const [a, i] of n)
85
+ t[a] = i;
86
+ return t;
87
+ }, ot = /* @__PURE__ */ V(lt, [["__scopeId", "data-v-7586ed04"]]), Q = /* @__PURE__ */ Symbol("webx-i18n");
88
+ function fn() {
89
+ const e = G(Q, null);
90
+ if (e === null)
91
+ throw new Error("useI18n() was called outside a panel created by createAdmin().");
92
+ return e;
93
+ }
94
+ function I(e) {
95
+ const n = G(Q, null);
96
+ return n === null ? ue().scope(e) : n.scope(e);
97
+ }
98
+ function st(e, n) {
99
+ e.provide(Q, n);
100
+ }
101
+ function ue(e = {}) {
102
+ const n = e.fallback ?? "en", t = se({
103
+ locale: e.locale ?? n,
104
+ fallback: n,
105
+ panelLocales: [],
106
+ contentLocales: []
107
+ }), a = {}, i = se({ value: {} });
108
+ function o(d, s, c) {
109
+ let f = d[s]?.[c[0] ?? ""];
110
+ for (const m of c.slice(1)) {
111
+ if (typeof f != "object" || f === null)
112
+ return null;
113
+ f = f[m];
114
+ }
115
+ return typeof f == "string" ? f : null;
116
+ }
117
+ function l(d, s, c) {
118
+ const [f, m] = s.includes("::") ? s.split("::", 2) : [d, s], u = m.split("."), v = o(i.value, f, u) ?? o(a, f, u) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
119
+ // label says nothing to anybody trying to fix it.
120
+ s;
121
+ return c === void 0 ? v : it(v, c);
122
+ }
123
+ return {
124
+ state: t,
125
+ defaults(d, s) {
126
+ a[d] = { ...a[d], ...s };
127
+ },
128
+ load(d, s, c) {
129
+ i.value = d ?? {}, t.locale = s ?? t.locale, c !== void 0 && (t.fallback = c);
130
+ },
131
+ scope(d) {
132
+ return (s, c) => l(d, s, c);
133
+ },
134
+ t: (d, s) => l("", d, s)
135
+ };
136
+ }
137
+ function it(e, n) {
138
+ let t = e;
139
+ for (const [a, i] of Object.entries(n))
140
+ t = t.replaceAll(`:${a}`, String(i));
141
+ return t;
142
+ }
143
+ const rt = /* @__PURE__ */ W({
144
+ name: "WxRichTextField",
145
+ inheritAttrs: !1,
146
+ __name: "RichTextField",
147
+ setup(e) {
148
+ const n = H(), t = I("webx-admin"), a = k(() => n.pickImage ?? void 0), i = k(() => ({
149
+ bold: t("rich-text.bold"),
150
+ italic: t("rich-text.italic"),
151
+ strike: t("rich-text.strike"),
152
+ code: t("rich-text.code"),
153
+ h2: t("rich-text.h2"),
154
+ h3: t("rich-text.h3"),
155
+ h4: t("rich-text.h4"),
156
+ bulletList: t("rich-text.bullet-list"),
157
+ orderedList: t("rich-text.ordered-list"),
158
+ blockquote: t("rich-text.blockquote"),
159
+ hr: t("rich-text.hr"),
160
+ link: t("rich-text.link"),
161
+ table: t("rich-text.table"),
162
+ image: t("rich-text.image"),
163
+ youtube: t("rich-text.youtube"),
164
+ undo: t("rich-text.undo"),
165
+ redo: t("rich-text.redo"),
166
+ addRowAfter: t("rich-text.row-below"),
167
+ addRowBefore: t("rich-text.row-above"),
168
+ addColumnAfter: t("rich-text.column-after"),
169
+ addColumnBefore: t("rich-text.column-before"),
170
+ deleteRow: t("rich-text.delete-row"),
171
+ deleteColumn: t("rich-text.delete-column"),
172
+ mergeOrSplit: t("rich-text.merge-cells"),
173
+ deleteTable: t("rich-text.delete-table"),
174
+ toolbar: t("rich-text.toolbar"),
175
+ linkAddress: t("rich-text.link-address"),
176
+ youtubeAddress: t("rich-text.youtube-address"),
177
+ apply: t("rich-text.apply"),
178
+ cancel: t("rich-text.cancel"),
179
+ uploading: t("rich-text.uploading")
180
+ }));
181
+ return (o, l) => (p(), _(r(Me), $e(o.$attrs, {
182
+ labels: i.value,
183
+ "pick-image": a.value
184
+ }), null, 16, ["labels", "pick-image"]));
185
+ }
186
+ }), dt = {
187
+ "wx-list": { component: ot, kind: "layout", labelProp: "title" },
188
+ // Full width: an editor shares a row with nothing, and a form of two columns would give it
189
+ // half a line to write a page of text in.
190
+ "wx-rich-text": { component: rt, kind: "field", wide: !0 }
89
191
  }, ye = /* @__PURE__ */ Symbol("webx-admin");
90
192
  function H() {
91
193
  const e = G(ye, null);
@@ -93,243 +195,188 @@ function H() {
93
195
  throw new Error("useAdmin() was called outside a panel created by createAdmin().");
94
196
  return e;
95
197
  }
96
- function st(e) {
97
- const t = oe({
198
+ function ut(e) {
199
+ const n = se({
98
200
  status: "loading",
99
201
  manifest: null,
100
202
  user: null,
101
203
  error: null
102
- }), n = S(() => {
103
- const l = t.manifest;
104
- if (l === null)
204
+ }), t = k(() => {
205
+ const u = n.manifest;
206
+ if (u === null)
105
207
  return [];
106
208
  const v = [];
107
- for (const h of l.modules) {
108
- const w = e.modules.find((_) => _.id === h.id);
109
- if (w === void 0)
209
+ for (const w of u.modules) {
210
+ const h = e.modules.find((D) => D.id === w.id);
211
+ if (h === void 0)
110
212
  continue;
111
- const p = w.path ?? w.routes?.[0]?.path;
112
- p !== void 0 && v.push({
113
- id: h.id,
114
- title: h.title,
115
- icon: h.icon,
116
- path: p,
117
- group: h.group ?? null
213
+ const y = h.path ?? h.routes?.[0]?.path;
214
+ y !== void 0 && v.push({
215
+ id: w.id,
216
+ title: w.title,
217
+ icon: w.icon,
218
+ path: y,
219
+ group: w.group ?? null
118
220
  });
119
221
  }
120
222
  return v;
121
- }), a = S(() => {
122
- const l = t.manifest?.groups ?? [], v = [], h = /* @__PURE__ */ new Map();
123
- for (const w of n.value)
124
- if (w.group !== null && l.some((p) => p.id === w.group)) {
125
- const p = h.get(w.group) ?? [];
126
- p.push(w), h.set(w.group, p);
223
+ }), a = k(() => {
224
+ const u = n.manifest?.groups ?? [], v = [], w = /* @__PURE__ */ new Map();
225
+ for (const h of t.value)
226
+ if (h.group !== null && u.some((y) => y.id === h.group)) {
227
+ const y = w.get(h.group) ?? [];
228
+ y.push(h), w.set(h.group, y);
127
229
  } else
128
- v.push(w);
230
+ v.push(h);
129
231
  return {
130
232
  top: v,
131
- groups: l.filter((w) => h.has(w.id)).map((w) => ({
132
- id: w.id,
133
- title: w.title,
134
- entries: h.get(w.id) ?? []
233
+ groups: u.filter((h) => w.has(h.id)).map((h) => ({
234
+ id: h.id,
235
+ title: h.title,
236
+ entries: w.get(h.id) ?? []
135
237
  }))
136
238
  };
137
- }), r = { ...lt };
138
- for (const l of e.modules)
139
- Object.assign(r, l.types);
140
- Object.assign(r, e.types);
141
- const o = /* @__PURE__ */ new Map();
142
- async function s(l) {
143
- const v = `${e.i18n.state.locale}:${l}`;
144
- let h = o.get(v);
145
- return h === void 0 && (h = e.http.get(`${e.apiPath}/screens/${l}`).then((w) => w.data.root).catch((w) => {
146
- throw o.delete(v), w;
147
- }), o.set(v, h)), h;
239
+ }), i = { ...dt };
240
+ for (const u of e.modules)
241
+ Object.assign(i, u.types);
242
+ Object.assign(i, e.types);
243
+ const o = e.modules.find((u) => u.pickImage !== void 0)?.pickImage, l = /* @__PURE__ */ new Map();
244
+ async function d(u) {
245
+ const v = `${e.i18n.state.locale}:${u}`;
246
+ let w = l.get(v);
247
+ return w === void 0 && (w = e.http.get(`${e.apiPath}/screens/${u}`).then((h) => h.data.root).catch((h) => {
248
+ throw l.delete(v), h;
249
+ }), l.set(v, w)), w;
148
250
  }
149
- let u = null;
150
- async function i() {
151
- t.status = "loading", t.error = null;
251
+ let s = null;
252
+ async function c() {
253
+ n.status = "loading", n.error = null;
152
254
  try {
153
- if (u !== null && (t.user = await u(), t.user === null)) {
154
- t.manifest = null, t.status = "unauthenticated";
255
+ if (s !== null && (n.user = await s(), n.user === null)) {
256
+ n.manifest = null, n.status = "unauthenticated";
155
257
  return;
156
258
  }
157
- const l = await e.loadManifest();
158
- t.manifest = l, e.i18n.state.contentLocales = l.locales ?? [], e.i18n.state.panelLocales = l.panelLocales ?? e.i18n.state.panelLocales, l.locale !== void 0 && l.locale !== e.i18n.state.locale && await m(l.locale), t.status = "ready";
159
- } catch (l) {
160
- if (it(l)) {
161
- t.manifest = null, t.user = null, t.status = "unauthenticated";
259
+ const u = await e.loadManifest();
260
+ n.manifest = u, e.i18n.state.contentLocales = u.locales ?? [], e.i18n.state.panelLocales = u.panelLocales ?? e.i18n.state.panelLocales, u.locale !== void 0 && u.locale !== e.i18n.state.locale && await m(u.locale), n.status = "ready";
261
+ } catch (u) {
262
+ if (mt(u)) {
263
+ n.manifest = null, n.user = null, n.status = "unauthenticated";
162
264
  return;
163
265
  }
164
- t.error = l instanceof Error ? l.message : String(l), t.status = "error";
266
+ n.error = u instanceof Error ? u.message : String(u), n.status = "error";
165
267
  }
166
268
  }
167
- async function c() {
168
- if (t.manifest !== null)
269
+ async function f() {
270
+ if (n.manifest !== null)
169
271
  try {
170
- t.manifest = await e.loadManifest();
272
+ n.manifest = await e.loadManifest();
171
273
  } catch {
172
274
  }
173
275
  }
174
- async function m(l) {
276
+ async function m(u) {
175
277
  if (e.loadDictionary === void 0) {
176
- e.i18n.state.locale = l;
278
+ e.i18n.state.locale = u;
177
279
  return;
178
280
  }
179
- await e.loadDictionary(l), await c();
281
+ await e.loadDictionary(u), await f();
180
282
  }
181
283
  return {
182
284
  http: e.http,
183
285
  basePath: e.basePath,
184
286
  apiPath: e.apiPath,
185
- state: t,
287
+ state: n,
186
288
  i18n: e.i18n,
187
289
  modules: e.modules,
188
- nav: n,
290
+ nav: t,
189
291
  groups: a,
190
- types: r,
191
- reload: i,
192
- refreshManifest: c,
292
+ types: i,
293
+ pickImage: o ?? null,
294
+ reload: c,
295
+ refreshManifest: f,
193
296
  setLocale: m,
194
- setUser(l) {
195
- t.user = l;
297
+ setUser(u) {
298
+ n.user = u;
196
299
  },
197
- useSessionLoader(l) {
198
- u = l;
300
+ useSessionLoader(u) {
301
+ s = u;
199
302
  },
200
- can(l) {
201
- const v = t.user;
202
- return v === null ? !1 : v.isSuper || v.permissions.includes(l);
303
+ can(u) {
304
+ const v = n.user;
305
+ return v === null ? !1 : v.isSuper || v.permissions.includes(u);
203
306
  },
204
- loadScreen: s,
205
- screenPatch(l) {
206
- return e.screens?.[l] ?? [];
307
+ loadScreen: d,
308
+ screenPatch(u) {
309
+ return e.screens?.[u] ?? [];
207
310
  }
208
311
  };
209
312
  }
210
- function ot(e, t) {
211
- e.provide(ye, t);
313
+ function ct(e, n) {
314
+ e.provide(ye, n);
212
315
  }
213
- function it(e) {
316
+ function mt(e) {
214
317
  return typeof e == "object" && e !== null && "status" in e && e.status === 401;
215
318
  }
216
- const Q = /* @__PURE__ */ Symbol("webx-i18n");
217
- function dn() {
218
- const e = G(Q, null);
219
- if (e === null)
220
- throw new Error("useI18n() was called outside a panel created by createAdmin().");
221
- return e;
222
- }
223
- function N(e) {
224
- const t = G(Q, null);
225
- return t === null ? de().scope(e) : t.scope(e);
226
- }
227
- function rt(e, t) {
228
- e.provide(Q, t);
229
- }
230
- function de(e = {}) {
231
- const t = e.fallback ?? "en", n = oe({
232
- locale: e.locale ?? t,
233
- fallback: t,
234
- panelLocales: [],
235
- contentLocales: []
236
- }), a = {}, r = oe({ value: {} });
237
- function o(u, i, c) {
238
- let m = u[i]?.[c[0] ?? ""];
239
- for (const l of c.slice(1)) {
240
- if (typeof m != "object" || m === null)
241
- return null;
242
- m = m[l];
243
- }
244
- return typeof m == "string" ? m : null;
245
- }
246
- function s(u, i, c) {
247
- const [m, l] = i.includes("::") ? i.split("::", 2) : [u, i], v = l.split("."), h = o(r.value, m, v) ?? o(a, m, v) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
248
- // label says nothing to anybody trying to fix it.
249
- i;
250
- return c === void 0 ? h : ut(h, c);
251
- }
252
- return {
253
- state: n,
254
- defaults(u, i) {
255
- a[u] = { ...a[u], ...i };
256
- },
257
- load(u, i, c) {
258
- r.value = u ?? {}, n.locale = i ?? n.locale, c !== void 0 && (n.fallback = c);
259
- },
260
- scope(u) {
261
- return (i, c) => s(u, i, c);
262
- },
263
- t: (u, i) => s("", u, i)
264
- };
265
- }
266
- function ut(e, t) {
267
- let n = e;
268
- for (const [a, r] of Object.entries(t))
269
- n = n.replaceAll(`:${a}`, String(r));
270
- return n;
271
- }
272
- const dt = /* @__PURE__ */ U({
319
+ const ft = /* @__PURE__ */ W({
273
320
  __name: "AdminLanding",
274
321
  props: {
275
322
  landing: { default: null }
276
323
  },
277
324
  setup(e) {
278
- const t = e, n = H(), a = we(), r = N("webx-admin"), o = S(() => {
279
- const s = n.nav.value;
280
- return s.length === 0 ? null : ((t.landing === null ? void 0 : s.find((i) => i.path === t.landing)) ?? s[0])?.path ?? null;
325
+ const n = e, t = H(), a = ge(), i = I("webx-admin"), o = k(() => {
326
+ const l = t.nav.value;
327
+ return l.length === 0 ? null : ((n.landing === null ? void 0 : l.find((s) => s.path === n.landing)) ?? l[0])?.path ?? null;
281
328
  });
282
329
  return J(
283
330
  o,
284
- (s) => {
285
- s !== null && a.replace(s);
331
+ (l) => {
332
+ l !== null && a.replace(l);
286
333
  },
287
334
  { immediate: !0 }
288
- ), (s, u) => o.value === null && d(n).state.status === "ready" ? (f(), b(d(Ne), {
335
+ ), (l, d) => o.value === null && r(t).state.status === "ready" ? (p(), _(r(Be), {
289
336
  key: 0,
290
337
  status: "info",
291
- title: d(r)("shell.empty-title"),
292
- description: d(r)("shell.empty-description")
293
- }, null, 8, ["title", "description"])) : W("", !0);
338
+ title: r(i)("shell.empty-title"),
339
+ description: r(i)("shell.empty-description")
340
+ }, null, 8, ["title", "description"])) : E("", !0);
294
341
  }
295
- }), ct = /* @__PURE__ */ U({
342
+ }), ht = /* @__PURE__ */ W({
296
343
  __name: "AdminNav",
297
344
  props: {
298
345
  collapsed: { type: Boolean }
299
346
  },
300
347
  emits: ["select"],
301
- setup(e, { emit: t }) {
302
- const n = t, a = H(), r = N("webx-admin"), o = we(), s = Ce(), u = S({
303
- get: () => a.nav.value.find((c) => s.path.startsWith(c.path))?.id ?? "",
304
- set: (i) => {
305
- const c = a.nav.value.find((m) => m.id === i);
348
+ setup(e, { emit: n }) {
349
+ const t = n, a = H(), i = I("webx-admin"), o = ge(), l = ze(), d = k({
350
+ get: () => a.nav.value.find((c) => l.path.startsWith(c.path))?.id ?? "",
351
+ set: (s) => {
352
+ const c = a.nav.value.find((f) => f.id === s);
306
353
  c !== void 0 && o.push(c.path);
307
354
  }
308
355
  });
309
- return (i, c) => {
310
- const m = z("wx-menu-item"), l = z("wx-submenu"), v = z("wx-menu");
311
- return f(), b(v, {
312
- modelValue: u.value,
313
- "onUpdate:modelValue": c[0] || (c[0] = (h) => u.value = h),
356
+ return (s, c) => {
357
+ const f = A("wx-menu-item"), m = A("wx-submenu"), u = A("wx-menu");
358
+ return p(), _(u, {
359
+ modelValue: d.value,
360
+ "onUpdate:modelValue": c[0] || (c[0] = (v) => d.value = v),
314
361
  collapsed: e.collapsed,
315
- label: d(r)("nav.sections"),
316
- onSelect: c[1] || (c[1] = (h) => n("select"))
362
+ label: r(i)("nav.sections"),
363
+ onSelect: c[1] || (c[1] = (v) => t("select"))
317
364
  }, {
318
365
  default: g(() => [
319
- (f(!0), x(R, null, j(d(a).groups.value.top, (h) => (f(), b(m, {
320
- key: h.id,
321
- value: h.id,
322
- icon: h.icon ?? void 0,
323
- label: h.title
366
+ (p(!0), b(U, null, F(r(a).groups.value.top, (v) => (p(), _(f, {
367
+ key: v.id,
368
+ value: v.id,
369
+ icon: v.icon ?? void 0,
370
+ label: v.title
324
371
  }, null, 8, ["value", "icon", "label"]))), 128)),
325
- (f(!0), x(R, null, j(d(a).groups.value.groups, (h) => (f(), b(l, {
326
- key: h.id,
327
- value: `group:${h.id}`,
328
- title: h.title,
372
+ (p(!0), b(U, null, F(r(a).groups.value.groups, (v) => (p(), _(m, {
373
+ key: v.id,
374
+ value: `group:${v.id}`,
375
+ title: v.title,
329
376
  icon: "gear"
330
377
  }, {
331
378
  default: g(() => [
332
- (f(!0), x(R, null, j(h.entries, (w) => (f(), b(m, {
379
+ (p(!0), b(U, null, F(v.entries, (w) => (p(), _(f, {
333
380
  key: w.id,
334
381
  value: w.id,
335
382
  icon: w.icon ?? void 0,
@@ -343,68 +390,68 @@ const dt = /* @__PURE__ */ U({
343
390
  }, 8, ["modelValue", "collapsed", "label"]);
344
391
  };
345
392
  }
346
- }), mt = {
393
+ }), pt = {
347
394
  key: 0,
348
395
  class: "wx-root wx-admin-plain"
349
- }, ft = {
396
+ }, vt = {
350
397
  key: 1,
351
398
  class: "wx-root wx-admin-plain"
352
- }, vt = {
399
+ }, gt = {
353
400
  key: 2,
354
401
  class: "wx-root wx-admin-plain"
355
- }, ht = ["src", "alt", "width", "height"], pt = ["src", "alt", "width", "height"], wt = ["src", "alt"], gt = { class: "wx-admin__user" }, yt = { class: "wx-admin__user wx-admin__user--drawer" }, xt = /* @__PURE__ */ U({
402
+ }, wt = ["src", "alt", "width", "height"], yt = ["src", "alt", "width", "height"], xt = ["src", "alt"], bt = { class: "wx-admin__user" }, _t = { class: "wx-admin__user wx-admin__user--drawer" }, kt = /* @__PURE__ */ W({
356
403
  __name: "AdminShell",
357
404
  setup(e) {
358
- const t = H(), n = N("webx-admin"), a = A(null), { width: r, layout: o, collapsed: s, showAside: u, drawerOpen: i, toggle: c, close: m } = Pe(
405
+ const n = H(), t = I("webx-admin"), a = L(null), { width: i, layout: o, collapsed: l, showAside: d, drawerOpen: s, toggle: c, close: f } = Ne(
359
406
  a,
360
407
  { persist: "webx-admin-shell" }
361
- ), l = S(() => t.state.manifest?.title ?? ""), v = S(() => t.state.manifest?.branding?.logo ?? null), h = S(() => t.state.manifest?.branding?.mark ?? null), w = S(() => Ve(r.value, null));
362
- return $e(() => {
408
+ ), m = k(() => n.state.manifest?.title ?? ""), u = k(() => n.state.manifest?.branding?.logo ?? null), v = k(() => n.state.manifest?.branding?.mark ?? null), w = k(() => Pe(i.value, null));
409
+ return Te(() => {
363
410
  typeof document > "u" || (document.documentElement.dataset.wxShell = w.value);
364
411
  }), Se(() => {
365
412
  typeof document < "u" && delete document.documentElement.dataset.wxShell;
366
- }), (p, _) => {
367
- const V = z("router-view"), Z = z("wx-loading"), ee = z("wx-button"), te = z("wx-result"), D = z("wx-action"), k = z("wx-text"), T = z("wx-header"), $ = z("wx-aside"), P = z("wx-main"), _e = z("wx-container"), ke = z("wx-drawer");
368
- return f(), x(R, null, [
369
- y(d(De)),
370
- d(t).state.status === "unauthenticated" ? (f(), x("div", mt, [
371
- y(V)
372
- ])) : d(t).state.status === "loading" ? (f(), x("div", ft, [
373
- y(Z, {
374
- label: d(n)("shell.loading")
413
+ }), (h, y) => {
414
+ const D = A("router-view"), Z = A("wx-loading"), ee = A("wx-button"), te = A("wx-result"), N = A("wx-action"), $ = A("wx-text"), S = A("wx-header"), T = A("wx-aside"), B = A("wx-main"), _e = A("wx-container"), ke = A("wx-drawer");
415
+ return p(), b(U, null, [
416
+ x(r(Ve)),
417
+ r(n).state.status === "unauthenticated" ? (p(), b("div", pt, [
418
+ x(D)
419
+ ])) : r(n).state.status === "loading" ? (p(), b("div", vt, [
420
+ x(Z, {
421
+ label: r(t)("shell.loading")
375
422
  }, null, 8, ["label"])
376
- ])) : d(t).state.status === "error" ? (f(), x("div", vt, [
377
- y(te, {
423
+ ])) : r(n).state.status === "error" ? (p(), b("div", gt, [
424
+ x(te, {
378
425
  status: "error",
379
- title: d(n)("shell.error-title"),
380
- description: d(t).state.error
426
+ title: r(t)("shell.error-title"),
427
+ description: r(n).state.error
381
428
  }, {
382
429
  default: g(() => [
383
- y(ee, {
430
+ x(ee, {
384
431
  type: "primary",
385
- onClick: _[0] || (_[0] = (ce) => d(t).reload())
432
+ onClick: y[0] || (y[0] = (ce) => r(n).reload())
386
433
  }, {
387
434
  default: g(() => [
388
- C(E(d(n)("shell.retry")), 1)
435
+ R(C(r(t)("shell.retry")), 1)
389
436
  ]),
390
437
  _: 1
391
438
  })
392
439
  ]),
393
440
  _: 1
394
441
  }, 8, ["title", "description"])
395
- ])) : (f(), x("div", {
442
+ ])) : (p(), b("div", {
396
443
  key: 3,
397
444
  ref_key: "shellEl",
398
445
  ref: a,
399
446
  class: le(["wx-root wx-admin", `wx-admin--${w.value}`])
400
447
  }, [
401
- y(_e, {
402
- direction: d(o) === "drawer" ? "vertical" : "horizontal",
448
+ x(_e, {
449
+ direction: r(o) === "drawer" ? "vertical" : "horizontal",
403
450
  "full-height": "",
404
451
  class: "wx-admin__frame"
405
452
  }, {
406
453
  default: g(() => [
407
- d(o) === "drawer" ? (f(), b(T, {
454
+ r(o) === "drawer" ? (p(), _(S, {
408
455
  key: 0,
409
456
  class: "wx-admin__header",
410
457
  floating: "",
@@ -414,126 +461,126 @@ const dt = /* @__PURE__ */ U({
414
461
  height: "var(--wx-admin-header-height)"
415
462
  }, {
416
463
  end: g(() => [
417
- L(p.$slots, "user", { expanded: !1 }, void 0, !0)
464
+ z(h.$slots, "user", { expanded: !1 }, void 0, !0)
418
465
  ]),
419
466
  default: g(() => [
420
- y(D, {
467
+ x(N, {
421
468
  icon: "menu",
422
- title: d(n)("nav.menu"),
423
- onClick: d(c)
469
+ title: r(t)("nav.menu"),
470
+ onClick: r(c)
424
471
  }, null, 8, ["title", "onClick"]),
425
- L(p.$slots, "brand", {}, () => [
426
- v.value ? (f(), x("img", {
472
+ z(h.$slots, "brand", {}, () => [
473
+ u.value ? (p(), b("img", {
427
474
  key: 0,
428
475
  class: "wx-admin__logo",
429
- src: v.value.url,
430
- alt: l.value,
431
- width: v.value.width ?? void 0,
432
- height: v.value.height ?? void 0
433
- }, null, 8, ht)) : (f(), b(k, {
476
+ src: u.value.url,
477
+ alt: m.value,
478
+ width: u.value.width ?? void 0,
479
+ height: u.value.height ?? void 0
480
+ }, null, 8, wt)) : (p(), _($, {
434
481
  key: 1,
435
482
  weight: "semibold",
436
483
  truncate: ""
437
484
  }, {
438
485
  default: g(() => [
439
- C(E(l.value), 1)
486
+ R(C(m.value), 1)
440
487
  ]),
441
488
  _: 1
442
489
  }))
443
490
  ], !0)
444
491
  ]),
445
492
  _: 3
446
- })) : W("", !0),
447
- d(u) ? (f(), b($, {
493
+ })) : E("", !0),
494
+ r(d) ? (p(), _(T, {
448
495
  key: 1,
449
496
  class: "wx-admin__aside",
450
497
  sticky: "",
451
498
  floating: "",
452
499
  scroll: "",
453
500
  bordered: !1,
454
- collapsed: d(s),
501
+ collapsed: r(l),
455
502
  width: 220,
456
503
  "collapsed-width": 56
457
504
  }, {
458
505
  top: g(() => [
459
506
  M("div", {
460
- class: le(["wx-admin__brand", { "wx-admin__brand--stacked": d(s) && h.value }])
507
+ class: le(["wx-admin__brand", { "wx-admin__brand--stacked": r(l) && v.value }])
461
508
  }, [
462
- d(s) ? h.value ? (f(), x("img", {
509
+ r(l) ? v.value ? (p(), b("img", {
463
510
  key: 1,
464
511
  class: "wx-admin__mark",
465
- src: h.value.url,
466
- alt: l.value
467
- }, null, 8, wt)) : W("", !0) : L(p.$slots, "brand", {}, () => [
468
- v.value ? (f(), x("img", {
512
+ src: v.value.url,
513
+ alt: m.value
514
+ }, null, 8, xt)) : E("", !0) : z(h.$slots, "brand", {}, () => [
515
+ u.value ? (p(), b("img", {
469
516
  key: 0,
470
517
  class: "wx-admin__logo",
471
- src: v.value.url,
472
- alt: l.value,
473
- width: v.value.width ?? void 0,
474
- height: v.value.height ?? void 0
475
- }, null, 8, pt)) : (f(), b(k, {
518
+ src: u.value.url,
519
+ alt: m.value,
520
+ width: u.value.width ?? void 0,
521
+ height: u.value.height ?? void 0
522
+ }, null, 8, yt)) : (p(), _($, {
476
523
  key: 1,
477
524
  weight: "semibold",
478
525
  truncate: "",
479
526
  class: "wx-admin__title"
480
527
  }, {
481
528
  default: g(() => [
482
- C(E(l.value), 1)
529
+ R(C(m.value), 1)
483
530
  ]),
484
531
  _: 1
485
532
  }))
486
533
  ], !0, 0),
487
- y(D, {
534
+ x(N, {
488
535
  icon: "sidebar",
489
- title: d(s) ? d(n)("nav.expand") : d(n)("nav.collapse"),
490
- onClick: d(c)
536
+ title: r(l) ? r(t)("nav.expand") : r(t)("nav.collapse"),
537
+ onClick: r(c)
491
538
  }, null, 8, ["title", "onClick"])
492
539
  ], 2)
493
540
  ]),
494
541
  bottom: g(() => [
495
- M("div", gt, [
496
- L(p.$slots, "user", {
497
- expanded: !d(s)
542
+ M("div", bt, [
543
+ z(h.$slots, "user", {
544
+ expanded: !r(l)
498
545
  }, void 0, !0)
499
546
  ])
500
547
  ]),
501
548
  default: g(() => [
502
- L(p.$slots, "nav", { collapsed: d(s) }, void 0, !0)
549
+ z(h.$slots, "nav", { collapsed: r(l) }, void 0, !0)
503
550
  ]),
504
551
  _: 3
505
- }, 8, ["collapsed"])) : W("", !0),
506
- y(P, {
552
+ }, 8, ["collapsed"])) : E("", !0),
553
+ x(B, {
507
554
  padding: "none",
508
555
  class: "wx-admin__screen"
509
556
  }, {
510
557
  default: g(() => [
511
- y(V)
558
+ x(D)
512
559
  ]),
513
560
  _: 1
514
561
  })
515
562
  ]),
516
563
  _: 3
517
564
  }, 8, ["direction"]),
518
- y(ke, {
519
- open: d(i),
520
- "onUpdate:open": _[1] || (_[1] = (ce) => Te(i) ? i.value = ce : null),
565
+ x(ke, {
566
+ open: r(s),
567
+ "onUpdate:open": y[1] || (y[1] = (ce) => Ae(s) ? s.value = ce : null),
521
568
  class: "wx-admin__drawer",
522
- title: l.value === "" ? d(n)("nav.menu") : l.value,
569
+ title: m.value === "" ? r(t)("nav.menu") : m.value,
523
570
  side: "left",
524
571
  size: 260,
525
572
  "full-screen": !1,
526
573
  closable: ""
527
574
  }, {
528
575
  footer: g(() => [
529
- M("div", yt, [
530
- L(p.$slots, "user", { expanded: !0 }, void 0, !0)
576
+ M("div", _t, [
577
+ z(h.$slots, "user", { expanded: !0 }, void 0, !0)
531
578
  ])
532
579
  ]),
533
580
  default: g(() => [
534
- L(p.$slots, "nav", {
581
+ z(h.$slots, "nav", {
535
582
  collapsed: !1,
536
- select: d(m)
583
+ select: r(f)
537
584
  }, void 0, !0)
538
585
  ]),
539
586
  _: 3
@@ -542,10 +589,10 @@ const dt = /* @__PURE__ */ U({
542
589
  ], 64);
543
590
  };
544
591
  }
545
- }), bt = /* @__PURE__ */ B(xt, [["__scopeId", "data-v-5baa6cbf"]]);
592
+ }), $t = /* @__PURE__ */ V(kt, [["__scopeId", "data-v-5baa6cbf"]]);
546
593
  class ie extends Error {
547
- constructor(t, n, a = {}, r = null, o = null) {
548
- super(t), this.status = n, this.errors = a, this.retryAfter = r, this.body = o, this.name = "HttpError";
594
+ constructor(n, t, a = {}, i = null, o = null) {
595
+ super(n), this.status = t, this.errors = a, this.retryAfter = i, this.body = o, this.name = "HttpError";
549
596
  }
550
597
  status;
551
598
  errors;
@@ -562,81 +609,81 @@ class ie extends Error {
562
609
  return this.status === 429;
563
610
  }
564
611
  }
565
- const _t = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
566
- function kt(e = {}) {
567
- const t = (e.baseUrl ?? "").replace(/\/$/, ""), n = e.csrfUrl ?? "/sanctum/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), r = e.onUnauthenticated, o = e.headers;
568
- let s = !1;
569
- async function u(c = !1) {
570
- s && !c && ve("XSRF-TOKEN") !== null || (await a(n, { credentials: "same-origin" }), s = !0);
612
+ const Tt = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
613
+ function St(e = {}) {
614
+ const n = (e.baseUrl ?? "").replace(/\/$/, ""), t = e.csrfUrl ?? "/sanctum/csrf-cookie", a = e.fetch ?? globalThis.fetch.bind(globalThis), i = e.onUnauthenticated, o = e.headers;
615
+ let l = !1;
616
+ async function d(c = !1) {
617
+ l && !c && he("XSRF-TOKEN") !== null || (await a(t, { credentials: "same-origin" }), l = !0);
571
618
  }
572
- async function i(c, m, l, v = {}, h = !1) {
573
- const w = _t.has(c);
574
- w && await u();
575
- const p = {
619
+ async function s(c, f, m, u = {}, v = !1) {
620
+ const w = Tt.has(c);
621
+ w && await d();
622
+ const h = {
576
623
  Accept: "application/json",
577
624
  "X-Requested-With": "XMLHttpRequest",
578
625
  // Standing headers first, so a caller can still override one for a single request.
579
626
  ...o?.(),
580
- ...v.headers
627
+ ...u.headers
581
628
  };
582
629
  if (w) {
583
- const V = ve("XSRF-TOKEN");
584
- V !== null && (p["X-XSRF-TOKEN"] = V);
630
+ const D = he("XSRF-TOKEN");
631
+ D !== null && (h["X-XSRF-TOKEN"] = D);
585
632
  }
586
- l !== void 0 && (p["Content-Type"] = "application/json");
587
- const _ = await a(St(t, m, v.query), {
633
+ m !== void 0 && (h["Content-Type"] = "application/json");
634
+ const y = await a(Ct(n, f, u.query), {
588
635
  method: c,
589
636
  credentials: "same-origin",
590
- headers: p,
591
- signal: v.signal,
592
- body: l === void 0 ? void 0 : JSON.stringify(l)
637
+ headers: h,
638
+ signal: u.signal,
639
+ body: m === void 0 ? void 0 : JSON.stringify(m)
593
640
  });
594
- if (_.status === 419 && w && !h)
595
- return await u(!0), i(c, m, l, v, !0);
596
- if (_.status === 401 && r?.(), !_.ok)
597
- throw await $t(_);
598
- if (_.status !== 204)
599
- return await _.json();
641
+ if (y.status === 419 && w && !v)
642
+ return await d(!0), s(c, f, m, u, !0);
643
+ if (y.status === 401 && i?.(), !y.ok)
644
+ throw await At(y);
645
+ if (y.status !== 204)
646
+ return await y.json();
600
647
  }
601
648
  return {
602
- get: (c, m) => i("GET", c, void 0, m),
603
- post: (c, m, l) => i("POST", c, m, l),
604
- put: (c, m, l) => i("PUT", c, m, l),
605
- patch: (c, m, l) => i("PATCH", c, m, l),
606
- delete: (c, m) => i("DELETE", c, void 0, m)
649
+ get: (c, f) => s("GET", c, void 0, f),
650
+ post: (c, f, m) => s("POST", c, f, m),
651
+ put: (c, f, m) => s("PUT", c, f, m),
652
+ patch: (c, f, m) => s("PATCH", c, f, m),
653
+ delete: (c, f) => s("DELETE", c, void 0, f)
607
654
  };
608
655
  }
609
- async function $t(e) {
610
- let t = null;
656
+ async function At(e) {
657
+ let n = null;
611
658
  try {
612
- t = await e.json();
659
+ n = await e.json();
613
660
  } catch {
614
661
  }
615
- const n = t ?? {}, a = typeof n.message == "string" && n.message !== "" ? n.message : e.statusText || `Request failed with ${e.status}`, r = n.errors !== null && typeof n.errors == "object" ? n.errors : {}, o = e.headers.get("Retry-After"), s = o === null ? null : Number.parseInt(o, 10);
662
+ const t = n ?? {}, a = typeof t.message == "string" && t.message !== "" ? t.message : e.statusText || `Request failed with ${e.status}`, i = t.errors !== null && typeof t.errors == "object" ? t.errors : {}, o = e.headers.get("Retry-After"), l = o === null ? null : Number.parseInt(o, 10);
616
663
  return new ie(
617
664
  a,
618
665
  e.status,
619
- r,
620
- Number.isFinite(s) ? s : null,
621
- t
666
+ i,
667
+ Number.isFinite(l) ? l : null,
668
+ n
622
669
  );
623
670
  }
624
- function St(e, t, n) {
625
- const r = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
626
- if (n === void 0)
627
- return r;
671
+ function Ct(e, n, t) {
672
+ const i = /^https?:\/\//i.test(n) ? n : `${e}/${n.replace(/^\//, "")}`;
673
+ if (t === void 0)
674
+ return i;
628
675
  const o = new URLSearchParams();
629
- for (const [u, i] of Object.entries(n))
630
- i != null && o.set(u, String(i));
631
- const s = o.toString();
632
- return s === "" ? r : `${r}${r.includes("?") ? "&" : "?"}${s}`;
676
+ for (const [d, s] of Object.entries(t))
677
+ s != null && o.set(d, String(s));
678
+ const l = o.toString();
679
+ return l === "" ? i : `${i}${i.includes("?") ? "&" : "?"}${l}`;
633
680
  }
634
- function ve(e) {
681
+ function he(e) {
635
682
  if (typeof document > "u")
636
683
  return null;
637
- for (const t of document.cookie.split(";")) {
638
- const [n, ...a] = t.trim().split("=");
639
- if (n === e)
684
+ for (const n of document.cookie.split(";")) {
685
+ const [t, ...a] = n.trim().split("=");
686
+ if (t === e)
640
687
  return decodeURIComponent(a.join("="));
641
688
  }
642
689
  return null;
@@ -692,6 +739,41 @@ const xe = {
692
739
  offline: "The server did not answer. Check the connection and try again.",
693
740
  unknown: "That did not work."
694
741
  },
742
+ // The toolbar of `wx-rich-text`. The editor is a component of the design system and carries
743
+ // English defaults; these are what the panel calls the same buttons.
744
+ "rich-text": {
745
+ bold: "Bold",
746
+ italic: "Italic",
747
+ strike: "Strikethrough",
748
+ code: "Inline code",
749
+ h2: "Heading 2",
750
+ h3: "Heading 3",
751
+ h4: "Heading 4",
752
+ "bullet-list": "Bulleted list",
753
+ "ordered-list": "Numbered list",
754
+ blockquote: "Quote",
755
+ hr: "Divider",
756
+ link: "Link",
757
+ table: "Table",
758
+ image: "Image",
759
+ youtube: "YouTube video",
760
+ undo: "Undo",
761
+ redo: "Redo",
762
+ "row-below": "Row below",
763
+ "row-above": "Row above",
764
+ "column-after": "Column after",
765
+ "column-before": "Column before",
766
+ "delete-row": "Delete row",
767
+ "delete-column": "Delete column",
768
+ "merge-cells": "Merge or split cells",
769
+ "delete-table": "Delete table",
770
+ toolbar: "Text formatting",
771
+ "link-address": "Link address",
772
+ "youtube-address": "YouTube URL",
773
+ apply: "Apply",
774
+ cancel: "Cancel",
775
+ uploading: "Uploading…"
776
+ },
695
777
  // What one administrator writes on a record for the next one. Not the property of any
696
778
  // section: the same feed hangs off a submission, an order and a client, so the words are
697
779
  // the panel's own.
@@ -716,196 +798,196 @@ const xe = {
716
798
  "not-yours": "A note is edited by whoever wrote it."
717
799
  }
718
800
  }, be = "webx.locale";
719
- function cn(e = {}) {
720
- const t = e.manifestUrl ?? Lt() ?? "/api/cms/manifest", n = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", r = e.modules ?? [], o = [...e.routes ?? []];
721
- for (const p of r)
722
- o.push(...p.routes ?? []);
723
- if (!o.some((p) => p.path === "/")) {
724
- const p = r.find((_) => _.landing === !0);
801
+ function hn(e = {}) {
802
+ const n = e.manifestUrl ?? Ut() ?? "/api/cms/manifest", t = e.apiPath ?? n.replace(/\/manifest\/?$/, ""), a = e.basePath ?? "/cms", i = e.modules ?? [], o = [...e.routes ?? []];
803
+ for (const h of i)
804
+ o.push(...h.routes ?? []);
805
+ if (!o.some((h) => h.path === "/")) {
806
+ const h = i.find((y) => y.landing === !0);
725
807
  o.push({
726
808
  path: "/",
727
809
  name: "webx.home",
728
- component: dt,
729
- props: { landing: p?.path ?? p?.routes?.[0]?.path ?? null }
810
+ component: ft,
811
+ props: { landing: h?.path ?? h?.routes?.[0]?.path ?? null }
730
812
  });
731
813
  }
732
- const s = Le({
733
- history: We(a),
814
+ const l = We({
815
+ history: Ee(a),
734
816
  routes: o
735
- }), u = de({ locale: e.locale ?? zt() }), i = e.http ?? kt({
817
+ }), d = ue({ locale: e.locale ?? Rt() }), s = e.http ?? St({
736
818
  baseUrl: "",
737
819
  onUnauthenticated: () => {
738
- m.setUser(null), m.state.status = "unauthenticated";
820
+ f.setUser(null), f.state.status = "unauthenticated";
739
821
  },
740
822
  // Every request says which language the panel is currently showing. It decides what
741
823
  // the server writes its own messages in — a 422 under a field — for anybody who has
742
824
  // not stored a preference yet, which is everybody until they choose one. Without it,
743
825
  // signing in on a Russian sign-in screen lands in an English panel.
744
- headers: () => ({ "X-Webx-Locale": u.state.locale })
826
+ headers: () => ({ "X-Webx-Locale": d.state.locale })
745
827
  });
746
- u.defaults("webx-admin", xe);
747
- async function c(p) {
748
- const _ = await i.get(`${n}/translations/${p}`);
749
- u.load(_.data.namespaces, _.data.locale, _.data.fallback), Et(_.data.locale), Ct(_.data.locale, u.state.panelLocales);
828
+ d.defaults("webx-admin", xe);
829
+ async function c(h) {
830
+ const y = await s.get(`${t}/translations/${h}`);
831
+ d.load(y.data.namespaces, y.data.locale, y.data.fallback), zt(y.data.locale), Et(y.data.locale, d.state.panelLocales);
750
832
  }
751
- const m = st({
752
- http: i,
833
+ const f = ut({
834
+ http: s,
753
835
  basePath: a,
754
- apiPath: n,
755
- modules: r,
756
- i18n: u,
836
+ apiPath: t,
837
+ modules: i,
838
+ i18n: d,
757
839
  loadDictionary: c,
758
840
  types: e.types,
759
841
  screens: e.screens,
760
- loadManifest: async () => (await i.get(t)).data
761
- }), l = ze(Tt(e));
762
- l.use(Ie), ot(l, m), rt(l, u);
763
- const v = A("");
764
- l.provide(Be, {
765
- list: S(
766
- () => u.state.contentLocales.map((p) => ({
767
- code: p.code,
768
- label: p.code.toUpperCase()
842
+ loadManifest: async () => (await s.get(n)).data
843
+ }), m = Ce(Lt(e));
844
+ m.use(He), ct(m, f), st(m, d);
845
+ const u = L("");
846
+ m.provide(Fe, {
847
+ list: k(
848
+ () => d.state.contentLocales.map((h) => ({
849
+ code: h.code,
850
+ label: h.code.toUpperCase()
769
851
  }))
770
852
  ),
771
- active: S({
772
- get: () => v.value || (u.state.contentLocales[0]?.code ?? ""),
773
- set: (p) => {
774
- v.value = p;
853
+ active: k({
854
+ get: () => u.value || (d.state.contentLocales[0]?.code ?? ""),
855
+ set: (h) => {
856
+ u.value = h;
775
857
  }
776
858
  })
777
859
  });
778
- const h = {
779
- app: l,
780
- router: s,
781
- context: m,
782
- i18n: u,
860
+ const v = {
861
+ app: m,
862
+ router: l,
863
+ context: f,
864
+ i18n: d,
783
865
  async mount() {
784
- await Promise.all([w(), c(u.state.locale)]).catch(() => {
785
- }), l.mount(e.el ?? "#webx-app"), await m.reload();
866
+ await Promise.all([w(), c(d.state.locale)]).catch(() => {
867
+ }), m.mount(e.el ?? "#webx-app"), await f.reload();
786
868
  }
787
869
  };
788
870
  async function w() {
789
- const p = await i.get(`${n}/locales`);
790
- u.state.panelLocales = p.data.panel, u.state.contentLocales = p.data.content;
871
+ const h = await s.get(`${t}/locales`);
872
+ d.state.panelLocales = h.data.panel, d.state.contentLocales = h.data.content;
791
873
  }
792
- for (const p of e.plugins ?? [])
793
- p.install(h);
794
- return l.use(s), h;
874
+ for (const h of e.plugins ?? [])
875
+ h.install(v);
876
+ return m.use(l), v;
795
877
  }
796
- function Tt(e) {
797
- const t = {
878
+ function Lt(e) {
879
+ const n = {
798
880
  // The menu is the panel's own: it is the manifest, drawn.
799
881
  // The shell hands in what a choice means where it drew the menu — in the drawer it is what
800
882
  // closes it, and a drawer that stays open over the section it just opened is a drawer the
801
883
  // reader has to dismiss by hand.
802
- nav: (n) => O(ct, { collapsed: n.collapsed === !0, onSelect: n.select })
884
+ nav: (t) => O(ht, { collapsed: t.collapsed === !0, onSelect: t.select })
803
885
  };
804
- return e.brand !== void 0 && (t.brand = () => O(e.brand)), e.userMenu !== void 0 && (t.user = (n) => O(e.userMenu, { expanded: n.expanded === !0 })), { render: () => O(bt, null, t) };
886
+ return e.brand !== void 0 && (n.brand = () => O(e.brand)), e.userMenu !== void 0 && (n.user = (t) => O(e.userMenu, { expanded: t.expanded === !0 })), { render: () => O($t, null, n) };
805
887
  }
806
- function zt() {
807
- const e = At(be);
888
+ function Rt() {
889
+ const e = Wt(be);
808
890
  return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
809
891
  }
810
- function Et(e) {
892
+ function zt(e) {
811
893
  try {
812
894
  localStorage.setItem(be, e);
813
895
  } catch {
814
896
  }
815
897
  }
816
- function At(e) {
898
+ function Wt(e) {
817
899
  try {
818
900
  return localStorage.getItem(e);
819
901
  } catch {
820
902
  return null;
821
903
  }
822
904
  }
823
- function Ct(e, t) {
824
- typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((n) => n.code === e)?.direction ?? "ltr");
905
+ function Et(e, n) {
906
+ typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = n.find((t) => t.code === e)?.direction ?? "ltr");
825
907
  }
826
- function Lt() {
908
+ function Ut() {
827
909
  return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
828
910
  }
829
- function Wt(e) {
830
- const t = e.replace(/\r\n?/g, `
911
+ function It(e) {
912
+ const n = e.replace(/\r\n?/g, `
831
913
  `).split(`
832
- `), n = [];
914
+ `), t = [];
833
915
  let a = 0;
834
- for (; a < t.length; ) {
835
- const r = t[a] ?? "";
836
- if (r.trim() === "") {
916
+ for (; a < n.length; ) {
917
+ const i = n[a] ?? "";
918
+ if (i.trim() === "") {
837
919
  a += 1;
838
920
  continue;
839
921
  }
840
- if (/^```([\w-]*)\s*$/.exec(r)) {
841
- const i = [];
842
- for (a += 1; a < t.length && !/^```\s*$/.test(t[a] ?? ""); )
843
- i.push(t[a] ?? ""), a += 1;
844
- a += 1, n.push(`<pre><code>${re(i.join(`
922
+ if (/^```([\w-]*)\s*$/.exec(i)) {
923
+ const s = [];
924
+ for (a += 1; a < n.length && !/^```\s*$/.test(n[a] ?? ""); )
925
+ s.push(n[a] ?? ""), a += 1;
926
+ a += 1, t.push(`<pre><code>${re(s.join(`
845
927
  `))}</code></pre>`);
846
928
  continue;
847
929
  }
848
- const s = /^(#{1,4})\s+(.*)$/.exec(r);
849
- if (s) {
850
- const i = Math.min(s[1].length + 1, 5);
851
- n.push(`<h${i}>${ne(s[2] ?? "")}</h${i}>`), a += 1;
930
+ const l = /^(#{1,4})\s+(.*)$/.exec(i);
931
+ if (l) {
932
+ const s = Math.min(l[1].length + 1, 5);
933
+ t.push(`<h${s}>${ne(l[2] ?? "")}</h${s}>`), a += 1;
852
934
  continue;
853
935
  }
854
- if (K(r)) {
855
- const i = /^\s*\d+[.)]\s+/.test(r), c = [];
856
- for (; a < t.length && K(t[a] ?? ""); )
857
- for (c.push((t[a] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), a += 1; a < t.length; ) {
858
- const l = t[a] ?? "";
859
- if (l.trim() === "" || K(l) || /^(#{1,4})\s/.test(l) || /^```/.test(l))
936
+ if (q(i)) {
937
+ const s = /^\s*\d+[.)]\s+/.test(i), c = [];
938
+ for (; a < n.length && q(n[a] ?? ""); )
939
+ for (c.push((n[a] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), a += 1; a < n.length; ) {
940
+ const m = n[a] ?? "";
941
+ if (m.trim() === "" || q(m) || /^(#{1,4})\s/.test(m) || /^```/.test(m))
860
942
  break;
861
- c[c.length - 1] += ` ${l.trim()}`, a += 1;
943
+ c[c.length - 1] += ` ${m.trim()}`, a += 1;
862
944
  }
863
- const m = i ? "ol" : "ul";
864
- n.push(`<${m}>${c.map((l) => `<li>${ne(l)}</li>`).join("")}</${m}>`);
945
+ const f = s ? "ol" : "ul";
946
+ t.push(`<${f}>${c.map((m) => `<li>${ne(m)}</li>`).join("")}</${f}>`);
865
947
  continue;
866
948
  }
867
- const u = [];
868
- for (; a < t.length; ) {
869
- const i = t[a] ?? "";
870
- if (i.trim() === "" || K(i) || /^(#{1,4})\s/.test(i) || /^```/.test(i)) break;
871
- u.push(i.trim()), a += 1;
949
+ const d = [];
950
+ for (; a < n.length; ) {
951
+ const s = n[a] ?? "";
952
+ if (s.trim() === "" || q(s) || /^(#{1,4})\s/.test(s) || /^```/.test(s)) break;
953
+ d.push(s.trim()), a += 1;
872
954
  }
873
- n.push(`<p>${ne(u.join(" "))}</p>`);
955
+ t.push(`<p>${ne(d.join(" "))}</p>`);
874
956
  }
875
- return n.join("");
957
+ return t.join("");
876
958
  }
877
- const F = "\0";
878
- function K(e) {
959
+ const j = "\0";
960
+ function q(e) {
879
961
  return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
880
962
  }
881
963
  function ne(e) {
882
- const t = [], n = e.replace(/`([^`]+)`/g, (r, o) => (t.push(`<code>${re(o)}</code>`), `${F}${t.length - 1}${F}`));
883
- return re(n).replace(
964
+ const n = [], t = e.replace(/`([^`]+)`/g, (i, o) => (n.push(`<code>${re(o)}</code>`), `${j}${n.length - 1}${j}`));
965
+ return re(t).replace(
884
966
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
885
967
  '<a href="$2" target="_blank" rel="noopener">$1</a>'
886
968
  ).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
887
- new RegExp(`${F}(\\d+)${F}`, "g"),
888
- (r, o) => t[Number(o)] ?? ""
969
+ new RegExp(`${j}(\\d+)${j}`, "g"),
970
+ (i, o) => n[Number(o)] ?? ""
889
971
  );
890
972
  }
891
973
  function re(e) {
892
974
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
893
975
  }
894
- function Ut(e) {
895
- const t = e.scope("webx-admin"), n = /* @__PURE__ */ new Map();
896
- function a(o, s, u) {
897
- const i = e.state.locale, c = `${i}:${o}`;
898
- let m = n.get(c);
899
- return m === void 0 && (m = new Intl.DateTimeFormat(i, s), n.set(c, m)), m.format(u);
976
+ function Dt(e) {
977
+ const n = e.scope("webx-admin"), t = /* @__PURE__ */ new Map();
978
+ function a(o, l, d) {
979
+ const s = e.state.locale, c = `${s}:${o}`;
980
+ let f = t.get(c);
981
+ return f === void 0 && (f = new Intl.DateTimeFormat(s, l), t.set(c, f)), f.format(d);
900
982
  }
901
- const r = (o) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, o);
983
+ const i = (o) => a("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, o);
902
984
  return {
903
985
  short(o) {
904
- const s = ae(o);
905
- if (s === null)
906
- return t("dates.never");
907
- const u = /* @__PURE__ */ new Date(), i = Nt(s, u);
908
- return i === 0 ? t("dates.today", { time: r(s) }) : i === -1 ? t("dates.yesterday", { time: r(s) }) : s.getFullYear() === u.getFullYear() ? a(
986
+ const l = ae(o);
987
+ if (l === null)
988
+ return n("dates.never");
989
+ const d = /* @__PURE__ */ new Date(), s = Nt(l, d);
990
+ return s === 0 ? n("dates.today", { time: i(l) }) : s === -1 ? n("dates.yesterday", { time: i(l) }) : l.getFullYear() === d.getFullYear() ? a(
909
991
  "this-year",
910
992
  {
911
993
  day: "numeric",
@@ -914,76 +996,76 @@ function Ut(e) {
914
996
  minute: "2-digit",
915
997
  hourCycle: "h23"
916
998
  },
917
- s
918
- ) : a("earlier", { day: "numeric", month: "long", year: "numeric" }, s);
999
+ l
1000
+ ) : a("earlier", { day: "numeric", month: "long", year: "numeric" }, l);
919
1001
  },
920
1002
  exact(o) {
921
- const s = ae(o);
922
- return s === null ? "" : a("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, s);
1003
+ const l = ae(o);
1004
+ return l === null ? "" : a("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, l);
923
1005
  },
924
1006
  iso(o) {
925
- const s = ae(o);
926
- return s === null ? "" : s.toISOString();
1007
+ const l = ae(o);
1008
+ return l === null ? "" : l.toISOString();
927
1009
  }
928
1010
  };
929
1011
  }
930
- function Rt() {
1012
+ function Mt() {
931
1013
  const e = G(Q, null);
932
- return Ut(e ?? Mt());
1014
+ return Dt(e ?? Bt());
933
1015
  }
934
- let q = null;
935
- function Mt() {
936
- return q === null && (q = de(), q.defaults("webx-admin", xe)), q;
1016
+ let K = null;
1017
+ function Bt() {
1018
+ return K === null && (K = ue(), K.defaults("webx-admin", xe)), K;
937
1019
  }
938
1020
  function ae(e) {
939
1021
  if (e == null || e === "")
940
1022
  return null;
941
- const t = e instanceof Date ? e : new Date(e);
942
- return Number.isNaN(t.getTime()) ? null : t;
1023
+ const n = e instanceof Date ? e : new Date(e);
1024
+ return Number.isNaN(n.getTime()) ? null : n;
943
1025
  }
944
- function Nt(e, t) {
945
- const n = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
946
- return Math.round((n(e) - n(t)) / 864e5);
1026
+ function Nt(e, n) {
1027
+ const t = (a) => Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());
1028
+ return Math.round((t(e) - t(n)) / 864e5);
947
1029
  }
948
- function Pt(e, t, n) {
949
- const a = e instanceof ie ? e.status : Dt(e);
1030
+ function Pt(e, n, t) {
1031
+ const a = e instanceof ie ? e.status : Ht(e);
950
1032
  if (a === 422)
951
- return It(e) ?? n ?? t("errors.unknown");
952
- if (a === 401) return t("errors.signed-out");
953
- if (a === 403) return t("errors.forbidden");
954
- if (a === 404) return t("errors.gone");
955
- if (a === 409) return t("errors.conflict");
1033
+ return Ft(e) ?? t ?? n("errors.unknown");
1034
+ if (a === 401) return n("errors.signed-out");
1035
+ if (a === 403) return n("errors.forbidden");
1036
+ if (a === 404) return n("errors.gone");
1037
+ if (a === 409) return n("errors.conflict");
956
1038
  if (a === 429) {
957
- const r = e instanceof ie ? e.retryAfter : null;
958
- return r === null ? t("errors.throttled") : t("errors.throttled-in", { seconds: r });
1039
+ const i = e instanceof ie ? e.retryAfter : null;
1040
+ return i === null ? n("errors.throttled") : n("errors.throttled-in", { seconds: i });
959
1041
  }
960
- return a !== null && a >= 500 ? t("errors.server") : a === null ? t("errors.offline") : n ?? t("errors.unknown");
1042
+ return a !== null && a >= 500 ? n("errors.server") : a === null ? n("errors.offline") : t ?? n("errors.unknown");
961
1043
  }
962
1044
  function Vt() {
963
- const e = N("webx-admin");
964
- return (t, n) => Pt(t, e, n);
1045
+ const e = I("webx-admin");
1046
+ return (n, t) => Pt(n, e, t);
965
1047
  }
966
- function Dt(e) {
967
- const t = e?.status;
968
- return typeof t == "number" ? t : null;
1048
+ function Ht(e) {
1049
+ const n = e?.status;
1050
+ return typeof n == "number" ? n : null;
969
1051
  }
970
- function It(e) {
971
- const n = e?.body?.message;
972
- return typeof n == "string" && n !== "" ? n : null;
1052
+ function Ft(e) {
1053
+ const t = e?.body?.message;
1054
+ return typeof t == "string" && t !== "" ? t : null;
973
1055
  }
974
- function Bt(e, t, n) {
975
- const a = `${e.apiPath}/entities/${t}/${n}/notes`, r = (s) => `${e.apiPath}/notes/${s}`, o = (s) => s.data;
1056
+ function Ot(e, n, t) {
1057
+ const a = `${e.apiPath}/entities/${n}/${t}/notes`, i = (l) => `${e.apiPath}/notes/${l}`, o = (l) => l.data;
976
1058
  return {
977
1059
  list: () => e.http.get(a).then(o),
978
- add: (s) => e.http.post(a, { body: s }).then(o),
979
- save: (s, u) => e.http.put(r(s), { body: u }).then(o),
980
- remove: (s) => e.http.delete(r(s)).then(() => {
1060
+ add: (l) => e.http.post(a, { body: l }).then(o),
1061
+ save: (l, d) => e.http.put(i(l), { body: d }).then(o),
1062
+ remove: (l) => e.http.delete(i(l)).then(() => {
981
1063
  })
982
1064
  };
983
1065
  }
984
- const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1066
+ const jt = { class: "wx-screen-host" }, pn = /* @__PURE__ */ W({
985
1067
  __name: "Screen",
986
- props: /* @__PURE__ */ se({
1068
+ props: /* @__PURE__ */ oe({
987
1069
  name: {},
988
1070
  errors: { default: void 0 },
989
1071
  disabled: { type: Boolean, default: !1 },
@@ -994,39 +1076,39 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
994
1076
  modelValue: { default: () => ({}) },
995
1077
  modelModifiers: {}
996
1078
  }),
997
- emits: /* @__PURE__ */ se(["loaded"], ["update:modelValue"]),
998
- setup(e, { expose: t, emit: n }) {
999
- const a = e, r = n, o = he(e, "modelValue"), s = H(), u = N("webx-admin"), i = A(null), c = A(null);
1000
- async function m() {
1001
- i.value = null, c.value = null;
1079
+ emits: /* @__PURE__ */ oe(["loaded"], ["update:modelValue"]),
1080
+ setup(e, { expose: n, emit: t }) {
1081
+ const a = e, i = t, o = pe(e, "modelValue"), l = H(), d = I("webx-admin"), s = L(null), c = L(null);
1082
+ async function f() {
1083
+ s.value = null, c.value = null;
1002
1084
  try {
1003
- const l = await s.loadScreen(a.name);
1004
- i.value = l, r("loaded", l);
1005
- } catch (l) {
1006
- c.value = l instanceof Error ? l.message : String(l);
1085
+ const m = await l.loadScreen(a.name);
1086
+ s.value = m, i("loaded", m);
1087
+ } catch (m) {
1088
+ c.value = m instanceof Error ? m.message : String(m);
1007
1089
  }
1008
1090
  }
1009
- return J([() => a.name, () => s.i18n.state.locale], () => {
1010
- m();
1011
- }, { immediate: !0 }), t({ reload: m }), (l, v) => (f(), x("div", jt, [
1012
- c.value ? (f(), b(d(je), {
1091
+ return J([() => a.name, () => l.i18n.state.locale], () => {
1092
+ f();
1093
+ }, { immediate: !0 }), n({ reload: f }), (m, u) => (p(), b("div", jt, [
1094
+ c.value ? (p(), _(r(Oe), {
1013
1095
  key: 0,
1014
1096
  type: "danger",
1015
- title: d(u)("shell.error-title"),
1097
+ title: r(d)("shell.error-title"),
1016
1098
  description: c.value
1017
- }, null, 8, ["title", "description"])) : i.value === null ? (f(), b(d(ge), {
1099
+ }, null, 8, ["title", "description"])) : s.value === null ? (p(), _(r(we), {
1018
1100
  key: 1,
1019
1101
  rows: 4
1020
- })) : (f(), b(d(Qe), {
1102
+ })) : (p(), _(r(et), {
1021
1103
  key: 2,
1022
1104
  modelValue: o.value,
1023
- "onUpdate:modelValue": v[0] || (v[0] = (h) => o.value = h),
1024
- root: i.value,
1025
- patch: d(s).screenPatch(e.name),
1026
- types: d(s).types,
1105
+ "onUpdate:modelValue": u[0] || (u[0] = (v) => o.value = v),
1106
+ root: s.value,
1107
+ patch: r(l).screenPatch(e.name),
1108
+ types: r(l).types,
1027
1109
  errors: e.errors,
1028
- translate: d(s).i18n.t,
1029
- can: d(s).can,
1110
+ translate: r(l).i18n.t,
1111
+ can: r(l).can,
1030
1112
  disabled: e.disabled,
1031
1113
  "label-position": e.labelPosition,
1032
1114
  "label-width": e.labelWidth,
@@ -1034,10 +1116,10 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1034
1116
  }, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
1035
1117
  ]));
1036
1118
  }
1037
- }), Ht = {
1119
+ }), qt = {
1038
1120
  key: 0,
1039
1121
  class: "wx-dropdown__divider"
1040
- }, Ot = /* @__PURE__ */ U({
1122
+ }, Kt = /* @__PURE__ */ W({
1041
1123
  __name: "RowMenu",
1042
1124
  props: {
1043
1125
  actions: {},
@@ -1045,47 +1127,47 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1045
1127
  size: { default: "sm" }
1046
1128
  },
1047
1129
  setup(e) {
1048
- const t = e, n = S(() => [
1049
- ...t.actions.filter((r) => !r.danger),
1050
- ...t.actions.filter((r) => r.danger)
1051
- ]), a = S(() => {
1052
- const r = n.value.find((o) => o.danger);
1053
- return r && n.value[0] !== r ? r.key : null;
1130
+ const n = e, t = k(() => [
1131
+ ...n.actions.filter((i) => !i.danger),
1132
+ ...n.actions.filter((i) => i.danger)
1133
+ ]), a = k(() => {
1134
+ const i = t.value.find((o) => o.danger);
1135
+ return i && t.value[0] !== i ? i.key : null;
1054
1136
  });
1055
- return (r, o) => n.value.length > 0 ? (f(), b(d(He), {
1137
+ return (i, o) => t.value.length > 0 ? (p(), _(r(je), {
1056
1138
  key: 0,
1057
1139
  class: "wx-row-menu",
1058
1140
  collapse: "always",
1059
1141
  align: "end",
1060
1142
  size: e.size,
1061
1143
  "aria-label": e.label,
1062
- onClick: o[0] || (o[0] = pe(() => {
1144
+ onClick: o[0] || (o[0] = ve(() => {
1063
1145
  }, ["stop"]))
1064
1146
  }, {
1065
1147
  collapsed: g(() => [
1066
- (f(!0), x(R, null, j(n.value, (s) => (f(), x(R, {
1067
- key: s.key
1148
+ (p(!0), b(U, null, F(t.value, (l) => (p(), b(U, {
1149
+ key: l.key
1068
1150
  }, [
1069
- s.key === a.value ? (f(), x("hr", Ht)) : W("", !0),
1070
- y(d(Oe), {
1071
- icon: s.icon,
1072
- tone: s.danger ? "danger" : "default",
1073
- href: s.href,
1074
- target: s.href ? s.target ?? "_blank" : void 0,
1075
- disabled: s.disabled,
1076
- onClick: (u) => s.run?.()
1151
+ l.key === a.value ? (p(), b("hr", qt)) : E("", !0),
1152
+ x(r(qe), {
1153
+ icon: l.icon,
1154
+ tone: l.danger ? "danger" : "default",
1155
+ href: l.href,
1156
+ target: l.href ? l.target ?? "_blank" : void 0,
1157
+ disabled: l.disabled,
1158
+ onClick: (d) => l.run?.()
1077
1159
  }, {
1078
1160
  default: g(() => [
1079
- C(E(s.label), 1)
1161
+ R(C(l.label), 1)
1080
1162
  ]),
1081
1163
  _: 2
1082
1164
  }, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
1083
1165
  ], 64))), 128))
1084
1166
  ]),
1085
1167
  _: 1
1086
- }, 8, ["size", "aria-label"])) : W("", !0);
1168
+ }, 8, ["size", "aria-label"])) : E("", !0);
1087
1169
  }
1088
- }), Ft = /* @__PURE__ */ B(Ot, [["__scopeId", "data-v-4a08eb39"]]), fn = /* @__PURE__ */ U({
1170
+ }), Yt = /* @__PURE__ */ V(Kt, [["__scopeId", "data-v-4a08eb39"]]), vn = /* @__PURE__ */ W({
1089
1171
  __name: "BackButton",
1090
1172
  props: {
1091
1173
  to: {},
@@ -1093,18 +1175,18 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1093
1175
  size: { default: "sm" }
1094
1176
  },
1095
1177
  setup(e) {
1096
- const t = e, n = N("webx-admin"), a = S(() => t.label ?? n("editor.back"));
1097
- return (r, o) => (f(), b(d(ue), {
1178
+ const n = e, t = I("webx-admin"), a = k(() => n.label ?? t("editor.back"));
1179
+ return (i, o) => (p(), _(r(de), {
1098
1180
  icon: "arrow-left",
1099
1181
  class: "wx-back-button",
1100
- as: d(Ue),
1182
+ as: r(Ue),
1101
1183
  to: e.to,
1102
1184
  title: a.value,
1103
1185
  size: e.size,
1104
1186
  "tooltip-side": "bottom"
1105
1187
  }, null, 8, ["as", "to", "title", "size"]));
1106
1188
  }
1107
- }), Kt = { class: "wx-rename__footer" }, qt = /* @__PURE__ */ U({
1189
+ }), Xt = { class: "wx-rename__footer" }, Gt = /* @__PURE__ */ W({
1108
1190
  __name: "RenameButton",
1109
1191
  props: {
1110
1192
  name: { default: "" },
@@ -1114,32 +1196,32 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1114
1196
  size: { default: "sm" }
1115
1197
  },
1116
1198
  emits: ["rename"],
1117
- setup(e, { emit: t }) {
1118
- const n = e, a = t, r = N("webx-admin"), o = A(!1), s = A(n.name), u = A(null), i = S(() => n.label ?? r("editor.rename"));
1119
- J(o, async (m) => {
1120
- m && (s.value = n.name, await Ee(), u.value?.focus(), u.value?.select());
1199
+ setup(e, { emit: n }) {
1200
+ const t = e, a = n, i = I("webx-admin"), o = L(!1), l = L(t.name), d = L(null), s = k(() => t.label ?? i("editor.rename"));
1201
+ J(o, async (f) => {
1202
+ f && (l.value = t.name, await Le(), d.value?.focus(), d.value?.select());
1121
1203
  });
1122
1204
  function c() {
1123
- const m = s.value.trim();
1124
- if (m === "" || m === n.name) {
1205
+ const f = l.value.trim();
1206
+ if (f === "" || f === t.name) {
1125
1207
  o.value = !1;
1126
1208
  return;
1127
1209
  }
1128
- a("rename", m), o.value = !1;
1210
+ a("rename", f), o.value = !1;
1129
1211
  }
1130
- return (m, l) => (f(), b(d(Fe), {
1212
+ return (f, m) => (p(), _(r(Ke), {
1131
1213
  open: o.value,
1132
- "onUpdate:open": l[2] || (l[2] = (v) => o.value = v),
1133
- title: i.value,
1214
+ "onUpdate:open": m[2] || (m[2] = (u) => o.value = u),
1215
+ title: s.value,
1134
1216
  width: 320,
1135
1217
  side: "bottom",
1136
1218
  align: "start",
1137
1219
  teleport: ""
1138
1220
  }, {
1139
1221
  trigger: g(() => [
1140
- y(d(ue), {
1222
+ x(r(de), {
1141
1223
  type: "edit",
1142
- title: i.value,
1224
+ title: s.value,
1143
1225
  size: e.size,
1144
1226
  disabled: e.disabled
1145
1227
  }, null, 8, ["title", "size", "disabled"])
@@ -1147,25 +1229,25 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1147
1229
  default: g(() => [
1148
1230
  M("form", {
1149
1231
  class: "wx-rename",
1150
- onSubmit: pe(c, ["prevent"])
1232
+ onSubmit: ve(c, ["prevent"])
1151
1233
  }, [
1152
- y(d(Ke), {
1234
+ x(r(Ye), {
1153
1235
  ref_key: "field",
1154
- ref: u,
1155
- modelValue: s.value,
1156
- "onUpdate:modelValue": l[0] || (l[0] = (v) => s.value = v),
1157
- "aria-label": i.value,
1236
+ ref: d,
1237
+ modelValue: l.value,
1238
+ "onUpdate:modelValue": m[0] || (m[0] = (u) => l.value = u),
1239
+ "aria-label": s.value,
1158
1240
  placeholder: e.placeholder,
1159
- onKeydown: l[1] || (l[1] = Ae((v) => o.value = !1, ["esc"]))
1241
+ onKeydown: m[1] || (m[1] = Re((u) => o.value = !1, ["esc"]))
1160
1242
  }, null, 8, ["modelValue", "aria-label", "placeholder"]),
1161
- M("div", Kt, [
1162
- y(d(X), {
1243
+ M("div", Xt, [
1244
+ x(r(Y), {
1163
1245
  type: "primary",
1164
1246
  size: "sm",
1165
1247
  "native-type": "submit"
1166
1248
  }, {
1167
1249
  default: g(() => [
1168
- C(E(d(r)("editor.save")), 1)
1250
+ R(C(r(i)("editor.save")), 1)
1169
1251
  ]),
1170
1252
  _: 1
1171
1253
  })
@@ -1175,7 +1257,7 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1175
1257
  _: 1
1176
1258
  }, 8, ["open", "title"]));
1177
1259
  }
1178
- }), vn = /* @__PURE__ */ B(qt, [["__scopeId", "data-v-d879e8d3"]]), Xt = ["innerHTML"], Yt = /* @__PURE__ */ U({
1260
+ }), gn = /* @__PURE__ */ V(Gt, [["__scopeId", "data-v-d879e8d3"]]), Jt = ["innerHTML"], Qt = /* @__PURE__ */ W({
1179
1261
  __name: "HelpButton",
1180
1262
  props: {
1181
1263
  body: {},
@@ -1185,33 +1267,33 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1185
1267
  width: { default: 720 }
1186
1268
  },
1187
1269
  setup(e) {
1188
- const t = e, n = N("webx-admin"), a = A(!1), r = S(() => t.title ?? n("help.title")), o = S(() => Wt(t.body));
1189
- return (s, u) => (f(), x(R, null, [
1190
- y(d(ue), {
1270
+ const n = e, t = I("webx-admin"), a = L(!1), i = k(() => n.title ?? t("help.title")), o = k(() => It(n.body));
1271
+ return (l, d) => (p(), b(U, null, [
1272
+ x(r(de), {
1191
1273
  type: "details",
1192
1274
  icon: "question",
1193
1275
  tone: "neutral",
1194
1276
  size: e.size,
1195
- title: e.label ?? r.value,
1196
- onClick: u[0] || (u[0] = (i) => a.value = !0)
1277
+ title: e.label ?? i.value,
1278
+ onClick: d[0] || (d[0] = (s) => a.value = !0)
1197
1279
  }, null, 8, ["size", "title"]),
1198
- y(d(qe), {
1280
+ x(r(Xe), {
1199
1281
  open: a.value,
1200
- "onUpdate:open": u[1] || (u[1] = (i) => a.value = i),
1201
- title: r.value,
1282
+ "onUpdate:open": d[1] || (d[1] = (s) => a.value = s),
1283
+ title: i.value,
1202
1284
  width: e.width
1203
1285
  }, {
1204
1286
  default: g(() => [
1205
1287
  M("div", {
1206
1288
  class: "wx-help",
1207
1289
  innerHTML: o.value
1208
- }, null, 8, Xt)
1290
+ }, null, 8, Jt)
1209
1291
  ]),
1210
1292
  _: 1
1211
1293
  }, 8, ["open", "title", "width"])
1212
1294
  ], 64));
1213
1295
  }
1214
- }), hn = /* @__PURE__ */ B(Yt, [["__scopeId", "data-v-6c280d42"]]), Gt = /* @__PURE__ */ U({
1296
+ }), wn = /* @__PURE__ */ V(Qt, [["__scopeId", "data-v-6c280d42"]]), Zt = /* @__PURE__ */ W({
1215
1297
  name: "WxDate",
1216
1298
  __name: "DateText",
1217
1299
  props: {
@@ -1220,46 +1302,46 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1220
1302
  tone: { default: "muted" }
1221
1303
  },
1222
1304
  setup(e) {
1223
- const t = e, n = Rt(), a = S(() => n.short(t.value)), r = S(() => n.exact(t.value)), o = S(() => n.iso(t.value));
1224
- return (s, u) => r.value ? (f(), b(d(Xe), {
1305
+ const n = e, t = Mt(), a = k(() => t.short(n.value)), i = k(() => t.exact(n.value)), o = k(() => t.iso(n.value));
1306
+ return (l, d) => i.value ? (p(), _(r(Ge), {
1225
1307
  key: 0,
1226
- content: r.value
1308
+ content: i.value
1227
1309
  }, {
1228
1310
  default: g(() => [
1229
- y(d(Y), {
1311
+ x(r(X), {
1230
1312
  as: "time",
1231
1313
  datetime: o.value,
1232
1314
  size: e.size,
1233
1315
  tone: e.tone
1234
1316
  }, {
1235
1317
  default: g(() => [
1236
- C(E(a.value), 1)
1318
+ R(C(a.value), 1)
1237
1319
  ]),
1238
1320
  _: 1
1239
1321
  }, 8, ["datetime", "size", "tone"])
1240
1322
  ]),
1241
1323
  _: 1
1242
- }, 8, ["content"])) : (f(), b(d(Y), {
1324
+ }, 8, ["content"])) : (p(), _(r(X), {
1243
1325
  key: 1,
1244
1326
  size: e.size,
1245
1327
  tone: e.tone
1246
1328
  }, {
1247
1329
  default: g(() => [
1248
- C(E(a.value), 1)
1330
+ R(C(a.value), 1)
1249
1331
  ]),
1250
1332
  _: 1
1251
1333
  }, 8, ["size", "tone"]));
1252
1334
  }
1253
- }), Jt = { class: "wx-notes" }, Qt = {
1335
+ }), en = { class: "wx-notes" }, tn = {
1254
1336
  key: 3,
1255
1337
  class: "wx-notes__list"
1256
- }, Zt = { class: "wx-note__body" }, en = { class: "wx-note__head" }, tn = { class: "wx-note__buttons" }, nn = {
1338
+ }, nn = { class: "wx-note__body" }, an = { class: "wx-note__head" }, ln = { class: "wx-note__buttons" }, on = {
1257
1339
  key: 1,
1258
1340
  class: "wx-note__text"
1259
- }, an = {
1341
+ }, sn = {
1260
1342
  key: 4,
1261
1343
  class: "wx-notes__new"
1262
- }, ln = /* @__PURE__ */ U({
1344
+ }, rn = /* @__PURE__ */ W({
1263
1345
  name: "WxNotes",
1264
1346
  __name: "NotesFeed",
1265
1347
  props: {
@@ -1269,53 +1351,53 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1269
1351
  title: { default: void 0 }
1270
1352
  },
1271
1353
  emits: ["change"],
1272
- setup(e, { emit: t }) {
1273
- const n = e, a = t, r = H(), o = N("webx-admin"), s = Vt(), u = A([]), i = A(!0), c = A(""), m = A(!1), l = A(null), v = A(""), h = S(() => Bt(r, n.type, n.id)), w = S(() => n.title ?? o("notes.title"));
1274
- async function p() {
1275
- i.value = !0;
1354
+ setup(e, { emit: n }) {
1355
+ const t = e, a = n, i = H(), o = I("webx-admin"), l = Vt(), d = L([]), s = L(!0), c = L(""), f = L(!1), m = L(null), u = L(""), v = k(() => Ot(i, t.type, t.id)), w = k(() => t.title ?? o("notes.title"));
1356
+ async function h() {
1357
+ s.value = !0;
1276
1358
  try {
1277
- u.value = await h.value.list();
1278
- } catch (k) {
1279
- I.danger(s(k));
1359
+ d.value = await v.value.list();
1360
+ } catch ($) {
1361
+ P.danger(l($));
1280
1362
  } finally {
1281
- i.value = !1;
1363
+ s.value = !1;
1282
1364
  }
1283
1365
  }
1284
1366
  J(
1285
- () => [n.type, n.id],
1367
+ () => [t.type, t.id],
1286
1368
  () => {
1287
- l.value = null, c.value = "", p();
1369
+ m.value = null, c.value = "", h();
1288
1370
  },
1289
1371
  { immediate: !0 }
1290
1372
  );
1291
- async function _() {
1292
- const k = c.value.trim();
1293
- if (!(k === "" || m.value)) {
1294
- m.value = !0;
1373
+ async function y() {
1374
+ const $ = c.value.trim();
1375
+ if (!($ === "" || f.value)) {
1376
+ f.value = !0;
1295
1377
  try {
1296
- u.value = [...u.value, await h.value.add(k)], c.value = "", a("change");
1297
- } catch (T) {
1298
- I.danger(s(T));
1378
+ d.value = [...d.value, await v.value.add($)], c.value = "", a("change");
1379
+ } catch (S) {
1380
+ P.danger(l(S));
1299
1381
  } finally {
1300
- m.value = !1;
1382
+ f.value = !1;
1301
1383
  }
1302
1384
  }
1303
1385
  }
1304
- function V(k) {
1305
- l.value = k.id, v.value = k.body;
1386
+ function D($) {
1387
+ m.value = $.id, u.value = $.body;
1306
1388
  }
1307
- async function Z(k) {
1308
- const T = v.value.trim();
1309
- if (T !== "")
1389
+ async function Z($) {
1390
+ const S = u.value.trim();
1391
+ if (S !== "")
1310
1392
  try {
1311
- const $ = await h.value.save(k.id, T);
1312
- u.value = u.value.map((P) => P.id === $.id ? $ : P), l.value = null, I.success(o("notes.saved")), a("change");
1313
- } catch ($) {
1314
- I.danger(s($));
1393
+ const T = await v.value.save($.id, S);
1394
+ d.value = d.value.map((B) => B.id === T.id ? T : B), m.value = null, P.success(o("notes.saved")), a("change");
1395
+ } catch (T) {
1396
+ P.danger(l(T));
1315
1397
  }
1316
1398
  }
1317
- async function ee(k) {
1318
- if (await Je({
1399
+ async function ee($) {
1400
+ if (await Ze({
1319
1401
  title: o("notes.delete-title"),
1320
1402
  message: o("notes.delete-text"),
1321
1403
  confirmText: o("notes.delete"),
@@ -1323,163 +1405,164 @@ const jt = { class: "wx-screen-host" }, mn = /* @__PURE__ */ U({
1323
1405
  tone: "danger"
1324
1406
  }))
1325
1407
  try {
1326
- await h.value.remove(k.id), u.value = u.value.filter(($) => $.id !== k.id), I.success(o("notes.deleted")), a("change");
1327
- } catch ($) {
1328
- I.danger(s($));
1408
+ await v.value.remove($.id), d.value = d.value.filter((T) => T.id !== $.id), P.success(o("notes.deleted")), a("change");
1409
+ } catch (T) {
1410
+ P.danger(l(T));
1329
1411
  }
1330
1412
  }
1331
- function te(k) {
1332
- return !n.can || !k.is_mine ? [] : [
1333
- { key: "edit", icon: "edit", label: o("notes.edit"), run: () => V(k) },
1413
+ function te($) {
1414
+ return !t.can || !$.is_mine ? [] : [
1415
+ { key: "edit", icon: "edit", label: o("notes.edit"), run: () => D($) },
1334
1416
  {
1335
1417
  key: "delete",
1336
1418
  icon: "trash",
1337
1419
  label: o("notes.delete"),
1338
1420
  danger: !0,
1339
1421
  run: () => {
1340
- ee(k);
1422
+ ee($);
1341
1423
  }
1342
1424
  }
1343
1425
  ];
1344
1426
  }
1345
- function D(k) {
1346
- return k.author?.name ?? o("notes.unknown-author");
1427
+ function N($) {
1428
+ return $.author?.name ?? o("notes.unknown-author");
1347
1429
  }
1348
- return (k, T) => (f(), x("section", Jt, [
1349
- w.value ? (f(), b(d(Y), {
1430
+ return ($, S) => (p(), b("section", en, [
1431
+ w.value ? (p(), _(r(X), {
1350
1432
  key: 0,
1351
1433
  weight: "medium",
1352
1434
  class: "wx-notes__title"
1353
1435
  }, {
1354
1436
  default: g(() => [
1355
- C(E(w.value), 1)
1437
+ R(C(w.value), 1)
1356
1438
  ]),
1357
1439
  _: 1
1358
- })) : W("", !0),
1359
- i.value ? (f(), b(d(ge), {
1440
+ })) : E("", !0),
1441
+ s.value ? (p(), _(r(we), {
1360
1442
  key: 1,
1361
1443
  rows: 2
1362
- })) : u.value.length === 0 ? (f(), b(d(Ye), {
1444
+ })) : d.value.length === 0 ? (p(), _(r(Je), {
1363
1445
  key: 2,
1364
1446
  size: "sm",
1365
- description: d(o)("notes.empty")
1366
- }, null, 8, ["description"])) : (f(), x("ul", Qt, [
1367
- (f(!0), x(R, null, j(u.value, ($) => (f(), x("li", {
1368
- key: $.id,
1447
+ description: r(o)("notes.empty")
1448
+ }, null, 8, ["description"])) : (p(), b("ul", tn, [
1449
+ (p(!0), b(U, null, F(d.value, (T) => (p(), b("li", {
1450
+ key: T.id,
1369
1451
  class: "wx-note"
1370
1452
  }, [
1371
- y(d(Ge), {
1372
- name: D($),
1453
+ x(r(Qe), {
1454
+ name: N(T),
1373
1455
  size: "sm",
1374
1456
  tone: "auto"
1375
1457
  }, null, 8, ["name"]),
1376
- M("div", Zt, [
1377
- M("div", en, [
1378
- y(d(Y), {
1458
+ M("div", nn, [
1459
+ M("div", an, [
1460
+ x(r(X), {
1379
1461
  size: "sm",
1380
1462
  weight: "medium",
1381
1463
  truncate: ""
1382
1464
  }, {
1383
1465
  default: g(() => [
1384
- C(E(D($)), 1)
1466
+ R(C(N(T)), 1)
1385
1467
  ]),
1386
1468
  _: 2
1387
1469
  }, 1024),
1388
- y(Gt, {
1389
- value: $.created_at
1470
+ x(Zt, {
1471
+ value: T.created_at
1390
1472
  }, null, 8, ["value"]),
1391
- y(Ft, {
1392
- actions: te($),
1393
- label: D($)
1473
+ x(Yt, {
1474
+ actions: te(T),
1475
+ label: N(T)
1394
1476
  }, null, 8, ["actions", "label"])
1395
1477
  ]),
1396
- l.value === $.id ? (f(), x(R, { key: 0 }, [
1397
- y(d(fe), {
1398
- modelValue: v.value,
1399
- "onUpdate:modelValue": T[0] || (T[0] = (P) => v.value = P),
1478
+ m.value === T.id ? (p(), b(U, { key: 0 }, [
1479
+ x(r(fe), {
1480
+ modelValue: u.value,
1481
+ "onUpdate:modelValue": S[0] || (S[0] = (B) => u.value = B),
1400
1482
  autosize: { minRows: 2, maxRows: 10 }
1401
1483
  }, null, 8, ["modelValue"]),
1402
- M("div", tn, [
1403
- y(d(X), {
1484
+ M("div", ln, [
1485
+ x(r(Y), {
1404
1486
  size: "sm",
1405
1487
  type: "primary",
1406
- onClick: (P) => Z($)
1488
+ onClick: (B) => Z(T)
1407
1489
  }, {
1408
1490
  default: g(() => [
1409
- C(E(d(o)("notes.save")), 1)
1491
+ R(C(r(o)("notes.save")), 1)
1410
1492
  ]),
1411
1493
  _: 1
1412
1494
  }, 8, ["onClick"]),
1413
- y(d(X), {
1495
+ x(r(Y), {
1414
1496
  size: "sm",
1415
1497
  variant: "text",
1416
- onClick: T[1] || (T[1] = (P) => l.value = null)
1498
+ onClick: S[1] || (S[1] = (B) => m.value = null)
1417
1499
  }, {
1418
1500
  default: g(() => [
1419
- C(E(d(o)("notes.cancel")), 1)
1501
+ R(C(r(o)("notes.cancel")), 1)
1420
1502
  ]),
1421
1503
  _: 1
1422
1504
  })
1423
1505
  ])
1424
- ], 64)) : (f(), x("p", nn, E($.body), 1))
1506
+ ], 64)) : (p(), b("p", on, C(T.body), 1))
1425
1507
  ])
1426
1508
  ]))), 128))
1427
1509
  ])),
1428
- e.can ? (f(), x("div", an, [
1429
- y(d(fe), {
1510
+ e.can ? (p(), b("div", sn, [
1511
+ x(r(fe), {
1430
1512
  modelValue: c.value,
1431
- "onUpdate:modelValue": T[2] || (T[2] = ($) => c.value = $),
1432
- placeholder: d(o)("notes.placeholder"),
1513
+ "onUpdate:modelValue": S[2] || (S[2] = (T) => c.value = T),
1514
+ placeholder: r(o)("notes.placeholder"),
1433
1515
  autosize: { minRows: 2, maxRows: 8 }
1434
1516
  }, null, 8, ["modelValue", "placeholder"]),
1435
- y(d(X), {
1517
+ x(r(Y), {
1436
1518
  size: "sm",
1437
1519
  type: "primary",
1438
1520
  disabled: c.value.trim() === "",
1439
- loading: m.value,
1440
- onClick: _
1521
+ loading: f.value,
1522
+ onClick: y
1441
1523
  }, {
1442
1524
  default: g(() => [
1443
- C(E(d(o)("notes.add")), 1)
1525
+ R(C(r(o)("notes.add")), 1)
1444
1526
  ]),
1445
1527
  _: 1
1446
1528
  }, 8, ["disabled", "loading"])
1447
- ])) : W("", !0)
1529
+ ])) : E("", !0)
1448
1530
  ]));
1449
1531
  }
1450
- }), pn = /* @__PURE__ */ B(ln, [["__scopeId", "data-v-71004c1a"]]);
1532
+ }), yn = /* @__PURE__ */ V(rn, [["__scopeId", "data-v-71004c1a"]]);
1451
1533
  export {
1452
- dt as AdminLanding,
1453
- ct as AdminNav,
1454
- bt as AdminShell,
1534
+ ft as AdminLanding,
1535
+ ht as AdminNav,
1536
+ $t as AdminShell,
1455
1537
  ie as HttpError,
1456
- fn as WxBackButton,
1457
- Gt as WxDate,
1458
- hn as WxHelpButton,
1459
- at as WxListScreen,
1460
- pn as WxNotes,
1461
- vn as WxRenameButton,
1462
- Ft as WxRowMenu,
1463
- mn as WxScreen,
1538
+ vn as WxBackButton,
1539
+ Zt as WxDate,
1540
+ wn as WxHelpButton,
1541
+ ot as WxListScreen,
1542
+ yn as WxNotes,
1543
+ gn as WxRenameButton,
1544
+ rt as WxRichTextField,
1545
+ Yt as WxRowMenu,
1546
+ pn as WxScreen,
1464
1547
  ye as adminKey,
1465
1548
  xe as adminMessages,
1466
- lt as adminTypes,
1467
- cn as createAdmin,
1468
- st as createAdminContext,
1469
- Ut as createDates,
1470
- kt as createHttp,
1471
- de as createI18n,
1472
- Bt as createNotesApi,
1549
+ dt as adminTypes,
1550
+ hn as createAdmin,
1551
+ ut as createAdminContext,
1552
+ Dt as createDates,
1553
+ St as createHttp,
1554
+ ue as createI18n,
1555
+ Ot as createNotesApi,
1473
1556
  Pt as errorText,
1474
1557
  Q as i18nKey,
1475
- ot as provideAdmin,
1476
- rt as provideI18n,
1477
- ve as readCookie,
1478
- Wt as renderMarkdown,
1558
+ ct as provideAdmin,
1559
+ st as provideI18n,
1560
+ he as readCookie,
1561
+ It as renderMarkdown,
1479
1562
  H as useAdmin,
1480
- Rt as useDates,
1563
+ Mt as useDates,
1481
1564
  Vt as useErrorText,
1482
- dn as useI18n,
1483
- N as useTranslate
1565
+ fn as useI18n,
1566
+ I as useTranslate
1484
1567
  };
1485
1568
  //# sourceMappingURL=index.js.map