@opengis/bi 1.2.27 → 1.2.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  var us = Object.defineProperty;
2
2
  var hs = (s, e, t) => e in s ? us(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
3
  var P = (s, e, t) => hs(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { h as Ke, defineComponent as ge, ref as I, computed as q, onUnmounted as Ue, createElementBlock as x, openBlock as h, Fragment as U, createElementVNode as c, createCommentVNode as A, createTextVNode as X, toDisplayString as W, renderList as Z, mergeModels as Be, useModel as Gt, withDirectives as et, normalizeClass as se, vModelCheckbox as ps, defineAsyncComponent as M, onMounted as le, watch as ae, normalizeStyle as Ge, createBlock as E, createVNode as T, unref as N, withModifiers as Ht, resolveDynamicComponent as Zt, createStaticVNode as fs, mergeProps as he, resolveComponent as K, withCtx as j, Teleport as gs, Transition as ms, renderSlot as Rt, getCurrentInstance as me, onErrorCaptured as bs, inject as Qt, vModelText as xs, vModelSelect as ys, provide as Qe, readonly as ws } from "vue";
4
+ import { h as Ke, defineComponent as ge, ref as T, computed as A, onUnmounted as Ue, createElementBlock as x, openBlock as h, Fragment as U, createElementVNode as c, createCommentVNode as F, createTextVNode as X, toDisplayString as W, renderList as Z, mergeModels as Be, useModel as Gt, withDirectives as et, normalizeClass as se, vModelCheckbox as ps, defineAsyncComponent as M, onMounted as le, watch as ae, normalizeStyle as Ge, createBlock as N, createVNode as I, unref as E, withModifiers as Ht, resolveDynamicComponent as Zt, createStaticVNode as fs, mergeProps as he, resolveComponent as K, withCtx as j, Teleport as gs, Transition as ms, renderSlot as Rt, getCurrentInstance as me, onErrorCaptured as bs, inject as Qt, vModelText as xs, vModelSelect as ys, provide as Qe, readonly as ws } from "vue";
5
5
  import { useRouter as we, useRoute as vs } from "vue-router";
6
6
  /**
7
7
  * @license lucide-vue-next v0.577.0 - ISC
@@ -309,27 +309,27 @@ const Bs = ee("x", [
309
309
  },
310
310
  emits: ["selected"],
311
311
  setup(s, { emit: e }) {
312
- const t = s, a = e, r = I(!1), i = I(t.value ?? null), n = I(null), o = q(() => {
313
- const m = t.options;
314
- return typeof m == "string" ? m.split(",").map((b, k) => ({ id: k, text: b.trim() })) : Array.isArray(m) ? m : [];
315
- }), l = q(() => {
316
- const m = o.value.find(
317
- (b) => (b.id ?? b) === i.value
312
+ const t = s, a = e, r = T(!1), i = T(t.value ?? null), n = T(null), o = A(() => {
313
+ const b = t.options;
314
+ return typeof b == "string" ? b.split(",").map((g, k) => ({ id: k, text: g.trim() })) : Array.isArray(b) ? b : [];
315
+ }), l = A(() => {
316
+ const b = o.value.find(
317
+ (g) => (g.id ?? g) === i.value
318
318
  );
319
- return m ? m.text ?? String(m) : t.title ?? "";
320
- }), d = (m) => {
321
- const b = (m == null ? void 0 : m.id) ?? m;
322
- i.value = b, r.value = !1, a("selected", b), document.removeEventListener("click", u);
323
- }, u = (m) => {
324
- n.value && !n.value.contains(m.target) && (r.value = !1, document.removeEventListener("click", u));
319
+ return b ? b.text ?? String(b) : t.title ?? "";
320
+ }), d = (b) => {
321
+ const g = (b == null ? void 0 : b.id) ?? b;
322
+ i.value = g, r.value = !1, a("selected", g), document.removeEventListener("click", u);
323
+ }, u = (b) => {
324
+ n.value && !n.value.contains(b.target) && (r.value = !1, document.removeEventListener("click", u));
325
325
  }, p = () => {
326
326
  r.value = !r.value, r.value ? setTimeout(() => {
327
327
  document.addEventListener("click", u);
328
328
  }, 200) : document.removeEventListener("click", u);
329
- }, v = (m) => (Xe == null ? void 0 : Xe[m]) ?? m;
329
+ }, v = (b) => (Xe == null ? void 0 : Xe[b]) ?? b;
330
330
  return Ue(() => {
331
331
  document.removeEventListener("click", u);
332
- }), (m, b) => (h(), x(U, null, [
332
+ }), (b, g) => (h(), x(U, null, [
333
333
  c("button", {
334
334
  type: "button",
335
335
  "aria-expanded": "true",
@@ -337,7 +337,7 @@ const Bs = ee("x", [
337
337
  onClick: p
338
338
  }, [
339
339
  X(W(v(l.value)) + " ", 1),
340
- b[0] || (b[0] = c("svg", {
340
+ g[0] || (g[0] = c("svg", {
341
341
  class: "shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",
342
342
  xmlns: "http://www.w3.org/2000/svg",
343
343
  width: "16",
@@ -366,11 +366,11 @@ const Bs = ee("x", [
366
366
  (h(!0), x(U, null, Z(o.value, (k) => (h(), x("div", {
367
367
  key: k.id || k,
368
368
  class: "cursor-pointer selected hs-selected:bg-gray-100 dark:hs-selected:bg-neutral-800 py-1.5 px-2 w-full text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
369
- onClick: (D) => d(k)
369
+ onClick: (C) => d(k)
370
370
  }, [
371
371
  c("div", Ps, [
372
372
  c("span", null, W(v(k.text || k)), 1),
373
- i.value === (k.id || k) ? (h(), x("span", As, [...b[1] || (b[1] = [
373
+ i.value === (k.id || k) ? (h(), x("span", As, [...g[1] || (g[1] = [
374
374
  c("svg", {
375
375
  class: "shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",
376
376
  xmlns: "http:.w3.org/2000/svg",
@@ -385,10 +385,10 @@ const Bs = ee("x", [
385
385
  }, [
386
386
  c("polyline", { points: "20 6 9 17 4 12" })
387
387
  ], -1)
388
- ])])) : A("", !0)
388
+ ])])) : F("", !0)
389
389
  ])
390
390
  ], 8, Os))), 128))
391
- ], 512)) : A("", !0)
391
+ ], 512)) : F("", !0)
392
392
  ], 64));
393
393
  }
394
394
  }), qs = { class: "flex items-center space-x-2" }, Ms = /* @__PURE__ */ ge({
@@ -413,7 +413,7 @@ const Bs = ee("x", [
413
413
  s.leftLabel ? (h(), x("div", {
414
414
  key: 0,
415
415
  class: se(["transition-colors", { "text-blue-500": !a.value }])
416
- }, W(s.leftLabel), 3)) : A("", !0),
416
+ }, W(s.leftLabel), 3)) : F("", !0),
417
417
  et(c("input", {
418
418
  "onUpdate:modelValue": n[0] || (n[0] = (o) => a.value = o),
419
419
  type: "checkbox",
@@ -425,7 +425,7 @@ const Bs = ee("x", [
425
425
  s.rightLabel ? (h(), x("div", {
426
426
  key: 1,
427
427
  class: se(["transition-colors", { "text-blue-500": a.value }])
428
- }, W(s.rightLabel), 3)) : A("", !0)
428
+ }, W(s.rightLabel), 3)) : F("", !0)
429
429
  ]));
430
430
  }
431
431
  }), Q = (s, e) => {
@@ -443,8 +443,8 @@ function Hs(s, e) {
443
443
  }
444
444
  const Zs = /* @__PURE__ */ Q(Us, [["render", Hs]]), Nt = {
445
445
  "bi-bar": M(() => Promise.resolve().then(() => ei)),
446
- "bi-number": M(() => import("./vs-number-BvAcFzRT.js")),
447
- "bi-text": M(() => import("./vs-text-GIhpwEL4.js")),
446
+ "bi-number": M(() => import("./vs-number-poGPfqSn.js")),
447
+ "bi-text": M(() => import("./vs-text-Bs5tYckh.js")),
448
448
  "bi-listbar": M(() => Promise.resolve().then(() => Ki)),
449
449
  "bi-pie": M(() => Promise.resolve().then(() => ci)),
450
450
  "bi-donut": M(() => Promise.resolve().then(() => ni)),
@@ -452,10 +452,10 @@ const Zs = /* @__PURE__ */ Q(Us, [["render", Hs]]), Nt = {
452
452
  "bi-stat": M(() => Promise.resolve().then(() => Ri)),
453
453
  "bi-pivot": M(() => Promise.resolve().then(() => bo)),
454
454
  "bi-progress": M(() => Promise.resolve().then(() => Mi)),
455
- "bi-funnel": M(() => import("./vs-funnel-bar-DwVkX7Q2.js")),
456
- "bi-map": M(() => import("./vs-map-BeYJ2aj0.js")),
457
- "bi-cluster": M(() => import("./vs-map-cluster-ltvourI_.js")),
458
- "bi-table": M(() => import("./vs-table-CBFIS-pF.js"))
455
+ "bi-funnel": M(() => import("./vs-funnel-bar-D0j-vBjL.js")),
456
+ "bi-map": M(() => import("./vs-map-DnGaeJ0j.js")),
457
+ "bi-cluster": M(() => import("./vs-map-cluster-CtwhYhfw.js")),
458
+ "bi-table": M(() => import("./vs-table-D3hPaMk1.js"))
459
459
  };
460
460
  let Yt = "/api";
461
461
  function He(s) {
@@ -522,52 +522,52 @@ const H = {
522
522
  },
523
523
  emits: ["update:current-widget-data"],
524
524
  setup(s, { emit: e }) {
525
- const t = s, a = e, r = I(null), i = I(null), n = I(null), o = I({}), l = I([]), d = q(() => {
526
- var f, w;
527
- const y = (f = t.dashboardWidgets) == null ? void 0 : f.find(($) => $.name === t.widget);
525
+ const t = s, a = e, r = T(null), i = T(null), n = T(null), o = T({}), l = T([]), d = A(() => {
526
+ var m, w;
527
+ const y = (m = t.dashboardWidgets) == null ? void 0 : m.find((_) => _.name === t.widget);
528
528
  return ((w = y == null ? void 0 : y.data) == null ? void 0 : w.title) ?? (y == null ? void 0 : y.title) ?? "";
529
- }), u = q(() => {
530
- var f;
531
- const y = (f = t.dashboardWidgets) == null ? void 0 : f.find((w) => w.name === t.widget);
529
+ }), u = A(() => {
530
+ var m;
531
+ const y = (m = t.dashboardWidgets) == null ? void 0 : m.find((w) => w.name === t.widget);
532
532
  return (y == null ? void 0 : y.type) ?? "text";
533
- }), p = q(() => {
534
- var y, f;
535
- return t.height || ((f = (y = o.value) == null ? void 0 : y.style) == null ? void 0 : f.height) || 480;
536
- }), v = q(() => {
537
- var f;
538
- const y = (f = o.value) == null ? void 0 : f.controls;
533
+ }), p = A(() => {
534
+ var y, m;
535
+ return t.height || ((m = (y = o.value) == null ? void 0 : y.style) == null ? void 0 : m.height) || 480;
536
+ }), v = A(() => {
537
+ var m;
538
+ const y = (m = o.value) == null ? void 0 : m.controls;
539
539
  return !y || typeof y == "boolean" ? [] : Object.keys(y).map((w) => ({
540
540
  name: w,
541
541
  options: y[w]
542
542
  }));
543
- }), m = q(() => {
543
+ }), b = A(() => {
544
544
  const y = u.value ? `bi-${u.value}` : "";
545
545
  return y && y in Nt ? Nt[y] : null;
546
546
  });
547
- function b(y, f) {
548
- var w, $;
549
- ($ = (w = i.value) == null ? void 0 : w.changeStyle) == null || $.call(w, y, f);
547
+ function g(y, m) {
548
+ var w, _;
549
+ (_ = (w = i.value) == null ? void 0 : w.changeStyle) == null || _.call(w, y, m);
550
550
  }
551
- function k(y, f) {
552
- const w = l.value.find(($) => $.name === f);
553
- w ? w.option = y : l.value.push({ name: f, option: y }), D();
551
+ function k(y, m) {
552
+ const w = l.value.find((_) => _.name === m);
553
+ w ? w.option = y : l.value.push({ name: m, option: y }), C();
554
554
  }
555
- function D() {
556
- var f, w;
555
+ function C() {
556
+ var m, w;
557
557
  let y = `/bi-data?dashboard=${t.dashboard}&widget=${t.widget}`;
558
- l.value.forEach(($) => {
559
- y += `&${$.name}=${$.option}`;
560
- }), (w = (f = i.value) == null ? void 0 : f.getDataFromURL) == null || w.call(f, y);
558
+ l.value.forEach((_) => {
559
+ y += `&${_.name}=${_.option}`;
560
+ }), (w = (m = i.value) == null ? void 0 : m.getDataFromURL) == null || w.call(m, y);
561
561
  }
562
- function V() {
562
+ function S() {
563
563
  const y = n.value;
564
564
  if (y != null && y.getDataURL) {
565
- const f = y.getDataURL({
565
+ const m = y.getDataURL({
566
566
  type: "png",
567
567
  pixelRatio: 2,
568
568
  backgroundColor: "#ffffff"
569
569
  }), w = document.createElement("a");
570
- w.href = f, w.download = "chart.png", document.body.appendChild(w), w.click(), document.body.removeChild(w);
570
+ w.href = m, w.download = "chart.png", document.body.appendChild(w), w.click(), document.body.removeChild(w);
571
571
  }
572
572
  }
573
573
  return le(() => {
@@ -575,90 +575,90 @@ const H = {
575
575
  }), ae(
576
576
  () => t.filterURl,
577
577
  (y) => {
578
- var f, w;
579
- y && ((w = (f = i.value) == null ? void 0 : f.setFilter) == null || w.call(f, y));
578
+ var m, w;
579
+ y && ((w = (m = i.value) == null ? void 0 : m.setFilter) == null || w.call(m, y));
580
580
  }
581
581
  ), ae(
582
582
  () => t.selectedWidget,
583
- (y, f) => {
583
+ (y, m) => {
584
584
  var w;
585
- y !== f && y === ((w = o.value) == null ? void 0 : w.id) && a("update:current-widget-data", o.value);
585
+ y !== m && y === ((w = o.value) == null ? void 0 : w.id) && a("update:current-widget-data", o.value);
586
586
  }
587
587
  ), ae(
588
588
  o,
589
- (y, f) => {
590
- (y == null ? void 0 : y.id) !== (f == null ? void 0 : f.id) && a("update:current-widget-data", y);
589
+ (y, m) => {
590
+ (y == null ? void 0 : y.id) !== (m == null ? void 0 : m.id) && a("update:current-widget-data", y);
591
591
  },
592
592
  { deep: !0 }
593
- ), (y, f) => {
594
- var w, $, _;
593
+ ), (y, m) => {
594
+ var w, _, $;
595
595
  return h(), x("div", {
596
596
  ref_key: "widgetRef",
597
597
  ref: r,
598
598
  class: "box-border relative p-4 bg-white border border-gray-200 rounded-xl shadow-sm select-auto overflow-hidden",
599
599
  style: Ge({ height: p.value + "px", maxHeight: p.value + "px" })
600
600
  }, [
601
- ["text", "cluster", "map"].includes(u.value) ? A("", !0) : (h(), x("div", Xs, [
601
+ ["text", "cluster", "map"].includes(u.value) ? F("", !0) : (h(), x("div", Xs, [
602
602
  c("div", Ys, [
603
603
  c("div", Js, [
604
604
  c("span", Ks, W(d.value), 1)
605
605
  ]),
606
606
  c("div", ea, [
607
607
  (w = v.value) != null && w.length ? (h(), x("span", ta, [
608
- (h(!0), x(U, null, Z(($ = v.value) == null ? void 0 : $.filter(
609
- (g) => (g == null ? void 0 : g.options) && (g == null ? void 0 : g.name) !== "export"
610
- ), (g) => {
611
- var C, z;
608
+ (h(!0), x(U, null, Z((_ = v.value) == null ? void 0 : _.filter(
609
+ (f) => (f == null ? void 0 : f.options) && (f == null ? void 0 : f.name) !== "export"
610
+ ), (f) => {
611
+ var D, z;
612
612
  return h(), x("div", {
613
- key: g == null ? void 0 : g.name
613
+ key: f == null ? void 0 : f.name
614
614
  }, [
615
- Array.isArray(g == null ? void 0 : g.options) ? (h(), E(Fs, {
615
+ Array.isArray(f == null ? void 0 : f.options) ? (h(), N(Fs, {
616
616
  key: 0,
617
- title: g == null ? void 0 : g.name,
618
- options: g == null ? void 0 : g.options,
619
- value: ((z = (C = o.value) == null ? void 0 : C.data) == null ? void 0 : z[g == null ? void 0 : g.name]) ?? null,
620
- onSelected: (R) => k(R, g == null ? void 0 : g.name)
621
- }, null, 8, ["title", "options", "value", "onSelected"])) : typeof g.options == "boolean" ? (h(), E(Ms, {
617
+ title: f == null ? void 0 : f.name,
618
+ options: f == null ? void 0 : f.options,
619
+ value: ((z = (D = o.value) == null ? void 0 : D.data) == null ? void 0 : z[f == null ? void 0 : f.name]) ?? null,
620
+ onSelected: (V) => k(V, f == null ? void 0 : f.name)
621
+ }, null, 8, ["title", "options", "value", "onSelected"])) : typeof f.options == "boolean" ? (h(), N(Ms, {
622
622
  key: 1,
623
- "left-label": g == null ? void 0 : g.name,
624
- "model-value": !!(g != null && g.options),
625
- "onUpdate:isEnabled": (R) => b(g == null ? void 0 : g.name, R)
626
- }, null, 8, ["left-label", "model-value", "onUpdate:isEnabled"])) : A("", !0)
623
+ "left-label": f == null ? void 0 : f.name,
624
+ "model-value": !!(f != null && f.options),
625
+ "onUpdate:isEnabled": (V) => g(f == null ? void 0 : f.name, V)
626
+ }, null, 8, ["left-label", "model-value", "onUpdate:isEnabled"])) : F("", !0)
627
627
  ]);
628
628
  }), 128)),
629
- (_ = v.value) != null && _.some((g) => (g == null ? void 0 : g.name) === "export") ? (h(), x("button", {
629
+ ($ = v.value) != null && $.some((f) => (f == null ? void 0 : f.name) === "export") ? (h(), x("button", {
630
630
  key: 0,
631
631
  type: "button",
632
632
  class: "h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center",
633
- onClick: V
633
+ onClick: S
634
634
  }, [
635
- T(N(Is), {
635
+ I(E(Is), {
636
636
  size: 16,
637
637
  class: "text-gray-800"
638
638
  })
639
- ])) : A("", !0)
640
- ])) : A("", !0)
639
+ ])) : F("", !0)
640
+ ])) : F("", !0)
641
641
  ])
642
642
  ])
643
643
  ])),
644
644
  c("div", {
645
645
  class: "w-full h-full",
646
- onClick: f[2] || (f[2] = Ht(() => {
646
+ onClick: m[2] || (m[2] = Ht(() => {
647
647
  }, ["stop"]))
648
648
  }, [
649
- m.value ? (h(), E(Zt(m.value), {
649
+ b.value ? (h(), N(Zt(b.value), {
650
650
  key: 0,
651
651
  ref_key: "chartRef",
652
652
  ref: i,
653
653
  "current-widget": n.value,
654
- "onUpdate:currentWidget": f[0] || (f[0] = (g) => n.value = g),
654
+ "onUpdate:currentWidget": m[0] || (m[0] = (f) => n.value = f),
655
655
  "widget-data": o.value,
656
- "onUpdate:widgetData": f[1] || (f[1] = (g) => o.value = g),
656
+ "onUpdate:widgetData": m[1] || (m[1] = (f) => o.value = f),
657
657
  dashboard: s.dashboard,
658
658
  title: d.value,
659
659
  widget: s.widget,
660
660
  "prefetched-data": s.prefetchedData
661
- }, null, 40, ["current-widget", "widget-data", "dashboard", "title", "widget", "prefetched-data"])) : (h(), E(Zs, {
661
+ }, null, 40, ["current-widget", "widget-data", "dashboard", "title", "widget", "prefetched-data"])) : (h(), N(Zs, {
662
662
  key: 1,
663
663
  class: "w-full h-full"
664
664
  }))
@@ -688,7 +688,7 @@ const H = {
688
688
  }), oa = {
689
689
  __name: "filter",
690
690
  setup(s) {
691
- return (e, t) => (h(), E(N(Rs), he(e.$attrs, { size: 24 }), null, 16));
691
+ return (e, t) => (h(), N(E(Rs), he(e.$attrs, { size: 24 }), null, 16));
692
692
  }
693
693
  }, la = {
694
694
  components: { filterIcon: oa },
@@ -705,9 +705,9 @@ function ua(s, e, t, a, r, i) {
705
705
  const n = K("filterIcon");
706
706
  return h(), x("div", da, [
707
707
  t.filterScheme ? (h(), x("button", ca, [
708
- T(n),
708
+ I(n),
709
709
  e[0] || (e[0] = X(" Фільтри ", -1))
710
- ])) : A("", !0)
710
+ ])) : F("", !0)
711
711
  ]);
712
712
  }
713
713
  const ha = /* @__PURE__ */ Q(la, [["render", ua]]), pa = {
@@ -729,14 +729,14 @@ function ya(s, e, t, a, r, i) {
729
729
  return h(), x("div", fa, [
730
730
  c("div", ga, [
731
731
  c("h1", ma, W((o = t.dashboardData) == null ? void 0 : o.title), 1),
732
- (l = t.dashboardData) != null && l.description ? (h(), x("button", ba, W((d = t.dashboardData) == null ? void 0 : d.description), 1)) : A("", !0)
732
+ (l = t.dashboardData) != null && l.description ? (h(), x("button", ba, W((d = t.dashboardData) == null ? void 0 : d.description), 1)) : F("", !0)
733
733
  ]),
734
734
  t.filters ? (h(), x("div", xa, [
735
- T(n, {
735
+ I(n, {
736
736
  filterScheme: t.filters,
737
737
  "onFilters:changed": e[0] || (e[0] = (u) => s.$emit("filters:changed", u))
738
738
  }, null, 8, ["filterScheme"])
739
- ])) : A("", !0)
739
+ ])) : F("", !0)
740
740
  ]);
741
741
  }
742
742
  const wa = /* @__PURE__ */ Q(pa, [["render", ya]]), va = {
@@ -756,7 +756,7 @@ const wa = /* @__PURE__ */ Q(pa, [["render", ya]]), va = {
756
756
  compact: { type: Boolean, default: !1 }
757
757
  },
758
758
  setup(s) {
759
- const e = s, t = we(), a = q(() => Array.isArray(e.items) ? e.items : []);
759
+ const e = s, t = we(), a = A(() => Array.isArray(e.items) ? e.items : []);
760
760
  function r(i) {
761
761
  t != null && t.push ? t.push(i) : typeof i == "string" && (window != null && window.location) && (window.location.href = i);
762
762
  }
@@ -768,13 +768,13 @@ const wa = /* @__PURE__ */ Q(pa, [["render", ya]]), va = {
768
768
  }, [
769
769
  (h(!0), x(U, null, Z(a.value, (l, d) => (h(), x(U, { key: d }, [
770
770
  d > 0 ? (h(), x("span", va, [
771
- T(N(Ts), { class: "w-4 h-4" })
772
- ])) : A("", !0),
771
+ I(E(Ts), { class: "w-4 h-4" })
772
+ ])) : F("", !0),
773
773
  typeof l.onClick == "function" ? (h(), x("span", {
774
774
  key: 1,
775
775
  class: "hover:text-gray-900 transition-colors cursor-pointer",
776
776
  onClick: (u) => l.onClick()
777
- }, W(l.label), 9, ka)) : N(t) && l.to ? (h(), E(o, {
777
+ }, W(l.label), 9, ka)) : E(t) && l.to ? (h(), N(o, {
778
778
  key: 2,
779
779
  to: l.to,
780
780
  class: "hover:text-gray-900 transition-colors"
@@ -847,30 +847,32 @@ function Ta(s, e, t, a, r, i) {
847
847
  const n = K("VsNewNodata"), o = K("VsWidget");
848
848
  return h(), x("div", Ca, [
849
849
  c("div", za, [
850
- r.error || !r.dashboardData ? (h(), E(n, {
850
+ r.error || !r.dashboardData ? (h(), N(n, {
851
851
  key: 0,
852
852
  class: "col-span-12"
853
- })) : A("", !0),
853
+ })) : F("", !0),
854
854
  (h(!0), x(U, null, Z(((l = r.dashboardData) == null ? void 0 : l.panels) || [], (d, u) => {
855
- var p;
855
+ var p, v;
856
856
  return h(), x("div", {
857
- key: u,
857
+ key: d.widget || ((p = d.widgets) == null ? void 0 : p.join("-")) || u,
858
858
  class: se([`col-span-12 lg:col-span-${d.col || 12}`, "flex flex-col gap-[10px]"])
859
859
  }, [
860
- (p = d.widgets) != null && p.length ? (h(!0), x(U, { key: 0 }, Z(d.widgets, (v) => (h(), E(o, {
861
- key: v,
860
+ (v = d.widgets) != null && v.length ? (h(!0), x(U, { key: 0 }, Z(d.widgets, (b) => (h(), N(o, {
861
+ key: b,
862
862
  dashboard: t.id,
863
- widget: v,
863
+ widget: b,
864
864
  "dashboard-widgets": r.dashboardData.widgets,
865
- "filter-u-rl": r.filterURl
866
- }, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl"]))), 128)) : (h(), E(o, {
865
+ "filter-u-rl": r.filterURl,
866
+ height: d.height
867
+ }, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl", "height"]))), 128)) : (h(), N(o, {
867
868
  key: 1,
868
869
  class: "flex flex-col",
869
870
  dashboard: t.id,
870
871
  widget: d.widget,
871
872
  "dashboard-widgets": r.dashboardData.widgets,
873
+ height: d.height,
872
874
  "filter-u-rl": r.filterURl
873
- }, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl"]))
875
+ }, null, 8, ["dashboard", "widget", "dashboard-widgets", "height", "filter-u-rl"]))
874
876
  ], 2);
875
877
  }), 128))
876
878
  ])
@@ -901,7 +903,7 @@ const Sa = {
901
903
  },
902
904
  emits: ["close", "update:visible"],
903
905
  setup(s, { emit: e }) {
904
- const t = s, a = e, r = q(() => t.size === "small" ? "md:max-w-[40%] w-full max-w-md" : t.size === "lg" ? "md:max-w-[70%] w-full max-w-4xl" : "md:max-w-[50%] w-full max-w-lg");
906
+ const t = s, a = e, r = A(() => t.size === "small" ? "md:max-w-[40%] w-full max-w-md" : t.size === "lg" ? "md:max-w-[70%] w-full max-w-4xl" : "md:max-w-[50%] w-full max-w-lg");
905
907
  function i() {
906
908
  a("update:visible", !1), a("close");
907
909
  }
@@ -912,14 +914,14 @@ const Sa = {
912
914
  window.addEventListener("keydown", n);
913
915
  }), Ue(() => {
914
916
  window.removeEventListener("keydown", n);
915
- }), (o, l) => (h(), E(gs, { to: s.teleport }, [
917
+ }), (o, l) => (h(), N(gs, { to: s.teleport }, [
916
918
  s.visible ? (h(), x("div", Sa, [
917
919
  c("div", {
918
920
  class: "absolute inset-0 bg-black/50",
919
921
  "aria-hidden": "true",
920
922
  onMousedown: l[0] || (l[0] = (d) => s.closeClickBack && d.target === d.currentTarget && i())
921
923
  }, null, 32),
922
- T(ms, {
924
+ I(ms, {
923
925
  name: "vs-modal",
924
926
  appear: ""
925
927
  }, {
@@ -961,18 +963,18 @@ const Sa = {
961
963
  ]),
962
964
  o.$slots.footer ? (h(), x("div", Wa, [
963
965
  Rt(o.$slots, "footer", {}, void 0, !0)
964
- ])) : A("", !0)
965
- ], 34)) : A("", !0)
966
+ ])) : F("", !0)
967
+ ], 34)) : F("", !0)
966
968
  ]),
967
969
  _: 3
968
970
  })
969
- ])) : A("", !0)
971
+ ])) : F("", !0)
970
972
  ], 8, ["to"]));
971
973
  }
972
974
  }, Ve = /* @__PURE__ */ Q(Na, [["__scopeId", "data-v-5722a50f"]]), Ea = {
973
975
  __name: "icon-plus",
974
976
  setup(s) {
975
- return (e, t) => (h(), E(N(Xt), he(e.$attrs, { size: 24 }), null, 16));
977
+ return (e, t) => (h(), N(E(Xt), he(e.$attrs, { size: 24 }), null, 16));
976
978
  }
977
979
  }, ja = { class: "mb-4 overflow-auto scrollbar max-h-96" }, Ba = {
978
980
  __name: "vs-editor-create-widget",
@@ -987,8 +989,8 @@ const Sa = {
987
989
  },
988
990
  emits: ["update-data"],
989
991
  setup(s, { expose: e, emit: t }) {
990
- var b;
991
- const a = M(() => import("@opengis/form")), r = (b = me().proxy) == null ? void 0 : b.$notify, i = t, n = s, o = I(!1), l = I({}), d = I();
992
+ var g;
993
+ const a = M(() => import("@opengis/form")), r = (g = me().proxy) == null ? void 0 : g.$notify, i = t, n = s, o = T(!1), l = T({}), d = T();
992
994
  function u() {
993
995
  o.value = !0;
994
996
  }
@@ -999,8 +1001,8 @@ const Sa = {
999
1001
  const v = async () => {
1000
1002
  var k;
1001
1003
  try {
1002
- const D = (k = d.value) == null ? void 0 : k.doValidation;
1003
- typeof D == "function" && await D(), await H.post(
1004
+ const C = (k = d.value) == null ? void 0 : k.doValidation;
1005
+ typeof C == "function" && await C(), await H.post(
1004
1006
  `/bi-dashboard/${n.selectedDashboard}`,
1005
1007
  l.value
1006
1008
  ), await r({
@@ -1008,16 +1010,16 @@ const Sa = {
1008
1010
  title: "Успішно!",
1009
1011
  message: "Віджет успішно створено"
1010
1012
  }), await i("update-data"), l.value = {}, o.value = !1;
1011
- } catch (D) {
1012
- const V = (D == null ? void 0 : D.message) || "При спробі створити віджет сталася помилка. Перевірте обов'язкові поля (зокрема Type).";
1013
+ } catch (C) {
1014
+ const S = (C == null ? void 0 : C.message) || "При спробі створити віджет сталася помилка. Перевірте обов'язкові поля (зокрема Type).";
1013
1015
  r == null || r({
1014
1016
  type: "error",
1015
1017
  title: "Помилка!",
1016
- message: V
1018
+ message: S
1017
1019
  });
1018
1020
  }
1019
- }, m = q(() => {
1020
- var k, D, V, y;
1021
+ }, b = A(() => {
1022
+ var k, C, S, y;
1021
1023
  return {
1022
1024
  title: {
1023
1025
  type: "text",
@@ -1031,11 +1033,11 @@ const Sa = {
1031
1033
  view: "buttons",
1032
1034
  style: { size: "xs" },
1033
1035
  validators: ["required"],
1034
- options: (D = (k = n.columns) == null ? void 0 : k.filter(
1035
- (f) => (f == null ? void 0 : f.type) == "text" || (f == null ? void 0 : f.type) === "date" || (f == null ? void 0 : f.type) === "timestamp without time zone" || (f == null ? void 0 : f.type) === "boolean" || (f == null ? void 0 : f.type) === "integer"
1036
- )) == null ? void 0 : D.map(({ name: f, type: w }) => ({
1037
- id: f,
1038
- text: f,
1036
+ options: (C = (k = n.columns) == null ? void 0 : k.filter(
1037
+ (m) => (m == null ? void 0 : m.type) == "text" || (m == null ? void 0 : m.type) === "date" || (m == null ? void 0 : m.type) === "timestamp without time zone" || (m == null ? void 0 : m.type) === "boolean" || (m == null ? void 0 : m.type) === "integer"
1038
+ )) == null ? void 0 : C.map(({ name: m, type: w }) => ({
1039
+ id: m,
1040
+ text: m,
1039
1041
  type: w
1040
1042
  }))
1041
1043
  },
@@ -1047,9 +1049,9 @@ const Sa = {
1047
1049
  style: { size: "xs" },
1048
1050
  options: [
1049
1051
  { id: "count", label: "count" },
1050
- ...(y = (V = n.columns) == null ? void 0 : V.filter((f) => (f == null ? void 0 : f.type) === "numeric" || (f == null ? void 0 : f.type) === "double precision")) == null ? void 0 : y.map(({ name: f, type: w }) => ({
1051
- id: f,
1052
- text: f,
1052
+ ...(y = (S = n.columns) == null ? void 0 : S.filter((m) => (m == null ? void 0 : m.type) === "numeric" || (m == null ? void 0 : m.type) === "double precision")) == null ? void 0 : y.map(({ name: m, type: w }) => ({
1053
+ id: m,
1054
+ text: m,
1053
1055
  type: w
1054
1056
  }))
1055
1057
  ]
@@ -1156,10 +1158,10 @@ const Sa = {
1156
1158
  }
1157
1159
  };
1158
1160
  });
1159
- return (k, D) => {
1160
- const V = K("VsPopover");
1161
+ return (k, C) => {
1162
+ const S = K("VsPopover");
1161
1163
  return h(), x("div", null, [
1162
- s.inline ? A("", !0) : (h(), E(V, {
1164
+ s.inline ? F("", !0) : (h(), N(S, {
1163
1165
  key: 0,
1164
1166
  placement: "right",
1165
1167
  trigger: "hover"
@@ -1170,7 +1172,7 @@ const Sa = {
1170
1172
  class: "z-50 flex items-center justify-center h-[50px] !w-[50px] text-2xl text-white transition-colors bg-blue-500 rounded-full cursor-pointer hover:bg-blue-700",
1171
1173
  onClick: u
1172
1174
  }, [
1173
- T(Ea, {
1175
+ I(Ea, {
1174
1176
  height: "20",
1175
1177
  width: "20"
1176
1178
  })
@@ -1178,11 +1180,11 @@ const Sa = {
1178
1180
  ])
1179
1181
  ]),
1180
1182
  default: j(() => [
1181
- D[1] || (D[1] = X(" Створити віджет ", -1))
1183
+ C[1] || (C[1] = X(" Створити віджет ", -1))
1182
1184
  ]),
1183
1185
  _: 1
1184
1186
  })),
1185
- T(Ve, {
1187
+ I(Ve, {
1186
1188
  teleport: "#modal",
1187
1189
  visible: o.value,
1188
1190
  title: "Створити віджет",
@@ -1203,12 +1205,12 @@ const Sa = {
1203
1205
  ]),
1204
1206
  default: j(() => [
1205
1207
  c("div", ja, [
1206
- T(N(a), {
1208
+ I(E(a), {
1207
1209
  ref_key: "form",
1208
1210
  ref: d,
1209
- schema: m.value,
1211
+ schema: b.value,
1210
1212
  values: l.value,
1211
- "onUpdate:values": D[0] || (D[0] = (y) => l.value = y)
1213
+ "onUpdate:values": C[0] || (C[0] = (y) => l.value = y)
1212
1214
  }, null, 8, ["schema", "values"])
1213
1215
  ])
1214
1216
  ]),
@@ -1220,12 +1222,12 @@ const Sa = {
1220
1222
  }, Kt = {
1221
1223
  __name: "delete",
1222
1224
  setup(s) {
1223
- return (e, t) => (h(), E(N(js), he(e.$attrs, { size: 24 }), null, 16));
1225
+ return (e, t) => (h(), N(E(js), he(e.$attrs, { size: 24 }), null, 16));
1224
1226
  }
1225
1227
  }, es = {
1226
1228
  __name: "edit",
1227
1229
  setup(s) {
1228
- return (e, t) => (h(), E(N(Ws), he(e.$attrs, { size: 24 }), null, 16));
1230
+ return (e, t) => (h(), N(E(Ws), he(e.$attrs, { size: 24 }), null, 16));
1229
1231
  }
1230
1232
  }, Oa = { class: "space-y-4" }, Pa = {
1231
1233
  __name: "vs-editor-form-style",
@@ -1237,47 +1239,14 @@ const Sa = {
1237
1239
  },
1238
1240
  emits: ["update-dashboard"],
1239
1241
  setup(s, { expose: e, emit: t }) {
1240
- var $, _, g, C;
1241
- const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = I(null), l = q(() => n.dashboardId || o.value), d = (($ = n.data) == null ? void 0 : $.type) || ((g = (_ = n.data) == null ? void 0 : _.data) == null ? void 0 : g.type), p = {
1242
+ var w, _, $, f;
1243
+ const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = T(null), l = A(() => n.dashboardId || o.value), d = ((w = n.data) == null ? void 0 : w.type) || (($ = (_ = n.data) == null ? void 0 : _.data) == null ? void 0 : $.type), p = {
1242
1244
  pie: { label: !1, legend: !0, tooltip: !0 },
1243
1245
  donut: { label: !1, legend: !0, tooltip: !0 },
1244
1246
  bar: { label: !1, legend: !1, tooltip: !0 },
1245
1247
  line: { label: !1, legend: !1, tooltip: !0 },
1246
1248
  funnel: { label: !1, legend: !1, tooltip: !0 }
1247
1249
  }[d] || { label: !1, legend: !1, tooltip: !0 }, v = {
1248
- show: {
1249
- label: "Підпис",
1250
- type: "switcher",
1251
- title: "Показати підпис"
1252
- },
1253
- rotate: {
1254
- type: "number",
1255
- label: "Rotate angel",
1256
- conditions: ["show", "==", !0]
1257
- },
1258
- align: {
1259
- type: "select",
1260
- view: "buttons",
1261
- label: "Align",
1262
- conditions: ["show", "==", !0],
1263
- options: [
1264
- { id: "center", text: "Center" },
1265
- { id: "left", text: "Left" },
1266
- { id: "right", text: "Right" }
1267
- ]
1268
- },
1269
- position: {
1270
- type: "select",
1271
- label: "Position",
1272
- conditions: ["show", "==", !0],
1273
- options: [
1274
- { id: "top", text: "Top" },
1275
- { id: "right", text: "Right" },
1276
- { id: "left", text: "Left" },
1277
- { id: "bottom", text: "Bottom" }
1278
- ]
1279
- }
1280
- }, m = {
1281
1250
  show: {
1282
1251
  label: "Легенда",
1283
1252
  type: "switcher",
@@ -1289,42 +1258,42 @@ const Sa = {
1289
1258
  type: "switcher",
1290
1259
  title: "Показати тултіп"
1291
1260
  }
1292
- }, k = (C = n.data) == null ? void 0 : C.style, D = I(
1293
- k != null && k.label ? { ...k.label } : { show: p.label }
1294
- ), V = I(
1295
- k != null && k.legend ? { ...k.legend } : { show: p.legend }
1296
- ), y = I(
1297
- k != null && k.tooltip ? { ...k.tooltip } : { show: p.tooltip }
1298
- ), f = () => {
1299
- const z = new CustomEvent(`update-style-${n.widgetName}`);
1300
- z.chartId = n.widgetName, z.options = {
1261
+ }, g = (f = n.data) == null ? void 0 : f.style, k = T(
1262
+ g != null && g.label ? { ...g.label } : { show: p.label }
1263
+ ), C = T(
1264
+ g != null && g.legend ? { ...g.legend } : { show: p.legend }
1265
+ ), S = T(
1266
+ g != null && g.tooltip ? { ...g.tooltip } : { show: p.tooltip }
1267
+ ), y = () => {
1268
+ const D = new CustomEvent(`update-style-${n.widgetName}`);
1269
+ D.chartId = n.widgetName, D.options = {
1301
1270
  options: {
1302
- legend: V.value,
1303
- tooltip: y.value,
1304
- label: D.value
1271
+ legend: C.value,
1272
+ tooltip: S.value,
1273
+ label: k.value
1305
1274
  },
1306
- seriesOptions: D.value
1307
- }, window.dispatchEvent(z);
1275
+ seriesOptions: k.value
1276
+ }, window.dispatchEvent(D);
1308
1277
  };
1309
- ae(D, f, { deep: !0 }), ae(V, f, { deep: !0 }), ae(y, f, { deep: !0 });
1310
- const w = async () => {
1278
+ ae(k, y, { deep: !0 }), ae(C, y, { deep: !0 }), ae(S, y, { deep: !0 });
1279
+ const m = async () => {
1311
1280
  try {
1312
1281
  await H.put(`/bi-dashboard/${l.value}/${n.widgetName}`, {
1313
1282
  style: {
1314
- legend: V.value,
1315
- tooltip: y.value,
1316
- label: D.value
1283
+ legend: C.value,
1284
+ tooltip: S.value,
1285
+ label: k.value
1317
1286
  }
1318
1287
  });
1319
- const z = new CustomEvent(`update-style-${n.widgetName}`);
1320
- z.chartId = n.widgetName, z.options = {
1288
+ const D = new CustomEvent(`update-style-${n.widgetName}`);
1289
+ D.chartId = n.widgetName, D.options = {
1321
1290
  options: {
1322
- legend: V.value,
1323
- tooltip: y.value,
1324
- label: D.value
1291
+ legend: C.value,
1292
+ tooltip: S.value,
1293
+ label: k.value
1325
1294
  },
1326
- seriesOptions: D.value
1327
- }, window.dispatchEvent(z), i("update-dashboard"), r({
1295
+ seriesOptions: k.value
1296
+ }, window.dispatchEvent(D), i("update-dashboard"), r({
1328
1297
  type: "success",
1329
1298
  title: "Успішно!",
1330
1299
  message: "Дані успішно оновлено"
@@ -1338,25 +1307,19 @@ const Sa = {
1338
1307
  }
1339
1308
  };
1340
1309
  return le(() => {
1341
- const z = new URLSearchParams(window.top.location.search);
1342
- o.value = z.get("dashboard"), f();
1343
- }), e({ requestUpdateWidget: w }), (z, R) => (h(), x("div", Oa, [
1344
- T(N(a), {
1310
+ const D = new URLSearchParams(window.top.location.search);
1311
+ o.value = D.get("dashboard"), y();
1312
+ }), e({ requestUpdateWidget: m }), (D, z) => (h(), x("div", Oa, [
1313
+ I(E(a), {
1345
1314
  schema: v,
1346
- values: D.value,
1347
- "onUpdate:values": R[0] || (R[0] = (F) => D.value = F),
1315
+ values: C.value,
1316
+ "onUpdate:values": z[0] || (z[0] = (V) => C.value = V),
1348
1317
  class: "p-0"
1349
1318
  }, null, 8, ["values"]),
1350
- T(N(a), {
1351
- schema: m,
1352
- values: V.value,
1353
- "onUpdate:values": R[1] || (R[1] = (F) => V.value = F),
1354
- class: "p-0"
1355
- }, null, 8, ["values"]),
1356
- T(N(a), {
1319
+ I(E(a), {
1357
1320
  schema: b,
1358
- values: y.value,
1359
- "onUpdate:values": R[2] || (R[2] = (F) => y.value = F),
1321
+ values: S.value,
1322
+ "onUpdate:values": z[1] || (z[1] = (V) => S.value = V),
1360
1323
  class: "p-0"
1361
1324
  }, null, 8, ["values"])
1362
1325
  ]));
@@ -1590,20 +1553,20 @@ ${p}` : p;
1590
1553
  const v = this.lexer.state.top;
1591
1554
  if (this.lexer.state.top = !0, this.lexer.blockTokens(p, n, !0), this.lexer.state.top = v, a.length === 0)
1592
1555
  break;
1593
- const m = n[n.length - 1];
1594
- if ((m == null ? void 0 : m.type) === "code")
1556
+ const b = n[n.length - 1];
1557
+ if ((b == null ? void 0 : b.type) === "code")
1595
1558
  break;
1596
- if ((m == null ? void 0 : m.type) === "blockquote") {
1597
- const b = m, k = b.raw + `
1559
+ if ((b == null ? void 0 : b.type) === "blockquote") {
1560
+ const g = b, k = g.raw + `
1598
1561
  ` + a.join(`
1599
- `), D = this.blockquote(k);
1600
- n[n.length - 1] = D, r = r.substring(0, r.length - b.raw.length) + D.raw, i = i.substring(0, i.length - b.text.length) + D.text;
1562
+ `), C = this.blockquote(k);
1563
+ n[n.length - 1] = C, r = r.substring(0, r.length - g.raw.length) + C.raw, i = i.substring(0, i.length - g.text.length) + C.text;
1601
1564
  break;
1602
- } else if ((m == null ? void 0 : m.type) === "list") {
1603
- const b = m, k = b.raw + `
1565
+ } else if ((b == null ? void 0 : b.type) === "list") {
1566
+ const g = b, k = g.raw + `
1604
1567
  ` + a.join(`
1605
- `), D = this.list(k);
1606
- n[n.length - 1] = D, r = r.substring(0, r.length - m.raw.length) + D.raw, i = i.substring(0, i.length - b.raw.length) + D.raw, a = k.substring(n[n.length - 1].raw.length).split(`
1568
+ `), C = this.list(k);
1569
+ n[n.length - 1] = C, r = r.substring(0, r.length - b.raw.length) + C.raw, i = i.substring(0, i.length - g.raw.length) + C.raw, a = k.substring(n[n.length - 1].raw.length).split(`
1607
1570
  `);
1608
1571
  continue;
1609
1572
  }
@@ -1637,37 +1600,37 @@ ${p}` : p;
1637
1600
  break;
1638
1601
  d = t[0], e = e.substring(d.length);
1639
1602
  let p = t[2].split(`
1640
- `, 1)[0].replace(/^\t+/, (V) => " ".repeat(3 * V.length)), v = e.split(`
1641
- `, 1)[0], m = !p.trim(), b = 0;
1642
- if (this.options.pedantic ? (b = 2, u = p.trimStart()) : m ? b = t[1].length + 1 : (b = t[2].search(/[^ ]/), b = b > 4 ? 1 : b, u = p.slice(b), b += t[1].length), m && /^[ \t]*$/.test(v) && (d += v + `
1603
+ `, 1)[0].replace(/^\t+/, (S) => " ".repeat(3 * S.length)), v = e.split(`
1604
+ `, 1)[0], b = !p.trim(), g = 0;
1605
+ if (this.options.pedantic ? (g = 2, u = p.trimStart()) : b ? g = t[1].length + 1 : (g = t[2].search(/[^ ]/), g = g > 4 ? 1 : g, u = p.slice(g), g += t[1].length), b && /^[ \t]*$/.test(v) && (d += v + `
1643
1606
  `, e = e.substring(v.length + 1), l = !0), !l) {
1644
- const V = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), y = new RegExp(`^ {0,${Math.min(3, b - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), f = new RegExp(`^ {0,${Math.min(3, b - 1)}}(?:\`\`\`|~~~)`), w = new RegExp(`^ {0,${Math.min(3, b - 1)}}#`), $ = new RegExp(`^ {0,${Math.min(3, b - 1)}}<(?:[a-z].*>|!--)`, "i");
1607
+ const S = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), y = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), m = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), w = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`), _ = new RegExp(`^ {0,${Math.min(3, g - 1)}}<(?:[a-z].*>|!--)`, "i");
1645
1608
  for (; e; ) {
1646
- const _ = e.split(`
1609
+ const $ = e.split(`
1647
1610
  `, 1)[0];
1648
- let g;
1649
- if (v = _, this.options.pedantic ? (v = v.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), g = v) : g = v.replace(/\t/g, " "), f.test(v) || w.test(v) || $.test(v) || V.test(v) || y.test(v))
1611
+ let f;
1612
+ if (v = $, this.options.pedantic ? (v = v.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), f = v) : f = v.replace(/\t/g, " "), m.test(v) || w.test(v) || _.test(v) || S.test(v) || y.test(v))
1650
1613
  break;
1651
- if (g.search(/[^ ]/) >= b || !v.trim())
1614
+ if (f.search(/[^ ]/) >= g || !v.trim())
1652
1615
  u += `
1653
- ` + g.slice(b);
1616
+ ` + f.slice(g);
1654
1617
  else {
1655
- if (m || p.replace(/\t/g, " ").search(/[^ ]/) >= 4 || f.test(p) || w.test(p) || y.test(p))
1618
+ if (b || p.replace(/\t/g, " ").search(/[^ ]/) >= 4 || m.test(p) || w.test(p) || y.test(p))
1656
1619
  break;
1657
1620
  u += `
1658
1621
  ` + v;
1659
1622
  }
1660
- !m && !v.trim() && (m = !0), d += _ + `
1661
- `, e = e.substring(_.length + 1), p = g.slice(b);
1623
+ !b && !v.trim() && (b = !0), d += $ + `
1624
+ `, e = e.substring($.length + 1), p = f.slice(g);
1662
1625
  }
1663
1626
  }
1664
1627
  i.loose || (o ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(d) && (o = !0));
1665
- let k = null, D;
1666
- this.options.gfm && (k = /^\[[ xX]\] /.exec(u), k && (D = k[0] !== "[ ] ", u = u.replace(/^\[[ xX]\] +/, ""))), i.items.push({
1628
+ let k = null, C;
1629
+ this.options.gfm && (k = /^\[[ xX]\] /.exec(u), k && (C = k[0] !== "[ ] ", u = u.replace(/^\[[ xX]\] +/, ""))), i.items.push({
1667
1630
  type: "list_item",
1668
1631
  raw: d,
1669
1632
  task: !!k,
1670
- checked: D,
1633
+ checked: C,
1671
1634
  loose: !1,
1672
1635
  text: u,
1673
1636
  tokens: []
@@ -1861,22 +1824,22 @@ ${p}` : p;
1861
1824
  if (d -= l, d > 0)
1862
1825
  continue;
1863
1826
  l = Math.min(l, l + d + u);
1864
- const v = [...r[0]][0].length, m = e.slice(0, n + r.index + v + l);
1827
+ const v = [...r[0]][0].length, b = e.slice(0, n + r.index + v + l);
1865
1828
  if (Math.min(n, l) % 2) {
1866
- const k = m.slice(1, -1);
1829
+ const k = b.slice(1, -1);
1867
1830
  return {
1868
1831
  type: "em",
1869
- raw: m,
1832
+ raw: b,
1870
1833
  text: k,
1871
1834
  tokens: this.lexer.inlineTokens(k)
1872
1835
  };
1873
1836
  }
1874
- const b = m.slice(2, -2);
1837
+ const g = b.slice(2, -2);
1875
1838
  return {
1876
1839
  type: "strong",
1877
- raw: m,
1878
- text: b,
1879
- tokens: this.lexer.inlineTokens(b)
1840
+ raw: b,
1841
+ text: g,
1842
+ tokens: this.lexer.inlineTokens(g)
1880
1843
  };
1881
1844
  }
1882
1845
  }
@@ -2248,8 +2211,8 @@ class re {
2248
2211
  let u = 1 / 0;
2249
2212
  const p = e.slice(1);
2250
2213
  let v;
2251
- this.options.extensions.startInline.forEach((m) => {
2252
- v = m.call({ lexer: this }, p), typeof v == "number" && v >= 0 && (u = Math.min(u, v));
2214
+ this.options.extensions.startInline.forEach((b) => {
2215
+ v = b.call({ lexer: this }, p), typeof v == "number" && v >= 0 && (u = Math.min(u, v));
2253
2216
  }), u < 1 / 0 && u >= 0 && (i = e.substring(0, u + 1));
2254
2217
  }
2255
2218
  if (a = this.tokenizer.inlineText(i)) {
@@ -2851,30 +2814,30 @@ const wr = { class: "space-y-4" }, vr = {
2851
2814
  },
2852
2815
  emits: ["update-dashboard"],
2853
2816
  setup(s, { expose: e, emit: t }) {
2854
- var $, _, g, C, z, R, F, Y, ie, ce, ve, ke, $e, _e, De, G, ue, Ce, ct, ut, ht, pt, ft, gt, mt, bt, xt, yt, wt, vt, kt, $t, _t, Dt, Ct, zt, Tt, It;
2855
- const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = typeof window < "u" ? new URLSearchParams(window.top.location.search) : null, l = I((o == null ? void 0 : o.get("dashboard")) || null), d = I([]), u = q(() => {
2856
- const S = n.columns ?? [];
2857
- return S.length ? S : d.value;
2858
- }), p = q(() => n.dashboardId || l.value);
2817
+ var _, $, f, D, z, V, q, Y, ie, ce, ve, ke, $e, _e, De, G, ue, Ce, ct, ut, ht, pt, ft, gt, mt, bt, xt, yt, wt, vt, kt, $t, _t, Dt, Ct, zt, Tt, It;
2818
+ const a = M(() => import("@opengis/form")), { $notify: r } = me().proxy, i = t, n = s, o = typeof window < "u" ? new URLSearchParams(window.top.location.search) : null, l = T((o == null ? void 0 : o.get("dashboard")) || null), d = T([]), u = A(() => {
2819
+ const R = n.columns ?? [];
2820
+ return R.length ? R : d.value;
2821
+ }), p = A(() => n.dashboardId || l.value);
2859
2822
  async function v() {
2860
2823
  if (n.columns !== null) return;
2861
- const S = p.value;
2862
- if (!(u.value.length || !S || !n.widgetName))
2824
+ const R = p.value;
2825
+ if (!(u.value.length || !R || !n.widgetName))
2863
2826
  try {
2864
- const L = await H.get(`/bi-data?dashboard=${S}&widget=${n.widgetName}`);
2827
+ const L = await H.get(`/bi-data?dashboard=${R}&widget=${n.widgetName}`);
2865
2828
  Array.isArray(L == null ? void 0 : L.columns) && L.columns.length && (d.value = L.columns);
2866
2829
  } catch {
2867
2830
  }
2868
2831
  }
2869
- const m = (S) => (S == null ? void 0 : S.name) != null ? { id: S.name, text: S.title || S.name } : null, b = (S) => Array.isArray(S) ? [...S].sort((L, oe) => {
2832
+ const b = (R) => (R == null ? void 0 : R.name) != null ? { id: R.name, text: R.title || R.name } : null, g = (R) => Array.isArray(R) ? [...R].sort((L, oe) => {
2870
2833
  const xe = L.text && L.text !== L.id, St = oe.text && oe.text !== oe.id;
2871
2834
  return xe && !St ? -1 : !xe && St ? 1 : (L.text || "").localeCompare(oe.text || "", void 0, { sensitivity: "base" });
2872
- }) : S, k = q(() => {
2873
- const S = (u.value ?? []).filter(
2835
+ }) : R, k = A(() => {
2836
+ const R = (u.value ?? []).filter(
2874
2837
  (L) => (L == null ? void 0 : L.type) == "text" || (L == null ? void 0 : L.type) === "date" || (L == null ? void 0 : L.type) === "timestamp without time zone" || (L == null ? void 0 : L.type) === "boolean" || (L == null ? void 0 : L.type) === "integer"
2875
- ).map(m).filter(Boolean);
2876
- return b(S);
2877
- }), D = q(() => `${n.widgetName}-${k.value.length}-${(u.value ?? []).length}`), V = q(() => ({
2838
+ ).map(b).filter(Boolean);
2839
+ return g(R);
2840
+ }), C = A(() => `${n.widgetName}-${k.value.length}-${(u.value ?? []).length}`), S = A(() => ({
2878
2841
  text: {
2879
2842
  type: "Text",
2880
2843
  label: "Текст",
@@ -2919,8 +2882,8 @@ const wr = { class: "space-y-4" }, vr = {
2919
2882
  ],
2920
2883
  options: [
2921
2884
  { id: "count", text: "count" },
2922
- ...b(
2923
- u.value.filter((S) => (S == null ? void 0 : S.type) === "numeric" || (S == null ? void 0 : S.type) === "double precision").map(m).filter(Boolean)
2885
+ ...g(
2886
+ u.value.filter((R) => (R == null ? void 0 : R.type) === "numeric" || (R == null ? void 0 : R.type) === "double precision").map(b).filter(Boolean)
2924
2887
  )
2925
2888
  ]
2926
2889
  },
@@ -2941,10 +2904,10 @@ const wr = { class: "space-y-4" }, vr = {
2941
2904
  style: { size: "xs" },
2942
2905
  options: [
2943
2906
  { id: "null", text: "null" },
2944
- ...b(
2907
+ ...g(
2945
2908
  u.value.filter(
2946
- (S) => (S == null ? void 0 : S.type) == "text" || (S == null ? void 0 : S.type) === "boolean" || (S == null ? void 0 : S.type) === "integer"
2947
- ).map(m).filter(Boolean)
2909
+ (R) => (R == null ? void 0 : R.type) == "text" || (R == null ? void 0 : R.type) === "boolean" || (R == null ? void 0 : R.type) === "integer"
2910
+ ).map(b).filter(Boolean)
2948
2911
  )
2949
2912
  ],
2950
2913
  conditions: ["type", "==", "bar"]
@@ -2953,8 +2916,8 @@ const wr = { class: "space-y-4" }, vr = {
2953
2916
  type: "checkbox",
2954
2917
  label: "Колонки",
2955
2918
  style: { size: "xs" },
2956
- options: b(
2957
- (u.value ?? []).map(m).filter(Boolean)
2919
+ options: g(
2920
+ (u.value ?? []).map(b).filter(Boolean)
2958
2921
  ),
2959
2922
  conditions: ["type", "in", ["table", "map"]]
2960
2923
  },
@@ -2973,10 +2936,10 @@ const wr = { class: "space-y-4" }, vr = {
2973
2936
  type: "Text",
2974
2937
  hidden: !0
2975
2938
  }
2976
- })), y = I({
2977
- x: ((_ = ($ = n.data) == null ? void 0 : $.data) == null ? void 0 : _.x) || ((g = n.data) == null ? void 0 : g.x) || null,
2978
- metric: ((z = (C = n.data) == null ? void 0 : C.data) == null ? void 0 : z.metric) || ((R = n.data) == null ? void 0 : R.metric) || null,
2979
- columns: ((Y = (F = n.data) == null ? void 0 : F.data) == null ? void 0 : Y.columns) || ((ie = n.data) == null ? void 0 : ie.columns) || null,
2939
+ })), y = T({
2940
+ x: (($ = (_ = n.data) == null ? void 0 : _.data) == null ? void 0 : $.x) || ((f = n.data) == null ? void 0 : f.x) || null,
2941
+ metric: ((z = (D = n.data) == null ? void 0 : D.data) == null ? void 0 : z.metric) || ((V = n.data) == null ? void 0 : V.metric) || null,
2942
+ columns: ((Y = (q = n.data) == null ? void 0 : q.data) == null ? void 0 : Y.columns) || ((ie = n.data) == null ? void 0 : ie.columns) || null,
2980
2943
  granularity: ((ve = (ce = n.data) == null ? void 0 : ce.data) == null ? void 0 : ve.granularity) || ((ke = n.data) == null ? void 0 : ke.granularity) || null,
2981
2944
  type: ((_e = ($e = n.data) == null ? void 0 : $e.data) == null ? void 0 : _e.type) || ((De = n.data) == null ? void 0 : De.type) || null,
2982
2945
  groupby: ((ue = (G = n.data) == null ? void 0 : G.data) == null ? void 0 : ue.groupby) || n.data.groupby || null,
@@ -2987,17 +2950,17 @@ const wr = { class: "space-y-4" }, vr = {
2987
2950
  cls: ((kt = (vt = n.data) == null ? void 0 : vt.data) == null ? void 0 : kt.cls) || (($t = n.data) == null ? void 0 : $t.cls) || null,
2988
2951
  text: ((Dt = (_t = n.data) == null ? void 0 : _t.data) == null ? void 0 : Dt.text) || ((Ct = n.data) == null ? void 0 : Ct.text) || null,
2989
2952
  table: ((Tt = (zt = n.data) == null ? void 0 : zt.data) == null ? void 0 : Tt.table) || ((It = n.data) == null ? void 0 : It.table) || null
2990
- }), f = async () => {
2953
+ }), m = async () => {
2991
2954
  try {
2992
2955
  await H.put(`/bi-dashboard/${p.value}/${n.widgetName}`, {
2993
2956
  data: y.value
2994
2957
  });
2995
- let S = `/bi-data?dashboard=${p.value}&widget=${n.widgetName}`;
2958
+ let R = `/bi-data?dashboard=${p.value}&widget=${n.widgetName}`;
2996
2959
  Object.entries(y.value).forEach(([oe, xe]) => {
2997
- S += `&${oe}=${xe}`;
2960
+ R += `&${oe}=${xe}`;
2998
2961
  });
2999
2962
  const L = new CustomEvent(`update-data-${n.widgetName}`);
3000
- L.filterUrl = S, window.dispatchEvent(L), i("update-dashboard"), r({
2963
+ L.filterUrl = R, window.dispatchEvent(L), i("update-dashboard"), r({
3001
2964
  type: "success",
3002
2965
  title: "Успішно!",
3003
2966
  message: "Дані успішно оновлено"
@@ -3011,12 +2974,12 @@ const wr = { class: "space-y-4" }, vr = {
3011
2974
  }
3012
2975
  }, w = async () => {
3013
2976
  try {
3014
- let S = `/bi-data?dashboard=${p.value}&widget=${n.widgetName}`;
2977
+ let R = `/bi-data?dashboard=${p.value}&widget=${n.widgetName}`;
3015
2978
  Object.entries(y.value).forEach(([oe, xe]) => {
3016
- S += `&${oe}=${xe}`;
2979
+ R += `&${oe}=${xe}`;
3017
2980
  });
3018
2981
  const L = new CustomEvent(`update-data-${n.widgetName}`);
3019
- L.filterUrl = S, window.dispatchEvent(L), i("update-dashboard");
2982
+ L.filterUrl = R, window.dispatchEvent(L), i("update-dashboard");
3020
2983
  } catch {
3021
2984
  await r({
3022
2985
  type: "error",
@@ -3033,10 +2996,10 @@ const wr = { class: "space-y-4" }, vr = {
3033
2996
  d.value = [], v();
3034
2997
  },
3035
2998
  { immediate: !0 }
3036
- ), e({ requestUpdateWidget: f }), (S, L) => (h(), x("div", wr, [
3037
- (h(), E(N(a), {
3038
- key: D.value,
3039
- schema: V.value,
2999
+ ), e({ requestUpdateWidget: m }), (R, L) => (h(), x("div", wr, [
3000
+ (h(), N(E(a), {
3001
+ key: C.value,
3002
+ schema: S.value,
3040
3003
  values: y.value,
3041
3004
  "onUpdate:values": L[0] || (L[0] = (oe) => y.value = oe)
3042
3005
  }, null, 8, ["schema", "values"]))
@@ -3047,55 +3010,56 @@ const wr = { class: "space-y-4" }, vr = {
3047
3010
  props: {
3048
3011
  yamlValue: { type: null, default: () => "" },
3049
3012
  widgetName: { type: String },
3013
+ dashboardId: { type: String, default: "" },
3050
3014
  data: { type: Object }
3051
3015
  },
3052
3016
  emits: ["update-dashboard"],
3053
3017
  setup(s, { expose: e, emit: t }) {
3054
3018
  const a = typeof window < "u" ? window.echarts : null, r = M(
3055
- () => import("@opengis/form").then((m) => m.VsInputMonaco)
3056
- ), i = I(null), { $notify: n } = me().proxy, o = t, l = s, d = (m, { dimensions: b, source: k }) => {
3057
- const D = m.getOption(), { data: V, ...y } = (D == null ? void 0 : D.series)[0], [, ...f] = b || [], w = f.map(($, _) => ({
3058
- ...(D == null ? void 0 : D.series[_]) || {},
3059
- data: k.map((g) => g[_ + 1]),
3019
+ () => import("@opengis/form").then((g) => g.VsInputMonaco)
3020
+ ), i = T(null), n = A(() => d.dashboardId || i.value), { $notify: o } = me().proxy, l = t, d = s, u = (g, { dimensions: k, source: C }) => {
3021
+ const S = g.getOption(), { data: y, ...m } = (S == null ? void 0 : S.series)[0], [, ...w] = k || [], _ = w.map(($, f) => ({
3022
+ ...(S == null ? void 0 : S.series[f]) || {},
3023
+ data: C.map((D) => D[f + 1]),
3060
3024
  name: $
3061
3025
  }));
3062
- m == null || m.setOption(
3026
+ g == null || g.setOption(
3063
3027
  {
3064
- ...D || {},
3028
+ ...S || {},
3065
3029
  dataset: {
3066
- dimensions: b,
3067
- source: k
3030
+ dimensions: k,
3031
+ source: C
3068
3032
  },
3069
- series: w,
3033
+ series: _,
3070
3034
  xAxis: { type: "category" },
3071
3035
  yAxis: {}
3072
3036
  },
3073
3037
  !0
3074
3038
  );
3075
- }, u = (m) => {
3076
- const b = document.getElementById(m);
3077
- if (!b) return null;
3078
- const k = a == null ? void 0 : a.getInstanceByDom(b);
3079
- return k || null;
3080
- }, p = I(l.yamlValue), v = async () => {
3039
+ }, p = (g) => {
3040
+ const k = document.getElementById(g);
3041
+ if (!k) return null;
3042
+ const C = a == null ? void 0 : a.getInstanceByDom(k);
3043
+ return C || null;
3044
+ }, v = T(d.yamlValue), b = async () => {
3081
3045
  try {
3082
- await H.put(`/bi-dashboard/${i.value}/${l.widgetName}`, {
3083
- yml: p.value
3046
+ await H.put(`/bi-dashboard/${n.value}/${d.widgetName}`, {
3047
+ yml: v.value
3084
3048
  });
3085
- const m = u(l.widgetName);
3086
- if (m) {
3087
- const b = await H.get(
3088
- `/bi-data?dashboard=${i.value}&widget=${l.widgetName}`
3049
+ const g = p(d.widgetName);
3050
+ if (g) {
3051
+ const k = await H.get(
3052
+ `/bi-data?dashboard=${i.value}&widget=${d.widgetName}`
3089
3053
  );
3090
- d(m, b);
3054
+ u(g, k);
3091
3055
  }
3092
- o("update-dashboard"), n({
3056
+ l("update-dashboard"), o({
3093
3057
  type: "success",
3094
3058
  title: "Успішно!",
3095
3059
  message: "Дані успішно оновлено"
3096
3060
  });
3097
3061
  } catch {
3098
- n({
3062
+ o({
3099
3063
  type: "error",
3100
3064
  title: "Помилка!",
3101
3065
  message: "При спробі оновити данні сталася помилка"
@@ -3103,12 +3067,12 @@ const wr = { class: "space-y-4" }, vr = {
3103
3067
  }
3104
3068
  };
3105
3069
  return le(() => {
3106
- const m = new URLSearchParams(window.top.location.search);
3107
- i.value = m.get("dashboard");
3108
- }), e({ requestUpdateWidget: v }), (m, b) => (h(), x("div", kr, [
3109
- T(N(r), {
3110
- modelValue: p.value,
3111
- "onUpdate:modelValue": b[0] || (b[0] = (k) => p.value = k),
3070
+ const g = new URLSearchParams(window.top.location.search);
3071
+ i.value = g.get("dashboard");
3072
+ }), e({ requestUpdateWidget: b }), (g, k) => (h(), x("div", kr, [
3073
+ I(E(r), {
3074
+ modelValue: v.value,
3075
+ "onUpdate:modelValue": k[0] || (k[0] = (C) => v.value = C),
3112
3076
  syntax: "yaml",
3113
3077
  theme: "vs-light",
3114
3078
  height: 400,
@@ -3127,7 +3091,7 @@ const wr = { class: "space-y-4" }, vr = {
3127
3091
  emits: ["update-dashboard"],
3128
3092
  setup(s, { emit: e }) {
3129
3093
  var u;
3130
- const t = M(() => import("@opengis/form")), { $notify: a } = me().proxy, r = e, i = s, n = I(null), o = {
3094
+ const t = M(() => import("@opengis/form")), { $notify: a } = me().proxy, r = e, i = s, n = T(null), o = {
3131
3095
  granularity: {
3132
3096
  ua: "Granularity",
3133
3097
  type: "checkbox",
@@ -3142,7 +3106,7 @@ const wr = { class: "space-y-4" }, vr = {
3142
3106
  type: "checkbox",
3143
3107
  options: (u = i.columns) == null ? void 0 : u.map(({ name: p }) => p)
3144
3108
  }
3145
- }, l = I(i.controls || {}), d = async () => {
3109
+ }, l = T(i.controls || {}), d = async () => {
3146
3110
  try {
3147
3111
  await H.put(`/bi-dashboard/${n.value}/${i.widgetName}`, {
3148
3112
  controls: l.value
@@ -3163,9 +3127,9 @@ const wr = { class: "space-y-4" }, vr = {
3163
3127
  const p = new URLSearchParams(window.top.location.search);
3164
3128
  n.value = p.get("dashboard");
3165
3129
  }), (p, v) => {
3166
- const m = K("VsButton");
3130
+ const b = K("VsButton");
3167
3131
  return h(), x("div", _r, [
3168
- T(m, {
3132
+ I(b, {
3169
3133
  class: "ml-[10px] mb-[10px]",
3170
3134
  type: "plain",
3171
3135
  onClick: d
@@ -3175,10 +3139,10 @@ const wr = { class: "space-y-4" }, vr = {
3175
3139
  ])]),
3176
3140
  _: 1
3177
3141
  }),
3178
- T(N(t), {
3142
+ I(E(t), {
3179
3143
  schema: o,
3180
3144
  values: l.value,
3181
- "onUpdate:values": v[0] || (v[0] = (b) => l.value = b)
3145
+ "onUpdate:values": v[0] || (v[0] = (g) => l.value = g)
3182
3146
  }, null, 8, ["values"])
3183
3147
  ]);
3184
3148
  };
@@ -3199,20 +3163,20 @@ const wr = { class: "space-y-4" }, vr = {
3199
3163
  },
3200
3164
  emits: ["update-dashboard"],
3201
3165
  setup(s, { expose: e }) {
3202
- const t = s, a = I(null);
3166
+ const t = s, a = T(null);
3203
3167
  function r() {
3204
3168
  var n, o;
3205
3169
  (o = (n = a.value) == null ? void 0 : n.requestUpdateWidget) == null || o.call(n);
3206
3170
  }
3207
3171
  e({ save: r });
3208
- const i = I(!1);
3172
+ const i = T(!1);
3209
3173
  return bs((n, o, l) => (console.error("Editor tab error:", n, l), i.value = !0, !1)), ae(
3210
3174
  () => t.tabComponent,
3211
3175
  () => {
3212
3176
  i.value = !1;
3213
3177
  },
3214
3178
  { immediate: !0 }
3215
- ), (n, o) => i.value ? (h(), x("div", Cr, " Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")) : (h(), E(Zt(s.tabComponent), he({
3179
+ ), (n, o) => i.value ? (h(), x("div", Cr, " Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")) : (h(), N(Zt(s.tabComponent), he({
3216
3180
  ref_key: "tabRef",
3217
3181
  ref: a,
3218
3182
  key: s.tabKey || "tab"
@@ -3251,8 +3215,8 @@ const wr = { class: "space-y-4" }, vr = {
3251
3215
  }),
3252
3216
  emits: /* @__PURE__ */ Be(["update-data"], ["update:selectedWidget"]),
3253
3217
  setup(s, { emit: e }) {
3254
- var w, $;
3255
- const t = M(() => import("@opengis/form")), a = ($ = (w = me()) == null ? void 0 : w.proxy) == null ? void 0 : $.$notify, r = we(), i = e, n = I(null), o = s, l = I(!1), d = I(!0), u = I(!1), p = I({}), v = Gt(s, "selectedWidget"), m = [
3218
+ var w, _;
3219
+ const t = M(() => import("@opengis/form")), a = (_ = (w = me()) == null ? void 0 : w.proxy) == null ? void 0 : _.$notify, r = we(), i = e, n = T(null), o = s, l = T(!1), d = T(!0), u = T(!1), p = T({}), v = Gt(s, "selectedWidget"), b = [
3256
3220
  "table",
3257
3221
  "text",
3258
3222
  "number",
@@ -3261,46 +3225,46 @@ const wr = { class: "space-y-4" }, vr = {
3261
3225
  "listbar",
3262
3226
  "map",
3263
3227
  "pivot"
3264
- ], b = I("data"), k = async () => {
3228
+ ], g = T("data"), k = async () => {
3265
3229
  try {
3266
3230
  await H.delete(
3267
3231
  `/bi-dashboard/${o.selectedDashboard}/${o.selectedWidgetData.name}`
3268
- ), r.hasRoute(J.EditorDashboard) ? r.push({
3232
+ ), l.value = !1, i("update-data"), r.hasRoute(J.EditorDashboard) ? await r.push({
3269
3233
  name: J.EditorDashboard,
3270
3234
  params: { dashboardId: o.selectedDashboard }
3271
- }) : v.value = "", i("update-data"), l.value = !1, a({
3235
+ }) : v.value = "", a({
3272
3236
  type: "success",
3273
3237
  title: "Успішно!",
3274
3238
  message: "Віджет успішно видалено"
3275
3239
  });
3276
- } catch (_) {
3277
- console.error(_), a({
3240
+ } catch ($) {
3241
+ console.error($), a({
3278
3242
  type: "error",
3279
3243
  title: "Помилка!",
3280
3244
  message: "При спробі видалити віджет виникла помилка"
3281
3245
  });
3282
3246
  }
3283
- }, D = q(() => {
3284
- const _ = [
3247
+ }, C = A(() => {
3248
+ const $ = [
3285
3249
  { id: "data", label: "Дані" },
3286
3250
  { id: "style", label: "Стилі" },
3287
3251
  { id: "yaml", label: "{ }" }
3288
3252
  // { id: 'controls', label: 'Контролси' },
3289
3253
  ];
3290
- return _ == null ? void 0 : _.filter((g) => {
3291
- var C, z, R;
3292
- return g.id === "style" ? !(m != null && m.includes(
3293
- ((C = o.selectedWidgetData) == null ? void 0 : C.type) || ((R = (z = o.selectedWidgetData) == null ? void 0 : z.data) == null ? void 0 : R.type)
3254
+ return $ == null ? void 0 : $.filter((f) => {
3255
+ var D, z, V;
3256
+ return f.id === "style" ? !(b != null && b.includes(
3257
+ ((D = o.selectedWidgetData) == null ? void 0 : D.type) || ((V = (z = o.selectedWidgetData) == null ? void 0 : z.data) == null ? void 0 : V.type)
3294
3258
  )) : !0;
3295
3259
  });
3296
- }), V = () => {
3297
- var _, g, C, z, R, F, Y, ie, ce;
3260
+ }), S = () => {
3261
+ var $, f, D, z, V, q, Y, ie, ce;
3298
3262
  p.value = {
3299
- title: (_ = o.selectedWidgetData) == null ? void 0 : _.title,
3300
- type: (g = o.selectedWidgetData) == null ? void 0 : g.type,
3301
- table: (C = o.selectedWidgetData) == null ? void 0 : C.table_name,
3302
- query: (R = (z = o.selectedWidgetData) == null ? void 0 : z.data) == null ? void 0 : R.query,
3303
- x: (Y = (F = o.selectedWidgetData) == null ? void 0 : F.data) == null ? void 0 : Y.x,
3263
+ title: ($ = o.selectedWidgetData) == null ? void 0 : $.title,
3264
+ type: (f = o.selectedWidgetData) == null ? void 0 : f.type,
3265
+ table: (D = o.selectedWidgetData) == null ? void 0 : D.table_name,
3266
+ query: (V = (z = o.selectedWidgetData) == null ? void 0 : z.data) == null ? void 0 : V.query,
3267
+ x: (Y = (q = o.selectedWidgetData) == null ? void 0 : q.data) == null ? void 0 : Y.x,
3304
3268
  cls: (ce = (ie = o.selectedWidgetData) == null ? void 0 : ie.data) == null ? void 0 : ce.cls
3305
3269
  }, u.value = !0;
3306
3270
  }, y = async () => {
@@ -3324,7 +3288,7 @@ const wr = { class: "space-y-4" }, vr = {
3324
3288
  ae(v, () => {
3325
3289
  d.value = !1, setTimeout(() => d.value = !0);
3326
3290
  });
3327
- const f = {
3291
+ const m = {
3328
3292
  title: {
3329
3293
  type: "text",
3330
3294
  ua: "Заголовок",
@@ -3412,26 +3376,26 @@ const wr = { class: "space-y-4" }, vr = {
3412
3376
  placeholder: "Cls"
3413
3377
  }
3414
3378
  };
3415
- return (_, g) => {
3416
- var z, R, F, Y, ie, ce, ve, ke, $e, _e, De;
3417
- const C = K("VsPopover");
3379
+ return ($, f) => {
3380
+ var z, V, q, Y, ie, ce, ve, ke, $e, _e, De;
3381
+ const D = K("VsPopover");
3418
3382
  return h(), x(U, null, [
3419
3383
  c("div", zr, [
3420
3384
  s.selectedWidgetData ? (h(), x("div", Tr, [
3421
3385
  c("div", Ir, [
3422
3386
  c("nav", Sr, [
3423
- (h(!0), x(U, null, Z(D.value, (G) => (h(), x("button", {
3387
+ (h(!0), x(U, null, Z(C.value, (G) => (h(), x("button", {
3424
3388
  key: G.id,
3425
3389
  type: "button",
3426
- class: se(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap", b.value === G.id ? "text-blue-600" : "text-gray-600 hover:text-gray-900"]),
3427
- onClick: (ue) => b.value = G.id
3390
+ class: se(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap", g.value === G.id ? "text-blue-600" : "text-gray-600 hover:text-gray-900"]),
3391
+ onClick: (ue) => g.value = G.id
3428
3392
  }, [
3429
3393
  X(W(G.label) + " ", 1),
3430
- b.value === G.id ? (h(), x("span", Vr)) : A("", !0)
3394
+ g.value === G.id ? (h(), x("span", Vr)) : F("", !0)
3431
3395
  ], 10, Rr))), 128))
3432
3396
  ]),
3433
3397
  c("div", Lr, [
3434
- T(C, {
3398
+ I(D, {
3435
3399
  placement: "left",
3436
3400
  trigger: "hover"
3437
3401
  }, {
@@ -3440,20 +3404,20 @@ const wr = { class: "space-y-4" }, vr = {
3440
3404
  type: "button",
3441
3405
  class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
3442
3406
  title: "Зберегти",
3443
- onClick: g[0] || (g[0] = (G) => {
3407
+ onClick: f[0] || (f[0] = (G) => {
3444
3408
  var ue, Ce;
3445
3409
  return (Ce = (ue = n.value) == null ? void 0 : ue.save) == null ? void 0 : Ce.call(ue);
3446
3410
  })
3447
3411
  }, [
3448
- T(N(Ns), { class: "h-4 w-4" })
3412
+ I(E(Ns), { class: "h-4 w-4" })
3449
3413
  ])
3450
3414
  ]),
3451
3415
  default: j(() => [
3452
- g[9] || (g[9] = X(" Зберегти ", -1))
3416
+ f[9] || (f[9] = X(" Зберегти ", -1))
3453
3417
  ]),
3454
3418
  _: 1
3455
3419
  }),
3456
- T(C, {
3420
+ I(D, {
3457
3421
  placement: "left",
3458
3422
  trigger: "hover"
3459
3423
  }, {
@@ -3461,17 +3425,17 @@ const wr = { class: "space-y-4" }, vr = {
3461
3425
  c("button", {
3462
3426
  type: "button",
3463
3427
  class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
3464
- onClick: V
3428
+ onClick: S
3465
3429
  }, [
3466
- T(es, { class: "h-4 w-4" })
3430
+ I(es, { class: "h-4 w-4" })
3467
3431
  ])
3468
3432
  ]),
3469
3433
  default: j(() => [
3470
- g[10] || (g[10] = X(" Редагувати віджет ", -1))
3434
+ f[10] || (f[10] = X(" Редагувати віджет ", -1))
3471
3435
  ]),
3472
3436
  _: 1
3473
3437
  }),
3474
- T(C, {
3438
+ I(D, {
3475
3439
  placement: "left",
3476
3440
  trigger: "hover"
3477
3441
  }, {
@@ -3479,66 +3443,66 @@ const wr = { class: "space-y-4" }, vr = {
3479
3443
  c("button", {
3480
3444
  type: "button",
3481
3445
  class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
3482
- onClick: g[1] || (g[1] = (G) => l.value = !0)
3446
+ onClick: f[1] || (f[1] = (G) => l.value = !0)
3483
3447
  }, [
3484
- T(N(Kt), { class: "h-4 w-4" })
3448
+ I(E(Kt), { class: "h-4 w-4" })
3485
3449
  ])
3486
3450
  ]),
3487
3451
  default: j(() => [
3488
- g[11] || (g[11] = X(" Видалити віджет ", -1))
3452
+ f[11] || (f[11] = X(" Видалити віджет ", -1))
3489
3453
  ]),
3490
3454
  _: 1
3491
3455
  })
3492
3456
  ])
3493
3457
  ]),
3494
- (z = s.currentWidgetData) != null && z.status ? (h(), E(Pe, {
3458
+ (z = s.currentWidgetData) != null && z.status ? (h(), N(Pe, {
3495
3459
  key: 0,
3496
- title: (R = s.currentWidgetData) == null ? void 0 : R.title,
3497
- text: (F = s.currentWidgetData) == null ? void 0 : F.message
3460
+ title: (V = s.currentWidgetData) == null ? void 0 : V.title,
3461
+ text: (q = s.currentWidgetData) == null ? void 0 : q.message
3498
3462
  }, null, 8, ["title", "text"])) : (h(), x("div", Wr, [
3499
3463
  d.value && s.currentWidgetData ? (h(), x("div", Nr, [
3500
- T(qt, {
3464
+ I(qt, {
3501
3465
  ref_key: "tabPanelRef",
3502
3466
  ref: n,
3503
- "tab-key": b.value,
3504
- "tab-component": N(Ft)["vs-editor-form-" + b.value],
3467
+ "tab-key": g.value,
3468
+ "tab-component": E(Ft)["vs-editor-form-" + g.value],
3505
3469
  widgetName: (Y = s.selectedWidgetData) == null ? void 0 : Y.name,
3506
3470
  dashboardId: s.selectedDashboard,
3507
3471
  yamlValue: ((ie = s.selectedWidgetData) == null ? void 0 : ie.yml) || "",
3508
3472
  data: s.selectedWidgetData,
3509
3473
  controls: (ce = s.selectedWidgetData) == null ? void 0 : ce.controls,
3510
3474
  columns: (ve = s.currentWidgetData) == null ? void 0 : ve.columns,
3511
- onUpdateDashboard: g[2] || (g[2] = (G) => _.$emit("update-data"))
3475
+ onUpdateDashboard: f[2] || (f[2] = (G) => $.$emit("update-data"))
3512
3476
  }, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
3513
3477
  ])) : (h(), x("div", Er, [
3514
- T(qt, {
3478
+ I(qt, {
3515
3479
  ref_key: "tabPanelRef",
3516
3480
  ref: n,
3517
- "tab-key": b.value,
3518
- "tab-component": N(Ft)["vs-editor-form-" + b.value],
3481
+ "tab-key": g.value,
3482
+ "tab-component": E(Ft)["vs-editor-form-" + g.value],
3519
3483
  widgetName: (ke = s.selectedWidgetData) == null ? void 0 : ke.name,
3520
3484
  dashboardId: s.selectedDashboard,
3521
3485
  yamlValue: (($e = s.selectedWidgetData) == null ? void 0 : $e.yml) || "",
3522
3486
  data: s.selectedWidgetData,
3523
3487
  controls: (_e = s.selectedWidgetData) == null ? void 0 : _e.controls,
3524
3488
  columns: (De = s.currentWidgetData) == null ? void 0 : De.columns,
3525
- onUpdateDashboard: g[3] || (g[3] = (G) => _.$emit("update-data"))
3489
+ onUpdateDashboard: f[3] || (f[3] = (G) => $.$emit("update-data"))
3526
3490
  }, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
3527
3491
  ])),
3528
- T(Ve, {
3492
+ I(Ve, {
3529
3493
  teleport: "#modal",
3530
3494
  visible: l.value,
3531
3495
  title: "Ви впевнені?",
3532
- onClose: g[5] || (g[5] = (G) => l.value = !1)
3496
+ onClose: f[5] || (f[5] = (G) => l.value = !1)
3533
3497
  }, {
3534
3498
  default: j(() => [
3535
3499
  c("div", jr, [
3536
- g[12] || (g[12] = c("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей віджет? ", -1)),
3500
+ f[12] || (f[12] = c("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей віджет? ", -1)),
3537
3501
  c("div", Br, [
3538
3502
  c("button", {
3539
3503
  type: "button",
3540
3504
  class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
3541
- onClick: g[4] || (g[4] = (G) => l.value = !1)
3505
+ onClick: f[4] || (f[4] = (G) => l.value = !1)
3542
3506
  }, " Скасувати "),
3543
3507
  c("button", {
3544
3508
  type: "button",
@@ -3551,24 +3515,24 @@ const wr = { class: "space-y-4" }, vr = {
3551
3515
  _: 1
3552
3516
  }, 8, ["visible"])
3553
3517
  ]))
3554
- ])) : (h(), E(Pe, {
3518
+ ])) : (h(), N(Pe, {
3555
3519
  key: 1,
3556
3520
  title: "Оберіть один з віджетів",
3557
3521
  text: "",
3558
3522
  class: "p-4"
3559
3523
  }))
3560
3524
  ]),
3561
- T(Ve, {
3525
+ I(Ve, {
3562
3526
  teleport: "#modal",
3563
3527
  visible: u.value,
3564
3528
  title: "Редагувати віджет",
3565
- onClose: g[8] || (g[8] = (G) => u.value = !1)
3529
+ onClose: f[8] || (f[8] = (G) => u.value = !1)
3566
3530
  }, {
3567
3531
  footer: j(() => [
3568
3532
  c("div", Or, [
3569
3533
  c("button", {
3570
3534
  style: { border: "1px solid #000" },
3571
- onClick: g[7] || (g[7] = (G) => u.value = !1),
3535
+ onClick: f[7] || (f[7] = (G) => u.value = !1),
3572
3536
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg hover:bg-gray-100 duration-300"
3573
3537
  }, " Скасувати "),
3574
3538
  c("button", {
@@ -3578,12 +3542,12 @@ const wr = { class: "space-y-4" }, vr = {
3578
3542
  ])
3579
3543
  ]),
3580
3544
  default: j(() => [
3581
- f ? (h(), E(N(t), {
3545
+ m ? (h(), N(E(t), {
3582
3546
  key: 0,
3583
- schema: f,
3547
+ schema: m,
3584
3548
  values: p.value,
3585
- "onUpdate:values": g[6] || (g[6] = (G) => p.value = G)
3586
- }, null, 8, ["values"])) : A("", !0)
3549
+ "onUpdate:values": f[6] || (f[6] = (G) => p.value = G)
3550
+ }, null, 8, ["values"])) : F("", !0)
3587
3551
  ]),
3588
3552
  _: 1
3589
3553
  }, 8, ["visible"])
@@ -3604,7 +3568,7 @@ const wr = { class: "space-y-4" }, vr = {
3604
3568
  },
3605
3569
  emits: ["update:selectedWidget", "update-data"],
3606
3570
  setup(s, { emit: e }) {
3607
- const t = s, a = e, r = I(null);
3571
+ const t = s, a = e, r = T(null);
3608
3572
  async function i() {
3609
3573
  if (!(!t.selectedDashboard || !t.selectedWidget))
3610
3574
  try {
@@ -3625,14 +3589,14 @@ const wr = { class: "space-y-4" }, vr = {
3625
3589
  },
3626
3590
  { immediate: !0 }
3627
3591
  );
3628
- const o = q({
3592
+ const o = A({
3629
3593
  get: () => t.selectedWidget,
3630
3594
  set: (l) => a("update:selectedWidget", l)
3631
3595
  });
3632
3596
  return (l, d) => (h(), x("div", Ar, [
3633
3597
  c("div", Fr, [
3634
3598
  c("div", qr, [
3635
- r.value ? (h(), E(Oe, {
3599
+ r.value ? (h(), N(Oe, {
3636
3600
  key: 0,
3637
3601
  dashboard: s.selectedDashboard,
3638
3602
  widget: s.selectedWidget,
@@ -3646,7 +3610,7 @@ const wr = { class: "space-y-4" }, vr = {
3646
3610
  ])]))
3647
3611
  ]),
3648
3612
  c("div", Ur, [
3649
- T(Pr, {
3613
+ I(Pr, {
3650
3614
  selectedWidget: o.value,
3651
3615
  "onUpdate:selectedWidget": d[0] || (d[0] = (u) => o.value = u),
3652
3616
  selectedWidgetData: s.selectedWidgetData,
@@ -3661,17 +3625,17 @@ const wr = { class: "space-y-4" }, vr = {
3661
3625
  }, Hr = {
3662
3626
  __name: "icon-grid",
3663
3627
  setup(s) {
3664
- return (e, t) => (h(), E(N(Ls), he(e.$attrs, { size: 24 }), null, 16));
3628
+ return (e, t) => (h(), N(E(Ls), he(e.$attrs, { size: 24 }), null, 16));
3665
3629
  }
3666
3630
  }, Zr = {
3667
3631
  __name: "icon-table",
3668
3632
  setup(s) {
3669
- return (e, t) => (h(), E(N(Es), he(e.$attrs, { size: 24 }), null, 16));
3633
+ return (e, t) => (h(), N(E(Es), he(e.$attrs, { size: 24 }), null, 16));
3670
3634
  }
3671
3635
  }, Qr = {
3672
3636
  __name: "icon-more",
3673
3637
  setup(s) {
3674
- return (e, t) => (h(), E(N(Ss), he(e.$attrs, { size: 24 }), null, 16));
3638
+ return (e, t) => (h(), N(E(Ss), he(e.$attrs, { size: 24 }), null, 16));
3675
3639
  }
3676
3640
  }, Xr = M(() => import("@opengis/form")), Yr = {
3677
3641
  components: {
@@ -3888,7 +3852,7 @@ function nn(s, e, t, a, r, i) {
3888
3852
  const n = K("IconGrid"), o = K("VsPopover"), l = K("IconMore"), d = K("VsModal"), u = K("VForm");
3889
3853
  return h(), x("div", null, [
3890
3854
  t.selected ? (h(), x("div", Jr, [
3891
- T(o, {
3855
+ I(o, {
3892
3856
  placement: "left",
3893
3857
  trigger: "hover"
3894
3858
  }, {
@@ -3897,7 +3861,7 @@ function nn(s, e, t, a, r, i) {
3897
3861
  class: "h-[30px] w-[30px] flex items-center justify-center",
3898
3862
  onClick: e[0] || (e[0] = (p) => r.isFormGrid = !0)
3899
3863
  }, [
3900
- T(n, { class: "h-[20px] text-gray-500" })
3864
+ I(n, { class: "h-[20px] text-gray-500" })
3901
3865
  ])
3902
3866
  ]),
3903
3867
  default: j(() => [
@@ -3905,15 +3869,15 @@ function nn(s, e, t, a, r, i) {
3905
3869
  ]),
3906
3870
  _: 1
3907
3871
  }),
3908
- T(o, {
3872
+ I(o, {
3909
3873
  placement: "left",
3910
3874
  trigger: "hover"
3911
3875
  }, {
3912
3876
  reference: j(() => [
3913
- T(o, { placement: "bottom-left" }, {
3877
+ I(o, { placement: "bottom-left" }, {
3914
3878
  reference: j(() => [
3915
3879
  c("button", Kr, [
3916
- T(l, { class: "h-[20px]" })
3880
+ I(l, { class: "h-[20px]" })
3917
3881
  ])
3918
3882
  ]),
3919
3883
  default: j(() => [
@@ -3940,8 +3904,8 @@ function nn(s, e, t, a, r, i) {
3940
3904
  ]),
3941
3905
  _: 1
3942
3906
  })
3943
- ])) : A("", !0),
3944
- T(d, {
3907
+ ])) : F("", !0),
3908
+ I(d, {
3945
3909
  teleport: "#modal",
3946
3910
  visible: r.isDeleteConfirm,
3947
3911
  size: "small",
@@ -3967,7 +3931,7 @@ function nn(s, e, t, a, r, i) {
3967
3931
  ]),
3968
3932
  _: 1
3969
3933
  }, 8, ["visible"]),
3970
- T(d, {
3934
+ I(d, {
3971
3935
  teleport: "#modal",
3972
3936
  visible: r.isFormEdit,
3973
3937
  title: "Редагувати дашборд",
@@ -3987,7 +3951,7 @@ function nn(s, e, t, a, r, i) {
3987
3951
  ])
3988
3952
  ]),
3989
3953
  default: j(() => [
3990
- T(u, {
3954
+ I(u, {
3991
3955
  ref: "formEdit",
3992
3956
  schema: r.editDashboardScheme,
3993
3957
  values: r.formEditValue,
@@ -3996,7 +3960,7 @@ function nn(s, e, t, a, r, i) {
3996
3960
  ]),
3997
3961
  _: 1
3998
3962
  }, 8, ["visible"]),
3999
- T(d, {
3963
+ I(d, {
4000
3964
  teleport: "#modal",
4001
3965
  visible: r.isFormGrid,
4002
3966
  title: "Редагувати структуру дашборду",
@@ -4016,7 +3980,7 @@ function nn(s, e, t, a, r, i) {
4016
3980
  ])
4017
3981
  ]),
4018
3982
  default: j(() => [
4019
- T(u, {
3983
+ I(u, {
4020
3984
  ref: "formgrid",
4021
3985
  schema: r.editGridScheme,
4022
3986
  values: r.formGridValue,
@@ -4048,7 +4012,7 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4048
4012
  setup(s, { emit: e }) {
4049
4013
  const t = s;
4050
4014
  He(t.prefix || "/api");
4051
- const a = e, r = we(), i = q(() => r.hasRoute(J.EditorWidget)), n = Qt("biClearDashboard", null), o = I(t.initialDashboardId || ""), l = I(t.initialWidgetId || ""), d = I(null), u = I(null), p = I(null);
4015
+ const a = e, r = we(), i = A(() => r.hasRoute(J.EditorWidget)), n = Qt("biClearDashboard", null), o = T(t.initialDashboardId || ""), l = T(t.initialWidgetId || ""), d = T(null), u = T(null), p = T(null);
4052
4016
  ae(() => t.initialWidgetId, (y) => {
4053
4017
  l.value = y || "";
4054
4018
  });
@@ -4065,13 +4029,13 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4065
4029
  } catch (y) {
4066
4030
  console.error(y);
4067
4031
  }
4068
- }, m = q(
4032
+ }, b = A(
4069
4033
  () => {
4070
- var y, f, w;
4071
- return (w = Array.isArray((y = d.value) == null ? void 0 : y.widgets) ? (f = d.value) == null ? void 0 : f.widgets : []) == null ? void 0 : w.find(($) => ($ == null ? void 0 : $.name) === l.value);
4034
+ var y, m, w;
4035
+ return (w = Array.isArray((y = d.value) == null ? void 0 : y.widgets) ? (m = d.value) == null ? void 0 : m.widgets : []) == null ? void 0 : w.find((_) => (_ == null ? void 0 : _.name) === l.value);
4072
4036
  }
4073
4037
  );
4074
- function b(y) {
4038
+ function g(y) {
4075
4039
  i.value ? r.push({
4076
4040
  name: J.EditorWidget,
4077
4041
  params: { dashboardId: o.value, widgetId: y }
@@ -4083,33 +4047,33 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4083
4047
  params: { dashboardId: o.value }
4084
4048
  }) : l.value = "";
4085
4049
  }
4086
- function D() {
4050
+ function C() {
4087
4051
  i.value ? r.push({ name: J.Editor }) : (typeof n == "function" && n(), a("back"));
4088
4052
  }
4089
- const V = q(() => {
4090
- var w, $, _, g, C;
4091
- const f = [i.value ? { label: "Дашборди", to: { name: J.Editor } } : { label: "Дашборди", onClick: D }];
4053
+ const S = A(() => {
4054
+ var w, _, $, f, D;
4055
+ const m = [i.value ? { label: "Дашборди", to: { name: J.Editor } } : { label: "Дашборди", onClick: C }];
4092
4056
  if ((w = d.value) != null && w.title || o.value) {
4093
- const z = (($ = d.value) == null ? void 0 : $.title) || o.value || "Редактор";
4094
- !!l.value ? f.push(
4057
+ const z = ((_ = d.value) == null ? void 0 : _.title) || o.value || "Редактор";
4058
+ !!l.value ? m.push(
4095
4059
  i.value ? { label: z, to: { name: J.EditorDashboard, params: { dashboardId: o.value } } } : { label: z, onClick: () => {
4096
4060
  l.value = "";
4097
4061
  } }
4098
- ) : f.push({ label: z });
4062
+ ) : m.push({ label: z });
4099
4063
  } else
4100
- f.push({ label: "Редактор" });
4101
- if (l.value && m.value) {
4102
- const z = ((g = (_ = m.value) == null ? void 0 : _.data) == null ? void 0 : g.title) || ((C = m.value) == null ? void 0 : C.title) || l.value;
4103
- f.push({ label: z });
4064
+ m.push({ label: "Редактор" });
4065
+ if (l.value && b.value) {
4066
+ const z = ((f = ($ = b.value) == null ? void 0 : $.data) == null ? void 0 : f.title) || ((D = b.value) == null ? void 0 : D.title) || l.value;
4067
+ m.push({ label: z });
4104
4068
  }
4105
- return f;
4069
+ return m;
4106
4070
  });
4107
- return ae(o, (y, f) => {
4108
- f && (l.value = ""), y ? v() : (d.value = null, D());
4071
+ return ae(o, (y, m) => {
4072
+ m && (l.value = ""), y ? v() : (d.value = null, C());
4109
4073
  }), le(() => {
4110
4074
  v();
4111
- }), (y, f) => {
4112
- var w, $;
4075
+ }), (y, m) => {
4076
+ var w, _;
4113
4077
  return h(), x("div", {
4114
4078
  class: se(["flex w-full h-full", [s.customClass]])
4115
4079
  }, [
@@ -4117,15 +4081,15 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4117
4081
  c("div", dn, [
4118
4082
  c("div", cn, [
4119
4083
  c("div", un, [
4120
- T(Jt, {
4121
- items: V.value,
4084
+ I(Jt, {
4085
+ items: S.value,
4122
4086
  compact: ""
4123
4087
  }, null, 8, ["items"])
4124
4088
  ]),
4125
4089
  o.value && d.value ? (h(), x("div", hn, [
4126
4090
  c("div", pn, [
4127
4091
  c("h1", fn, W(d.value.title || o.value), 1),
4128
- d.value.description ? (h(), x("p", gn, W(d.value.description), 1)) : A("", !0)
4092
+ d.value.description ? (h(), x("p", gn, W(d.value.description), 1)) : F("", !0)
4129
4093
  ]),
4130
4094
  c("div", mn, [
4131
4095
  l.value ? (h(), x("button", {
@@ -4134,85 +4098,85 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4134
4098
  class: "flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",
4135
4099
  onClick: k
4136
4100
  }, [
4137
- T(N(Bs), { class: "w-4 h-4" }),
4138
- f[5] || (f[5] = X(" Закрити ", -1))
4101
+ I(E(Bs), { class: "w-4 h-4" }),
4102
+ m[5] || (m[5] = X(" Закрити ", -1))
4139
4103
  ])) : (h(), x(U, { key: 1 }, [
4140
- T(on, {
4104
+ I(on, {
4141
4105
  selected: o.value,
4142
- "onUpdate:selected": f[0] || (f[0] = (_) => o.value = _),
4106
+ "onUpdate:selected": m[0] || (m[0] = ($) => o.value = $),
4143
4107
  dashboardData: d.value,
4144
4108
  columns: (w = d.value) == null ? void 0 : w.columns,
4145
- selectedWidgetData: m.value,
4109
+ selectedWidgetData: b.value,
4146
4110
  prefix: s.prefix,
4147
4111
  onUpdateEditor: v
4148
4112
  }, null, 8, ["selected", "dashboardData", "columns", "selectedWidgetData", "prefix"]),
4149
4113
  c("button", {
4150
4114
  type: "button",
4151
4115
  class: "ml-4 flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",
4152
- onClick: f[1] || (f[1] = (_) => {
4153
- var g, C;
4154
- return (C = (g = p.value) == null ? void 0 : g.open) == null ? void 0 : C.call(g);
4116
+ onClick: m[1] || (m[1] = ($) => {
4117
+ var f, D;
4118
+ return (D = (f = p.value) == null ? void 0 : f.open) == null ? void 0 : D.call(f);
4155
4119
  })
4156
- }, [...f[6] || (f[6] = [
4120
+ }, [...m[6] || (m[6] = [
4157
4121
  c("span", { class: "leading-none" }, "+", -1),
4158
4122
  X(" Створити віджет ", -1)
4159
4123
  ])]),
4160
- o.value ? (h(), E(Ba, {
4124
+ o.value ? (h(), N(Ba, {
4161
4125
  key: 0,
4162
4126
  ref_key: "createWidgetRef",
4163
4127
  ref: p,
4164
4128
  inline: "",
4165
- columns: ($ = d.value) == null ? void 0 : $.columns,
4129
+ columns: (_ = d.value) == null ? void 0 : _.columns,
4166
4130
  selectedDashboard: o.value,
4167
4131
  onUpdateData: v
4168
- }, null, 8, ["columns", "selectedDashboard"])) : A("", !0)
4132
+ }, null, 8, ["columns", "selectedDashboard"])) : F("", !0)
4169
4133
  ], 64))
4170
4134
  ])
4171
- ])) : A("", !0)
4135
+ ])) : F("", !0)
4172
4136
  ]),
4173
- l.value && d.value ? (h(), E(Gr, {
4137
+ l.value && d.value ? (h(), N(Gr, {
4174
4138
  key: 0,
4175
4139
  "selected-widget": l.value,
4176
- "onUpdate:selectedWidget": f[2] || (f[2] = (_) => l.value = _),
4177
- "selected-widget-data": m.value,
4140
+ "onUpdate:selectedWidget": m[2] || (m[2] = ($) => l.value = $),
4141
+ "selected-widget-data": b.value,
4178
4142
  "current-widget-data": u.value,
4179
4143
  "selected-dashboard": o.value,
4180
4144
  "dashboard-widgets": d.value.widgets || [],
4181
4145
  onUpdateData: v
4182
4146
  }, null, 8, ["selected-widget", "selected-widget-data", "current-widget-data", "selected-dashboard", "dashboard-widgets"])) : (h(), x("div", bn, [
4183
- d.value ? (h(!0), x(U, { key: 1 }, Z(d.value.panels, (_, g) => {
4184
- var C;
4147
+ d.value ? (h(!0), x(U, { key: 1 }, Z(d.value.panels, ($, f) => {
4148
+ var D, z;
4185
4149
  return h(), x("div", {
4186
- key: g,
4187
- class: se([`md:col-span-${_.col || 12} col-span-12`, "flex flex-col gap-[10px]"])
4150
+ key: $.widget || ((D = $.widgets) == null ? void 0 : D.join("-")) || f,
4151
+ class: se([`md:col-span-${$.col || 12} col-span-12`, "flex flex-col gap-[10px]"])
4188
4152
  }, [
4189
- (C = _.widgets) != null && C.length ? (h(!0), x(U, { key: 0 }, Z(_.widgets, (z) => (h(), E(Oe, {
4190
- onClick: (R) => b(z),
4191
- "onUpdate:currentWidgetData": f[3] || (f[3] = (R) => u.value = R),
4192
- key: z,
4153
+ (z = $.widgets) != null && z.length ? (h(!0), x(U, { key: 0 }, Z($.widgets, (V) => (h(), N(Oe, {
4154
+ onClick: (q) => g(V),
4155
+ "onUpdate:currentWidgetData": m[3] || (m[3] = (q) => u.value = q),
4156
+ key: V,
4193
4157
  dashboard: o.value,
4194
- widget: z,
4158
+ widget: V,
4195
4159
  selectedWidget: l.value,
4196
4160
  "dashboard-widgets": d.value.widgets,
4197
- height: Number(_.height ?? 480),
4161
+ height: Number($.height ?? 480),
4198
4162
  class: se({
4199
- "border border-blue-500": l.value === z
4163
+ "border border-blue-500": l.value === V
4200
4164
  })
4201
- }, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height", "class"]))), 128)) : (h(), E(Oe, {
4165
+ }, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height", "class"]))), 128)) : (h(), N(Oe, {
4202
4166
  key: 1,
4203
- onClick: (z) => b(_.widget),
4204
- "onUpdate:currentWidgetData": f[4] || (f[4] = (z) => u.value = z),
4167
+ onClick: (V) => g($.widget),
4168
+ "onUpdate:currentWidgetData": m[4] || (m[4] = (V) => u.value = V),
4205
4169
  class: se(["flex flex-col", {
4206
- "border border-blue-500": l.value === _.widget
4170
+ "border border-blue-500": l.value === $.widget
4207
4171
  }]),
4208
4172
  dashboard: o.value,
4209
- widget: _.widget,
4173
+ widget: $.widget,
4210
4174
  selectedWidget: l.value,
4211
4175
  "dashboard-widgets": d.value.widgets,
4212
- height: Number(_.height ?? 480)
4176
+ height: Number($.height ?? 480)
4213
4177
  }, null, 8, ["onClick", "class", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height"]))
4214
4178
  ], 2);
4215
- }), 128)) : (h(), E(Pe, {
4179
+ }), 128)) : (h(), N(Pe, {
4216
4180
  key: 0,
4217
4181
  class: "col-span-12"
4218
4182
  }))
@@ -4222,7 +4186,7 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4222
4186
  ], 2);
4223
4187
  };
4224
4188
  }
4225
- }, yn = /* @__PURE__ */ Q(xn, [["__scopeId", "data-v-f586e5b0"]]), wn = { class: "w-full h-screen" }, vn = /* @__PURE__ */ ge({
4189
+ }, yn = /* @__PURE__ */ Q(xn, [["__scopeId", "data-v-330ef797"]]), wn = { class: "w-full h-screen" }, vn = /* @__PURE__ */ ge({
4226
4190
  __name: "vs-editor-page",
4227
4191
  props: {
4228
4192
  prefix: { default: "/api" },
@@ -4232,7 +4196,7 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4232
4196
  emits: ["back"],
4233
4197
  setup(s) {
4234
4198
  return (e, t) => (h(), x("div", wn, [
4235
- T(yn, {
4199
+ I(yn, {
4236
4200
  customClass: "h-full w-full",
4237
4201
  prefix: s.prefix,
4238
4202
  "initial-dashboard-id": s.dashboardId,
@@ -4264,7 +4228,7 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4264
4228
  onOpenEditor: Function
4265
4229
  },
4266
4230
  setup(s) {
4267
- const e = s, t = we(), a = I(!1);
4231
+ const e = s, t = we(), a = T(!1);
4268
4232
  function r() {
4269
4233
  e.dashboardRouteName && (t.hasRoute(J.EditorDashboard) ? t.push({
4270
4234
  name: J.EditorDashboard,
@@ -4282,7 +4246,7 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4282
4246
  }, [
4283
4247
  c("div", $n, [
4284
4248
  c("div", _n, [
4285
- T(N(Vs), {
4249
+ I(E(Vs), {
4286
4250
  size: 24,
4287
4251
  class: "w-5 h-5 text-blue-600"
4288
4252
  })
@@ -4290,7 +4254,7 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4290
4254
  c("div", Dn, [
4291
4255
  c("h3", Cn, W(s.title), 1),
4292
4256
  s.description ? (h(), x("p", zn, W(s.description), 1)) : (h(), x("p", Tn, "   ")),
4293
- s.widgetCount != null ? (h(), x("p", In, W(s.widgetCount) + " віджетів ", 1)) : A("", !0)
4257
+ s.widgetCount != null ? (h(), x("p", In, W(s.widgetCount) + " віджетів ", 1)) : F("", !0)
4294
4258
  ])
4295
4259
  ])
4296
4260
  ])
@@ -4301,7 +4265,7 @@ const on = /* @__PURE__ */ Q(Yr, [["render", nn]]), ln = { class: "flex-1 min-w-
4301
4265
  { type: "Text", key: "title", label: "Заголовок", validators: ["required"], original: { type: "Text", ua: "Титул", col: 8 } },
4302
4266
  { type: "Text", key: "description", label: "Опис", original: { type: "Text", ua: "Назва", col: 8 } },
4303
4267
  { type: "Text", key: "words", label: "Ключові слова", original: { type: "Text", ua: "Назва", col: 8 } },
4304
- { type: "Select", data: "pg.table_name", key: "table_name", validators: ["required"], label: "Назва", original: { type: "select", ua: "Назва", col: 8, data: "pg.table_name" } },
4268
+ { type: "Select", data: "pg.table_name", key: "table_name", validators: ["required"], label: "Назва таблиці", original: { type: "select", ua: "Назва", col: 8, data: "pg.table_name" } },
4305
4269
  { type: "Text", key: "db", label: "База даних", original: { type: "Text", ua: "Назва", col: 8 } },
4306
4270
  { type: "Text", key: "category", label: "Категорія", original: { type: "Text", ua: "Категорія", col: 8 } },
4307
4271
  { type: "Switcher", key: "public", label: "Публічний", original: { type: "Text", ua: "Назва", col: 8 } }
@@ -4325,20 +4289,20 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4325
4289
  prefix: {}
4326
4290
  },
4327
4291
  setup(s) {
4328
- const e = M(() => import("@opengis/form")), t = Ln(Vn), a = I([]), r = I([]), i = we(), n = Qt("biSetDashboard", void 0), o = s, l = I(null), d = I(!1), u = I({}), p = I(""), v = I("title-asc"), m = q(() => {
4292
+ const e = M(() => import("@opengis/form")), t = Ln(Vn), a = T([]), r = T([]), i = we(), n = Qt("biSetDashboard", void 0), o = s, l = T(null), d = T(!1), u = T({}), p = T(""), v = T("title-asc"), b = A(() => {
4329
4293
  const w = p.value.trim().toLowerCase();
4330
- let $ = a.value;
4331
- w && ($ = $.filter((g) => g.title.toLowerCase().includes(w)));
4332
- const _ = v.value === "title-asc" ? 1 : -1;
4333
- return [...$].sort((g, C) => _ * g.title.localeCompare(C.title, "uk"));
4294
+ let _ = a.value;
4295
+ w && (_ = _.filter((f) => f.title.toLowerCase().includes(w)));
4296
+ const $ = v.value === "title-asc" ? 1 : -1;
4297
+ return [..._].sort((f, D) => $ * f.title.localeCompare(D.title, "uk"));
4334
4298
  });
4335
- async function b() {
4299
+ async function g() {
4336
4300
  try {
4337
- const w = await H.get("/bi-dashboard?type=db"), $ = Array.isArray(w == null ? void 0 : w.rows) ? w.rows : [];
4338
- r.value = $, a.value = $.map((_) => ({
4339
- routeName: String(_.name ?? ""),
4340
- title: _.title ?? _.name ?? "Без назви",
4341
- description: _.description ?? null,
4301
+ const w = await H.get("/bi-dashboard?type=db"), _ = Array.isArray(w == null ? void 0 : w.rows) ? w.rows : [];
4302
+ r.value = _, a.value = _.map(($) => ({
4303
+ routeName: String($.name ?? ""),
4304
+ title: $.title ?? $.name ?? "Без назви",
4305
+ description: $.description ?? null,
4342
4306
  modified: "-",
4343
4307
  name: "-"
4344
4308
  }));
@@ -4347,13 +4311,13 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4347
4311
  }
4348
4312
  }
4349
4313
  async function k() {
4350
- var $, _, g;
4351
- const w = (_ = ($ = me()) == null ? void 0 : $.proxy) == null ? void 0 : _.$notify;
4314
+ var _, $, f;
4315
+ const w = ($ = (_ = me()) == null ? void 0 : _.proxy) == null ? void 0 : $.$notify;
4352
4316
  try {
4353
- const C = (g = l.value) == null ? void 0 : g.validate();
4354
- typeof C == "function" && await C();
4355
- const { name: z, title: R, table_name: F } = u.value;
4356
- if (!z || !R || !F) {
4317
+ const D = (f = l.value) == null ? void 0 : f.validate();
4318
+ typeof D == "function" && await D();
4319
+ const { name: z, title: V, table_name: q } = u.value;
4320
+ if (!z || !V || !q) {
4357
4321
  w == null || w({ type: "error", title: "Помилка!", message: "Заповніть усі обов'язкові поля" });
4358
4322
  return;
4359
4323
  }
@@ -4364,7 +4328,7 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4364
4328
  }), i.hasRoute(J.EditorDashboard) ? i.push({
4365
4329
  name: J.EditorDashboard,
4366
4330
  params: { dashboardId: z }
4367
- }) : n ? n(z) : await b();
4331
+ }) : n ? n(z) : await g();
4368
4332
  } catch {
4369
4333
  w == null || w({
4370
4334
  type: "error",
@@ -4374,58 +4338,58 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4374
4338
  }
4375
4339
  }
4376
4340
  le(() => {
4377
- He(o.prefix || "/api"), b();
4341
+ He(o.prefix || "/api"), g();
4378
4342
  });
4379
- const D = I(1), V = () => {
4343
+ const C = T(1), S = () => {
4380
4344
  const w = window.innerWidth;
4381
- D.value = w >= 1024 ? 3 : w >= 768 ? 2 : 1;
4345
+ C.value = w >= 1024 ? 3 : w >= 768 ? 2 : 1;
4382
4346
  };
4383
4347
  le(() => {
4384
- V(), window.addEventListener("resize", V);
4348
+ S(), window.addEventListener("resize", S);
4385
4349
  }), Ue(() => {
4386
- window.removeEventListener("resize", V);
4350
+ window.removeEventListener("resize", S);
4387
4351
  });
4388
- const y = (w) => w ? w.trim().length > 70 ? 2 : 1 : 0, f = (w) => {
4389
- const $ = D.value || 1, g = Math.floor(w / $) * $, C = g + $, z = m.value.slice(g, C);
4390
- let R = 0;
4391
- for (const F of z) {
4392
- const Y = y(F.description ?? null);
4393
- if (Y > R && (R = Y), R === 2) break;
4352
+ const y = (w) => w ? w.trim().length > 70 ? 2 : 1 : 0, m = (w) => {
4353
+ const _ = C.value || 1, f = Math.floor(w / _) * _, D = f + _, z = b.value.slice(f, D);
4354
+ let V = 0;
4355
+ for (const q of z) {
4356
+ const Y = y(q.description ?? null);
4357
+ if (Y > V && (V = Y), V === 2) break;
4394
4358
  }
4395
- return R;
4359
+ return V;
4396
4360
  };
4397
- return I("grid"), (w, $) => (h(), x("div", Wn, [
4361
+ return T("grid"), (w, _) => (h(), x("div", Wn, [
4398
4362
  c("div", Nn, [
4399
4363
  c("div", En, [
4400
4364
  c("div", jn, [
4401
- $[7] || ($[7] = c("div", null, [
4365
+ _[7] || (_[7] = c("div", null, [
4402
4366
  c("h1", { class: "text-3xl font-bold text-gray-900" }, "Дашборди"),
4403
4367
  c("p", { class: "mt-2 text-gray-600" }, " Керуйте та переглядайте свої аналітичні дашборди ")
4404
4368
  ], -1)),
4405
4369
  c("button", {
4406
4370
  type: "button",
4407
4371
  class: "flex items-center gap-2 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",
4408
- onClick: $[0] || ($[0] = (_) => d.value = !0)
4372
+ onClick: _[0] || (_[0] = ($) => d.value = !0)
4409
4373
  }, [
4410
- T(N(Xt), {
4374
+ I(E(Xt), {
4411
4375
  size: 24,
4412
4376
  class: "w-4 h-4"
4413
4377
  }),
4414
- $[6] || ($[6] = c("span", null, "Новий дашборд", -1))
4378
+ _[6] || (_[6] = c("span", null, "Новий дашборд", -1))
4415
4379
  ])
4416
4380
  ]),
4417
- T(Ve, {
4381
+ I(Ve, {
4418
4382
  teleport: "#modal",
4419
4383
  visible: d.value,
4420
4384
  title: "Створити дашборд",
4421
- onClose: $[3] || ($[3] = (_) => d.value = !1)
4385
+ onClose: _[3] || (_[3] = ($) => d.value = !1)
4422
4386
  }, {
4423
4387
  footer: j(() => [
4424
4388
  c("div", Bn, [
4425
4389
  c("button", {
4426
4390
  type: "button",
4427
4391
  class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",
4428
- onClick: $[2] || ($[2] = (_) => d.value = !1)
4392
+ onClick: _[2] || (_[2] = ($) => d.value = !1)
4429
4393
  }, " Скасувати "),
4430
4394
  c("button", {
4431
4395
  type: "button",
@@ -4435,24 +4399,24 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4435
4399
  ])
4436
4400
  ]),
4437
4401
  default: j(() => [
4438
- T(N(e), {
4402
+ I(E(e), {
4439
4403
  ref_key: "createFormRef",
4440
4404
  ref: l,
4441
- schema: N(t),
4405
+ schema: E(t),
4442
4406
  values: u.value,
4443
- "onUpdate:values": $[1] || ($[1] = (_) => u.value = _)
4407
+ "onUpdate:values": _[1] || (_[1] = ($) => u.value = $)
4444
4408
  }, null, 8, ["schema", "values"])
4445
4409
  ]),
4446
4410
  _: 1
4447
4411
  }, 8, ["visible"]),
4448
4412
  c("div", On, [
4449
4413
  c("div", Pn, [
4450
- T(N(Wt), {
4414
+ I(E(Wt), {
4451
4415
  size: 24,
4452
4416
  class: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"
4453
4417
  }),
4454
4418
  et(c("input", {
4455
- "onUpdate:modelValue": $[4] || ($[4] = (_) => p.value = _),
4419
+ "onUpdate:modelValue": _[4] || (_[4] = ($) => p.value = $),
4456
4420
  type: "text",
4457
4421
  placeholder: "Пошук дашбордів...",
4458
4422
  class: "w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
@@ -4462,46 +4426,46 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4462
4426
  ]),
4463
4427
  c("div", An, [
4464
4428
  et(c("select", {
4465
- "onUpdate:modelValue": $[5] || ($[5] = (_) => v.value = _),
4429
+ "onUpdate:modelValue": _[5] || (_[5] = ($) => v.value = $),
4466
4430
  class: "appearance-none pl-3 pr-8 py-2 border border-gray-300 rounded-lg bg-white text-sm text-gray-700 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500"
4467
- }, [...$[8] || ($[8] = [
4431
+ }, [..._[8] || (_[8] = [
4468
4432
  c("option", { value: "title-asc" }, "Назва (А → Я)", -1),
4469
4433
  c("option", { value: "title-desc" }, "Назва (Я → А)", -1)
4470
4434
  ])], 512), [
4471
4435
  [ys, v.value]
4472
4436
  ]),
4473
- T(N(zs), {
4437
+ I(E(zs), {
4474
4438
  size: 16,
4475
4439
  class: "absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none"
4476
4440
  })
4477
4441
  ])
4478
4442
  ])
4479
4443
  ]),
4480
- m.value.length ? (h(), x("div", Fn, [
4481
- (h(!0), x(U, null, Z(m.value, (_, g) => (h(), x("div", {
4482
- key: _.routeName,
4444
+ b.value.length ? (h(), x("div", Fn, [
4445
+ (h(!0), x(U, null, Z(b.value, ($, f) => (h(), x("div", {
4446
+ key: $.routeName,
4483
4447
  class: "cursor-pointer h-full"
4484
4448
  }, [
4485
- T(Rn, {
4486
- title: _.title,
4487
- description: _.description,
4488
- modified: _.modified,
4489
- name: _.name,
4490
- reserveLines: f(g),
4491
- "dashboard-route-name": _.routeName,
4492
- "on-open-editor": N(n)
4449
+ I(Rn, {
4450
+ title: $.title,
4451
+ description: $.description,
4452
+ modified: $.modified,
4453
+ name: $.name,
4454
+ reserveLines: m(f),
4455
+ "dashboard-route-name": $.routeName,
4456
+ "on-open-editor": E(n)
4493
4457
  }, null, 8, ["title", "description", "modified", "name", "reserveLines", "dashboard-route-name", "on-open-editor"])
4494
4458
  ]))), 128))
4495
4459
  ])) : (h(), x("div", qn, [
4496
- T(N(Wt), {
4460
+ I(E(Wt), {
4497
4461
  size: 48,
4498
4462
  class: "text-gray-300 mb-4"
4499
4463
  }),
4500
- $[11] || ($[11] = c("p", { class: "text-lg font-medium text-gray-500" }, "Дашбордів не знайдено", -1)),
4464
+ _[11] || (_[11] = c("p", { class: "text-lg font-medium text-gray-500" }, "Дашбордів не знайдено", -1)),
4501
4465
  c("p", Mn, [
4502
- $[9] || ($[9] = X(" За запитом «", -1)),
4466
+ _[9] || (_[9] = X(" За запитом «", -1)),
4503
4467
  c("span", Un, W(p.value), 1),
4504
- $[10] || ($[10] = X("» нічого не знайдено. Спробуйте змінити пошуковий запит. ", -1))
4468
+ _[10] || (_[10] = X("» нічого не знайдено. Спробуйте змінити пошуковий запит. ", -1))
4505
4469
  ])
4506
4470
  ]))
4507
4471
  ])
@@ -4513,9 +4477,9 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4513
4477
  prefix: { default: "/api" }
4514
4478
  },
4515
4479
  setup(s) {
4516
- const e = s, t = q(() => e.prefix), a = we(), r = vs(), i = q(
4480
+ const e = s, t = A(() => e.prefix), a = we(), r = vs(), i = A(
4517
4481
  () => a.hasRoute(J.EditorDashboard)
4518
- ), n = I("");
4482
+ ), n = T("");
4519
4483
  le(() => {
4520
4484
  var l;
4521
4485
  if (!i.value) {
@@ -4523,20 +4487,20 @@ const Wn = { class: "flex-1 bg-gray-50" }, Nn = { class: "max-w-7xl mx-auto px-6
4523
4487
  d != null && typeof d == "string" && (n.value = d.trim());
4524
4488
  }
4525
4489
  });
4526
- const o = q(() => n.value.length > 0);
4490
+ const o = A(() => n.value.length > 0);
4527
4491
  return Qe("biSetDashboard", (l) => {
4528
4492
  n.value = l || "";
4529
4493
  }), Qe("biClearDashboard", () => {
4530
4494
  n.value = "";
4531
4495
  }), Qe("biSelectedDashboardId", ws(n)), (l, d) => {
4532
4496
  const u = K("router-view");
4533
- return i.value ? (h(), E(u, { key: 0 })) : (h(), x(U, { key: 1 }, [
4534
- o.value ? (h(), E(vn, {
4497
+ return i.value ? (h(), N(u, { key: 0 })) : (h(), x(U, { key: 1 }, [
4498
+ o.value ? (h(), N(vn, {
4535
4499
  key: `editor-${n.value}`,
4536
4500
  prefix: t.value,
4537
4501
  "dashboard-id": n.value,
4538
4502
  onBack: d[0] || (d[0] = (p) => n.value = "")
4539
- }, null, 8, ["prefix", "dashboard-id"])) : (h(), E(Gn, {
4503
+ }, null, 8, ["prefix", "dashboard-id"])) : (h(), N(Gn, {
4540
4504
  key: 0,
4541
4505
  prefix: t.value
4542
4506
  }, null, 8, ["prefix"]))
@@ -4757,9 +4721,9 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4757
4721
  var a, r, i, n, o, l, d, u, p;
4758
4722
  this.widgetInstance && this.widgetInstance.clear();
4759
4723
  try {
4760
- const v = this.$refs.chart, m = ye == null ? void 0 : ye.init(v);
4761
- if (!m) return;
4762
- const b = {
4724
+ const v = this.$refs.chart, b = ye == null ? void 0 : ye.init(v);
4725
+ if (!b) return;
4726
+ const g = {
4763
4727
  tooltip: {
4764
4728
  show: ((r = (a = this.styleData) == null ? void 0 : a.tooltip) == null ? void 0 : r.show) !== !1,
4765
4729
  trigger: "axis",
@@ -4770,41 +4734,41 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4770
4734
  shadowColor: "transparent",
4771
4735
  padding: [0, 0, 0, 0],
4772
4736
  borderWidth: 0,
4773
- position: (k, D, V, y, f) => {
4774
- const [w, $] = k, [_, g] = f.contentSize, [C, z] = f.viewSize;
4775
- let R = w + 14, F = $ - g / 2;
4776
- return R + _ > C && (R = w - _ - 14), R < 0 && (R = 0), F + g > z && (F = z - g), F < 0 && (F = 0), [R, F];
4737
+ position: (k, C, S, y, m) => {
4738
+ const [w, _] = k, [$, f] = m.contentSize, [D, z] = m.viewSize;
4739
+ let V = w + 14, q = _ - f / 2;
4740
+ return V + $ > D && (V = w - $ - 14), V < 0 && (V = 0), q + f > z && (q = z - f), q < 0 && (q = 0), [V, q];
4777
4741
  },
4778
4742
  formatter: (k) => {
4779
- var g;
4780
- const V = (g = k[0]) == null ? void 0 : g.axisValue, y = V ? this.formatDate(V) : "N/A", f = [...k].filter((C) => {
4743
+ var f;
4744
+ const S = (f = k[0]) == null ? void 0 : f.axisValue, y = S ? this.formatDate(S) : "N/A", m = [...k].filter((D) => {
4781
4745
  var z;
4782
- return parseFloat(C == null ? void 0 : C.data) || ((z = C == null ? void 0 : C.data) == null ? void 0 : z.value);
4783
- }).sort((C, z) => {
4746
+ return parseFloat(D == null ? void 0 : D.data) || ((z = D == null ? void 0 : D.data) == null ? void 0 : z.value);
4747
+ }).sort((D, z) => {
4784
4748
  var Y, ie;
4785
- const R = parseFloat(((Y = C == null ? void 0 : C.data) == null ? void 0 : Y.value) ?? (C == null ? void 0 : C.data)) || 0;
4786
- return (parseFloat(((ie = z == null ? void 0 : z.data) == null ? void 0 : ie.value) ?? (z == null ? void 0 : z.data)) || 0) - R;
4787
- }), w = f.slice(0, 8), $ = f.length - w.length;
4788
- let _ = `
4749
+ const V = parseFloat(((Y = D == null ? void 0 : D.data) == null ? void 0 : Y.value) ?? (D == null ? void 0 : D.data)) || 0;
4750
+ return (parseFloat(((ie = z == null ? void 0 : z.data) == null ? void 0 : ie.value) ?? (z == null ? void 0 : z.data)) || 0) - V;
4751
+ }), w = m.slice(0, 8), _ = m.length - w.length;
4752
+ let $ = `
4789
4753
  <div style="background-color: rgba(255, 255, 255, 0.95)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
4790
4754
  <div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 px-2 py-1">
4791
4755
  ${y}
4792
4756
  </div>
4793
4757
  `;
4794
- return w.forEach((C) => {
4795
- _ += `
4758
+ return w.forEach((D) => {
4759
+ $ += `
4796
4760
  <div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 dark:text-neutral-400">
4797
4761
  <span class="flex items-center">
4798
- <span class="w-2.5 h-2.5 me-1.5 rounded-sm" style="background-color: ${C.color};"></span>
4799
- <span class="font-medium mr-[6px]">${(C == null ? void 0 : C.seriesName) === "metric" ? "Значення" : C == null ? void 0 : C.seriesName}</span>
4762
+ <span class="w-2.5 h-2.5 me-1.5 rounded-sm" style="background-color: ${D.color};"></span>
4763
+ <span class="font-medium mr-[6px]">${(D == null ? void 0 : D.seriesName) === "metric" ? "Значення" : D == null ? void 0 : D.seriesName}</span>
4800
4764
  </span>
4801
- <span>${this.getMetricValue(C == null ? void 0 : C.data)}</span>
4765
+ <span>${this.getMetricValue(D == null ? void 0 : D.data)}</span>
4802
4766
  </div>
4803
4767
  `;
4804
- }), $ > 0 && (_ += `
4768
+ }), _ > 0 && ($ += `
4805
4769
  <div class="text-xs px-2 py-0.5 text-gray-400 dark:text-neutral-500">
4806
- ... ще ${$}
4807
- </div>`), _ += "</div>", _;
4770
+ ... ще ${_}
4771
+ </div>`), $ += "</div>", $;
4808
4772
  }
4809
4773
  },
4810
4774
  xAxis: {
@@ -4814,9 +4778,9 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4814
4778
  axisLabel: {
4815
4779
  ...Mt((o = this.styleData) == null ? void 0 : o.x_axis),
4816
4780
  formatter: (k) => {
4817
- var V, y;
4818
- const D = this.formatDate(k);
4819
- return ((y = (V = this.styleData) == null ? void 0 : V.x_axis) == null ? void 0 : y.overflow) === "ellipsis" && D.length > 10 ? `${D.slice(0, 10)}...` : D;
4781
+ var S, y;
4782
+ const C = this.formatDate(k);
4783
+ return ((y = (S = this.styleData) == null ? void 0 : S.x_axis) == null ? void 0 : y.overflow) === "ellipsis" && C.length > 10 ? `${C.slice(0, 10)}...` : C;
4820
4784
  }
4821
4785
  }
4822
4786
  },
@@ -4837,7 +4801,7 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4837
4801
  ...((p = this.styleData) == null ? void 0 : p.grid) || {}
4838
4802
  }
4839
4803
  };
4840
- await m.setOption(b), m.resize(), this.widgetInstance = m, this.$emit("update:currentWidget", m);
4804
+ await b.setOption(g), b.resize(), this.widgetInstance = b, this.$emit("update:currentWidget", b);
4841
4805
  } catch (v) {
4842
4806
  console.error(v);
4843
4807
  }
@@ -4946,11 +4910,11 @@ const ye = typeof window < "u" ? window.echarts : null, pe = {
4946
4910
  (v) => parseFloat(v[this.dimensions[1]]) && v[this.dimensions[0]]
4947
4911
  ).map((v) => parseFloat(v[this.dimensions[1]]));
4948
4912
  let p;
4949
- return ((t = this.styleData) == null ? void 0 : t.stack) !== !1 ? p = this.prepareStackData() : ((a = this.styleData) == null ? void 0 : a.negative_waterfall) === !0 ? p = this.prepareNegativeWaterfall() : ((r = this.styleData) == null ? void 0 : r.waterfall) === !0 ? p = this.prepareWaterfallData(u) : ((i = this.styleData) == null ? void 0 : i.accumulative) === !0 ? p = this.prepareAccumulative(u) : p = this.dimensions.slice(1).map((m, b) => ({
4950
- name: m,
4913
+ return ((t = this.styleData) == null ? void 0 : t.stack) !== !1 ? p = this.prepareStackData() : ((a = this.styleData) == null ? void 0 : a.negative_waterfall) === !0 ? p = this.prepareNegativeWaterfall() : ((r = this.styleData) == null ? void 0 : r.waterfall) === !0 ? p = this.prepareWaterfallData(u) : ((i = this.styleData) == null ? void 0 : i.accumulative) === !0 ? p = this.prepareAccumulative(u) : p = this.dimensions.slice(1).map((b, g) => ({
4914
+ name: b,
4951
4915
  type: "bar",
4952
- stack: `a${b}`,
4953
- data: this.sourceData.filter((k) => parseFloat(k[m]) && m).map((k) => parseFloat(k[m]))
4916
+ stack: `a${g}`,
4917
+ data: this.sourceData.filter((k) => parseFloat(k[b]) && b).map((k) => parseFloat(k[b]))
4954
4918
  })), { series: p, xs: l, ys: d };
4955
4919
  } catch (n) {
4956
4920
  return console.error(n), { series: [], xs: [], ys: [] };
@@ -5111,22 +5075,22 @@ const Kn = /* @__PURE__ */ Q(Xn, [["render", Jn]]), ei = /* @__PURE__ */ Object.
5111
5075
  return console.warn("No source data available"), null;
5112
5076
  const n = Array.from(
5113
5077
  new Set(
5114
- (this.sourceData || []).map((b) => b[this.dimensions[0]])
5078
+ (this.sourceData || []).map((g) => g[this.dimensions[0]])
5115
5079
  )
5116
5080
  ), o = Array.from(
5117
5081
  new Set(
5118
- (this.sourceData || []).map((b) => b[this.dimensions[1]])
5082
+ (this.sourceData || []).map((g) => g[this.dimensions[1]])
5119
5083
  )
5120
5084
  ), l = parseInt(
5121
5085
  (this.sourceData || []).reduce(
5122
- (b, k) => b + parseFloat((k == null ? void 0 : k.metric) || 0),
5086
+ (g, k) => g + parseFloat((k == null ? void 0 : k.metric) || 0),
5123
5087
  0
5124
5088
  ),
5125
5089
  10
5126
- ), d = n.map((b, k) => {
5127
- const D = (o[k] / l * 100).toFixed(2);
5090
+ ), d = n.map((g, k) => {
5091
+ const C = (o[k] / l * 100).toFixed(2);
5128
5092
  return {
5129
- name: `${b} (${D}%)`,
5093
+ name: `${g} (${C}%)`,
5130
5094
  value: o[k]
5131
5095
  };
5132
5096
  }), u = ((e = this.styleData) == null ? void 0 : e.innerRadius) || "80%", p = ((t = this.styleData) == null ? void 0 : t.outerRadius) || "100%", v = [u, p];
@@ -5138,9 +5102,9 @@ const Kn = /* @__PURE__ */ Q(Xn, [["render", Jn]]), ei = /* @__PURE__ */ Object.
5138
5102
  type: "scroll",
5139
5103
  itemWidth: 14,
5140
5104
  itemHeight: 14,
5141
- formatter: (b) => {
5105
+ formatter: (g) => {
5142
5106
  var k;
5143
- return (k = b == null ? void 0 : b.replace("null", "Не визначено")) == null ? void 0 : k.replace("NaN", "0.00");
5107
+ return (k = g == null ? void 0 : g.replace("null", "Не визначено")) == null ? void 0 : k.replace("NaN", "0.00");
5144
5108
  },
5145
5109
  ...((a = this.styleData) == null ? void 0 : a.legend) || {}
5146
5110
  }), this.styleData.label = Me.getLabelOptions(
@@ -5282,23 +5246,23 @@ const ri = /* @__PURE__ */ Q(ti, [["render", ai]]), ni = /* @__PURE__ */ Object.
5282
5246
  this.styleData = this.styleData || {};
5283
5247
  const i = Array.from(
5284
5248
  new Set(
5285
- (this.sourceData || []).map((m) => m[this.dimensions[0]])
5249
+ (this.sourceData || []).map((b) => b[this.dimensions[0]])
5286
5250
  )
5287
5251
  ), n = Array.from(
5288
5252
  new Set(
5289
- (this.sourceData || []).map((m) => m[this.dimensions[1]])
5253
+ (this.sourceData || []).map((b) => b[this.dimensions[1]])
5290
5254
  )
5291
5255
  ), o = parseInt(
5292
5256
  (this.sourceData || []).reduce(
5293
- (m, b) => m + parseFloat(b == null ? void 0 : b.metric),
5257
+ (b, g) => b + parseFloat(g == null ? void 0 : g.metric),
5294
5258
  0
5295
5259
  ),
5296
5260
  10
5297
- ), l = i.map((m, b) => {
5298
- const k = (n[b] / o * 100).toFixed(2);
5261
+ ), l = i.map((b, g) => {
5262
+ const k = (n[g] / o * 100).toFixed(2);
5299
5263
  return {
5300
- name: `${m} (${k}%)`,
5301
- value: n[b]
5264
+ name: `${b} (${k}%)`,
5265
+ value: n[g]
5302
5266
  };
5303
5267
  }), d = ((s = this.styleData) == null ? void 0 : s.innerRadius) || "0%", u = ((e = this.styleData) == null ? void 0 : e.outerRadius) || "100%", p = [d, u];
5304
5268
  return this.styleData.legend = Me.getLegendOpions({
@@ -5308,7 +5272,7 @@ const ri = /* @__PURE__ */ Q(ti, [["render", ai]]), ni = /* @__PURE__ */ Object.
5308
5272
  type: "scroll",
5309
5273
  itemWidth: 14,
5310
5274
  itemHeight: 14,
5311
- formatter: (m) => m == null ? void 0 : m.replace("null", "Не визначено"),
5275
+ formatter: (b) => b == null ? void 0 : b.replace("null", "Не визначено"),
5312
5276
  textStyle: { fontSize: "14px" },
5313
5277
  ...((t = this.styleData) == null ? void 0 : t.legend) || {}
5314
5278
  }), this.styleData.label = Me.getLabelOptions(
@@ -5502,7 +5466,7 @@ function Ii(s, e, t, a, r, i) {
5502
5466
  onMouseover: (v) => r.showTooltip = o,
5503
5467
  onMouseleave: e[0] || (e[0] = (v) => r.showTooltip = -1)
5504
5468
  }, [
5505
- r.showTooltip > -1 ? (h(), x("div", ki, W(s.sourceData[r.showTooltip][r.columns[0]]) + " " + W((parseFloat((p = (d = s.sourceData) == null ? void 0 : d[r.showTooltip]) == null ? void 0 : p[(u = r.columns) == null ? void 0 : u[1]]) / r.sumValue * 100).toFixed(2)) + "% ", 1)) : A("", !0)
5469
+ r.showTooltip > -1 ? (h(), x("div", ki, W(s.sourceData[r.showTooltip][r.columns[0]]) + " " + W((parseFloat((p = (d = s.sourceData) == null ? void 0 : d[r.showTooltip]) == null ? void 0 : p[(u = r.columns) == null ? void 0 : u[1]]) / r.sumValue * 100).toFixed(2)) + "% ", 1)) : F("", !0)
5506
5470
  ], 46, vi);
5507
5471
  }), 256))
5508
5472
  ]),
@@ -5591,7 +5555,7 @@ function Fi(s, e, t, a, r, i) {
5591
5555
  ]))), 256))
5592
5556
  ])
5593
5557
  ])
5594
- ])) : A("", !0);
5558
+ ])) : F("", !0);
5595
5559
  }
5596
5560
  const qi = /* @__PURE__ */ Q(Vi, [["render", Fi]]), Mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5597
5561
  __proto__: null,