@webx-ui/module-blog 0.1.0 → 0.2.2

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 { provide as mt, inject as ft, defineComponent as ee, computed as b, openBlock as p, createElementBlock as K, createVNode as n, unref as e, withCtx as a, createBlock as V, createTextVNode as g, toDisplayString as f, createCommentVNode as I, useModel as Be, mergeModels as Ne, ref as z, useTemplateRef as We, watch as oe, onMounted as Le, onBeforeUnmount as Fe, Fragment as ne, createElementVNode as q, renderList as ze, normalizeClass as Ae, nextTick as Ke, isRef as He, withKeys as Ce, createSlots as st, resolveDynamicComponent as tt, mergeProps as gt } from "vue";
2
- import { useAdmin as se, useTranslate as te, useDates as bt, useErrorText as me, WxBackButton as ht, WxScreen as yt, WxDate as De, WxListScreen as je, WxRowMenu as Ie } from "@webx-ui/module-admin";
3
- import { useLocales as Ge, WxFormItem as ge, WxText as G, WxAlert as Se, WxSelect as be, useElementWidth as rt, localizedValue as _t, confirm as pe, WxSkeleton as Ue, WxBreadcrumb as wt, WxBreadcrumbItem as at, WxBadge as re, WxDropdown as xt, WxDropdownItem as lt, WxAction as Re, WxButton as F, WxActionBar as ot, toast as L, WxEmpty as Oe, WxSortableList as Je, useModal as Ze, WxDialog as Qe, WxInput as $e, WxSpace as Xe, createModal as Ee, WxTable as ut, WxIcon as Y, WxTooltip as Ye, WxHeading as kt, WxTextarea as $t, WxSwitch as Tt, WxCard as Vt, WxListDetail as At, WxCheckbox as Ct } from "@webx-ui/core";
4
- import { useRoute as qe, useRouter as Me, onBeforeRouteLeave as St } from "vue-router";
5
- import { provideBlocksPreview as Wt } from "@webx-ui/module-blocks";
6
- const dt = /* @__PURE__ */ Symbol("wx-article-editor");
7
- function zt(y) {
8
- mt(dt, y);
1
+ import { provide as ct, inject as vt, defineComponent as ee, computed as v, openBlock as p, createElementBlock as Z, createVNode as n, unref as e, withCtx as l, createBlock as C, createTextVNode as w, toDisplayString as b, createCommentVNode as H, useModel as qe, mergeModels as Me, ref as z, watch as ue, onMounted as Ne, onBeforeUnmount as Je, Fragment as be, createElementVNode as j, renderList as Be, normalizeClass as Pe, useTemplateRef as De, nextTick as Ze, isRef as Ie, withKeys as ze, resolveDynamicComponent as tt, mergeProps as pt, useId as ft, withModifiers as at } from "vue";
2
+ import { useAdmin as ne, useTranslate as Q, useDates as mt, useErrorText as ge, WxScreenHead as bt, WxScreen as gt, WxSaveState as ht, WxDate as je, rowMenuWidth as st, WxListScreen as Qe, WxRowMenu as Re, WxFilterChips as yt } from "@webx-ui/module-admin";
3
+ import { useLocales as Xe, WxFormItem as ie, WxText as G, WxAlert as We, WxSelect as _e, localizedValue as wt, confirm as me, WxSkeleton as Ue, WxBadge as oe, WxBreadcrumb as _t, WxBreadcrumbItem as lt, WxButton as J, WxActionBar as rt, toast as L, WxEmpty as Ge, WxSortableList as Ye, WxAction as Oe, useModal as Ee, WxDialog as Fe, WxInput as Ae, WxSpace as Le, useElementWidth as xt, createModal as Ce, WxTable as ot, WxEntityCard as kt, WxIcon as we, WxTooltip as et, WxHeading as $t, WxTextarea as Tt, WxSwitch as Vt, WxCard as At, WxListDetail as St, WxCheckbox as Wt } from "@webx-ui/core";
4
+ import { useRoute as He, useRouter as Ke, onBeforeRouteLeave as Ct } from "vue-router";
5
+ import { provideBlocksPreview as zt } from "@webx-ui/module-blocks";
6
+ const ut = /* @__PURE__ */ Symbol("wx-article-editor");
7
+ function Rt(f) {
8
+ ct(ut, f);
9
9
  }
10
- function Te() {
11
- return ft(dt, null);
10
+ function Se() {
11
+ return vt(ut, null);
12
12
  }
13
- const Rt = {
13
+ const Ut = {
14
14
  module: {
15
15
  group: "Blog",
16
16
  articles: "Articles",
@@ -44,6 +44,9 @@ const Rt = {
44
44
  "view-draft": "Drafts",
45
45
  "view-unpublished": "Off the site",
46
46
  bin: "Bin",
47
+ "filter-rubric": "Rubric",
48
+ "filter-tag": "Tag",
49
+ "filter-author": "Author",
47
50
  "any-rubric": "Any rubric",
48
51
  "any-tag": "Any tag",
49
52
  "any-author": "Any author",
@@ -73,9 +76,6 @@ const Rt = {
73
76
  article: {
74
77
  trail: "Where this article sits",
75
78
  untitled: "Untitled",
76
- "state-saved": "Saved",
77
- "state-saving": "Saving…",
78
- "state-unsaved": "Not saved yet",
79
79
  save: "Save draft",
80
80
  "save-failed": "The article was not saved.",
81
81
  schedule: "Schedule",
@@ -226,681 +226,622 @@ const Rt = {
226
226
  "merge-confirm": "Merge"
227
227
  }
228
228
  }, it = /* @__PURE__ */ new WeakSet();
229
- function ae() {
229
+ function te() {
230
230
  try {
231
- const { i18n: y } = se();
232
- it.has(y) || (y.defaults("webx-blog", Rt), it.add(y));
231
+ const { i18n: f } = ne();
232
+ it.has(f) || (f.defaults("webx-blog", Ut), it.add(f));
233
233
  } catch {
234
234
  }
235
235
  }
236
- const Ut = { class: "wx-article-address" }, Bt = /* @__PURE__ */ ee({
236
+ const qt = { class: "wx-article-address" }, Mt = /* @__PURE__ */ ee({
237
237
  name: "WxArticleAddress",
238
238
  __name: "ArticleAddress",
239
- setup(y) {
240
- const _ = Te(), u = Ge();
241
- ae();
242
- const x = te("webx-blog"), c = b(() => {
243
- const r = _?.values.value.slug;
244
- return typeof r == "string" ? r : r?.[u.active.value] ?? "";
245
- }), l = b(() => c.value === "" ? null : `/${[_?.prefix.value ?? "", c.value].filter(Boolean).join("/")}`), t = b(() => {
246
- const r = _?.article.value?.path;
247
- return typeof r == "string" && l.value !== null && l.value !== `/${r}`;
239
+ setup(f) {
240
+ const m = Se(), r = Xe();
241
+ te();
242
+ const y = Q("webx-blog"), u = v(() => {
243
+ const s = m?.values.value.slug;
244
+ return typeof s == "string" ? s : s?.[r.active.value] ?? "";
245
+ }), a = v(() => u.value === "" ? null : `/${[m?.prefix.value ?? "", u.value].filter(Boolean).join("/")}`), t = v(() => {
246
+ const s = m?.article.value?.path;
247
+ return typeof s == "string" && a.value !== null && a.value !== `/${s}`;
248
248
  });
249
- return (r, i) => (p(), K("div", Ut, [
250
- n(e(ge), {
251
- label: e(x)("article.address")
249
+ return (s, i) => (p(), Z("div", qt, [
250
+ n(e(ie), {
251
+ label: e(y)("article.address")
252
252
  }, {
253
- default: a(() => [
254
- l.value ? (p(), V(e(G), {
253
+ default: l(() => [
254
+ a.value ? (p(), C(e(G), {
255
255
  key: 0,
256
256
  mono: "",
257
257
  class: "wx-article-address__value"
258
258
  }, {
259
- default: a(() => [
260
- g(f(l.value), 1)
259
+ default: l(() => [
260
+ w(b(a.value), 1)
261
261
  ]),
262
262
  _: 1
263
- })) : (p(), V(e(G), {
263
+ })) : (p(), C(e(G), {
264
264
  key: 1,
265
265
  size: "sm",
266
266
  tone: "muted"
267
267
  }, {
268
- default: a(() => [
269
- g(f(e(x)("article.no-address")), 1)
268
+ default: l(() => [
269
+ w(b(e(y)("article.no-address")), 1)
270
270
  ]),
271
271
  _: 1
272
272
  }))
273
273
  ]),
274
274
  _: 1
275
275
  }, 8, ["label"]),
276
- t.value ? (p(), V(e(Se), {
276
+ t.value ? (p(), C(e(We), {
277
277
  key: 0,
278
278
  type: "info",
279
279
  variant: "soft",
280
- description: e(x)("article.address-moving")
281
- }, null, 8, ["description"])) : I("", !0)
280
+ description: e(y)("article.address-moving")
281
+ }, null, 8, ["description"])) : H("", !0)
282
282
  ]));
283
283
  }
284
- }), ce = (y, _) => {
285
- const u = y.__vccOpts || y;
286
- for (const [x, c] of _)
287
- u[x] = c;
288
- return u;
289
- }, Nt = /* @__PURE__ */ ce(Bt, [["__scopeId", "data-v-2ee0dcfe"]]), qt = /* @__PURE__ */ ee({
284
+ }), ve = (f, m) => {
285
+ const r = f.__vccOpts || f;
286
+ for (const [y, u] of m)
287
+ r[y] = u;
288
+ return r;
289
+ }, Nt = /* @__PURE__ */ ve(Mt, [["__scopeId", "data-v-2ee0dcfe"]]), Bt = /* @__PURE__ */ ee({
290
290
  name: "WxArticleAuthor",
291
291
  __name: "ArticleAuthor",
292
- props: /* @__PURE__ */ Ne({
292
+ props: /* @__PURE__ */ Me({
293
293
  disabled: { type: Boolean, default: !1 }
294
294
  }, {
295
295
  modelValue: { default: null },
296
296
  modelModifiers: {}
297
297
  }),
298
298
  emits: ["update:modelValue"],
299
- setup(y) {
300
- const _ = y, u = Be(y, "modelValue"), x = Te();
301
- ae();
302
- const c = te("webx-blog"), l = b(() => _.disabled || x?.disabled.value === !0), t = b(
303
- () => (x?.options.value.authors ?? []).map((i) => ({
299
+ setup(f) {
300
+ const m = f, r = qe(f, "modelValue"), y = Se();
301
+ te();
302
+ const u = Q("webx-blog"), a = v(() => m.disabled || y?.disabled.value === !0), t = v(
303
+ () => (y?.options.value.authors ?? []).map((i) => ({
304
304
  label: i.title,
305
305
  value: i.id
306
306
  }))
307
- ), r = b({
308
- get: () => u.value,
307
+ ), s = v({
308
+ get: () => r.value,
309
309
  set: (i) => {
310
- u.value = typeof i == "number" ? i : null;
310
+ r.value = typeof i == "number" ? i : null;
311
311
  }
312
312
  });
313
- return (i, $) => (p(), V(e(be), {
314
- modelValue: r.value,
315
- "onUpdate:modelValue": $[0] || ($[0] = (T) => r.value = T),
313
+ return (i, x) => (p(), C(e(_e), {
314
+ modelValue: s.value,
315
+ "onUpdate:modelValue": x[0] || (x[0] = (T) => s.value = T),
316
316
  options: t.value,
317
- placeholder: e(c)("article.no-author"),
318
- disabled: l.value,
317
+ placeholder: e(u)("article.no-author"),
318
+ disabled: a.value,
319
319
  clearable: "",
320
320
  filterable: "",
321
321
  teleport: "",
322
- "aria-label": e(c)("article.author")
322
+ "aria-label": e(u)("article.author")
323
323
  }, null, 8, ["modelValue", "options", "placeholder", "disabled", "aria-label"]));
324
324
  }
325
325
  });
326
- function ue(y) {
327
- const _ = `${y.apiPath}/blog/articles`, u = `${y.apiPath}/blog/rubrics`, x = `${y.apiPath}/blog/tags`, c = (l) => l.data;
326
+ function de(f) {
327
+ const m = `${f.apiPath}/blog/articles`, r = `${f.apiPath}/blog/rubrics`, y = `${f.apiPath}/blog/tags`, u = (a) => a.data;
328
328
  return {
329
- articles: (l = {}) => {
329
+ articles: (a = {}) => {
330
330
  const t = new URLSearchParams();
331
- l.q && t.set("q", l.q), l.rubric != null && t.set("rubric", String(l.rubric)), l.tag != null && t.set("tag", String(l.tag)), l.author != null && t.set("author", String(l.author)), l.status && t.set("status", l.status), l.sort && t.set("sort", l.sort), l.trashed && t.set("trashed", "1"), l.page && l.page > 1 && t.set("page", String(l.page)), l.per_page && t.set("per_page", String(l.per_page));
332
- const r = t.size > 0 ? `?${t}` : "";
333
- return y.http.get(`${_}${r}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
331
+ a.q && t.set("q", a.q), a.rubric != null && t.set("rubric", String(a.rubric)), a.tag != null && t.set("tag", String(a.tag)), a.author != null && t.set("author", String(a.author)), a.status && t.set("status", a.status), a.sort && t.set("sort", a.sort), a.trashed && t.set("trashed", "1"), a.page && a.page > 1 && t.set("page", String(a.page)), a.per_page && t.set("per_page", String(a.per_page));
332
+ const s = t.size > 0 ? `?${t}` : "";
333
+ return f.http.get(`${m}${s}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
334
334
  },
335
- get: (l) => y.http.get(`${_}/${l}`).then(c),
336
- create: (l) => y.http.post(_, l).then(c),
337
- save: (l, t) => y.http.put(`${_}/${l}`, t).then(c),
338
- discard: (l) => y.http.post(`${_}/${l}/discard`, {}).then(c),
339
- versions: (l) => y.http.get(`${_}/${l}/versions`).then(c),
340
- restoreVersion: (l, t) => y.http.post(`${_}/${l}/versions/${t}/restore`, {}).then(c),
341
- tags: (l = "") => {
342
- const t = l.trim() === "" ? "" : `?q=${encodeURIComponent(l.trim())}`;
343
- return y.http.get(`${x}${t}`).then(c);
335
+ get: (a) => f.http.get(`${m}/${a}`).then(u),
336
+ create: (a) => f.http.post(m, a).then(u),
337
+ save: (a, t) => f.http.put(`${m}/${a}`, t).then(u),
338
+ discard: (a) => f.http.post(`${m}/${a}/discard`, {}).then(u),
339
+ versions: (a) => f.http.get(`${m}/${a}/versions`).then(u),
340
+ restoreVersion: (a, t) => f.http.post(`${m}/${a}/versions/${t}/restore`, {}).then(u),
341
+ tags: (a = "") => {
342
+ const t = a.trim() === "" ? "" : `?q=${encodeURIComponent(a.trim())}`;
343
+ return f.http.get(`${y}${t}`).then(u);
344
344
  },
345
- createTag: (l) => y.http.post(x, l).then(c),
346
- publish: (l, t) => y.http.post(`${_}/${l}/publish`, t == null ? {} : { at: t }).then(c),
347
- unpublish: (l) => y.http.post(`${_}/${l}/unpublish`, {}).then(c),
348
- remove: (l) => y.http.delete(`${_}/${l}`).then(() => {
345
+ createTag: (a) => f.http.post(y, a).then(u),
346
+ publish: (a, t) => f.http.post(`${m}/${a}/publish`, t == null ? {} : { at: t }).then(u),
347
+ unpublish: (a) => f.http.post(`${m}/${a}/unpublish`, {}).then(u),
348
+ remove: (a) => f.http.delete(`${m}/${a}`).then(() => {
349
349
  }),
350
- restore: (l) => y.http.post(`${_}/${l}/restore`, {}).then(c),
351
- rubrics: () => y.http.get(u),
352
- createRubric: (l) => y.http.post(u, l).then(c),
353
- saveRubric: (l, t) => y.http.put(`${u}/${l}`, t).then(c),
354
- removeRubric: (l) => y.http.delete(`${u}/${l}`).then(() => {
350
+ restore: (a) => f.http.post(`${m}/${a}/restore`, {}).then(u),
351
+ rubrics: () => f.http.get(r),
352
+ createRubric: (a) => f.http.post(r, a).then(u),
353
+ saveRubric: (a, t) => f.http.put(`${r}/${a}`, t).then(u),
354
+ removeRubric: (a) => f.http.delete(`${r}/${a}`).then(() => {
355
355
  }),
356
- sortRubrics: (l) => y.http.post(`${u}/reorder`, { ids: l }).then(() => {
356
+ sortRubrics: (a) => f.http.post(`${r}/reorder`, { ids: a }).then(() => {
357
357
  }),
358
- tagsPage: (l = {}) => {
358
+ tagsPage: (a = {}) => {
359
359
  const t = new URLSearchParams();
360
- l.q && t.set("q", l.q), l.empty && t.set("empty", "1"), l.noindex && t.set("noindex", "1"), l.sort && t.set("sort", l.sort), l.page && l.page > 1 && t.set("page", String(l.page)), l.per_page && t.set("per_page", String(l.per_page));
361
- const r = t.size > 0 ? `?${t}` : "";
362
- return y.http.get(`${x}${r}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
360
+ a.q && t.set("q", a.q), a.empty && t.set("empty", "1"), a.noindex && t.set("noindex", "1"), a.sort && t.set("sort", a.sort), a.page && a.page > 1 && t.set("page", String(a.page)), a.per_page && t.set("per_page", String(a.per_page));
361
+ const s = t.size > 0 ? `?${t}` : "";
362
+ return f.http.get(`${y}${s}`).then((i) => ({ ...i.meta, data: i.data, filters: i.filters }));
363
363
  },
364
- saveTag: (l, t) => y.http.put(`${x}/${l}`, t).then(c),
365
- removeTag: (l) => y.http.delete(`${x}/${l}`).then(() => {
364
+ saveTag: (a, t) => f.http.put(`${y}/${a}`, t).then(u),
365
+ removeTag: (a) => f.http.delete(`${y}/${a}`).then(() => {
366
366
  }),
367
- massTags: (l, t) => y.http.post(`${x}/mass`, { ids: l, action: t }).then((r) => r.data.affected),
368
- mergeTags: (l, t, r) => y.http.post(`${x}/merge`, { ids: l, keep: t, redirect: r }).then(c)
367
+ massTags: (a, t) => f.http.post(`${y}/mass`, { ids: a, action: t }).then((s) => s.data.affected),
368
+ mergeTags: (a, t, s) => f.http.post(`${y}/merge`, { ids: a, keep: t, redirect: s }).then(u)
369
369
  };
370
370
  }
371
- const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-editor__id" }, Dt = { class: "wx-article-editor__name" }, It = { class: "wx-article-editor__title" }, Ot = { class: "wx-article-editor__actions" }, Et = { class: "wx-article-editor__screen" }, Lt = 1200, Ft = 720, Kt = /* @__PURE__ */ ee({
371
+ const Pt = { class: "wx-article-editor__screen" }, Dt = 1200, It = /* @__PURE__ */ ee({
372
372
  __name: "ArticleEditorPage",
373
373
  props: {
374
374
  base: { default: "/blog" }
375
375
  },
376
- setup(y) {
377
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me(), t = Ge(), r = bt();
378
- ae();
379
- const i = te("webx-blog"), $ = me(), T = b(() => Number(c.params.id)), h = b(() => `${_.base}/articles`), d = z(null), k = z({}), S = z(""), C = z(""), M = z(null), P = z({ rubrics: [], authors: [] }), U = z([]), R = z(!0), W = z(!1), O = z(!1), A = z({}), N = z(null), H = z(""), D = z(0), m = b(() => u.can("blog.articles.manage")), E = b(() => !m.value || O.value), j = We("root"), de = rt(j), Ve = b(() => de.value > 0 && de.value < Ft), ve = b(() => JSON.stringify(k.value)), J = b(() => H.value !== "" && ve.value !== H.value), we = b(() => W.value ? "saving" : J.value ? "unsaved" : "saved"), he = b(() => {
380
- const B = k.value.title;
381
- return _t(B, t.active.value, d.value?.title ?? "");
382
- }), Q = b(() => {
383
- const B = k.value.published_at;
384
- return typeof B == "string" && B !== "" ? B : null;
385
- }), fe = b(() => {
386
- if (Q.value === null) return !1;
387
- const B = new Date(Q.value.replace(" ", "T"));
388
- return !Number.isNaN(B.valueOf()) && B.valueOf() > Date.now();
389
- }), ye = b(() => {
390
- const B = d.value;
391
- if (!B) return "";
392
- const Z = r.short(B.published_at);
376
+ setup(f) {
377
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke(), t = Xe(), s = mt();
378
+ te();
379
+ const i = Q("webx-blog"), x = ge(), T = v(() => Number(u.params.id)), c = v(() => `${m.base}/articles`), o = z(null), _ = z({}), W = z(""), S = z(""), E = z(null), F = z({ rubrics: [], authors: [] }), $ = z([]), U = z(!0), R = z(!1), M = z(!1), A = z({}), I = z(null), K = z(""), P = z(0), q = v(() => r.can("blog.articles.manage")), k = v(() => !q.value || M.value), le = v(() => JSON.stringify(_.value)), O = v(() => K.value !== "" && le.value !== K.value), se = v(() => R.value ? "saving" : O.value ? "unsaved" : "saved"), xe = v(() => {
380
+ const V = _.value.title;
381
+ return wt(V, t.active.value, o.value?.title ?? "");
382
+ }), ce = v(() => {
383
+ const V = _.value.published_at;
384
+ return typeof V == "string" && V !== "" ? V : null;
385
+ }), he = v(() => {
386
+ if (ce.value === null) return !1;
387
+ const V = new Date(ce.value.replace(" ", "T"));
388
+ return !Number.isNaN(V.valueOf()) && V.valueOf() > Date.now();
389
+ }), Te = v(() => {
390
+ const V = o.value;
391
+ if (!V) return "";
392
+ const Y = s.short(V.published_at);
393
393
  return {
394
394
  draft: i("article.live-never"),
395
- scheduled: i("article.live-scheduled", { date: Z }),
396
- published: i("article.live-since", { date: Z }),
397
- modified: `${i("article.live-since", { date: Z })} · ${i("article.live-edited")}`,
395
+ scheduled: i("article.live-scheduled", { date: Y }),
396
+ published: i("article.live-since", { date: Y }),
397
+ modified: `${i("article.live-since", { date: Y })} · ${i("article.live-edited")}`,
398
398
  unpublished: i("article.live-off")
399
- }[B.status] ?? "";
399
+ }[V.status] ?? "";
400
400
  });
401
- Wt({ url: b(() => M.value), reload: D }), zt({
402
- article: d,
403
- values: k,
404
- options: P,
405
- related: U,
406
- prefix: C,
407
- base: _.base,
408
- canManage: m.value,
409
- disabled: E,
410
- reload: () => ie(!0),
411
- save: () => w()
401
+ zt({ url: v(() => E.value), reload: P }), Rt({
402
+ article: o,
403
+ values: _,
404
+ options: F,
405
+ related: $,
406
+ prefix: S,
407
+ base: m.base,
408
+ canManage: q.value,
409
+ disabled: k,
410
+ reload: () => pe(!0),
411
+ save: () => N()
412
412
  });
413
- function _e(B) {
414
- d.value = B.article, k.value = B.values, S.value = B.revision, C.value = B.prefix, M.value = B.preview_url, P.value = B.options, U.value = B.related, H.value = JSON.stringify(B.values), N.value = null;
413
+ function ke(V) {
414
+ o.value = V.article, _.value = V.values, W.value = V.revision, S.value = V.prefix, E.value = V.preview_url, F.value = V.options, $.value = V.related, K.value = JSON.stringify(V.values), I.value = null;
415
415
  }
416
- async function ie(B = !1) {
417
- B || (R.value = !0);
416
+ async function pe(V = !1) {
417
+ V || (U.value = !0);
418
418
  try {
419
- _e(await x.get(T.value));
420
- } catch (Z) {
421
- L.danger($(Z)), l.push(h.value);
419
+ ke(await y.get(T.value));
420
+ } catch (Y) {
421
+ L.danger(x(Y)), a.push(c.value);
422
422
  } finally {
423
- R.value = !1;
423
+ U.value = !1;
424
424
  }
425
425
  }
426
- let v;
427
- function o() {
428
- !m.value || N.value || !J.value || (clearTimeout(v), v = setTimeout(() => {
429
- w();
430
- }, Lt));
426
+ let re;
427
+ function fe() {
428
+ !q.value || I.value || !O.value || (clearTimeout(re), re = setTimeout(() => {
429
+ N();
430
+ }, Dt));
431
431
  }
432
- function s() {
433
- !m.value || N.value || !J.value || W.value || (clearTimeout(v), w());
432
+ function g() {
433
+ !q.value || I.value || !O.value || R.value || (clearTimeout(re), N());
434
434
  }
435
- async function w() {
436
- if (!d.value || W.value || !m.value) return;
437
- clearTimeout(v);
438
- const B = ve.value, Z = k.value;
439
- W.value = !0, A.value = {};
435
+ async function N() {
436
+ if (!o.value || R.value || !q.value) return;
437
+ clearTimeout(re);
438
+ const V = le.value, Y = _.value;
439
+ R.value = !0, A.value = {};
440
440
  try {
441
- const X = await x.save(d.value.id, { values: Z, revision: S.value });
442
- d.value = X.article, S.value = X.revision, C.value = X.prefix, M.value = X.preview_url, P.value = X.options, U.value = X.related, N.value = null, ve.value === B && (H.value = B), D.value += 1;
443
- } catch (X) {
444
- const ke = X;
445
- ke.status === 409 && ke.body?.data ? N.value = ke.body : ke.body?.errors ? (A.value = ke.body.errors, L.danger(i("article.save-failed"))) : L.danger($(X));
441
+ const ae = await y.save(o.value.id, { values: Y, revision: W.value });
442
+ o.value = ae.article, W.value = ae.revision, S.value = ae.prefix, E.value = ae.preview_url, F.value = ae.options, $.value = ae.related, I.value = null, le.value === V && (K.value = V), P.value += 1;
443
+ } catch (ae) {
444
+ const Ve = ae;
445
+ Ve.status === 409 && Ve.body?.data ? I.value = Ve.body : Ve.body?.errors ? (A.value = Ve.body.errors, L.danger(i("article.save-failed"))) : L.danger(x(ae));
446
446
  } finally {
447
- W.value = !1;
447
+ R.value = !1;
448
448
  }
449
449
  }
450
- async function le() {
451
- await pe({
450
+ async function B() {
451
+ await me({
452
452
  title: i("article.conflict-theirs-title"),
453
453
  message: i("article.conflict-theirs-text"),
454
454
  confirmText: i("article.conflict-theirs"),
455
455
  cancelText: i("panel.cancel"),
456
456
  tone: "danger"
457
- }) && await ie(!0);
457
+ }) && await pe(!0);
458
458
  }
459
- async function xe() {
460
- const B = N.value;
461
- B && (S.value = B.data.revision, N.value = null, await w());
459
+ async function X() {
460
+ const V = I.value;
461
+ V && (W.value = V.data.revision, I.value = null, await N());
462
462
  }
463
- async function Pe() {
464
- if (!(!d.value || !await pe({
463
+ async function ye() {
464
+ if (!(!o.value || !await me({
465
465
  title: i("article.discard-title"),
466
466
  message: i("article.discard-text"),
467
467
  confirmText: i("article.discard"),
468
468
  cancelText: i("panel.cancel"),
469
469
  tone: "danger"
470
470
  }))) {
471
- O.value = !0;
471
+ M.value = !0;
472
472
  try {
473
- _e(await x.discard(d.value.id)), L.success(i("article.discarded"));
474
- } catch (Z) {
475
- L.danger($(Z));
473
+ ke(await y.discard(o.value.id)), L.success(i("article.discarded"));
474
+ } catch (Y) {
475
+ L.danger(x(Y));
476
476
  } finally {
477
- O.value = !1;
477
+ M.value = !1;
478
478
  }
479
479
  }
480
480
  }
481
- async function ct() {
482
- const B = d.value;
483
- if (!B) return;
484
- const Z = B.path === null ? null : `/${B.path}`, X = Q.value === null ? i("article.publish-now") : r.short(Q.value);
485
- if (await pe({
486
- title: i("article.publish-title", { title: B.title }),
487
- message: fe.value ? i("article.publish-later", { date: X }) : Z === null ? i("article.publish-nowhere") : i("article.publish-text", { address: Z }),
488
- confirmText: fe.value ? i("article.schedule") : i("panel.publish"),
481
+ async function d() {
482
+ const V = o.value;
483
+ if (!V) return;
484
+ const Y = V.path === null ? null : `/${V.path}`, ae = ce.value === null ? i("article.publish-now") : s.short(ce.value);
485
+ if (await me({
486
+ title: i("article.publish-title", { title: V.title }),
487
+ message: he.value ? i("article.publish-later", { date: ae }) : Y === null ? i("article.publish-nowhere") : i("article.publish-text", { address: Y }),
488
+ confirmText: he.value ? i("article.schedule") : i("panel.publish"),
489
489
  cancelText: i("panel.cancel")
490
- }) && (J.value && await w(), !N.value)) {
491
- O.value = !0;
490
+ }) && (O.value && await N(), !I.value)) {
491
+ M.value = !0;
492
492
  try {
493
- await x.publish(B.id, Q.value), await ie(!0), L.success(fe.value ? i("article.scheduled") : i("panel.published"));
494
- } catch (pt) {
495
- L.danger($(pt));
493
+ await y.publish(V.id, ce.value), await pe(!0), L.success(he.value ? i("article.scheduled") : i("panel.published"));
494
+ } catch (dt) {
495
+ L.danger(x(dt));
496
496
  } finally {
497
- O.value = !1;
497
+ M.value = !1;
498
498
  }
499
499
  }
500
500
  }
501
- function vt() {
502
- const B = d.value?.status;
503
- return B === "published" ? "success" : B === "modified" ? "warning" : B === "scheduled" ? "primary" : "default";
501
+ function D() {
502
+ const V = o.value?.status;
503
+ return V === "published" ? "success" : V === "modified" ? "warning" : V === "scheduled" ? "primary" : "default";
504
504
  }
505
- function et(B) {
506
- J.value && B.preventDefault();
505
+ function h(V) {
506
+ O.value && V.preventDefault();
507
507
  }
508
- return oe(ve, o), oe(T, () => {
509
- ie();
510
- }), Le(() => {
511
- ie(), window.addEventListener("beforeunload", et);
512
- }), Fe(() => {
513
- clearTimeout(v), window.removeEventListener("beforeunload", et);
514
- }), St(async () => !J.value || !m.value || (await w(), !J.value) ? !0 : await pe({
508
+ ue(le, fe), ue(T, () => {
509
+ pe();
510
+ }), Ne(() => {
511
+ pe(), window.addEventListener("beforeunload", h);
512
+ }), Je(() => {
513
+ clearTimeout(re), window.removeEventListener("beforeunload", h);
514
+ }), Ct(async () => !O.value || !q.value || (await N(), !O.value) ? !0 : await me({
515
515
  title: i("article.leave-title"),
516
516
  message: i("article.leave-text"),
517
517
  confirmText: i("article.leave"),
518
518
  cancelText: i("panel.cancel"),
519
519
  tone: "danger"
520
- })), (B, Z) => (p(), K("div", {
521
- ref_key: "root",
522
- ref: j,
520
+ }));
521
+ const $e = v(() => {
522
+ const V = [];
523
+ return E.value && V.push({ key: "preview", label: i("article.preview"), icon: "eye", href: E.value }), o.value?.url && o.value.status !== "draft" && V.push({
524
+ key: "site",
525
+ label: i("panel.open-on-site"),
526
+ icon: "link",
527
+ href: o.value.url
528
+ }), V;
529
+ });
530
+ return (V, Y) => (p(), Z("div", {
523
531
  class: "wx-article-editor",
524
- onFocusout: s
532
+ onFocusout: g
525
533
  }, [
526
- R.value || !d.value ? (p(), K(ne, { key: 0 }, [
534
+ U.value || !o.value ? (p(), Z(be, { key: 0 }, [
527
535
  n(e(Ue), {
528
536
  class: "wx-article-editor__ghost",
529
537
  title: "",
530
538
  rows: 1
531
539
  }),
532
540
  n(e(Ue), { rows: 8 })
533
- ], 64)) : (p(), K(ne, { key: 1 }, [
534
- q("div", Mt, [
535
- n(e(ht), {
536
- class: "wx-article-editor__back",
537
- to: h.value,
538
- label: e(i)("module.articles")
539
- }, null, 8, ["to", "label"]),
540
- q("div", Pt, [
541
- n(e(wt), {
541
+ ], 64)) : (p(), Z(be, { key: 1 }, [
542
+ n(e(bt), {
543
+ divider: "",
544
+ back: c.value,
545
+ "back-label": e(i)("module.articles"),
546
+ title: xe.value || e(i)("article.untitled"),
547
+ actions: $e.value
548
+ }, {
549
+ trail: l(() => [
550
+ n(e(_t), {
542
551
  size: "sm",
543
552
  label: e(i)("article.trail")
544
553
  }, {
545
- default: a(() => [
546
- n(e(at), {
554
+ default: l(() => [
555
+ n(e(lt), {
547
556
  as: "router-link",
548
- to: h.value
557
+ to: c.value
549
558
  }, {
550
- default: a(() => [
551
- g(f(e(i)("module.articles")), 1)
559
+ default: l(() => [
560
+ w(b(e(i)("module.articles")), 1)
552
561
  ]),
553
562
  _: 1
554
563
  }, 8, ["to"]),
555
- n(e(at), { current: "" }, {
556
- default: a(() => [
557
- g(f(he.value || e(i)("article.untitled")), 1)
564
+ n(e(lt), { current: "" }, {
565
+ default: l(() => [
566
+ w(b(xe.value || e(i)("article.untitled")), 1)
558
567
  ]),
559
568
  _: 1
560
569
  })
561
570
  ]),
562
571
  _: 1
563
- }, 8, ["label"]),
564
- q("div", Dt, [
565
- q("span", It, f(he.value || e(i)("article.untitled")), 1),
566
- n(e(re), {
567
- type: vt(),
568
- dot: ""
569
- }, {
570
- default: a(() => [
571
- g(f(e(i)(`panel.status-${d.value.status}`)), 1)
572
- ]),
573
- _: 1
574
- }, 8, ["type"])
575
- ])
572
+ }, 8, ["label"])
576
573
  ]),
577
- q("div", Ot, [
578
- Ve.value ? (p(), V(e(xt), {
579
- key: 0,
580
- align: "end"
574
+ "title-after": l(() => [
575
+ n(e(oe), {
576
+ type: D(),
577
+ dot: ""
581
578
  }, {
582
- trigger: a(() => [
583
- n(e(Re), {
584
- type: "more",
585
- title: e(i)("article.more")
586
- }, null, 8, ["title"])
587
- ]),
588
- default: a(() => [
589
- M.value ? (p(), V(e(lt), {
590
- key: 0,
591
- icon: "eye",
592
- href: M.value,
593
- target: "_blank",
594
- rel: "noopener"
595
- }, {
596
- default: a(() => [
597
- g(f(e(i)("article.preview")), 1)
598
- ]),
599
- _: 1
600
- }, 8, ["href"])) : I("", !0),
601
- d.value.url && d.value.status !== "draft" ? (p(), V(e(lt), {
602
- key: 1,
603
- icon: "link",
604
- href: d.value.url,
605
- target: "_blank",
606
- rel: "noopener"
607
- }, {
608
- default: a(() => [
609
- g(f(e(i)("panel.open-on-site")), 1)
610
- ]),
611
- _: 1
612
- }, 8, ["href"])) : I("", !0)
579
+ default: l(() => [
580
+ w(b(e(i)(`panel.status-${o.value.status}`)), 1)
613
581
  ]),
614
582
  _: 1
615
- })) : (p(), K(ne, { key: 1 }, [
616
- M.value ? (p(), V(e(F), {
617
- key: 0,
618
- variant: "outline",
619
- icon: "eye",
620
- href: M.value,
621
- target: "_blank",
622
- rel: "noopener"
623
- }, {
624
- default: a(() => [
625
- g(f(e(i)("article.preview")), 1)
626
- ]),
627
- _: 1
628
- }, 8, ["href"])) : I("", !0),
629
- d.value.url && d.value.status !== "draft" ? (p(), V(e(F), {
630
- key: 1,
631
- variant: "outline",
632
- icon: "link",
633
- href: d.value.url,
634
- target: "_blank",
635
- rel: "noopener"
636
- }, {
637
- default: a(() => [
638
- g(f(e(i)("panel.open-on-site")), 1)
639
- ]),
640
- _: 1
641
- }, 8, ["href"])) : I("", !0)
642
- ], 64))
643
- ])
644
- ]),
645
- N.value ? (p(), V(e(Se), {
583
+ }, 8, ["type"])
584
+ ]),
585
+ _: 1
586
+ }, 8, ["back", "back-label", "title", "actions"]),
587
+ I.value ? (p(), C(e(We), {
646
588
  key: 0,
647
589
  type: "warning",
648
590
  title: e(i)("article.conflict-title"),
649
- description: N.value.message
591
+ description: I.value.message
650
592
  }, {
651
- actions: a(() => [
652
- n(e(F), {
593
+ actions: l(() => [
594
+ n(e(J), {
653
595
  size: "sm",
654
596
  variant: "outline",
655
- onClick: le
597
+ onClick: B
656
598
  }, {
657
- default: a(() => [
658
- g(f(e(i)("article.conflict-theirs")), 1)
599
+ default: l(() => [
600
+ w(b(e(i)("article.conflict-theirs")), 1)
659
601
  ]),
660
602
  _: 1
661
603
  }),
662
- n(e(F), {
604
+ n(e(J), {
663
605
  size: "sm",
664
606
  type: "primary",
665
- onClick: xe
607
+ onClick: X
666
608
  }, {
667
- default: a(() => [
668
- g(f(e(i)("article.conflict-mine")), 1)
609
+ default: l(() => [
610
+ w(b(e(i)("article.conflict-mine")), 1)
669
611
  ]),
670
612
  _: 1
671
613
  })
672
614
  ]),
673
615
  _: 1
674
- }, 8, ["title", "description"])) : I("", !0),
675
- q("div", Et, [
676
- n(e(yt), {
677
- modelValue: k.value,
678
- "onUpdate:modelValue": Z[0] || (Z[0] = (X) => k.value = X),
616
+ }, 8, ["title", "description"])) : H("", !0),
617
+ j("div", Pt, [
618
+ n(e(gt), {
619
+ modelValue: _.value,
620
+ "onUpdate:modelValue": Y[0] || (Y[0] = (ae) => _.value = ae),
679
621
  name: "blog.article-form",
680
622
  errors: A.value,
681
- disabled: E.value
623
+ disabled: k.value
682
624
  }, null, 8, ["modelValue", "errors", "disabled"])
683
625
  ]),
684
- m.value ? (p(), V(e(ot), { key: 1 }, {
685
- state: a(() => [
686
- n(e(G), {
626
+ q.value ? (p(), C(e(rt), { key: 1 }, {
627
+ state: l(() => [
628
+ n(e(ht), { state: se.value }, null, 8, ["state"]),
629
+ Te.value ? (p(), C(e(G), {
630
+ key: 0,
687
631
  size: "sm",
688
632
  tone: "muted"
689
633
  }, {
690
- default: a(() => [
691
- g(f(e(i)(`article.state-${we.value}`)), 1),
692
- ye.value ? (p(), K(ne, { key: 0 }, [
693
- g(" · " + f(ye.value), 1)
694
- ], 64)) : I("", !0)
634
+ default: l(() => [
635
+ w(b(Te.value), 1)
695
636
  ]),
696
637
  _: 1
697
- })
638
+ })) : H("", !0)
698
639
  ]),
699
- default: a(() => [
700
- d.value.status === "modified" ? (p(), V(e(F), {
640
+ default: l(() => [
641
+ o.value.status === "modified" ? (p(), C(e(J), {
701
642
  key: 0,
702
643
  variant: "text",
703
- loading: O.value,
704
- onClick: Pe
644
+ loading: M.value,
645
+ onClick: ye
705
646
  }, {
706
- default: a(() => [
707
- g(f(e(i)("article.discard")), 1)
647
+ default: l(() => [
648
+ w(b(e(i)("article.discard")), 1)
708
649
  ]),
709
650
  _: 1
710
- }, 8, ["loading"])) : I("", !0),
711
- n(e(F), {
651
+ }, 8, ["loading"])) : H("", !0),
652
+ n(e(J), {
712
653
  variant: "outline",
713
- loading: W.value,
714
- disabled: !J.value,
715
- onClick: w
654
+ loading: R.value,
655
+ disabled: !O.value,
656
+ onClick: N
716
657
  }, {
717
- default: a(() => [
718
- g(f(e(i)("article.save")), 1)
658
+ default: l(() => [
659
+ w(b(e(i)("article.save")), 1)
719
660
  ]),
720
661
  _: 1
721
662
  }, 8, ["loading", "disabled"]),
722
- n(e(F), {
663
+ n(e(J), {
723
664
  type: "primary",
724
- loading: O.value,
725
- disabled: d.value.status === "published" && !J.value,
726
- onClick: ct
665
+ loading: M.value,
666
+ disabled: o.value.status === "published" && !O.value,
667
+ onClick: d
727
668
  }, {
728
- default: a(() => [
729
- g(f(fe.value ? e(i)("article.schedule") : e(i)("panel.publish")), 1)
669
+ default: l(() => [
670
+ w(b(he.value ? e(i)("article.schedule") : e(i)("panel.publish")), 1)
730
671
  ]),
731
672
  _: 1
732
673
  }, 8, ["loading", "disabled"])
733
674
  ]),
734
675
  _: 1
735
- })) : I("", !0)
676
+ })) : H("", !0)
736
677
  ], 64))
737
- ], 544));
678
+ ], 32));
738
679
  }
739
- }), Ht = /* @__PURE__ */ ce(Kt, [["__scopeId", "data-v-9bf13356"]]), jt = { class: "wx-article-history" }, Gt = { class: "wx-article-history__number" }, Jt = { class: "wx-article-history__who" }, Zt = /* @__PURE__ */ ee({
680
+ }), Ot = /* @__PURE__ */ ve(It, [["__scopeId", "data-v-45a48838"]]), Et = { class: "wx-article-history" }, Ft = { class: "wx-article-history__number" }, Lt = { class: "wx-article-history__who" }, Ht = /* @__PURE__ */ ee({
740
681
  name: "WxArticleHistory",
741
682
  __name: "ArticleHistory",
742
- setup(y) {
743
- const _ = se(), u = ue(_), x = Te();
744
- ae();
745
- const c = te("webx-blog"), l = me(), t = z(null), r = z(!1), i = b(() => x?.article.value ?? null), $ = b(() => _.can("blog.articles.manage")), T = b(
683
+ setup(f) {
684
+ const m = ne(), r = de(m), y = Se();
685
+ te();
686
+ const u = Q("webx-blog"), a = ge(), t = z(null), s = z(!1), i = v(() => y?.article.value ?? null), x = v(() => m.can("blog.articles.manage")), T = v(
746
687
  () => i.value?.status === "published" || i.value?.status === "modified" ? t.value?.[0]?.number ?? null : null
747
688
  );
748
- async function h() {
749
- const k = i.value;
750
- if (k)
689
+ async function c() {
690
+ const _ = i.value;
691
+ if (_)
751
692
  try {
752
- t.value = await u.versions(k.id);
753
- } catch (S) {
754
- t.value = [], L.danger(l(S));
693
+ t.value = await r.versions(_.id);
694
+ } catch (W) {
695
+ t.value = [], L.danger(a(W));
755
696
  }
756
697
  }
757
- async function d(k) {
758
- const S = i.value;
759
- if (!(!S || !await pe({
760
- title: c("article.restore-title", { number: k.number }),
761
- message: c("article.restore-text"),
762
- confirmText: c("article.restore-version"),
763
- cancelText: c("panel.cancel")
698
+ async function o(_) {
699
+ const W = i.value;
700
+ if (!(!W || !await me({
701
+ title: u("article.restore-title", { number: _.number }),
702
+ message: u("article.restore-text"),
703
+ confirmText: u("article.restore-version"),
704
+ cancelText: u("panel.cancel")
764
705
  }))) {
765
- r.value = !0;
706
+ s.value = !0;
766
707
  try {
767
- await u.restoreVersion(S.id, k.number), await x?.reload(), L.success(c("article.restored-version", { number: k.number }));
768
- } catch (M) {
769
- L.danger(l(M));
708
+ await r.restoreVersion(W.id, _.number), await y?.reload(), L.success(u("article.restored-version", { number: _.number }));
709
+ } catch (E) {
710
+ L.danger(a(E));
770
711
  } finally {
771
- r.value = !1;
712
+ s.value = !1;
772
713
  }
773
714
  }
774
715
  }
775
- return oe(
716
+ return ue(
776
717
  () => [i.value?.id, i.value?.published_at, i.value?.updated_at],
777
718
  () => {
778
- h();
719
+ c();
779
720
  },
780
721
  { immediate: !0 }
781
- ), (k, S) => (p(), K("div", jt, [
782
- t.value === null ? (p(), V(e(Ue), {
722
+ ), (_, W) => (p(), Z("div", Et, [
723
+ t.value === null ? (p(), C(e(Ue), {
783
724
  key: 0,
784
725
  class: "wx-article-history__ghost",
785
726
  rows: 3
786
- })) : t.value.length === 0 ? (p(), V(e(Oe), {
727
+ })) : t.value.length === 0 ? (p(), C(e(Ge), {
787
728
  key: 1,
788
- description: e(c)("article.history-empty")
789
- }, null, 8, ["description"])) : (p(!0), K(ne, { key: 2 }, ze(t.value, (C) => (p(), K("div", {
790
- key: C.number,
791
- class: Ae(["wx-article-history__row", { "is-live": C.number === T.value }])
729
+ description: e(u)("article.history-empty")
730
+ }, null, 8, ["description"])) : (p(!0), Z(be, { key: 2 }, Be(t.value, (S) => (p(), Z("div", {
731
+ key: S.number,
732
+ class: Pe(["wx-article-history__row", { "is-live": S.number === T.value }])
792
733
  }, [
793
- q("code", Gt, f(e(c)("article.version", { number: C.number })), 1),
794
- q("div", Jt, [
795
- C.created_at ? (p(), V(e(De), {
734
+ j("code", Ft, b(e(u)("article.version", { number: S.number })), 1),
735
+ j("div", Lt, [
736
+ S.created_at ? (p(), C(e(je), {
796
737
  key: 0,
797
- value: C.created_at,
738
+ value: S.created_at,
798
739
  size: "md",
799
740
  tone: "default"
800
- }, null, 8, ["value"])) : I("", !0),
741
+ }, null, 8, ["value"])) : H("", !0),
801
742
  n(e(G), {
802
743
  size: "sm",
803
744
  tone: "muted"
804
745
  }, {
805
- default: a(() => [
806
- g(f(C.author ?? e(c)(`article.source-${C.source}`)) + " ", 1),
807
- C.comment ? (p(), K(ne, { key: 0 }, [
808
- g(" · " + f(C.comment), 1)
809
- ], 64)) : I("", !0)
746
+ default: l(() => [
747
+ w(b(S.author ?? e(u)(`article.source-${S.source}`)) + " ", 1),
748
+ S.comment ? (p(), Z(be, { key: 0 }, [
749
+ w(" · " + b(S.comment), 1)
750
+ ], 64)) : H("", !0)
810
751
  ]),
811
752
  _: 2
812
753
  }, 1024)
813
754
  ]),
814
- C.number === T.value ? (p(), V(e(re), {
755
+ S.number === T.value ? (p(), C(e(oe), {
815
756
  key: 0,
816
757
  type: "success",
817
758
  dot: ""
818
759
  }, {
819
- default: a(() => [
820
- g(f(e(c)("article.version-live")), 1)
760
+ default: l(() => [
761
+ w(b(e(u)("article.version-live")), 1)
821
762
  ]),
822
763
  _: 1
823
- })) : I("", !0),
824
- $.value && C.number !== T.value ? (p(), V(e(F), {
764
+ })) : H("", !0),
765
+ x.value && S.number !== T.value ? (p(), C(e(J), {
825
766
  key: 1,
826
767
  size: "sm",
827
768
  variant: "outline",
828
- loading: r.value,
829
- onClick: (M) => d(C)
769
+ loading: s.value,
770
+ onClick: (E) => o(S)
830
771
  }, {
831
- default: a(() => [
832
- g(f(e(c)("article.restore-version")), 1)
772
+ default: l(() => [
773
+ w(b(e(u)("article.restore-version")), 1)
833
774
  ]),
834
775
  _: 1
835
- }, 8, ["loading", "onClick"])) : I("", !0)
776
+ }, 8, ["loading", "onClick"])) : H("", !0)
836
777
  ], 2))), 128))
837
778
  ]));
838
779
  }
839
- }), Qt = /* @__PURE__ */ ce(Zt, [["__scopeId", "data-v-0a997938"]]), Xt = { class: "wx-article-related" }, Yt = { class: "wx-article-related__name" }, ea = 250, ta = 10, aa = /* @__PURE__ */ ee({
780
+ }), Kt = /* @__PURE__ */ ve(Ht, [["__scopeId", "data-v-0a997938"]]), jt = { class: "wx-article-related" }, Gt = { class: "wx-article-related__name" }, Jt = 250, Zt = 10, Qt = /* @__PURE__ */ ee({
840
781
  name: "WxArticleRelated",
841
782
  __name: "ArticleRelated",
842
- props: /* @__PURE__ */ Ne({
783
+ props: /* @__PURE__ */ Me({
843
784
  disabled: { type: Boolean, default: !1 }
844
785
  }, {
845
786
  modelValue: { default: () => [] },
846
787
  modelModifiers: {}
847
788
  }),
848
789
  emits: ["update:modelValue"],
849
- setup(y) {
850
- const _ = y, u = Be(y, "modelValue"), x = se(), c = ue(x), l = Te();
851
- ae();
852
- const t = te("webx-blog"), r = me(), i = b(() => _.disabled || l?.disabled.value === !0), $ = z(/* @__PURE__ */ new Map()), T = z([]);
853
- let h;
854
- oe(
855
- () => l?.related.value,
856
- (U) => {
857
- const R = new Map($.value);
858
- for (const W of U ?? []) R.set(W.id, W.title);
859
- $.value = R;
790
+ setup(f) {
791
+ const m = f, r = qe(f, "modelValue"), y = ne(), u = de(y), a = Se();
792
+ te();
793
+ const t = Q("webx-blog"), s = ge(), i = v(() => m.disabled || a?.disabled.value === !0), x = z(/* @__PURE__ */ new Map()), T = z([]);
794
+ let c;
795
+ ue(
796
+ () => a?.related.value,
797
+ ($) => {
798
+ const U = new Map(x.value);
799
+ for (const R of $ ?? []) U.set(R.id, R.title);
800
+ x.value = U;
860
801
  },
861
802
  { immediate: !0, deep: !0 }
862
803
  );
863
- const d = b({
864
- get: () => u.value.map((U) => ({ id: U, title: $.value.get(U) ?? `#${U}` })),
865
- set: (U) => {
866
- u.value = U.map((R) => R.id);
804
+ const o = v({
805
+ get: () => r.value.map(($) => ({ id: $, title: x.value.get($) ?? `#${$}` })),
806
+ set: ($) => {
807
+ r.value = $.map((U) => U.id);
867
808
  }
868
- }), k = b(
869
- () => T.value.filter((U) => !u.value.includes(U.id)).map((U) => ({ label: U.title, value: U.id }))
809
+ }), _ = v(
810
+ () => T.value.filter(($) => !r.value.includes($.id)).map(($) => ({ label: $.title, value: $.id }))
870
811
  );
871
- async function S(U) {
872
- const R = l?.article.value?.id;
812
+ async function W($) {
813
+ const U = a?.article.value?.id;
873
814
  try {
874
- const W = await c.articles({ q: U, per_page: ta });
875
- T.value = W.data.filter((A) => A.id !== R).map((A) => ({ id: A.id, title: A.title }));
876
- const O = new Map($.value);
877
- for (const A of T.value) O.set(A.id, A.title);
878
- $.value = O;
879
- } catch (W) {
880
- L.danger(r(W));
815
+ const R = await u.articles({ q: $, per_page: Zt });
816
+ T.value = R.data.filter((A) => A.id !== U).map((A) => ({ id: A.id, title: A.title }));
817
+ const M = new Map(x.value);
818
+ for (const A of T.value) M.set(A.id, A.title);
819
+ x.value = M;
820
+ } catch (R) {
821
+ L.danger(s(R));
881
822
  }
882
823
  }
883
- function C(U) {
884
- clearTimeout(h), h = setTimeout(() => {
885
- S(U);
886
- }, ea);
824
+ function S($) {
825
+ clearTimeout(c), c = setTimeout(() => {
826
+ W($);
827
+ }, Jt);
887
828
  }
888
- function M(U) {
889
- typeof U != "number" || u.value.includes(U) || (u.value = [...u.value, U]);
829
+ function E($) {
830
+ typeof $ != "number" || r.value.includes($) || (r.value = [...r.value, $]);
890
831
  }
891
- function P(U) {
892
- u.value = u.value.filter((R) => R !== U);
832
+ function F($) {
833
+ r.value = r.value.filter((U) => U !== $);
893
834
  }
894
- return oe(
895
- () => l?.article.value?.id,
835
+ return ue(
836
+ () => a?.article.value?.id,
896
837
  () => {
897
- S("");
838
+ W("");
898
839
  },
899
840
  { immediate: !0 }
900
- ), Fe(() => clearTimeout(h)), (U, R) => (p(), K("div", Xt, [
901
- n(e(Je), {
902
- modelValue: d.value,
903
- "onUpdate:modelValue": R[0] || (R[0] = (W) => d.value = W),
841
+ ), Je(() => clearTimeout(c)), ($, U) => (p(), Z("div", jt, [
842
+ n(e(Ye), {
843
+ modelValue: o.value,
844
+ "onUpdate:modelValue": U[0] || (U[0] = (R) => o.value = R),
904
845
  plain: "",
905
846
  size: "sm",
906
847
  "item-key": "id",
@@ -909,302 +850,302 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
909
850
  "empty-text": e(t)("article.related-empty"),
910
851
  "aria-label": e(t)("article.related")
911
852
  }, {
912
- default: a(({ item: W }) => [
913
- q("span", Yt, f(W.title), 1)
853
+ default: l(({ item: R }) => [
854
+ j("span", Gt, b(R.title), 1)
914
855
  ]),
915
- actions: a(({ item: W }) => [
916
- n(e(Re), {
856
+ actions: l(({ item: R }) => [
857
+ n(e(Oe), {
917
858
  type: "remove",
918
859
  size: "sm",
919
860
  disabled: i.value,
920
861
  title: e(t)("article.related-remove"),
921
- onClick: (O) => P(W.id)
862
+ onClick: (M) => F(R.id)
922
863
  }, null, 8, ["disabled", "title", "onClick"])
923
864
  ]),
924
865
  _: 1
925
866
  }, 8, ["modelValue", "disabled", "empty-text", "aria-label"]),
926
- n(e(be), {
867
+ n(e(_e), {
927
868
  "model-value": null,
928
- options: k.value,
869
+ options: _.value,
929
870
  placeholder: e(t)("article.related-add"),
930
871
  "empty-text": e(t)("article.related-nothing"),
931
872
  disabled: i.value,
932
873
  filterable: "",
933
874
  teleport: "",
934
875
  "aria-label": e(t)("article.related-add"),
935
- onSearch: C,
936
- "onUpdate:modelValue": M
876
+ onSearch: S,
877
+ "onUpdate:modelValue": E
937
878
  }, null, 8, ["options", "placeholder", "empty-text", "disabled", "aria-label"])
938
879
  ]));
939
880
  }
940
- }), la = /* @__PURE__ */ ce(aa, [["__scopeId", "data-v-164e86fe"]]), ia = { class: "wx-article-rubrics" }, na = { class: "wx-article-rubrics__name" }, sa = /* @__PURE__ */ ee({
881
+ }), Xt = /* @__PURE__ */ ve(Qt, [["__scopeId", "data-v-164e86fe"]]), Yt = { class: "wx-article-rubrics" }, ea = { class: "wx-article-rubrics__name" }, ta = /* @__PURE__ */ ee({
941
882
  name: "WxArticleRubrics",
942
883
  __name: "ArticleRubrics",
943
- props: /* @__PURE__ */ Ne({
884
+ props: /* @__PURE__ */ Me({
944
885
  disabled: { type: Boolean, default: !1 }
945
886
  }, {
946
887
  modelValue: { default: () => [] },
947
888
  modelModifiers: {}
948
889
  }),
949
890
  emits: ["update:modelValue"],
950
- setup(y) {
951
- const _ = y, u = Be(y, "modelValue"), x = Te();
952
- ae();
953
- const c = te("webx-blog"), l = b(() => _.disabled || x?.disabled.value === !0), t = b(() => {
954
- const h = /* @__PURE__ */ new Map();
955
- for (const d of x?.options.value.rubrics ?? []) h.set(d.id, d.title);
956
- return h;
957
- }), r = b({
958
- get: () => u.value.map((h) => ({ id: h, title: t.value.get(h) ?? `#${h}` })),
959
- set: (h) => {
960
- u.value = h.map((d) => d.id);
891
+ setup(f) {
892
+ const m = f, r = qe(f, "modelValue"), y = Se();
893
+ te();
894
+ const u = Q("webx-blog"), a = v(() => m.disabled || y?.disabled.value === !0), t = v(() => {
895
+ const c = /* @__PURE__ */ new Map();
896
+ for (const o of y?.options.value.rubrics ?? []) c.set(o.id, o.title);
897
+ return c;
898
+ }), s = v({
899
+ get: () => r.value.map((c) => ({ id: c, title: t.value.get(c) ?? `#${c}` })),
900
+ set: (c) => {
901
+ r.value = c.map((o) => o.id);
961
902
  }
962
- }), i = b(
963
- () => (x?.options.value.rubrics ?? []).filter((h) => !u.value.includes(h.id)).map((h) => ({ label: h.title, value: h.id }))
903
+ }), i = v(
904
+ () => (y?.options.value.rubrics ?? []).filter((c) => !r.value.includes(c.id)).map((c) => ({ label: c.title, value: c.id }))
964
905
  );
965
- function $(h) {
966
- typeof h != "number" || u.value.includes(h) || (u.value = [...u.value, h]);
906
+ function x(c) {
907
+ typeof c != "number" || r.value.includes(c) || (r.value = [...r.value, c]);
967
908
  }
968
- function T(h) {
969
- u.value = u.value.filter((d) => d !== h);
909
+ function T(c) {
910
+ r.value = r.value.filter((o) => o !== c);
970
911
  }
971
- return (h, d) => (p(), K("div", ia, [
972
- n(e(Je), {
973
- modelValue: r.value,
974
- "onUpdate:modelValue": d[0] || (d[0] = (k) => r.value = k),
912
+ return (c, o) => (p(), Z("div", Yt, [
913
+ n(e(Ye), {
914
+ modelValue: s.value,
915
+ "onUpdate:modelValue": o[0] || (o[0] = (_) => s.value = _),
975
916
  plain: "",
976
917
  size: "sm",
977
918
  "item-key": "id",
978
919
  "item-label": "title",
979
- disabled: l.value,
980
- "empty-text": e(c)("article.rubrics-empty"),
981
- "aria-label": e(c)("article.rubrics")
920
+ disabled: a.value,
921
+ "empty-text": e(u)("article.rubrics-empty"),
922
+ "aria-label": e(u)("article.rubrics")
982
923
  }, {
983
- default: a(({ item: k, index: S }) => [
984
- q("span", na, f(k.title), 1),
985
- S === 0 ? (p(), V(e(re), {
924
+ default: l(({ item: _, index: W }) => [
925
+ j("span", ea, b(_.title), 1),
926
+ W === 0 ? (p(), C(e(oe), {
986
927
  key: 0,
987
928
  type: "primary"
988
929
  }, {
989
- default: a(() => [
990
- g(f(e(c)("article.rubric-main")), 1)
930
+ default: l(() => [
931
+ w(b(e(u)("article.rubric-main")), 1)
991
932
  ]),
992
933
  _: 1
993
- })) : I("", !0)
934
+ })) : H("", !0)
994
935
  ]),
995
- actions: a(({ item: k }) => [
996
- n(e(Re), {
936
+ actions: l(({ item: _ }) => [
937
+ n(e(Oe), {
997
938
  type: "remove",
998
939
  size: "sm",
999
- disabled: l.value,
1000
- title: e(c)("article.rubric-remove"),
1001
- onClick: (S) => T(k.id)
940
+ disabled: a.value,
941
+ title: e(u)("article.rubric-remove"),
942
+ onClick: (W) => T(_.id)
1002
943
  }, null, 8, ["disabled", "title", "onClick"])
1003
944
  ]),
1004
945
  _: 1
1005
946
  }, 8, ["modelValue", "disabled", "empty-text", "aria-label"]),
1006
- n(e(be), {
947
+ n(e(_e), {
1007
948
  "model-value": null,
1008
949
  options: i.value,
1009
- placeholder: e(c)("article.rubric-add"),
1010
- disabled: l.value || i.value.length === 0,
1011
- "empty-text": e(c)("article.rubric-none-left"),
950
+ placeholder: e(u)("article.rubric-add"),
951
+ disabled: a.value || i.value.length === 0,
952
+ "empty-text": e(u)("article.rubric-none-left"),
1012
953
  filterable: "",
1013
954
  teleport: "",
1014
- "aria-label": e(c)("article.rubric-add"),
1015
- "onUpdate:modelValue": $
955
+ "aria-label": e(u)("article.rubric-add"),
956
+ "onUpdate:modelValue": x
1016
957
  }, null, 8, ["options", "placeholder", "disabled", "empty-text", "aria-label"])
1017
958
  ]));
1018
959
  }
1019
- }), ra = /* @__PURE__ */ ce(sa, [["__scopeId", "data-v-db8c5bc8"]]), oa = { class: "wx-article-tags" }, ua = {
960
+ }), aa = /* @__PURE__ */ ve(ta, [["__scopeId", "data-v-db8c5bc8"]]), la = { class: "wx-article-tags" }, ia = {
1020
961
  key: 0,
1021
962
  class: "wx-article-tags__chips"
1022
- }, da = { class: "wx-article-tags__pick" }, ca = 250, va = /* @__PURE__ */ ee({
963
+ }, na = { class: "wx-article-tags__pick" }, sa = 250, ra = /* @__PURE__ */ ee({
1023
964
  name: "WxArticleTags",
1024
965
  __name: "ArticleTags",
1025
- props: /* @__PURE__ */ Ne({
966
+ props: /* @__PURE__ */ Me({
1026
967
  disabled: { type: Boolean, default: !1 }
1027
968
  }, {
1028
969
  modelValue: { default: () => [] },
1029
970
  modelModifiers: {}
1030
971
  }),
1031
972
  emits: ["update:modelValue"],
1032
- setup(y) {
1033
- const _ = y, u = Be(y, "modelValue"), x = se(), c = ue(x), l = Te();
1034
- ae();
1035
- const t = te("webx-blog"), r = me(), i = b(() => _.disabled || l?.disabled.value === !0), $ = z(/* @__PURE__ */ new Map()), T = z([]), h = z(""), d = z(!1);
1036
- let k;
1037
- oe(
1038
- () => l?.article.value?.tags,
973
+ setup(f) {
974
+ const m = f, r = qe(f, "modelValue"), y = ne(), u = de(y), a = Se();
975
+ te();
976
+ const t = Q("webx-blog"), s = ge(), i = v(() => m.disabled || a?.disabled.value === !0), x = z(/* @__PURE__ */ new Map()), T = z([]), c = z(""), o = z(!1);
977
+ let _;
978
+ ue(
979
+ () => a?.article.value?.tags,
1039
980
  (A) => {
1040
- const N = new Map($.value);
1041
- for (const H of A ?? []) N.set(H.id, H.title);
1042
- $.value = N;
981
+ const I = new Map(x.value);
982
+ for (const K of A ?? []) I.set(K.id, K.title);
983
+ x.value = I;
1043
984
  },
1044
985
  { immediate: !0, deep: !0 }
1045
986
  );
1046
- const S = b(
1047
- () => u.value.map((A) => ({ id: A, title: $.value.get(A) ?? `#${A}` }))
1048
- ), C = b(
1049
- () => T.value.filter((A) => !u.value.includes(A.id)).map((A) => ({
987
+ const W = v(
988
+ () => r.value.map((A) => ({ id: A, title: x.value.get(A) ?? `#${A}` }))
989
+ ), S = v(
990
+ () => T.value.filter((A) => !r.value.includes(A.id)).map((A) => ({
1050
991
  // The count is part of the label rather than a column: a select draws a line of text, and
1051
992
  // the number is what the reader is choosing between two near-identical words on.
1052
993
  label: t("article.tag-option", { title: A.title, count: A.articles_count }),
1053
994
  value: A.id
1054
995
  }))
1055
- ), M = b(() => {
1056
- const A = h.value.trim();
996
+ ), E = v(() => {
997
+ const A = c.value.trim();
1057
998
  if (A === "") return null;
1058
- const N = (H) => H.toLowerCase() === A.toLowerCase();
1059
- return T.value.some((H) => N(H.title)) ? null : A;
999
+ const I = (K) => K.toLowerCase() === A.toLowerCase();
1000
+ return T.value.some((K) => I(K.title)) ? null : A;
1060
1001
  });
1061
- async function P() {
1002
+ async function F() {
1062
1003
  try {
1063
- T.value = await c.tags(h.value);
1064
- const A = new Map($.value);
1065
- for (const N of T.value) A.set(N.id, N.title);
1066
- $.value = A;
1004
+ T.value = await u.tags(c.value);
1005
+ const A = new Map(x.value);
1006
+ for (const I of T.value) A.set(I.id, I.title);
1007
+ x.value = A;
1067
1008
  } catch (A) {
1068
- L.danger(r(A));
1009
+ L.danger(s(A));
1069
1010
  }
1070
1011
  }
1012
+ function $(A) {
1013
+ c.value = A, clearTimeout(_), _ = setTimeout(() => {
1014
+ F();
1015
+ }, sa);
1016
+ }
1071
1017
  function U(A) {
1072
- h.value = A, clearTimeout(k), k = setTimeout(() => {
1073
- P();
1074
- }, ca);
1018
+ typeof A != "number" || r.value.includes(A) || (r.value = [...r.value, A], c.value = "");
1075
1019
  }
1076
1020
  function R(A) {
1077
- typeof A != "number" || u.value.includes(A) || (u.value = [...u.value, A], h.value = "");
1078
- }
1079
- function W(A) {
1080
- u.value = u.value.filter((N) => N !== A);
1021
+ r.value = r.value.filter((I) => I !== A);
1081
1022
  }
1082
- async function O() {
1083
- const A = M.value;
1084
- if (!(A === null || d.value)) {
1085
- d.value = !0;
1023
+ async function M() {
1024
+ const A = E.value;
1025
+ if (!(A === null || o.value)) {
1026
+ o.value = !0;
1086
1027
  try {
1087
- const N = await c.createTag({ title: A });
1088
- $.value = new Map($.value).set(N.id, N.title), T.value = [N, ...T.value], R(N.id);
1089
- } catch (N) {
1090
- L.danger(r(N));
1028
+ const I = await u.createTag({ title: A });
1029
+ x.value = new Map(x.value).set(I.id, I.title), T.value = [I, ...T.value], U(I.id);
1030
+ } catch (I) {
1031
+ L.danger(s(I));
1091
1032
  } finally {
1092
- d.value = !1;
1033
+ o.value = !1;
1093
1034
  }
1094
1035
  }
1095
1036
  }
1096
- return oe(
1097
- () => l?.article.value?.id,
1037
+ return ue(
1038
+ () => a?.article.value?.id,
1098
1039
  () => {
1099
- P();
1040
+ F();
1100
1041
  },
1101
1042
  { immediate: !0 }
1102
- ), Fe(() => clearTimeout(k)), (A, N) => (p(), K("div", oa, [
1103
- S.value.length > 0 ? (p(), K("div", ua, [
1104
- (p(!0), K(ne, null, ze(S.value, (H) => (p(), V(e(re), {
1105
- key: H.id,
1043
+ ), Je(() => clearTimeout(_)), (A, I) => (p(), Z("div", la, [
1044
+ W.value.length > 0 ? (p(), Z("div", ia, [
1045
+ (p(!0), Z(be, null, Be(W.value, (K) => (p(), C(e(oe), {
1046
+ key: K.id,
1106
1047
  type: "default",
1107
1048
  class: "wx-article-tags__chip"
1108
1049
  }, {
1109
- default: a(() => [
1110
- g(f(H.title) + " ", 1),
1111
- n(e(Re), {
1050
+ default: l(() => [
1051
+ w(b(K.title) + " ", 1),
1052
+ n(e(Oe), {
1112
1053
  icon: "close",
1113
1054
  tone: "neutral",
1114
1055
  size: "sm",
1115
1056
  disabled: i.value,
1116
1057
  title: e(t)("article.tag-remove"),
1117
- onClick: (D) => W(H.id)
1058
+ onClick: (P) => R(K.id)
1118
1059
  }, null, 8, ["disabled", "title", "onClick"])
1119
1060
  ]),
1120
1061
  _: 2
1121
1062
  }, 1024))), 128))
1122
- ])) : (p(), V(e(G), {
1063
+ ])) : (p(), C(e(G), {
1123
1064
  key: 1,
1124
1065
  size: "sm",
1125
1066
  tone: "muted"
1126
1067
  }, {
1127
- default: a(() => [
1128
- g(f(e(t)("article.tags-empty")), 1)
1068
+ default: l(() => [
1069
+ w(b(e(t)("article.tags-empty")), 1)
1129
1070
  ]),
1130
1071
  _: 1
1131
1072
  })),
1132
- q("div", da, [
1133
- n(e(be), {
1073
+ j("div", na, [
1074
+ n(e(_e), {
1134
1075
  "model-value": null,
1135
- options: C.value,
1076
+ options: S.value,
1136
1077
  placeholder: e(t)("article.tag-add"),
1137
1078
  "empty-text": e(t)("article.tag-nothing"),
1138
1079
  disabled: i.value,
1139
1080
  filterable: "",
1140
1081
  teleport: "",
1141
1082
  "aria-label": e(t)("article.tag-add"),
1142
- onSearch: U,
1143
- "onUpdate:modelValue": R
1083
+ onSearch: $,
1084
+ "onUpdate:modelValue": U
1144
1085
  }, null, 8, ["options", "placeholder", "empty-text", "disabled", "aria-label"]),
1145
- M.value ? (p(), V(e(F), {
1086
+ E.value ? (p(), C(e(J), {
1146
1087
  key: 0,
1147
1088
  variant: "outline",
1148
1089
  icon: "plus",
1149
- loading: d.value,
1090
+ loading: o.value,
1150
1091
  disabled: i.value,
1151
- onClick: O
1092
+ onClick: M
1152
1093
  }, {
1153
- default: a(() => [
1154
- g(f(e(t)("article.tag-create", { title: M.value })), 1)
1094
+ default: l(() => [
1095
+ w(b(e(t)("article.tag-create", { title: E.value })), 1)
1155
1096
  ]),
1156
1097
  _: 1
1157
- }, 8, ["loading", "disabled"])) : I("", !0)
1098
+ }, 8, ["loading", "disabled"])) : H("", !0)
1158
1099
  ])
1159
1100
  ]));
1160
1101
  }
1161
- }), pa = /* @__PURE__ */ ce(va, [["__scopeId", "data-v-ce095e37"]]), ma = /* @__PURE__ */ ee({
1102
+ }), oa = /* @__PURE__ */ ve(ra, [["__scopeId", "data-v-ce095e37"]]), ua = /* @__PURE__ */ ee({
1162
1103
  __name: "ArticleCreateDialog",
1163
- setup(y) {
1164
- const { open: _, resolve: u, dismiss: x } = Ze(), c = se(), l = ue(c);
1165
- ae();
1166
- const t = te("webx-blog"), r = z(""), i = z(!1), $ = z({}), T = We("field");
1167
- Le(async () => {
1168
- await Ke(), T.value?.querySelector("input")?.focus();
1104
+ setup(f) {
1105
+ const { open: m, resolve: r, dismiss: y } = Ee(), u = ne(), a = de(u);
1106
+ te();
1107
+ const t = Q("webx-blog"), s = z(""), i = z(!1), x = z({}), T = De("field");
1108
+ Ne(async () => {
1109
+ await Ze(), T.value?.querySelector("input")?.focus();
1169
1110
  });
1170
- async function h() {
1171
- if (!(r.value.trim() === "" || i.value)) {
1172
- i.value = !0, $.value = {};
1111
+ async function c() {
1112
+ if (!(s.value.trim() === "" || i.value)) {
1113
+ i.value = !0, x.value = {};
1173
1114
  try {
1174
- u(await l.create({ title: r.value.trim() }));
1175
- } catch (d) {
1176
- $.value = d.body?.errors ?? {};
1115
+ r(await a.create({ title: s.value.trim() }));
1116
+ } catch (o) {
1117
+ x.value = o.body?.errors ?? {};
1177
1118
  } finally {
1178
1119
  i.value = !1;
1179
1120
  }
1180
1121
  }
1181
1122
  }
1182
- return (d, k) => (p(), V(e(Qe), {
1183
- open: e(_),
1184
- "onUpdate:open": k[2] || (k[2] = (S) => He(_) ? _.value = S : null),
1123
+ return (o, _) => (p(), C(e(Fe), {
1124
+ open: e(m),
1125
+ "onUpdate:open": _[2] || (_[2] = (W) => Ie(m) ? m.value = W : null),
1185
1126
  title: e(t)("panel.new-title"),
1186
1127
  width: 440
1187
1128
  }, {
1188
- footer: a(() => [
1189
- n(e(Xe), { size: "sm" }, {
1190
- default: a(() => [
1191
- n(e(F), {
1129
+ footer: l(() => [
1130
+ n(e(Le), { size: "sm" }, {
1131
+ default: l(() => [
1132
+ n(e(J), {
1192
1133
  variant: "outline",
1193
- onClick: k[1] || (k[1] = (S) => e(x)())
1134
+ onClick: _[1] || (_[1] = (W) => e(y)())
1194
1135
  }, {
1195
- default: a(() => [
1196
- g(f(e(t)("panel.cancel")), 1)
1136
+ default: l(() => [
1137
+ w(b(e(t)("panel.cancel")), 1)
1197
1138
  ]),
1198
1139
  _: 1
1199
1140
  }),
1200
- n(e(F), {
1141
+ n(e(J), {
1201
1142
  type: "primary",
1202
1143
  loading: i.value,
1203
- disabled: r.value.trim() === "",
1204
- onClick: h
1144
+ disabled: s.value.trim() === "",
1145
+ onClick: c
1205
1146
  }, {
1206
- default: a(() => [
1207
- g(f(e(t)("panel.create")), 1)
1147
+ default: l(() => [
1148
+ w(b(e(t)("panel.create")), 1)
1208
1149
  ]),
1209
1150
  _: 1
1210
1151
  }, 8, ["loading", "disabled"])
@@ -1212,22 +1153,22 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1212
1153
  _: 1
1213
1154
  })
1214
1155
  ]),
1215
- default: a(() => [
1216
- n(e(ge), {
1156
+ default: l(() => [
1157
+ n(e(ie), {
1217
1158
  label: e(t)("panel.field-title"),
1218
- error: $.value.title?.[0] ?? $.value.slug?.[0],
1159
+ error: x.value.title?.[0] ?? x.value.slug?.[0],
1219
1160
  required: ""
1220
1161
  }, {
1221
- default: a(() => [
1222
- q("div", {
1162
+ default: l(() => [
1163
+ j("div", {
1223
1164
  ref_key: "field",
1224
1165
  ref: T
1225
1166
  }, [
1226
- n(e($e), {
1227
- modelValue: r.value,
1228
- "onUpdate:modelValue": k[0] || (k[0] = (S) => r.value = S),
1167
+ n(e(Ae), {
1168
+ modelValue: s.value,
1169
+ "onUpdate:modelValue": _[0] || (_[0] = (W) => s.value = W),
1229
1170
  "aria-label": e(t)("panel.field-title"),
1230
- onKeyup: Ce(h, ["enter"])
1171
+ onKeyup: ze(c, ["enter"])
1231
1172
  }, null, 8, ["modelValue", "aria-label"])
1232
1173
  ], 512)
1233
1174
  ]),
@@ -1237,485 +1178,529 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1237
1178
  _: 1
1238
1179
  }, 8, ["open", "title"]));
1239
1180
  }
1240
- }), fa = { class: "wx-articles__filters" }, ga = ["src"], ba = { class: "wx-articles__name" }, ha = { class: "wx-articles__name-text" }, ya = { class: "wx-articles__title" }, _a = { class: "wx-articles__address" }, wa = { class: "wx-articles__chips" }, xa = { class: "wx-articles__state" }, ka = { class: "wx-articles__card" }, $a = ["src"], Ta = { class: "wx-articles__card-body" }, Va = { class: "wx-articles__card-title" }, Aa = { class: "wx-articles__card-meta" }, nt = 640, Ca = /* @__PURE__ */ ee({
1181
+ }), da = ["src"], ca = { class: "wx-articles__name" }, va = { class: "wx-articles__name-text" }, pa = { class: "wx-articles__title" }, fa = { class: "wx-articles__address" }, ma = { class: "wx-articles__chips" }, ba = { class: "wx-articles__state" }, nt = 640, ga = /* @__PURE__ */ ee({
1241
1182
  __name: "ArticlesPage",
1242
1183
  props: {
1243
1184
  base: { default: "/blog" }
1244
1185
  },
1245
- setup(y) {
1246
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me();
1247
- ae();
1248
- const t = te("webx-blog"), r = me(), i = We("root"), $ = rt(i), T = z(null), h = z(!0), d = Ee(ma), k = b(() => u.can("blog.articles.manage")), S = b(
1249
- () => u.state.manifest?.modules.find((v) => v.id === "articles")?.title ?? t("module.articles")
1250
- ), C = b({
1251
- get: () => typeof c.query.view == "string" ? c.query.view : "",
1252
- set: (v) => {
1253
- l.replace({
1254
- query: { ...c.query, view: v === "" ? void 0 : String(v), page: void 0 }
1186
+ setup(f) {
1187
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke();
1188
+ te();
1189
+ const t = Q("webx-blog"), s = Q("webx-admin"), i = ge(), x = De("root"), T = xt(x), c = z(null), o = z(!0), _ = Ce(ua), W = v(() => r.can("blog.articles.manage")), S = v(
1190
+ () => r.state.manifest?.modules.find((d) => d.id === "articles")?.title ?? t("module.articles")
1191
+ ), E = v({
1192
+ get: () => typeof u.query.view == "string" ? u.query.view : "",
1193
+ set: (d) => {
1194
+ a.replace({
1195
+ query: { ...u.query, view: d === "" ? void 0 : String(d), page: void 0 }
1255
1196
  });
1256
1197
  }
1257
- }), M = b(() => C.value === "trashed"), P = b(() => ({
1258
- q: typeof c.query.q == "string" ? c.query.q : "",
1259
- rubric: U(c.query.rubric),
1260
- tag: U(c.query.tag),
1261
- author: U(c.query.author),
1262
- sort: typeof c.query.sort == "string" ? c.query.sort : null,
1263
- page: Number(c.query.page ?? 1) || 1
1198
+ }), F = v(() => E.value === "trashed"), $ = v(() => ({
1199
+ q: typeof u.query.q == "string" ? u.query.q : "",
1200
+ rubric: U(u.query.rubric),
1201
+ tag: U(u.query.tag),
1202
+ author: U(u.query.author),
1203
+ sort: typeof u.query.sort == "string" ? u.query.sort : null,
1204
+ page: Number(u.query.page ?? 1) || 1
1264
1205
  }));
1265
- function U(v) {
1266
- return typeof v == "string" && v !== "" && Number(v) || null;
1206
+ function U(d) {
1207
+ return typeof d == "string" && d !== "" && Number(d) || null;
1267
1208
  }
1268
- const R = b(() => [
1209
+ const R = v(() => [
1269
1210
  { value: "", label: t("panel.view-all") },
1270
1211
  { value: "published", label: t("panel.view-published") },
1271
1212
  { value: "scheduled", label: t("panel.view-scheduled") },
1272
1213
  { value: "draft", label: t("panel.view-draft") },
1273
1214
  { value: "unpublished", label: t("panel.view-unpublished") },
1274
1215
  { value: "trashed", label: t("panel.bin"), icon: "trash" }
1275
- ]), W = b(() => T.value?.filters ?? { rubrics: [], tags: [], authors: [] }), O = b(() => $.value > 0 && $.value < nt), A = b(() => O.value ? [{ key: "card", label: "" }] : [
1216
+ ]), M = v(() => c.value?.filters ?? { rubrics: [], tags: [], authors: [] }), A = v(() => T.value > 0 && T.value < nt), I = v(() => A.value ? [{ key: "card", label: "" }] : [
1276
1217
  { key: "cover", label: "", width: 68 },
1218
+ /* The one that takes what the others leave, and the only one without a number. */
1277
1219
  { key: "title", label: t("panel.column-title"), minWidth: 220 },
1278
- { key: "rubrics", label: t("panel.column-rubrics"), width: 190, hideBelow: 840 },
1279
- { key: "author", label: t("panel.column-author"), width: 160, hideBelow: 1e3 },
1220
+ { key: "rubrics", label: t("panel.column-rubrics"), width: 190, hideBelow: 1e3 },
1221
+ { key: "author", label: t("panel.column-author"), width: 160, hideBelow: 1200 },
1280
1222
  {
1281
1223
  key: "date",
1282
- label: M.value ? t("panel.column-deleted") : t("panel.column-date"),
1283
- width: 130,
1224
+ label: F.value ? t("panel.column-deleted") : t("panel.column-date"),
1225
+ width: 120,
1284
1226
  hideBelow: 700,
1285
1227
  // "today at 16:22" is three words the table will break over two lines given half a
1286
1228
  // chance, and a date read down a column has to be one line to be read at all.
1287
1229
  cellClass: "wx-articles__when"
1288
1230
  },
1289
- { key: "status", label: t("panel.column-status"), width: 150 },
1290
- { key: "actions", label: "", width: 56, align: "right" }
1291
- ]), N = b(() => P.value.q !== "" ? t("panel.empty-search") : M.value ? t("panel.empty-bin") : t("panel.empty"));
1292
- async function H(v) {
1293
- h.value = !0;
1231
+ { key: "status", label: t("panel.column-status"), width: 170 },
1232
+ { key: "actions", label: "", width: st, align: "right" }
1233
+ ]), K = v(() => $.value.q !== "" ? t("panel.empty-search") : F.value ? t("panel.empty-bin") : t("panel.empty")), P = v(() => {
1234
+ const d = [], D = M.value.rubrics.find((V) => V.id === $.value.rubric);
1235
+ D && d.push({
1236
+ key: "rubric",
1237
+ label: `${t("panel.filter-rubric")}: ${D.title}`,
1238
+ clear: () => O("rubric", void 0)
1239
+ });
1240
+ const h = M.value.tags.find((V) => V.id === $.value.tag);
1241
+ h && d.push({
1242
+ key: "tag",
1243
+ label: `${t("panel.filter-tag")}: ${h.title}`,
1244
+ clear: () => O("tag", void 0)
1245
+ });
1246
+ const $e = M.value.authors.find((V) => V.id === $.value.author);
1247
+ return $e && d.push({
1248
+ key: "author",
1249
+ label: `${t("panel.filter-author")}: ${$e.title}`,
1250
+ clear: () => O("author", void 0)
1251
+ }), d;
1252
+ });
1253
+ function q() {
1254
+ a.replace({
1255
+ query: {
1256
+ ...u.query,
1257
+ rubric: void 0,
1258
+ tag: void 0,
1259
+ author: void 0,
1260
+ page: void 0
1261
+ }
1262
+ });
1263
+ }
1264
+ async function k(d) {
1265
+ o.value = !0;
1294
1266
  try {
1295
- T.value = await x.articles({
1296
- q: v?.search ?? P.value.q,
1297
- status: M.value ? "" : C.value,
1298
- trashed: M.value,
1299
- rubric: P.value.rubric,
1300
- tag: P.value.tag,
1301
- author: P.value.author,
1302
- sort: v?.sort ? `${v.sort.order === "desc" ? "-" : ""}${v.sort.key}` : null,
1303
- page: v?.page ?? P.value.page,
1304
- per_page: v?.perPage
1267
+ c.value = await y.articles({
1268
+ q: d?.search ?? $.value.q,
1269
+ status: F.value ? "" : E.value,
1270
+ trashed: F.value,
1271
+ rubric: $.value.rubric,
1272
+ tag: $.value.tag,
1273
+ author: $.value.author,
1274
+ sort: d?.sort ? `${d.sort.order === "desc" ? "-" : ""}${d.sort.key}` : null,
1275
+ page: d?.page ?? $.value.page,
1276
+ per_page: d?.perPage
1305
1277
  });
1306
- } catch (o) {
1307
- L.danger(r(o));
1278
+ } catch (D) {
1279
+ L.danger(i(D));
1308
1280
  } finally {
1309
- h.value = !1;
1281
+ o.value = !1;
1310
1282
  }
1311
1283
  }
1312
- function D(v) {
1313
- const o = {
1314
- ...c.query,
1315
- q: v.search === "" ? void 0 : v.search,
1316
- sort: v.sort === null ? void 0 : `${v.sort.order === "desc" ? "-" : ""}${v.sort.key}`,
1317
- page: v.page === 1 ? void 0 : String(v.page)
1284
+ function le(d) {
1285
+ const D = {
1286
+ ...u.query,
1287
+ q: d.search === "" ? void 0 : d.search,
1288
+ sort: d.sort === null ? void 0 : `${d.sort.order === "desc" ? "-" : ""}${d.sort.key}`,
1289
+ page: d.page === 1 ? void 0 : String(d.page)
1318
1290
  };
1319
- l.replace({ query: o }), H(v);
1291
+ a.replace({ query: D }), k(d);
1320
1292
  }
1321
- function m(v, o) {
1322
- l.replace({
1293
+ function O(d, D) {
1294
+ a.replace({
1323
1295
  query: {
1324
- ...c.query,
1325
- [v]: typeof o == "number" ? String(o) : void 0,
1296
+ ...u.query,
1297
+ [d]: typeof D == "number" ? String(D) : void 0,
1326
1298
  page: void 0
1327
1299
  }
1328
1300
  });
1329
1301
  }
1330
- oe(
1331
- () => [C.value, P.value.rubric, P.value.tag, P.value.author],
1302
+ ue(
1303
+ () => [E.value, $.value.rubric, $.value.tag, $.value.author],
1332
1304
  () => {
1333
- H();
1305
+ k();
1334
1306
  }
1335
- ), H();
1336
- function E(v) {
1337
- const o = `${_.base}/articles/${v.id}`;
1338
- l.resolve(o).matched.length > 0 && l.push({ path: o, query: { ...c.query } });
1339
- }
1340
- async function j() {
1341
- const v = await d({});
1342
- v && (await H(), E(v));
1343
- }
1344
- function de(v) {
1345
- if (!k.value) return [];
1346
- if (M.value)
1307
+ ), k();
1308
+ function se(d) {
1309
+ const D = `${m.base}/articles/${d.id}`;
1310
+ a.resolve(D).matched.length > 0 && a.push({ path: D, query: { ...u.query } });
1311
+ }
1312
+ async function xe() {
1313
+ const d = await _({});
1314
+ d && (await k(), se(d));
1315
+ }
1316
+ function ce(d) {
1317
+ if (!W.value) return [];
1318
+ if (F.value)
1347
1319
  return [
1348
1320
  {
1349
1321
  key: "restore",
1350
1322
  icon: "refresh",
1351
1323
  label: t("panel.restore"),
1352
1324
  run: () => {
1353
- he(v);
1325
+ re(d);
1354
1326
  }
1355
1327
  }
1356
1328
  ];
1357
- const o = [
1358
- { key: "open", icon: "edit", label: t("panel.open"), run: () => E(v) }
1329
+ const D = [
1330
+ { key: "open", icon: "edit", label: t("panel.open"), run: () => se(d) }
1359
1331
  ];
1360
- return v.url && v.status !== "draft" && o.push({
1332
+ return d.url && d.status !== "draft" && D.push({
1361
1333
  key: "site",
1362
1334
  icon: "external-link",
1363
1335
  label: t("panel.open-on-site"),
1364
- href: v.url
1365
- }), v.path !== null && o.push({
1336
+ href: d.url
1337
+ }), d.path !== null && D.push({
1366
1338
  key: "copy",
1367
1339
  icon: "copy",
1368
1340
  label: t("panel.copy-address"),
1369
1341
  run: () => {
1370
- fe(v);
1342
+ g(d);
1371
1343
  }
1372
- }), o.push({
1344
+ }), D.push({
1373
1345
  key: "pin",
1374
1346
  icon: "star",
1375
- label: v.pinned ? t("panel.unpin") : t("panel.pin"),
1347
+ label: d.pinned ? t("panel.unpin") : t("panel.pin"),
1376
1348
  run: () => {
1377
- J(v, !v.pinned);
1349
+ ke(d, !d.pinned);
1378
1350
  }
1379
- }), o.push(
1380
- v.status === "published" || v.status === "modified" || v.status === "scheduled" ? {
1351
+ }), D.push(
1352
+ d.status === "published" || d.status === "modified" || d.status === "scheduled" ? {
1381
1353
  key: "unpublish",
1382
1354
  icon: "eye-off",
1383
1355
  label: t("panel.unpublish"),
1384
1356
  run: () => {
1385
- ve(v);
1357
+ Te(d);
1386
1358
  }
1387
1359
  } : {
1388
1360
  key: "publish",
1389
1361
  icon: "upload",
1390
1362
  label: t("panel.publish"),
1391
1363
  run: () => {
1392
- Ve(v);
1364
+ he(d);
1393
1365
  }
1394
1366
  }
1395
- ), o.push({
1367
+ ), D.push({
1396
1368
  key: "delete",
1397
1369
  icon: "trash",
1398
1370
  label: t("panel.delete"),
1399
1371
  danger: !0,
1400
1372
  run: () => {
1401
- we(v);
1373
+ pe(d);
1402
1374
  }
1403
- }), o;
1375
+ }), D;
1404
1376
  }
1405
- async function Ve(v) {
1406
- await Q(() => x.publish(v.id), t("panel.published"));
1377
+ async function he(d) {
1378
+ await fe(() => y.publish(d.id), t("panel.published"));
1407
1379
  }
1408
- async function ve(v) {
1409
- await Q(() => x.unpublish(v.id), t("panel.unpublished-done"));
1380
+ async function Te(d) {
1381
+ await fe(() => y.unpublish(d.id), t("panel.unpublished-done"));
1410
1382
  }
1411
- async function J(v, o) {
1412
- await Q(
1413
- () => x.save(v.id, { values: { pinned: o }, revision: v.revision }),
1414
- t(o ? "panel.pinned-done" : "panel.unpinned")
1383
+ async function ke(d, D) {
1384
+ await fe(
1385
+ () => y.save(d.id, { values: { pinned: D }, revision: d.revision }),
1386
+ t(D ? "panel.pinned-done" : "panel.unpinned")
1415
1387
  );
1416
1388
  }
1417
- async function we(v) {
1418
- await pe({
1419
- title: t("panel.delete-title", { title: v.title }),
1389
+ async function pe(d) {
1390
+ await me({
1391
+ title: t("panel.delete-title", { title: d.title }),
1420
1392
  message: t("panel.delete-text"),
1421
1393
  confirmText: t("panel.delete"),
1422
1394
  cancelText: t("panel.cancel"),
1423
1395
  tone: "danger"
1424
- }) && await Q(() => x.remove(v.id), t("panel.deleted"));
1396
+ }) && await fe(() => y.remove(d.id), t("panel.deleted"));
1425
1397
  }
1426
- async function he(v) {
1427
- await Q(() => x.restore(v.id), t("panel.restored"));
1398
+ async function re(d) {
1399
+ await fe(() => y.restore(d.id), t("panel.restored"));
1428
1400
  }
1429
- async function Q(v, o) {
1401
+ async function fe(d, D) {
1430
1402
  try {
1431
- await v(), L.success(o);
1432
- } catch (s) {
1433
- L.danger(r(s));
1403
+ await d(), L.success(D);
1404
+ } catch (h) {
1405
+ L.danger(i(h));
1434
1406
  } finally {
1435
- await H();
1407
+ await k();
1436
1408
  }
1437
1409
  }
1438
- async function fe(v) {
1439
- if (v.url)
1410
+ async function g(d) {
1411
+ if (d.url)
1440
1412
  try {
1441
- await navigator.clipboard.writeText(v.url), L.success(t("panel.address-copied"));
1413
+ await navigator.clipboard.writeText(d.url), L.success(t("panel.address-copied"));
1442
1414
  } catch {
1443
1415
  }
1444
1416
  }
1445
- function ye(v) {
1446
- return v === "published" || v === "modified" ? "success" : v === "scheduled" ? "warning" : "default";
1417
+ function N(d) {
1418
+ return d === "published" || d === "modified" ? "success" : d === "scheduled" ? "warning" : "default";
1447
1419
  }
1448
- function _e(v) {
1449
- return M.value ? "—" : v.path === null ? t("panel.no-address") : `/${v.path}`;
1420
+ function B(d) {
1421
+ return F.value ? "—" : d.path === null ? t("panel.no-address") : `/${d.path}`;
1450
1422
  }
1451
- function ie(v) {
1452
- return M.value ? v.deleted_at : v.published_at;
1423
+ function X(d) {
1424
+ return F.value ? d.deleted_at : d.published_at;
1453
1425
  }
1454
- return (v, o) => (p(), K("div", {
1426
+ const ye = v(
1427
+ () => W.value ? [{ key: "new", label: t("panel.new"), icon: "plus", primary: !0, run: () => {
1428
+ xe();
1429
+ } }] : []
1430
+ );
1431
+ return (d, D) => (p(), Z("div", {
1455
1432
  ref_key: "root",
1456
- ref: i,
1433
+ ref: x,
1457
1434
  class: "wx-articles"
1458
1435
  }, [
1459
- n(e(je), {
1460
- view: C.value,
1461
- "onUpdate:view": o[3] || (o[3] = (s) => C.value = s),
1436
+ n(e(Qe), {
1437
+ view: E.value,
1438
+ "onUpdate:view": D[3] || (D[3] = (h) => E.value = h),
1462
1439
  title: S.value,
1463
- views: R.value
1464
- }, st({
1465
- default: a(() => [
1466
- n(e(ut), {
1467
- data: T.value,
1468
- columns: A.value,
1440
+ views: R.value,
1441
+ actions: ye.value
1442
+ }, {
1443
+ default: l(() => [
1444
+ n(e(ot), {
1445
+ data: c.value,
1446
+ columns: I.value,
1469
1447
  "row-key": "id",
1470
1448
  searchable: "",
1471
- clickable: !M.value,
1472
- hover: !M.value,
1449
+ clickable: !F.value,
1450
+ hover: !F.value,
1473
1451
  flush: "",
1452
+ loading: o.value,
1474
1453
  layout: "fixed",
1475
- loading: h.value,
1476
1454
  "cards-below": nt,
1455
+ "filters-count": P.value.length,
1456
+ "filters-label": e(s)("filters.title"),
1477
1457
  "search-placeholder": e(t)("panel.search"),
1478
- "empty-text": N.value,
1458
+ "empty-text": K.value,
1479
1459
  "aria-label": S.value,
1480
- onRowClick: E,
1481
- onStateChange: D
1460
+ onRowClick: se,
1461
+ onStateChange: le
1482
1462
  }, {
1483
- actions: a(() => [
1484
- q("div", fa, [
1485
- n(e(be), {
1486
- "model-value": P.value.rubric,
1487
- options: W.value.rubrics.map((s) => ({ value: s.id, label: s.title })),
1488
- placeholder: e(t)("panel.any-rubric"),
1489
- clearable: "",
1490
- size: "sm",
1491
- "onUpdate:modelValue": o[0] || (o[0] = (s) => m("rubric", s))
1492
- }, null, 8, ["model-value", "options", "placeholder"]),
1493
- n(e(be), {
1494
- "model-value": P.value.tag,
1495
- options: W.value.tags.map((s) => ({ value: s.id, label: s.title })),
1496
- placeholder: e(t)("panel.any-tag"),
1497
- clearable: "",
1498
- filterable: "",
1499
- size: "sm",
1500
- "onUpdate:modelValue": o[1] || (o[1] = (s) => m("tag", s))
1501
- }, null, 8, ["model-value", "options", "placeholder"]),
1502
- n(e(be), {
1503
- "model-value": P.value.author,
1504
- options: W.value.authors.map((s) => ({ value: s.id, label: s.title })),
1505
- placeholder: e(t)("panel.any-author"),
1506
- clearable: "",
1507
- size: "sm",
1508
- "onUpdate:modelValue": o[2] || (o[2] = (s) => m("author", s))
1509
- }, null, 8, ["model-value", "options", "placeholder"])
1510
- ])
1463
+ filters: l(() => [
1464
+ n(e(ie), {
1465
+ label: e(t)("panel.filter-rubric")
1466
+ }, {
1467
+ default: l(() => [
1468
+ n(e(_e), {
1469
+ "model-value": $.value.rubric,
1470
+ options: M.value.rubrics.map((h) => ({ value: h.id, label: h.title })),
1471
+ placeholder: e(t)("panel.any-rubric"),
1472
+ clearable: "",
1473
+ size: "sm",
1474
+ "onUpdate:modelValue": D[0] || (D[0] = (h) => O("rubric", h))
1475
+ }, null, 8, ["model-value", "options", "placeholder"])
1476
+ ]),
1477
+ _: 1
1478
+ }, 8, ["label"]),
1479
+ n(e(ie), {
1480
+ label: e(t)("panel.filter-tag")
1481
+ }, {
1482
+ default: l(() => [
1483
+ n(e(_e), {
1484
+ "model-value": $.value.tag,
1485
+ options: M.value.tags.map((h) => ({ value: h.id, label: h.title })),
1486
+ placeholder: e(t)("panel.any-tag"),
1487
+ clearable: "",
1488
+ filterable: "",
1489
+ size: "sm",
1490
+ "onUpdate:modelValue": D[1] || (D[1] = (h) => O("tag", h))
1491
+ }, null, 8, ["model-value", "options", "placeholder"])
1492
+ ]),
1493
+ _: 1
1494
+ }, 8, ["label"]),
1495
+ n(e(ie), {
1496
+ label: e(t)("panel.filter-author")
1497
+ }, {
1498
+ default: l(() => [
1499
+ n(e(_e), {
1500
+ "model-value": $.value.author,
1501
+ options: M.value.authors.map((h) => ({ value: h.id, label: h.title })),
1502
+ placeholder: e(t)("panel.any-author"),
1503
+ clearable: "",
1504
+ size: "sm",
1505
+ "onUpdate:modelValue": D[2] || (D[2] = (h) => O("author", h))
1506
+ }, null, 8, ["model-value", "options", "placeholder"])
1507
+ ]),
1508
+ _: 1
1509
+ }, 8, ["label"]),
1510
+ P.value.length > 0 ? (p(), C(e(J), {
1511
+ key: 0,
1512
+ variant: "text",
1513
+ size: "sm",
1514
+ block: "",
1515
+ onClick: q
1516
+ }, {
1517
+ icon: l(() => [
1518
+ n(e(we), { name: "close" })
1519
+ ]),
1520
+ default: l(() => [
1521
+ w(" " + b(e(s)("filters.reset")), 1)
1522
+ ]),
1523
+ _: 1
1524
+ })) : H("", !0)
1511
1525
  ]),
1512
- "cell-cover": a(({ row: s }) => [
1513
- q("span", {
1514
- class: Ae(["wx-articles__cover", { "is-empty": !s.cover }])
1526
+ applied: l(() => [
1527
+ n(e(yt), { filters: P.value }, null, 8, ["filters"])
1528
+ ]),
1529
+ "cell-cover": l(({ row: h }) => [
1530
+ j("span", {
1531
+ class: Pe(["wx-articles__cover", { "is-empty": !h.cover }])
1515
1532
  }, [
1516
- s.cover?.thumb ? (p(), K("img", {
1533
+ h.cover?.thumb ? (p(), Z("img", {
1517
1534
  key: 0,
1518
- src: s.cover.thumb,
1535
+ src: h.cover.thumb,
1519
1536
  alt: "",
1520
1537
  loading: "lazy"
1521
- }, null, 8, ga)) : (p(), V(e(Y), {
1538
+ }, null, 8, da)) : (p(), C(e(we), {
1522
1539
  key: 1,
1523
1540
  name: "image",
1524
1541
  size: "sm"
1525
1542
  }))
1526
1543
  ], 2)
1527
1544
  ]),
1528
- "cell-title": a(({ row: s }) => [
1529
- q("div", ba, [
1530
- s.pinned ? (p(), V(e(Ye), {
1545
+ "cell-title": l(({ row: h }) => [
1546
+ j("div", ca, [
1547
+ h.pinned ? (p(), C(e(et), {
1531
1548
  key: 0,
1532
1549
  content: e(t)("panel.pinned")
1533
1550
  }, {
1534
- default: a(() => [
1535
- n(e(Y), {
1551
+ default: l(() => [
1552
+ n(e(we), {
1536
1553
  class: "wx-articles__pin",
1537
1554
  name: "star",
1538
1555
  size: "sm"
1539
1556
  })
1540
1557
  ]),
1541
1558
  _: 1
1542
- }, 8, ["content"])) : I("", !0),
1543
- q("div", ha, [
1544
- q("span", ya, f(s.title), 1),
1545
- q("span", _a, f(_e(s)), 1)
1559
+ }, 8, ["content"])) : H("", !0),
1560
+ j("div", va, [
1561
+ j("span", pa, b(h.title), 1),
1562
+ j("span", fa, b(B(h)), 1)
1546
1563
  ])
1547
1564
  ])
1548
1565
  ]),
1549
- "cell-rubrics": a(({ row: s }) => [
1550
- q("span", wa, [
1551
- (p(!0), K(ne, null, ze(s.rubrics, (w) => (p(), V(e(re), {
1552
- key: w.id,
1566
+ "cell-rubrics": l(({ row: h }) => [
1567
+ j("span", ma, [
1568
+ (p(!0), Z(be, null, Be(h.rubrics, ($e) => (p(), C(e(oe), {
1569
+ key: $e.id,
1553
1570
  size: "sm",
1554
1571
  round: ""
1555
1572
  }, {
1556
- default: a(() => [
1557
- g(f(w.title), 1)
1573
+ default: l(() => [
1574
+ w(b($e.title), 1)
1558
1575
  ]),
1559
1576
  _: 2
1560
1577
  }, 1024))), 128))
1561
1578
  ])
1562
1579
  ]),
1563
- "cell-author": a(({ row: s }) => [
1580
+ "cell-author": l(({ row: h }) => [
1564
1581
  n(e(G), {
1565
1582
  size: "sm",
1566
1583
  tone: "muted",
1567
1584
  truncate: ""
1568
1585
  }, {
1569
- default: a(() => [
1570
- g(f(s.author ? s.author.name : "—"), 1)
1586
+ default: l(() => [
1587
+ w(b(h.author ? h.author.name : "—"), 1)
1571
1588
  ]),
1572
1589
  _: 2
1573
1590
  }, 1024)
1574
1591
  ]),
1575
- "cell-date": a(({ row: s }) => [
1576
- ie(s) ? (p(), V(e(De), {
1592
+ "cell-date": l(({ row: h }) => [
1593
+ X(h) ? (p(), C(e(je), {
1577
1594
  key: 0,
1578
- value: ie(s)
1579
- }, null, 8, ["value"])) : (p(), V(e(G), {
1595
+ value: X(h),
1596
+ compact: ""
1597
+ }, null, 8, ["value"])) : (p(), C(e(G), {
1580
1598
  key: 1,
1581
1599
  size: "sm",
1582
1600
  tone: "muted"
1583
1601
  }, {
1584
- default: a(() => [...o[4] || (o[4] = [
1585
- g("—", -1)
1602
+ default: l(() => [...D[4] || (D[4] = [
1603
+ w("—", -1)
1586
1604
  ])]),
1587
1605
  _: 1
1588
1606
  }))
1589
1607
  ]),
1590
- "cell-status": a(({ row: s }) => [
1591
- q("span", xa, [
1592
- n(e(re), {
1593
- type: ye(s.status),
1608
+ "cell-status": l(({ row: h }) => [
1609
+ j("span", ba, [
1610
+ n(e(oe), {
1611
+ type: N(h.status),
1594
1612
  dot: "",
1595
1613
  size: "sm"
1596
1614
  }, {
1597
- default: a(() => [
1598
- g(f(e(t)(`panel.status-${s.status}`)), 1)
1615
+ default: l(() => [
1616
+ w(b(e(t)(`panel.status-${h.status}`)), 1)
1599
1617
  ]),
1600
1618
  _: 2
1601
1619
  }, 1032, ["type"]),
1602
- s.status === "modified" ? (p(), V(e(re), {
1620
+ h.status === "modified" ? (p(), C(e(oe), {
1603
1621
  key: 0,
1604
1622
  type: "primary",
1605
1623
  size: "sm",
1606
1624
  round: ""
1607
1625
  }, {
1608
- default: a(() => [
1609
- g(f(e(t)("panel.edits")), 1)
1626
+ default: l(() => [
1627
+ w(b(e(t)("panel.edits")), 1)
1610
1628
  ]),
1611
1629
  _: 1
1612
- })) : I("", !0)
1630
+ })) : H("", !0)
1613
1631
  ])
1614
1632
  ]),
1615
- "cell-card": a(({ row: s }) => [
1616
- q("div", ka, [
1617
- q("span", {
1618
- class: Ae(["wx-articles__cover is-card", { "is-empty": !s.cover }])
1619
- }, [
1620
- s.cover?.thumb ? (p(), K("img", {
1633
+ "cell-card": l(({ row: h }) => [
1634
+ n(e(kt), {
1635
+ class: "wx-articles__entity",
1636
+ variant: "plain",
1637
+ title: h.title,
1638
+ image: h.cover?.thumb ?? void 0,
1639
+ "image-size": "56px",
1640
+ "title-lines": 2,
1641
+ subtitle: B(h)
1642
+ }, {
1643
+ title: l(() => [
1644
+ h.pinned ? (p(), C(e(we), {
1621
1645
  key: 0,
1622
- src: s.cover.thumb,
1623
- alt: "",
1624
- loading: "lazy"
1625
- }, null, 8, $a)) : (p(), V(e(Y), {
1626
- key: 1,
1627
- name: "image",
1646
+ class: "wx-articles__pin",
1647
+ name: "star",
1628
1648
  size: "sm"
1629
- }))
1630
- ], 2),
1631
- q("div", Ta, [
1632
- q("div", Va, [
1633
- s.pinned ? (p(), V(e(Y), {
1634
- key: 0,
1635
- class: "wx-articles__pin",
1636
- name: "star",
1637
- size: "sm"
1638
- })) : I("", !0),
1639
- q("span", null, f(s.title), 1)
1640
- ]),
1641
- q("div", Aa, [
1642
- s.rubrics[0] ? (p(), V(e(re), {
1643
- key: 0,
1644
- size: "sm",
1645
- round: ""
1646
- }, {
1647
- default: a(() => [
1648
- g(f(s.rubrics[0].title), 1)
1649
- ]),
1650
- _: 2
1651
- }, 1024)) : I("", !0),
1652
- n(e(re), {
1653
- type: ye(s.status),
1654
- dot: "",
1655
- size: "sm"
1656
- }, {
1657
- default: a(() => [
1658
- g(f(e(t)(`panel.status-${s.status}`)), 1)
1659
- ]),
1660
- _: 2
1661
- }, 1032, ["type"]),
1662
- ie(s) ? (p(), V(e(De), {
1663
- key: 1,
1664
- value: ie(s)
1665
- }, null, 8, ["value"])) : I("", !0),
1666
- s.author ? (p(), V(e(G), {
1667
- key: 2,
1668
- size: "sm",
1669
- tone: "muted",
1670
- truncate: ""
1671
- }, {
1672
- default: a(() => [
1673
- g(f(s.author.name), 1)
1674
- ]),
1675
- _: 2
1676
- }, 1024)) : I("", !0)
1677
- ])
1649
+ })) : H("", !0),
1650
+ w(" " + b(h.title), 1)
1678
1651
  ]),
1679
- n(e(Ie), {
1680
- actions: de(s),
1681
- label: s.title
1682
- }, null, 8, ["actions", "label"])
1683
- ])
1652
+ meta: l(() => [
1653
+ h.rubrics[0] ? (p(), C(e(oe), {
1654
+ key: 0,
1655
+ size: "sm",
1656
+ round: ""
1657
+ }, {
1658
+ default: l(() => [
1659
+ w(b(h.rubrics[0].title), 1)
1660
+ ]),
1661
+ _: 2
1662
+ }, 1024)) : H("", !0),
1663
+ n(e(oe), {
1664
+ type: N(h.status),
1665
+ dot: "",
1666
+ size: "sm"
1667
+ }, {
1668
+ default: l(() => [
1669
+ w(b(e(t)(`panel.status-${h.status}`)), 1)
1670
+ ]),
1671
+ _: 2
1672
+ }, 1032, ["type"]),
1673
+ X(h) ? (p(), C(e(je), {
1674
+ key: 1,
1675
+ value: X(h)
1676
+ }, null, 8, ["value"])) : H("", !0)
1677
+ ]),
1678
+ _: 2
1679
+ }, 1032, ["title", "image", "subtitle"])
1680
+ ]),
1681
+ "card-actions": l(({ row: h }) => [
1682
+ n(e(Re), {
1683
+ actions: ce(h),
1684
+ label: h.title
1685
+ }, null, 8, ["actions", "label"])
1684
1686
  ]),
1685
- "cell-actions": a(({ row: s }) => [
1686
- n(e(Ie), {
1687
- actions: de(s),
1688
- label: s.title
1687
+ "cell-actions": l(({ row: h }) => [
1688
+ n(e(Re), {
1689
+ actions: ce(h),
1690
+ label: h.title
1689
1691
  }, null, 8, ["actions", "label"])
1690
1692
  ]),
1691
1693
  _: 1
1692
- }, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text", "aria-label"])
1694
+ }, 8, ["data", "columns", "clickable", "hover", "loading", "filters-count", "filters-label", "search-placeholder", "empty-text", "aria-label"])
1693
1695
  ]),
1694
- _: 2
1695
- }, [
1696
- k.value ? {
1697
- name: "actions",
1698
- fn: a(() => [
1699
- n(e(F), {
1700
- type: "primary",
1701
- icon: "plus",
1702
- onClick: j
1703
- }, {
1704
- default: a(() => [
1705
- g(f(e(t)("panel.new")), 1)
1706
- ]),
1707
- _: 1
1708
- })
1709
- ]),
1710
- key: "0"
1711
- } : void 0
1712
- ]), 1032, ["view", "title", "views"])
1696
+ _: 1
1697
+ }, 8, ["view", "title", "views", "actions"])
1713
1698
  ], 512));
1714
1699
  }
1715
- }), Sa = /* @__PURE__ */ ce(Ca, [["__scopeId", "data-v-0bea5efe"]]), Wa = { class: "wx-rubric-form__head" }, za = { class: "wx-rubric-form__body" }, Ra = { class: "wx-rubric-form__row" }, Ua = { class: "wx-rubric-form__row" }, Ba = { class: "wx-rubric-form__side" }, Na = {
1700
+ }), ha = /* @__PURE__ */ ve(ga, [["__scopeId", "data-v-2d93df26"]]), ya = { class: "wx-rubric-form__head" }, wa = { class: "wx-rubric-form__body" }, _a = { class: "wx-rubric-form__row" }, xa = { class: "wx-rubric-form__row" }, ka = { class: "wx-rubric-form__side" }, $a = {
1716
1701
  key: 1,
1717
1702
  class: "wx-rubric-form__seo"
1718
- }, qa = { class: "wx-rubric-form__foot" }, Ma = /* @__PURE__ */ ee({
1703
+ }, Ta = { class: "wx-rubric-form__foot" }, Va = /* @__PURE__ */ ee({
1719
1704
  __name: "RubricForm",
1720
1705
  props: {
1721
1706
  rubric: {},
@@ -1724,13 +1709,13 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1724
1709
  disabled: { type: Boolean, default: !1 }
1725
1710
  },
1726
1711
  emits: ["back", "saved", "deleted", "articles"],
1727
- setup(y, { emit: _ }) {
1728
- const u = y, x = _, c = se(), l = ue(c), t = Ge();
1729
- ae();
1730
- const r = te("webx-blog"), i = me(), $ = b(() => c.types["wx-media"]?.component), T = b(() => c.types["wx-seo"]?.component), h = b(
1731
- () => c.types["wx-seo"]?.bind?.({ id: "seo", type: "wx-seo" }) ?? {}
1732
- ), d = z(M()), k = z({}), S = z(!1), C = z(!1);
1733
- function M() {
1712
+ setup(f, { emit: m }) {
1713
+ const r = f, y = m, u = ne(), a = de(u), t = Xe();
1714
+ te();
1715
+ const s = Q("webx-blog"), i = ge(), x = v(() => u.types["wx-media"]?.component), T = v(() => u.types["wx-seo"]?.component), c = v(
1716
+ () => u.types["wx-seo"]?.bind?.({ id: "seo", type: "wx-seo" }) ?? {}
1717
+ ), o = z(E()), _ = z({}), W = z(!1), S = z(!1);
1718
+ function E() {
1734
1719
  return {
1735
1720
  title: {},
1736
1721
  slug: {},
@@ -1740,221 +1725,221 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1740
1725
  seo: {}
1741
1726
  };
1742
1727
  }
1743
- oe(
1744
- () => u.rubric,
1745
- (D) => {
1746
- if (k.value = {}, C.value = !1, D === null) {
1747
- d.value = M();
1728
+ ue(
1729
+ () => r.rubric,
1730
+ (P) => {
1731
+ if (_.value = {}, S.value = !1, P === null) {
1732
+ o.value = E();
1748
1733
  return;
1749
1734
  }
1750
- d.value = {
1751
- title: { ...D.title },
1752
- slug: { ...D.slug },
1753
- lead: { ...D.lead },
1754
- cover: D.cover ? { path: D.cover.path, url: D.cover.url } : null,
1755
- is_visible: D.is_visible,
1756
- seo: { ...D.seo }
1757
- }, C.value = Object.keys(D.seo ?? {}).length > 0;
1735
+ o.value = {
1736
+ title: { ...P.title },
1737
+ slug: { ...P.slug },
1738
+ lead: { ...P.lead },
1739
+ cover: P.cover ? { path: P.cover.path, url: P.cover.url } : null,
1740
+ is_visible: P.is_visible,
1741
+ seo: { ...P.seo }
1742
+ }, S.value = Object.keys(P.seo ?? {}).length > 0;
1758
1743
  },
1759
1744
  { immediate: !0 }
1760
1745
  );
1761
- const P = b(
1762
- () => d.value.title[t.active.value] || u.rubric?.name || r("rubric.new")
1763
- ), U = b(() => {
1764
- const D = d.value.slug[t.active.value] ?? "";
1765
- return D === "" ? null : `/${[u.prefix, D].filter(Boolean).join("/")}`;
1766
- }), R = b(() => {
1767
- const D = u.rubric?.path;
1768
- return typeof D == "string" && U.value !== null && U.value !== `/${D}`;
1769
- }), W = b(() => u.rubric?.articles_count ?? 0);
1770
- function O(D) {
1771
- const m = Object.keys(k.value).find(
1772
- (E) => E === D || E.startsWith(`${D}.`)
1746
+ const F = v(
1747
+ () => o.value.title[t.active.value] || r.rubric?.name || s("rubric.new")
1748
+ ), $ = v(() => {
1749
+ const P = o.value.slug[t.active.value] ?? "";
1750
+ return P === "" ? null : `/${[r.prefix, P].filter(Boolean).join("/")}`;
1751
+ }), U = v(() => {
1752
+ const P = r.rubric?.path;
1753
+ return typeof P == "string" && $.value !== null && $.value !== `/${P}`;
1754
+ }), R = v(() => r.rubric?.articles_count ?? 0);
1755
+ function M(P) {
1756
+ const q = Object.keys(_.value).find(
1757
+ (k) => k === P || k.startsWith(`${P}.`)
1773
1758
  );
1774
- return m === void 0 ? void 0 : k.value[m]?.[0];
1759
+ return q === void 0 ? void 0 : _.value[q]?.[0];
1775
1760
  }
1776
1761
  function A() {
1777
1762
  return {
1778
- title: d.value.title,
1779
- slug: d.value.slug,
1780
- lead: d.value.lead,
1781
- cover: d.value.cover === null ? null : { path: d.value.cover.path },
1782
- is_visible: d.value.is_visible,
1763
+ title: o.value.title,
1764
+ slug: o.value.slug,
1765
+ lead: o.value.lead,
1766
+ cover: o.value.cover === null ? null : { path: o.value.cover.path },
1767
+ is_visible: o.value.is_visible,
1783
1768
  // Only when it was opened: a save of the rest of the form must not empty a card nobody
1784
1769
  // looked at, and an untouched card is the rules being left in charge (§12).
1785
- ...C.value ? { seo: d.value.seo } : {}
1770
+ ...S.value ? { seo: o.value.seo } : {}
1786
1771
  };
1787
1772
  }
1788
- async function N() {
1789
- S.value = !0, k.value = {};
1773
+ async function I() {
1774
+ W.value = !0, _.value = {};
1790
1775
  try {
1791
- const D = u.rubric === null ? await l.createRubric(A()) : await l.saveRubric(u.rubric.id, A());
1792
- L.success(u.rubric === null ? r("rubric.created") : r("rubric.saved")), x("saved", D);
1793
- } catch (D) {
1794
- const m = D.body;
1795
- m?.errors && (k.value = m.errors), L.danger(i(D));
1776
+ const P = r.rubric === null ? await a.createRubric(A()) : await a.saveRubric(r.rubric.id, A());
1777
+ L.success(r.rubric === null ? s("rubric.created") : s("rubric.saved")), y("saved", P);
1778
+ } catch (P) {
1779
+ const q = P.body;
1780
+ q?.errors && (_.value = q.errors), L.danger(i(P));
1796
1781
  } finally {
1797
- S.value = !1;
1782
+ W.value = !1;
1798
1783
  }
1799
1784
  }
1800
- async function H() {
1801
- if (!(u.rubric === null || !await pe({
1802
- title: r("rubric.delete-title", { name: u.rubric.name }),
1803
- message: r("rubric.delete-text"),
1804
- confirmText: r("rubric.delete"),
1805
- cancelText: r("rubric.cancel"),
1785
+ async function K() {
1786
+ if (!(r.rubric === null || !await me({
1787
+ title: s("rubric.delete-title", { name: r.rubric.name }),
1788
+ message: s("rubric.delete-text"),
1789
+ confirmText: s("rubric.delete"),
1790
+ cancelText: s("rubric.cancel"),
1806
1791
  tone: "danger"
1807
1792
  })))
1808
1793
  try {
1809
- await l.removeRubric(u.rubric.id), L.success(r("rubric.deleted")), x("deleted");
1810
- } catch (m) {
1811
- L.danger(i(m));
1794
+ await a.removeRubric(r.rubric.id), L.success(s("rubric.deleted")), y("deleted");
1795
+ } catch (q) {
1796
+ L.danger(i(q));
1812
1797
  }
1813
1798
  }
1814
- return (D, m) => (p(), K("div", {
1815
- class: Ae(["wx-rubric-form", { "is-pane": u.inline }])
1799
+ return (P, q) => (p(), Z("div", {
1800
+ class: Pe(["wx-rubric-form", { "is-pane": r.inline }])
1816
1801
  }, [
1817
- q("div", Wa, [
1818
- u.inline ? I("", !0) : (p(), V(e(Re), {
1802
+ j("div", ya, [
1803
+ r.inline ? H("", !0) : (p(), C(e(Oe), {
1819
1804
  key: 0,
1820
1805
  icon: "arrow-left",
1821
- title: e(r)("rubric.back"),
1822
- onClick: m[0] || (m[0] = (E) => x("back"))
1806
+ title: e(s)("rubric.back"),
1807
+ onClick: q[0] || (q[0] = (k) => y("back"))
1823
1808
  }, null, 8, ["title"])),
1824
- n(e(kt), {
1809
+ n(e($t), {
1825
1810
  level: 3,
1826
1811
  truncate: ""
1827
1812
  }, {
1828
- default: a(() => [
1829
- g(f(P.value), 1)
1813
+ default: l(() => [
1814
+ w(b(F.value), 1)
1830
1815
  ]),
1831
1816
  _: 1
1832
1817
  }),
1833
- u.rubric ? (p(), V(e(G), {
1818
+ r.rubric ? (p(), C(e(G), {
1834
1819
  key: 1,
1835
1820
  size: "sm",
1836
1821
  tone: "muted"
1837
1822
  }, {
1838
- default: a(() => [
1839
- g(f(e(r)("rubric.articles", { count: W.value })), 1)
1823
+ default: l(() => [
1824
+ w(b(e(s)("rubric.articles", { count: R.value })), 1)
1840
1825
  ]),
1841
1826
  _: 1
1842
- })) : I("", !0),
1843
- m[10] || (m[10] = q("span", { class: "wx-rubric-form__spacer" }, null, -1)),
1844
- u.rubric && W.value > 0 ? (p(), V(e(F), {
1827
+ })) : H("", !0),
1828
+ q[10] || (q[10] = j("span", { class: "wx-rubric-form__spacer" }, null, -1)),
1829
+ r.rubric && R.value > 0 ? (p(), C(e(J), {
1845
1830
  key: 2,
1846
1831
  variant: "text",
1847
1832
  size: "sm",
1848
- onClick: m[1] || (m[1] = (E) => x("articles", u.rubric))
1833
+ onClick: q[1] || (q[1] = (k) => y("articles", r.rubric))
1849
1834
  }, {
1850
- default: a(() => [
1851
- g(f(e(r)("rubric.show-articles")), 1)
1835
+ default: l(() => [
1836
+ w(b(e(s)("rubric.show-articles")), 1)
1852
1837
  ]),
1853
1838
  _: 1
1854
- })) : I("", !0)
1839
+ })) : H("", !0)
1855
1840
  ]),
1856
- q("div", za, [
1857
- q("div", Ra, [
1858
- n(e(ge), {
1841
+ j("div", wa, [
1842
+ j("div", _a, [
1843
+ n(e(ie), {
1859
1844
  class: "wx-rubric-form__title",
1860
- label: e(r)("rubric.field-title"),
1861
- error: O("title"),
1845
+ label: e(s)("rubric.field-title"),
1846
+ error: M("title"),
1862
1847
  required: ""
1863
1848
  }, {
1864
- default: a(() => [
1865
- n(e($e), {
1866
- modelValue: d.value.title,
1867
- "onUpdate:modelValue": m[2] || (m[2] = (E) => d.value.title = E),
1849
+ default: l(() => [
1850
+ n(e(Ae), {
1851
+ modelValue: o.value.title,
1852
+ "onUpdate:modelValue": q[2] || (q[2] = (k) => o.value.title = k),
1868
1853
  localized: "",
1869
- disabled: u.disabled
1854
+ disabled: r.disabled
1870
1855
  }, null, 8, ["modelValue", "disabled"])
1871
1856
  ]),
1872
1857
  _: 1
1873
1858
  }, 8, ["label", "error"]),
1874
- n(e(ge), {
1859
+ n(e(ie), {
1875
1860
  class: "wx-rubric-form__slug",
1876
- label: e(r)("rubric.field-slug"),
1877
- error: O("slug"),
1878
- help: U.value ?? e(r)("rubric.no-address")
1861
+ label: e(s)("rubric.field-slug"),
1862
+ error: M("slug"),
1863
+ help: $.value ?? e(s)("rubric.no-address")
1879
1864
  }, {
1880
- default: a(() => [
1881
- n(e($e), {
1882
- modelValue: d.value.slug,
1883
- "onUpdate:modelValue": m[3] || (m[3] = (E) => d.value.slug = E),
1865
+ default: l(() => [
1866
+ n(e(Ae), {
1867
+ modelValue: o.value.slug,
1868
+ "onUpdate:modelValue": q[3] || (q[3] = (k) => o.value.slug = k),
1884
1869
  localized: "",
1885
- disabled: u.disabled
1870
+ disabled: r.disabled
1886
1871
  }, null, 8, ["modelValue", "disabled"])
1887
1872
  ]),
1888
1873
  _: 1
1889
1874
  }, 8, ["label", "error", "help"])
1890
1875
  ]),
1891
- R.value ? (p(), V(e(Se), {
1876
+ U.value ? (p(), C(e(We), {
1892
1877
  key: 0,
1893
1878
  type: "info",
1894
1879
  variant: "soft",
1895
- description: e(r)("rubric.address-moving")
1896
- }, null, 8, ["description"])) : I("", !0),
1897
- n(e(ge), {
1898
- label: e(r)("rubric.field-lead"),
1899
- help: e(r)("rubric.lead-help"),
1880
+ description: e(s)("rubric.address-moving")
1881
+ }, null, 8, ["description"])) : H("", !0),
1882
+ n(e(ie), {
1883
+ label: e(s)("rubric.field-lead"),
1884
+ help: e(s)("rubric.lead-help"),
1900
1885
  wide: ""
1901
1886
  }, {
1902
- default: a(() => [
1903
- n(e($t), {
1904
- modelValue: d.value.lead,
1905
- "onUpdate:modelValue": m[4] || (m[4] = (E) => d.value.lead = E),
1887
+ default: l(() => [
1888
+ n(e(Tt), {
1889
+ modelValue: o.value.lead,
1890
+ "onUpdate:modelValue": q[4] || (q[4] = (k) => o.value.lead = k),
1906
1891
  localized: "",
1907
1892
  rows: 3,
1908
- disabled: u.disabled
1893
+ disabled: r.disabled
1909
1894
  }, null, 8, ["modelValue", "disabled"])
1910
1895
  ]),
1911
1896
  _: 1
1912
1897
  }, 8, ["label", "help"]),
1913
- q("div", Ua, [
1914
- $.value ? (p(), V(tt($.value), {
1898
+ j("div", xa, [
1899
+ x.value ? (p(), C(tt(x.value), {
1915
1900
  key: 0,
1916
- modelValue: d.value.cover,
1917
- "onUpdate:modelValue": m[5] || (m[5] = (E) => d.value.cover = E),
1901
+ modelValue: o.value.cover,
1902
+ "onUpdate:modelValue": q[5] || (q[5] = (k) => o.value.cover = k),
1918
1903
  class: "wx-rubric-form__cover",
1919
- label: e(r)("rubric.field-cover"),
1904
+ label: e(s)("rubric.field-cover"),
1920
1905
  accept: "image",
1921
1906
  captions: !1,
1922
1907
  aspect: "16/9",
1923
- disabled: u.disabled
1924
- }, null, 8, ["modelValue", "label", "disabled"])) : I("", !0),
1925
- q("div", Ba, [
1926
- n(e(Tt), {
1927
- modelValue: d.value.is_visible,
1928
- "onUpdate:modelValue": m[6] || (m[6] = (E) => d.value.is_visible = E),
1929
- label: e(r)("rubric.visible"),
1930
- disabled: u.disabled
1908
+ disabled: r.disabled
1909
+ }, null, 8, ["modelValue", "label", "disabled"])) : H("", !0),
1910
+ j("div", ka, [
1911
+ n(e(Vt), {
1912
+ modelValue: o.value.is_visible,
1913
+ "onUpdate:modelValue": q[6] || (q[6] = (k) => o.value.is_visible = k),
1914
+ label: e(s)("rubric.visible"),
1915
+ disabled: r.disabled
1931
1916
  }, null, 8, ["modelValue", "label", "disabled"]),
1932
1917
  n(e(G), {
1933
1918
  size: "sm",
1934
1919
  tone: "muted"
1935
1920
  }, {
1936
- default: a(() => [
1937
- g(f(e(r)("rubric.visible-help")), 1)
1921
+ default: l(() => [
1922
+ w(b(e(s)("rubric.visible-help")), 1)
1938
1923
  ]),
1939
1924
  _: 1
1940
1925
  })
1941
1926
  ])
1942
1927
  ]),
1943
- T.value ? (p(), K("div", Na, [
1944
- C.value ? (p(), V(tt(T.value), gt({
1928
+ T.value ? (p(), Z("div", $a, [
1929
+ S.value ? (p(), C(tt(T.value), pt({
1945
1930
  key: 1,
1946
- modelValue: d.value.seo,
1947
- "onUpdate:modelValue": m[8] || (m[8] = (E) => d.value.seo = E)
1948
- }, h.value, {
1931
+ modelValue: o.value.seo,
1932
+ "onUpdate:modelValue": q[8] || (q[8] = (k) => o.value.seo = k)
1933
+ }, c.value, {
1949
1934
  "structured-data": !1,
1950
- disabled: u.disabled
1951
- }), null, 16, ["modelValue", "disabled"])) : (p(), K(ne, { key: 0 }, [
1935
+ disabled: r.disabled
1936
+ }), null, 16, ["modelValue", "disabled"])) : (p(), Z(be, { key: 0 }, [
1952
1937
  n(e(G), {
1953
1938
  size: "sm",
1954
1939
  weight: "medium"
1955
1940
  }, {
1956
- default: a(() => [
1957
- g(f(e(r)("rubric.seo")), 1)
1941
+ default: l(() => [
1942
+ w(b(e(s)("rubric.seo")), 1)
1958
1943
  ]),
1959
1944
  _: 1
1960
1945
  }),
@@ -1962,211 +1947,202 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
1962
1947
  size: "sm",
1963
1948
  tone: "muted"
1964
1949
  }, {
1965
- default: a(() => [
1966
- g(f(e(r)("rubric.seo-help")), 1)
1950
+ default: l(() => [
1951
+ w(b(e(s)("rubric.seo-help")), 1)
1967
1952
  ]),
1968
1953
  _: 1
1969
1954
  }),
1970
- n(e(F), {
1955
+ n(e(J), {
1971
1956
  variant: "text",
1972
1957
  size: "sm",
1973
- disabled: u.disabled,
1974
- onClick: m[7] || (m[7] = (E) => C.value = !0)
1958
+ disabled: r.disabled,
1959
+ onClick: q[7] || (q[7] = (k) => S.value = !0)
1975
1960
  }, {
1976
- default: a(() => [
1977
- g(f(e(r)("rubric.seo-override", { name: P.value })), 1)
1961
+ default: l(() => [
1962
+ w(b(e(s)("rubric.seo-override", { name: F.value })), 1)
1978
1963
  ]),
1979
1964
  _: 1
1980
1965
  }, 8, ["disabled"])
1981
1966
  ], 64))
1982
- ])) : I("", !0)
1967
+ ])) : H("", !0)
1983
1968
  ]),
1984
- q("div", qa, [
1985
- u.rubric ? (p(), K(ne, { key: 0 }, [
1986
- n(e(F), {
1969
+ j("div", Ta, [
1970
+ r.rubric ? (p(), Z(be, { key: 0 }, [
1971
+ n(e(J), {
1987
1972
  variant: "outline",
1988
1973
  type: "danger",
1989
- disabled: u.disabled || W.value > 0,
1990
- onClick: H
1974
+ disabled: r.disabled || R.value > 0,
1975
+ onClick: K
1991
1976
  }, {
1992
- icon: a(() => [
1993
- n(e(Y), { name: "trash" })
1977
+ icon: l(() => [
1978
+ n(e(we), { name: "trash" })
1994
1979
  ]),
1995
- default: a(() => [
1996
- g(" " + f(e(r)("rubric.delete")), 1)
1980
+ default: l(() => [
1981
+ w(" " + b(e(s)("rubric.delete")), 1)
1997
1982
  ]),
1998
1983
  _: 1
1999
1984
  }, 8, ["disabled"]),
2000
- W.value > 0 ? (p(), V(e(G), {
1985
+ R.value > 0 ? (p(), C(e(G), {
2001
1986
  key: 0,
2002
1987
  size: "sm",
2003
1988
  tone: "muted"
2004
1989
  }, {
2005
- default: a(() => [
2006
- g(f(e(r)("rubric.delete-blocked")), 1)
1990
+ default: l(() => [
1991
+ w(b(e(s)("rubric.delete-blocked")), 1)
2007
1992
  ]),
2008
1993
  _: 1
2009
- })) : I("", !0)
2010
- ], 64)) : I("", !0),
2011
- m[11] || (m[11] = q("span", { class: "wx-rubric-form__spacer" }, null, -1)),
2012
- n(e(F), {
1994
+ })) : H("", !0)
1995
+ ], 64)) : H("", !0),
1996
+ q[11] || (q[11] = j("span", { class: "wx-rubric-form__spacer" }, null, -1)),
1997
+ n(e(J), {
2013
1998
  variant: "outline",
2014
- onClick: m[9] || (m[9] = (E) => x("back"))
1999
+ onClick: q[9] || (q[9] = (k) => y("back"))
2015
2000
  }, {
2016
- default: a(() => [
2017
- g(f(e(r)("rubric.cancel")), 1)
2001
+ default: l(() => [
2002
+ w(b(e(s)("rubric.cancel")), 1)
2018
2003
  ]),
2019
2004
  _: 1
2020
2005
  }),
2021
- n(e(F), {
2006
+ n(e(J), {
2022
2007
  type: "primary",
2023
- loading: S.value,
2024
- disabled: u.disabled,
2025
- onClick: N
2008
+ loading: W.value,
2009
+ disabled: r.disabled,
2010
+ onClick: I
2026
2011
  }, {
2027
- default: a(() => [
2028
- g(f(e(r)("rubric.save")), 1)
2012
+ default: l(() => [
2013
+ w(b(e(s)("rubric.save")), 1)
2029
2014
  ]),
2030
2015
  _: 1
2031
2016
  }, 8, ["loading", "disabled"])
2032
2017
  ])
2033
2018
  ], 2));
2034
2019
  }
2035
- }), Pa = /* @__PURE__ */ ce(Ma, [["__scopeId", "data-v-ace40cf4"]]), Da = ["onClick"], Ia = { class: "wx-rubric-row__name" }, Oa = /* @__PURE__ */ ee({
2020
+ }), Aa = /* @__PURE__ */ ve(Va, [["__scopeId", "data-v-ace40cf4"]]), Sa = ["onClick"], Wa = { class: "wx-rubric-row__name" }, Ca = /* @__PURE__ */ ee({
2036
2021
  __name: "RubricsPage",
2037
2022
  props: {
2038
2023
  base: { default: "/blog" }
2039
2024
  },
2040
- setup(y) {
2041
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me();
2042
- ae();
2043
- const t = te("webx-blog"), r = me(), i = z([]), $ = z(""), T = z(!0), h = z(!1), d = z(!1), k = b(() => u.can("blog.taxonomy.manage")), S = b(
2044
- () => u.state.manifest?.modules.find((m) => m.id === "rubrics")?.title ?? t("module.rubrics")
2045
- ), C = b(() => {
2046
- const m = c.query.rubric;
2047
- return typeof m == "string" && m !== "" ? Number(m) : null;
2048
- }), M = b(() => i.value.find((m) => m.id === C.value) ?? null);
2049
- async function P() {
2025
+ setup(f) {
2026
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke();
2027
+ te();
2028
+ const t = Q("webx-blog"), s = ge(), i = z([]), x = z(""), T = z(!0), c = z(!1), o = z(!1), _ = v(() => r.can("blog.taxonomy.manage")), W = v(
2029
+ () => r.state.manifest?.modules.find((k) => k.id === "rubrics")?.title ?? t("module.rubrics")
2030
+ ), S = v(() => {
2031
+ const k = u.query.rubric;
2032
+ return typeof k == "string" && k !== "" ? Number(k) : null;
2033
+ }), E = v(() => i.value.find((k) => k.id === S.value) ?? null);
2034
+ async function F() {
2050
2035
  T.value = !0;
2051
2036
  try {
2052
- const m = await x.rubrics();
2053
- i.value = m.data, $.value = m.prefix;
2054
- } catch (m) {
2055
- L.danger(r(m));
2037
+ const k = await y.rubrics();
2038
+ i.value = k.data, x.value = k.prefix;
2039
+ } catch (k) {
2040
+ L.danger(s(k));
2056
2041
  } finally {
2057
2042
  T.value = !1;
2058
2043
  }
2059
2044
  }
2060
- P(), oe(M, (m) => {
2061
- m !== null && (h.value = !0);
2045
+ F(), ue(E, (k) => {
2046
+ k !== null && (c.value = !0);
2062
2047
  });
2063
- function U(m) {
2064
- d.value = !1, l.replace({ query: { ...c.query, rubric: String(m.id) } }), h.value = !0;
2048
+ function $(k) {
2049
+ o.value = !1, a.replace({ query: { ...u.query, rubric: String(k.id) } }), c.value = !0;
2065
2050
  }
2066
- function R() {
2067
- d.value = !0, W(), h.value = !0;
2051
+ function U() {
2052
+ o.value = !0, R(), c.value = !0;
2068
2053
  }
2069
- function W() {
2070
- const m = { ...c.query };
2071
- delete m.rubric, l.replace({ query: m });
2054
+ function R() {
2055
+ const k = { ...u.query };
2056
+ delete k.rubric, a.replace({ query: k });
2072
2057
  }
2073
- async function O(m) {
2074
- d.value = !1, await P(), l.replace({ query: { ...c.query, rubric: String(m.id) } });
2058
+ async function M(k) {
2059
+ o.value = !1, await F(), a.replace({ query: { ...u.query, rubric: String(k.id) } });
2075
2060
  }
2076
2061
  async function A() {
2077
- d.value = !1, W(), h.value = !1, await P();
2062
+ o.value = !1, R(), c.value = !1, await F();
2078
2063
  }
2079
- function N() {
2080
- d.value = !1, W(), h.value = !1;
2064
+ function I() {
2065
+ o.value = !1, R(), c.value = !1;
2081
2066
  }
2082
- function H(m) {
2083
- l.push({ path: `${_.base}/articles`, query: { rubric: String(m.id) } });
2067
+ function K(k) {
2068
+ a.push({ path: `${m.base}/articles`, query: { rubric: String(k.id) } });
2084
2069
  }
2085
- async function D() {
2070
+ const P = v(
2071
+ () => _.value ? [{ key: "new", label: t("rubric.new"), icon: "plus", primary: !0, run: () => {
2072
+ U();
2073
+ } }] : []
2074
+ );
2075
+ async function q() {
2086
2076
  try {
2087
- await x.sortRubrics(i.value.map((m) => m.id));
2088
- } catch (m) {
2089
- L.danger(r(m, t("rubric.reorder-failed"))), await P();
2077
+ await y.sortRubrics(i.value.map((k) => k.id));
2078
+ } catch (k) {
2079
+ L.danger(s(k, t("rubric.reorder-failed"))), await F();
2090
2080
  }
2091
2081
  }
2092
- return (m, E) => (p(), V(e(je), {
2093
- title: S.value,
2082
+ return (k, le) => (p(), C(e(Qe), {
2083
+ title: W.value,
2084
+ actions: P.value,
2094
2085
  card: !1,
2095
2086
  fill: ""
2096
2087
  }, {
2097
- actions: a(() => [
2098
- k.value ? (p(), V(e(F), {
2099
- key: 0,
2100
- type: "primary",
2101
- onClick: R
2102
- }, {
2103
- icon: a(() => [
2104
- n(e(Y), { name: "plus" })
2105
- ]),
2106
- default: a(() => [
2107
- g(" " + f(e(t)("rubric.new")), 1)
2108
- ]),
2109
- _: 1
2110
- })) : I("", !0)
2111
- ]),
2112
- default: a(() => [
2113
- n(e(Vt), {
2088
+ default: l(() => [
2089
+ n(e(At), {
2114
2090
  class: "wx-rubrics",
2115
2091
  padding: "none"
2116
2092
  }, {
2117
- default: a(() => [
2118
- n(e(At), {
2119
- open: h.value,
2120
- "onUpdate:open": E[1] || (E[1] = (j) => h.value = j),
2093
+ default: l(() => [
2094
+ n(e(St), {
2095
+ open: c.value,
2096
+ "onUpdate:open": le[1] || (le[1] = (O) => c.value = O),
2121
2097
  class: "wx-rubrics__panes",
2122
2098
  "list-width": 320,
2123
2099
  "detail-min": 440,
2124
- "detail-label": M.value ? M.value.name : e(t)("rubric.new")
2100
+ "detail-label": E.value ? E.value.name : e(t)("rubric.new")
2125
2101
  }, {
2126
- list: a(() => [
2127
- T.value ? (p(), V(e(Ue), {
2102
+ list: l(() => [
2103
+ T.value ? (p(), C(e(Ue), {
2128
2104
  key: 0,
2129
2105
  class: "wx-rubrics__loading",
2130
2106
  rows: 5
2131
- })) : i.value.length === 0 ? (p(), V(e(Oe), {
2107
+ })) : i.value.length === 0 ? (p(), C(e(Ge), {
2132
2108
  key: 1,
2133
2109
  title: e(t)("rubric.empty"),
2134
2110
  description: e(t)("rubric.empty-help")
2135
- }, null, 8, ["title", "description"])) : (p(), V(e(Je), {
2111
+ }, null, 8, ["title", "description"])) : (p(), C(e(Ye), {
2136
2112
  key: 2,
2137
2113
  modelValue: i.value,
2138
- "onUpdate:modelValue": E[0] || (E[0] = (j) => i.value = j),
2114
+ "onUpdate:modelValue": le[0] || (le[0] = (O) => i.value = O),
2139
2115
  class: "wx-rubrics__list",
2140
2116
  plain: "",
2141
2117
  size: "sm",
2142
2118
  "item-key": "id",
2143
- "item-label": (j) => j.name,
2144
- disabled: !k.value,
2119
+ "item-label": (O) => O.name,
2120
+ disabled: !_.value,
2145
2121
  title: e(t)("rubric.order"),
2146
- onMove: D
2122
+ onMove: q
2147
2123
  }, {
2148
- default: a(({ item: j }) => [
2149
- q("button", {
2124
+ default: l(({ item: O }) => [
2125
+ j("button", {
2150
2126
  type: "button",
2151
- class: Ae(["wx-rubric-row", { "is-current": j.id === C.value, "is-hidden": !j.is_visible }]),
2152
- onClick: (de) => U(j)
2127
+ class: Pe(["wx-rubric-row", { "is-current": O.id === S.value, "is-hidden": !O.is_visible }]),
2128
+ onClick: (se) => $(O)
2153
2129
  }, [
2154
- q("span", Ia, [
2130
+ j("span", Wa, [
2155
2131
  n(e(G), {
2156
2132
  truncate: "",
2157
2133
  weight: "medium"
2158
2134
  }, {
2159
- default: a(() => [
2160
- g(f(j.name), 1)
2135
+ default: l(() => [
2136
+ w(b(O.name), 1)
2161
2137
  ]),
2162
2138
  _: 2
2163
2139
  }, 1024),
2164
- j.is_visible ? I("", !0) : (p(), V(e(Ye), {
2140
+ O.is_visible ? H("", !0) : (p(), C(e(et), {
2165
2141
  key: 0,
2166
2142
  content: e(t)("rubric.hidden")
2167
2143
  }, {
2168
- default: a(() => [
2169
- n(e(Y), {
2144
+ default: l(() => [
2145
+ n(e(we), {
2170
2146
  name: "eye-off",
2171
2147
  size: "sm"
2172
2148
  })
@@ -2179,21 +2155,21 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2179
2155
  tone: "muted",
2180
2156
  truncate: ""
2181
2157
  }, {
2182
- default: a(() => [
2183
- g(f(j.path === null ? e(t)("rubric.no-address") : `/${j.path}`), 1)
2158
+ default: l(() => [
2159
+ w(b(O.path === null ? e(t)("rubric.no-address") : `/${O.path}`), 1)
2184
2160
  ]),
2185
2161
  _: 2
2186
2162
  }, 1024)
2187
- ], 10, Da)
2163
+ ], 10, Sa)
2188
2164
  ]),
2189
- actions: a(({ item: j }) => [
2165
+ actions: l(({ item: O }) => [
2190
2166
  n(e(G), {
2191
2167
  class: "wx-rubric-row__count",
2192
2168
  size: "sm",
2193
2169
  tone: "muted"
2194
2170
  }, {
2195
- default: a(() => [
2196
- g(f(j.articles_count), 1)
2171
+ default: l(() => [
2172
+ w(b(O.articles_count), 1)
2197
2173
  ]),
2198
2174
  _: 2
2199
2175
  }, 1024)
@@ -2201,25 +2177,25 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2201
2177
  _: 1
2202
2178
  }, 8, ["modelValue", "item-label", "disabled", "title"]))
2203
2179
  ]),
2204
- empty: a(() => [
2205
- n(e(Oe), {
2180
+ empty: l(() => [
2181
+ n(e(Ge), {
2206
2182
  description: e(t)("rubric.choose")
2207
2183
  }, null, 8, ["description"])
2208
2184
  ]),
2209
- detail: a(({ inline: j, back: de }) => [
2210
- d.value || M.value ? (p(), V(Pa, {
2211
- key: d.value ? "new" : String(M.value?.id),
2212
- rubric: d.value ? null : M.value,
2213
- prefix: $.value,
2214
- inline: j,
2215
- disabled: !k.value,
2185
+ detail: l(({ inline: O, back: se }) => [
2186
+ o.value || E.value ? (p(), C(Aa, {
2187
+ key: o.value ? "new" : String(E.value?.id),
2188
+ rubric: o.value ? null : E.value,
2189
+ prefix: x.value,
2190
+ inline: O,
2191
+ disabled: !_.value,
2216
2192
  onBack: () => {
2217
- de(), N();
2193
+ se(), I();
2218
2194
  },
2219
- onArticles: H,
2220
- onSaved: O,
2195
+ onArticles: K,
2196
+ onSaved: M,
2221
2197
  onDeleted: A
2222
- }, null, 8, ["rubric", "prefix", "inline", "disabled", "onBack"])) : I("", !0)
2198
+ }, null, 8, ["rubric", "prefix", "inline", "disabled", "onBack"])) : H("", !0)
2223
2199
  ]),
2224
2200
  _: 1
2225
2201
  }, 8, ["open", "detail-label"])
@@ -2228,60 +2204,60 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2228
2204
  })
2229
2205
  ]),
2230
2206
  _: 1
2231
- }, 8, ["title"]));
2207
+ }, 8, ["title", "actions"]));
2232
2208
  }
2233
- }), Ea = /* @__PURE__ */ ee({
2209
+ }), za = /* @__PURE__ */ ee({
2234
2210
  __name: "TagCreateDialog",
2235
- setup(y) {
2236
- const { open: _, resolve: u, dismiss: x } = Ze(), c = se(), l = ue(c);
2237
- ae();
2238
- const t = te("webx-blog"), r = z(""), i = z(""), $ = z(!1), T = z({}), h = We("field");
2239
- Le(async () => {
2240
- await Ke(), h.value?.querySelector("input")?.focus();
2211
+ setup(f) {
2212
+ const { open: m, resolve: r, dismiss: y } = Ee(), u = ne(), a = de(u);
2213
+ te();
2214
+ const t = Q("webx-blog"), s = z(""), i = z(""), x = z(!1), T = z({}), c = De("field");
2215
+ Ne(async () => {
2216
+ await Ze(), c.value?.querySelector("input")?.focus();
2241
2217
  });
2242
- async function d() {
2243
- if (!(r.value.trim() === "" || $.value)) {
2244
- $.value = !0, T.value = {};
2218
+ async function o() {
2219
+ if (!(s.value.trim() === "" || x.value)) {
2220
+ x.value = !0, T.value = {};
2245
2221
  try {
2246
- u(
2247
- await l.createTag({
2248
- title: r.value.trim(),
2222
+ r(
2223
+ await a.createTag({
2224
+ title: s.value.trim(),
2249
2225
  ...i.value.trim() === "" ? {} : { slug: i.value.trim() }
2250
2226
  })
2251
2227
  );
2252
- } catch (k) {
2253
- T.value = k.body?.errors ?? {};
2228
+ } catch (_) {
2229
+ T.value = _.body?.errors ?? {};
2254
2230
  } finally {
2255
- $.value = !1;
2231
+ x.value = !1;
2256
2232
  }
2257
2233
  }
2258
2234
  }
2259
- return (k, S) => (p(), V(e(Qe), {
2260
- open: e(_),
2261
- "onUpdate:open": S[3] || (S[3] = (C) => He(_) ? _.value = C : null),
2235
+ return (_, W) => (p(), C(e(Fe), {
2236
+ open: e(m),
2237
+ "onUpdate:open": W[3] || (W[3] = (S) => Ie(m) ? m.value = S : null),
2262
2238
  title: e(t)("tag.new-title"),
2263
2239
  width: 440
2264
2240
  }, {
2265
- footer: a(() => [
2266
- n(e(Xe), { size: "sm" }, {
2267
- default: a(() => [
2268
- n(e(F), {
2241
+ footer: l(() => [
2242
+ n(e(Le), { size: "sm" }, {
2243
+ default: l(() => [
2244
+ n(e(J), {
2269
2245
  variant: "outline",
2270
- onClick: S[2] || (S[2] = (C) => e(x)())
2246
+ onClick: W[2] || (W[2] = (S) => e(y)())
2271
2247
  }, {
2272
- default: a(() => [
2273
- g(f(e(t)("tag.cancel")), 1)
2248
+ default: l(() => [
2249
+ w(b(e(t)("tag.cancel")), 1)
2274
2250
  ]),
2275
2251
  _: 1
2276
2252
  }),
2277
- n(e(F), {
2253
+ n(e(J), {
2278
2254
  type: "primary",
2279
- loading: $.value,
2280
- disabled: r.value.trim() === "",
2281
- onClick: d
2255
+ loading: x.value,
2256
+ disabled: s.value.trim() === "",
2257
+ onClick: o
2282
2258
  }, {
2283
- default: a(() => [
2284
- g(f(e(t)("tag.create")), 1)
2259
+ default: l(() => [
2260
+ w(b(e(t)("tag.create")), 1)
2285
2261
  ]),
2286
2262
  _: 1
2287
2263
  }, 8, ["loading", "disabled"])
@@ -2289,38 +2265,38 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2289
2265
  _: 1
2290
2266
  })
2291
2267
  ]),
2292
- default: a(() => [
2293
- n(e(ge), {
2268
+ default: l(() => [
2269
+ n(e(ie), {
2294
2270
  label: e(t)("tag.field-title"),
2295
2271
  error: T.value.title?.[0],
2296
2272
  required: ""
2297
2273
  }, {
2298
- default: a(() => [
2299
- q("div", {
2274
+ default: l(() => [
2275
+ j("div", {
2300
2276
  ref_key: "field",
2301
- ref: h
2277
+ ref: c
2302
2278
  }, [
2303
- n(e($e), {
2304
- modelValue: r.value,
2305
- "onUpdate:modelValue": S[0] || (S[0] = (C) => r.value = C),
2279
+ n(e(Ae), {
2280
+ modelValue: s.value,
2281
+ "onUpdate:modelValue": W[0] || (W[0] = (S) => s.value = S),
2306
2282
  "aria-label": e(t)("tag.field-title"),
2307
- onKeyup: Ce(d, ["enter"])
2283
+ onKeyup: ze(o, ["enter"])
2308
2284
  }, null, 8, ["modelValue", "aria-label"])
2309
2285
  ], 512)
2310
2286
  ]),
2311
2287
  _: 1
2312
2288
  }, 8, ["label", "error"]),
2313
- n(e(ge), {
2289
+ n(e(ie), {
2314
2290
  label: e(t)("tag.field-slug"),
2315
2291
  error: T.value.slug?.[0],
2316
2292
  help: e(t)("tag.field-slug-help")
2317
2293
  }, {
2318
- default: a(() => [
2319
- n(e($e), {
2294
+ default: l(() => [
2295
+ n(e(Ae), {
2320
2296
  modelValue: i.value,
2321
- "onUpdate:modelValue": S[1] || (S[1] = (C) => i.value = C),
2297
+ "onUpdate:modelValue": W[1] || (W[1] = (S) => i.value = S),
2322
2298
  "aria-label": e(t)("tag.field-slug"),
2323
- onKeyup: Ce(d, ["enter"])
2299
+ onKeyup: ze(o, ["enter"])
2324
2300
  }, null, 8, ["modelValue", "aria-label"])
2325
2301
  ]),
2326
2302
  _: 1
@@ -2329,63 +2305,144 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2329
2305
  _: 1
2330
2306
  }, 8, ["open", "title"]));
2331
2307
  }
2332
- }), La = { class: "wx-tag-merge" }, Fa = { class: "wx-tag-merge__chips" }, Ka = { class: "wx-tag-merge__redirect" }, Ha = /* @__PURE__ */ ee({
2308
+ }), Ra = ["id"], Ua = /* @__PURE__ */ ee({
2309
+ __name: "TagRenameDialog",
2310
+ props: {
2311
+ name: {}
2312
+ },
2313
+ setup(f) {
2314
+ const m = f, { open: r, resolve: y, dismiss: u } = Ee();
2315
+ te();
2316
+ const a = Q("webx-blog"), t = Q("webx-admin"), s = ft(), i = z(m.name), x = De("field");
2317
+ Ne(async () => {
2318
+ await Ze();
2319
+ const c = x.value?.querySelector("input");
2320
+ c?.focus(), c?.select();
2321
+ });
2322
+ function T() {
2323
+ const c = i.value.trim();
2324
+ if (c === "" || c === m.name) {
2325
+ u();
2326
+ return;
2327
+ }
2328
+ y(c);
2329
+ }
2330
+ return (c, o) => (p(), C(e(Fe), {
2331
+ open: e(r),
2332
+ "onUpdate:open": o[2] || (o[2] = (_) => Ie(r) ? r.value = _ : null),
2333
+ title: e(a)("tag.rename"),
2334
+ width: 420
2335
+ }, {
2336
+ footer: l(() => [
2337
+ n(e(Le), { size: "sm" }, {
2338
+ default: l(() => [
2339
+ n(e(J), {
2340
+ variant: "outline",
2341
+ onClick: o[1] || (o[1] = (_) => e(u)())
2342
+ }, {
2343
+ default: l(() => [
2344
+ w(b(e(a)("tag.cancel")), 1)
2345
+ ]),
2346
+ _: 1
2347
+ }),
2348
+ n(e(J), {
2349
+ type: "primary",
2350
+ "native-type": "submit",
2351
+ form: e(s),
2352
+ disabled: i.value.trim() === ""
2353
+ }, {
2354
+ default: l(() => [
2355
+ w(b(e(t)("editor.save")), 1)
2356
+ ]),
2357
+ _: 1
2358
+ }, 8, ["form", "disabled"])
2359
+ ]),
2360
+ _: 1
2361
+ })
2362
+ ]),
2363
+ default: l(() => [
2364
+ j("form", {
2365
+ id: e(s),
2366
+ ref_key: "field",
2367
+ ref: x,
2368
+ onSubmit: at(T, ["prevent"])
2369
+ }, [
2370
+ n(e(ie), {
2371
+ label: e(a)("tag.field-title"),
2372
+ required: ""
2373
+ }, {
2374
+ default: l(() => [
2375
+ n(e(Ae), {
2376
+ modelValue: i.value,
2377
+ "onUpdate:modelValue": o[0] || (o[0] = (_) => i.value = _),
2378
+ "aria-label": e(a)("tag.field-title"),
2379
+ onKeydown: ze(at(T, ["prevent"]), ["enter"])
2380
+ }, null, 8, ["modelValue", "aria-label", "onKeydown"])
2381
+ ]),
2382
+ _: 1
2383
+ }, 8, ["label"])
2384
+ ], 40, Ra)
2385
+ ]),
2386
+ _: 1
2387
+ }, 8, ["open", "title"]));
2388
+ }
2389
+ }), qa = { class: "wx-tag-merge" }, Ma = { class: "wx-tag-merge__chips" }, Na = { class: "wx-tag-merge__redirect" }, Ba = /* @__PURE__ */ ee({
2333
2390
  __name: "TagMergeDialog",
2334
2391
  props: {
2335
2392
  tags: {}
2336
2393
  },
2337
- setup(y) {
2338
- const _ = y, { open: u, resolve: x, dismiss: c } = Ze(), l = se(), t = ue(l);
2339
- ae();
2340
- const r = te("webx-blog"), i = me(), $ = z(
2341
- [..._.tags].sort((R, W) => W.articles_count - R.articles_count)[0]?.id ?? 0
2342
- ), T = z(!1), h = z(!0), d = z(null), k = b(
2343
- () => _.tags.map((R) => ({ value: R.id, label: `${R.title} · ${R.articles_count}` }))
2344
- ), S = b(() => _.tags.find((R) => R.id === $.value) ?? null), C = b(() => _.tags.filter((R) => R.id !== $.value)), M = b(() => C.value.reduce((R, W) => R + W.articles_count, 0)), P = b(() => C.value.map((R) => R.path).filter(Boolean));
2345
- async function U() {
2346
- if (!(S.value === null || C.value.length === 0 || T.value)) {
2347
- T.value = !0, d.value = null;
2394
+ setup(f) {
2395
+ const m = f, { open: r, resolve: y, dismiss: u } = Ee(), a = ne(), t = de(a);
2396
+ te();
2397
+ const s = Q("webx-blog"), i = ge(), x = z(
2398
+ [...m.tags].sort((U, R) => R.articles_count - U.articles_count)[0]?.id ?? 0
2399
+ ), T = z(!1), c = z(!0), o = z(null), _ = v(
2400
+ () => m.tags.map((U) => ({ value: U.id, label: `${U.title} · ${U.articles_count}` }))
2401
+ ), W = v(() => m.tags.find((U) => U.id === x.value) ?? null), S = v(() => m.tags.filter((U) => U.id !== x.value)), E = v(() => S.value.reduce((U, R) => U + R.articles_count, 0)), F = v(() => S.value.map((U) => U.path).filter(Boolean));
2402
+ async function $() {
2403
+ if (!(W.value === null || S.value.length === 0 || T.value)) {
2404
+ T.value = !0, o.value = null;
2348
2405
  try {
2349
- x(
2406
+ y(
2350
2407
  await t.mergeTags(
2351
- C.value.map((R) => R.id),
2352
- $.value,
2353
- h.value
2408
+ S.value.map((U) => U.id),
2409
+ x.value,
2410
+ c.value
2354
2411
  )
2355
2412
  );
2356
- } catch (R) {
2357
- d.value = i(R);
2413
+ } catch (U) {
2414
+ o.value = i(U);
2358
2415
  } finally {
2359
2416
  T.value = !1;
2360
2417
  }
2361
2418
  }
2362
2419
  }
2363
- return (R, W) => (p(), V(e(Qe), {
2364
- open: e(u),
2365
- "onUpdate:open": W[3] || (W[3] = (O) => He(u) ? u.value = O : null),
2366
- title: e(r)("tag.merge-title"),
2420
+ return (U, R) => (p(), C(e(Fe), {
2421
+ open: e(r),
2422
+ "onUpdate:open": R[3] || (R[3] = (M) => Ie(r) ? r.value = M : null),
2423
+ title: e(s)("tag.merge-title"),
2367
2424
  width: 520
2368
2425
  }, {
2369
- footer: a(() => [
2370
- n(e(Xe), { size: "sm" }, {
2371
- default: a(() => [
2372
- n(e(F), {
2426
+ footer: l(() => [
2427
+ n(e(Le), { size: "sm" }, {
2428
+ default: l(() => [
2429
+ n(e(J), {
2373
2430
  variant: "outline",
2374
- onClick: W[2] || (W[2] = (O) => e(c)())
2431
+ onClick: R[2] || (R[2] = (M) => e(u)())
2375
2432
  }, {
2376
- default: a(() => [
2377
- g(f(e(r)("tag.cancel")), 1)
2433
+ default: l(() => [
2434
+ w(b(e(s)("tag.cancel")), 1)
2378
2435
  ]),
2379
2436
  _: 1
2380
2437
  }),
2381
- n(e(F), {
2438
+ n(e(J), {
2382
2439
  type: "primary",
2383
2440
  loading: T.value,
2384
- disabled: C.value.length === 0,
2385
- onClick: U
2441
+ disabled: S.value.length === 0,
2442
+ onClick: $
2386
2443
  }, {
2387
- default: a(() => [
2388
- g(f(e(r)("tag.merge-confirm")), 1)
2444
+ default: l(() => [
2445
+ w(b(e(s)("tag.merge-confirm")), 1)
2389
2446
  ]),
2390
2447
  _: 1
2391
2448
  }, 8, ["loading", "disabled"])
@@ -2393,532 +2450,475 @@ const Mt = { class: "wx-article-editor__head" }, Pt = { class: "wx-article-edito
2393
2450
  _: 1
2394
2451
  })
2395
2452
  ]),
2396
- default: a(() => [
2397
- q("div", La, [
2398
- q("div", Fa, [
2399
- (p(!0), K(ne, null, ze(C.value, (O) => (p(), V(e(re), {
2400
- key: O.id,
2453
+ default: l(() => [
2454
+ j("div", qa, [
2455
+ j("div", Ma, [
2456
+ (p(!0), Z(be, null, Be(S.value, (M) => (p(), C(e(oe), {
2457
+ key: M.id,
2401
2458
  size: "sm",
2402
2459
  round: ""
2403
2460
  }, {
2404
- default: a(() => [
2405
- g(f(O.title) + " · " + f(O.articles_count), 1)
2461
+ default: l(() => [
2462
+ w(b(M.title) + " · " + b(M.articles_count), 1)
2406
2463
  ]),
2407
2464
  _: 2
2408
2465
  }, 1024))), 128)),
2409
- n(e(Y), {
2466
+ n(e(we), {
2410
2467
  name: "arrow-right",
2411
2468
  size: "sm"
2412
2469
  }),
2413
- S.value ? (p(), V(e(re), {
2470
+ W.value ? (p(), C(e(oe), {
2414
2471
  key: 0,
2415
2472
  type: "primary",
2416
2473
  size: "sm",
2417
2474
  round: ""
2418
2475
  }, {
2419
- default: a(() => [
2420
- g(f(S.value.title) + " · " + f(S.value.articles_count), 1)
2476
+ default: l(() => [
2477
+ w(b(W.value.title) + " · " + b(W.value.articles_count), 1)
2421
2478
  ]),
2422
2479
  _: 1
2423
- })) : I("", !0)
2480
+ })) : H("", !0)
2424
2481
  ]),
2425
- n(e(ge), {
2426
- label: e(r)("tag.merge-keep")
2482
+ n(e(ie), {
2483
+ label: e(s)("tag.merge-keep")
2427
2484
  }, {
2428
- default: a(() => [
2429
- n(e(be), {
2430
- modelValue: $.value,
2431
- "onUpdate:modelValue": W[0] || (W[0] = (O) => $.value = O),
2432
- options: k.value,
2433
- "aria-label": e(r)("tag.merge-keep")
2485
+ default: l(() => [
2486
+ n(e(_e), {
2487
+ modelValue: x.value,
2488
+ "onUpdate:modelValue": R[0] || (R[0] = (M) => x.value = M),
2489
+ options: _.value,
2490
+ "aria-label": e(s)("tag.merge-keep")
2434
2491
  }, null, 8, ["modelValue", "options", "aria-label"])
2435
2492
  ]),
2436
2493
  _: 1
2437
2494
  }, 8, ["label"]),
2438
- q("div", Ka, [
2439
- n(e(Ct), {
2440
- modelValue: h.value,
2441
- "onUpdate:modelValue": W[1] || (W[1] = (O) => h.value = O),
2442
- label: e(r)("tag.merge-redirect")
2495
+ j("div", Na, [
2496
+ n(e(Wt), {
2497
+ modelValue: c.value,
2498
+ "onUpdate:modelValue": R[1] || (R[1] = (M) => c.value = M),
2499
+ label: e(s)("tag.merge-redirect")
2443
2500
  }, null, 8, ["modelValue", "label"]),
2444
2501
  n(e(G), {
2445
2502
  size: "sm",
2446
2503
  tone: "muted"
2447
2504
  }, {
2448
- default: a(() => [
2449
- g(f(P.value.length === 0 ? e(r)("tag.merge-redirect-none") : e(r)("tag.merge-redirect-help", { addresses: P.value.join(", ") })), 1)
2505
+ default: l(() => [
2506
+ w(b(F.value.length === 0 ? e(s)("tag.merge-redirect-none") : e(s)("tag.merge-redirect-help", { addresses: F.value.join(", ") })), 1)
2450
2507
  ]),
2451
2508
  _: 1
2452
2509
  })
2453
2510
  ]),
2454
- n(e(Se), {
2511
+ n(e(We), {
2455
2512
  type: "warning",
2456
2513
  variant: "soft",
2457
- description: e(r)("tag.merge-warning", {
2458
- count: M.value,
2459
- tag: S.value?.title ?? "",
2460
- merged: C.value.length
2514
+ description: e(s)("tag.merge-warning", {
2515
+ count: E.value,
2516
+ tag: W.value?.title ?? "",
2517
+ merged: S.value.length
2461
2518
  })
2462
2519
  }, null, 8, ["description"]),
2463
- d.value ? (p(), V(e(Se), {
2520
+ o.value ? (p(), C(e(We), {
2464
2521
  key: 0,
2465
2522
  type: "danger",
2466
2523
  variant: "soft",
2467
- description: d.value
2468
- }, null, 8, ["description"])) : I("", !0)
2524
+ description: o.value
2525
+ }, null, 8, ["description"])) : H("", !0)
2469
2526
  ])
2470
2527
  ]),
2471
2528
  _: 1
2472
2529
  }, 8, ["open", "title"]));
2473
2530
  }
2474
- }), ja = /* @__PURE__ */ ce(Ha, [["__scopeId", "data-v-aa68b3a8"]]), Ga = { class: "wx-tags" }, Ja = { class: "wx-tags__sort" }, Za = ["title", "onClick"], Qa = { key: 2 }, Xa = /* @__PURE__ */ ee({
2531
+ }), Pa = /* @__PURE__ */ ve(Ba, [["__scopeId", "data-v-aa68b3a8"]]), Da = { class: "wx-tags" }, Ia = /* @__PURE__ */ ee({
2475
2532
  __name: "TagsPage",
2476
2533
  props: {
2477
2534
  base: { default: "/blog" }
2478
2535
  },
2479
- setup(y) {
2480
- const _ = y, u = se(), x = ue(u), c = qe(), l = Me();
2481
- ae();
2482
- const t = te("webx-blog"), r = me(), i = z(null), $ = z(!0), T = z([]), h = z(!1), d = z(null), k = z(""), S = We("box"), C = Ee(Ea), M = Ee(ja), P = b(() => u.can("blog.taxonomy.manage")), U = b(
2483
- () => u.state.manifest?.modules.find((o) => o.id === "tags")?.title ?? t("module.tags")
2484
- ), R = b({
2485
- get: () => typeof c.query.view == "string" ? c.query.view : "",
2486
- set: (o) => {
2487
- l.replace({
2488
- query: { ...c.query, view: o === "" ? void 0 : String(o), page: void 0 }
2536
+ setup(f) {
2537
+ const m = f, r = ne(), y = de(r), u = He(), a = Ke();
2538
+ te();
2539
+ const t = Q("webx-blog"), s = ge(), i = z(null), x = z(!0), T = z([]), c = z(!1), o = Ce(Ua), _ = Ce(za), W = Ce(Pa), S = v(() => r.can("blog.taxonomy.manage")), E = v(
2540
+ () => r.state.manifest?.modules.find((g) => g.id === "tags")?.title ?? t("module.tags")
2541
+ ), F = v({
2542
+ get: () => typeof u.query.view == "string" ? u.query.view : "",
2543
+ set: (g) => {
2544
+ a.replace({
2545
+ query: { ...u.query, view: g === "" ? void 0 : String(g), page: void 0 }
2489
2546
  });
2490
2547
  }
2491
- }), W = b(() => i.value?.filters ?? { total: 0, empty: 0, noindex: 0 }), O = b(() => [
2492
- { value: "", label: t("tag.view-all"), badge: W.value.total },
2493
- { value: "empty", label: t("tag.view-empty"), badge: W.value.empty },
2494
- { value: "noindex", label: t("tag.view-noindex"), badge: W.value.noindex }
2495
- ]), A = b(() => i.value?.data ?? []), N = b(() => A.value.filter((o) => T.value.includes(o.id))), H = b(() => [
2496
- { key: "title", label: t("tag.column-title"), minWidth: 150 },
2548
+ }), $ = v(() => i.value?.filters ?? { total: 0, empty: 0, noindex: 0 }), U = v(() => [
2549
+ { value: "", label: t("tag.view-all"), badge: $.value.total },
2550
+ { value: "empty", label: t("tag.view-empty"), badge: $.value.empty },
2551
+ { value: "noindex", label: t("tag.view-noindex"), badge: $.value.noindex }
2552
+ ]), R = v(() => i.value?.data ?? []), M = v(() => R.value.filter((g) => T.value.includes(g.id))), A = v(() => [
2553
+ { key: "title", label: t("tag.column-title"), minWidth: 150, sortable: !0 },
2497
2554
  // The number is what the other columns and the narrowest the title may be add up to without
2498
2555
  // this one: below it the address is what does not fit, and a fixed table does not shrink —
2499
2556
  // it scrolls sideways and takes the ··· with it (CLAUDE.md §4). Measured, not guessed: at
2500
2557
  // 375px the row is the word, the number and the menu, and nothing hangs off the edge.
2501
2558
  { key: "path", label: t("tag.column-address"), width: 180, hideBelow: 760 },
2502
- { key: "articles_count", label: t("tag.column-articles"), width: 70, align: "right" },
2559
+ {
2560
+ key: "articles_count",
2561
+ label: t("tag.column-articles"),
2562
+ width: 80,
2563
+ align: "right",
2564
+ sortable: !0
2565
+ },
2503
2566
  // Wide enough for the longest of the three states on one line, in every language: measured
2504
2567
  // at 180px of text, and a cell keeps 32 of its own. Narrower, the ruled row wrapped and
2505
2568
  // stood eighteen pixels taller than the ones around it.
2506
2569
  { key: "indexing", label: t("tag.column-indexing"), width: 230, hideBelow: 560 },
2507
- { key: "actions", label: "", width: 56, align: "right" }
2570
+ { key: "actions", label: "", width: st, align: "right" }
2508
2571
  ]);
2509
- function D(o) {
2572
+ function I(g) {
2510
2573
  return {
2511
- q: o?.search ?? (typeof c.query.q == "string" ? c.query.q : ""),
2512
- empty: R.value === "empty",
2513
- noindex: R.value === "noindex",
2574
+ q: g?.search ?? (typeof u.query.q == "string" ? u.query.q : ""),
2575
+ empty: F.value === "empty",
2576
+ noindex: F.value === "noindex",
2514
2577
  // Only when it is not the default: most used first is what the list is, and a query
2515
2578
  // string that repeats the default is a link that outlives a change of mind about it.
2516
- sort: c.query.sort === "name" ? "name" : void 0,
2517
- page: o?.page ?? (Number(c.query.page ?? 1) || 1),
2518
- per_page: o?.perPage
2579
+ sort: P(g),
2580
+ page: g?.page ?? (Number(u.query.page ?? 1) || 1),
2581
+ per_page: g?.perPage
2519
2582
  };
2520
2583
  }
2521
- async function m(o) {
2522
- $.value = !0;
2584
+ async function K(g) {
2585
+ x.value = !0;
2523
2586
  try {
2524
- i.value = await x.tagsPage(D(o));
2525
- } catch (s) {
2526
- L.danger(r(s));
2587
+ i.value = await y.tagsPage(I(g));
2588
+ } catch (N) {
2589
+ L.danger(s(N));
2527
2590
  } finally {
2528
- $.value = !1;
2591
+ x.value = !1;
2529
2592
  }
2530
2593
  }
2531
- function E(o) {
2532
- const s = {
2533
- ...c.query,
2534
- q: o.search === "" ? void 0 : o.search,
2535
- page: o.page === 1 ? void 0 : String(o.page)
2594
+ function P(g) {
2595
+ const N = g?.sort ?? q();
2596
+ if (!N) return;
2597
+ const B = N.key === "title" ? "name" : "articles", X = `${N.order === "desc" ? "-" : ""}${B}`;
2598
+ return X === "articles" ? void 0 : X;
2599
+ }
2600
+ function q() {
2601
+ const g = typeof u.query.sort == "string" ? u.query.sort : "";
2602
+ if (g === "") return null;
2603
+ const N = g.startsWith("-");
2604
+ return { key: (N ? g.slice(1) : g) === "name" ? "title" : "articles_count", order: N ? "desc" : "asc" };
2605
+ }
2606
+ function k(g) {
2607
+ const N = {
2608
+ ...u.query,
2609
+ q: g.search === "" ? void 0 : g.search,
2610
+ sort: P(g),
2611
+ page: g.page === 1 ? void 0 : String(g.page)
2536
2612
  };
2537
- l.replace({ query: s }), m(o);
2538
- }
2539
- oe(R, () => {
2540
- T.value = [], m();
2541
- }), m();
2542
- function j(o) {
2543
- l.replace({
2544
- query: { ...c.query, sort: o === "articles" ? void 0 : o, page: void 0 }
2545
- }), m();
2546
- }
2547
- const de = b(() => c.query.sort === "name" ? "name" : "articles");
2548
- async function Ve() {
2549
- await C({}) && await m();
2550
- }
2551
- async function ve(o) {
2552
- d.value = o.id, k.value = o.title, await Ke(), S.value?.querySelector("input")?.focus();
2553
- }
2554
- function J() {
2555
- d.value = null, k.value = "";
2556
- }
2557
- async function we(o) {
2558
- const s = k.value.trim();
2559
- if (s === "" || s === o.title) {
2560
- J();
2561
- return;
2562
- }
2563
- J(), await Q(o, { title: s }, t("tag.renamed"));
2613
+ a.replace({ query: N }), K(g);
2564
2614
  }
2565
- async function he(o, s) {
2566
- await Q(o, { noindex: s }, t(s ? "tag.kept-out" : "tag.indexed"));
2615
+ ue(F, () => {
2616
+ T.value = [], K();
2617
+ }), K();
2618
+ async function le() {
2619
+ await _({}) && await K();
2620
+ }
2621
+ async function O(g) {
2622
+ const N = await o({ name: g.title });
2623
+ N && await xe(g, { title: N }, t("tag.renamed"));
2567
2624
  }
2568
- async function Q(o, s, w) {
2625
+ async function se(g, N) {
2626
+ await xe(g, { noindex: N }, t(N ? "tag.kept-out" : "tag.indexed"));
2627
+ }
2628
+ async function xe(g, N, B) {
2569
2629
  try {
2570
- const le = await x.saveTag(o.id, s);
2630
+ const X = await y.saveTag(g.id, N);
2571
2631
  i.value && (i.value = {
2572
2632
  ...i.value,
2573
- data: i.value.data.map((xe) => xe.id === le.id ? le : xe)
2574
- }), L.success(w);
2575
- } catch (le) {
2576
- L.danger(r(le));
2633
+ data: i.value.data.map((ye) => ye.id === X.id ? X : ye)
2634
+ }), L.success(B);
2635
+ } catch (X) {
2636
+ L.danger(s(X));
2577
2637
  }
2578
2638
  }
2579
- async function fe(o) {
2580
- if (await pe({
2581
- title: t("tag.delete-title", { title: o.title }),
2582
- message: o.articles_count > 0 ? t("tag.delete-text-used", { count: o.articles_count }) : t("tag.delete-text"),
2639
+ async function ce(g) {
2640
+ if (await me({
2641
+ title: t("tag.delete-title", { title: g.title }),
2642
+ message: g.articles_count > 0 ? t("tag.delete-text-used", { count: g.articles_count }) : t("tag.delete-text"),
2583
2643
  confirmText: t("tag.delete"),
2584
2644
  cancelText: t("tag.cancel"),
2585
2645
  tone: "danger"
2586
2646
  }))
2587
2647
  try {
2588
- await x.removeTag(o.id), L.success(t("tag.deleted")), T.value = T.value.filter((w) => w !== o.id), await m();
2589
- } catch (w) {
2590
- L.danger(r(w));
2648
+ await y.removeTag(g.id), L.success(t("tag.deleted")), T.value = T.value.filter((B) => B !== g.id), await K();
2649
+ } catch (B) {
2650
+ L.danger(s(B));
2591
2651
  }
2592
2652
  }
2593
- function ye(o) {
2594
- if (!P.value) return [];
2595
- const s = [
2653
+ const he = v(() => [
2654
+ {
2655
+ key: "index",
2656
+ icon: "eye",
2657
+ label: t("tag.index"),
2658
+ disabled: c.value,
2659
+ run: () => {
2660
+ re("index");
2661
+ }
2662
+ },
2663
+ {
2664
+ key: "noindex",
2665
+ icon: "eye-off",
2666
+ label: t("tag.noindex"),
2667
+ disabled: c.value,
2668
+ run: () => {
2669
+ re("noindex");
2670
+ }
2671
+ },
2672
+ {
2673
+ key: "delete",
2674
+ icon: "trash",
2675
+ label: t("tag.delete"),
2676
+ danger: !0,
2677
+ disabled: c.value,
2678
+ run: () => {
2679
+ re("delete");
2680
+ }
2681
+ }
2682
+ ]);
2683
+ function Te(g) {
2684
+ if (!S.value) return [];
2685
+ const N = [
2596
2686
  { key: "rename", icon: "edit", label: t("tag.rename"), run: () => {
2597
- ve(o);
2687
+ O(g);
2598
2688
  } }
2599
2689
  ];
2600
- return o.url && s.push({
2690
+ return g.url && N.push({
2601
2691
  key: "site",
2602
2692
  icon: "external-link",
2603
2693
  label: t("tag.open-on-site"),
2604
- href: o.url
2605
- }), s.push({
2694
+ href: g.url
2695
+ }), N.push({
2606
2696
  key: "articles",
2607
2697
  icon: "list",
2608
2698
  label: t("tag.show-articles"),
2609
2699
  run: () => {
2610
- l.push({ path: `${_.base}/articles`, query: { tag: String(o.id) } });
2700
+ a.push({ path: `${m.base}/articles`, query: { tag: String(g.id) } });
2611
2701
  }
2612
- }), s.push(
2613
- o.noindex ? {
2702
+ }), N.push(
2703
+ g.noindex ? {
2614
2704
  key: "index",
2615
2705
  icon: "eye",
2616
2706
  label: t("tag.index"),
2617
2707
  run: () => {
2618
- he(o, !1);
2708
+ se(g, !1);
2619
2709
  }
2620
2710
  } : {
2621
2711
  key: "noindex",
2622
2712
  icon: "eye-off",
2623
2713
  label: t("tag.noindex"),
2624
2714
  run: () => {
2625
- he(o, !0);
2715
+ se(g, !0);
2626
2716
  }
2627
2717
  }
2628
- ), s.push({
2718
+ ), N.push({
2629
2719
  key: "delete",
2630
2720
  icon: "trash",
2631
2721
  label: t("tag.delete"),
2632
2722
  danger: !0,
2633
2723
  run: () => {
2634
- fe(o);
2724
+ ce(g);
2635
2725
  }
2636
- }), s;
2637
- }
2638
- function _e(o) {
2639
- return o === "noindex" ? "muted" : "success";
2640
- }
2641
- async function ie() {
2642
- if (N.value.length < 2) return;
2643
- const o = await M({ tags: N.value });
2644
- o && (L.success(t("tag.merged", { tag: o.tag.title, count: o.articles_count })), T.value = [], await m());
2645
- }
2646
- async function v(o) {
2647
- const s = N.value.map((w) => w.id);
2648
- if (!(s.length === 0 || h.value)) {
2649
- if (o === "delete") {
2650
- const w = N.value.reduce((xe, Pe) => xe + Pe.articles_count, 0);
2651
- if (!await pe({
2652
- title: t("tag.delete-many-title", { count: s.length }),
2653
- message: w > 0 ? t("tag.delete-many-text-used", { count: w }) : t("tag.delete-many-text"),
2726
+ }), N;
2727
+ }
2728
+ function ke(g) {
2729
+ return g === "noindex" ? "muted" : "success";
2730
+ }
2731
+ async function pe() {
2732
+ if (M.value.length < 2) return;
2733
+ const g = await W({ tags: M.value });
2734
+ g && (L.success(t("tag.merged", { tag: g.tag.title, count: g.articles_count })), T.value = [], await K());
2735
+ }
2736
+ async function re(g) {
2737
+ const N = M.value.map((B) => B.id);
2738
+ if (!(N.length === 0 || c.value)) {
2739
+ if (g === "delete") {
2740
+ const B = M.value.reduce((ye, d) => ye + d.articles_count, 0);
2741
+ if (!await me({
2742
+ title: t("tag.delete-many-title", { count: N.length }),
2743
+ message: B > 0 ? t("tag.delete-many-text-used", { count: B }) : t("tag.delete-many-text"),
2654
2744
  confirmText: t("tag.delete"),
2655
2745
  cancelText: t("tag.cancel"),
2656
2746
  tone: "danger"
2657
2747
  })) return;
2658
2748
  }
2659
- h.value = !0;
2749
+ c.value = !0;
2660
2750
  try {
2661
- const w = await x.massTags(s, o);
2751
+ const B = await y.massTags(N, g);
2662
2752
  L.success(
2663
- o === "delete" ? t("tag.deleted-many", { count: w }) : o === "index" ? t("tag.indexed-many", { count: w }) : t("tag.kept-out-many", { count: w })
2664
- ), T.value = [], await m();
2665
- } catch (w) {
2666
- L.danger(r(w));
2753
+ g === "delete" ? t("tag.deleted-many", { count: B }) : g === "index" ? t("tag.indexed-many", { count: B }) : t("tag.kept-out-many", { count: B })
2754
+ ), T.value = [], await K();
2755
+ } catch (B) {
2756
+ L.danger(s(B));
2667
2757
  } finally {
2668
- h.value = !1;
2758
+ c.value = !1;
2669
2759
  }
2670
2760
  }
2671
2761
  }
2672
- return (o, s) => (p(), K("div", Ga, [
2673
- n(e(je), {
2674
- view: R.value,
2675
- "onUpdate:view": s[2] || (s[2] = (w) => R.value = w),
2676
- title: U.value,
2677
- views: O.value
2678
- }, st({
2679
- default: a(() => [
2680
- n(e(ut), {
2762
+ const fe = v(
2763
+ () => S.value ? [{ key: "new", label: t("tag.new"), icon: "plus", primary: !0, run: () => {
2764
+ le();
2765
+ } }] : []
2766
+ );
2767
+ return (g, N) => (p(), Z("div", Da, [
2768
+ n(e(Qe), {
2769
+ view: F.value,
2770
+ "onUpdate:view": N[1] || (N[1] = (B) => F.value = B),
2771
+ title: E.value,
2772
+ views: U.value,
2773
+ actions: fe.value
2774
+ }, {
2775
+ default: l(() => [
2776
+ n(e(ot), {
2681
2777
  selected: T.value,
2682
- "onUpdate:selected": s[1] || (s[1] = (w) => T.value = w),
2778
+ "onUpdate:selected": N[0] || (N[0] = (B) => T.value = B),
2683
2779
  data: i.value,
2684
- columns: H.value,
2780
+ columns: A.value,
2685
2781
  "row-key": "id",
2686
2782
  searchable: "",
2687
2783
  hover: "",
2688
2784
  flush: "",
2689
2785
  layout: "fixed",
2690
- loading: $.value,
2691
- selectable: P.value,
2786
+ loading: x.value,
2787
+ selectable: S.value,
2692
2788
  "cards-below": 0,
2693
2789
  "search-placeholder": e(t)("tag.search"),
2694
- "empty-text": A.value.length === 0 && !$.value ? e(t)("tag.empty") : void 0,
2695
- "aria-label": U.value,
2696
- onStateChange: E
2790
+ "empty-text": R.value.length === 0 && !x.value ? e(t)("tag.empty") : void 0,
2791
+ "aria-label": E.value,
2792
+ onStateChange: k
2697
2793
  }, {
2698
- actions: a(() => [
2699
- q("div", Ja, [
2700
- (p(), K(ne, null, ze(["articles", "name"], (w) => n(e(F), {
2701
- key: w,
2702
- size: "sm",
2703
- variant: de.value === w ? "outline" : "text",
2704
- onClick: (le) => j(w)
2705
- }, {
2706
- default: a(() => [
2707
- g(f(e(t)(`tag.sort-${w}`)), 1)
2708
- ]),
2709
- _: 2
2710
- }, 1032, ["variant", "onClick"])), 64))
2711
- ])
2712
- ]),
2713
- "cell-title": a(({ row: w }) => [
2714
- d.value === w.id ? (p(), K("span", {
2715
- key: 0,
2716
- ref_key: "box",
2717
- ref: S,
2718
- class: "wx-tags__rename"
2719
- }, [
2720
- n(e($e), {
2721
- modelValue: k.value,
2722
- "onUpdate:modelValue": s[0] || (s[0] = (le) => k.value = le),
2723
- size: "sm",
2724
- "aria-label": e(t)("tag.rename"),
2725
- onKeyup: [
2726
- Ce((le) => we(w), ["enter"]),
2727
- Ce(J, ["esc"])
2728
- ],
2729
- onBlur: (le) => we(w)
2730
- }, null, 8, ["modelValue", "aria-label", "onKeyup", "onBlur"])
2731
- ], 512)) : P.value ? (p(), K("button", {
2732
- key: 1,
2733
- type: "button",
2734
- class: "wx-tags__name",
2735
- title: e(t)("tag.rename"),
2736
- onClick: (le) => ve(w)
2737
- }, f(w.title), 9, Za)) : (p(), K("span", Qa, f(w.title), 1))
2794
+ "cell-title": l(({ row: B }) => [
2795
+ n(e(G), { truncate: "" }, {
2796
+ default: l(() => [
2797
+ w(b(B.title), 1)
2798
+ ]),
2799
+ _: 2
2800
+ }, 1024)
2738
2801
  ]),
2739
- "cell-path": a(({ row: w }) => [
2802
+ "cell-path": l(({ row: B }) => [
2740
2803
  n(e(G), {
2741
2804
  size: "sm",
2742
2805
  tone: "muted",
2743
2806
  mono: "",
2744
2807
  truncate: ""
2745
2808
  }, {
2746
- default: a(() => [
2747
- g(f(w.path ?? e(t)("tag.no-address")), 1)
2809
+ default: l(() => [
2810
+ w(b(B.path ?? e(t)("tag.no-address")), 1)
2748
2811
  ]),
2749
2812
  _: 2
2750
2813
  }, 1024)
2751
2814
  ]),
2752
- "cell-articles_count": a(({ row: w }) => [
2815
+ "cell-articles_count": l(({ row: B }) => [
2753
2816
  n(e(G), {
2754
- tone: w.articles_count === 0 ? "muted" : "default"
2817
+ tone: B.articles_count === 0 ? "muted" : "default"
2755
2818
  }, {
2756
- default: a(() => [
2757
- g(f(w.articles_count), 1)
2819
+ default: l(() => [
2820
+ w(b(B.articles_count), 1)
2758
2821
  ]),
2759
2822
  _: 2
2760
2823
  }, 1032, ["tone"])
2761
2824
  ]),
2762
- "cell-indexing": a(({ row: w }) => [
2763
- w.indexing === "rule" ? (p(), V(e(Ye), {
2825
+ "cell-indexing": l(({ row: B }) => [
2826
+ B.indexing === "rule" ? (p(), C(e(et), {
2764
2827
  key: 0,
2765
2828
  content: e(t)("tag.indexing-rule-help")
2766
2829
  }, {
2767
- default: a(() => [
2830
+ default: l(() => [
2768
2831
  n(e(G), {
2769
2832
  size: "sm",
2770
- tone: _e(w.indexing)
2833
+ tone: ke(B.indexing)
2771
2834
  }, {
2772
- default: a(() => [
2773
- g(f(e(t)("tag.indexing-rule")), 1)
2835
+ default: l(() => [
2836
+ w(b(e(t)("tag.indexing-rule")), 1)
2774
2837
  ]),
2775
2838
  _: 1
2776
2839
  }, 8, ["tone"])
2777
2840
  ]),
2778
2841
  _: 2
2779
- }, 1032, ["content"])) : (p(), V(e(G), {
2842
+ }, 1032, ["content"])) : (p(), C(e(G), {
2780
2843
  key: 1,
2781
2844
  size: "sm",
2782
- tone: _e(w.indexing)
2845
+ tone: ke(B.indexing)
2783
2846
  }, {
2784
- default: a(() => [
2785
- g(f(e(t)(`tag.indexing-${w.indexing}`)), 1)
2847
+ default: l(() => [
2848
+ w(b(e(t)(`tag.indexing-${B.indexing}`)), 1)
2786
2849
  ]),
2787
2850
  _: 2
2788
2851
  }, 1032, ["tone"]))
2789
2852
  ]),
2790
- "cell-actions": a(({ row: w }) => [
2791
- n(e(Ie), {
2792
- actions: ye(w),
2793
- label: w.title
2853
+ "cell-actions": l(({ row: B }) => [
2854
+ n(e(Re), {
2855
+ actions: Te(B),
2856
+ label: B.title
2794
2857
  }, null, 8, ["actions", "label"])
2795
2858
  ]),
2796
2859
  _: 1
2797
2860
  }, 8, ["selected", "data", "columns", "loading", "selectable", "search-placeholder", "empty-text", "aria-label"])
2798
2861
  ]),
2799
- _: 2
2800
- }, [
2801
- P.value ? {
2802
- name: "actions",
2803
- fn: a(() => [
2804
- n(e(F), {
2805
- type: "primary",
2806
- onClick: Ve
2807
- }, {
2808
- icon: a(() => [
2809
- n(e(Y), { name: "plus" })
2810
- ]),
2811
- default: a(() => [
2812
- g(" " + f(e(t)("tag.new")), 1)
2813
- ]),
2814
- _: 1
2815
- })
2816
- ]),
2817
- key: "0"
2818
- } : void 0
2819
- ]), 1032, ["view", "title", "views"]),
2820
- N.value.length > 0 ? (p(), V(e(ot), {
2862
+ _: 1
2863
+ }, 8, ["view", "title", "views", "actions"]),
2864
+ M.value.length > 0 ? (p(), C(e(rt), {
2821
2865
  key: 0,
2822
2866
  class: "wx-tags__bar",
2823
2867
  sticky: ""
2824
2868
  }, {
2825
- default: a(() => [
2869
+ state: l(() => [
2826
2870
  n(e(G), { weight: "medium" }, {
2827
- default: a(() => [
2828
- g(f(e(t)("tag.selected", { count: N.value.length })), 1)
2871
+ default: l(() => [
2872
+ w(b(e(t)("tag.selected", { count: M.value.length })), 1)
2829
2873
  ]),
2830
2874
  _: 1
2831
- }),
2832
- s[7] || (s[7] = q("span", { class: "wx-tags__bar-spacer" }, null, -1)),
2833
- n(e(F), {
2875
+ })
2876
+ ]),
2877
+ default: l(() => [
2878
+ n(e(J), {
2834
2879
  type: "primary",
2835
- disabled: N.value.length < 2 || h.value,
2836
- onClick: ie
2837
- }, {
2838
- icon: a(() => [
2839
- n(e(Y), { name: "link" })
2840
- ]),
2841
- default: a(() => [
2842
- g(" " + f(e(t)("tag.merge")), 1)
2843
- ]),
2844
- _: 1
2845
- }, 8, ["disabled"]),
2846
- n(e(F), {
2847
- variant: "outline",
2848
- disabled: h.value,
2849
- onClick: s[3] || (s[3] = (w) => v("index"))
2850
- }, {
2851
- icon: a(() => [
2852
- n(e(Y), { name: "eye" })
2853
- ]),
2854
- default: a(() => [
2855
- g(" " + f(e(t)("tag.index")), 1)
2856
- ]),
2857
- _: 1
2858
- }, 8, ["disabled"]),
2859
- n(e(F), {
2860
- variant: "outline",
2861
- disabled: h.value,
2862
- onClick: s[4] || (s[4] = (w) => v("noindex"))
2880
+ disabled: M.value.length < 2 || c.value,
2881
+ onClick: pe
2863
2882
  }, {
2864
- icon: a(() => [
2865
- n(e(Y), { name: "eye-off" })
2883
+ icon: l(() => [
2884
+ n(e(we), { name: "link" })
2866
2885
  ]),
2867
- default: a(() => [
2868
- g(" " + f(e(t)("tag.noindex")), 1)
2886
+ default: l(() => [
2887
+ w(" " + b(e(t)("tag.merge")), 1)
2869
2888
  ]),
2870
2889
  _: 1
2871
2890
  }, 8, ["disabled"]),
2872
- n(e(F), {
2873
- variant: "outline",
2874
- type: "danger",
2875
- disabled: h.value,
2876
- onClick: s[5] || (s[5] = (w) => v("delete"))
2877
- }, {
2878
- icon: a(() => [
2879
- n(e(Y), { name: "trash" })
2880
- ]),
2881
- default: a(() => [
2882
- g(" " + f(e(t)("tag.delete")), 1)
2883
- ]),
2884
- _: 1
2885
- }, 8, ["disabled"]),
2886
- n(e(F), {
2887
- variant: "text",
2888
- "aria-label": e(t)("tag.clear"),
2889
- onClick: s[6] || (s[6] = (w) => T.value = [])
2890
- }, {
2891
- icon: a(() => [
2892
- n(e(Y), { name: "close" })
2893
- ]),
2894
- _: 1
2895
- }, 8, ["aria-label"])
2891
+ n(e(Re), {
2892
+ size: "lg",
2893
+ actions: he.value,
2894
+ label: e(t)("tag.selected", { count: M.value.length })
2895
+ }, null, 8, ["actions", "label"])
2896
2896
  ]),
2897
2897
  _: 1
2898
- })) : I("", !0)
2898
+ })) : H("", !0)
2899
2899
  ]));
2900
2900
  }
2901
- }), Ya = /* @__PURE__ */ ce(Xa, [["__scopeId", "data-v-7ccee45f"]]);
2902
- function nl(y = {}) {
2903
- const _ = y.path ?? "/blog";
2901
+ }), Oa = /* @__PURE__ */ ve(Ia, [["__scopeId", "data-v-beb86d88"]]);
2902
+ function ja(f = {}) {
2903
+ const m = f.path ?? "/blog";
2904
2904
  return [
2905
2905
  {
2906
2906
  id: "articles",
2907
- path: `${_}/articles`,
2907
+ path: `${m}/articles`,
2908
2908
  routes: [
2909
2909
  // The section's own path travels as a prop, so a panel that mounted the blog somewhere
2910
2910
  // else still links between its screens correctly.
2911
2911
  {
2912
- path: `${_}/articles`,
2912
+ path: `${m}/articles`,
2913
2913
  name: "webx.blog.articles",
2914
- component: Sa,
2915
- props: { base: _ }
2914
+ component: ha,
2915
+ props: { base: m }
2916
2916
  },
2917
2917
  {
2918
- path: `${_}/articles/:id(\\d+)`,
2918
+ path: `${m}/articles/:id(\\d+)`,
2919
2919
  name: "webx.blog.articles.edit",
2920
- component: Ht,
2921
- props: { base: _ }
2920
+ component: Ot,
2921
+ props: { base: m }
2922
2922
  }
2923
2923
  ],
2924
2924
  /*
@@ -2933,34 +2933,34 @@ function nl(y = {}) {
2933
2933
  */
2934
2934
  types: {
2935
2935
  "wx-article-address": { component: Nt, kind: "display" },
2936
- "wx-article-author": { component: qt, kind: "field" },
2937
- "wx-article-rubrics": { component: ra, kind: "field" },
2938
- "wx-article-tags": { component: pa, kind: "field" },
2939
- "wx-article-related": { component: la, kind: "field" },
2940
- "wx-article-history": { component: Qt, kind: "display" }
2936
+ "wx-article-author": { component: Bt, kind: "field" },
2937
+ "wx-article-rubrics": { component: aa, kind: "field" },
2938
+ "wx-article-tags": { component: oa, kind: "field" },
2939
+ "wx-article-related": { component: Xt, kind: "field" },
2940
+ "wx-article-history": { component: Kt, kind: "display" }
2941
2941
  }
2942
2942
  },
2943
2943
  {
2944
2944
  id: "rubrics",
2945
- path: `${_}/rubrics`,
2945
+ path: `${m}/rubrics`,
2946
2946
  routes: [
2947
2947
  {
2948
- path: `${_}/rubrics`,
2948
+ path: `${m}/rubrics`,
2949
2949
  name: "webx.blog.rubrics",
2950
- component: Oa,
2951
- props: { base: _ }
2950
+ component: Ca,
2951
+ props: { base: m }
2952
2952
  }
2953
2953
  ]
2954
2954
  },
2955
2955
  {
2956
2956
  id: "tags",
2957
- path: `${_}/tags`,
2957
+ path: `${m}/tags`,
2958
2958
  routes: [
2959
2959
  {
2960
- path: `${_}/tags`,
2960
+ path: `${m}/tags`,
2961
2961
  name: "webx.blog.tags",
2962
- component: Ya,
2963
- props: { base: _ }
2962
+ component: Oa,
2963
+ props: { base: m }
2964
2964
  }
2965
2965
  ]
2966
2966
  }
@@ -2968,24 +2968,24 @@ function nl(y = {}) {
2968
2968
  }
2969
2969
  export {
2970
2970
  Nt as WxArticleAddress,
2971
- qt as WxArticleAuthorField,
2972
- ma as WxArticleCreateDialog,
2973
- Ht as WxArticleEditorPage,
2974
- Qt as WxArticleHistory,
2975
- la as WxArticleRelated,
2976
- ra as WxArticleRubrics,
2977
- pa as WxArticleTags,
2978
- Sa as WxArticlesPage,
2979
- Pa as WxRubricForm,
2980
- Oa as WxRubricsPage,
2981
- Ea as WxTagCreateDialog,
2982
- ja as WxTagMergeDialog,
2983
- Ya as WxTagsPage,
2984
- dt as articleEditorKey,
2985
- nl as blog,
2986
- Rt as blogMessages,
2987
- ue as createBlogApi,
2988
- zt as provideArticleEditor,
2989
- Te as useArticleEditor
2971
+ Bt as WxArticleAuthorField,
2972
+ ua as WxArticleCreateDialog,
2973
+ Ot as WxArticleEditorPage,
2974
+ Kt as WxArticleHistory,
2975
+ Xt as WxArticleRelated,
2976
+ aa as WxArticleRubrics,
2977
+ oa as WxArticleTags,
2978
+ ha as WxArticlesPage,
2979
+ Aa as WxRubricForm,
2980
+ Ca as WxRubricsPage,
2981
+ za as WxTagCreateDialog,
2982
+ Pa as WxTagMergeDialog,
2983
+ Oa as WxTagsPage,
2984
+ ut as articleEditorKey,
2985
+ ja as blog,
2986
+ Ut as blogMessages,
2987
+ de as createBlogApi,
2988
+ Rt as provideArticleEditor,
2989
+ Se as useArticleEditor
2990
2990
  };
2991
2991
  //# sourceMappingURL=index.js.map