prlg-ui 1.7.13 → 1.7.15

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.
@@ -380,8 +380,8 @@ const bn = async (e, t, o) => {
380
380
  } = r[g], {
381
381
  x: k,
382
382
  y: _,
383
- data: V,
384
- reset: T
383
+ data: A,
384
+ reset: V
385
385
  } = await $({
386
386
  x: c,
387
387
  y: d,
@@ -400,13 +400,13 @@ const bn = async (e, t, o) => {
400
400
  ...p,
401
401
  [y]: {
402
402
  ...p[y],
403
- ...V
403
+ ...A
404
404
  }
405
- }, T && m <= 50 && (m++, typeof T == "object" && (T.placement && (v = T.placement), T.rects && (u = T.rects === !0 ? await s.getElementRects({
405
+ }, V && m <= 50 && (m++, typeof V == "object" && (V.placement && (v = V.placement), V.rects && (u = V.rects === !0 ? await s.getElementRects({
406
406
  reference: e,
407
407
  floating: t,
408
408
  strategy: l
409
- }) : T.rects), {
409
+ }) : V.rects), {
410
410
  x: c,
411
411
  y: d
412
412
  } = Tt(u, v, a)), g = -1);
@@ -445,23 +445,23 @@ async function rt(e, t) {
445
445
  y: l,
446
446
  width: s.floating.width,
447
447
  height: s.floating.height
448
- } : s.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), V = await (i.isElement == null ? void 0 : i.isElement(_)) ? await (i.getScale == null ? void 0 : i.getScale(_)) || {
448
+ } : s.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), A = await (i.isElement == null ? void 0 : i.isElement(_)) ? await (i.getScale == null ? void 0 : i.getScale(_)) || {
449
449
  x: 1,
450
450
  y: 1
451
451
  } : {
452
452
  x: 1,
453
453
  y: 1
454
- }, T = De(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
454
+ }, V = De(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
455
455
  elements: r,
456
456
  rect: k,
457
457
  offsetParent: _,
458
458
  strategy: a
459
459
  }) : k);
460
460
  return {
461
- top: ($.top - T.top + m.top) / V.y,
462
- bottom: (T.bottom - $.bottom + m.bottom) / V.y,
463
- left: ($.left - T.left + m.left) / V.x,
464
- right: (T.right - $.right + m.right) / V.x
461
+ top: ($.top - V.top + m.top) / A.y,
462
+ bottom: (V.bottom - $.bottom + m.bottom) / A.y,
463
+ left: ($.left - V.left + m.left) / A.x,
464
+ right: (V.right - $.right + m.right) / A.x
465
465
  };
466
466
  }
467
467
  const xn = (e) => ({
@@ -485,10 +485,10 @@ const xn = (e) => ({
485
485
  const d = ut(c), v = {
486
486
  x: o,
487
487
  y: n
488
- }, p = lt(l), m = nt(p), g = await s.getDimensions(u), y = p === "y", $ = y ? "top" : "left", k = y ? "bottom" : "right", _ = y ? "clientHeight" : "clientWidth", V = i.reference[m] + i.reference[p] - v[p] - i.floating[m], T = v[p] - i.reference[p], h = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
488
+ }, p = lt(l), m = nt(p), g = await s.getDimensions(u), y = p === "y", $ = y ? "top" : "left", k = y ? "bottom" : "right", _ = y ? "clientHeight" : "clientWidth", A = i.reference[m] + i.reference[p] - v[p] - i.floating[m], V = v[p] - i.reference[p], h = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
489
489
  let C = h ? h[_] : 0;
490
490
  (!C || !await (s.isElement == null ? void 0 : s.isElement(h))) && (C = r.floating[_] || i.floating[m]);
491
- const B = V / 2 - T / 2, O = C / 2 - g[m] / 2 - 1, I = Re(d[$], O), x = Re(d[k], O), A = I, R = C - g[m] - x, P = C / 2 - g[m] / 2 + B, G = Xe(A, P, R), L = !a.arrow && Me(l) != null && P !== G && i.reference[m] / 2 - (P < A ? I : x) - g[m] / 2 < 0, te = L ? P < A ? P - A : P - R : 0;
491
+ const B = A / 2 - V / 2, O = C / 2 - g[m] / 2 - 1, I = Re(d[$], O), x = Re(d[k], O), T = I, R = C - g[m] - x, P = C / 2 - g[m] / 2 + B, G = Xe(T, P, R), L = !a.arrow && Me(l) != null && P !== G && i.reference[m] / 2 - (P < T ? I : x) - g[m] / 2 < 0, te = L ? P < T ? P - T : P - R : 0;
492
492
  return {
493
493
  [p]: v[p] + te,
494
494
  data: {
@@ -681,11 +681,11 @@ const Rn = function(e) {
681
681
  } = i.floating;
682
682
  let y, $;
683
683
  d === "top" || d === "bottom" ? (y = d, $ = v === (await (s.isRTL == null ? void 0 : s.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : ($ = d, y = v === "end" ? "top" : "bottom");
684
- const k = g - c.top - c.bottom, _ = m - c.left - c.right, V = Re(g - c[y], k), T = Re(m - c[$], _), h = !t.middlewareData.shift;
685
- let C = V, B = T;
684
+ const k = g - c.top - c.bottom, _ = m - c.left - c.right, A = Re(g - c[y], k), V = Re(m - c[$], _), h = !t.middlewareData.shift;
685
+ let C = A, B = V;
686
686
  if ((o = t.middlewareData.shift) != null && o.enabled.x && (B = _), (n = t.middlewareData.shift) != null && n.enabled.y && (C = k), h && !v) {
687
- const I = ie(c.left, 0), x = ie(c.right, 0), A = ie(c.top, 0), R = ie(c.bottom, 0);
688
- p ? B = m - 2 * (I !== 0 || x !== 0 ? I + x : ie(c.left, c.right)) : C = g - 2 * (A !== 0 || R !== 0 ? A + R : ie(c.top, c.bottom));
687
+ const I = ie(c.left, 0), x = ie(c.right, 0), T = ie(c.top, 0), R = ie(c.bottom, 0);
688
+ p ? B = m - 2 * (I !== 0 || x !== 0 ? I + x : ie(c.left, c.right)) : C = g - 2 * (T !== 0 || R !== 0 ? T + R : ie(c.top, c.bottom));
689
689
  }
690
690
  await a({
691
691
  ...t,
@@ -861,8 +861,8 @@ function Qe(e, t, o, n) {
861
861
  const v = Z(i), p = n && Q(n) ? Z(n) : n;
862
862
  let m = v, g = Je(m);
863
863
  for (; g && n && p !== m; ) {
864
- const y = Ke(g), $ = g.getBoundingClientRect(), k = ee(g), _ = $.left + (g.clientLeft + parseFloat(k.paddingLeft)) * y.x, V = $.top + (g.clientTop + parseFloat(k.paddingTop)) * y.y;
865
- a *= y.x, u *= y.y, c *= y.x, d *= y.y, a += _, u += V, m = Z(g), g = Je(m);
864
+ const y = Ke(g), $ = g.getBoundingClientRect(), k = ee(g), _ = $.left + (g.clientLeft + parseFloat(k.paddingLeft)) * y.x, A = $.top + (g.clientTop + parseFloat(k.paddingTop)) * y.y;
865
+ a *= y.x, u *= y.y, c *= y.x, d *= y.y, a += _, u += A, m = Z(g), g = Je(m);
866
866
  }
867
867
  }
868
868
  return De({
@@ -1190,11 +1190,11 @@ function Ft(e, t, o) {
1190
1190
  d.value = B.x, v.value = B.y, p.value = B.strategy, m.value = B.placement, g.value = B.middlewareData, y.value = C !== !1;
1191
1191
  });
1192
1192
  }
1193
- function V() {
1193
+ function A() {
1194
1194
  typeof k == "function" && (k(), k = void 0);
1195
1195
  }
1196
- function T() {
1197
- if (V(), n === void 0) {
1196
+ function V() {
1197
+ if (A(), n === void 0) {
1198
1198
  _();
1199
1199
  return;
1200
1200
  }
@@ -1208,11 +1208,11 @@ function Ft(e, t, o) {
1208
1208
  }
1209
1209
  return oe([i, s, r, l], _, {
1210
1210
  flush: "sync"
1211
- }), oe([u, c], T, {
1211
+ }), oe([u, c], V, {
1212
1212
  flush: "sync"
1213
1213
  }), oe(l, h, {
1214
1214
  flush: "sync"
1215
- }), Ro() && So(V), {
1215
+ }), Ro() && So(A), {
1216
1216
  x: qe(d),
1217
1217
  y: qe(v),
1218
1218
  strategy: qe(p),
@@ -1277,10 +1277,10 @@ const tl = { class: "popover__content" }, ol = {
1277
1277
  Et({ padding: 8 }),
1278
1278
  Lt(8)
1279
1279
  ]
1280
- }), V = Ne(), T = D(!1), h = D(!1), C = () => {
1281
- T.value = !0;
1280
+ }), A = Ne(), V = D(!1), h = D(!1), C = () => {
1281
+ V.value = !0;
1282
1282
  }, B = () => {
1283
- T.value = !1, I();
1283
+ V.value = !1, I();
1284
1284
  }, O = async (R) => {
1285
1285
  R && R.stopPropagation(), r.value && (h.value = !0);
1286
1286
  }, I = () => {
@@ -1296,7 +1296,7 @@ const tl = { class: "popover__content" }, ol = {
1296
1296
  }
1297
1297
  B();
1298
1298
  }
1299
- }, A = M(() => {
1299
+ }, T = M(() => {
1300
1300
  if (!m.value.arrow) return {};
1301
1301
  const { x: R, y: P } = m.value.arrow;
1302
1302
  switch (y.value) {
@@ -1314,8 +1314,8 @@ const tl = { class: "popover__content" }, ol = {
1314
1314
  }
1315
1315
  });
1316
1316
  return oe(m, (R) => {
1317
- console.log(R), T.value = R.hide?.referenceHidden === !1;
1318
- }), oe(T, (R) => {
1317
+ console.log(R), V.value = R.hide?.referenceHidden === !1;
1318
+ }), oe(V, (R) => {
1319
1319
  R || I();
1320
1320
  }), oe(o, () => {
1321
1321
  g();
@@ -1334,13 +1334,13 @@ const tl = { class: "popover__content" }, ol = {
1334
1334
  close: B,
1335
1335
  openSecondScreen: O,
1336
1336
  closeSecondScreen: I,
1337
- isOpen: T,
1337
+ isOpen: V,
1338
1338
  isSecondScreenOpen: h
1339
1339
  }), (R, P) => (f(), b("div", {
1340
1340
  class: F(["popover", { "popover--with-arrow": w(i) }])
1341
1341
  }, [
1342
1342
  S("div", {
1343
- class: F(["popover__trigger", `popover__trigger--${w(V)}`]),
1343
+ class: F(["popover__trigger", `popover__trigger--${w(A)}`]),
1344
1344
  ref: "reference",
1345
1345
  onClick: C
1346
1346
  }, [
@@ -1348,9 +1348,9 @@ const tl = { class: "popover__content" }, ol = {
1348
1348
  ], 2),
1349
1349
  N(ze, { name: "fade" }, {
1350
1350
  default: Y(() => [
1351
- T.value ? (f(), b("div", {
1351
+ V.value ? (f(), b("div", {
1352
1352
  key: 0,
1353
- class: F(["popover__wrapper", `popover__wrapper--${w(V)}`]),
1353
+ class: F(["popover__wrapper", `popover__wrapper--${w(A)}`]),
1354
1354
  style: ue(w(p)),
1355
1355
  ref: "floating"
1356
1356
  }, [
@@ -1370,7 +1370,7 @@ const tl = { class: "popover__content" }, ol = {
1370
1370
  key: 0,
1371
1371
  class: "popover__arrow",
1372
1372
  ref: "arrow-block",
1373
- style: ue(A.value)
1373
+ style: ue(T.value)
1374
1374
  }, null, 4)) : H("", !0)
1375
1375
  ], 6)) : H("", !0)
1376
1376
  ]),
@@ -1911,7 +1911,7 @@ const tl = { class: "popover__content" }, ol = {
1911
1911
  set(y) {
1912
1912
  if (Array.isArray(y)) {
1913
1913
  const $ = y.map((k) => {
1914
- const _ = e.options.find((V) => V[n.value] === k);
1914
+ const _ = e.options.find((A) => A[n.value] === k);
1915
1915
  return _ || k;
1916
1916
  });
1917
1917
  i.value = e.returnObject ? $ : y;
@@ -2010,7 +2010,7 @@ const tl = { class: "popover__content" }, ol = {
2010
2010
  (f(!0), b(ae, null, Ae(y.options, (k, _) => (f(), z(Hl, {
2011
2011
  key: _,
2012
2012
  modelValue: s.value,
2013
- "onUpdate:modelValue": $[3] || ($[3] = (V) => s.value = V),
2013
+ "onUpdate:modelValue": $[3] || ($[3] = (A) => s.value = A),
2014
2014
  item: k,
2015
2015
  multiple: y.multiple
2016
2016
  }, null, 8, ["modelValue", "item", "multiple"]))), 128))
@@ -2084,12 +2084,14 @@ const tl = { class: "popover__content" }, ol = {
2084
2084
  }, ls = /* @__PURE__ */ E({
2085
2085
  __name: "TableFooter",
2086
2086
  props: /* @__PURE__ */ J({
2087
+ paginator: { type: Boolean },
2087
2088
  data: {},
2089
+ totalsRow: {},
2088
2090
  perPageOptions: {}
2089
2091
  }, {
2090
2092
  currentPage: { required: !0 },
2091
2093
  currentPageModifiers: {},
2092
- perPage: { required: !0, default: 25 },
2094
+ perPage: { required: !0 },
2093
2095
  perPageModifiers: {}
2094
2096
  }),
2095
2097
  emits: ["update:currentPage", "update:perPage"],
@@ -2098,20 +2100,20 @@ const tl = { class: "popover__content" }, ol = {
2098
2100
  return (n, l) => (f(), b("tfoot", os, [
2099
2101
  S("tr", null, [
2100
2102
  S("td", ns, [
2101
- t.value ? (f(), z(w(ts), {
2103
+ n.paginator && t.value ? (f(), z(w(ts), {
2102
2104
  key: 0,
2103
2105
  "current-page": t.value,
2104
2106
  "onUpdate:currentPage": l[0] || (l[0] = (i) => t.value = i),
2105
2107
  "per-page": o.value,
2106
2108
  "onUpdate:perPage": l[1] || (l[1] = (i) => o.value = i),
2107
- totals: n.data.length,
2109
+ totals: n.totalsRow || n.data.length,
2108
2110
  "per-page-options": n.perPageOptions
2109
2111
  }, null, 8, ["current-page", "per-page", "totals", "per-page-options"])) : H("", !0)
2110
2112
  ])
2111
2113
  ])
2112
2114
  ]));
2113
2115
  }
2114
- }), ss = /* @__PURE__ */ pe(ls, [["__scopeId", "data-v-0a31a96d"]]), is = (e) => {
2116
+ }), ss = /* @__PURE__ */ pe(ls, [["__scopeId", "data-v-d871abcc"]]), is = (e) => {
2115
2117
  const t = D([]), o = D({
2116
2118
  selectedMode: null
2117
2119
  }), n = (i) => {
@@ -2181,73 +2183,78 @@ const tl = { class: "popover__content" }, ol = {
2181
2183
  sortField: {},
2182
2184
  sortMode: {},
2183
2185
  rowColorHovered: { type: Boolean },
2184
- perPageOptions: {}
2186
+ rows: {},
2187
+ paginator: { type: Boolean },
2188
+ perPageOptions: {},
2189
+ totals: {}
2185
2190
  }, {
2186
2191
  currentPage: {},
2187
2192
  currentPageModifiers: {},
2188
2193
  perPage: {},
2189
2194
  perPageModifiers: {}
2190
2195
  }),
2191
- emits: /* @__PURE__ */ J(["update:selectedRows", "rowClickHandler", "update:pagination"], ["update:currentPage", "update:perPage"]),
2196
+ emits: /* @__PURE__ */ J(["update:selectedRows", "rowClickHandler"], ["update:currentPage", "update:perPage"]),
2192
2197
  setup(e, { emit: t }) {
2193
2198
  const o = t, n = M(() => e.rowGroupMode), l = M(() => e.groupRowsBy), { dataWithGroup: i } = rs(n, l), { columns: s, options: r } = is(n), a = M(() => r.value.selectedMode), { selectedRows: u, isSelectedAll: c, toggleSelectRow: d, toggleSelectedAll: v } = as(a, e.data), p = D(null), m = ne(e, "currentPage"), g = ne(e, "perPage"), y = M(() => {
2194
- let V = [...e.data];
2199
+ let A = [...e.data];
2195
2200
  if (p.value) {
2196
2201
  const { field: h, order: C } = p.value;
2197
- V.sort((B, O) => {
2202
+ A.sort((B, O) => {
2198
2203
  const I = B[h], x = O[h];
2199
2204
  return I === x ? 0 : C === 1 ? I > x ? 1 : -1 : I < x ? 1 : -1;
2200
2205
  });
2201
2206
  }
2202
- const T = i(V);
2203
- return e.rowGroupMode === "rowspan" && e.groupRowsBy ? T.filter((h) => k.value.has(h._groupValue) ? h._isFirstInGroup : !0) : T;
2207
+ const V = i(A);
2208
+ return e.rowGroupMode === "rowspan" && e.groupRowsBy ? V.filter((h) => k.value.has(h._groupValue) ? h._isFirstInGroup : !0) : V;
2204
2209
  }), $ = M(() => [
2205
2210
  "table",
2206
2211
  {
2207
2212
  [`table--theme-${e.theme}`]: e.theme
2208
2213
  }
2209
- ]), k = D(/* @__PURE__ */ new Set()), _ = (V) => {
2210
- k.value.has(V) ? k.value.delete(V) : k.value.add(V);
2214
+ ]), k = D(/* @__PURE__ */ new Set()), _ = (A) => {
2215
+ k.value.has(A) ? k.value.delete(A) : k.value.add(A);
2211
2216
  };
2212
- return oe(u, (V) => {
2213
- o("update:selectedRows", V);
2214
- }), (V, T) => (f(), b("table", {
2217
+ return oe(u, (A) => {
2218
+ o("update:selectedRows", A);
2219
+ }), (A, V) => (f(), b("table", {
2215
2220
  class: F($.value)
2216
2221
  }, [
2217
- q(V.$slots, "default", {}, void 0, !0),
2222
+ q(A.$slots, "default", {}, void 0, !0),
2218
2223
  N(ml, {
2219
- size: V.size,
2224
+ size: A.size,
2220
2225
  columns: w(s),
2221
2226
  isSelectedAll: w(c),
2222
- sortMode: V.sortMode,
2223
- sortField: V.sortField,
2227
+ sortMode: A.sortMode,
2228
+ sortField: A.sortField,
2224
2229
  onSelectAllRow: w(v),
2225
- "onUpdate:sort": T[0] || (T[0] = (h) => p.value = h)
2230
+ "onUpdate:sort": V[0] || (V[0] = (h) => p.value = h)
2226
2231
  }, null, 8, ["size", "columns", "isSelectedAll", "sortMode", "sortField", "onSelectAllRow"]),
2227
2232
  N($l, {
2228
- size: V.size,
2233
+ size: A.size,
2229
2234
  selectedRows: w(u),
2230
2235
  columns: w(s),
2231
2236
  data: y.value,
2232
- rowGroupMode: V.rowGroupMode,
2233
- groupRowsBy: V.groupRowsBy,
2237
+ rowGroupMode: A.rowGroupMode,
2238
+ groupRowsBy: A.groupRowsBy,
2234
2239
  collapsedGroups: k.value,
2235
- colorHovered: V.rowColorHovered,
2236
- onRowClickHandler: T[1] || (T[1] = (h) => o("rowClickHandler", h)),
2237
- onToggleRow: T[2] || (T[2] = (h) => w(d)(h)),
2238
- onToggleGroup: T[3] || (T[3] = (h) => _(h))
2240
+ colorHovered: A.rowColorHovered,
2241
+ onRowClickHandler: V[1] || (V[1] = (h) => o("rowClickHandler", h)),
2242
+ onToggleRow: V[2] || (V[2] = (h) => w(d)(h)),
2243
+ onToggleGroup: V[3] || (V[3] = (h) => _(h))
2239
2244
  }, null, 8, ["size", "selectedRows", "columns", "data", "rowGroupMode", "groupRowsBy", "collapsedGroups", "colorHovered"]),
2240
2245
  N(ss, {
2241
2246
  currentPage: m.value,
2242
- "onUpdate:currentPage": T[4] || (T[4] = (h) => m.value = h),
2247
+ "onUpdate:currentPage": V[4] || (V[4] = (h) => m.value = h),
2243
2248
  "per-page": g.value,
2244
- "onUpdate:perPage": T[5] || (T[5] = (h) => g.value = h),
2249
+ "onUpdate:perPage": V[5] || (V[5] = (h) => g.value = h),
2245
2250
  data: y.value,
2246
- "per-page-options": V.perPageOptions
2247
- }, null, 8, ["currentPage", "per-page", "data", "per-page-options"])
2251
+ "per-page-options": A.perPageOptions,
2252
+ "totals-row": A.totals,
2253
+ paginator: A.paginator
2254
+ }, null, 8, ["currentPage", "per-page", "data", "per-page-options", "totals-row", "paginator"])
2248
2255
  ], 2));
2249
2256
  }
2250
- }), zi = /* @__PURE__ */ pe(us, [["__scopeId", "data-v-6844af70"]]), Gi = /* @__PURE__ */ E({
2257
+ }), zi = /* @__PURE__ */ pe(us, [["__scopeId", "data-v-67822ded"]]), Gi = /* @__PURE__ */ E({
2251
2258
  __name: "Column",
2252
2259
  props: {
2253
2260
  field: {},
@@ -2289,16 +2296,16 @@ const tl = { class: "popover__content" }, ol = {
2289
2296
  const o = e, n = D(), l = D([]), i = D(0), s = D(0), r = D(/* @__PURE__ */ new Map()), a = D(/* @__PURE__ */ new Map()), u = async () => {
2290
2297
  if (await ke(), !l.value?.length) return;
2291
2298
  let x = !1;
2292
- l.value.forEach((A, R) => {
2293
- if (!A) return;
2294
- const P = y.value + R, G = A.offsetHeight;
2299
+ l.value.forEach((T, R) => {
2300
+ if (!T) return;
2301
+ const P = y.value + R, G = T.offsetHeight;
2295
2302
  r.value.get(P) !== G && (r.value.set(P, G), x = !0);
2296
2303
  }), x && c();
2297
2304
  }, c = () => {
2298
2305
  let x = 0;
2299
- for (let A = 0; A < o.items.length; A++) {
2300
- a.value.set(A, x);
2301
- const R = r.value.get(A) || o.estimatedItemHeight;
2306
+ for (let T = 0; T < o.items.length; T++) {
2307
+ a.value.set(T, x);
2308
+ const R = r.value.get(T) || o.estimatedItemHeight;
2302
2309
  x += R;
2303
2310
  }
2304
2311
  }, d = (x) => a.value.get(x) || x * o.estimatedItemHeight, v = (x) => r.value.get(x) || o.estimatedItemHeight, p = M(() => {
@@ -2307,29 +2314,29 @@ const tl = { class: "popover__content" }, ol = {
2307
2314
  const x = o.items.length - 1;
2308
2315
  return d(x) + v(x);
2309
2316
  }), m = (x) => {
2310
- let A = 0, R = o.items.length - 1;
2311
- for (; A <= R; ) {
2312
- const P = Math.floor((A + R) / 2);
2313
- d(P) <= x ? A = P + 1 : R = P - 1;
2317
+ let T = 0, R = o.items.length - 1;
2318
+ for (; T <= R; ) {
2319
+ const P = Math.floor((T + R) / 2);
2320
+ d(P) <= x ? T = P + 1 : R = P - 1;
2314
2321
  }
2315
2322
  return Math.max(0, R - o.buffer);
2316
- }, g = (x, A) => {
2317
- const R = x + A;
2323
+ }, g = (x, T) => {
2324
+ const R = x + T;
2318
2325
  let P = m(x);
2319
2326
  for (; P < o.items.length && !(d(P) > R); )
2320
2327
  P++;
2321
2328
  return Math.min(o.items.length - 1, P + o.buffer);
2322
2329
  }, y = M(() => m(i.value)), $ = M(() => g(i.value, s.value)), k = M(() => {
2323
2330
  const x = [];
2324
- for (let A = y.value; A <= $.value; A++)
2325
- o.items[A] && x.push({
2326
- data: o.items[A],
2327
- index: A
2331
+ for (let T = y.value; T <= $.value; T++)
2332
+ o.items[T] && x.push({
2333
+ data: o.items[T],
2334
+ index: T
2328
2335
  });
2329
2336
  return x;
2330
- }), _ = M(() => d(y.value)), V = (x) => x.data[o.keyField] ?? x.index, T = (x) => {
2331
- const A = x.target;
2332
- i.value = A.scrollTop;
2337
+ }), _ = M(() => d(y.value)), A = (x) => x.data[o.keyField] ?? x.index, V = (x) => {
2338
+ const T = x.target;
2339
+ i.value = T.scrollTop;
2333
2340
  }, h = () => {
2334
2341
  n.value && (s.value = n.value.clientHeight);
2335
2342
  };
@@ -2347,8 +2354,8 @@ const tl = { class: "popover__content" }, ol = {
2347
2354
  }, { deep: !0 }), t({
2348
2355
  scrollToIndex: async (x) => {
2349
2356
  if (!n.value || x < 0 || x >= o.items.length) return;
2350
- const A = d(x);
2351
- n.value.scrollTop = A;
2357
+ const T = d(x);
2358
+ n.value.scrollTop = T;
2352
2359
  },
2353
2360
  scrollToTop: () => {
2354
2361
  n.value && (n.value.scrollTop = 0);
@@ -2357,11 +2364,11 @@ const tl = { class: "popover__content" }, ol = {
2357
2364
  n.value && (n.value.scrollTop = p.value);
2358
2365
  },
2359
2366
  updateItemHeights: u
2360
- }), (x, A) => (f(), b("div", {
2367
+ }), (x, T) => (f(), b("div", {
2361
2368
  ref_key: "containerRef",
2362
2369
  ref: n,
2363
2370
  class: "virtual-scroll",
2364
- onScroll: T
2371
+ onScroll: V
2365
2372
  }, [
2366
2373
  S("div", {
2367
2374
  class: "virtual-scroll__spacer",
@@ -2372,7 +2379,7 @@ const tl = { class: "popover__content" }, ol = {
2372
2379
  style: ue({ transform: `translateY(${_.value}px)`, gap: `${x.gap}px` })
2373
2380
  }, [
2374
2381
  (f(!0), b(ae, null, Ae(k.value, (R) => (f(), b("div", {
2375
- key: V(R),
2382
+ key: A(R),
2376
2383
  ref_for: !0,
2377
2384
  ref_key: "itemRefs",
2378
2385
  ref: l,
@@ -2453,9 +2460,9 @@ function ms(e, t) {
2453
2460
  }
2454
2461
  function v(h) {
2455
2462
  const { required: C, optional: B } = u(o), O = C + B;
2456
- let I = "", x = 0, A = 0;
2457
- for (; A < O.length; ) {
2458
- const R = O[A];
2463
+ let I = "", x = 0, T = 0;
2464
+ for (; T < O.length; ) {
2465
+ const R = O[T];
2459
2466
  if (c(R))
2460
2467
  if (x < h.length) {
2461
2468
  const P = h[x];
@@ -2469,7 +2476,7 @@ function ms(e, t) {
2469
2476
  I += n;
2470
2477
  else
2471
2478
  I += R;
2472
- A++;
2479
+ T++;
2473
2480
  }
2474
2481
  return I;
2475
2482
  }
@@ -2479,14 +2486,14 @@ function ms(e, t) {
2479
2486
  }
2480
2487
  function m(h) {
2481
2488
  const { required: C, optional: B } = u(o), O = C + B;
2482
- let I = "", x = 0, A = 0;
2483
- for (; x < h.length && A < O.length; ) {
2484
- const R = h[x], P = O[A];
2489
+ let I = "", x = 0, T = 0;
2490
+ for (; x < h.length && T < O.length; ) {
2491
+ const R = h[x], P = O[T];
2485
2492
  if (R === n) {
2486
2493
  x++;
2487
2494
  continue;
2488
2495
  }
2489
- c(P) ? d(R, P) ? (I += R, x++, A++) : x++ : (R === P && x++, A++);
2496
+ c(P) ? d(R, P) ? (I += R, x++, T++) : x++ : (R === P && x++, T++);
2490
2497
  }
2491
2498
  for (; x < h.length; ) {
2492
2499
  const R = h[x];
@@ -2528,7 +2535,7 @@ function ms(e, t) {
2528
2535
  if (!h.isTrusted) return;
2529
2536
  const C = h.target, B = C.value, O = m(B), I = v(O);
2530
2537
  s.value = I, e.value = O, ke(() => {
2531
- const { required: x, optional: A } = u(o), R = x + A;
2538
+ const { required: x, optional: T } = u(o), R = x + T;
2532
2539
  let P = 0, G = 0;
2533
2540
  for (let L = 0; L < R.length; L++)
2534
2541
  if (c(R[L]))
@@ -2554,7 +2561,7 @@ function ms(e, t) {
2554
2561
  setTimeout(() => {
2555
2562
  const B = C.value, O = m(B), I = v(O);
2556
2563
  s.value = I, e.value = O;
2557
- const { required: x, optional: A } = u(o), R = x + A;
2564
+ const { required: x, optional: T } = u(o), R = x + T;
2558
2565
  let P = 0, G = 0;
2559
2566
  for (let L = 0; L < R.length; L++)
2560
2567
  if (c(R[L]))
@@ -2668,15 +2675,15 @@ function ms(e, t) {
2668
2675
  }
2669
2676
  if (h.metaKey || h.ctrlKey || ["ArrowLeft", "ArrowRight", "Tab", "Home", "End", "Escape"].includes(h.key))
2670
2677
  return;
2671
- const { required: O, optional: I } = u(o), x = O + I, A = m(s.value), R = x.split("").filter((L) => c(L)).length;
2672
- if (A.length >= R) {
2678
+ const { required: O, optional: I } = u(o), x = O + I, T = m(s.value), R = x.split("").filter((L) => c(L)).length;
2679
+ if (T.length >= R) {
2673
2680
  h.preventDefault();
2674
2681
  return;
2675
2682
  }
2676
2683
  let P = -1, G = 0;
2677
2684
  for (let L = 0; L < x.length; L++)
2678
2685
  if (c(x[L])) {
2679
- if (G === A.length) {
2686
+ if (G === T.length) {
2680
2687
  P = L;
2681
2688
  break;
2682
2689
  }
@@ -2684,31 +2691,31 @@ function ms(e, t) {
2684
2691
  }
2685
2692
  P >= 0 && !d(h.key, x[P]) && h.preventDefault();
2686
2693
  }
2687
- function V(h) {
2694
+ function A(h) {
2688
2695
  r.value = !0, ke(() => {
2689
2696
  const C = h.target, { required: B, optional: O } = u(o), I = B + O;
2690
2697
  let x = 0;
2691
- for (let A = 0; A < I.length; A++)
2692
- if (c(I[A])) {
2693
- x = A;
2698
+ for (let T = 0; T < I.length; T++)
2699
+ if (c(I[T])) {
2700
+ x = T;
2694
2701
  break;
2695
2702
  }
2696
2703
  if (je(e)) {
2697
- let A = 0;
2704
+ let T = 0;
2698
2705
  for (let R = 0; R < I.length; R++)
2699
2706
  if (c(I[R])) {
2700
- if (A >= je(e).length) {
2707
+ if (T >= je(e).length) {
2701
2708
  x = R;
2702
2709
  break;
2703
2710
  }
2704
- A++;
2711
+ T++;
2705
2712
  }
2706
- A === je(e).length && (x = s.value.length);
2713
+ T === je(e).length && (x = s.value.length);
2707
2714
  }
2708
2715
  C.setSelectionRange(x, x);
2709
2716
  });
2710
2717
  }
2711
- function T() {
2718
+ function V() {
2712
2719
  r.value = !1, l && !g(s.value) ? (s.value = "", e.value = "") : je(e) || y();
2713
2720
  }
2714
2721
  return y(), oe(() => je(e), (h, C) => {
@@ -2720,8 +2727,8 @@ function ms(e, t) {
2720
2727
  handleInput: $,
2721
2728
  handlePaste: k,
2722
2729
  handleKeydown: _,
2723
- handleFocus: V,
2724
- handleBlur: T,
2730
+ handleFocus: A,
2731
+ handleBlur: V,
2725
2732
  placeholder: p()
2726
2733
  };
2727
2734
  }
@@ -3395,7 +3402,7 @@ const Qi = {
3395
3402
  a();
3396
3403
  return;
3397
3404
  }
3398
- const $ = p.getBoundingClientRect(), k = 8, _ = 8, V = (I) => {
3405
+ const $ = p.getBoundingClientRect(), k = 8, _ = 8, A = (I) => {
3399
3406
  switch (I) {
3400
3407
  case "top":
3401
3408
  return {
@@ -3440,17 +3447,17 @@ const Qi = {
3440
3447
  default:
3441
3448
  return { top: 0, left: 0 };
3442
3449
  }
3443
- }, T = (I) => {
3444
- const x = V(I);
3450
+ }, V = (I) => {
3451
+ const x = A(I);
3445
3452
  return x.top >= k && x.left >= k && x.top + $.height <= window.innerHeight - k && x.left + $.width <= window.innerWidth - k;
3446
3453
  }, h = [m];
3447
3454
  ["bottomright", "bottom", "top", "right", "left", "bottomleft", "topright", "topleft"].forEach((I) => {
3448
3455
  h.includes(I) || h.push(I);
3449
3456
  });
3450
- let B = m, O = V(m);
3457
+ let B = m, O = A(m);
3451
3458
  for (const I of h)
3452
- if (T(I)) {
3453
- B = I, O = V(I);
3459
+ if (V(I)) {
3460
+ B = I, O = A(I);
3454
3461
  break;
3455
3462
  }
3456
3463
  O.top = Math.max(k, Math.min(O.top, window.innerHeight - $.height - k)), O.left = Math.max(k, Math.min(O.left, window.innerWidth - $.width - k)), n.value = B, o.value = {
@@ -3865,8 +3872,8 @@ const si = async (e, t, o) => {
3865
3872
  } = r[g], {
3866
3873
  x: k,
3867
3874
  y: _,
3868
- data: V,
3869
- reset: T
3875
+ data: A,
3876
+ reset: V
3870
3877
  } = await $({
3871
3878
  x: c,
3872
3879
  y: d,
@@ -3885,13 +3892,13 @@ const si = async (e, t, o) => {
3885
3892
  ...p,
3886
3893
  [y]: {
3887
3894
  ...p[y],
3888
- ...V
3895
+ ...A
3889
3896
  }
3890
- }, T && m <= 50 && (m++, typeof T == "object" && (T.placement && (v = T.placement), T.rects && (u = T.rects === !0 ? await s.getElementRects({
3897
+ }, V && m <= 50 && (m++, typeof V == "object" && (V.placement && (v = V.placement), V.rects && (u = V.rects === !0 ? await s.getElementRects({
3891
3898
  reference: e,
3892
3899
  floating: t,
3893
3900
  strategy: l
3894
- }) : T.rects), {
3901
+ }) : V.rects), {
3895
3902
  x: c,
3896
3903
  y: d
3897
3904
  } = zt(u, v, a)), g = -1);
@@ -3930,23 +3937,23 @@ async function vo(e, t) {
3930
3937
  y: l,
3931
3938
  width: s.floating.width,
3932
3939
  height: s.floating.height
3933
- } : s.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), V = await (i.isElement == null ? void 0 : i.isElement(_)) ? await (i.getScale == null ? void 0 : i.getScale(_)) || {
3940
+ } : s.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(r.floating)), A = await (i.isElement == null ? void 0 : i.isElement(_)) ? await (i.getScale == null ? void 0 : i.getScale(_)) || {
3934
3941
  x: 1,
3935
3942
  y: 1
3936
3943
  } : {
3937
3944
  x: 1,
3938
3945
  y: 1
3939
- }, T = De(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
3946
+ }, V = De(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
3940
3947
  elements: r,
3941
3948
  rect: k,
3942
3949
  offsetParent: _,
3943
3950
  strategy: a
3944
3951
  }) : k);
3945
3952
  return {
3946
- top: ($.top - T.top + m.top) / V.y,
3947
- bottom: (T.bottom - $.bottom + m.bottom) / V.y,
3948
- left: ($.left - T.left + m.left) / V.x,
3949
- right: (T.right - $.right + m.right) / V.x
3953
+ top: ($.top - V.top + m.top) / A.y,
3954
+ bottom: (V.bottom - $.bottom + m.bottom) / A.y,
3955
+ left: ($.left - V.left + m.left) / A.x,
3956
+ right: (V.right - $.right + m.right) / A.x
3950
3957
  };
3951
3958
  }
3952
3959
  const ii = (e) => ({
@@ -3970,10 +3977,10 @@ const ii = (e) => ({
3970
3977
  const d = ut(c), v = {
3971
3978
  x: o,
3972
3979
  y: n
3973
- }, p = lt(l), m = nt(p), g = await s.getDimensions(u), y = p === "y", $ = y ? "top" : "left", k = y ? "bottom" : "right", _ = y ? "clientHeight" : "clientWidth", V = i.reference[m] + i.reference[p] - v[p] - i.floating[m], T = v[p] - i.reference[p], h = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
3980
+ }, p = lt(l), m = nt(p), g = await s.getDimensions(u), y = p === "y", $ = y ? "top" : "left", k = y ? "bottom" : "right", _ = y ? "clientHeight" : "clientWidth", A = i.reference[m] + i.reference[p] - v[p] - i.floating[m], V = v[p] - i.reference[p], h = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
3974
3981
  let C = h ? h[_] : 0;
3975
3982
  (!C || !await (s.isElement == null ? void 0 : s.isElement(h))) && (C = r.floating[_] || i.floating[m]);
3976
- const B = V / 2 - T / 2, O = C / 2 - g[m] / 2 - 1, I = Re(d[$], O), x = Re(d[k], O), A = I, R = C - g[m] - x, P = C / 2 - g[m] / 2 + B, G = Xe(A, P, R), L = !a.arrow && Me(l) != null && P !== G && i.reference[m] / 2 - (P < A ? I : x) - g[m] / 2 < 0, te = L ? P < A ? P - A : P - R : 0;
3983
+ const B = A / 2 - V / 2, O = C / 2 - g[m] / 2 - 1, I = Re(d[$], O), x = Re(d[k], O), T = I, R = C - g[m] - x, P = C / 2 - g[m] / 2 + B, G = Xe(T, P, R), L = !a.arrow && Me(l) != null && P !== G && i.reference[m] / 2 - (P < T ? I : x) - g[m] / 2 < 0, te = L ? P < T ? P - T : P - R : 0;
3977
3984
  return {
3978
3985
  [p]: v[p] + te,
3979
3986
  data: {
@@ -4010,19 +4017,19 @@ const ii = (e) => ({
4010
4017
  } = Pe(e, t);
4011
4018
  if ((o = i.arrow) != null && o.alignmentOffset)
4012
4019
  return {};
4013
- const $ = Se(l), k = xe(r), _ = Se(r) === r, V = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), T = v || (_ || !g ? [at(r)] : mn(r)), h = m !== "none";
4014
- !v && h && T.push(...wn(r, g, m, V));
4015
- const C = [r, ...T], B = await vo(t, y), O = [];
4020
+ const $ = Se(l), k = xe(r), _ = Se(r) === r, A = await (a.isRTL == null ? void 0 : a.isRTL(u.floating)), V = v || (_ || !g ? [at(r)] : mn(r)), h = m !== "none";
4021
+ !v && h && V.push(...wn(r, g, m, A));
4022
+ const C = [r, ...V], B = await vo(t, y), O = [];
4016
4023
  let I = ((n = i.flip) == null ? void 0 : n.overflows) || [];
4017
4024
  if (c && O.push(B[$]), d) {
4018
- const P = pn(l, s, V);
4025
+ const P = pn(l, s, A);
4019
4026
  O.push(B[P[0]], B[P[1]]);
4020
4027
  }
4021
4028
  if (I = [...I, {
4022
4029
  placement: l,
4023
4030
  overflows: O
4024
4031
  }], !O.every((P) => P <= 0)) {
4025
- var x, A;
4032
+ var x, T;
4026
4033
  const P = (((x = i.flip) == null ? void 0 : x.index) || 0) + 1, G = C[P];
4027
4034
  if (G && (!(d === "alignment" ? k !== xe(G) : !1) || // We leave the current main axis only if every placement on that axis
4028
4035
  // overflows the main axis.
@@ -4036,7 +4043,7 @@ const ii = (e) => ({
4036
4043
  placement: G
4037
4044
  }
4038
4045
  };
4039
- let L = (A = I.filter((te) => te.overflows[0] <= 0).sort((te, me) => te.overflows[1] - me.overflows[1])[0]) == null ? void 0 : A.placement;
4046
+ let L = (T = I.filter((te) => te.overflows[0] <= 0).sort((te, me) => te.overflows[1] - me.overflows[1])[0]) == null ? void 0 : T.placement;
4040
4047
  if (!L)
4041
4048
  switch (p) {
4042
4049
  case "bestFit": {
@@ -4224,8 +4231,8 @@ function et(e, t, o, n) {
4224
4231
  const v = Z(i), p = n && Q(n) ? Z(n) : n;
4225
4232
  let m = v, g = Je(m);
4226
4233
  for (; g && n && p !== m; ) {
4227
- const y = Ye(g), $ = g.getBoundingClientRect(), k = ee(g), _ = $.left + (g.clientLeft + parseFloat(k.paddingLeft)) * y.x, V = $.top + (g.clientTop + parseFloat(k.paddingTop)) * y.y;
4228
- a *= y.x, u *= y.y, c *= y.x, d *= y.y, a += _, u += V, m = Z(g), g = Je(m);
4234
+ const y = Ye(g), $ = g.getBoundingClientRect(), k = ee(g), _ = $.left + (g.clientLeft + parseFloat(k.paddingLeft)) * y.x, A = $.top + (g.clientTop + parseFloat(k.paddingTop)) * y.y;
4235
+ a *= y.x, u *= y.y, c *= y.x, d *= y.y, a += _, u += A, m = Z(g), g = Je(m);
4229
4236
  }
4230
4237
  }
4231
4238
  return De({
@@ -4503,15 +4510,15 @@ const Si = {
4503
4510
  left: `${g}px`,
4504
4511
  top: `${y}px`
4505
4512
  }, o.showArrow && k.arrow && m) {
4506
- const { x: _, y: V } = k.arrow, T = $.split("-")[0], h = {
4513
+ const { x: _, y: A } = k.arrow, V = $.split("-")[0], h = {
4507
4514
  top: "bottom",
4508
4515
  right: "left",
4509
4516
  bottom: "top",
4510
4517
  left: "right"
4511
- }[T];
4518
+ }[V];
4512
4519
  r.value = {
4513
4520
  left: _ != null ? `${_}px` : "",
4514
- top: V != null ? `${V}px` : "",
4521
+ top: A != null ? `${A}px` : "",
4515
4522
  right: "",
4516
4523
  bottom: "",
4517
4524
  [h]: "-4px"