@webx-ui/module-seo 0.2.1 → 0.2.3

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,8 +1,8 @@
1
- import { defineComponent as M, computed as C, openBlock as x, createElementBlock as j, createElementVNode as A, createVNode as l, unref as e, withCtx as t, createTextVNode as f, toDisplayString as m, renderSlot as Ue, ref as z, createBlock as U, isRef as P, withKeys as ze, Fragment as oe, createCommentVNode as R, renderList as me, useModel as We, resolveDynamicComponent as Te, mergeModels as De, watch as ye, createSlots as _e, withModifiers as te, markRaw as Le } from "vue";
2
- import { useAdmin as E, useTranslate as K } from "@webx-ui/module-admin";
3
- import { WxHeading as Oe, WxSpace as G, WxSegmented as Ae, WxButton as N, useModal as de, WxDialog as re, WxInput as I, WxAlert as X, WxText as L, WxBadge as F, WxDescriptions as Re, WxDescriptionsItem as je, WxEmpty as Be, createModal as Y, WxCard as ue, WxTable as ce, WxLink as Pe, useLocales as Ie, WxTabs as Ne, WxTab as ne, WxFormItem as T, WxTextarea as fe, WxCheckboxGroup as Fe, WxCodeEditor as Me, localizedValue as xe, WxSelect as ae, WxSwitch as we, toast as B, WxActions as le, WxAction as se, confirm as ke, WxInputNumber as Ee } from "@webx-ui/core";
4
- import { useRouter as Ke, useRoute as He } from "vue-router";
5
- const Je = {
1
+ import { defineComponent as E, computed as U, openBlock as y, createBlock as W, unref as e, withCtx as t, renderSlot as ve, createVNode as l, createTextVNode as w, toDisplayString as h, ref as C, isRef as P, createElementVNode as j, withKeys as We, createElementBlock as F, Fragment as se, createCommentVNode as O, renderList as ge, useModel as Ce, resolveDynamicComponent as Te, mergeModels as ze, watch as be, createSlots as ye, markRaw as De } from "vue";
2
+ import { useAdmin as K, useTranslate as J, WxListScreen as Oe, WxDate as _e, useErrorText as le, WxRowMenu as te } from "@webx-ui/module-admin";
3
+ import { WxButton as I, useModal as ie, WxDialog as de, WxSpace as X, WxInput as N, WxAlert as Y, WxText as R, WxBadge as M, WxDescriptions as Re, WxDescriptionsItem as Le, WxEmpty as je, createModal as Z, WxTable as re, WxLink as Ae, useLocales as Be, WxTabs as Pe, WxTab as oe, WxFormItem as z, WxTextarea as me, WxCheckboxGroup as Fe, WxCodeEditor as Ne, localizedValue as xe, WxSelect as ae, WxSwitch as we, toast as B, confirm as ke, WxInputNumber as Ie } from "@webx-ui/core";
4
+ import { useRouter as Me, useRoute as Ee } from "vue-router";
5
+ const Ke = {
6
6
  module: {
7
7
  title: "SEO"
8
8
  },
@@ -26,7 +26,6 @@ const Je = {
26
26
  status: "Code",
27
27
  hits: "Hits",
28
28
  "last-hit": "Last used",
29
- never: "never",
30
29
  loop: "Points at itself",
31
30
  "any-kind": "Any kind",
32
31
  exact: "Exact",
@@ -90,242 +89,229 @@ const Je = {
90
89
  preview: "In search results"
91
90
  }
92
91
  }, he = /* @__PURE__ */ new WeakSet();
93
- function H() {
92
+ function q() {
94
93
  try {
95
- const { i18n: o } = E();
96
- he.has(o) || (o.defaults("webx-seo", Je), he.add(o));
94
+ const { i18n: n } = K();
95
+ he.has(n) || (n.defaults("webx-seo", Ke), he.add(n));
97
96
  } catch {
98
97
  }
99
98
  }
100
- const qe = { class: "wx-seo-layout" }, Ge = { class: "wx-seo-layout__head" }, Qe = /* @__PURE__ */ M({
99
+ const ue = /* @__PURE__ */ E({
101
100
  __name: "SeoLayout",
102
101
  props: {
103
102
  base: {},
104
103
  current: {}
105
104
  },
106
105
  emits: ["test"],
107
- setup(o, { emit: r }) {
108
- const d = o, c = r, a = E(), n = Ke(), h = He();
109
- H();
110
- const s = K("webx-seo"), w = C(
106
+ setup(n, { emit: r }) {
107
+ const d = n, c = r, a = K(), i = Me(), f = Ee();
108
+ q();
109
+ const s = J("webx-seo"), S = U(
111
110
  () => a.state.manifest?.modules.find((p) => p.id === "seo")?.title ?? s("module.title")
112
- ), V = C(() => [
111
+ ), k = U(() => [
113
112
  { value: "rules", label: s("page.rules") },
114
113
  { value: "redirects", label: s("page.redirects") },
115
114
  { value: "aliases", label: s("page.automatic") }
116
- ]), v = C({
115
+ ]), g = U({
117
116
  get: () => d.current,
118
117
  set: (p) => {
119
- const b = p === "rules" ? d.base : `${d.base}/${String(p)}`;
120
- b !== h.path && n.push(b);
118
+ const u = p === "rules" ? d.base : `${d.base}/${String(p)}`;
119
+ u !== f.path && i.push(u);
121
120
  }
122
121
  });
123
- return (p, b) => (x(), j("div", qe, [
124
- A("div", Ge, [
125
- l(e(Oe), { level: 2 }, {
122
+ return (p, u) => (y(), W(e(Oe), {
123
+ view: g.value,
124
+ "onUpdate:view": u[1] || (u[1] = (V) => g.value = V),
125
+ title: S.value,
126
+ views: k.value
127
+ }, {
128
+ actions: t(() => [
129
+ ve(p.$slots, "actions"),
130
+ l(e(I), {
131
+ variant: "outline",
132
+ icon: "search",
133
+ onClick: u[0] || (u[0] = (V) => c("test"))
134
+ }, {
126
135
  default: t(() => [
127
- f(m(w.value), 1)
128
- ]),
129
- _: 1
130
- }),
131
- l(e(G), { size: "sm" }, {
132
- default: t(() => [
133
- l(e(Ae), {
134
- modelValue: v.value,
135
- "onUpdate:modelValue": b[0] || (b[0] = (k) => v.value = k),
136
- options: V.value,
137
- size: "sm"
138
- }, null, 8, ["modelValue", "options"]),
139
- l(e(N), {
140
- variant: "outline",
141
- icon: "search",
142
- onClick: b[1] || (b[1] = (k) => c("test"))
143
- }, {
144
- default: t(() => [
145
- f(m(e(s)("page.test")), 1)
146
- ]),
147
- _: 1
148
- })
136
+ w(h(e(s)("page.test")), 1)
149
137
  ]),
150
138
  _: 1
151
139
  })
152
140
  ]),
153
- Ue(p.$slots, "default", {}, void 0, !0)
154
- ]));
141
+ default: t(() => [
142
+ ve(p.$slots, "default")
143
+ ]),
144
+ _: 3
145
+ }, 8, ["view", "title", "views"]));
155
146
  }
156
- }), J = (o, r) => {
157
- const d = o.__vccOpts || o;
158
- for (const [c, a] of r)
159
- d[c] = a;
160
- return d;
161
- }, pe = /* @__PURE__ */ J(Qe, [["__scopeId", "data-v-f68ce04b"]]);
162
- function Q(o) {
163
- const r = `${o.apiPath}/seo`, d = (n) => n.data, c = (n) => ({
164
- ...n.meta,
165
- data: n.data
166
- }), a = (n) => ({
167
- q: n.q || void 0,
168
- match_type: n.match_type ?? void 0,
169
- is_active: n.is_active ?? void 0,
170
- sort: n.sort || void 0,
171
- page: n.page,
172
- per_page: n.per_page
147
+ });
148
+ function G(n) {
149
+ const r = `${n.apiPath}/seo`, d = (i) => i.data, c = (i) => ({
150
+ ...i.meta,
151
+ data: i.data
152
+ }), a = (i) => ({
153
+ q: i.q || void 0,
154
+ match_type: i.match_type ?? void 0,
155
+ is_active: i.is_active ?? void 0,
156
+ sort: i.sort || void 0,
157
+ page: i.page,
158
+ per_page: i.per_page
173
159
  });
174
160
  return {
175
- urls: (n = {}) => o.http.get(`${r}/urls`, {
176
- query: a(n)
161
+ urls: (i = {}) => n.http.get(`${r}/urls`, {
162
+ query: a(i)
177
163
  }).then(c),
178
- url: (n) => o.http.get(`${r}/urls/${n}`).then(d),
179
- createUrl: (n) => o.http.post(`${r}/urls`, n).then(d),
180
- updateUrl: (n, h) => o.http.put(`${r}/urls/${n}`, h).then(d),
181
- removeUrl: (n) => o.http.delete(`${r}/urls/${n}`),
182
- redirects: (n = {}) => o.http.get(
164
+ url: (i) => n.http.get(`${r}/urls/${i}`).then(d),
165
+ createUrl: (i) => n.http.post(`${r}/urls`, i).then(d),
166
+ updateUrl: (i, f) => n.http.put(`${r}/urls/${i}`, f).then(d),
167
+ removeUrl: (i) => n.http.delete(`${r}/urls/${i}`),
168
+ redirects: (i = {}) => n.http.get(
183
169
  `${r}/redirects`,
184
- { query: a(n) }
170
+ { query: a(i) }
185
171
  ).then(c),
186
- createRedirect: (n) => o.http.post(`${r}/redirects`, n).then(d),
187
- updateRedirect: (n, h) => o.http.put(`${r}/redirects/${n}`, h).then(d),
188
- removeRedirect: (n) => o.http.delete(`${r}/redirects/${n}`),
189
- aliases: (n = {}) => o.http.get(`${r}/aliases`, {
172
+ createRedirect: (i) => n.http.post(`${r}/redirects`, i).then(d),
173
+ updateRedirect: (i, f) => n.http.put(`${r}/redirects/${i}`, f).then(d),
174
+ removeRedirect: (i) => n.http.delete(`${r}/redirects/${i}`),
175
+ aliases: (i = {}) => n.http.get(`${r}/aliases`, {
190
176
  query: {
191
- q: n.q || void 0,
192
- locale: n.locale ?? void 0,
193
- page: n.page,
194
- per_page: n.per_page
177
+ q: i.q || void 0,
178
+ locale: i.locale ?? void 0,
179
+ page: i.page,
180
+ per_page: i.per_page
195
181
  }
196
182
  }).then(c),
197
183
  // A POST because it carries an address in its body, and an address in a query string is an
198
184
  // address somebody has to escape twice.
199
- test: (n, h = null) => o.http.post(`${r}/test-url`, { url: n, locale: h ?? void 0 }).then(d)
185
+ test: (i, f = null) => n.http.post(`${r}/test-url`, { url: i, locale: f ?? void 0 }).then(d)
200
186
  };
201
187
  }
202
- const Xe = { class: "wx-seo-test" }, Ye = {
188
+ const Je = { class: "wx-seo-test" }, qe = {
203
189
  key: 3,
204
190
  class: "wx-seo-test__matched"
205
- }, Ze = {
191
+ }, He = {
206
192
  key: 4,
207
193
  class: "wx-seo-test__result"
208
- }, et = {
194
+ }, Ge = {
209
195
  key: 5,
210
196
  class: "wx-seo-test__chain"
211
- }, tt = /* @__PURE__ */ M({
197
+ }, Qe = /* @__PURE__ */ E({
212
198
  __name: "TestUrlDialog",
213
- setup(o) {
214
- const { open: r } = de(), d = E(), c = Q(d);
215
- H();
216
- const a = K("webx-seo"), n = z(""), h = z(!1), s = z(null), w = C(() => {
217
- const v = s.value?.seo;
218
- return v ? [
219
- { label: a("card.title"), value: v.title },
220
- { label: a("card.h1"), value: v.h1 },
221
- { label: a("card.description"), value: v.description },
222
- { label: a("card.keywords"), value: v.keywords },
223
- { label: a("card.canonical"), value: v.canonical },
224
- { label: a("card.robots"), value: v.robots }
199
+ setup(n) {
200
+ const { open: r } = ie(), d = K(), c = G(d);
201
+ q();
202
+ const a = J("webx-seo"), i = C(""), f = C(!1), s = C(null), S = U(() => {
203
+ const g = s.value?.seo;
204
+ return g ? [
205
+ { label: a("card.title"), value: g.title },
206
+ { label: a("card.h1"), value: g.h1 },
207
+ { label: a("card.description"), value: g.description },
208
+ { label: a("card.keywords"), value: g.keywords },
209
+ { label: a("card.canonical"), value: g.canonical },
210
+ { label: a("card.robots"), value: g.robots }
225
211
  ].filter((p) => p.value) : [];
226
212
  });
227
- async function V() {
228
- if (n.value.trim() !== "") {
229
- h.value = !0;
213
+ async function k() {
214
+ if (i.value.trim() !== "") {
215
+ f.value = !0;
230
216
  try {
231
- s.value = await c.test(n.value);
217
+ s.value = await c.test(i.value);
232
218
  } finally {
233
- h.value = !1;
219
+ f.value = !1;
234
220
  }
235
221
  }
236
222
  }
237
- return (v, p) => (x(), U(e(re), {
223
+ return (g, p) => (y(), W(e(de), {
238
224
  open: e(r),
239
- "onUpdate:open": p[1] || (p[1] = (b) => P(r) ? r.value = b : null),
225
+ "onUpdate:open": p[1] || (p[1] = (u) => P(r) ? r.value = u : null),
240
226
  title: e(a)("page.test"),
241
227
  width: 720
242
228
  }, {
243
229
  default: t(() => [
244
- A("div", Xe, [
245
- l(e(G), {
230
+ j("div", Je, [
231
+ l(e(X), {
246
232
  size: "sm",
247
233
  class: "wx-seo-test__ask"
248
234
  }, {
249
235
  default: t(() => [
250
- l(e(I), {
251
- modelValue: n.value,
252
- "onUpdate:modelValue": p[0] || (p[0] = (b) => n.value = b),
236
+ l(e(N), {
237
+ modelValue: i.value,
238
+ "onUpdate:modelValue": p[0] || (p[0] = (u) => i.value = u),
253
239
  placeholder: e(a)("page.test-placeholder"),
254
240
  class: "wx-seo-test__input",
255
- onKeyup: ze(V, ["enter"])
241
+ onKeyup: We(k, ["enter"])
256
242
  }, null, 8, ["modelValue", "placeholder"]),
257
- l(e(N), {
243
+ l(e(I), {
258
244
  type: "primary",
259
- loading: h.value,
260
- onClick: V
245
+ loading: f.value,
246
+ onClick: k
261
247
  }, {
262
248
  default: t(() => [
263
- f(m(e(a)("page.test-run")), 1)
249
+ w(h(e(a)("page.test-run")), 1)
264
250
  ]),
265
251
  _: 1
266
252
  }, 8, ["loading"])
267
253
  ]),
268
254
  _: 1
269
255
  }),
270
- s.value ? (x(), j(oe, { key: 0 }, [
271
- s.value.redirect ? (x(), U(e(X), {
256
+ s.value ? (y(), F(se, { key: 0 }, [
257
+ s.value.redirect ? (y(), W(e(Y), {
272
258
  key: 0,
273
259
  type: "warning",
274
260
  description: e(a)("page.test-redirected", {
275
261
  target: s.value.redirect.target,
276
262
  status: s.value.redirect.status
277
263
  })
278
- }, null, 8, ["description"])) : R("", !0),
279
- s.value.route ? (x(), U(e(X), {
264
+ }, null, 8, ["description"])) : O("", !0),
265
+ s.value.route ? (y(), W(e(Y), {
280
266
  key: 1,
281
267
  type: "info",
282
268
  description: s.value.route.kind === "alias" ? e(a)("page.occupied-alias", { target: s.value.route.target ?? s.value.route.path }) : e(a)("page.occupied", { path: s.value.route.path })
283
- }, null, 8, ["description"])) : R("", !0),
284
- s.value.matched ? (x(), j("div", Ye, [
285
- l(e(L), {
269
+ }, null, 8, ["description"])) : O("", !0),
270
+ s.value.matched ? (y(), F("div", qe, [
271
+ l(e(R), {
286
272
  size: "sm",
287
273
  tone: "muted"
288
274
  }, {
289
275
  default: t(() => [
290
- f(m(e(a)("page.test-matched")), 1)
276
+ w(h(e(a)("page.test-matched")), 1)
291
277
  ]),
292
278
  _: 1
293
279
  }),
294
- l(e(G), {
280
+ l(e(X), {
295
281
  size: "sm",
296
282
  align: "center"
297
283
  }, {
298
284
  default: t(() => [
299
- l(e(F), null, {
285
+ l(e(M), null, {
300
286
  default: t(() => [
301
- f(m(e(a)(`page.${s.value.matched.match_type}`)), 1)
287
+ w(h(e(a)(`page.${s.value.matched.match_type}`)), 1)
302
288
  ]),
303
289
  _: 1
304
290
  }),
305
- l(e(L), {
291
+ l(e(R), {
306
292
  mono: "",
307
293
  size: "sm"
308
294
  }, {
309
295
  default: t(() => [
310
- f(m(s.value.matched.pattern), 1)
296
+ w(h(s.value.matched.pattern), 1)
311
297
  ]),
312
298
  _: 1
313
299
  })
314
300
  ]),
315
301
  _: 1
316
302
  })
317
- ])) : (x(), U(e(X), {
303
+ ])) : (y(), W(e(Y), {
318
304
  key: 2,
319
305
  type: "info",
320
306
  description: e(a)("page.test-none")
321
307
  }, null, 8, ["description"])),
322
- w.value.length > 0 ? (x(), j("div", Ze, [
323
- l(e(L), {
308
+ S.value.length > 0 ? (y(), F("div", He, [
309
+ l(e(R), {
324
310
  size: "sm",
325
311
  tone: "muted"
326
312
  }, {
327
313
  default: t(() => [
328
- f(m(e(a)("page.test-result")), 1)
314
+ w(h(e(a)("page.test-result")), 1)
329
315
  ]),
330
316
  _: 1
331
317
  }),
@@ -335,47 +321,47 @@ const Xe = { class: "wx-seo-test" }, Ye = {
335
321
  size: "sm"
336
322
  }, {
337
323
  default: t(() => [
338
- (x(!0), j(oe, null, me(w.value, (b) => (x(), U(e(je), {
339
- key: b.label,
340
- label: b.label
324
+ (y(!0), F(se, null, ge(S.value, (u) => (y(), W(e(Le), {
325
+ key: u.label,
326
+ label: u.label
341
327
  }, {
342
328
  default: t(() => [
343
- f(m(b.value), 1)
329
+ w(h(u.value), 1)
344
330
  ]),
345
331
  _: 2
346
332
  }, 1032, ["label"]))), 128))
347
333
  ]),
348
334
  _: 1
349
335
  })
350
- ])) : R("", !0),
351
- s.value.chain.length > 0 ? (x(), j("div", et, [
352
- l(e(L), {
336
+ ])) : O("", !0),
337
+ s.value.chain.length > 0 ? (y(), F("div", Ge, [
338
+ l(e(R), {
353
339
  size: "sm",
354
340
  tone: "muted"
355
341
  }, {
356
342
  default: t(() => [
357
- f(m(e(a)("page.test-chain")), 1)
343
+ w(h(e(a)("page.test-chain")), 1)
358
344
  ]),
359
345
  _: 1
360
346
  }),
361
- l(e(G), {
347
+ l(e(X), {
362
348
  size: "xs",
363
349
  wrap: ""
364
350
  }, {
365
351
  default: t(() => [
366
- (x(!0), j(oe, null, me(s.value.chain, (b) => (x(), U(e(F), {
367
- key: b.source
352
+ (y(!0), F(se, null, ge(s.value.chain, (u) => (y(), W(e(M), {
353
+ key: u.source
368
354
  }, {
369
355
  default: t(() => [
370
- f(m(b.source) + " · " + m(b.priority), 1)
356
+ w(h(u.source) + " · " + h(u.priority), 1)
371
357
  ]),
372
358
  _: 2
373
359
  }, 1024))), 128))
374
360
  ]),
375
361
  _: 1
376
362
  })
377
- ])) : R("", !0)
378
- ], 64)) : h.value ? R("", !0) : (x(), U(e(Be), {
363
+ ])) : O("", !0)
364
+ ], 64)) : f.value ? O("", !0) : (y(), W(e(je), {
379
365
  key: 1,
380
366
  icon: "search",
381
367
  description: e(a)("page.test-empty")
@@ -385,150 +371,142 @@ const Xe = { class: "wx-seo-test" }, Ye = {
385
371
  _: 1
386
372
  }, 8, ["open", "title"]));
387
373
  }
388
- }), ve = /* @__PURE__ */ J(tt, [["__scopeId", "data-v-116e47cd"]]), at = /* @__PURE__ */ M({
374
+ }), Q = (n, r) => {
375
+ const d = n.__vccOpts || n;
376
+ for (const [c, a] of r)
377
+ d[c] = a;
378
+ return d;
379
+ }, ce = /* @__PURE__ */ Q(Qe, [["__scopeId", "data-v-116e47cd"]]), Xe = /* @__PURE__ */ E({
389
380
  __name: "SeoAliasesPage",
390
381
  props: {
391
382
  base: { default: "/seo" }
392
383
  },
393
- setup(o) {
394
- const r = o, d = E(), c = Q(d);
395
- H();
396
- const a = K("webx-seo"), n = z(null), h = z(!1), s = Y(ve), w = C(() => (d.state.manifest?.locales?.length ?? 1) > 1), V = C(() => [
384
+ setup(n) {
385
+ const r = n, d = K(), c = G(d);
386
+ q();
387
+ const a = J("webx-seo"), i = C(null), f = C(!1), s = Z(ce), S = U(() => (d.state.manifest?.locales?.length ?? 1) > 1), k = U(() => [
397
388
  { key: "pattern", label: a("page.address"), sortable: !1 },
398
389
  { key: "target", label: a("page.target") },
399
390
  {
400
391
  key: "locale",
401
392
  label: a("page.language"),
402
393
  align: "center",
403
- hidden: !w.value,
394
+ hidden: !S.value,
404
395
  hideBelow: 760
405
396
  },
406
397
  { key: "created_at", label: a("page.moved-at"), hideBelow: 900, hideOnCards: !0 }
407
398
  ]);
408
- async function v(p) {
409
- h.value = !0;
399
+ async function g(p) {
400
+ f.value = !0;
410
401
  try {
411
- n.value = await c.aliases({
402
+ i.value = await c.aliases({
412
403
  q: p.search,
413
404
  page: p.page,
414
405
  per_page: p.perPage
415
406
  });
416
407
  } finally {
417
- h.value = !1;
408
+ f.value = !1;
418
409
  }
419
410
  }
420
- return (p, b) => (x(), U(pe, {
411
+ return (p, u) => (y(), W(ue, {
421
412
  base: r.base,
422
413
  current: "aliases",
423
- onTest: b[0] || (b[0] = (k) => e(s)({}))
414
+ onTest: u[0] || (u[0] = (V) => e(s)({}))
424
415
  }, {
425
416
  default: t(() => [
426
- l(e(ue), null, {
427
- header: t(() => [
428
- f(m(e(a)("page.automatic")), 1)
417
+ l(e(Y), {
418
+ type: "info",
419
+ variant: "soft",
420
+ description: e(a)("page.aliases-help"),
421
+ class: "wx-seo-aliases__note"
422
+ }, null, 8, ["description"]),
423
+ l(e(re), {
424
+ data: i.value,
425
+ columns: k.value,
426
+ "row-key": "id",
427
+ searchable: "",
428
+ flush: "",
429
+ loading: f.value,
430
+ "search-placeholder": e(a)("page.search-aliases"),
431
+ "empty-text": e(a)("page.aliases-empty"),
432
+ onStateChange: g
433
+ }, {
434
+ "cell-pattern": t(({ row: V }) => [
435
+ l(e(R), {
436
+ mono: "",
437
+ size: "sm"
438
+ }, {
439
+ default: t(() => [
440
+ w(h(V.pattern), 1)
441
+ ]),
442
+ _: 2
443
+ }, 1024)
429
444
  ]),
430
- default: t(() => [
431
- l(e(X), {
432
- type: "info",
433
- variant: "soft",
434
- description: e(a)("page.aliases-help"),
435
- class: "wx-seo-aliases__note"
436
- }, null, 8, ["description"]),
437
- l(e(ce), {
438
- data: n.value,
439
- columns: V.value,
440
- "row-key": "id",
441
- searchable: "",
442
- flush: "",
443
- loading: h.value,
444
- "search-placeholder": e(a)("page.search-aliases"),
445
- "empty-text": e(a)("page.aliases-empty"),
446
- onStateChange: v
445
+ "cell-target": t(({ row: V }) => [
446
+ V.target && V.target_url ? (y(), W(e(Ae), {
447
+ key: 0,
448
+ href: V.target_url,
449
+ external: "",
450
+ size: "sm"
447
451
  }, {
448
- "cell-pattern": t(({ row: k }) => [
449
- l(e(L), {
452
+ default: t(() => [
453
+ l(e(R), {
450
454
  mono: "",
451
455
  size: "sm"
452
456
  }, {
453
457
  default: t(() => [
454
- f(m(k.pattern), 1)
458
+ w(h(V.target), 1)
455
459
  ]),
456
460
  _: 2
457
461
  }, 1024)
458
462
  ]),
459
- "cell-target": t(({ row: k }) => [
460
- k.target && k.target_url ? (x(), U(e(Pe), {
461
- key: 0,
462
- href: k.target_url,
463
- external: "",
464
- size: "sm"
465
- }, {
466
- default: t(() => [
467
- l(e(L), {
468
- mono: "",
469
- size: "sm"
470
- }, {
471
- default: t(() => [
472
- f(m(k.target), 1)
473
- ]),
474
- _: 2
475
- }, 1024)
476
- ]),
477
- _: 2
478
- }, 1032, ["href"])) : (x(), U(e(F), {
479
- key: 1,
480
- type: "warning"
481
- }, {
482
- default: t(() => [
483
- f(m(e(a)("page.gone")), 1)
484
- ]),
485
- _: 1
486
- }))
487
- ]),
488
- "cell-locale": t(({ row: k }) => [
489
- l(e(F), null, {
490
- default: t(() => [
491
- f(m(k.locale), 1)
492
- ]),
493
- _: 2
494
- }, 1024)
495
- ]),
496
- "cell-created_at": t(({ row: k }) => [
497
- l(e(L), {
498
- size: "sm",
499
- tone: "muted"
500
- }, {
501
- default: t(() => [
502
- f(m(k.created_at ? new Date(k.created_at).toLocaleString() : ""), 1)
503
- ]),
504
- _: 2
505
- }, 1024)
463
+ _: 2
464
+ }, 1032, ["href"])) : (y(), W(e(M), {
465
+ key: 1,
466
+ type: "warning"
467
+ }, {
468
+ default: t(() => [
469
+ w(h(e(a)("page.gone")), 1)
506
470
  ]),
507
471
  _: 1
508
- }, 8, ["data", "columns", "loading", "search-placeholder", "empty-text"])
472
+ }))
473
+ ]),
474
+ "cell-locale": t(({ row: V }) => [
475
+ l(e(M), null, {
476
+ default: t(() => [
477
+ w(h(V.locale), 1)
478
+ ]),
479
+ _: 2
480
+ }, 1024)
481
+ ]),
482
+ "cell-created_at": t(({ row: V }) => [
483
+ V.created_at ? (y(), W(e(_e), {
484
+ key: 0,
485
+ value: V.created_at
486
+ }, null, 8, ["value"])) : O("", !0)
509
487
  ]),
510
488
  _: 1
511
- })
489
+ }, 8, ["data", "columns", "loading", "search-placeholder", "empty-text"])
512
490
  ]),
513
491
  _: 1
514
492
  }, 8, ["base"]));
515
493
  }
516
- }), lt = /* @__PURE__ */ J(at, [["__scopeId", "data-v-11e0403c"]]), ie = [
494
+ }), Ye = /* @__PURE__ */ Q(Xe, [["__scopeId", "data-v-6816a871"]]), ne = [
517
495
  "noindex",
518
496
  "nofollow",
519
497
  "noarchive",
520
498
  "nosnippet",
521
499
  "noimageindex"
522
- ], st = { class: "wx-seo" }, ot = { class: "wx-seo__fields" }, nt = { class: "wx-seo__count" }, it = { class: "wx-seo__count" }, dt = {
500
+ ], Ze = { class: "wx-seo" }, et = { class: "wx-seo__fields" }, tt = { class: "wx-seo__count" }, at = { class: "wx-seo__count" }, lt = {
523
501
  key: 0,
524
502
  class: "wx-seo__preview"
525
- }, rt = { class: "wx-seo__snippet" }, ut = {
503
+ }, st = { class: "wx-seo__snippet" }, ot = {
526
504
  key: 0,
527
505
  class: "wx-seo__snippet-address"
528
- }, ct = { class: "wx-seo__snippet-title" }, pt = { class: "wx-seo__snippet-text" }, vt = { class: "wx-seo__fields" }, gt = { class: "wx-seo__fields" }, mt = /* @__PURE__ */ M({
506
+ }, nt = { class: "wx-seo__snippet-title" }, it = { class: "wx-seo__snippet-text" }, dt = { class: "wx-seo__fields" }, rt = { class: "wx-seo__fields" }, ut = /* @__PURE__ */ E({
529
507
  name: "WxSeo",
530
508
  __name: "SeoCard",
531
- props: /* @__PURE__ */ De({
509
+ props: /* @__PURE__ */ ze({
532
510
  mediaField: { default: void 0 },
533
511
  disabled: { type: Boolean, default: !1 },
534
512
  titleLimit: { default: 60 },
@@ -540,98 +518,98 @@ const Xe = { class: "wx-seo-test" }, Ye = {
540
518
  modelModifiers: {}
541
519
  }),
542
520
  emits: ["update:modelValue"],
543
- setup(o) {
544
- const r = o, d = We(o, "modelValue");
545
- H();
546
- const c = K("webx-seo"), a = Ie(), n = z(null), h = z(!1);
521
+ setup(n) {
522
+ const r = n, d = Ce(n, "modelValue");
523
+ q();
524
+ const c = J("webx-seo"), a = Be(), i = C(null), f = C(!1);
547
525
  function s(_) {
548
- return C({
526
+ return U({
549
527
  get: () => d.value?.[_],
550
528
  set: ($) => {
551
529
  d.value = { ...d.value ?? {}, [_]: $ };
552
530
  }
553
531
  });
554
532
  }
555
- const w = s("title"), V = s("h1"), v = s("description"), p = s("keywords"), b = s("og_title"), k = s("og_description"), O = C({
533
+ const S = s("title"), k = s("h1"), g = s("description"), p = s("keywords"), u = s("og_title"), V = s("og_description"), L = U({
556
534
  get: () => d.value?.canonical ?? "",
557
535
  set: (_) => {
558
536
  d.value = { ...d.value ?? {}, canonical: _.trim() === "" ? null : _ };
559
537
  }
560
- }), S = C({
538
+ }), A = U({
561
539
  get: () => d.value?.og_image ?? null,
562
540
  set: (_) => {
563
541
  d.value = { ...d.value ?? {}, og_image: _ };
564
542
  }
565
- }), y = C(() => (d.value?.robots ?? "").split(",").map((_) => _.trim())), i = C(
566
- () => y.value.filter((_) => _ !== "" && !ie.includes(_))
567
- ), u = C({
568
- get: () => y.value.filter((_) => ie.includes(_)),
543
+ }), D = U(() => (d.value?.robots ?? "").split(",").map((_) => _.trim())), m = U(
544
+ () => D.value.filter((_) => _ !== "" && !ne.includes(_))
545
+ ), b = U({
546
+ get: () => D.value.filter((_) => ne.includes(_)),
569
547
  set: (_) => {
570
- const $ = [..._, ...i.value].join(", ");
548
+ const $ = [..._, ...m.value].join(", ");
571
549
  d.value = { ...d.value ?? {}, robots: $ === "" ? null : $ };
572
550
  }
573
- }), g = C(
574
- () => ie.map((_) => ({ value: _, label: c(`card.${_}`) }))
575
- ), D = C({
551
+ }), o = U(
552
+ () => ne.map((_) => ({ value: _, label: c(`card.${_}`) }))
553
+ ), x = U({
576
554
  get: () => {
577
- if (n.value !== null) return n.value;
555
+ if (i.value !== null) return i.value;
578
556
  const _ = d.value?.json_ld;
579
557
  return _ == null ? "" : JSON.stringify(_, null, 2);
580
558
  },
581
559
  set: (_) => {
582
- if (n.value = _, _.trim() === "") {
583
- h.value = !1, d.value = { ...d.value ?? {}, json_ld: null };
560
+ if (i.value = _, _.trim() === "") {
561
+ f.value = !1, d.value = { ...d.value ?? {}, json_ld: null };
584
562
  return;
585
563
  }
586
564
  try {
587
- d.value = { ...d.value ?? {}, json_ld: JSON.parse(_) }, h.value = !1;
565
+ d.value = { ...d.value ?? {}, json_ld: JSON.parse(_) }, f.value = !1;
588
566
  } catch {
589
- h.value = !0;
567
+ f.value = !0;
590
568
  }
591
569
  }
592
570
  });
593
- function Z(_) {
571
+ function v(_) {
594
572
  return xe(_, a.active.value);
595
573
  }
596
- const ee = C(() => ({
597
- title: Z(w.value).length,
598
- description: Z(v.value).length
599
- })), q = C(() => ({
600
- title: Z(w.value),
601
- description: Z(v.value),
602
- address: O.value || (r.site ?? "")
603
- })), Se = C(() => q.value.title !== "" || q.value.description !== ""), Ce = C(
604
- () => i.value.length === 0 ? void 0 : c("card.robots-kept", { directives: i.value.join(", ") })
574
+ const ee = U(() => ({
575
+ title: v(S.value).length,
576
+ description: v(g.value).length
577
+ })), H = U(() => ({
578
+ title: v(S.value),
579
+ description: v(g.value),
580
+ address: L.value || (r.site ?? "")
581
+ })), Se = U(() => H.value.title !== "" || H.value.description !== ""), Ue = U(
582
+ () => m.value.length === 0 ? void 0 : c("card.robots-kept", { directives: m.value.join(", ") })
605
583
  );
606
- function ge(_, $) {
584
+ function pe(_, $) {
607
585
  return _ > $ ? "warning" : "muted";
608
586
  }
609
- return (_, $) => (x(), j("div", st, [
610
- l(e(Ne), { "keep-alive": "" }, {
587
+ return (_, $) => (y(), F("div", Ze, [
588
+ l(e(Pe), { "keep-alive": "" }, {
611
589
  default: t(() => [
612
- l(e(ne), {
590
+ l(e(oe), {
613
591
  label: e(c)("card.section-page"),
614
592
  value: "page"
615
593
  }, {
616
594
  default: t(() => [
617
- A("div", ot, [
618
- l(e(T), {
595
+ j("div", et, [
596
+ l(e(z), {
619
597
  label: e(c)("card.title"),
620
- disabled: o.disabled
598
+ disabled: n.disabled
621
599
  }, {
622
600
  default: t(() => [
623
- l(e(I), {
624
- modelValue: e(w),
625
- "onUpdate:modelValue": $[0] || ($[0] = (W) => P(w) ? w.value = W : null),
601
+ l(e(N), {
602
+ modelValue: e(S),
603
+ "onUpdate:modelValue": $[0] || ($[0] = (T) => P(S) ? S.value = T : null),
626
604
  localized: ""
627
605
  }, null, 8, ["modelValue"]),
628
- A("div", nt, [
629
- l(e(L), {
606
+ j("div", tt, [
607
+ l(e(R), {
630
608
  size: "sm",
631
- tone: ge(ee.value.title, o.titleLimit)
609
+ tone: pe(ee.value.title, n.titleLimit)
632
610
  }, {
633
611
  default: t(() => [
634
- f(m(ee.value.title) + " / " + m(o.titleLimit), 1)
612
+ w(h(ee.value.title) + " / " + h(n.titleLimit), 1)
635
613
  ]),
636
614
  _: 1
637
615
  }, 8, ["tone"])
@@ -639,37 +617,37 @@ const Xe = { class: "wx-seo-test" }, Ye = {
639
617
  ]),
640
618
  _: 1
641
619
  }, 8, ["label", "disabled"]),
642
- l(e(T), {
620
+ l(e(z), {
643
621
  label: e(c)("card.h1"),
644
- disabled: o.disabled
622
+ disabled: n.disabled
645
623
  }, {
646
624
  default: t(() => [
647
- l(e(I), {
648
- modelValue: e(V),
649
- "onUpdate:modelValue": $[1] || ($[1] = (W) => P(V) ? V.value = W : null),
625
+ l(e(N), {
626
+ modelValue: e(k),
627
+ "onUpdate:modelValue": $[1] || ($[1] = (T) => P(k) ? k.value = T : null),
650
628
  localized: ""
651
629
  }, null, 8, ["modelValue"])
652
630
  ]),
653
631
  _: 1
654
632
  }, 8, ["label", "disabled"]),
655
- l(e(T), {
633
+ l(e(z), {
656
634
  label: e(c)("card.description"),
657
- disabled: o.disabled
635
+ disabled: n.disabled
658
636
  }, {
659
637
  default: t(() => [
660
- l(e(fe), {
661
- modelValue: e(v),
662
- "onUpdate:modelValue": $[2] || ($[2] = (W) => P(v) ? v.value = W : null),
638
+ l(e(me), {
639
+ modelValue: e(g),
640
+ "onUpdate:modelValue": $[2] || ($[2] = (T) => P(g) ? g.value = T : null),
663
641
  localized: "",
664
642
  rows: 3
665
643
  }, null, 8, ["modelValue"]),
666
- A("div", it, [
667
- l(e(L), {
644
+ j("div", at, [
645
+ l(e(R), {
668
646
  size: "sm",
669
- tone: ge(ee.value.description, o.descriptionLimit)
647
+ tone: pe(ee.value.description, n.descriptionLimit)
670
648
  }, {
671
649
  default: t(() => [
672
- f(m(ee.value.description) + " / " + m(o.descriptionLimit), 1)
650
+ w(h(ee.value.description) + " / " + h(n.descriptionLimit), 1)
673
651
  ]),
674
652
  _: 1
675
653
  }, 8, ["tone"])
@@ -677,76 +655,76 @@ const Xe = { class: "wx-seo-test" }, Ye = {
677
655
  ]),
678
656
  _: 1
679
657
  }, 8, ["label", "disabled"]),
680
- l(e(T), {
658
+ l(e(z), {
681
659
  label: e(c)("card.keywords"),
682
- disabled: o.disabled
660
+ disabled: n.disabled
683
661
  }, {
684
662
  default: t(() => [
685
- l(e(I), {
663
+ l(e(N), {
686
664
  modelValue: e(p),
687
- "onUpdate:modelValue": $[3] || ($[3] = (W) => P(p) ? p.value = W : null),
665
+ "onUpdate:modelValue": $[3] || ($[3] = (T) => P(p) ? p.value = T : null),
688
666
  localized: ""
689
667
  }, null, 8, ["modelValue"])
690
668
  ]),
691
669
  _: 1
692
670
  }, 8, ["label", "disabled"]),
693
- Se.value ? (x(), j("div", dt, [
694
- l(e(L), {
671
+ Se.value ? (y(), F("div", lt, [
672
+ l(e(R), {
695
673
  size: "sm",
696
674
  tone: "muted"
697
675
  }, {
698
676
  default: t(() => [
699
- f(m(e(c)("card.preview")), 1)
677
+ w(h(e(c)("card.preview")), 1)
700
678
  ]),
701
679
  _: 1
702
680
  }),
703
- A("div", rt, [
704
- q.value.address ? (x(), j("div", ut, m(q.value.address), 1)) : R("", !0),
705
- A("div", ct, m(q.value.title), 1),
706
- A("div", pt, m(q.value.description), 1)
681
+ j("div", st, [
682
+ H.value.address ? (y(), F("div", ot, h(H.value.address), 1)) : O("", !0),
683
+ j("div", nt, h(H.value.title), 1),
684
+ j("div", it, h(H.value.description), 1)
707
685
  ])
708
- ])) : R("", !0)
686
+ ])) : O("", !0)
709
687
  ])
710
688
  ]),
711
689
  _: 1
712
690
  }, 8, ["label"]),
713
- l(e(ne), {
691
+ l(e(oe), {
714
692
  label: e(c)("card.section-share"),
715
693
  value: "share"
716
694
  }, {
717
695
  default: t(() => [
718
- A("div", vt, [
719
- o.mediaField ? (x(), U(Te(o.mediaField), {
696
+ j("div", dt, [
697
+ n.mediaField ? (y(), W(Te(n.mediaField), {
720
698
  key: 0,
721
- modelValue: S.value,
722
- "onUpdate:modelValue": $[4] || ($[4] = (W) => S.value = W),
699
+ modelValue: A.value,
700
+ "onUpdate:modelValue": $[4] || ($[4] = (T) => A.value = T),
723
701
  label: e(c)("card.og-image"),
724
702
  aspect: "16/9",
725
703
  accept: "image",
726
- disabled: o.disabled
727
- }, null, 8, ["modelValue", "label", "disabled"])) : R("", !0),
728
- l(e(T), {
704
+ disabled: n.disabled
705
+ }, null, 8, ["modelValue", "label", "disabled"])) : O("", !0),
706
+ l(e(z), {
729
707
  label: e(c)("card.og-title"),
730
708
  help: e(c)("card.og-help"),
731
- disabled: o.disabled
709
+ disabled: n.disabled
732
710
  }, {
733
711
  default: t(() => [
734
- l(e(I), {
735
- modelValue: e(b),
736
- "onUpdate:modelValue": $[5] || ($[5] = (W) => P(b) ? b.value = W : null),
712
+ l(e(N), {
713
+ modelValue: e(u),
714
+ "onUpdate:modelValue": $[5] || ($[5] = (T) => P(u) ? u.value = T : null),
737
715
  localized: ""
738
716
  }, null, 8, ["modelValue"])
739
717
  ]),
740
718
  _: 1
741
719
  }, 8, ["label", "help", "disabled"]),
742
- l(e(T), {
720
+ l(e(z), {
743
721
  label: e(c)("card.og-description"),
744
- disabled: o.disabled
722
+ disabled: n.disabled
745
723
  }, {
746
724
  default: t(() => [
747
- l(e(fe), {
748
- modelValue: e(k),
749
- "onUpdate:modelValue": $[6] || ($[6] = (W) => P(k) ? k.value = W : null),
725
+ l(e(me), {
726
+ modelValue: e(V),
727
+ "onUpdate:modelValue": $[6] || ($[6] = (T) => P(V) ? V.value = T : null),
750
728
  localized: "",
751
729
  rows: 2
752
730
  }, null, 8, ["modelValue"])
@@ -757,51 +735,51 @@ const Xe = { class: "wx-seo-test" }, Ye = {
757
735
  ]),
758
736
  _: 1
759
737
  }, 8, ["label"]),
760
- l(e(ne), {
738
+ l(e(oe), {
761
739
  label: e(c)("card.section-advanced"),
762
740
  value: "advanced"
763
741
  }, {
764
742
  default: t(() => [
765
- A("div", gt, [
766
- l(e(T), {
743
+ j("div", rt, [
744
+ l(e(z), {
767
745
  label: e(c)("card.canonical"),
768
746
  help: e(c)("card.canonical-help"),
769
- disabled: o.disabled
747
+ disabled: n.disabled
770
748
  }, {
771
749
  default: t(() => [
772
- l(e(I), {
773
- modelValue: O.value,
774
- "onUpdate:modelValue": $[7] || ($[7] = (W) => O.value = W),
750
+ l(e(N), {
751
+ modelValue: L.value,
752
+ "onUpdate:modelValue": $[7] || ($[7] = (T) => L.value = T),
775
753
  placeholder: "https://example.com/page"
776
754
  }, null, 8, ["modelValue"])
777
755
  ]),
778
756
  _: 1
779
757
  }, 8, ["label", "help", "disabled"]),
780
- l(e(T), {
758
+ l(e(z), {
781
759
  label: e(c)("card.robots"),
782
- help: Ce.value,
783
- disabled: o.disabled
760
+ help: Ue.value,
761
+ disabled: n.disabled
784
762
  }, {
785
763
  default: t(() => [
786
764
  l(e(Fe), {
787
- modelValue: u.value,
788
- "onUpdate:modelValue": $[8] || ($[8] = (W) => u.value = W),
789
- options: g.value
765
+ modelValue: b.value,
766
+ "onUpdate:modelValue": $[8] || ($[8] = (T) => b.value = T),
767
+ options: o.value
790
768
  }, null, 8, ["modelValue", "options"])
791
769
  ]),
792
770
  _: 1
793
771
  }, 8, ["label", "help", "disabled"]),
794
- o.structuredData ? (x(), U(e(T), {
772
+ n.structuredData ? (y(), W(e(z), {
795
773
  key: 0,
796
774
  label: e(c)("card.json-ld"),
797
775
  help: e(c)("card.json-ld-help"),
798
- error: h.value ? e(c)("card.json-ld-invalid") : void 0,
799
- disabled: o.disabled
776
+ error: f.value ? e(c)("card.json-ld-invalid") : void 0,
777
+ disabled: n.disabled
800
778
  }, {
801
779
  default: t(() => [
802
- l(e(Me), {
803
- modelValue: D.value,
804
- "onUpdate:modelValue": $[9] || ($[9] = (W) => D.value = W),
780
+ l(e(Ne), {
781
+ modelValue: x.value,
782
+ "onUpdate:modelValue": $[9] || ($[9] = (T) => x.value = T),
805
783
  language: "json",
806
784
  lint: "",
807
785
  "min-height": "120px",
@@ -809,7 +787,7 @@ const Xe = { class: "wx-seo-test" }, Ye = {
809
787
  }, null, 8, ["modelValue"])
810
788
  ]),
811
789
  _: 1
812
- }, 8, ["label", "help", "error", "disabled"])) : R("", !0)
790
+ }, 8, ["label", "help", "error", "disabled"])) : O("", !0)
813
791
  ])
814
792
  ]),
815
793
  _: 1
@@ -819,93 +797,93 @@ const Xe = { class: "wx-seo-test" }, Ye = {
819
797
  })
820
798
  ]));
821
799
  }
822
- }), Ve = /* @__PURE__ */ J(mt, [["__scopeId", "data-v-b7ea284e"]]), ft = { class: "wx-seo-redirect" }, ht = { class: "wx-seo-redirect__row" }, bt = /* @__PURE__ */ M({
800
+ }), Ve = /* @__PURE__ */ Q(ut, [["__scopeId", "data-v-60b7936d"]]), ct = { class: "wx-seo-redirect" }, pt = { class: "wx-seo-redirect__row" }, vt = /* @__PURE__ */ E({
823
801
  __name: "SeoRedirectDialog",
824
802
  props: {
825
803
  redirect: { default: null }
826
804
  },
827
- setup(o) {
828
- const r = o, { resolve: d, dismiss: c, open: a } = de(), n = E(), h = Q(n);
829
- H();
830
- const s = K("webx-seo"), w = z(!1), V = z({}), v = z(null), p = z({
805
+ setup(n) {
806
+ const r = n, { resolve: d, dismiss: c, open: a } = ie(), i = K(), f = G(i);
807
+ q();
808
+ const s = J("webx-seo"), S = le(), k = C(!1), g = C({}), p = C(null), u = C({
831
809
  match_type: "exact",
832
810
  pattern: "",
833
811
  target: "",
834
812
  status: 301,
835
813
  is_active: !0
836
- }), b = C(() => r.redirect !== null), k = C(() => [
814
+ }), V = U(() => r.redirect !== null), L = U(() => [
837
815
  { value: "exact", label: s("page.exact") },
838
816
  { value: "mask", label: s("page.mask") },
839
817
  { value: "regex", label: s("page.regex") }
840
- ]), O = [
818
+ ]), A = [
841
819
  { value: 301, label: "301" },
842
820
  { value: 302, label: "302" }
843
821
  ];
844
- ye(
822
+ be(
845
823
  () => r.redirect,
846
- (u) => {
847
- p.value = {
848
- match_type: u?.match_type ?? "exact",
849
- pattern: u?.pattern ?? "",
850
- target: u?.target ?? "",
851
- status: u?.status ?? 301,
852
- is_active: u?.is_active ?? !0
853
- }, V.value = {}, v.value = null, S();
824
+ (o) => {
825
+ u.value = {
826
+ match_type: o?.match_type ?? "exact",
827
+ pattern: o?.pattern ?? "",
828
+ target: o?.target ?? "",
829
+ status: o?.status ?? 301,
830
+ is_active: o?.is_active ?? !0
831
+ }, g.value = {}, p.value = null, D();
854
832
  },
855
833
  { immediate: !0 }
856
834
  );
857
- async function S() {
858
- const u = p.value.pattern.trim();
859
- if (p.value.match_type !== "exact" || u === "") {
860
- v.value = null;
835
+ async function D() {
836
+ const o = u.value.pattern.trim();
837
+ if (u.value.match_type !== "exact" || o === "") {
838
+ p.value = null;
861
839
  return;
862
840
  }
863
841
  try {
864
- v.value = (await h.test(u)).route;
842
+ p.value = (await f.test(o)).route;
865
843
  } catch {
866
- v.value = null;
844
+ p.value = null;
867
845
  }
868
846
  }
869
- function y(u) {
870
- return V.value[u]?.[0];
847
+ function m(o) {
848
+ return g.value[o]?.[0];
871
849
  }
872
- async function i() {
873
- w.value = !0, V.value = {};
850
+ async function b() {
851
+ k.value = !0, g.value = {};
874
852
  try {
875
- const u = r.redirect ? await h.updateRedirect(r.redirect.id, p.value) : await h.createRedirect(p.value);
876
- B.success(s("page.saved")), d(u);
877
- } catch (u) {
878
- const g = u.body;
879
- g?.errors ? (V.value = g.errors, B.danger(s("page.failed"))) : B.danger(g?.message ?? s("page.failed"));
853
+ const o = r.redirect ? await f.updateRedirect(r.redirect.id, u.value) : await f.createRedirect(u.value);
854
+ B.success(s("page.saved")), d(o);
855
+ } catch (o) {
856
+ const x = o.body;
857
+ x?.errors ? (g.value = x.errors, B.danger(s("page.failed"))) : B.danger(S(o, s("page.failed")));
880
858
  } finally {
881
- w.value = !1;
859
+ k.value = !1;
882
860
  }
883
861
  }
884
- return (u, g) => (x(), U(e(re), {
862
+ return (o, x) => (y(), W(e(de), {
885
863
  open: e(a),
886
- "onUpdate:open": g[6] || (g[6] = (D) => P(a) ? a.value = D : null),
864
+ "onUpdate:open": x[6] || (x[6] = (v) => P(a) ? a.value = v : null),
887
865
  title: e(s)("page.redirect"),
888
866
  width: 640
889
867
  }, {
890
868
  footer: t(() => [
891
- l(e(G), { size: "sm" }, {
869
+ l(e(X), { size: "sm" }, {
892
870
  default: t(() => [
893
- l(e(N), {
871
+ l(e(I), {
894
872
  variant: "outline",
895
- onClick: g[5] || (g[5] = (D) => e(c)())
873
+ onClick: x[5] || (x[5] = (v) => e(c)())
896
874
  }, {
897
875
  default: t(() => [
898
- f(m(e(s)("page.cancel")), 1)
876
+ w(h(e(s)("page.cancel")), 1)
899
877
  ]),
900
878
  _: 1
901
879
  }),
902
- l(e(N), {
880
+ l(e(I), {
903
881
  type: "primary",
904
- loading: w.value,
905
- onClick: i
882
+ loading: k.value,
883
+ onClick: b
906
884
  }, {
907
885
  default: t(() => [
908
- f(m(b.value ? e(s)("page.save") : e(s)("page.new-redirect")), 1)
886
+ w(h(V.value ? e(s)("page.save") : e(s)("page.new-redirect")), 1)
909
887
  ]),
910
888
  _: 1
911
889
  }, 8, ["loading"])
@@ -914,75 +892,75 @@ const Xe = { class: "wx-seo-test" }, Ye = {
914
892
  })
915
893
  ]),
916
894
  default: t(() => [
917
- A("div", ft, [
918
- l(e(T), {
895
+ j("div", ct, [
896
+ l(e(z), {
919
897
  label: e(s)("page.kind")
920
898
  }, {
921
899
  default: t(() => [
922
900
  l(e(ae), {
923
- modelValue: p.value.match_type,
924
- "onUpdate:modelValue": g[0] || (g[0] = (D) => p.value.match_type = D),
925
- options: k.value,
926
- onChange: S
901
+ modelValue: u.value.match_type,
902
+ "onUpdate:modelValue": x[0] || (x[0] = (v) => u.value.match_type = v),
903
+ options: L.value,
904
+ onChange: D
927
905
  }, null, 8, ["modelValue", "options"])
928
906
  ]),
929
907
  _: 1
930
908
  }, 8, ["label"]),
931
- l(e(T), {
909
+ l(e(z), {
932
910
  label: e(s)("page.address"),
933
911
  help: e(s)("page.address-help"),
934
- error: y("pattern")
912
+ error: m("pattern")
935
913
  }, {
936
914
  default: t(() => [
937
- l(e(I), {
938
- modelValue: p.value.pattern,
939
- "onUpdate:modelValue": g[1] || (g[1] = (D) => p.value.pattern = D),
915
+ l(e(N), {
916
+ modelValue: u.value.pattern,
917
+ "onUpdate:modelValue": x[1] || (x[1] = (v) => u.value.pattern = v),
940
918
  placeholder: "/old-address",
941
- onBlur: S
919
+ onBlur: D
942
920
  }, null, 8, ["modelValue"])
943
921
  ]),
944
922
  _: 1
945
923
  }, 8, ["label", "help", "error"]),
946
- v.value ? (x(), U(e(X), {
924
+ p.value ? (y(), W(e(Y), {
947
925
  key: 0,
948
926
  type: "warning",
949
927
  variant: "soft",
950
- description: v.value.kind === "alias" ? e(s)("page.occupied-alias", { target: v.value.target ?? v.value.path }) : e(s)("page.occupied", { path: v.value.path })
951
- }, null, 8, ["description"])) : R("", !0),
952
- l(e(T), {
928
+ description: p.value.kind === "alias" ? e(s)("page.occupied-alias", { target: p.value.target ?? p.value.path }) : e(s)("page.occupied", { path: p.value.path })
929
+ }, null, 8, ["description"])) : O("", !0),
930
+ l(e(z), {
953
931
  label: e(s)("page.target"),
954
932
  help: e(s)("page.target-help"),
955
- error: y("target")
933
+ error: m("target")
956
934
  }, {
957
935
  default: t(() => [
958
- l(e(I), {
959
- modelValue: p.value.target,
960
- "onUpdate:modelValue": g[2] || (g[2] = (D) => p.value.target = D),
936
+ l(e(N), {
937
+ modelValue: u.value.target,
938
+ "onUpdate:modelValue": x[2] || (x[2] = (v) => u.value.target = v),
961
939
  placeholder: "/new-address"
962
940
  }, null, 8, ["modelValue"])
963
941
  ]),
964
942
  _: 1
965
943
  }, 8, ["label", "help", "error"]),
966
- A("div", ht, [
967
- l(e(T), {
944
+ j("div", pt, [
945
+ l(e(z), {
968
946
  label: e(s)("page.status")
969
947
  }, {
970
948
  default: t(() => [
971
949
  l(e(ae), {
972
- modelValue: p.value.status,
973
- "onUpdate:modelValue": g[3] || (g[3] = (D) => p.value.status = D),
974
- options: O
950
+ modelValue: u.value.status,
951
+ "onUpdate:modelValue": x[3] || (x[3] = (v) => u.value.status = v),
952
+ options: A
975
953
  }, null, 8, ["modelValue"])
976
954
  ]),
977
955
  _: 1
978
956
  }, 8, ["label"]),
979
- l(e(T), {
957
+ l(e(z), {
980
958
  label: e(s)("page.state")
981
959
  }, {
982
960
  default: t(() => [
983
961
  l(e(we), {
984
- modelValue: p.value.is_active,
985
- "onUpdate:modelValue": g[4] || (g[4] = (D) => p.value.is_active = D)
962
+ modelValue: u.value.is_active,
963
+ "onUpdate:modelValue": x[4] || (x[4] = (v) => u.value.is_active = v)
986
964
  }, null, 8, ["modelValue"])
987
965
  ]),
988
966
  _: 1
@@ -993,17 +971,17 @@ const Xe = { class: "wx-seo-test" }, Ye = {
993
971
  _: 1
994
972
  }, 8, ["open", "title"]));
995
973
  }
996
- }), yt = /* @__PURE__ */ J(bt, [["__scopeId", "data-v-fabd0f11"]]), _t = /* @__PURE__ */ M({
974
+ }), gt = /* @__PURE__ */ Q(vt, [["__scopeId", "data-v-685edbd5"]]), mt = /* @__PURE__ */ E({
997
975
  __name: "SeoRedirectsPage",
998
976
  props: {
999
977
  base: { default: "/seo" }
1000
978
  },
1001
- setup(o) {
1002
- const r = o, d = E(), c = Q(d);
1003
- H();
1004
- const a = K("webx-seo"), n = z(null), h = z(!1);
1005
- let s = { page: 1, perPage: 20, sort: null, search: "" };
1006
- const w = d.can("seo.manage"), V = Y(yt), v = Y(ve), p = C(() => [
979
+ setup(n) {
980
+ const r = n, d = K(), c = G(d);
981
+ q();
982
+ const a = J("webx-seo"), i = le(), f = C(null), s = C(!1);
983
+ let S = { page: 1, perPage: 20, sort: null, search: "" };
984
+ const k = d.can("seo.manage"), g = Z(gt), p = Z(ce), u = U(() => [
1007
985
  { key: "pattern", label: a("page.address"), sortable: !0 },
1008
986
  { key: "target", label: a("page.target") },
1009
987
  { key: "status", label: a("page.status"), align: "center", hideBelow: 560 },
@@ -1016,180 +994,152 @@ const Xe = { class: "wx-seo-test" }, Ye = {
1016
994
  hideOnCards: !0
1017
995
  },
1018
996
  { key: "is_active", label: a("page.state"), align: "center", hideBelow: 660 },
1019
- {
1020
- key: "actions",
1021
- label: "",
1022
- width: 56,
1023
- align: "right",
1024
- hidden: !w,
1025
- hideOnCards: !0
1026
- }
997
+ { key: "actions", label: "", width: 56, align: "right", hidden: !k, hideOnCards: !0 }
1027
998
  ]);
1028
- async function b(S) {
1029
- s = S, h.value = !0;
999
+ function V(m) {
1000
+ return [
1001
+ {
1002
+ key: "delete",
1003
+ icon: "trash",
1004
+ label: a("page.delete"),
1005
+ danger: !0,
1006
+ run: () => D(m)
1007
+ }
1008
+ ];
1009
+ }
1010
+ async function L(m) {
1011
+ S = m, s.value = !0;
1030
1012
  try {
1031
- n.value = await c.redirects({
1032
- q: S.search,
1033
- sort: S.sort ? `${S.sort.order === "desc" ? "-" : ""}${S.sort.key}` : "-hits",
1034
- page: S.page,
1035
- per_page: S.perPage
1013
+ f.value = await c.redirects({
1014
+ q: m.search,
1015
+ sort: m.sort ? `${m.sort.order === "desc" ? "-" : ""}${m.sort.key}` : "-hits",
1016
+ page: m.page,
1017
+ per_page: m.perPage
1036
1018
  });
1037
1019
  } finally {
1038
- h.value = !1;
1020
+ s.value = !1;
1039
1021
  }
1040
1022
  }
1041
- async function k(S) {
1042
- await V({ redirect: S }) && b(s);
1023
+ async function A(m) {
1024
+ await g({ redirect: m }) && L(S);
1043
1025
  }
1044
- async function O(S) {
1026
+ async function D(m) {
1045
1027
  if (await ke({
1046
- title: a("page.delete-title", { pattern: S.pattern }),
1028
+ title: a("page.delete-title", { pattern: m.pattern }),
1047
1029
  message: a("page.delete-text"),
1048
1030
  confirmText: a("page.delete"),
1049
1031
  cancelText: a("page.cancel"),
1050
1032
  tone: "danger"
1051
1033
  }))
1052
1034
  try {
1053
- await c.removeRedirect(S.id), B.success(a("page.deleted")), b(s);
1054
- } catch (i) {
1055
- B.danger(i.body?.message ?? String(i));
1035
+ await c.removeRedirect(m.id), B.success(a("page.deleted")), L(S);
1036
+ } catch (o) {
1037
+ B.danger(i(o));
1056
1038
  }
1057
1039
  }
1058
- return (S, y) => (x(), U(pe, {
1040
+ return (m, b) => (y(), W(ue, {
1059
1041
  base: r.base,
1060
1042
  current: "redirects",
1061
- onTest: y[4] || (y[4] = (i) => e(v)({}))
1062
- }, {
1043
+ onTest: b[1] || (b[1] = (o) => e(p)({}))
1044
+ }, ye({
1063
1045
  default: t(() => [
1064
- l(e(ue), null, _e({
1065
- header: t(() => [
1066
- f(m(e(a)("page.redirects")), 1)
1067
- ]),
1068
- default: t(() => [
1069
- l(e(ce), {
1070
- data: n.value,
1071
- columns: p.value,
1072
- "row-key": "id",
1073
- searchable: "",
1074
- hover: "",
1075
- flush: "",
1076
- loading: h.value,
1077
- "search-placeholder": e(a)("page.search-redirects"),
1078
- "empty-text": e(a)("page.empty"),
1079
- onStateChange: b,
1080
- onRowClick: y[3] || (y[3] = (i) => e(w) ? k(i) : void 0)
1046
+ l(e(re), {
1047
+ data: f.value,
1048
+ columns: u.value,
1049
+ "row-key": "id",
1050
+ searchable: "",
1051
+ clickable: e(k),
1052
+ hover: e(k),
1053
+ flush: "",
1054
+ loading: s.value,
1055
+ "search-placeholder": e(a)("page.search-redirects"),
1056
+ "empty-text": e(a)("page.empty"),
1057
+ onRowClick: A,
1058
+ onStateChange: L
1059
+ }, {
1060
+ "cell-pattern": t(({ row: o }) => [
1061
+ l(e(R), {
1062
+ mono: "",
1063
+ size: "sm"
1081
1064
  }, {
1082
- "cell-pattern": t(({ row: i }) => [
1083
- l(e(L), {
1084
- mono: "",
1085
- size: "sm"
1086
- }, {
1087
- default: t(() => [
1088
- f(m(i.pattern), 1)
1089
- ]),
1090
- _: 2
1091
- }, 1024),
1092
- i.is_loop ? (x(), U(e(F), {
1093
- key: 0,
1094
- type: "warning"
1095
- }, {
1096
- default: t(() => [
1097
- f(m(e(a)("page.loop")), 1)
1098
- ]),
1099
- _: 1
1100
- })) : R("", !0)
1101
- ]),
1102
- "cell-target": t(({ row: i }) => [
1103
- l(e(L), {
1104
- mono: "",
1105
- size: "sm"
1106
- }, {
1107
- default: t(() => [
1108
- f(m(i.target), 1)
1109
- ]),
1110
- _: 2
1111
- }, 1024)
1112
- ]),
1113
- "cell-last_hit_at": t(({ row: i }) => [
1114
- l(e(L), {
1115
- size: "sm",
1116
- tone: i.last_hit_at ? "default" : "muted"
1117
- }, {
1118
- default: t(() => [
1119
- f(m(i.last_hit_at ? new Date(i.last_hit_at).toLocaleString() : e(a)("page.never")), 1)
1120
- ]),
1121
- _: 2
1122
- }, 1032, ["tone"])
1065
+ default: t(() => [
1066
+ w(h(o.pattern), 1)
1123
1067
  ]),
1124
- "cell-is_active": t(({ row: i }) => [
1125
- l(e(F), {
1126
- type: i.is_active ? "success" : "default",
1127
- dot: ""
1128
- }, {
1129
- default: t(() => [
1130
- f(m(i.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
1131
- ]),
1132
- _: 2
1133
- }, 1032, ["type"])
1068
+ _: 2
1069
+ }, 1024),
1070
+ o.is_loop ? (y(), W(e(M), {
1071
+ key: 0,
1072
+ type: "warning"
1073
+ }, {
1074
+ default: t(() => [
1075
+ w(h(e(a)("page.loop")), 1)
1134
1076
  ]),
1135
- "card-actions": t(({ row: i }) => [
1136
- e(w) ? (x(), U(e(le), {
1137
- key: 0,
1138
- size: "sm",
1139
- onClick: y[1] || (y[1] = te(() => {
1140
- }, ["stop"]))
1141
- }, {
1142
- default: t(() => [
1143
- l(e(se), {
1144
- type: "remove",
1145
- title: e(a)("page.delete"),
1146
- onClick: (u) => O(i)
1147
- }, null, 8, ["title", "onClick"])
1148
- ]),
1149
- _: 2
1150
- }, 1024)) : R("", !0)
1077
+ _: 1
1078
+ })) : O("", !0)
1079
+ ]),
1080
+ "cell-target": t(({ row: o }) => [
1081
+ l(e(R), {
1082
+ mono: "",
1083
+ size: "sm"
1084
+ }, {
1085
+ default: t(() => [
1086
+ w(h(o.target), 1)
1151
1087
  ]),
1152
- "cell-actions": t(({ row: i }) => [
1153
- l(e(le), {
1154
- size: "sm",
1155
- onClick: y[2] || (y[2] = te(() => {
1156
- }, ["stop"]))
1157
- }, {
1158
- default: t(() => [
1159
- l(e(se), {
1160
- type: "remove",
1161
- title: e(a)("page.delete"),
1162
- onClick: (u) => O(i)
1163
- }, null, 8, ["title", "onClick"])
1164
- ]),
1165
- _: 2
1166
- }, 1024)
1088
+ _: 2
1089
+ }, 1024)
1090
+ ]),
1091
+ "cell-last_hit_at": t(({ row: o }) => [
1092
+ l(e(_e), {
1093
+ value: o.last_hit_at,
1094
+ tone: o.last_hit_at ? "default" : "muted"
1095
+ }, null, 8, ["value", "tone"])
1096
+ ]),
1097
+ "cell-is_active": t(({ row: o }) => [
1098
+ l(e(M), {
1099
+ type: o.is_active ? "success" : "default",
1100
+ dot: ""
1101
+ }, {
1102
+ default: t(() => [
1103
+ w(h(o.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
1167
1104
  ]),
1168
- _: 1
1169
- }, 8, ["data", "columns", "loading", "search-placeholder", "empty-text"])
1105
+ _: 2
1106
+ }, 1032, ["type"])
1170
1107
  ]),
1171
- _: 2
1172
- }, [
1173
- e(w) ? {
1174
- name: "extra",
1175
- fn: t(() => [
1176
- l(e(N), {
1177
- type: "primary",
1178
- icon: "add",
1179
- onClick: y[0] || (y[0] = (i) => k(null))
1180
- }, {
1181
- default: t(() => [
1182
- f(m(e(a)("page.new-redirect")), 1)
1183
- ]),
1184
- _: 1
1185
- })
1186
- ]),
1187
- key: "0"
1188
- } : void 0
1189
- ]), 1024)
1108
+ "card-actions": t(({ row: o }) => [
1109
+ e(k) ? (y(), W(e(te), {
1110
+ key: 0,
1111
+ actions: V(o),
1112
+ label: o.pattern
1113
+ }, null, 8, ["actions", "label"])) : O("", !0)
1114
+ ]),
1115
+ "cell-actions": t(({ row: o }) => [
1116
+ l(e(te), {
1117
+ actions: V(o),
1118
+ label: o.pattern
1119
+ }, null, 8, ["actions", "label"])
1120
+ ]),
1121
+ _: 1
1122
+ }, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text"])
1190
1123
  ]),
1191
- _: 1
1192
- }, 8, ["base"]));
1124
+ _: 2
1125
+ }, [
1126
+ e(k) ? {
1127
+ name: "actions",
1128
+ fn: t(() => [
1129
+ l(e(I), {
1130
+ type: "primary",
1131
+ icon: "add",
1132
+ onClick: b[0] || (b[0] = (o) => A(null))
1133
+ }, {
1134
+ default: t(() => [
1135
+ w(h(e(a)("page.new-redirect")), 1)
1136
+ ]),
1137
+ _: 1
1138
+ })
1139
+ ]),
1140
+ key: "0"
1141
+ } : void 0
1142
+ ]), 1032, ["base"]));
1193
1143
  }
1194
1144
  }), $e = [
1195
1145
  "title",
@@ -1203,96 +1153,96 @@ const Xe = { class: "wx-seo-test" }, Ye = {
1203
1153
  "robots",
1204
1154
  "json_ld"
1205
1155
  ];
1206
- function be(o, r) {
1207
- return xe(o.title, r);
1156
+ function fe(n, r) {
1157
+ return xe(n.title, r);
1208
1158
  }
1209
- function xt(o) {
1210
- if (!o) return {};
1159
+ function ht(n) {
1160
+ if (!n) return {};
1211
1161
  const r = {};
1212
1162
  for (const d of $e) {
1213
- const c = o[d];
1163
+ const c = n[d];
1214
1164
  c != null && Object.assign(r, { [d]: c });
1215
1165
  }
1216
1166
  return r;
1217
1167
  }
1218
- function wt(o, r) {
1219
- const d = { ...o };
1168
+ function ft(n, r) {
1169
+ const d = { ...n };
1220
1170
  for (const c of $e)
1221
1171
  Object.assign(d, { [c]: r[c] ?? null });
1222
1172
  return d;
1223
1173
  }
1224
- const kt = { class: "wx-seo-rule" }, Vt = { class: "wx-seo-rule__where" }, $t = /* @__PURE__ */ M({
1174
+ const bt = { class: "wx-seo-rule" }, yt = { class: "wx-seo-rule__where" }, _t = /* @__PURE__ */ E({
1225
1175
  __name: "SeoUrlDialog",
1226
1176
  props: {
1227
1177
  rule: { default: null },
1228
1178
  mediaField: { default: void 0 }
1229
1179
  },
1230
- setup(o) {
1231
- const r = o, { resolve: d, dismiss: c, open: a } = de(), n = E(), h = Q(n);
1232
- H();
1233
- const s = K("webx-seo"), w = z(!1), V = z({}), v = z({
1180
+ setup(n) {
1181
+ const r = n, { resolve: d, dismiss: c, open: a } = ie(), i = K(), f = G(i);
1182
+ q();
1183
+ const s = J("webx-seo"), S = le(), k = C(!1), g = C({}), p = C({
1234
1184
  match_type: "exact",
1235
1185
  pattern: "",
1236
1186
  priority: 0,
1237
1187
  is_active: !0
1238
- }), p = z({}), b = C(() => r.rule !== null), k = C(() => [
1188
+ }), u = C({}), V = U(() => r.rule !== null), L = U(() => [
1239
1189
  { value: "exact", label: s("page.exact") },
1240
1190
  { value: "mask", label: s("page.mask") },
1241
1191
  { value: "regex", label: s("page.regex") }
1242
1192
  ]);
1243
- ye(
1193
+ be(
1244
1194
  () => r.rule,
1245
- (y) => {
1246
- v.value = {
1247
- match_type: y?.match_type ?? "exact",
1248
- pattern: y?.pattern ?? "",
1249
- priority: y?.priority ?? 0,
1250
- is_active: y?.is_active ?? !0
1251
- }, p.value = xt(y), V.value = {};
1195
+ (m) => {
1196
+ p.value = {
1197
+ match_type: m?.match_type ?? "exact",
1198
+ pattern: m?.pattern ?? "",
1199
+ priority: m?.priority ?? 0,
1200
+ is_active: m?.is_active ?? !0
1201
+ }, u.value = ht(m), g.value = {};
1252
1202
  },
1253
1203
  { immediate: !0 }
1254
1204
  );
1255
- function O(y) {
1256
- return V.value[y]?.[0];
1205
+ function A(m) {
1206
+ return g.value[m]?.[0];
1257
1207
  }
1258
- async function S() {
1259
- w.value = !0, V.value = {};
1260
- const y = wt(v.value, p.value);
1208
+ async function D() {
1209
+ k.value = !0, g.value = {};
1210
+ const m = ft(p.value, u.value);
1261
1211
  try {
1262
- const i = r.rule ? await h.updateUrl(r.rule.id, y) : await h.createUrl(y);
1263
- B.success(s("page.saved")), d(i);
1264
- } catch (i) {
1265
- const u = i.body;
1266
- u?.errors ? (V.value = u.errors, B.danger(s("page.failed"))) : B.danger(u?.message ?? s("page.failed"));
1212
+ const b = r.rule ? await f.updateUrl(r.rule.id, m) : await f.createUrl(m);
1213
+ B.success(s("page.saved")), d(b);
1214
+ } catch (b) {
1215
+ const o = b.body;
1216
+ o?.errors ? (g.value = o.errors, B.danger(s("page.failed"))) : B.danger(S(b, s("page.failed")));
1267
1217
  } finally {
1268
- w.value = !1;
1218
+ k.value = !1;
1269
1219
  }
1270
1220
  }
1271
- return (y, i) => (x(), U(e(re), {
1221
+ return (m, b) => (y(), W(e(de), {
1272
1222
  open: e(a),
1273
- "onUpdate:open": i[6] || (i[6] = (u) => P(a) ? a.value = u : null),
1223
+ "onUpdate:open": b[6] || (b[6] = (o) => P(a) ? a.value = o : null),
1274
1224
  title: e(s)("page.rule"),
1275
1225
  width: 860
1276
1226
  }, {
1277
1227
  footer: t(() => [
1278
- l(e(G), { size: "sm" }, {
1228
+ l(e(X), { size: "sm" }, {
1279
1229
  default: t(() => [
1280
- l(e(N), {
1230
+ l(e(I), {
1281
1231
  variant: "outline",
1282
- onClick: i[5] || (i[5] = (u) => e(c)())
1232
+ onClick: b[5] || (b[5] = (o) => e(c)())
1283
1233
  }, {
1284
1234
  default: t(() => [
1285
- f(m(e(s)("page.cancel")), 1)
1235
+ w(h(e(s)("page.cancel")), 1)
1286
1236
  ]),
1287
1237
  _: 1
1288
1238
  }),
1289
- l(e(N), {
1239
+ l(e(I), {
1290
1240
  type: "primary",
1291
- loading: w.value,
1292
- onClick: S
1241
+ loading: k.value,
1242
+ onClick: D
1293
1243
  }, {
1294
1244
  default: t(() => [
1295
- f(m(b.value ? e(s)("page.save") : e(s)("page.new-rule")), 1)
1245
+ w(h(V.value ? e(s)("page.save") : e(s)("page.new-rule")), 1)
1296
1246
  ]),
1297
1247
  _: 1
1298
1248
  }, 8, ["loading"])
@@ -1301,63 +1251,63 @@ const kt = { class: "wx-seo-rule" }, Vt = { class: "wx-seo-rule__where" }, $t =
1301
1251
  })
1302
1252
  ]),
1303
1253
  default: t(() => [
1304
- A("div", kt, [
1305
- A("div", Vt, [
1306
- l(e(T), {
1254
+ j("div", bt, [
1255
+ j("div", yt, [
1256
+ l(e(z), {
1307
1257
  label: e(s)("page.kind")
1308
1258
  }, {
1309
1259
  default: t(() => [
1310
1260
  l(e(ae), {
1311
- modelValue: v.value.match_type,
1312
- "onUpdate:modelValue": i[0] || (i[0] = (u) => v.value.match_type = u),
1313
- options: k.value
1261
+ modelValue: p.value.match_type,
1262
+ "onUpdate:modelValue": b[0] || (b[0] = (o) => p.value.match_type = o),
1263
+ options: L.value
1314
1264
  }, null, 8, ["modelValue", "options"])
1315
1265
  ]),
1316
1266
  _: 1
1317
1267
  }, 8, ["label"]),
1318
- l(e(T), {
1268
+ l(e(z), {
1319
1269
  label: e(s)("page.address"),
1320
1270
  help: e(s)("page.address-help"),
1321
- error: O("pattern"),
1271
+ error: A("pattern"),
1322
1272
  class: "wx-seo-rule__address"
1323
1273
  }, {
1324
1274
  default: t(() => [
1325
- l(e(I), {
1326
- modelValue: v.value.pattern,
1327
- "onUpdate:modelValue": i[1] || (i[1] = (u) => v.value.pattern = u),
1275
+ l(e(N), {
1276
+ modelValue: p.value.pattern,
1277
+ "onUpdate:modelValue": b[1] || (b[1] = (o) => p.value.pattern = o),
1328
1278
  placeholder: "/catalog/shoes"
1329
1279
  }, null, 8, ["modelValue"])
1330
1280
  ]),
1331
1281
  _: 1
1332
1282
  }, 8, ["label", "help", "error"]),
1333
- l(e(T), {
1283
+ l(e(z), {
1334
1284
  label: e(s)("page.priority"),
1335
1285
  help: e(s)("page.priority-help")
1336
1286
  }, {
1337
1287
  default: t(() => [
1338
- l(e(Ee), {
1339
- modelValue: v.value.priority,
1340
- "onUpdate:modelValue": i[2] || (i[2] = (u) => v.value.priority = u),
1288
+ l(e(Ie), {
1289
+ modelValue: p.value.priority,
1290
+ "onUpdate:modelValue": b[2] || (b[2] = (o) => p.value.priority = o),
1341
1291
  step: 10
1342
1292
  }, null, 8, ["modelValue"])
1343
1293
  ]),
1344
1294
  _: 1
1345
1295
  }, 8, ["label", "help"]),
1346
- l(e(T), {
1296
+ l(e(z), {
1347
1297
  label: e(s)("page.state")
1348
1298
  }, {
1349
1299
  default: t(() => [
1350
1300
  l(e(we), {
1351
- modelValue: v.value.is_active,
1352
- "onUpdate:modelValue": i[3] || (i[3] = (u) => v.value.is_active = u)
1301
+ modelValue: p.value.is_active,
1302
+ "onUpdate:modelValue": b[3] || (b[3] = (o) => p.value.is_active = o)
1353
1303
  }, null, 8, ["modelValue"])
1354
1304
  ]),
1355
1305
  _: 1
1356
1306
  }, 8, ["label"])
1357
1307
  ]),
1358
1308
  l(Ve, {
1359
- modelValue: p.value,
1360
- "onUpdate:modelValue": i[4] || (i[4] = (u) => p.value = u),
1309
+ modelValue: u.value,
1310
+ "onUpdate:modelValue": b[4] || (b[4] = (o) => u.value = o),
1361
1311
  "media-field": r.mediaField
1362
1312
  }, null, 8, ["modelValue", "media-field"])
1363
1313
  ])
@@ -1365,213 +1315,190 @@ const kt = { class: "wx-seo-rule" }, Vt = { class: "wx-seo-rule__where" }, $t =
1365
1315
  _: 1
1366
1316
  }, 8, ["open", "title"]));
1367
1317
  }
1368
- }), St = /* @__PURE__ */ J($t, [["__scopeId", "data-v-fd7826d1"]]), Ct = /* @__PURE__ */ M({
1318
+ }), xt = /* @__PURE__ */ Q(_t, [["__scopeId", "data-v-fa975d05"]]), wt = /* @__PURE__ */ E({
1369
1319
  __name: "SeoUrlsPage",
1370
1320
  props: {
1371
1321
  base: { default: "/seo" },
1372
1322
  mediaField: { default: void 0 }
1373
1323
  },
1374
- setup(o) {
1375
- const r = o, d = E(), c = Q(d);
1376
- H();
1377
- const a = K("webx-seo"), n = z(null), h = z(!1), s = z("any");
1378
- let w = { page: 1, perPage: 20, sort: null, search: "" };
1379
- const V = d.can("seo.manage"), v = Y(
1380
- St
1381
- ), p = Y(ve), b = C(() => [
1324
+ setup(n) {
1325
+ const r = n, d = K(), c = G(d);
1326
+ q();
1327
+ const a = J("webx-seo"), i = le(), f = C(null), s = C(!1), S = C("any");
1328
+ let k = { page: 1, perPage: 20, sort: null, search: "" };
1329
+ const g = d.can("seo.manage"), p = Z(
1330
+ xt
1331
+ ), u = Z(ce), V = U(() => [
1382
1332
  { value: "any", label: a("page.any-kind") },
1383
1333
  { value: "exact", label: a("page.exact") },
1384
1334
  { value: "mask", label: a("page.mask") },
1385
1335
  { value: "regex", label: a("page.regex") }
1386
- ]), k = C(() => [
1336
+ ]), L = U(() => [
1387
1337
  { key: "pattern", label: a("page.address") },
1388
1338
  { key: "match_type", label: a("page.kind"), hideBelow: 560 },
1389
1339
  { key: "title", label: a("page.title"), hideBelow: 900 },
1390
1340
  { key: "priority", label: a("page.priority"), align: "center", hideBelow: 760 },
1391
1341
  { key: "is_active", label: a("page.state"), align: "center", hideBelow: 660 },
1392
- {
1393
- key: "actions",
1394
- label: "",
1395
- width: 56,
1396
- align: "right",
1397
- hidden: !V,
1398
- hideOnCards: !0
1399
- }
1342
+ { key: "actions", label: "", width: 56, align: "right", hidden: !g, hideOnCards: !0 }
1400
1343
  ]);
1401
- async function O(i) {
1402
- w = i, h.value = !0;
1344
+ function A(o) {
1345
+ return [
1346
+ {
1347
+ key: "delete",
1348
+ icon: "trash",
1349
+ label: a("page.delete"),
1350
+ danger: !0,
1351
+ run: () => b(o)
1352
+ }
1353
+ ];
1354
+ }
1355
+ async function D(o) {
1356
+ k = o, s.value = !0;
1403
1357
  try {
1404
- n.value = await c.urls({
1405
- q: i.search,
1406
- match_type: s.value === "any" ? null : s.value,
1407
- page: i.page,
1408
- per_page: i.perPage
1358
+ f.value = await c.urls({
1359
+ q: o.search,
1360
+ match_type: S.value === "any" ? null : S.value,
1361
+ page: o.page,
1362
+ per_page: o.perPage
1409
1363
  });
1410
1364
  } finally {
1411
- h.value = !1;
1365
+ s.value = !1;
1412
1366
  }
1413
1367
  }
1414
- async function S(i) {
1415
- await v({ rule: i, mediaField: r.mediaField }) && O(w);
1368
+ async function m(o) {
1369
+ await p({ rule: o, mediaField: r.mediaField }) && D(k);
1416
1370
  }
1417
- async function y(i) {
1371
+ async function b(o) {
1418
1372
  if (await ke({
1419
- title: a("page.delete-title", { pattern: i.pattern }),
1373
+ title: a("page.delete-title", { pattern: o.pattern }),
1420
1374
  message: a("page.delete-text"),
1421
1375
  confirmText: a("page.delete"),
1422
1376
  cancelText: a("page.cancel"),
1423
1377
  tone: "danger"
1424
1378
  }))
1425
1379
  try {
1426
- await c.removeUrl(i.id), B.success(a("page.deleted")), O(w);
1427
- } catch (g) {
1428
- B.danger(g.body?.message ?? String(g));
1380
+ await c.removeUrl(o.id), B.success(a("page.deleted")), D(k);
1381
+ } catch (v) {
1382
+ B.danger(i(v));
1429
1383
  }
1430
1384
  }
1431
- return (i, u) => (x(), U(pe, {
1385
+ return (o, x) => (y(), W(ue, {
1432
1386
  base: r.base,
1433
1387
  current: "rules",
1434
- onTest: u[5] || (u[5] = (g) => e(p)({}))
1435
- }, {
1388
+ onTest: x[2] || (x[2] = (v) => e(u)({}))
1389
+ }, ye({
1436
1390
  default: t(() => [
1437
- l(e(ue), null, _e({
1438
- header: t(() => [
1439
- f(m(e(a)("page.rules")), 1)
1391
+ l(e(re), {
1392
+ data: f.value,
1393
+ columns: L.value,
1394
+ "row-key": "id",
1395
+ searchable: "",
1396
+ clickable: e(g),
1397
+ hover: e(g),
1398
+ flush: "",
1399
+ loading: s.value,
1400
+ "search-placeholder": e(a)("page.search-rules"),
1401
+ "empty-text": e(a)("page.empty"),
1402
+ onRowClick: m,
1403
+ onStateChange: D
1404
+ }, {
1405
+ actions: t(() => [
1406
+ l(e(ae), {
1407
+ modelValue: S.value,
1408
+ "onUpdate:modelValue": x[1] || (x[1] = (v) => S.value = v),
1409
+ options: V.value,
1410
+ class: "wx-seo-urls__kind"
1411
+ }, null, 8, ["modelValue", "options"])
1440
1412
  ]),
1441
- default: t(() => [
1442
- l(e(ce), {
1443
- data: n.value,
1444
- columns: k.value,
1445
- "row-key": "id",
1446
- searchable: "",
1447
- hover: "",
1448
- flush: "",
1449
- loading: h.value,
1450
- "search-placeholder": e(a)("page.search-rules"),
1451
- "empty-text": e(a)("page.empty"),
1452
- onStateChange: O,
1453
- onRowClick: u[4] || (u[4] = (g) => e(V) ? S(g) : void 0)
1413
+ "cell-pattern": t(({ row: v }) => [
1414
+ l(e(R), {
1415
+ mono: "",
1416
+ size: "sm"
1454
1417
  }, {
1455
- actions: t(() => [
1456
- l(e(ae), {
1457
- modelValue: s.value,
1458
- "onUpdate:modelValue": u[1] || (u[1] = (g) => s.value = g),
1459
- options: b.value,
1460
- class: "wx-seo-urls__kind"
1461
- }, null, 8, ["modelValue", "options"])
1462
- ]),
1463
- "cell-pattern": t(({ row: g }) => [
1464
- l(e(L), {
1465
- mono: "",
1466
- size: "sm"
1467
- }, {
1468
- default: t(() => [
1469
- f(m(g.pattern), 1)
1470
- ]),
1471
- _: 2
1472
- }, 1024)
1473
- ]),
1474
- "cell-match_type": t(({ row: g }) => [
1475
- l(e(F), null, {
1476
- default: t(() => [
1477
- f(m(e(a)(`page.${g.match_type}`)), 1)
1478
- ]),
1479
- _: 2
1480
- }, 1024)
1481
- ]),
1482
- "cell-title": t(({ row: g }) => [
1483
- e(be)(g) ? (x(), U(e(L), {
1484
- key: 0,
1485
- size: "sm"
1486
- }, {
1487
- default: t(() => [
1488
- f(m(e(be)(g)), 1)
1489
- ]),
1490
- _: 2
1491
- }, 1024)) : (x(), U(e(L), {
1492
- key: 1,
1493
- size: "sm",
1494
- tone: "muted"
1495
- }, {
1496
- default: t(() => [...u[6] || (u[6] = [
1497
- f("—", -1)
1498
- ])]),
1499
- _: 1
1500
- }))
1501
- ]),
1502
- "cell-is_active": t(({ row: g }) => [
1503
- l(e(F), {
1504
- type: g.is_active ? "success" : "default",
1505
- dot: ""
1506
- }, {
1507
- default: t(() => [
1508
- f(m(g.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
1509
- ]),
1510
- _: 2
1511
- }, 1032, ["type"])
1418
+ default: t(() => [
1419
+ w(h(v.pattern), 1)
1512
1420
  ]),
1513
- "card-actions": t(({ row: g }) => [
1514
- e(V) ? (x(), U(e(le), {
1515
- key: 0,
1516
- size: "sm",
1517
- onClick: u[2] || (u[2] = te(() => {
1518
- }, ["stop"]))
1519
- }, {
1520
- default: t(() => [
1521
- l(e(se), {
1522
- type: "remove",
1523
- title: e(a)("page.delete"),
1524
- onClick: (D) => y(g)
1525
- }, null, 8, ["title", "onClick"])
1526
- ]),
1527
- _: 2
1528
- }, 1024)) : R("", !0)
1421
+ _: 2
1422
+ }, 1024)
1423
+ ]),
1424
+ "cell-match_type": t(({ row: v }) => [
1425
+ l(e(M), null, {
1426
+ default: t(() => [
1427
+ w(h(e(a)(`page.${v.match_type}`)), 1)
1529
1428
  ]),
1530
- "cell-actions": t(({ row: g }) => [
1531
- l(e(le), {
1532
- size: "sm",
1533
- onClick: u[3] || (u[3] = te(() => {
1534
- }, ["stop"]))
1535
- }, {
1536
- default: t(() => [
1537
- l(e(se), {
1538
- type: "remove",
1539
- title: e(a)("page.delete"),
1540
- onClick: (D) => y(g)
1541
- }, null, 8, ["title", "onClick"])
1542
- ]),
1543
- _: 2
1544
- }, 1024)
1429
+ _: 2
1430
+ }, 1024)
1431
+ ]),
1432
+ "cell-title": t(({ row: v }) => [
1433
+ e(fe)(v) ? (y(), W(e(R), {
1434
+ key: 0,
1435
+ size: "sm"
1436
+ }, {
1437
+ default: t(() => [
1438
+ w(h(e(fe)(v)), 1)
1545
1439
  ]),
1440
+ _: 2
1441
+ }, 1024)) : (y(), W(e(R), {
1442
+ key: 1,
1443
+ size: "sm",
1444
+ tone: "muted"
1445
+ }, {
1446
+ default: t(() => [...x[3] || (x[3] = [
1447
+ w("—", -1)
1448
+ ])]),
1546
1449
  _: 1
1547
- }, 8, ["data", "columns", "loading", "search-placeholder", "empty-text"])
1450
+ }))
1548
1451
  ]),
1549
- _: 2
1550
- }, [
1551
- e(V) ? {
1552
- name: "extra",
1553
- fn: t(() => [
1554
- l(e(N), {
1555
- type: "primary",
1556
- icon: "add",
1557
- onClick: u[0] || (u[0] = (g) => S(null))
1558
- }, {
1559
- default: t(() => [
1560
- f(m(e(a)("page.new-rule")), 1)
1561
- ]),
1562
- _: 1
1563
- })
1564
- ]),
1565
- key: "0"
1566
- } : void 0
1567
- ]), 1024)
1452
+ "cell-is_active": t(({ row: v }) => [
1453
+ l(e(M), {
1454
+ type: v.is_active ? "success" : "default",
1455
+ dot: ""
1456
+ }, {
1457
+ default: t(() => [
1458
+ w(h(v.is_active ? e(a)("page.active") : e(a)("page.inactive")), 1)
1459
+ ]),
1460
+ _: 2
1461
+ }, 1032, ["type"])
1462
+ ]),
1463
+ "card-actions": t(({ row: v }) => [
1464
+ e(g) ? (y(), W(e(te), {
1465
+ key: 0,
1466
+ actions: A(v),
1467
+ label: v.pattern
1468
+ }, null, 8, ["actions", "label"])) : O("", !0)
1469
+ ]),
1470
+ "cell-actions": t(({ row: v }) => [
1471
+ l(e(te), {
1472
+ actions: A(v),
1473
+ label: v.pattern
1474
+ }, null, 8, ["actions", "label"])
1475
+ ]),
1476
+ _: 1
1477
+ }, 8, ["data", "columns", "clickable", "hover", "loading", "search-placeholder", "empty-text"])
1568
1478
  ]),
1569
- _: 1
1570
- }, 8, ["base"]));
1479
+ _: 2
1480
+ }, [
1481
+ e(g) ? {
1482
+ name: "actions",
1483
+ fn: t(() => [
1484
+ l(e(I), {
1485
+ type: "primary",
1486
+ icon: "add",
1487
+ onClick: x[0] || (x[0] = (v) => m(null))
1488
+ }, {
1489
+ default: t(() => [
1490
+ w(h(e(a)("page.new-rule")), 1)
1491
+ ]),
1492
+ _: 1
1493
+ })
1494
+ ]),
1495
+ key: "0"
1496
+ } : void 0
1497
+ ]), 1032, ["base"]));
1571
1498
  }
1572
- }), Ut = /* @__PURE__ */ J(Ct, [["__scopeId", "data-v-d9fce714"]]);
1573
- function Lt(o = {}) {
1574
- const r = o.path ?? "/seo", d = o.mediaField ? Le(o.mediaField) : void 0;
1499
+ }), kt = /* @__PURE__ */ Q(wt, [["__scopeId", "data-v-7a990610"]]);
1500
+ function Wt(n = {}) {
1501
+ const r = n.path ?? "/seo", d = n.mediaField ? De(n.mediaField) : void 0;
1575
1502
  return {
1576
1503
  id: "seo",
1577
1504
  path: r,
@@ -1581,13 +1508,13 @@ function Lt(o = {}) {
1581
1508
  {
1582
1509
  path: r,
1583
1510
  name: "webx.seo",
1584
- component: Ut,
1511
+ component: kt,
1585
1512
  props: { base: r, mediaField: d }
1586
1513
  },
1587
1514
  {
1588
1515
  path: `${r}/redirects`,
1589
1516
  name: "webx.seo.redirects",
1590
- component: _t,
1517
+ component: mt,
1591
1518
  props: { base: r }
1592
1519
  },
1593
1520
  // The trail of renames, from `webx-ui/routing`. The screen is here whether or not any
@@ -1596,7 +1523,7 @@ function Lt(o = {}) {
1596
1523
  {
1597
1524
  path: `${r}/aliases`,
1598
1525
  name: "webx.seo.aliases",
1599
- component: lt,
1526
+ component: Ye,
1600
1527
  props: { base: r }
1601
1528
  }
1602
1529
  ],
@@ -1613,15 +1540,15 @@ function Lt(o = {}) {
1613
1540
  }
1614
1541
  export {
1615
1542
  Ve as WxSeo,
1616
- lt as WxSeoAliasesPage,
1617
- _t as WxSeoRedirectsPage,
1618
- Ut as WxSeoUrlsPage,
1619
- Q as createSeoApi,
1620
- ie as robotsDirectives,
1621
- wt as ruleInput,
1622
- be as ruleTitle,
1623
- Lt as seo,
1624
- Je as seoMessages,
1625
- xt as seoOf
1543
+ Ye as WxSeoAliasesPage,
1544
+ mt as WxSeoRedirectsPage,
1545
+ kt as WxSeoUrlsPage,
1546
+ G as createSeoApi,
1547
+ ne as robotsDirectives,
1548
+ ft as ruleInput,
1549
+ fe as ruleTitle,
1550
+ Wt as seo,
1551
+ Ke as seoMessages,
1552
+ ht as seoOf
1626
1553
  };
1627
1554
  //# sourceMappingURL=index.js.map