@aeria-ui/ui 0.0.210 → 0.0.211

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as M, ref as K, resolveDirective as ee, createElementBlock as s, openBlock as n, normalizeClass as U, Fragment as W, renderList as z, withDirectives as Y, createCommentVNode as h, createTextVNode as D, toDisplayString as V, unref as t, renderSlot as C, withModifiers as Ie, inject as re, computed as G, createElementVNode as O, mergeProps as x, createBlock as $, withCtx as y, resolveDynamicComponent as pe, useCssVars as Ne, normalizeProps as oe, guardReactiveProps as be, Teleport as Fe, createVNode as L, onMounted as Ue, watch as ae, vModelDynamic as et, onBeforeMount as Xe, normalizeStyle as ve, provide as fe, createSlots as ie, vModelCheckbox as tt, onUnmounted as nt, resolveComponent as at, Suspense as ot, useSlots as lt, h as it } from "vue";
1
+ import { defineComponent as M, ref as K, resolveDirective as ee, createElementBlock as s, openBlock as n, normalizeClass as U, Fragment as W, renderList as z, withDirectives as Y, createCommentVNode as b, createTextVNode as D, toDisplayString as V, unref as t, renderSlot as C, withModifiers as Ie, inject as re, computed as G, createElementVNode as O, mergeProps as x, createBlock as $, withCtx as y, resolveDynamicComponent as pe, useCssVars as Ne, normalizeProps as oe, guardReactiveProps as be, Teleport as Fe, createVNode as L, onMounted as Ue, watch as ae, vModelDynamic as et, onBeforeMount as Xe, normalizeStyle as ve, provide as fe, createSlots as ie, vModelCheckbox as tt, onUnmounted as nt, resolveComponent as at, Suspense as ot, useSlots as lt, h as it } from "vue";
2
2
  import { t as R, useI18n as st } from "@aeria-ui/i18n";
3
3
  import { INSTANCE_VARS_SYMBOL as rt, useScrollObserver as He, useBreakpoints as Se, useMask as ut, PAGINATION_PER_PAGE_DEFAULTS as ct, API_URL as Je, request as dt, useDebounce as Ze, convertToSearchQuery as mt, useParentCollectionStore as Ae, useCollectionStore as pt, useAction as ft, convertFromSearchQuery as vt, usePasswordPolicy as yt } from "@aeria-ui/core";
4
4
  import { arraysIntersect as Ee, deepClone as ke, getReferenceProperty as se, convertConditionToQuery as ht, freshItem as bt, isRequired as je, evaluateCondition as qe, deepMerge as Be } from "@aeriajs/common";
@@ -17,40 +17,40 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
17
17
  headers: {}
18
18
  },
19
19
  setup(e) {
20
- const r = K(null), o = (a) => typeof a == "string" ? a : a.title;
21
- return (a, l) => {
22
- const c = ee("clickable");
20
+ const c = K(null), a = (o) => typeof o == "string" ? o : o.title;
21
+ return (o, l) => {
22
+ const u = ee("clickable");
23
23
  return n(), s("div", {
24
24
  class: U({
25
25
  accordion: !0,
26
26
  "accordion--padded": !e.noPadding
27
27
  })
28
28
  }, [
29
- (n(!0), s(W, null, z(Object.keys(a.$slots).filter((u) => u !== "default"), (u, p) => (n(), s("div", {
30
- key: u,
29
+ (n(!0), s(W, null, z(Object.keys(o.$slots).filter((r) => r !== "default"), (r, h) => (n(), s("div", {
30
+ key: r,
31
31
  class: "accordion__slot"
32
32
  }, [
33
33
  Y((n(), s("div", {
34
34
  class: "accordion__header",
35
- onClick: (d) => r.value === u ? r.value = null : r.value = u
35
+ onClick: (d) => c.value === r ? c.value = null : c.value = r
36
36
  }, [
37
- e.enumerate ? (n(), s("span", kt, V(p + 1) + ". ", 1)) : h("", !0),
38
- D(" " + V(e.headers[u] ? o(e.headers[u]) : t(R)(u)), 1)
37
+ e.enumerate ? (n(), s("span", kt, V(h + 1) + ". ", 1)) : b("", !0),
38
+ D(" " + V(e.headers[r] ? a(e.headers[r]) : t(R)(r)), 1)
39
39
  ], 8, gt)), [
40
- [c]
40
+ [u]
41
41
  ]),
42
- r.value === u ? (n(), s("div", Vt, [
43
- C(a.$slots, u, {}, void 0, !0)
44
- ])) : h("", !0)
42
+ c.value === r ? (n(), s("div", Vt, [
43
+ C(o.$slots, r, {}, void 0, !0)
44
+ ])) : b("", !0)
45
45
  ]))), 128))
46
46
  ], 2);
47
47
  };
48
48
  }
49
- }), E = (e, r) => {
50
- const o = e.__vccOpts || e;
51
- for (const [a, l] of r)
52
- o[a] = l;
53
- return o;
49
+ }), E = (e, c) => {
50
+ const a = e.__vccOpts || e;
51
+ for (const [o, l] of c)
52
+ a[o] = l;
53
+ return a;
54
54
  }, sl = /* @__PURE__ */ E(Ct, [["__scopeId", "data-v-3ea933d4"]]), Ot = /* @__PURE__ */ M({
55
55
  __name: "aeria-badge",
56
56
  props: {
@@ -58,14 +58,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
58
58
  alt: { type: Boolean }
59
59
  },
60
60
  setup(e) {
61
- return (r, o) => (n(), s("div", {
61
+ return (c, a) => (n(), s("div", {
62
62
  class: U([
63
63
  "badge",
64
64
  { "badge--large": e.large },
65
65
  { "badge--alt": e.alt }
66
66
  ])
67
67
  }, [
68
- C(r.$slots, "default", {}, void 0, !0)
68
+ C(c.$slots, "default", {}, void 0, !0)
69
69
  ], 2));
70
70
  }
71
71
  }), he = /* @__PURE__ */ E(Ot, [["__scopeId", "data-v-4cbce7ef"]]), At = /* @__PURE__ */ M({
@@ -75,18 +75,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
75
75
  disabled: { type: Boolean }
76
76
  },
77
77
  emits: ["click"],
78
- setup(e, { emit: r }) {
79
- const o = e, a = r, l = (c) => {
80
- o.disabled || a("click", c);
78
+ setup(e, { emit: c }) {
79
+ const a = e, o = c, l = (u) => {
80
+ a.disabled || o("click", u);
81
81
  };
82
- return (c, u) => e.dummy ? (n(), s("button", {
82
+ return (u, r) => e.dummy ? (n(), s("button", {
83
83
  key: 0,
84
84
  class: U([
85
85
  "barebutton",
86
86
  `barebutton--${e.disabled ? "disabled" : "enabled"}`
87
87
  ])
88
88
  }, [
89
- C(c.$slots, "default", {}, void 0, !0)
89
+ C(u.$slots, "default", {}, void 0, !0)
90
90
  ], 2)) : (n(), s("button", {
91
91
  key: 1,
92
92
  class: U([
@@ -95,7 +95,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
95
95
  ]),
96
96
  onClick: Ie(l, ["prevent"])
97
97
  }, [
98
- C(c.$slots, "default", {}, void 0, !0)
98
+ C(u.$slots, "default", {}, void 0, !0)
99
99
  ], 2));
100
100
  }
101
101
  }), de = /* @__PURE__ */ E(At, [["__scopeId", "data-v-51833bfd"]]), It = ["href"], Bt = {
@@ -112,13 +112,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
112
112
  active: { type: Boolean }
113
113
  },
114
114
  setup(e) {
115
- const r = e, o = re(rt, {}), a = typeof r.reactive == "boolean" ? r.reactive : re("iconReactive", !1), l = G(() => r.icon?.includes(":") ? r.icon : `regular:${r.icon}`);
116
- return (c, u) => (n(), s("a", {
115
+ const c = e, a = re(rt, {}), o = typeof c.reactive == "boolean" ? c.reactive : re("iconReactive", !1), l = G(() => c.icon?.includes(":") ? c.icon : `regular:${c.icon}`);
116
+ return (u, r) => (n(), s("a", {
117
117
  class: U([
118
118
  "icon",
119
- { "icon--reactive": t(a) },
119
+ { "icon--reactive": t(o) },
120
120
  { "icon--active": e.active },
121
- c.$slots.default ? "icon--centered" : "icon--standalone"
121
+ u.$slots.default ? "icon--centered" : "icon--standalone"
122
122
  ])
123
123
  }, [
124
124
  O("div", {
@@ -136,13 +136,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
136
136
  ...e.fill ? { fill: e.fill } : {}
137
137
  }), [
138
138
  O("use", {
139
- href: `${t(o).base || "/"}assets/icons.svg#${l.value}`
139
+ href: `${t(a).base || "/"}assets/icons.svg#${l.value}`
140
140
  }, null, 8, It)
141
141
  ], 16))
142
142
  ], 2),
143
- c.$slots.default ? (n(), s("div", Bt, [
144
- C(c.$slots, "default", {}, void 0, !0)
145
- ])) : h("", !0)
143
+ u.$slots.default ? (n(), s("div", Bt, [
144
+ C(u.$slots, "default", {}, void 0, !0)
145
+ ])) : b("", !0)
146
146
  ], 2));
147
147
  }
148
148
  }), H = /* @__PURE__ */ E(St, [["__scopeId", "data-v-263a2782"]]), wt = {
@@ -161,20 +161,20 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
161
161
  loading: { type: Boolean }
162
162
  },
163
163
  setup(e) {
164
- const r = e, o = re("buttonVariant", r.variant) || "primary", a = (() => {
164
+ const c = e, a = re("buttonVariant", c.variant) || "primary", o = (() => {
165
165
  switch (!0) {
166
- case r.small:
166
+ case c.small:
167
167
  return "small";
168
- case r.large:
168
+ case c.large:
169
169
  return "large";
170
170
  }
171
- return re("buttonSize", r.size) || "medium";
171
+ return re("buttonSize", c.size) || "medium";
172
172
  })();
173
- return (l, c) => (n(), $(de, {
173
+ return (l, u) => (n(), $(de, {
174
174
  class: U([
175
175
  "button",
176
- `button--${t(o)}`,
177
176
  `button--${t(a)}`,
177
+ `button--${t(o)}`,
178
178
  { "button--loading": e.loading }
179
179
  ]),
180
180
  dummy: e.dummy,
@@ -204,7 +204,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
204
204
  horizontal: { type: Boolean }
205
205
  },
206
206
  setup(e) {
207
- return (r, o) => (n(), s("div", {
207
+ return (c, a) => (n(), s("div", {
208
208
  class: U([
209
209
  "card",
210
210
  { "card--inactive": e.inactive },
@@ -212,19 +212,19 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
212
212
  ])
213
213
  }, [
214
214
  O("div", jt, [
215
- C(r.$slots, "default", {}, void 0, !0)
215
+ C(c.$slots, "default", {}, void 0, !0)
216
216
  ]),
217
217
  O("div", Rt, [
218
218
  O("div", qt, [
219
219
  O("div", null, [
220
- C(r.$slots, "footer", {}, void 0, !0)
220
+ C(c.$slots, "footer", {}, void 0, !0)
221
221
  ]),
222
222
  O("div", Lt, [
223
- r.$slots.actions ? C(r.$slots, "actions", { key: 0 }, void 0, !0) : h("", !0)
223
+ c.$slots.actions ? C(c.$slots, "actions", { key: 0 }, void 0, !0) : b("", !0)
224
224
  ])
225
225
  ]),
226
226
  O("div", xt, [
227
- C(r.$slots, "badge", {}, void 0, !0)
227
+ C(c.$slots, "badge", {}, void 0, !0)
228
228
  ])
229
229
  ])
230
230
  ], 2));
@@ -257,16 +257,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
257
257
  overlayLayer: {}
258
258
  },
259
259
  emits: ["update:modelValue", "update:collapsed", "update:closeHint", "overlayClick", "close"],
260
- setup(e, { emit: r }) {
261
- const o = e, a = r, l = K(o.collapsed), c = K(null), { reachedEnd: u } = He(c), p = () => {
262
- a("update:modelValue", !1), a("close");
260
+ setup(e, { emit: c }) {
261
+ const a = e, o = c, l = K(a.collapsed), u = K(null), { reachedEnd: r } = He(u), h = () => {
262
+ o("update:modelValue", !1), o("close");
263
263
  }, d = () => {
264
- a("overlayClick");
265
- }, f = (m) => {
266
- a("update:collapsed", m), l.value = m;
264
+ o("overlayClick");
265
+ }, m = (p) => {
266
+ o("update:collapsed", p), l.value = p;
267
267
  };
268
- return (m, b) => {
269
- const _ = ee("clickable"), g = ee("loading"), i = ee("overlay");
268
+ return (p, _) => {
269
+ const v = ee("clickable"), g = ee("loading"), i = ee("overlay");
270
270
  return e.modelValue ? Y((n(), s("div", {
271
271
  key: 0,
272
272
  class: U([
@@ -288,10 +288,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
288
288
  { "panel__content--transparent-mobile": e.transparentMobile },
289
289
  { "panel__content--outer-header": e.outerHeader }
290
290
  ]),
291
- onClick: b[2] || (b[2] = (T) => T.stopPropagation())
291
+ onClick: _[2] || (_[2] = (T) => T.stopPropagation())
292
292
  }, {
293
293
  default: y(() => [
294
- m.$slots.header || e.title ? (n(), s("div", {
294
+ p.$slots.header || e.title ? (n(), s("div", {
295
295
  key: 0,
296
296
  class: U([
297
297
  "panel__header",
@@ -300,58 +300,58 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
300
300
  ])
301
301
  }, [
302
302
  O("div", Et, [
303
- m.$slots.header ? C(m.$slots, "header", { key: 0 }, void 0, !0) : e.title ? (n(), s("div", Ft, V(e.title), 1)) : h("", !0),
304
- m.$slots.extra ? (n(), s("div", Ut, [
305
- C(m.$slots, "extra", {}, void 0, !0)
306
- ])) : h("", !0)
303
+ p.$slots.header ? C(p.$slots, "header", { key: 0 }, void 0, !0) : e.title ? (n(), s("div", Ft, V(e.title), 1)) : b("", !0),
304
+ p.$slots.extra ? (n(), s("div", Ut, [
305
+ C(p.$slots, "extra", {}, void 0, !0)
306
+ ])) : b("", !0)
307
307
  ]),
308
308
  e.collapsible && l.value ? Y((n(), $(H, {
309
309
  key: 0,
310
310
  reactive: "",
311
311
  icon: "plus",
312
- onClick: b[0] || (b[0] = (T) => f(!l.value))
312
+ onClick: _[0] || (_[0] = (T) => m(!l.value))
313
313
  }, null, 512)), [
314
- [_]
314
+ [v]
315
315
  ]) : e.collapsible && !l.value ? Y((n(), $(H, {
316
316
  key: 1,
317
317
  reactive: "",
318
318
  icon: "minus",
319
- onClick: b[1] || (b[1] = (T) => f(!l.value))
319
+ onClick: _[1] || (_[1] = (T) => m(!l.value))
320
320
  }, null, 512)), [
321
- [_]
321
+ [v]
322
322
  ]) : e.closeHint ? Y((n(), $(H, {
323
323
  key: 2,
324
324
  reactive: "",
325
325
  icon: "x",
326
- onClick: p
326
+ onClick: h
327
327
  }, null, 512)), [
328
- [_]
329
- ]) : h("", !0)
330
- ], 2)) : h("", !0),
331
- l.value ? h("", !0) : Y((n(), s("div", {
328
+ [v]
329
+ ]) : b("", !0)
330
+ ], 2)) : b("", !0),
331
+ l.value ? b("", !0) : Y((n(), s("div", {
332
332
  key: 1,
333
333
  ref_key: "body",
334
- ref: c,
334
+ ref: u,
335
335
  tabindex: "0",
336
336
  class: U([
337
337
  "panel__body",
338
338
  { "panel__body--padded": !e.fill }
339
339
  ])
340
340
  }, [
341
- C(m.$slots, "default", {}, void 0, !0)
341
+ C(p.$slots, "default", {}, void 0, !0)
342
342
  ], 2)), [
343
343
  [g, e.loading]
344
344
  ]),
345
- m.$slots.footer ? (n(), s("div", {
345
+ p.$slots.footer ? (n(), s("div", {
346
346
  key: 2,
347
347
  class: U([
348
348
  "panel__footer",
349
349
  { "panel__footer--padded": !e.fillFooter },
350
- { "panel__footer--shadowed": !t(u) }
350
+ { "panel__footer--shadowed": !t(r) }
351
351
  ])
352
352
  }, [
353
- C(m.$slots, "footer", {}, void 0, !0)
354
- ], 2)) : h("", !0)
353
+ C(p.$slots, "footer", {}, void 0, !0)
354
+ ], 2)) : b("", !0)
355
355
  ]),
356
356
  _: 3
357
357
  }, 8, ["class"]))
@@ -362,7 +362,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
362
362
  click: d,
363
363
  layer: e.overlayLayer || (e.float ? 60 : e.fixedRight ? 50 : 0)
364
364
  }]
365
- ]) : h("", !0);
365
+ ]) : b("", !0);
366
366
  };
367
367
  }
368
368
  }), Oe = /* @__PURE__ */ E(Ht, [["__scopeId", "data-v-8463f8df"]]), Dt = { class: "content__body" }, Qt = {
@@ -376,61 +376,61 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
376
376
  overlayLayer: {}
377
377
  },
378
378
  emits: ["actionClick"],
379
- setup(e, { emit: r }) {
379
+ setup(e, { emit: c }) {
380
380
  Ne((d) => ({
381
- v4078ef85: p.value.x,
382
- v4078ef86: p.value.y
381
+ v4078ef85: h.value.x,
382
+ v4078ef86: h.value.y
383
383
  }));
384
- const o = r, a = K(null), l = K(!1), c = (d) => d?.filter((f) => {
385
- if (f.roles) {
386
- const m = ne("user");
387
- return Ee(f.roles, m.currentUser.roles);
384
+ const a = c, o = K(null), l = K(!1), u = (d) => d?.filter((m) => {
385
+ if (m.roles) {
386
+ const p = ne("user");
387
+ return Ee(m.roles, p.currentUser.roles);
388
388
  }
389
389
  return !0;
390
- }), u = (d, f) => {
391
- const m = f && ke(f);
392
- d.click && d.click(m), o("actionClick", {
390
+ }), r = (d, m) => {
391
+ const p = m && ke(m);
392
+ d.click && d.click(p), a("actionClick", {
393
393
  action: d,
394
- subject: m
394
+ subject: p
395
395
  }), l.value = !1;
396
- }, p = G(() => {
397
- if (!a.value)
396
+ }, h = G(() => {
397
+ if (!o.value)
398
398
  return {
399
399
  x: 0,
400
400
  y: 0
401
401
  };
402
- const d = a.value.getBoundingClientRect().top, f = a.value.getBoundingClientRect().left, m = a.value.offsetHeight;
402
+ const d = o.value.getBoundingClientRect().top, m = o.value.getBoundingClientRect().left, p = o.value.offsetHeight;
403
403
  return {
404
404
  _: l.value,
405
- x: Math.floor(f) + "px",
406
- y: Math.floor(d + m) + "px"
405
+ x: Math.floor(m) + "px",
406
+ y: Math.floor(d + p) + "px"
407
407
  };
408
408
  });
409
- return (d, f) => {
410
- const m = ee("overlay");
409
+ return (d, m) => {
410
+ const p = ee("overlay");
411
411
  return n(), s(W, null, [
412
- Object.keys(d.$slots).some((b) => b !== "default") || e.actions !== void 0 && e.actions.length > 0 ? (n(), s("div", {
412
+ Object.keys(d.$slots).some((_) => _ !== "default") || e.actions !== void 0 && e.actions.length > 0 ? (n(), s("div", {
413
413
  key: 0,
414
414
  ref_key: "contextmenu",
415
- ref: a,
415
+ ref: o,
416
416
  class: "contextmenu"
417
417
  }, [
418
418
  O("a", {
419
419
  class: "contextmenu__trigger",
420
- onClick: f[0] || (f[0] = (b) => l.value = !0)
420
+ onClick: m[0] || (m[0] = (_) => l.value = !0)
421
421
  }, [
422
422
  C(d.$slots, "default", oe(be({
423
423
  visible: l.value
424
424
  })), void 0, !0)
425
425
  ])
426
- ], 512)) : h("", !0),
426
+ ], 512)) : b("", !0),
427
427
  l.value ? (n(), $(Fe, {
428
428
  key: 1,
429
429
  to: "main"
430
430
  }, [
431
431
  Y((n(), $(Oe, {
432
432
  modelValue: l.value,
433
- "onUpdate:modelValue": f[4] || (f[4] = (b) => l.value = b),
433
+ "onUpdate:modelValue": m[4] || (m[4] = (_) => l.value = _),
434
434
  fill: "",
435
435
  bordered: "",
436
436
  class: "content",
@@ -440,60 +440,60 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
440
440
  O("div", Dt, [
441
441
  d.$slots.header ? (n(), s("div", Qt, [
442
442
  C(d.$slots, "header", {}, void 0, !0)
443
- ])) : h("", !0),
444
- Object.keys(d.$slots).filter((b) => !["default", "extra", "header"].includes(b)).length > 0 ? (n(), s("div", {
443
+ ])) : b("", !0),
444
+ Object.keys(d.$slots).filter((_) => !["default", "extra", "header"].includes(_)).length > 0 ? (n(), s("div", {
445
445
  key: 1,
446
446
  class: "content__section",
447
- onClick: f[1] || (f[1] = (b) => l.value = !1)
447
+ onClick: m[1] || (m[1] = (_) => l.value = !1)
448
448
  }, [
449
- (n(!0), s(W, null, z(Object.keys(d.$slots).filter((b) => !["default", "extra", "header"].includes(b)), (b, _) => (n(), $(de, {
450
- key: `slot-${_}`,
449
+ (n(!0), s(W, null, z(Object.keys(d.$slots).filter((_) => !["default", "extra", "header"].includes(_)), (_, v) => (n(), $(de, {
450
+ key: `slot-${v}`,
451
451
  class: "content__item content__item--reactive"
452
452
  }, {
453
453
  default: y(() => [
454
- C(d.$slots, b, {}, void 0, !0)
454
+ C(d.$slots, _, {}, void 0, !0)
455
455
  ]),
456
456
  _: 2
457
457
  }, 1024))), 128))
458
- ])) : h("", !0),
458
+ ])) : b("", !0),
459
459
  e.actions !== void 0 && e.actions.length > 0 ? (n(), s("div", {
460
460
  key: 2,
461
461
  class: "content__section",
462
- onClick: f[2] || (f[2] = (b) => l.value = !1)
462
+ onClick: m[2] || (m[2] = (_) => l.value = !1)
463
463
  }, [
464
- (n(!0), s(W, null, z(c(e.actions), (b, _) => (n(), $(de, {
465
- key: `action-${_}`,
464
+ (n(!0), s(W, null, z(u(e.actions), (_, v) => (n(), $(de, {
465
+ key: `action-${v}`,
466
466
  class: "content__item content__item--reactive",
467
- onClick: (g) => u(b, e.subject)
467
+ onClick: (g) => r(_, e.subject)
468
468
  }, {
469
469
  default: y(() => [
470
470
  L(H, {
471
- icon: b.icon || "gear"
471
+ icon: _.icon || "gear"
472
472
  }, {
473
473
  default: y(() => [
474
- D(V(b.translate ? t(R)(b.label, { capitalize: !0 }) : b.label), 1)
474
+ D(V(_.translate ? t(R)(_.label, { capitalize: !0 }) : _.label), 1)
475
475
  ]),
476
476
  _: 2
477
477
  }, 1032, ["icon"])
478
478
  ]),
479
479
  _: 2
480
480
  }, 1032, ["onClick"]))), 128))
481
- ])) : h("", !0),
481
+ ])) : b("", !0),
482
482
  d.$slots.extra ? (n(), s("div", {
483
483
  key: 3,
484
484
  class: "content__section",
485
- onClick: f[3] || (f[3] = (b) => l.value = !1)
485
+ onClick: m[3] || (m[3] = (_) => l.value = !1)
486
486
  }, [
487
487
  O("div", Gt, [
488
- d.$slots.extra ? C(d.$slots, "extra", { key: 0 }, void 0, !0) : h("", !0)
488
+ d.$slots.extra ? C(d.$slots, "extra", { key: 0 }, void 0, !0) : b("", !0)
489
489
  ])
490
- ])) : h("", !0)
490
+ ])) : b("", !0)
491
491
  ])
492
492
  ]),
493
493
  _: 3
494
494
  }, 8, ["modelValue"])), [
495
495
  [
496
- m,
496
+ p,
497
497
  {
498
498
  layer: e.overlayLayer,
499
499
  click: () => {
@@ -504,7 +504,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
504
504
  { invisibleOnLarge: !0 }
505
505
  ]
506
506
  ])
507
- ])) : h("", !0)
507
+ ])) : b("", !0)
508
508
  ], 64);
509
509
  };
510
510
  }
@@ -514,13 +514,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
514
514
  where: { default: "top" }
515
515
  },
516
516
  setup(e) {
517
- const r = Se(), o = K(!1);
518
- return (a, l) => t(r).md ? (n(), s("div", {
517
+ const c = Se(), a = K(!1);
518
+ return (o, l) => t(c).md ? (n(), s("div", {
519
519
  key: 0,
520
520
  class: "info",
521
- onMouseleave: l[1] || (l[1] = (c) => o.value = !1)
521
+ onMouseleave: l[1] || (l[1] = (u) => a.value = !1)
522
522
  }, [
523
- o.value ? (n(), s("div", {
523
+ a.value ? (n(), s("div", {
524
524
  key: 0,
525
525
  class: U([
526
526
  "info__bubble",
@@ -528,15 +528,15 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
528
528
  ])
529
529
  }, [
530
530
  O("div", Yt, [
531
- C(a.$slots, "text", {}, void 0, !0)
531
+ C(o.$slots, "text", {}, void 0, !0)
532
532
  ])
533
- ], 2)) : h("", !0),
533
+ ], 2)) : b("", !0),
534
534
  O("div", {
535
- onMouseover: l[0] || (l[0] = (c) => o.value = !0)
535
+ onMouseover: l[0] || (l[0] = (u) => a.value = !0)
536
536
  }, [
537
- C(a.$slots, "default", {}, void 0, !0)
537
+ C(o.$slots, "default", {}, void 0, !0)
538
538
  ], 32)
539
- ], 32)) : C(a.$slots, "default", { key: 1 }, void 0, !0);
539
+ ], 32)) : C(o.$slots, "default", { key: 1 }, void 0, !0);
540
540
  }
541
541
  }), Xt = /* @__PURE__ */ E(Kt, [["__scopeId", "data-v-15a38847"]]), Jt = { class: "input" }, Zt = {
542
542
  key: 0,
@@ -560,11 +560,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
560
560
  variant: {}
561
561
  },
562
562
  emits: ["update:modelValue", "input", "change", "clipboardCopy"],
563
- setup(e, { emit: r }) {
564
- const o = e, a = r, l = o.property || {}, c = l.icon || "inputType" in l && l.inputType === "search", u = re("searchOnly", !1), p = re("innerInputLabel", !1), d = !u && (o.readOnly || l.readOnly), f = K(!1), m = async (w) => {
565
- await navigator.clipboard.writeText(w), a("clipboardCopy", w), f.value = !0;
566
- }, b = re("inputVariant", o.variant) || "normal", _ = Object.assign(Object.assign({}, o), {
567
- name: o.propertyName,
563
+ setup(e, { emit: c }) {
564
+ const a = e, o = c, l = a.property || {}, u = l.icon || "inputType" in l && l.inputType === "search", r = re("searchOnly", !1), h = re("innerInputLabel", !1), d = !r && (a.readOnly || l.readOnly), m = K(!1), p = async (w) => {
565
+ await navigator.clipboard.writeText(w), o("clipboardCopy", w), m.value = !0;
566
+ }, _ = re("inputVariant", a.variant) || "normal", v = Object.assign(Object.assign({}, a), {
567
+ name: a.propertyName,
568
568
  readonly: d,
569
569
  type: (() => {
570
570
  if ("type" in l)
@@ -575,7 +575,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
575
575
  }
576
576
  if (l.inputType)
577
577
  return l.inputType;
578
- switch (typeof o.modelValue) {
578
+ switch (typeof a.modelValue) {
579
579
  case "string":
580
580
  return "text";
581
581
  case "number":
@@ -584,10 +584,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
584
584
  return "text";
585
585
  }
586
586
  })(),
587
- placeholder: p ? l.description || o.propertyName : l.placeholder
587
+ placeholder: h ? l.description || a.propertyName : l.placeholder
588
588
  });
589
- "type" in l && ((l.type === "number" || l.type === "integer") && (l.minimum && (_.min = l.minimum), l.exclusiveMinimum && (_.min = l.exclusiveMinimum + 1), l.maximum && (_.max = l.maximum), l.exclusiveMaximum && (_.max = l.exclusiveMaximum - 1)), l.type === "string" && ((l.format === "date" || l.format === "date-time") && (_.type = !u && l.format === "date-time" ? "datetime-local" : "date"), _.minlength = l.minLength, _.maxlength = l.maxLength)), _.type === "text" && u && (_.type = "search"), Ue(() => {
590
- o.modelValue !== null && F(o.modelValue);
589
+ "type" in l && ((l.type === "number" || l.type === "integer") && (l.minimum && (v.min = l.minimum), l.exclusiveMinimum && (v.min = l.exclusiveMinimum + 1), l.maximum && (v.max = l.maximum), l.exclusiveMaximum && (v.max = l.exclusiveMaximum - 1)), l.type === "string" && ((l.format === "date" || l.format === "date-time") && (v.type = !r && l.format === "date-time" ? "datetime-local" : "date"), v.minlength = l.minLength, v.maxlength = l.maxLength)), v.type === "text" && r && (v.type = "search"), Ue(() => {
590
+ a.modelValue !== null && F(a.modelValue);
591
591
  });
592
592
  const g = (w) => {
593
593
  let J;
@@ -597,7 +597,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
597
597
  J = w.toISOString();
598
598
  else
599
599
  return "";
600
- switch (_.type) {
600
+ switch (v.type) {
601
601
  case "date":
602
602
  return J.slice(0, 10);
603
603
  case "datetime-local":
@@ -605,14 +605,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
605
605
  default:
606
606
  throw new Error();
607
607
  }
608
- }, i = K(""), T = o.property?.type === "string" && o.property.mask ? ut(o.property.mask) : null;
609
- ae(() => o.modelValue, (w) => {
608
+ }, i = K(""), T = a.property?.type === "string" && a.property.mask ? ut(a.property.mask) : null;
609
+ ae(() => a.modelValue, (w) => {
610
610
  i.value = (() => {
611
611
  if (T)
612
612
  return w ? T.enmask(String(w), void 0, {
613
613
  defaultValue: !0
614
614
  }) : "";
615
- switch (_.type) {
615
+ switch (v.type) {
616
616
  case "date":
617
617
  case "datetime-local":
618
618
  return g(w);
@@ -628,13 +628,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
628
628
  }, {
629
629
  immediate: !0
630
630
  });
631
- const k = (w) => typeof i.value == "string" && o.property?.type === "string" && T !== null ? (i.value = T.enmask(i.value, void 0, {
631
+ const k = (w) => typeof i.value == "string" && a.property?.type === "string" && T !== null ? (i.value = T.enmask(i.value, void 0, {
632
632
  defaultValue: !0
633
- }), o.property.maskedValue === !0 ? i.value : T.unmask(i.value)) : w, F = (w) => {
633
+ }), a.property.maskedValue === !0 ? i.value : T.unmask(i.value)) : w, F = (w) => {
634
634
  const J = (() => {
635
635
  if (typeof w != "string")
636
636
  return w;
637
- switch (_.type) {
637
+ switch (v.type) {
638
638
  case "number":
639
639
  case "integer":
640
640
  return w === "" ? null : Number(w);
@@ -645,7 +645,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
645
645
  return k(w);
646
646
  }
647
647
  })();
648
- a("input", J), a("update:modelValue", J);
648
+ o("input", J), o("update:modelValue", J);
649
649
  }, I = (w) => {
650
650
  const J = w.target.value;
651
651
  i.value = J, F(J);
@@ -653,27 +653,27 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
653
653
  return (w, J) => {
654
654
  const N = ee("focus"), ue = ee("clickable");
655
655
  return n(), s("label", Jt, [
656
- t(p) ? h("", !0) : (n(), s("div", Zt, [
656
+ t(h) ? b("", !0) : (n(), s("div", Zt, [
657
657
  w.$slots.default ? C(w.$slots, "default", { key: 0 }, void 0, !0) : C(w.$slots, "description", { key: 1 }, void 0, !0)
658
658
  ])),
659
659
  w.$slots.hint ? (n(), s("div", Pt, [
660
660
  C(w.$slots, "hint", {}, void 0, !0)
661
- ])) : h("", !0),
661
+ ])) : b("", !0),
662
662
  "element" in t(l) && t(l).element === "textarea" ? (n(), s("div", {
663
663
  key: 2,
664
664
  class: U([
665
665
  "input__container",
666
666
  "input__container--textarea",
667
- `input__container--${t(b)}`
667
+ `input__container--${t(_)}`
668
668
  ])
669
669
  }, [
670
670
  Y(O("textarea", {
671
- placeholder: t(_).placeholder,
672
- readonly: t(_).readonly,
671
+ placeholder: t(v).placeholder,
672
+ readonly: t(v).readonly,
673
673
  value: e.modelValue,
674
674
  class: U([
675
675
  "input__textarea",
676
- `input__input--${t(b)}`
676
+ `input__input--${t(_)}`
677
677
  ]),
678
678
  onInput: I
679
679
  }, null, 42, Nt), [
@@ -683,38 +683,38 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
683
683
  key: 3,
684
684
  class: U([
685
685
  "input__container",
686
- `input__container--${t(b)}`
686
+ `input__container--${t(_)}`
687
687
  ])
688
688
  }, [
689
- Y(O("input", x(t(_), {
689
+ Y(O("input", x(t(v), {
690
690
  value: i.value,
691
691
  "data-component": "input",
692
692
  class: [
693
693
  "input__input",
694
- `input__input--${t(b)}`,
695
- { "input__input--icon": t(c) },
694
+ `input__input--${t(_)}`,
695
+ { "input__input--icon": t(u) },
696
696
  { "input__input--readOnly": t(d) }
697
697
  ],
698
698
  onInput: I,
699
- onChange: J[0] || (J[0] = (ce) => a("change", ce))
699
+ onChange: J[0] || (J[0] = (ce) => o("change", ce))
700
700
  }), null, 16, en), [
701
701
  [N, t(l).focus]
702
702
  ]),
703
- t(c) ? (n(), $(H, {
703
+ t(u) ? (n(), $(H, {
704
704
  key: 0,
705
705
  icon: t(l).icon || "magnifying-glass",
706
706
  class: U([
707
707
  "input__icon",
708
- `input__icon--${t(b)}`
708
+ `input__icon--${t(_)}`
709
709
  ])
710
- }, null, 8, ["icon", "class"])) : h("", !0),
710
+ }, null, 8, ["icon", "class"])) : b("", !0),
711
711
  t(d) ? (n(), s("div", tn, [
712
712
  L(Xt, null, {
713
713
  text: y(() => [...J[2] || (J[2] = [
714
714
  D("Copiar", -1)
715
715
  ])]),
716
716
  default: y(() => [
717
- f.value ? (n(), $(H, {
717
+ m.value ? (n(), $(H, {
718
718
  key: 0,
719
719
  reactive: "",
720
720
  icon: "check"
@@ -722,14 +722,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
722
722
  key: 1,
723
723
  reactive: "",
724
724
  icon: "clipboard",
725
- onClick: J[1] || (J[1] = Ie((ce) => m(String(e.modelValue || "")), ["prevent"]))
725
+ onClick: J[1] || (J[1] = Ie((ce) => p(String(e.modelValue || "")), ["prevent"]))
726
726
  }, null, 512)), [
727
727
  [ue]
728
728
  ])
729
729
  ]),
730
730
  _: 1
731
731
  })
732
- ])) : h("", !0)
732
+ ])) : b("", !0)
733
733
  ], 2))
734
734
  ]);
735
735
  };
@@ -752,50 +752,50 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
752
752
  noOutline: { type: Boolean }
753
753
  },
754
754
  emits: ["update:modelValue", "change"],
755
- setup(e, { emit: r }) {
756
- const o = e, a = r, l = K(null), c = o.property, u = (m) => {
757
- a("update:modelValue", m), a("change", m);
758
- }, p = (m) => {
759
- m === "" || m === null ? u(null) : o.booleanRef ? u(m === "true") : u(m);
760
- }, d = (m) => Array.isArray(o.modelValue) ? o.modelValue.includes(m) : o.modelValue === m, f = G(() => o.multiple ? typeof o.multiple == "number" ? o.multiple : 5 : 1);
761
- return ae(l, (m) => {
762
- if (m && o.required && !o.modelValue) {
763
- const b = m.querySelector("option")?.value;
764
- b && a("update:modelValue", b);
755
+ setup(e, { emit: c }) {
756
+ const a = e, o = c, l = K(null), u = a.property, r = (p) => {
757
+ o("update:modelValue", p), o("change", p);
758
+ }, h = (p) => {
759
+ p === "" || p === null ? r(null) : a.booleanRef ? r(p === "true") : r(p);
760
+ }, d = (p) => Array.isArray(a.modelValue) ? a.modelValue.includes(p) : a.modelValue === p, m = G(() => a.multiple ? typeof a.multiple == "number" ? a.multiple : 5 : 1);
761
+ return ae(l, (p) => {
762
+ if (p && a.required && !a.modelValue) {
763
+ const _ = p.querySelector("option")?.value;
764
+ _ && o("update:modelValue", _);
765
765
  }
766
- }), o.multiple && ae(() => o.modelValue, (m) => {
766
+ }), a.multiple && ae(() => a.modelValue, (p) => {
767
767
  if (!l.value)
768
768
  return;
769
- const b = l.value.querySelector('option[data-selected="true"]');
770
- b && b.removeAttribute("data-selected"), l.value.querySelector(`option[value="${m}"]`)?.setAttribute("data-selected", "true");
771
- }), (m, b) => e.readOnly ? (n(), $(_e, {
769
+ const _ = l.value.querySelector('option[data-selected="true"]');
770
+ _ && _.removeAttribute("data-selected"), l.value.querySelector(`option[value="${p}"]`)?.setAttribute("data-selected", "true");
771
+ }), (p, _) => e.readOnly ? (n(), $(_e, {
772
772
  key: 1,
773
773
  "read-only": "",
774
774
  "model-value": e.modelValue
775
775
  }, null, 8, ["model-value"])) : (n(), s("select", x({ key: 0 }, {
776
- size: f.value,
776
+ size: m.value,
777
777
  value: e.modelValue
778
778
  }, {
779
779
  ref_key: "select",
780
780
  ref: l,
781
781
  class: {
782
782
  select: !0,
783
- "select--multiple": !!f.value,
783
+ "select--multiple": !!m.value,
784
784
  "select--outline": !e.noOutline
785
785
  },
786
- onChange: b[0] || (b[0] = (_) => p(_.target.value))
786
+ onChange: _[0] || (_[0] = (v) => h(v.target.value))
787
787
  }), [
788
- t(c) && t(c).icon ? (n(), $(H, {
788
+ t(u) && t(u).icon ? (n(), $(H, {
789
789
  key: 0,
790
- icon: t(c).icon
791
- }, null, 8, ["icon"])) : h("", !0),
792
- !o.multiple && !e.required ? (n(), s("option", an, V(t(R)("none")), 1)) : h("", !0),
793
- (n(!0), s(W, null, z(t(c) && "enum" in t(c) ? t(c).enum : [], (_) => (n(), s("option", {
794
- key: String(_),
795
- value: _,
796
- "data-selected": d(_)
797
- }, V(t(c)?.translate && typeof _ == "string" ? t(R)(_) : _), 9, on))), 128)),
798
- C(m.$slots, "default", {}, void 0, !0)
790
+ icon: t(u).icon
791
+ }, null, 8, ["icon"])) : b("", !0),
792
+ !a.multiple && !e.required ? (n(), s("option", an, V(t(R)("none")), 1)) : b("", !0),
793
+ (n(!0), s(W, null, z(t(u) && "enum" in t(u) ? t(u).enum : [], (v) => (n(), s("option", {
794
+ key: String(v),
795
+ value: v,
796
+ "data-selected": d(v)
797
+ }, V(t(u)?.translate && typeof v == "string" ? t(R)(v) : v), 9, on))), 128)),
798
+ C(p.$slots, "default", {}, void 0, !0)
799
799
  ], 16));
800
800
  }
801
801
  }), Qe = /* @__PURE__ */ E(ln, [["__scopeId", "data-v-6294bdce"]]), sn = { class: "pagination" }, rn = { class: "pagination__arrows" }, un = ["value"], cn = {
@@ -808,31 +808,31 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
808
808
  noSummary: { type: Boolean }
809
809
  },
810
810
  emits: ["paginate"],
811
- setup(e, { emit: r }) {
812
- const o = e, a = r, l = G({
813
- get: () => Math.floor(o.pagination.offset / o.pagination.limit),
811
+ setup(e, { emit: c }) {
812
+ const a = e, o = c, l = G({
813
+ get: () => Math.floor(a.pagination.offset / a.pagination.limit),
814
814
  set: (d) => {
815
- o.pagination.offset = d * o.pagination.limit;
815
+ a.pagination.offset = d * a.pagination.limit;
816
816
  }
817
- }), c = G({
818
- get: () => o.pagination.limit,
817
+ }), u = G({
818
+ get: () => a.pagination.limit,
819
819
  set: (d) => {
820
- o.pagination.limit = Number(d);
820
+ a.pagination.limit = Number(d);
821
821
  }
822
- }), u = K(l.value ? l.value + 1 : 1), p = G(() => Math.ceil(o.pagination.recordsTotal / o.pagination.limit));
822
+ }), r = K(l.value ? l.value + 1 : 1), h = G(() => Math.ceil(a.pagination.recordsTotal / a.pagination.limit));
823
823
  return ae([
824
824
  l,
825
- c
825
+ u
826
826
  ], ([d]) => {
827
- u.value = d + 1, a("paginate", {
828
- offset: l.value * c.value,
829
- limit: c.value
827
+ r.value = d + 1, o("paginate", {
828
+ offset: l.value * u.value,
829
+ limit: u.value
830
830
  });
831
- }), (d, f) => (n(), s("div", sn, [
831
+ }), (d, m) => (n(), s("div", sn, [
832
832
  O("div", rn, [
833
833
  L(de, {
834
834
  disabled: l.value === 0,
835
- onClick: f[0] || (f[0] = (m) => l.value = 0)
835
+ onClick: m[0] || (m[0] = (p) => l.value = 0)
836
836
  }, {
837
837
  default: y(() => [
838
838
  L(H, { icon: "caret-double-left" })
@@ -841,7 +841,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
841
841
  }, 8, ["disabled"]),
842
842
  L(de, {
843
843
  disabled: l.value === 0,
844
- onClick: f[1] || (f[1] = (m) => l.value -= 1)
844
+ onClick: m[1] || (m[1] = (p) => l.value -= 1)
845
845
  }, {
846
846
  default: y(() => [
847
847
  L(H, { icon: "caret-left" })
@@ -849,8 +849,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
849
849
  _: 1
850
850
  }, 8, ["disabled"]),
851
851
  L(de, {
852
- disabled: l.value === p.value - 1,
853
- onClick: f[2] || (f[2] = (m) => l.value += 1)
852
+ disabled: l.value === h.value - 1,
853
+ onClick: m[2] || (m[2] = (p) => l.value += 1)
854
854
  }, {
855
855
  default: y(() => [
856
856
  L(H, { icon: "caret-right" })
@@ -858,8 +858,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
858
858
  _: 1
859
859
  }, 8, ["disabled"]),
860
860
  L(de, {
861
- disabled: l.value === p.value - 1,
862
- onClick: f[3] || (f[3] = (m) => l.value = p.value - 1)
861
+ disabled: l.value === h.value - 1,
862
+ onClick: m[3] || (m[3] = (p) => l.value = h.value - 1)
863
863
  }, {
864
864
  default: y(() => [
865
865
  L(H, { icon: "caret-double-right" })
@@ -867,8 +867,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
867
867
  _: 1
868
868
  }, 8, ["disabled"]),
869
869
  L(Qe, {
870
- modelValue: c.value,
871
- "onUpdate:modelValue": f[4] || (f[4] = (m) => c.value = m),
870
+ modelValue: u.value,
871
+ "onUpdate:modelValue": m[4] || (m[4] = (p) => u.value = p),
872
872
  property: {
873
873
  enum: [],
874
874
  icon: "list"
@@ -876,30 +876,30 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
876
876
  class: "pagination__control"
877
877
  }, {
878
878
  default: y(() => [
879
- (n(!0), s(W, null, z(t(ct), (m) => (n(), s("option", {
880
- key: `limit-${m}`,
881
- value: m
882
- }, V(m), 9, un))), 128))
879
+ (n(!0), s(W, null, z(t(ct), (p) => (n(), s("option", {
880
+ key: `limit-${p}`,
881
+ value: p
882
+ }, V(p), 9, un))), 128))
883
883
  ]),
884
884
  _: 1
885
885
  }, 8, ["modelValue"])
886
886
  ]),
887
- e.noSummary ? h("", !0) : (n(), s("div", cn, [
887
+ e.noSummary ? b("", !0) : (n(), s("div", cn, [
888
888
  D(V(t(R)("Page")) + " ", 1),
889
889
  (n(), $(_e, {
890
890
  key: l.value,
891
- modelValue: u.value,
892
- "onUpdate:modelValue": f[5] || (f[5] = (m) => u.value = m),
891
+ modelValue: r.value,
892
+ "onUpdate:modelValue": m[5] || (m[5] = (p) => r.value = p),
893
893
  property: {
894
894
  type: "number",
895
895
  minimum: 1
896
896
  },
897
897
  style: { height: "100%" },
898
- onChange: f[6] || (f[6] = (m) => {
899
- l.value = u.value === 0 ? 0 : u.value - 1;
898
+ onChange: m[6] || (m[6] = (p) => {
899
+ l.value = r.value === 0 ? 0 : r.value - 1;
900
900
  })
901
901
  }, null, 8, ["modelValue"])),
902
- O("span", null, V(t(R)("of")) + " " + V(p.value), 1)
902
+ O("span", null, V(t(R)("of")) + " " + V(h.value), 1)
903
903
  ]))
904
904
  ]));
905
905
  }
@@ -920,49 +920,49 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
920
920
  variant: {}
921
921
  },
922
922
  emits: ["update:modelValue", "change"],
923
- setup(e, { emit: r }) {
924
- const o = e, a = o.property, l = o.readOnly || a?.readOnly, c = (() => {
925
- if (a && "type" in a)
926
- switch (a.type) {
923
+ setup(e, { emit: c }) {
924
+ const a = e, o = a.property, l = a.readOnly || o?.readOnly, u = (() => {
925
+ if (o && "type" in o)
926
+ switch (o.type) {
927
927
  case "array":
928
928
  case "boolean":
929
929
  return "checkbox";
930
930
  }
931
931
  return "radio";
932
- })(), u = r, p = o.value || !1, d = G({
932
+ })(), r = c, h = a.value || !1, d = G({
933
933
  get: () => {
934
- if (a) {
935
- if ("type" in a && a.type === "boolean")
936
- return !!o.value;
937
- if ("items" in a)
938
- return o.modelValue?.includes(o.value);
934
+ if (o) {
935
+ if ("type" in o && o.type === "boolean")
936
+ return !!a.value;
937
+ if ("items" in o)
938
+ return a.modelValue?.includes(a.value);
939
939
  }
940
- return o.modelValue === o.value;
940
+ return a.modelValue === a.value;
941
941
  },
942
942
  set: () => {
943
943
  if (!l) {
944
- if (a) {
945
- if ("type" in a && a.type === "boolean") {
946
- u("update:modelValue", !o.modelValue);
944
+ if (o) {
945
+ if ("type" in o && o.type === "boolean") {
946
+ r("update:modelValue", !a.modelValue);
947
947
  return;
948
948
  }
949
- if ("items" in a) {
950
- if (o.modelValue?.includes(p)) {
951
- u("update:modelValue", o.modelValue.filter((m) => m !== p));
949
+ if ("items" in o) {
950
+ if (a.modelValue?.includes(h)) {
951
+ r("update:modelValue", a.modelValue.filter((p) => p !== h));
952
952
  return;
953
953
  }
954
- u("update:modelValue", [p].concat(o.modelValue || []));
954
+ r("update:modelValue", [h].concat(a.modelValue || []));
955
955
  return;
956
956
  }
957
957
  }
958
- u("update:modelValue", o.value);
958
+ r("update:modelValue", a.value);
959
959
  }
960
960
  }
961
- }), f = (m) => {
962
- l && m.preventDefault();
961
+ }), m = (p) => {
962
+ l && p.preventDefault();
963
963
  };
964
- return (m, b) => {
965
- const _ = ee("clickable");
964
+ return (p, _) => {
965
+ const v = ee("clickable");
966
966
  return Y((n(), s("label", {
967
967
  class: U([
968
968
  "checkbox",
@@ -970,33 +970,33 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
970
970
  ])
971
971
  }, [
972
972
  Y(O("input", x({
973
- "onUpdate:modelValue": b[0] || (b[0] = (g) => d.value = g)
973
+ "onUpdate:modelValue": _[0] || (_[0] = (g) => d.value = g)
974
974
  }, {
975
- type: t(c),
975
+ type: t(u),
976
976
  readOnly: t(l),
977
977
  checked: d.value
978
978
  }, {
979
979
  class: "checkbox__input",
980
- onClick: f
980
+ onClick: m
981
981
  }), null, 16), [
982
982
  [et, d.value]
983
983
  ]),
984
984
  O("div", pn, [
985
985
  O("div", null, [
986
- m.$slots.description ? C(m.$slots, "description", { key: 0 }, void 0, !0) : t(p) ? (n(), s("div", {
986
+ p.$slots.description ? C(p.$slots, "description", { key: 0 }, void 0, !0) : t(h) ? (n(), s("div", {
987
987
  key: 1,
988
- innerHTML: t(a)?.translate && typeof t(p) == "string" ? t(R)(t(p)) : t(p)
989
- }, null, 8, fn)) : C(m.$slots, "default", { key: 2 }, void 0, !0)
988
+ innerHTML: t(o)?.translate && typeof t(h) == "string" ? t(R)(t(h)) : t(h)
989
+ }, null, 8, fn)) : C(p.$slots, "default", { key: 2 }, void 0, !0)
990
990
  ]),
991
991
  O("div", vn, [
992
- m.$slots.hint ? C(m.$slots, "hint", { key: 0 }, void 0, !0) : t(a)?.hint ? (n(), s("div", {
992
+ p.$slots.hint ? C(p.$slots, "hint", { key: 0 }, void 0, !0) : t(o)?.hint ? (n(), s("div", {
993
993
  key: 1,
994
- innerHTML: t(a).hint
995
- }, null, 8, yn)) : h("", !0)
994
+ innerHTML: t(o).hint
995
+ }, null, 8, yn)) : b("", !0)
996
996
  ])
997
997
  ])
998
998
  ], 2)), [
999
- [_]
999
+ [v]
1000
1000
  ]);
1001
1001
  };
1002
1002
  }
@@ -1016,33 +1016,33 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1016
1016
  columns: { default: 1 }
1017
1017
  },
1018
1018
  emits: ["update:modelValue"],
1019
- setup(e, { emit: r }) {
1020
- const o = e, a = r, l = o.readOnly || o.property.readOnly, c = "items" in o.property ? o.property.items.enum : o.property.enum, u = (p) => {
1021
- a("update:modelValue", p);
1019
+ setup(e, { emit: c }) {
1020
+ const a = e, o = c, l = a.readOnly || a.property.readOnly, u = "items" in a.property ? a.property.items.enum : a.property.enum, r = (h) => {
1021
+ o("update:modelValue", h);
1022
1022
  };
1023
1023
  return Xe(() => {
1024
- o.modelValue || a(
1024
+ a.modelValue || o(
1025
1025
  "update:modelValue",
1026
- "items" in o.property ? [] : ""
1026
+ "items" in a.property ? [] : ""
1027
1027
  );
1028
- }), (p, d) => (n(), s("div", {
1028
+ }), (h, d) => (n(), s("div", {
1029
1029
  class: "options",
1030
1030
  style: ve({
1031
1031
  "--columns": e.columns,
1032
1032
  "grid-template-columns": "repeat(var(--columns), 1fr)"
1033
1033
  })
1034
1034
  }, [
1035
- (n(!0), s(W, null, z(t(c), (f) => (n(), s("div", {
1036
- key: `option-${f}`,
1035
+ (n(!0), s(W, null, z(t(u), (m) => (n(), s("div", {
1036
+ key: `option-${m}`,
1037
1037
  class: "options__checkbox"
1038
1038
  }, [
1039
1039
  L(_n, x({ ref_for: !0 }, {
1040
- value: f,
1040
+ value: m,
1041
1041
  readOnly: t(l),
1042
1042
  property: e.property
1043
1043
  }, {
1044
1044
  "model-value": e.modelValue,
1045
- "onUpdate:modelValue": u
1045
+ "onUpdate:modelValue": r
1046
1046
  }), null, 16, ["model-value"])
1047
1047
  ]))), 128))
1048
1048
  ], 4));
@@ -1062,20 +1062,20 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1062
1062
  required: { type: Boolean }
1063
1063
  },
1064
1064
  emits: ["update:modelValue", "change"],
1065
- setup(e, { emit: r }) {
1066
- const o = e, a = r, l = o.property, c = o.readOnly || l?.readOnly, u = () => {
1067
- c || (a("change", !o.modelValue), a("update:modelValue", !o.modelValue));
1065
+ setup(e, { emit: c }) {
1066
+ const a = e, o = c, l = a.property, u = a.readOnly || l?.readOnly, r = () => {
1067
+ u || (o("change", !a.modelValue), o("update:modelValue", !a.modelValue));
1068
1068
  };
1069
- return (p, d) => {
1070
- const f = ee("clickable");
1069
+ return (h, d) => {
1070
+ const m = ee("clickable");
1071
1071
  return n(), s("div", Vn, [
1072
1072
  Y((n(), s("a", {
1073
1073
  class: U([
1074
1074
  "switch",
1075
1075
  { "switch--active": e.modelValue },
1076
- { "switch--readOnly": t(c) }
1076
+ { "switch--readOnly": t(u) }
1077
1077
  ]),
1078
- onClick: Ie(u, ["stop"])
1078
+ onClick: Ie(r, ["stop"])
1079
1079
  }, [
1080
1080
  d[0] || (d[0] = O("div", { class: "switch__slider" }, null, -1)),
1081
1081
  O("div", {
@@ -1085,11 +1085,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1085
1085
  ])
1086
1086
  }, null, 2)
1087
1087
  ], 2)), [
1088
- [f, {
1089
- blocked: t(c)
1088
+ [m, {
1089
+ blocked: t(u)
1090
1090
  }]
1091
1091
  ]),
1092
- p.$slots.default ? C(p.$slots, "default", { key: 0 }, void 0, !0) : (n(), s("div", Cn, V(t(l)?.description || e.propertyName), 1))
1092
+ h.$slots.default ? C(h.$slots, "default", { key: 0 }, void 0, !0) : (n(), s("div", Cn, V(t(l)?.description || e.propertyName), 1))
1093
1093
  ]);
1094
1094
  };
1095
1095
  }
@@ -1111,37 +1111,37 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1111
1111
  height: { default: "100%" }
1112
1112
  },
1113
1113
  setup(e) {
1114
- const r = e, o = G(() => r.fileId ? `${Je}/file/${r.fileId}/picture` : r.url || r.modelValue), a = K(!1);
1115
- return (l, c) => {
1116
- const u = ee("overlay");
1114
+ const c = e, a = G(() => c.fileId ? `${Je}/file/${c.fileId}/picture` : c.url || c.modelValue), o = K(!1);
1115
+ return (l, u) => {
1116
+ const r = ee("overlay");
1117
1117
  return n(), s("figure", Bn, [
1118
- o.value && a.value ? (n(), $(Fe, {
1118
+ a.value && o.value ? (n(), $(Fe, {
1119
1119
  key: 0,
1120
1120
  to: "main"
1121
1121
  }, [
1122
1122
  Y((n(), s("div", Sn, [
1123
1123
  O("img", {
1124
- src: o.value,
1124
+ src: a.value,
1125
1125
  alt: e.alt,
1126
1126
  style: {
1127
1127
  maxHeight: "60vh",
1128
1128
  objectFit: "contain"
1129
1129
  },
1130
- onClick: c[0] || (c[0] = (p) => a.value = !0)
1130
+ onClick: u[0] || (u[0] = (h) => o.value = !0)
1131
1131
  }, null, 8, wn),
1132
- e.meta?.owner ? (n(), s("div", Tn, V(l.t("created_by")) + " " + V(e.meta.owner.name) + " em " + V(l.formatDateTime(e.meta.created_at, { hours: !0 })), 1)) : h("", !0)
1132
+ e.meta?.owner ? (n(), s("div", Tn, V(l.t("created_by")) + " " + V(e.meta.owner.name) + " em " + V(l.formatDateTime(e.meta.created_at, { hours: !0 })), 1)) : b("", !0)
1133
1133
  ])), [
1134
- [u, {
1134
+ [r, {
1135
1135
  layer: 60,
1136
1136
  click: () => {
1137
- a.value = !1;
1137
+ o.value = !1;
1138
1138
  }
1139
1139
  }]
1140
1140
  ])
1141
- ])) : h("", !0),
1142
- o.value ? (n(), s("img", {
1141
+ ])) : b("", !0),
1142
+ a.value ? (n(), s("img", {
1143
1143
  key: 1,
1144
- src: o.value,
1144
+ src: a.value,
1145
1145
  class: U([
1146
1146
  "picture__image",
1147
1147
  { "picture__image--bordered": e.bordered },
@@ -1152,8 +1152,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1152
1152
  width: e.width,
1153
1153
  height: e.height
1154
1154
  }),
1155
- onClick: c[1] || (c[1] = () => {
1156
- e.expandable && (a.value = !0);
1155
+ onClick: u[1] || (u[1] = () => {
1156
+ e.expandable && (o.value = !0);
1157
1157
  })
1158
1158
  }, null, 14, jn)) : l.$slots.fallback ? C(l.$slots, "fallback", { key: 2 }, void 0, !0) : l.$slots.default ? C(l.$slots, "default", { key: 3 }, void 0, !0) : (n(), s("svg", {
1159
1159
  key: 4,
@@ -1168,7 +1168,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1168
1168
  width: e.width,
1169
1169
  height: e.height
1170
1170
  })
1171
- }, [...c[2] || (c[2] = [
1171
+ }, [...u[2] || (u[2] = [
1172
1172
  O("line", {
1173
1173
  x1: "0",
1174
1174
  y1: "0",
@@ -1188,7 +1188,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1188
1188
  ])], 6)),
1189
1189
  l.$slots.caption ? (n(), s("figcaption", Rn, [
1190
1190
  C(l.$slots, "caption", {}, void 0, !0)
1191
- ])) : h("", !0)
1191
+ ])) : b("", !0)
1192
1192
  ]);
1193
1193
  };
1194
1194
  }
@@ -1201,39 +1201,39 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1201
1201
  modelValue: {}
1202
1202
  },
1203
1203
  setup(e) {
1204
- const r = e, o = "_id" in r.modelValue ? r.modelValue : r.modelValue.file, a = (l) => {
1205
- const c = l === 0 ? 0 : Math.floor(Math.log(l) / Math.log(1024));
1206
- return `${(l / Math.pow(1024, c)).toFixed(2)} ${[
1204
+ const c = e, a = "_id" in c.modelValue ? c.modelValue : c.modelValue.file, o = (l) => {
1205
+ const u = l === 0 ? 0 : Math.floor(Math.log(l) / Math.log(1024));
1206
+ return `${(l / Math.pow(1024, u)).toFixed(2)} ${[
1207
1207
  "B",
1208
1208
  "kB",
1209
1209
  "MB",
1210
1210
  "GB",
1211
1211
  "TB"
1212
- ][c]}`;
1212
+ ][u]}`;
1213
1213
  };
1214
- return (l, c) => (n(), s("div", Ln, [
1215
- "_id" in t(o) && t(o).type.startsWith("image/") ? (n(), $(Le, {
1214
+ return (l, u) => (n(), s("div", Ln, [
1215
+ "_id" in t(a) && t(a).type.startsWith("image/") ? (n(), $(Le, {
1216
1216
  key: 0,
1217
1217
  bordered: "",
1218
1218
  expandable: "",
1219
- alt: t(o).name,
1220
- url: t(o).link,
1219
+ alt: t(a).name,
1220
+ url: t(a).link,
1221
1221
  class: "item__picture"
1222
- }, null, 8, ["alt", "url"])) : h("", !0),
1222
+ }, null, 8, ["alt", "url"])) : b("", !0),
1223
1223
  O("div", xn, [
1224
- "_id" in t(o) ? (n(), $(H, {
1224
+ "_id" in t(a) ? (n(), $(H, {
1225
1225
  key: 0,
1226
1226
  icon: "arrow-square-out",
1227
- href: t(o).link,
1227
+ href: t(a).link,
1228
1228
  target: "_blank",
1229
1229
  class: "item__name item__name--link"
1230
1230
  }, {
1231
1231
  default: y(() => [
1232
- D(V(t(o).name), 1)
1232
+ D(V(t(a).name), 1)
1233
1233
  ]),
1234
1234
  _: 1
1235
- }, 8, ["href"])) : (n(), s("div", Mn, V(t(o).name), 1)),
1236
- O("div", zn, V(a(t(o).size)), 1)
1235
+ }, 8, ["href"])) : (n(), s("div", Mn, V(t(a).name), 1)),
1236
+ O("div", zn, V(o(t(a).size)), 1)
1237
1237
  ]),
1238
1238
  O("div", null, [
1239
1239
  C(l.$slots, "default", {}, void 0, !0)
@@ -1258,22 +1258,22 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1258
1258
  multiple: { type: Boolean }
1259
1259
  },
1260
1260
  emits: ["update:content", "change", "update:modelValue"],
1261
- setup(e, { emit: r }) {
1262
- const o = e, a = o.property && se(o.property), l = r, u = we() ? xe() : null, p = o.multiple || o.property && "type" in o.property && o.property.type === "array", d = G(() => {
1263
- if (o.modelValue)
1264
- return Array.isArray(o.modelValue) ? o.modelValue : [o.modelValue];
1265
- }), f = (_) => new Promise((g) => {
1261
+ setup(e, { emit: c }) {
1262
+ const a = e, o = a.property && se(a.property), l = c, r = we() ? xe() : null, h = a.multiple || a.property && "type" in a.property && a.property.type === "array", d = G(() => {
1263
+ if (a.modelValue)
1264
+ return Array.isArray(a.modelValue) ? a.modelValue : [a.modelValue];
1265
+ }), m = (v) => new Promise((g) => {
1266
1266
  const i = new FileReader();
1267
- i.onload = () => g(i.result), i.readAsArrayBuffer(_);
1268
- }), m = async (_) => {
1269
- const g = _.target.files;
1267
+ i.onload = () => g(i.result), i.readAsArrayBuffer(v);
1268
+ }), p = async (v) => {
1269
+ const g = v.target.files;
1270
1270
  if (!g)
1271
1271
  return;
1272
1272
  const i = [];
1273
1273
  for (const T of g) {
1274
- const k = await f(T);
1275
- if (u) {
1276
- const { data: { error: F, result: I } } = await dt(`${Je}/${u.$id}/upload?name=${T.name}`, k, {
1274
+ const k = await m(T);
1275
+ if (r) {
1276
+ const { data: { error: F, result: I } } = await dt(`${Je}/${r.$id}/upload?name=${T.name}`, k, {
1277
1277
  params: {
1278
1278
  method: "POST",
1279
1279
  headers: {
@@ -1293,23 +1293,23 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1293
1293
  file: T
1294
1294
  });
1295
1295
  }
1296
- p ? l("update:modelValue", Array.isArray(o.modelValue) ? i.concat(o.modelValue) : i) : l("update:modelValue", i[0]), l("update:content", i), l("change", i);
1297
- }, b = async (_) => {
1298
- if (!o.modelValue)
1296
+ h ? l("update:modelValue", Array.isArray(a.modelValue) ? i.concat(a.modelValue) : i) : l("update:modelValue", i[0]), l("update:content", i), l("change", i);
1297
+ }, _ = async (v) => {
1298
+ if (!a.modelValue)
1299
1299
  throw new Error();
1300
- const g = Array.isArray(o.modelValue) ? o.modelValue.filter((i, T) => T !== _) : [];
1301
- p ? l("update:modelValue", g) : l("update:modelValue", null), l("update:content", g), l("change", g);
1300
+ const g = Array.isArray(a.modelValue) ? a.modelValue.filter((i, T) => T !== v) : [];
1301
+ h ? l("update:modelValue", g) : l("update:modelValue", null), l("update:content", g), l("change", g);
1302
1302
  };
1303
- return (_, g) => {
1303
+ return (v, g) => {
1304
1304
  const i = ee("clickable");
1305
1305
  return n(), s("div", Un, [
1306
- e.readOnly ? h("", !0) : (n(), s("input", {
1306
+ e.readOnly ? b("", !0) : (n(), s("input", {
1307
1307
  key: 0,
1308
1308
  ref: "file",
1309
1309
  type: "file",
1310
- accept: t(a)?.accept?.join(","),
1311
- multiple: t(p),
1312
- onChange: m
1310
+ accept: t(o)?.accept?.join(","),
1311
+ multiple: t(h),
1312
+ onChange: p
1313
1313
  }, null, 40, Hn)),
1314
1314
  d.value && d.value.length > 0 ? (n(), s("div", Dn, [
1315
1315
  (n(!0), s(W, null, z(d.value, (T, k) => (n(), $(Fn, {
@@ -1317,18 +1317,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1317
1317
  "model-value": T
1318
1318
  }, {
1319
1319
  default: y(() => [
1320
- e.readOnly ? h("", !0) : Y((n(), $(H, {
1320
+ e.readOnly ? b("", !0) : Y((n(), $(H, {
1321
1321
  key: 0,
1322
1322
  reactive: "",
1323
1323
  icon: "trash",
1324
- onClick: (F) => b(k)
1324
+ onClick: (F) => _(k)
1325
1325
  }, null, 8, ["onClick"])), [
1326
1326
  [i]
1327
1327
  ])
1328
1328
  ]),
1329
1329
  _: 2
1330
1330
  }, 1032, ["model-value"]))), 128))
1331
- ])) : h("", !0)
1331
+ ])) : b("", !0)
1332
1332
  ]);
1333
1333
  };
1334
1334
  }
@@ -1341,24 +1341,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1341
1341
  observeScroll: { type: Boolean }
1342
1342
  },
1343
1343
  emits: ["endReached"],
1344
- setup(e, { emit: r }) {
1345
- const o = e, a = r, l = K(null), c = o.observeScroll ? He(l, {
1344
+ setup(e, { emit: c }) {
1345
+ const a = e, o = c, l = K(null), u = a.observeScroll ? He(l, {
1346
1346
  antecipate: 100
1347
1347
  }).reachedEnd : null;
1348
- return c !== null && ae(c, (u) => {
1349
- u && a("endReached", u);
1350
- }), (u, p) => (n(), s("div", Wn, [
1351
- u.$slots.default ? (n(), s("div", {
1348
+ return u !== null && ae(u, (r) => {
1349
+ r && o("endReached", r);
1350
+ }), (r, h) => (n(), s("div", Wn, [
1351
+ r.$slots.default ? (n(), s("div", {
1352
1352
  key: 0,
1353
1353
  ref_key: "containerEl",
1354
1354
  ref: l,
1355
1355
  class: "container__content"
1356
1356
  }, [
1357
- C(u.$slots, "default", {}, void 0, !0)
1358
- ], 512)) : h("", !0),
1359
- u.$slots.footer ? (n(), s("div", Yn, [
1360
- C(u.$slots, "footer", {}, void 0, !0)
1361
- ])) : h("", !0)
1357
+ C(r.$slots, "default", {}, void 0, !0)
1358
+ ], 512)) : b("", !0),
1359
+ r.$slots.footer ? (n(), s("div", Yn, [
1360
+ C(r.$slots, "footer", {}, void 0, !0)
1361
+ ])) : b("", !0)
1362
1362
  ]));
1363
1363
  }
1364
1364
  }), Ge = /* @__PURE__ */ E(Kn, [["__scopeId", "data-v-c86e2d2a"]]), Xn = { class: "item__values" }, Jn = /* @__PURE__ */ M({
@@ -1371,41 +1371,41 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1371
1371
  readOnly: { type: Boolean }
1372
1372
  },
1373
1373
  emits: ["update:modelValue", "change"],
1374
- setup(e, { emit: r }) {
1375
- const o = Ce(), a = e, l = r, c = a.property, u = se(c);
1374
+ setup(e, { emit: c }) {
1375
+ const a = Ce(), o = e, l = c, u = o.property, r = se(u);
1376
1376
  xe();
1377
- const p = G(() => a.modelValue ? Array.isArray(a.modelValue) ? Array.isArray(a.modelValue) && Object.values(a.modelValue).some(({ _id: b }) => a.item._id === b) : a.modelValue._id === a.item._id : !1), d = () => {
1378
- if (p.value)
1377
+ const h = G(() => o.modelValue ? Array.isArray(o.modelValue) ? Array.isArray(o.modelValue) && Object.values(o.modelValue).some(({ _id: _ }) => o.item._id === _) : o.modelValue._id === o.item._id : !1), d = () => {
1378
+ if (h.value)
1379
1379
  return;
1380
- const b = (g) => g.filter((i) => !!i._id);
1381
- let _;
1382
- "items" in c ? a.modelValue ? _ = b(Array.isArray(a.modelValue) ? a.modelValue : [a.modelValue]) : _ = [] : _ = a.modelValue, Array.isArray(_) ? l("update:modelValue", _.concat([a.item])) : l("update:modelValue", a.item), l("change", a.item);
1383
- }, f = async (b) => {
1384
- u.purge && b?.purge;
1385
- const _ = () => {
1386
- const g = Array.isArray(a.modelValue) ? Array.from(a.modelValue) : [], i = g.findIndex((T) => T._id === a.item._id);
1380
+ const _ = (g) => g.filter((i) => !!i._id);
1381
+ let v;
1382
+ "items" in u ? o.modelValue ? v = _(Array.isArray(o.modelValue) ? o.modelValue : [o.modelValue]) : v = [] : v = o.modelValue, Array.isArray(v) ? l("update:modelValue", v.concat([o.item])) : l("update:modelValue", o.item), l("change", o.item);
1383
+ }, m = async (_) => {
1384
+ r.purge && _?.purge;
1385
+ const v = () => {
1386
+ const g = Array.isArray(o.modelValue) ? Array.from(o.modelValue) : [], i = g.findIndex((T) => T._id === o.item._id);
1387
1387
  return g.splice(i, 1), g;
1388
1388
  };
1389
- l("update:modelValue", "items" in c ? _() : null);
1390
- }, m = () => {
1391
- if (a.readOnly) {
1392
- o.push({
1393
- path: `/dashboard/c/${u.$ref}/${a.item._id}`
1389
+ l("update:modelValue", "items" in u ? v() : null);
1390
+ }, p = () => {
1391
+ if (o.readOnly) {
1392
+ a.push({
1393
+ path: `/dashboard/c/${r.$ref}/${o.item._id}`
1394
1394
  });
1395
1395
  return;
1396
1396
  }
1397
- return p.value ? f() : d();
1397
+ return h.value ? m() : d();
1398
1398
  };
1399
- return (b, _) => {
1399
+ return (_, v) => {
1400
1400
  const g = ee("clickable");
1401
1401
  return Y((n(), s("div", {
1402
1402
  class: U({
1403
1403
  item: !0,
1404
- "item--selected": p.value
1404
+ "item--selected": h.value
1405
1405
  }),
1406
- onClick: m
1406
+ onClick: p
1407
1407
  }, [
1408
- C(b.$slots, "default", {}, void 0, !0),
1408
+ C(_.$slots, "default", {}, void 0, !0),
1409
1409
  O("div", Xn, [
1410
1410
  (n(!0), s(W, null, z(e.indexes, (i, T) => (n(), s("div", {
1411
1411
  key: `index-${e.item._id}-${T}`,
@@ -1416,7 +1416,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1416
1416
  key: 0,
1417
1417
  icon: "arrow-square-out",
1418
1418
  style: { "--icon-color": "var(--theme-brand-color-contrast)" }
1419
- })) : h("", !0)
1419
+ })) : b("", !0)
1420
1420
  ], 2)), [
1421
1421
  [g]
1422
1422
  ]);
@@ -1439,26 +1439,26 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1439
1439
  panel: { default: void 0 }
1440
1440
  },
1441
1441
  emits: ["update:modelValue", "change", "update:panel"],
1442
- setup(e, { emit: r }) {
1443
- const o = e, a = ne("meta"), l = se(o.property), c = o.panel !== void 0 ? G(() => o.panel) : K(!1), u = r, p = ne(se(o.property).$ref), d = we(), f = d ? xe() : null, m = l.indexes;
1444
- fe(Te, se(o.property).$ref), fe("innerInputLabel", !0), fe("omitInputLabels", !0);
1445
- const b = K(o.modelValue), _ = K({
1442
+ setup(e, { emit: c }) {
1443
+ const a = e, o = ne("meta"), l = se(a.property), u = a.panel !== void 0 ? G(() => a.panel) : K(!1), r = c, h = ne(se(a.property).$ref), d = we(), m = d ? xe() : null, p = l.indexes;
1444
+ fe(Te, se(a.property).$ref), fe("innerInputLabel", !0), fe("omitInputLabels", !0);
1445
+ const _ = K(a.modelValue), v = K({
1446
1446
  data: [],
1447
1447
  pagination: {}
1448
- }), g = G(() => _.value.data), i = G(() => _.value.pagination), T = K(0), k = K(!1), F = K(""), I = () => {
1448
+ }), g = G(() => v.value.data), i = G(() => v.value.pagination), T = K(0), k = K(!1), F = K(""), I = () => {
1449
1449
  const Z = {};
1450
1450
  if (d) {
1451
1451
  const P = t(d);
1452
- Z[P] = f;
1452
+ Z[P] = m;
1453
1453
  }
1454
1454
  return l.constraints ? ht(l.constraints, Z) : {};
1455
1455
  }, w = () => {
1456
1456
  g.value.length < i.value.recordsTotal && (T.value += 1, N());
1457
- }, J = async () => F.value.length === 0 ? p.$actions.custom("getAll", {
1457
+ }, J = async () => F.value.length === 0 ? h.$actions.custom("getAll", {
1458
1458
  limit: Re,
1459
1459
  offset: T.value * Re,
1460
1460
  filters: I()
1461
- }) : p.$actions.custom("getAll", {
1461
+ }) : h.$actions.custom("getAll", {
1462
1462
  limit: Re,
1463
1463
  offset: T.value * Re,
1464
1464
  filters: {
@@ -1469,17 +1469,17 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1469
1469
  ...I()
1470
1470
  }
1471
1471
  }), N = async () => {
1472
- if (p.loading.getAll)
1472
+ if (h.loading.getAll)
1473
1473
  return;
1474
1474
  const { error: Z, result: P } = await J();
1475
1475
  if (Z) {
1476
- a.$actions.spawnToast({
1476
+ o.$actions.spawnToast({
1477
1477
  text: "Request failed",
1478
1478
  icon: "warning"
1479
1479
  });
1480
1480
  return;
1481
1481
  }
1482
- _.value.pagination = P.pagination, T.value === 0 && _.value.data.splice(0), _.value.data.push(...P.data);
1482
+ v.value.pagination = P.pagination, T.value === 0 && v.value.data.splice(0), v.value.data.push(...P.data);
1483
1483
  }, [ue] = Ze({
1484
1484
  delay: 800
1485
1485
  })(() => {
@@ -1487,24 +1487,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1487
1487
  }), ce = () => {
1488
1488
  k.value = !0, ue();
1489
1489
  }, $e = () => {
1490
- "effect" in c ? u("update:panel", !0) : c.value = !0, N();
1490
+ "effect" in u ? r("update:panel", !0) : u.value = !0, N();
1491
1491
  }, me = () => {
1492
- T.value = 0, _.value.data.splice(0), "effect" in c ? u("update:panel", !1) : c.value = !1;
1492
+ T.value = 0, v.value.data.splice(0), "effect" in u ? r("update:panel", !1) : u.value = !1;
1493
1493
  };
1494
1494
  ae(() => F.value.length, (Z, P) => {
1495
1495
  Z && !P && N();
1496
1496
  }), Ue(() => {
1497
- o.selectOnly && N();
1497
+ a.selectOnly && N();
1498
1498
  });
1499
1499
  const A = (Z) => {
1500
- b.value = Z, o.selectOnly || u("update:modelValue", Z);
1500
+ _.value = Z, a.selectOnly || r("update:modelValue", Z);
1501
1501
  }, j = () => {
1502
- me(), u("update:modelValue", b.value);
1502
+ me(), r("update:modelValue", _.value);
1503
1503
  };
1504
1504
  return (Z, P) => {
1505
- const v = ee("clickable");
1505
+ const f = ee("clickable");
1506
1506
  return n(), s("div", null, [
1507
- t(c) ? (n(), $(Fe, {
1507
+ t(u) ? (n(), $(Fe, {
1508
1508
  key: 0,
1509
1509
  to: "main"
1510
1510
  }, [
@@ -1513,7 +1513,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1513
1513
  "close-hint": "",
1514
1514
  title: `${t(R)("action.select", { capitalize: !0 })} ${t(R)(e.propertyName)}`,
1515
1515
  "overlay-layer": 65,
1516
- "model-value": t(c),
1516
+ "model-value": t(u),
1517
1517
  style: { "--panel-max-width": "36rem" },
1518
1518
  onClose: me,
1519
1519
  onOverlayClick: me
@@ -1549,31 +1549,31 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1549
1549
  default: y(() => [
1550
1550
  (n(!0), s(W, null, z(g.value, (B) => (n(), $(ze, x({ ref_for: !0 }, {
1551
1551
  item: B,
1552
- indexes: t(m),
1552
+ indexes: t(p),
1553
1553
  property: e.property
1554
1554
  }, {
1555
1555
  key: `matching-${B._id}`,
1556
- modelValue: b.value,
1557
- "onUpdate:modelValue": P[1] || (P[1] = (X) => b.value = X)
1556
+ modelValue: _.value,
1557
+ "onUpdate:modelValue": P[1] || (P[1] = (X) => _.value = X)
1558
1558
  }), null, 16, ["modelValue"]))), 128))
1559
1559
  ]),
1560
1560
  _: 1
1561
1561
  })) : (n(), s("div", Pn, [
1562
- k.value ? (n(), s("div", Nn, V(t(R)("searching", { capitalize: !0 })) + "... ", 1)) : !t(p).loading.getAll && Object.values(F.value).filter((B) => !!B).length > 0 && !("items" in e.property && e.modelValue?.length || !Array.isArray(e.modelValue) && e.modelValue?._id) ? (n(), s("div", ea, V(t(R)("no_results", { capitalize: !0 })), 1)) : h("", !0)
1562
+ k.value ? (n(), s("div", Nn, V(t(R)("searching", { capitalize: !0 })) + "... ", 1)) : !t(h).loading.getAll && Object.values(F.value).filter((B) => !!B).length > 0 && !("items" in e.property && e.modelValue?.length || !Array.isArray(e.modelValue) && e.modelValue?._id) ? (n(), s("div", ea, V(t(R)("no_results", { capitalize: !0 })), 1)) : b("", !0)
1563
1563
  ]))
1564
1564
  ]),
1565
1565
  O("div", ta, V(t(R)("showing", { capitalize: !0 })) + " " + V(g.value.length) + " " + V(t(R)("of")) + " " + V(i.value.recordsTotal), 1)
1566
1566
  ]),
1567
1567
  _: 1
1568
1568
  }, 8, ["title", "model-value"])
1569
- ])) : h("", !0),
1570
- e.selectOnly ? h("", !0) : (n(), s("div", na, [
1569
+ ])) : b("", !0),
1570
+ e.selectOnly ? b("", !0) : (n(), s("div", na, [
1571
1571
  L(Ge, null, ie({
1572
1572
  default: y(() => [
1573
1573
  "items" in e.property ? (n(), s("div", aa, [
1574
1574
  (n(!0), s(W, null, z(e.modelValue, (B) => (n(), $(ze, x({ ref_for: !0 }, {
1575
1575
  item: B,
1576
- indexes: t(m),
1576
+ indexes: t(p),
1577
1577
  property: e.property,
1578
1578
  readOnly: e.readOnly,
1579
1579
  modelValue: e.modelValue
@@ -1583,11 +1583,11 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1583
1583
  }), null, 16))), 128))
1584
1584
  ])) : e.modelValue?._id ? (n(), $(ze, x({ key: 1 }, {
1585
1585
  item: e.modelValue,
1586
- indexes: t(m),
1586
+ indexes: t(p),
1587
1587
  property: t(l),
1588
1588
  readOnly: e.readOnly,
1589
1589
  modelValue: e.modelValue
1590
- }, { "onUpdate:modelValue": A }), null, 16)) : h("", !0)
1590
+ }, { "onUpdate:modelValue": A }), null, 16)) : b("", !0)
1591
1591
  ]),
1592
1592
  _: 2
1593
1593
  }, [
@@ -1603,7 +1603,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1603
1603
  ]),
1604
1604
  _: 1
1605
1605
  })), [
1606
- [v]
1606
+ [f]
1607
1607
  ])
1608
1608
  ]),
1609
1609
  key: "0"
@@ -1613,8 +1613,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1613
1613
  ]);
1614
1614
  };
1615
1615
  }
1616
- }), la = /* @__PURE__ */ E(oa, [["__scopeId", "data-v-7a35daa0"]]), We = (e, r) => {
1617
- const o = "items" in e ? e.items : e, a = {
1616
+ }), la = /* @__PURE__ */ E(oa, [["__scopeId", "data-v-7a35daa0"]]), We = (e, c) => {
1617
+ const a = "items" in e ? e.items : e, o = {
1618
1618
  options: kn,
1619
1619
  select: Qe,
1620
1620
  switch: In,
@@ -1623,10 +1623,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1623
1623
  input: _e,
1624
1624
  form: Me
1625
1625
  }, l = (() => {
1626
- if ("type" in o) {
1627
- if (o.type === "object")
1626
+ if ("type" in a) {
1627
+ if (a.type === "object")
1628
1628
  return "form";
1629
- if (o.type === "boolean")
1629
+ if (a.type === "boolean")
1630
1630
  return "switch";
1631
1631
  }
1632
1632
  if ("element" in e) {
@@ -1635,20 +1635,20 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1635
1635
  if (e.element === "select")
1636
1636
  return "select";
1637
1637
  }
1638
- const c = se(e);
1639
- return c ? c.inline ? "form" : c.$ref === "file" ? "file" : "search" : "items" in e && e.uniqueItems ? "options" : "enum" in o ? "select" : "input";
1638
+ const u = se(e);
1639
+ return u ? u.inline ? "form" : u.$ref === "file" ? "file" : "search" : "items" in e && e.uniqueItems ? "options" : "enum" in a ? "select" : "input";
1640
1640
  })();
1641
- return r[l] ? r[l] : a[l];
1642
- }, ia = (e, r, o) => {
1641
+ return c[l] ? c[l] : o[l];
1642
+ }, ia = (e, c, a) => {
1643
1643
  e ??= [];
1644
- const a = "items" in r ? r.items : r;
1645
- if ("$ref" in a) {
1646
- const l = ne(a.$ref, o), c = ke(l.$freshItem);
1647
- return e.push(c);
1644
+ const o = "items" in c ? c.items : c;
1645
+ if ("$ref" in o) {
1646
+ const l = ne(o.$ref, a), u = ke(l.$freshItem);
1647
+ return e.push(u);
1648
1648
  }
1649
- return "properties" in a ? e.push(bt(a)) : "type" in a && a.type === "boolean" ? e.push({}) : e.push(null);
1650
- }, sa = (e, r) => {
1651
- e.splice(r, 1);
1649
+ return "properties" in o ? e.push(bt(o)) : "type" in o && o.type === "boolean" ? e.push({}) : e.push(null);
1650
+ }, sa = (e, c) => {
1651
+ e.splice(c, 1);
1652
1652
  }, ra = {
1653
1653
  key: 0,
1654
1654
  class: "form__header"
@@ -1691,57 +1691,57 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1691
1691
  includeReadOnly: { type: Boolean }
1692
1692
  },
1693
1693
  emits: ["update:modelValue", "input", "change", "clipboardCopy"],
1694
- setup(e, { emit: r }) {
1695
- const o = De(), a = e, l = r;
1694
+ setup(e, { emit: c }) {
1695
+ const a = De(), o = e, l = c;
1696
1696
  Xe(() => {
1697
- a.modelValue || l("update:modelValue", a.property && "items" in a.property ? [] : {});
1697
+ o.modelValue || l("update:modelValue", o.property && "items" in o.property ? [] : {});
1698
1698
  });
1699
- const c = a.property && se(a.property), u = c ? c.$ref : a.collection || we();
1700
- let p;
1701
- a.readOnly ? p = a.readOnly : a.property && typeof a.property.readOnly == "boolean" ? p = a.property.readOnly : p = !1;
1702
- const d = u ? ne(t(u)) : null;
1703
- !u && process.env.NODE_ENV !== "production" && console.warn("aeria-form was used without providing storeId or specifying collection prop, some features may not work as intended");
1704
- const f = K(!1), m = G(() => {
1705
- const v = !a.form && a.property ? "type" in a.property && a.property.type === "object" ? "properties" in a.property ? a.property.properties : void 0 : d?.properties : a.form;
1706
- if (!v)
1699
+ const u = o.property && se(o.property), r = u ? u.$ref : o.collection || we();
1700
+ let h;
1701
+ o.readOnly ? h = o.readOnly : o.property && typeof o.property.readOnly == "boolean" ? h = o.property.readOnly : h = !1;
1702
+ const d = r ? ne(t(r)) : null;
1703
+ !r && process.env.NODE_ENV !== "production" && console.warn("aeria-form was used without providing storeId or specifying collection prop, some features may not work as intended");
1704
+ const m = K(!1), p = G(() => {
1705
+ const f = !o.form && o.property ? "type" in o.property && o.property.type === "object" ? "properties" in o.property ? o.property.properties : void 0 : d?.properties : o.form;
1706
+ if (!f)
1707
1707
  return;
1708
1708
  const B = {};
1709
- if (a.includeId && (B._id = {
1709
+ if (o.includeId && (B._id = {
1710
1710
  type: "string",
1711
1711
  readOnly: !0
1712
- }), a.includeTimestamps) {
1712
+ }), o.includeTimestamps) {
1713
1713
  const X = {
1714
1714
  type: "string",
1715
1715
  format: "date-time",
1716
1716
  readOnly: !0,
1717
1717
  isTimestamp: !0
1718
1718
  };
1719
- v.created_at || (B.created_at = X), v.created_at || (B.updated_at = X);
1719
+ f.created_at || (B.created_at = X), f.created_at || (B.updated_at = X);
1720
1720
  }
1721
- return Object.assign(B, v), B;
1722
- }), b = G(() => a.layout || d?.description.formLayout), _ = (v) => {
1723
- const B = re(v, a[v]);
1724
- return a[v] && fe(v, a[v]), B;
1725
- }, g = G(() => a.validationErrors !== null ? a.validationErrors : d?.validationErrors), i = _("formComponents") || {}, T = _("propertyComponents") || {}, k = _("omitFormHeader"), F = _("omitInputLabels"), I = _("innerInputLabel");
1726
- u && fe(Te, u), fe("searchOnly", a.searchOnly);
1727
- const w = (v, B) => {
1728
- if (a.searchOnly || !u || a.includeId && v === "_id" || a.includeTimestamps && B.isTimestamp)
1721
+ return Object.assign(B, f), B;
1722
+ }), _ = G(() => o.layout || d?.description.formLayout), v = (f) => {
1723
+ const B = re(f, o[f]);
1724
+ return o[f] && fe(f, o[f]), B;
1725
+ }, g = G(() => o.validationErrors !== null ? o.validationErrors : d?.validationErrors), i = v("formComponents") || {}, T = v("propertyComponents") || {}, k = v("omitFormHeader"), F = v("omitInputLabels"), I = v("innerInputLabel");
1726
+ r && fe(Te, r), fe("searchOnly", o.searchOnly);
1727
+ const w = (f, B) => {
1728
+ if (o.searchOnly || !r || o.includeId && f === "_id" || o.includeTimestamps && B.isTimestamp)
1729
1729
  return !0;
1730
- const X = a.property && "properties" in a.property ? a.property.form : d?.description?.form;
1731
- return !X || X.includes(v);
1732
- }, N = m.value ? Object.entries(m.value).filter(([v, B]) => w(v, B) && !B.noForm && (!B.readOnly || a.readOnly || a.includeReadOnly)) : null, ue = Se(), ce = {}, $e = (v, B) => {
1733
- const X = [], te = b.value?.fields?.[v];
1730
+ const X = o.property && "properties" in o.property ? o.property.form : d?.description?.form;
1731
+ return !X || X.includes(f);
1732
+ }, N = p.value ? Object.entries(p.value).filter(([f, B]) => w(f, B) && !B.noForm && (!B.readOnly || o.readOnly || o.includeReadOnly)) : null, ue = Se(), ce = {}, $e = (f, B) => {
1733
+ const X = [], te = _.value?.fields?.[f];
1734
1734
  if (!B)
1735
1735
  return;
1736
- if (te?.if && !a.searchOnly) {
1736
+ if (te?.if && !o.searchOnly) {
1737
1737
  const q = qe(
1738
- a.modelValue,
1738
+ o.modelValue,
1739
1739
  te.if
1740
1740
  );
1741
- q.satisfied || (ce[v] && (d ? a.modelValue[v] = typeof d.$freshItem[v] == "object" ? ke(d.$freshItem[v]) : d.$freshItem[v] : a.modelValue[v] = [
1741
+ q.satisfied || (ce[f] && (d ? o.modelValue[f] = typeof d.$freshItem[f] == "object" ? ke(d.$freshItem[f]) : d.$freshItem[f] : o.modelValue[f] = [
1742
1742
  void 0,
1743
1743
  null
1744
- ].includes(a.modelValue[v]) ? null : a.modelValue[v].constructor()), X.push("display: none")), ce[v] = q.satisfied;
1744
+ ].includes(o.modelValue[f]) ? null : o.modelValue[f].constructor()), X.push("display: none")), ce[f] = q.satisfied;
1745
1745
  }
1746
1746
  const S = ue.value.md && te?.span || 6;
1747
1747
  return X.push(`--field-span: ${S}`, "grid-column: span var(--field-span) / span var(--field-span)"), te && (te.verticalSpacing && X.push([
@@ -1753,50 +1753,50 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1753
1753
  "padding: 1rem 0",
1754
1754
  "margin: 1rem 0"
1755
1755
  ])), X.join(";");
1756
- }, me = (v) => v === null || v instanceof Object && !Object.keys(v).length, A = G(() => {
1757
- if (typeof a.required < "u")
1758
- switch (a.required) {
1756
+ }, me = (f) => f === null || f instanceof Object && !Object.keys(f).length, A = G(() => {
1757
+ if (typeof o.required < "u")
1758
+ switch (o.required) {
1759
1759
  case !0:
1760
1760
  return;
1761
1761
  case !1:
1762
1762
  return [];
1763
1763
  default:
1764
- return a.required;
1764
+ return o.required;
1765
1765
  }
1766
- return a.property && "required" in a.property ? a.property.required : a.collection ? d.description.required : void 0;
1766
+ return o.property && "required" in o.property ? o.property.required : o.collection ? d.description.required : void 0;
1767
1767
  }), j = G(() => {
1768
- let v;
1769
- if (a.form)
1770
- v = a.form;
1771
- else if (a.property && "properties" in a.property)
1772
- v = a.property.properties;
1768
+ let f;
1769
+ if (o.form)
1770
+ f = o.form;
1771
+ else if (o.property && "properties" in o.property)
1772
+ f = o.property.properties;
1773
1773
  else
1774
1774
  return !0;
1775
- const { error: B } = _t(a.modelValue, {
1775
+ const { error: B } = _t(o.modelValue, {
1776
1776
  type: "object",
1777
1777
  required: A.value,
1778
- properties: v
1778
+ properties: f
1779
1779
  }, {
1780
1780
  coerce: !0,
1781
1781
  tolerateExtraneous: !0
1782
1782
  });
1783
1783
  return !B;
1784
- }), Z = (v, B) => g.value?.[v] && (typeof g.value[v].index != "number" || g.value[v].index === B) ? g.value[v].errors : null, P = (v) => {
1785
- if (!a.focus || p || v.readOnly)
1784
+ }), Z = (f, B) => g.value?.[f] && (typeof g.value[f].index != "number" || g.value[f].index === B) ? g.value[f].errors : null, P = (f) => {
1785
+ if (!o.focus || h || f.readOnly)
1786
1786
  return !1;
1787
- if (!a.parentPropertyName && !a.parentCollection && !f.value)
1788
- return f.value = !0, !0;
1787
+ if (!o.parentPropertyName && !o.parentCollection && !m.value)
1788
+ return m.value = !0, !0;
1789
1789
  };
1790
- return (v, B) => {
1790
+ return (f, B) => {
1791
1791
  const X = ee("clickable"), te = ee("focus");
1792
1792
  return n(), s("form", {
1793
1793
  class: "form",
1794
1794
  style: ve(`row-gap: ${t(k) ? ".8rem" : "var(--form-internal-gap, 1.6rem);"};`)
1795
1795
  }, [
1796
- v.$slots.header && !t(k) ? (n(), s("header", ra, [
1797
- C(v.$slots, "header", {}, void 0, !0)
1798
- ])) : h("", !0),
1799
- C(v.$slots, "default", {}, void 0, !0),
1796
+ f.$slots.header && !t(k) ? (n(), s("header", ra, [
1797
+ C(f.$slots, "header", {}, void 0, !0)
1798
+ ])) : b("", !0),
1799
+ C(f.$slots, "default", {}, void 0, !0),
1800
1800
  O("fieldset", ua, [
1801
1801
  (n(!0), s(W, null, z(t(N), ([S, q]) => (n(), s("div", {
1802
1802
  key: `field-${S}`,
@@ -1811,19 +1811,19 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1811
1811
  class: U({
1812
1812
  "form__field-label": !0,
1813
1813
  "form__field-label--section": "items" in q ? "properties" in q.items : "properties" in q,
1814
- "form__field-required-hint": e.highlightRequired && !t(p) && !e.searchOnly && (!A.value || t(je)(S, A.value, e.modelValue))
1814
+ "form__field-required-hint": e.highlightRequired && !t(h) && !e.searchOnly && (!A.value || t(je)(S, A.value, e.modelValue))
1815
1815
  })
1816
1816
  }, V(q.description || t(R)(S)), 3),
1817
1817
  q.hint ? (n(), s("div", {
1818
1818
  key: 0,
1819
1819
  innerHTML: q.hint
1820
- }, null, 8, da)) : h("", !0)
1821
- ])) : h("", !0),
1822
- v.$slots[`field-${S}`] ? C(v.$slots, `field-${S}`, x({
1820
+ }, null, 8, da)) : b("", !0)
1821
+ ])) : b("", !0),
1822
+ f.$slots[`field-${S}`] ? C(f.$slots, `field-${S}`, x({
1823
1823
  key: 1,
1824
1824
  ref_for: !0
1825
1825
  }, {
1826
- readOnly: t(p),
1826
+ readOnly: t(h),
1827
1827
  property: q,
1828
1828
  propertyName: S,
1829
1829
  modelValue: e.modelValue
@@ -1832,7 +1832,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1832
1832
  modelValue: e.modelValue[S],
1833
1833
  "onUpdate:modelValue": (Q) => e.modelValue[S] = Q
1834
1834
  }, { ref_for: !0 }, {
1835
- readOnly: t(p),
1835
+ readOnly: t(h),
1836
1836
  property: q,
1837
1837
  propertyName: S,
1838
1838
  required: !e.searchOnly && (!A.value || t(je)(S, A.value, e.modelValue)),
@@ -1879,14 +1879,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1879
1879
  _: 1
1880
1880
  }, 16, ["model-value", "onUpdate:modelValue"])
1881
1881
  ])) : e.modelValue && "items" in q && !q.uniqueItems && (!("$ref" in q.items) || q.items.inline) ? (n(), s("div", ya, [
1882
- t(p) ? h("", !0) : (n(), s("div", ha, [
1882
+ t(h) ? b("", !0) : (n(), s("div", ha, [
1883
1883
  L(le, {
1884
1884
  small: "",
1885
1885
  variant: "alt",
1886
1886
  icon: "plus",
1887
1887
  disabled: !("inline" in q.items && q.items.inline) && (e.modelValue[S]?.length >= q.maxItems || me(e.modelValue[S]?.[e.modelValue[S]?.length - 1])),
1888
1888
  onClick: Ie((Q) => {
1889
- e.modelValue[S] || (e.modelValue[S] = []), t(ia)(e.modelValue[S], q, t(o));
1889
+ e.modelValue[S] || (e.modelValue[S] = []), t(ia)(e.modelValue[S], q, t(a));
1890
1890
  }, ["prevent"])
1891
1891
  }, {
1892
1892
  default: y(() => [
@@ -1900,7 +1900,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1900
1900
  key: `rep-${S}-${t($t)(Q, ge)}`,
1901
1901
  class: "form__array-item"
1902
1902
  }, [
1903
- t(p) ? h("", !0) : Y((n(), $(H, {
1903
+ t(h) ? b("", !0) : Y((n(), $(H, {
1904
1904
  key: 0,
1905
1905
  icon: "trash",
1906
1906
  class: "form__array-remove",
@@ -1917,10 +1917,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1917
1917
  modelValue: e.modelValue[S][ge],
1918
1918
  "onUpdate:modelValue": (ye) => e.modelValue[S][ge] = ye
1919
1919
  }, { ref_for: !0 }, {
1920
- readOnly: t(p),
1920
+ readOnly: t(h),
1921
1921
  property: q.items,
1922
1922
  propertyName: S,
1923
- parentCollection: t(u),
1923
+ parentCollection: t(r),
1924
1924
  parentPropertyName: e.parentPropertyName,
1925
1925
  required: !e.searchOnly && (!A.value || t(je)(S, A.value, e.modelValue)),
1926
1926
  validationErrors: Z(S, ge),
@@ -1930,17 +1930,17 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1930
1930
  onChange: B[3] || (B[3] = (ye) => l("change", ye))
1931
1931
  }), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"]))
1932
1932
  ]))), 128))
1933
- ])) : h("", !0)
1933
+ ])) : b("", !0)
1934
1934
  ])) : e.modelValue ? Y((n(), $(pe(t(We)(q, t(i))), x({
1935
1935
  key: 6,
1936
1936
  modelValue: e.modelValue[S],
1937
1937
  "onUpdate:modelValue": (Q) => e.modelValue[S] = Q
1938
1938
  }, { ref_for: !0 }, {
1939
- readOnly: t(p),
1939
+ readOnly: t(h),
1940
1940
  property: q,
1941
1941
  propertyName: S,
1942
1942
  parentPropertyName: e.parentPropertyName,
1943
- parentCollection: t(u),
1943
+ parentCollection: t(r),
1944
1944
  required: !e.searchOnly && (!A.value || t(je)(S, A.value, e.modelValue)),
1945
1945
  ...q.componentProps || {},
1946
1946
  validationErrors: Z(S)
@@ -1950,84 +1950,84 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
1950
1950
  onClipboardCopy: B[5] || (B[5] = (Q) => l("clipboardCopy", Q))
1951
1951
  }), null, 16, ["modelValue", "onUpdate:modelValue", "onInput"])), [
1952
1952
  [te, P(q)]
1953
- ]) : h("", !0),
1953
+ ]) : b("", !0),
1954
1954
  g.value?.[S] ? (n(), s("div", _a, [
1955
- g.value[S].type ? (n(), s("span", $a, V(t(R)(`validation_error.${g.value[S].type}`)), 1)) : h("", !0),
1956
- g.value[S].detail ? (n(), s("span", ga, V(t(R)(g.value[S].detail)), 1)) : h("", !0)
1957
- ])) : h("", !0)
1955
+ g.value[S].type ? (n(), s("span", $a, V(t(R)(`validation_error.${g.value[S].type}`)), 1)) : b("", !0),
1956
+ g.value[S].detail ? (n(), s("span", ga, V(t(R)(g.value[S].detail)), 1)) : b("", !0)
1957
+ ])) : b("", !0)
1958
1958
  ], 6))), 128))
1959
1959
  ]),
1960
- v.$slots.after ? C(v.$slots, "after", { key: 1 }, void 0, !0) : h("", !0),
1961
- v.$slots.footer ? (n(), s("div", ka, [
1962
- C(v.$slots, "footer", oe(be({
1960
+ f.$slots.after ? C(f.$slots, "after", { key: 1 }, void 0, !0) : b("", !0),
1961
+ f.$slots.footer ? (n(), s("div", ka, [
1962
+ C(f.$slots, "footer", oe(be({
1963
1963
  isInsertReady: j.value
1964
1964
  })), void 0, !0)
1965
- ])) : h("", !0)
1965
+ ])) : b("", !0)
1966
1966
  ], 4);
1967
1967
  };
1968
1968
  }
1969
1969
  }), Me = /* @__PURE__ */ E(Va, [["__scopeId", "data-v-017664ad"]]), Ca = /* @__PURE__ */ M({
1970
1970
  __name: "aeria-filter-panel",
1971
1971
  emits: ["update:modelValue"],
1972
- setup(e, { emit: r }) {
1973
- const o = r, a = xe(), l = Ce(), c = t(re(Te)), u = () => {
1974
- if (a.pagination.offset = 0, a.$actions.filter(), o("update:modelValue", !1), "query" in l.currentRoute && l.currentRoute.query && typeof l.currentRoute.query == "object") {
1975
- const f = l.currentRoute.query;
1976
- for (const m of Object.keys(f))
1977
- m.startsWith(`${c}.`) && delete f[m];
1972
+ setup(e, { emit: c }) {
1973
+ const a = c, o = xe(), l = Ce(), u = t(re(Te)), r = () => {
1974
+ if (o.pagination.offset = 0, o.$actions.filter(), a("update:modelValue", !1), "query" in l.currentRoute && l.currentRoute.query && typeof l.currentRoute.query == "object") {
1975
+ const m = l.currentRoute.query;
1976
+ for (const p of Object.keys(m))
1977
+ p.startsWith(`${u}.`) && delete m[p];
1978
1978
  }
1979
- const { query: p, ...d } = l.currentRoute.value;
1979
+ const { query: h, ...d } = l.currentRoute.value;
1980
1980
  l.push(Be(d, {
1981
- query: mt(a)
1981
+ query: mt(o)
1982
1982
  }));
1983
1983
  };
1984
- return (p, d) => (n(), $(Oe, {
1984
+ return (h, d) => (n(), $(Oe, {
1985
1985
  "close-hint": "",
1986
1986
  "fixed-right": "",
1987
- title: p.t("filter_by", { capitalize: !0 }),
1988
- onClose: d[2] || (d[2] = (f) => o("update:modelValue", !1)),
1989
- onOverlayClick: d[3] || (d[3] = (f) => o("update:modelValue", !1))
1987
+ title: h.t("filter_by", { capitalize: !0 }),
1988
+ onClose: d[2] || (d[2] = (m) => a("update:modelValue", !1)),
1989
+ onOverlayClick: d[3] || (d[3] = (m) => a("update:modelValue", !1))
1990
1990
  }, {
1991
1991
  footer: y(() => [
1992
- t(a).filtersCount > 0 ? (n(), $(le, {
1992
+ t(o).filtersCount > 0 ? (n(), $(le, {
1993
1993
  key: 0,
1994
1994
  variant: "transparent",
1995
- onClick: d[1] || (d[1] = (f) => {
1996
- t(a).$actions.clearFilters(), u(), o("update:modelValue", !1);
1995
+ onClick: d[1] || (d[1] = (m) => {
1996
+ t(o).$actions.clearFilters(), r(), a("update:modelValue", !1);
1997
1997
  })
1998
1998
  }, {
1999
1999
  default: y(() => [
2000
- D(V(p.t("action.clear", { capitalize: !0 })) + " ", 1),
2000
+ D(V(h.t("action.clear", { capitalize: !0 })) + " ", 1),
2001
2001
  L(he, null, {
2002
2002
  default: y(() => [
2003
- D(V(t(a).filtersCount), 1)
2003
+ D(V(t(o).filtersCount), 1)
2004
2004
  ]),
2005
2005
  _: 1
2006
2006
  })
2007
2007
  ]),
2008
2008
  _: 1
2009
- })) : h("", !0),
2009
+ })) : b("", !0),
2010
2010
  L(le, {
2011
2011
  large: "",
2012
2012
  icon: "funnel",
2013
- disabled: !t(a).hasActiveFilters,
2014
- onClick: u
2013
+ disabled: !t(o).hasActiveFilters,
2014
+ onClick: r
2015
2015
  }, {
2016
2016
  default: y(() => [
2017
- D(V(p.t("action.filter", { capitalize: !0 })), 1)
2017
+ D(V(h.t("action.filter", { capitalize: !0 })), 1)
2018
2018
  ]),
2019
2019
  _: 1
2020
2020
  }, 8, ["disabled"])
2021
2021
  ]),
2022
2022
  default: y(() => [
2023
2023
  L(Me, x({
2024
- modelValue: t(a).filters,
2025
- "onUpdate:modelValue": d[0] || (d[0] = (f) => t(a).filters = f)
2024
+ modelValue: t(o).filters,
2025
+ "onUpdate:modelValue": d[0] || (d[0] = (m) => t(o).filters = m)
2026
2026
  }, {
2027
- form: t(a).$actions.useProperties(
2028
- Array.isArray(t(a).description.filters) ? t(a).description.filters : Object.keys(t(a).description.filters)
2027
+ form: t(o).$actions.useProperties(
2028
+ Array.isArray(t(o).description.filters) ? t(o).description.filters : Object.keys(t(o).description.filters)
2029
2029
  ),
2030
- layout: t(a).description.formLayout
2030
+ layout: t(o).description.formLayout
2031
2031
  }, {
2032
2032
  focus: "",
2033
2033
  "search-only": ""
@@ -2051,24 +2051,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2051
2051
  includeTimestamps: { type: Boolean }
2052
2052
  },
2053
2053
  emits: ["update:visible", "update:modelValue", "insert", "cancel"],
2054
- setup(e, { emit: r }) {
2055
- const o = e, a = r, l = ne("meta"), c = o.collection, u = ne(c);
2054
+ setup(e, { emit: c }) {
2055
+ const a = e, o = c, l = ne("meta"), u = a.collection, r = ne(u);
2056
2056
  Ue(() => {
2057
- o.modelValue && u.$actions.setItem(o.modelValue);
2057
+ a.modelValue && r.$actions.setItem(a.modelValue);
2058
2058
  });
2059
- const p = G(() => o.form ? u.$actions.useProperties(o.form) : u.description.form ? u.$actions.useProperties(u.description.form) : u.properties), d = async () => {
2060
- const { error: b, result: _ } = await u.$actions.deepInsert();
2061
- if (b) {
2062
- if ("code" in b)
2063
- switch (b.code) {
2059
+ const h = G(() => a.form ? r.$actions.useProperties(a.form) : r.description.form ? r.$actions.useProperties(r.description.form) : r.properties), d = async () => {
2060
+ const { error: _, result: v } = await r.$actions.deepInsert();
2061
+ if (_) {
2062
+ if ("code" in _)
2063
+ switch (_.code) {
2064
2064
  case "INVALID_PROPERTIES":
2065
2065
  case "MISSING_PROPERTIES":
2066
2066
  return;
2067
2067
  default: {
2068
- let g = f("error", {
2068
+ let g = m("error", {
2069
2069
  capitalize: !0
2070
2070
  });
2071
- b.message && (g += `: ${f(b.message)}`), g += ` (${f(b.code)})`, l.$actions.spawnToast({
2071
+ _.message && (g += `: ${m(_.message)}`), g += ` (${m(_.code)})`, l.$actions.spawnToast({
2072
2072
  text: g,
2073
2073
  icon: "warning"
2074
2074
  });
@@ -2076,77 +2076,77 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2076
2076
  }
2077
2077
  return;
2078
2078
  }
2079
- a("update:visible", !1), a("update:modelValue", _), a("insert", _), u.$actions.clearItem();
2080
- }, { t: f } = st(), m = () => {
2079
+ o("update:visible", !1), o("update:modelValue", v), o("insert", v), r.$actions.clearItem();
2080
+ }, { t: m } = st(), p = () => {
2081
2081
  l.$actions.ask({
2082
2082
  action: () => {
2083
- u.$actions.clearItem(), u.validationErrors = {}, a("cancel");
2083
+ r.$actions.clearItem(), r.validationErrors = {}, o("cancel");
2084
2084
  },
2085
- body: f("prompt.close_panel")
2085
+ body: m("prompt.close_panel")
2086
2086
  });
2087
2087
  };
2088
- return ae(() => u.item._id, (b) => {
2089
- b === null && a("update:visible", !1);
2090
- }), (b, _) => {
2088
+ return ae(() => r.item._id, (_) => {
2089
+ _ === null && o("update:visible", !1);
2090
+ }), (_, v) => {
2091
2091
  const g = ee("clickable");
2092
2092
  return n(), $(Oe, x({
2093
2093
  modelValue: e.visible,
2094
- loading: t(u).loading.get,
2094
+ loading: t(r).loading.get,
2095
2095
  float: e.float,
2096
2096
  fixedRight: e.fixedRight
2097
- }, { onOverlayClick: m }), ie({
2097
+ }, { onOverlayClick: p }), ie({
2098
2098
  extra: y(() => [
2099
2099
  e.individualActions ? (n(), $(Ve, x({ key: 0 }, {
2100
- subject: t(u).item,
2100
+ subject: t(r).item,
2101
2101
  actions: e.individualActions.filter(({ action: i }) => i !== "spawnEdit"),
2102
2102
  overlayLayer: 60
2103
2103
  }, {
2104
- onActionClick: _[2] || (_[2] = (i) => a("update:visible", !1))
2104
+ onActionClick: v[2] || (v[2] = (i) => o("update:visible", !1))
2105
2105
  }), {
2106
2106
  default: y(({
2107
2107
  visible: i
2108
2108
  }) => [
2109
- t(u).item._id ? Y((n(), $(H, {
2109
+ t(r).item._id ? Y((n(), $(H, {
2110
2110
  key: 0,
2111
2111
  reactive: "",
2112
2112
  active: i,
2113
2113
  icon: "dots-three"
2114
2114
  }, null, 8, ["active"])), [
2115
2115
  [g]
2116
- ]) : h("", !0)
2116
+ ]) : b("", !0)
2117
2117
  ]),
2118
2118
  _: 1
2119
- }, 16)) : h("", !0)
2119
+ }, 16)) : b("", !0)
2120
2120
  ]),
2121
2121
  default: y(() => [
2122
2122
  L(Me, x({
2123
- modelValue: t(u).item,
2124
- "onUpdate:modelValue": _[0] || (_[0] = (i) => t(u).item = i)
2123
+ modelValue: t(r).item,
2124
+ "onUpdate:modelValue": v[0] || (v[0] = (i) => t(r).item = i)
2125
2125
  }, {
2126
- collection: t(c),
2126
+ collection: t(u),
2127
2127
  readOnly: e.readOnly,
2128
2128
  includeId: e.includeId,
2129
2129
  includeTimestamps: e.includeTimestamps,
2130
- form: p.value,
2131
- layout: t(u).description.formLayout || {}
2130
+ form: h.value,
2131
+ layout: t(r).description.formLayout || {}
2132
2132
  }, {
2133
2133
  focus: "",
2134
- onAdd: _[1] || (_[1] = (i) => i.preventDefault())
2134
+ onAdd: v[1] || (v[1] = (i) => i.preventDefault())
2135
2135
  }), ie({ _: 2 }, [
2136
- z(Object.keys(b.$slots).filter((i) => i.startsWith("field-")), (i) => ({
2136
+ z(Object.keys(_.$slots).filter((i) => i.startsWith("field-")), (i) => ({
2137
2137
  name: i,
2138
2138
  fn: y((T) => [
2139
- C(b.$slots, i, oe(be(T)))
2139
+ C(_.$slots, i, oe(be(T)))
2140
2140
  ])
2141
2141
  }))
2142
2142
  ]), 1040, ["modelValue"])
2143
2143
  ]),
2144
2144
  _: 2
2145
2145
  }, [
2146
- b.$slots.header ? {
2146
+ _.$slots.header ? {
2147
2147
  name: "header",
2148
2148
  fn: y(() => [
2149
- C(b.$slots, "header")
2149
+ C(_.$slots, "header")
2150
2150
  ]),
2151
2151
  key: "0"
2152
2152
  } : void 0,
@@ -2156,21 +2156,21 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2156
2156
  e.float || e.fixedRight ? (n(), $(le, {
2157
2157
  key: 0,
2158
2158
  variant: "transparent",
2159
- onClick: m
2159
+ onClick: p
2160
2160
  }, {
2161
2161
  default: y(() => [
2162
- D(V(t(f)("action.cancel", { capitalize: !0 })), 1)
2162
+ D(V(t(m)("action.cancel", { capitalize: !0 })), 1)
2163
2163
  ]),
2164
2164
  _: 1
2165
- })) : h("", !0),
2165
+ })) : b("", !0),
2166
2166
  L(le, {
2167
2167
  large: "",
2168
- disabled: !t(u).isInsertReady || t(u).loading.get,
2169
- loading: t(u).loading.insert,
2168
+ disabled: !t(r).isInsertReady || t(r).loading.get,
2169
+ loading: t(r).loading.insert,
2170
2170
  onClick: d
2171
2171
  }, {
2172
2172
  default: y(() => [
2173
- D(V(t(f)("action.insert", { capitalize: !0 })), 1)
2173
+ D(V(t(m)("action.insert", { capitalize: !0 })), 1)
2174
2174
  ]),
2175
2175
  _: 1
2176
2176
  }, 8, ["disabled", "loading"])
@@ -2180,28 +2180,28 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2180
2180
  ]), 1040);
2181
2181
  };
2182
2182
  }
2183
- }), Pe = (e, r) => {
2184
- if (r) {
2183
+ }), Pe = (e, c) => {
2184
+ if (c) {
2185
2185
  if (!e) {
2186
- r.filtersPreset = {}, r.preferredTableProperties = [], r.pagination.offset = 0;
2186
+ c.filtersPreset = {}, c.preferredTableProperties = [], c.pagination.offset = 0;
2187
2187
  return;
2188
2188
  }
2189
- r.filtersPreset = e.filters || {}, r.preferredTableProperties = e.table ? Array.from(e.table) : [], r.pagination.offset = 0;
2189
+ c.filtersPreset = e.filters || {}, c.preferredTableProperties = e.table ? Array.from(e.table) : [], c.pagination.offset = 0;
2190
2190
  }
2191
- }, Aa = (e, r = {
2191
+ }, Aa = (e, c = {
2192
2192
  persistInQuery: !0
2193
2193
  }) => {
2194
- const a = Ce().currentRoute;
2195
- return ae(() => a.value.query.section, (l) => {
2194
+ const o = Ce().currentRoute;
2195
+ return ae(() => o.value.query.section, (l) => {
2196
2196
  if (e) {
2197
2197
  if (e.description.filtersPresets) {
2198
- const c = l || Object.keys(e.description.filtersPresets)[0];
2199
- Pe(e.description.filtersPresets[c], e);
2198
+ const u = l || Object.keys(e.description.filtersPresets)[0];
2199
+ Pe(e.description.filtersPresets[u], e);
2200
2200
  }
2201
- if (r.persistInQuery) {
2202
- const c = a.value.query;
2203
- c.offset && (e.pagination.offset = +c.offset), c.limit && (e.pagination.limit = +c.limit), c.search && (e.textQuery = c.search, e.filters.$text = {
2204
- $search: `"${c.search}"`,
2201
+ if (c.persistInQuery) {
2202
+ const u = o.value.query;
2203
+ u.offset && (e.pagination.offset = +u.offset), u.limit && (e.pagination.limit = +u.limit), u.search && (e.textQuery = u.search, e.filters.$text = {
2204
+ $search: `"${u.search}"`,
2205
2205
  $caseSensitive: !1
2206
2206
  });
2207
2207
  }
@@ -2238,26 +2238,26 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2238
2238
  layout: {}
2239
2239
  },
2240
2240
  emits: ["itemClick"],
2241
- setup(e, { emit: r }) {
2242
- const o = e, a = r, l = Se(), c = o.collection || we(), u = c ? ne(typeof c == "string" ? c : c.value) : null, p = G({
2243
- get: () => u?.selected,
2244
- set: (g) => u?.$actions.selectManyItems(g, !0)
2245
- }), d = G(() => o.columns ? Object.keys(o.columns).length + Number(o.checkbox) : 0), f = (g, i) => g.button ? typeof g.button == "object" ? qe(i, g.button).satisfied : g.button : !1, m = (g) => {
2246
- const i = o.layout?.actions;
2247
- return !l.value.xl || !i || !o.actions ? [] : o.actions.filter((T) => {
2241
+ setup(e, { emit: c }) {
2242
+ const a = e, o = c, l = Se(), u = a.collection || we(), r = u ? ne(typeof u == "string" ? u : u.value) : null, h = G({
2243
+ get: () => r?.selected,
2244
+ set: (g) => r?.$actions.selectManyItems(g, !0)
2245
+ }), d = G(() => a.columns ? Object.keys(a.columns).length + Number(a.checkbox) : 0), m = (g, i) => g.button ? typeof g.button == "object" ? qe(i, g.button).satisfied : g.button : !1, p = (g) => {
2246
+ const i = a.layout?.actions;
2247
+ return !l.value.xl || !i || !a.actions ? [] : a.actions.filter((T) => {
2248
2248
  if (T.roles) {
2249
2249
  const F = ne("user");
2250
2250
  if (!Ee(T.roles, F.currentUser.roles))
2251
2251
  return !1;
2252
2252
  }
2253
2253
  const k = i[T.action];
2254
- return k && f(k, g);
2254
+ return k && m(k, g);
2255
2255
  });
2256
- }, b = (g) => {
2257
- if (!o.actions)
2256
+ }, _ = (g) => {
2257
+ if (!a.actions)
2258
2258
  return [];
2259
- const i = o.layout?.actions;
2260
- return !l.value.xl || !i ? o.actions : o.actions.filter((T) => {
2259
+ const i = a.layout?.actions;
2260
+ return !l.value.xl || !i ? a.actions : a.actions.filter((T) => {
2261
2261
  const k = i[T.action];
2262
2262
  if (T.roles) {
2263
2263
  const F = ne("user");
@@ -2267,10 +2267,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2267
2267
  return k ? k.if ? qe(
2268
2268
  g,
2269
2269
  k.if
2270
- ).satisfied : !f(k, g) : !0;
2270
+ ).satisfied : !m(k, g) : !0;
2271
2271
  });
2272
- }, _ = (g, i) => {
2273
- const T = [], k = o.layout?.actions?.[i.action];
2272
+ }, v = (g, i) => {
2273
+ const T = [], k = a.layout?.actions?.[i.action];
2274
2274
  return k?.if && (qe(
2275
2275
  g,
2276
2276
  k.if
@@ -2283,18 +2283,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2283
2283
  C(g.$slots, "thead", {}, void 0, !0)
2284
2284
  ])) : (n(), s("thead", Sa, [
2285
2285
  O("tr", null, [
2286
- e.checkbox && t(u) && t(l).md ? (n(), s("th", wa, [
2286
+ e.checkbox && t(r) && t(l).md ? (n(), s("th", wa, [
2287
2287
  O("input", {
2288
2288
  type: "checkbox",
2289
- checked: t(u).selected.length > 0 && t(u).selected.length === t(u).itemsCount,
2290
- onChange: i[0] || (i[0] = (k) => t(u).$actions.selectAllItems(k.target.checked))
2289
+ checked: t(r).selected.length > 0 && t(r).selected.length === t(r).itemsCount,
2290
+ onChange: i[0] || (i[0] = (k) => t(r).$actions.selectAllItems(k.target.checked))
2291
2291
  }, null, 40, Ta)
2292
- ])) : h("", !0),
2292
+ ])) : b("", !0),
2293
2293
  (n(!0), s(W, null, z(Object.entries(e.columns), ([k, F], I) => (n(), s("th", {
2294
2294
  key: `header-${I}`,
2295
2295
  class: "table__header"
2296
2296
  }, V(F.description || t(R)(k)), 1))), 128)),
2297
- e.actions?.length ? (n(), s("th", ja)) : h("", !0)
2297
+ e.actions?.length ? (n(), s("th", ja)) : b("", !0)
2298
2298
  ])
2299
2299
  ])),
2300
2300
  g.$slots.tbody ? (n(), s("tbody", Ra, [
@@ -2302,24 +2302,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2302
2302
  ])) : (n(), s("tbody", qa, [
2303
2303
  (n(!0), s(W, null, z(e.rows, (k, F) => (n(), s("tr", {
2304
2304
  key: k._id,
2305
- onClick: (I) => a("itemClick", k)
2305
+ onClick: (I) => o("itemClick", k)
2306
2306
  }, [
2307
- t(u) && e.checkbox && t(l).md ? (n(), s("td", xa, [
2307
+ t(r) && e.checkbox && t(l).md ? (n(), s("td", xa, [
2308
2308
  Y(O("input", {
2309
- "onUpdate:modelValue": i[1] || (i[1] = (I) => p.value = I),
2309
+ "onUpdate:modelValue": i[1] || (i[1] = (I) => h.value = I),
2310
2310
  type: "checkbox",
2311
2311
  value: k._id
2312
2312
  }, null, 8, Ma), [
2313
- [tt, p.value]
2313
+ [tt, h.value]
2314
2314
  ])
2315
- ])) : h("", !0),
2315
+ ])) : b("", !0),
2316
2316
  (n(!0), s(W, null, z(Object.entries(e.columns), ([I, w], J) => (n(), s("td", {
2317
2317
  key: `column-${k._id}-${J}`
2318
2318
  }, [
2319
2319
  O("div", za, V(w.description || t(R)(I)), 1),
2320
2320
  `row-${I}` in g.$slots ? (n(), s("div", Ea, [
2321
2321
  C(g.$slots, `row-${I}`, x({ ref_for: !0 }, {
2322
- store: t(u),
2322
+ store: t(r),
2323
2323
  column: I,
2324
2324
  property: w,
2325
2325
  row: k,
@@ -2372,7 +2372,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2372
2372
  }, V(k[I].filename), 9, Ga)) : (n(), s("div", Wa, " - "))
2373
2373
  ])) : (n(), s("div", Ya, " - "))
2374
2374
  ])) : (n(), s("div", Ka, [
2375
- t(u) ? (n(), s("span", Xa, V(t(u).$actions.formatValue({
2375
+ t(r) ? (n(), s("span", Xa, V(t(r).$actions.formatValue({
2376
2376
  value: k[I],
2377
2377
  key: I,
2378
2378
  property: w
@@ -2381,25 +2381,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2381
2381
  (n(!0), s(W, null, z(t(se)(w).indexes.slice(1, 2), (N, ue) => (n(), s("div", {
2382
2382
  key: `subvalue-${ue}`,
2383
2383
  class: "table__cell-subvalue"
2384
- }, V(t(u).$actions.formatValue({
2384
+ }, V(t(r).$actions.formatValue({
2385
2385
  value: k[I],
2386
2386
  key: I,
2387
2387
  property: w,
2388
2388
  index: N
2389
2389
  })), 1))), 128))
2390
- ])) : h("", !0)
2390
+ ])) : b("", !0)
2391
2391
  ]))
2392
2392
  ])
2393
2393
  ]))
2394
2394
  ]))), 128)),
2395
2395
  e.actions?.length && t(l).md ? (n(), s("td", Pa, [
2396
2396
  O("div", Na, [
2397
- (n(!0), s(W, null, z(m(k), (I) => (n(), $(le, {
2397
+ (n(!0), s(W, null, z(p(k), (I) => (n(), $(le, {
2398
2398
  key: `action-${I.action}`,
2399
2399
  small: "",
2400
2400
  variant: "alt",
2401
2401
  icon: I.icon,
2402
- style: ve(_(k, I)),
2402
+ style: ve(v(k, I)),
2403
2403
  onClick: (w) => I.click(k)
2404
2404
  }, {
2405
2405
  default: y(() => [
@@ -2407,12 +2407,12 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2407
2407
  ]),
2408
2408
  _: 2
2409
2409
  }, 1032, ["icon", "style", "onClick"]))), 128)),
2410
- b(k).length > 0 ? (n(), $(Ve, x({
2410
+ _(k).length > 0 ? (n(), $(Ve, x({
2411
2411
  key: 0,
2412
2412
  ref_for: !0
2413
2413
  }, {
2414
2414
  subject: k,
2415
- actions: b(k)
2415
+ actions: _(k)
2416
2416
  }), {
2417
2417
  default: y(({
2418
2418
  visible: I
@@ -2426,14 +2426,14 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2426
2426
  ])
2427
2427
  ]),
2428
2428
  _: 1
2429
- }, 16)) : h("", !0)
2429
+ }, 16)) : b("", !0)
2430
2430
  ])
2431
2431
  ])) : e.actions?.length ? (n(), s("td", eo, [
2432
2432
  O("div", {
2433
2433
  class: "table__mobile-actions-grid",
2434
- style: ve(`grid-template-columns: repeat(${m(k).length + (b(k).length ? 1 : 0)}, 1fr);`)
2434
+ style: ve(`grid-template-columns: repeat(${p(k).length + (_(k).length ? 1 : 0)}, 1fr);`)
2435
2435
  }, [
2436
- (n(!0), s(W, null, z(m(k), (I) => (n(), $(de, {
2436
+ (n(!0), s(W, null, z(p(k), (I) => (n(), $(de, {
2437
2437
  key: `action-${I.action}`,
2438
2438
  class: "table__mobile-actions-button",
2439
2439
  onClick: (w) => I.click(k)
@@ -2450,12 +2450,12 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2450
2450
  ]),
2451
2451
  _: 2
2452
2452
  }, 1032, ["onClick"]))), 128)),
2453
- b(k).length > 0 ? (n(), $(Ve, x({
2453
+ _(k).length > 0 ? (n(), $(Ve, x({
2454
2454
  key: 0,
2455
2455
  ref_for: !0
2456
2456
  }, {
2457
2457
  subject: k,
2458
- actions: b(k)
2458
+ actions: _(k)
2459
2459
  }), {
2460
2460
  default: y(() => [
2461
2461
  L(H, {
@@ -2464,24 +2464,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2464
2464
  })
2465
2465
  ]),
2466
2466
  _: 1
2467
- }, 16)) : h("", !0)
2467
+ }, 16)) : b("", !0)
2468
2468
  ], 4),
2469
2469
  O("div", {
2470
2470
  id: `dropdown-${k._id}`
2471
2471
  }, null, 8, to)
2472
- ])) : h("", !0)
2472
+ ])) : b("", !0)
2473
2473
  ], 8, La))), 128))
2474
2474
  ])),
2475
2475
  O("tfoot", null, [
2476
- g.$slots.tfoot ? C(g.$slots, "tfoot", { key: 0 }, void 0, !0) : e.columns && !e.rows?.length && !t(u)?.loading.getAll ? (n(), s("tr", no, [
2476
+ g.$slots.tfoot ? C(g.$slots, "tfoot", { key: 0 }, void 0, !0) : e.columns && !e.rows?.length && !t(r)?.loading.getAll ? (n(), s("tr", no, [
2477
2477
  O("td", {
2478
2478
  colspan: d.value + 1
2479
2479
  }, [
2480
2480
  O("div", oo, V(t(R)("no_results", { capitalize: !0 })) + ". ", 1)
2481
2481
  ], 8, ao)
2482
- ])) : h("", !0)
2482
+ ])) : b("", !0)
2483
2483
  ])
2484
- ])) : h("", !0);
2484
+ ])) : b("", !0);
2485
2485
  };
2486
2486
  }
2487
2487
  }), io = /* @__PURE__ */ E(lo, [["__scopeId", "data-v-e01a149a"]]), so = /* @__PURE__ */ M({
@@ -2492,29 +2492,29 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2492
2492
  componentProps: {}
2493
2493
  },
2494
2494
  setup(e) {
2495
- const r = e, o = Ae(), a = we(), l = G(() => {
2496
- const c = {
2497
- collection: a,
2498
- checkbox: o.hasSelectionActions,
2499
- columns: o.tableProperties,
2500
- rows: o.items,
2501
- actions: r.individualActions,
2502
- layout: o.tableLayout
2495
+ const c = e, a = Ae(), o = we(), l = G(() => {
2496
+ const u = {
2497
+ collection: o,
2498
+ checkbox: a.hasSelectionActions,
2499
+ columns: a.tableProperties,
2500
+ rows: a.items,
2501
+ actions: c.individualActions,
2502
+ layout: a.tableLayout
2503
2503
  };
2504
- return Object.assign(c, r.componentProps);
2504
+ return Object.assign(u, c.componentProps);
2505
2505
  });
2506
- return (c, u) => (n(), s("div", null, [
2507
- c.$slots.inner ? C(c.$slots, "inner", { key: 0 }) : h("", !0),
2508
- t(o).properties ? (n(), $(io, x({ key: 1 }, l.value, {
2509
- key: t(o).$id
2506
+ return (u, r) => (n(), s("div", null, [
2507
+ u.$slots.inner ? C(u.$slots, "inner", { key: 0 }) : b("", !0),
2508
+ t(a).properties ? (n(), $(io, x({ key: 1 }, l.value, {
2509
+ key: t(a).$id
2510
2510
  }), ie({ _: 2 }, [
2511
- z(Object.keys(c.$slots).filter((p) => !["inner"].includes(p)), (p) => ({
2512
- name: p,
2511
+ z(Object.keys(u.$slots).filter((h) => !["inner"].includes(h)), (h) => ({
2512
+ name: h,
2513
2513
  fn: y((d) => [
2514
- C(c.$slots, p, oe(be(d)))
2514
+ C(u.$slots, h, oe(be(d)))
2515
2515
  ])
2516
2516
  }))
2517
- ]), 1040)) : h("", !0)
2517
+ ]), 1040)) : b("", !0)
2518
2518
  ]));
2519
2519
  }
2520
2520
  }), ro = /* @__PURE__ */ M({
@@ -2523,13 +2523,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2523
2523
  list: { type: Boolean }
2524
2524
  },
2525
2525
  setup(e) {
2526
- return (r, o) => (n(), s("div", {
2526
+ return (c, a) => (n(), s("div", {
2527
2527
  class: U([
2528
2528
  "grid",
2529
2529
  { "grid--list": e.list }
2530
2530
  ])
2531
2531
  }, [
2532
- C(r.$slots, "default", {}, void 0, !0)
2532
+ C(c.$slots, "default", {}, void 0, !0)
2533
2533
  ], 2));
2534
2534
  }
2535
2535
  }), uo = /* @__PURE__ */ E(ro, [["__scopeId", "data-v-4839c834"]]), co = { key: 0 }, mo = {
@@ -2547,25 +2547,25 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2547
2547
  componentName: {}
2548
2548
  },
2549
2549
  setup(e) {
2550
- const o = e.layoutOptions, a = Ae(), l = (c) => Array.isArray(c) ? c[0] : c;
2551
- return (c, u) => {
2552
- const p = ee("clickable");
2550
+ const a = e.layoutOptions, o = Ae(), l = (u) => Array.isArray(u) ? u[0] : u;
2551
+ return (u, r) => {
2552
+ const h = ee("clickable");
2553
2553
  return n(), $(uo, {
2554
2554
  list: e.componentName === "list"
2555
2555
  }, {
2556
2556
  default: y(() => [
2557
- (n(!0), s(W, null, z(t(a).items, (d) => (n(), $(zt, {
2557
+ (n(!0), s(W, null, z(t(o).items, (d) => (n(), $(zt, {
2558
2558
  key: d._id,
2559
- inactive: !!(t(o).active && !d[t(o).active]),
2559
+ inactive: !!(t(a).active && !d[t(a).active]),
2560
2560
  horizontal: e.componentName === "list"
2561
2561
  }, ie({
2562
2562
  footer: y(() => [
2563
- t(o).title ? (n(), s("div", co, V(d[t(o).title]), 1)) : h("", !0),
2564
- Array.isArray(t(o).information) ? (n(), s("div", mo, [
2565
- (n(!0), s(W, null, z(t(o).information, (f) => (n(), s("div", {
2566
- key: `info-${f}`
2567
- }, V(d[f]), 1))), 128))
2568
- ])) : t(o).information ? (n(), s("div", po, V(d[t(o).information]), 1)) : h("", !0)
2563
+ t(a).title ? (n(), s("div", co, V(d[t(a).title]), 1)) : b("", !0),
2564
+ Array.isArray(t(a).information) ? (n(), s("div", mo, [
2565
+ (n(!0), s(W, null, z(t(a).information, (m) => (n(), s("div", {
2566
+ key: `info-${m}`
2567
+ }, V(d[m]), 1))), 128))
2568
+ ])) : t(a).information ? (n(), s("div", po, V(d[t(a).information]), 1)) : b("", !0)
2569
2569
  ]),
2570
2570
  actions: y(() => [
2571
2571
  e.individualActions?.length ? (n(), $(Ve, x({
@@ -2576,49 +2576,49 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2576
2576
  actions: e.individualActions
2577
2577
  }), {
2578
2578
  default: y(({
2579
- visible: f
2579
+ visible: m
2580
2580
  }) => [
2581
2581
  Y(L(H, {
2582
2582
  reactive: "",
2583
- active: f,
2583
+ active: m,
2584
2584
  icon: "dots-three-vertical"
2585
2585
  }, null, 8, ["active"]), [
2586
- [p]
2586
+ [h]
2587
2587
  ])
2588
2588
  ]),
2589
2589
  _: 1
2590
- }, 16)) : h("", !0)
2590
+ }, 16)) : b("", !0)
2591
2591
  ]),
2592
2592
  default: y(() => [
2593
2593
  L(Le, x({ expandable: "" }, { ref_for: !0 }, {
2594
- url: l(d[t(o).picture])?.link,
2595
- meta: l(d[t(o).picture]),
2594
+ url: l(d[t(a).picture])?.link,
2595
+ meta: l(d[t(a).picture]),
2596
2596
  height: "16rem",
2597
- alt: t(o).title ? l(d[t(o).title])?.link : "Item picture"
2597
+ alt: t(a).title ? l(d[t(a).title])?.link : "Item picture"
2598
2598
  }), null, 16)
2599
2599
  ]),
2600
2600
  _: 2
2601
2601
  }, [
2602
- t(o).badge && Array.isArray(d[t(o).badge]) ? {
2602
+ t(a).badge && Array.isArray(d[t(a).badge]) ? {
2603
2603
  name: "badge",
2604
2604
  fn: y(() => [
2605
- (n(!0), s(W, null, z(d[t(o).badge], (f) => (n(), $(he, {
2606
- key: `${d._id}-${f}`,
2605
+ (n(!0), s(W, null, z(d[t(a).badge], (m) => (n(), $(he, {
2606
+ key: `${d._id}-${m}`,
2607
2607
  large: ""
2608
2608
  }, {
2609
2609
  default: y(() => [
2610
- D(V(t(o).translateBadge ? t(R)(f) : f), 1)
2610
+ D(V(t(a).translateBadge ? t(R)(m) : m), 1)
2611
2611
  ]),
2612
2612
  _: 2
2613
2613
  }, 1024))), 128))
2614
2614
  ]),
2615
2615
  key: "0"
2616
- } : t(o).badge ? {
2616
+ } : t(a).badge ? {
2617
2617
  name: "badge",
2618
2618
  fn: y(() => [
2619
2619
  L(he, null, {
2620
2620
  default: y(() => [
2621
- D(V(t(o).translateBadge && typeof d[t(o).badge] == "string" ? t(R)(d[t(o).badge]) : d[t(o).badge]), 1)
2621
+ D(V(t(a).translateBadge && typeof d[t(a).badge] == "string" ? t(R)(d[t(a).badge]) : d[t(a).badge]), 1)
2622
2622
  ]),
2623
2623
  _: 2
2624
2624
  }, 1024)
@@ -2659,19 +2659,19 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2659
2659
  noQueryPersistence: { type: Boolean }
2660
2660
  },
2661
2661
  emits: ["uiEvent"],
2662
- setup(e, { emit: r }) {
2663
- const o = K(!1), a = K(!1), l = K((...A) => null), c = K(), u = e, p = r, d = Ce(), f = ne("meta"), m = Se(), { reachedEnd: b, detach: _ } = He(null, {
2662
+ setup(e, { emit: c }) {
2663
+ const a = K(!1), o = K(!1), l = K((...A) => null), u = K(), r = e, h = c, d = Ce(), m = ne("meta"), p = Se(), { reachedEnd: _, detach: v } = He(null, {
2664
2664
  antecipate: 600
2665
- }), g = !m.value.md || u.scrollPagination;
2666
- g && ae(b, (A) => {
2665
+ }), g = !p.value.md || r.scrollPagination;
2666
+ g && ae(_, (A) => {
2667
2667
  A && i.pagination.recordsTotal > i.items.length && F.value < Ke && (F.value += 1, w());
2668
2668
  });
2669
- const i = pt(u.collection);
2669
+ const i = pt(r.collection);
2670
2670
  Aa(i, {
2671
- persistInQuery: !u.noQueryPersistence
2671
+ persistInQuery: !r.noQueryPersistence
2672
2672
  });
2673
- const T = De(), k = u.action ? t(u.action) : ft(i, d, T);
2674
- l.value = k[0], c.value = k[1];
2673
+ const T = De(), k = r.action ? t(r.action) : ft(i, d, T);
2674
+ l.value = k[0], u.value = k[1];
2675
2675
  const F = K(0), I = K(!1), w = async (A) => {
2676
2676
  i.activeFilters = Object.assign({}, A?.filters || i.$filters), Object.assign(i.activeFilters, i.filtersPreset);
2677
2677
  const j = {
@@ -2684,8 +2684,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2684
2684
  const { error: Z, result: P } = await i.$actions.retrieveItems(j);
2685
2685
  if (Z)
2686
2686
  return;
2687
- const { data: v, pagination: B } = P;
2688
- i.pagination.recordsCount = B.recordsCount, i.pagination.recordsTotal = B.recordsTotal, F.value === 0 && i.items.splice(0), i.items.push(...v), i.loading.getAll = !1, I.value = !0;
2687
+ const { data: f, pagination: B } = P;
2688
+ i.pagination.recordsCount = B.recordsCount, i.pagination.recordsTotal = B.recordsTotal, F.value === 0 && i.items.splice(0), i.items.push(...f), i.loading.getAll = !1, I.value = !0;
2689
2689
  }, J = async (A) => {
2690
2690
  d.push(Be(d.currentRoute.value, {
2691
2691
  query: {
@@ -2701,7 +2701,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2701
2701
  if (j && j[0] === A[0] && j[1] === A[1])
2702
2702
  return;
2703
2703
  const Z = d.currentRoute.value;
2704
- if (f.view.title = u.collection, !u.noFetch && (!Z.query._popstate || i.itemsCount === 0)) {
2704
+ if (m.view.title = r.collection, !r.noFetch && (!Z.query._popstate || i.itemsCount === 0)) {
2705
2705
  const P = vt(i, Z.query);
2706
2706
  Object.keys(P).length > 0 && Object.assign(i.filters, P), await w();
2707
2707
  }
@@ -2730,8 +2730,8 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2730
2730
  A.currentLayout = A.currentLayout === "tabular" ? A.description.layout.name : "tabular";
2731
2731
  };
2732
2732
  nt(() => {
2733
- i.$actions.clearFilters(), i.textQuery = "", _();
2734
- }), ae(() => c.value, async (A) => {
2733
+ i.$actions.clearFilters(), i.textQuery = "", v();
2734
+ }), ae(() => u.value, async (A) => {
2735
2735
  const j = ke(A);
2736
2736
  let Z;
2737
2737
  if (j)
@@ -2742,20 +2742,20 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2742
2742
  })), j.name === "spawnAdd")
2743
2743
  i.$actions.clearItem(), j.params?.item && (i.$actions.setItem(j.params.item), Object.keys(j.params.item).forEach((P) => {
2744
2744
  delete i.referenceItem[P];
2745
- })), o.value = "add";
2745
+ })), a.value = "add";
2746
2746
  else if (j.name === "spawnEdit")
2747
- i.$actions.setItem(j.params), o.value = "edit";
2747
+ i.$actions.setItem(j.params), a.value = "edit";
2748
2748
  else if (j.name === "duplicate") {
2749
2749
  await Z;
2750
- const P = Object.entries(i.item).reduce((v, [B, X]) => {
2750
+ const P = Object.entries(i.item).reduce((f, [B, X]) => {
2751
2751
  if (!(B in i.properties))
2752
2752
  return {
2753
- ...v,
2753
+ ...f,
2754
2754
  [B]: X
2755
2755
  };
2756
2756
  const te = i.properties[B];
2757
2757
  if (te.readOnly)
2758
- return v;
2758
+ return f;
2759
2759
  const S = (q) => {
2760
2760
  const Q = se(te);
2761
2761
  if (!Q)
@@ -2769,7 +2769,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2769
2769
  return q;
2770
2770
  };
2771
2771
  return X = Array.isArray(X) ? X.map(S) : S(X), {
2772
- ...v,
2772
+ ...f,
2773
2773
  [B]: X
2774
2774
  };
2775
2775
  }, {
@@ -2777,43 +2777,43 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2777
2777
  });
2778
2778
  i.$actions.setItem(P), delete i.item._id, i.referenceItem = {
2779
2779
  _id: void 0
2780
- }, o.value = "duplicate";
2780
+ }, a.value = "duplicate";
2781
2781
  } else
2782
- p("uiEvent", j);
2782
+ h("uiEvent", j);
2783
2783
  }, {
2784
2784
  deep: !0
2785
- }), ae(() => o, ({ value: A }) => {
2785
+ }), ae(() => a, ({ value: A }) => {
2786
2786
  A === !1 && i.$actions.clearItem();
2787
2787
  });
2788
2788
  const $e = G(() => {
2789
- if (!u.noActions)
2789
+ if (!r.noActions)
2790
2790
  return i.individualActions.map((A) => ({
2791
2791
  click: l.value(A),
2792
2792
  ...A
2793
2793
  }));
2794
2794
  }), me = G(() => i.actions.filter((A) => !A.button));
2795
- return fe(Te, G(() => u.collection)), (A, j) => {
2795
+ return fe(Te, G(() => r.collection)), (A, j) => {
2796
2796
  const Z = ee("clickable"), P = ee("loading");
2797
2797
  return n(), s(W, null, [
2798
- a.value ? (n(), $(Ca, {
2798
+ o.value ? (n(), $(Ca, {
2799
2799
  key: t(i).$id,
2800
- modelValue: a.value,
2801
- "onUpdate:modelValue": j[0] || (j[0] = (v) => a.value = v)
2802
- }, null, 8, ["modelValue"])) : h("", !0),
2803
- o.value ? (n(), $(Oa, x({
2800
+ modelValue: o.value,
2801
+ "onUpdate:modelValue": j[0] || (j[0] = (f) => o.value = f)
2802
+ }, null, 8, ["modelValue"])) : b("", !0),
2803
+ a.value ? (n(), $(Oa, x({
2804
2804
  key: 1,
2805
- visible: o.value,
2806
- "onUpdate:visible": j[1] || (j[1] = (v) => o.value = v),
2805
+ visible: a.value,
2806
+ "onUpdate:visible": j[1] || (j[1] = (f) => a.value = f),
2807
2807
  "fixed-right": ""
2808
2808
  }, {
2809
2809
  collection: e.collection,
2810
2810
  individualActions: $e.value
2811
2811
  }, {
2812
- onCancel: j[2] || (j[2] = (v) => o.value = !1)
2812
+ onCancel: j[2] || (j[2] = (f) => a.value = !1)
2813
2813
  }), ie({
2814
2814
  header: y(() => [
2815
2815
  O("span", null, V((() => {
2816
- switch (o.value) {
2816
+ switch (a.value) {
2817
2817
  case "add":
2818
2818
  return t(R)("action.add", { capitalize: !0 });
2819
2819
  case "duplicate":
@@ -2826,18 +2826,18 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2826
2826
  ]),
2827
2827
  _: 2
2828
2828
  }, [
2829
- z(Object.keys(A.$slots).filter((v) => v.startsWith("field-")), (v) => ({
2830
- name: v,
2829
+ z(Object.keys(A.$slots).filter((f) => f.startsWith("field-")), (f) => ({
2830
+ name: f,
2831
2831
  fn: y((B) => [
2832
- C(A.$slots, v, oe(be(B)), void 0, !0)
2832
+ C(A.$slots, f, oe(be(B)), void 0, !0)
2833
2833
  ])
2834
2834
  }))
2835
- ]), 1040, ["visible"])) : h("", !0),
2835
+ ]), 1040, ["visible"])) : b("", !0),
2836
2836
  !e.noActions && (t(i).description.search || Object.keys(t(i).description.filters || {}).length > 0 || t(i)?.actions.length > 0 || A.$slots.actions || !e.noLayoutToggle && t(i).description.layout && t(i).description.layout?.name !== "tabular") ? (n(), s("div", yo, [
2837
2837
  t(i).description.search ? (n(), s("div", ho, [
2838
2838
  L(_e, x({
2839
2839
  modelValue: t(i).textQuery,
2840
- "onUpdate:modelValue": j[3] || (j[3] = (v) => t(i).textQuery = v)
2840
+ "onUpdate:modelValue": j[3] || (j[3] = (f) => t(i).textQuery = f)
2841
2841
  }, {
2842
2842
  property: {
2843
2843
  type: "string",
@@ -2845,7 +2845,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2845
2845
  inputType: "search"
2846
2846
  }
2847
2847
  }), null, 16, ["modelValue"])
2848
- ])) : h("", !0),
2848
+ ])) : b("", !0),
2849
2849
  O("div", bo, [
2850
2850
  me.value.length > 0 || !e.noLayoutToggle && t(i).description.layout && t(i).description.layout?.name !== "tabular" ? (n(), $(Ve, { key: 0 }, ie({
2851
2851
  default: y(() => [
@@ -2859,7 +2859,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2859
2859
  D(V(t(i).filtersCount), 1)
2860
2860
  ]),
2861
2861
  _: 1
2862
- })) : h("", !0)
2862
+ })) : b("", !0)
2863
2863
  ]),
2864
2864
  _: 1
2865
2865
  })
@@ -2871,7 +2871,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2871
2871
  fn: y(() => [
2872
2872
  Y((n(), $(H, {
2873
2873
  icon: "funnel",
2874
- onClick: j[4] || (j[4] = (v) => a.value = !0)
2874
+ onClick: j[4] || (j[4] = (f) => o.value = !0)
2875
2875
  }, {
2876
2876
  default: y(() => [
2877
2877
  D(V(t(R)("filters", { capitalize: !0 })), 1)
@@ -2886,7 +2886,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2886
2886
  D(V(t(i).filtersCount), 1)
2887
2887
  ]),
2888
2888
  _: 1
2889
- })) : h("", !0)
2889
+ })) : b("", !0)
2890
2890
  ])
2891
2891
  ]),
2892
2892
  key: "0"
@@ -2896,7 +2896,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2896
2896
  fn: y(() => [
2897
2897
  Y((n(), $(H, {
2898
2898
  icon: "table",
2899
- onClick: j[5] || (j[5] = (v) => ce(t(i)))
2899
+ onClick: j[5] || (j[5] = (f) => ce(t(i)))
2900
2900
  }, {
2901
2901
  default: y(() => [
2902
2902
  D(V(t(R)("change_layout", { capitalize: !0 })), 1)
@@ -2908,27 +2908,27 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2908
2908
  ]),
2909
2909
  key: "1"
2910
2910
  } : void 0,
2911
- z(me.value, (v, B) => ({
2911
+ z(me.value, (f, B) => ({
2912
2912
  name: `action-${B}`,
2913
2913
  fn: y(() => [
2914
- v ? (n(), $(H, {
2914
+ f ? (n(), $(H, {
2915
2915
  key: 0,
2916
- icon: v.icon || "gear",
2917
- disabled: t(i).selected.length === 0 && "selection" in v && v.selection,
2918
- onClick: (X) => l.value(v)({ _id: t(i).selected.map((te) => typeof te == "string" || te._id) })
2916
+ icon: f.icon || "gear",
2917
+ disabled: t(i).selected.length === 0 && "selection" in f && f.selection,
2918
+ onClick: (X) => l.value(f)({ _id: t(i).selected.map((te) => typeof te == "string" || te._id) })
2919
2919
  }, {
2920
2920
  default: y(() => [
2921
- D(V(t(R)(v.label, { capitalize: !0 })), 1)
2921
+ D(V(t(R)(f.label, { capitalize: !0 })), 1)
2922
2922
  ]),
2923
2923
  _: 2
2924
- }, 1032, ["icon", "disabled", "onClick"])) : h("", !0)
2924
+ }, 1032, ["icon", "disabled", "onClick"])) : b("", !0)
2925
2925
  ])
2926
2926
  }))
2927
2927
  ]), 1024)) : Object.keys(t(i).description.filters || {}).length > 0 ? (n(), $(le, {
2928
2928
  key: 1,
2929
2929
  variant: "alt",
2930
2930
  icon: "funnel",
2931
- onClick: j[6] || (j[6] = (v) => a.value = !0)
2931
+ onClick: j[6] || (j[6] = (f) => o.value = !0)
2932
2932
  }, {
2933
2933
  default: y(() => [
2934
2934
  O("div", null, V(t(R)("Filters")), 1),
@@ -2937,24 +2937,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2937
2937
  D(V(t(i).filtersCount), 1)
2938
2938
  ]),
2939
2939
  _: 1
2940
- })) : h("", !0)
2940
+ })) : b("", !0)
2941
2941
  ]),
2942
2942
  _: 1
2943
- })) : h("", !0),
2944
- (n(!0), s(W, null, z(t(i).actions.filter((v) => v.button), (v, B) => (n(), $(le, {
2943
+ })) : b("", !0),
2944
+ (n(!0), s(W, null, z(t(i).actions.filter((f) => f.button), (f, B) => (n(), $(le, {
2945
2945
  key: `action-${B}`,
2946
- icon: v.icon,
2947
- disabled: t(i).selected.length === 0 && "selection" in v && v.selection,
2948
- onClick: (X) => l.value(v)({ _id: t(i).selected.map((te) => typeof te == "string" || te._id) })
2946
+ icon: f.icon,
2947
+ disabled: t(i).selected.length === 0 && "selection" in f && f.selection,
2948
+ onClick: (X) => l.value(f)({ _id: t(i).selected.map((te) => typeof te == "string" || te._id) })
2949
2949
  }, {
2950
2950
  default: y(() => [
2951
- D(V(t(R)(v.label, { capitalize: !0 })), 1)
2951
+ D(V(t(R)(f.label, { capitalize: !0 })), 1)
2952
2952
  ]),
2953
2953
  _: 2
2954
2954
  }, 1032, ["icon", "disabled", "onClick"]))), 128)),
2955
- A.$slots.actions ? C(A.$slots, "actions", { key: 2 }, void 0, !0) : h("", !0)
2955
+ A.$slots.actions ? C(A.$slots, "actions", { key: 2 }, void 0, !0) : b("", !0)
2956
2956
  ])
2957
- ])) : h("", !0),
2957
+ ])) : b("", !0),
2958
2958
  Y((n(), s("div", $o, [
2959
2959
  t(i).itemsCount === 0 && !t(i).loading.getAll && I.value && (t(N) || A.$slots.empty) ? (n(), s("div", go, [
2960
2960
  t(N) ? (n(), $(pe(t(N)), oe(x({ key: 0 }, {
@@ -2964,7 +2964,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2964
2964
  t(i).filtersCount === 0 && t(i).description.actions && "spawnAdd" in t(i).description.actions ? (n(), $(le, {
2965
2965
  key: 0,
2966
2966
  icon: "plus",
2967
- onClick: j[7] || (j[7] = (v) => l.value({
2967
+ onClick: j[7] || (j[7] = (f) => l.value({
2968
2968
  action: "spawnAdd",
2969
2969
  event: "spawnAdd"
2970
2970
  })())
@@ -2973,7 +2973,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2973
2973
  D(V(t(R)("add_first_item", { capitalize: !0 })), 1)
2974
2974
  ]),
2975
2975
  _: 1
2976
- })) : h("", !0)
2976
+ })) : b("", !0)
2977
2977
  ]),
2978
2978
  _: 1
2979
2979
  }, 16)) : C(A.$slots, "empty", oe(x({ key: 1 }, {
@@ -2988,10 +2988,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
2988
2988
  }, {
2989
2989
  "component-name": e.layout?.name || t(i).$currentLayout
2990
2990
  }), ie({ _: 2 }, [
2991
- z(Object.keys(A.$slots).filter((v) => v.startsWith("row-")), (v) => ({
2992
- name: v,
2991
+ z(Object.keys(A.$slots).filter((f) => f.startsWith("row-")), (f) => ({
2992
+ name: f,
2993
2993
  fn: y((B) => [
2994
- C(A.$slots, v, oe(be(B)), void 0, !0)
2994
+ C(A.$slots, f, oe(be(B)), void 0, !0)
2995
2995
  ])
2996
2996
  })),
2997
2997
  A.$slots.tfoot ? {
@@ -3010,7 +3010,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3010
3010
  pagination: t(i).pagination,
3011
3011
  onPaginate: J
3012
3012
  }, null, 8, ["pagination"])
3013
- ])) : h("", !0)
3013
+ ])) : b("", !0)
3014
3014
  ], 64);
3015
3015
  };
3016
3016
  }
@@ -3021,10 +3021,10 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3021
3021
  options: {}
3022
3022
  },
3023
3023
  setup(e) {
3024
- const r = ne("meta"), o = (a, l) => {
3025
- r.$actions.fulfillPrompt(a, l);
3024
+ const c = ne("meta"), a = (o, l) => {
3025
+ c.$actions.fulfillPrompt(o, l);
3026
3026
  };
3027
- return (a, l) => (n(), $(Oe, {
3027
+ return (o, l) => (n(), $(Oe, {
3028
3028
  float: "",
3029
3029
  "fill-footer": "",
3030
3030
  "close-hint": !1,
@@ -3036,16 +3036,16 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3036
3036
  class: "prompt__options",
3037
3037
  style: ve(`grid-template-columns: repeat(${Object.keys(e.options).length}, 1fr)`)
3038
3038
  }, [
3039
- (n(!0), s(W, null, z(Object.entries(e.options), ([c, u], p) => (n(), $(de, {
3040
- key: `option-${p}`,
3039
+ (n(!0), s(W, null, z(Object.entries(e.options), ([u, r], h) => (n(), $(de, {
3040
+ key: `option-${h}`,
3041
3041
  class: U([
3042
3042
  "prompt__option",
3043
- `prompt__option--${u.variant || "primary"}`
3043
+ `prompt__option--${r.variant || "primary"}`
3044
3044
  ]),
3045
- onClick: (d) => u.click ? u.click(c, u) : o(c, u)
3045
+ onClick: (d) => r.click ? r.click(u, r) : a(u, r)
3046
3046
  }, {
3047
3047
  default: y(() => [
3048
- D(V(u.title), 1)
3048
+ D(V(r.title), 1)
3049
3049
  ]),
3050
3050
  _: 2
3051
3051
  }, 1032, ["class", "onClick"]))), 128))
@@ -3053,7 +3053,7 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3053
3053
  ]),
3054
3054
  default: y(() => [
3055
3055
  O("div", Co, [
3056
- C(a.$slots, "default", {}, void 0, !0)
3056
+ C(o.$slots, "default", {}, void 0, !0)
3057
3057
  ])
3058
3058
  ]),
3059
3059
  _: 3
@@ -3068,24 +3068,24 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3068
3068
  icon: {}
3069
3069
  },
3070
3070
  setup(e) {
3071
- const r = ne("meta");
3072
- return (o, a) => {
3071
+ const c = ne("meta");
3072
+ return (a, o) => {
3073
3073
  const l = ee("clickable");
3074
3074
  return Y((n(), s("div", {
3075
3075
  class: U({
3076
3076
  toast: !0,
3077
- "toast--animate": t(r).toasts[0].itr === e.itr
3077
+ "toast--animate": t(c).toasts[0].itr === e.itr
3078
3078
  }),
3079
- onAnimationend: a[0] || (a[0] = (c) => t(r).$actions.popToast()),
3080
- onClick: a[1] || (a[1] = (c) => t(r).$actions.popToast(e.itr))
3079
+ onAnimationend: o[0] || (o[0] = (u) => t(c).$actions.popToast()),
3080
+ onClick: o[1] || (o[1] = (u) => t(c).$actions.popToast(e.itr))
3081
3081
  }, [
3082
3082
  L(H, x(
3083
3083
  e.icon ? { icon: e.icon } : { icon: "warning-circle" },
3084
3084
  { style: { "--icon-size": "4rem", "--icon-color": "var(--theme-brand-color-shade-3)" } }
3085
3085
  ), null, 16),
3086
3086
  O("div", Io, [
3087
- C(o.$slots, "default", {}, void 0, !0),
3088
- O("div", Bo, V(o.formatDateTime(e.date, { hoursOnly: !0 })), 1)
3087
+ C(a.$slots, "default", {}, void 0, !0),
3088
+ O("div", Bo, V(a.formatDateTime(e.date, { hoursOnly: !0 })), 1)
3089
3089
  ])
3090
3090
  ], 34)), [
3091
3091
  [l]
@@ -3095,26 +3095,26 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3095
3095
  }), wo = /* @__PURE__ */ E(So, [["__scopeId", "data-v-606d47bf"]]), To = ["innerHTML"], jo = ["innerHTML"], Ro = { class: "main__toasts" }, qo = ["innerHTML"], Lo = /* @__PURE__ */ M({
3096
3096
  __name: "aeria-main",
3097
3097
  setup(e) {
3098
- const r = ne("meta"), o = G(() => r.themeOverride || r.theme);
3099
- return (a, l) => {
3100
- const c = at("router-view");
3098
+ const c = ne("meta"), a = G(() => c.themeOverride || c.theme);
3099
+ return (o, l) => {
3100
+ const u = at("router-view");
3101
3101
  return n(), s("main", {
3102
3102
  id: "main",
3103
3103
  class: U([
3104
3104
  "main",
3105
- `main--${o.value}`,
3106
- { dark: o.value === "dark" }
3105
+ `main--${a.value}`,
3106
+ { dark: a.value === "dark" }
3107
3107
  ])
3108
3108
  }, [
3109
3109
  (n(), $(ot, null, {
3110
3110
  default: y(() => [
3111
- a.$slots.default ? C(a.$slots, "default", { key: 0 }, void 0, !0) : (n(), $(c, { key: 1 }, {
3112
- default: y(({ Component: u }) => [
3113
- (n(), $(pe(u), null, ie({ _: 2 }, [
3114
- z(Object.keys(a.$slots), (p) => ({
3115
- name: p,
3111
+ o.$slots.default ? C(o.$slots, "default", { key: 0 }, void 0, !0) : (n(), $(u, { key: 1 }, {
3112
+ default: y(({ Component: r }) => [
3113
+ (n(), $(pe(r), null, ie({ _: 2 }, [
3114
+ z(Object.keys(o.$slots), (h) => ({
3115
+ name: h,
3116
3116
  fn: y(() => [
3117
- C(a.$slots, p, {}, void 0, !0)
3117
+ C(o.$slots, h, {}, void 0, !0)
3118
3118
  ])
3119
3119
  }))
3120
3120
  ]), 1024))
@@ -3125,39 +3125,39 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3125
3125
  _: 3
3126
3126
  })),
3127
3127
  L(Oe, x({
3128
- modelValue: t(r).modal.visible,
3129
- "onUpdate:modelValue": l[0] || (l[0] = (u) => t(r).modal.visible = u),
3128
+ modelValue: t(c).modal.visible,
3129
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => t(c).modal.visible = r),
3130
3130
  float: "",
3131
3131
  "close-hint": ""
3132
- }, t(r).modal, {
3132
+ }, t(c).modal, {
3133
3133
  "overlay-layer": 70,
3134
- onOverlayClick: l[1] || (l[1] = (u) => t(r).modal.visible = !1)
3134
+ onOverlayClick: l[1] || (l[1] = (r) => t(c).modal.visible = !1)
3135
3135
  }), {
3136
3136
  default: y(() => [
3137
- t(r).modal.body ? (n(), s("div", {
3137
+ t(c).modal.body ? (n(), s("div", {
3138
3138
  key: 0,
3139
3139
  style: { "white-space": "pre-wrap" },
3140
- innerHTML: t(r).modal.body
3141
- }, null, 8, To)) : h("", !0),
3142
- t(r).modal.component ? (n(), $(pe(t(r).modal.component), { key: 1 })) : h("", !0)
3140
+ innerHTML: t(c).modal.body
3141
+ }, null, 8, To)) : b("", !0),
3142
+ t(c).modal.component ? (n(), $(pe(t(c).modal.component), { key: 1 })) : b("", !0)
3143
3143
  ]),
3144
3144
  _: 1
3145
3145
  }, 16, ["modelValue"]),
3146
- t(r).prompt.visible ? (n(), $(Ao, oe(x({ key: 0 }, t(r).prompt)), {
3146
+ t(c).prompt.visible ? (n(), $(Ao, oe(x({ key: 0 }, t(c).prompt)), {
3147
3147
  default: y(() => [
3148
3148
  O("div", {
3149
- innerHTML: t(r).prompt.body
3149
+ innerHTML: t(c).prompt.body
3150
3150
  }, null, 8, jo)
3151
3151
  ]),
3152
3152
  _: 1
3153
- }, 16)) : h("", !0),
3153
+ }, 16)) : b("", !0),
3154
3154
  O("div", Ro, [
3155
- (n(!0), s(W, null, z(t(r).toasts, (u) => (n(), $(wo, x({ ref_for: !0 }, u, {
3156
- key: `toast-${u.itr}`
3155
+ (n(!0), s(W, null, z(t(c).toasts, (r) => (n(), $(wo, x({ ref_for: !0 }, r, {
3156
+ key: `toast-${r.itr}`
3157
3157
  }), {
3158
3158
  default: y(() => [
3159
3159
  O("div", {
3160
- innerHTML: t(R)(u.text)
3160
+ innerHTML: t(R)(r.text)
3161
3161
  }, null, 8, qo)
3162
3162
  ]),
3163
3163
  _: 2
@@ -3167,13 +3167,13 @@ const gt = ["onClick"], kt = { key: 0 }, Vt = {
3167
3167
  };
3168
3168
  }
3169
3169
  }), ul = /* @__PURE__ */ E(Lo, [["__scopeId", "data-v-19b147ab"]]), xo = {}, Mo = { class: "menu" };
3170
- function zo(e, r) {
3170
+ function zo(e, c) {
3171
3171
  return n(), s("menu", Mo, [
3172
- (n(!0), s(W, null, z(Object.keys(e.$slots), (o) => (n(), s("div", {
3173
- key: o,
3172
+ (n(!0), s(W, null, z(Object.keys(e.$slots), (a) => (n(), s("div", {
3173
+ key: a,
3174
3174
  class: "menu__entry"
3175
3175
  }, [
3176
- C(e.$slots, o, {}, void 0, !0)
3176
+ C(e.$slots, a, {}, void 0, !0)
3177
3177
  ]))), 128))
3178
3178
  ]);
3179
3179
  }
@@ -3189,80 +3189,81 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3189
3189
  }, Qo = ["onClick"], Go = /* @__PURE__ */ M({
3190
3190
  __name: "aeria-tabs",
3191
3191
  props: {
3192
+ modelValue: {},
3192
3193
  query: {},
3193
3194
  param: {},
3194
- dropdown: { type: Boolean },
3195
- currentTab: { type: Function }
3195
+ dropdown: { type: Boolean }
3196
3196
  },
3197
- setup(e) {
3198
- const r = e, o = lt(), a = Ce(), l = Se(), c = G(() => {
3199
- if (r.currentTab)
3200
- return r.currentTab();
3201
- if (r.query) {
3202
- const p = a.currentRoute.value.query[r.query];
3203
- if (p)
3204
- return p;
3205
- } else if (r.param) {
3206
- const p = a.currentRoute.value.params[r.param];
3207
- if (p)
3208
- return p;
3197
+ emits: ["update:modelValue", "change"],
3198
+ setup(e, { emit: c }) {
3199
+ const a = e, o = c, l = lt(), u = Ce(), r = Se(), h = G(() => {
3200
+ if (a.modelValue)
3201
+ return a.modelValue;
3202
+ if (a.query) {
3203
+ const m = u.currentRoute.value.query[a.query];
3204
+ if (m)
3205
+ return m;
3206
+ } else if (a.param) {
3207
+ const m = u.currentRoute.value.params[a.param];
3208
+ if (m)
3209
+ return m;
3209
3210
  }
3210
- return Object.keys(o)[0];
3211
- }), u = (p) => {
3212
- r.query && a.push(Be(a.currentRoute.value, {
3211
+ return Object.keys(l)[0];
3212
+ }), d = (m) => {
3213
+ a.query ? u.push(Be(u.currentRoute.value, {
3213
3214
  query: {
3214
- [r.query]: p
3215
+ [a.query]: m
3215
3216
  }
3216
- })), r.param && a.push(Be(a.currentRoute.value, {
3217
+ })) : a.param && u.push(Be(u.currentRoute.value, {
3217
3218
  params: {
3218
- [r.param]: p
3219
+ [a.param]: m
3219
3220
  }
3220
- }));
3221
+ })), o("change", m), o("update:modelValue", m);
3221
3222
  };
3222
- return (p, d) => {
3223
- const f = ee("clickable");
3223
+ return (m, p) => {
3224
+ const _ = ee("clickable");
3224
3225
  return n(), s("div", Eo, [
3225
- t(l).md && !e.dropdown ? (n(), s("div", Fo, [
3226
- p.$slots.default ? (n(), s("div", Uo, [
3227
- C(p.$slots, "default", {}, void 0, !0)
3228
- ])) : h("", !0),
3229
- (n(!0), s(W, null, z(Object.keys(p.$slots).filter((m) => m !== "default"), (m, b) => (n(), s("div", {
3230
- key: m,
3226
+ t(r).md && !e.dropdown ? (n(), s("div", Fo, [
3227
+ m.$slots.default ? (n(), s("div", Uo, [
3228
+ C(m.$slots, "default", {}, void 0, !0)
3229
+ ])) : b("", !0),
3230
+ (n(!0), s(W, null, z(Object.keys(m.$slots).filter((v) => v !== "default"), (v, g) => (n(), s("div", {
3231
+ key: v,
3231
3232
  class: U({
3232
3233
  tabs__tab: !0,
3233
- "tabs__tab--current": m === c.value || !c.value && b === 0
3234
+ "tabs__tab--current": v === h.value || !h.value && g === 0
3234
3235
  }),
3235
- onClick: (_) => u(m)
3236
+ onClick: (i) => d(v)
3236
3237
  }, [
3237
- C(p.$slots, m, {}, void 0, !0)
3238
+ C(m.$slots, v, {}, void 0, !0)
3238
3239
  ], 10, Ho))), 128))
3239
3240
  ])) : (n(), s("div", Do, [
3240
3241
  L(Ve, null, ie({
3241
- default: y(({ visible: m }) => [
3242
+ default: y(({ visible: v }) => [
3242
3243
  Y((n(), $(H, {
3243
3244
  "icon-right": "",
3244
- active: m,
3245
+ active: v,
3245
3246
  icon: "caret-down",
3246
3247
  style: { "--icon-color": "var(--theme-brand-color-shade-1)" },
3247
3248
  class: "tabs__context-menu-icon"
3248
3249
  }, {
3249
3250
  default: y(() => [
3250
- C(p.$slots, c.value, {}, void 0, !0)
3251
+ C(m.$slots, h.value, {}, void 0, !0)
3251
3252
  ]),
3252
3253
  _: 3
3253
3254
  }, 8, ["active"])), [
3254
- [f]
3255
+ [_]
3255
3256
  ])
3256
3257
  ]),
3257
3258
  _: 2
3258
3259
  }, [
3259
- z(Object.keys(p.$slots).filter((m) => m !== "default"), (m) => ({
3260
- name: m,
3260
+ z(Object.keys(m.$slots).filter((v) => v !== "default"), (v) => ({
3261
+ name: v,
3261
3262
  fn: y(() => [
3262
3263
  O("div", {
3263
- onClick: (b) => u(m)
3264
+ onClick: (g) => d(v)
3264
3265
  }, [
3265
- C(p.$slots, m, {}, void 0, !0)
3266
+ C(m.$slots, v, {}, void 0, !0)
3266
3267
  ], 8, Qo)
3267
3268
  ])
3268
3269
  }))
@@ -3271,16 +3272,16 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3271
3272
  ]);
3272
3273
  };
3273
3274
  }
3274
- }), Wo = /* @__PURE__ */ E(Go, [["__scopeId", "data-v-fb8920cf"]]), Yo = M({
3275
+ }), Wo = /* @__PURE__ */ E(Go, [["__scopeId", "data-v-35168958"]]), Yo = M({
3275
3276
  props: {
3276
3277
  initialValue: String,
3277
3278
  promise: Promise
3278
3279
  },
3279
3280
  setup(e) {
3280
- const r = K(e.initialValue);
3281
- return e.promise instanceof Promise && e.promise.then((o) => {
3282
- r.value = o;
3283
- }), () => it("div", String(r.value));
3281
+ const c = K(e.initialValue);
3282
+ return e.promise instanceof Promise && e.promise.then((a) => {
3283
+ c.value = a;
3284
+ }), () => it("div", String(c.value));
3284
3285
  }
3285
3286
  }), Ko = ["onClick"], Xo = { key: 1 }, Jo = /* @__PURE__ */ M({
3286
3287
  __name: "aeria-crud-topbar",
@@ -3288,46 +3289,46 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3288
3289
  collection: {}
3289
3290
  },
3290
3291
  setup(e) {
3291
- const r = e, a = Ce().currentRoute, l = De(), c = G(() => r.collection ? Ae(r.collection, l) : typeof a.value.meta.collection == "string" ? Ae(a.value.meta.collection, l) : typeof a.value.params.collection == "string" ? Ae(a.value.params.collection, l) : null), u = async (p, d) => {
3292
- const { error: f, result: m } = await d.$functions[p.badgeFunction]({
3293
- filters: p.filters
3292
+ const c = e, o = Ce().currentRoute, l = De(), u = G(() => c.collection ? Ae(c.collection, l) : typeof o.value.meta.collection == "string" ? Ae(o.value.meta.collection, l) : typeof o.value.params.collection == "string" ? Ae(o.value.params.collection, l) : null), r = async (h, d) => {
3293
+ const { error: m, result: p } = await d.$functions[h.badgeFunction]({
3294
+ filters: h.filters
3294
3295
  });
3295
- return f ? 0 : m;
3296
+ return m ? 0 : p;
3296
3297
  };
3297
- return (p, d) => c.value && c.value.description.filtersPresets ? (n(), $(Wo, {
3298
+ return (h, d) => u.value && u.value.description.filtersPresets ? (n(), $(Wo, {
3298
3299
  key: 0,
3299
3300
  dropdown: "",
3300
3301
  query: "section"
3301
3302
  }, ie({ _: 2 }, [
3302
- z(Object.entries(c.value.description.filtersPresets), ([f, m]) => ({
3303
- name: f,
3303
+ z(Object.entries(u.value.description.filtersPresets), ([m, p]) => ({
3304
+ name: m,
3304
3305
  fn: y(() => [
3305
3306
  O("div", {
3306
3307
  class: "topbar__preset",
3307
- onClick: (b) => t(Pe)(m, c.value)
3308
+ onClick: (_) => t(Pe)(p, u.value)
3308
3309
  }, [
3309
- m.icon ? (n(), $(H, {
3310
+ p.icon ? (n(), $(H, {
3310
3311
  key: 0,
3311
- icon: m.icon
3312
+ icon: p.icon
3312
3313
  }, {
3313
3314
  default: y(() => [
3314
- D(V(m.label || t(R)(f, { plural: !0 })), 1)
3315
+ D(V(p.label || t(R)(m, { plural: !0 })), 1)
3315
3316
  ]),
3316
3317
  _: 2
3317
- }, 1032, ["icon"])) : (n(), s("div", Xo, V(m.label || t(R)(f, { plural: !0 })), 1)),
3318
- m.badgeFunction ? (n(), $(he, { key: 2 }, {
3318
+ }, 1032, ["icon"])) : (n(), s("div", Xo, V(p.label || t(R)(m, { plural: !0 })), 1)),
3319
+ p.badgeFunction ? (n(), $(he, { key: 2 }, {
3319
3320
  default: y(() => [
3320
3321
  L(t(Yo), {
3321
3322
  "initial-value": "0",
3322
- promise: u(m, c.value)
3323
+ promise: r(p, u.value)
3323
3324
  }, null, 8, ["promise"])
3324
3325
  ]),
3325
3326
  _: 2
3326
- }, 1024)) : h("", !0)
3327
+ }, 1024)) : b("", !0)
3327
3328
  ], 8, Ko)
3328
3329
  ])
3329
3330
  }))
3330
- ]), 1024)) : h("", !0);
3331
+ ]), 1024)) : b("", !0);
3331
3332
  }
3332
3333
  }), Zo = /* @__PURE__ */ E(Jo, [["__scopeId", "data-v-f0a45677"]]), Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3333
3334
  __proto__: null,
@@ -3339,13 +3340,13 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3339
3340
  },
3340
3341
  emits: ["update:modelValue"],
3341
3342
  setup(e) {
3342
- const r = e;
3343
+ const c = e;
3343
3344
  fe(Te, null);
3344
- const o = yt(), a = G(() => o(
3345
- r.modelValue.password,
3346
- r.modelValue.confirmation
3345
+ const a = yt(), o = G(() => a(
3346
+ c.modelValue.password,
3347
+ c.modelValue.confirmation
3347
3348
  ));
3348
- return (l, c) => (n(), $(Me, {
3349
+ return (l, u) => (n(), $(Me, {
3349
3350
  form: {
3350
3351
  password: {
3351
3352
  type: "string",
@@ -3359,34 +3360,34 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3359
3360
  }
3360
3361
  },
3361
3362
  "model-value": e.modelValue,
3362
- "onUpdate:modelValue": c[0] || (c[0] = (u) => l.$emit("update:modelValue", u))
3363
+ "onUpdate:modelValue": u[0] || (u[0] = (r) => l.$emit("update:modelValue", r))
3363
3364
  }, {
3364
3365
  after: y(() => [
3365
- O("div", null, V(a.value || "Senhas conferem"), 1),
3366
- C(l.$slots, "default", oe(be({ passwordError: a.value })))
3366
+ O("div", null, V(o.value || "Senhas conferem"), 1),
3367
+ C(l.$slots, "default", oe(be({ passwordError: o.value })))
3367
3368
  ]),
3368
3369
  _: 3
3369
3370
  }, 8, ["model-value"]));
3370
3371
  }
3371
- }), ml = (e, r = []) => ({
3372
+ }), ml = (e, c = []) => ({
3372
3373
  path: "/user",
3373
3374
  name: "/builtin:user",
3374
3375
  component: e,
3375
- children: r.concat([
3376
+ children: c.concat([
3376
3377
  {
3377
3378
  path: "invite/:id",
3378
3379
  name: "/user/invite/:id",
3379
- redirect: (o) => ({
3380
+ redirect: (a) => ({
3380
3381
  path: "/user/signup",
3381
3382
  params: {
3382
- inviteId: o.params.id
3383
+ inviteId: a.params.id
3383
3384
  }
3384
3385
  })
3385
3386
  },
3386
3387
  {
3387
3388
  path: "signin",
3388
3389
  name: "/user/signin",
3389
- component: () => import("./signin-DH9qCDxu.js"),
3390
+ component: () => import("./signin-CtlSKUPp.js"),
3390
3391
  meta: {
3391
3392
  title: "Sign in"
3392
3393
  }
@@ -3394,7 +3395,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3394
3395
  {
3395
3396
  path: "signup",
3396
3397
  name: "/user/signup",
3397
- component: () => import("./signup-nPGf9ydg.js"),
3398
+ component: () => import("./signup-BRS21QG1.js"),
3398
3399
  meta: {
3399
3400
  title: "Sign up"
3400
3401
  }
@@ -3402,7 +3403,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3402
3403
  {
3403
3404
  path: "redefine-password",
3404
3405
  name: "/user/redefine-password",
3405
- component: () => import("./redefine-password-D56RgpPt.js"),
3406
+ component: () => import("./redefine-password-CtYxz6zi.js"),
3406
3407
  meta: {
3407
3408
  title: "Redefine password"
3408
3409
  }
@@ -3410,13 +3411,13 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3410
3411
  {
3411
3412
  path: "activation",
3412
3413
  name: "/user/activation",
3413
- component: () => import("./activation-srNROdzY.js"),
3414
+ component: () => import("./activation-BUcgx1NN.js"),
3414
3415
  meta: {
3415
3416
  title: "Activate user"
3416
3417
  }
3417
3418
  }
3418
3419
  ])
3419
- }), pl = (e, r = []) => ({
3420
+ }), pl = (e, c = []) => ({
3420
3421
  path: "/dashboard",
3421
3422
  name: "/builtin:dashboard",
3422
3423
  component: e,
@@ -3426,17 +3427,17 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3426
3427
  meta: {
3427
3428
  title: "Dashboard"
3428
3429
  },
3429
- children: r.concat([
3430
+ children: c.concat([
3430
3431
  {
3431
3432
  path: "c/:collection",
3432
3433
  name: "/dashboard/:collection",
3433
3434
  props: !0,
3434
3435
  components: {
3435
- default: () => import("./index-Btoxwrn1.js"),
3436
+ default: () => import("./index-DzC5Stu6.js"),
3436
3437
  topbar: () => Promise.resolve().then(() => Po)
3437
3438
  },
3438
3439
  meta: {
3439
- title: ({ collectionName: o, t: a }) => a(o, {
3440
+ title: ({ collectionName: a, t: o }) => o(a, {
3440
3441
  plural: !0
3441
3442
  })
3442
3443
  }
@@ -3446,10 +3447,10 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3446
3447
  name: "/dashboard/:collection/:id",
3447
3448
  props: !0,
3448
3449
  components: {
3449
- default: () => import("./_id_-BO-vt1sw.js")
3450
+ default: () => import("./_id_-CbIlBY7C.js")
3450
3451
  },
3451
3452
  meta: {
3452
- title: ({ collectionName: o, t: a }) => a(o, {
3453
+ title: ({ collectionName: a, t: o }) => o(a, {
3453
3454
  plural: !0
3454
3455
  })
3455
3456
  }
@@ -3466,7 +3467,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3466
3467
  children: [
3467
3468
  {
3468
3469
  path: "profile",
3469
- component: () => import("./index-DMX5v03Z.js"),
3470
+ component: () => import("./index-74Th-7AC.js"),
3470
3471
  meta: {
3471
3472
  title: "User profile",
3472
3473
  icon: "user-square"
@@ -3475,7 +3476,7 @@ const cl = /* @__PURE__ */ E(xo, [["render", zo], ["__scopeId", "data-v-3cfef7fb
3475
3476
  {
3476
3477
  path: "changepass",
3477
3478
  name: "/dashboard/user/changepass",
3478
- component: () => import("./index-Dzbg_524.js"),
3479
+ component: () => import("./index-B3QY_pg3.js"),
3479
3480
  meta: {
3480
3481
  title: "Change password",
3481
3482
  icon: "lock"