@webx-ui/module-blocks 0.6.5 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- import { defineComponent as le, computed as S, openBlock as i, createElementBlock as $, createVNode as u, unref as e, createElementVNode as B, createTextVNode as W, toDisplayString as w, Fragment as j, createCommentVNode as N, renderList as Q, ref as P, onMounted as Pe, watch as ce, createBlock as I, withCtx as c, normalizeStyle as _e, reactive as Ge, onBeforeUnmount as tt, normalizeClass as xe, withDirectives as Ht, vShow as jt, resolveComponent as yt, isRef as wt, nextTick as Ft, withKeys as it, withModifiers as rt, provide as _t, inject as Fe, useModel as qt, getCurrentInstance as Jt, resolveDynamicComponent as Kt, mergeProps as Zt, mergeModels as Gt } from "vue";
2
- import { useRoute as Yt, useRouter as xt } from "vue-router";
3
- import { useTranslate as de, useAdmin as Ue, useErrorText as Me, WxDate as Qt, WxScreenHead as Xt, WxRenameButton as el, WxHelpButton as tl, WxRowMenu as ll, adminKey as nl, WxListScreen as al } from "@webx-ui/module-admin";
4
- import { WxIcon as he, WxSkeleton as We, WxText as F, WxBadge as re, WxButton as ue, confirm as Je, toast as q, useElementWidth as Ke, WxSegmented as $t, WxCard as Be, WxPopover as ol, WxAlert as St, WxTabs as sl, WxTab as Ee, WxCodeEditor as He, WxFormItem as te, WxInput as Ne, WxSelect as Tt, WxTextarea as il, WxIconPicker as rl, WxInputNumber as ut, WxTagsInput as ct, WxSwitch as ul, WxActionBar as cl, useModal as Ct, WxDialog as Vt, WxEmpty as Bt, WxAction as ze, WxSortableList as dl, createModal as Et, WxDrawer as pl, WxSpace as vl, WxSkeletonItem as je } from "@webx-ui/core";
5
- import { WxScreenRenderer as Wt, coreTypes as Ye } from "@webx-ui/schema";
6
- function Le(t) {
7
- const l = `${t.apiPath}/blocks`, o = (n) => n.data;
1
+ import { defineComponent as ae, computed as T, openBlock as i, createElementBlock as S, createVNode as u, unref as e, createElementVNode as E, createTextVNode as W, toDisplayString as _, Fragment as j, createCommentVNode as N, renderList as ee, ref as U, onMounted as Ue, watch as X, createBlock as I, withCtx as d, onBeforeUnmount as Ge, normalizeStyle as xe, reactive as Qe, normalizeClass as $e, withDirectives as Jt, vShow as Kt, resolveComponent as xt, isRef as $t, nextTick as Gt, withKeys as ut, withModifiers as ct, provide as St, inject as qe, useModel as Yt, getCurrentInstance as Zt, resolveDynamicComponent as Qt, mergeProps as Xt, mergeModels as el } from "vue";
2
+ import { useRoute as tl, useRouter as Tt } from "vue-router";
3
+ import { useTranslate as de, useAdmin as Me, useErrorText as De, WxDate as ll, WxScreenHead as nl, WxRenameButton as al, WxHelpButton as ol, WxRowMenu as sl, adminKey as il, WxListScreen as rl } from "@webx-ui/module-admin";
4
+ import { WxIcon as be, WxSkeleton as We, WxText as F, WxBadge as ue, WxButton as ce, confirm as Ke, toast as G, useElementWidth as Ye, WxSegmented as Ct, WxCard as Be, WxPopover as ul, WxAlert as Vt, WxTabs as cl, WxTab as Le, WxCodeEditor as je, WxFormItem as ne, WxInput as Pe, WxSelect as Et, WxTextarea as dl, WxIconPicker as pl, WxInputNumber as dt, WxTagsInput as pt, WxSwitch as vl, WxActionBar as fl, useModal as Bt, WxDialog as Lt, WxEmpty as Wt, WxAction as Ie, WxSortableList as ml, createModal as At, WxDrawer as hl, WxSpace as bl, WxSkeletonItem as Fe } from "@webx-ui/core";
5
+ import { WxScreenRenderer as zt, coreTypes as Xe } from "@webx-ui/schema";
6
+ function Ae(t) {
7
+ const l = `${t.apiPath}/blocks`, o = (a) => a.data;
8
8
  return {
9
9
  list: () => t.http.get(l).then(o),
10
10
  catalog: () => t.http.get(`${l}/catalog`).then(o),
11
- get: (n) => t.http.get(`${l}/${n}`).then(o),
12
- create: (n) => t.http.post(l, n).then(o),
13
- update: (n, s) => t.http.put(`${l}/${n}`, s).then(o),
14
- remove: (n) => t.http.delete(`${l}/${n}`),
15
- publish: (n) => t.http.post(`${l}/${n}/publish`, {}).then(o),
16
- render: (n, s = {}) => t.http.post(`${l}/${n}/render`, s).then(o),
17
- usage: (n) => t.http.get(`${l}/${n}/usage`).then(o),
18
- versions: (n) => t.http.get(`${l}/${n}/versions`).then(o),
19
- version: (n, s) => t.http.get(`${l}/${n}/versions/${s}`).then(o),
20
- restore: (n, s) => t.http.post(`${l}/${n}/versions/${s}/restore`, {}).then(o)
11
+ get: (a) => t.http.get(`${l}/${a}`).then(o),
12
+ create: (a) => t.http.post(l, a).then(o),
13
+ update: (a, s) => t.http.put(`${l}/${a}`, s).then(o),
14
+ remove: (a) => t.http.delete(`${l}/${a}`),
15
+ publish: (a) => t.http.post(`${l}/${a}/publish`, {}).then(o),
16
+ render: (a, s = {}) => t.http.post(`${l}/${a}/render`, s).then(o),
17
+ usage: (a) => t.http.get(`${l}/${a}/usage`).then(o),
18
+ versions: (a) => t.http.get(`${l}/${a}/versions`).then(o),
19
+ version: (a, s) => t.http.get(`${l}/${a}/versions/${s}`).then(o),
20
+ restore: (a, s) => t.http.post(`${l}/${a}/versions/${s}/restore`, {}).then(o)
21
21
  };
22
22
  }
23
- const fl = { class: "wx-block-checks" }, ml = {
23
+ const gl = { class: "wx-block-checks" }, kl = {
24
24
  key: 0,
25
25
  class: "wx-block-checks__line is-error"
26
- }, hl = /* @__PURE__ */ le({
26
+ }, yl = /* @__PURE__ */ ae({
27
27
  __name: "BlockChecks",
28
28
  props: {
29
29
  file: {},
@@ -32,50 +32,50 @@ const fl = { class: "wx-block-checks" }, ml = {
32
32
  error: {}
33
33
  },
34
34
  setup(t) {
35
- const l = t, o = de("webx-blocks"), n = S(() => l.lints.filter((r) => r.file === l.file)), s = S(() => {
36
- const r = new Set(n.value.map((f) => f.code)), a = [];
37
- return l.file === "template" && (r.has("no-marker") || a.push(o("checks.ok-marker")), r.has("variables-missing") || a.push(o("checks.ok-variables"))), l.file === "styles" && (r.has("stray-selectors") || a.push(o("checks.ok-prefix", { slug: l.slug })), r.has("bare-selectors") || a.push(o("checks.ok-bare")), r.has("media-query") || a.push(o("checks.ok-container"))), a;
35
+ const l = t, o = de("webx-blocks"), a = T(() => l.lints.filter((r) => r.file === l.file)), s = T(() => {
36
+ const r = new Set(a.value.map((b) => b.code)), n = [];
37
+ return l.file === "template" && (r.has("no-marker") || n.push(o("checks.ok-marker")), r.has("variables-missing") || n.push(o("checks.ok-variables"))), l.file === "styles" && (r.has("stray-selectors") || n.push(o("checks.ok-prefix", { slug: l.slug })), r.has("bare-selectors") || n.push(o("checks.ok-bare")), r.has("media-query") || n.push(o("checks.ok-container"))), n;
38
38
  });
39
- return (r, a) => (i(), $("div", fl, [
40
- t.error ? (i(), $("div", ml, [
41
- u(e(he), { name: "close-circle" }),
42
- B("span", null, [
43
- W(w(t.error.message) + " ", 1),
44
- t.error.line !== null ? (i(), $(j, { key: 0 }, [
45
- W(" · " + w(e(o)("page.line", { line: t.error.line })), 1)
39
+ return (r, n) => (i(), S("div", gl, [
40
+ t.error ? (i(), S("div", kl, [
41
+ u(e(be), { name: "close-circle" }),
42
+ E("span", null, [
43
+ W(_(t.error.message) + " ", 1),
44
+ t.error.line !== null ? (i(), S(j, { key: 0 }, [
45
+ W(" · " + _(e(o)("page.line", { line: t.error.line })), 1)
46
46
  ], 64)) : N("", !0),
47
- t.error.where ? (i(), $(j, { key: 1 }, [
48
- W(" · " + w(t.error.where), 1)
47
+ t.error.where ? (i(), S(j, { key: 1 }, [
48
+ W(" · " + _(t.error.where), 1)
49
49
  ], 64)) : N("", !0)
50
50
  ])
51
51
  ])) : N("", !0),
52
- (i(!0), $(j, null, Q(n.value, (f) => (i(), $("div", {
53
- key: f.code,
52
+ (i(!0), S(j, null, ee(a.value, (b) => (i(), S("div", {
53
+ key: b.code,
54
54
  class: "wx-block-checks__line is-warning"
55
55
  }, [
56
- u(e(he), { name: "warning" }),
57
- B("span", null, [
58
- W(w(f.message) + " ", 1),
59
- f.line !== null ? (i(), $(j, { key: 0 }, [
60
- W(" · " + w(e(o)("page.line", { line: f.line })), 1)
56
+ u(e(be), { name: "warning" }),
57
+ E("span", null, [
58
+ W(_(b.message) + " ", 1),
59
+ b.line !== null ? (i(), S(j, { key: 0 }, [
60
+ W(" · " + _(e(o)("page.line", { line: b.line })), 1)
61
61
  ], 64)) : N("", !0)
62
62
  ])
63
63
  ]))), 128)),
64
- (i(!0), $(j, null, Q(s.value, (f) => (i(), $("div", {
65
- key: f,
64
+ (i(!0), S(j, null, ee(s.value, (b) => (i(), S("div", {
65
+ key: b,
66
66
  class: "wx-block-checks__line is-ok"
67
67
  }, [
68
- u(e(he), { name: "check" }),
69
- B("span", null, w(f), 1)
68
+ u(e(be), { name: "check" }),
69
+ E("span", null, _(b), 1)
70
70
  ]))), 128))
71
71
  ]));
72
72
  }
73
- }), ne = (t, l) => {
73
+ }), oe = (t, l) => {
74
74
  const o = t.__vccOpts || t;
75
- for (const [n, s] of l)
76
- o[n] = s;
75
+ for (const [a, s] of l)
76
+ o[a] = s;
77
77
  return o;
78
- }, dt = /* @__PURE__ */ ne(hl, [["__scopeId", "data-v-e56947a8"]]), bl = { class: "wx-block-history" }, gl = { class: "wx-block-history__number" }, kl = { class: "wx-block-history__who" }, yl = /* @__PURE__ */ le({
78
+ }, vt = /* @__PURE__ */ oe(yl, [["__scopeId", "data-v-e56947a8"]]), wl = { class: "wx-block-history" }, _l = { class: "wx-block-history__number" }, xl = { class: "wx-block-history__who" }, $l = /* @__PURE__ */ ae({
79
79
  __name: "BlockHistory",
80
80
  props: {
81
81
  block: {},
@@ -83,46 +83,46 @@ const fl = { class: "wx-block-checks" }, ml = {
83
83
  },
84
84
  emits: ["restored"],
85
85
  setup(t, { emit: l }) {
86
- const o = t, n = l, s = Ue(), r = Le(s), a = de("webx-blocks"), f = Me(), z = P(null);
86
+ const o = t, a = l, s = Me(), r = Ae(s), n = de("webx-blocks"), b = De(), P = U(null);
87
87
  async function v() {
88
- z.value = await r.versions(o.block.id);
88
+ P.value = await r.versions(o.block.id);
89
89
  }
90
- function d(m) {
91
- return o.block.draft?.number === m.number ? "draft" : o.block.published?.number === m.number ? "live" : "replaced";
90
+ function p(f) {
91
+ return o.block.draft?.number === f.number ? "draft" : o.block.published?.number === f.number ? "live" : "replaced";
92
92
  }
93
- async function b(m) {
94
- if (await Je({
95
- title: a("page.restore-title", { number: m.number }),
96
- message: a("page.restore-text"),
97
- confirmText: a("page.restore"),
98
- cancelText: a("page.cancel")
93
+ async function g(f) {
94
+ if (await Ke({
95
+ title: n("page.restore-title", { number: f.number }),
96
+ message: n("page.restore-text"),
97
+ confirmText: n("page.restore"),
98
+ cancelText: n("page.cancel")
99
99
  }))
100
100
  try {
101
- const T = await r.restore(o.block.id, m.number);
102
- q.success(a("page.restored", { number: T.draft?.number ?? m.number })), n("restored", T), await v();
103
- } catch (T) {
104
- q.danger(f(T));
101
+ const C = await r.restore(o.block.id, f.number);
102
+ G.success(n("page.restored", { number: C.draft?.number ?? f.number })), a("restored", C), await v();
103
+ } catch (C) {
104
+ G.danger(b(C));
105
105
  }
106
106
  }
107
- return Pe(v), ce(
107
+ return Ue(v), X(
108
108
  () => [o.block.draft?.number, o.block.published?.number],
109
109
  () => {
110
110
  v();
111
111
  }
112
- ), (m, h) => (i(), $("div", bl, [
113
- z.value === null ? (i(), I(e(We), {
112
+ ), (f, k) => (i(), S("div", wl, [
113
+ P.value === null ? (i(), I(e(We), {
114
114
  key: 0,
115
115
  class: "wx-block-history__ghost",
116
116
  rows: 3
117
- })) : (i(!0), $(j, { key: 1 }, Q(z.value, (T) => (i(), $("div", {
118
- key: T.number,
117
+ })) : (i(!0), S(j, { key: 1 }, ee(P.value, (C) => (i(), S("div", {
118
+ key: C.number,
119
119
  class: "wx-block-history__row"
120
120
  }, [
121
- B("code", gl, w(e(a)("page.version", { number: T.number })), 1),
122
- B("div", kl, [
121
+ E("code", _l, _(e(n)("page.version", { number: C.number })), 1),
122
+ E("div", xl, [
123
123
  u(e(F), null, {
124
- default: c(() => [
125
- W(w(e(a)(`page.version-${d(T)}`)), 1)
124
+ default: d(() => [
125
+ W(_(e(n)(`page.version-${p(C)}`)), 1)
126
126
  ]),
127
127
  _: 2
128
128
  }, 1024),
@@ -130,119 +130,119 @@ const fl = { class: "wx-block-checks" }, ml = {
130
130
  size: "sm",
131
131
  tone: "muted"
132
132
  }, {
133
- default: c(() => [
134
- T.created_at ? (i(), I(e(Qt), {
133
+ default: d(() => [
134
+ C.created_at ? (i(), I(e(ll), {
135
135
  key: 0,
136
- value: T.created_at
136
+ value: C.created_at
137
137
  }, null, 8, ["value"])) : N("", !0),
138
- W(" · " + w(T.author ?? e(a)(`page.source-${T.source}`)) + " ", 1),
139
- T.comment ? (i(), $(j, { key: 1 }, [
140
- W(" · " + w(T.comment), 1)
138
+ W(" · " + _(C.author ?? e(n)(`page.source-${C.source}`)) + " ", 1),
139
+ C.comment ? (i(), S(j, { key: 1 }, [
140
+ W(" · " + _(C.comment), 1)
141
141
  ], 64)) : N("", !0)
142
142
  ]),
143
143
  _: 2
144
144
  }, 1024)
145
145
  ]),
146
- d(T) === "draft" ? (i(), I(e(re), {
146
+ p(C) === "draft" ? (i(), I(e(ue), {
147
147
  key: 0,
148
148
  type: "warning",
149
149
  dot: ""
150
150
  }, {
151
- default: c(() => [
152
- W(w(e(a)("page.version-draft")), 1)
151
+ default: d(() => [
152
+ W(_(e(n)("page.version-draft")), 1)
153
153
  ]),
154
154
  _: 1
155
- })) : d(T) === "live" ? (i(), I(e(re), {
155
+ })) : p(C) === "live" ? (i(), I(e(ue), {
156
156
  key: 1,
157
157
  type: "success",
158
158
  dot: ""
159
159
  }, {
160
- default: c(() => [
161
- W(w(e(a)("page.version-live")), 1)
160
+ default: d(() => [
161
+ W(_(e(n)("page.version-live")), 1)
162
162
  ]),
163
163
  _: 1
164
164
  })) : N("", !0),
165
- t.canManage && d(T) === "replaced" ? (i(), I(e(ue), {
165
+ t.canManage && p(C) === "replaced" ? (i(), I(e(ce), {
166
166
  key: 2,
167
167
  size: "sm",
168
168
  variant: "outline",
169
- onClick: (V) => b(T)
169
+ onClick: (V) => g(C)
170
170
  }, {
171
- default: c(() => [
172
- W(w(e(a)("page.restore")), 1)
171
+ default: d(() => [
172
+ W(_(e(n)("page.restore")), 1)
173
173
  ]),
174
174
  _: 1
175
175
  }, 8, ["onClick"])) : N("", !0)
176
176
  ]))), 128))
177
177
  ]));
178
178
  }
179
- }), wl = /* @__PURE__ */ ne(yl, [["__scopeId", "data-v-42c6b7ad"]]), Ie = "wx-preview-selected", qe = "wx-preview-hover", pt = "wx-preview-style";
180
- function Lt(t, l) {
181
- const n = (t.ownerDocument ?? t).createTreeWalker(
179
+ }), Sl = /* @__PURE__ */ oe($l, [["__scopeId", "data-v-42c6b7ad"]]), Ne = "wx-preview-selected", Je = "wx-preview-hover", ft = "wx-preview-style";
180
+ function It(t, l) {
181
+ const a = (t.ownerDocument ?? t).createTreeWalker(
182
182
  t,
183
183
  128
184
184
  /* NodeFilter.SHOW_COMMENT */
185
185
  );
186
186
  let s = null;
187
- for (let r = n.nextNode(); r; r = n.nextNode()) {
188
- const a = r.data.trim();
189
- if (s === null && a === `wx:${l}`)
187
+ for (let r = a.nextNode(); r; r = a.nextNode()) {
188
+ const n = r.data.trim();
189
+ if (s === null && n === `wx:${l}`)
190
190
  s = r;
191
- else if (s !== null && a === `/wx:${l}`)
191
+ else if (s !== null && n === `/wx:${l}`)
192
192
  return { start: s, end: r };
193
193
  }
194
194
  return null;
195
195
  }
196
- function _l(t, l, o) {
197
- const n = Lt(t, l);
198
- if (!n) return !1;
199
- const s = n.start.parentNode;
196
+ function Nt(t, l, o) {
197
+ const a = It(t, l);
198
+ if (!a) return !1;
199
+ const s = a.start.parentNode;
200
200
  if (!s) return !1;
201
201
  const r = t.createElement("template");
202
202
  r.innerHTML = o;
203
- const a = n.end.nextSibling;
204
- let f = n.start;
205
- for (; f; ) {
206
- const b = f.nextSibling, m = f === n.end;
207
- if (s.removeChild(f), m) break;
208
- f = b;
203
+ const n = a.end.nextSibling;
204
+ let b = a.start;
205
+ for (; b; ) {
206
+ const g = b.nextSibling, f = b === a.end;
207
+ if (s.removeChild(b), f) break;
208
+ b = g;
209
209
  }
210
- const z = r.content, v = Array.from(z.childNodes);
211
- s.insertBefore(z, a);
212
- const d = t.defaultView?.webx;
213
- if (d?.mount)
214
- for (const b of v)
215
- b.nodeType === 1 && d.mount(b);
210
+ const P = r.content, v = Array.from(P.childNodes);
211
+ s.insertBefore(P, n);
212
+ const p = t.defaultView?.webx;
213
+ if (p?.mount)
214
+ for (const g of v)
215
+ g.nodeType === 1 && p.mount(g);
216
216
  return !0;
217
217
  }
218
- function lt(t, l) {
219
- const o = Lt(t, l);
218
+ function at(t, l) {
219
+ const o = It(t, l);
220
220
  if (!o) return null;
221
- for (let n = o.start.nextSibling; n && n !== o.end; n = n.nextSibling)
222
- if (n.nodeType === 1) return n;
221
+ for (let a = o.start.nextSibling; a && a !== o.end; a = a.nextSibling)
222
+ if (a.nodeType === 1) return a;
223
223
  return null;
224
224
  }
225
- function Qe(t, l) {
226
- nt(t);
227
- for (const n of Array.from(t.querySelectorAll(`.${Ie}`)))
228
- n.classList.remove(Ie);
225
+ function et(t, l) {
226
+ ot(t);
227
+ for (const a of Array.from(t.querySelectorAll(`.${Ne}`)))
228
+ a.classList.remove(Ne);
229
229
  if (l === null) return null;
230
- const o = lt(t, l);
231
- return o?.classList.add(Ie), o;
230
+ const o = at(t, l);
231
+ return o?.classList.add(Ne), o;
232
232
  }
233
- function vt(t, l) {
234
- nt(t);
235
- for (const o of Array.from(t.querySelectorAll(`.${qe}`)))
236
- o.classList.remove(qe);
237
- l !== null && lt(t, l)?.classList.add(qe);
233
+ function mt(t, l) {
234
+ ot(t);
235
+ for (const o of Array.from(t.querySelectorAll(`.${Je}`)))
236
+ o.classList.remove(Je);
237
+ l !== null && at(t, l)?.classList.add(Je);
238
238
  }
239
- function ft(t) {
239
+ function ht(t) {
240
240
  let l = t?.nodeType === 1 ? t : t?.parentElement ?? null;
241
241
  for (; l; ) {
242
242
  let o = 0;
243
- for (let n = l.previousSibling; n; n = n.previousSibling) {
244
- if (n.nodeType !== 8) continue;
245
- const s = n.data.trim();
243
+ for (let a = l.previousSibling; a; a = a.previousSibling) {
244
+ if (a.nodeType !== 8) continue;
245
+ const s = a.data.trim();
246
246
  if (s.startsWith("/wx:"))
247
247
  o += 1;
248
248
  else if (s.startsWith("wx:")) {
@@ -254,101 +254,149 @@ function ft(t) {
254
254
  }
255
255
  return null;
256
256
  }
257
- function xl(t, l) {
258
- nt(t);
257
+ function Tl(t, l) {
258
+ ot(t);
259
259
  let o = null;
260
- function n(f) {
261
- f.preventDefault(), f.stopPropagation();
262
- }
263
- function s(f) {
264
- n(f), l.select(ft(f.target));
260
+ function a(n) {
261
+ he(n), l.select(ht(n.target));
265
262
  }
266
- function r(f) {
267
- const z = ft(f.target);
268
- z !== o && (o = z, vt(t, z));
263
+ function s(n) {
264
+ const b = ht(n.target);
265
+ b !== o && (o = b, mt(t, b));
269
266
  }
270
- function a() {
271
- o = null, vt(t, null);
267
+ function r() {
268
+ o = null, mt(t, null);
272
269
  }
273
- return t.addEventListener("click", s, !0), t.addEventListener("auxclick", n, !0), t.addEventListener("submit", n, !0), t.addEventListener("dragstart", n, !0), t.addEventListener("mousemove", r, !0), t.addEventListener("mouseleave", a), {
270
+ return t.addEventListener("click", a, !0), t.addEventListener("auxclick", he, !0), t.addEventListener("submit", he, !0), t.addEventListener("dragstart", he, !0), t.addEventListener("mousemove", s, !0), t.addEventListener("mouseleave", r), {
274
271
  release() {
275
- t.removeEventListener("click", s, !0), t.removeEventListener("auxclick", n, !0), t.removeEventListener("submit", n, !0), t.removeEventListener("dragstart", n, !0), t.removeEventListener("mousemove", r, !0), t.removeEventListener("mouseleave", a);
272
+ t.removeEventListener("click", a, !0), t.removeEventListener("auxclick", he, !0), t.removeEventListener("submit", he, !0), t.removeEventListener("dragstart", he, !0), t.removeEventListener("mousemove", s, !0), t.removeEventListener("mouseleave", r);
276
273
  }
277
274
  };
278
275
  }
279
- function nt(t) {
280
- if (t.getElementById(pt)) return;
276
+ function he(t) {
277
+ t.preventDefault(), t.stopPropagation();
278
+ }
279
+ function Cl(t) {
280
+ const l = ["click", "auxclick", "submit", "dragstart"];
281
+ for (const o of l) t.addEventListener(o, he, !0);
282
+ return {
283
+ release() {
284
+ for (const o of l) t.removeEventListener(o, he, !0);
285
+ }
286
+ };
287
+ }
288
+ const tt = "sample", bt = "wx-stage-styles";
289
+ function Vl(t, l) {
290
+ let o = t.getElementById(bt);
291
+ o === null && (o = t.createElement("style"), o.id = bt, (t.head ?? t.documentElement).appendChild(o)), o.textContent = l.styles;
292
+ const a = `<!--wx:${tt}-->`, s = l.html.trimStart().startsWith(a) ? l.html : `${a}${l.html}<!--/wx:${tt}-->`;
293
+ return Nt(t, tt, s);
294
+ }
295
+ function El(t, l) {
296
+ const o = t.createElement("script");
297
+ o.textContent = l, t.body.appendChild(o);
298
+ }
299
+ function ot(t) {
300
+ if (t.getElementById(ft)) return;
281
301
  const l = t.createElement("style");
282
- l.id = pt, l.textContent = `.${Ie}{outline:2px solid #427edd;outline-offset:-2px;}.${qe}:not(.${Ie}){outline:1px solid #427edd;outline-offset:-1px;cursor:pointer;}`, (t.head ?? t.documentElement).appendChild(l);
302
+ l.id = ft, l.textContent = `.${Ne}{outline:2px solid #427edd;outline-offset:-2px;}.${Je}:not(.${Ne}){outline:1px solid #427edd;outline-offset:-1px;cursor:pointer;}`, (t.head ?? t.documentElement).appendChild(l);
283
303
  }
284
- function At(t) {
285
- const l = t.base ? `<base href="${mt(t.base)}">` : "", o = t.frame ? `<style>${t.frame}</style>` : "", n = t.script && t.runtime ? `<script src="${mt(t.runtime)}"><\/script><script>${t.script}<\/script>` : "";
286
- return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">${l}<style>html,body{margin:0}body{container-type:inline-size}</style>${o}<style>${t.styles}</style></head><body>${t.html}${n}</body></html>`;
304
+ function Pt(t) {
305
+ const l = t.base ? `<base href="${gt(t.base)}">` : "", o = t.frame ? `<style>${t.frame}</style>` : "", a = t.script && t.runtime ? `<script src="${gt(t.runtime)}"><\/script><script>${t.script}<\/script>` : "";
306
+ return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">${l}<style>html,body{margin:0}body{container-type:inline-size}</style>${o}<style>${t.styles}</style></head><body>${t.html}${a}</body></html>`;
287
307
  }
288
- function mt(t) {
308
+ function gt(t) {
289
309
  return t.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;");
290
310
  }
291
- const $l = { class: "wx-block-stage" }, Sl = { class: "wx-block-stage__bar" }, Tl = ["srcdoc", "title"], Cl = /* @__PURE__ */ le({
311
+ const Bl = { class: "wx-block-stage" }, Ll = { class: "wx-block-stage__bar" }, Wl = ["src", "srcdoc", "title"], Al = /* @__PURE__ */ ae({
292
312
  __name: "BlockStage",
293
313
  props: {
294
314
  html: {},
295
315
  styles: {},
296
316
  script: { default: null },
297
317
  runtime: { default: null },
318
+ stage: { default: null },
298
319
  loading: { type: Boolean, default: !1 }
299
320
  },
300
321
  setup(t) {
301
- const l = t, o = de("webx-blocks"), n = S(() => [
322
+ const l = t, o = de("webx-blocks"), a = T(() => [
302
323
  { value: 1280, icon: "monitor", ariaLabel: o("page.width-desktop") },
303
324
  { value: 834, icon: "tablet", ariaLabel: o("page.width-tablet") },
304
325
  { value: 390, icon: "smartphone", ariaLabel: o("page.width-phone") }
305
- ]), s = P(1280), r = P(null), a = P(null), f = Ke(r), z = P(360), v = P(!1);
306
- ce([f, n], () => {
307
- if (v.value || f.value === 0) return;
308
- const p = n.value.find((k) => f.value / k.value >= 0.45);
309
- s.value = (p ?? n.value[n.value.length - 1]).value;
326
+ ]), s = U(1280), r = U(null), n = U(null), b = Ye(r), P = U(360), v = U(!1);
327
+ X([b, a], () => {
328
+ if (v.value || b.value === 0) return;
329
+ const c = a.value.find((B) => b.value / B.value >= 0.45);
330
+ s.value = (c ?? a.value[a.value.length - 1]).value;
310
331
  });
311
- function d(p) {
312
- v.value = !0, s.value = p;
332
+ function p(c) {
333
+ v.value = !0, s.value = c;
313
334
  }
314
- const b = S(() => f.value === 0 ? 1 : Math.min(1, f.value / s.value)), m = S(
315
- () => At({
335
+ const g = T(() => b.value === 0 ? 1 : Math.min(1, b.value / s.value)), f = T(
336
+ () => l.stage ? void 0 : Pt({
316
337
  html: l.html,
317
338
  styles: l.styles,
318
339
  script: l.script,
319
340
  runtime: l.runtime,
320
341
  base: typeof location > "u" ? null : location.origin + "/"
321
342
  })
343
+ ), k = U(0);
344
+ let C = null;
345
+ X(
346
+ () => l.script,
347
+ (c) => {
348
+ l.stage && c !== C && (k.value += 1);
349
+ }
322
350
  );
323
- function h() {
324
- const p = a.value?.contentDocument?.body;
325
- p && (z.value = Math.max(120, p.scrollHeight));
351
+ function V() {
352
+ const c = n.value?.contentDocument?.body;
353
+ if (!c) return;
354
+ const B = c.ownerDocument.defaultView, D = B && parseFloat(B.getComputedStyle(c).marginBottom) || 0, K = c.getBoundingClientRect().bottom + D + (B?.scrollY ?? 0);
355
+ P.value = Math.max(120, Math.ceil(Math.max(c.scrollHeight, K)));
326
356
  }
327
- function T() {
328
- h(), setTimeout(h, 300);
357
+ let x = null, m = null;
358
+ function y() {
359
+ x?.release(), x = null, m?.disconnect(), m = null;
329
360
  }
330
- ce(s, () => setTimeout(h, 50)), ce(f, (p, k) => {
331
- p > 0 && k === 0 && setTimeout(h, 50);
332
- });
333
- const V = S(() => ({
361
+ function R(c) {
362
+ l.stage && (l.script && C !== l.script && (C = l.script, El(c, l.script)), Vl(c, { html: l.html, styles: l.styles }));
363
+ }
364
+ function q() {
365
+ y();
366
+ const c = n.value?.contentDocument;
367
+ if (!c?.body) return;
368
+ l.stage && (C = null, x = Cl(c), R(c)), V();
369
+ const B = c.defaultView?.ResizeObserver;
370
+ B && (m = new B(() => V()), m.observe(c.body));
371
+ }
372
+ X(
373
+ () => [l.html, l.styles],
374
+ () => {
375
+ const c = n.value?.contentDocument;
376
+ l.stage && c?.body && x !== null && R(c);
377
+ }
378
+ ), X(b, (c, B) => {
379
+ c > 0 && B === 0 && setTimeout(V, 50);
380
+ }), X(s, () => setTimeout(V, 50)), Ge(y);
381
+ const J = T(() => ({
334
382
  width: `${s.value}px`,
335
- height: `${z.value}px`,
336
- transform: `scale(${b.value})`
337
- })), x = S(() => ({
338
- width: `${Math.round(s.value * b.value)}px`,
339
- height: `${Math.round(z.value * b.value)}px`
383
+ height: `${P.value}px`,
384
+ transform: `scale(${g.value})`
385
+ })), Z = T(() => ({
386
+ width: `${Math.round(s.value * g.value)}px`,
387
+ height: `${Math.round(P.value * g.value)}px`
340
388
  }));
341
- return (p, k) => (i(), $("div", $l, [
342
- B("div", Sl, [
343
- u(e($t), {
389
+ return (c, B) => (i(), S("div", Bl, [
390
+ E("div", Ll, [
391
+ u(e(Ct), {
344
392
  "model-value": s.value,
345
- options: n.value,
393
+ options: a.value,
346
394
  size: "sm",
347
395
  "aria-label": e(o)("page.width"),
348
- "onUpdate:modelValue": k[0] || (k[0] = (R) => d(Number(R)))
396
+ "onUpdate:modelValue": B[0] || (B[0] = (D) => p(Number(D)))
349
397
  }, null, 8, ["model-value", "options", "aria-label"])
350
398
  ]),
351
- B("div", {
399
+ E("div", {
352
400
  ref_key: "box",
353
401
  ref: r,
354
402
  class: "wx-block-stage__ground"
@@ -356,123 +404,125 @@ const $l = { class: "wx-block-stage" }, Sl = { class: "wx-block-stage__bar" }, T
356
404
  t.loading && !t.html ? (i(), I(e(We), {
357
405
  key: 0,
358
406
  rows: 3
359
- })) : (i(), $("div", {
407
+ })) : (i(), S("div", {
360
408
  key: 1,
361
409
  class: "wx-block-stage__clip",
362
- style: _e(x.value)
410
+ style: xe(Z.value)
363
411
  }, [
364
- B("iframe", {
412
+ (i(), S("iframe", {
365
413
  ref_key: "frame",
366
- ref: a,
414
+ ref: n,
415
+ key: k.value,
367
416
  class: "wx-block-stage__frame",
368
- srcdoc: m.value,
369
- style: _e(V.value),
417
+ src: t.stage ?? void 0,
418
+ srcdoc: f.value,
419
+ style: xe(J.value),
370
420
  sandbox: "allow-same-origin allow-scripts",
371
421
  title: e(o)("page.preview"),
372
- onLoad: T
373
- }, null, 44, Tl)
422
+ onLoad: q
423
+ }, null, 44, Wl))
374
424
  ], 4))
375
425
  ], 512)
376
426
  ]));
377
427
  }
378
- }), Vl = /* @__PURE__ */ ne(Cl, [["__scopeId", "data-v-f7b592c6"]]);
379
- function zt(t) {
428
+ }), zl = /* @__PURE__ */ oe(Al, [["__scopeId", "data-v-3185ee45"]]);
429
+ function Ut(t) {
380
430
  return typeof t == "object" && t !== null && typeof t.type == "string" && t.type !== "";
381
431
  }
382
432
  function Ze(t) {
383
- return Array.isArray(t) && t.length > 0 && t.every(zt);
433
+ return Array.isArray(t) && t.length > 0 && t.every(Ut);
384
434
  }
385
- function Xe() {
435
+ function lt() {
386
436
  return (typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID().replace(/-/g, "") : Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2)).slice(0, 12);
387
437
  }
388
- function Bl(t, l = {}) {
389
- return { key: Xe(), type: t, values: l };
438
+ function Il(t, l = {}) {
439
+ return { key: lt(), type: t, values: l };
390
440
  }
391
- function ie(t, l) {
392
- return It(t, l, null, null);
441
+ function re(t, l) {
442
+ return Mt(t, l, null, null);
393
443
  }
394
- function It(t, l, o, n) {
444
+ function Mt(t, l, o, a) {
395
445
  for (let s = 0; s < t.length; s++) {
396
446
  const r = t[s];
397
- if (r.key === l) return { node: r, parent: o, field: n, list: t, index: s };
398
- for (const [a, f] of Object.entries(r.values ?? {}))
399
- if (Ze(f)) {
400
- const z = It(f, l, r, a);
401
- if (z) return z;
447
+ if (r.key === l) return { node: r, parent: o, field: a, list: t, index: s };
448
+ for (const [n, b] of Object.entries(r.values ?? {}))
449
+ if (Ze(b)) {
450
+ const P = Mt(b, l, r, n);
451
+ if (P) return P;
402
452
  }
403
453
  }
404
454
  return null;
405
455
  }
406
- function De(t, l, o = 0, n = null) {
456
+ function Oe(t, l, o = 0, a = null) {
407
457
  for (const s of t)
408
- if (zt(s)) {
409
- l(s, o, n);
458
+ if (Ut(s)) {
459
+ l(s, o, a);
410
460
  for (const r of Object.values(s.values ?? {}))
411
- Ze(r) && De(r, l, o + 1, s);
461
+ Ze(r) && Oe(r, l, o + 1, s);
412
462
  }
413
463
  }
414
- function El(t, l) {
464
+ function Nl(t, l) {
415
465
  let o = 0;
416
- return De(t, (n) => {
417
- n.type === l && o++;
466
+ return Oe(t, (a) => {
467
+ a.type === l && o++;
418
468
  }), o;
419
469
  }
420
- function Wl(t) {
470
+ function Pl(t) {
421
471
  let l = 0;
422
472
  for (const o of Object.values(t.values ?? {}))
423
- Ze(o) && De(o, () => l++);
473
+ Ze(o) && Oe(o, () => l++);
424
474
  return l;
425
475
  }
426
- function ma(t) {
476
+ function wa(t) {
427
477
  const l = [];
428
- return De(t, (o) => {
478
+ return Oe(t, (o) => {
429
479
  l.includes(o.type) || l.push(o.type);
430
480
  }), l;
431
481
  }
432
- function Nt(t) {
482
+ function Dt(t) {
433
483
  const l = [];
434
484
  for (const o of t)
435
- o.type === "wx-blocks" && l.push(o), o.children && l.push(...Nt(o.children));
485
+ o.type === "wx-blocks" && l.push(o), o.children && l.push(...Dt(o.children));
436
486
  return l;
437
487
  }
438
- function Pt(t) {
488
+ function Ot(t) {
439
489
  const l = {};
440
- for (const [o, n] of Object.entries(t.values ?? {}))
441
- l[o] = Ze(n) ? n.map(Pt) : be(n);
442
- return t.hidden === !0 ? { key: Xe(), type: t.type, hidden: !0, values: l } : { key: Xe(), type: t.type, values: l };
490
+ for (const [o, a] of Object.entries(t.values ?? {}))
491
+ l[o] = Ze(a) ? a.map(Ot) : ge(a);
492
+ return t.hidden === !0 ? { key: lt(), type: t.type, hidden: !0, values: l } : { key: lt(), type: t.type, values: l };
443
493
  }
444
- function Ll(t, l, o) {
445
- const n = be(t), s = ie(n, l);
446
- return s ? (o ? s.node.hidden = !0 : delete s.node.hidden, n) : t;
494
+ function Ul(t, l, o) {
495
+ const a = ge(t), s = re(a, l);
496
+ return s ? (o ? s.node.hidden = !0 : delete s.node.hidden, a) : t;
447
497
  }
448
- function Al(t, l, o) {
498
+ function Ml(t, l, o) {
449
499
  if (l === null) return t;
450
- const n = ie(t, l);
451
- if (!n || o === null) return null;
452
- const s = n.node.values[o];
453
- return Array.isArray(s) || (n.node.values[o] = []), n.node.values[o];
500
+ const a = re(t, l);
501
+ if (!a || o === null) return null;
502
+ const s = a.node.values[o];
503
+ return Array.isArray(s) || (a.node.values[o] = []), a.node.values[o];
454
504
  }
455
- function ht(t, l, o, n, s) {
456
- const r = be(t), a = Al(r, l, o);
457
- return a ? (a.splice(Math.max(0, Math.min(n, a.length)), 0, s), r) : t;
505
+ function kt(t, l, o, a, s) {
506
+ const r = ge(t), n = Ml(r, l, o);
507
+ return n ? (n.splice(Math.max(0, Math.min(a, n.length)), 0, s), r) : t;
458
508
  }
459
- function zl(t, l) {
460
- const o = be(t), n = ie(o, l);
461
- return n ? (n.list.splice(n.index, 1), o) : t;
509
+ function Dl(t, l) {
510
+ const o = ge(t), a = re(o, l);
511
+ return a ? (a.list.splice(a.index, 1), o) : t;
462
512
  }
463
- function Il(t, l, o) {
464
- const n = be(t), s = ie(n, l);
465
- return s ? (s.node.values = o, n) : t;
513
+ function Ol(t, l, o) {
514
+ const a = ge(t), s = re(a, l);
515
+ return s ? (s.node.values = o, a) : t;
466
516
  }
467
- function Nl(t, l, o, n) {
468
- if (l === null) return be(n);
469
- const s = be(t), r = ie(s, l);
470
- return !r || o === null ? t : (r.node.values[o] = be(n), s);
517
+ function Rl(t, l, o, a) {
518
+ if (l === null) return ge(a);
519
+ const s = ge(t), r = re(s, l);
520
+ return !r || o === null ? t : (r.node.values[o] = ge(a), s);
471
521
  }
472
- function be(t) {
522
+ function ge(t) {
473
523
  return t === void 0 ? t : JSON.parse(JSON.stringify(t));
474
524
  }
475
- const Pl = {
525
+ const Hl = {
476
526
  module: {
477
527
  title: "Blocks"
478
528
  },
@@ -628,130 +678,130 @@ const Pl = {
628
678
  "ok-container": "Width is decided by container queries.",
629
679
  "ok-variables": "Every variable of the template is a field of the schema."
630
680
  }
631
- }, bt = /* @__PURE__ */ new WeakSet();
632
- function Oe() {
681
+ }, yt = /* @__PURE__ */ new WeakSet();
682
+ function Re() {
633
683
  try {
634
- const { i18n: t } = Ue();
635
- bt.has(t) || (t.defaults("webx-blocks", Pl), bt.add(t));
684
+ const { i18n: t } = Me();
685
+ yt.has(t) || (t.defaults("webx-blocks", Hl), yt.add(t));
636
686
  } catch {
637
687
  }
638
688
  }
639
- const Ul = ["block", "entity", "loop", "__env", "errors", "app"];
640
- function Ml(t, l, o) {
641
- const n = [];
642
- /data-wx-block\s*=/.test(l.template) || n.push({ file: "template", code: "no-marker", line: null, message: o("checks.no-marker") });
643
- const s = Dl(l.template, l.schema);
644
- s.length > 0 && n.push({
689
+ const jl = ["block", "entity", "loop", "__env", "errors", "app"];
690
+ function Fl(t, l, o) {
691
+ const a = [];
692
+ /data-wx-block\s*=/.test(l.template) || a.push({ file: "template", code: "no-marker", line: null, message: o("checks.no-marker") });
693
+ const s = ql(l.template, l.schema);
694
+ s.length > 0 && a.push({
645
695
  file: "template",
646
696
  code: "variables-missing",
647
697
  line: null,
648
698
  message: o("checks.variables-missing", {
649
- variables: s.map((d) => `$${d}`).join(", ")
699
+ variables: s.map((p) => `$${p}`).join(", ")
650
700
  })
651
701
  });
652
- const r = [], a = [], f = `.b-${t}`;
653
- for (const [d, b] of Ol(l.styles))
654
- d.startsWith(f) || d.startsWith("&") || (/^[a-z][a-z0-9-]*/i.test(d) ? a.push([d, b]) : r.push([d, b]));
655
- r.length > 0 && n.push({
702
+ const r = [], n = [], b = `.b-${t}`;
703
+ for (const [p, g] of Jl(l.styles))
704
+ p.startsWith(b) || p.startsWith("&") || (/^[a-z][a-z0-9-]*/i.test(p) ? n.push([p, g]) : r.push([p, g]));
705
+ r.length > 0 && a.push({
656
706
  file: "styles",
657
707
  code: "stray-selectors",
658
708
  line: r[0][1],
659
- message: o("checks.stray-selectors", { slug: t, selectors: gt(r) })
660
- }), a.length > 0 && n.push({
709
+ message: o("checks.stray-selectors", { slug: t, selectors: wt(r) })
710
+ }), n.length > 0 && a.push({
661
711
  file: "styles",
662
712
  code: "bare-selectors",
663
- line: a[0][1],
664
- message: o("checks.bare-selectors", { selectors: gt(a) })
713
+ line: n[0][1],
714
+ message: o("checks.bare-selectors", { selectors: wt(n) })
665
715
  });
666
- const z = Mt(l.styles), v = /@media\b/.exec(z);
667
- return v && n.push({
716
+ const P = Ht(l.styles), v = /@media\b/.exec(P);
717
+ return v && a.push({
668
718
  file: "styles",
669
719
  code: "media-query",
670
- line: Dt(z, v.index),
720
+ line: jt(P, v.index),
671
721
  message: o("checks.media-query")
672
- }), n;
722
+ }), a;
673
723
  }
674
- function Ut(t) {
724
+ function Rt(t) {
675
725
  const l = [];
676
726
  for (const o of t)
677
- o.id && l.push(o.id), o.children && l.push(...Ut(o.children));
727
+ o.id && l.push(o.id), o.children && l.push(...Rt(o.children));
678
728
  return l;
679
729
  }
680
- function Dl(t, l) {
681
- const o = /* @__PURE__ */ new Set([...Ut(l), ...Ul]);
730
+ function ql(t, l) {
731
+ const o = /* @__PURE__ */ new Set([...Rt(l), ...jl]);
682
732
  for (const s of t.matchAll(/\bas\s+\$([a-zA-Z_]\w*)(?:\s*=>\s*\$([a-zA-Z_]\w*))?/g))
683
733
  o.add(s[1]), s[2] && o.add(s[2]);
684
734
  for (const s of t.matchAll(/\$([a-zA-Z_]\w*)\s*(?:=[^=]|\+\+|--|\.=|\+=|-=)/g))
685
735
  o.add(s[1]);
686
- const n = [];
736
+ const a = [];
687
737
  for (const s of t.matchAll(/\$([a-zA-Z_]\w*)/g)) {
688
738
  const r = s[1];
689
- !o.has(r) && !n.includes(r) && n.push(r);
739
+ !o.has(r) && !a.includes(r) && a.push(r);
690
740
  }
691
- return n;
741
+ return a;
692
742
  }
693
- function Ol(t) {
694
- const l = Mt(t), o = [];
695
- for (const n of l.matchAll(/([^{};]+)\{/g)) {
696
- const s = n[1], r = s.trim();
743
+ function Jl(t) {
744
+ const l = Ht(t), o = [];
745
+ for (const a of l.matchAll(/([^{};]+)\{/g)) {
746
+ const s = a[1], r = s.trim();
697
747
  if (!(r === "" || r.startsWith("@")))
698
- for (const a of s.split(",")) {
699
- const f = a.trim();
700
- f === "" || f === "from" || f === "to" || f.endsWith("%") || o.push([f, Dt(l, n.index + s.indexOf(f))]);
748
+ for (const n of s.split(",")) {
749
+ const b = n.trim();
750
+ b === "" || b === "from" || b === "to" || b.endsWith("%") || o.push([b, jt(l, a.index + s.indexOf(b))]);
701
751
  }
702
752
  }
703
753
  return o;
704
754
  }
705
- function Mt(t) {
755
+ function Ht(t) {
706
756
  return t.replace(/\/\*[\s\S]*?\*\//g, (l) => l.replace(/[^\n]/g, " "));
707
757
  }
708
- function Dt(t, l) {
758
+ function jt(t, l) {
709
759
  return t.slice(0, Math.max(0, l)).split(`
710
760
  `).length;
711
761
  }
712
- function gt(t) {
762
+ function wt(t) {
713
763
  const l = [...new Set(t.map(([o]) => o))];
714
764
  return l.slice(0, 3).join(", ") + (l.length > 3 ? ", …" : "");
715
765
  }
716
- function at(t) {
766
+ function st(t) {
717
767
  return t.map((l) => ({
718
768
  ...l,
719
769
  name: l.name ?? l.id,
720
- children: l.children ? at(l.children) : l.children
770
+ children: l.children ? st(l.children) : l.children
721
771
  }));
722
772
  }
723
- function et(t, l) {
773
+ function nt(t, l) {
724
774
  return t === 0 ? l("page.not-used") : t === 1 ? l("page.on-page") : l("page.on-pages", { count: t });
725
775
  }
726
- function Ae(t, l) {
727
- const o = `groups.${t}`, n = l(o);
728
- return n === o || n === `webx-blocks::${o}` ? t.charAt(0).toUpperCase() + t.slice(1) : n;
776
+ function ze(t, l) {
777
+ const o = `groups.${t}`, a = l(o);
778
+ return a === o || a === `webx-blocks::${o}` ? t.charAt(0).toUpperCase() + t.slice(1) : a;
729
779
  }
730
- const Rl = { class: "wx-block-editor" }, Hl = { class: "wx-block-editor__split" }, jl = {
780
+ const Kl = { class: "wx-block-editor" }, Gl = { class: "wx-block-editor__split" }, Yl = {
731
781
  type: "button",
732
782
  class: "wx-block-editor__uses"
733
- }, Fl = { class: "wx-block-editor__usage" }, ql = { class: "wx-block-editor__pane" }, Jl = {
783
+ }, Zl = { class: "wx-block-editor__usage" }, Ql = { class: "wx-block-editor__pane" }, Xl = {
734
784
  key: 0,
735
785
  class: "wx-block-editor__pills"
736
- }, Kl = ["disabled", "onClick", "textContent"], Zl = { class: "wx-block-editor__pane" }, Gl = { class: "wx-block-editor__pane" }, Yl = { class: "wx-block-editor__note" }, Ql = { class: "wx-block-editor__split" }, Xl = { class: "wx-block-editor__pane" }, en = { class: "wx-block-editor__note" }, tn = { class: "wx-block-editor__settings" }, ln = {
786
+ }, en = ["disabled", "onClick", "textContent"], tn = { class: "wx-block-editor__pane" }, ln = { class: "wx-block-editor__pane" }, nn = { class: "wx-block-editor__note" }, an = { class: "wx-block-editor__split" }, on = { class: "wx-block-editor__pane" }, sn = { class: "wx-block-editor__note" }, rn = { class: "wx-block-editor__settings" }, un = {
737
787
  key: 0,
738
788
  class: "is-wide wx-block-editor__danger"
739
- }, nn = /* @__PURE__ */ le({
789
+ }, cn = /* @__PURE__ */ ae({
740
790
  __name: "BlockEditorPage",
741
791
  props: {
742
792
  base: { default: "/blocks" }
743
793
  },
744
794
  setup(t) {
745
- const l = t, o = Ue(), n = Le(o), s = Yt(), r = xt();
746
- Oe();
747
- const a = de("webx-blocks"), f = Me(), z = S(() => Number(s.params.id)), v = P(null), d = P([]), b = P(!0), m = P(!1), h = P(!1), T = P("template"), V = S(() => {
748
- const L = o.state.manifest?.modules.find((g) => g.id === "blocks")?.meta;
795
+ const l = t, o = Me(), a = Ae(o), s = tl(), r = Tt();
796
+ Re();
797
+ const n = de("webx-blocks"), b = De(), P = T(() => Number(s.params.id)), v = U(null), p = U([]), g = U(!0), f = U(!1), k = U(!1), C = U("template"), V = T(() => {
798
+ const A = o.state.manifest?.modules.find((h) => h.id === "blocks")?.meta;
749
799
  return {
750
- groups: L?.groups ?? [],
751
- editing: L?.editing ?? !0,
752
- provides: L?.provides ?? []
800
+ groups: A?.groups ?? [],
801
+ editing: A?.editing ?? !0,
802
+ provides: A?.provides ?? []
753
803
  };
754
- }), x = S(() => o.can("blocks.manage") && V.value.editing), p = Ge({
804
+ }), x = T(() => o.can("blocks.manage") && V.value.editing), m = Qe({
755
805
  slug: "",
756
806
  title: "",
757
807
  description: "",
@@ -762,193 +812,194 @@ const Rl = { class: "wx-block-editor" }, Hl = { class: "wx-block-editor__split"
762
812
  allowed_in: [],
763
813
  max_per_entity: null,
764
814
  is_enabled: !0
765
- }), k = Ge({
815
+ }), y = Qe({
766
816
  schema: [],
767
817
  template: "",
768
818
  styles: "",
769
819
  script: null,
770
820
  sample: {}
771
- }), R = P("[]"), J = P(null), K = P(""), ae = P({}), C = P(null), M = Ge({
821
+ }), R = U("[]"), q = U(null), J = U(""), Z = U({}), c = U(null), B = Qe({
772
822
  html: "",
773
823
  styles: "",
774
824
  script: null,
775
825
  runtime: null,
826
+ stage: null,
776
827
  loading: !1
777
- }), O = S(() => JSON.stringify({ settings: p, content: k })), Z = S(() => K.value !== "" && O.value !== K.value), $e = S(() => Ml(p.slug, k, a)), pe = S(() => {
778
- const L = [...V.value.groups];
779
- return L.includes(p.group) || L.push(p.group), L.map((g) => ({ value: g, label: Ae(g, a) }));
780
- }), oe = S({
781
- get: () => k.sample,
782
- set: (L) => {
783
- k.sample = L;
828
+ }), D = T(() => JSON.stringify({ settings: m, content: y })), K = T(() => J.value !== "" && D.value !== J.value), Se = T(() => Fl(m.slug, y, n)), pe = T(() => {
829
+ const A = [...V.value.groups];
830
+ return A.includes(m.group) || A.push(m.group), A.map((h) => ({ value: h, label: ze(h, n) }));
831
+ }), se = T({
832
+ get: () => y.sample,
833
+ set: (A) => {
834
+ y.sample = A;
784
835
  }
785
- }), we = S(() => Se(k.schema));
786
- function Se(L) {
787
- const g = [];
788
- for (const _ of L)
789
- _.type !== "wx-blocks" && !(_.children?.length && !_.name) && g.push(_.id), _.children && g.push(...Se(_.children));
790
- return g;
836
+ }), _e = T(() => Te(y.schema));
837
+ function Te(A) {
838
+ const h = [];
839
+ for (const $ of A)
840
+ $.type !== "wx-blocks" && !($.children?.length && !$.name) && h.push($.id), $.children && h.push(...Te($.children));
841
+ return h;
791
842
  }
792
- function ge(L) {
793
- v.value = L, Object.assign(p, {
794
- slug: L.slug,
795
- title: L.title,
796
- description: L.description,
797
- icon: L.icon,
798
- group: L.group,
799
- sort: L.sort,
800
- allow: L.allow ?? [],
801
- allowed_in: L.allowed_in ?? [],
802
- max_per_entity: L.max_per_entity,
803
- is_enabled: L.is_enabled
843
+ function ke(A) {
844
+ v.value = A, Object.assign(m, {
845
+ slug: A.slug,
846
+ title: A.title,
847
+ description: A.description,
848
+ icon: A.icon,
849
+ group: A.group,
850
+ sort: A.sort,
851
+ allow: A.allow ?? [],
852
+ allowed_in: A.allowed_in ?? [],
853
+ max_per_entity: A.max_per_entity,
854
+ is_enabled: A.is_enabled
804
855
  });
805
- const g = L.content ?? {
856
+ const h = A.content ?? {
806
857
  schema: [],
807
858
  template: "",
808
859
  styles: "",
809
860
  script: null,
810
861
  sample: {}
811
862
  };
812
- Object.assign(k, be(g)), R.value = JSON.stringify(g.schema, null, 2), J.value = null, K.value = O.value;
863
+ Object.assign(y, ge(h)), R.value = JSON.stringify(h.schema, null, 2), q.value = null, J.value = D.value;
813
864
  }
814
- async function X() {
815
- b.value = !0;
865
+ async function te() {
866
+ g.value = !0;
816
867
  try {
817
- ge(await n.get(z.value)), d.value = await n.usage(z.value);
818
- } catch (L) {
819
- q.danger(f(L));
868
+ ke(await a.get(P.value)), p.value = await a.usage(P.value);
869
+ } catch (A) {
870
+ G.danger(b(A));
820
871
  } finally {
821
- b.value = !1;
872
+ g.value = !1;
822
873
  }
823
874
  }
824
- function Te(L) {
825
- R.value = L;
875
+ function Ce(A) {
876
+ R.value = A;
826
877
  try {
827
- const g = JSON.parse(L);
828
- if (!Array.isArray(g)) throw new Error("not a list");
829
- k.schema = g, J.value = null;
830
- } catch (g) {
831
- J.value = a("page.schema-invalid", { error: g.message });
878
+ const h = JSON.parse(A);
879
+ if (!Array.isArray(h)) throw new Error("not a list");
880
+ y.schema = h, q.value = null;
881
+ } catch (h) {
882
+ q.value = n("page.schema-invalid", { error: h.message });
832
883
  }
833
884
  }
834
- let ke, fe = 0;
835
- function A() {
836
- clearTimeout(ke), ke = setTimeout(() => {
837
- D();
885
+ let ye, fe = 0;
886
+ function z() {
887
+ clearTimeout(ye), ye = setTimeout(() => {
888
+ O();
838
889
  }, 250);
839
890
  }
840
- async function D() {
891
+ async function O() {
841
892
  if (!v.value) return;
842
- const L = ++fe;
843
- M.loading = !0;
893
+ const A = ++fe;
894
+ B.loading = !0;
844
895
  try {
845
- const g = await n.render(v.value.id, {
846
- values: k.sample,
896
+ const h = await a.render(v.value.id, {
897
+ values: y.sample,
847
898
  content: x.value ? {
848
- template: k.template,
849
- styles: k.styles,
850
- script: k.script,
851
- schema: k.schema
899
+ template: y.template,
900
+ styles: y.styles,
901
+ script: y.script,
902
+ schema: y.schema
852
903
  } : void 0
853
904
  });
854
- if (L !== fe) return;
855
- M.html = g.html, M.styles = g.styles, M.script = g.script, M.runtime = g.runtime;
856
- } catch (g) {
857
- L === fe && q.danger(f(g));
905
+ if (A !== fe) return;
906
+ B.html = h.html, B.styles = h.styles, B.script = h.script, B.runtime = h.runtime, B.stage = h.stage ?? null;
907
+ } catch (h) {
908
+ A === fe && G.danger(b(h));
858
909
  } finally {
859
- L === fe && (M.loading = !1);
910
+ A === fe && (B.loading = !1);
860
911
  }
861
912
  }
862
- ce(
863
- () => [k.template, k.styles, k.script, k.schema, k.sample],
864
- A,
913
+ X(
914
+ () => [y.template, y.styles, y.script, y.schema, y.sample],
915
+ z,
865
916
  { deep: !0 }
866
917
  );
867
- const H = P(null);
868
- function G(L) {
869
- return `{{ $${L} }}`;
918
+ const H = U(null);
919
+ function Y(A) {
920
+ return `{{ $${A} }}`;
870
921
  }
871
- function ve(L) {
872
- const _ = H.value?.view?.value;
873
- if (!_) {
874
- k.template += `{{ $${L} }}`;
922
+ function ve(A) {
923
+ const $ = H.value?.view?.value;
924
+ if (!$) {
925
+ y.template += `{{ $${A} }}`;
875
926
  return;
876
927
  }
877
- _.dispatch(_.state.replaceSelection(`{{ $${L} }}`)), _.focus();
928
+ $.dispatch($.state.replaceSelection(`{{ $${A} }}`)), $.focus();
878
929
  }
879
930
  async function me() {
880
931
  if (!v.value) return;
881
- m.value = !0, ae.value = {}, C.value = null;
882
- const L = v.value.draft?.number ?? null;
932
+ f.value = !0, Z.value = {}, c.value = null;
933
+ const A = v.value.draft?.number ?? null;
883
934
  try {
884
- const g = await n.update(v.value.id, {
885
- ...p,
886
- allow: p.allow.length ? p.allow : null,
887
- allowed_in: p.allowed_in.length ? p.allowed_in : null,
888
- description: p.description || null,
889
- icon: p.icon || null,
890
- content: J.value ? { ...k, schema: void 0 } : k
935
+ const h = await a.update(v.value.id, {
936
+ ...m,
937
+ allow: m.allow.length ? m.allow : null,
938
+ allowed_in: m.allowed_in.length ? m.allowed_in : null,
939
+ description: m.description || null,
940
+ icon: m.icon || null,
941
+ content: q.value ? { ...y, schema: void 0 } : y
891
942
  });
892
- ge(g), q.success(
893
- g.draft && g.draft.number !== L ? a("page.saved", { number: g.draft.number }) : a("page.unchanged")
943
+ ke(h), G.success(
944
+ h.draft && h.draft.number !== A ? n("page.saved", { number: h.draft.number }) : n("page.unchanged")
894
945
  );
895
- } catch (g) {
896
- const _ = g.body;
897
- _?.errors ? (ae.value = _.errors, q.danger(a("page.failed"))) : q.danger(f(g, a("page.failed")));
946
+ } catch (h) {
947
+ const $ = h.body;
948
+ $?.errors ? (Z.value = $.errors, G.danger(n("page.failed"))) : G.danger(b(h, n("page.failed")));
898
949
  } finally {
899
- m.value = !1;
950
+ f.value = !1;
900
951
  }
901
952
  }
902
- async function se() {
903
- if (!(!v.value?.draft || (Z.value && await me(), !v.value.draft) || !await Je({
904
- title: a("page.publish-title", { number: v.value.draft.number }),
905
- message: a("page.publish-text", { count: v.value.usage_count }),
906
- confirmText: a("page.publish"),
907
- cancelText: a("page.cancel")
953
+ async function ie() {
954
+ if (!(!v.value?.draft || (K.value && await me(), !v.value.draft) || !await Ke({
955
+ title: n("page.publish-title", { number: v.value.draft.number }),
956
+ message: n("page.publish-text", { count: v.value.usage_count }),
957
+ confirmText: n("page.publish"),
958
+ cancelText: n("page.cancel")
908
959
  }))) {
909
- h.value = !0, C.value = null;
960
+ k.value = !0, c.value = null;
910
961
  try {
911
- ge(await n.publish(v.value.id)), q.success(a("page.published", { number: v.value.published?.number ?? 0 }));
912
- } catch (g) {
913
- const _ = g.body;
914
- _?.errors ? (C.value = _, T.value = "template", q.danger(a("page.publish-failed"))) : q.danger(f(g, a("page.publish-failed")));
962
+ ke(await a.publish(v.value.id)), G.success(n("page.published", { number: v.value.published?.number ?? 0 }));
963
+ } catch (h) {
964
+ const $ = h.body;
965
+ $?.errors ? (c.value = $, C.value = "template", G.danger(n("page.publish-failed"))) : G.danger(b(h, n("page.publish-failed")));
915
966
  } finally {
916
- h.value = !1;
967
+ k.value = !1;
917
968
  }
918
969
  }
919
970
  }
920
- async function ye() {
921
- if (!(!v.value || !await Je({
922
- title: a("page.delete-title", { title: v.value.title }),
923
- message: a("page.delete-text"),
924
- confirmText: a("page.delete"),
925
- cancelText: a("page.cancel"),
971
+ async function we() {
972
+ if (!(!v.value || !await Ke({
973
+ title: n("page.delete-title", { title: v.value.title }),
974
+ message: n("page.delete-text"),
975
+ confirmText: n("page.delete"),
976
+ cancelText: n("page.cancel"),
926
977
  tone: "danger"
927
978
  })))
928
979
  try {
929
- await n.remove(v.value.id), q.success(a("page.deleted")), r.push(l.base);
930
- } catch (g) {
931
- q.danger(f(g));
980
+ await a.remove(v.value.id), G.success(n("page.deleted")), r.push(l.base);
981
+ } catch (h) {
982
+ G.danger(b(h));
932
983
  }
933
984
  }
934
- const Ce = S(
935
- () => C.value ? {
936
- message: C.value.errors.template?.[0] ?? C.value.message,
937
- line: C.value.line,
938
- where: C.value.entity ? a("page.failed-on", {
939
- title: C.value.entity.title ?? `#${C.value.entity.id}`
985
+ const Ve = T(
986
+ () => c.value ? {
987
+ message: c.value.errors.template?.[0] ?? c.value.message,
988
+ line: c.value.line,
989
+ where: c.value.entity ? n("page.failed-on", {
990
+ title: c.value.entity.title ?? `#${c.value.entity.id}`
940
991
  }) : null
941
992
  } : null
942
- ), Ve = S(() => T.value === "template" || T.value === "styles"), y = S(() => [
993
+ ), Ee = T(() => C.value === "template" || C.value === "styles"), w = T(() => [
943
994
  {
944
- title: a("page.example-handler"),
995
+ title: n("page.example-handler"),
945
996
  code: `el.querySelector('.b-hero__button')?.addEventListener('click', (event) => {
946
997
  event.preventDefault()
947
998
  el.classList.toggle('is-open')
948
999
  })`
949
1000
  },
950
1001
  {
951
- title: a("page.example-values"),
1002
+ title: n("page.example-values"),
952
1003
  /* The one thing the sentence above the examples does not say: values reach the script
953
1004
  only through the attribute, and a template that never prints it hands over `{}`. */
954
1005
  code: `// <section data-wx-values="{{ json_encode($block->values) }}">
@@ -957,270 +1008,270 @@ const seconds = Number(values.delay ?? 5)
957
1008
  setInterval(() => el.classList.toggle('is-second'), seconds * 1000)`
958
1009
  },
959
1010
  {
960
- title: a("page.example-provided"),
1011
+ title: n("page.example-provided"),
961
1012
  code: `const Swiper = await webx.use('swiper')
962
1013
 
963
1014
  new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
964
1015
  }
965
- ]), E = S(() => d.value.slice(0, 5));
966
- function U(L) {
967
- return ae.value[L]?.[0];
1016
+ ]), L = T(() => p.value.slice(0, 5));
1017
+ function M(A) {
1018
+ return Z.value[A]?.[0];
968
1019
  }
969
- function Y(L) {
970
- Z.value && L.preventDefault();
1020
+ function Q(A) {
1021
+ K.value && A.preventDefault();
971
1022
  }
972
- Pe(() => {
973
- X(), window.addEventListener("beforeunload", Y);
974
- }), tt(() => {
975
- clearTimeout(ke), window.removeEventListener("beforeunload", Y);
976
- }), ce(z, () => {
977
- X();
1023
+ Ue(() => {
1024
+ te(), window.addEventListener("beforeunload", Q);
1025
+ }), Ge(() => {
1026
+ clearTimeout(ye), window.removeEventListener("beforeunload", Q);
1027
+ }), X(P, () => {
1028
+ te();
978
1029
  });
979
- const ee = S(
1030
+ const le = T(
980
1031
  () => x.value ? [
981
- { key: "save", label: a("page.save"), loading: m.value, run: () => {
1032
+ { key: "save", label: n("page.save"), loading: f.value, run: () => {
982
1033
  me();
983
1034
  } },
984
1035
  {
985
1036
  key: "publish",
986
- label: a("page.publish"),
1037
+ label: n("page.publish"),
987
1038
  primary: !0,
988
- loading: h.value,
989
- disabled: !v.value?.draft && !Z.value,
1039
+ loading: k.value,
1040
+ disabled: !v.value?.draft && !K.value,
990
1041
  run: () => {
991
- se();
1042
+ ie();
992
1043
  }
993
1044
  }
994
1045
  ] : []
995
1046
  );
996
- return (L, g) => (i(), $("div", Rl, [
997
- b.value || !v.value ? (i(), $(j, { key: 0 }, [
1047
+ return (A, h) => (i(), S("div", Kl, [
1048
+ g.value || !v.value ? (i(), S(j, { key: 0 }, [
998
1049
  u(e(We), {
999
1050
  class: "wx-block-editor__ghost-head",
1000
1051
  title: "",
1001
1052
  rows: 1
1002
1053
  }),
1003
- B("div", Hl, [
1054
+ E("div", Gl, [
1004
1055
  u(e(Be), null, {
1005
- default: c(() => [
1056
+ default: d(() => [
1006
1057
  u(e(We), { rows: 8 })
1007
1058
  ]),
1008
1059
  _: 1
1009
1060
  }),
1010
1061
  u(e(Be), null, {
1011
- default: c(() => [
1062
+ default: d(() => [
1012
1063
  u(e(We), { rows: 4 })
1013
1064
  ]),
1014
1065
  _: 1
1015
1066
  })
1016
1067
  ])
1017
- ], 64)) : (i(), $(j, { key: 1 }, [
1018
- u(e(Xt), {
1019
- title: p.title,
1068
+ ], 64)) : (i(), S(j, { key: 1 }, [
1069
+ u(e(nl), {
1070
+ title: m.title,
1020
1071
  back: t.base,
1021
- "back-label": e(a)("page.back"),
1022
- actions: ee.value
1072
+ "back-label": e(n)("page.back"),
1073
+ actions: le.value
1023
1074
  }, {
1024
- "title-after": c(() => [
1025
- x.value ? (i(), I(e(el), {
1075
+ "title-after": d(() => [
1076
+ x.value ? (i(), I(e(al), {
1026
1077
  key: 0,
1027
- name: p.title,
1028
- placeholder: e(a)("page.title"),
1029
- onRename: g[0] || (g[0] = (_) => p.title = _)
1078
+ name: m.title,
1079
+ placeholder: e(n)("page.title"),
1080
+ onRename: h[0] || (h[0] = ($) => m.title = $)
1030
1081
  }, null, 8, ["name", "placeholder"])) : N("", !0),
1031
- Z.value ? (i(), I(e(re), {
1082
+ K.value ? (i(), I(e(ue), {
1032
1083
  key: 1,
1033
1084
  type: "primary",
1034
1085
  dot: ""
1035
1086
  }, {
1036
- default: c(() => [
1037
- W(w(e(a)("page.unsaved")), 1)
1087
+ default: d(() => [
1088
+ W(_(e(n)("page.unsaved")), 1)
1038
1089
  ]),
1039
1090
  _: 1
1040
1091
  })) : N("", !0),
1041
- v.value.draft ? (i(), I(e(re), {
1092
+ v.value.draft ? (i(), I(e(ue), {
1042
1093
  key: 2,
1043
1094
  type: "warning",
1044
1095
  dot: ""
1045
1096
  }, {
1046
- default: c(() => [
1047
- W(w(e(a)("page.draft", { number: v.value.draft.number })), 1)
1097
+ default: d(() => [
1098
+ W(_(e(n)("page.draft", { number: v.value.draft.number })), 1)
1048
1099
  ]),
1049
1100
  _: 1
1050
1101
  })) : N("", !0),
1051
- v.value.published ? (i(), I(e(re), {
1102
+ v.value.published ? (i(), I(e(ue), {
1052
1103
  key: 3,
1053
1104
  type: "success",
1054
1105
  dot: ""
1055
1106
  }, {
1056
- default: c(() => [
1057
- W(w(e(a)("page.live", { number: v.value.published.number })), 1)
1107
+ default: d(() => [
1108
+ W(_(e(n)("page.live", { number: v.value.published.number })), 1)
1058
1109
  ]),
1059
1110
  _: 1
1060
- })) : (i(), I(e(re), {
1111
+ })) : (i(), I(e(ue), {
1061
1112
  key: 4,
1062
1113
  type: "default"
1063
1114
  }, {
1064
- default: c(() => [
1065
- W(w(e(a)("page.never-published")), 1)
1115
+ default: d(() => [
1116
+ W(_(e(n)("page.never-published")), 1)
1066
1117
  ]),
1067
1118
  _: 1
1068
1119
  }))
1069
1120
  ]),
1070
- subtitle: c(() => [
1071
- B("code", null, w(p.slug), 1),
1072
- W(" · " + w(e(Ae)(p.group, e(a))) + " · ", 1),
1073
- v.value.usage_count > 0 ? (i(), I(e(ol), {
1121
+ subtitle: d(() => [
1122
+ E("code", null, _(m.slug), 1),
1123
+ W(" · " + _(e(ze)(m.group, e(n))) + " · ", 1),
1124
+ v.value.usage_count > 0 ? (i(), I(e(ul), {
1074
1125
  key: 0,
1075
- title: e(a)("page.usage"),
1126
+ title: e(n)("page.usage"),
1076
1127
  width: 260,
1077
1128
  align: "start"
1078
1129
  }, {
1079
- trigger: c(() => [
1080
- B("button", jl, w(e(et)(v.value.usage_count, e(a))), 1)
1130
+ trigger: d(() => [
1131
+ E("button", Yl, _(e(nt)(v.value.usage_count, e(n))), 1)
1081
1132
  ]),
1082
- default: c(() => [
1083
- B("div", Fl, [
1084
- (i(!0), $(j, null, Q(E.value, (_) => (i(), $("div", {
1085
- key: `${_.model}:${_.id}`,
1133
+ default: d(() => [
1134
+ E("div", Zl, [
1135
+ (i(!0), S(j, null, ee(L.value, ($) => (i(), S("div", {
1136
+ key: `${$.model}:${$.id}`,
1086
1137
  class: "wx-block-editor__use"
1087
1138
  }, [
1088
- B("span", null, w(_.title ?? `#${_.id}`), 1),
1089
- _.published ? N("", !0) : (i(), I(e(re), {
1139
+ E("span", null, _($.title ?? `#${$.id}`), 1),
1140
+ $.published ? N("", !0) : (i(), I(e(ue), {
1090
1141
  key: 0,
1091
1142
  type: "warning",
1092
1143
  size: "sm"
1093
1144
  }, {
1094
- default: c(() => [
1095
- W(w(e(a)("page.unpublished-page")), 1)
1145
+ default: d(() => [
1146
+ W(_(e(n)("page.unpublished-page")), 1)
1096
1147
  ]),
1097
1148
  _: 1
1098
1149
  }))
1099
1150
  ]))), 128)),
1100
- d.value.length > E.value.length ? (i(), I(e(F), {
1151
+ p.value.length > L.value.length ? (i(), I(e(F), {
1101
1152
  key: 0,
1102
1153
  size: "sm",
1103
1154
  tone: "muted"
1104
1155
  }, {
1105
- default: c(() => [
1106
- W(w(e(a)("page.usage-more", { count: d.value.length - E.value.length })), 1)
1156
+ default: d(() => [
1157
+ W(_(e(n)("page.usage-more", { count: p.value.length - L.value.length })), 1)
1107
1158
  ]),
1108
1159
  _: 1
1109
1160
  })) : N("", !0)
1110
1161
  ])
1111
1162
  ]),
1112
1163
  _: 1
1113
- }, 8, ["title"])) : (i(), $(j, { key: 1 }, [
1114
- W(w(e(et)(v.value.usage_count, e(a))), 1)
1164
+ }, 8, ["title"])) : (i(), S(j, { key: 1 }, [
1165
+ W(_(e(nt)(v.value.usage_count, e(n))), 1)
1115
1166
  ], 64))
1116
1167
  ]),
1117
1168
  _: 1
1118
1169
  }, 8, ["title", "back", "back-label", "actions"]),
1119
- V.value.editing ? N("", !0) : (i(), I(e(St), {
1170
+ V.value.editing ? N("", !0) : (i(), I(e(Vt), {
1120
1171
  key: 0,
1121
1172
  type: "info",
1122
1173
  variant: "soft",
1123
- description: e(a)("page.editing-off")
1174
+ description: e(n)("page.editing-off")
1124
1175
  }, null, 8, ["description"])),
1125
- B("div", {
1126
- class: xe(["wx-block-editor__columns", { "is-alone": !Ve.value }])
1176
+ E("div", {
1177
+ class: $e(["wx-block-editor__columns", { "is-alone": !Ee.value }])
1127
1178
  }, [
1128
- u(e(sl), {
1129
- modelValue: T.value,
1130
- "onUpdate:modelValue": g[14] || (g[14] = (_) => T.value = _),
1179
+ u(e(cl), {
1180
+ modelValue: C.value,
1181
+ "onUpdate:modelValue": h[14] || (h[14] = ($) => C.value = $),
1131
1182
  "keep-alive": ""
1132
1183
  }, {
1133
- default: c(() => [
1134
- u(e(Ee), {
1184
+ default: d(() => [
1185
+ u(e(Le), {
1135
1186
  value: "template",
1136
- label: e(a)("page.tab-template")
1187
+ label: e(n)("page.tab-template")
1137
1188
  }, {
1138
- default: c(() => [
1139
- B("div", ql, [
1140
- u(e(He), {
1189
+ default: d(() => [
1190
+ E("div", Ql, [
1191
+ u(e(je), {
1141
1192
  ref_key: "templateEditor",
1142
1193
  ref: H,
1143
- modelValue: k.template,
1144
- "onUpdate:modelValue": g[1] || (g[1] = (_) => k.template = _),
1194
+ modelValue: y.template,
1195
+ "onUpdate:modelValue": h[1] || (h[1] = ($) => y.template = $),
1145
1196
  language: "php",
1146
1197
  readonly: !x.value,
1147
1198
  "min-height": "340px",
1148
1199
  "max-height": "70vh",
1149
1200
  "line-wrapping": ""
1150
1201
  }, null, 8, ["modelValue", "readonly"]),
1151
- we.value.length ? (i(), $("div", Jl, [
1202
+ _e.value.length ? (i(), S("div", Xl, [
1152
1203
  u(e(F), {
1153
1204
  size: "sm",
1154
1205
  tone: "muted"
1155
1206
  }, {
1156
- default: c(() => [
1157
- W(w(e(a)("page.insert-field")), 1)
1207
+ default: d(() => [
1208
+ W(_(e(n)("page.insert-field")), 1)
1158
1209
  ]),
1159
1210
  _: 1
1160
1211
  }),
1161
- (i(!0), $(j, null, Q(we.value, (_) => (i(), $("button", {
1162
- key: _,
1212
+ (i(!0), S(j, null, ee(_e.value, ($) => (i(), S("button", {
1213
+ key: $,
1163
1214
  type: "button",
1164
1215
  class: "wx-block-editor__pill",
1165
1216
  disabled: !x.value,
1166
- onClick: (Re) => ve(_),
1167
- textContent: w(G(_))
1168
- }, null, 8, Kl))), 128))
1217
+ onClick: (He) => ve($),
1218
+ textContent: _(Y($))
1219
+ }, null, 8, en))), 128))
1169
1220
  ])) : N("", !0),
1170
- u(dt, {
1221
+ u(vt, {
1171
1222
  file: "template",
1172
- lints: $e.value,
1173
- slug: p.slug,
1174
- error: Ce.value
1223
+ lints: Se.value,
1224
+ slug: m.slug,
1225
+ error: Ve.value
1175
1226
  }, null, 8, ["lints", "slug", "error"])
1176
1227
  ])
1177
1228
  ]),
1178
1229
  _: 1
1179
1230
  }, 8, ["label"]),
1180
- u(e(Ee), {
1231
+ u(e(Le), {
1181
1232
  value: "styles",
1182
- label: e(a)("page.tab-styles")
1233
+ label: e(n)("page.tab-styles")
1183
1234
  }, {
1184
- default: c(() => [
1185
- B("div", Zl, [
1186
- u(e(He), {
1187
- modelValue: k.styles,
1188
- "onUpdate:modelValue": g[2] || (g[2] = (_) => k.styles = _),
1235
+ default: d(() => [
1236
+ E("div", tn, [
1237
+ u(e(je), {
1238
+ modelValue: y.styles,
1239
+ "onUpdate:modelValue": h[2] || (h[2] = ($) => y.styles = $),
1189
1240
  language: "css",
1190
1241
  readonly: !x.value,
1191
1242
  "min-height": "340px",
1192
1243
  "max-height": "70vh"
1193
1244
  }, null, 8, ["modelValue", "readonly"]),
1194
- u(dt, {
1245
+ u(vt, {
1195
1246
  file: "styles",
1196
- lints: $e.value,
1197
- slug: p.slug
1247
+ lints: Se.value,
1248
+ slug: m.slug
1198
1249
  }, null, 8, ["lints", "slug"])
1199
1250
  ])
1200
1251
  ]),
1201
1252
  _: 1
1202
1253
  }, 8, ["label"]),
1203
- u(e(Ee), {
1254
+ u(e(Le), {
1204
1255
  value: "script",
1205
- label: e(a)("page.tab-script")
1256
+ label: e(n)("page.tab-script")
1206
1257
  }, {
1207
- default: c(() => [
1208
- B("div", Gl, [
1209
- u(e(He), {
1210
- "model-value": k.script ?? "",
1258
+ default: d(() => [
1259
+ E("div", ln, [
1260
+ u(e(je), {
1261
+ "model-value": y.script ?? "",
1211
1262
  language: "javascript",
1212
1263
  readonly: !x.value,
1213
1264
  "min-height": "340px",
1214
1265
  "max-height": "70vh",
1215
- "onUpdate:modelValue": g[3] || (g[3] = (_) => k.script = _ || null)
1266
+ "onUpdate:modelValue": h[3] || (h[3] = ($) => y.script = $ || null)
1216
1267
  }, null, 8, ["model-value", "readonly"]),
1217
- B("div", Yl, [
1268
+ E("div", nn, [
1218
1269
  u(e(F), {
1219
1270
  size: "sm",
1220
1271
  tone: "muted"
1221
1272
  }, {
1222
- default: c(() => [
1223
- W(w(e(a)("page.script-help")), 1)
1273
+ default: d(() => [
1274
+ W(_(e(n)("page.script-help")), 1)
1224
1275
  ]),
1225
1276
  _: 1
1226
1277
  }),
@@ -1228,8 +1279,8 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1228
1279
  size: "sm",
1229
1280
  tone: "muted"
1230
1281
  }, {
1231
- default: c(() => [
1232
- W(w(V.value.provides.length ? e(a)("page.provides", { names: V.value.provides.join(", ") }) : e(a)("page.provides-none")), 1)
1282
+ default: d(() => [
1283
+ W(_(V.value.provides.length ? e(n)("page.provides", { names: V.value.provides.join(", ") }) : e(n)("page.provides-none")), 1)
1233
1284
  ]),
1234
1285
  _: 1
1235
1286
  })
@@ -1237,24 +1288,24 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1237
1288
  ]),
1238
1289
  u(e(Be), {
1239
1290
  class: "wx-block-editor__examples",
1240
- title: e(a)("page.examples")
1291
+ title: e(n)("page.examples")
1241
1292
  }, {
1242
- default: c(() => [
1243
- (i(!0), $(j, null, Q(y.value, (_) => (i(), $("div", {
1244
- key: _.title,
1293
+ default: d(() => [
1294
+ (i(!0), S(j, null, ee(w.value, ($) => (i(), S("div", {
1295
+ key: $.title,
1245
1296
  class: "wx-block-editor__example"
1246
1297
  }, [
1247
1298
  u(e(F), {
1248
1299
  size: "sm",
1249
1300
  tone: "muted"
1250
1301
  }, {
1251
- default: c(() => [
1252
- W(w(_.title), 1)
1302
+ default: d(() => [
1303
+ W(_($.title), 1)
1253
1304
  ]),
1254
1305
  _: 2
1255
1306
  }, 1024),
1256
- B("pre", null, [
1257
- B("code", null, w(_.code), 1)
1307
+ E("pre", null, [
1308
+ E("code", null, _($.code), 1)
1258
1309
  ])
1259
1310
  ]))), 128))
1260
1311
  ]),
@@ -1263,39 +1314,39 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1263
1314
  ]),
1264
1315
  _: 1
1265
1316
  }, 8, ["label"]),
1266
- u(e(Ee), {
1317
+ u(e(Le), {
1267
1318
  value: "fields",
1268
- label: e(a)("page.tab-fields")
1319
+ label: e(n)("page.tab-fields")
1269
1320
  }, {
1270
- default: c(() => [
1271
- B("div", Ql, [
1272
- B("div", Xl, [
1273
- u(e(He), {
1321
+ default: d(() => [
1322
+ E("div", an, [
1323
+ E("div", on, [
1324
+ u(e(je), {
1274
1325
  "model-value": R.value,
1275
1326
  language: "json",
1276
1327
  lint: "",
1277
1328
  readonly: !x.value,
1278
1329
  "min-height": "340px",
1279
1330
  "max-height": "70vh",
1280
- "onUpdate:modelValue": Te
1331
+ "onUpdate:modelValue": Ce
1281
1332
  }, null, 8, ["model-value", "readonly"]),
1282
- B("div", en, [
1283
- J.value ? (i(), I(e(F), {
1333
+ E("div", sn, [
1334
+ q.value ? (i(), I(e(F), {
1284
1335
  key: 0,
1285
1336
  size: "sm",
1286
1337
  tone: "danger"
1287
1338
  }, {
1288
- default: c(() => [
1289
- W(w(J.value), 1)
1339
+ default: d(() => [
1340
+ W(_(q.value), 1)
1290
1341
  ]),
1291
1342
  _: 1
1292
- })) : U("content.schema") ? (i(), I(e(F), {
1343
+ })) : M("content.schema") ? (i(), I(e(F), {
1293
1344
  key: 1,
1294
1345
  size: "sm",
1295
1346
  tone: "danger"
1296
1347
  }, {
1297
- default: c(() => [
1298
- W(w(U("content.schema")), 1)
1348
+ default: d(() => [
1349
+ W(_(M("content.schema")), 1)
1299
1350
  ]),
1300
1351
  _: 1
1301
1352
  })) : (i(), I(e(F), {
@@ -1303,27 +1354,27 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1303
1354
  size: "sm",
1304
1355
  tone: "muted"
1305
1356
  }, {
1306
- default: c(() => [
1307
- W(w(e(a)("page.fields-help")), 1)
1357
+ default: d(() => [
1358
+ W(_(e(n)("page.fields-help")), 1)
1308
1359
  ]),
1309
1360
  _: 1
1310
1361
  })),
1311
- u(e(tl), {
1312
- title: e(a)("help.schema-title"),
1313
- body: e(a)("help.schema")
1362
+ u(e(ol), {
1363
+ title: e(n)("help.schema-title"),
1364
+ body: e(n)("help.schema")
1314
1365
  }, null, 8, ["title", "body"])
1315
1366
  ])
1316
1367
  ]),
1317
1368
  u(e(Be), {
1318
1369
  class: "wx-block-editor__sample",
1319
- title: e(a)("page.sample")
1370
+ title: e(n)("page.sample")
1320
1371
  }, {
1321
- default: c(() => [
1322
- k.schema.length ? (i(), I(e(Wt), {
1372
+ default: d(() => [
1373
+ y.schema.length ? (i(), I(e(zt), {
1323
1374
  key: 0,
1324
- modelValue: oe.value,
1325
- "onUpdate:modelValue": g[4] || (g[4] = (_) => oe.value = _),
1326
- root: e(at)(k.schema),
1375
+ modelValue: se.value,
1376
+ "onUpdate:modelValue": h[4] || (h[4] = ($) => se.value = $),
1377
+ root: e(st)(y.schema),
1327
1378
  types: e(o).types,
1328
1379
  translate: e(o).i18n.t,
1329
1380
  can: e(o).can,
@@ -1337,159 +1388,159 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1337
1388
  ]),
1338
1389
  _: 1
1339
1390
  }, 8, ["label"]),
1340
- u(e(Ee), {
1391
+ u(e(Le), {
1341
1392
  value: "settings",
1342
- label: e(a)("page.tab-settings")
1393
+ label: e(n)("page.tab-settings")
1343
1394
  }, {
1344
- default: c(() => [
1395
+ default: d(() => [
1345
1396
  u(e(Be), { class: "wx-block-editor__sheet" }, {
1346
- default: c(() => [
1347
- B("div", tn, [
1348
- u(e(te), {
1349
- label: e(a)("page.identifier"),
1350
- help: e(a)("page.identifier-help"),
1351
- error: U("slug"),
1397
+ default: d(() => [
1398
+ E("div", rn, [
1399
+ u(e(ne), {
1400
+ label: e(n)("page.identifier"),
1401
+ help: e(n)("page.identifier-help"),
1402
+ error: M("slug"),
1352
1403
  disabled: !x.value
1353
1404
  }, {
1354
- default: c(() => [
1355
- u(e(Ne), {
1356
- modelValue: p.slug,
1357
- "onUpdate:modelValue": g[5] || (g[5] = (_) => p.slug = _)
1405
+ default: d(() => [
1406
+ u(e(Pe), {
1407
+ modelValue: m.slug,
1408
+ "onUpdate:modelValue": h[5] || (h[5] = ($) => m.slug = $)
1358
1409
  }, null, 8, ["modelValue"])
1359
1410
  ]),
1360
1411
  _: 1
1361
1412
  }, 8, ["label", "help", "error", "disabled"]),
1362
- u(e(te), {
1363
- label: e(a)("page.group"),
1364
- help: e(a)("page.group-help"),
1365
- error: U("group"),
1413
+ u(e(ne), {
1414
+ label: e(n)("page.group"),
1415
+ help: e(n)("page.group-help"),
1416
+ error: M("group"),
1366
1417
  disabled: !x.value
1367
1418
  }, {
1368
- default: c(() => [
1369
- u(e(Tt), {
1370
- modelValue: p.group,
1371
- "onUpdate:modelValue": g[6] || (g[6] = (_) => p.group = _),
1419
+ default: d(() => [
1420
+ u(e(Et), {
1421
+ modelValue: m.group,
1422
+ "onUpdate:modelValue": h[6] || (h[6] = ($) => m.group = $),
1372
1423
  options: pe.value
1373
1424
  }, null, 8, ["modelValue", "options"])
1374
1425
  ]),
1375
1426
  _: 1
1376
1427
  }, 8, ["label", "help", "error", "disabled"]),
1377
- u(e(te), {
1428
+ u(e(ne), {
1378
1429
  class: "is-wide",
1379
- label: e(a)("page.description"),
1380
- help: e(a)("page.description-help"),
1381
- error: U("description"),
1430
+ label: e(n)("page.description"),
1431
+ help: e(n)("page.description-help"),
1432
+ error: M("description"),
1382
1433
  disabled: !x.value
1383
1434
  }, {
1384
- default: c(() => [
1385
- u(e(il), {
1386
- "model-value": p.description ?? "",
1435
+ default: d(() => [
1436
+ u(e(dl), {
1437
+ "model-value": m.description ?? "",
1387
1438
  rows: 2,
1388
- "onUpdate:modelValue": g[7] || (g[7] = (_) => p.description = String(_ ?? ""))
1439
+ "onUpdate:modelValue": h[7] || (h[7] = ($) => m.description = String($ ?? ""))
1389
1440
  }, null, 8, ["model-value"])
1390
1441
  ]),
1391
1442
  _: 1
1392
1443
  }, 8, ["label", "help", "error", "disabled"]),
1393
- u(e(te), {
1394
- label: e(a)("page.icon"),
1395
- error: U("icon"),
1444
+ u(e(ne), {
1445
+ label: e(n)("page.icon"),
1446
+ error: M("icon"),
1396
1447
  disabled: !x.value
1397
1448
  }, {
1398
- default: c(() => [
1399
- u(e(rl), {
1400
- "model-value": p.icon,
1449
+ default: d(() => [
1450
+ u(e(pl), {
1451
+ "model-value": m.icon,
1401
1452
  clearable: "",
1402
- placeholder: e(a)("page.icon-search"),
1403
- "empty-text": e(a)("page.icon-none"),
1404
- "unknown-text": e(a)("page.icon-unknown"),
1405
- "clear-label": e(a)("page.icon-clear"),
1406
- "onUpdate:modelValue": g[8] || (g[8] = (_) => p.icon = _)
1453
+ placeholder: e(n)("page.icon-search"),
1454
+ "empty-text": e(n)("page.icon-none"),
1455
+ "unknown-text": e(n)("page.icon-unknown"),
1456
+ "clear-label": e(n)("page.icon-clear"),
1457
+ "onUpdate:modelValue": h[8] || (h[8] = ($) => m.icon = $)
1407
1458
  }, null, 8, ["model-value", "placeholder", "empty-text", "unknown-text", "clear-label"])
1408
1459
  ]),
1409
1460
  _: 1
1410
1461
  }, 8, ["label", "error", "disabled"]),
1411
- u(e(te), {
1412
- label: e(a)("page.sort"),
1413
- help: e(a)("page.sort-help"),
1414
- error: U("sort"),
1462
+ u(e(ne), {
1463
+ label: e(n)("page.sort"),
1464
+ help: e(n)("page.sort-help"),
1465
+ error: M("sort"),
1415
1466
  disabled: !x.value
1416
1467
  }, {
1417
- default: c(() => [
1418
- u(e(ut), {
1419
- modelValue: p.sort,
1420
- "onUpdate:modelValue": g[9] || (g[9] = (_) => p.sort = _)
1468
+ default: d(() => [
1469
+ u(e(dt), {
1470
+ modelValue: m.sort,
1471
+ "onUpdate:modelValue": h[9] || (h[9] = ($) => m.sort = $)
1421
1472
  }, null, 8, ["modelValue"])
1422
1473
  ]),
1423
1474
  _: 1
1424
1475
  }, 8, ["label", "help", "error", "disabled"]),
1425
- u(e(te), {
1426
- label: e(a)("page.allow"),
1427
- help: e(a)("page.allow-help"),
1428
- error: U("allow"),
1476
+ u(e(ne), {
1477
+ label: e(n)("page.allow"),
1478
+ help: e(n)("page.allow-help"),
1479
+ error: M("allow"),
1429
1480
  disabled: !x.value
1430
1481
  }, {
1431
- default: c(() => [
1432
- u(e(ct), {
1433
- modelValue: p.allow,
1434
- "onUpdate:modelValue": g[10] || (g[10] = (_) => p.allow = _),
1482
+ default: d(() => [
1483
+ u(e(pt), {
1484
+ modelValue: m.allow,
1485
+ "onUpdate:modelValue": h[10] || (h[10] = ($) => m.allow = $),
1435
1486
  "allow-create": ""
1436
1487
  }, null, 8, ["modelValue"])
1437
1488
  ]),
1438
1489
  _: 1
1439
1490
  }, 8, ["label", "help", "error", "disabled"]),
1440
- u(e(te), {
1441
- label: e(a)("page.allowed-in"),
1442
- help: e(a)("page.allowed-in-help"),
1443
- error: U("allowed_in"),
1491
+ u(e(ne), {
1492
+ label: e(n)("page.allowed-in"),
1493
+ help: e(n)("page.allowed-in-help"),
1494
+ error: M("allowed_in"),
1444
1495
  disabled: !x.value
1445
1496
  }, {
1446
- default: c(() => [
1447
- u(e(ct), {
1448
- modelValue: p.allowed_in,
1449
- "onUpdate:modelValue": g[11] || (g[11] = (_) => p.allowed_in = _),
1497
+ default: d(() => [
1498
+ u(e(pt), {
1499
+ modelValue: m.allowed_in,
1500
+ "onUpdate:modelValue": h[11] || (h[11] = ($) => m.allowed_in = $),
1450
1501
  "allow-create": "",
1451
1502
  suggestions: ["root"]
1452
1503
  }, null, 8, ["modelValue"])
1453
1504
  ]),
1454
1505
  _: 1
1455
1506
  }, 8, ["label", "help", "error", "disabled"]),
1456
- u(e(te), {
1457
- label: e(a)("page.max-per-entity"),
1458
- help: e(a)("page.max-per-entity-help"),
1459
- error: U("max_per_entity"),
1507
+ u(e(ne), {
1508
+ label: e(n)("page.max-per-entity"),
1509
+ help: e(n)("page.max-per-entity-help"),
1510
+ error: M("max_per_entity"),
1460
1511
  disabled: !x.value
1461
1512
  }, {
1462
- default: c(() => [
1463
- u(e(ut), {
1464
- "model-value": p.max_per_entity ?? void 0,
1513
+ default: d(() => [
1514
+ u(e(dt), {
1515
+ "model-value": m.max_per_entity ?? void 0,
1465
1516
  min: 1,
1466
- "onUpdate:modelValue": g[12] || (g[12] = (_) => p.max_per_entity = _ ?? null)
1517
+ "onUpdate:modelValue": h[12] || (h[12] = ($) => m.max_per_entity = $ ?? null)
1467
1518
  }, null, 8, ["model-value"])
1468
1519
  ]),
1469
1520
  _: 1
1470
1521
  }, 8, ["label", "help", "error", "disabled"]),
1471
- u(e(te), {
1472
- label: e(a)("page.enabled"),
1473
- help: e(a)("page.enabled-help"),
1522
+ u(e(ne), {
1523
+ label: e(n)("page.enabled"),
1524
+ help: e(n)("page.enabled-help"),
1474
1525
  disabled: !x.value
1475
1526
  }, {
1476
- default: c(() => [
1477
- u(e(ul), {
1478
- modelValue: p.is_enabled,
1479
- "onUpdate:modelValue": g[13] || (g[13] = (_) => p.is_enabled = _)
1527
+ default: d(() => [
1528
+ u(e(vl), {
1529
+ modelValue: m.is_enabled,
1530
+ "onUpdate:modelValue": h[13] || (h[13] = ($) => m.is_enabled = $)
1480
1531
  }, null, 8, ["modelValue"])
1481
1532
  ]),
1482
1533
  _: 1
1483
1534
  }, 8, ["label", "help", "disabled"]),
1484
- x.value ? (i(), $("div", ln, [
1485
- u(e(ue), {
1535
+ x.value ? (i(), S("div", un, [
1536
+ u(e(ce), {
1486
1537
  type: "danger",
1487
1538
  variant: "outline",
1488
1539
  disabled: v.value.usage_count > 0,
1489
- onClick: ye
1540
+ onClick: we
1490
1541
  }, {
1491
- default: c(() => [
1492
- W(w(e(a)("page.delete")), 1)
1542
+ default: d(() => [
1543
+ W(_(e(n)("page.delete")), 1)
1493
1544
  ]),
1494
1545
  _: 1
1495
1546
  }, 8, ["disabled"]),
@@ -1498,8 +1549,8 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1498
1549
  size: "sm",
1499
1550
  tone: "muted"
1500
1551
  }, {
1501
- default: c(() => [
1502
- W(w(v.value.usage_count === 1 ? e(a)("page.delete-used-one") : e(a)("page.delete-used", { count: v.value.usage_count })), 1)
1552
+ default: d(() => [
1553
+ W(_(v.value.usage_count === 1 ? e(n)("page.delete-used-one") : e(n)("page.delete-used", { count: v.value.usage_count })), 1)
1503
1554
  ]),
1504
1555
  _: 1
1505
1556
  })) : N("", !0)
@@ -1511,20 +1562,20 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1511
1562
  ]),
1512
1563
  _: 1
1513
1564
  }, 8, ["label"]),
1514
- u(e(Ee), {
1565
+ u(e(Le), {
1515
1566
  value: "history",
1516
- label: e(a)("page.tab-history")
1567
+ label: e(n)("page.tab-history")
1517
1568
  }, {
1518
- default: c(() => [
1569
+ default: d(() => [
1519
1570
  u(e(Be), {
1520
1571
  class: "wx-block-editor__sheet",
1521
1572
  padding: "none"
1522
1573
  }, {
1523
- default: c(() => [
1524
- u(wl, {
1574
+ default: d(() => [
1575
+ u(Sl, {
1525
1576
  block: v.value,
1526
1577
  "can-manage": x.value,
1527
- onRestored: ge
1578
+ onRestored: ke
1528
1579
  }, null, 8, ["block", "can-manage"])
1529
1580
  ]),
1530
1581
  _: 1
@@ -1535,37 +1586,38 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1535
1586
  ]),
1536
1587
  _: 1
1537
1588
  }, 8, ["modelValue"]),
1538
- Ht(u(Vl, {
1589
+ Jt(u(zl, {
1539
1590
  class: "wx-block-editor__stage",
1540
- html: M.html,
1541
- styles: M.styles,
1542
- script: M.script,
1543
- runtime: M.runtime,
1544
- loading: M.loading
1545
- }, null, 8, ["html", "styles", "script", "runtime", "loading"]), [
1546
- [jt, Ve.value]
1591
+ html: B.html,
1592
+ styles: B.styles,
1593
+ script: B.script,
1594
+ runtime: B.runtime,
1595
+ stage: B.stage,
1596
+ loading: B.loading
1597
+ }, null, 8, ["html", "styles", "script", "runtime", "stage", "loading"]), [
1598
+ [Kt, Ee.value]
1547
1599
  ])
1548
1600
  ], 2),
1549
- x.value ? (i(), I(e(cl), { key: 1 }, {
1550
- default: c(() => [
1551
- u(e(ue), {
1601
+ x.value ? (i(), I(e(fl), { key: 1 }, {
1602
+ default: d(() => [
1603
+ u(e(ce), {
1552
1604
  variant: "outline",
1553
- loading: m.value,
1605
+ loading: f.value,
1554
1606
  onClick: me
1555
1607
  }, {
1556
- default: c(() => [
1557
- W(w(e(a)("page.save")), 1)
1608
+ default: d(() => [
1609
+ W(_(e(n)("page.save")), 1)
1558
1610
  ]),
1559
1611
  _: 1
1560
1612
  }, 8, ["loading"]),
1561
- u(e(ue), {
1613
+ u(e(ce), {
1562
1614
  type: "primary",
1563
- loading: h.value,
1564
- disabled: !v.value.draft && !Z.value,
1565
- onClick: se
1615
+ loading: k.value,
1616
+ disabled: !v.value.draft && !K.value,
1617
+ onClick: ie
1566
1618
  }, {
1567
- default: c(() => [
1568
- W(w(e(a)("page.publish")), 1)
1619
+ default: d(() => [
1620
+ W(_(e(n)("page.publish")), 1)
1569
1621
  ]),
1570
1622
  _: 1
1571
1623
  }, 8, ["loading", "disabled"])
@@ -1575,10 +1627,10 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1575
1627
  ], 64))
1576
1628
  ]));
1577
1629
  }
1578
- }), an = /* @__PURE__ */ ne(nn, [["__scopeId", "data-v-acb6e830"]]), on = ["srcdoc"], sn = {
1630
+ }), dn = /* @__PURE__ */ oe(cn, [["__scopeId", "data-v-86e412ef"]]), pn = ["srcdoc"], vn = {
1579
1631
  key: 1,
1580
1632
  class: "wx-block-thumb__empty"
1581
- }, rn = /* @__PURE__ */ le({
1633
+ }, fn = /* @__PURE__ */ ae({
1582
1634
  __name: "BlockThumb",
1583
1635
  props: {
1584
1636
  thumbnail: {},
@@ -1586,36 +1638,36 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1586
1638
  height: { default: 120 }
1587
1639
  },
1588
1640
  setup(t) {
1589
- const l = t, o = P(null), n = Ke(o), s = S(() => n.value > 0 ? n.value / l.width : 0.2), r = S(
1590
- () => l.thumbnail ? At({ html: l.thumbnail.html, styles: l.thumbnail.styles }) : ""
1591
- ), a = S(() => ({
1641
+ const l = t, o = U(null), a = Ye(o), s = T(() => a.value > 0 ? a.value / l.width : 0.2), r = T(
1642
+ () => l.thumbnail ? Pt({ html: l.thumbnail.html, styles: l.thumbnail.styles }) : ""
1643
+ ), n = T(() => ({
1592
1644
  width: `${l.width}px`,
1593
1645
  height: `${Math.round(l.height / s.value)}px`,
1594
1646
  transform: `scale(${s.value})`
1595
1647
  }));
1596
- return (f, z) => (i(), $("div", {
1648
+ return (b, P) => (i(), S("div", {
1597
1649
  ref_key: "box",
1598
1650
  ref: o,
1599
1651
  class: "wx-block-thumb",
1600
- style: _e({ height: `${t.height}px` })
1652
+ style: xe({ height: `${t.height}px` })
1601
1653
  }, [
1602
- t.thumbnail ? (i(), $("iframe", {
1654
+ t.thumbnail ? (i(), S("iframe", {
1603
1655
  key: 0,
1604
1656
  class: "wx-block-thumb__frame",
1605
1657
  srcdoc: r.value,
1606
- style: _e(a.value),
1658
+ style: xe(n.value),
1607
1659
  sandbox: "allow-same-origin",
1608
1660
  tabindex: "-1",
1609
1661
  "aria-hidden": "true"
1610
- }, null, 12, on)) : (i(), $("div", sn, [
1611
- u(e(he), { name: "grid" })
1662
+ }, null, 12, pn)) : (i(), S("div", vn, [
1663
+ u(e(be), { name: "grid" })
1612
1664
  ]))
1613
1665
  ], 4));
1614
1666
  }
1615
- }), Ot = /* @__PURE__ */ ne(rn, [["__scopeId", "data-v-615b818a"]]), un = { class: "wx-block-picker" }, cn = {
1667
+ }), Ft = /* @__PURE__ */ oe(fn, [["__scopeId", "data-v-615b818a"]]), mn = { class: "wx-block-picker" }, hn = {
1616
1668
  key: 0,
1617
1669
  class: "wx-block-picker__group-title"
1618
- }, dn = { class: "wx-block-picker__cards" }, pn = ["disabled", "title", "onClick"], vn = { class: "wx-block-picker__body" }, fn = { class: "wx-block-picker__title" }, mn = /* @__PURE__ */ le({
1670
+ }, bn = { class: "wx-block-picker__cards" }, gn = ["disabled", "title", "onClick"], kn = { class: "wx-block-picker__body" }, yn = { class: "wx-block-picker__title" }, wn = /* @__PURE__ */ ae({
1619
1671
  __name: "BlockPicker",
1620
1672
  props: {
1621
1673
  catalog: {},
@@ -1626,120 +1678,120 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1626
1678
  blocksPath: { default: null }
1627
1679
  },
1628
1680
  setup(t) {
1629
- const l = t, { resolve: o, dismiss: n, open: s } = Ct();
1630
- Oe();
1631
- const r = de("webx-blocks"), a = P("");
1632
- function f(m) {
1681
+ const l = t, { resolve: o, dismiss: a, open: s } = Bt();
1682
+ Re();
1683
+ const r = de("webx-blocks"), n = U("");
1684
+ function b(f) {
1633
1685
  if (l.parent === null)
1634
- return m.allowed_in === null || m.allowed_in.includes("root");
1635
- const h = l.allow ? l.allow.includes(m.slug) : l.parent.allow?.includes(m.slug) === !0, T = m.allowed_in === null || m.allowed_in.includes(l.parent.slug);
1636
- return h && T;
1686
+ return f.allowed_in === null || f.allowed_in.includes("root");
1687
+ const k = l.allow ? l.allow.includes(f.slug) : l.parent.allow?.includes(f.slug) === !0, C = f.allowed_in === null || f.allowed_in.includes(l.parent.slug);
1688
+ return k && C;
1637
1689
  }
1638
- const z = S(
1639
- () => l.catalog.filter((m) => m.is_enabled && m.published !== null && f(m)).map((m) => {
1640
- const h = El(l.tree, m.slug), T = m.max_per_entity !== null && h >= m.max_per_entity;
1641
- return { type: m, reason: T ? r("field.limit-reached", { count: h }) : null };
1690
+ const P = T(
1691
+ () => l.catalog.filter((f) => f.is_enabled && f.published !== null && b(f)).map((f) => {
1692
+ const k = Nl(l.tree, f.slug), C = f.max_per_entity !== null && k >= f.max_per_entity;
1693
+ return { type: f, reason: C ? r("field.limit-reached", { count: k }) : null };
1642
1694
  })
1643
- ), v = S(() => {
1644
- const m = a.value.trim().toLowerCase();
1645
- return m === "" ? z.value : z.value.filter(
1646
- ({ type: h }) => h.title.toLowerCase().includes(m) || h.slug.includes(m) || (h.description ?? "").toLowerCase().includes(m)
1695
+ ), v = T(() => {
1696
+ const f = n.value.trim().toLowerCase();
1697
+ return f === "" ? P.value : P.value.filter(
1698
+ ({ type: k }) => k.title.toLowerCase().includes(f) || k.slug.includes(f) || (k.description ?? "").toLowerCase().includes(f)
1647
1699
  );
1648
- }), d = S(() => {
1649
- const m = [...l.groups];
1700
+ }), p = T(() => {
1701
+ const f = [...l.groups];
1650
1702
  for (const { type: V } of v.value)
1651
- m.includes(V.group) || m.push(V.group);
1652
- const h = m.map((V) => ({
1703
+ f.includes(V.group) || f.push(V.group);
1704
+ const k = f.map((V) => ({
1653
1705
  id: V,
1654
- label: Ae(V, r),
1706
+ label: ze(V, r),
1655
1707
  options: v.value.filter((x) => x.type.group === V)
1656
1708
  })).filter((V) => V.options.length > 0);
1657
- return v.value.length <= 5 || a.value.trim() !== "" || h.length < 2 ? [{ id: "", label: "", options: v.value }] : h;
1658
- }), b = S(() => {
1709
+ return v.value.length <= 5 || n.value.trim() !== "" || k.length < 2 ? [{ id: "", label: "", options: v.value }] : k;
1710
+ }), g = T(() => {
1659
1711
  if (l.catalog.length === 0) return r("field.pick-none");
1660
- if (z.value.length === 0 && l.parent) {
1661
- const m = (l.allow ?? l.parent.allow ?? []).filter(
1662
- (h) => l.catalog.some((T) => T.slug === h)
1712
+ if (P.value.length === 0 && l.parent) {
1713
+ const f = (l.allow ?? l.parent.allow ?? []).filter(
1714
+ (k) => l.catalog.some((C) => C.slug === k)
1663
1715
  );
1664
- return m.length === 0 ? r("field.pick-nothing-allowed", { parent: l.parent.title }) : r("field.pick-limited", { parent: l.parent.title, types: m.join(", ") });
1716
+ return f.length === 0 ? r("field.pick-nothing-allowed", { parent: l.parent.title }) : r("field.pick-limited", { parent: l.parent.title, types: f.join(", ") });
1665
1717
  }
1666
1718
  return r("field.pick-empty");
1667
1719
  });
1668
- return (m, h) => {
1669
- const T = yt("router-link");
1670
- return i(), I(e(Vt), {
1720
+ return (f, k) => {
1721
+ const C = xt("router-link");
1722
+ return i(), I(e(Lt), {
1671
1723
  open: e(s),
1672
- "onUpdate:open": h[2] || (h[2] = (V) => wt(s) ? s.value = V : null),
1724
+ "onUpdate:open": k[2] || (k[2] = (V) => $t(s) ? s.value = V : null),
1673
1725
  title: e(r)("field.pick"),
1674
1726
  width: 860
1675
1727
  }, {
1676
- footer: c(() => [
1677
- u(e(ue), {
1728
+ footer: d(() => [
1729
+ u(e(ce), {
1678
1730
  variant: "outline",
1679
- onClick: h[1] || (h[1] = (V) => e(n)())
1731
+ onClick: k[1] || (k[1] = (V) => e(a)())
1680
1732
  }, {
1681
- default: c(() => [
1682
- W(w(e(r)("field.close")), 1)
1733
+ default: d(() => [
1734
+ W(_(e(r)("field.close")), 1)
1683
1735
  ]),
1684
1736
  _: 1
1685
1737
  })
1686
1738
  ]),
1687
- default: c(() => [
1688
- B("div", un, [
1689
- z.value.length > 0 ? (i(), I(e(Ne), {
1739
+ default: d(() => [
1740
+ E("div", mn, [
1741
+ P.value.length > 0 ? (i(), I(e(Pe), {
1690
1742
  key: 0,
1691
- modelValue: a.value,
1692
- "onUpdate:modelValue": h[0] || (h[0] = (V) => a.value = V),
1743
+ modelValue: n.value,
1744
+ "onUpdate:modelValue": k[0] || (k[0] = (V) => n.value = V),
1693
1745
  placeholder: e(r)("field.search"),
1694
1746
  clearable: "",
1695
1747
  autofocus: ""
1696
1748
  }, null, 8, ["modelValue", "placeholder"])) : N("", !0),
1697
- v.value.length === 0 ? (i(), I(e(Bt), {
1749
+ v.value.length === 0 ? (i(), I(e(Wt), {
1698
1750
  key: 1,
1699
1751
  icon: "grid",
1700
- title: b.value,
1752
+ title: g.value,
1701
1753
  size: "sm"
1702
1754
  }, {
1703
- default: c(() => [
1704
- t.catalog.length === 0 && t.blocksPath ? (i(), I(T, {
1755
+ default: d(() => [
1756
+ t.catalog.length === 0 && t.blocksPath ? (i(), I(C, {
1705
1757
  key: 0,
1706
1758
  to: t.blocksPath
1707
1759
  }, {
1708
- default: c(() => [
1709
- W(w(e(r)("field.pick-none-link")), 1)
1760
+ default: d(() => [
1761
+ W(_(e(r)("field.pick-none-link")), 1)
1710
1762
  ]),
1711
1763
  _: 1
1712
1764
  }, 8, ["to"])) : N("", !0)
1713
1765
  ]),
1714
1766
  _: 1
1715
1767
  }, 8, ["title"])) : N("", !0),
1716
- (i(!0), $(j, null, Q(d.value, (V) => (i(), $("section", {
1768
+ (i(!0), S(j, null, ee(p.value, (V) => (i(), S("section", {
1717
1769
  key: V.id,
1718
1770
  class: "wx-block-picker__group"
1719
1771
  }, [
1720
- V.label ? (i(), $("div", cn, w(V.label), 1)) : N("", !0),
1721
- B("div", dn, [
1722
- (i(!0), $(j, null, Q(V.options, (x) => (i(), $("button", {
1772
+ V.label ? (i(), S("div", hn, _(V.label), 1)) : N("", !0),
1773
+ E("div", bn, [
1774
+ (i(!0), S(j, null, ee(V.options, (x) => (i(), S("button", {
1723
1775
  key: x.type.id,
1724
1776
  type: "button",
1725
- class: xe(["wx-block-picker__card", { "is-disabled": x.reason !== null }]),
1777
+ class: $e(["wx-block-picker__card", { "is-disabled": x.reason !== null }]),
1726
1778
  disabled: x.reason !== null,
1727
1779
  title: x.reason ?? void 0,
1728
- onClick: (p) => e(o)(x.type)
1780
+ onClick: (m) => e(o)(x.type)
1729
1781
  }, [
1730
- u(Ot, {
1782
+ u(Ft, {
1731
1783
  thumbnail: x.type.thumbnail,
1732
1784
  height: 96
1733
1785
  }, null, 8, ["thumbnail"]),
1734
- B("div", vn, [
1735
- B("div", fn, w(x.type.title), 1),
1786
+ E("div", kn, [
1787
+ E("div", yn, _(x.type.title), 1),
1736
1788
  x.reason ? (i(), I(e(F), {
1737
1789
  key: 0,
1738
1790
  size: "sm",
1739
1791
  tone: "warning"
1740
1792
  }, {
1741
- default: c(() => [
1742
- W(w(x.reason), 1)
1793
+ default: d(() => [
1794
+ W(_(x.reason), 1)
1743
1795
  ]),
1744
1796
  _: 2
1745
1797
  }, 1024)) : x.type.description ? (i(), I(e(F), {
@@ -1747,13 +1799,13 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1747
1799
  size: "sm",
1748
1800
  tone: "muted"
1749
1801
  }, {
1750
- default: c(() => [
1751
- W(w(x.type.description), 1)
1802
+ default: d(() => [
1803
+ W(_(x.type.description), 1)
1752
1804
  ]),
1753
1805
  _: 2
1754
1806
  }, 1024)) : N("", !0)
1755
1807
  ])
1756
- ], 10, pn))), 128))
1808
+ ], 10, gn))), 128))
1757
1809
  ])
1758
1810
  ]))), 128))
1759
1811
  ])
@@ -1762,7 +1814,7 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1762
1814
  }, 8, ["open", "title"]);
1763
1815
  };
1764
1816
  }
1765
- }), hn = /* @__PURE__ */ ne(mn, [["__scopeId", "data-v-99f4090e"]]), bn = { class: "wx-blocks-preview__tools" }, gn = ["src", "title"], kn = /* @__PURE__ */ le({
1817
+ }), _n = /* @__PURE__ */ oe(wn, [["__scopeId", "data-v-99f4090e"]]), xn = { class: "wx-blocks-preview__tools" }, $n = ["src", "title"], Sn = /* @__PURE__ */ ae({
1766
1818
  __name: "BlocksPreview",
1767
1819
  props: {
1768
1820
  url: {},
@@ -1772,122 +1824,122 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1772
1824
  },
1773
1825
  emits: ["select", "edit"],
1774
1826
  setup(t, { expose: l, emit: o }) {
1775
- const n = t, s = o, r = de("webx-blocks"), a = P(null), f = P(null), z = P(null), v = Ke(z), d = P(!1), b = P(!1), m = P(null), h = P(0), T = S(() => h.value > 0), V = S(() => [
1827
+ const a = t, s = o, r = de("webx-blocks"), n = U(null), b = U(null), P = U(null), v = Ye(P), p = U(!1), g = U(!1), f = U(null), k = U(0), C = T(() => k.value > 0), V = T(() => [
1776
1828
  { value: 1280, icon: "monitor", ariaLabel: r("field.width-desktop") },
1777
1829
  { value: 834, icon: "tablet", ariaLabel: r("field.width-tablet") },
1778
1830
  { value: 390, icon: "smartphone", ariaLabel: r("field.width-phone") }
1779
- ]), x = S(() => m.value !== null ? m.value : n.compact ? v.value > 0 && v.value < 560 ? 390 : 834 : 1280), p = S(() => v.value === 0 ? 1 : Math.min(1, v.value / x.value)), k = S(() => ({
1831
+ ]), x = T(() => f.value !== null ? f.value : a.compact ? v.value > 0 && v.value < 560 ? 390 : 834 : 1280), m = T(() => v.value === 0 ? 1 : Math.min(1, v.value / x.value)), y = T(() => ({
1780
1832
  width: `${x.value}px`,
1781
- transform: `scale(${p.value})`,
1782
- ...T.value ? { height: `${h.value}px` } : {}
1783
- })), R = S(() => ({
1784
- width: `${Math.round(x.value * p.value)}px`,
1785
- ...T.value ? { height: `${Math.round(h.value * p.value)}px` } : {}
1786
- })), J = S(() => {
1787
- if (!n.url) return "";
1833
+ transform: `scale(${m.value})`,
1834
+ ...C.value ? { height: `${k.value}px` } : {}
1835
+ })), R = T(() => ({
1836
+ width: `${Math.round(x.value * m.value)}px`,
1837
+ ...C.value ? { height: `${Math.round(k.value * m.value)}px` } : {}
1838
+ })), q = T(() => {
1839
+ if (!a.url) return "";
1788
1840
  try {
1789
- return `${new URL(n.url, location.origin).pathname} · ${x.value} px`;
1841
+ return `${new URL(a.url, location.origin).pathname} · ${x.value} px`;
1790
1842
  } catch {
1791
- return n.url;
1843
+ return a.url;
1792
1844
  }
1793
1845
  });
1794
- function K() {
1846
+ function J() {
1795
1847
  try {
1796
- return a.value?.contentDocument ?? null;
1848
+ return n.value?.contentDocument ?? null;
1797
1849
  } catch {
1798
1850
  return null;
1799
1851
  }
1800
1852
  }
1801
- let ae = null, C = null;
1802
- function M(A) {
1803
- A.documentElement.scrollTop !== 0 && (A.documentElement.scrollTop = 0);
1853
+ let Z = null, c = null;
1854
+ function B(z) {
1855
+ z.documentElement.scrollTop !== 0 && (z.documentElement.scrollTop = 0);
1804
1856
  }
1805
- function O() {
1806
- const A = K(), D = A?.body;
1807
- if (!D || !A?.defaultView) return;
1808
- M(A);
1809
- const H = A.defaultView.getComputedStyle(D), G = (parseFloat(H.marginTop) || 0) + (parseFloat(H.marginBottom) || 0), ve = Math.ceil(D.scrollHeight + G);
1810
- ve !== h.value && (h.value = ve, pe !== null && Ft(() => requestAnimationFrame(X)));
1857
+ function D() {
1858
+ const z = J(), O = z?.body;
1859
+ if (!O || !z?.defaultView) return;
1860
+ B(z);
1861
+ const H = z.defaultView.getComputedStyle(O), Y = (parseFloat(H.marginTop) || 0) + (parseFloat(H.marginBottom) || 0), ve = Math.ceil(O.scrollHeight + Y);
1862
+ ve !== k.value && (k.value = ve, pe !== null && Gt(() => requestAnimationFrame(te)));
1811
1863
  }
1812
- function Z(A) {
1813
- C?.disconnect();
1814
- const D = A.defaultView;
1815
- !D || !A.body || (C = new D.ResizeObserver(O), C.observe(A.body), O());
1864
+ function K(z) {
1865
+ c?.disconnect();
1866
+ const O = z.defaultView;
1867
+ !O || !z.body || (c = new O.ResizeObserver(D), c.observe(z.body), D());
1816
1868
  }
1817
- function $e() {
1818
- b.value = !0;
1819
- const A = K();
1820
- A && (Z(A), ae?.release(), ae = xl(A, {
1869
+ function Se() {
1870
+ g.value = !0;
1871
+ const z = J();
1872
+ z && (K(z), Z?.release(), Z = Tl(z, {
1821
1873
  /* No guard against answering a click with a scroll: `bring` moves nothing that is already
1822
1874
  readable, and a block clicked at the very bottom of the window, half under the action
1823
1875
  bar, is exactly the one worth moving. */
1824
- select: (D) => s("select", D)
1825
- }), Qe(A, n.selected ?? null), we(n.selected ?? null));
1876
+ select: (O) => s("select", O)
1877
+ }), et(z, a.selected ?? null), _e(a.selected ?? null));
1826
1878
  }
1827
- let pe = null, oe = null;
1828
- function we(A) {
1829
- A !== null && (pe = A, oe !== null && clearTimeout(oe), oe = window.setTimeout(() => {
1830
- pe = null, oe = null;
1831
- }, 400), X());
1879
+ let pe = null, se = null;
1880
+ function _e(z) {
1881
+ z !== null && (pe = z, se !== null && clearTimeout(se), se = window.setTimeout(() => {
1882
+ pe = null, se = null;
1883
+ }, 400), te());
1832
1884
  }
1833
- function Se(A) {
1834
- const D = a.value?.getBoundingClientRect();
1835
- if (!D) return null;
1836
- const H = A.getBoundingClientRect();
1837
- return { top: D.top + H.top * p.value, height: H.height * p.value };
1885
+ function Te(z) {
1886
+ const O = n.value?.getBoundingClientRect();
1887
+ if (!O) return null;
1888
+ const H = z.getBoundingClientRect();
1889
+ return { top: O.top + H.top * m.value, height: H.height * m.value };
1838
1890
  }
1839
- function ge() {
1840
- let A = a.value?.parentElement ?? null;
1841
- for (; A; ) {
1842
- const D = getComputedStyle(A).overflowY;
1843
- if ((D === "auto" || D === "scroll") && A.scrollHeight > A.clientHeight)
1844
- return A;
1845
- A = A.parentElement;
1891
+ function ke() {
1892
+ let z = n.value?.parentElement ?? null;
1893
+ for (; z; ) {
1894
+ const O = getComputedStyle(z).overflowY;
1895
+ if ((O === "auto" || O === "scroll") && z.scrollHeight > z.clientHeight)
1896
+ return z;
1897
+ z = z.parentElement;
1846
1898
  }
1847
1899
  return null;
1848
1900
  }
1849
- function X() {
1850
- const A = K();
1851
- if (pe === null || !A) return;
1852
- M(A);
1853
- const D = lt(A, pe), H = D ? Se(D) : null;
1901
+ function te() {
1902
+ const z = J();
1903
+ if (pe === null || !z) return;
1904
+ B(z);
1905
+ const O = at(z, pe), H = O ? Te(O) : null;
1854
1906
  if (!H) return;
1855
- const G = ge(), ve = G?.getBoundingClientRect(), me = f.value?.getBoundingClientRect().height ?? 0, se = {
1907
+ const Y = ke(), ve = Y?.getBoundingClientRect(), me = b.value?.getBoundingClientRect().height ?? 0, ie = {
1856
1908
  top: (ve?.top ?? 0) + me,
1857
1909
  bottom: (ve ? ve.bottom : window.innerHeight) - me
1858
- }, ye = H.top + H.height, Ce = H.top < se.top, Ve = H.height > se.bottom - se.top, y = Ce || Ve ? H.top - se.top : ye > se.bottom ? ye - se.bottom : 0;
1859
- y !== 0 && (G ?? window).scrollBy({ top: y, behavior: "smooth" });
1910
+ }, we = H.top + H.height, Ve = H.top < ie.top, Ee = H.height > ie.bottom - ie.top, w = Ve || Ee ? H.top - ie.top : we > ie.bottom ? we - ie.bottom : 0;
1911
+ w !== 0 && (Y ?? window).scrollBy({ top: w, behavior: "smooth" });
1860
1912
  }
1861
- function Te(A, D) {
1862
- const H = K();
1863
- if (!H || !b.value) return !1;
1864
- const G = _l(H, A, D);
1865
- return G && Qe(H, n.selected ?? null), G;
1913
+ function Ce(z, O) {
1914
+ const H = J();
1915
+ if (!H || !g.value) return !1;
1916
+ const Y = Nt(H, z, O);
1917
+ return Y && et(H, a.selected ?? null), Y;
1866
1918
  }
1867
- function ke() {
1868
- b.value = !1, C?.disconnect(), C = null, a.value && n.url && (a.value.src = n.url);
1919
+ function ye() {
1920
+ g.value = !1, c?.disconnect(), c = null, n.value && a.url && (n.value.src = a.url);
1869
1921
  }
1870
- function fe(A) {
1871
- A.key === "Escape" && d.value && (d.value = !1, A.stopPropagation());
1922
+ function fe(z) {
1923
+ z.key === "Escape" && p.value && (p.value = !1, z.stopPropagation());
1872
1924
  }
1873
- return ce(
1874
- () => n.selected,
1875
- (A) => {
1876
- const D = K();
1877
- !D || !b.value || (Qe(D, A ?? null), we(A ?? null));
1925
+ return X(
1926
+ () => a.selected,
1927
+ (z) => {
1928
+ const O = J();
1929
+ !O || !g.value || (et(O, z ?? null), _e(z ?? null));
1878
1930
  }
1879
- ), ce(() => n.reload, ke), ce(
1880
- () => n.url,
1881
- () => b.value = !1
1882
- ), Pe(() => window.addEventListener("keydown", fe)), tt(() => {
1883
- window.removeEventListener("keydown", fe), oe !== null && clearTimeout(oe), C?.disconnect(), ae?.release();
1884
- }), l({ replace: Te, refresh: ke, open: () => d.value = !0 }), (A, D) => (i(), $("div", {
1885
- class: xe(["wx-blocks-preview", { "is-fullscreen": d.value, "is-grown": T.value, "is-compact": t.compact }]),
1886
- style: _e({ "--wx-preview-scale": p.value })
1931
+ ), X(() => a.reload, ye), X(
1932
+ () => a.url,
1933
+ () => g.value = !1
1934
+ ), Ue(() => window.addEventListener("keydown", fe)), Ge(() => {
1935
+ window.removeEventListener("keydown", fe), se !== null && clearTimeout(se), c?.disconnect(), Z?.release();
1936
+ }), l({ replace: Ce, refresh: ye, open: () => p.value = !0 }), (z, O) => (i(), S("div", {
1937
+ class: $e(["wx-blocks-preview", { "is-fullscreen": p.value, "is-grown": C.value, "is-compact": t.compact }]),
1938
+ style: xe({ "--wx-preview-scale": m.value })
1887
1939
  }, [
1888
- B("div", {
1940
+ E("div", {
1889
1941
  ref_key: "bar",
1890
- ref: f,
1942
+ ref: b,
1891
1943
  class: "wx-blocks-preview__bar"
1892
1944
  }, [
1893
1945
  u(e(F), {
@@ -1896,29 +1948,29 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1896
1948
  class: "wx-blocks-preview__label",
1897
1949
  truncate: ""
1898
1950
  }, {
1899
- default: c(() => [
1900
- W(w(J.value), 1)
1951
+ default: d(() => [
1952
+ W(_(q.value), 1)
1901
1953
  ]),
1902
1954
  _: 1
1903
1955
  }),
1904
- u(e($t), {
1956
+ u(e(Ct), {
1905
1957
  class: "wx-blocks-preview__widths",
1906
1958
  "model-value": x.value,
1907
1959
  options: V.value,
1908
1960
  size: "sm",
1909
1961
  "aria-label": e(r)("field.width"),
1910
- "onUpdate:modelValue": D[0] || (D[0] = (H) => m.value = Number(H))
1962
+ "onUpdate:modelValue": O[0] || (O[0] = (H) => f.value = Number(H))
1911
1963
  }, null, 8, ["model-value", "options", "aria-label"]),
1912
- B("div", bn, [
1913
- t.compact ? (i(), I(e(ze), {
1964
+ E("div", xn, [
1965
+ t.compact ? (i(), I(e(Ie), {
1914
1966
  key: 0,
1915
1967
  size: "sm",
1916
1968
  tone: "primary",
1917
1969
  icon: "edit",
1918
1970
  title: e(r)("field.blocks"),
1919
- onClick: D[1] || (D[1] = (H) => s("edit"))
1971
+ onClick: O[1] || (O[1] = (H) => s("edit"))
1920
1972
  }, null, 8, ["title"])) : N("", !0),
1921
- t.url ? (i(), I(e(ze), {
1973
+ t.url ? (i(), I(e(Ie), {
1922
1974
  key: 1,
1923
1975
  size: "sm",
1924
1976
  icon: "external-link",
@@ -1928,42 +1980,42 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1928
1980
  target: "_blank",
1929
1981
  rel: "noopener"
1930
1982
  }, null, 8, ["title", "href"])) : N("", !0),
1931
- u(e(ze), {
1983
+ u(e(Ie), {
1932
1984
  size: "sm",
1933
- icon: d.value ? "minimize" : "maximize",
1985
+ icon: p.value ? "minimize" : "maximize",
1934
1986
  tone: "neutral",
1935
- title: d.value ? e(r)("field.close") : e(r)("field.fullscreen"),
1936
- onClick: D[2] || (D[2] = (H) => d.value = !d.value)
1987
+ title: p.value ? e(r)("field.close") : e(r)("field.fullscreen"),
1988
+ onClick: O[2] || (O[2] = (H) => p.value = !p.value)
1937
1989
  }, null, 8, ["icon", "title"])
1938
1990
  ])
1939
1991
  ], 512),
1940
- B("div", {
1992
+ E("div", {
1941
1993
  ref_key: "box",
1942
- ref: z,
1994
+ ref: P,
1943
1995
  class: "wx-blocks-preview__ground"
1944
1996
  }, [
1945
- B("div", {
1997
+ E("div", {
1946
1998
  class: "wx-blocks-preview__clip",
1947
- style: _e(R.value)
1999
+ style: xe(R.value)
1948
2000
  }, [
1949
- t.url ? (i(), $("iframe", {
2001
+ t.url ? (i(), S("iframe", {
1950
2002
  key: 0,
1951
2003
  ref_key: "frame",
1952
- ref: a,
2004
+ ref: n,
1953
2005
  class: "wx-blocks-preview__frame",
1954
2006
  src: t.url,
1955
- style: _e(k.value),
2007
+ style: xe(y.value),
1956
2008
  title: e(r)("field.preview"),
1957
- onLoad: $e
1958
- }, null, 44, gn)) : N("", !0)
2009
+ onLoad: Se
2010
+ }, null, 44, $n)) : N("", !0)
1959
2011
  ], 4)
1960
2012
  ], 512)
1961
2013
  ], 6));
1962
2014
  }
1963
- }), yn = /* @__PURE__ */ ne(kn, [["__scopeId", "data-v-398e4cef"]]), wn = { class: "wx-blocks-tree__node" }, _n = ["onClick", "onKeydown"], xn = { class: "wx-blocks-tree__name" }, $n = ["title"], Sn = ["title"], Tn = ["title"], Cn = ["title"], Vn = {
2015
+ }), Tn = /* @__PURE__ */ oe(Sn, [["__scopeId", "data-v-398e4cef"]]), Cn = { class: "wx-blocks-tree__node" }, Vn = ["onClick", "onKeydown"], En = { class: "wx-blocks-tree__name" }, Bn = ["title"], Ln = ["title"], Wn = ["title"], An = ["title"], zn = {
1964
2016
  key: 4,
1965
2017
  class: "wx-blocks-tree__actions"
1966
- }, Bn = ["onClick"], En = /* @__PURE__ */ le({
2018
+ }, In = ["onClick"], Nn = /* @__PURE__ */ ae({
1967
2019
  __name: "BlocksTree",
1968
2020
  props: {
1969
2021
  nodes: {},
@@ -1976,133 +2028,133 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
1976
2028
  },
1977
2029
  emits: ["select", "add", "remove", "duplicate", "visibility", "reorder"],
1978
2030
  setup(t, { emit: l }) {
1979
- const o = t, n = l, s = de("webx-blocks");
1980
- function r(d) {
1981
- return o.catalog.find((b) => b.slug === d.type) ?? null;
2031
+ const o = t, a = l, s = de("webx-blocks");
2032
+ function r(p) {
2033
+ return o.catalog.find((g) => g.slug === p.type) ?? null;
1982
2034
  }
1983
- function a(d) {
1984
- return r(d)?.title ?? d.type;
2035
+ function n(p) {
2036
+ return r(p)?.title ?? p.type;
1985
2037
  }
1986
- function f(d) {
1987
- const b = r(d);
1988
- return b?.content ? Nt(b.content.schema) : [];
2038
+ function b(p) {
2039
+ const g = r(p);
2040
+ return g?.content ? Dt(g.content.schema) : [];
1989
2041
  }
1990
- function z(d, b) {
1991
- const m = d.values[b.id];
1992
- return Array.isArray(m) ? m : [];
2042
+ function P(p, g) {
2043
+ const f = p.values[g.id];
2044
+ return Array.isArray(f) ? f : [];
1993
2045
  }
1994
- function v(d) {
2046
+ function v(p) {
1995
2047
  return [
1996
2048
  {
1997
2049
  key: "visibility",
1998
- icon: d.hidden === !0 ? "eye" : "eye-off",
1999
- label: d.hidden === !0 ? s("field.show") : s("field.hide"),
2000
- run: () => n("visibility", d.key, d.hidden !== !0)
2050
+ icon: p.hidden === !0 ? "eye" : "eye-off",
2051
+ label: p.hidden === !0 ? s("field.show") : s("field.hide"),
2052
+ run: () => a("visibility", p.key, p.hidden !== !0)
2001
2053
  },
2002
2054
  {
2003
2055
  key: "duplicate",
2004
2056
  icon: "copy",
2005
2057
  label: s("field.duplicate"),
2006
- run: () => n("duplicate", d.key)
2058
+ run: () => a("duplicate", p.key)
2007
2059
  },
2008
2060
  {
2009
2061
  key: "remove",
2010
2062
  icon: "trash",
2011
2063
  label: s("field.remove"),
2012
2064
  danger: !0,
2013
- run: () => n("remove", d.key)
2065
+ run: () => a("remove", p.key)
2014
2066
  }
2015
2067
  ];
2016
2068
  }
2017
- return (d, b) => {
2018
- const m = yt("blocks-tree", !0);
2019
- return i(), I(e(dl), {
2069
+ return (p, g) => {
2070
+ const f = xt("blocks-tree", !0);
2071
+ return i(), I(e(ml), {
2020
2072
  "model-value": t.nodes,
2021
2073
  "item-key": "key",
2022
- "item-label": (h) => a(h),
2074
+ "item-label": (k) => n(k),
2023
2075
  disabled: t.disabled,
2024
2076
  plain: "",
2025
2077
  size: "sm",
2026
2078
  "empty-text": t.depth === 0 ? e(s)("field.empty") : "",
2027
- class: xe(["wx-blocks-tree", { "is-nested": t.depth > 0 }]),
2028
- "onUpdate:modelValue": b[6] || (b[6] = (h) => n("reorder", t.parentKey, t.field, h))
2079
+ class: $e(["wx-blocks-tree", { "is-nested": t.depth > 0 }]),
2080
+ "onUpdate:modelValue": g[6] || (g[6] = (k) => a("reorder", t.parentKey, t.field, k))
2029
2081
  }, {
2030
- default: c(({ item: h }) => [
2031
- B("div", wn, [
2032
- B("div", {
2033
- class: xe(["wx-blocks-tree__row", { "is-selected": t.selected === h.key, "is-hidden": h.hidden === !0 }]),
2082
+ default: d(({ item: k }) => [
2083
+ E("div", Cn, [
2084
+ E("div", {
2085
+ class: $e(["wx-blocks-tree__row", { "is-selected": t.selected === k.key, "is-hidden": k.hidden === !0 }]),
2034
2086
  role: "button",
2035
2087
  tabindex: "0",
2036
- onClick: (T) => n("select", h.key),
2088
+ onClick: (C) => a("select", k.key),
2037
2089
  onKeydown: [
2038
- it(rt((T) => n("select", h.key), ["prevent"]), ["enter"]),
2039
- it(rt((T) => n("select", h.key), ["prevent"]), ["space"])
2090
+ ut(ct((C) => a("select", k.key), ["prevent"]), ["enter"]),
2091
+ ut(ct((C) => a("select", k.key), ["prevent"]), ["space"])
2040
2092
  ]
2041
2093
  }, [
2042
- B("span", xn, w(a(h)), 1),
2043
- r(h) ? r(h)?.draft ? (i(), $("span", {
2094
+ E("span", En, _(n(k)), 1),
2095
+ r(k) ? r(k)?.draft ? (i(), S("span", {
2044
2096
  key: 1,
2045
2097
  class: "wx-blocks-tree__flag is-warning",
2046
2098
  title: e(s)("field.draft-type")
2047
2099
  }, [
2048
- u(e(he), { name: "warning" })
2049
- ], 8, Sn)) : r(h)?.is_enabled === !1 ? (i(), $("span", {
2100
+ u(e(be), { name: "warning" })
2101
+ ], 8, Ln)) : r(k)?.is_enabled === !1 ? (i(), S("span", {
2050
2102
  key: 2,
2051
2103
  class: "wx-blocks-tree__flag",
2052
2104
  title: e(s)("field.disabled-type")
2053
2105
  }, [
2054
- u(e(he), { name: "lock" })
2055
- ], 8, Tn)) : N("", !0) : (i(), $("span", {
2106
+ u(e(be), { name: "lock" })
2107
+ ], 8, Wn)) : N("", !0) : (i(), S("span", {
2056
2108
  key: 0,
2057
2109
  class: "wx-blocks-tree__flag is-danger",
2058
- title: e(s)("field.unknown-type", { type: h.type })
2110
+ title: e(s)("field.unknown-type", { type: k.type })
2059
2111
  }, [
2060
- u(e(he), { name: "close-circle" })
2061
- ], 8, $n)),
2062
- h.hidden === !0 ? (i(), $("span", {
2112
+ u(e(be), { name: "close-circle" })
2113
+ ], 8, Bn)),
2114
+ k.hidden === !0 ? (i(), S("span", {
2063
2115
  key: 3,
2064
2116
  class: "wx-blocks-tree__flag",
2065
2117
  title: e(s)("field.hidden-note")
2066
2118
  }, [
2067
- u(e(he), { name: "eye-off" })
2068
- ], 8, Cn)) : N("", !0),
2069
- t.disabled ? N("", !0) : (i(), $("span", Vn, [
2070
- u(e(ll), {
2071
- actions: v(h),
2072
- label: a(h)
2119
+ u(e(be), { name: "eye-off" })
2120
+ ], 8, An)) : N("", !0),
2121
+ t.disabled ? N("", !0) : (i(), S("span", zn, [
2122
+ u(e(sl), {
2123
+ actions: v(k),
2124
+ label: n(k)
2073
2125
  }, null, 8, ["actions", "label"])
2074
2126
  ]))
2075
- ], 42, _n),
2076
- (i(!0), $(j, null, Q(f(h), (T) => (i(), $("div", {
2077
- key: T.id,
2127
+ ], 42, Vn),
2128
+ (i(!0), S(j, null, ee(b(k), (C) => (i(), S("div", {
2129
+ key: C.id,
2078
2130
  class: "wx-blocks-tree__kids"
2079
2131
  }, [
2080
- u(m, {
2081
- nodes: z(h, T),
2132
+ u(f, {
2133
+ nodes: P(k, C),
2082
2134
  catalog: t.catalog,
2083
- "parent-key": h.key,
2084
- field: T.id,
2135
+ "parent-key": k.key,
2136
+ field: C.id,
2085
2137
  selected: t.selected,
2086
2138
  disabled: t.disabled,
2087
2139
  depth: t.depth + 1,
2088
- onSelect: b[0] || (b[0] = (V) => n("select", V)),
2089
- onAdd: b[1] || (b[1] = (V, x, p) => n("add", V, x, p)),
2090
- onRemove: b[2] || (b[2] = (V) => n("remove", V)),
2091
- onDuplicate: b[3] || (b[3] = (V) => n("duplicate", V)),
2092
- onVisibility: b[4] || (b[4] = (V, x) => n("visibility", V, x)),
2093
- onReorder: b[5] || (b[5] = (V, x, p) => n("reorder", V, x, p))
2140
+ onSelect: g[0] || (g[0] = (V) => a("select", V)),
2141
+ onAdd: g[1] || (g[1] = (V, x, m) => a("add", V, x, m)),
2142
+ onRemove: g[2] || (g[2] = (V) => a("remove", V)),
2143
+ onDuplicate: g[3] || (g[3] = (V) => a("duplicate", V)),
2144
+ onVisibility: g[4] || (g[4] = (V, x) => a("visibility", V, x)),
2145
+ onReorder: g[5] || (g[5] = (V, x, m) => a("reorder", V, x, m))
2094
2146
  }, null, 8, ["nodes", "catalog", "parent-key", "field", "selected", "disabled", "depth"]),
2095
- t.disabled ? N("", !0) : (i(), $("button", {
2147
+ t.disabled ? N("", !0) : (i(), S("button", {
2096
2148
  key: 0,
2097
2149
  type: "button",
2098
2150
  class: "wx-blocks-tree__add is-inner",
2099
- onClick: (V) => n("add", h.key, T.id, T)
2151
+ onClick: (V) => a("add", k.key, C.id, C)
2100
2152
  }, [
2101
- W(" + " + w(e(s)("field.add-inside")), 1),
2102
- f(h).length > 1 ? (i(), $(j, { key: 0 }, [
2103
- W(" · " + w(T.label ?? T.id), 1)
2153
+ W(" + " + _(e(s)("field.add-inside")), 1),
2154
+ b(k).length > 1 ? (i(), S(j, { key: 0 }, [
2155
+ W(" · " + _(C.label ?? C.id), 1)
2104
2156
  ], 64)) : N("", !0)
2105
- ], 8, Bn))
2157
+ ], 8, In))
2106
2158
  ]))), 128))
2107
2159
  ])
2108
2160
  ]),
@@ -2110,33 +2162,33 @@ new Swiper(el.querySelector('.b-slider__viewport'), { loop: true })`
2110
2162
  }, 8, ["model-value", "item-label", "disabled", "empty-text", "class"]);
2111
2163
  };
2112
2164
  }
2113
- }), Wn = /* @__PURE__ */ ne(En, [["__scopeId", "data-v-590fa1d6"]]), ot = /* @__PURE__ */ Symbol("wx-blocks-preview");
2114
- function ha(t) {
2115
- _t(ot, t);
2165
+ }), Pn = /* @__PURE__ */ oe(Nn, [["__scopeId", "data-v-590fa1d6"]]), it = /* @__PURE__ */ Symbol("wx-blocks-preview");
2166
+ function _a(t) {
2167
+ St(it, t);
2116
2168
  }
2117
- function ba() {
2118
- return Fe(ot, null);
2169
+ function xa() {
2170
+ return qe(it, null);
2119
2171
  }
2120
- const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2172
+ const _t = /* @__PURE__ */ Symbol("wx-blocks-root"), Un = {
2121
2173
  key: 0,
2122
2174
  class: "wx-blocks-nested"
2123
- }, An = {
2175
+ }, Mn = {
2124
2176
  key: 0,
2125
2177
  class: "wx-blocks__tree"
2126
- }, zn = { class: "wx-blocks__panel-head" }, In = { class: "wx-blocks__panel-title" }, Nn = { class: "wx-blocks__tools" }, Pn = {
2178
+ }, Dn = { class: "wx-blocks__panel-head" }, On = { class: "wx-blocks__panel-title" }, Rn = { class: "wx-blocks__tools" }, Hn = {
2127
2179
  key: 1,
2128
2180
  class: "wx-blocks__fields"
2129
- }, Un = { class: "wx-blocks__panel-head" }, Mn = { class: "wx-blocks__panel-title" }, Dn = {
2181
+ }, jn = { class: "wx-blocks__panel-head" }, Fn = { class: "wx-blocks__panel-title" }, qn = {
2130
2182
  key: 0,
2131
2183
  class: "wx-blocks__trail"
2132
- }, On = ["onClick"], Rn = { class: "wx-blocks__panel-name" }, Hn = { class: "wx-blocks__panel-extra" }, jn = { key: 0 }, Fn = { class: "wx-blocks__form" }, qn = {
2184
+ }, Jn = ["onClick"], Kn = { class: "wx-blocks__panel-name" }, Gn = { class: "wx-blocks__panel-extra" }, Yn = { key: 0 }, Zn = { class: "wx-blocks__form" }, Qn = {
2133
2185
  key: 0,
2134
2186
  class: "wx-blocks__preview"
2135
- }, Jn = /* @__PURE__ */ le({
2187
+ }, Xn = /* @__PURE__ */ ae({
2136
2188
  name: "WxBlocks",
2137
2189
  inheritAttrs: !1,
2138
2190
  __name: "BlocksField",
2139
- props: /* @__PURE__ */ Gt({
2191
+ props: /* @__PURE__ */ el({
2140
2192
  node: { default: void 0 },
2141
2193
  context: { default: void 0 },
2142
2194
  name: { default: void 0 },
@@ -2152,37 +2204,37 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2152
2204
  }),
2153
2205
  emits: ["update:modelValue"],
2154
2206
  setup(t) {
2155
- const l = t, o = qt(t, "modelValue"), n = Fe(kt, !1);
2156
- _t(kt, !0), Oe();
2157
- const s = de("webx-blocks"), r = Me(), a = Fe(nl, null);
2158
- let f = null;
2159
- const z = P([]), v = S(() => l.catalog ?? z.value), d = S(() => Array.isArray(o.value) ? o.value : []), b = P(null), m = S(() => b.value ? ie(d.value, b.value) : null), h = S(
2160
- () => m.value ? v.value.find((y) => y.slug === m.value?.node.type) ?? null : null
2207
+ const l = t, o = Yt(t, "modelValue"), a = qe(_t, !1);
2208
+ St(_t, !0), Re();
2209
+ const s = de("webx-blocks"), r = De(), n = qe(il, null);
2210
+ let b = null;
2211
+ const P = U([]), v = T(() => l.catalog ?? P.value), p = T(() => Array.isArray(o.value) ? o.value : []), g = U(null), f = T(() => g.value ? re(p.value, g.value) : null), k = T(
2212
+ () => f.value ? v.value.find((w) => w.slug === f.value?.node.type) ?? null : null
2161
2213
  );
2162
- function T(y) {
2163
- return v.value.find((E) => E.slug === y.type)?.title ?? y.type;
2214
+ function C(w) {
2215
+ return v.value.find((L) => L.slug === w.type)?.title ?? w.type;
2164
2216
  }
2165
- const V = S(() => {
2166
- const y = [];
2167
- return De(d.value, (E) => y.push(E.key)), y;
2168
- }), x = S(() => {
2169
- const y = b.value ? V.value.indexOf(b.value) : -1;
2217
+ const V = T(() => {
2218
+ const w = [];
2219
+ return Oe(p.value, (L) => w.push(L.key)), w;
2220
+ }), x = T(() => {
2221
+ const w = g.value ? V.value.indexOf(g.value) : -1;
2170
2222
  return {
2171
- previous: y > 0 ? V.value[y - 1] : null,
2172
- next: y >= 0 && y < V.value.length - 1 ? V.value[y + 1] : null
2223
+ previous: w > 0 ? V.value[w - 1] : null,
2224
+ next: w >= 0 && w < V.value.length - 1 ? V.value[w + 1] : null
2173
2225
  };
2174
- }), p = S(() => {
2175
- const y = [];
2176
- let E = m.value?.parent ?? null;
2177
- for (; E; )
2178
- y.unshift({ key: E.key, title: T(E) }), E = ie(d.value, E.key)?.parent ?? null;
2179
- return y;
2180
- }), k = Fe(ot, null), R = P(null), J = P(null), K = Ke(J), ae = S(() => k !== null && k.url.value !== null), C = S(() => ae.value && K.value > 0 && K.value <= 900), M = P(!1), O = S(() => {
2181
- if (!m.value) return;
2182
- const y = h.value?.title ?? m.value.node.type;
2183
- return [...p.value.map((E) => E.title), y].join(" / ");
2184
- }), Z = S(
2185
- () => C.value ? {
2226
+ }), m = T(() => {
2227
+ const w = [];
2228
+ let L = f.value?.parent ?? null;
2229
+ for (; L; )
2230
+ w.unshift({ key: L.key, title: C(L) }), L = re(p.value, L.key)?.parent ?? null;
2231
+ return w;
2232
+ }), y = qe(it, null), R = U(null), q = U(null), J = Ye(q), Z = T(() => y !== null && y.url.value !== null), c = T(() => Z.value && J.value > 0 && J.value <= 900), B = U(!1), D = T(() => {
2233
+ if (!f.value) return;
2234
+ const w = k.value?.title ?? f.value.node.type;
2235
+ return [...m.value.map((L) => L.title), w].join(" / ");
2236
+ }), K = T(
2237
+ () => c.value ? {
2186
2238
  /* Up from the bottom, and not all the way: the strip of page left above it is what
2187
2239
  says the sheet is over the page rather than instead of it. No heading of its own —
2188
2240
  the panels inside carry theirs, and the × is the one thing the sheet has to add. */
@@ -2199,259 +2251,259 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2199
2251
  the blocks it is inside spelled out in front of it, because the trail that says so
2200
2252
  in the column is part of the heading this replaces. The tree keeps its own heading,
2201
2253
  which already says what it is and how many. */
2202
- title: O.value,
2203
- open: M.value,
2204
- "onUpdate:open": (y) => M.value = y
2254
+ title: D.value,
2255
+ open: B.value,
2256
+ "onUpdate:open": (w) => B.value = w
2205
2257
  } : {}
2206
- ), $e = S(
2207
- () => a?.state.manifest?.modules.find((y) => y.id === "blocks")?.meta?.groups ?? []
2208
- ), pe = Jt()?.type, oe = S(() => l.context?.types ? l.context.types : a?.types ? { ...Ye, ...a.types } : pe ? { ...Ye, "wx-blocks": { component: pe, kind: "field", nested: !0 } } : Ye), we = S(
2209
- () => l.context?.translate ?? a?.i18n.t ?? ((y) => y)
2210
- ), Se = S(() => l.context?.can ?? a?.can ?? (() => !0)), ge = Et(hn);
2211
- function X(y) {
2212
- o.value = y;
2258
+ ), Se = T(
2259
+ () => n?.state.manifest?.modules.find((w) => w.id === "blocks")?.meta?.groups ?? []
2260
+ ), pe = Zt()?.type, se = T(() => l.context?.types ? l.context.types : n?.types ? { ...Xe, ...n.types } : pe ? { ...Xe, "wx-blocks": { component: pe, kind: "field", nested: !0 } } : Xe), _e = T(
2261
+ () => l.context?.translate ?? n?.i18n.t ?? ((w) => w)
2262
+ ), Te = T(() => l.context?.can ?? n?.can ?? (() => !0)), ke = At(_n);
2263
+ function te(w) {
2264
+ o.value = w;
2213
2265
  }
2214
- async function Te(y, E, U) {
2215
- const Y = y ? ie(d.value, y) : null, ee = Y ? v.value.find((Rt) => Rt.slug === Y.node.type) ?? null : null, L = y === null ? l.allow : U?.props?.allow ?? null, g = y === null ? l.max : U?.props?.max ?? null, _ = y === null ? d.value : Y && E ? Y.node.values[E] ?? [] : [];
2216
- if (g != null && _.length >= g) return;
2217
- const Re = await ge({
2266
+ async function Ce(w, L, M) {
2267
+ const Q = w ? re(p.value, w) : null, le = Q ? v.value.find((qt) => qt.slug === Q.node.type) ?? null : null, A = w === null ? l.allow : M?.props?.allow ?? null, h = w === null ? l.max : M?.props?.max ?? null, $ = w === null ? p.value : Q && L ? Q.node.values[L] ?? [] : [];
2268
+ if (h != null && $.length >= h) return;
2269
+ const He = await ke({
2218
2270
  catalog: v.value,
2219
- parent: ee,
2220
- allow: L,
2221
- tree: d.value,
2222
- groups: $e.value,
2271
+ parent: le,
2272
+ allow: A,
2273
+ tree: p.value,
2274
+ groups: Se.value,
2223
2275
  blocksPath: l.blocksPath
2224
2276
  });
2225
- if (!Re) return;
2226
- const st = Bl(Re.slug, ke(Re));
2227
- X(ht(d.value, y, E, _.length, st)), b.value = st.key;
2277
+ if (!He) return;
2278
+ const rt = Il(He.slug, ye(He));
2279
+ te(kt(p.value, w, L, $.length, rt)), g.value = rt.key;
2228
2280
  }
2229
- function ke(y) {
2230
- const E = y.content?.sample ?? {}, U = {};
2231
- for (const [Y, ee] of Object.entries(E))
2232
- (!Array.isArray(ee) || ee.length === 0 || typeof ee[0] != "object") && (U[Y] = ee);
2233
- return U;
2281
+ function ye(w) {
2282
+ const L = w.content?.sample ?? {}, M = {};
2283
+ for (const [Q, le] of Object.entries(L))
2284
+ (!Array.isArray(le) || le.length === 0 || typeof le[0] != "object") && (M[Q] = le);
2285
+ return M;
2234
2286
  }
2235
- async function fe(y) {
2236
- const E = ie(d.value, y);
2237
- if (!E) return;
2238
- const U = Wl(E.node);
2239
- await Je({
2287
+ async function fe(w) {
2288
+ const L = re(p.value, w);
2289
+ if (!L) return;
2290
+ const M = Pl(L.node);
2291
+ await Ke({
2240
2292
  title: s("field.remove-title", {
2241
- title: v.value.find((ee) => ee.slug === E.node.type)?.title ?? E.node.type
2293
+ title: v.value.find((le) => le.slug === L.node.type)?.title ?? L.node.type
2242
2294
  }),
2243
- message: U > 0 ? s("field.remove-text", { count: U }) : s("field.remove-alone"),
2295
+ message: M > 0 ? s("field.remove-text", { count: M }) : s("field.remove-alone"),
2244
2296
  confirmText: s("field.remove"),
2245
2297
  cancelText: s("page.cancel"),
2246
2298
  tone: "danger"
2247
- }) && (b.value === y && (b.value = null), X(zl(d.value, y)));
2299
+ }) && (g.value === w && (g.value = null), te(Dl(p.value, w)));
2248
2300
  }
2249
- function A(y) {
2250
- const E = ie(d.value, y);
2251
- if (!E) return;
2252
- const U = Pt(E.node);
2253
- X(ht(d.value, E.parent?.key ?? null, E.field, E.index + 1, U)), b.value = U.key;
2301
+ function z(w) {
2302
+ const L = re(p.value, w);
2303
+ if (!L) return;
2304
+ const M = Ot(L.node);
2305
+ te(kt(p.value, L.parent?.key ?? null, L.field, L.index + 1, M)), g.value = M.key;
2254
2306
  }
2255
- function D(y, E) {
2256
- X(Ll(d.value, y, E));
2307
+ function O(w, L) {
2308
+ te(Ul(p.value, w, L));
2257
2309
  }
2258
- function H(y, E, U) {
2259
- X(Nl(d.value, y, E, U));
2310
+ function H(w, L, M) {
2311
+ te(Rl(p.value, w, L, M));
2260
2312
  }
2261
- function G(y) {
2262
- b.value = b.value === y ? null : y;
2313
+ function Y(w) {
2314
+ g.value = g.value === w ? null : w;
2263
2315
  }
2264
- function ve(y) {
2265
- y === null || !ie(d.value, y) || (b.value = y, C.value && (M.value = !0));
2316
+ function ve(w) {
2317
+ w === null || !re(p.value, w) || (g.value = w, c.value && (B.value = !0));
2266
2318
  }
2267
2319
  function me() {
2268
- b.value = null;
2320
+ g.value = null;
2269
2321
  }
2270
- function se(y) {
2271
- b.value && X(Il(d.value, b.value, y));
2322
+ function ie(w) {
2323
+ g.value && te(Ol(p.value, g.value, w));
2272
2324
  }
2273
- let ye;
2274
- ce(
2275
- () => m.value?.node.values,
2276
- (y, E) => {
2277
- if (!y || !E || !h.value || !f || !k) return;
2278
- const U = b.value, Y = h.value.id;
2279
- clearTimeout(ye), ye = setTimeout(() => {
2280
- !U || !f || f.render(Y, { values: y, key: U }).then((ee) => {
2281
- R.value?.replace(U, ee.html) || R.value?.refresh();
2325
+ let we;
2326
+ X(
2327
+ () => f.value?.node.values,
2328
+ (w, L) => {
2329
+ if (!w || !L || !k.value || !b || !y) return;
2330
+ const M = g.value, Q = k.value.id;
2331
+ clearTimeout(we), we = setTimeout(() => {
2332
+ !M || !b || b.render(Q, { values: w, key: M }).then((le) => {
2333
+ R.value?.replace(M, le.html) || R.value?.refresh();
2282
2334
  }).catch(() => {
2283
2335
  });
2284
2336
  }, 300);
2285
2337
  },
2286
2338
  { deep: !0 }
2287
2339
  );
2288
- function Ce(y) {
2289
- y.key === "Escape" && b.value && me();
2340
+ function Ve(w) {
2341
+ w.key === "Escape" && g.value && me();
2290
2342
  }
2291
- Pe(async () => {
2292
- if (window.addEventListener("keydown", Ce), l.catalog === null && a) {
2293
- f = Le(a);
2343
+ Ue(async () => {
2344
+ if (window.addEventListener("keydown", Ve), l.catalog === null && n) {
2345
+ b = Ae(n);
2294
2346
  try {
2295
- z.value = await f.catalog();
2296
- } catch (y) {
2297
- q.danger(r(y));
2347
+ P.value = await b.catalog();
2348
+ } catch (w) {
2349
+ G.danger(r(w));
2298
2350
  }
2299
- } else a && (f = Le(a));
2300
- }), tt(() => {
2301
- clearTimeout(ye), window.removeEventListener("keydown", Ce);
2351
+ } else n && (b = Ae(n));
2352
+ }), Ge(() => {
2353
+ clearTimeout(we), window.removeEventListener("keydown", Ve);
2302
2354
  });
2303
- const Ve = S(
2304
- () => h.value?.content ? at(h.value.content.schema) : []
2355
+ const Ee = T(
2356
+ () => k.value?.content ? st(k.value.content.schema) : []
2305
2357
  );
2306
- return (y, E) => e(n) ? (i(), $("div", Ln, [
2358
+ return (w, L) => e(a) ? (i(), S("div", Un, [
2307
2359
  u(e(F), {
2308
2360
  size: "sm",
2309
2361
  tone: "muted"
2310
2362
  }, {
2311
- default: c(() => [
2312
- W(w(e(s)("field.nested-note")), 1)
2363
+ default: d(() => [
2364
+ W(_(e(s)("field.nested-note")), 1)
2313
2365
  ]),
2314
2366
  _: 1
2315
2367
  })
2316
- ])) : (i(), $("div", {
2368
+ ])) : (i(), S("div", {
2317
2369
  key: 1,
2318
2370
  ref_key: "host",
2319
- ref: J,
2320
- class: xe(["wx-blocks-host", { "is-compact": C.value }])
2371
+ ref: q,
2372
+ class: $e(["wx-blocks-host", { "is-compact": c.value }])
2321
2373
  }, [
2322
- B("div", {
2323
- class: xe(["wx-blocks", {
2324
- "is-editing": m.value !== null,
2325
- "has-preview": e(k) !== null && e(k).url.value !== null
2374
+ E("div", {
2375
+ class: $e(["wx-blocks", {
2376
+ "is-editing": f.value !== null,
2377
+ "has-preview": e(y) !== null && e(y).url.value !== null
2326
2378
  }])
2327
2379
  }, [
2328
- (i(), I(Kt(C.value ? e(pl) : "div"), Zt(Z.value, { class: "wx-blocks__side" }), {
2329
- default: c(() => [
2330
- m.value ? N("", !0) : (i(), $("div", An, [
2331
- B("div", zn, [
2332
- B("span", In, w(e(s)("field.blocks")), 1),
2380
+ (i(), I(Qt(c.value ? e(hl) : "div"), Xt(K.value, { class: "wx-blocks__side" }), {
2381
+ default: d(() => [
2382
+ f.value ? N("", !0) : (i(), S("div", Mn, [
2383
+ E("div", Dn, [
2384
+ E("span", On, _(e(s)("field.blocks")), 1),
2333
2385
  u(e(F), {
2334
2386
  size: "sm",
2335
2387
  tone: "muted"
2336
2388
  }, {
2337
- default: c(() => [
2338
- W(w(d.value.length), 1)
2389
+ default: d(() => [
2390
+ W(_(p.value.length), 1)
2339
2391
  ]),
2340
2392
  _: 1
2341
2393
  })
2342
2394
  ]),
2343
- u(Wn, {
2344
- nodes: d.value,
2395
+ u(Pn, {
2396
+ nodes: p.value,
2345
2397
  catalog: v.value,
2346
- selected: b.value,
2398
+ selected: g.value,
2347
2399
  disabled: t.disabled,
2348
- onSelect: G,
2349
- onAdd: Te,
2400
+ onSelect: Y,
2401
+ onAdd: Ce,
2350
2402
  onRemove: fe,
2351
- onDuplicate: A,
2352
- onVisibility: D,
2403
+ onDuplicate: z,
2404
+ onVisibility: O,
2353
2405
  onReorder: H
2354
2406
  }, null, 8, ["nodes", "catalog", "selected", "disabled"]),
2355
- B("div", Nn, [
2356
- !t.disabled && (t.max === null || d.value.length < t.max) ? (i(), I(e(ue), {
2407
+ E("div", Rn, [
2408
+ !t.disabled && (t.max === null || p.value.length < t.max) ? (i(), I(e(ce), {
2357
2409
  key: 0,
2358
2410
  variant: "outline",
2359
2411
  icon: "plus",
2360
2412
  class: "wx-blocks__add",
2361
- onClick: E[0] || (E[0] = (U) => Te(null, null, null))
2413
+ onClick: L[0] || (L[0] = (M) => Ce(null, null, null))
2362
2414
  }, {
2363
- default: c(() => [
2364
- W(w(e(s)("field.add")), 1)
2415
+ default: d(() => [
2416
+ W(_(e(s)("field.add")), 1)
2365
2417
  ]),
2366
2418
  _: 1
2367
2419
  })) : N("", !0),
2368
- !C.value && e(k) && e(k).url.value ? (i(), I(e(ue), {
2420
+ !c.value && e(y) && e(y).url.value ? (i(), I(e(ce), {
2369
2421
  key: 1,
2370
2422
  variant: "outline",
2371
2423
  icon: "eye",
2372
2424
  class: "wx-blocks__preview-button",
2373
- onClick: E[1] || (E[1] = (U) => R.value?.open())
2425
+ onClick: L[1] || (L[1] = (M) => R.value?.open())
2374
2426
  }, {
2375
- default: c(() => [
2376
- W(w(e(s)("field.preview")), 1)
2427
+ default: d(() => [
2428
+ W(_(e(s)("field.preview")), 1)
2377
2429
  ]),
2378
2430
  _: 1
2379
2431
  })) : N("", !0)
2380
2432
  ])
2381
2433
  ])),
2382
- m.value ? (i(), $("div", Pn, [
2383
- B("div", Un, [
2384
- B("span", Mn, [
2385
- p.value.length ? (i(), $("span", Dn, [
2386
- (i(!0), $(j, null, Q(p.value, (U) => (i(), $(j, {
2387
- key: U.key
2434
+ f.value ? (i(), S("div", Hn, [
2435
+ E("div", jn, [
2436
+ E("span", Fn, [
2437
+ m.value.length ? (i(), S("span", qn, [
2438
+ (i(!0), S(j, null, ee(m.value, (M) => (i(), S(j, {
2439
+ key: M.key
2388
2440
  }, [
2389
- B("button", {
2441
+ E("button", {
2390
2442
  type: "button",
2391
2443
  class: "wx-blocks__trail-step",
2392
- onClick: (Y) => G(U.key)
2393
- }, w(U.title), 9, On),
2394
- u(e(he), { name: "chevron-right" })
2444
+ onClick: (Q) => Y(M.key)
2445
+ }, _(M.title), 9, Jn),
2446
+ u(e(be), { name: "chevron-right" })
2395
2447
  ], 64))), 128))
2396
2448
  ])) : N("", !0),
2397
- B("span", Rn, w(h.value?.title ?? m.value.node.type), 1)
2449
+ E("span", Kn, _(k.value?.title ?? f.value.node.type), 1)
2398
2450
  ]),
2399
- B("span", Hn, [
2400
- C.value ? N("", !0) : (i(), $("code", jn, w(m.value.node.type), 1)),
2401
- u(e(ze), {
2451
+ E("span", Gn, [
2452
+ c.value ? N("", !0) : (i(), S("code", Yn, _(f.value.node.type), 1)),
2453
+ u(e(Ie), {
2402
2454
  size: "sm",
2403
2455
  tone: "neutral",
2404
2456
  icon: "chevron-up",
2405
2457
  title: e(s)("field.previous"),
2406
2458
  disabled: x.value.previous === null,
2407
- onClick: E[2] || (E[2] = (U) => x.value.previous && G(x.value.previous))
2459
+ onClick: L[2] || (L[2] = (M) => x.value.previous && Y(x.value.previous))
2408
2460
  }, null, 8, ["title", "disabled"]),
2409
- u(e(ze), {
2461
+ u(e(Ie), {
2410
2462
  size: "sm",
2411
2463
  tone: "neutral",
2412
2464
  icon: "chevron-down",
2413
2465
  title: e(s)("field.next"),
2414
2466
  disabled: x.value.next === null,
2415
- onClick: E[3] || (E[3] = (U) => x.value.next && G(x.value.next))
2467
+ onClick: L[3] || (L[3] = (M) => x.value.next && Y(x.value.next))
2416
2468
  }, null, 8, ["title", "disabled"]),
2417
- !C.value && e(k) && e(k).url.value ? (i(), I(e(ue), {
2469
+ !c.value && e(y) && e(y).url.value ? (i(), I(e(ce), {
2418
2470
  key: 1,
2419
2471
  size: "sm",
2420
2472
  variant: "outline",
2421
2473
  icon: "eye",
2422
2474
  class: "wx-blocks__preview-button",
2423
2475
  "aria-label": e(s)("field.preview"),
2424
- onClick: E[4] || (E[4] = (U) => R.value?.open())
2476
+ onClick: L[4] || (L[4] = (M) => R.value?.open())
2425
2477
  }, null, 8, ["aria-label"])) : N("", !0),
2426
- u(e(ue), {
2478
+ u(e(ce), {
2427
2479
  size: "sm",
2428
2480
  variant: "outline",
2429
2481
  onClick: me
2430
2482
  }, {
2431
- default: c(() => [
2432
- W(w(C.value ? e(s)("field.done") : `${e(s)("field.done")} · Esc`), 1)
2483
+ default: d(() => [
2484
+ W(_(c.value ? e(s)("field.done") : `${e(s)("field.done")} · Esc`), 1)
2433
2485
  ]),
2434
2486
  _: 1
2435
2487
  })
2436
2488
  ])
2437
2489
  ]),
2438
- B("div", Fn, [
2439
- h.value?.content ? (i(), I(e(Wt), {
2440
- key: m.value.node.key,
2441
- "model-value": m.value.node.values,
2442
- root: Ve.value,
2443
- types: oe.value,
2444
- translate: we.value,
2445
- can: Se.value,
2490
+ E("div", Zn, [
2491
+ k.value?.content ? (i(), I(e(zt), {
2492
+ key: f.value.node.key,
2493
+ "model-value": f.value.node.values,
2494
+ root: Ee.value,
2495
+ types: se.value,
2496
+ translate: _e.value,
2497
+ can: Te.value,
2446
2498
  disabled: t.disabled,
2447
- "onUpdate:modelValue": se
2499
+ "onUpdate:modelValue": ie
2448
2500
  }, null, 8, ["model-value", "root", "types", "translate", "can", "disabled"])) : (i(), I(e(F), {
2449
2501
  key: 1,
2450
2502
  size: "sm",
2451
2503
  tone: "danger"
2452
2504
  }, {
2453
- default: c(() => [
2454
- W(w(e(s)("field.unknown-type", { type: m.value.node.type })), 1)
2505
+ default: d(() => [
2506
+ W(_(e(s)("field.unknown-type", { type: f.value.node.type })), 1)
2455
2507
  ]),
2456
2508
  _: 1
2457
2509
  }))
@@ -2460,86 +2512,86 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2460
2512
  ]),
2461
2513
  _: 1
2462
2514
  }, 16)),
2463
- e(k) && e(k).url.value ? (i(), $("div", qn, [
2464
- u(yn, {
2515
+ e(y) && e(y).url.value ? (i(), S("div", Qn, [
2516
+ u(Tn, {
2465
2517
  ref_key: "previewEl",
2466
2518
  ref: R,
2467
- url: e(k).url.value,
2468
- selected: b.value,
2469
- reload: e(k).reload?.value ?? 0,
2470
- compact: C.value,
2519
+ url: e(y).url.value,
2520
+ selected: g.value,
2521
+ reload: e(y).reload?.value ?? 0,
2522
+ compact: c.value,
2471
2523
  onSelect: ve,
2472
- onEdit: E[5] || (E[5] = (U) => M.value = !0)
2524
+ onEdit: L[5] || (L[5] = (M) => B.value = !0)
2473
2525
  }, null, 8, ["url", "selected", "reload", "compact"])
2474
2526
  ])) : N("", !0)
2475
2527
  ], 2)
2476
2528
  ], 2));
2477
2529
  }
2478
- }), Kn = /* @__PURE__ */ ne(Jn, [["__scopeId", "data-v-613ad857"]]), Zn = { class: "wx-block-card__body" }, Gn = { class: "wx-block-card__title" }, Yn = { class: "wx-block-card__chips" }, Qn = /* @__PURE__ */ le({
2530
+ }), ea = /* @__PURE__ */ oe(Xn, [["__scopeId", "data-v-613ad857"]]), ta = { class: "wx-block-card__body" }, la = { class: "wx-block-card__title" }, na = { class: "wx-block-card__chips" }, aa = /* @__PURE__ */ ae({
2479
2531
  __name: "BlockCard",
2480
2532
  props: {
2481
2533
  block: {}
2482
2534
  },
2483
2535
  emits: ["open"],
2484
2536
  setup(t, { emit: l }) {
2485
- const o = l, n = de("webx-blocks");
2486
- return (s, r) => (i(), $("button", {
2537
+ const o = l, a = de("webx-blocks");
2538
+ return (s, r) => (i(), S("button", {
2487
2539
  type: "button",
2488
2540
  class: "wx-block-card",
2489
- onClick: r[0] || (r[0] = (a) => o("open", t.block))
2541
+ onClick: r[0] || (r[0] = (n) => o("open", t.block))
2490
2542
  }, [
2491
- u(Ot, {
2543
+ u(Ft, {
2492
2544
  thumbnail: t.block.thumbnail,
2493
2545
  height: 120
2494
2546
  }, null, 8, ["thumbnail"]),
2495
- B("div", Zn, [
2496
- B("div", Gn, w(t.block.title), 1),
2547
+ E("div", ta, [
2548
+ E("div", la, _(t.block.title), 1),
2497
2549
  u(e(F), {
2498
2550
  size: "sm",
2499
2551
  tone: "muted"
2500
2552
  }, {
2501
- default: c(() => [
2502
- B("code", null, w(t.block.slug), 1),
2503
- W(" · " + w(e(et)(t.block.usage_count, e(n))), 1)
2553
+ default: d(() => [
2554
+ E("code", null, _(t.block.slug), 1),
2555
+ W(" · " + _(e(nt)(t.block.usage_count, e(a))), 1)
2504
2556
  ]),
2505
2557
  _: 1
2506
2558
  }),
2507
- B("div", Yn, [
2508
- t.block.draft ? (i(), I(e(re), {
2559
+ E("div", na, [
2560
+ t.block.draft ? (i(), I(e(ue), {
2509
2561
  key: 0,
2510
2562
  type: "warning",
2511
2563
  dot: ""
2512
2564
  }, {
2513
- default: c(() => [
2514
- W(w(e(n)("page.draft", { number: t.block.draft.number })), 1)
2565
+ default: d(() => [
2566
+ W(_(e(a)("page.draft", { number: t.block.draft.number })), 1)
2515
2567
  ]),
2516
2568
  _: 1
2517
2569
  })) : N("", !0),
2518
- t.block.published ? (i(), I(e(re), {
2570
+ t.block.published ? (i(), I(e(ue), {
2519
2571
  key: 1,
2520
2572
  type: "success",
2521
2573
  dot: ""
2522
2574
  }, {
2523
- default: c(() => [
2524
- W(w(e(n)("page.live", { number: t.block.published.number })), 1)
2575
+ default: d(() => [
2576
+ W(_(e(a)("page.live", { number: t.block.published.number })), 1)
2525
2577
  ]),
2526
2578
  _: 1
2527
- })) : (i(), I(e(re), {
2579
+ })) : (i(), I(e(ue), {
2528
2580
  key: 2,
2529
2581
  type: "default"
2530
2582
  }, {
2531
- default: c(() => [
2532
- W(w(e(n)("page.never-published")), 1)
2583
+ default: d(() => [
2584
+ W(_(e(a)("page.never-published")), 1)
2533
2585
  ]),
2534
2586
  _: 1
2535
2587
  })),
2536
- t.block.is_enabled ? N("", !0) : (i(), I(e(re), {
2588
+ t.block.is_enabled ? N("", !0) : (i(), I(e(ue), {
2537
2589
  key: 3,
2538
2590
  type: "default",
2539
2591
  variant: "outline"
2540
2592
  }, {
2541
- default: c(() => [
2542
- W(w(e(n)("page.hidden")), 1)
2593
+ default: d(() => [
2594
+ W(_(e(a)("page.hidden")), 1)
2543
2595
  ]),
2544
2596
  _: 1
2545
2597
  }))
@@ -2547,62 +2599,62 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2547
2599
  ])
2548
2600
  ]));
2549
2601
  }
2550
- }), Xn = /* @__PURE__ */ ne(Qn, [["__scopeId", "data-v-3d94f339"]]), ea = { class: "wx-block-create" }, ta = /* @__PURE__ */ le({
2602
+ }), oa = /* @__PURE__ */ oe(aa, [["__scopeId", "data-v-3d94f339"]]), sa = { class: "wx-block-create" }, ia = /* @__PURE__ */ ae({
2551
2603
  __name: "BlockCreateDialog",
2552
2604
  setup(t) {
2553
- const { resolve: l, dismiss: o, open: n } = Ct(), s = Ue(), r = Le(s);
2554
- Oe();
2555
- const a = de("webx-blocks"), f = Me(), z = S(() => s.state.manifest?.modules.find((k) => k.id === "blocks")?.meta?.groups ?? ["content"]), v = P({ title: "", slug: "", group: z.value[0] ?? "content" }), d = P({}), b = P(!1), m = P(!1), h = S(
2556
- () => z.value.map((p) => ({ value: p, label: Ae(p, a) }))
2605
+ const { resolve: l, dismiss: o, open: a } = Bt(), s = Me(), r = Ae(s);
2606
+ Re();
2607
+ const n = de("webx-blocks"), b = De(), P = T(() => s.state.manifest?.modules.find((y) => y.id === "blocks")?.meta?.groups ?? ["content"]), v = U({ title: "", slug: "", group: P.value[0] ?? "content" }), p = U({}), g = U(!1), f = U(!1), k = T(
2608
+ () => P.value.map((m) => ({ value: m, label: ze(m, n) }))
2557
2609
  );
2558
- function T(p) {
2559
- return p.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").replace(/^[^a-z]+/, "").slice(0, 64);
2610
+ function C(m) {
2611
+ return m.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").replace(/^[^a-z]+/, "").slice(0, 64);
2560
2612
  }
2561
- ce(
2613
+ X(
2562
2614
  () => v.value.title,
2563
- (p) => {
2564
- m.value || (v.value.slug = T(p));
2615
+ (m) => {
2616
+ f.value || (v.value.slug = C(m));
2565
2617
  }
2566
2618
  );
2567
- function V(p) {
2568
- return d.value[p]?.[0];
2619
+ function V(m) {
2620
+ return p.value[m]?.[0];
2569
2621
  }
2570
2622
  async function x() {
2571
- b.value = !0, d.value = {};
2623
+ g.value = !0, p.value = {};
2572
2624
  try {
2573
2625
  l(await r.create(v.value));
2574
- } catch (p) {
2575
- const k = p.body;
2576
- k?.errors ? d.value = k.errors : q.danger(f(p, a("page.failed")));
2626
+ } catch (m) {
2627
+ const y = m.body;
2628
+ y?.errors ? p.value = y.errors : G.danger(b(m, n("page.failed")));
2577
2629
  } finally {
2578
- b.value = !1;
2630
+ g.value = !1;
2579
2631
  }
2580
2632
  }
2581
- return (p, k) => (i(), I(e(Vt), {
2582
- open: e(n),
2583
- "onUpdate:open": k[5] || (k[5] = (R) => wt(n) ? n.value = R : null),
2584
- title: e(a)("page.new"),
2633
+ return (m, y) => (i(), I(e(Lt), {
2634
+ open: e(a),
2635
+ "onUpdate:open": y[5] || (y[5] = (R) => $t(a) ? a.value = R : null),
2636
+ title: e(n)("page.new"),
2585
2637
  width: 520
2586
2638
  }, {
2587
- footer: c(() => [
2588
- u(e(vl), { size: "sm" }, {
2589
- default: c(() => [
2590
- u(e(ue), {
2639
+ footer: d(() => [
2640
+ u(e(bl), { size: "sm" }, {
2641
+ default: d(() => [
2642
+ u(e(ce), {
2591
2643
  variant: "outline",
2592
- onClick: k[4] || (k[4] = (R) => e(o)())
2644
+ onClick: y[4] || (y[4] = (R) => e(o)())
2593
2645
  }, {
2594
- default: c(() => [
2595
- W(w(e(a)("page.cancel")), 1)
2646
+ default: d(() => [
2647
+ W(_(e(n)("page.cancel")), 1)
2596
2648
  ]),
2597
2649
  _: 1
2598
2650
  }),
2599
- u(e(ue), {
2651
+ u(e(ce), {
2600
2652
  type: "primary",
2601
- loading: b.value,
2653
+ loading: g.value,
2602
2654
  onClick: x
2603
2655
  }, {
2604
- default: c(() => [
2605
- W(w(e(a)("page.create")), 1)
2656
+ default: d(() => [
2657
+ W(_(e(n)("page.create")), 1)
2606
2658
  ]),
2607
2659
  _: 1
2608
2660
  }, 8, ["loading"])
@@ -2610,46 +2662,46 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2610
2662
  _: 1
2611
2663
  })
2612
2664
  ]),
2613
- default: c(() => [
2614
- B("div", ea, [
2615
- u(e(te), {
2616
- label: e(a)("page.title"),
2665
+ default: d(() => [
2666
+ E("div", sa, [
2667
+ u(e(ne), {
2668
+ label: e(n)("page.title"),
2617
2669
  error: V("title")
2618
2670
  }, {
2619
- default: c(() => [
2620
- u(e(Ne), {
2671
+ default: d(() => [
2672
+ u(e(Pe), {
2621
2673
  modelValue: v.value.title,
2622
- "onUpdate:modelValue": k[0] || (k[0] = (R) => v.value.title = R),
2674
+ "onUpdate:modelValue": y[0] || (y[0] = (R) => v.value.title = R),
2623
2675
  autofocus: ""
2624
2676
  }, null, 8, ["modelValue"])
2625
2677
  ]),
2626
2678
  _: 1
2627
2679
  }, 8, ["label", "error"]),
2628
- u(e(te), {
2629
- label: e(a)("page.identifier"),
2630
- help: e(a)("page.identifier-help"),
2680
+ u(e(ne), {
2681
+ label: e(n)("page.identifier"),
2682
+ help: e(n)("page.identifier-help"),
2631
2683
  error: V("slug")
2632
2684
  }, {
2633
- default: c(() => [
2634
- u(e(Ne), {
2685
+ default: d(() => [
2686
+ u(e(Pe), {
2635
2687
  modelValue: v.value.slug,
2636
- "onUpdate:modelValue": k[1] || (k[1] = (R) => v.value.slug = R),
2688
+ "onUpdate:modelValue": y[1] || (y[1] = (R) => v.value.slug = R),
2637
2689
  placeholder: "hero",
2638
- onInput: k[2] || (k[2] = (R) => m.value = !0)
2690
+ onInput: y[2] || (y[2] = (R) => f.value = !0)
2639
2691
  }, null, 8, ["modelValue"])
2640
2692
  ]),
2641
2693
  _: 1
2642
2694
  }, 8, ["label", "help", "error"]),
2643
- u(e(te), {
2644
- label: e(a)("page.group"),
2645
- help: e(a)("page.group-help"),
2695
+ u(e(ne), {
2696
+ label: e(n)("page.group"),
2697
+ help: e(n)("page.group-help"),
2646
2698
  error: V("group")
2647
2699
  }, {
2648
- default: c(() => [
2649
- u(e(Tt), {
2700
+ default: d(() => [
2701
+ u(e(Et), {
2650
2702
  modelValue: v.value.group,
2651
- "onUpdate:modelValue": k[3] || (k[3] = (R) => v.value.group = R),
2652
- options: h.value
2703
+ "onUpdate:modelValue": y[3] || (y[3] = (R) => v.value.group = R),
2704
+ options: k.value
2653
2705
  }, null, 8, ["modelValue", "options"])
2654
2706
  ]),
2655
2707
  _: 1
@@ -2659,121 +2711,121 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2659
2711
  _: 1
2660
2712
  }, 8, ["open", "title"]));
2661
2713
  }
2662
- }), la = /* @__PURE__ */ ne(ta, [["__scopeId", "data-v-a4c0d44c"]]), na = {
2714
+ }), ra = /* @__PURE__ */ oe(ia, [["__scopeId", "data-v-a4c0d44c"]]), ua = {
2663
2715
  key: 1,
2664
2716
  class: "wx-blocks-page__toolbar"
2665
- }, aa = { class: "wx-blocks-page__cards" }, oa = { class: "wx-blocks-page__ghost-body" }, sa = {
2717
+ }, ca = { class: "wx-blocks-page__cards" }, da = { class: "wx-blocks-page__ghost-body" }, pa = {
2666
2718
  key: 0,
2667
2719
  class: "wx-blocks-page__group-title"
2668
- }, ia = { class: "wx-blocks-page__cards" }, ra = /* @__PURE__ */ le({
2720
+ }, va = { class: "wx-blocks-page__cards" }, fa = /* @__PURE__ */ ae({
2669
2721
  __name: "BlocksPage",
2670
2722
  props: {
2671
2723
  base: { default: "/blocks" }
2672
2724
  },
2673
2725
  setup(t) {
2674
- const l = t, o = Ue(), n = Le(o), s = xt();
2675
- Oe();
2676
- const r = de("webx-blocks"), a = Me(), f = P([]), z = P(!0), v = P(""), d = P(""), b = Et(la), m = S(() => {
2677
- const C = o.state.manifest?.modules.find((M) => M.id === "blocks")?.meta;
2726
+ const l = t, o = Me(), a = Ae(o), s = Tt();
2727
+ Re();
2728
+ const r = de("webx-blocks"), n = De(), b = U([]), P = U(!0), v = U(""), p = U(""), g = At(ra), f = T(() => {
2729
+ const c = o.state.manifest?.modules.find((B) => B.id === "blocks")?.meta;
2678
2730
  return {
2679
- groups: C?.groups ?? [],
2680
- editing: C?.editing ?? !0,
2681
- provides: C?.provides ?? []
2731
+ groups: c?.groups ?? [],
2732
+ editing: c?.editing ?? !0,
2733
+ provides: c?.provides ?? []
2682
2734
  };
2683
- }), h = S(() => o.can("blocks.manage") && m.value.editing), T = S(
2684
- () => o.state.manifest?.modules.find((C) => C.id === "blocks")?.title ?? r("module.title")
2685
- ), V = S(() => {
2686
- const C = v.value.trim().toLowerCase(), M = d.value === "" ? f.value : f.value.filter((O) => O.group === d.value);
2687
- return C === "" ? M : M.filter(
2688
- (O) => O.title.toLowerCase().includes(C) || O.slug.includes(C) || (O.description ?? "").toLowerCase().includes(C)
2735
+ }), k = T(() => o.can("blocks.manage") && f.value.editing), C = T(
2736
+ () => o.state.manifest?.modules.find((c) => c.id === "blocks")?.title ?? r("module.title")
2737
+ ), V = T(() => {
2738
+ const c = v.value.trim().toLowerCase(), B = p.value === "" ? b.value : b.value.filter((D) => D.group === p.value);
2739
+ return c === "" ? B : B.filter(
2740
+ (D) => D.title.toLowerCase().includes(c) || D.slug.includes(c) || (D.description ?? "").toLowerCase().includes(c)
2689
2741
  );
2690
- }), x = S(() => {
2691
- const C = [...m.value.groups];
2692
- for (const M of f.value)
2693
- C.includes(M.group) || C.push(M.group);
2694
- return C.filter((M) => f.value.some((O) => O.group === M));
2695
- }), p = S(
2742
+ }), x = T(() => {
2743
+ const c = [...f.value.groups];
2744
+ for (const B of b.value)
2745
+ c.includes(B.group) || c.push(B.group);
2746
+ return c.filter((B) => b.value.some((D) => D.group === B));
2747
+ }), m = T(
2696
2748
  () => x.value.length < 2 ? [] : [
2697
2749
  { value: "", label: r("page.all-groups") },
2698
- ...x.value.map((C) => ({ value: C, label: Ae(C, r) }))
2750
+ ...x.value.map((c) => ({ value: c, label: ze(c, r) }))
2699
2751
  ]
2700
- ), k = S(() => {
2701
- const C = x.value.map((O) => ({
2702
- id: O,
2703
- label: Ae(O, r),
2704
- blocks: V.value.filter((Z) => Z.group === O)
2705
- })).filter((O) => O.blocks.length > 0);
2706
- return d.value !== "" || V.value.length <= 5 || v.value.trim() !== "" || C.length < 2 ? [{ id: "", label: "", blocks: V.value }] : C;
2752
+ ), y = T(() => {
2753
+ const c = x.value.map((D) => ({
2754
+ id: D,
2755
+ label: ze(D, r),
2756
+ blocks: V.value.filter((K) => K.group === D)
2757
+ })).filter((D) => D.blocks.length > 0);
2758
+ return p.value !== "" || V.value.length <= 5 || v.value.trim() !== "" || c.length < 2 ? [{ id: "", label: "", blocks: V.value }] : c;
2707
2759
  });
2708
2760
  async function R() {
2709
- z.value = !0;
2761
+ P.value = !0;
2710
2762
  try {
2711
- f.value = await n.list();
2712
- } catch (C) {
2713
- q.danger(a(C));
2763
+ b.value = await a.list();
2764
+ } catch (c) {
2765
+ G.danger(n(c));
2714
2766
  } finally {
2715
- z.value = !1;
2767
+ P.value = !1;
2716
2768
  }
2717
2769
  }
2718
- function J(C) {
2719
- s.push(`${l.base}/${C.id}`);
2770
+ function q(c) {
2771
+ s.push(`${l.base}/${c.id}`);
2720
2772
  }
2721
- async function K() {
2722
- const C = await b({});
2723
- C && J(C);
2773
+ async function J() {
2774
+ const c = await g({});
2775
+ c && q(c);
2724
2776
  }
2725
- Pe(R);
2726
- const ae = S(
2727
- () => h.value ? [{ key: "new", label: r("page.new"), icon: "plus", primary: !0, run: () => {
2728
- K();
2777
+ Ue(R);
2778
+ const Z = T(
2779
+ () => k.value ? [{ key: "new", label: r("page.new"), icon: "plus", primary: !0, run: () => {
2780
+ J();
2729
2781
  } }] : []
2730
2782
  );
2731
- return (C, M) => (i(), I(e(al), {
2732
- view: d.value,
2733
- "onUpdate:view": M[1] || (M[1] = (O) => d.value = O),
2783
+ return (c, B) => (i(), I(e(rl), {
2784
+ view: p.value,
2785
+ "onUpdate:view": B[1] || (B[1] = (D) => p.value = D),
2734
2786
  class: "wx-blocks-page",
2735
- title: T.value,
2736
- views: p.value,
2737
- actions: ae.value
2787
+ title: C.value,
2788
+ views: m.value,
2789
+ actions: Z.value
2738
2790
  }, {
2739
- default: c(() => [
2740
- m.value.editing ? N("", !0) : (i(), I(e(St), {
2791
+ default: d(() => [
2792
+ f.value.editing ? N("", !0) : (i(), I(e(Vt), {
2741
2793
  key: 0,
2742
2794
  type: "info",
2743
2795
  variant: "soft",
2744
2796
  description: e(r)("page.editing-off")
2745
2797
  }, null, 8, ["description"])),
2746
- z.value || f.value.length > 0 ? (i(), $("div", na, [
2747
- u(e(Ne), {
2798
+ P.value || b.value.length > 0 ? (i(), S("div", ua, [
2799
+ u(e(Pe), {
2748
2800
  modelValue: v.value,
2749
- "onUpdate:modelValue": M[0] || (M[0] = (O) => v.value = O),
2801
+ "onUpdate:modelValue": B[0] || (B[0] = (D) => v.value = D),
2750
2802
  class: "wx-blocks-page__search",
2751
2803
  placeholder: e(r)("page.search"),
2752
2804
  clearable: ""
2753
2805
  }, null, 8, ["modelValue", "placeholder"])
2754
2806
  ])) : N("", !0),
2755
- z.value ? (i(), I(e(We), { key: 2 }, {
2756
- template: c(() => [
2757
- B("div", aa, [
2758
- (i(), $(j, null, Q(4, (O) => B("div", {
2759
- key: O,
2807
+ P.value ? (i(), I(e(We), { key: 2 }, {
2808
+ template: d(() => [
2809
+ E("div", ca, [
2810
+ (i(), S(j, null, ee(4, (D) => E("div", {
2811
+ key: D,
2760
2812
  class: "wx-blocks-page__ghost"
2761
2813
  }, [
2762
- u(e(je), {
2814
+ u(e(Fe), {
2763
2815
  variant: "image",
2764
2816
  height: 120,
2765
2817
  class: "wx-blocks-page__ghost-thumb"
2766
2818
  }),
2767
- B("div", oa, [
2768
- u(e(je), {
2819
+ E("div", da, [
2820
+ u(e(Fe), {
2769
2821
  variant: "title",
2770
2822
  width: "45%"
2771
2823
  }),
2772
- u(e(je), {
2824
+ u(e(Fe), {
2773
2825
  variant: "text",
2774
2826
  width: "70%"
2775
2827
  }),
2776
- u(e(je), {
2828
+ u(e(Fe), {
2777
2829
  variant: "button",
2778
2830
  width: "64px",
2779
2831
  height: "22px"
@@ -2783,21 +2835,21 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2783
2835
  ])
2784
2836
  ]),
2785
2837
  _: 1
2786
- })) : f.value.length === 0 ? (i(), I(e(Bt), {
2838
+ })) : b.value.length === 0 ? (i(), I(e(Wt), {
2787
2839
  key: 3,
2788
2840
  icon: "grid",
2789
2841
  title: e(r)("page.empty"),
2790
2842
  description: e(r)("page.empty-help")
2791
- }, null, 8, ["title", "description"])) : (i(!0), $(j, { key: 4 }, Q(k.value, (O) => (i(), $("section", {
2792
- key: O.id,
2843
+ }, null, 8, ["title", "description"])) : (i(!0), S(j, { key: 4 }, ee(y.value, (D) => (i(), S("section", {
2844
+ key: D.id,
2793
2845
  class: "wx-blocks-page__group"
2794
2846
  }, [
2795
- O.label ? (i(), $("div", sa, w(O.label), 1)) : N("", !0),
2796
- B("div", ia, [
2797
- (i(!0), $(j, null, Q(O.blocks, (Z) => (i(), I(Xn, {
2798
- key: Z.id,
2799
- block: Z,
2800
- onOpen: J
2847
+ D.label ? (i(), S("div", pa, _(D.label), 1)) : N("", !0),
2848
+ E("div", va, [
2849
+ (i(!0), S(j, null, ee(D.blocks, (K) => (i(), I(oa, {
2850
+ key: K.id,
2851
+ block: K,
2852
+ onOpen: q
2801
2853
  }, null, 8, ["block"]))), 128))
2802
2854
  ])
2803
2855
  ]))), 128))
@@ -2805,18 +2857,18 @@ const kt = /* @__PURE__ */ Symbol("wx-blocks-root"), Ln = {
2805
2857
  _: 1
2806
2858
  }, 8, ["view", "title", "views", "actions"]));
2807
2859
  }
2808
- }), ua = /* @__PURE__ */ ne(ra, [["__scopeId", "data-v-553b680f"]]);
2809
- function ga(t = {}) {
2860
+ }), ma = /* @__PURE__ */ oe(fa, [["__scopeId", "data-v-553b680f"]]);
2861
+ function $a(t = {}) {
2810
2862
  const l = t.path ?? "/blocks";
2811
2863
  return {
2812
2864
  id: "blocks",
2813
2865
  path: l,
2814
2866
  routes: [
2815
- { path: l, name: "webx.blocks", component: ua, props: { base: l } },
2867
+ { path: l, name: "webx.blocks", component: ma, props: { base: l } },
2816
2868
  {
2817
2869
  path: `${l}/:id(\\d+)`,
2818
2870
  name: "webx.blocks.edit",
2819
- component: an,
2871
+ component: dn,
2820
2872
  props: { base: l }
2821
2873
  }
2822
2874
  ],
@@ -2825,7 +2877,7 @@ function ga(t = {}) {
2825
2877
  // draws its children through the renderer; it needs the node for `props.allow` alone.
2826
2878
  types: {
2827
2879
  "wx-blocks": {
2828
- component: Kn,
2880
+ component: ea,
2829
2881
  kind: "field",
2830
2882
  nested: !0,
2831
2883
  wide: !0,
@@ -2835,37 +2887,37 @@ function ga(t = {}) {
2835
2887
  };
2836
2888
  }
2837
2889
  export {
2838
- an as WxBlockEditorPage,
2839
- hn as WxBlockPicker,
2840
- Vl as WxBlockStage,
2841
- Ot as WxBlockThumb,
2842
- Kn as WxBlocks,
2843
- ua as WxBlocksPage,
2844
- ga as blocks,
2845
- Pl as blocksMessages,
2846
- ot as blocksPreviewKey,
2847
- Pt as cloneNode,
2848
- El as countType,
2849
- Le as createBlocksApi,
2850
- Lt as findRange,
2851
- at as formSchema,
2852
- Qe as highlightBlock,
2853
- ht as insertNode,
2854
- zt as isNode,
2890
+ dn as WxBlockEditorPage,
2891
+ _n as WxBlockPicker,
2892
+ zl as WxBlockStage,
2893
+ Ft as WxBlockThumb,
2894
+ ea as WxBlocks,
2895
+ ma as WxBlocksPage,
2896
+ $a as blocks,
2897
+ Hl as blocksMessages,
2898
+ it as blocksPreviewKey,
2899
+ Ot as cloneNode,
2900
+ Nl as countType,
2901
+ Ae as createBlocksApi,
2902
+ It as findRange,
2903
+ st as formSchema,
2904
+ et as highlightBlock,
2905
+ kt as insertNode,
2906
+ Ut as isNode,
2855
2907
  Ze as isNodeList,
2856
- Ml as lintBlock,
2857
- ie as locate,
2858
- Bl as makeNode,
2859
- Xe as newKey,
2860
- ha as provideBlocksPreview,
2861
- zl as removeNode,
2862
- _l as replaceBlock,
2863
- Nl as replaceList,
2864
- At as stageDocument,
2865
- ma as typesIn,
2866
- Dl as undeclared,
2867
- Il as updateValues,
2868
- ba as useBlocksPreview,
2869
- De as walk
2908
+ Fl as lintBlock,
2909
+ re as locate,
2910
+ Il as makeNode,
2911
+ lt as newKey,
2912
+ _a as provideBlocksPreview,
2913
+ Dl as removeNode,
2914
+ Nt as replaceBlock,
2915
+ Rl as replaceList,
2916
+ Pt as stageDocument,
2917
+ wa as typesIn,
2918
+ ql as undeclared,
2919
+ Ol as updateValues,
2920
+ xa as useBlocksPreview,
2921
+ Oe as walk
2870
2922
  };
2871
2923
  //# sourceMappingURL=index.js.map