@anzusystems/common-admin 1.47.0-beta.dev-1778753791 → 1.47.0-beta.dev-1778753795

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/labs.js CHANGED
@@ -1,29 +1,29 @@
1
- import { bS as Pn, d as pe, j as Oe, k as za, a1 as Na, h as vt, i as Et, aj as In, ak as Dn, al as Tn, am as En, ag as $t, aZ as $n, aa as Fn, ab as Bn, ac as Rn, ad as Kn, an as Vn, ao as Ln, ae as Mn, af as zn, bT as Nn, bU as On, bd as Un, bV as Oa, as as jn, bW as Xt, ap as Ua, aq as ja, aU as qa, b1 as Ga, ar as Ha, E as Ja, a8 as Wa, a2 as Ya, bX as Xa, q as Qa, p as Za, x as _a, a7 as eo, aI as to, m as qn, bY as no, l as ao, bZ as oo, b_ as Gn, b$ as Hn, c0 as Jn, c1 as Wn, c2 as Yn, c3 as Xn, c4 as Qn, c5 as Zn, c6 as _n, c7 as ea, g as we, c8 as lo, _ as ta, c9 as io, ca as so, cb as ro, cc as co, aT as uo, cd as fo, ce as mo, cf as vo, z as yo } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-BT0EDnmK.mjs";
2
- import { aE as Vi, cg as Li, ch as Mi, aA as zi, aB as Ni, aD as Oi, aF as Ui, aC as ji, aR as qi, aJ as Gi, ba as Hi, aW as Ji, aG as Wi, aH as Yi, ay as Xi, az as Qi, ci as Zi, cj as _i, ck as es, cl as ts, cm as ns, cn as as, co as os, ai as ls, ah as is, cp as ss, cq as rs, cr as ds, cs } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-BT0EDnmK.mjs";
3
- import { defineComponent as Ge, useModel as qe, inject as Zt, computed as g, watch as Ee, openBlock as h, createElementBlock as K, createElementVNode as M, toDisplayString as B, unref as d, createVNode as i, withCtx as r, createTextVNode as q, Fragment as ye, renderList as _e, createBlock as Y, normalizeClass as Pe, mergeModels as Ve, createCommentVNode as G, withModifiers as ae, ref as ue, onMounted as _t, toRaw as bn, provide as na, resolveComponent as kn, renderSlot as z, mergeProps as oe, withDirectives as ho, vShow as po, useSlots as aa, useTemplateRef as Ft, isRef as oa, normalizeStyle as yt, normalizeProps as Ke, guardReactiveProps as je, shallowRef as Qt, nextTick as Ne, onBeforeUnmount as en, getCurrentInstance as tn, reactive as go } from "vue";
4
- import { useI18n as He } from "vue-i18n";
1
+ import { bS as Sn, d as pe, j as Ue, k as Ma, a1 as za, h as mt, i as Et, aj as Pn, ak as In, al as Dn, am as En, ag as Tt, aZ as Tn, aa as $n, ab as Fn, ac as Bn, ad as Rn, an as Kn, ao as Vn, ae as Ln, af as Mn, bT as zn, bU as Nn, bd as On, bV as Na, as as Un, bW as Yt, ap as Oa, aq as Ua, aU as ja, b1 as qa, ar as Ga, E as Ha, a8 as Ja, a2 as Wa, bX as Ya, q as Xa, p as Qa, x as Za, a7 as _a, aI as eo, m as jn, bY as to, l as no, bZ as ao, b_ as qn, b$ as Gn, c0 as Hn, c1 as Jn, c2 as Wn, c3 as Yn, c4 as Xn, c5 as Qn, c6 as Zn, c7 as _n, g as ke, c8 as oo, _ as ea, c9 as lo, ca as io, cb as so, cc as ro, aT as co, cd as uo, ce as fo, cf as mo, z as vo } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-CcJ9O4Nl.mjs";
2
+ import { aE as Ki, cg as Vi, ch as Li, aA as Mi, aB as zi, aD as Ni, aF as Oi, aC as Ui, aR as ji, aJ as qi, ba as Gi, aW as Hi, aG as Ji, aH as Wi, ay as Yi, az as Xi, ci as Qi, cj as Zi, ck as _i, cl as es, cm as ts, cn as ns, co as as, ai as os, ah as ls, cp as is, cq as ss, cr as rs, cs as ds } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-CcJ9O4Nl.mjs";
3
+ import { defineComponent as He, useModel as Ge, inject as Qt, computed as g, watch as Ee, openBlock as y, createElementBlock as K, createElementVNode as M, toDisplayString as B, unref as d, createVNode as i, withCtx as r, createTextVNode as G, Fragment as ve, renderList as Ze, createBlock as W, normalizeClass as xe, mergeModels as Le, createCommentVNode as H, withModifiers as le, ref as ce, onMounted as Zt, toRaw as gn, provide as ta, resolveComponent as bn, renderSlot as z, mergeProps as ie, withDirectives as yo, vShow as ho, useSlots as na, useTemplateRef as $t, isRef as aa, normalizeStyle as vt, normalizeProps as Ve, guardReactiveProps as qe, shallowRef as Xt, nextTick as Oe, onBeforeUnmount as _t, getCurrentInstance as en, reactive as po } from "vue";
4
+ import { useI18n as Je } from "vue-i18n";
5
5
  import { VBtn as _ } from "vuetify/components/VBtn";
6
- import { VList as ht, VListItem as De, VListItemTitle as Fe } from "vuetify/components/VList";
7
- import { VMenu as Bt } from "vuetify/components/VMenu";
8
- import { useThrottleFn as St, useDebounceFn as bo } from "@vueuse/core";
9
- import { VBtnToggle as ko } from "vuetify/components/VBtnToggle";
10
- import la from "axios";
11
- import { useDisplay as nn } from "vuetify";
12
- import { VCard as an, VCardTitle as ia, VCardText as Tt, VCardActions as sa } from "vuetify/components/VCard";
13
- import { VDialog as on } from "vuetify/components/VDialog";
14
- import { VSpacer as ln } from "vuetify/components/VGrid";
15
- import { VIcon as te } from "vuetify/components/VIcon";
16
- import { VToolbar as wo } from "vuetify/components/VToolbar";
17
- import { VTooltip as Te } from "vuetify/components/VTooltip";
18
- import { Intersect as Co } from "vuetify/directives";
19
- import { VAlert as sn } from "vuetify/components/VAlert";
20
- import { VProgressCircular as ra } from "vuetify/components/VProgressCircular";
21
- import { VRadio as wn } from "vuetify/components/VRadio";
22
- import { VRadioGroup as xo } from "vuetify/components/VRadioGroup";
23
- import { onBeforeRouteLeave as Ao } from "vue-router";
24
- const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-body-small mr-1" }, Ci = /* @__PURE__ */ Ge({
6
+ import { VList as yt, VListItem as Ie, VListItemTitle as Re } from "vuetify/components/VList";
7
+ import { VMenu as Ft } from "vuetify/components/VMenu";
8
+ import { useThrottleFn as At, useDebounceFn as go } from "@vueuse/core";
9
+ import { VBtnToggle as bo } from "vuetify/components/VBtnToggle";
10
+ import oa from "axios";
11
+ import { useDisplay as tn } from "vuetify";
12
+ import { VCard as nn, VCardTitle as la, VCardText as Dt, VCardActions as ia } from "vuetify/components/VCard";
13
+ import { VDialog as an } from "vuetify/components/VDialog";
14
+ import { VSpacer as on } from "vuetify/components/VGrid";
15
+ import { VIcon as ne } from "vuetify/components/VIcon";
16
+ import { VToolbar as ko } from "vuetify/components/VToolbar";
17
+ import { VTooltip as De } from "vuetify/components/VTooltip";
18
+ import { Intersect as wo } from "vuetify/directives";
19
+ import { VAlert as ln } from "vuetify/components/VAlert";
20
+ import { VProgressCircular as sa } from "vuetify/components/VProgressCircular";
21
+ import { VRadio as kn } from "vuetify/components/VRadio";
22
+ import { VRadioGroup as Co } from "vuetify/components/VRadioGroup";
23
+ import { onBeforeRouteLeave as xo } from "vue-router";
24
+ const Ao = { class: "d-flex align-center justify-center" }, So = { class: "text-body-small mr-1" }, wi = /* @__PURE__ */ He({
25
25
  __name: "ADatatableOrdering",
26
- props: /* @__PURE__ */ Ve({
26
+ props: /* @__PURE__ */ Le({
27
27
  variant: { default: "id" },
28
28
  customOptions: { default: void 0 },
29
29
  paginationUpdateCustomCb: { type: Function, default: void 0 }
@@ -34,81 +34,81 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
34
34
  },
35
35
  modelModifiers: {}
36
36
  }),
37
- emits: /* @__PURE__ */ Ve(["sortByChange"], ["update:modelValue"]),
37
+ emits: /* @__PURE__ */ Le(["sortByChange"], ["update:modelValue"]),
38
38
  setup(e, { emit: w }) {
39
- const c = e, n = w, u = qe(e, "modelValue"), p = Zt(Pn);
40
- if (pe(p))
39
+ const u = e, n = w, f = Ge(e, "modelValue"), h = Qt(Sn);
40
+ if (pe(h))
41
41
  throw new Error("Incorrect provide/inject config.");
42
- const { t: y } = He(), b = [
42
+ const { t: p } = Je(), b = [
43
43
  {
44
44
  id: 1,
45
45
  titleT: "common.system.datatable.ordering.mostRecent",
46
- sortBy: { key: "createdAt", order: Oe.Desc }
46
+ sortBy: { key: "createdAt", order: Ue.Desc }
47
47
  },
48
48
  {
49
49
  id: 2,
50
50
  titleT: "common.system.datatable.ordering.oldest",
51
- sortBy: { key: "createdAt", order: Oe.Asc }
51
+ sortBy: { key: "createdAt", order: Ue.Asc }
52
52
  }
53
53
  ], k = [
54
54
  {
55
55
  id: 1,
56
56
  titleT: "common.system.datatable.ordering.mostRecent",
57
- sortBy: { key: "id", order: Oe.Desc }
57
+ sortBy: { key: "id", order: Ue.Desc }
58
58
  },
59
59
  {
60
60
  id: 2,
61
61
  titleT: "common.system.datatable.ordering.oldest",
62
- sortBy: { key: "id", order: Oe.Asc }
62
+ sortBy: { key: "id", order: Ue.Asc }
63
63
  }
64
64
  ], s = [
65
65
  {
66
66
  id: 3,
67
67
  titleT: "common.system.datatable.ordering.mostRelevant",
68
- sortBy: { key: za, order: Oe.Desc }
68
+ sortBy: { key: Ma, order: Ue.Desc }
69
69
  },
70
70
  {
71
71
  id: 1,
72
72
  titleT: "common.system.datatable.ordering.mostRecent",
73
- sortBy: { key: "createdAt", order: Oe.Desc }
73
+ sortBy: { key: "createdAt", order: Ue.Desc }
74
74
  },
75
75
  {
76
76
  id: 2,
77
77
  titleT: "common.system.datatable.ordering.oldest",
78
- sortBy: { key: "createdAt", order: Oe.Asc }
78
+ sortBy: { key: "createdAt", order: Ue.Asc }
79
79
  }
80
80
  ], C = g(() => {
81
- const I = D.value.find((E) => E.id === u.value);
82
- return I ? y(I.titleT) : "";
83
- }), D = g(() => c.customOptions ? c.customOptions : c.variant === "most-relevant" ? s : c.variant === "id" ? k : b), N = (I) => {
84
- u.value = I.id;
81
+ const I = D.value.find((T) => T.id === f.value);
82
+ return I ? p(I.titleT) : "";
83
+ }), D = g(() => u.customOptions ? u.customOptions : u.variant === "most-relevant" ? s : u.variant === "id" ? k : b), N = (I) => {
84
+ f.value = I.id;
85
85
  }, V = (I) => {
86
- I.sortBy || (p.value = {
87
- ...p.value,
86
+ I.sortBy || (h.value = {
87
+ ...h.value,
88
88
  sortBy: null
89
- }, n("sortByChange", I)), p.value.sortBy = I.sortBy, n("sortByChange", I);
89
+ }, n("sortByChange", I)), h.value.sortBy = I.sortBy, n("sortByChange", I);
90
90
  };
91
- return Ee(u, (I, E) => {
92
- if (I === E) return;
91
+ return Ee(f, (I, T) => {
92
+ if (I === T) return;
93
93
  const j = D.value.find((R) => R.id === I);
94
94
  if (!pe(j)) {
95
- if (pe(c.paginationUpdateCustomCb)) {
95
+ if (pe(u.paginationUpdateCustomCb)) {
96
96
  V(j);
97
97
  return;
98
98
  }
99
- c.paginationUpdateCustomCb(j, p);
99
+ u.paginationUpdateCustomCb(j, h);
100
100
  }
101
101
  }), Ee(
102
- p,
103
- (I, E) => {
104
- if (I.sortBy?.key === E?.sortBy?.key && I.sortBy?.order === E?.sortBy?.order)
102
+ h,
103
+ (I, T) => {
104
+ if (I.sortBy?.key === T?.sortBy?.key && I.sortBy?.order === T?.sortBy?.order)
105
105
  return;
106
106
  const j = D.value.find((R) => I.sortBy?.key === R.sortBy?.key && I.sortBy?.order === R.sortBy?.order);
107
- pe(j) || (u.value = j.id);
107
+ pe(j) || (f.value = j.id);
108
108
  },
109
109
  { immediate: !0 }
110
- ), (I, E) => (h(), K("div", So, [
111
- M("div", Po, B(d(y)("common.system.datatable.ordering.title")) + ": ", 1),
110
+ ), (I, T) => (y(), K("div", Ao, [
111
+ M("div", So, B(d(p)("common.system.datatable.ordering.title")) + ": ", 1),
112
112
  i(_, {
113
113
  variant: "text",
114
114
  rounded: "xl",
@@ -117,28 +117,28 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
117
117
  "append-icon": "mdi-chevron-down"
118
118
  }, {
119
119
  default: r(() => [
120
- q(B(C.value) + " ", 1),
121
- i(Bt, {
120
+ G(B(C.value) + " ", 1),
121
+ i(Ft, {
122
122
  activator: "parent",
123
123
  location: "bottom",
124
124
  "close-on-content-click": ""
125
125
  }, {
126
126
  default: r(() => [
127
- i(ht, {
127
+ i(yt, {
128
128
  density: "compact",
129
129
  class: "pa-0"
130
130
  }, {
131
131
  default: r(() => [
132
- (h(!0), K(ye, null, _e(D.value, (j) => (h(), Y(De, {
132
+ (y(!0), K(ve, null, Ze(D.value, (j) => (y(), W(Ie, {
133
133
  key: j.id,
134
134
  onClick: (R) => N(j)
135
135
  }, {
136
136
  default: r(() => [
137
- i(Fe, {
138
- class: Pe({ "font-weight-bold": j.id === u.value })
137
+ i(Re, {
138
+ class: xe({ "font-weight-bold": j.id === f.value })
139
139
  }, {
140
140
  default: r(() => [
141
- q(B(d(y)(j.titleT)), 1)
141
+ G(B(d(p)(j.titleT)), 1)
142
142
  ]),
143
143
  _: 2
144
144
  }, 1032, ["class"])
@@ -156,10 +156,10 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
156
156
  })
157
157
  ]));
158
158
  }
159
- }), Io = { class: "anzu-data-footer" }, Do = {
159
+ }), Po = { class: "anzu-data-footer" }, Io = {
160
160
  key: 0,
161
161
  class: "anzu-data-footer__page-limit"
162
- }, To = { class: "anzu-data-footer__pagination" }, Eo = { class: "anzu-data-footer__icons-before" }, $o = { class: "current-page" }, Fo = { class: "anzu-data-footer__icons-after" }, Bo = /* @__PURE__ */ Ge({
162
+ }, Do = { class: "anzu-data-footer__pagination" }, Eo = { class: "anzu-data-footer__icons-before" }, To = { class: "current-page" }, $o = { class: "anzu-data-footer__icons-after" }, Fo = /* @__PURE__ */ He({
163
163
  __name: "ADatatablePagination",
164
164
  props: {
165
165
  itemsPerPageOptions: { default: () => [10, 25, 50] },
@@ -167,52 +167,52 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
167
167
  },
168
168
  emits: ["change"],
169
169
  setup(e, { emit: w }) {
170
- const c = w, n = Zt(Pn);
170
+ const u = w, n = Qt(Sn);
171
171
  if (pe(n))
172
172
  throw new Error("Incorrect provide/inject config.");
173
- const { t: u } = He(), { setStoredPage: p } = Na(), y = g(() => Math.ceil(n.value.totalCount / n.value.rowsPerPage)), b = g(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + 1), k = g(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + n.value.currentViewCount), s = g(() => n.value.page === 1), C = g(() => !vt(n.value.hasNextPage) || n.value.page === y.value), D = g(() => vt(n.value.hasNextPage) && n.value.page === y.value || n.value.hasNextPage === !1), N = g(() => vt(n.value.hasNextPage) ? n.value.totalCount : n.value.hasNextPage ? k.value + 1 + "+" : k.value);
173
+ const { t: f } = Je(), { setStoredPage: h } = za(), p = g(() => Math.ceil(n.value.totalCount / n.value.rowsPerPage)), b = g(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + 1), k = g(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + n.value.currentViewCount), s = g(() => n.value.page === 1), C = g(() => !mt(n.value.hasNextPage) || n.value.page === p.value), D = g(() => mt(n.value.hasNextPage) && n.value.page === p.value || n.value.hasNextPage === !1), N = g(() => mt(n.value.hasNextPage) ? n.value.totalCount : n.value.hasNextPage ? k.value + 1 + "+" : k.value);
174
174
  Ee(
175
175
  () => n.value.rowsPerPage,
176
176
  (R, $) => {
177
- R !== $ && (n.value.page = 1, c("change"));
177
+ R !== $ && (n.value.page = 1, u("change"));
178
178
  }
179
179
  ), Ee(
180
180
  () => n.value.page,
181
181
  (R, $) => {
182
- R !== $ && (p(R), c("change"));
182
+ R !== $ && (h(R), u("change"));
183
183
  }
184
184
  );
185
- const V = St(() => {
185
+ const V = At(() => {
186
186
  n.value.page = 1;
187
- }, 300), I = St(() => {
188
- n.value.page = y.value;
189
- }, 300), E = St(() => {
187
+ }, 300), I = At(() => {
188
+ n.value.page = p.value;
189
+ }, 300), T = At(() => {
190
190
  n.value.page = n.value.page - 1;
191
- }, 300), j = St(() => {
191
+ }, 300), j = At(() => {
192
192
  n.value.page = n.value.page + 1;
193
193
  }, 300);
194
- return (R, $) => (h(), K("div", Io, [
195
- e.hideRecordsPerPage ? G("", !0) : (h(), K("div", Do, [
196
- q(B(d(u)("common.system.datatable.itemsPerPage")) + ": ", 1),
197
- i(ko, {
194
+ return (R, $) => (y(), K("div", Po, [
195
+ e.hideRecordsPerPage ? H("", !0) : (y(), K("div", Io, [
196
+ G(B(d(f)("common.system.datatable.itemsPerPage")) + ": ", 1),
197
+ i(bo, {
198
198
  modelValue: d(n).rowsPerPage,
199
- "onUpdate:modelValue": $[0] || ($[0] = (X) => d(n).rowsPerPage = X),
199
+ "onUpdate:modelValue": $[0] || ($[0] = (Y) => d(n).rowsPerPage = Y),
200
200
  class: "ml-2",
201
201
  density: "compact",
202
202
  mandatory: "",
203
203
  "data-cy": "table-size"
204
204
  }, {
205
205
  default: r(() => [
206
- (h(!0), K(ye, null, _e(e.itemsPerPageOptions, (X) => (h(), Y(_, {
207
- key: X,
208
- color: X === d(n).rowsPerPage ? "secondary" : "",
209
- value: X,
206
+ (y(!0), K(ve, null, Ze(e.itemsPerPageOptions, (Y) => (y(), W(_, {
207
+ key: Y,
208
+ color: Y === d(n).rowsPerPage ? "secondary" : "",
209
+ value: Y,
210
210
  density: "compact",
211
211
  size: "small",
212
212
  variant: "text"
213
213
  }, {
214
214
  default: r(() => [
215
- q(B(X), 1)
215
+ G(B(Y), 1)
216
216
  ]),
217
217
  _: 2
218
218
  }, 1032, ["color", "value"]))), 128))
@@ -220,55 +220,55 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
220
220
  _: 1
221
221
  }, 8, ["modelValue"])
222
222
  ])),
223
- M("div", To, B(b.value) + " - " + B(k.value) + " " + B(d(u)("common.system.datatable.from")) + " " + B(N.value), 1),
223
+ M("div", Do, B(b.value) + " - " + B(k.value) + " " + B(d(f)("common.system.datatable.from")) + " " + B(N.value), 1),
224
224
  M("div", Eo, [
225
225
  i(_, {
226
226
  disabled: s.value,
227
227
  icon: "mdi-page-first",
228
228
  size: "small",
229
229
  variant: "text",
230
- onClick: ae(d(V), ["stop"])
230
+ onClick: le(d(V), ["stop"])
231
231
  }, null, 8, ["disabled", "onClick"]),
232
232
  i(_, {
233
233
  disabled: s.value,
234
234
  icon: "mdi-chevron-left",
235
235
  size: "small",
236
236
  variant: "text",
237
- onClick: ae(d(E), ["stop"])
237
+ onClick: le(d(T), ["stop"])
238
238
  }, null, 8, ["disabled", "onClick"])
239
239
  ]),
240
- M("div", $o, [
240
+ M("div", To, [
241
241
  M("span", null, B(d(n).page), 1)
242
242
  ]),
243
- M("div", Fo, [
243
+ M("div", $o, [
244
244
  i(_, {
245
245
  disabled: D.value,
246
246
  icon: "mdi-chevron-right",
247
247
  size: "small",
248
248
  variant: "text",
249
- onClick: ae(d(j), ["stop"])
249
+ onClick: le(d(j), ["stop"])
250
250
  }, null, 8, ["disabled", "onClick"]),
251
251
  i(_, {
252
252
  disabled: C.value,
253
253
  icon: "mdi-page-last",
254
254
  size: "small",
255
255
  variant: "text",
256
- onClick: ae(d(I), ["stop"])
256
+ onClick: le(d(I), ["stop"])
257
257
  }, null, 8, ["disabled", "onClick"])
258
258
  ])
259
259
  ]));
260
260
  }
261
- }), Ro = (e, w, c = "id") => {
262
- const { querySetLimit: n, querySetOffset: u, querySetOrder: p, queryBuild: y, queryAddFilter: b, queryAdd: k } = Oa(), s = e.length;
263
- return n(s), u(1, s), p(c, !1), w ? k(c, e.join(",")) : b("in", c, e.join(",")), y();
264
- }, xi = (e) => {
261
+ }), Bo = (e, w, u = "id") => {
262
+ const { querySetLimit: n, querySetOffset: f, querySetOrder: h, queryBuild: p, queryAddFilter: b, queryAdd: k } = Na(), s = e.length;
263
+ return n(s), f(1, s), h(u, !1), w ? k(u, e.join(",")) : b("in", u, e.join(",")), p();
264
+ }, Ci = (e) => {
265
265
  const {
266
266
  client: w,
267
- system: c,
267
+ system: u,
268
268
  entity: n,
269
- urlTemplate: u,
270
- urlParams: p,
271
- options: y = {},
269
+ urlTemplate: f,
270
+ urlParams: h,
271
+ options: p = {},
272
272
  isSearchApi: b = !1,
273
273
  field: k = "id",
274
274
  silentConsoleError: s = !1
@@ -277,25 +277,25 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
277
277
  return {
278
278
  executeFetch: async (V, I = {}) => {
279
279
  C = new AbortController();
280
- const { urlTemplate: E, urlParams: j } = I;
280
+ const { urlTemplate: T, urlParams: j } = I;
281
281
  try {
282
- const R = Et(j) ? j : p, $ = Et(E) ? E : u;
282
+ const R = Et(j) ? j : h, $ = Et(T) ? T : f;
283
283
  if (pe($)) throw new Error("Url template is undefined");
284
- const X = (pe(R) ? $ : In($, R)) + Ro(V, b, k), S = await w().get(X, {
285
- ...y,
284
+ const Y = (pe(R) ? $ : Pn($, R)) + Bo(V, b, k), A = await w().get(Y, {
285
+ ...p,
286
286
  signal: C.signal
287
287
  });
288
- if (!Dn(S.status))
289
- throw new Tn(S.status);
290
- if (S.data?.data)
291
- return S.data.data;
292
- if (S.status === En)
288
+ if (!In(A.status))
289
+ throw new Dn(A.status);
290
+ if (A.data?.data)
291
+ return A.data.data;
292
+ if (A.status === En)
293
293
  return [];
294
- throw new $t();
294
+ throw new Tt();
295
295
  } catch (R) {
296
296
  if (R instanceof DOMException && R.name === "AbortError")
297
297
  return [];
298
- throw $n(R) ? R : Fn(R) ? new Bn(R, R.config?.url) : Rn(R) ? new Kn(R, c, n, R) : Vn(R) ? new Ln(R, c, n, R) : Mn(R) ? new zn(R, R) : Nn(R) ? new On(R) : la.isAxiosError(R) ? (s || console.error("Axios error: " + u, ...R.cause ? [R.cause] : []), new Un(R)) : (s || console.error("AnzuFatalError: ", R), new $t(R));
298
+ throw Tn(R) ? R : $n(R) ? new Fn(R, R.config?.url) : Bn(R) ? new Rn(R, u, n, R) : Kn(R) ? new Vn(R, u, n, R) : Ln(R) ? new Mn(R, R) : zn(R) ? new Nn(R) : oa.isAxiosError(R) ? (s || console.error("Axios error: " + f, ...R.cause ? [R.cause] : []), new On(R)) : (s || console.error("AnzuFatalError: ", R), new Tt(R));
299
299
  } finally {
300
300
  C = null;
301
301
  }
@@ -304,14 +304,14 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
304
304
  C && C.abort();
305
305
  }
306
306
  };
307
- }, Ai = (e) => {
307
+ }, xi = (e) => {
308
308
  const {
309
309
  client: w,
310
- system: c,
310
+ system: u,
311
311
  entity: n,
312
- urlTemplate: u,
313
- urlParams: p,
314
- options: y = {},
312
+ urlTemplate: f,
313
+ urlParams: h,
314
+ options: p = {},
315
315
  silentConsoleError: b = !1
316
316
  } = e;
317
317
  let k = null;
@@ -320,66 +320,66 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
320
320
  k = new AbortController();
321
321
  const {
322
322
  urlTemplate: I,
323
- urlParams: E,
323
+ urlParams: T,
324
324
  sortBy: j = "id",
325
325
  sortDesc: R = !0,
326
326
  batchSize: $ = 100,
327
- forceElastic: X = !1
327
+ forceElastic: Y = !1
328
328
  } = V;
329
329
  try {
330
- const S = N.general.elastic || X ? "/search" : "", J = Et(E) ? E : p, L = Et(I) ? I : u;
330
+ const A = N.general.elastic || Y ? "/search" : "", J = Et(T) ? T : h, L = Et(I) ? I : f;
331
331
  if (pe(L)) throw new Error("Url template is undefined");
332
- const { pagination: T } = jn(j, R ? Oe.Desc : Oe.Asc, {
332
+ const { pagination: E } = Un(j, R ? Ue.Desc : Ue.Asc, {
333
333
  rowsPerPage: $
334
- }), ee = (pe(J) ? L : In(L, J)) + S, le = [], Q = await w().get(
335
- ee + Xt(T, D, N),
334
+ }), ee = (pe(J) ? L : Pn(L, J)) + A, se = [], X = await w().get(
335
+ ee + Yt(E, D, N),
336
336
  {
337
- ...y,
337
+ ...p,
338
338
  signal: k.signal
339
339
  }
340
340
  );
341
- if (!Dn(Q.status))
342
- throw new Tn(Q.status);
343
- if (Q.data) {
344
- const ne = Q.data;
345
- if (le.push(...ne.data), Ua(ne))
346
- for (T.value.hasNextPage = ne.hasNextPage; T.value.hasNextPage; ) {
347
- T.value.page++;
341
+ if (!In(X.status))
342
+ throw new Dn(X.status);
343
+ if (X.data) {
344
+ const ae = X.data;
345
+ if (se.push(...ae.data), Oa(ae))
346
+ for (E.value.hasNextPage = ae.hasNextPage; E.value.hasNextPage; ) {
347
+ E.value.page++;
348
348
  const P = (await w().get(
349
- ee + Xt(T, D, N),
349
+ ee + Yt(E, D, N),
350
350
  {
351
- ...y,
351
+ ...p,
352
352
  signal: k.signal
353
353
  }
354
354
  )).data;
355
- le.push(...P.data), T.value.hasNextPage = P.hasNextPage;
355
+ se.push(...P.data), E.value.hasNextPage = P.hasNextPage;
356
356
  }
357
- else if (ja(ne)) {
358
- if (T.value.totalCount = ne.totalCount, T.value.totalCount <= T.value.rowsPerPage)
359
- return le;
360
- const de = [], P = Math.ceil(T.value.totalCount / T.value.rowsPerPage);
357
+ else if (Ua(ae)) {
358
+ if (E.value.totalCount = ae.totalCount, E.value.totalCount <= E.value.rowsPerPage)
359
+ return se;
360
+ const re = [], P = Math.ceil(E.value.totalCount / E.value.rowsPerPage);
361
361
  for (let v = 1; v < P; v++) {
362
- const x = { ...T.value, page: v + 1 }, F = ue(x);
363
- de.push(
364
- w().get(ee + Xt(F, D, N), {
365
- ...y,
362
+ const S = { ...E.value, page: v + 1 }, F = ce(S);
363
+ re.push(
364
+ w().get(ee + Yt(F, D, N), {
365
+ ...p,
366
366
  signal: k.signal
367
367
  })
368
368
  );
369
369
  }
370
- (await Promise.all(de)).forEach((v) => {
371
- le.push(...v.data.data);
370
+ (await Promise.all(re)).forEach((v) => {
371
+ se.push(...v.data.data);
372
372
  });
373
373
  }
374
- return le;
374
+ return se;
375
375
  }
376
- if (Q.status === En)
376
+ if (X.status === En)
377
377
  return [];
378
- throw new $t();
379
- } catch (S) {
380
- if (S instanceof DOMException && S.name === "AbortError")
378
+ throw new Tt();
379
+ } catch (A) {
380
+ if (A instanceof DOMException && A.name === "AbortError")
381
381
  return [];
382
- throw $n(S) ? S : Fn(S) ? new Bn(S, S.config?.url) : Rn(S) ? new Kn(S, c, n, S) : Vn(S) ? new Ln(S, c, n, S) : Mn(S) ? new zn(S, S) : Nn(S) ? new On(S) : la.isAxiosError(S) ? (b || console.error("Axios error: " + u, ...S.cause ? [S.cause] : []), new Un(S)) : (b || console.error("AnzuFatalError: ", S), new $t(S));
382
+ throw Tn(A) ? A : $n(A) ? new Fn(A, A.config?.url) : Bn(A) ? new Rn(A, u, n, A) : Kn(A) ? new Vn(A, u, n, A) : Ln(A) ? new Mn(A, A) : zn(A) ? new Nn(A) : oa.isAxiosError(A) ? (b || console.error("Axios error: " + f, ...A.cause ? [A.cause] : []), new On(A)) : (b || console.error("AnzuFatalError: ", A), new Tt(A));
383
383
  } finally {
384
384
  k = null;
385
385
  }
@@ -388,51 +388,51 @@ const So = { class: "d-flex align-center justify-center" }, Po = { class: "text-
388
388
  k && k.abort();
389
389
  }
390
390
  };
391
- }, Pt = "/adm/v1/job", It = "job";
392
- function Si(e, w) {
391
+ }, St = "/adm/v1/job", Pt = "job";
392
+ function Ai(e, w) {
393
393
  return {
394
- useFetchJobList: () => Wa({ client: e, system: w, entity: It, urlTemplate: Pt }),
395
- fetchJob: (y) => Ja(e, Pt + "/:id", { id: y }, w, It),
396
- createJob: (y) => {
397
- const b = Ga(y._resourceName).slice(4).replace("-kind-", "-kind/");
398
- return Ha(e, y, Pt + "/:type", { type: b }, w, It);
394
+ useFetchJobList: () => Ja({ client: e, system: w, entity: Pt, urlTemplate: St }),
395
+ fetchJob: (p) => Ha(e, St + "/:id", { id: p }, w, Pt),
396
+ createJob: (p) => {
397
+ const b = qa(p._resourceName).slice(4).replace("-kind-", "-kind/");
398
+ return Ga(e, p, St + "/:type", { type: b }, w, Pt);
399
399
  },
400
- deleteJob: (y) => qa(e, Pt + "/:id", { id: y }, w, It)
400
+ deleteJob: (p) => ja(e, St + "/:id", { id: p }, w, Pt)
401
401
  };
402
402
  }
403
- const Ko = {
403
+ const Ro = {
404
404
  key: "",
405
405
  title: void 0,
406
406
  sortable: !1,
407
407
  fixed: !1
408
- }, Vo = {
408
+ }, Ko = {
409
409
  storeColumnsLocalStorage: !0,
410
410
  disableActions: !1,
411
411
  customI18n: void 0,
412
412
  showExpand: !1
413
413
  };
414
- function Lo(e, w, c, n, u = {}) {
415
- const p = { ...Vo, ...u }, y = p.customI18n ?? Ya, { t: b } = y.global || y;
414
+ function Vo(e, w, u, n, f = {}) {
415
+ const h = { ...Ko, ...f }, p = h.customI18n ?? Wa, { t: b } = p.global || p;
416
416
  let k;
417
- _a(p.storeColumnsLocalStorage) ? k = p.storeColumnsLocalStorage : eo(p.storeColumnsLocalStorage) && p.storeColumnsLocalStorage === !0 && (k = "table_" + c + "_" + n);
417
+ Za(h.storeColumnsLocalStorage) ? k = h.storeColumnsLocalStorage : _a(h.storeColumnsLocalStorage) && h.storeColumnsLocalStorage === !0 && (k = "table_" + u + "_" + n);
418
418
  const s = e.map((V) => {
419
- const I = { ...Ko, ...V };
420
- return pe(I.title) && (pe(I.title) && Xa.includes(I.key) ? I.title = b("common.model.tracking." + I.key) : pe(I.title) && c && n ? I.title = b(c + "." + n + ".model." + I.key) : I.title = ""), I;
419
+ const I = { ...Ro, ...V };
420
+ return pe(I.title) && (pe(I.title) && Ya.includes(I.key) ? I.title = b("common.model.tracking." + I.key) : pe(I.title) && u && n ? I.title = b(u + "." + n + ".model." + I.key) : I.title = ""), I;
421
421
  }), C = g(() => {
422
422
  const V = [];
423
- return p.showExpand && V.push({ key: "data-table-expand", sortable: !1 }), s.forEach((I) => {
423
+ return h.showExpand && V.push({ key: "data-table-expand", sortable: !1 }), s.forEach((I) => {
424
424
  w.value.includes(I.key) || V.push(I);
425
- }), p.disableActions || V.push({ key: "actions", sortable: !1, fixed: "end" }), V;
425
+ }), h.disableActions || V.push({ key: "actions", sortable: !1, fixed: "end" }), V;
426
426
  }), D = () => {
427
427
  if (!k || !localStorage) return;
428
428
  const V = localStorage.getItem(k);
429
429
  if (!V) return;
430
430
  const I = JSON.parse(V);
431
- Qa(I) && Za(I.hidden) && (w.value = I.hidden);
431
+ Xa(I) && Qa(I.hidden) && (w.value = I.hidden);
432
432
  }, N = (V) => {
433
433
  !k || !localStorage || localStorage.setItem(k, JSON.stringify({ hidden: V }));
434
434
  };
435
- return _t(() => {
435
+ return Zt(() => {
436
436
  D();
437
437
  }), Ee(w, (V) => {
438
438
  N(V);
@@ -442,84 +442,84 @@ function Lo(e, w, c, n, u = {}) {
442
442
  columnsHidden: w
443
443
  };
444
444
  }
445
- function Pi(e, w, c, n, u, p, y, b = null, k = void 0, s = !1) {
446
- const C = ue(!1), D = ue([]), N = ue([]), V = ue(!1), { pagination: I, setSortBy: E, incrementPage: j } = jn(
447
- vt(b) ? null : b.key,
445
+ function Si(e, w, u, n, f, h, p, b = null, k = void 0, s = !1) {
446
+ const C = ce(!1), D = ce([]), N = ce([]), V = ce(!1), { pagination: I, setSortBy: T, incrementPage: j } = Un(
447
+ mt(b) ? null : b.key,
448
448
  b?.order
449
- ), { resetFilter: R, submitFilter: $ } = to(p, y, {
449
+ ), { resetFilter: R, submitFilter: $ } = eo(h, p, {
450
450
  storeFiltersLocalStorage: !1,
451
451
  populateUrlParams: !1
452
- }), { showErrorsDefault: X } = qn(), { columnsVisible: S, columnsAll: J, columnsHidden: L } = Lo(
452
+ }), { showErrorsDefault: Y } = jn(), { columnsVisible: A, columnsAll: J, columnsHidden: L } = Vo(
453
453
  e,
454
454
  w,
455
- c,
455
+ u,
456
456
  n,
457
457
  { storeColumnsLocalStorage: !1, disableActions: !s }
458
- ), T = () => {
459
- Q(), de();
460
- }, ee = (m) => {
461
- E(m.sortBy), de();
462
- }, le = async () => {
458
+ ), E = () => {
459
+ X(), re();
460
+ }, ee = (c) => {
461
+ T(c.sortBy), re();
462
+ }, se = async () => {
463
463
  V.value = !0, j();
464
464
  try {
465
- const m = await u(I, p, y, k);
466
- D.value.push(...m);
467
- } catch (m) {
468
- X(m);
465
+ const c = await f(I, h, p, k);
466
+ D.value.push(...c);
467
+ } catch (c) {
468
+ Y(c);
469
469
  } finally {
470
470
  V.value = !1;
471
471
  }
472
- }, Q = () => {
472
+ }, X = () => {
473
473
  D.value = [], N.value = [];
474
- }, ne = async () => {
474
+ }, ae = async () => {
475
475
  V.value = !0;
476
476
  try {
477
- D.value = await u(
477
+ D.value = await f(
478
478
  I,
479
+ h,
479
480
  p,
480
- y,
481
481
  k
482
482
  );
483
- } catch (m) {
484
- X(m);
483
+ } catch (c) {
484
+ Y(c);
485
485
  } finally {
486
486
  V.value = !1;
487
487
  }
488
- }, de = bo(async () => {
489
- await ne();
488
+ }, re = go(async () => {
489
+ await ae();
490
490
  });
491
491
  return {
492
492
  items: D,
493
493
  selected: N,
494
494
  pagination: I,
495
- columnsVisible: S,
495
+ columnsVisible: A,
496
496
  columnsHidden: L,
497
497
  columnsAll: J,
498
498
  filterTouched: C,
499
499
  loading: V,
500
- onRowClick: (m) => {
501
- const v = m.target;
500
+ onRowClick: (c) => {
501
+ const v = c.target;
502
502
  if (!v || v.tagName === "INPUT" && v.type === "checkbox")
503
503
  return;
504
- const x = v.closest(".v-data-table__tr");
505
- if (!x || !x.classList.contains("v-data-table__tr")) return;
506
- const F = x.firstElementChild;
504
+ const S = v.closest(".v-data-table__tr");
505
+ if (!S || !S.classList.contains("v-data-table__tr")) return;
506
+ const F = S.firstElementChild;
507
507
  if (!F || !F.classList.contains("v-data-table__td")) return;
508
- const U = F.querySelector("input");
509
- U && U.click();
508
+ const O = F.querySelector("input");
509
+ O && O.click();
510
510
  },
511
- onFetchNextPage: le,
512
- onOpen: T,
511
+ onFetchNextPage: se,
512
+ onOpen: E,
513
513
  sortByChange: ee,
514
- getList: de,
515
- resetFilter: () => R(I, de),
516
- submitFilter: () => $(I, de)
514
+ getList: re,
515
+ resetFilter: () => R(I, re),
516
+ submitFilter: () => $(I, re)
517
517
  };
518
518
  }
519
- const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class: "d-flex justify-space-between w-100 align-center" }, No = { class: "d-flex align-center" }, Oo = { class: "d-flex align-center" }, Uo = { class: "subject-select__sidebar system-border-r" }, jo = { class: "subject-select-filter" }, qo = { class: "subject-select__content" }, Go = {
519
+ const Lo = { class: "d-flex flex-column w-100 px-1 align-center" }, Mo = { class: "d-flex justify-space-between w-100 align-center" }, zo = { class: "d-flex align-center" }, No = { class: "d-flex align-center" }, Oo = { class: "subject-select__sidebar system-border-r" }, Uo = { class: "subject-select-filter" }, jo = { class: "subject-select__content" }, qo = {
520
520
  key: 0,
521
521
  class: "d-flex w-100 align-center justify-center pa-4"
522
- }, Ho = { class: "subject-select__actions system-border-t" }, Jo = { key: 0 }, Wo = { key: 1 }, Ii = /* @__PURE__ */ Ge({
522
+ }, Go = { class: "subject-select__actions system-border-t" }, Ho = { key: 0 }, Jo = { key: 1 }, Pi = /* @__PURE__ */ He({
523
523
  __name: "ASubjectSelect",
524
524
  props: {
525
525
  selectedItems: {},
@@ -533,76 +533,76 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
533
533
  autoOpen: { type: Boolean, default: !1 }
534
534
  },
535
535
  emits: ["update:modelValue", "update:pagination", "onOpen", "onPageChange", "onConfirm", "onFetchNextPage"],
536
- setup(e, { expose: w, emit: c }) {
537
- const n = e, u = c, p = ue(!1), y = g({
536
+ setup(e, { expose: w, emit: u }) {
537
+ const n = e, f = u, h = ce(!1), p = g({
538
538
  get() {
539
- return pe(n.modelValue) ? p.value : n.modelValue;
539
+ return pe(n.modelValue) ? h.value : n.modelValue;
540
540
  },
541
- set(T) {
542
- p.value = T, u("update:modelValue", T);
541
+ set(E) {
542
+ h.value = E, f("update:modelValue", E);
543
543
  }
544
544
  }), b = g({
545
545
  get: () => n.pagination,
546
- set: (T) => {
547
- u("update:pagination", { ...bn(T) });
546
+ set: (E) => {
547
+ f("update:pagination", { ...gn(E) });
548
548
  }
549
- }), { mdAndDown: k } = nn(), s = ue(!k.value), C = () => {
549
+ }), { mdAndDown: k } = tn(), s = ce(!k.value), C = () => {
550
550
  k.value && (s.value = !1);
551
551
  };
552
- na(no, C);
553
- const { t: D } = He(), N = g(() => n.selectedItems.length), V = g(() => N.value < n.minCount || N.value > n.maxCount), I = () => {
554
- u("onOpen"), s.value = !k.value, y.value = !0;
555
- }, E = () => {
552
+ ta(to, C);
553
+ const { t: D } = Je(), N = g(() => n.selectedItems.length), V = g(() => N.value < n.minCount || N.value > n.maxCount), I = () => {
554
+ f("onOpen"), s.value = !k.value, p.value = !0;
555
+ }, T = () => {
556
556
  s.value = !s.value;
557
557
  }, j = () => {
558
- y.value = !1;
558
+ p.value = !1;
559
559
  }, R = () => {
560
- u(
560
+ f(
561
561
  "onConfirm",
562
- n.selectedItems.map((T) => bn(T))
562
+ n.selectedItems.map((E) => gn(E))
563
563
  ), j();
564
564
  }, $ = () => {
565
- u("onFetchNextPage");
566
- }, X = () => {
567
- u("onPageChange");
568
- }, S = g(() => Math.ceil(b.value.totalCount / b.value.rowsPerPage)), J = g(() => !(vt(b.value.hasNextPage) && b.value.page === S.value || b.value.hasNextPage === !1)), L = (T) => {
569
- T && J.value && !n.loading && $();
565
+ f("onFetchNextPage");
566
+ }, Y = () => {
567
+ f("onPageChange");
568
+ }, A = g(() => Math.ceil(b.value.totalCount / b.value.rowsPerPage)), J = g(() => !(mt(b.value.hasNextPage) && b.value.page === A.value || b.value.hasNextPage === !1)), L = (E) => {
569
+ E && J.value && !n.loading && $();
570
570
  };
571
- return _t(() => {
571
+ return Zt(() => {
572
572
  n.autoOpen && I();
573
573
  }), w({
574
574
  open: I,
575
575
  closeSidebarOnMobile: C
576
- }), (T, ee) => {
577
- const le = kn("ABtnSecondary"), Q = kn("ABtnPrimary");
578
- return h(), K(ye, null, [
579
- z(T.$slots, "activator", {
580
- props: { onClick: ae(() => I(), ["stop"]) }
576
+ }), (E, ee) => {
577
+ const se = bn("ABtnSecondary"), X = bn("ABtnPrimary");
578
+ return y(), K(ve, null, [
579
+ z(E.$slots, "activator", {
580
+ props: { onClick: le(() => I(), ["stop"]) }
581
581
  }),
582
- i(on, oe(T.$attrs, {
583
- "model-value": y.value,
582
+ i(an, ie(E.$attrs, {
583
+ "model-value": p.value,
584
584
  fullscreen: "",
585
585
  class: "subject-select",
586
- "onUpdate:modelValue": ee[1] || (ee[1] = (ne) => u("update:modelValue", ne))
586
+ "onUpdate:modelValue": ee[1] || (ee[1] = (ae) => f("update:modelValue", ae))
587
587
  }), {
588
588
  default: r(() => [
589
- y.value ? (h(), Y(an, {
589
+ p.value ? (y(), W(nn, {
590
590
  key: 0,
591
591
  class: "subject-select__card"
592
592
  }, {
593
593
  default: r(() => [
594
- i(ao, {
594
+ i(no, {
595
595
  class: "subject-select__toolbar system-border-b",
596
596
  onOnCancel: j
597
597
  }, {
598
598
  default: r(() => [
599
- z(T.$slots, "title", {}, () => [
600
- q(B(d(D)(e.dialogTitleT)), 1)
599
+ z(E.$slots, "title", {}, () => [
600
+ G(B(d(D)(e.dialogTitleT)), 1)
601
601
  ])
602
602
  ]),
603
603
  _: 3
604
604
  }),
605
- i(wo, {
605
+ i(ko, {
606
606
  density: "compact",
607
607
  color: "transparent",
608
608
  height: 46,
@@ -610,37 +610,37 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
610
610
  class: "system-border-b subject-select__second-bar"
611
611
  }, {
612
612
  default: r(() => [
613
- z(T.$slots, "second-bar", {}, () => [
614
- M("div", Mo, [
615
- M("div", zo, [
616
- M("div", No, [
613
+ z(E.$slots, "second-bar", {}, () => [
614
+ M("div", Lo, [
615
+ M("div", Mo, [
616
+ M("div", zo, [
617
617
  i(_, {
618
618
  icon: "",
619
619
  width: 30,
620
620
  height: 30,
621
- onClick: E
621
+ onClick: T
622
622
  }, {
623
623
  default: r(() => [
624
- i(te, {
624
+ i(ne, {
625
625
  icon: "mdi-tune",
626
626
  size: 16
627
627
  }),
628
- i(Te, {
628
+ i(De, {
629
629
  activator: "parent",
630
630
  location: "bottom"
631
631
  }, {
632
632
  default: r(() => [
633
- q(B(d(D)("common.subjectSelect.filter.toggle")), 1)
633
+ G(B(d(D)("common.subjectSelect.filter.toggle")), 1)
634
634
  ]),
635
635
  _: 1
636
636
  })
637
637
  ]),
638
638
  _: 1
639
639
  }),
640
- z(T.$slots, "second-bar-left")
640
+ z(E.$slots, "second-bar-left")
641
641
  ]),
642
- M("div", Oo, [
643
- z(T.$slots, "second-bar-right")
642
+ M("div", No, [
643
+ z(E.$slots, "second-bar-right")
644
644
  ])
645
645
  ])
646
646
  ])
@@ -649,61 +649,61 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
649
649
  _: 3
650
650
  }),
651
651
  M("div", {
652
- class: Pe(["subject-select__main", { "subject-select__main--sidebar-active": s.value }])
652
+ class: xe(["subject-select__main", { "subject-select__main--sidebar-active": s.value }])
653
653
  }, [
654
- M("div", Uo, [
655
- M("div", jo, [
656
- z(T.$slots, "filter")
654
+ M("div", Oo, [
655
+ M("div", Uo, [
656
+ z(E.$slots, "filter")
657
657
  ])
658
658
  ]),
659
- M("div", qo, [
660
- z(T.$slots, "content"),
661
- e.paginationMode === "more" ? (h(), K("div", Go, [
662
- ho((h(), Y(le, {
659
+ M("div", jo, [
660
+ z(E.$slots, "content"),
661
+ e.paginationMode === "more" ? (y(), K("div", qo, [
662
+ yo((y(), W(se, {
663
663
  loading: e.loading,
664
664
  size: "small",
665
665
  onClick: $
666
666
  }, {
667
667
  default: r(() => [
668
- z(T.$slots, "button-confirm-title", {}, () => [
669
- q(B(d(D)("common.button.loadMore")), 1)
668
+ z(E.$slots, "button-confirm-title", {}, () => [
669
+ G(B(d(D)("common.button.loadMore")), 1)
670
670
  ])
671
671
  ]),
672
672
  _: 3
673
673
  }, 8, ["loading"])), [
674
- [po, J.value || e.loading],
674
+ [ho, J.value || e.loading],
675
675
  [
676
- Co,
676
+ wo,
677
677
  L,
678
678
  void 0,
679
679
  { quiet: !0 }
680
680
  ]
681
681
  ])
682
- ])) : (h(), Y(Bo, {
682
+ ])) : (y(), W(Fo, {
683
683
  key: 1,
684
684
  modelValue: b.value,
685
- "onUpdate:modelValue": ee[0] || (ee[0] = (ne) => b.value = ne),
686
- onChange: X
685
+ "onUpdate:modelValue": ee[0] || (ee[0] = (ae) => b.value = ae),
686
+ onChange: Y
687
687
  }, null, 8, ["modelValue"]))
688
688
  ])
689
689
  ], 2),
690
- M("div", Ho, [
691
- e.minCount === e.maxCount ? (h(), K("div", Jo, B(d(D)("common.subjectSelect.texts.pickExactCount", {
690
+ M("div", Go, [
691
+ e.minCount === e.maxCount ? (y(), K("div", Ho, B(d(D)("common.subjectSelect.texts.pickExactCount", {
692
692
  count: e.minCount,
693
693
  selected: N.value
694
- })), 1)) : (h(), K("div", Wo, B(d(D)("common.subjectSelect.texts.pickRangeCount", {
694
+ })), 1)) : (y(), K("div", Jo, B(d(D)("common.subjectSelect.texts.pickRangeCount", {
695
695
  minCount: e.minCount,
696
696
  maxCount: e.maxCount,
697
697
  selected: N.value
698
698
  })), 1)),
699
- i(ln),
700
- i(Q, {
699
+ i(on),
700
+ i(X, {
701
701
  disabled: V.value,
702
- onClick: ae(R, ["stop"])
702
+ onClick: le(R, ["stop"])
703
703
  }, {
704
704
  default: r(() => [
705
- z(T.$slots, "button-confirm-title", {}, () => [
706
- q(B(d(D)("common.button.confirm")), 1)
705
+ z(E.$slots, "button-confirm-title", {}, () => [
706
+ G(B(d(D)("common.button.confirm")), 1)
707
707
  ])
708
708
  ]),
709
709
  _: 3
@@ -711,47 +711,47 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
711
711
  ])
712
712
  ]),
713
713
  _: 3
714
- })) : G("", !0)
714
+ })) : H("", !0)
715
715
  ]),
716
716
  _: 3
717
717
  }, 16, ["model-value"])
718
718
  ], 64);
719
719
  };
720
720
  }
721
- }), Yo = {
721
+ }), Wo = {
722
722
  key: 0,
723
723
  class: "a-le-header"
724
- }, Xo = {
724
+ }, Yo = {
725
725
  key: 0,
726
726
  class: "a-le-title-heading"
727
- }, Qo = {
727
+ }, Xo = {
728
728
  key: 1,
729
729
  class: "a-le-state a-le-state--loading"
730
- }, Zo = {
730
+ }, Qo = {
731
731
  key: 2,
732
732
  class: "a-le-state a-le-state--error"
733
- }, _o = {
733
+ }, Zo = {
734
734
  key: 3,
735
735
  class: "a-le-state a-le-state--empty"
736
- }, el = ["data-id", "tabindex", "onKeydown"], tl = ["onClick"], nl = { class: "a-le-row-main" }, al = { class: "a-le-title" }, ol = {
736
+ }, _o = ["data-id", "tabindex", "onKeydown"], el = ["onClick"], tl = { class: "a-le-row-main" }, nl = { class: "a-le-title" }, al = {
737
737
  key: 0,
738
738
  class: "a-le-status"
739
- }, ll = {
739
+ }, ol = {
740
740
  key: 0,
741
741
  class: "a-le-status-badge"
742
- }, il = { class: "a-le-actions" }, sl = { class: "a-le-row-body" }, rl = { class: "a-le-form" }, dl = {
742
+ }, ll = { class: "a-le-actions" }, il = { class: "a-le-row-body" }, sl = { class: "a-le-form" }, rl = {
743
743
  key: 0,
744
744
  class: "a-le-row-footer"
745
- }, cl = {
745
+ }, dl = {
746
746
  key: 1,
747
747
  class: "a-le-row-body"
748
- }, ul = { class: "a-le-form" }, fl = {
748
+ }, cl = { class: "a-le-form" }, ul = {
749
749
  class: "a-le-sr-only",
750
750
  "aria-live": "polite",
751
751
  role: "status"
752
- }, Di = /* @__PURE__ */ Ge({
752
+ }, Ii = /* @__PURE__ */ He({
753
753
  __name: "AListEditor",
754
- props: /* @__PURE__ */ Ve({
754
+ props: /* @__PURE__ */ Le({
755
755
  keyField: { default: "id" },
756
756
  positionField: { default: "position" },
757
757
  positionMultiplier: { default: 1 },
@@ -771,12 +771,13 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
771
771
  showAddAfterAction: { type: Boolean, default: !1 },
772
772
  addLabel: { default: null },
773
773
  emptyTitle: { default: null },
774
- emptyText: { default: null },
775
774
  disableRowClick: { type: Boolean, default: !1 },
776
775
  disableDeleteConfirm: { type: Boolean, default: !1 },
776
+ disableUnsaved: { type: Boolean, default: !1 },
777
777
  deleteConfirmTitle: { default: null },
778
778
  deleteConfirmText: { default: null },
779
779
  closeVariant: { default: "auto" },
780
+ defaultExpanded: { type: Boolean, default: !1 },
780
781
  loadingKeys: { default: null },
781
782
  getValidationState: { type: Function, default: void 0 },
782
783
  onDeleteConfirm: { type: Function, default: void 0 },
@@ -790,209 +791,206 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
790
791
  },
791
792
  unsavedKeysModifiers: {}
792
793
  }),
793
- emits: /* @__PURE__ */ Ve(["add", "edit", "deleted", "close", "item-saved", "item-expand"], ["update:modelValue", "update:unsavedKeys"]),
794
- setup(e, { expose: w, emit: c }) {
795
- const n = e, u = c, p = qe(e, "modelValue"), { t: y } = He(), b = aa(), k = nn(), s = Ft("rootEl"), C = g(() => k.platform.value.touch), D = oo(p, {
794
+ emits: /* @__PURE__ */ Le(["add", "edit", "deleted", "close", "item-saved", "item-expand"], ["update:modelValue", "update:unsavedKeys"]),
795
+ setup(e, { expose: w, emit: u }) {
796
+ const n = e, f = u, h = Ge(e, "modelValue"), { t: p } = Je(), b = na(), k = tn(), s = $t("rootEl"), C = g(() => k.platform.value.touch), D = ao(h, {
796
797
  keyField: n.keyField,
797
798
  positionField: n.positionField,
798
799
  positionMultiplier: n.positionMultiplier,
799
800
  updatePosition: n.updatePosition
800
- }), N = ue(/* @__PURE__ */ new Set()), V = Ft("rowsContainer"), I = g(() => !n.chips && !!b.item), E = g(() => !n.chips && !!b["item-readonly"]), { captureDirtyBaseline: j, rebaselineKey: R, isItemDirty: $ } = Gn(
801
- () => p.value.map((o) => ({
801
+ }), N = ce(/* @__PURE__ */ new Set()), V = $t("rowsContainer"), I = g(() => !n.chips && !!b.item), T = g(() => !n.chips && !!b["item-readonly"]), { captureDirtyBaseline: j, rebaselineKey: R, isItemDirty: $ } = qn(
802
+ () => h.value.map((o) => ({
802
803
  key: o[n.keyField],
803
804
  data: o
804
805
  })),
805
- { source: p }
806
+ { source: h }
806
807
  ), {
807
- editingKeys: X,
808
- editingSnapshots: S,
808
+ editingKeys: Y,
809
+ editingSnapshots: A,
809
810
  beginEdit: J,
810
811
  cancelEdit: L,
811
- commitEdit: T,
812
+ commitEdit: E,
812
813
  closeEdit: ee,
813
- requestAutoOpen: le
814
- } = Hn({
814
+ requestAutoOpen: se
815
+ } = Gn({
815
816
  rowsContainer: V,
816
817
  rowSelector: ".a-le-row",
817
818
  isInlineEdit: I,
818
- restoreSnapshot: (o, O) => D.updateItem(o, O),
819
- watchKeys: () => p.value.map((o) => o[n.keyField]),
819
+ restoreSnapshot: (o, U) => D.updateItem(o, U),
820
+ watchKeys: () => h.value.map((o) => o[n.keyField]),
820
821
  findEntry: (o) => {
821
- const O = p.value.find((f) => f[n.keyField] === o);
822
- return O ? { data: O } : null;
822
+ const U = h.value.find((m) => m[n.keyField] === o);
823
+ return U ? { data: U } : null;
823
824
  },
824
825
  afterAutoOpen: (o) => {
825
826
  N.value.delete(o);
826
827
  }
827
- }), Q = g(
828
- () => n.addLabel ? y(n.addLabel) : y("common.sortable.add")
829
- ), ne = g(() => n.emptyTitle ?? y("common.sortable.emptyTitle")), de = g(() => n.emptyText ?? y("common.sortable.emptyText")), P = g(
830
- () => n.deleteConfirmTitle ?? y("common.sortable.deleteConfirmTitle")
831
- ), m = g(
832
- () => n.deleteConfirmText ?? y("common.sortable.deleteConfirmText")
833
- ), v = g(() => !n.readonly && !n.disabled && !n.loading), x = g(() => v.value && n.showAddButton), F = g(() => !!(n.title || b.header)), U = g(() => !!n.onItemSave), H = g(() => {
828
+ }), X = g(
829
+ () => n.addLabel ? p(n.addLabel) : p("common.sortable.add")
830
+ ), ae = g(() => n.emptyTitle ?? p("common.sortable.emptyTitle")), re = g(
831
+ () => n.deleteConfirmTitle ?? p("common.sortable.deleteConfirmTitle")
832
+ ), P = g(
833
+ () => n.deleteConfirmText ?? p("common.sortable.deleteConfirmText")
834
+ ), c = g(() => !n.readonly && !n.disabled && !n.loading), v = g(() => c.value && n.showAddButton), S = g(() => !!(n.title || b.header)), F = g(() => !!n.onItemSave), O = g(() => {
834
835
  const o = /* @__PURE__ */ new Set();
835
- for (const O of p.value) {
836
- const f = O[n.keyField];
837
- $(f, O) && o.add(f);
836
+ for (const U of h.value) {
837
+ const m = U[n.keyField];
838
+ $(m, U) && o.add(m);
838
839
  }
839
840
  return o;
840
- }), ie = /* @__PURE__ */ new Map(), W = g(() => {
841
- const o = [], O = /* @__PURE__ */ new Set();
842
- for (const f of D.viewItems.value) {
843
- O.add(f.key);
844
- const me = X.value.has(f.key), ke = N.value.has(f.key), kt = n.loadingKeys?.has(f.key) ?? !1, at = H.value.has(f.key), Se = ie.get(f.key);
845
- if (Se && Se.raw === f.raw && Se.index === f.index && Se.position === f.position && Se.editing === me && Se.expanded === ke && Se.loading === kt && Se.dirty === at) {
846
- o.push(Se);
841
+ }), q = /* @__PURE__ */ new Map(), oe = g(() => {
842
+ const o = [], U = /* @__PURE__ */ new Set();
843
+ for (const m of D.viewItems.value) {
844
+ U.add(m.key);
845
+ const fe = Y.value.has(m.key), be = N.value.has(m.key), bt = n.loadingKeys?.has(m.key) ?? !1, nt = n.disableUnsaved ? !1 : O.value.has(m.key), Ce = q.get(m.key);
846
+ if (Ce && Ce.raw === m.raw && Ce.index === m.index && Ce.position === m.position && Ce.editing === fe && Ce.expanded === be && Ce.loading === bt && Ce.dirty === nt) {
847
+ o.push(Ce);
847
848
  continue;
848
849
  }
849
- const wt = {
850
- ...f,
851
- editing: me,
852
- expanded: ke,
853
- loading: kt,
854
- dirty: at
850
+ const kt = {
851
+ ...m,
852
+ editing: fe,
853
+ expanded: be,
854
+ loading: bt,
855
+ dirty: nt
855
856
  };
856
- ie.set(f.key, wt), o.push(wt);
857
+ q.set(m.key, kt), o.push(kt);
857
858
  }
858
- for (const f of ie.keys())
859
- O.has(f) || ie.delete(f);
859
+ for (const m of q.keys())
860
+ U.has(m) || q.delete(m);
860
861
  return o;
861
- }), se = g(() => W.value.length === 0), re = (o) => W.value.find((O) => O.key === o), fe = Jn({
862
- viewItems: g(() => W.value.map((o) => ({ key: o.key }))),
862
+ }), te = g(() => oe.value.length === 0), Q = (o) => oe.value.find((U) => U.key === o), ue = Hn({
863
+ viewItems: g(() => oe.value.map((o) => ({ key: o.key }))),
863
864
  variant: "flat",
864
- isReorderMode: ue(!1),
865
- disabled: g(() => !v.value),
866
- isEditing: (o) => X.value.has(o),
865
+ isReorderMode: ce(!1),
866
+ disabled: g(() => !c.value),
867
+ isEditing: (o) => Y.value.has(o),
867
868
  onToggleEdit: (o) => {
868
- const O = re(o);
869
- O && Ce(O);
869
+ const U = Q(o);
870
+ U && ye(U);
870
871
  },
871
872
  onCancelEdit: (o) => {
872
- const O = re(o);
873
- O && nt(O);
873
+ const U = Q(o);
874
+ U && tt(U);
874
875
  }
875
- }), Le = (o, O) => ea(o, O, {
876
- compactField: n.compactField,
877
- fallback: y("common.sortable.itemFallback")
878
- }), { resolveValidation: Be } = Wn({
879
- getValidationState: (o, O, f) => n.getValidationState?.(o, O, f) ?? null
880
- }), ge = () => {
881
- x.value && (le(), u("add", void 0));
882
- }, be = (o) => {
883
- v.value && (le(), u("add", { afterId: o.key }));
884
- }, Ce = (o) => {
885
- if (v.value) {
886
- if (X.value.has(o.key)) {
887
- nt(o);
876
+ }), ge = (o) => _n(o, { compactField: n.compactField }), { resolveValidation: Te } = Jn({
877
+ getValidationState: (o, U, m) => n.getValidationState?.(o, U, m) ?? null
878
+ }), Ae = () => {
879
+ v.value && (se(), f("add", void 0));
880
+ }, $e = (o) => {
881
+ c.value && (se(), f("add", { afterId: o.key }));
882
+ }, ye = (o) => {
883
+ if (c.value) {
884
+ if (Y.value.has(o.key)) {
885
+ tt(o);
888
886
  return;
889
887
  }
890
- I.value && (J(o), N.value.delete(o.key)), u("edit", o);
888
+ I.value && (J(o), N.value.delete(o.key)), f("edit", o);
891
889
  }
892
- }, Ie = (o) => {
890
+ }, Fe = (o) => {
893
891
  if (n.disabled || n.loading) return;
894
- const O = o.key, f = N.value.has(O);
895
- if (f)
896
- N.value.delete(O);
892
+ const U = o.key, m = N.value.has(U);
893
+ if (m)
894
+ N.value.delete(U);
897
895
  else {
898
- for (const me of N.value) N.value.delete(me);
899
- N.value.add(O);
896
+ for (const fe of N.value) N.value.delete(fe);
897
+ N.value.add(U);
900
898
  }
901
- u("item-expand", o, !f);
902
- }, Je = (o) => n.chips || n.disableRowClick || n.disabled || n.loading ? !1 : !!(o.editing || o.expanded || !n.readonly && n.showEditButton), We = (o) => {
903
- if (Je(o)) {
899
+ f("item-expand", o, !m);
900
+ }, Se = (o) => n.chips || n.disableRowClick || n.defaultExpanded || n.disabled || n.loading ? !1 : !!(o.editing || o.expanded || !n.readonly && n.showEditButton), _e = (o) => {
901
+ if (Se(o)) {
904
902
  if (o.editing || o.expanded) {
905
- nt(o);
903
+ tt(o);
906
904
  return;
907
905
  }
908
- n.readonly && E.value ? Ie(o) : Ce(o);
906
+ n.readonly && T.value ? Fe(o) : ye(o);
909
907
  }
910
908
  }, {
911
- deleteDialog: et,
912
- deleteInFlight: xe,
913
- deleteError: tt,
914
- onDeleteClick: Ye,
915
- onDeleteDialogConfirm: lt,
916
- onDeleteDialogCancel: it
917
- } = Yn({
909
+ deleteDialog: Me,
910
+ deleteInFlight: ht,
911
+ deleteError: we,
912
+ onDeleteClick: et,
913
+ onDeleteDialogConfirm: We,
914
+ onDeleteDialogCancel: lt
915
+ } = Wn({
918
916
  onDeleteConfirm: (o) => n.onDeleteConfirm ? n.onDeleteConfirm(o) : !0,
919
917
  onDelete: (o) => n.onDelete?.(o),
920
918
  onDeleted: (o) => {
921
- X.value.delete(o.key), S.value.delete(o.key), N.value.delete(o.key), u("deleted", o);
919
+ Y.value.delete(o.key), A.value.delete(o.key), N.value.delete(o.key), f("deleted", o);
922
920
  },
923
921
  disableDeleteConfirm: () => n.disableDeleteConfirm || n.chips
924
- }), Ae = async (o) => {
925
- v.value && await Ye(o);
926
- }, st = async (o) => {
927
- n.onItemSave && await n.onItemSave(o.raw), T(o), u("item-saved", o);
928
- }, pt = (o) => {
922
+ }), Ye = async (o) => {
923
+ c.value && await et(o);
924
+ }, Pe = async (o) => {
925
+ n.onItemSave && await n.onItemSave(o.raw), E(o), f("item-saved", o);
926
+ }, it = (o) => {
929
927
  L(o);
930
- }, nt = (o) => {
931
- ee(o), N.value.delete(o.key), u("close", o);
932
- }, Xe = /* @__PURE__ */ new Map(), Kt = (o) => {
933
- let O = Xe.get(o);
934
- return O || (O = {
928
+ }, tt = (o) => {
929
+ ee(o), N.value.delete(o.key), f("close", o);
930
+ }, Xe = /* @__PURE__ */ new Map(), Rt = (o) => {
931
+ let U = Xe.get(o);
932
+ return U || (U = {
935
933
  edit: () => {
936
- const f = re(o);
937
- f && Ce(f);
934
+ const m = Q(o);
935
+ m && ye(m);
938
936
  },
939
937
  save: () => {
940
- const f = re(o);
941
- if (f) return st(f);
938
+ const m = Q(o);
939
+ if (m) return Pe(m);
942
940
  },
943
941
  cancel: () => {
944
- const f = re(o);
945
- f && pt(f);
942
+ const m = Q(o);
943
+ m && it(m);
946
944
  },
947
945
  close: () => {
948
- const f = re(o);
949
- f && nt(f);
946
+ const m = Q(o);
947
+ m && tt(m);
950
948
  },
951
949
  delete: async () => {
952
- const f = re(o);
953
- f && await Ae(f);
950
+ const m = Q(o);
951
+ m && await Ye(m);
954
952
  },
955
953
  addAfter: () => {
956
- const f = re(o);
957
- f && be(f);
954
+ const m = Q(o);
955
+ m && $e(m);
958
956
  },
959
957
  toggleExpand: () => {
960
- const f = re(o);
961
- f && Ie(f);
958
+ const m = Q(o);
959
+ m && Fe(m);
962
960
  },
963
- update: (f) => D.updateItem(o, f)
964
- }, Xe.set(o, O)), O;
961
+ update: (m) => D.updateItem(o, m)
962
+ }, Xe.set(o, U)), U;
965
963
  };
966
964
  Ee(
967
- () => W.value,
965
+ () => oe.value,
968
966
  (o) => {
969
967
  if (Xe.size === 0) return;
970
- const O = new Set(o.map((f) => f.key));
971
- for (const f of Xe.keys())
972
- O.has(f) || Xe.delete(f);
968
+ const U = new Set(o.map((m) => m.key));
969
+ for (const m of Xe.keys())
970
+ U.has(m) || Xe.delete(m);
973
971
  }
974
972
  );
975
- const $e = (o) => ({
976
- item: { ...o, validationState: Be(o.raw, o.key, o.index) },
973
+ const Be = (o) => ({
974
+ item: { ...o, validationState: Te(o.raw, o.key, o.index) },
977
975
  raw: o.raw,
978
976
  index: o.index,
979
977
  key: o.key,
980
978
  readonly: n.readonly,
981
979
  disabled: n.disabled,
982
980
  expanded: o.expanded,
983
- editing: o.editing,
981
+ editing: o.editing || n.defaultExpanded,
984
982
  dirty: o.dirty,
985
983
  unsaved: o.dirty,
986
984
  touch: C.value,
987
- actions: Kt(o.key)
988
- }), gt = qe(e, "unsavedKeys"), Me = g(() => {
985
+ actions: Rt(o.key)
986
+ }), pt = Ge(e, "unsavedKeys"), ze = g(() => {
989
987
  const o = /* @__PURE__ */ new Set();
990
- for (const O of W.value)
991
- O.dirty && o.add(O.key);
988
+ for (const U of oe.value)
989
+ U.dirty && o.add(U.key);
992
990
  return o;
993
- }), { hasUnsavedChanges: Qe, unsavedCount: rt, clearUnsavedState: bt } = Xn({
994
- unsavedKeysModel: gt,
995
- internalUnsavedKeys: Me,
991
+ }), { hasUnsavedChanges: Qe, unsavedCount: st, clearUnsavedState: gt } = Yn({
992
+ unsavedKeysModel: pt,
993
+ internalUnsavedKeys: ze,
996
994
  onClearAll: () => j(),
997
995
  onClearKey: (o) => R(o)
998
996
  });
@@ -1005,12 +1003,12 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
1005
1003
  viewItems: D.viewItems,
1006
1004
  resetDirtyBaseline: j,
1007
1005
  hasUnsavedChanges: Qe,
1008
- unsavedCount: rt,
1009
- clearUnsavedState: bt
1010
- }), (o, O) => (h(), K("div", {
1006
+ unsavedCount: st,
1007
+ clearUnsavedState: gt
1008
+ }), (o, U) => (y(), K("div", {
1011
1009
  ref_key: "rootEl",
1012
1010
  ref: s,
1013
- class: Pe(["a-list-editor", [
1011
+ class: xe(["a-list-editor", [
1014
1012
  `a-list-editor--two-rows-${e.twoRows}`,
1015
1013
  {
1016
1014
  "a-list-editor--readonly": e.readonly,
@@ -1025,80 +1023,79 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
1025
1023
  ref: V,
1026
1024
  class: "a-le-card"
1027
1025
  }, [
1028
- F.value ? (h(), K("div", Yo, [
1026
+ S.value ? (y(), K("div", Wo, [
1029
1027
  z(o.$slots, "header", { title: e.title }, () => [
1030
- e.title ? (h(), K("h3", Xo, B(e.title), 1)) : G("", !0)
1028
+ e.title ? (y(), K("h3", Yo, B(e.title), 1)) : H("", !0)
1031
1029
  ])
1032
- ])) : G("", !0),
1033
- e.loading ? (h(), K("div", Qo, [
1034
- i(ra, {
1030
+ ])) : H("", !0),
1031
+ e.loading ? (y(), K("div", Xo, [
1032
+ i(sa, {
1035
1033
  indeterminate: "",
1036
1034
  color: "primary",
1037
1035
  size: "32"
1038
1036
  })
1039
- ])) : e.error ? (h(), K("div", Zo, [
1040
- i(sn, {
1037
+ ])) : e.error ? (y(), K("div", Qo, [
1038
+ i(ln, {
1041
1039
  type: "error",
1042
1040
  variant: "tonal",
1043
1041
  density: "compact",
1044
1042
  border: "start"
1045
1043
  }, {
1046
1044
  default: r(() => [
1047
- q(B(e.error), 1)
1045
+ G(B(e.error), 1)
1048
1046
  ]),
1049
1047
  _: 1
1050
1048
  })
1051
- ])) : se.value ? (h(), K("div", _o, [
1049
+ ])) : te.value ? (y(), K("div", Zo, [
1052
1050
  z(o.$slots, "empty", {
1053
1051
  readonly: e.readonly,
1054
1052
  disabled: e.disabled,
1055
- actions: { add: ge }
1053
+ actions: { add: Ae }
1056
1054
  }, () => [
1057
- i(Qn, {
1058
- title: ne.value,
1059
- text: de.value,
1060
- "add-label": Q.value,
1061
- "can-add": x.value,
1062
- onAdd: ge
1063
- }, null, 8, ["title", "text", "add-label", "can-add"])
1055
+ i(Xn, {
1056
+ title: ae.value,
1057
+ "add-label": X.value,
1058
+ "can-add": v.value,
1059
+ onAdd: Ae
1060
+ }, null, 8, ["title", "add-label", "can-add"])
1064
1061
  ])
1065
- ])) : (h(!0), K(ye, { key: 4 }, _e(W.value, (f) => (h(), K("div", {
1066
- key: String(f.key),
1067
- "data-id": String(f.key),
1062
+ ])) : (y(!0), K(ve, { key: 4 }, Ze(oe.value, (m) => (y(), K("div", {
1063
+ key: String(m.key),
1064
+ "data-id": String(m.key),
1068
1065
  role: "listitem",
1069
- tabindex: d(fe).rowTabindex(f.key),
1070
- class: Pe(["a-le-row", {
1066
+ tabindex: d(ue).rowTabindex(m.key),
1067
+ class: xe(["a-le-row", {
1071
1068
  "a-le-row--two-rows": e.twoRows === "always",
1072
- "a-le-row--editing": f.editing,
1073
- "a-le-row--expanded": f.expanded,
1074
- "a-le-row--unsaved": f.dirty,
1075
- "a-le-row--clickable": Je(f),
1076
- [`a-le-row--validation-${d(Be)(f.raw, f.key, f.index)}`]: d(Be)(f.raw, f.key, f.index) !== null
1069
+ "a-le-row--editing": m.editing,
1070
+ "a-le-row--expanded": m.expanded,
1071
+ "a-le-row--unsaved": m.dirty,
1072
+ "a-le-row--clickable": Se(m),
1073
+ [`a-le-row--validation-${d(Te)(m.raw, m.key, m.index)}`]: d(Te)(m.raw, m.key, m.index) !== null
1077
1074
  }]),
1078
- onKeydown: (me) => d(fe).handleKeydown(f.key, me)
1075
+ onKeydown: (fe) => d(ue).handleKeydown(m.key, fe)
1079
1076
  }, [
1080
- z(o.$slots, "before-item", oe({ ref_for: !0 }, $e(f))),
1077
+ z(o.$slots, "before-item", ie({ ref_for: !0 }, Be(m))),
1081
1078
  M("div", {
1082
1079
  class: "a-le-row-header",
1083
- onClick: (me) => We(f)
1080
+ onClick: (fe) => _e(m)
1084
1081
  }, [
1085
- M("div", nl, [
1086
- z(o.$slots, "item-compact", oe({ ref_for: !0 }, $e(f)), () => [
1087
- M("span", al, B(Le(f.raw, f.key)), 1)
1082
+ M("div", tl, [
1083
+ z(o.$slots, "item-compact", ie({ ref_for: !0 }, Be(m)), () => [
1084
+ M("span", nl, B(ge(m.raw)), 1)
1088
1085
  ]),
1089
- f.dirty ? (h(), Y(Zn, {
1086
+ m.dirty ? (y(), W(Qn, {
1090
1087
  key: 0,
1091
1088
  "dot-only": e.chips
1092
- }, null, 8, ["dot-only"])) : G("", !0)
1089
+ }, null, 8, ["dot-only"])) : H("", !0)
1093
1090
  ]),
1094
- e.chips ? G("", !0) : (h(), K("div", ol, [
1095
- z(o.$slots, "item-status", oe({ ref_for: !0 }, $e(f)), () => [
1096
- e.statusField && f.raw[e.statusField] != null && f.raw[e.statusField] !== "" ? (h(), K("span", ll, B(f.raw[e.statusField]), 1)) : G("", !0)
1091
+ e.chips ? H("", !0) : (y(), K("div", al, [
1092
+ z(o.$slots, "item-status", ie({ ref_for: !0 }, Be(m)), () => [
1093
+ e.statusField && m.raw[e.statusField] != null && m.raw[e.statusField] !== "" ? (y(), K("span", ol, B(m.raw[e.statusField]), 1)) : H("", !0)
1097
1094
  ])
1098
1095
  ])),
1099
- M("div", il, [
1100
- z(o.$slots, "item-actions", oe({ ref_for: !0 }, $e(f)), () => [
1101
- e.chips && e.showDeleteButton && v.value ? (h(), Y(_, {
1096
+ M("div", ll, [
1097
+ z(o.$slots, "item-actions", ie({ ref_for: !0 }, Be(m)), () => [
1098
+ e.chips && e.showDeleteButton && c.value ? (y(), W(_, {
1102
1099
  key: 0,
1103
1100
  icon: "",
1104
1101
  size: "x-small",
@@ -1106,17 +1103,17 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
1106
1103
  density: "compact",
1107
1104
  active: !1,
1108
1105
  class: "a-le-action a-le-action--chip-close",
1109
- onClick: ae((me) => Ae(f), ["stop"])
1106
+ onClick: le((fe) => Ye(m), ["stop"])
1110
1107
  }, {
1111
1108
  default: r(() => [
1112
- i(te, {
1109
+ i(ne, {
1113
1110
  icon: "mdi-close",
1114
1111
  size: "14"
1115
1112
  })
1116
1113
  ]),
1117
1114
  _: 1
1118
- }, 8, ["onClick"])) : (h(), K(ye, { key: 1 }, [
1119
- e.showEditButton && v.value ? (h(), Y(_, {
1115
+ }, 8, ["onClick"])) : (y(), K(ve, { key: 1 }, [
1116
+ e.showEditButton && c.value && !e.defaultExpanded ? (y(), W(_, {
1120
1117
  key: 0,
1121
1118
  icon: "",
1122
1119
  size: "small",
@@ -1124,44 +1121,44 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
1124
1121
  color: "primary",
1125
1122
  density: "comfortable",
1126
1123
  class: "mx-1 a-le-action a-le-action--edit",
1127
- onClick: ae((me) => Ce(f), ["stop"])
1124
+ onClick: le((fe) => ye(m), ["stop"])
1128
1125
  }, {
1129
1126
  default: r(() => [
1130
- i(te, {
1127
+ i(ne, {
1131
1128
  icon: "mdi-pencil-outline",
1132
1129
  size: "18"
1133
1130
  }),
1134
- i(Te, {
1131
+ i(De, {
1135
1132
  activator: "parent",
1136
1133
  location: "bottom",
1137
- text: d(y)("common.sortable.edit")
1134
+ text: d(p)("common.sortable.edit")
1138
1135
  }, null, 8, ["text"])
1139
1136
  ]),
1140
1137
  _: 1
1141
- }, 8, ["onClick"])) : G("", !0),
1142
- e.showDeleteButton && v.value ? (h(), Y(_, {
1138
+ }, 8, ["onClick"])) : H("", !0),
1139
+ e.showDeleteButton && c.value ? (y(), W(_, {
1143
1140
  key: 1,
1144
1141
  icon: "",
1145
1142
  size: "small",
1146
1143
  variant: "text",
1147
1144
  density: "comfortable",
1148
1145
  class: "mx-1 a-le-action a-le-action--delete",
1149
- onClick: ae((me) => Ae(f), ["stop"])
1146
+ onClick: le((fe) => Ye(m), ["stop"])
1150
1147
  }, {
1151
1148
  default: r(() => [
1152
- i(te, {
1149
+ i(ne, {
1153
1150
  icon: "mdi-trash-can-outline",
1154
1151
  size: "18"
1155
1152
  }),
1156
- i(Te, {
1153
+ i(De, {
1157
1154
  activator: "parent",
1158
1155
  location: "bottom",
1159
- text: d(y)("common.sortable.delete")
1156
+ text: d(p)("common.sortable.delete")
1160
1157
  }, null, 8, ["text"])
1161
1158
  ]),
1162
1159
  _: 1
1163
- }, 8, ["onClick"])) : G("", !0),
1164
- e.showAddAfterAction && v.value ? (h(), Y(_, {
1160
+ }, 8, ["onClick"])) : H("", !0),
1161
+ e.showAddAfterAction && c.value ? (y(), W(_, {
1165
1162
  key: 2,
1166
1163
  icon: "",
1167
1164
  size: "small",
@@ -1171,29 +1168,29 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
1171
1168
  class: "mx-1 a-le-action a-le-action--menu"
1172
1169
  }, {
1173
1170
  default: r(() => [
1174
- i(te, {
1171
+ i(ne, {
1175
1172
  icon: "mdi-dots-vertical",
1176
1173
  size: "18"
1177
1174
  }),
1178
- i(Te, {
1175
+ i(De, {
1179
1176
  activator: "parent",
1180
1177
  location: "bottom",
1181
- text: d(y)("common.sortable.more")
1178
+ text: d(p)("common.sortable.more")
1182
1179
  }, null, 8, ["text"]),
1183
- i(Bt, { activator: "parent" }, {
1180
+ i(Ft, { activator: "parent" }, {
1184
1181
  default: r(() => [
1185
- i(ht, { density: "compact" }, {
1182
+ i(yt, { density: "compact" }, {
1186
1183
  default: r(() => [
1187
- i(De, {
1188
- onClick: ae((me) => be(f), ["stop"])
1184
+ i(Ie, {
1185
+ onClick: le((fe) => $e(m), ["stop"])
1189
1186
  }, {
1190
1187
  prepend: r(() => [
1191
- i(te, { icon: "mdi-plus" })
1188
+ i(ne, { icon: "mdi-plus" })
1192
1189
  ]),
1193
1190
  default: r(() => [
1194
- i(Fe, null, {
1191
+ i(Re, null, {
1195
1192
  default: r(() => [
1196
- q(B(d(y)("common.sortable.addAfter")), 1)
1193
+ G(B(d(p)("common.sortable.addAfter")), 1)
1197
1194
  ]),
1198
1195
  _: 1
1199
1196
  })
@@ -1208,27 +1205,27 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
1208
1205
  }, 1024)
1209
1206
  ]),
1210
1207
  _: 2
1211
- }, 1024)) : G("", !0)
1208
+ }, 1024)) : H("", !0)
1212
1209
  ], 64))
1213
1210
  ])
1214
1211
  ])
1215
- ], 8, tl),
1216
- f.editing && o.$slots.item ? (h(), K(ye, { key: 0 }, [
1217
- M("div", sl, [
1218
- M("div", rl, [
1219
- z(o.$slots, "item", oe({ ref_for: !0 }, $e(f)))
1212
+ ], 8, el),
1213
+ (m.editing || e.defaultExpanded) && o.$slots.item ? (y(), K(ve, { key: 0 }, [
1214
+ M("div", il, [
1215
+ M("div", sl, [
1216
+ z(o.$slots, "item", ie({ ref_for: !0 }, Be(m)))
1220
1217
  ])
1221
1218
  ]),
1222
- z(o.$slots, "item-footer", oe({ ref_for: !0 }, $e(f)), () => [
1223
- U.value ? (h(), K("div", dl, [
1224
- O[1] || (O[1] = M("div", { class: "a-le-row-footer-spacer" }, null, -1)),
1219
+ z(o.$slots, "item-footer", ie({ ref_for: !0 }, Be(m)), () => [
1220
+ F.value && !e.defaultExpanded ? (y(), K("div", rl, [
1221
+ U[1] || (U[1] = M("div", { class: "a-le-row-footer-spacer" }, null, -1)),
1225
1222
  i(_, {
1226
1223
  variant: "text",
1227
- disabled: f.loading,
1228
- onClick: ae((me) => pt(f), ["stop"])
1224
+ disabled: m.loading,
1225
+ onClick: le((fe) => it(m), ["stop"])
1229
1226
  }, {
1230
1227
  default: r(() => [
1231
- q(B(d(y)("common.button.cancel")), 1)
1228
+ G(B(d(p)("common.button.cancel")), 1)
1232
1229
  ]),
1233
1230
  _: 1
1234
1231
  }, 8, ["disabled", "onClick"]),
@@ -1236,204 +1233,204 @@ const Mo = { class: "d-flex flex-column w-100 px-1 align-center" }, zo = { class
1236
1233
  color: "primary",
1237
1234
  variant: "flat",
1238
1235
  "prepend-icon": "mdi-check",
1239
- disabled: f.loading,
1240
- onClick: ae((me) => st(f), ["stop"])
1236
+ disabled: m.loading,
1237
+ onClick: le((fe) => Pe(m), ["stop"])
1241
1238
  }, {
1242
1239
  default: r(() => [
1243
- q(B(d(y)("common.button.save")), 1)
1240
+ G(B(d(p)("common.button.save")), 1)
1244
1241
  ]),
1245
1242
  _: 1
1246
1243
  }, 8, ["disabled", "onClick"])
1247
- ])) : G("", !0)
1244
+ ])) : H("", !0)
1248
1245
  ])
1249
- ], 64)) : o.$slots["item-readonly"] && (e.readonly || f.expanded) ? (h(), K("div", cl, [
1250
- M("div", ul, [
1251
- z(o.$slots, "item-readonly", oe({ ref_for: !0 }, $e(f)))
1246
+ ], 64)) : o.$slots["item-readonly"] && (e.readonly || m.expanded) ? (y(), K("div", dl, [
1247
+ M("div", cl, [
1248
+ z(o.$slots, "item-readonly", ie({ ref_for: !0 }, Be(m)))
1252
1249
  ])
1253
- ])) : G("", !0),
1254
- z(o.$slots, "after-item", oe({ ref_for: !0 }, $e(f)))
1255
- ], 42, el))), 128)),
1256
- x.value && !e.loading && !e.error && !se.value ? z(o.$slots, "add-button", {
1250
+ ])) : H("", !0),
1251
+ z(o.$slots, "after-item", ie({ ref_for: !0 }, Be(m)))
1252
+ ], 42, _o))), 128)),
1253
+ v.value && !e.loading && !e.error && !te.value ? z(o.$slots, "add-button", {
1257
1254
  key: 5,
1258
1255
  readonly: e.readonly,
1259
1256
  disabled: e.disabled,
1260
- props: { onClick: ge },
1261
- actions: { add: ge }
1257
+ props: { onClick: Ae },
1258
+ actions: { add: Ae }
1262
1259
  }, () => [
1263
1260
  M("button", {
1264
1261
  type: "button",
1265
1262
  class: "a-le-row-add",
1266
- onClick: ge
1263
+ onClick: Ae
1267
1264
  }, [
1268
- i(te, {
1265
+ i(ne, {
1269
1266
  icon: "mdi-plus",
1270
1267
  size: "18"
1271
1268
  }),
1272
- M("span", null, B(Q.value), 1)
1269
+ M("span", null, B(X.value), 1)
1273
1270
  ])
1274
- ]) : G("", !0)
1271
+ ]) : H("", !0)
1275
1272
  ], 512),
1276
- i(_n, {
1277
- modelValue: d(et),
1278
- "onUpdate:modelValue": O[0] || (O[0] = (f) => oa(et) ? et.value = f : null),
1279
- title: P.value,
1280
- text: m.value,
1281
- "confirm-label": d(y)("common.sortable.delete"),
1282
- "cancel-label": d(y)("common.button.cancel"),
1283
- error: d(tt),
1284
- "in-flight": d(xe),
1285
- onConfirm: d(lt),
1286
- onCancel: d(it)
1273
+ i(Zn, {
1274
+ modelValue: d(Me),
1275
+ "onUpdate:modelValue": U[0] || (U[0] = (m) => aa(Me) ? Me.value = m : null),
1276
+ title: re.value,
1277
+ text: P.value,
1278
+ "confirm-label": d(p)("common.sortable.delete"),
1279
+ "cancel-label": d(p)("common.button.cancel"),
1280
+ error: d(we),
1281
+ "in-flight": d(ht),
1282
+ onConfirm: d(We),
1283
+ onCancel: d(lt)
1287
1284
  }, null, 8, ["modelValue", "title", "text", "confirm-label", "cancel-label", "error", "in-flight", "onConfirm", "onCancel"]),
1288
- M("div", fl, B(d(fe).grabbedKey.value !== null ? d(y)("common.sortable.keyboardGrab.status", {
1289
- n: d(fe).grabbedIndex.value + 1,
1290
- total: d(fe).totalCount.value
1285
+ M("div", ul, B(d(ue).grabbedKey.value !== null ? d(p)("common.sortable.keyboardGrab.status", {
1286
+ n: d(ue).grabbedIndex.value + 1,
1287
+ total: d(ue).totalCount.value
1291
1288
  }) : ""), 1)
1292
1289
  ], 2));
1293
1290
  }
1294
- }), ml = "id", vl = "position", yl = "parent";
1295
- function hl(e, w) {
1296
- const c = w.keyField ?? ml, n = w.positionField ?? vl, u = w.parentField ?? yl, p = w.positionMultiplier ?? 1, y = w.maxDepth, b = (P) => P[c], k = (P) => {
1291
+ }), fl = "id", ml = "position", vl = "parent";
1292
+ function yl(e, w) {
1293
+ const u = w.keyField ?? fl, n = w.positionField ?? ml, f = w.parentField ?? vl, h = w.positionMultiplier ?? 1, p = w.maxDepth, b = (P) => P[u], k = (P) => {
1297
1294
  if (!P.children || P.children.length === 0) return 1;
1298
- let m = 0;
1295
+ let c = 0;
1299
1296
  for (const v of P.children) {
1300
- const x = k(v);
1301
- x > m && (m = x);
1297
+ const S = k(v);
1298
+ S > c && (c = S);
1302
1299
  }
1303
- return m + 1;
1304
- }, s = (P, m = e.value.children, v = null) => {
1305
- for (const x of m) {
1306
- if (b(x.data) === P) return { node: x, parent: v };
1307
- if (x.children && x.children.length > 0) {
1308
- const F = s(P, x.children, x);
1300
+ return c + 1;
1301
+ }, s = (P, c = e.value.children, v = null) => {
1302
+ for (const S of c) {
1303
+ if (b(S.data) === P) return { node: S, parent: v };
1304
+ if (S.children && S.children.length > 0) {
1305
+ const F = s(P, S.children, S);
1309
1306
  if (F.node) return F;
1310
1307
  }
1311
1308
  }
1312
1309
  return { node: null, parent: null };
1313
1310
  }, C = (P) => {
1314
- let m = 1 * p;
1311
+ let c = 1 * h;
1315
1312
  for (const v of P)
1316
- v.data[n] !== m && (v.data[n] = m), m += p;
1313
+ v.data[n] !== c && (v.data[n] = c), c += h;
1317
1314
  }, D = (P) => {
1318
- const m = (v) => {
1315
+ const c = (v) => {
1319
1316
  C(v);
1320
- for (const x of v) x.children && x.children.length && m(x.children);
1317
+ for (const S of v) S.children && S.children.length && c(S.children);
1321
1318
  };
1322
- m(P.children);
1319
+ c(P.children);
1323
1320
  }, N = (P) => {
1324
- const m = we(P);
1325
- return D(m), m;
1321
+ const c = ke(P);
1322
+ return D(c), c;
1326
1323
  }, V = (P) => {
1327
- const m = [], v = w.expandedKeys?.value;
1328
- let x = 0;
1329
- const F = (U, H, ie) => {
1330
- for (let W = 0; W < U.length; W++) {
1331
- const se = U[W], re = b(se.data), fe = !pe(se.children), Le = fe && (se.children?.length ?? 0) > 0, Be = se.children?.length ?? 0, ge = v ? v.has(re) : !0, be = y - (H + 1), Ce = fe && be > 0, Ie = H > 0, Je = W > 0;
1332
- m.push({
1333
- key: re,
1334
- index: x++,
1335
- raw: se.data,
1336
- position: se.data[n],
1337
- node: se,
1338
- depth: H,
1339
- parent: ie?.data ?? null,
1340
- parentKey: ie ? b(ie.data) : null,
1341
- childrenCount: Be,
1342
- hasChildren: Le,
1343
- childrenAllowed: fe,
1344
- siblingIndex: W,
1345
- siblingCount: U.length,
1346
- firstInParent: W === 0,
1347
- lastInParent: W === U.length - 1,
1348
- canAddChild: Ce,
1349
- canIndent: Je,
1350
- canOutdent: Ie
1351
- }), Le && ge && F(se.children, H + 1, se);
1324
+ const c = [], v = w.expandedKeys?.value;
1325
+ let S = 0;
1326
+ const F = (O, q, oe) => {
1327
+ for (let te = 0; te < O.length; te++) {
1328
+ const Q = O[te], ue = b(Q.data), ge = !pe(Q.children), Te = ge && (Q.children?.length ?? 0) > 0, Ae = Q.children?.length ?? 0, $e = v ? v.has(ue) : !0, ye = p - (q + 1), Fe = ge && ye > 0, Se = q > 0, _e = te > 0;
1329
+ c.push({
1330
+ key: ue,
1331
+ index: S++,
1332
+ raw: Q.data,
1333
+ position: Q.data[n],
1334
+ node: Q,
1335
+ depth: q,
1336
+ parent: oe?.data ?? null,
1337
+ parentKey: oe ? b(oe.data) : null,
1338
+ childrenCount: Ae,
1339
+ hasChildren: Te,
1340
+ childrenAllowed: ge,
1341
+ siblingIndex: te,
1342
+ siblingCount: O.length,
1343
+ firstInParent: te === 0,
1344
+ lastInParent: te === O.length - 1,
1345
+ canAddChild: Fe,
1346
+ canIndent: _e,
1347
+ canOutdent: Se
1348
+ }), Te && $e && F(Q.children, q + 1, Q);
1352
1349
  }
1353
1350
  };
1354
- return F(P.children, 0, null), m;
1355
- }, I = g(() => V(e.value)), E = (P, m, v) => {
1356
- P.splice(m + 1, 0, v);
1357
- }, j = (P, m) => {
1358
- if (!m) return P.length;
1359
- if (m.afterId !== void 0) {
1360
- const v = P.findIndex((x) => b(x.data) === m.afterId);
1351
+ return F(P.children, 0, null), c;
1352
+ }, I = g(() => V(e.value)), T = (P, c, v) => {
1353
+ P.splice(c + 1, 0, v);
1354
+ }, j = (P, c) => {
1355
+ if (!c) return P.length;
1356
+ if (c.afterId !== void 0) {
1357
+ const v = P.findIndex((S) => b(S.data) === c.afterId);
1361
1358
  return v === -1 ? P.length : v + 1;
1362
1359
  }
1363
- return m.afterIndex !== void 0 ? m.afterIndex < 0 ? P.length : Math.min(m.afterIndex + 1, P.length) : m.index !== void 0 ? Math.max(0, Math.min(m.index, P.length)) : P.length;
1364
- }, R = (P, m) => {
1365
- const v = we(e.value), x = m?.childrenAllowed ?? !0, F = {
1366
- data: we(P),
1367
- children: x ? [] : void 0,
1360
+ return c.afterIndex !== void 0 ? c.afterIndex < 0 ? P.length : Math.min(c.afterIndex + 1, P.length) : c.index !== void 0 ? Math.max(0, Math.min(c.index, P.length)) : P.length;
1361
+ }, R = (P, c) => {
1362
+ const v = ke(e.value), S = c?.childrenAllowed ?? !0, F = {
1363
+ data: ke(P),
1364
+ children: S ? [] : void 0,
1368
1365
  meta: { dirty: !1 }
1369
1366
  };
1370
- let U = v.children, H = null;
1371
- if (m?.parentId !== void 0 && m.parentId !== null) {
1372
- const { node: W } = s(m.parentId, v.children);
1373
- W && W.children && (U = W.children, H = W);
1367
+ let O = v.children, q = null;
1368
+ if (c?.parentId !== void 0 && c.parentId !== null) {
1369
+ const { node: te } = s(c.parentId, v.children);
1370
+ te && te.children && (O = te.children, q = te);
1374
1371
  }
1375
- if (m?.afterId !== void 0) {
1376
- const { node: W, parent: se } = s(m.afterId, v.children);
1377
- if (W) {
1378
- const re = se ? se.children : v.children, fe = re.indexOf(W);
1379
- if (fe !== -1)
1380
- return E(re, fe, F), F.data[u] = se ? b(se.data) : null, C(re), e.value = v, v;
1372
+ if (c?.afterId !== void 0) {
1373
+ const { node: te, parent: Q } = s(c.afterId, v.children);
1374
+ if (te) {
1375
+ const ue = Q ? Q.children : v.children, ge = ue.indexOf(te);
1376
+ if (ge !== -1)
1377
+ return T(ue, ge, F), F.data[f] = Q ? b(Q.data) : null, C(ue), e.value = v, v;
1381
1378
  }
1382
1379
  }
1383
- const ie = m?.asFirstChild ? 0 : j(U, m);
1384
- return U.splice(ie, 0, F), F.data[u] = H ? b(H.data) : null, C(U), e.value = v, v;
1380
+ const oe = c?.asFirstChild ? 0 : j(O, c);
1381
+ return O.splice(oe, 0, F), F.data[f] = q ? b(q.data) : null, C(O), e.value = v, v;
1385
1382
  }, $ = (P) => {
1386
- const m = we(e.value), { node: v, parent: x } = s(P, m.children);
1387
- if (!v) return m;
1388
- const F = x ? x.children : m.children, U = F.indexOf(v);
1389
- return U === -1 || (F.splice(U, 1), C(F), e.value = m), m;
1390
- }, X = (P, m) => {
1391
- const v = we(e.value), { node: x } = s(P, v.children);
1392
- return x && (x.data = we(m), e.value = v), v;
1393
- }, S = (P, m, v) => {
1394
- const { node: x, parent: F } = s(m, P.children);
1395
- if (!x) return null;
1396
- const U = F ? F.children : P.children, H = U.indexOf(x);
1397
- if (H === -1) return null;
1398
- const ie = v(U, H);
1399
- if (ie === null || ie === H) return null;
1400
- const [W] = U.splice(H, 1);
1401
- return U.splice(ie, 0, W), C(U), P;
1383
+ const c = ke(e.value), { node: v, parent: S } = s(P, c.children);
1384
+ if (!v) return c;
1385
+ const F = S ? S.children : c.children, O = F.indexOf(v);
1386
+ return O === -1 || (F.splice(O, 1), C(F), e.value = c), c;
1387
+ }, Y = (P, c) => {
1388
+ const v = ke(e.value), { node: S } = s(P, v.children);
1389
+ return S && (S.data = ke(c), e.value = v), v;
1390
+ }, A = (P, c, v) => {
1391
+ const { node: S, parent: F } = s(c, P.children);
1392
+ if (!S) return null;
1393
+ const O = F ? F.children : P.children, q = O.indexOf(S);
1394
+ if (q === -1) return null;
1395
+ const oe = v(O, q);
1396
+ if (oe === null || oe === q) return null;
1397
+ const [te] = O.splice(q, 1);
1398
+ return O.splice(oe, 0, te), C(O), P;
1402
1399
  }, J = (P) => {
1403
- const m = we(e.value), v = S(m, P, (x, F) => F > 0 ? F - 1 : null);
1400
+ const c = ke(e.value), v = A(c, P, (S, F) => F > 0 ? F - 1 : null);
1404
1401
  return v && (e.value = v), v;
1405
1402
  }, L = (P) => {
1406
- const m = we(e.value), v = S(m, P, (x, F) => F < x.length - 1 ? F + 1 : null);
1403
+ const c = ke(e.value), v = A(c, P, (S, F) => F < S.length - 1 ? F + 1 : null);
1407
1404
  return v && (e.value = v), v;
1408
- }, T = (P) => {
1409
- const m = we(e.value), v = S(m, P, (x, F) => F > 0 ? 0 : null);
1405
+ }, E = (P) => {
1406
+ const c = ke(e.value), v = A(c, P, (S, F) => F > 0 ? 0 : null);
1410
1407
  return v && (e.value = v), v;
1411
1408
  }, ee = (P) => {
1412
- const m = we(e.value), v = S(m, P, (x, F) => F < x.length - 1 ? x.length - 1 : null);
1409
+ const c = ke(e.value), v = A(c, P, (S, F) => F < S.length - 1 ? S.length - 1 : null);
1413
1410
  return v && (e.value = v), v;
1414
- }, le = (P) => {
1415
- const m = we(e.value), { node: v, parent: x } = s(P, m.children);
1411
+ }, se = (P) => {
1412
+ const c = ke(e.value), { node: v, parent: S } = s(P, c.children);
1416
1413
  if (!v) return null;
1417
- const F = x ? x.children : m.children, U = F.indexOf(v);
1418
- if (U <= 0) return null;
1419
- const H = F[U - 1];
1420
- if (pe(H.children)) return null;
1421
- const ie = k(v);
1422
- return ne(m, b(H.data)) + 1 + ie > y ? null : (F.splice(U, 1), H.children.push(v), v.data[u] = b(H.data), C(F), C(H.children), e.value = m, m);
1423
- }, Q = (P) => {
1424
- const m = we(e.value), { node: v, parent: x } = s(P, m.children);
1425
- if (!v || !x) return null;
1426
- const { parent: F } = s(b(x.data), m.children), U = F ? F.children : m.children, H = U.indexOf(x);
1427
- if (H === -1) return null;
1428
- const ie = x.children, W = ie.indexOf(v);
1429
- return W === -1 ? null : (ie.splice(W, 1), U.splice(H + 1, 0, v), v.data[u] = F ? b(F.data) : null, C(ie), C(U), e.value = m, m);
1430
- }, ne = (P, m) => {
1431
- const v = (x, F) => {
1432
- for (const U of x) {
1433
- if (b(U.data) === m) return F;
1434
- if (U.children && U.children.length) {
1435
- const H = v(U.children, F + 1);
1436
- if (H !== null) return H;
1414
+ const F = S ? S.children : c.children, O = F.indexOf(v);
1415
+ if (O <= 0) return null;
1416
+ const q = F[O - 1];
1417
+ if (pe(q.children)) return null;
1418
+ const oe = k(v);
1419
+ return ae(c, b(q.data)) + 1 + oe > p ? null : (F.splice(O, 1), q.children.push(v), v.data[f] = b(q.data), C(F), C(q.children), e.value = c, c);
1420
+ }, X = (P) => {
1421
+ const c = ke(e.value), { node: v, parent: S } = s(P, c.children);
1422
+ if (!v || !S) return null;
1423
+ const { parent: F } = s(b(S.data), c.children), O = F ? F.children : c.children, q = O.indexOf(S);
1424
+ if (q === -1) return null;
1425
+ const oe = S.children, te = oe.indexOf(v);
1426
+ return te === -1 ? null : (oe.splice(te, 1), O.splice(q + 1, 0, v), v.data[f] = F ? b(F.data) : null, C(oe), C(O), e.value = c, c);
1427
+ }, ae = (P, c) => {
1428
+ const v = (S, F) => {
1429
+ for (const O of S) {
1430
+ if (b(O.data) === c) return F;
1431
+ if (O.children && O.children.length) {
1432
+ const q = v(O.children, F + 1);
1433
+ if (q !== null) return q;
1437
1434
  }
1438
1435
  }
1439
1436
  return null;
@@ -1445,84 +1442,84 @@ function hl(e, w) {
1445
1442
  findNode: s,
1446
1443
  addItem: R,
1447
1444
  deleteItem: $,
1448
- updateItem: X,
1445
+ updateItem: Y,
1449
1446
  moveUp: J,
1450
1447
  moveDown: L,
1451
- moveTop: T,
1448
+ moveTop: E,
1452
1449
  moveBottom: ee,
1453
- indent: le,
1454
- outdent: Q,
1455
- moveTo: (P, m, v) => {
1456
- const x = we(e.value), { node: F, parent: U } = s(P, x.children);
1450
+ indent: se,
1451
+ outdent: X,
1452
+ moveTo: (P, c, v) => {
1453
+ const S = ke(e.value), { node: F, parent: O } = s(P, S.children);
1457
1454
  if (!F) return null;
1458
- if (m !== null) {
1459
- const be = (Ce) => {
1460
- if (!Ce.children) return !1;
1461
- for (const Ie of Ce.children)
1462
- if (b(Ie.data) === m || be(Ie)) return !0;
1455
+ if (c !== null) {
1456
+ const ye = (Fe) => {
1457
+ if (!Fe.children) return !1;
1458
+ for (const Se of Fe.children)
1459
+ if (b(Se.data) === c || ye(Se)) return !0;
1463
1460
  return !1;
1464
1461
  };
1465
- if (b(F.data) === m || be(F)) return null;
1462
+ if (b(F.data) === c || ye(F)) return null;
1466
1463
  }
1467
- let H, ie = null, W = 0;
1468
- if (m === null)
1469
- H = x.children, W = 0;
1464
+ let q, oe = null, te = 0;
1465
+ if (c === null)
1466
+ q = S.children, te = 0;
1470
1467
  else {
1471
- const { node: be } = s(m, x.children);
1472
- if (!be || pe(be.children)) return null;
1473
- H = be.children, ie = be, W = ne(x, m) + 1;
1468
+ const { node: ye } = s(c, S.children);
1469
+ if (!ye || pe(ye.children)) return null;
1470
+ q = ye.children, oe = ye, te = ae(S, c) + 1;
1474
1471
  }
1475
- const se = k(F);
1476
- if (W + se > y) return null;
1477
- const re = U ? U.children : x.children, fe = re.indexOf(F);
1478
- if (fe === -1) return null;
1479
- const Le = re === H, [Be] = re.splice(fe, 1);
1480
- let ge = v;
1481
- return Le && fe < v && (ge = v - 1), ge = Math.max(0, Math.min(ge, H.length)), H.splice(ge, 0, Be), Be.data[u] = ie ? b(ie.data) : null, Le || C(re), C(H), e.value = x, x;
1472
+ const Q = k(F);
1473
+ if (te + Q > p) return null;
1474
+ const ue = O ? O.children : S.children, ge = ue.indexOf(F);
1475
+ if (ge === -1) return null;
1476
+ const Te = ue === q, [Ae] = ue.splice(ge, 1);
1477
+ let $e = v;
1478
+ return Te && ge < v && ($e = v - 1), $e = Math.max(0, Math.min($e, q.length)), q.splice($e, 0, Ae), Ae.data[f] = oe ? b(oe.data) : null, Te || C(ue), C(q), e.value = S, S;
1482
1479
  },
1483
1480
  recalculatePositions: N,
1484
1481
  calculateSubtreeDepth: k
1485
1482
  };
1486
1483
  }
1487
- const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1488
- let n = Rt(e, c);
1484
+ const Bt = (e, w) => e.find((u) => u.key === w) ?? null, ra = (e, w, u) => {
1485
+ let n = Bt(e, u);
1489
1486
  for (; n && n.parentKey !== null; ) {
1490
1487
  if (n.parentKey === w) return !0;
1491
- n = Rt(e, n.parentKey);
1488
+ n = Bt(e, n.parentKey);
1492
1489
  }
1493
1490
  return !1;
1494
- }, pl = (e, w, c) => {
1495
- let n = Rt(e, w);
1496
- for (; n && n.depth > c; ) {
1491
+ }, hl = (e, w, u) => {
1492
+ let n = Bt(e, w);
1493
+ for (; n && n.depth > u; ) {
1497
1494
  if (n.parentKey === null) return null;
1498
- n = Rt(e, n.parentKey);
1495
+ n = Bt(e, n.parentKey);
1499
1496
  }
1500
- return n && n.depth === c ? n : null;
1501
- }, gl = (e, w, c) => c === w || da(e, w, c), Dt = (e, w, c, n) => {
1502
- for (let u = w; u >= 0 && u < e.length; u += c) {
1503
- const p = e[u];
1504
- if (!gl(e, n, p.key)) return p;
1497
+ return n && n.depth === u ? n : null;
1498
+ }, pl = (e, w, u) => u === w || ra(e, w, u), It = (e, w, u, n) => {
1499
+ for (let f = w; f >= 0 && f < e.length; f += u) {
1500
+ const h = e[f];
1501
+ if (!pl(e, n, h.key)) return h;
1505
1502
  }
1506
1503
  return null;
1507
- }, bl = (e) => {
1504
+ }, gl = (e) => {
1508
1505
  const {
1509
1506
  pointer: w,
1510
- hoveredRow: c,
1507
+ hoveredRow: u,
1511
1508
  sourceKey: n,
1512
- sourceSubtreeDepth: u,
1513
- viewItems: p,
1514
- maxDepth: y,
1509
+ sourceSubtreeDepth: f,
1510
+ viewItems: h,
1511
+ maxDepth: p,
1515
1512
  indentPx: b,
1516
1513
  containerLeft: k,
1517
1514
  containerPaddingLeft: s
1518
1515
  } = e;
1519
- if (c.key === n || da(p, n, c.key)) return null;
1520
- const C = w.y - c.rect.top, D = c.rect.height, N = C < D / 2, V = N ? "top" : "bottom", I = p.findIndex((T) => T.key === c.key), E = N ? Dt(p, I - 1, -1, n) : Dt(p, I, -1, n), j = N ? Dt(p, I, 1, n) : Dt(p, I + 1, 1, n), R = w.x - k - s, $ = Math.round(R / b), X = E ? E.depth + 1 : 0, S = j ? j.depth : 0, J = Math.max(S, Math.min($, X));
1516
+ if (u.key === n || ra(h, n, u.key)) return null;
1517
+ const C = w.y - u.rect.top, D = u.rect.height, N = C < D / 2, V = N ? "top" : "bottom", I = h.findIndex((E) => E.key === u.key), T = N ? It(h, I - 1, -1, n) : It(h, I, -1, n), j = N ? It(h, I, 1, n) : It(h, I + 1, 1, n), R = w.x - k - s, $ = Math.round(R / b), Y = T ? T.depth + 1 : 0, A = j ? j.depth : 0, J = Math.max(A, Math.min($, Y));
1521
1518
  let L;
1522
- if (!E)
1519
+ if (!T)
1523
1520
  L = {
1524
1521
  type: "insert",
1525
- refKey: c.key,
1522
+ refKey: u.key,
1526
1523
  refEdge: "top",
1527
1524
  parentKey: null,
1528
1525
  index: 0,
@@ -1530,72 +1527,72 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1530
1527
  makeChild: !1,
1531
1528
  levelRowKey: null
1532
1529
  };
1533
- else if (J === E.depth + 1)
1530
+ else if (J === T.depth + 1)
1534
1531
  L = {
1535
1532
  type: "insert",
1536
- refKey: c.key,
1533
+ refKey: u.key,
1537
1534
  refEdge: V,
1538
- parentKey: E.key,
1535
+ parentKey: T.key,
1539
1536
  index: 0,
1540
1537
  depth: J,
1541
1538
  makeChild: !0,
1542
1539
  levelRowKey: null
1543
1540
  };
1544
- else if (J === E.depth)
1541
+ else if (J === T.depth)
1545
1542
  L = {
1546
1543
  type: "insert",
1547
- refKey: c.key,
1544
+ refKey: u.key,
1548
1545
  refEdge: V,
1549
- parentKey: E.parentKey,
1550
- index: E.siblingIndex + 1,
1546
+ parentKey: T.parentKey,
1547
+ index: T.siblingIndex + 1,
1551
1548
  depth: J,
1552
1549
  makeChild: !1,
1553
- levelRowKey: E.key
1550
+ levelRowKey: T.key
1554
1551
  };
1555
1552
  else {
1556
- const T = pl(p, E.key, J);
1557
- T ? L = {
1553
+ const E = hl(h, T.key, J);
1554
+ E ? L = {
1558
1555
  type: "insert",
1559
- refKey: c.key,
1556
+ refKey: u.key,
1560
1557
  refEdge: V,
1561
- parentKey: T.parentKey,
1562
- index: T.siblingIndex + 1,
1558
+ parentKey: E.parentKey,
1559
+ index: E.siblingIndex + 1,
1563
1560
  depth: J,
1564
1561
  makeChild: !1,
1565
- levelRowKey: T.key
1562
+ levelRowKey: E.key
1566
1563
  } : L = {
1567
1564
  type: "insert",
1568
- refKey: c.key,
1565
+ refKey: u.key,
1569
1566
  refEdge: V,
1570
- parentKey: E.parentKey,
1571
- index: E.siblingIndex + 1,
1572
- depth: E.depth,
1567
+ parentKey: T.parentKey,
1568
+ index: T.siblingIndex + 1,
1569
+ depth: T.depth,
1573
1570
  makeChild: !1,
1574
- levelRowKey: E.key
1571
+ levelRowKey: T.key
1575
1572
  };
1576
1573
  }
1577
- return L.depth + u - 1 >= y ? { type: "blocked", desired: L, reason: "maxDepth" } : L;
1578
- }, kl = ["data-id", "aria-level", "tabindex"], wl = ["aria-label"], Cl = {
1574
+ return L.depth + f - 1 >= p ? { type: "blocked", desired: L, reason: "maxDepth" } : L;
1575
+ }, bl = ["data-id", "aria-level", "tabindex"], kl = ["aria-label"], wl = {
1579
1576
  key: 2,
1580
1577
  class: "a-nested-list-editor__tree-toggle a-nested-list-editor__tree-toggle--spacer",
1581
1578
  "aria-hidden": "true"
1582
- }, xl = { class: "a-le-row-main" }, Al = { class: "a-le-title" }, Sl = {
1579
+ }, Cl = { class: "a-le-row-main" }, xl = { class: "a-le-title" }, Al = {
1583
1580
  key: 0,
1584
1581
  class: "a-nested-list-editor__drag-count",
1585
1582
  "aria-hidden": "true"
1586
- }, Pl = {
1583
+ }, Sl = {
1587
1584
  key: 3,
1588
1585
  class: "a-le-status"
1589
- }, Il = {
1586
+ }, Pl = {
1590
1587
  key: 0,
1591
1588
  class: "a-le-status-badge"
1592
- }, Dl = { class: "a-le-actions" }, Tl = { class: "a-le-row-body" }, El = { class: "a-le-form" }, $l = {
1589
+ }, Il = { class: "a-le-actions" }, Dl = { class: "a-le-row-body" }, El = { class: "a-le-form" }, Tl = {
1593
1590
  key: 0,
1594
1591
  class: "a-le-row-footer"
1595
- }, Fl = {
1592
+ }, $l = {
1596
1593
  key: 1,
1597
1594
  class: "a-le-row-body"
1598
- }, Bl = { class: "a-le-form" }, Rl = ["data-parent-id"], Kl = "a-nested-list-editor__group", Vl = "a-le-drag-handle", ca = /* @__PURE__ */ Ge({
1595
+ }, Fl = { class: "a-le-form" }, Bl = ["data-parent-id"], Rl = "a-nested-list-editor__group", Kl = "a-le-drag-handle", da = /* @__PURE__ */ He({
1599
1596
  __name: "LeNestedRow",
1600
1597
  props: {
1601
1598
  vi: {},
@@ -1605,14 +1602,14 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1605
1602
  callbacks: {}
1606
1603
  },
1607
1604
  setup(e) {
1608
- const w = e, c = ca, { t: n } = He(), u = (k) => `--row-${String(k).replace(/\W/g, "_")}`, p = (k) => {
1605
+ const w = e, u = da, { t: n } = Je(), f = (k) => `--row-${String(k).replace(/\W/g, "_")}`, h = (k) => {
1609
1606
  if (typeof w.context.resolveValidation == "function")
1610
1607
  return w.context.resolveValidation(k, w.vi.key, w.vi.index);
1611
1608
  const s = k.validationState;
1612
1609
  return s === "valid" || s === "invalid" || s === "warning" ? s : null;
1613
- }, y = () => w.context.buildSlotProps(w.vi), b = () => w.viewItems.filter((k) => k.parentKey === w.vi.key);
1614
- return (k, s) => (h(), K("div", {
1615
- class: Pe([
1610
+ }, p = () => w.context.buildSlotProps(w.vi), b = () => w.viewItems.filter((k) => k.parentKey === w.vi.key);
1611
+ return (k, s) => (y(), K("div", {
1612
+ class: xe([
1616
1613
  "a-le-row-wrapper",
1617
1614
  {
1618
1615
  "a-le-row-wrapper--drop-disabled": e.dragState !== null && e.dragState.sourceKey === e.vi.key
@@ -1625,7 +1622,7 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1625
1622
  onKeydown: s[17] || (s[17] = (C) => e.context.keyboardNav ? e.context.keyboardNav.handleKeydown(e.vi.key, C) : void 0)
1626
1623
  }, [
1627
1624
  M("div", {
1628
- class: Pe([
1625
+ class: xe([
1629
1626
  "a-le-row",
1630
1627
  e.vi.depth > 0 ? "a-le-row--child" : null,
1631
1628
  {
@@ -1636,28 +1633,28 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1636
1633
  "a-le-row--grabbed": e.context.keyboardNav && e.context.keyboardNav.isGrabbed(e.vi.key),
1637
1634
  "a-le-row--clickable": e.context.isRowClickable(e.vi),
1638
1635
  "a-le-row--drop-source": e.dragState !== null && e.dragState.sourceKey === e.vi.key,
1639
- [`a-le-row--validation-${p(e.vi.raw)}`]: p(e.vi.raw) !== null
1636
+ [`a-le-row--validation-${h(e.vi.raw)}`]: h(e.vi.raw) !== null
1640
1637
  }
1641
1638
  ]),
1642
- style: yt({
1639
+ style: vt({
1643
1640
  "--nested-depth": e.vi.depth,
1644
- "anchor-name": u(e.vi.key),
1645
- "--parent-anchor": e.vi.parentKey !== null ? u(e.vi.parentKey) : "none"
1641
+ "anchor-name": f(e.vi.key),
1642
+ "--parent-anchor": e.vi.parentKey !== null ? f(e.vi.parentKey) : "none"
1646
1643
  })
1647
1644
  }, [
1648
- z(k.$slots, "before-item", Ke(je(y()))),
1645
+ z(k.$slots, "before-item", Ve(qe(p()))),
1649
1646
  M("div", {
1650
1647
  class: "a-le-row-header",
1651
1648
  onClick: s[14] || (s[14] = (C) => e.callbacks.onRowClick(e.vi))
1652
1649
  }, [
1653
- e.context.dragEnabled ? (h(), Y(lo, {
1650
+ e.context.dragEnabled ? (y(), W(oo, {
1654
1651
  key: 0,
1655
- class: Pe(Vl)
1656
- })) : G("", !0),
1657
- e.context.showExpandToggle && e.vi.childrenAllowed ? (h(), K("button", {
1652
+ class: xe(Kl)
1653
+ })) : H("", !0),
1654
+ e.context.showExpandToggle && e.vi.childrenAllowed ? (y(), K("button", {
1658
1655
  key: 1,
1659
1656
  type: "button",
1660
- class: Pe([
1657
+ class: xe([
1661
1658
  "a-nested-list-editor__tree-toggle",
1662
1659
  {
1663
1660
  "a-nested-list-editor__tree-toggle--empty": !e.vi.hasChildren,
@@ -1665,31 +1662,31 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1665
1662
  }
1666
1663
  ]),
1667
1664
  "aria-label": e.vi.childrenExpanded ? d(n)("common.sortable.close") : d(n)("common.sortable.edit"),
1668
- onClick: s[0] || (s[0] = ae((C) => e.vi.hasChildren && e.callbacks.onChevronClick(e.vi), ["stop"]))
1665
+ onClick: s[0] || (s[0] = le((C) => e.vi.hasChildren && e.callbacks.onChevronClick(e.vi), ["stop"]))
1669
1666
  }, [...s[18] || (s[18] = [
1670
1667
  M("span", { class: "a-nested-list-editor__tree-toggle-caret" }, null, -1)
1671
- ])], 10, wl)) : e.context.showExpandToggle ? (h(), K("span", Cl)) : G("", !0),
1672
- M("div", xl, [
1673
- z(k.$slots, "item-compact", Ke(je(y())), () => [
1674
- M("span", Al, B(e.context.resolveCompactText(e.vi.raw, e.vi.key)), 1)
1668
+ ])], 10, kl)) : e.context.showExpandToggle ? (y(), K("span", wl)) : H("", !0),
1669
+ M("div", Cl, [
1670
+ z(k.$slots, "item-compact", Ve(qe(p())), () => [
1671
+ M("span", xl, B(e.context.resolveCompactText(e.vi.raw, e.vi.key)), 1)
1675
1672
  ]),
1676
- e.vi.hasChildren ? (h(), K("span", Sl, [
1677
- i(te, {
1673
+ e.vi.hasChildren ? (y(), K("span", Al, [
1674
+ i(ne, {
1678
1675
  icon: "mdi-file-tree",
1679
1676
  size: "14"
1680
1677
  }),
1681
- q(" +" + B(e.vi.childrenCount), 1)
1682
- ])) : G("", !0),
1683
- e.vi.unsaved ? (h(), Y(Zn, { key: 1 })) : G("", !0)
1678
+ G(" +" + B(e.vi.childrenCount), 1)
1679
+ ])) : H("", !0),
1680
+ e.vi.unsaved ? (y(), W(Qn, { key: 1 })) : H("", !0)
1684
1681
  ]),
1685
- e.context.reorderMode ? G("", !0) : (h(), K("div", Pl, [
1686
- z(k.$slots, "item-status", Ke(je(y())), () => [
1687
- e.context.statusField && e.vi.raw[e.context.statusField] != null && e.vi.raw[e.context.statusField] !== "" ? (h(), K("span", Il, B(e.vi.raw[e.context.statusField]), 1)) : G("", !0)
1682
+ e.context.reorderMode ? H("", !0) : (y(), K("div", Sl, [
1683
+ z(k.$slots, "item-status", Ve(qe(p())), () => [
1684
+ e.context.statusField && e.vi.raw[e.context.statusField] != null && e.vi.raw[e.context.statusField] !== "" ? (y(), K("span", Pl, B(e.vi.raw[e.context.statusField]), 1)) : H("", !0)
1688
1685
  ])
1689
1686
  ])),
1690
- M("div", Dl, [
1691
- z(k.$slots, "item-actions", Ke(je(y())), () => [
1692
- e.context.reorderMode ? (h(), K(ye, { key: 0 }, [
1687
+ M("div", Il, [
1688
+ z(k.$slots, "item-actions", Ve(qe(p())), () => [
1689
+ e.context.reorderMode ? (y(), K(ve, { key: 0 }, [
1693
1690
  i(_, {
1694
1691
  icon: "",
1695
1692
  size: "small",
@@ -1697,14 +1694,14 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1697
1694
  density: "comfortable",
1698
1695
  disabled: e.vi.firstInParent,
1699
1696
  class: "mx-1 a-le-action a-le-action--up",
1700
- onClick: s[1] || (s[1] = ae((C) => e.callbacks.moveUp(e.vi.key), ["stop"]))
1697
+ onClick: s[1] || (s[1] = le((C) => e.callbacks.moveUp(e.vi.key), ["stop"]))
1701
1698
  }, {
1702
1699
  default: r(() => [
1703
- i(te, {
1700
+ i(ne, {
1704
1701
  icon: "mdi-arrow-up",
1705
1702
  size: "18"
1706
1703
  }),
1707
- i(Te, {
1704
+ i(De, {
1708
1705
  activator: "parent",
1709
1706
  location: "bottom",
1710
1707
  text: d(n)("common.sortable.moveUp")
@@ -1719,14 +1716,14 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1719
1716
  density: "comfortable",
1720
1717
  disabled: e.vi.lastInParent,
1721
1718
  class: "mx-1 a-le-action a-le-action--down",
1722
- onClick: s[2] || (s[2] = ae((C) => e.callbacks.moveDown(e.vi.key), ["stop"]))
1719
+ onClick: s[2] || (s[2] = le((C) => e.callbacks.moveDown(e.vi.key), ["stop"]))
1723
1720
  }, {
1724
1721
  default: r(() => [
1725
- i(te, {
1722
+ i(ne, {
1726
1723
  icon: "mdi-arrow-down",
1727
1724
  size: "18"
1728
1725
  }),
1729
- i(Te, {
1726
+ i(De, {
1730
1727
  activator: "parent",
1731
1728
  location: "bottom",
1732
1729
  text: d(n)("common.sortable.moveDown")
@@ -1743,141 +1740,141 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1743
1740
  class: "mx-1 a-le-action a-le-action--menu"
1744
1741
  }, {
1745
1742
  default: r(() => [
1746
- i(te, {
1743
+ i(ne, {
1747
1744
  icon: "mdi-dots-vertical",
1748
1745
  size: "18"
1749
1746
  }),
1750
- i(Te, {
1747
+ i(De, {
1751
1748
  activator: "parent",
1752
1749
  location: "bottom",
1753
1750
  text: d(n)("common.sortable.more")
1754
1751
  }, null, 8, ["text"]),
1755
- i(Bt, { activator: "parent" }, {
1752
+ i(Ft, { activator: "parent" }, {
1756
1753
  default: r(() => [
1757
- i(ht, { density: "compact" }, {
1754
+ i(yt, { density: "compact" }, {
1758
1755
  default: r(() => [
1759
- i(De, {
1756
+ i(Ie, {
1760
1757
  disabled: e.vi.firstInParent,
1761
- onClick: s[3] || (s[3] = ae((C) => e.callbacks.moveTop(e.vi.key), ["stop"]))
1758
+ onClick: s[3] || (s[3] = le((C) => e.callbacks.moveTop(e.vi.key), ["stop"]))
1762
1759
  }, {
1763
1760
  prepend: r(() => [
1764
- i(te, { icon: "mdi-arrow-collapse-up" })
1761
+ i(ne, { icon: "mdi-arrow-collapse-up" })
1765
1762
  ]),
1766
1763
  default: r(() => [
1767
- i(Fe, null, {
1764
+ i(Re, null, {
1768
1765
  default: r(() => [
1769
- q(B(d(n)("common.sortable.moveToTop")), 1)
1766
+ G(B(d(n)("common.sortable.moveToTop")), 1)
1770
1767
  ]),
1771
1768
  _: 1
1772
1769
  })
1773
1770
  ]),
1774
1771
  _: 1
1775
1772
  }, 8, ["disabled"]),
1776
- i(De, {
1773
+ i(Ie, {
1777
1774
  disabled: e.vi.lastInParent,
1778
- onClick: s[4] || (s[4] = ae((C) => e.callbacks.moveBottom(e.vi.key), ["stop"]))
1775
+ onClick: s[4] || (s[4] = le((C) => e.callbacks.moveBottom(e.vi.key), ["stop"]))
1779
1776
  }, {
1780
1777
  prepend: r(() => [
1781
- i(te, { icon: "mdi-arrow-collapse-down" })
1778
+ i(ne, { icon: "mdi-arrow-collapse-down" })
1782
1779
  ]),
1783
1780
  default: r(() => [
1784
- i(Fe, null, {
1781
+ i(Re, null, {
1785
1782
  default: r(() => [
1786
- q(B(d(n)("common.sortable.moveToBottom")), 1)
1783
+ G(B(d(n)("common.sortable.moveToBottom")), 1)
1787
1784
  ]),
1788
1785
  _: 1
1789
1786
  })
1790
1787
  ]),
1791
1788
  _: 1
1792
1789
  }, 8, ["disabled"]),
1793
- e.context.showMoveToPosition && (!e.vi.firstInParent || !e.vi.lastInParent) ? (h(), Y(De, {
1790
+ e.context.showMoveToPosition && (!e.vi.firstInParent || !e.vi.lastInParent) ? (y(), W(Ie, {
1794
1791
  key: 0,
1795
- onClick: s[5] || (s[5] = ae((C) => e.callbacks.openMoveToPosition(e.vi), ["stop"]))
1792
+ onClick: s[5] || (s[5] = le((C) => e.callbacks.openMoveToPosition(e.vi), ["stop"]))
1796
1793
  }, {
1797
1794
  prepend: r(() => [
1798
- i(te, { icon: "mdi-target" })
1795
+ i(ne, { icon: "mdi-target" })
1799
1796
  ]),
1800
1797
  default: r(() => [
1801
- i(Fe, null, {
1798
+ i(Re, null, {
1802
1799
  default: r(() => [
1803
- q(B(d(n)("common.sortable.moveToPosition.action")), 1)
1800
+ G(B(d(n)("common.sortable.moveToPosition.action")), 1)
1804
1801
  ]),
1805
1802
  _: 1
1806
1803
  })
1807
1804
  ]),
1808
1805
  _: 1
1809
- })) : G("", !0),
1810
- e.context.showChangeParent ? (h(), Y(De, {
1806
+ })) : H("", !0),
1807
+ e.context.showChangeParent ? (y(), W(Ie, {
1811
1808
  key: 1,
1812
- onClick: s[6] || (s[6] = ae((C) => e.callbacks.openChangeParent(e.vi), ["stop"]))
1809
+ onClick: s[6] || (s[6] = le((C) => e.callbacks.openChangeParent(e.vi), ["stop"]))
1813
1810
  }, {
1814
1811
  prepend: r(() => [
1815
- i(te, { icon: "mdi-folder-move-outline" })
1812
+ i(ne, { icon: "mdi-folder-move-outline" })
1816
1813
  ]),
1817
1814
  default: r(() => [
1818
- i(Fe, null, {
1815
+ i(Re, null, {
1819
1816
  default: r(() => [
1820
- q(B(d(n)("common.sortable.changeParent.action")), 1)
1817
+ G(B(d(n)("common.sortable.changeParent.action")), 1)
1821
1818
  ]),
1822
1819
  _: 1
1823
1820
  })
1824
1821
  ]),
1825
1822
  _: 1
1826
- })) : G("", !0),
1827
- i(De, {
1823
+ })) : H("", !0),
1824
+ i(Ie, {
1828
1825
  disabled: !e.vi.canIndent,
1829
- onClick: s[7] || (s[7] = ae((C) => e.callbacks.indent(e.vi), ["stop"]))
1826
+ onClick: s[7] || (s[7] = le((C) => e.callbacks.indent(e.vi), ["stop"]))
1830
1827
  }, {
1831
1828
  prepend: r(() => [
1832
- i(te, { icon: "mdi-format-indent-increase" })
1829
+ i(ne, { icon: "mdi-format-indent-increase" })
1833
1830
  ]),
1834
1831
  default: r(() => [
1835
- i(Fe, null, {
1832
+ i(Re, null, {
1836
1833
  default: r(() => [
1837
- q(B(d(n)("common.sortable.indent")), 1)
1834
+ G(B(d(n)("common.sortable.indent")), 1)
1838
1835
  ]),
1839
1836
  _: 1
1840
1837
  })
1841
1838
  ]),
1842
1839
  _: 1
1843
1840
  }, 8, ["disabled"]),
1844
- i(De, {
1841
+ i(Ie, {
1845
1842
  disabled: !e.vi.canOutdent,
1846
- onClick: s[8] || (s[8] = ae((C) => e.callbacks.outdent(e.vi), ["stop"]))
1843
+ onClick: s[8] || (s[8] = le((C) => e.callbacks.outdent(e.vi), ["stop"]))
1847
1844
  }, {
1848
1845
  prepend: r(() => [
1849
- i(te, { icon: "mdi-format-indent-decrease" })
1846
+ i(ne, { icon: "mdi-format-indent-decrease" })
1850
1847
  ]),
1851
1848
  default: r(() => [
1852
- i(Fe, null, {
1849
+ i(Re, null, {
1853
1850
  default: r(() => [
1854
- q(B(d(n)("common.sortable.outdent")), 1)
1851
+ G(B(d(n)("common.sortable.outdent")), 1)
1855
1852
  ]),
1856
1853
  _: 1
1857
1854
  })
1858
1855
  ]),
1859
1856
  _: 1
1860
1857
  }, 8, ["disabled"]),
1861
- e.context.showDeleteButton && e.context.canInteract ? (h(), Y(De, {
1858
+ e.context.showDeleteButton && e.context.canInteract ? (y(), W(Ie, {
1862
1859
  key: 2,
1863
- onClick: s[9] || (s[9] = ae((C) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
1860
+ onClick: s[9] || (s[9] = le((C) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
1864
1861
  }, {
1865
1862
  prepend: r(() => [
1866
- i(te, {
1863
+ i(ne, {
1867
1864
  icon: "mdi-trash-can-outline",
1868
1865
  color: "error"
1869
1866
  })
1870
1867
  ]),
1871
1868
  default: r(() => [
1872
- i(Fe, { class: "text-error" }, {
1869
+ i(Re, { class: "text-error" }, {
1873
1870
  default: r(() => [
1874
- q(B(d(n)("common.sortable.delete")), 1)
1871
+ G(B(d(n)("common.sortable.delete")), 1)
1875
1872
  ]),
1876
1873
  _: 1
1877
1874
  })
1878
1875
  ]),
1879
1876
  _: 1
1880
- })) : G("", !0)
1877
+ })) : H("", !0)
1881
1878
  ]),
1882
1879
  _: 1
1883
1880
  })
@@ -1887,8 +1884,8 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1887
1884
  ]),
1888
1885
  _: 1
1889
1886
  })
1890
- ], 64)) : (h(), K(ye, { key: 1 }, [
1891
- e.context.showEditButton && e.context.canInteract ? (h(), Y(_, {
1887
+ ], 64)) : (y(), K(ve, { key: 1 }, [
1888
+ e.context.showEditButton && e.context.canInteract ? (y(), W(_, {
1892
1889
  key: 0,
1893
1890
  icon: "",
1894
1891
  size: "small",
@@ -1896,44 +1893,44 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1896
1893
  color: "primary",
1897
1894
  density: "comfortable",
1898
1895
  class: "mx-1 a-le-action a-le-action--edit",
1899
- onClick: s[10] || (s[10] = ae((C) => e.callbacks.onEditClick(e.vi), ["stop"]))
1896
+ onClick: s[10] || (s[10] = le((C) => e.callbacks.onEditClick(e.vi), ["stop"]))
1900
1897
  }, {
1901
1898
  default: r(() => [
1902
- i(te, {
1899
+ i(ne, {
1903
1900
  icon: "mdi-pencil-outline",
1904
1901
  size: "18"
1905
1902
  }),
1906
- i(Te, {
1903
+ i(De, {
1907
1904
  activator: "parent",
1908
1905
  location: "bottom",
1909
1906
  text: d(n)("common.sortable.edit")
1910
1907
  }, null, 8, ["text"])
1911
1908
  ]),
1912
1909
  _: 1
1913
- })) : G("", !0),
1914
- e.context.showDeleteButton && e.context.canInteract ? (h(), Y(_, {
1910
+ })) : H("", !0),
1911
+ e.context.showDeleteButton && e.context.canInteract ? (y(), W(_, {
1915
1912
  key: 1,
1916
1913
  icon: "",
1917
1914
  size: "small",
1918
1915
  variant: "text",
1919
1916
  density: "comfortable",
1920
1917
  class: "mx-1 a-le-action a-le-action--delete",
1921
- onClick: s[11] || (s[11] = ae((C) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
1918
+ onClick: s[11] || (s[11] = le((C) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
1922
1919
  }, {
1923
1920
  default: r(() => [
1924
- i(te, {
1921
+ i(ne, {
1925
1922
  icon: "mdi-trash-can-outline",
1926
1923
  size: "18"
1927
1924
  }),
1928
- i(Te, {
1925
+ i(De, {
1929
1926
  activator: "parent",
1930
1927
  location: "bottom",
1931
1928
  text: d(n)("common.sortable.delete")
1932
1929
  }, null, 8, ["text"])
1933
1930
  ]),
1934
1931
  _: 1
1935
- })) : G("", !0),
1936
- e.context.canInteract && (e.context.showAddChildButton && e.vi.canAddChild || e.context.showAddAfterAction) ? (h(), Y(_, {
1932
+ })) : H("", !0),
1933
+ e.context.canInteract && (e.context.showAddChildButton && e.vi.canAddChild || e.context.showAddAfterAction) ? (y(), W(_, {
1937
1934
  key: 2,
1938
1935
  icon: "",
1939
1936
  size: "small",
@@ -1943,53 +1940,53 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1943
1940
  class: "mx-1 a-le-action a-le-action--menu"
1944
1941
  }, {
1945
1942
  default: r(() => [
1946
- i(te, {
1943
+ i(ne, {
1947
1944
  icon: "mdi-dots-vertical",
1948
1945
  size: "18"
1949
1946
  }),
1950
- i(Te, {
1947
+ i(De, {
1951
1948
  activator: "parent",
1952
1949
  location: "bottom",
1953
1950
  text: d(n)("common.sortable.more")
1954
1951
  }, null, 8, ["text"]),
1955
- i(Bt, { activator: "parent" }, {
1952
+ i(Ft, { activator: "parent" }, {
1956
1953
  default: r(() => [
1957
- i(ht, { density: "compact" }, {
1954
+ i(yt, { density: "compact" }, {
1958
1955
  default: r(() => [
1959
- e.context.showAddAfterAction ? (h(), Y(De, {
1956
+ e.context.showAddAfterAction ? (y(), W(Ie, {
1960
1957
  key: 0,
1961
- onClick: s[12] || (s[12] = ae((C) => e.callbacks.onAddAfterClick(e.vi), ["stop"]))
1958
+ onClick: s[12] || (s[12] = le((C) => e.callbacks.onAddAfterClick(e.vi), ["stop"]))
1962
1959
  }, {
1963
1960
  prepend: r(() => [
1964
- i(te, { icon: "mdi-playlist-plus" })
1961
+ i(ne, { icon: "mdi-playlist-plus" })
1965
1962
  ]),
1966
1963
  default: r(() => [
1967
- i(Fe, null, {
1964
+ i(Re, null, {
1968
1965
  default: r(() => [
1969
- q(B(d(n)("common.sortable.addAfter")), 1)
1966
+ G(B(d(n)("common.sortable.addAfter")), 1)
1970
1967
  ]),
1971
1968
  _: 1
1972
1969
  })
1973
1970
  ]),
1974
1971
  _: 1
1975
- })) : G("", !0),
1976
- e.context.showAddChildButton && e.vi.canAddChild ? (h(), Y(De, {
1972
+ })) : H("", !0),
1973
+ e.context.showAddChildButton && e.vi.canAddChild ? (y(), W(Ie, {
1977
1974
  key: 1,
1978
- onClick: s[13] || (s[13] = ae((C) => e.callbacks.onAddChildClick(e.vi), ["stop"]))
1975
+ onClick: s[13] || (s[13] = le((C) => e.callbacks.onAddChildClick(e.vi), ["stop"]))
1979
1976
  }, {
1980
1977
  prepend: r(() => [
1981
- i(te, { icon: "mdi-subdirectory-arrow-right" })
1978
+ i(ne, { icon: "mdi-subdirectory-arrow-right" })
1982
1979
  ]),
1983
1980
  default: r(() => [
1984
- i(Fe, null, {
1981
+ i(Re, null, {
1985
1982
  default: r(() => [
1986
- q(B(d(n)("common.sortable.addChild")), 1)
1983
+ G(B(d(n)("common.sortable.addChild")), 1)
1987
1984
  ]),
1988
1985
  _: 1
1989
1986
  })
1990
1987
  ]),
1991
1988
  _: 1
1992
- })) : G("", !0)
1989
+ })) : H("", !0)
1993
1990
  ]),
1994
1991
  _: 1
1995
1992
  })
@@ -1998,27 +1995,27 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
1998
1995
  })
1999
1996
  ]),
2000
1997
  _: 1
2001
- })) : G("", !0)
1998
+ })) : H("", !0)
2002
1999
  ], 64))
2003
2000
  ])
2004
2001
  ])
2005
2002
  ]),
2006
- e.vi.editing && !e.context.reorderMode && k.$slots.item ? (h(), K(ye, { key: 0 }, [
2007
- M("div", Tl, [
2003
+ e.vi.editing && !e.context.reorderMode && k.$slots.item ? (y(), K(ve, { key: 0 }, [
2004
+ M("div", Dl, [
2008
2005
  M("div", El, [
2009
- z(k.$slots, "item", Ke(je(y())))
2006
+ z(k.$slots, "item", Ve(qe(p())))
2010
2007
  ])
2011
2008
  ]),
2012
- z(k.$slots, "item-footer", Ke(je(y())), () => [
2013
- e.context.showInlineSaveFooter ? (h(), K("div", $l, [
2009
+ z(k.$slots, "item-footer", Ve(qe(p())), () => [
2010
+ e.context.showInlineSaveFooter ? (y(), K("div", Tl, [
2014
2011
  s[19] || (s[19] = M("div", { class: "a-le-row-footer-spacer" }, null, -1)),
2015
2012
  i(_, {
2016
2013
  variant: "text",
2017
2014
  disabled: e.vi.loading,
2018
- onClick: s[15] || (s[15] = ae((C) => e.callbacks.onCancelClick(e.vi), ["stop"]))
2015
+ onClick: s[15] || (s[15] = le((C) => e.callbacks.onCancelClick(e.vi), ["stop"]))
2019
2016
  }, {
2020
2017
  default: r(() => [
2021
- q(B(d(n)("common.button.cancel")), 1)
2018
+ G(B(d(n)("common.button.cancel")), 1)
2022
2019
  ]),
2023
2020
  _: 1
2024
2021
  }, 8, ["disabled"]),
@@ -2027,32 +2024,32 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2027
2024
  variant: "flat",
2028
2025
  "prepend-icon": "mdi-check",
2029
2026
  disabled: e.vi.loading,
2030
- onClick: s[16] || (s[16] = ae((C) => e.callbacks.onSaveClick(e.vi), ["stop"]))
2027
+ onClick: s[16] || (s[16] = le((C) => e.callbacks.onSaveClick(e.vi), ["stop"]))
2031
2028
  }, {
2032
2029
  default: r(() => [
2033
- q(B(d(n)("common.button.save")), 1)
2030
+ G(B(d(n)("common.button.save")), 1)
2034
2031
  ]),
2035
2032
  _: 1
2036
2033
  }, 8, ["disabled"])
2037
- ])) : G("", !0)
2034
+ ])) : H("", !0)
2038
2035
  ])
2039
- ], 64)) : k.$slots["item-readonly"] && (e.context.readonly || e.vi.expanded) && !e.context.reorderMode ? (h(), K("div", Fl, [
2040
- M("div", Bl, [
2041
- z(k.$slots, "item-readonly", Ke(je(y())))
2036
+ ], 64)) : k.$slots["item-readonly"] && (e.context.readonly || e.vi.expanded) && !e.context.reorderMode ? (y(), K("div", $l, [
2037
+ M("div", Fl, [
2038
+ z(k.$slots, "item-readonly", Ve(qe(p())))
2042
2039
  ])
2043
- ])) : G("", !0),
2044
- z(k.$slots, "after-item", Ke(je(y())))
2040
+ ])) : H("", !0),
2041
+ z(k.$slots, "after-item", Ve(qe(p())))
2045
2042
  ], 6),
2046
- e.vi.hasChildren && e.vi.childrenExpanded ? (h(), K("div", {
2043
+ e.vi.hasChildren && e.vi.childrenExpanded ? (y(), K("div", {
2047
2044
  key: 0,
2048
2045
  class: "a-nested-list-editor__children",
2049
- style: yt({ "--parent-depth": e.vi.depth })
2046
+ style: vt({ "--parent-depth": e.vi.depth })
2050
2047
  }, [
2051
2048
  M("div", {
2052
- class: Pe([Kl]),
2049
+ class: xe([Rl]),
2053
2050
  "data-parent-id": String(e.vi.key)
2054
2051
  }, [
2055
- (h(!0), K(ye, null, _e(b(), (C) => (h(), Y(d(c), {
2052
+ (y(!0), K(ve, null, Ze(b(), (C) => (y(), W(d(u), {
2056
2053
  key: String(C.key),
2057
2054
  vi: C,
2058
2055
  "view-items": e.viewItems,
@@ -2061,38 +2058,38 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2061
2058
  callbacks: e.callbacks
2062
2059
  }, {
2063
2060
  item: r((D) => [
2064
- z(k.$slots, "item", oe({ ref_for: !0 }, D))
2061
+ z(k.$slots, "item", ie({ ref_for: !0 }, D))
2065
2062
  ]),
2066
2063
  "item-compact": r((D) => [
2067
- z(k.$slots, "item-compact", oe({ ref_for: !0 }, D))
2064
+ z(k.$slots, "item-compact", ie({ ref_for: !0 }, D))
2068
2065
  ]),
2069
2066
  "item-readonly": r((D) => [
2070
- z(k.$slots, "item-readonly", oe({ ref_for: !0 }, D))
2067
+ z(k.$slots, "item-readonly", ie({ ref_for: !0 }, D))
2071
2068
  ]),
2072
2069
  "item-status": r((D) => [
2073
- z(k.$slots, "item-status", oe({ ref_for: !0 }, D))
2070
+ z(k.$slots, "item-status", ie({ ref_for: !0 }, D))
2074
2071
  ]),
2075
2072
  "item-footer": r((D) => [
2076
- z(k.$slots, "item-footer", oe({ ref_for: !0 }, D))
2073
+ z(k.$slots, "item-footer", ie({ ref_for: !0 }, D))
2077
2074
  ]),
2078
2075
  "item-actions": r((D) => [
2079
- z(k.$slots, "item-actions", oe({ ref_for: !0 }, D))
2076
+ z(k.$slots, "item-actions", ie({ ref_for: !0 }, D))
2080
2077
  ]),
2081
2078
  "before-item": r((D) => [
2082
- z(k.$slots, "before-item", oe({ ref_for: !0 }, D))
2079
+ z(k.$slots, "before-item", ie({ ref_for: !0 }, D))
2083
2080
  ]),
2084
2081
  "after-item": r((D) => [
2085
- z(k.$slots, "after-item", oe({ ref_for: !0 }, D))
2082
+ z(k.$slots, "after-item", ie({ ref_for: !0 }, D))
2086
2083
  ]),
2087
2084
  _: 3
2088
2085
  }, 8, ["vi", "view-items", "drag-state", "context", "callbacks"]))), 128))
2089
- ], 10, Rl)
2090
- ], 4)) : G("", !0)
2091
- ], 42, kl));
2086
+ ], 10, Bl)
2087
+ ], 4)) : H("", !0)
2088
+ ], 42, bl));
2092
2089
  }
2093
- }), Ll = { class: "text-body-medium mb-2" }, Ml = /* @__PURE__ */ Ge({
2090
+ }), Vl = { class: "text-body-medium mb-2" }, Ll = /* @__PURE__ */ He({
2094
2091
  __name: "LeChangeParentDialog",
2095
- props: /* @__PURE__ */ Ve({
2092
+ props: /* @__PURE__ */ Le({
2096
2093
  tree: {},
2097
2094
  sourceKey: {},
2098
2095
  keyField: {},
@@ -2103,152 +2100,152 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2103
2100
  modelValue: { type: Boolean, required: !0 },
2104
2101
  modelModifiers: {}
2105
2102
  }),
2106
- emits: /* @__PURE__ */ Ve(["confirm"], ["update:modelValue"]),
2103
+ emits: /* @__PURE__ */ Le(["confirm"], ["update:modelValue"]),
2107
2104
  setup(e, { emit: w }) {
2108
- const c = e, n = w, u = qe(e, "modelValue"), { t: p } = He(), y = ue(void 0), b = ue("last");
2109
- Ee(u, (S) => {
2110
- S && (y.value = void 0, b.value = "last");
2105
+ const u = e, n = w, f = Ge(e, "modelValue"), { t: h } = Je(), p = ce(void 0), b = ce("last");
2106
+ Ee(f, (A) => {
2107
+ A && (p.value = void 0, b.value = "last");
2111
2108
  });
2112
2109
  const k = g(() => {
2113
- const S = /* @__PURE__ */ new Set();
2114
- if (c.sourceKey === null) return S;
2110
+ const A = /* @__PURE__ */ new Set();
2111
+ if (u.sourceKey === null) return A;
2115
2112
  const J = (L) => {
2116
- for (const T of L) {
2117
- if (T.data[c.keyField] === c.sourceKey) {
2118
- const le = (Q) => {
2119
- for (const ne of Q)
2120
- S.add(ne.data[c.keyField]), ne.children?.length && le(ne.children);
2113
+ for (const E of L) {
2114
+ if (E.data[u.keyField] === u.sourceKey) {
2115
+ const se = (X) => {
2116
+ for (const ae of X)
2117
+ A.add(ae.data[u.keyField]), ae.children?.length && se(ae.children);
2121
2118
  };
2122
- return T.children?.length && le(T.children), !0;
2119
+ return E.children?.length && se(E.children), !0;
2123
2120
  }
2124
- if (T.children?.length && J(T.children)) return !0;
2121
+ if (E.children?.length && J(E.children)) return !0;
2125
2122
  }
2126
2123
  return !1;
2127
2124
  };
2128
- return J(c.tree.children), S;
2125
+ return J(u.tree.children), A;
2129
2126
  }), s = g(() => {
2130
- if (c.sourceKey === null) return null;
2131
- const S = (J) => {
2127
+ if (u.sourceKey === null) return null;
2128
+ const A = (J) => {
2132
2129
  for (const L of J) {
2133
- if (L.data[c.keyField] === c.sourceKey) return L;
2130
+ if (L.data[u.keyField] === u.sourceKey) return L;
2134
2131
  if (L.children?.length) {
2135
- const T = S(L.children);
2136
- if (T) return T;
2132
+ const E = A(L.children);
2133
+ if (E) return E;
2137
2134
  }
2138
2135
  }
2139
2136
  return null;
2140
2137
  };
2141
- return S(c.tree.children);
2138
+ return A(u.tree.children);
2142
2139
  }), C = g(() => {
2143
- if (c.sourceKey === null) return;
2144
- const S = (J, L) => {
2145
- for (const T of J) {
2146
- if (T.data[c.keyField] === c.sourceKey) return L;
2147
- if (T.children?.length) {
2148
- const ee = S(T.children, T.data[c.keyField]);
2140
+ if (u.sourceKey === null) return;
2141
+ const A = (J, L) => {
2142
+ for (const E of J) {
2143
+ if (E.data[u.keyField] === u.sourceKey) return L;
2144
+ if (E.children?.length) {
2145
+ const ee = A(E.children, E.data[u.keyField]);
2149
2146
  if (ee !== void 0) return ee;
2150
2147
  }
2151
2148
  }
2152
2149
  };
2153
- return S(c.tree.children, null);
2150
+ return A(u.tree.children, null);
2154
2151
  }), D = g(() => {
2155
- const S = [], J = s.value ? c.calculateSubtreeDepth(s.value) : 1;
2156
- S.push({
2152
+ const A = [], J = s.value ? u.calculateSubtreeDepth(s.value) : 1;
2153
+ A.push({
2157
2154
  key: null,
2158
2155
  depth: 0,
2159
- label: p("common.sortable.changeParent.rootLabel"),
2160
- hasChildren: c.tree.children.length > 0,
2156
+ label: h("common.sortable.changeParent.rootLabel"),
2157
+ hasChildren: u.tree.children.length > 0,
2161
2158
  disallowed: C.value === null,
2162
2159
  reason: C.value === null ? "currentParent" : null
2163
2160
  });
2164
- const L = (T, ee) => {
2165
- for (const le of T) {
2166
- const Q = le.data[c.keyField];
2167
- let ne = !1, de = null;
2168
- Q === c.sourceKey ? (ne = !0, de = "self") : k.value.has(Q) ? (ne = !0, de = "descendant") : C.value !== void 0 && C.value === Q ? (ne = !0, de = "currentParent") : ee + 1 + J > c.maxDepth && (ne = !0, de = "maxDepth"), S.push({
2169
- key: Q,
2161
+ const L = (E, ee) => {
2162
+ for (const se of E) {
2163
+ const X = se.data[u.keyField];
2164
+ let ae = !1, re = null;
2165
+ X === u.sourceKey ? (ae = !0, re = "self") : k.value.has(X) ? (ae = !0, re = "descendant") : C.value !== void 0 && C.value === X ? (ae = !0, re = "currentParent") : ee + 1 + J > u.maxDepth && (ae = !0, re = "maxDepth"), A.push({
2166
+ key: X,
2170
2167
  depth: ee + 1,
2171
- label: c.resolveLabel(le.data, Q),
2172
- hasChildren: !!(le.children && le.children.length > 0),
2173
- disallowed: ne,
2174
- reason: de
2175
- }), le.children?.length && L(le.children, ee + 1);
2168
+ label: u.resolveLabel(se.data, X),
2169
+ hasChildren: !!(se.children && se.children.length > 0),
2170
+ disallowed: ae,
2171
+ reason: re
2172
+ }), se.children?.length && L(se.children, ee + 1);
2176
2173
  }
2177
2174
  };
2178
- return L(c.tree.children, 0), S;
2179
- }), N = g(() => D.value.filter((S) => !S.disallowed)), V = g(
2180
- () => y.value === void 0 ? null : D.value.find((S) => S.key === y.value) ?? null
2175
+ return L(u.tree.children, 0), A;
2176
+ }), N = g(() => D.value.filter((A) => !A.disallowed)), V = g(
2177
+ () => p.value === void 0 ? null : D.value.find((A) => A.key === p.value) ?? null
2181
2178
  ), I = g(
2182
2179
  () => !!V.value && V.value.hasChildren
2183
- ), E = (S) => {
2184
- S.disallowed || (y.value = S.key);
2180
+ ), T = (A) => {
2181
+ A.disallowed || (p.value = A.key);
2185
2182
  }, j = () => {
2186
- V.value && (n("confirm", V.value.key, b.value), u.value = !1);
2183
+ V.value && (n("confirm", V.value.key, b.value), f.value = !1);
2187
2184
  }, R = () => {
2188
- u.value = !1;
2189
- }, $ = (S) => `${S * 16}px`, X = (S) => S === "maxDepth" ? p("common.sortable.changeParent.errorMaxDepth") : "";
2190
- return (S, J) => (h(), Y(on, {
2191
- modelValue: u.value,
2192
- "onUpdate:modelValue": J[1] || (J[1] = (L) => u.value = L),
2185
+ f.value = !1;
2186
+ }, $ = (A) => `${A * 16}px`, Y = (A) => A === "maxDepth" ? h("common.sortable.changeParent.errorMaxDepth") : "";
2187
+ return (A, J) => (y(), W(an, {
2188
+ modelValue: f.value,
2189
+ "onUpdate:modelValue": J[1] || (J[1] = (L) => f.value = L),
2193
2190
  "max-width": "540",
2194
2191
  persistent: ""
2195
2192
  }, {
2196
2193
  default: r(() => [
2197
- i(an, null, {
2194
+ i(nn, null, {
2198
2195
  default: r(() => [
2199
- i(ia, null, {
2196
+ i(la, null, {
2200
2197
  default: r(() => [
2201
- q(B(d(p)("common.sortable.changeParent.title")), 1)
2198
+ G(B(d(h)("common.sortable.changeParent.title")), 1)
2202
2199
  ]),
2203
2200
  _: 1
2204
2201
  }),
2205
- N.value.length === 0 ? (h(), Y(Tt, {
2202
+ N.value.length === 0 ? (y(), W(Dt, {
2206
2203
  key: 0,
2207
2204
  class: "text-body-medium"
2208
2205
  }, {
2209
2206
  default: r(() => [
2210
- i(sn, {
2207
+ i(ln, {
2211
2208
  type: "info",
2212
2209
  variant: "tonal",
2213
2210
  density: "compact"
2214
2211
  }, {
2215
2212
  default: r(() => [
2216
- M("strong", null, B(d(p)("common.sortable.changeParent.noTargetsTitle")), 1),
2217
- M("div", null, B(d(p)("common.sortable.changeParent.noTargetsText")), 1)
2213
+ M("strong", null, B(d(h)("common.sortable.changeParent.noTargetsTitle")), 1),
2214
+ M("div", null, B(d(h)("common.sortable.changeParent.noTargetsText")), 1)
2218
2215
  ]),
2219
2216
  _: 1
2220
2217
  })
2221
2218
  ]),
2222
2219
  _: 1
2223
- })) : (h(), K(ye, { key: 1 }, [
2224
- i(Tt, { class: "pb-1" }, {
2220
+ })) : (y(), K(ve, { key: 1 }, [
2221
+ i(Dt, { class: "pb-1" }, {
2225
2222
  default: r(() => [
2226
- i(ht, {
2223
+ i(yt, {
2227
2224
  density: "compact",
2228
2225
  class: "le-change-parent__list"
2229
2226
  }, {
2230
2227
  default: r(() => [
2231
- (h(!0), K(ye, null, _e(D.value, (L) => (h(), Y(De, {
2228
+ (y(!0), K(ve, null, Ze(D.value, (L) => (y(), W(Ie, {
2232
2229
  key: L.key === null ? "__root__" : String(L.key),
2233
2230
  disabled: L.disallowed,
2234
- active: y.value === L.key,
2231
+ active: p.value === L.key,
2235
2232
  title: L.label,
2236
- subtitle: X(L.reason),
2237
- style: yt({ paddingInlineStart: $(L.depth) }),
2233
+ subtitle: Y(L.reason),
2234
+ style: vt({ paddingInlineStart: $(L.depth) }),
2238
2235
  "data-disallowed": L.disallowed ? "true" : "false",
2239
2236
  "data-reason": L.reason ?? "",
2240
- onClick: (T) => E(L)
2237
+ onClick: (E) => T(L)
2241
2238
  }, {
2242
2239
  prepend: r(() => [
2243
- L.key === null ? (h(), Y(te, {
2240
+ L.key === null ? (y(), W(ne, {
2244
2241
  key: 0,
2245
2242
  icon: "mdi-folder-home-outline",
2246
2243
  size: "18"
2247
- })) : L.hasChildren ? (h(), Y(te, {
2244
+ })) : L.hasChildren ? (y(), W(ne, {
2248
2245
  key: 1,
2249
2246
  icon: "mdi-folder-outline",
2250
2247
  size: "18"
2251
- })) : (h(), Y(te, {
2248
+ })) : (y(), W(ne, {
2252
2249
  key: 2,
2253
2250
  icon: "mdi-file-outline",
2254
2251
  size: "18"
@@ -2262,45 +2259,45 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2262
2259
  ]),
2263
2260
  _: 1
2264
2261
  }),
2265
- I.value ? (h(), Y(Tt, {
2262
+ I.value ? (y(), W(Dt, {
2266
2263
  key: 0,
2267
2264
  class: "pt-0"
2268
2265
  }, {
2269
2266
  default: r(() => [
2270
- M("div", Ll, B(d(p)("common.sortable.changeParent.placementHeading", {
2267
+ M("div", Vl, B(d(h)("common.sortable.changeParent.placementHeading", {
2271
2268
  label: V.value?.label ?? ""
2272
2269
  })), 1),
2273
- i(xo, {
2270
+ i(Co, {
2274
2271
  modelValue: b.value,
2275
2272
  "onUpdate:modelValue": J[0] || (J[0] = (L) => b.value = L),
2276
2273
  density: "compact",
2277
2274
  "hide-details": ""
2278
2275
  }, {
2279
2276
  default: r(() => [
2280
- i(wn, {
2277
+ i(kn, {
2281
2278
  value: "first",
2282
- label: d(p)("common.sortable.changeParent.placeFirst")
2279
+ label: d(h)("common.sortable.changeParent.placeFirst")
2283
2280
  }, null, 8, ["label"]),
2284
- i(wn, {
2281
+ i(kn, {
2285
2282
  value: "last",
2286
- label: d(p)("common.sortable.changeParent.placeLast")
2283
+ label: d(h)("common.sortable.changeParent.placeLast")
2287
2284
  }, null, 8, ["label"])
2288
2285
  ]),
2289
2286
  _: 1
2290
2287
  }, 8, ["modelValue"])
2291
2288
  ]),
2292
2289
  _: 1
2293
- })) : G("", !0)
2290
+ })) : H("", !0)
2294
2291
  ], 64)),
2295
- i(sa, null, {
2292
+ i(ia, null, {
2296
2293
  default: r(() => [
2297
- i(ln),
2294
+ i(on),
2298
2295
  i(_, {
2299
2296
  variant: "text",
2300
2297
  onClick: R
2301
2298
  }, {
2302
2299
  default: r(() => [
2303
- q(B(d(p)("common.sortable.reorderCancel")), 1)
2300
+ G(B(d(h)("common.sortable.reorderCancel")), 1)
2304
2301
  ]),
2305
2302
  _: 1
2306
2303
  }),
@@ -2311,7 +2308,7 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2311
2308
  onClick: j
2312
2309
  }, {
2313
2310
  default: r(() => [
2314
- q(B(d(p)("common.sortable.changeParent.confirm")), 1)
2311
+ G(B(d(h)("common.sortable.changeParent.confirm")), 1)
2315
2312
  ]),
2316
2313
  _: 1
2317
2314
  }, 8, ["disabled"])
@@ -2325,28 +2322,28 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2325
2322
  _: 1
2326
2323
  }, 8, ["modelValue"]));
2327
2324
  }
2328
- }), zl = /* @__PURE__ */ ta(Ml, [["__scopeId", "data-v-0058f5cc"]]), Nl = { class: "a-le-card" }, Ol = {
2325
+ }), Ml = /* @__PURE__ */ ea(Ll, [["__scopeId", "data-v-0058f5cc"]]), zl = { class: "a-le-card" }, Nl = {
2329
2326
  key: 0,
2330
2327
  class: "a-le-header"
2331
- }, Ul = {
2328
+ }, Ol = {
2332
2329
  key: 0,
2333
2330
  class: "a-le-title-heading"
2334
- }, jl = { class: "a-le-header-actions" }, ql = {
2331
+ }, Ul = { class: "a-le-header-actions" }, jl = {
2335
2332
  key: 1,
2336
2333
  class: "a-le-state a-le-state--loading"
2337
- }, Gl = {
2334
+ }, ql = {
2338
2335
  key: 2,
2339
2336
  class: "a-le-state a-le-state--error"
2340
- }, Hl = {
2337
+ }, Gl = {
2341
2338
  key: 3,
2342
2339
  class: "a-le-state a-le-state--empty"
2343
- }, Jl = {
2340
+ }, Hl = {
2344
2341
  class: "a-le-sr-only",
2345
2342
  "aria-live": "polite",
2346
2343
  role: "status"
2347
- }, Cn = "a-nested-list-editor__group", Wl = "a-le-drag-handle", xn = 24, An = 22, Ti = /* @__PURE__ */ Ge({
2344
+ }, wn = "a-nested-list-editor__group", Jl = "a-le-drag-handle", Cn = 24, xn = 22, Di = /* @__PURE__ */ He({
2348
2345
  __name: "ANestedSortableListEditor",
2349
- props: /* @__PURE__ */ Ve({
2346
+ props: /* @__PURE__ */ Le({
2350
2347
  maxDepth: {},
2351
2348
  keyField: { default: "id" },
2352
2349
  positionField: { default: "position" },
@@ -2370,7 +2367,6 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2370
2367
  getValidationState: { type: Function, default: void 0 },
2371
2368
  addLabel: { default: null },
2372
2369
  emptyTitle: { default: null },
2373
- emptyText: { default: null },
2374
2370
  disableRowClick: { type: Boolean, default: !1 },
2375
2371
  disableDeleteConfirm: { type: Boolean, default: !1 },
2376
2372
  deleteConfirmTitle: { default: null },
@@ -2380,6 +2376,7 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2380
2376
  showReorderToggle: { type: Boolean, default: !0 },
2381
2377
  disableReorder: { type: Boolean, default: !1 },
2382
2378
  disableDrag: { type: Boolean, default: !1 },
2379
+ disableUnsaved: { type: Boolean, default: !1 },
2383
2380
  onDeleteConfirm: { type: Function, default: void 0 },
2384
2381
  onDelete: { type: Function, default: void 0 },
2385
2382
  onItemSave: { type: Function, default: void 0 },
@@ -2394,101 +2391,101 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2394
2391
  },
2395
2392
  unsavedKeysModifiers: {}
2396
2393
  }),
2397
- emits: /* @__PURE__ */ Ve(["add", "add-child", "edit", "deleted", "close", "item-saved", "item-expand", "reorder-start", "reorder-cancel", "reorder-applied", "reorder-apply-error", "reorder-end", "indent", "outdent"], ["update:modelValue", "update:mode", "update:unsavedKeys"]),
2398
- setup(e, { expose: w, emit: c }) {
2399
- const n = e, u = c, p = qe(e, "modelValue"), y = qe(e, "mode"), { t: b } = He(), k = aa(), s = nn(), { showWarningT: C } = qn(), D = Ft("rootEl"), { isNarrow: N } = io(D), V = g(() => s.platform.value.touch), I = g(() => n.closeVariant === "icon" ? "icon" : n.closeVariant === "labeled" ? "labeled" : N.value ? "icon" : "labeled"), E = ue(/* @__PURE__ */ new Set()), j = ue(/* @__PURE__ */ new Set());
2394
+ emits: /* @__PURE__ */ Le(["add", "add-child", "edit", "deleted", "close", "item-saved", "item-expand", "reorder-start", "reorder-cancel", "reorder-applied", "reorder-apply-error", "reorder-end", "indent", "outdent"], ["update:modelValue", "update:mode", "update:unsavedKeys"]),
2395
+ setup(e, { expose: w, emit: u }) {
2396
+ const n = e, f = u, h = Ge(e, "modelValue"), p = Ge(e, "mode"), { t: b } = Je(), k = na(), s = tn(), { showWarningT: C } = jn(), D = $t("rootEl"), { isNarrow: N } = lo(D), V = g(() => s.platform.value.touch), I = g(() => n.closeVariant === "icon" ? "icon" : n.closeVariant === "labeled" ? "labeled" : N.value ? "icon" : "labeled"), T = ce(/* @__PURE__ */ new Set()), j = ce(/* @__PURE__ */ new Set());
2400
2397
  ((t) => {
2401
2398
  const l = (a) => {
2402
- for (const A of a)
2403
- A.children && A.children.length > 0 && (E.value.add(A.data[n.keyField]), l(A.children));
2399
+ for (const x of a)
2400
+ x.children && x.children.length > 0 && (T.value.add(x.data[n.keyField]), l(x.children));
2404
2401
  };
2405
2402
  l(t.children);
2406
- })(p.value);
2407
- const $ = hl(p, {
2403
+ })(h.value);
2404
+ const $ = yl(h, {
2408
2405
  keyField: n.keyField,
2409
2406
  positionField: n.positionField,
2410
2407
  parentField: n.parentField,
2411
2408
  positionMultiplier: n.positionMultiplier,
2412
2409
  maxDepth: n.maxDepth,
2413
- expandedKeys: E
2414
- }), { captureDirtyBaseline: X, rebaselineKey: S, isItemDirty: J, ignoreNextSourceChange: L } = (
2410
+ expandedKeys: T
2411
+ }), { captureDirtyBaseline: Y, rebaselineKey: A, isItemDirty: J, ignoreNextSourceChange: L } = (
2415
2412
  // eslint-disable-next-line vue/no-setup-props-reactivity-loss
2416
- Gn(
2413
+ qn(
2417
2414
  () => {
2418
2415
  const t = [], l = (a) => {
2419
- for (const A of a)
2420
- t.push({ key: A.data[n.keyField], data: A.data }), A.children && A.children.length && l(A.children);
2416
+ for (const x of a)
2417
+ t.push({ key: x.data[n.keyField], data: x.data }), x.children && x.children.length && l(x.children);
2421
2418
  };
2422
- return l(p.value.children), t;
2419
+ return l(h.value.children), t;
2423
2420
  },
2424
- { excludeFields: [n.positionField, n.parentField], source: p }
2421
+ { excludeFields: [n.positionField, n.parentField], source: h }
2425
2422
  )
2426
- ), T = Qt(null), ee = ue(/* @__PURE__ */ new Set()), le = () => {
2427
- X(), ee.value = /* @__PURE__ */ new Set();
2428
- }, Q = (t) => {
2423
+ ), E = Xt(null), ee = ce(/* @__PURE__ */ new Set()), se = () => {
2424
+ Y(), ee.value = /* @__PURE__ */ new Set();
2425
+ }, X = (t) => {
2429
2426
  const { node: l } = $.findNode(t);
2430
2427
  if (!l) {
2431
2428
  ee.value.add(t);
2432
2429
  return;
2433
2430
  }
2434
- const a = (A) => {
2435
- ee.value.add(A.data[n.keyField]), A.children && A.children.forEach(a);
2431
+ const a = (x) => {
2432
+ ee.value.add(x.data[n.keyField]), x.children && x.children.forEach(a);
2436
2433
  };
2437
2434
  a(l);
2438
- }, ne = g(() => {
2435
+ }, ae = g(() => {
2439
2436
  const t = /* @__PURE__ */ new Set(), l = (a) => {
2440
- for (const A of a) {
2441
- const Z = A.data[n.keyField];
2442
- J(Z, A.data) && t.add(Z), A.children?.length && l(A.children);
2437
+ for (const x of a) {
2438
+ const Z = x.data[n.keyField];
2439
+ J(Z, x.data) && t.add(Z), x.children?.length && l(x.children);
2443
2440
  }
2444
2441
  };
2445
- return l(p.value.children), t;
2446
- }), de = /* @__PURE__ */ new Map(), P = g(() => {
2442
+ return l(h.value.children), t;
2443
+ }), re = /* @__PURE__ */ new Map(), P = g(() => {
2447
2444
  const t = [], l = /* @__PURE__ */ new Set();
2448
2445
  for (const a of $.viewItems.value) {
2449
2446
  l.add(a.key);
2450
- const A = se.value.has(a.key), Z = j.value.has(a.key), ve = E.value.has(a.key), Re = n.loadingKeys?.has(a.key) ?? !1, ze = ee.value.has(a.key), ft = ne.value.has(a.key), mt = ft || ze, ce = de.get(a.key);
2451
- if (ce && ce.raw === a.raw && ce.index === a.index && ce.position === a.position && ce.depth === a.depth && ce.parentKey === a.parentKey && ce.childrenCount === a.childrenCount && ce.firstInParent === a.firstInParent && ce.lastInParent === a.lastInParent && ce.editing === A && ce.expanded === Z && ce.childrenExpanded === ve && ce.loading === Re && ce.dirty === ft && ce.moved === ze && ce.unsaved === mt) {
2452
- t.push(ce);
2447
+ const x = Q.value.has(a.key), Z = j.value.has(a.key), me = T.value.has(a.key), Ke = n.loadingKeys?.has(a.key) ?? !1, Ne = n.disableUnsaved ? !1 : ee.value.has(a.key), ut = n.disableUnsaved ? !1 : ae.value.has(a.key), ft = ut || Ne, de = re.get(a.key);
2448
+ if (de && de.raw === a.raw && de.index === a.index && de.position === a.position && de.depth === a.depth && de.parentKey === a.parentKey && de.childrenCount === a.childrenCount && de.firstInParent === a.firstInParent && de.lastInParent === a.lastInParent && de.editing === x && de.expanded === Z && de.childrenExpanded === me && de.loading === Ke && de.dirty === ut && de.moved === Ne && de.unsaved === ft) {
2449
+ t.push(de);
2453
2450
  continue;
2454
2451
  }
2455
- const Wt = {
2452
+ const Jt = {
2456
2453
  ...a,
2457
- editing: A,
2454
+ editing: x,
2458
2455
  expanded: Z,
2459
- childrenExpanded: ve,
2460
- loading: Re,
2461
- dirty: ft,
2462
- moved: ze,
2463
- unsaved: mt
2456
+ childrenExpanded: me,
2457
+ loading: Ke,
2458
+ dirty: ut,
2459
+ moved: Ne,
2460
+ unsaved: ft
2464
2461
  };
2465
- de.set(a.key, Wt), t.push(Wt);
2462
+ re.set(a.key, Jt), t.push(Jt);
2466
2463
  }
2467
- for (const a of de.keys())
2468
- l.has(a) || de.delete(a);
2464
+ for (const a of re.keys())
2465
+ l.has(a) || re.delete(a);
2469
2466
  return t;
2470
- }), m = g(() => p.value.children.length === 0), v = g(() => $.viewItems.value.length), x = Ft("rowsContainer"), F = g(() => !n.readonly && !n.disabled && !n.loading), U = g(
2467
+ }), c = g(() => h.value.children.length === 0), v = g(() => $.viewItems.value.length), S = $t("rowsContainer"), F = g(() => !n.readonly && !n.disabled && !n.loading), O = g(
2471
2468
  () => F.value && !n.disableReorder && v.value > 1
2472
- ), H = g(() => !!k.item), ie = g(() => !!k["item-readonly"]), W = g(() => !!n.onItemSave), {
2473
- editingKeys: se,
2474
- editingSnapshots: re,
2475
- clearEditing: fe,
2476
- beginEdit: Le,
2477
- cancelEdit: Be,
2478
- commitEdit: ge,
2479
- closeEdit: be,
2480
- requestAutoOpen: Ce
2481
- } = Hn({
2482
- rowsContainer: x,
2469
+ ), q = g(() => !!k.item), oe = g(() => !!k["item-readonly"]), te = g(() => !!n.onItemSave), {
2470
+ editingKeys: Q,
2471
+ editingSnapshots: ue,
2472
+ clearEditing: ge,
2473
+ beginEdit: Te,
2474
+ cancelEdit: Ae,
2475
+ commitEdit: $e,
2476
+ closeEdit: ye,
2477
+ requestAutoOpen: Fe
2478
+ } = Gn({
2479
+ rowsContainer: S,
2483
2480
  rowSelector: ".a-le-row-wrapper",
2484
- isInlineEdit: H,
2481
+ isInlineEdit: q,
2485
2482
  restoreSnapshot: (t, l) => $.updateItem(t, l),
2486
2483
  watchKeys: () => {
2487
2484
  const t = [], l = (a) => {
2488
- for (const A of a)
2489
- t.push(A.data[n.keyField]), A.children && A.children.length && l(A.children);
2485
+ for (const x of a)
2486
+ t.push(x.data[n.keyField]), x.children && x.children.length && l(x.children);
2490
2487
  };
2491
- return l(p.value.children), t;
2488
+ return l(h.value.children), t;
2492
2489
  },
2493
2490
  findEntry: (t) => {
2494
2491
  const { node: l } = $.findNode(t);
@@ -2496,360 +2493,357 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2496
2493
  },
2497
2494
  afterAutoOpen: (t) => {
2498
2495
  const { parent: l } = $.findNode(t);
2499
- l && E.value.add(l.data[n.keyField]);
2496
+ l && T.value.add(l.data[n.keyField]);
2500
2497
  }
2501
2498
  }), {
2502
- applying: Ie,
2503
- applyError: Je,
2504
- hasPendingChanges: We,
2505
- movedCount: et,
2506
- reorderMode: xe,
2507
- enterReorderMode: tt,
2508
- cancelReorderMode: Ye,
2499
+ applying: Se,
2500
+ applyError: _e,
2501
+ hasPendingChanges: Me,
2502
+ movedCount: ht,
2503
+ reorderMode: we,
2504
+ enterReorderMode: et,
2505
+ cancelReorderMode: We,
2509
2506
  applyReorder: lt
2510
- } = so({
2511
- mode: y,
2512
- snapshot: T,
2507
+ } = io({
2508
+ mode: p,
2509
+ snapshot: E,
2513
2510
  movedKeys: ee,
2514
- modelValue: p,
2515
- cloneModel: (t) => we(t),
2511
+ modelValue: h,
2512
+ cloneModel: (t) => ke(t),
2516
2513
  applyModel: (t) => {
2517
- L(), p.value = t;
2514
+ L(), h.value = t;
2518
2515
  },
2519
- canEnterReorder: U,
2516
+ canEnterReorder: O,
2520
2517
  onEnter: () => {
2521
- fe();
2522
- for (const t of Me.value) E.value.add(t);
2523
- Ne(() => {
2524
- Ae.value && ot();
2518
+ ge();
2519
+ for (const t of ze.value) T.value.add(t);
2520
+ Oe(() => {
2521
+ Pe.value && at();
2525
2522
  });
2526
2523
  },
2527
2524
  onExternalEnter: () => {
2528
- fe();
2525
+ ge();
2529
2526
  },
2530
2527
  onCancel: () => {
2531
- me();
2528
+ fe();
2532
2529
  },
2533
2530
  onApplyEnd: () => {
2534
- me();
2531
+ fe();
2535
2532
  },
2536
2533
  onReorderApply: (t) => n.onReorderApply?.(t),
2537
2534
  emit: {
2538
- reorderStart: () => u("reorder-start"),
2539
- reorderCancel: () => u("reorder-cancel"),
2540
- reorderApplied: (t) => u("reorder-applied", t),
2541
- reorderApplyError: (t) => u("reorder-apply-error", t),
2542
- reorderEnd: () => u("reorder-end")
2535
+ reorderStart: () => f("reorder-start"),
2536
+ reorderCancel: () => f("reorder-cancel"),
2537
+ reorderApplied: (t) => f("reorder-applied", t),
2538
+ reorderApplyError: (t) => f("reorder-apply-error", t),
2539
+ reorderEnd: () => f("reorder-end")
2543
2540
  }
2544
- }), it = g(() => F.value && n.showAddButton && !xe.value), Ae = g(() => xe.value && !V.value && !n.disableDrag), st = g(
2541
+ }), Ye = g(() => F.value && n.showAddButton && !we.value), Pe = g(() => we.value && !V.value && !n.disableDrag), it = g(
2545
2542
  () => n.addLabel ? b(n.addLabel) : b("common.sortable.add")
2546
- ), pt = g(() => n.emptyTitle ?? b("common.sortable.emptyTitle")), nt = g(() => n.emptyText ?? b("common.sortable.emptyText")), Xe = g(
2543
+ ), tt = g(() => n.emptyTitle ?? b("common.sortable.emptyTitle")), Xe = g(
2547
2544
  () => n.deleteConfirmTitle ?? b("common.sortable.deleteConfirmTitle")
2548
- ), Kt = g(
2545
+ ), Rt = g(
2549
2546
  () => n.deleteConfirmText ?? b("common.sortable.deleteConfirmText")
2550
- ), $e = g(
2551
- () => !n.readonly && n.showReorderToggle && !xe.value && v.value > 0
2552
- ), gt = g(() => !!n.title && N.value), Me = g(() => {
2547
+ ), Be = g(
2548
+ () => !n.readonly && n.showReorderToggle && !we.value && v.value > 0
2549
+ ), pt = g(() => !!n.title && N.value), ze = g(() => {
2553
2550
  const t = [], l = (a) => {
2554
- for (const A of a)
2555
- A.children && A.children.length > 0 && (t.push(A.data[n.keyField]), l(A.children));
2551
+ for (const x of a)
2552
+ x.children && x.children.length > 0 && (t.push(x.data[n.keyField]), l(x.children));
2556
2553
  };
2557
- return l(p.value.children), t;
2554
+ return l(h.value.children), t;
2558
2555
  }), Qe = g(
2559
- () => Me.value.length > 0 && Me.value.every((t) => E.value.has(t))
2560
- ), rt = g(
2561
- () => !xe.value && Me.value.length > 0
2562
- ), bt = () => {
2556
+ () => ze.value.length > 0 && ze.value.every((t) => T.value.has(t))
2557
+ ), st = g(
2558
+ () => !we.value && ze.value.length > 0
2559
+ ), gt = () => {
2563
2560
  if (Qe.value)
2564
- for (const t of Me.value) E.value.delete(t);
2561
+ for (const t of ze.value) T.value.delete(t);
2565
2562
  else
2566
- for (const t of Me.value) E.value.add(t);
2563
+ for (const t of ze.value) T.value.add(t);
2567
2564
  }, o = g(
2568
- () => !!(n.title || k.header || k["reorder-toggle"] || $e.value || rt.value || xe.value)
2569
- ), O = ue([]), f = ue(0), me = () => {
2570
- for (const t of O.value)
2565
+ () => !!(n.title || k.header || k["reorder-toggle"] || Be.value || st.value || we.value)
2566
+ ), U = ce([]), m = ce(0), fe = () => {
2567
+ for (const t of U.value)
2571
2568
  try {
2572
2569
  t.stop();
2573
2570
  } catch {
2574
2571
  }
2575
- O.value = [];
2576
- }, ke = ue(null), kt = (t, l) => {
2572
+ U.value = [];
2573
+ }, be = ce(null), bt = (t, l) => {
2577
2574
  const a = document.elementFromPoint(t, l);
2578
2575
  if (!a) return null;
2579
- const A = a.closest(".a-le-row-wrapper");
2580
- if (!A || !x.value || !x.value.contains(A)) return null;
2581
- const Z = rn(A.getAttribute("data-id"));
2576
+ const x = a.closest(".a-le-row-wrapper");
2577
+ if (!x || !S.value || !S.value.contains(x)) return null;
2578
+ const Z = sn(x.getAttribute("data-id"));
2582
2579
  if (Z === null) return null;
2583
- const ve = P.value.find((Re) => Re.key === Z);
2584
- return ve ? { el: A, viewItem: ve } : null;
2585
- }, at = (t, l) => {
2586
- if (!ke.value || !x.value) return;
2587
- const a = kt(t, l);
2580
+ const me = P.value.find((Ke) => Ke.key === Z);
2581
+ return me ? { el: x, viewItem: me } : null;
2582
+ }, nt = (t, l) => {
2583
+ if (!be.value || !S.value) return;
2584
+ const a = bt(t, l);
2588
2585
  if (!a) {
2589
- ke.value.instruction = null;
2586
+ be.value.instruction = null;
2590
2587
  return;
2591
2588
  }
2592
- const A = x.value.getBoundingClientRect(), ve = (a.el.querySelector(":scope > .a-le-row") ?? a.el).getBoundingClientRect();
2593
- ke.value.instruction = bl({
2589
+ const x = S.value.getBoundingClientRect(), me = (a.el.querySelector(":scope > .a-le-row") ?? a.el).getBoundingClientRect();
2590
+ be.value.instruction = gl({
2594
2591
  pointer: { x: t, y: l },
2595
2592
  hoveredRow: {
2596
2593
  key: a.viewItem.key,
2597
- rect: ve,
2594
+ rect: me,
2598
2595
  depth: a.viewItem.depth,
2599
2596
  parentKey: a.viewItem.parentKey,
2600
2597
  siblingIndex: a.viewItem.siblingIndex,
2601
2598
  siblingCount: a.viewItem.siblingCount
2602
2599
  },
2603
- sourceKey: ke.value.sourceKey,
2604
- sourceSubtreeDepth: ke.value.sourceSubtreeDepth,
2600
+ sourceKey: be.value.sourceKey,
2601
+ sourceSubtreeDepth: be.value.sourceSubtreeDepth,
2605
2602
  viewItems: P.value,
2606
2603
  maxDepth: n.maxDepth,
2607
- indentPx: xn,
2608
- containerLeft: A.left,
2609
- containerPaddingLeft: An
2604
+ indentPx: Cn,
2605
+ containerLeft: x.left,
2606
+ containerPaddingLeft: xn
2610
2607
  });
2611
- }, Se = (t) => {
2612
- at(t.clientX, t.clientY);
2613
- }, wt = (t, l) => {
2608
+ }, Ce = (t) => {
2609
+ nt(t.clientX, t.clientY);
2610
+ }, kt = (t, l) => {
2614
2611
  if ($.moveTo(l, t.parentKey, t.index) === null) {
2615
- C("common.sortable.error.maxDeepExceed"), f.value++, Ne(() => ot());
2612
+ C("common.sortable.error.maxDeepExceed"), m.value++, Oe(() => at());
2616
2613
  return;
2617
2614
  }
2618
- Q(l), t.makeChild && t.parentKey !== null && E.value.add(t.parentKey);
2619
- }, ot = () => {
2620
- if (me(), !Ae.value || !x.value) return;
2621
- const t = Array.from(x.value.querySelectorAll("." + Cn));
2615
+ X(l), t.makeChild && t.parentKey !== null && T.value.add(t.parentKey);
2616
+ }, at = () => {
2617
+ if (fe(), !Pe.value || !S.value) return;
2618
+ const t = Array.from(S.value.querySelectorAll("." + wn));
2622
2619
  for (const l of t) {
2623
- const a = uo(l, [], {
2620
+ const a = co(l, [], {
2624
2621
  group: { name: "a-nested", pull: !0, put: !0 },
2625
- handle: "." + Wl,
2622
+ handle: "." + Jl,
2626
2623
  animation: 0,
2627
- ghostClass: vo,
2628
- chosenClass: mo,
2629
- dragClass: fo,
2624
+ ghostClass: mo,
2625
+ chosenClass: fo,
2626
+ dragClass: uo,
2630
2627
  fallbackOnBody: !0,
2631
2628
  forceFallback: !0,
2632
2629
  fallbackTolerance: 3,
2633
- onStart: (A) => {
2634
- const Z = A.item, ve = rn(Z.getAttribute("data-id"));
2635
- if (ve === null) return;
2636
- const Re = $.findNode(ve).node, ze = Re ? $.calculateSubtreeDepth(Re) : 1;
2637
- ke.value = {
2638
- sourceKey: ve,
2639
- sourceSubtreeDepth: ze,
2630
+ onStart: (x) => {
2631
+ const Z = x.item, me = sn(Z.getAttribute("data-id"));
2632
+ if (me === null) return;
2633
+ const Ke = $.findNode(me).node, Ne = Ke ? $.calculateSubtreeDepth(Ke) : 1;
2634
+ be.value = {
2635
+ sourceKey: me,
2636
+ sourceSubtreeDepth: Ne,
2640
2637
  instruction: null
2641
- }, document.addEventListener("pointermove", Se, { passive: !0 });
2638
+ }, document.addEventListener("pointermove", Ce, { passive: !0 });
2642
2639
  },
2643
- onMove: (A) => {
2644
- const Z = A.originalEvent;
2640
+ onMove: (x) => {
2641
+ const Z = x.originalEvent;
2645
2642
  if (Z) {
2646
2643
  if ("clientX" in Z && "clientY" in Z)
2647
- at(Z.clientX, Z.clientY);
2644
+ nt(Z.clientX, Z.clientY);
2648
2645
  else if ("touches" in Z) {
2649
- const ve = Z;
2650
- ve.touches.length > 0 && at(ve.touches[0].clientX, ve.touches[0].clientY);
2646
+ const me = Z;
2647
+ me.touches.length > 0 && nt(me.touches[0].clientX, me.touches[0].clientY);
2651
2648
  }
2652
2649
  }
2653
2650
  return !1;
2654
2651
  },
2655
2652
  onEnd: () => {
2656
- document.removeEventListener("pointermove", Se);
2657
- const A = ke.value;
2658
- if (ke.value = null, !A) return;
2659
- const Z = A.instruction;
2660
- Z !== null && Z.type !== "blocked" && wt(Z, A.sourceKey);
2653
+ document.removeEventListener("pointermove", Ce);
2654
+ const x = be.value;
2655
+ if (be.value = null, !x) return;
2656
+ const Z = x.instruction;
2657
+ Z !== null && Z.type !== "blocked" && kt(Z, x.sourceKey);
2661
2658
  }
2662
2659
  });
2663
- O.value.push(a);
2660
+ U.value.push(a);
2664
2661
  }
2665
- }, rn = (t) => {
2662
+ }, sn = (t) => {
2666
2663
  if (t === null || t === "") return null;
2667
- const l = yo(t);
2664
+ const l = vo(t);
2668
2665
  return l > 0 ? l : t;
2669
2666
  };
2670
2667
  Ee(
2671
- () => Ae.value,
2668
+ () => Pe.value,
2672
2669
  () => {
2673
- Ae.value ? Ne(() => ot()) : me();
2670
+ Pe.value ? Oe(() => at()) : fe();
2674
2671
  }
2675
2672
  ), Ee(
2676
- () => f.value,
2673
+ () => m.value,
2677
2674
  () => {
2678
- Ae.value && Ne(() => ot());
2675
+ Pe.value && Oe(() => at());
2679
2676
  }
2680
2677
  ), Ee(
2681
2678
  () => P.value.map((t) => t.key).join("|"),
2682
2679
  () => {
2683
- Ae.value && Ne(() => ot());
2680
+ Pe.value && Oe(() => at());
2684
2681
  }
2685
- ), _t(() => {
2686
- Ae.value && ot();
2687
- }), en(() => {
2688
- me(), document.removeEventListener("pointermove", Se);
2682
+ ), Zt(() => {
2683
+ Pe.value && at();
2684
+ }), _t(() => {
2685
+ fe(), document.removeEventListener("pointermove", Ce);
2689
2686
  });
2690
- const Ue = g(() => {
2691
- const t = ke.value;
2692
- if (!t || t.instruction === null || !x.value) return null;
2687
+ const je = g(() => {
2688
+ const t = be.value;
2689
+ if (!t || t.instruction === null || !S.value) return null;
2693
2690
  const l = t.instruction;
2694
2691
  if (l.type === "blocked") return null;
2695
- const a = x.value.querySelector(
2692
+ const a = S.value.querySelector(
2696
2693
  `.a-le-row-wrapper[data-id="${CSS.escape(String(l.refKey))}"]`
2697
2694
  );
2698
2695
  if (!a) return null;
2699
- const A = a.querySelector(":scope > .a-le-row"), Z = x.value.getBoundingClientRect(), ve = (A ?? a).getBoundingClientRect(), Re = An + l.depth * xn, ze = l.refEdge === "top" ? ve.top - Z.top : ve.bottom - Z.top, ft = { top: ze, left: Re, right: 16 };
2700
- let mt = null;
2696
+ const x = a.querySelector(":scope > .a-le-row"), Z = S.value.getBoundingClientRect(), me = (x ?? a).getBoundingClientRect(), Ke = xn + l.depth * Cn, Ne = l.refEdge === "top" ? me.top - Z.top : me.bottom - Z.top, ut = { top: Ne, left: Ke, right: 16 };
2697
+ let ft = null;
2701
2698
  if (l.levelRowKey !== null) {
2702
- const ce = x.value.querySelector(
2699
+ const de = S.value.querySelector(
2703
2700
  `.a-le-row-wrapper[data-id="${CSS.escape(String(l.levelRowKey))}"]`
2704
2701
  );
2705
- if (ce) {
2706
- const gn = (ce.querySelector(":scope > .a-le-row") ?? ce).getBoundingClientRect(), Yt = gn.top - Z.top + gn.height / 2;
2707
- Yt < ze && (mt = {
2708
- top: Yt,
2709
- height: ze - Yt,
2710
- left: Re
2702
+ if (de) {
2703
+ const pn = (de.querySelector(":scope > .a-le-row") ?? de).getBoundingClientRect(), Wt = pn.top - Z.top + pn.height / 2;
2704
+ Wt < Ne && (ft = {
2705
+ top: Wt,
2706
+ height: Ne - Wt,
2707
+ left: Ke
2711
2708
  });
2712
2709
  }
2713
2710
  }
2714
- return { line: ft, connector: mt };
2715
- }), dt = () => {
2716
- it.value && (Ce(), u("add", void 0));
2711
+ return { line: ut, connector: ft };
2712
+ }), rt = () => {
2713
+ Ye.value && (Fe(), f("add", void 0));
2714
+ }, rn = (t) => {
2715
+ F.value && (Fe(), f("add", { afterId: t.key, childrenAllowed: t.childrenAllowed }));
2717
2716
  }, dn = (t) => {
2718
- F.value && (Ce(), u("add", { afterId: t.key, childrenAllowed: t.childrenAllowed }));
2719
- }, cn = (t) => {
2720
- F.value && t.canAddChild && (Ce(), E.value.add(t.key), u("add-child", t), u("add", { parentId: t.key, childrenAllowed: !0 }));
2721
- }, Ct = (t) => {
2722
- if (!(!F.value || xe.value)) {
2723
- if (se.value.has(t.key)) {
2724
- ct(t);
2717
+ F.value && t.canAddChild && (Fe(), T.value.add(t.key), f("add-child", t), f("add", { parentId: t.key, childrenAllowed: !0 }));
2718
+ }, wt = (t) => {
2719
+ if (!(!F.value || we.value)) {
2720
+ if (Q.value.has(t.key)) {
2721
+ dt(t);
2725
2722
  return;
2726
2723
  }
2727
- H.value && Le(t), u("edit", t);
2724
+ q.value && Te(t), f("edit", t);
2728
2725
  }
2729
- }, Vt = (t) => {
2726
+ }, Kt = (t) => {
2730
2727
  if (n.disabled || n.loading) return;
2731
- const l = t.key, a = E.value.has(l);
2732
- a ? E.value.delete(l) : E.value.add(l), u("item-expand", t, !a);
2733
- }, un = (t) => {
2728
+ const l = t.key, a = T.value.has(l);
2729
+ a ? T.value.delete(l) : T.value.add(l), f("item-expand", t, !a);
2730
+ }, cn = (t) => {
2734
2731
  if (n.disabled || n.loading) return;
2735
2732
  const l = t.key, a = j.value.has(l);
2736
- a ? j.value.delete(l) : j.value.add(l), u("item-expand", t, !a);
2737
- }, fn = (t) => n.disableRowClick || n.disabled || n.loading || xe.value ? !1 : !!(t.editing || t.expanded || !n.readonly && n.showEditButton), fa = (t) => {
2738
- if (fn(t)) {
2733
+ a ? j.value.delete(l) : j.value.add(l), f("item-expand", t, !a);
2734
+ }, un = (t) => n.disableRowClick || n.disabled || n.loading || we.value ? !1 : !!(t.editing || t.expanded || !n.readonly && n.showEditButton), ua = (t) => {
2735
+ if (un(t)) {
2739
2736
  if (t.editing || t.expanded) {
2740
- ct(t);
2737
+ dt(t);
2741
2738
  return;
2742
2739
  }
2743
- n.readonly && ie.value ? un(t) : Ct(t);
2740
+ n.readonly && oe.value ? cn(t) : wt(t);
2744
2741
  }
2745
2742
  }, {
2746
- deleteDialog: Lt,
2747
- deleteInFlight: ma,
2748
- deleteError: va,
2749
- onDeleteClick: ya,
2750
- onDeleteDialogConfirm: ha,
2751
- onDeleteDialogCancel: pa
2752
- } = Yn({
2743
+ deleteDialog: Vt,
2744
+ deleteInFlight: fa,
2745
+ deleteError: ma,
2746
+ onDeleteClick: va,
2747
+ onDeleteDialogConfirm: ya,
2748
+ onDeleteDialogCancel: ha
2749
+ } = Wn({
2753
2750
  onDeleteConfirm: (t) => n.onDeleteConfirm ? n.onDeleteConfirm(t) : !0,
2754
2751
  onDelete: (t) => n.onDelete?.(t),
2755
2752
  onDeleted: (t) => {
2756
- se.value.delete(t.key), re.value.delete(t.key), j.value.delete(t.key), E.value.delete(t.key), u("deleted", t);
2753
+ Q.value.delete(t.key), ue.value.delete(t.key), j.value.delete(t.key), T.value.delete(t.key), f("deleted", t);
2757
2754
  },
2758
2755
  disableDeleteConfirm: () => n.disableDeleteConfirm
2759
- }), mn = async (t) => {
2760
- F.value && await ya(t);
2761
- }, vn = async (t) => {
2762
- n.onItemSave && await n.onItemSave(t.raw), ge(t), u("item-saved", t);
2763
- }, yn = (t) => {
2764
- Be(t);
2765
- }, ct = (t) => {
2766
- be(t), u("close", t);
2756
+ }), fn = async (t) => {
2757
+ F.value && await va(t);
2758
+ }, mn = async (t) => {
2759
+ n.onItemSave && await n.onItemSave(t.raw), $e(t), f("item-saved", t);
2760
+ }, vn = (t) => {
2761
+ Ae(t);
2762
+ }, dt = (t) => {
2763
+ ye(t), f("close", t);
2764
+ }, Lt = (t) => {
2765
+ $.moveUp(t) && X(t);
2767
2766
  }, Mt = (t) => {
2768
- $.moveUp(t) && Q(t);
2767
+ $.moveDown(t) && X(t);
2769
2768
  }, zt = (t) => {
2770
- $.moveDown(t) && Q(t);
2769
+ $.moveTop(t) && X(t);
2771
2770
  }, Nt = (t) => {
2772
- $.moveTop(t) && Q(t);
2771
+ $.moveBottom(t) && X(t);
2773
2772
  }, Ot = (t) => {
2774
- $.moveBottom(t) && Q(t);
2775
- }, Ut = (t) => {
2776
2773
  if ($.indent(t.key) === null) {
2777
2774
  C("common.sortable.error.maxDeepExceed");
2778
2775
  return;
2779
2776
  }
2780
- Q(t.key), u("indent", t);
2781
- }, jt = (t) => {
2782
- $.outdent(t.key) !== null && (Q(t.key), u("outdent", t));
2783
- }, qt = (t, l) => ea(t, l, {
2784
- compactField: n.compactField,
2785
- fallback: b("common.sortable.itemFallback")
2786
- }), { resolveValidation: hn } = Wn({
2777
+ X(t.key), f("indent", t);
2778
+ }, Ut = (t) => {
2779
+ $.outdent(t.key) !== null && (X(t.key), f("outdent", t));
2780
+ }, jt = (t) => _n(t, { compactField: n.compactField }), { resolveValidation: yn } = Jn({
2787
2781
  getValidationState: (t, l, a) => n.getValidationState?.(t, l, a) ?? null
2788
- }), ut = /* @__PURE__ */ new Map(), ga = (t) => {
2789
- let l = ut.get(t);
2782
+ }), ct = /* @__PURE__ */ new Map(), pa = (t) => {
2783
+ let l = ct.get(t);
2790
2784
  return l || (l = {
2791
2785
  edit: () => {
2792
2786
  const a = he(t);
2793
- a && Ct(a);
2787
+ a && wt(a);
2794
2788
  },
2795
2789
  save: () => {
2796
2790
  const a = he(t);
2797
- if (a) return vn(a);
2791
+ if (a) return mn(a);
2798
2792
  },
2799
2793
  cancel: () => {
2800
2794
  const a = he(t);
2801
- a && yn(a);
2795
+ a && vn(a);
2802
2796
  },
2803
2797
  close: () => {
2804
2798
  const a = he(t);
2805
- a && ct(a);
2799
+ a && dt(a);
2806
2800
  },
2807
2801
  delete: async () => {
2808
2802
  const a = he(t);
2809
- a && await mn(a);
2803
+ a && await fn(a);
2810
2804
  },
2811
2805
  addAfter: () => {
2812
2806
  const a = he(t);
2813
- a && dn(a);
2807
+ a && rn(a);
2814
2808
  },
2815
2809
  addChild: () => {
2816
2810
  const a = he(t);
2817
- a && cn(a);
2811
+ a && dn(a);
2818
2812
  },
2819
2813
  toggleExpand: () => {
2820
2814
  const a = he(t);
2821
- a && Vt(a);
2815
+ a && Kt(a);
2822
2816
  },
2823
2817
  toggleDetail: () => {
2824
2818
  const a = he(t);
2825
- a && un(a);
2819
+ a && cn(a);
2826
2820
  },
2827
- moveUp: () => Mt(t),
2828
- moveDown: () => zt(t),
2829
- moveTop: () => Nt(t),
2830
- moveBottom: () => Ot(t),
2821
+ moveUp: () => Lt(t),
2822
+ moveDown: () => Mt(t),
2823
+ moveTop: () => zt(t),
2824
+ moveBottom: () => Nt(t),
2831
2825
  indent: () => {
2832
2826
  const a = he(t);
2833
- a && Ut(a);
2827
+ a && Ot(a);
2834
2828
  },
2835
2829
  outdent: () => {
2836
2830
  const a = he(t);
2837
- a && jt(a);
2831
+ a && Ut(a);
2838
2832
  },
2839
2833
  update: (a) => $.updateItem(t, a)
2840
- }, ut.set(t, l)), l;
2834
+ }, ct.set(t, l)), l;
2841
2835
  };
2842
2836
  Ee(
2843
2837
  () => P.value,
2844
2838
  (t) => {
2845
- if (ut.size === 0) return;
2839
+ if (ct.size === 0) return;
2846
2840
  const l = new Set(t.map((a) => a.key));
2847
- for (const a of ut.keys())
2848
- l.has(a) || ut.delete(a);
2841
+ for (const a of ct.keys())
2842
+ l.has(a) || ct.delete(a);
2849
2843
  }
2850
2844
  );
2851
- const ba = (t) => ({
2852
- item: { ...t, validationState: hn(t.raw, t.key, t.index) },
2845
+ const ga = (t) => ({
2846
+ item: { ...t, validationState: yn(t.raw, t.key, t.index) },
2853
2847
  raw: t.raw,
2854
2848
  index: t.index,
2855
2849
  key: t.key,
@@ -2869,100 +2863,100 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2869
2863
  dirty: t.dirty,
2870
2864
  unsaved: t.unsaved,
2871
2865
  moved: t.moved,
2872
- reorderMode: xe.value,
2866
+ reorderMode: we.value,
2873
2867
  canMoveUp: !t.firstInParent,
2874
2868
  canMoveDown: !t.lastInParent,
2875
2869
  canIndent: t.canIndent,
2876
2870
  canOutdent: t.canOutdent,
2877
2871
  canAddChild: t.canAddChild,
2878
2872
  touch: V.value,
2879
- actions: ga(t.key)
2880
- }), ka = g(() => ({
2881
- applying: Ie.value,
2882
- hasPendingChanges: We.value,
2883
- movedCount: et.value,
2884
- error: Je.value,
2873
+ actions: pa(t.key)
2874
+ }), ba = g(() => ({
2875
+ applying: Se.value,
2876
+ hasPendingChanges: Me.value,
2877
+ movedCount: ht.value,
2878
+ error: _e.value,
2885
2879
  actions: {
2886
2880
  apply: lt,
2887
- cancel: Ye
2881
+ cancel: We
2888
2882
  }
2889
- })), pn = g(() => ({
2890
- mode: y.value,
2891
- disabled: !U.value,
2892
- hasPendingChanges: We.value,
2883
+ })), hn = g(() => ({
2884
+ mode: p.value,
2885
+ disabled: !O.value,
2886
+ hasPendingChanges: Me.value,
2893
2887
  actions: {
2894
- enterReorderMode: tt,
2895
- exitReorderMode: Ye
2888
+ enterReorderMode: et,
2889
+ exitReorderMode: We
2896
2890
  }
2897
- })), wa = g(() => new Set(Me.value)), he = (t) => P.value.find((l) => l.key === t), xt = Jn({
2891
+ })), ka = g(() => new Set(ze.value)), he = (t) => P.value.find((l) => l.key === t), Ct = Hn({
2898
2892
  viewItems: g(
2899
2893
  () => P.value.map((t) => ({
2900
2894
  key: t.key,
2901
2895
  expanded: t.childrenExpanded,
2902
- canExpand: wa.value.has(t.key),
2896
+ canExpand: ka.value.has(t.key),
2903
2897
  canIndent: !0,
2904
2898
  canOutdent: !0
2905
2899
  }))
2906
2900
  ),
2907
2901
  variant: "nested",
2908
- isReorderMode: xe,
2902
+ isReorderMode: we,
2909
2903
  disabled: g(() => !F.value),
2910
- isEditing: (t) => se.value.has(t),
2904
+ isEditing: (t) => Q.value.has(t),
2911
2905
  onToggleEdit: (t) => {
2912
2906
  const l = he(t);
2913
- l && Ct(l);
2907
+ l && wt(l);
2914
2908
  },
2915
2909
  onCancelEdit: (t) => {
2916
2910
  const l = he(t);
2917
- l && ct(l);
2911
+ l && dt(l);
2918
2912
  },
2919
- onMoveUp: (t) => Mt(t),
2920
- onMoveDown: (t) => zt(t),
2921
- onMoveTop: (t) => Nt(t),
2922
- onMoveBottom: (t) => Ot(t),
2913
+ onMoveUp: (t) => Lt(t),
2914
+ onMoveDown: (t) => Mt(t),
2915
+ onMoveTop: (t) => zt(t),
2916
+ onMoveBottom: (t) => Nt(t),
2923
2917
  onIndent: (t) => {
2924
2918
  const l = he(t);
2925
- l && Ut(l);
2919
+ l && Ot(l);
2926
2920
  },
2927
2921
  onOutdent: (t) => {
2928
2922
  const l = he(t);
2929
- l && jt(l);
2923
+ l && Ut(l);
2930
2924
  },
2931
2925
  onToggleChildren: (t) => {
2932
2926
  const l = he(t);
2933
- l && Vt(l);
2927
+ l && Kt(l);
2934
2928
  },
2935
- onCancelReorder: () => Ye()
2936
- }), Gt = ue(!1), Ze = Qt(null), Ht = g(() => {
2937
- const t = Ze.value;
2929
+ onCancelReorder: () => We()
2930
+ }), qt = ce(!1), ot = Xt(null), Gt = g(() => {
2931
+ const t = ot.value;
2938
2932
  if (!t) return null;
2939
- const l = $.findNode(t.key), a = l.parent?.children ?? p.value.children, A = a.findIndex((Z) => Z.data[n.keyField] === t.key);
2933
+ const l = $.findNode(t.key), a = l.parent?.children ?? h.value.children, x = a.findIndex((Z) => Z.data[n.keyField] === t.key);
2940
2934
  return {
2941
2935
  parentId: l.parent ? l.parent.data[n.keyField] : null,
2942
2936
  total: a.length,
2943
- currentIndex: A
2937
+ currentIndex: x
2944
2938
  };
2945
- }), Ca = g(
2946
- () => Ze.value ? qt(Ze.value.raw, Ze.value.key) : ""
2947
- ), xa = (t) => {
2948
- n.showMoveToPosition && (Ze.value = t, Gt.value = !0);
2949
- }, Aa = (t) => {
2950
- const l = Ht.value, a = Ze.value;
2951
- Ze.value = null, !(!l || !a) && t !== l.currentIndex && $.moveTo(a.key, l.parentId, t) && Q(a.key);
2952
- }, Jt = ue(!1), At = Qt(null), Sa = (t) => {
2953
- n.showChangeParent && (At.value = t, Jt.value = !0);
2954
- }, Pa = (t, l) => {
2955
- const a = At.value;
2956
- if (At.value = null, !a) return;
2957
- let A = 0;
2958
- t === null ? A = p.value.children.length : A = $.findNode(t).node?.children?.length ?? 0;
2959
- const Z = l === "first" ? 0 : A;
2960
- $.moveTo(a.key, t, Z) && (Q(a.key), t !== null && E.value.add(t));
2961
- }, Ia = g(() => ({
2962
- reorderMode: xe.value,
2939
+ }), wa = g(
2940
+ () => ot.value ? jt(ot.value.raw) : ""
2941
+ ), Ca = (t) => {
2942
+ n.showMoveToPosition && (ot.value = t, qt.value = !0);
2943
+ }, xa = (t) => {
2944
+ const l = Gt.value, a = ot.value;
2945
+ ot.value = null, !(!l || !a) && t !== l.currentIndex && $.moveTo(a.key, l.parentId, t) && X(a.key);
2946
+ }, Ht = ce(!1), xt = Xt(null), Aa = (t) => {
2947
+ n.showChangeParent && (xt.value = t, Ht.value = !0);
2948
+ }, Sa = (t, l) => {
2949
+ const a = xt.value;
2950
+ if (xt.value = null, !a) return;
2951
+ let x = 0;
2952
+ t === null ? x = h.value.children.length : x = $.findNode(t).node?.children?.length ?? 0;
2953
+ const Z = l === "first" ? 0 : x;
2954
+ $.moveTo(a.key, t, Z) && (X(a.key), t !== null && T.value.add(t));
2955
+ }, Pa = g(() => ({
2956
+ reorderMode: we.value,
2963
2957
  readonly: n.readonly,
2964
2958
  canInteract: F.value,
2965
- dragEnabled: Ae.value,
2959
+ dragEnabled: Pe.value,
2966
2960
  showExpandToggle: n.showExpandToggle,
2967
2961
  showEditButton: n.showEditButton,
2968
2962
  showDeleteButton: n.showDeleteButton,
@@ -2970,64 +2964,64 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
2970
2964
  showAddAfterAction: n.showAddAfterAction,
2971
2965
  showMoveToPosition: n.showMoveToPosition,
2972
2966
  showChangeParent: n.showChangeParent,
2973
- showInlineSaveFooter: W.value,
2967
+ showInlineSaveFooter: te.value,
2974
2968
  statusField: n.statusField,
2975
2969
  effectiveCloseVariant: I.value,
2976
- keyboardNav: xt,
2977
- isRowClickable: fn,
2978
- resolveCompactText: qt,
2979
- resolveValidation: (t, l, a) => hn(t, l, a),
2980
- buildSlotProps: ba
2981
- })), Da = {
2982
- onRowClick: fa,
2983
- onChevronClick: Vt,
2984
- onEditClick: Ct,
2985
- onDeleteClick: mn,
2986
- onCloseClick: ct,
2987
- onSaveClick: vn,
2988
- onCancelClick: yn,
2989
- onAddAfterClick: dn,
2990
- onAddChildClick: cn,
2991
- moveUp: (t) => Mt(t),
2992
- moveDown: (t) => zt(t),
2993
- moveTop: (t) => Nt(t),
2994
- moveBottom: (t) => Ot(t),
2995
- indent: Ut,
2996
- outdent: jt,
2997
- openMoveToPosition: xa,
2998
- openChangeParent: Sa
2999
- }, Ta = g(() => P.value.filter((t) => t.parentKey === null)), Ea = (t, l, a) => {
3000
- const A = $.addItem(l, { afterId: t ?? void 0, childrenAllowed: a });
3001
- return Ne(() => X()), A;
3002
- }, $a = (t, l, a) => {
3003
- E.value.add(t);
3004
- const A = $.addItem(l, { parentId: t, asFirstChild: !0, childrenAllowed: a });
3005
- return Ne(() => X()), A;
3006
- }, Fa = (t) => {
3007
- $.deleteItem(t), se.value.delete(t), re.value.delete(t), j.value.delete(t), E.value.delete(t), Ne(() => X());
3008
- }, Ba = (t, l, a = null, A = null, Z = null) => {
3009
- $.updateItem(t, l), Ne(() => X());
3010
- }, Ra = qe(e, "unsavedKeys"), Ka = g(() => {
2970
+ keyboardNav: Ct,
2971
+ isRowClickable: un,
2972
+ resolveCompactText: jt,
2973
+ resolveValidation: (t, l, a) => yn(t, l, a),
2974
+ buildSlotProps: ga
2975
+ })), Ia = {
2976
+ onRowClick: ua,
2977
+ onChevronClick: Kt,
2978
+ onEditClick: wt,
2979
+ onDeleteClick: fn,
2980
+ onCloseClick: dt,
2981
+ onSaveClick: mn,
2982
+ onCancelClick: vn,
2983
+ onAddAfterClick: rn,
2984
+ onAddChildClick: dn,
2985
+ moveUp: (t) => Lt(t),
2986
+ moveDown: (t) => Mt(t),
2987
+ moveTop: (t) => zt(t),
2988
+ moveBottom: (t) => Nt(t),
2989
+ indent: Ot,
2990
+ outdent: Ut,
2991
+ openMoveToPosition: Ca,
2992
+ openChangeParent: Aa
2993
+ }, Da = g(() => P.value.filter((t) => t.parentKey === null)), Ea = (t, l, a) => {
2994
+ const x = $.addItem(l, { afterId: t ?? void 0, childrenAllowed: a });
2995
+ return Oe(() => Y()), x;
2996
+ }, Ta = (t, l, a) => {
2997
+ T.value.add(t);
2998
+ const x = $.addItem(l, { parentId: t, asFirstChild: !0, childrenAllowed: a });
2999
+ return Oe(() => Y()), x;
3000
+ }, $a = (t) => {
3001
+ $.deleteItem(t), Q.value.delete(t), ue.value.delete(t), j.value.delete(t), T.value.delete(t), Oe(() => Y());
3002
+ }, Fa = (t, l, a = null, x = null, Z = null) => {
3003
+ $.updateItem(t, l), Oe(() => Y());
3004
+ }, Ba = Ge(e, "unsavedKeys"), Ra = g(() => {
3011
3005
  const t = /* @__PURE__ */ new Set();
3012
3006
  for (const l of P.value)
3013
3007
  l.unsaved && t.add(l.key);
3014
3008
  return t;
3015
- }), { hasUnsavedChanges: Va, unsavedCount: La, clearUnsavedState: Ma } = Xn({
3016
- unsavedKeysModel: Ra,
3017
- internalUnsavedKeys: Ka,
3009
+ }), { hasUnsavedChanges: Ka, unsavedCount: Va, clearUnsavedState: La } = Yn({
3010
+ unsavedKeysModel: Ba,
3011
+ internalUnsavedKeys: Ra,
3018
3012
  onClearAll: () => {
3019
- X(), ee.value = /* @__PURE__ */ new Set();
3013
+ Y(), ee.value = /* @__PURE__ */ new Set();
3020
3014
  },
3021
3015
  onClearKey: (t) => {
3022
- S(t), ee.value.delete(t);
3016
+ A(t), ee.value.delete(t);
3023
3017
  }
3024
3018
  });
3025
3019
  return w({
3026
3020
  addItem: $.addItem,
3027
3021
  addAfterId: Ea,
3028
- addChildToId: $a,
3029
- removeById: Fa,
3030
- updateData: Ba,
3022
+ addChildToId: Ta,
3023
+ removeById: $a,
3024
+ updateData: Fa,
3031
3025
  updateItem: $.updateItem,
3032
3026
  deleteItem: $.deleteItem,
3033
3027
  moveUp: $.moveUp,
@@ -3039,55 +3033,55 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
3039
3033
  moveTo: $.moveTo,
3040
3034
  recalculatePositions: $.recalculatePositions,
3041
3035
  viewItems: $.viewItems,
3042
- resetDirtyBaseline: le,
3043
- hasUnsavedChanges: Va,
3044
- unsavedCount: La,
3045
- clearUnsavedState: Ma,
3046
- enterReorderMode: tt,
3047
- cancelReorderMode: Ye,
3036
+ resetDirtyBaseline: se,
3037
+ hasUnsavedChanges: Ka,
3038
+ unsavedCount: Va,
3039
+ clearUnsavedState: La,
3040
+ enterReorderMode: et,
3041
+ cancelReorderMode: We,
3048
3042
  applyReorder: lt,
3049
3043
  // Tree children visibility (expand/collapse a branch)
3050
- expand: (t) => E.value.add(t),
3051
- collapse: (t) => E.value.delete(t),
3044
+ expand: (t) => T.value.add(t),
3045
+ collapse: (t) => T.value.delete(t),
3052
3046
  toggleExpand: (t) => {
3053
- E.value.has(t) ? E.value.delete(t) : E.value.add(t);
3047
+ T.value.has(t) ? T.value.delete(t) : T.value.add(t);
3054
3048
  },
3055
3049
  // Row readonly-detail body visibility
3056
3050
  expandDetail: (t) => j.value.add(t),
3057
3051
  collapseDetail: (t) => j.value.delete(t)
3058
- }), (t, l) => (h(), K("div", {
3052
+ }), (t, l) => (y(), K("div", {
3059
3053
  ref_key: "rootEl",
3060
3054
  ref: D,
3061
- class: Pe(["a-nested-list-editor", [
3062
- `a-nested-list-editor--mode-${y.value}`,
3055
+ class: xe(["a-nested-list-editor", [
3056
+ `a-nested-list-editor--mode-${p.value}`,
3063
3057
  {
3064
3058
  "a-nested-list-editor--readonly": e.readonly,
3065
3059
  "a-nested-list-editor--disabled": e.disabled,
3066
3060
  "a-nested-list-editor--touch": V.value,
3067
- "a-nested-list-editor--drag-enabled": Ae.value
3061
+ "a-nested-list-editor--drag-enabled": Pe.value
3068
3062
  }
3069
3063
  ]])
3070
3064
  }, [
3071
- M("div", Nl, [
3072
- o.value ? (h(), K("div", Ol, [
3073
- z(t.$slots, "header", oe({ title: e.title }, pn.value), () => [
3074
- e.title ? (h(), K("h3", Ul, B(e.title), 1)) : G("", !0),
3075
- M("div", jl, [
3076
- d(xe) ? z(t.$slots, "reorder-toolbar", Ke(oe({ key: 0 }, ka.value)), () => [
3077
- i(ro, {
3078
- class: Pe({ "a-le-toolbar-status--pending": d(We) }),
3079
- "has-pending-changes": d(We),
3080
- "pending-count": d(et),
3081
- error: d(Je)
3065
+ M("div", zl, [
3066
+ o.value ? (y(), K("div", Nl, [
3067
+ z(t.$slots, "header", ie({ title: e.title }, hn.value), () => [
3068
+ e.title ? (y(), K("h3", Ol, B(e.title), 1)) : H("", !0),
3069
+ M("div", Ul, [
3070
+ d(we) ? z(t.$slots, "reorder-toolbar", Ve(ie({ key: 0 }, ba.value)), () => [
3071
+ i(so, {
3072
+ class: xe({ "a-le-toolbar-status--pending": d(Me) }),
3073
+ "has-pending-changes": d(Me),
3074
+ "pending-count": d(ht),
3075
+ error: d(_e)
3082
3076
  }, null, 8, ["class", "has-pending-changes", "pending-count", "error"]),
3083
3077
  i(_, {
3084
3078
  variant: "text",
3085
3079
  size: "small",
3086
- disabled: d(Ie),
3087
- onClick: d(Ye)
3080
+ disabled: d(Se),
3081
+ onClick: d(We)
3088
3082
  }, {
3089
3083
  default: r(() => [
3090
- q(B(d(b)("common.sortable.reorderCancel")), 1)
3084
+ G(B(d(b)("common.sortable.reorderCancel")), 1)
3091
3085
  ]),
3092
3086
  _: 1
3093
3087
  }, 8, ["disabled", "onClick"]),
@@ -3096,249 +3090,248 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
3096
3090
  variant: "flat",
3097
3091
  size: "small",
3098
3092
  "prepend-icon": "mdi-check",
3099
- loading: d(Ie),
3100
- disabled: d(Ie) || !d(We),
3093
+ loading: d(Se),
3094
+ disabled: d(Se) || !d(Me),
3101
3095
  onClick: d(lt)
3102
3096
  }, {
3103
3097
  default: r(() => [
3104
- q(B(d(b)("common.sortable.reorderApply")), 1)
3098
+ G(B(d(b)("common.sortable.reorderApply")), 1)
3105
3099
  ]),
3106
3100
  _: 1
3107
3101
  }, 8, ["loading", "disabled", "onClick"])
3108
- ]) : (h(), K(ye, { key: 1 }, [
3109
- rt.value && gt.value ? (h(), Y(_, {
3102
+ ]) : (y(), K(ve, { key: 1 }, [
3103
+ st.value && pt.value ? (y(), W(_, {
3110
3104
  key: 0,
3111
3105
  variant: "tonal",
3112
3106
  color: "primary",
3113
3107
  icon: "",
3114
3108
  size: "x-small",
3115
- onClick: bt
3109
+ onClick: gt
3116
3110
  }, {
3117
3111
  default: r(() => [
3118
- i(te, {
3112
+ i(ne, {
3119
3113
  icon: Qe.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
3120
3114
  size: "18"
3121
3115
  }, null, 8, ["icon"]),
3122
- i(Te, {
3116
+ i(De, {
3123
3117
  activator: "parent",
3124
3118
  location: "bottom",
3125
3119
  text: Qe.value ? d(b)("common.sortable.collapseAll") : d(b)("common.sortable.expandAll")
3126
3120
  }, null, 8, ["text"])
3127
3121
  ]),
3128
3122
  _: 1
3129
- })) : rt.value ? (h(), Y(_, {
3123
+ })) : st.value ? (y(), W(_, {
3130
3124
  key: 1,
3131
3125
  variant: "tonal",
3132
3126
  color: "primary",
3133
3127
  size: "small",
3134
3128
  "prepend-icon": Qe.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
3135
- onClick: bt
3129
+ onClick: gt
3136
3130
  }, {
3137
3131
  default: r(() => [
3138
- q(B(Qe.value ? d(b)("common.sortable.collapseAll") : d(b)("common.sortable.expandAll")), 1)
3132
+ G(B(Qe.value ? d(b)("common.sortable.collapseAll") : d(b)("common.sortable.expandAll")), 1)
3139
3133
  ]),
3140
3134
  _: 1
3141
- }, 8, ["prepend-icon"])) : G("", !0),
3142
- $e.value ? z(t.$slots, "reorder-toggle", Ke(oe({ key: 2 }, pn.value)), () => [
3143
- gt.value ? (h(), Y(_, {
3135
+ }, 8, ["prepend-icon"])) : H("", !0),
3136
+ Be.value ? z(t.$slots, "reorder-toggle", Ve(ie({ key: 2 }, hn.value)), () => [
3137
+ pt.value ? (y(), W(_, {
3144
3138
  key: 0,
3145
3139
  variant: "tonal",
3146
3140
  color: "primary",
3147
3141
  icon: "",
3148
3142
  size: "x-small",
3149
- disabled: !U.value,
3150
- onClick: d(tt)
3143
+ disabled: !O.value,
3144
+ onClick: d(et)
3151
3145
  }, {
3152
3146
  default: r(() => [
3153
- i(te, {
3147
+ i(ne, {
3154
3148
  icon: "mdi-sort",
3155
3149
  size: "18"
3156
3150
  }),
3157
- i(Te, {
3151
+ i(De, {
3158
3152
  activator: "parent",
3159
3153
  location: "bottom",
3160
3154
  text: d(b)("common.sortable.reorder")
3161
3155
  }, null, 8, ["text"])
3162
3156
  ]),
3163
3157
  _: 1
3164
- }, 8, ["disabled", "onClick"])) : (h(), Y(_, {
3158
+ }, 8, ["disabled", "onClick"])) : (y(), W(_, {
3165
3159
  key: 1,
3166
3160
  variant: "tonal",
3167
3161
  color: "primary",
3168
3162
  "prepend-icon": "mdi-sort",
3169
3163
  size: "small",
3170
- disabled: !U.value,
3171
- onClick: d(tt)
3164
+ disabled: !O.value,
3165
+ onClick: d(et)
3172
3166
  }, {
3173
3167
  default: r(() => [
3174
- q(B(d(b)("common.sortable.reorder")), 1)
3168
+ G(B(d(b)("common.sortable.reorder")), 1)
3175
3169
  ]),
3176
3170
  _: 1
3177
3171
  }, 8, ["disabled", "onClick"]))
3178
- ]) : G("", !0)
3172
+ ]) : H("", !0)
3179
3173
  ], 64))
3180
3174
  ])
3181
3175
  ])
3182
- ])) : G("", !0),
3183
- e.loading ? (h(), K("div", ql, [
3184
- i(ra, {
3176
+ ])) : H("", !0),
3177
+ e.loading ? (y(), K("div", jl, [
3178
+ i(sa, {
3185
3179
  indeterminate: "",
3186
3180
  color: "primary",
3187
3181
  size: "32"
3188
3182
  })
3189
- ])) : e.error ? (h(), K("div", Gl, [
3190
- i(sn, {
3183
+ ])) : e.error ? (y(), K("div", ql, [
3184
+ i(ln, {
3191
3185
  type: "error",
3192
3186
  variant: "tonal",
3193
3187
  density: "compact",
3194
3188
  border: "start"
3195
3189
  }, {
3196
3190
  default: r(() => [
3197
- q(B(e.error), 1)
3191
+ G(B(e.error), 1)
3198
3192
  ]),
3199
3193
  _: 1
3200
3194
  })
3201
- ])) : m.value ? (h(), K("div", Hl, [
3195
+ ])) : c.value ? (y(), K("div", Gl, [
3202
3196
  z(t.$slots, "empty", {
3203
3197
  readonly: e.readonly,
3204
3198
  disabled: e.disabled,
3205
- actions: { add: dt }
3199
+ actions: { add: rt }
3206
3200
  }, () => [
3207
- i(Qn, {
3208
- title: pt.value,
3209
- text: nt.value,
3210
- "add-label": st.value,
3211
- "can-add": it.value,
3212
- onAdd: dt
3213
- }, null, 8, ["title", "text", "add-label", "can-add"])
3201
+ i(Xn, {
3202
+ title: tt.value,
3203
+ "add-label": it.value,
3204
+ "can-add": Ye.value,
3205
+ onAdd: rt
3206
+ }, null, 8, ["title", "add-label", "can-add"])
3214
3207
  ])
3215
- ])) : (h(), K("div", {
3216
- key: f.value,
3208
+ ])) : (y(), K("div", {
3209
+ key: m.value,
3217
3210
  ref_key: "rowsContainer",
3218
- ref: x,
3219
- class: Pe(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging": ke.value !== null }])
3211
+ ref: S,
3212
+ class: xe(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging": be.value !== null }])
3220
3213
  }, [
3221
3214
  M("div", {
3222
- class: Pe([Cn, "a-nested-list-editor__group--root"]),
3215
+ class: xe([wn, "a-nested-list-editor__group--root"]),
3223
3216
  "data-parent-id": ""
3224
3217
  }, [
3225
- (h(!0), K(ye, null, _e(Ta.value, (a) => (h(), Y(ca, {
3218
+ (y(!0), K(ve, null, Ze(Da.value, (a) => (y(), W(da, {
3226
3219
  key: String(a.key),
3227
3220
  vi: a,
3228
3221
  "view-items": P.value,
3229
- "drag-state": ke.value,
3230
- context: Ia.value,
3231
- callbacks: Da
3222
+ "drag-state": be.value,
3223
+ context: Pa.value,
3224
+ callbacks: Ia
3232
3225
  }, {
3233
- item: r((A) => [
3234
- z(t.$slots, "item", oe({ ref_for: !0 }, A))
3226
+ item: r((x) => [
3227
+ z(t.$slots, "item", ie({ ref_for: !0 }, x))
3235
3228
  ]),
3236
- "item-compact": r((A) => [
3237
- z(t.$slots, "item-compact", oe({ ref_for: !0 }, A))
3229
+ "item-compact": r((x) => [
3230
+ z(t.$slots, "item-compact", ie({ ref_for: !0 }, x))
3238
3231
  ]),
3239
- "item-readonly": r((A) => [
3240
- z(t.$slots, "item-readonly", oe({ ref_for: !0 }, A))
3232
+ "item-readonly": r((x) => [
3233
+ z(t.$slots, "item-readonly", ie({ ref_for: !0 }, x))
3241
3234
  ]),
3242
- "item-status": r((A) => [
3243
- z(t.$slots, "item-status", oe({ ref_for: !0 }, A))
3235
+ "item-status": r((x) => [
3236
+ z(t.$slots, "item-status", ie({ ref_for: !0 }, x))
3244
3237
  ]),
3245
- "item-footer": r((A) => [
3246
- z(t.$slots, "item-footer", oe({ ref_for: !0 }, A))
3238
+ "item-footer": r((x) => [
3239
+ z(t.$slots, "item-footer", ie({ ref_for: !0 }, x))
3247
3240
  ]),
3248
- "item-actions": r((A) => [
3249
- z(t.$slots, "item-actions", oe({ ref_for: !0 }, A))
3241
+ "item-actions": r((x) => [
3242
+ z(t.$slots, "item-actions", ie({ ref_for: !0 }, x))
3250
3243
  ]),
3251
- "before-item": r((A) => [
3252
- z(t.$slots, "before-item", oe({ ref_for: !0 }, A))
3244
+ "before-item": r((x) => [
3245
+ z(t.$slots, "before-item", ie({ ref_for: !0 }, x))
3253
3246
  ]),
3254
- "after-item": r((A) => [
3255
- z(t.$slots, "after-item", oe({ ref_for: !0 }, A))
3247
+ "after-item": r((x) => [
3248
+ z(t.$slots, "after-item", ie({ ref_for: !0 }, x))
3256
3249
  ]),
3257
3250
  _: 3
3258
3251
  }, 8, ["vi", "view-items", "drag-state", "context"]))), 128))
3259
3252
  ], 2),
3260
- Ue.value !== null ? (h(), K(ye, { key: 0 }, [
3261
- Ue.value.connector !== null ? (h(), K("div", {
3253
+ je.value !== null ? (y(), K(ve, { key: 0 }, [
3254
+ je.value.connector !== null ? (y(), K("div", {
3262
3255
  key: 0,
3263
3256
  class: "a-nested-list-editor__drop-connector",
3264
- style: yt({
3265
- left: `${Ue.value.connector.left}px`,
3266
- top: `${Ue.value.connector.top}px`,
3267
- height: `${Ue.value.connector.height}px`
3257
+ style: vt({
3258
+ left: `${je.value.connector.left}px`,
3259
+ top: `${je.value.connector.top}px`,
3260
+ height: `${je.value.connector.height}px`
3268
3261
  })
3269
- }, null, 4)) : G("", !0),
3262
+ }, null, 4)) : H("", !0),
3270
3263
  M("div", {
3271
3264
  class: "a-nested-list-editor__drop-line",
3272
- style: yt({
3273
- top: `${Ue.value.line.top}px`,
3274
- left: `${Ue.value.line.left}px`,
3275
- right: `${Ue.value.line.right}px`
3265
+ style: vt({
3266
+ top: `${je.value.line.top}px`,
3267
+ left: `${je.value.line.left}px`,
3268
+ right: `${je.value.line.right}px`
3276
3269
  })
3277
3270
  }, [...l[3] || (l[3] = [
3278
3271
  M("span", { class: "a-nested-list-editor__drop-line-dot" }, null, -1)
3279
3272
  ])], 4)
3280
- ], 64)) : G("", !0)
3273
+ ], 64)) : H("", !0)
3281
3274
  ], 2)),
3282
- it.value && !e.loading && !e.error && !m.value ? z(t.$slots, "add-button", {
3275
+ Ye.value && !e.loading && !e.error && !c.value ? z(t.$slots, "add-button", {
3283
3276
  key: 5,
3284
3277
  readonly: e.readonly,
3285
3278
  disabled: e.disabled,
3286
- props: { onClick: dt },
3287
- actions: { add: dt }
3279
+ props: { onClick: rt },
3280
+ actions: { add: rt }
3288
3281
  }, () => [
3289
3282
  M("button", {
3290
3283
  type: "button",
3291
3284
  class: "a-le-row-add",
3292
- onClick: dt
3285
+ onClick: rt
3293
3286
  }, [
3294
- i(te, {
3287
+ i(ne, {
3295
3288
  icon: "mdi-plus",
3296
3289
  size: "18"
3297
3290
  }),
3298
- M("span", null, B(st.value), 1)
3291
+ M("span", null, B(it.value), 1)
3299
3292
  ])
3300
- ]) : G("", !0)
3293
+ ]) : H("", !0)
3301
3294
  ]),
3302
- i(co, {
3303
- modelValue: Gt.value,
3304
- "onUpdate:modelValue": l[0] || (l[0] = (a) => Gt.value = a),
3305
- total: Ht.value?.total ?? 0,
3306
- "current-index": Ht.value?.currentIndex ?? 0,
3307
- "item-label": Ca.value,
3308
- onConfirm: Aa
3295
+ i(ro, {
3296
+ modelValue: qt.value,
3297
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => qt.value = a),
3298
+ total: Gt.value?.total ?? 0,
3299
+ "current-index": Gt.value?.currentIndex ?? 0,
3300
+ "item-label": wa.value,
3301
+ onConfirm: xa
3309
3302
  }, null, 8, ["modelValue", "total", "current-index", "item-label"]),
3310
- i(zl, {
3311
- modelValue: Jt.value,
3312
- "onUpdate:modelValue": l[1] || (l[1] = (a) => Jt.value = a),
3313
- tree: p.value,
3314
- "source-key": At.value?.key ?? null,
3303
+ i(Ml, {
3304
+ modelValue: Ht.value,
3305
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => Ht.value = a),
3306
+ tree: h.value,
3307
+ "source-key": xt.value?.key ?? null,
3315
3308
  "key-field": e.keyField,
3316
3309
  "max-depth": e.maxDepth,
3317
- "resolve-label": qt,
3310
+ "resolve-label": jt,
3318
3311
  "calculate-subtree-depth": d($).calculateSubtreeDepth,
3319
- onConfirm: Pa
3312
+ onConfirm: Sa
3320
3313
  }, null, 8, ["modelValue", "tree", "source-key", "key-field", "max-depth", "calculate-subtree-depth"]),
3321
- i(_n, {
3322
- modelValue: d(Lt),
3323
- "onUpdate:modelValue": l[2] || (l[2] = (a) => oa(Lt) ? Lt.value = a : null),
3314
+ i(Zn, {
3315
+ modelValue: d(Vt),
3316
+ "onUpdate:modelValue": l[2] || (l[2] = (a) => aa(Vt) ? Vt.value = a : null),
3324
3317
  title: Xe.value,
3325
- text: Kt.value,
3318
+ text: Rt.value,
3326
3319
  "confirm-label": d(b)("common.sortable.delete"),
3327
3320
  "cancel-label": d(b)("common.button.cancel"),
3328
- error: d(va),
3329
- "in-flight": d(ma),
3330
- onConfirm: d(ha),
3331
- onCancel: d(pa)
3321
+ error: d(ma),
3322
+ "in-flight": d(fa),
3323
+ onConfirm: d(ya),
3324
+ onCancel: d(ha)
3332
3325
  }, null, 8, ["modelValue", "title", "text", "confirm-label", "cancel-label", "error", "in-flight", "onConfirm", "onCancel"]),
3333
- M("div", Jl, B(d(xt).grabbedKey.value !== null ? d(b)("common.sortable.keyboardGrab.status", {
3334
- n: d(xt).grabbedIndex.value + 1,
3335
- total: d(xt).totalCount.value
3326
+ M("div", Hl, B(d(Ct).grabbedKey.value !== null ? d(b)("common.sortable.keyboardGrab.status", {
3327
+ n: d(Ct).grabbedIndex.value + 1,
3328
+ total: d(Ct).totalCount.value
3336
3329
  }) : ""), 1)
3337
3330
  ], 2));
3338
3331
  }
3339
- }), Yl = { class: "a-unsaved-sections" }, Xl = /* @__PURE__ */ Ge({
3332
+ }), Wl = { class: "a-unsaved-sections" }, Yl = /* @__PURE__ */ He({
3340
3333
  __name: "AUnsavedConfirmDialog",
3341
- props: /* @__PURE__ */ Ve({
3334
+ props: /* @__PURE__ */ Le({
3342
3335
  title: { default: void 0 },
3343
3336
  body: { default: void 0 },
3344
3337
  stayLabel: { default: void 0 },
@@ -3348,63 +3341,63 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
3348
3341
  modelValue: { type: Boolean, required: !0 },
3349
3342
  modelModifiers: {}
3350
3343
  }),
3351
- emits: /* @__PURE__ */ Ve(["resolve"], ["update:modelValue"]),
3344
+ emits: /* @__PURE__ */ Le(["resolve"], ["update:modelValue"]),
3352
3345
  setup(e, { emit: w }) {
3353
- const c = w, n = qe(e, "modelValue"), { t: u } = He(), p = () => {
3354
- c("resolve", !1);
3355
- }, y = () => {
3356
- c("resolve", !0);
3346
+ const u = w, n = Ge(e, "modelValue"), { t: f } = Je(), h = () => {
3347
+ u("resolve", !1);
3348
+ }, p = () => {
3349
+ u("resolve", !0);
3357
3350
  };
3358
- return (b, k) => (h(), Y(on, {
3351
+ return (b, k) => (y(), W(an, {
3359
3352
  modelValue: n.value,
3360
3353
  "onUpdate:modelValue": k[0] || (k[0] = (s) => n.value = s),
3361
3354
  "max-width": "480",
3362
3355
  persistent: ""
3363
3356
  }, {
3364
3357
  default: r(() => [
3365
- i(an, null, {
3358
+ i(nn, null, {
3366
3359
  default: r(() => [
3367
- i(ia, null, {
3360
+ i(la, null, {
3368
3361
  default: r(() => [
3369
- q(B(e.title ?? d(u)("common.sortable.unsavedChanges.title")), 1)
3362
+ G(B(e.title ?? d(f)("common.sortable.unsavedChanges.title")), 1)
3370
3363
  ]),
3371
3364
  _: 1
3372
3365
  }),
3373
- i(Tt, null, {
3366
+ i(Dt, null, {
3374
3367
  default: r(() => [
3375
- e.body ? (h(), K(ye, { key: 0 }, [
3376
- q(B(e.body), 1)
3377
- ], 64)) : e.dirtyLabels.length ? (h(), K(ye, { key: 1 }, [
3378
- q(B(d(u)("common.sortable.unsavedChanges.sectionsIntro")) + " ", 1),
3379
- M("ul", Yl, [
3380
- (h(!0), K(ye, null, _e(e.dirtyLabels, (s, C) => (h(), K("li", { key: C }, B(s), 1))), 128))
3368
+ e.body ? (y(), K(ve, { key: 0 }, [
3369
+ G(B(e.body), 1)
3370
+ ], 64)) : e.dirtyLabels.length ? (y(), K(ve, { key: 1 }, [
3371
+ G(B(d(f)("common.sortable.unsavedChanges.sectionsIntro")) + " ", 1),
3372
+ M("ul", Wl, [
3373
+ (y(!0), K(ve, null, Ze(e.dirtyLabels, (s, C) => (y(), K("li", { key: C }, B(s), 1))), 128))
3381
3374
  ]),
3382
- q(" " + B(d(u)("common.sortable.unsavedChanges.leaveQuestion")), 1)
3383
- ], 64)) : (h(), K(ye, { key: 2 }, [
3384
- q(B(d(u)("common.sortable.unsavedChanges.body")), 1)
3375
+ G(" " + B(d(f)("common.sortable.unsavedChanges.leaveQuestion")), 1)
3376
+ ], 64)) : (y(), K(ve, { key: 2 }, [
3377
+ G(B(d(f)("common.sortable.unsavedChanges.body")), 1)
3385
3378
  ], 64))
3386
3379
  ]),
3387
3380
  _: 1
3388
3381
  }),
3389
- i(sa, null, {
3382
+ i(ia, null, {
3390
3383
  default: r(() => [
3391
- i(ln),
3384
+ i(on),
3392
3385
  i(_, {
3393
3386
  variant: "text",
3394
- onClick: p
3387
+ onClick: h
3395
3388
  }, {
3396
3389
  default: r(() => [
3397
- q(B(e.stayLabel ?? d(u)("common.sortable.unsavedChanges.stay")), 1)
3390
+ G(B(e.stayLabel ?? d(f)("common.sortable.unsavedChanges.stay")), 1)
3398
3391
  ]),
3399
3392
  _: 1
3400
3393
  }),
3401
3394
  i(_, {
3402
3395
  color: "warning",
3403
3396
  variant: "flat",
3404
- onClick: y
3397
+ onClick: p
3405
3398
  }, {
3406
3399
  default: r(() => [
3407
- q(B(e.discardLabel ?? d(u)("common.sortable.unsavedChanges.discard")), 1)
3400
+ G(B(e.discardLabel ?? d(f)("common.sortable.unsavedChanges.discard")), 1)
3408
3401
  ]),
3409
3402
  _: 1
3410
3403
  })
@@ -3418,41 +3411,41 @@ const Rt = (e, w) => e.find((c) => c.key === w) ?? null, da = (e, w, c) => {
3418
3411
  _: 1
3419
3412
  }, 8, ["modelValue"]));
3420
3413
  }
3421
- }), Ei = /* @__PURE__ */ ta(Xl, [["__scopeId", "data-v-8342a164"]]), ua = /* @__PURE__ */ Symbol("unsaved.sections");
3422
- function Ql() {
3423
- const e = go(/* @__PURE__ */ new Map()), w = g(() => {
3424
- const c = [];
3414
+ }), Ei = /* @__PURE__ */ ea(Yl, [["__scopeId", "data-v-8342a164"]]), ca = /* @__PURE__ */ Symbol("unsaved.sections");
3415
+ function Xl() {
3416
+ const e = po(/* @__PURE__ */ new Map()), w = g(() => {
3417
+ const u = [];
3425
3418
  for (const n of e.values())
3426
- for (const u of n.value)
3427
- u.dirty && c.push(u.label);
3428
- return c;
3419
+ for (const f of n.value)
3420
+ f.dirty && u.push(f.label);
3421
+ return u;
3429
3422
  });
3430
3423
  return {
3431
- register(c, n) {
3432
- e.set(c, n);
3424
+ register(u, n) {
3425
+ e.set(u, n);
3433
3426
  },
3434
- unregister(c) {
3435
- e.delete(c);
3427
+ unregister(u) {
3428
+ e.delete(u);
3436
3429
  },
3437
3430
  dirtyLabels: w
3438
3431
  };
3439
3432
  }
3440
- function Zl() {
3441
- const e = Ql();
3442
- return tn() && na(ua, e), e;
3433
+ function Ql() {
3434
+ const e = Xl();
3435
+ return en() && ta(ca, e), e;
3443
3436
  }
3444
- function $i(e) {
3445
- const w = Zt(ua, null);
3446
- if (!w || !tn()) return;
3447
- const c = /* @__PURE__ */ Symbol("unsaved.section"), n = g(() => {
3448
- const u = e();
3449
- return Array.isArray(u) ? u : [u];
3437
+ function Ti(e) {
3438
+ const w = Qt(ca, null);
3439
+ if (!w || !en()) return;
3440
+ const u = /* @__PURE__ */ Symbol("unsaved.section"), n = g(() => {
3441
+ const f = e();
3442
+ return Array.isArray(f) ? f : [f];
3450
3443
  });
3451
- w.register(c, n), en(() => w.unregister(c));
3444
+ w.register(u, n), _t(() => w.unregister(u));
3452
3445
  }
3453
- const _l = (e) => e == null ? !1 : typeof e == "boolean" ? e : e instanceof Set ? e.size > 0 : Array.isArray(e) ? e.length > 0 : !!e, Sn = (e, w) => e === void 0 ? w : typeof e == "boolean" ? e : e.value;
3454
- function Fi(e) {
3455
- const w = Zl();
3446
+ const Zl = (e) => e == null ? !1 : typeof e == "boolean" ? e : e instanceof Set ? e.size > 0 : Array.isArray(e) ? e.length > 0 : !!e, An = (e, w) => e === void 0 ? w : typeof e == "boolean" ? e : e.value;
3447
+ function $i(e) {
3448
+ const w = Ql();
3456
3449
  if (e.ownSections) {
3457
3450
  const s = e.ownSections, C = /* @__PURE__ */ Symbol("unsaved.section.own"), D = g(() => {
3458
3451
  const N = s();
@@ -3460,27 +3453,27 @@ function Fi(e) {
3460
3453
  });
3461
3454
  w.register(C, D);
3462
3455
  }
3463
- const c = g(
3464
- () => e.sources.some((s) => _l(s.value)) || w.dirtyLabels.value.length > 0
3465
- ), n = ue(!1);
3466
- let u = null, p = !1;
3467
- const y = () => p ? (p = !1, Promise.resolve(!0)) : new Promise((s) => {
3468
- u = s, n.value = !0;
3456
+ const u = g(
3457
+ () => e.sources.some((s) => Zl(s.value)) || w.dirtyLabels.value.length > 0
3458
+ ), n = ce(!1);
3459
+ let f = null, h = !1;
3460
+ const p = () => h ? (h = !1, Promise.resolve(!0)) : new Promise((s) => {
3461
+ f = s, n.value = !0;
3469
3462
  }), b = (s) => {
3470
- n.value = !1, u && (u(s), u = null);
3463
+ n.value = !1, f && (f(s), f = null);
3471
3464
  }, k = () => {
3472
- p = !0;
3465
+ h = !0;
3473
3466
  };
3474
- if (Sn(e.guardRoute, !0) && tn())
3467
+ if (An(e.guardRoute, !0) && en())
3475
3468
  try {
3476
- Ao(async () => c.value ? await y() : !0);
3469
+ xo(async () => u.value ? await p() : !0);
3477
3470
  } catch {
3478
3471
  }
3479
- if (Sn(e.guardWindowUnload, !0)) {
3472
+ if (An(e.guardWindowUnload, !0)) {
3480
3473
  const s = (C) => {
3481
- c.value && (C.preventDefault(), C.returnValue = "");
3474
+ u.value && (C.preventDefault(), C.returnValue = "");
3482
3475
  };
3483
- typeof window < "u" && (window.addEventListener("beforeunload", s), en(() => {
3476
+ typeof window < "u" && (window.addEventListener("beforeunload", s), _t(() => {
3484
3477
  window.removeEventListener("beforeunload", s);
3485
3478
  }));
3486
3479
  }
@@ -3492,80 +3485,80 @@ function Fi(e) {
3492
3485
  C = !1;
3493
3486
  return;
3494
3487
  }
3495
- N === !0 && D === !1 && c.value && (C = !0, s.value = !0, await y() && (C = !0, s.value = !1));
3488
+ N === !0 && D === !1 && u.value && (C = !0, s.value = !0, await p() && (C = !0, s.value = !1));
3496
3489
  });
3497
3490
  }
3498
3491
  return {
3499
- hasUnsavedChanges: c,
3492
+ hasUnsavedChanges: u,
3500
3493
  dirtyLabels: w.dirtyLabels,
3501
3494
  promptOpen: n,
3502
3495
  resolvePrompt: b,
3503
3496
  acknowledge: k
3504
3497
  };
3505
3498
  }
3506
- function Bi() {
3507
- const e = ue(/* @__PURE__ */ new Map()), w = /* @__PURE__ */ new Set(), c = (y) => e.value.get(y) ?? w, n = (y, b) => {
3508
- b.size === 0 ? e.value.delete(y) : e.value.set(y, b), e.value = new Map(e.value);
3509
- }, u = g(() => {
3510
- const y = /* @__PURE__ */ new Set();
3499
+ function Fi() {
3500
+ const e = ce(/* @__PURE__ */ new Map()), w = /* @__PURE__ */ new Set(), u = (p) => e.value.get(p) ?? w, n = (p, b) => {
3501
+ b.size === 0 ? e.value.delete(p) : e.value.set(p, b), e.value = new Map(e.value);
3502
+ }, f = g(() => {
3503
+ const p = /* @__PURE__ */ new Set();
3511
3504
  for (const [b, k] of e.value.entries())
3512
3505
  for (const s of k)
3513
- y.add(`${String(b)}:${String(s)}`);
3514
- return y;
3515
- }), p = g(() => u.value.size);
3516
- return { getForParent: c, setForParent: n, merged: u, count: p };
3506
+ p.add(`${String(b)}:${String(s)}`);
3507
+ return p;
3508
+ }), h = g(() => f.value.size);
3509
+ return { getForParent: u, setForParent: n, merged: f, count: h };
3517
3510
  }
3518
3511
  export {
3519
- Ci as ADatatableOrdering,
3520
- Bo as ADatatablePagination,
3521
- Vi as AFilterBooleanSelect,
3522
- Li as AFilterDatetimePicker,
3523
- Mi as AFilterInteger,
3524
- zi as AFilterRemoteAutocomplete,
3525
- Ni as AFilterRemoteAutocompleteWithMinimal,
3526
- Oi as AFilterString,
3527
- Ui as AFilterTimeInterval,
3528
- ji as AFilterValueObjectOptionsSelect,
3529
- qi as AFilterWrapper,
3530
- Gi as AFilterWrapperSubjectSelect,
3531
- Hi as AFormRemoteAutocomplete,
3532
- Di as AListEditor,
3533
- Ti as ANestedSortableListEditor,
3534
- Ji as ASortableListEditor,
3535
- Ii as ASubjectSelect,
3512
+ wi as ADatatableOrdering,
3513
+ Fo as ADatatablePagination,
3514
+ Ki as AFilterBooleanSelect,
3515
+ Vi as AFilterDatetimePicker,
3516
+ Li as AFilterInteger,
3517
+ Mi as AFilterRemoteAutocomplete,
3518
+ zi as AFilterRemoteAutocompleteWithMinimal,
3519
+ Ni as AFilterString,
3520
+ Oi as AFilterTimeInterval,
3521
+ Ui as AFilterValueObjectOptionsSelect,
3522
+ ji as AFilterWrapper,
3523
+ qi as AFilterWrapperSubjectSelect,
3524
+ Gi as AFormRemoteAutocomplete,
3525
+ Ii as AListEditor,
3526
+ Di as ANestedSortableListEditor,
3527
+ Hi as ASortableListEditor,
3528
+ Pi as ASubjectSelect,
3536
3529
  Ei as AUnsavedConfirmDialog,
3537
- Pn as DatatablePaginationKey,
3538
- Wi as FilterConfigKey,
3539
- Yi as FilterDataKey,
3540
- Xi as FilterInnerConfigKey,
3541
- Qi as FilterInnerDataKey,
3542
- Zi as ListEditorValidationKey,
3543
- _i as SharedReorderRegistryKey,
3544
- es as TimeIntervalSpecialOptions,
3545
- ts as UserAdminConfigLayoutType,
3546
- ns as UserAdminConfigLayoutTypeDefault,
3547
- as as UserAdminConfigType,
3548
- os as UserAdminConfigTypeDefault,
3549
- Lo as createDatatableColumnsConfig,
3550
- ls as createFilter,
3551
- is as createFilterStore,
3552
- Xt as generateListQuery,
3553
- xi as useApiFetchByIds,
3554
- Wa as useApiFetchList,
3555
- Ai as useApiFetchListBatch,
3556
- Oa as useApiQueryBuilder,
3557
- ss as useApiRequest,
3558
- to as useFilterHelpers,
3559
- Si as useJobApi,
3560
- oo as useListEditor,
3561
- rs as useListEditorItemValidation,
3562
- hl as useNestedListEditor,
3563
- Bi as useNestedUnsavedKeys,
3564
- jn as usePagination,
3565
- Pi as useSubjectSelect,
3566
- Fi as useUnsavedChangesGuard,
3567
- $i as useUnsavedSection,
3568
- ds as useUserAdminConfigApi,
3569
- cs as useUserAdminConfigFactory
3530
+ Sn as DatatablePaginationKey,
3531
+ Ji as FilterConfigKey,
3532
+ Wi as FilterDataKey,
3533
+ Yi as FilterInnerConfigKey,
3534
+ Xi as FilterInnerDataKey,
3535
+ Qi as ListEditorValidationKey,
3536
+ Zi as SharedReorderRegistryKey,
3537
+ _i as TimeIntervalSpecialOptions,
3538
+ es as UserAdminConfigLayoutType,
3539
+ ts as UserAdminConfigLayoutTypeDefault,
3540
+ ns as UserAdminConfigType,
3541
+ as as UserAdminConfigTypeDefault,
3542
+ Vo as createDatatableColumnsConfig,
3543
+ os as createFilter,
3544
+ ls as createFilterStore,
3545
+ Yt as generateListQuery,
3546
+ Ci as useApiFetchByIds,
3547
+ Ja as useApiFetchList,
3548
+ xi as useApiFetchListBatch,
3549
+ Na as useApiQueryBuilder,
3550
+ is as useApiRequest,
3551
+ eo as useFilterHelpers,
3552
+ Ai as useJobApi,
3553
+ ao as useListEditor,
3554
+ ss as useListEditorItemValidation,
3555
+ yl as useNestedListEditor,
3556
+ Fi as useNestedUnsavedKeys,
3557
+ Un as usePagination,
3558
+ Si as useSubjectSelect,
3559
+ $i as useUnsavedChangesGuard,
3560
+ Ti as useUnsavedSection,
3561
+ rs as useUserAdminConfigApi,
3562
+ ds as useUserAdminConfigFactory
3570
3563
  };
3571
3564
  //# sourceMappingURL=labs.js.map