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