@opengis/bi 1.2.18 → 1.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bi.umd.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(_e,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(_e=typeof globalThis<"u"?globalThis:_e||self,e(_e.bi={},_e.Vue))})(this,function(_e,e){"use strict";var tI=Object.defineProperty;var aI=(_e,e,mt)=>e in _e?tI(_e,e,{enumerable:!0,configurable:!0,writable:!0,value:mt}):_e[e]=mt;var Be=(_e,e,mt)=>aI(_e,typeof e!="symbol"?e+"":e,mt);/**
1
+ (function(Ee,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(Ee=typeof globalThis<"u"?globalThis:Ee||self,e(Ee.bi={},Ee.Vue))})(this,function(Ee,e){"use strict";var tI=Object.defineProperty;var aI=(Ee,e,mt)=>e in Ee?tI(Ee,e,{enumerable:!0,configurable:!0,writable:!0,value:mt}):Ee[e]=mt;var Be=(Ee,e,mt)=>aI(Ee,typeof e!="symbol"?e+"":e,mt);/**
2
2
  * @license lucide-vue-next v0.546.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -173,12 +173,12 @@
173
173
  *
174
174
  * This source code is licensed under the ISC license.
175
175
  * See the LICENSE file in the root directory of this source tree.
176
- */const _n=r("align-vertical-distribute-start",[["rect",{width:"14",height:"6",x:"5",y:"14",rx:"2",key:"jmoj9s"}],["rect",{width:"10",height:"6",x:"7",y:"4",rx:"2",key:"aza5on"}],["path",{d:"M2 14h20",key:"myj16y"}],["path",{d:"M2 4h20",key:"mda7wb"}]]);/**
176
+ */const En=r("align-vertical-distribute-start",[["rect",{width:"14",height:"6",x:"5",y:"14",rx:"2",key:"jmoj9s"}],["rect",{width:"10",height:"6",x:"7",y:"4",rx:"2",key:"aza5on"}],["path",{d:"M2 14h20",key:"myj16y"}],["path",{d:"M2 4h20",key:"mda7wb"}]]);/**
177
177
  * @license lucide-vue-next v0.546.0 - ISC
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const En=r("align-vertical-justify-center",[["rect",{width:"14",height:"6",x:"5",y:"16",rx:"2",key:"1i8z2d"}],["rect",{width:"10",height:"6",x:"7",y:"2",rx:"2",key:"ypihtt"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
181
+ */const _n=r("align-vertical-justify-center",[["rect",{width:"14",height:"6",x:"5",y:"16",rx:"2",key:"1i8z2d"}],["rect",{width:"10",height:"6",x:"7",y:"2",rx:"2",key:"ypihtt"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
182
182
  * @license lucide-vue-next v0.546.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
@@ -438,12 +438,12 @@
438
438
  *
439
439
  * This source code is licensed under the ISC license.
440
440
  * See the LICENSE file in the root directory of this source tree.
441
- */const _o=r("arrow-up-1-0",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M17 10V4h-2",key:"zcsr5x"}],["path",{d:"M15 10h4",key:"id2lce"}],["rect",{x:"15",y:"14",width:"4",height:"6",ry:"2",key:"33xykx"}]]);/**
441
+ */const Eo=r("arrow-up-1-0",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M17 10V4h-2",key:"zcsr5x"}],["path",{d:"M15 10h4",key:"id2lce"}],["rect",{x:"15",y:"14",width:"4",height:"6",ry:"2",key:"33xykx"}]]);/**
442
442
  * @license lucide-vue-next v0.546.0 - ISC
443
443
  *
444
444
  * This source code is licensed under the ISC license.
445
445
  * See the LICENSE file in the root directory of this source tree.
446
- */const Eo=r("arrow-up-a-z",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]);/**
446
+ */const _o=r("arrow-up-a-z",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]);/**
447
447
  * @license lucide-vue-next v0.546.0 - ISC
448
448
  *
449
449
  * This source code is licensed under the ISC license.
@@ -708,12 +708,12 @@
708
708
  *
709
709
  * This source code is licensed under the ISC license.
710
710
  * See the LICENSE file in the root directory of this source tree.
711
- */const _0=r("battery-full",[["path",{d:"M10 10v4",key:"1mb2ec"}],["path",{d:"M14 10v4",key:"1nt88p"}],["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M6 10v4",key:"1n77qd"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]]);/**
711
+ */const E0=r("battery-full",[["path",{d:"M10 10v4",key:"1mb2ec"}],["path",{d:"M14 10v4",key:"1nt88p"}],["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M6 10v4",key:"1n77qd"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]]);/**
712
712
  * @license lucide-vue-next v0.546.0 - ISC
713
713
  *
714
714
  * This source code is licensed under the ISC license.
715
715
  * See the LICENSE file in the root directory of this source tree.
716
- */const E0=r("battery-low",[["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M6 14v-4",key:"14a6bd"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]]);/**
716
+ */const _0=r("battery-low",[["path",{d:"M22 14v-4",key:"14q9d5"}],["path",{d:"M6 14v-4",key:"14a6bd"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]]);/**
717
717
  * @license lucide-vue-next v0.546.0 - ISC
718
718
  *
719
719
  * This source code is licensed under the ISC license.
@@ -978,12 +978,12 @@
978
978
  *
979
979
  * This source code is licensed under the ISC license.
980
980
  * See the LICENSE file in the root directory of this source tree.
981
- */const _2=r("book-key",[["path",{d:"m19 3 1 1",key:"ze14oc"}],["path",{d:"m20 2-4.5 4.5",key:"1sppr8"}],["path",{d:"M20 7.898V21a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"1xzogz"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2h7.844",key:"vtdg6h"}],["circle",{cx:"14",cy:"8",r:"2",key:"u49eql"}]]);/**
981
+ */const E2=r("book-key",[["path",{d:"m19 3 1 1",key:"ze14oc"}],["path",{d:"m20 2-4.5 4.5",key:"1sppr8"}],["path",{d:"M20 7.898V21a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"1xzogz"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2h7.844",key:"vtdg6h"}],["circle",{cx:"14",cy:"8",r:"2",key:"u49eql"}]]);/**
982
982
  * @license lucide-vue-next v0.546.0 - ISC
983
983
  *
984
984
  * This source code is licensed under the ISC license.
985
985
  * See the LICENSE file in the root directory of this source tree.
986
- */const E2=r("book-lock",[["path",{d:"M18 6V4a2 2 0 1 0-4 0v2",key:"1aquzs"}],["path",{d:"M20 15v6a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"1rkj32"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H10",key:"18wgow"}],["rect",{x:"12",y:"6",width:"8",height:"5",rx:"1",key:"73l30o"}]]);/**
986
+ */const _2=r("book-lock",[["path",{d:"M18 6V4a2 2 0 1 0-4 0v2",key:"1aquzs"}],["path",{d:"M20 15v6a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"1rkj32"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H10",key:"18wgow"}],["rect",{x:"12",y:"6",width:"8",height:"5",rx:"1",key:"73l30o"}]]);/**
987
987
  * @license lucide-vue-next v0.546.0 - ISC
988
988
  *
989
989
  * This source code is licensed under the ISC license.
@@ -1248,12 +1248,12 @@
1248
1248
  *
1249
1249
  * This source code is licensed under the ISC license.
1250
1250
  * See the LICENSE file in the root directory of this source tree.
1251
- */const _s=r("cake",[["path",{d:"M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8",key:"1w3rig"}],["path",{d:"M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1",key:"n2jgmb"}],["path",{d:"M2 21h20",key:"1nyx9w"}],["path",{d:"M7 8v3",key:"1qtyvj"}],["path",{d:"M12 8v3",key:"hwp4zt"}],["path",{d:"M17 8v3",key:"1i6e5u"}],["path",{d:"M7 4h.01",key:"1bh4kh"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M17 4h.01",key:"1upcoc"}]]);/**
1251
+ */const Es=r("cake",[["path",{d:"M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8",key:"1w3rig"}],["path",{d:"M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1",key:"n2jgmb"}],["path",{d:"M2 21h20",key:"1nyx9w"}],["path",{d:"M7 8v3",key:"1qtyvj"}],["path",{d:"M12 8v3",key:"hwp4zt"}],["path",{d:"M17 8v3",key:"1i6e5u"}],["path",{d:"M7 4h.01",key:"1bh4kh"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M17 4h.01",key:"1upcoc"}]]);/**
1252
1252
  * @license lucide-vue-next v0.546.0 - ISC
1253
1253
  *
1254
1254
  * This source code is licensed under the ISC license.
1255
1255
  * See the LICENSE file in the root directory of this source tree.
1256
- */const Es=r("calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
1256
+ */const _s=r("calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
1257
1257
  * @license lucide-vue-next v0.546.0 - ISC
1258
1258
  *
1259
1259
  * This source code is licensed under the ISC license.
@@ -1518,12 +1518,12 @@
1518
1518
  *
1519
1519
  * This source code is licensed under the ISC license.
1520
1520
  * See the LICENSE file in the root directory of this source tree.
1521
- */const _i=r("chart-column-increasing",[["path",{d:"M13 17V9",key:"1fwyjl"}],["path",{d:"M18 17V5",key:"sfb6ij"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
1521
+ */const Ei=r("chart-column-increasing",[["path",{d:"M13 17V9",key:"1fwyjl"}],["path",{d:"M18 17V5",key:"sfb6ij"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
1522
1522
  * @license lucide-vue-next v0.546.0 - ISC
1523
1523
  *
1524
1524
  * This source code is licensed under the ISC license.
1525
1525
  * See the LICENSE file in the root directory of this source tree.
1526
- */const Ei=r("chart-column-stacked",[["path",{d:"M11 13H7",key:"t0o9gq"}],["path",{d:"M19 9h-4",key:"rera1j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]]);/**
1526
+ */const _i=r("chart-column-stacked",[["path",{d:"M11 13H7",key:"t0o9gq"}],["path",{d:"M19 9h-4",key:"rera1j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["rect",{x:"15",y:"5",width:"4",height:"12",rx:"1",key:"q8uenq"}],["rect",{x:"7",y:"8",width:"4",height:"9",rx:"1",key:"sr5ea"}]]);/**
1527
1527
  * @license lucide-vue-next v0.546.0 - ISC
1528
1528
  *
1529
1529
  * This source code is licensed under the ISC license.
@@ -1793,12 +1793,12 @@
1793
1793
  *
1794
1794
  * This source code is licensed under the ISC license.
1795
1795
  * See the LICENSE file in the root directory of this source tree.
1796
- */const _d=r("circle-dollar-sign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/**
1796
+ */const Ed=r("circle-dollar-sign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/**
1797
1797
  * @license lucide-vue-next v0.546.0 - ISC
1798
1798
  *
1799
1799
  * This source code is licensed under the ISC license.
1800
1800
  * See the LICENSE file in the root directory of this source tree.
1801
- */const Ed=r("circle-dot-dashed",[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
1801
+ */const _d=r("circle-dot-dashed",[["path",{d:"M10.1 2.18a9.93 9.93 0 0 1 3.8 0",key:"1qdqn0"}],["path",{d:"M17.6 3.71a9.95 9.95 0 0 1 2.69 2.7",key:"1bq7p6"}],["path",{d:"M21.82 10.1a9.93 9.93 0 0 1 0 3.8",key:"1rlaqf"}],["path",{d:"M20.29 17.6a9.95 9.95 0 0 1-2.7 2.69",key:"1xk03u"}],["path",{d:"M13.9 21.82a9.94 9.94 0 0 1-3.8 0",key:"l7re25"}],["path",{d:"M6.4 20.29a9.95 9.95 0 0 1-2.69-2.7",key:"1v18p6"}],["path",{d:"M2.18 13.9a9.93 9.93 0 0 1 0-3.8",key:"xdo6bj"}],["path",{d:"M3.71 6.4a9.95 9.95 0 0 1 2.7-2.69",key:"1jjmaz"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
1802
1802
  * @license lucide-vue-next v0.546.0 - ISC
1803
1803
  *
1804
1804
  * This source code is licensed under the ISC license.
@@ -2063,12 +2063,12 @@
2063
2063
  *
2064
2064
  * This source code is licensed under the ISC license.
2065
2065
  * See the LICENSE file in the root directory of this source tree.
2066
- */const _c=r("clock-9",[["path",{d:"M12 6v6H8",key:"u39vzm"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
2066
+ */const Ec=r("clock-9",[["path",{d:"M12 6v6H8",key:"u39vzm"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
2067
2067
  * @license lucide-vue-next v0.546.0 - ISC
2068
2068
  *
2069
2069
  * This source code is licensed under the ISC license.
2070
2070
  * See the LICENSE file in the root directory of this source tree.
2071
- */const Ec=r("clock-alert",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["path",{d:"M20 12v5",key:"12wsvk"}],["path",{d:"M20 21h.01",key:"1p6o6n"}],["path",{d:"M21.25 8.2A10 10 0 1 0 16 21.16",key:"17fp9f"}]]);/**
2071
+ */const _c=r("clock-alert",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["path",{d:"M20 12v5",key:"12wsvk"}],["path",{d:"M20 21h.01",key:"1p6o6n"}],["path",{d:"M21.25 8.2A10 10 0 1 0 16 21.16",key:"17fp9f"}]]);/**
2072
2072
  * @license lucide-vue-next v0.546.0 - ISC
2073
2073
  *
2074
2074
  * This source code is licensed under the ISC license.
@@ -2333,12 +2333,12 @@
2333
2333
  *
2334
2334
  * This source code is licensed under the ISC license.
2335
2335
  * See the LICENSE file in the root directory of this source tree.
2336
- */const _h=r("copy-check",[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
2336
+ */const Eh=r("copy-check",[["path",{d:"m12 15 2 2 4-4",key:"2c609p"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
2337
2337
  * @license lucide-vue-next v0.546.0 - ISC
2338
2338
  *
2339
2339
  * This source code is licensed under the ISC license.
2340
2340
  * See the LICENSE file in the root directory of this source tree.
2341
- */const Eh=r("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
2341
+ */const _h=r("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
2342
2342
  * @license lucide-vue-next v0.546.0 - ISC
2343
2343
  *
2344
2344
  * This source code is licensed under the ISC license.
@@ -2603,12 +2603,12 @@
2603
2603
  *
2604
2604
  * This source code is licensed under the ISC license.
2605
2605
  * See the LICENSE file in the root directory of this source tree.
2606
- */const _p=r("dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/**
2606
+ */const Ep=r("dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/**
2607
2607
  * @license lucide-vue-next v0.546.0 - ISC
2608
2608
  *
2609
2609
  * This source code is licensed under the ISC license.
2610
2610
  * See the LICENSE file in the root directory of this source tree.
2611
- */const Ep=r("dna-off",[["path",{d:"M15 2c-1.35 1.5-2.092 3-2.5 4.5L14 8",key:"1bivrr"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c3.333-3 6.667-3 10-3",key:"nxix30"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M22 9c-1.5 1.35-3 2.092-4.5 2.5l-1-1",key:"18cutr"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.35-1.5 2.092-3 2.5-4.5L10 16",key:"rlvei3"}]]);/**
2611
+ */const _p=r("dna-off",[["path",{d:"M15 2c-1.35 1.5-2.092 3-2.5 4.5L14 8",key:"1bivrr"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c3.333-3 6.667-3 10-3",key:"nxix30"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M22 9c-1.5 1.35-3 2.092-4.5 2.5l-1-1",key:"18cutr"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.35-1.5 2.092-3 2.5-4.5L10 16",key:"rlvei3"}]]);/**
2612
2612
  * @license lucide-vue-next v0.546.0 - ISC
2613
2613
  *
2614
2614
  * This source code is licensed under the ISC license.
@@ -2883,12 +2883,12 @@
2883
2883
  *
2884
2884
  * This source code is licensed under the ISC license.
2885
2885
  * See the LICENSE file in the root directory of this source tree.
2886
- */const _y=r("file-badge-2",[["path",{d:"m13.69 12.479 1.29 4.88a.5.5 0 0 1-.697.591l-1.844-.849a1 1 0 0 0-.88.001l-1.846.85a.5.5 0 0 1-.693-.593l1.29-4.88",key:"7a4gmr"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
2886
+ */const Ey=r("file-badge-2",[["path",{d:"m13.69 12.479 1.29 4.88a.5.5 0 0 1-.697.591l-1.844-.849a1 1 0 0 0-.88.001l-1.846.85a.5.5 0 0 1-.693-.593l1.29-4.88",key:"7a4gmr"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
2887
2887
  * @license lucide-vue-next v0.546.0 - ISC
2888
2888
  *
2889
2889
  * This source code is licensed under the ISC license.
2890
2890
  * See the LICENSE file in the root directory of this source tree.
2891
- */const Ey=r("file-badge",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3.072",key:"n6s66f"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m6.69 16.479 1.29 4.88a.5.5 0 0 1-.698.591l-1.843-.849a1 1 0 0 0-.88.001l-1.846.85a.5.5 0 0 1-.693-.593l1.29-4.88",key:"1e6yvx"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
2891
+ */const _y=r("file-badge",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3.072",key:"n6s66f"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m6.69 16.479 1.29 4.88a.5.5 0 0 1-.698.591l-1.843-.849a1 1 0 0 0-.88.001l-1.846.85a.5.5 0 0 1-.693-.593l1.29-4.88",key:"1e6yvx"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
2892
2892
  * @license lucide-vue-next v0.546.0 - ISC
2893
2893
  *
2894
2894
  * This source code is licensed under the ISC license.
@@ -3153,12 +3153,12 @@
3153
3153
  *
3154
3154
  * This source code is licensed under the ISC license.
3155
3155
  * See the LICENSE file in the root directory of this source tree.
3156
- */const _u=r("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
3156
+ */const Eu=r("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
3157
3157
  * @license lucide-vue-next v0.546.0 - ISC
3158
3158
  *
3159
3159
  * This source code is licensed under the ISC license.
3160
3160
  * See the LICENSE file in the root directory of this source tree.
3161
- */const Eu=r("files",[["path",{d:"M15 2a2 2 0 0 1 1.414.586l4 4A2 2 0 0 1 21 8v7a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z",key:"1vo8kb"}],["path",{d:"M15 2v4a2 2 0 0 0 2 2h4",key:"sud9ri"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]);/**
3161
+ */const _u=r("files",[["path",{d:"M15 2a2 2 0 0 1 1.414.586l4 4A2 2 0 0 1 21 8v7a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z",key:"1vo8kb"}],["path",{d:"M15 2v4a2 2 0 0 0 2 2h4",key:"sud9ri"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]);/**
3162
3162
  * @license lucide-vue-next v0.546.0 - ISC
3163
3163
  *
3164
3164
  * This source code is licensed under the ISC license.
@@ -3423,12 +3423,12 @@
3423
3423
  *
3424
3424
  * This source code is licensed under the ISC license.
3425
3425
  * See the LICENSE file in the root directory of this source tree.
3426
- */const _k=r("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
3426
+ */const Ek=r("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
3427
3427
  * @license lucide-vue-next v0.546.0 - ISC
3428
3428
  *
3429
3429
  * This source code is licensed under the ISC license.
3430
3430
  * See the LICENSE file in the root directory of this source tree.
3431
- */const Ek=r("folder-up",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);/**
3431
+ */const _k=r("folder-up",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);/**
3432
3432
  * @license lucide-vue-next v0.546.0 - ISC
3433
3433
  *
3434
3434
  * This source code is licensed under the ISC license.
@@ -3698,12 +3698,12 @@
3698
3698
  *
3699
3699
  * This source code is licensed under the ISC license.
3700
3700
  * See the LICENSE file in the root directory of this source tree.
3701
- */const _4=r("grid-2x2-plus",[["path",{d:"M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3",key:"11za1p"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 22v-6",key:"qhmiwi"}]]);/**
3701
+ */const E4=r("grid-2x2-plus",[["path",{d:"M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3",key:"11za1p"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 22v-6",key:"qhmiwi"}]]);/**
3702
3702
  * @license lucide-vue-next v0.546.0 - ISC
3703
3703
  *
3704
3704
  * This source code is licensed under the ISC license.
3705
3705
  * See the LICENSE file in the root directory of this source tree.
3706
- */const E4=r("grid-2x2-x",[["path",{d:"M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3",key:"11za1p"}],["path",{d:"m16 16 5 5",key:"8tpb07"}],["path",{d:"m16 21 5-5",key:"193jll"}]]);/**
3706
+ */const _4=r("grid-2x2-x",[["path",{d:"M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3",key:"11za1p"}],["path",{d:"m16 16 5 5",key:"8tpb07"}],["path",{d:"m16 21 5-5",key:"193jll"}]]);/**
3707
3707
  * @license lucide-vue-next v0.546.0 - ISC
3708
3708
  *
3709
3709
  * This source code is licensed under the ISC license.
@@ -3973,12 +3973,12 @@
3973
3973
  *
3974
3974
  * This source code is licensed under the ISC license.
3975
3975
  * See the LICENSE file in the root directory of this source tree.
3976
- */const _m=r("hotel",[["path",{d:"M10 22v-6.57",key:"1wmca3"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M12 7h.01",key:"1ivr5q"}],["path",{d:"M14 15.43V22",key:"1q2vjd"}],["path",{d:"M15 16a5 5 0 0 0-6 0",key:"o9wqvi"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M16 7h.01",key:"1kdx03"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 7h.01",key:"1vti4s"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]]);/**
3976
+ */const Em=r("hotel",[["path",{d:"M10 22v-6.57",key:"1wmca3"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M12 7h.01",key:"1ivr5q"}],["path",{d:"M14 15.43V22",key:"1q2vjd"}],["path",{d:"M15 16a5 5 0 0 0-6 0",key:"o9wqvi"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M16 7h.01",key:"1kdx03"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 7h.01",key:"1vti4s"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]]);/**
3977
3977
  * @license lucide-vue-next v0.546.0 - ISC
3978
3978
  *
3979
3979
  * This source code is licensed under the ISC license.
3980
3980
  * See the LICENSE file in the root directory of this source tree.
3981
- */const Em=r("hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
3981
+ */const _m=r("hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
3982
3982
  * @license lucide-vue-next v0.546.0 - ISC
3983
3983
  *
3984
3984
  * This source code is licensed under the ISC license.
@@ -4248,12 +4248,12 @@
4248
4248
  *
4249
4249
  * This source code is licensed under the ISC license.
4250
4250
  * See the LICENSE file in the root directory of this source tree.
4251
- */const _5=r("layers-2",[["path",{d:"M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z",key:"15q6uc"}],["path",{d:"m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845",key:"byia6g"}]]);/**
4251
+ */const E5=r("layers-2",[["path",{d:"M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z",key:"15q6uc"}],["path",{d:"m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845",key:"byia6g"}]]);/**
4252
4252
  * @license lucide-vue-next v0.546.0 - ISC
4253
4253
  *
4254
4254
  * This source code is licensed under the ISC license.
4255
4255
  * See the LICENSE file in the root directory of this source tree.
4256
- */const E5=r("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
4256
+ */const _5=r("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
4257
4257
  * @license lucide-vue-next v0.546.0 - ISC
4258
4258
  *
4259
4259
  * This source code is licensed under the ISC license.
@@ -4533,12 +4533,12 @@
4533
4533
  *
4534
4534
  * This source code is licensed under the ISC license.
4535
4535
  * See the LICENSE file in the root directory of this source tree.
4536
- */const _3=r("luggage",[["path",{d:"M6 20a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2",key:"1m57jg"}],["path",{d:"M8 18V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v14",key:"1l99gc"}],["path",{d:"M10 20h4",key:"ni2waw"}],["circle",{cx:"16",cy:"20",r:"2",key:"1vifvg"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]]);/**
4536
+ */const E3=r("luggage",[["path",{d:"M6 20a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2",key:"1m57jg"}],["path",{d:"M8 18V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v14",key:"1l99gc"}],["path",{d:"M10 20h4",key:"ni2waw"}],["circle",{cx:"16",cy:"20",r:"2",key:"1vifvg"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]]);/**
4537
4537
  * @license lucide-vue-next v0.546.0 - ISC
4538
4538
  *
4539
4539
  * This source code is licensed under the ISC license.
4540
4540
  * See the LICENSE file in the root directory of this source tree.
4541
- */const E3=r("magnet",[["path",{d:"m12 15 4 4",key:"lnac28"}],["path",{d:"M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z",key:"nlhkjb"}],["path",{d:"m5 8 4 4",key:"j6kj7e"}]]);/**
4541
+ */const _3=r("magnet",[["path",{d:"m12 15 4 4",key:"lnac28"}],["path",{d:"M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z",key:"nlhkjb"}],["path",{d:"m5 8 4 4",key:"j6kj7e"}]]);/**
4542
4542
  * @license lucide-vue-next v0.546.0 - ISC
4543
4543
  *
4544
4544
  * This source code is licensed under the ISC license.
@@ -4808,12 +4808,12 @@
4808
4808
  *
4809
4809
  * This source code is licensed under the ISC license.
4810
4810
  * See the LICENSE file in the root directory of this source tree.
4811
- */const _6=r("message-square-dot",[["path",{d:"M12.7 3H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H20a2 2 0 0 0 2-2v-4.7",key:"wjb7ig"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}]]);/**
4811
+ */const E6=r("message-square-dot",[["path",{d:"M12.7 3H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H20a2 2 0 0 0 2-2v-4.7",key:"wjb7ig"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}]]);/**
4812
4812
  * @license lucide-vue-next v0.546.0 - ISC
4813
4813
  *
4814
4814
  * This source code is licensed under the ISC license.
4815
4815
  * See the LICENSE file in the root directory of this source tree.
4816
- */const E6=r("message-square-heart",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7.5 9.5c0 .687.265 1.383.697 1.844l3.009 3.264a1.14 1.14 0 0 0 .407.314 1 1 0 0 0 .783-.004 1.14 1.14 0 0 0 .398-.31l3.008-3.264A2.77 2.77 0 0 0 16.5 9.5 2.5 2.5 0 0 0 12 8a2.5 2.5 0 0 0-4.5 1.5",key:"1faxuh"}]]);/**
4816
+ */const _6=r("message-square-heart",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7.5 9.5c0 .687.265 1.383.697 1.844l3.009 3.264a1.14 1.14 0 0 0 .407.314 1 1 0 0 0 .783-.004 1.14 1.14 0 0 0 .398-.31l3.008-3.264A2.77 2.77 0 0 0 16.5 9.5 2.5 2.5 0 0 0 12 8a2.5 2.5 0 0 0-4.5 1.5",key:"1faxuh"}]]);/**
4817
4817
  * @license lucide-vue-next v0.546.0 - ISC
4818
4818
  *
4819
4819
  * This source code is licensed under the ISC license.
@@ -4938,537 +4938,537 @@
4938
4938
  *
4939
4939
  * This source code is licensed under the ISC license.
4940
4940
  * See the LICENSE file in the root directory of this source tree.
4941
- */const e8=r("monitor-check",[["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4941
+ */const ef=r("monitor-check",[["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4942
4942
  * @license lucide-vue-next v0.546.0 - ISC
4943
4943
  *
4944
4944
  * This source code is licensed under the ISC license.
4945
4945
  * See the LICENSE file in the root directory of this source tree.
4946
- */const t8=r("monitor-cloud",[["path",{d:"M11 13a3 3 0 1 1 2.83-4H14a2 2 0 0 1 0 4z",key:"1da4q6"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/**
4946
+ */const tf=r("monitor-cloud",[["path",{d:"M11 13a3 3 0 1 1 2.83-4H14a2 2 0 0 1 0 4z",key:"1da4q6"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/**
4947
4947
  * @license lucide-vue-next v0.546.0 - ISC
4948
4948
  *
4949
4949
  * This source code is licensed under the ISC license.
4950
4950
  * See the LICENSE file in the root directory of this source tree.
4951
- */const a8=r("monitor-cog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
4951
+ */const af=r("monitor-cog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
4952
4952
  * @license lucide-vue-next v0.546.0 - ISC
4953
4953
  *
4954
4954
  * This source code is licensed under the ISC license.
4955
4955
  * See the LICENSE file in the root directory of this source tree.
4956
- */const r8=r("monitor-dot",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693",key:"1dx6ho"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}]]);/**
4956
+ */const rf=r("monitor-dot",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M22 12.307V15a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8.693",key:"1dx6ho"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"19",cy:"6",r:"3",key:"108a5v"}]]);/**
4957
4957
  * @license lucide-vue-next v0.546.0 - ISC
4958
4958
  *
4959
4959
  * This source code is licensed under the ISC license.
4960
4960
  * See the LICENSE file in the root directory of this source tree.
4961
- */const l8=r("monitor-down",[["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"m15 10-3 3-3-3",key:"lzhmyn"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4961
+ */const lf=r("monitor-down",[["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"m15 10-3 3-3-3",key:"lzhmyn"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4962
4962
  * @license lucide-vue-next v0.546.0 - ISC
4963
4963
  *
4964
4964
  * This source code is licensed under the ISC license.
4965
4965
  * See the LICENSE file in the root directory of this source tree.
4966
- */const n8=r("monitor-off",[["path",{d:"M17 17H4a2 2 0 0 1-2-2V5c0-1.5 1-2 1-2",key:"k0q8oc"}],["path",{d:"M22 15V5a2 2 0 0 0-2-2H9",key:"cp1ac0"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
4966
+ */const nf=r("monitor-off",[["path",{d:"M17 17H4a2 2 0 0 1-2-2V5c0-1.5 1-2 1-2",key:"k0q8oc"}],["path",{d:"M22 15V5a2 2 0 0 0-2-2H9",key:"cp1ac0"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
4967
4967
  * @license lucide-vue-next v0.546.0 - ISC
4968
4968
  *
4969
4969
  * This source code is licensed under the ISC license.
4970
4970
  * See the LICENSE file in the root directory of this source tree.
4971
- */const o8=r("monitor-pause",[["path",{d:"M10 13V7",key:"1u13u9"}],["path",{d:"M14 13V7",key:"1vj9om"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4971
+ */const of=r("monitor-pause",[["path",{d:"M10 13V7",key:"1u13u9"}],["path",{d:"M14 13V7",key:"1vj9om"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4972
4972
  * @license lucide-vue-next v0.546.0 - ISC
4973
4973
  *
4974
4974
  * This source code is licensed under the ISC license.
4975
4975
  * See the LICENSE file in the root directory of this source tree.
4976
- */const s8=r("monitor-play",[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/**
4976
+ */const sf=r("monitor-play",[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/**
4977
4977
  * @license lucide-vue-next v0.546.0 - ISC
4978
4978
  *
4979
4979
  * This source code is licensed under the ISC license.
4980
4980
  * See the LICENSE file in the root directory of this source tree.
4981
- */const i8=r("monitor-smartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);/**
4981
+ */const df=r("monitor-smartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);/**
4982
4982
  * @license lucide-vue-next v0.546.0 - ISC
4983
4983
  *
4984
4984
  * This source code is licensed under the ISC license.
4985
4985
  * See the LICENSE file in the root directory of this source tree.
4986
- */const d8=r("monitor-speaker",[["path",{d:"M5.5 20H8",key:"1k40s5"}],["path",{d:"M17 9h.01",key:"1j24nn"}],["rect",{width:"10",height:"16",x:"12",y:"4",rx:"2",key:"ixliua"}],["path",{d:"M8 6H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4",key:"1mp6e1"}],["circle",{cx:"17",cy:"15",r:"1",key:"tqvash"}]]);/**
4986
+ */const cf=r("monitor-speaker",[["path",{d:"M5.5 20H8",key:"1k40s5"}],["path",{d:"M17 9h.01",key:"1j24nn"}],["rect",{width:"10",height:"16",x:"12",y:"4",rx:"2",key:"ixliua"}],["path",{d:"M8 6H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h4",key:"1mp6e1"}],["circle",{cx:"17",cy:"15",r:"1",key:"tqvash"}]]);/**
4987
4987
  * @license lucide-vue-next v0.546.0 - ISC
4988
4988
  *
4989
4989
  * This source code is licensed under the ISC license.
4990
4990
  * See the LICENSE file in the root directory of this source tree.
4991
- */const c8=r("monitor-stop",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}],["rect",{x:"9",y:"7",width:"6",height:"6",rx:"1",key:"5m2oou"}]]);/**
4991
+ */const hf=r("monitor-stop",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}],["rect",{x:"9",y:"7",width:"6",height:"6",rx:"1",key:"5m2oou"}]]);/**
4992
4992
  * @license lucide-vue-next v0.546.0 - ISC
4993
4993
  *
4994
4994
  * This source code is licensed under the ISC license.
4995
4995
  * See the LICENSE file in the root directory of this source tree.
4996
- */const h8=r("monitor-up",[["path",{d:"m9 10 3-3 3 3",key:"11gsxs"}],["path",{d:"M12 13V7",key:"h0r20n"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4996
+ */const pf=r("monitor-up",[["path",{d:"m9 10 3-3 3 3",key:"11gsxs"}],["path",{d:"M12 13V7",key:"h0r20n"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
4997
4997
  * @license lucide-vue-next v0.546.0 - ISC
4998
4998
  *
4999
4999
  * This source code is licensed under the ISC license.
5000
5000
  * See the LICENSE file in the root directory of this source tree.
5001
- */const p8=r("monitor-x",[["path",{d:"m14.5 12.5-5-5",key:"1jahn5"}],["path",{d:"m9.5 12.5 5-5",key:"1k2t7b"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
5001
+ */const yf=r("monitor-x",[["path",{d:"m14.5 12.5-5-5",key:"1jahn5"}],["path",{d:"m9.5 12.5 5-5",key:"1k2t7b"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
5002
5002
  * @license lucide-vue-next v0.546.0 - ISC
5003
5003
  *
5004
5004
  * This source code is licensed under the ISC license.
5005
5005
  * See the LICENSE file in the root directory of this source tree.
5006
- */const y8=r("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
5006
+ */const uf=r("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
5007
5007
  * @license lucide-vue-next v0.546.0 - ISC
5008
5008
  *
5009
5009
  * This source code is licensed under the ISC license.
5010
5010
  * See the LICENSE file in the root directory of this source tree.
5011
- */const u8=r("moon-star",[["path",{d:"M18 5h4",key:"1lhgn2"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);/**
5011
+ */const kf=r("moon-star",[["path",{d:"M18 5h4",key:"1lhgn2"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);/**
5012
5012
  * @license lucide-vue-next v0.546.0 - ISC
5013
5013
  *
5014
5014
  * This source code is licensed under the ISC license.
5015
5015
  * See the LICENSE file in the root directory of this source tree.
5016
- */const k8=r("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);/**
5016
+ */const mf=r("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);/**
5017
5017
  * @license lucide-vue-next v0.546.0 - ISC
5018
5018
  *
5019
5019
  * This source code is licensed under the ISC license.
5020
5020
  * See the LICENSE file in the root directory of this source tree.
5021
- */const m8=r("motorbike",[["path",{d:"m18 14-1-3",key:"bdajw9"}],["path",{d:"m3 9 6 2a2 2 0 0 1 2-2h2a2 2 0 0 1 1.99 1.81",key:"f5fotj"}],["path",{d:"M8 17h3a1 1 0 0 0 1-1 6 6 0 0 1 6-6 1 1 0 0 0 1-1v-.75A5 5 0 0 0 17 5",key:"3i90e2"}],["circle",{cx:"19",cy:"17",r:"3",key:"1otbdv"}],["circle",{cx:"5",cy:"17",r:"3",key:"1d8p0c"}]]);/**
5021
+ */const ff=r("motorbike",[["path",{d:"m18 14-1-3",key:"bdajw9"}],["path",{d:"m3 9 6 2a2 2 0 0 1 2-2h2a2 2 0 0 1 1.99 1.81",key:"f5fotj"}],["path",{d:"M8 17h3a1 1 0 0 0 1-1 6 6 0 0 1 6-6 1 1 0 0 0 1-1v-.75A5 5 0 0 0 17 5",key:"3i90e2"}],["circle",{cx:"19",cy:"17",r:"3",key:"1otbdv"}],["circle",{cx:"5",cy:"17",r:"3",key:"1d8p0c"}]]);/**
5022
5022
  * @license lucide-vue-next v0.546.0 - ISC
5023
5023
  *
5024
5024
  * This source code is licensed under the ISC license.
5025
5025
  * See the LICENSE file in the root directory of this source tree.
5026
- */const f8=r("mountain-snow",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}],["path",{d:"M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19",key:"1pvmmp"}]]);/**
5026
+ */const gf=r("mountain-snow",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}],["path",{d:"M4.14 15.08c2.62-1.57 5.24-1.43 7.86.42 2.74 1.94 5.49 2 8.23.19",key:"1pvmmp"}]]);/**
5027
5027
  * @license lucide-vue-next v0.546.0 - ISC
5028
5028
  *
5029
5029
  * This source code is licensed under the ISC license.
5030
5030
  * See the LICENSE file in the root directory of this source tree.
5031
- */const g8=r("mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/**
5031
+ */const xf=r("mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/**
5032
5032
  * @license lucide-vue-next v0.546.0 - ISC
5033
5033
  *
5034
5034
  * This source code is licensed under the ISC license.
5035
5035
  * See the LICENSE file in the root directory of this source tree.
5036
- */const x8=r("mouse-off",[["path",{d:"M12 6v.343",key:"1gyhex"}],["path",{d:"M18.218 18.218A7 7 0 0 1 5 15V9a7 7 0 0 1 .782-3.218",key:"ukzz01"}],["path",{d:"M19 13.343V9A7 7 0 0 0 8.56 2.902",key:"104jy9"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}]]);/**
5036
+ */const Mf=r("mouse-off",[["path",{d:"M12 6v.343",key:"1gyhex"}],["path",{d:"M18.218 18.218A7 7 0 0 1 5 15V9a7 7 0 0 1 .782-3.218",key:"ukzz01"}],["path",{d:"M19 13.343V9A7 7 0 0 0 8.56 2.902",key:"104jy9"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}]]);/**
5037
5037
  * @license lucide-vue-next v0.546.0 - ISC
5038
5038
  *
5039
5039
  * This source code is licensed under the ISC license.
5040
5040
  * See the LICENSE file in the root directory of this source tree.
5041
- */const M8=r("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);/**
5041
+ */const bf=r("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);/**
5042
5042
  * @license lucide-vue-next v0.546.0 - ISC
5043
5043
  *
5044
5044
  * This source code is licensed under the ISC license.
5045
5045
  * See the LICENSE file in the root directory of this source tree.
5046
- */const b8=r("mouse-pointer-ban",[["path",{d:"M2.034 2.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.944L8.204 7.545a1 1 0 0 0-.66.66l-1.066 3.443a.5.5 0 0 1-.944.033z",key:"11pp1i"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}],["path",{d:"m11.8 11.8 8.4 8.4",key:"oogvdj"}]]);/**
5046
+ */const wf=r("mouse-pointer-ban",[["path",{d:"M2.034 2.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.944L8.204 7.545a1 1 0 0 0-.66.66l-1.066 3.443a.5.5 0 0 1-.944.033z",key:"11pp1i"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}],["path",{d:"m11.8 11.8 8.4 8.4",key:"oogvdj"}]]);/**
5047
5047
  * @license lucide-vue-next v0.546.0 - ISC
5048
5048
  *
5049
5049
  * This source code is licensed under the ISC license.
5050
5050
  * See the LICENSE file in the root directory of this source tree.
5051
- */const w8=r("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/**
5051
+ */const vf=r("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/**
5052
5052
  * @license lucide-vue-next v0.546.0 - ISC
5053
5053
  *
5054
5054
  * This source code is licensed under the ISC license.
5055
5055
  * See the LICENSE file in the root directory of this source tree.
5056
- */const v8=r("mouse-pointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/**
5056
+ */const Vf=r("mouse-pointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/**
5057
5057
  * @license lucide-vue-next v0.546.0 - ISC
5058
5058
  *
5059
5059
  * This source code is licensed under the ISC license.
5060
5060
  * See the LICENSE file in the root directory of this source tree.
5061
- */const V8=r("move-3d",[["path",{d:"M5 3v16h16",key:"1mqmf9"}],["path",{d:"m5 19 6-6",key:"jh6hbb"}],["path",{d:"m2 6 3-3 3 3",key:"tkyvxa"}],["path",{d:"m18 16 3 3-3 3",key:"1d4glt"}]]);/**
5061
+ */const Cf=r("move-3d",[["path",{d:"M5 3v16h16",key:"1mqmf9"}],["path",{d:"m5 19 6-6",key:"jh6hbb"}],["path",{d:"m2 6 3-3 3 3",key:"tkyvxa"}],["path",{d:"m18 16 3 3-3 3",key:"1d4glt"}]]);/**
5062
5062
  * @license lucide-vue-next v0.546.0 - ISC
5063
5063
  *
5064
5064
  * This source code is licensed under the ISC license.
5065
5065
  * See the LICENSE file in the root directory of this source tree.
5066
- */const C8=r("mouse",[["rect",{x:"5",y:"2",width:"14",height:"20",rx:"7",key:"11ol66"}],["path",{d:"M12 6v4",key:"16clxf"}]]);/**
5066
+ */const zf=r("mouse",[["rect",{x:"5",y:"2",width:"14",height:"20",rx:"7",key:"11ol66"}],["path",{d:"M12 6v4",key:"16clxf"}]]);/**
5067
5067
  * @license lucide-vue-next v0.546.0 - ISC
5068
5068
  *
5069
5069
  * This source code is licensed under the ISC license.
5070
5070
  * See the LICENSE file in the root directory of this source tree.
5071
- */const z8=r("move-diagonal-2",[["path",{d:"M19 13v6h-6",key:"1hxl6d"}],["path",{d:"M5 11V5h6",key:"12e2xe"}],["path",{d:"m5 5 14 14",key:"11anup"}]]);/**
5071
+ */const Bf=r("move-diagonal-2",[["path",{d:"M19 13v6h-6",key:"1hxl6d"}],["path",{d:"M5 11V5h6",key:"12e2xe"}],["path",{d:"m5 5 14 14",key:"11anup"}]]);/**
5072
5072
  * @license lucide-vue-next v0.546.0 - ISC
5073
5073
  *
5074
5074
  * This source code is licensed under the ISC license.
5075
5075
  * See the LICENSE file in the root directory of this source tree.
5076
- */const B8=r("move-diagonal",[["path",{d:"M11 19H5v-6",key:"8awifj"}],["path",{d:"M13 5h6v6",key:"7voy1q"}],["path",{d:"M19 5 5 19",key:"wwaj1z"}]]);/**
5076
+ */const Ef=r("move-diagonal",[["path",{d:"M11 19H5v-6",key:"8awifj"}],["path",{d:"M13 5h6v6",key:"7voy1q"}],["path",{d:"M19 5 5 19",key:"wwaj1z"}]]);/**
5077
5077
  * @license lucide-vue-next v0.546.0 - ISC
5078
5078
  *
5079
5079
  * This source code is licensed under the ISC license.
5080
5080
  * See the LICENSE file in the root directory of this source tree.
5081
- */const _8=r("move-down-left",[["path",{d:"M11 19H5V13",key:"1akmht"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
5081
+ */const _f=r("move-down-left",[["path",{d:"M11 19H5V13",key:"1akmht"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
5082
5082
  * @license lucide-vue-next v0.546.0 - ISC
5083
5083
  *
5084
5084
  * This source code is licensed under the ISC license.
5085
5085
  * See the LICENSE file in the root directory of this source tree.
5086
- */const E8=r("move-down-right",[["path",{d:"M19 13V19H13",key:"10vkzq"}],["path",{d:"M5 5L19 19",key:"5zm2fv"}]]);/**
5086
+ */const qf=r("move-down-right",[["path",{d:"M19 13V19H13",key:"10vkzq"}],["path",{d:"M5 5L19 19",key:"5zm2fv"}]]);/**
5087
5087
  * @license lucide-vue-next v0.546.0 - ISC
5088
5088
  *
5089
5089
  * This source code is licensed under the ISC license.
5090
5090
  * See the LICENSE file in the root directory of this source tree.
5091
- */const q8=r("move-down",[["path",{d:"M8 18L12 22L16 18",key:"cskvfv"}],["path",{d:"M12 2V22",key:"r89rzk"}]]);/**
5091
+ */const Sf=r("move-down",[["path",{d:"M8 18L12 22L16 18",key:"cskvfv"}],["path",{d:"M12 2V22",key:"r89rzk"}]]);/**
5092
5092
  * @license lucide-vue-next v0.546.0 - ISC
5093
5093
  *
5094
5094
  * This source code is licensed under the ISC license.
5095
5095
  * See the LICENSE file in the root directory of this source tree.
5096
- */const S8=r("move-horizontal",[["path",{d:"m18 8 4 4-4 4",key:"1ak13k"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}]]);/**
5096
+ */const jf=r("move-horizontal",[["path",{d:"m18 8 4 4-4 4",key:"1ak13k"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}]]);/**
5097
5097
  * @license lucide-vue-next v0.546.0 - ISC
5098
5098
  *
5099
5099
  * This source code is licensed under the ISC license.
5100
5100
  * See the LICENSE file in the root directory of this source tree.
5101
- */const j8=r("move-left",[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/**
5101
+ */const Af=r("move-left",[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/**
5102
5102
  * @license lucide-vue-next v0.546.0 - ISC
5103
5103
  *
5104
5104
  * This source code is licensed under the ISC license.
5105
5105
  * See the LICENSE file in the root directory of this source tree.
5106
- */const A8=r("move-right",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/**
5106
+ */const Df=r("move-right",[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]]);/**
5107
5107
  * @license lucide-vue-next v0.546.0 - ISC
5108
5108
  *
5109
5109
  * This source code is licensed under the ISC license.
5110
5110
  * See the LICENSE file in the root directory of this source tree.
5111
- */const D8=r("move-up-left",[["path",{d:"M5 11V5H11",key:"3q78g9"}],["path",{d:"M5 5L19 19",key:"5zm2fv"}]]);/**
5111
+ */const Nf=r("move-up-left",[["path",{d:"M5 11V5H11",key:"3q78g9"}],["path",{d:"M5 5L19 19",key:"5zm2fv"}]]);/**
5112
5112
  * @license lucide-vue-next v0.546.0 - ISC
5113
5113
  *
5114
5114
  * This source code is licensed under the ISC license.
5115
5115
  * See the LICENSE file in the root directory of this source tree.
5116
- */const N8=r("move-up-right",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
5116
+ */const Lf=r("move-up-right",[["path",{d:"M13 5H19V11",key:"1n1gyv"}],["path",{d:"M19 5L5 19",key:"72u4yj"}]]);/**
5117
5117
  * @license lucide-vue-next v0.546.0 - ISC
5118
5118
  *
5119
5119
  * This source code is licensed under the ISC license.
5120
5120
  * See the LICENSE file in the root directory of this source tree.
5121
- */const L8=r("move-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]]);/**
5121
+ */const Hf=r("move-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]]);/**
5122
5122
  * @license lucide-vue-next v0.546.0 - ISC
5123
5123
  *
5124
5124
  * This source code is licensed under the ISC license.
5125
5125
  * See the LICENSE file in the root directory of this source tree.
5126
- */const H8=r("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);/**
5126
+ */const $f=r("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);/**
5127
5127
  * @license lucide-vue-next v0.546.0 - ISC
5128
5128
  *
5129
5129
  * This source code is licensed under the ISC license.
5130
5130
  * See the LICENSE file in the root directory of this source tree.
5131
- */const $8=r("move-up",[["path",{d:"M8 6L12 2L16 6",key:"1yvkyx"}],["path",{d:"M12 2V22",key:"r89rzk"}]]);/**
5131
+ */const Ff=r("move-up",[["path",{d:"M8 6L12 2L16 6",key:"1yvkyx"}],["path",{d:"M12 2V22",key:"r89rzk"}]]);/**
5132
5132
  * @license lucide-vue-next v0.546.0 - ISC
5133
5133
  *
5134
5134
  * This source code is licensed under the ISC license.
5135
5135
  * See the LICENSE file in the root directory of this source tree.
5136
- */const F8=r("music-2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);/**
5136
+ */const Tf=r("music-2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);/**
5137
5137
  * @license lucide-vue-next v0.546.0 - ISC
5138
5138
  *
5139
5139
  * This source code is licensed under the ISC license.
5140
5140
  * See the LICENSE file in the root directory of this source tree.
5141
- */const T8=r("music-3",[["circle",{cx:"12",cy:"18",r:"4",key:"m3r9ws"}],["path",{d:"M16 18V2",key:"40x2m5"}]]);/**
5141
+ */const Pf=r("music-3",[["circle",{cx:"12",cy:"18",r:"4",key:"m3r9ws"}],["path",{d:"M16 18V2",key:"40x2m5"}]]);/**
5142
5142
  * @license lucide-vue-next v0.546.0 - ISC
5143
5143
  *
5144
5144
  * This source code is licensed under the ISC license.
5145
5145
  * See the LICENSE file in the root directory of this source tree.
5146
- */const P8=r("music-4",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["path",{d:"m9 9 12-2",key:"1e64n2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
5146
+ */const If=r("music-4",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["path",{d:"m9 9 12-2",key:"1e64n2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
5147
5147
  * @license lucide-vue-next v0.546.0 - ISC
5148
5148
  *
5149
5149
  * This source code is licensed under the ISC license.
5150
5150
  * See the LICENSE file in the root directory of this source tree.
5151
- */const I8=r("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
5151
+ */const Rf=r("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
5152
5152
  * @license lucide-vue-next v0.546.0 - ISC
5153
5153
  *
5154
5154
  * This source code is licensed under the ISC license.
5155
5155
  * See the LICENSE file in the root directory of this source tree.
5156
- */const R8=r("navigation-2-off",[["path",{d:"M9.31 9.31 5 21l7-4 7 4-1.17-3.17",key:"qoq2o2"}],["path",{d:"M14.53 8.88 12 2l-1.17 3.17",key:"k3sjzy"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
5156
+ */const Of=r("navigation-2-off",[["path",{d:"M9.31 9.31 5 21l7-4 7 4-1.17-3.17",key:"qoq2o2"}],["path",{d:"M14.53 8.88 12 2l-1.17 3.17",key:"k3sjzy"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
5157
5157
  * @license lucide-vue-next v0.546.0 - ISC
5158
5158
  *
5159
5159
  * This source code is licensed under the ISC license.
5160
5160
  * See the LICENSE file in the root directory of this source tree.
5161
- */const O8=r("navigation-2",[["polygon",{points:"12 2 19 21 12 17 5 21 12 2",key:"x8c0qg"}]]);/**
5161
+ */const Uf=r("navigation-2",[["polygon",{points:"12 2 19 21 12 17 5 21 12 2",key:"x8c0qg"}]]);/**
5162
5162
  * @license lucide-vue-next v0.546.0 - ISC
5163
5163
  *
5164
5164
  * This source code is licensed under the ISC license.
5165
5165
  * See the LICENSE file in the root directory of this source tree.
5166
- */const U8=r("navigation-off",[["path",{d:"M8.43 8.43 3 11l8 2 2 8 2.57-5.43",key:"1vdtb7"}],["path",{d:"M17.39 11.73 22 2l-9.73 4.61",key:"tya3r6"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
5166
+ */const Zf=r("navigation-off",[["path",{d:"M8.43 8.43 3 11l8 2 2 8 2.57-5.43",key:"1vdtb7"}],["path",{d:"M17.39 11.73 22 2l-9.73 4.61",key:"tya3r6"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
5167
5167
  * @license lucide-vue-next v0.546.0 - ISC
5168
5168
  *
5169
5169
  * This source code is licensed under the ISC license.
5170
5170
  * See the LICENSE file in the root directory of this source tree.
5171
- */const Z8=r("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
5171
+ */const Wf=r("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
5172
5172
  * @license lucide-vue-next v0.546.0 - ISC
5173
5173
  *
5174
5174
  * This source code is licensed under the ISC license.
5175
5175
  * See the LICENSE file in the root directory of this source tree.
5176
- */const W8=r("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
5176
+ */const Gf=r("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
5177
5177
  * @license lucide-vue-next v0.546.0 - ISC
5178
5178
  *
5179
5179
  * This source code is licensed under the ISC license.
5180
5180
  * See the LICENSE file in the root directory of this source tree.
5181
- */const G8=r("newspaper",[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]]);/**
5181
+ */const Kf=r("newspaper",[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]]);/**
5182
5182
  * @license lucide-vue-next v0.546.0 - ISC
5183
5183
  *
5184
5184
  * This source code is licensed under the ISC license.
5185
5185
  * See the LICENSE file in the root directory of this source tree.
5186
- */const K8=r("nfc",[["path",{d:"M6 8.32a7.43 7.43 0 0 1 0 7.36",key:"9iaqei"}],["path",{d:"M9.46 6.21a11.76 11.76 0 0 1 0 11.58",key:"1yha7l"}],["path",{d:"M12.91 4.1a15.91 15.91 0 0 1 .01 15.8",key:"4iu2gk"}],["path",{d:"M16.37 2a20.16 20.16 0 0 1 0 20",key:"sap9u2"}]]);/**
5186
+ */const Jf=r("nfc",[["path",{d:"M6 8.32a7.43 7.43 0 0 1 0 7.36",key:"9iaqei"}],["path",{d:"M9.46 6.21a11.76 11.76 0 0 1 0 11.58",key:"1yha7l"}],["path",{d:"M12.91 4.1a15.91 15.91 0 0 1 .01 15.8",key:"4iu2gk"}],["path",{d:"M16.37 2a20.16 20.16 0 0 1 0 20",key:"sap9u2"}]]);/**
5187
5187
  * @license lucide-vue-next v0.546.0 - ISC
5188
5188
  *
5189
5189
  * This source code is licensed under the ISC license.
5190
5190
  * See the LICENSE file in the root directory of this source tree.
5191
- */const J8=r("non-binary",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"m8.5 4 7 4",key:"m1xjk3"}],["path",{d:"m8.5 8 7-4",key:"t0m5j6"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}]]);/**
5191
+ */const Yf=r("non-binary",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"m8.5 4 7 4",key:"m1xjk3"}],["path",{d:"m8.5 8 7-4",key:"t0m5j6"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}]]);/**
5192
5192
  * @license lucide-vue-next v0.546.0 - ISC
5193
5193
  *
5194
5194
  * This source code is licensed under the ISC license.
5195
5195
  * See the LICENSE file in the root directory of this source tree.
5196
- */const Y8=r("notebook-tabs",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M15 2v20",key:"dcj49h"}],["path",{d:"M15 7h5",key:"1xj5lc"}],["path",{d:"M15 12h5",key:"w5shd9"}],["path",{d:"M15 17h5",key:"1qaofu"}]]);/**
5196
+ */const Xf=r("notebook-tabs",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M15 2v20",key:"dcj49h"}],["path",{d:"M15 7h5",key:"1xj5lc"}],["path",{d:"M15 12h5",key:"w5shd9"}],["path",{d:"M15 17h5",key:"1qaofu"}]]);/**
5197
5197
  * @license lucide-vue-next v0.546.0 - ISC
5198
5198
  *
5199
5199
  * This source code is licensed under the ISC license.
5200
5200
  * See the LICENSE file in the root directory of this source tree.
5201
- */const X8=r("notebook-text",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M9.5 8h5",key:"11mslq"}],["path",{d:"M9.5 12H16",key:"ktog6x"}],["path",{d:"M9.5 16H14",key:"p1seyn"}]]);/**
5201
+ */const Qf=r("notebook-text",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M9.5 8h5",key:"11mslq"}],["path",{d:"M9.5 12H16",key:"ktog6x"}],["path",{d:"M9.5 16H14",key:"p1seyn"}]]);/**
5202
5202
  * @license lucide-vue-next v0.546.0 - ISC
5203
5203
  *
5204
5204
  * This source code is licensed under the ISC license.
5205
5205
  * See the LICENSE file in the root directory of this source tree.
5206
- */const Q8=r("notebook-pen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/**
5206
+ */const e8=r("notebook-pen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/**
5207
5207
  * @license lucide-vue-next v0.546.0 - ISC
5208
5208
  *
5209
5209
  * This source code is licensed under the ISC license.
5210
5210
  * See the LICENSE file in the root directory of this source tree.
5211
- */const ef=r("notebook",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]]);/**
5211
+ */const t8=r("notebook",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]]);/**
5212
5212
  * @license lucide-vue-next v0.546.0 - ISC
5213
5213
  *
5214
5214
  * This source code is licensed under the ISC license.
5215
5215
  * See the LICENSE file in the root directory of this source tree.
5216
- */const tf=r("notepad-text-dashed",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"j91f56"}],["path",{d:"M20 12v2",key:"w8o0tu"}],["path",{d:"M20 18v2a2 2 0 0 1-2 2h-1",key:"1c9ggx"}],["path",{d:"M13 22h-2",key:"191ugt"}],["path",{d:"M7 22H6a2 2 0 0 1-2-2v-2",key:"1rt9px"}],["path",{d:"M4 14v-2",key:"1v0sqh"}],["path",{d:"M4 8V6a2 2 0 0 1 2-2h2",key:"1mwabg"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]);/**
5216
+ */const a8=r("notepad-text-dashed",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"j91f56"}],["path",{d:"M20 12v2",key:"w8o0tu"}],["path",{d:"M20 18v2a2 2 0 0 1-2 2h-1",key:"1c9ggx"}],["path",{d:"M13 22h-2",key:"191ugt"}],["path",{d:"M7 22H6a2 2 0 0 1-2-2v-2",key:"1rt9px"}],["path",{d:"M4 14v-2",key:"1v0sqh"}],["path",{d:"M4 8V6a2 2 0 0 1 2-2h2",key:"1mwabg"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]);/**
5217
5217
  * @license lucide-vue-next v0.546.0 - ISC
5218
5218
  *
5219
5219
  * This source code is licensed under the ISC license.
5220
5220
  * See the LICENSE file in the root directory of this source tree.
5221
- */const af=r("notepad-text",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]);/**
5221
+ */const r8=r("notepad-text",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]);/**
5222
5222
  * @license lucide-vue-next v0.546.0 - ISC
5223
5223
  *
5224
5224
  * This source code is licensed under the ISC license.
5225
5225
  * See the LICENSE file in the root directory of this source tree.
5226
- */const rf=r("nut-off",[["path",{d:"M12 4V2",key:"1k5q1u"}],["path",{d:"M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592a7.01 7.01 0 0 0 4.125-2.939",key:"1xcvy9"}],["path",{d:"M19 10v3.343",key:"163tfc"}],["path",{d:"M12 12c-1.349-.573-1.905-1.005-2.5-2-.546.902-1.048 1.353-2.5 2-1.018-.644-1.46-1.08-2-2-1.028.71-1.69.918-3 1 1.081-1.048 1.757-2.03 2-3 .194-.776.84-1.551 1.79-2.21m11.654 5.997c.887-.457 1.28-.891 1.556-1.787 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4-.74 0-1.461.068-2.15.192",key:"17914v"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
5226
+ */const l8=r("nut-off",[["path",{d:"M12 4V2",key:"1k5q1u"}],["path",{d:"M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592a7.01 7.01 0 0 0 4.125-2.939",key:"1xcvy9"}],["path",{d:"M19 10v3.343",key:"163tfc"}],["path",{d:"M12 12c-1.349-.573-1.905-1.005-2.5-2-.546.902-1.048 1.353-2.5 2-1.018-.644-1.46-1.08-2-2-1.028.71-1.69.918-3 1 1.081-1.048 1.757-2.03 2-3 .194-.776.84-1.551 1.79-2.21m11.654 5.997c.887-.457 1.28-.891 1.556-1.787 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4-.74 0-1.461.068-2.15.192",key:"17914v"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
5227
5227
  * @license lucide-vue-next v0.546.0 - ISC
5228
5228
  *
5229
5229
  * This source code is licensed under the ISC license.
5230
5230
  * See the LICENSE file in the root directory of this source tree.
5231
- */const lf=r("nut",[["path",{d:"M12 4V2",key:"1k5q1u"}],["path",{d:"M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592A7.003 7.003 0 0 0 19 14v-4",key:"1tgyif"}],["path",{d:"M12 4C8 4 4.5 6 4 8c-.243.97-.919 1.952-2 3 1.31-.082 1.972-.29 3-1 .54.92.982 1.356 2 2 1.452-.647 1.954-1.098 2.5-2 .595.995 1.151 1.427 2.5 2 1.31-.621 1.862-1.058 2.5-2 .629.977 1.162 1.423 2.5 2 1.209-.548 1.68-.967 2-2 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4Z",key:"tnsqj"}]]);/**
5231
+ */const n8=r("nut",[["path",{d:"M12 4V2",key:"1k5q1u"}],["path",{d:"M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592A7.003 7.003 0 0 0 19 14v-4",key:"1tgyif"}],["path",{d:"M12 4C8 4 4.5 6 4 8c-.243.97-.919 1.952-2 3 1.31-.082 1.972-.29 3-1 .54.92.982 1.356 2 2 1.452-.647 1.954-1.098 2.5-2 .595.995 1.151 1.427 2.5 2 1.31-.621 1.862-1.058 2.5-2 .629.977 1.162 1.423 2.5 2 1.209-.548 1.68-.967 2-2 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4Z",key:"tnsqj"}]]);/**
5232
5232
  * @license lucide-vue-next v0.546.0 - ISC
5233
5233
  *
5234
5234
  * This source code is licensed under the ISC license.
5235
5235
  * See the LICENSE file in the root directory of this source tree.
5236
- */const nf=r("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);/**
5236
+ */const o8=r("octagon-alert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);/**
5237
5237
  * @license lucide-vue-next v0.546.0 - ISC
5238
5238
  *
5239
5239
  * This source code is licensed under the ISC license.
5240
5240
  * See the LICENSE file in the root directory of this source tree.
5241
- */const of=r("octagon-minus",[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);/**
5241
+ */const s8=r("octagon-minus",[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);/**
5242
5242
  * @license lucide-vue-next v0.546.0 - ISC
5243
5243
  *
5244
5244
  * This source code is licensed under the ISC license.
5245
5245
  * See the LICENSE file in the root directory of this source tree.
5246
- */const sf=r("octagon-pause",[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]]);/**
5246
+ */const i8=r("octagon-pause",[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]]);/**
5247
5247
  * @license lucide-vue-next v0.546.0 - ISC
5248
5248
  *
5249
5249
  * This source code is licensed under the ISC license.
5250
5250
  * See the LICENSE file in the root directory of this source tree.
5251
- */const df=r("octagon",[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]]);/**
5251
+ */const d8=r("octagon",[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]]);/**
5252
5252
  * @license lucide-vue-next v0.546.0 - ISC
5253
5253
  *
5254
5254
  * This source code is licensed under the ISC license.
5255
5255
  * See the LICENSE file in the root directory of this source tree.
5256
- */const cf=r("omega",[["path",{d:"M3 20h4.5a.5.5 0 0 0 .5-.5v-.282a.52.52 0 0 0-.247-.437 8 8 0 1 1 8.494-.001.52.52 0 0 0-.247.438v.282a.5.5 0 0 0 .5.5H21",key:"1x94xo"}]]);/**
5256
+ */const c8=r("omega",[["path",{d:"M3 20h4.5a.5.5 0 0 0 .5-.5v-.282a.52.52 0 0 0-.247-.437 8 8 0 1 1 8.494-.001.52.52 0 0 0-.247.438v.282a.5.5 0 0 0 .5.5H21",key:"1x94xo"}]]);/**
5257
5257
  * @license lucide-vue-next v0.546.0 - ISC
5258
5258
  *
5259
5259
  * This source code is licensed under the ISC license.
5260
5260
  * See the LICENSE file in the root directory of this source tree.
5261
- */const hf=r("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
5261
+ */const h8=r("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
5262
5262
  * @license lucide-vue-next v0.546.0 - ISC
5263
5263
  *
5264
5264
  * This source code is licensed under the ISC license.
5265
5265
  * See the LICENSE file in the root directory of this source tree.
5266
- */const pf=r("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
5266
+ */const p8=r("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);/**
5267
5267
  * @license lucide-vue-next v0.546.0 - ISC
5268
5268
  *
5269
5269
  * This source code is licensed under the ISC license.
5270
5270
  * See the LICENSE file in the root directory of this source tree.
5271
- */const yf=r("orbit",[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]]);/**
5271
+ */const y8=r("orbit",[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]]);/**
5272
5272
  * @license lucide-vue-next v0.546.0 - ISC
5273
5273
  *
5274
5274
  * This source code is licensed under the ISC license.
5275
5275
  * See the LICENSE file in the root directory of this source tree.
5276
- */const uf=r("origami",[["path",{d:"M12 12V4a1 1 0 0 1 1-1h6.297a1 1 0 0 1 .651 1.759l-4.696 4.025",key:"1bx4vc"}],["path",{d:"m12 21-7.414-7.414A2 2 0 0 1 4 12.172V6.415a1.002 1.002 0 0 1 1.707-.707L20 20.009",key:"1h3km6"}],["path",{d:"m12.214 3.381 8.414 14.966a1 1 0 0 1-.167 1.199l-1.168 1.163a1 1 0 0 1-.706.291H6.351a1 1 0 0 1-.625-.219L3.25 18.8a1 1 0 0 1 .631-1.781l4.165.027",key:"1hj4wg"}]]);/**
5276
+ */const u8=r("origami",[["path",{d:"M12 12V4a1 1 0 0 1 1-1h6.297a1 1 0 0 1 .651 1.759l-4.696 4.025",key:"1bx4vc"}],["path",{d:"m12 21-7.414-7.414A2 2 0 0 1 4 12.172V6.415a1.002 1.002 0 0 1 1.707-.707L20 20.009",key:"1h3km6"}],["path",{d:"m12.214 3.381 8.414 14.966a1 1 0 0 1-.167 1.199l-1.168 1.163a1 1 0 0 1-.706.291H6.351a1 1 0 0 1-.625-.219L3.25 18.8a1 1 0 0 1 .631-1.781l4.165.027",key:"1hj4wg"}]]);/**
5277
5277
  * @license lucide-vue-next v0.546.0 - ISC
5278
5278
  *
5279
5279
  * This source code is licensed under the ISC license.
5280
5280
  * See the LICENSE file in the root directory of this source tree.
5281
- */const kf=r("package-2",[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]]);/**
5281
+ */const k8=r("package-2",[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]]);/**
5282
5282
  * @license lucide-vue-next v0.546.0 - ISC
5283
5283
  *
5284
5284
  * This source code is licensed under the ISC license.
5285
5285
  * See the LICENSE file in the root directory of this source tree.
5286
- */const mf=r("package-check",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
5286
+ */const m8=r("package-check",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
5287
5287
  * @license lucide-vue-next v0.546.0 - ISC
5288
5288
  *
5289
5289
  * This source code is licensed under the ISC license.
5290
5290
  * See the LICENSE file in the root directory of this source tree.
5291
- */const ff=r("package-minus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
5291
+ */const f8=r("package-minus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
5292
5292
  * @license lucide-vue-next v0.546.0 - ISC
5293
5293
  *
5294
5294
  * This source code is licensed under the ISC license.
5295
5295
  * See the LICENSE file in the root directory of this source tree.
5296
- */const gf=r("package-open",[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]);/**
5296
+ */const g8=r("package-open",[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]);/**
5297
5297
  * @license lucide-vue-next v0.546.0 - ISC
5298
5298
  *
5299
5299
  * This source code is licensed under the ISC license.
5300
5300
  * See the LICENSE file in the root directory of this source tree.
5301
- */const xf=r("package-plus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
5301
+ */const x8=r("package-plus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
5302
5302
  * @license lucide-vue-next v0.546.0 - ISC
5303
5303
  *
5304
5304
  * This source code is licensed under the ISC license.
5305
5305
  * See the LICENSE file in the root directory of this source tree.
5306
- */const Mf=r("package-search",[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["circle",{cx:"18.5",cy:"15.5",r:"2.5",key:"b5zd12"}],["path",{d:"M20.27 17.27 22 19",key:"1l4muz"}]]);/**
5306
+ */const M8=r("package-search",[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["circle",{cx:"18.5",cy:"15.5",r:"2.5",key:"b5zd12"}],["path",{d:"M20.27 17.27 22 19",key:"1l4muz"}]]);/**
5307
5307
  * @license lucide-vue-next v0.546.0 - ISC
5308
5308
  *
5309
5309
  * This source code is licensed under the ISC license.
5310
5310
  * See the LICENSE file in the root directory of this source tree.
5311
- */const bf=r("package-x",[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["path",{d:"m17 13 5 5m-5 0 5-5",key:"im3w4b"}]]);/**
5311
+ */const b8=r("package-x",[["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}],["path",{d:"m17 13 5 5m-5 0 5-5",key:"im3w4b"}]]);/**
5312
5312
  * @license lucide-vue-next v0.546.0 - ISC
5313
5313
  *
5314
5314
  * This source code is licensed under the ISC license.
5315
5315
  * See the LICENSE file in the root directory of this source tree.
5316
- */const wf=r("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
5316
+ */const w8=r("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
5317
5317
  * @license lucide-vue-next v0.546.0 - ISC
5318
5318
  *
5319
5319
  * This source code is licensed under the ISC license.
5320
5320
  * See the LICENSE file in the root directory of this source tree.
5321
- */const vf=r("paint-bucket",[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]]);/**
5321
+ */const v8=r("paint-bucket",[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]]);/**
5322
5322
  * @license lucide-vue-next v0.546.0 - ISC
5323
5323
  *
5324
5324
  * This source code is licensed under the ISC license.
5325
5325
  * See the LICENSE file in the root directory of this source tree.
5326
- */const Vf=r("paintbrush-vertical",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v4",key:"qmzblu"}],["path",{d:"M17 2a1 1 0 0 1 1 1v9H6V3a1 1 0 0 1 1-1z",key:"ycvu00"}],["path",{d:"M6 12a1 1 0 0 0-1 1v1a2 2 0 0 0 2 2h2a1 1 0 0 1 1 1v2.9a2 2 0 1 0 4 0V17a1 1 0 0 1 1-1h2a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1",key:"iw4wnp"}]]);/**
5326
+ */const V8=r("paintbrush-vertical",[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v4",key:"qmzblu"}],["path",{d:"M17 2a1 1 0 0 1 1 1v9H6V3a1 1 0 0 1 1-1z",key:"ycvu00"}],["path",{d:"M6 12a1 1 0 0 0-1 1v1a2 2 0 0 0 2 2h2a1 1 0 0 1 1 1v2.9a2 2 0 1 0 4 0V17a1 1 0 0 1 1-1h2a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1",key:"iw4wnp"}]]);/**
5327
5327
  * @license lucide-vue-next v0.546.0 - ISC
5328
5328
  *
5329
5329
  * This source code is licensed under the ISC license.
5330
5330
  * See the LICENSE file in the root directory of this source tree.
5331
- */const Cf=r("paint-roller",[["rect",{width:"16",height:"6",x:"2",y:"2",rx:"2",key:"jcyz7m"}],["path",{d:"M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2",key:"1b9h7c"}],["rect",{width:"4",height:"6",x:"8",y:"16",rx:"1",key:"d6e7yl"}]]);/**
5331
+ */const C8=r("paint-roller",[["rect",{width:"16",height:"6",x:"2",y:"2",rx:"2",key:"jcyz7m"}],["path",{d:"M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2",key:"1b9h7c"}],["rect",{width:"4",height:"6",x:"8",y:"16",rx:"1",key:"d6e7yl"}]]);/**
5332
5332
  * @license lucide-vue-next v0.546.0 - ISC
5333
5333
  *
5334
5334
  * This source code is licensed under the ISC license.
5335
5335
  * See the LICENSE file in the root directory of this source tree.
5336
- */const zf=r("paintbrush",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);/**
5336
+ */const z8=r("paintbrush",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);/**
5337
5337
  * @license lucide-vue-next v0.546.0 - ISC
5338
5338
  *
5339
5339
  * This source code is licensed under the ISC license.
5340
5340
  * See the LICENSE file in the root directory of this source tree.
5341
- */const Bf=r("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);/**
5341
+ */const B8=r("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);/**
5342
5342
  * @license lucide-vue-next v0.546.0 - ISC
5343
5343
  *
5344
5344
  * This source code is licensed under the ISC license.
5345
5345
  * See the LICENSE file in the root directory of this source tree.
5346
- */const _f=r("panda",[["path",{d:"M11.25 17.25h1.5L12 18z",key:"1wmwwj"}],["path",{d:"m15 12 2 2",key:"k60wz4"}],["path",{d:"M18 6.5a.5.5 0 0 0-.5-.5",key:"1ch4h4"}],["path",{d:"M20.69 9.67a4.5 4.5 0 1 0-7.04-5.5 8.35 8.35 0 0 0-3.3 0 4.5 4.5 0 1 0-7.04 5.5C2.49 11.2 2 12.88 2 14.5 2 19.47 6.48 22 12 22s10-2.53 10-7.5c0-1.62-.48-3.3-1.3-4.83",key:"1c660l"}],["path",{d:"M6 6.5a.495.495 0 0 1 .5-.5",key:"eviuep"}],["path",{d:"m9 12-2 2",key:"326nkw"}]]);/**
5346
+ */const E8=r("panda",[["path",{d:"M11.25 17.25h1.5L12 18z",key:"1wmwwj"}],["path",{d:"m15 12 2 2",key:"k60wz4"}],["path",{d:"M18 6.5a.5.5 0 0 0-.5-.5",key:"1ch4h4"}],["path",{d:"M20.69 9.67a4.5 4.5 0 1 0-7.04-5.5 8.35 8.35 0 0 0-3.3 0 4.5 4.5 0 1 0-7.04 5.5C2.49 11.2 2 12.88 2 14.5 2 19.47 6.48 22 12 22s10-2.53 10-7.5c0-1.62-.48-3.3-1.3-4.83",key:"1c660l"}],["path",{d:"M6 6.5a.495.495 0 0 1 .5-.5",key:"eviuep"}],["path",{d:"m9 12-2 2",key:"326nkw"}]]);/**
5347
5347
  * @license lucide-vue-next v0.546.0 - ISC
5348
5348
  *
5349
5349
  * This source code is licensed under the ISC license.
5350
5350
  * See the LICENSE file in the root directory of this source tree.
5351
- */const Ef=r("panel-bottom-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"m15 8-3 3-3-3",key:"1oxy1z"}]]);/**
5351
+ */const _8=r("panel-bottom-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"m15 8-3 3-3-3",key:"1oxy1z"}]]);/**
5352
5352
  * @license lucide-vue-next v0.546.0 - ISC
5353
5353
  *
5354
5354
  * This source code is licensed under the ISC license.
5355
5355
  * See the LICENSE file in the root directory of this source tree.
5356
- */const qf=r("panel-bottom-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M14 15h1",key:"171nev"}],["path",{d:"M19 15h2",key:"1vnucp"}],["path",{d:"M3 15h2",key:"8bym0q"}],["path",{d:"M9 15h1",key:"1tg3ks"}]]);/**
5356
+ */const q8=r("panel-bottom-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M14 15h1",key:"171nev"}],["path",{d:"M19 15h2",key:"1vnucp"}],["path",{d:"M3 15h2",key:"8bym0q"}],["path",{d:"M9 15h1",key:"1tg3ks"}]]);/**
5357
5357
  * @license lucide-vue-next v0.546.0 - ISC
5358
5358
  *
5359
5359
  * This source code is licensed under the ISC license.
5360
5360
  * See the LICENSE file in the root directory of this source tree.
5361
- */const Sf=r("panel-bottom",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
5361
+ */const S8=r("panel-bottom",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
5362
5362
  * @license lucide-vue-next v0.546.0 - ISC
5363
5363
  *
5364
5364
  * This source code is licensed under the ISC license.
5365
5365
  * See the LICENSE file in the root directory of this source tree.
5366
- */const jf=r("panel-bottom-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"m9 10 3-3 3 3",key:"11gsxs"}]]);/**
5366
+ */const j8=r("panel-bottom-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"m9 10 3-3 3 3",key:"11gsxs"}]]);/**
5367
5367
  * @license lucide-vue-next v0.546.0 - ISC
5368
5368
  *
5369
5369
  * This source code is licensed under the ISC license.
5370
5370
  * See the LICENSE file in the root directory of this source tree.
5371
- */const Af=r("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
5371
+ */const A8=r("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
5372
5372
  * @license lucide-vue-next v0.546.0 - ISC
5373
5373
  *
5374
5374
  * This source code is licensed under the ISC license.
5375
5375
  * See the LICENSE file in the root directory of this source tree.
5376
- */const Df=r("panel-left-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 14v1",key:"askpd8"}],["path",{d:"M9 19v2",key:"16tejx"}],["path",{d:"M9 3v2",key:"1noubl"}],["path",{d:"M9 9v1",key:"19ebxg"}]]);/**
5376
+ */const D8=r("panel-left-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 14v1",key:"askpd8"}],["path",{d:"M9 19v2",key:"16tejx"}],["path",{d:"M9 3v2",key:"1noubl"}],["path",{d:"M9 9v1",key:"19ebxg"}]]);/**
5377
5377
  * @license lucide-vue-next v0.546.0 - ISC
5378
5378
  *
5379
5379
  * This source code is licensed under the ISC license.
5380
5380
  * See the LICENSE file in the root directory of this source tree.
5381
- */const Nf=r("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
5381
+ */const N8=r("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
5382
5382
  * @license lucide-vue-next v0.546.0 - ISC
5383
5383
  *
5384
5384
  * This source code is licensed under the ISC license.
5385
5385
  * See the LICENSE file in the root directory of this source tree.
5386
- */const Lf=r("panel-left-right-dashed",[["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M15 15v-1",key:"6a4afx"}],["path",{d:"M15 21v-2",key:"1qshmc"}],["path",{d:"M15 5V3",key:"1fk0mb"}],["path",{d:"M9 10V9",key:"1lazqi"}],["path",{d:"M9 15v-1",key:"9lx740"}],["path",{d:"M9 21v-2",key:"1fwk0n"}],["path",{d:"M9 5V3",key:"2q8zi6"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
5386
+ */const L8=r("panel-left-right-dashed",[["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M15 15v-1",key:"6a4afx"}],["path",{d:"M15 21v-2",key:"1qshmc"}],["path",{d:"M15 5V3",key:"1fk0mb"}],["path",{d:"M9 10V9",key:"1lazqi"}],["path",{d:"M9 15v-1",key:"9lx740"}],["path",{d:"M9 21v-2",key:"1fwk0n"}],["path",{d:"M9 5V3",key:"2q8zi6"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
5387
5387
  * @license lucide-vue-next v0.546.0 - ISC
5388
5388
  *
5389
5389
  * This source code is licensed under the ISC license.
5390
5390
  * See the LICENSE file in the root directory of this source tree.
5391
- */const Hf=r("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
5391
+ */const H8=r("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
5392
5392
  * @license lucide-vue-next v0.546.0 - ISC
5393
5393
  *
5394
5394
  * This source code is licensed under the ISC license.
5395
5395
  * See the LICENSE file in the root directory of this source tree.
5396
- */const $f=r("panel-right-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);/**
5396
+ */const $8=r("panel-right-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);/**
5397
5397
  * @license lucide-vue-next v0.546.0 - ISC
5398
5398
  *
5399
5399
  * This source code is licensed under the ISC license.
5400
5400
  * See the LICENSE file in the root directory of this source tree.
5401
- */const Ff=r("panel-right-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]);/**
5401
+ */const F8=r("panel-right-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]);/**
5402
5402
  * @license lucide-vue-next v0.546.0 - ISC
5403
5403
  *
5404
5404
  * This source code is licensed under the ISC license.
5405
5405
  * See the LICENSE file in the root directory of this source tree.
5406
- */const Tf=r("panel-right-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 14v1",key:"ilsfch"}],["path",{d:"M15 19v2",key:"1fst2f"}],["path",{d:"M15 3v2",key:"z204g4"}],["path",{d:"M15 9v1",key:"z2a8b1"}]]);/**
5406
+ */const T8=r("panel-right-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 14v1",key:"ilsfch"}],["path",{d:"M15 19v2",key:"1fst2f"}],["path",{d:"M15 3v2",key:"z204g4"}],["path",{d:"M15 9v1",key:"z2a8b1"}]]);/**
5407
5407
  * @license lucide-vue-next v0.546.0 - ISC
5408
5408
  *
5409
5409
  * This source code is licensed under the ISC license.
5410
5410
  * See the LICENSE file in the root directory of this source tree.
5411
- */const Pf=r("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
5411
+ */const P8=r("panel-right",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
5412
5412
  * @license lucide-vue-next v0.546.0 - ISC
5413
5413
  *
5414
5414
  * This source code is licensed under the ISC license.
5415
5415
  * See the LICENSE file in the root directory of this source tree.
5416
- */const If=r("panel-top-bottom-dashed",[["path",{d:"M14 15h1",key:"171nev"}],["path",{d:"M14 9h1",key:"l0svgy"}],["path",{d:"M19 15h2",key:"1vnucp"}],["path",{d:"M19 9h2",key:"te2zfg"}],["path",{d:"M3 15h2",key:"8bym0q"}],["path",{d:"M3 9h2",key:"1h4ldw"}],["path",{d:"M9 15h1",key:"1tg3ks"}],["path",{d:"M9 9h1",key:"15jzuz"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
5416
+ */const I8=r("panel-top-bottom-dashed",[["path",{d:"M14 15h1",key:"171nev"}],["path",{d:"M14 9h1",key:"l0svgy"}],["path",{d:"M19 15h2",key:"1vnucp"}],["path",{d:"M19 9h2",key:"te2zfg"}],["path",{d:"M3 15h2",key:"8bym0q"}],["path",{d:"M3 9h2",key:"1h4ldw"}],["path",{d:"M9 15h1",key:"1tg3ks"}],["path",{d:"M9 9h1",key:"15jzuz"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
5417
5417
  * @license lucide-vue-next v0.546.0 - ISC
5418
5418
  *
5419
5419
  * This source code is licensed under the ISC license.
5420
5420
  * See the LICENSE file in the root directory of this source tree.
5421
- */const Rf=r("panel-top-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 16 3-3 3 3",key:"1idcnm"}]]);/**
5421
+ */const R8=r("panel-top-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 16 3-3 3 3",key:"1idcnm"}]]);/**
5422
5422
  * @license lucide-vue-next v0.546.0 - ISC
5423
5423
  *
5424
5424
  * This source code is licensed under the ISC license.
5425
5425
  * See the LICENSE file in the root directory of this source tree.
5426
- */const Of=r("panel-top-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M14 9h1",key:"l0svgy"}],["path",{d:"M19 9h2",key:"te2zfg"}],["path",{d:"M3 9h2",key:"1h4ldw"}],["path",{d:"M9 9h1",key:"15jzuz"}]]);/**
5426
+ */const O8=r("panel-top-dashed",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M14 9h1",key:"l0svgy"}],["path",{d:"M19 9h2",key:"te2zfg"}],["path",{d:"M3 9h2",key:"1h4ldw"}],["path",{d:"M9 9h1",key:"15jzuz"}]]);/**
5427
5427
  * @license lucide-vue-next v0.546.0 - ISC
5428
5428
  *
5429
5429
  * This source code is licensed under the ISC license.
5430
5430
  * See the LICENSE file in the root directory of this source tree.
5431
- */const Uf=r("panel-top-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m15 14-3 3-3-3",key:"g215vf"}]]);/**
5431
+ */const U8=r("panel-top-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m15 14-3 3-3-3",key:"g215vf"}]]);/**
5432
5432
  * @license lucide-vue-next v0.546.0 - ISC
5433
5433
  *
5434
5434
  * This source code is licensed under the ISC license.
5435
5435
  * See the LICENSE file in the root directory of this source tree.
5436
- */const Zf=r("panel-top",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]);/**
5436
+ */const Z8=r("panel-top",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]);/**
5437
5437
  * @license lucide-vue-next v0.546.0 - ISC
5438
5438
  *
5439
5439
  * This source code is licensed under the ISC license.
5440
5440
  * See the LICENSE file in the root directory of this source tree.
5441
- */const Wf=r("panels-left-bottom",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M9 15h12",key:"5ijen5"}]]);/**
5441
+ */const W8=r("panels-left-bottom",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M9 15h12",key:"5ijen5"}]]);/**
5442
5442
  * @license lucide-vue-next v0.546.0 - ISC
5443
5443
  *
5444
5444
  * This source code is licensed under the ISC license.
5445
5445
  * See the LICENSE file in the root directory of this source tree.
5446
- */const Gf=r("panels-right-bottom",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h12",key:"1wkqb3"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
5446
+ */const G8=r("panels-right-bottom",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 15h12",key:"1wkqb3"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
5447
5447
  * @license lucide-vue-next v0.546.0 - ISC
5448
5448
  *
5449
5449
  * This source code is licensed under the ISC license.
5450
5450
  * See the LICENSE file in the root directory of this source tree.
5451
- */const Kf=r("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
5451
+ */const K8=r("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
5452
5452
  * @license lucide-vue-next v0.546.0 - ISC
5453
5453
  *
5454
5454
  * This source code is licensed under the ISC license.
5455
5455
  * See the LICENSE file in the root directory of this source tree.
5456
- */const Jf=r("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);/**
5456
+ */const J8=r("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);/**
5457
5457
  * @license lucide-vue-next v0.546.0 - ISC
5458
5458
  *
5459
5459
  * This source code is licensed under the ISC license.
5460
5460
  * See the LICENSE file in the root directory of this source tree.
5461
- */const Yf=r("parentheses",[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}]]);/**
5461
+ */const Y8=r("parentheses",[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}]]);/**
5462
5462
  * @license lucide-vue-next v0.546.0 - ISC
5463
5463
  *
5464
5464
  * This source code is licensed under the ISC license.
5465
5465
  * See the LICENSE file in the root directory of this source tree.
5466
- */const Xf=r("parking-meter",[["path",{d:"M11 15h2",key:"199qp6"}],["path",{d:"M12 12v3",key:"158kv8"}],["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15.282 19a1 1 0 0 0 .948-.68l2.37-6.988a7 7 0 1 0-13.2 0l2.37 6.988a1 1 0 0 0 .948.68z",key:"1jofit"}],["path",{d:"M9 9a3 3 0 1 1 6 0",key:"jdoeu8"}]]);/**
5466
+ */const X8=r("parking-meter",[["path",{d:"M11 15h2",key:"199qp6"}],["path",{d:"M12 12v3",key:"158kv8"}],["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15.282 19a1 1 0 0 0 .948-.68l2.37-6.988a7 7 0 1 0-13.2 0l2.37 6.988a1 1 0 0 0 .948.68z",key:"1jofit"}],["path",{d:"M9 9a3 3 0 1 1 6 0",key:"jdoeu8"}]]);/**
5467
5467
  * @license lucide-vue-next v0.546.0 - ISC
5468
5468
  *
5469
5469
  * This source code is licensed under the ISC license.
5470
5470
  * See the LICENSE file in the root directory of this source tree.
5471
- */const Qf=r("party-popper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/**
5471
+ */const Q8=r("party-popper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/**
5472
5472
  * @license lucide-vue-next v0.546.0 - ISC
5473
5473
  *
5474
5474
  * This source code is licensed under the ISC license.
@@ -5618,12 +5618,12 @@
5618
5618
  *
5619
5619
  * This source code is licensed under the ISC license.
5620
5620
  * See the LICENSE file in the root directory of this source tree.
5621
- */const _g=r("pilcrow-right",[["path",{d:"M10 3v11",key:"o3l5kj"}],["path",{d:"M10 9H7a1 1 0 0 1 0-6h8",key:"1wb1nc"}],["path",{d:"M14 3v11",key:"mlfb7b"}],["path",{d:"m18 14 4 4H2",key:"4r8io1"}],["path",{d:"m22 18-4 4",key:"1hjjrd"}]]);/**
5621
+ */const Eg=r("pilcrow-right",[["path",{d:"M10 3v11",key:"o3l5kj"}],["path",{d:"M10 9H7a1 1 0 0 1 0-6h8",key:"1wb1nc"}],["path",{d:"M14 3v11",key:"mlfb7b"}],["path",{d:"m18 14 4 4H2",key:"4r8io1"}],["path",{d:"m22 18-4 4",key:"1hjjrd"}]]);/**
5622
5622
  * @license lucide-vue-next v0.546.0 - ISC
5623
5623
  *
5624
5624
  * This source code is licensed under the ISC license.
5625
5625
  * See the LICENSE file in the root directory of this source tree.
5626
- */const Eg=r("pilcrow",[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]]);/**
5626
+ */const _g=r("pilcrow",[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]]);/**
5627
5627
  * @license lucide-vue-next v0.546.0 - ISC
5628
5628
  *
5629
5629
  * This source code is licensed under the ISC license.
@@ -5893,12 +5893,12 @@
5893
5893
  *
5894
5894
  * This source code is licensed under the ISC license.
5895
5895
  * See the LICENSE file in the root directory of this source tree.
5896
- */const _7=r("receipt-turkish-lira",[["path",{d:"M10 6.5v11a5.5 5.5 0 0 0 5.5-5.5",key:"nw10mp"}],["path",{d:"m14 8-6 3",key:"2tb98i"}],["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1z",key:"io9ry0"}]]);/**
5896
+ */const E7=r("receipt-turkish-lira",[["path",{d:"M10 6.5v11a5.5 5.5 0 0 0 5.5-5.5",key:"nw10mp"}],["path",{d:"m14 8-6 3",key:"2tb98i"}],["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1z",key:"io9ry0"}]]);/**
5897
5897
  * @license lucide-vue-next v0.546.0 - ISC
5898
5898
  *
5899
5899
  * This source code is licensed under the ISC license.
5900
5900
  * See the LICENSE file in the root directory of this source tree.
5901
- */const E7=r("rectangle-circle",[["path",{d:"M14 4v16H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",key:"1m5n7q"}],["circle",{cx:"14",cy:"12",r:"8",key:"1pag6k"}]]);/**
5901
+ */const _7=r("rectangle-circle",[["path",{d:"M14 4v16H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",key:"1m5n7q"}],["circle",{cx:"14",cy:"12",r:"8",key:"1pag6k"}]]);/**
5902
5902
  * @license lucide-vue-next v0.546.0 - ISC
5903
5903
  *
5904
5904
  * This source code is licensed under the ISC license.
@@ -6163,7 +6163,7 @@
6163
6163
  *
6164
6164
  * This source code is licensed under the ISC license.
6165
6165
  * See the LICENSE file in the root directory of this source tree.
6166
- */const _9=r("save-off",[["path",{d:"M13 13H8a1 1 0 0 0-1 1v7",key:"h8g396"}],["path",{d:"M14 8h1",key:"1lfen6"}],["path",{d:"M17 21v-4",key:"1yknxs"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M20.41 20.41A2 2 0 0 1 19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 .59-1.41",key:"1t4vdl"}],["path",{d:"M29.5 11.5s5 5 4 5",key:"zzn4i6"}],["path",{d:"M9 3h6.2a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V15",key:"24cby9"}]]);/**
6166
+ */const E9=r("save-off",[["path",{d:"M13 13H8a1 1 0 0 0-1 1v7",key:"h8g396"}],["path",{d:"M14 8h1",key:"1lfen6"}],["path",{d:"M17 21v-4",key:"1yknxs"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M20.41 20.41A2 2 0 0 1 19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 .59-1.41",key:"1t4vdl"}],["path",{d:"M29.5 11.5s5 5 4 5",key:"zzn4i6"}],["path",{d:"M9 3h6.2a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V15",key:"24cby9"}]]);/**
6167
6167
  * @license lucide-vue-next v0.546.0 - ISC
6168
6168
  *
6169
6169
  * This source code is licensed under the ISC license.
@@ -6173,7 +6173,7 @@
6173
6173
  *
6174
6174
  * This source code is licensed under the ISC license.
6175
6175
  * See the LICENSE file in the root directory of this source tree.
6176
- */const E9=r("scale-3d",[["path",{d:"M5 7v11a1 1 0 0 0 1 1h11",key:"13dt1j"}],["path",{d:"M5.293 18.707 11 13",key:"ezgbsx"}],["circle",{cx:"19",cy:"19",r:"2",key:"17f5cg"}],["circle",{cx:"5",cy:"5",r:"2",key:"1gwv83"}]]);/**
6176
+ */const _9=r("scale-3d",[["path",{d:"M5 7v11a1 1 0 0 0 1 1h11",key:"13dt1j"}],["path",{d:"M5.293 18.707 11 13",key:"ezgbsx"}],["circle",{cx:"19",cy:"19",r:"2",key:"17f5cg"}],["circle",{cx:"5",cy:"5",r:"2",key:"1gwv83"}]]);/**
6177
6177
  * @license lucide-vue-next v0.546.0 - ISC
6178
6178
  *
6179
6179
  * This source code is licensed under the ISC license.
@@ -6443,12 +6443,12 @@
6443
6443
  *
6444
6444
  * This source code is licensed under the ISC license.
6445
6445
  * See the LICENSE file in the root directory of this source tree.
6446
- */const _x=r("ship",[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]]);/**
6446
+ */const Ex=r("ship",[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]]);/**
6447
6447
  * @license lucide-vue-next v0.546.0 - ISC
6448
6448
  *
6449
6449
  * This source code is licensed under the ISC license.
6450
6450
  * See the LICENSE file in the root directory of this source tree.
6451
- */const Ex=r("shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);/**
6451
+ */const _x=r("shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);/**
6452
6452
  * @license lucide-vue-next v0.546.0 - ISC
6453
6453
  *
6454
6454
  * This source code is licensed under the ISC license.
@@ -6713,12 +6713,12 @@
6713
6713
  *
6714
6714
  * This source code is licensed under the ISC license.
6715
6715
  * See the LICENSE file in the root directory of this source tree.
6716
- */const _M=r("sprout",[["path",{d:"M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3",key:"139s4v"}],["path",{d:"M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4",key:"1dlkgp"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
6716
+ */const EM=r("sprout",[["path",{d:"M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3",key:"139s4v"}],["path",{d:"M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4",key:"1dlkgp"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
6717
6717
  * @license lucide-vue-next v0.546.0 - ISC
6718
6718
  *
6719
6719
  * This source code is licensed under the ISC license.
6720
6720
  * See the LICENSE file in the root directory of this source tree.
6721
- */const EM=r("square-activity",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M17 12h-2l-2 5-2-10-2 5H7",key:"15hlnc"}]]);/**
6721
+ */const _M=r("square-activity",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M17 12h-2l-2 5-2-10-2 5H7",key:"15hlnc"}]]);/**
6722
6722
  * @license lucide-vue-next v0.546.0 - ISC
6723
6723
  *
6724
6724
  * This source code is licensed under the ISC license.
@@ -6983,12 +6983,12 @@
6983
6983
  *
6984
6984
  * This source code is licensed under the ISC license.
6985
6985
  * See the LICENSE file in the root directory of this source tree.
6986
- */const _b=r("square-slash",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]);/**
6986
+ */const Eb=r("square-slash",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]]);/**
6987
6987
  * @license lucide-vue-next v0.546.0 - ISC
6988
6988
  *
6989
6989
  * This source code is licensed under the ISC license.
6990
6990
  * See the LICENSE file in the root directory of this source tree.
6991
- */const Eb=r("square-split-horizontal",[["path",{d:"M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3",key:"lubmu8"}],["path",{d:"M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3",key:"1ag34g"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
6991
+ */const _b=r("square-split-horizontal",[["path",{d:"M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3",key:"lubmu8"}],["path",{d:"M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3",key:"1ag34g"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
6992
6992
  * @license lucide-vue-next v0.546.0 - ISC
6993
6993
  *
6994
6994
  * This source code is licensed under the ISC license.
@@ -7258,12 +7258,12 @@
7258
7258
  *
7259
7259
  * This source code is licensed under the ISC license.
7260
7260
  * See the LICENSE file in the root directory of this source tree.
7261
- */const _w=r("tablet-smartphone",[["rect",{width:"10",height:"14",x:"3",y:"8",rx:"2",key:"1vrsiq"}],["path",{d:"M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4",key:"1j4zmg"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
7261
+ */const Ew=r("tablet-smartphone",[["rect",{width:"10",height:"14",x:"3",y:"8",rx:"2",key:"1vrsiq"}],["path",{d:"M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4",key:"1j4zmg"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
7262
7262
  * @license lucide-vue-next v0.546.0 - ISC
7263
7263
  *
7264
7264
  * This source code is licensed under the ISC license.
7265
7265
  * See the LICENSE file in the root directory of this source tree.
7266
- */const Ew=r("tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);/**
7266
+ */const _w=r("tablet",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]]);/**
7267
7267
  * @license lucide-vue-next v0.546.0 - ISC
7268
7268
  *
7269
7269
  * This source code is licensed under the ISC license.
@@ -7528,12 +7528,12 @@
7528
7528
  *
7529
7529
  * This source code is licensed under the ISC license.
7530
7530
  * See the LICENSE file in the root directory of this source tree.
7531
- */const _v=r("touchpad-off",[["path",{d:"M12 20v-6",key:"1rm09r"}],["path",{d:"M19.656 14H22",key:"170xzr"}],["path",{d:"M2 14h12",key:"d8icqz"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M20 20H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2",key:"s23sx2"}],["path",{d:"M9.656 4H20a2 2 0 0 1 2 2v10.344",key:"ovjcvl"}]]);/**
7531
+ */const Ev=r("touchpad-off",[["path",{d:"M12 20v-6",key:"1rm09r"}],["path",{d:"M19.656 14H22",key:"170xzr"}],["path",{d:"M2 14h12",key:"d8icqz"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M20 20H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2",key:"s23sx2"}],["path",{d:"M9.656 4H20a2 2 0 0 1 2 2v10.344",key:"ovjcvl"}]]);/**
7532
7532
  * @license lucide-vue-next v0.546.0 - ISC
7533
7533
  *
7534
7534
  * This source code is licensed under the ISC license.
7535
7535
  * See the LICENSE file in the root directory of this source tree.
7536
- */const Ev=r("touchpad",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"M2 14h20",key:"myj16y"}],["path",{d:"M12 20v-6",key:"1rm09r"}]]);/**
7536
+ */const _v=r("touchpad",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"M2 14h20",key:"myj16y"}],["path",{d:"M12 20v-6",key:"1rm09r"}]]);/**
7537
7537
  * @license lucide-vue-next v0.546.0 - ISC
7538
7538
  *
7539
7539
  * This source code is licensed under the ISC license.
@@ -7803,12 +7803,12 @@
7803
7803
  *
7804
7804
  * This source code is licensed under the ISC license.
7805
7805
  * See the LICENSE file in the root directory of this source tree.
7806
- */const _V=r("user-lock",[["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}],["path",{d:"M10.3 15H7a4 4 0 0 0-4 4v2",key:"3bnktk"}],["path",{d:"M15 15.5V14a2 2 0 0 1 4 0v1.5",key:"12ym5i"}],["rect",{width:"8",height:"5",x:"13",y:"16",rx:".899",key:"4p176n"}]]);/**
7806
+ */const EV=r("user-lock",[["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}],["path",{d:"M10.3 15H7a4 4 0 0 0-4 4v2",key:"3bnktk"}],["path",{d:"M15 15.5V14a2 2 0 0 1 4 0v1.5",key:"12ym5i"}],["rect",{width:"8",height:"5",x:"13",y:"16",rx:".899",key:"4p176n"}]]);/**
7807
7807
  * @license lucide-vue-next v0.546.0 - ISC
7808
7808
  *
7809
7809
  * This source code is licensed under the ISC license.
7810
7810
  * See the LICENSE file in the root directory of this source tree.
7811
- */const EV=r("user-minus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
7811
+ */const _V=r("user-minus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
7812
7812
  * @license lucide-vue-next v0.546.0 - ISC
7813
7813
  *
7814
7814
  * This source code is licensed under the ISC license.
@@ -8073,12 +8073,12 @@
8073
8073
  *
8074
8074
  * This source code is licensed under the ISC license.
8075
8075
  * See the LICENSE file in the root directory of this source tree.
8076
- */const _C=r("webcam",[["circle",{cx:"12",cy:"10",r:"8",key:"1gshiw"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 22h10",key:"10w4w3"}],["path",{d:"M12 22v-4",key:"1utk9m"}]]);/**
8076
+ */const EC=r("webcam",[["circle",{cx:"12",cy:"10",r:"8",key:"1gshiw"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 22h10",key:"10w4w3"}],["path",{d:"M12 22v-4",key:"1utk9m"}]]);/**
8077
8077
  * @license lucide-vue-next v0.546.0 - ISC
8078
8078
  *
8079
8079
  * This source code is licensed under the ISC license.
8080
8080
  * See the LICENSE file in the root directory of this source tree.
8081
- */const EC=r("webhook-off",[["path",{d:"M17 17h-5c-1.09-.02-1.94.92-2.5 1.9A3 3 0 1 1 2.57 15",key:"1tvl6x"}],["path",{d:"M9 3.4a4 4 0 0 1 6.52.66",key:"q04jfq"}],["path",{d:"m6 17 3.1-5.8a2.5 2.5 0 0 0 .057-2.05",key:"azowf0"}],["path",{d:"M20.3 20.3a4 4 0 0 1-2.3.7",key:"5joiws"}],["path",{d:"M18.6 13a4 4 0 0 1 3.357 3.414",key:"cangb8"}],["path",{d:"m12 6 .6 1",key:"tpjl1n"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
8081
+ */const _C=r("webhook-off",[["path",{d:"M17 17h-5c-1.09-.02-1.94.92-2.5 1.9A3 3 0 1 1 2.57 15",key:"1tvl6x"}],["path",{d:"M9 3.4a4 4 0 0 1 6.52.66",key:"q04jfq"}],["path",{d:"m6 17 3.1-5.8a2.5 2.5 0 0 0 .057-2.05",key:"azowf0"}],["path",{d:"M20.3 20.3a4 4 0 0 1-2.3.7",key:"5joiws"}],["path",{d:"M18.6 13a4 4 0 0 1 3.357 3.414",key:"cangb8"}],["path",{d:"m12 6 .6 1",key:"tpjl1n"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
8082
8082
  * @license lucide-vue-next v0.546.0 - ISC
8083
8083
  *
8084
8084
  * This source code is licensed under the ISC license.
@@ -8213,7 +8213,7 @@
8213
8213
  *
8214
8214
  * This source code is licensed under the ISC license.
8215
8215
  * See the LICENSE file in the root directory of this source tree.
8216
- */const tz=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:Yl,AArrowUp:Xl,ALargeSmall:Ql,Accessibility:en,Activity:tn,AirVent:an,Airplay:rn,AlarmClock:dn,AlarmClockCheck:ln,AlarmClockMinus:nn,AlarmClockOff:on,AlarmClockPlus:sn,AlarmSmoke:cn,Album:hn,AlignCenterHorizontal:pn,AlignCenterVertical:yn,AlignEndHorizontal:un,AlignEndVertical:kn,AlignHorizontalDistributeCenter:mn,AlignHorizontalDistributeEnd:fn,AlignHorizontalDistributeStart:gn,AlignHorizontalJustifyCenter:Mn,AlignHorizontalJustifyEnd:xn,AlignHorizontalJustifyStart:bn,AlignHorizontalSpaceAround:wn,AlignHorizontalSpaceBetween:vn,AlignStartHorizontal:Vn,AlignStartVertical:Cn,AlignVerticalDistributeCenter:zn,AlignVerticalDistributeEnd:Bn,AlignVerticalDistributeStart:_n,AlignVerticalJustifyCenter:En,AlignVerticalJustifyEnd:qn,AlignVerticalJustifyStart:Sn,AlignVerticalSpaceAround:jn,AlignVerticalSpaceBetween:An,Ambulance:Dn,Ampersand:Nn,Ampersands:Ln,Amphora:Hn,Anchor:$n,Angry:Fn,Annoyed:Tn,Antenna:Pn,Anvil:In,Aperture:Rn,AppWindow:Un,AppWindowMac:On,Apple:Zn,Archive:Kn,ArchiveRestore:Wn,ArchiveX:Gn,Armchair:Jn,ArrowBigDown:Xn,ArrowBigDownDash:Yn,ArrowBigLeft:eo,ArrowBigLeftDash:Qn,ArrowBigRight:ao,ArrowBigRightDash:to,ArrowBigUp:lo,ArrowBigUpDash:ro,ArrowDown:go,ArrowDown01:no,ArrowDown10:oo,ArrowDownAZ:so,ArrowDownFromLine:io,ArrowDownLeft:co,ArrowDownNarrowWide:ho,ArrowDownRight:po,ArrowDownToDot:yo,ArrowDownToLine:uo,ArrowDownUp:ko,ArrowDownWideNarrow:mo,ArrowDownZA:fo,ArrowLeft:wo,ArrowLeftFromLine:xo,ArrowLeftRight:Mo,ArrowLeftToLine:bo,ArrowRight:zo,ArrowRightFromLine:vo,ArrowRightLeft:Vo,ArrowRightToLine:Co,ArrowUp:Fo,ArrowUp01:Bo,ArrowUp10:_o,ArrowUpAZ:Eo,ArrowUpDown:qo,ArrowUpFromDot:So,ArrowUpFromLine:jo,ArrowUpLeft:Ao,ArrowUpNarrowWide:Do,ArrowUpRight:No,ArrowUpToLine:Lo,ArrowUpWideNarrow:Ho,ArrowUpZA:$o,ArrowsUpFromLine:To,Asterisk:Po,AtSign:Io,Atom:Ro,AudioLines:Oo,AudioWaveform:Uo,Award:Zo,Axe:Wo,Axis3d:Go,Baby:Ko,Backpack:Jo,Badge:u0,BadgeAlert:Yo,BadgeCent:Xo,BadgeCheck:Qo,BadgeDollarSign:e0,BadgeEuro:t0,BadgeIndianRupee:a0,BadgeInfo:r0,BadgeJapaneseYen:l0,BadgeMinus:n0,BadgePercent:o0,BadgePlus:s0,BadgePoundSterling:i0,BadgeQuestionMark:d0,BadgeRussianRuble:c0,BadgeSwissFranc:h0,BadgeTurkishLira:p0,BadgeX:y0,BaggageClaim:k0,Ban:m0,Banana:f0,Bandage:g0,Banknote:w0,BanknoteArrowDown:x0,BanknoteArrowUp:M0,BanknoteX:b0,Barcode:v0,Barrel:V0,Baseline:C0,Bath:z0,Battery:A0,BatteryCharging:B0,BatteryFull:_0,BatteryLow:E0,BatteryMedium:q0,BatteryPlus:S0,BatteryWarning:j0,Beaker:D0,Bean:L0,BeanOff:N0,Bed:F0,BedDouble:H0,BedSingle:$0,Beef:T0,Beer:I0,BeerOff:P0,Bell:K0,BellDot:R0,BellElectric:O0,BellMinus:U0,BellOff:Z0,BellPlus:W0,BellRing:G0,BetweenHorizontalEnd:J0,BetweenHorizontalStart:Y0,BetweenVerticalEnd:X0,BetweenVerticalStart:Q0,BicepsFlexed:e2,Bike:t2,Binary:r2,Binoculars:a2,Biohazard:l2,Bird:n2,Bitcoin:o2,Blend:s2,Blinds:i2,Blocks:d2,Bluetooth:y2,BluetoothConnected:c2,BluetoothOff:h2,BluetoothSearching:p2,Bold:u2,Bolt:k2,Bomb:m2,Bone:f2,Book:I2,BookA:g2,BookAlert:x2,BookAudio:M2,BookCheck:b2,BookCopy:w2,BookDashed:v2,BookDown:V2,BookHeadphones:C2,BookHeart:z2,BookImage:B2,BookKey:_2,BookLock:E2,BookMarked:q2,BookMinus:S2,BookOpen:D2,BookOpenCheck:j2,BookOpenText:A2,BookPlus:N2,BookText:L2,BookType:H2,BookUp:F2,BookUp2:$2,BookUser:T2,BookX:P2,Bookmark:Z2,BookmarkCheck:R2,BookmarkMinus:O2,BookmarkPlus:U2,BookmarkX:W2,BoomBox:G2,Bot:Y2,BotMessageSquare:K2,BotOff:J2,BottleWine:X2,BowArrow:Q2,Box:es,Boxes:ts,Braces:as,Brackets:rs,Brain:os,BrainCircuit:ls,BrainCog:ns,BrickWall:ds,BrickWallFire:ss,BrickWallShield:is,Briefcase:ys,BriefcaseBusiness:cs,BriefcaseConveyorBelt:hs,BriefcaseMedical:ps,BringToFront:ks,Brush:ms,BrushCleaning:us,Bubbles:fs,Bug:Ms,BugOff:gs,BugPlay:xs,Building:ws,Building2:bs,Bus:Vs,BusFront:vs,Cable:zs,CableCar:Cs,Cake:_s,CakeSlice:Bs,Calculator:Es,Calendar:Js,Calendar1:qs,CalendarArrowDown:Ss,CalendarArrowUp:js,CalendarCheck:Ds,CalendarCheck2:As,CalendarClock:Ns,CalendarCog:Ls,CalendarDays:Hs,CalendarFold:$s,CalendarHeart:Fs,CalendarMinus:Ps,CalendarMinus2:Ts,CalendarOff:Is,CalendarPlus:Os,CalendarPlus2:Rs,CalendarRange:Us,CalendarSearch:Zs,CalendarSync:Ws,CalendarX:Ks,CalendarX2:Gs,Camera:Xs,CameraOff:Ys,Candy:ti,CandyCane:Qs,CandyOff:ei,Cannabis:ai,Captions:li,CaptionsOff:ri,Car:si,CarFront:ni,CarTaxiFront:oi,Caravan:di,CardSim:ii,Carrot:ci,CaseLower:hi,CaseSensitive:pi,CaseUpper:yi,CassetteTape:ui,Cast:ki,Castle:mi,Cat:fi,Cctv:gi,ChartArea:xi,ChartBar:Vi,ChartBarBig:Mi,ChartBarDecreasing:bi,ChartBarIncreasing:wi,ChartBarStacked:vi,ChartCandlestick:Ci,ChartColumn:qi,ChartColumnBig:zi,ChartColumnDecreasing:Bi,ChartColumnIncreasing:_i,ChartColumnStacked:Ei,ChartGantt:Si,ChartLine:ji,ChartNetwork:Ai,ChartNoAxesColumn:Li,ChartNoAxesColumnDecreasing:Di,ChartNoAxesColumnIncreasing:Ni,ChartNoAxesCombined:Hi,ChartNoAxesGantt:$i,ChartPie:Fi,ChartScatter:Ti,ChartSpline:Pi,Check:Oi,CheckCheck:Ii,CheckLine:Ri,ChefHat:Ui,Cherry:Zi,ChevronDown:Wi,ChevronFirst:Gi,ChevronLast:Ki,ChevronLeft:Ji,ChevronRight:$1,ChevronUp:Yi,ChevronsDown:Qi,ChevronsDownUp:Xi,ChevronsLeft:ad,ChevronsLeftRight:td,ChevronsLeftRightEllipsis:ed,ChevronsRight:ld,ChevronsRightLeft:rd,ChevronsUp:od,ChevronsUpDown:nd,Chromium:sd,Church:id,Cigarette:cd,CigaretteOff:dd,Circle:tc,CircleAlert:hd,CircleArrowDown:pd,CircleArrowLeft:yd,CircleArrowOutDownLeft:ud,CircleArrowOutDownRight:kd,CircleArrowOutUpLeft:md,CircleArrowOutUpRight:fd,CircleArrowRight:gd,CircleArrowUp:xd,CircleCheck:bd,CircleCheckBig:Md,CircleChevronDown:wd,CircleChevronLeft:vd,CircleChevronRight:Cd,CircleChevronUp:Vd,CircleDashed:zd,CircleDivide:Bd,CircleDollarSign:_d,CircleDot:qd,CircleDotDashed:Ed,CircleEllipsis:Sd,CircleEqual:jd,CircleFadingArrowUp:Ad,CircleFadingPlus:Dd,CircleGauge:Nd,CircleMinus:Ld,CircleOff:Hd,CircleParking:Fd,CircleParkingOff:$d,CirclePause:Td,CirclePercent:Pd,CirclePlay:Id,CirclePlus:Rd,CirclePoundSterling:Od,CirclePower:Ud,CircleQuestionMark:Zd,CircleSlash:Wd,CircleSlash2:Gd,CircleSmall:Kd,CircleStar:Jd,CircleStop:Yd,CircleUser:Qd,CircleUserRound:Xd,CircleX:ec,CircuitBoard:ac,Citrus:rc,Clapperboard:lc,Clipboard:mc,ClipboardCheck:nc,ClipboardClock:oc,ClipboardCopy:sc,ClipboardList:ic,ClipboardMinus:dc,ClipboardPaste:cc,ClipboardPen:pc,ClipboardPenLine:hc,ClipboardPlus:yc,ClipboardType:uc,ClipboardX:kc,Clock:Dc,Clock1:fc,Clock10:gc,Clock11:xc,Clock12:Mc,Clock2:bc,Clock3:wc,Clock4:vc,Clock5:Vc,Clock6:Cc,Clock7:zc,Clock8:Bc,Clock9:_c,ClockAlert:Ec,ClockArrowDown:qc,ClockArrowUp:Sc,ClockFading:jc,ClockPlus:Ac,ClosedCaption:Nc,Cloud:Qc,CloudAlert:Lc,CloudCheck:Hc,CloudCog:$c,CloudDownload:Fc,CloudDrizzle:Tc,CloudFog:Pc,CloudHail:Ic,CloudLightning:Rc,CloudMoon:Uc,CloudMoonRain:Oc,CloudOff:Zc,CloudRain:Kc,CloudRainWind:Wc,CloudSnow:Gc,CloudSun:Yc,CloudSunRain:Jc,CloudUpload:Xc,Cloudy:eh,Clover:th,Club:ah,Code:nh,CodeXml:rh,Codepen:lh,Codesandbox:sh,Coffee:oh,Cog:ih,Coins:dh,Columns2:ch,Columns3:ph,Columns3Cog:hh,Columns4:yh,Combine:uh,Command:kh,Compass:mh,Component:fh,Computer:gh,ConciergeBell:xh,Cone:Mh,Construction:bh,Contact:vh,ContactRound:wh,Container:Vh,Contrast:Ch,Cookie:zh,CookingPot:Bh,Copy:Ah,CopyCheck:_h,CopyMinus:Eh,CopyPlus:qh,CopySlash:Sh,CopyX:jh,Copyleft:Dh,Copyright:Nh,CornerDownLeft:Lh,CornerDownRight:Hh,CornerLeftDown:$h,CornerLeftUp:Fh,CornerRightDown:Th,CornerRightUp:Ph,CornerUpLeft:Ih,CornerUpRight:Rh,Cpu:Uh,CreativeCommons:Oh,CreditCard:Zh,Croissant:Wh,Crop:Gh,Cross:Kh,Crosshair:Jh,Crown:Yh,Cuboid:Xh,CupSoda:Qh,Currency:ep,Cylinder:ap,Dam:tp,Database:np,DatabaseBackup:rp,DatabaseZap:lp,DecimalsArrowLeft:op,DecimalsArrowRight:sp,Delete:ip,Dessert:dp,Diameter:cp,Diamond:up,DiamondMinus:hp,DiamondPercent:pp,DiamondPlus:yp,Dice1:kp,Dice2:mp,Dice3:gp,Dice4:fp,Dice5:xp,Dice6:Mp,Dices:wp,Diff:bp,Disc:zp,Disc2:vp,Disc3:Vp,DiscAlbum:Cp,Divide:Bp,Dna:_p,DnaOff:Ep,Dock:jp,Dog:qp,DollarSign:Sp,Donut:Ap,DoorClosed:Np,DoorClosedLocked:Dp,DoorOpen:Lp,Dot:Hp,Download:F1,DraftingCompass:$p,Drama:Fp,Dribbble:Tp,Drill:Pp,Drone:Ip,Droplet:Op,DropletOff:Rp,Droplets:Up,Drum:Zp,Drumstick:Wp,Dumbbell:Gp,Ear:Jp,EarOff:Kp,Earth:Xp,EarthLock:Yp,Eclipse:Qp,Egg:ay,EggFried:ey,EggOff:ty,Ellipsis:ry,EllipsisVertical:T1,Equal:oy,EqualApproximately:ny,EqualNot:ly,Eraser:iy,EthernetPort:sy,Euro:dy,EvCharger:cy,Expand:hy,ExternalLink:py,Eye:ky,EyeClosed:yy,EyeOff:uy,Facebook:my,Factory:fy,Fan:gy,FastForward:xy,Feather:My,Fence:by,FerrisWheel:wy,Figma:vy,File:_u,FileArchive:Vy,FileAudio:zy,FileAudio2:Cy,FileAxis3d:By,FileBadge:Ey,FileBadge2:_y,FileBox:qy,FileChartColumn:jy,FileChartColumnIncreasing:Sy,FileChartLine:Ay,FileChartPie:Dy,FileCheck:Ly,FileCheck2:Ny,FileClock:Hy,FileCode:Fy,FileCode2:$y,FileCog:Ty,FileDiff:Py,FileDigit:Iy,FileDown:Ry,FileHeart:Oy,FileImage:Uy,FileInput:Zy,FileJson:Gy,FileJson2:Wy,FileKey:Jy,FileKey2:Ky,FileLock:Xy,FileLock2:Yy,FileMinus:eu,FileMinus2:Qy,FileMusic:tu,FileOutput:ru,FilePen:lu,FilePenLine:au,FilePlay:nu,FilePlus:su,FilePlus2:ou,FileQuestionMark:iu,FileScan:du,FileSearch:pu,FileSearch2:cu,FileSliders:hu,FileSpreadsheet:yu,FileStack:uu,FileSymlink:ku,FileTerminal:mu,FileText:fu,FileType:xu,FileType2:gu,FileUp:Mu,FileUser:bu,FileVideoCamera:wu,FileVolume:vu,FileVolume2:Vu,FileWarning:Cu,FileX:Bu,FileX2:zu,Files:Eu,Film:qu,Fingerprint:Su,FireExtinguisher:ju,Fish:Nu,FishOff:Au,FishSymbol:Du,Flag:Fu,FlagOff:Lu,FlagTriangleLeft:Hu,FlagTriangleRight:$u,Flame:Pu,FlameKindling:Tu,Flashlight:Ru,FlashlightOff:Iu,FlaskConical:Ou,FlaskConicalOff:Uu,FlaskRound:Zu,FlipHorizontal:Gu,FlipHorizontal2:Wu,FlipVertical:Ju,FlipVertical2:Ku,Flower:Xu,Flower2:Yu,Focus:Qu,FoldHorizontal:ek,FoldVertical:tk,Folder:Sk,FolderArchive:ak,FolderCheck:rk,FolderClock:lk,FolderClosed:nk,FolderCode:ok,FolderCog:sk,FolderDot:ik,FolderDown:dk,FolderGit:pk,FolderGit2:ck,FolderHeart:hk,FolderInput:yk,FolderKanban:uk,FolderKey:kk,FolderLock:mk,FolderMinus:fk,FolderOpen:xk,FolderOpenDot:gk,FolderOutput:Mk,FolderPen:bk,FolderPlus:wk,FolderRoot:vk,FolderSearch:Ck,FolderSearch2:Vk,FolderSymlink:zk,FolderSync:Bk,FolderTree:_k,FolderUp:Ek,FolderX:qk,Folders:jk,Footprints:Ak,Forklift:Dk,Forward:Hk,Frame:Nk,Framer:Lk,Frown:$k,Fuel:Fk,Fullscreen:Tk,Funnel:Ra,FunnelPlus:Pk,FunnelX:Ik,GalleryHorizontal:Ok,GalleryHorizontalEnd:Rk,GalleryThumbnails:Zk,GalleryVertical:Wk,GalleryVerticalEnd:Uk,Gamepad:Kk,Gamepad2:Gk,Gauge:Jk,Gavel:Yk,Gem:Xk,GeorgianLari:Qk,Ghost:e4,Gift:t4,GitBranch:r4,GitBranchPlus:a4,GitCommitHorizontal:l4,GitCommitVertical:n4,GitCompare:s4,GitCompareArrows:o4,GitFork:i4,GitGraph:d4,GitMerge:c4,GitPullRequest:m4,GitPullRequestArrow:h4,GitPullRequestClosed:p4,GitPullRequestCreate:u4,GitPullRequestCreateArrow:y4,GitPullRequestDraft:k4,Github:f4,Gitlab:g4,GlassWater:x4,Glasses:M4,Globe:w4,GlobeLock:b4,Goal:V4,Gpu:v4,GraduationCap:C4,Grape:z4,Grid2x2:q4,Grid2x2Check:B4,Grid2x2Plus:_4,Grid2x2X:E4,Grid3x2:S4,Grid3x3:j4,Grip:D4,GripHorizontal:A4,GripVertical:P1,Group:N4,Guitar:L4,Ham:H4,Hamburger:$4,Hammer:F4,Hand:W4,HandCoins:T4,HandFist:P4,HandGrab:I4,HandHeart:R4,HandHelping:O4,HandMetal:U4,HandPlatter:Z4,Handbag:G4,Handshake:K4,HardDrive:X4,HardDriveDownload:J4,HardDriveUpload:Y4,HardHat:Q4,Hash:em,HatGlasses:tm,Haze:am,HdmiPort:rm,Heading:cm,Heading1:lm,Heading2:nm,Heading3:om,Heading4:sm,Heading5:dm,Heading6:im,HeadphoneOff:hm,Headphones:pm,Headset:ym,Heart:Mm,HeartCrack:um,HeartHandshake:km,HeartMinus:mm,HeartOff:fm,HeartPlus:gm,HeartPulse:xm,Heater:bm,Hexagon:wm,Highlighter:vm,History:Vm,Hop:zm,HopOff:Cm,Hospital:Bm,Hotel:_m,Hourglass:Em,House:I1,HouseHeart:qm,HousePlug:Sm,HousePlus:jm,HouseWifi:Am,IceCreamBowl:Dm,IceCreamCone:Nm,IdCard:Hm,IdCardLanyard:Lm,Image:Um,ImageDown:$m,ImageMinus:Fm,ImageOff:Tm,ImagePlay:Pm,ImagePlus:Im,ImageUp:Rm,ImageUpscale:Om,Images:Zm,Import:Gm,Inbox:Wm,IndianRupee:Jm,Infinity:Km,Info:Ym,InspectionPanel:Xm,Instagram:Qm,Italic:e5,IterationCcw:t5,IterationCw:a5,JapaneseYen:r5,Joystick:l5,Kanban:n5,Kayak:o5,Key:d5,KeyRound:s5,KeySquare:i5,Keyboard:p5,KeyboardMusic:c5,KeyboardOff:h5,Lamp:x5,LampCeiling:y5,LampDesk:u5,LampFloor:k5,LampWallDown:m5,LampWallUp:f5,LandPlot:M5,Landmark:g5,Languages:b5,Laptop:V5,LaptopMinimal:v5,LaptopMinimalCheck:w5,Lasso:z5,LassoSelect:C5,Laugh:B5,Layers:E5,Layers2:_5,LayoutDashboard:R1,LayoutGrid:O1,LayoutList:q5,LayoutPanelLeft:S5,LayoutPanelTop:j5,LayoutTemplate:A5,Leaf:D5,LeafyGreen:N5,Lectern:L5,Library:$5,LibraryBig:H5,LifeBuoy:F5,Ligature:T5,Lightbulb:P5,LightbulbOff:I5,LineSquiggle:R5,Link:Z5,Link2:U5,Link2Off:O5,Linkedin:W5,List:U1,ListCheck:G5,ListChecks:K5,ListChevronsDownUp:J5,ListChevronsUpDown:Y5,ListCollapse:X5,ListEnd:e3,ListFilter:t3,ListFilterPlus:Q5,ListIndentDecrease:a3,ListIndentIncrease:r3,ListMinus:l3,ListMusic:n3,ListOrdered:o3,ListPlus:s3,ListRestart:i3,ListStart:c3,ListTodo:d3,ListTree:h3,ListVideo:p3,ListX:u3,Loader:m3,LoaderCircle:y3,LoaderPinwheel:k3,Locate:x3,LocateFixed:f3,LocateOff:g3,Lock:v3,LockKeyhole:b3,LockKeyholeOpen:M3,LockOpen:w3,LogIn:V3,LogOut:C3,Logs:z3,Lollipop:B3,Luggage:_3,Magnet:E3,Mail:$3,MailCheck:q3,MailMinus:S3,MailOpen:j3,MailPlus:A3,MailQuestionMark:D3,MailSearch:N3,MailWarning:L3,MailX:H3,Mailbox:F3,Mails:T3,Map:Z1,MapMinus:P3,MapPin:Q3,MapPinCheck:R3,MapPinCheckInside:I3,MapPinHouse:O3,MapPinMinus:Z3,MapPinMinusInside:U3,MapPinOff:W3,MapPinPen:G3,MapPinPlus:Y3,MapPinPlusInside:K3,MapPinX:X3,MapPinXInside:J3,MapPinned:e6,MapPlus:t6,Mars:r6,MarsStroke:a6,Martini:l6,Maximize:o6,Maximize2:n6,Medal:s6,Megaphone:c6,MegaphoneOff:i6,Meh:d6,MemoryStick:h6,Menu:p6,Merge:y6,MessageCircle:V6,MessageCircleCode:u6,MessageCircleDashed:k6,MessageCircleHeart:m6,MessageCircleMore:f6,MessageCircleOff:g6,MessageCirclePlus:x6,MessageCircleQuestionMark:M6,MessageCircleReply:b6,MessageCircleWarning:w6,MessageCircleX:v6,MessageSquare:T6,MessageSquareCode:C6,MessageSquareDashed:B6,MessageSquareDiff:z6,MessageSquareDot:_6,MessageSquareHeart:E6,MessageSquareLock:S6,MessageSquareMore:q6,MessageSquareOff:j6,MessageSquarePlus:A6,MessageSquareQuote:D6,MessageSquareReply:N6,MessageSquareShare:L6,MessageSquareText:H6,MessageSquareWarning:$6,MessageSquareX:F6,MessagesSquare:P6,Mic:O6,MicOff:I6,MicVocal:R6,Microchip:Z6,Microscope:U6,Microwave:W6,Milestone:G6,Milk:J6,MilkOff:K6,Minimize:X6,Minimize2:Y6,Minus:Q6,Monitor:y8,MonitorCheck:e8,MonitorCloud:t8,MonitorCog:a8,MonitorDot:r8,MonitorDown:l8,MonitorOff:n8,MonitorPause:o8,MonitorPlay:s8,MonitorSmartphone:i8,MonitorSpeaker:d8,MonitorStop:c8,MonitorUp:h8,MonitorX:p8,Moon:k8,MoonStar:u8,Motorbike:m8,Mountain:g8,MountainSnow:f8,Mouse:C8,MouseOff:x8,MousePointer:v8,MousePointer2:M8,MousePointerBan:b8,MousePointerClick:w8,Move:H8,Move3d:V8,MoveDiagonal:B8,MoveDiagonal2:z8,MoveDown:q8,MoveDownLeft:_8,MoveDownRight:E8,MoveHorizontal:S8,MoveLeft:j8,MoveRight:A8,MoveUp:$8,MoveUpLeft:D8,MoveUpRight:N8,MoveVertical:L8,Music:I8,Music2:F8,Music3:T8,Music4:P8,Navigation:Z8,Navigation2:O8,Navigation2Off:R8,NavigationOff:U8,Network:W8,Newspaper:G8,Nfc:K8,NonBinary:J8,Notebook:ef,NotebookPen:Q8,NotebookTabs:Y8,NotebookText:X8,NotepadText:af,NotepadTextDashed:tf,Nut:lf,NutOff:rf,Octagon:df,OctagonAlert:nf,OctagonMinus:of,OctagonPause:sf,OctagonX:hf,Omega:cf,Option:pf,Orbit:yf,Origami:uf,Package:wf,Package2:kf,PackageCheck:mf,PackageMinus:ff,PackageOpen:gf,PackagePlus:xf,PackageSearch:Mf,PackageX:bf,PaintBucket:vf,PaintRoller:Cf,Paintbrush:zf,PaintbrushVertical:Vf,Palette:Bf,Panda:_f,PanelBottom:Sf,PanelBottomClose:Ef,PanelBottomDashed:qf,PanelBottomOpen:jf,PanelLeft:Hf,PanelLeftClose:Af,PanelLeftDashed:Df,PanelLeftOpen:Nf,PanelLeftRightDashed:Lf,PanelRight:Pf,PanelRightClose:$f,PanelRightDashed:Tf,PanelRightOpen:Ff,PanelTop:Zf,PanelTopBottomDashed:If,PanelTopClose:Rf,PanelTopDashed:Of,PanelTopOpen:Uf,PanelsLeftBottom:Wf,PanelsRightBottom:Gf,PanelsTopLeft:Kf,Paperclip:Jf,Parentheses:Yf,ParkingMeter:Xf,PartyPopper:Qf,Pause:eg,PawPrint:tg,PcCase:ag,Pen:og,PenLine:rg,PenOff:lg,PenTool:ng,Pencil:W1,PencilLine:sg,PencilOff:ig,PencilRuler:dg,Pentagon:cg,Percent:pg,PersonStanding:hg,PhilippinePeso:yg,Phone:Mg,PhoneCall:ug,PhoneForwarded:kg,PhoneIncoming:mg,PhoneMissed:gg,PhoneOff:fg,PhoneOutgoing:xg,Pi:bg,Piano:vg,Pickaxe:wg,PictureInPicture:Vg,PictureInPicture2:Cg,PiggyBank:zg,Pilcrow:Eg,PilcrowLeft:Bg,PilcrowRight:_g,Pill:Sg,PillBottle:qg,Pin:Ag,PinOff:jg,Pipette:Dg,Pizza:Ng,Plane:$g,PlaneLanding:Lg,PlaneTakeoff:Hg,Play:Fg,Plug:Ig,Plug2:Tg,PlugZap:Pg,Plus:Oa,Pocket:Og,PocketKnife:Rg,Podcast:Ug,Pointer:Wg,PointerOff:Zg,Popcorn:Gg,Popsicle:Kg,PoundSterling:Jg,Power:Xg,PowerOff:Yg,Presentation:Qg,Printer:t7,PrinterCheck:e7,Projector:a7,Proportions:r7,Puzzle:l7,Pyramid:n7,QrCode:o7,Quote:s7,Rabbit:i7,Radar:d7,Radiation:c7,Radical:h7,Radio:u7,RadioReceiver:p7,RadioTower:y7,Radius:k7,RailSymbol:m7,Rainbow:f7,Rat:g7,Ratio:M7,Receipt:q7,ReceiptCent:x7,ReceiptEuro:b7,ReceiptIndianRupee:v7,ReceiptJapaneseYen:w7,ReceiptPoundSterling:V7,ReceiptRussianRuble:C7,ReceiptSwissFranc:z7,ReceiptText:B7,ReceiptTurkishLira:_7,RectangleCircle:E7,RectangleEllipsis:S7,RectangleGoggles:j7,RectangleHorizontal:A7,RectangleVertical:D7,Recycle:N7,Redo:$7,Redo2:L7,RedoDot:H7,RefreshCcw:T7,RefreshCcwDot:F7,RefreshCw:I7,RefreshCwOff:P7,Refrigerator:R7,Regex:O7,RemoveFormatting:U7,Repeat:G7,Repeat1:Z7,Repeat2:W7,Replace:J7,ReplaceAll:K7,Reply:X7,ReplyAll:Y7,Rewind:Q7,Ribbon:e9,Rocket:t9,RockingChair:a9,RollerCoaster:r9,Rose:l9,Rotate3d:n9,RotateCcw:i9,RotateCcwKey:o9,RotateCcwSquare:s9,RotateCw:c9,RotateCwSquare:d9,Route:p9,RouteOff:h9,Router:y9,Rows2:u9,Rows3:k9,Rows4:m9,Rss:f9,Ruler:x9,RulerDimensionLine:g9,RussianRuble:M9,Sailboat:b9,Salad:w9,Sandwich:v9,Satellite:V9,SatelliteDish:C9,SaudiRiyal:z9,Save:G1,SaveAll:B9,SaveOff:_9,Scale:q9,Scale3d:E9,Scaling:S9,Scan:T9,ScanBarcode:j9,ScanEye:A9,ScanFace:D9,ScanHeart:N9,ScanLine:L9,ScanQrCode:H9,ScanSearch:$9,ScanText:F9,School:P9,Scissors:R9,ScissorsLineDashed:I9,ScreenShare:W9,ScreenShareOff:O9,Scroll:Z9,ScrollText:U9,Search:K1,SearchCheck:G9,SearchCode:K9,SearchSlash:J9,SearchX:Y9,Section:X9,Send:tx,SendHorizontal:Q9,SendToBack:ex,SeparatorHorizontal:ax,SeparatorVertical:rx,Server:sx,ServerCog:lx,ServerCrash:nx,ServerOff:ox,Settings:dx,Settings2:ix,Shapes:cx,Share:px,Share2:hx,Sheet:yx,Shell:ux,Shield:zx,ShieldAlert:kx,ShieldBan:mx,ShieldCheck:fx,ShieldEllipsis:gx,ShieldHalf:xx,ShieldMinus:Mx,ShieldOff:bx,ShieldPlus:wx,ShieldQuestionMark:vx,ShieldUser:Vx,ShieldX:Cx,Ship:_x,ShipWheel:Bx,Shirt:Ex,ShoppingBag:qx,ShoppingBasket:Sx,ShoppingCart:jx,Shovel:Ax,ShowerHead:Dx,Shredder:Nx,Shrimp:Lx,Shrink:Hx,Shrub:$x,Shuffle:Fx,Sigma:Px,Signal:Ux,SignalHigh:Tx,SignalLow:Ix,SignalMedium:Rx,SignalZero:Ox,Signature:Zx,Signpost:Gx,SignpostBig:Wx,Siren:Kx,SkipBack:Jx,SkipForward:Yx,Skull:Xx,Slack:eM,Slash:Qx,Slice:tM,SlidersHorizontal:rM,SlidersVertical:aM,Smartphone:oM,SmartphoneCharging:lM,SmartphoneNfc:nM,Smile:iM,SmilePlus:sM,Snail:dM,Snowflake:cM,SoapDispenserDroplet:hM,Sofa:pM,Soup:yM,Space:uM,Spade:kM,Sparkle:mM,Sparkles:fM,Speaker:gM,Speech:xM,SpellCheck:bM,SpellCheck2:MM,Spline:vM,SplinePointer:wM,Split:VM,Spool:CM,Spotlight:zM,SprayCan:BM,Sprout:_M,Square:Fb,SquareActivity:EM,SquareArrowDown:jM,SquareArrowDownLeft:qM,SquareArrowDownRight:SM,SquareArrowLeft:AM,SquareArrowOutDownLeft:DM,SquareArrowOutDownRight:NM,SquareArrowOutUpLeft:LM,SquareArrowOutUpRight:HM,SquareArrowRight:$M,SquareArrowUp:PM,SquareArrowUpLeft:FM,SquareArrowUpRight:TM,SquareAsterisk:IM,SquareBottomDashedScissors:RM,SquareChartGantt:OM,SquareCheck:ZM,SquareCheckBig:UM,SquareChevronDown:GM,SquareChevronLeft:WM,SquareChevronRight:KM,SquareChevronUp:JM,SquareCode:YM,SquareDashed:rb,SquareDashedBottom:QM,SquareDashedBottomCode:XM,SquareDashedKanban:eb,SquareDashedMousePointer:tb,SquareDashedTopSolid:ab,SquareDivide:lb,SquareDot:nb,SquareEqual:ob,SquareFunction:sb,SquareKanban:ib,SquareLibrary:db,SquareM:cb,SquareMenu:hb,SquareMinus:pb,SquareMousePointer:yb,SquareParking:kb,SquareParkingOff:ub,SquarePause:mb,SquarePen:fb,SquarePercent:gb,SquarePi:xb,SquarePilcrow:Mb,SquarePlay:bb,SquarePlus:wb,SquarePower:vb,SquareRadical:Cb,SquareRoundCorner:Vb,SquareScissors:zb,SquareSigma:Bb,SquareSlash:_b,SquareSplitHorizontal:Eb,SquareSplitVertical:qb,SquareSquare:Sb,SquareStack:Ab,SquareStar:jb,SquareStop:Db,SquareTerminal:Nb,SquareUser:Hb,SquareUserRound:Lb,SquareX:$b,SquaresExclude:Tb,SquaresIntersect:Pb,SquaresSubtract:Ib,SquaresUnite:Rb,Squircle:Ub,SquircleDashed:Ob,Squirrel:Zb,Stamp:Wb,Star:Jb,StarHalf:Gb,StarOff:Kb,StepBack:Yb,StepForward:Xb,Stethoscope:Qb,Sticker:ew,StickyNote:tw,Store:aw,StretchHorizontal:rw,StretchVertical:lw,Strikethrough:nw,Subscript:ow,Sun:hw,SunDim:sw,SunMedium:iw,SunMoon:dw,SunSnow:cw,Sunrise:pw,Sunset:yw,Superscript:uw,SwatchBook:kw,SwissFranc:mw,SwitchCamera:fw,Sword:gw,Swords:xw,Syringe:Mw,Table:Bw,Table2:J1,TableCellsMerge:bw,TableCellsSplit:ww,TableColumnsSplit:vw,TableOfContents:Vw,TableProperties:Cw,TableRowsSplit:zw,Tablet:Ew,TabletSmartphone:_w,Tablets:qw,Tag:Sw,Tags:jw,Tally1:Aw,Tally2:Dw,Tally3:Nw,Tally4:Lw,Tally5:Hw,Tangent:$w,Target:Fw,Telescope:Tw,Tent:Iw,TentTree:Pw,Terminal:Rw,TestTube:Uw,TestTubeDiagonal:Ow,TestTubes:Zw,TextAlignCenter:Ww,TextAlignEnd:Gw,TextAlignJustify:Kw,TextAlignStart:Jw,TextCursor:Xw,TextCursorInput:Yw,TextInitial:Qw,TextQuote:ev,TextSearch:tv,TextSelect:av,TextWrap:rv,Theater:lv,Thermometer:sv,ThermometerSnowflake:nv,ThermometerSun:ov,ThumbsDown:iv,ThumbsUp:dv,Ticket:mv,TicketCheck:cv,TicketMinus:pv,TicketPercent:hv,TicketPlus:yv,TicketSlash:uv,TicketX:kv,Tickets:gv,TicketsPlane:fv,Timer:bv,TimerOff:xv,TimerReset:Mv,ToggleLeft:wv,ToggleRight:Vv,Toilet:vv,ToolCase:Cv,Tornado:zv,Torus:Bv,Touchpad:Ev,TouchpadOff:_v,TowerControl:qv,ToyBrick:Sv,Tractor:jv,TrafficCone:Av,TrainFront:Nv,TrainFrontTunnel:Dv,TrainTrack:Lv,TramFront:$v,Transgender:Hv,Trash:Fv,Trash2:Y1,TreeDeciduous:Tv,TreePalm:Pv,TreePine:Iv,Trees:Rv,Trello:Ov,TrendingDown:Uv,TrendingUp:Wv,TrendingUpDown:Zv,Triangle:Yv,TriangleAlert:Gv,TriangleDashed:Kv,TriangleRight:Jv,Trophy:Xv,Truck:eV,TruckElectric:Qv,TurkishLira:tV,Turntable:aV,Turtle:rV,Tv:oV,TvMinimal:nV,TvMinimalPlay:lV,Twitch:sV,Twitter:iV,Type:hV,TypeOutline:dV,Umbrella:pV,UmbrellaOff:cV,Underline:yV,Undo:mV,Undo2:uV,UndoDot:kV,UnfoldHorizontal:fV,UnfoldVertical:gV,Ungroup:xV,University:MV,Unlink:wV,Unlink2:bV,Unplug:vV,Upload:VV,Usb:CV,User:RV,UserCheck:zV,UserCog:BV,UserLock:_V,UserMinus:EV,UserPen:qV,UserPlus:SV,UserRound:FV,UserRoundCheck:jV,UserRoundCog:AV,UserRoundMinus:DV,UserRoundPen:NV,UserRoundPlus:LV,UserRoundSearch:HV,UserRoundX:$V,UserSearch:TV,UserStar:PV,UserX:IV,Users:UV,UsersRound:OV,Utensils:WV,UtensilsCrossed:ZV,UtilityPole:GV,Variable:KV,Vault:JV,VectorSquare:YV,Vegan:XV,VenetianMask:QV,Venus:tC,VenusAndMars:eC,Vibrate:rC,VibrateOff:aC,Video:nC,VideoOff:lC,Videotape:sC,View:oC,Voicemail:iC,Volleyball:dC,Volume:uC,Volume1:cC,Volume2:hC,VolumeOff:yC,VolumeX:pC,Vote:kC,Wallet:gC,WalletCards:mC,WalletMinimal:fC,Wallpaper:xC,Wand:bC,WandSparkles:MC,Warehouse:wC,WashingMachine:VC,Watch:vC,Waves:zC,WavesLadder:CC,Waypoints:BC,Webcam:_C,Webhook:qC,WebhookOff:EC,Weight:SC,Wheat:DC,WheatOff:jC,WholeWord:AC,Wifi:IC,WifiCog:NC,WifiHigh:LC,WifiLow:HC,WifiOff:$C,WifiPen:FC,WifiSync:TC,WifiZero:PC,Wind:OC,WindArrowDown:RC,Wine:ZC,WineOff:UC,Workflow:WC,Worm:GC,Wrench:KC,X:Ua,Youtube:JC,Zap:XC,ZapOff:YC,ZoomIn:QC,ZoomOut:ez},Symbol.toStringTag,{value:"Module"})),Za={week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік"},az=["onClick"],rz={class:"flex items-center justify-between w-full"},lz={key:0},nz=e.defineComponent({__name:"vs-bi-dropdown",props:{title:{},options:{},value:{default:null}},emits:["selected"],setup(l,{emit:t}){const a=l,n=t,o=e.ref(!1),s=e.ref(a.value??null),i=e.ref(null),d=e.computed(()=>{const m=a.options;return typeof m=="string"?m.split(",").map((f,u)=>({id:u,text:f.trim()})):Array.isArray(m)?m:[]}),c=e.computed(()=>{const m=d.value.find(f=>(f.id??f)===s.value);return m?m.text??String(m):a.title??""}),h=m=>{const f=(m==null?void 0:m.id)??m;s.value=f,o.value=!1,n("selected",f),document.removeEventListener("click",p)},p=m=>{i.value&&!i.value.contains(m.target)&&(o.value=!1,document.removeEventListener("click",p))},y=()=>{o.value=!o.value,o.value?setTimeout(()=>{document.addEventListener("click",p)},200):document.removeEventListener("click",p)},w=m=>(Za==null?void 0:Za[m])??m;return e.onUnmounted(()=>{document.removeEventListener("click",p)}),(m,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("button",{type:"button","aria-expanded":"true",class:"hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",onClick:y},[e.createTextVNode(e.toDisplayString(w(c.value))+" ",1),f[0]||(f[0]=e.createElementVNode("svg",{class:"shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"biDropdown",ref:i,"data-hs-select-dropdown":"",class:"absolute mt-2 z-50 w-48 p-1 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-950 opened",role:"listbox",tabindex:"-1","aria-orientation":"vertical",style:{"margin-top":"10px"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id||u,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",onClick:g=>h(u)},[e.createElementVNode("div",rz,[e.createElementVNode("span",null,e.toDisplayString(w(u.text||u)),1),s.value===(u.id||u)?(e.openBlock(),e.createElementBlock("span",lz,f[1]||(f[1]=[e.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):e.createCommentVNode("",!0)])],8,az))),128))],512)):e.createCommentVNode("",!0)],64))}}),oz={class:"flex items-center space-x-2"},sz=e.defineComponent({__name:"vs-bi-switch",props:e.mergeModels({leftLabel:{},rightLabel:{},modelValue:{type:Boolean}},{modelValue:{default:()=>!1,type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["update:is-enabled"],["update:modelValue"]),setup(l,{emit:t}){const a=t,n=e.useModel(l,"modelValue"),o=()=>{a("update:is-enabled",n)};return(s,i)=>(e.openBlock(),e.createElementBlock("div",oz,[s.leftLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["transition-colors",{"text-blue-500":!n.value}])},e.toDisplayString(s.leftLabel),3)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>n.value=d),type:"checkbox",class:"relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",onChange:o},null,544),[[e.vModelCheckbox,n.value]]),s.rightLabel?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["transition-colors",{"text-blue-500":n.value}])},e.toDisplayString(s.rightLabel),3)):e.createCommentVNode("",!0)]))}}),ve=(l,t)=>{const a=l.__vccOpts||l;for(const[n,o]of t)a[n]=o;return a},iz={},dz={class:"flex items-center justify-center h-full"};function cz(l,t){return e.openBlock(),e.createElementBlock("div",dz,t[0]||(t[0]=[e.createElementVNode("div",{class:"text-center text-gray-500"},[e.createElementVNode("h2",{class:"text-2xl font-bold"},"No data available")],-1)]))}const hz=ve(iz,[["render",cz]]),X1={"bi-bar":e.defineAsyncComponent(()=>Promise.resolve().then(()=>dE)),"bi-number":e.defineAsyncComponent(()=>Promise.resolve().then(()=>wq)),"bi-text":e.defineAsyncComponent(()=>Promise.resolve().then(()=>Bq)),"bi-listbar":e.defineAsyncComponent(()=>Promise.resolve().then(()=>aq)),"bi-pie":e.defineAsyncComponent(()=>Promise.resolve().then(()=>fE)),"bi-donut":e.defineAsyncComponent(()=>Promise.resolve().then(()=>yE)),"bi-line":e.defineAsyncComponent(()=>Promise.resolve().then(()=>bE)),"bi-stat":e.defineAsyncComponent(()=>Promise.resolve().then(()=>LE)),"bi-pivot":e.defineAsyncComponent(()=>Promise.resolve().then(()=>gq)),"bi-progress":e.defineAsyncComponent(()=>Promise.resolve().then(()=>GE)),"bi-funnel":e.defineAsyncComponent(()=>Promise.resolve().then(()=>Sq)),"bi-map":e.defineAsyncComponent(()=>Promise.resolve().then(()=>ES)),"bi-cluster":e.defineAsyncComponent(()=>Promise.resolve().then(()=>KS)),"bi-table":e.defineAsyncComponent(()=>Promise.resolve().then(()=>ij))};let Q1="/api";function da(l){Q1=l||"/api"}function pz(l,t){const a=Q1.replace(/\/$/,""),o=l.startsWith("http")||l.startsWith("//")||a&&l.startsWith(a)?l:`${a}${l.startsWith("/")?l:`/${l}`}`;if(!t||!Object.keys(t).length)return o;const s=new URLSearchParams;Object.entries(t).forEach(([d,c])=>{c!==void 0&&c!==""&&s.set(d,String(c))});const i=s.toString();return i?`${o}${o.includes("?")?"&":"?"}${i}`:o}async function ca(l,t={}){const{params:a,...n}=t,o=pz(l,a),s=await fetch(o,{...n,headers:{"Content-Type":"application/json",...n.headers}});if(!s.ok){const d=new Error(s.statusText);throw d.status=s.status,d}const i=await s.text();if(i)try{return JSON.parse(i)}catch{return i}}const je={get(l,t){return ca(l,{...t,method:"GET"})},post(l,t){return ca(l,{method:"POST",body:t!=null?JSON.stringify(t):void 0})},put(l,t){return ca(l,{method:"PUT",body:t!=null?JSON.stringify(t):void 0})},delete(l){return ca(l,{method:"DELETE"})}},yz={key:0,class:"text-[16px] flex max-w-full items-center min-h-0 justify-between max-h-[50px] h-fit shrink-0"},uz={class:"flex items-center justify-between w-full gap-2"},kz={class:"flex items-center gap-2 min-w-0"},mz={class:"text-gray-800 max-h-[30px] inline-block line-clamp-1 font-semibold"},fz={class:"flex flex-col justify-end"},gz={key:0,class:"flex items-center justify-end w-full gap-2"},xz={class:"w-full h-full"},Ht=e.defineComponent({__name:"vs-widget",props:{dashboard:{},prefix:{default:""},widget:{},filterURl:{},dashboardWidgets:{},selectedWidget:{}},emits:["update:current-widget-data"],setup(l,{emit:t}){const a=l,n=t,o=e.ref(null),s=e.ref(null),i=e.ref(null),d=e.ref({}),c=e.ref([]),h=e.computed(()=>{var x,k;const M=(x=a.dashboardWidgets)==null?void 0:x.find(v=>v.name===a.widget);return((k=M==null?void 0:M.data)==null?void 0:k.title)??(M==null?void 0:M.title)??""}),p=e.computed(()=>{var x;const M=(x=a.dashboardWidgets)==null?void 0:x.find(k=>k.name===a.widget);return(M==null?void 0:M.type)??"text"}),y=e.computed(()=>{var x;const M=(x=d.value)==null?void 0:x.controls;return!M||typeof M=="boolean"?[]:Object.keys(M).map(k=>({name:k,options:M[k]}))}),w=e.computed(()=>{const M=p.value?`bi-${p.value}`:"";return M&&M in X1?X1[M]:null});function m(M,x){var k,v;(v=(k=s.value)==null?void 0:k.changeStyle)==null||v.call(k,M,x)}function f(M,x){const k=c.value.find(v=>v.name===x);k?k.option=M:c.value.push({name:x,option:M}),u()}function u(){var x,k;let M=`/bi-data?dashboard=${a.dashboard}&widget=${a.widget}`;c.value.forEach(v=>{M+=`&${v.name}=${v.option}`}),(k=(x=s.value)==null?void 0:x.getDataFromURL)==null||k.call(x,M)}function g(){const M=i.value;if(M!=null&&M.getDataURL){const x=M.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),k=document.createElement("a");k.href=x,k.download="chart.png",document.body.appendChild(k),k.click(),document.body.removeChild(k)}}return e.onMounted(()=>{a.prefix&&da(a.prefix)}),e.watch(()=>a.filterURl,M=>{var x,k;M&&((k=(x=s.value)==null?void 0:x.setFilter)==null||k.call(x,M))}),e.watch(()=>a.selectedWidget,(M,x)=>{var k;M!==x&&M===((k=d.value)==null?void 0:k.id)&&n("update:current-widget-data",d.value)}),e.watch(d,(M,x)=>{if((M==null?void 0:M.id)===(x==null?void 0:x.id))return;const k=typeof window<"u"?new URLSearchParams(window.top.location.search).get("widget"):null;k&&k===(M==null?void 0:M.id)&&n("update:current-widget-data",M)},{deep:!0}),(M,x)=>{var k,v,V,C,q,H,Q,G,$;return e.openBlock(),e.createElementBlock("div",{ref_key:"widgetRef",ref:o,class:e.normalizeClass(["box-border relative h-full p-4 bg-white border border-gray-200 rounded-xl shadow-sm select-auto",[(v=(k=d.value)==null?void 0:k.style)!=null&&v.height?`max-h-[${(C=(V=d.value)==null?void 0:V.style)==null?void 0:C.height}px] h-[${(H=(q=d.value)==null?void 0:q.style)==null?void 0:H.height}px]`:"max-h-[460px]"]])},[["text","cluster","map"].includes(p.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yz,[e.createElementVNode("div",uz,[e.createElementVNode("div",kz,[e.createElementVNode("span",mz,e.toDisplayString(h.value),1)]),e.createElementVNode("div",fz,[(Q=y.value)!=null&&Q.length?(e.openBlock(),e.createElementBlock("span",gz,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=y.value)==null?void 0:G.filter(B=>(B==null?void 0:B.options)&&(B==null?void 0:B.name)!=="export"),B=>{var P,L;return e.openBlock(),e.createElementBlock("div",{key:B==null?void 0:B.name},[Array.isArray(B==null?void 0:B.options)?(e.openBlock(),e.createBlock(nz,{key:0,title:B==null?void 0:B.name,options:B==null?void 0:B.options,value:((L=(P=d.value)==null?void 0:P.data)==null?void 0:L[B==null?void 0:B.name])??null,onSelected:Z=>f(Z,B==null?void 0:B.name)},null,8,["title","options","value","onSelected"])):typeof B.options=="boolean"?(e.openBlock(),e.createBlock(sz,{key:1,"left-label":B==null?void 0:B.name,"model-value":!!(B!=null&&B.options),"onUpdate:isEnabled":Z=>m(B==null?void 0:B.name,Z)},null,8,["left-label","model-value","onUpdate:isEnabled"])):e.createCommentVNode("",!0)])}),128)),($=y.value)!=null&&$.some(B=>(B==null?void 0:B.name)==="export")?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center",onClick:g},[e.createVNode(e.unref(F1),{size:16,class:"text-gray-800"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])])),e.createElementVNode("div",xz,[w.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value),{key:0,ref_key:"chartRef",ref:s,"current-widget":i.value,"onUpdate:currentWidget":x[0]||(x[0]=B=>i.value=B),"widget-data":d.value,"onUpdate:widgetData":x[1]||(x[1]=B=>d.value=B),dashboard:M.dashboard,title:h.value,widget:M.widget},null,40,["current-widget","widget-data","dashboard","title","widget"])):(e.openBlock(),e.createBlock(hz,{key:1,class:"w-full h-full"}))])],2)}}}),Mz={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},bz={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},wz={class:"max-w-sm mx-auto mt-6"},vz={class:"font-medium text-gray-800 dark:text-neutral-200"},Vz={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"},ha=e.defineComponent({__name:"vs-new-nodata",props:{title:{default:"Дані для відображення відсутні"},text:{default:"Змініть параметри пошуку або спробуйте пізніше"}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Mz,[e.createElementVNode("div",null,[e.createElementVNode("div",bz,[a[0]||(a[0]=e.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),e.createElementVNode("div",wz,[e.createElementVNode("p",vz,e.toDisplayString(t.title),1),e.createElementVNode("p",Vz,e.toDisplayString(t.text),1)])])])]))}}),Cz={components:{filterIcon:{__name:"filter",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Ra),e.mergeProps(t.$attrs,{size:24}),null,16))}}},props:["filterScheme"],emits:["filters:changed"]},zz={class:"flex items-center"},Bz={key:0,type:"button",class:"py-2 px-2.5 ml-3 h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 opacity-60 cursor-not-allowed",disabled:"",title:"Фільтри вимкнено (v3-filter видалено)"};function _z(l,t,a,n,o,s){const i=e.resolveComponent("filterIcon");return e.openBlock(),e.createElementBlock("div",zz,[a.filterScheme?(e.openBlock(),e.createElementBlock("button",Bz,[e.createVNode(i),t[0]||(t[0]=e.createTextVNode(" Фільтри "))])):e.createCommentVNode("",!0)])}const Ez={components:{VsFilterHeader:ve(Cz,[["render",_z]])},props:{dashboardData:{type:Object,default:null},filters:{type:Array,default:null}}},qz={class:"bg-white px-5 flex gap-4 h-[90px] border border-gray-200 rounded-xl mb-2 pt-[3px] justify-between items-center"},Sz={class:"grow"},jz={class:"text-lg font-semibold text-stone-800 dark:text-neutral-200"},Az={key:0,class:"inline-flex items-center text-sm gap-x-2 text-stone-800 hover:text-stone-500 focus:outline-none focus:text-stone-500 dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400"},Dz={key:0,class:"flex items-center gap-3"};function Nz(l,t,a,n,o,s){var d,c,h;const i=e.resolveComponent("VsFilterHeader");return e.openBlock(),e.createElementBlock("div",qz,[e.createElementVNode("div",Sz,[e.createElementVNode("h1",jz,e.toDisplayString((d=a.dashboardData)==null?void 0:d.title),1),(c=a.dashboardData)!=null&&c.description?(e.openBlock(),e.createElementBlock("button",Az,e.toDisplayString((h=a.dashboardData)==null?void 0:h.description),1)):e.createCommentVNode("",!0)]),a.filters?(e.openBlock(),e.createElementBlock("div",Dz,[e.createVNode(i,{filterScheme:a.filters,"onFilters:changed":t[0]||(t[0]=p=>l.$emit("filters:changed",p))},null,8,["filterScheme"])])):e.createCommentVNode("",!0)])}const Lz=ve(Ez,[["render",Nz]]);var er={},tr;(function(l){l.pop="pop",l.push="push"})(tr||(tr={}));var ar;(function(l){l.back="back",l.forward="forward",l.unknown=""})(ar||(ar={}));var rr;(function(l){l[l.aborted=4]="aborted",l[l.cancelled=8]="cancelled",l[l.duplicated=16]="duplicated"})(rr||(rr={}));const Hz=Symbol(er.NODE_ENV!=="production"?"router":""),$z=Symbol(er.NODE_ENV!=="production"?"route location":"");function Wa(){return e.inject(Hz)}function Fz(l){return e.inject($z)}const Tz={key:0,class:"text-gray-400 shrink-0"},Pz=["onClick"],Iz=["onClick"],Rz={key:4,class:"text-gray-900 font-medium truncate"},lr={__name:"vs-breadcrumbs",props:{items:{type:Array,default:()=>[]},compact:{type:Boolean,default:!1}},setup(l){const t=l,a=Wa(),n=e.computed(()=>Array.isArray(t.items)?t.items:[]);function o(s){a!=null&&a.push?a.push(s):typeof s=="string"&&(window!=null&&window.location)&&(window.location.href=s)}return(s,i)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["flex items-center gap-2 text-sm text-gray-600",l.compact?"py-1":"py-6"]),"aria-label":"Breadcrumb"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(c,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[h>0?(e.openBlock(),e.createElementBlock("span",Tz,[e.createVNode(e.unref($1),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),typeof c.onClick=="function"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"hover:text-gray-900 transition-colors cursor-pointer",onClick:p=>c.onClick()},e.toDisplayString(c.label),9,Pz)):e.unref(a)&&c.to?(e.openBlock(),e.createBlock(d,{key:2,to:c.to,class:"hover:text-gray-900 transition-colors"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1032,["to"])):c.to?(e.openBlock(),e.createElementBlock("span",{key:3,class:"hover:text-gray-900 transition-colors cursor-pointer",onClick:p=>o(c.to)},e.toDisplayString(c.label),9,Iz)):(e.openBlock(),e.createElementBlock("span",Rz,e.toDisplayString(c.label),1))],64))),128))],2)}}},Oz={components:{VsWidget:Ht,VsNewNodata:ha,VsHeader:Lz,VsBreadcrumbs:lr},props:["id","prefix"],data(){return{widgets:[],panels:[],error:!1,selectedPanel:"",filterURl:null,dashboardData:null}},async mounted(){da(this.prefix||"/api"),await this.fetchData()},methods:{async fetchData(){if(this.id)try{const l=await je.get(`/bi-dashboard/${this.id}`);this.dashboardData=l}catch(l){console.error(l)}},columnClass(l){const t=l!=null&&l.col?l==null?void 0:l.col:12;return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[t]||"w-full"},async filterHandler(l){var a;this.filterURl="";let t="&filter=";(a=l==null?void 0:l.url)!=null&&a.length&&(l.url.split("|").forEach(o=>{const s=o.split("=");t+=`${s[0]}=${s[1]}`}),this.filterURl+=t)}}},Uz={class:"w-full pb-8 overflow-y-auto mx-auto"},Zz={class:"grid flex-grow w-full grid-cols-12 gap-4 h-fit"};function Wz(l,t,a,n,o,s){var c;const i=e.resolveComponent("VsNewNodata"),d=e.resolveComponent("VsWidget");return e.openBlock(),e.createElementBlock("div",Uz,[e.createElementVNode("div",Zz,[o.error||!o.dashboardData?(e.openBlock(),e.createBlock(i,{key:0,class:"col-span-12"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((c=o.dashboardData)==null?void 0:c.panels)||[],(h,p)=>{var y;return e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass([`col-span-${h.col||12}`,"flex flex-col gap-[10px]"])},[(y=h.widgets)!=null&&y.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h.widgets,w=>(e.openBlock(),e.createBlock(d,{key:w,dashboard:a.id,widget:w,"dashboard-widgets":o.dashboardData.widgets,"filter-u-rl":o.filterURl},null,8,["dashboard","widget","dashboard-widgets","filter-u-rl"]))),128)):(e.openBlock(),e.createBlock(d,{key:1,class:"flex flex-col",dashboard:a.id,widget:h.widget,"dashboard-widgets":o.dashboardData.widgets,"filter-u-rl":o.filterURl},null,8,["dashboard","widget","dashboard-widgets","filter-u-rl"]))],2)}),128))])])}const Gz=ve(Oz,[["render",Wz]]),Kz={key:0,class:"vs-modal-wrapper fixed inset-0 flex items-center justify-center p-4",style:{"z-index":"9999"}},Jz={class:"flex items-center justify-between shrink-0 py-2.5 px-4 border-b border-gray-200 dark:border-[#454545]"},Yz={class:"font-medium text-gray-800 dark:text-white"},Xz={class:"vs-modal-content flex-1 min-h-0 overflow-auto p-4"},Qz={key:0,class:"shrink-0 border-t border-gray-200 dark:border-neutral-700"},$t=ve({__name:"vs-modal",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},size:{type:String,default:"medium"},closeClickBack:{type:Boolean,default:!1},teleport:{type:String,default:"#modal"}},emits:["close","update:visible"],setup(l,{emit:t}){const a=l,n=t,o=e.computed(()=>a.size==="small"?"md:max-w-[40%] w-full max-w-md":a.size==="lg"?"md:max-w-[70%] w-full max-w-4xl":"md:max-w-[50%] w-full max-w-lg");function s(){n("update:visible",!1),n("close")}function i(d){d.key==="Escape"&&s()}return e.onMounted(()=>{window.addEventListener("keydown",i)}),e.onUnmounted(()=>{window.removeEventListener("keydown",i)}),(d,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:l.teleport},[l.visible?(e.openBlock(),e.createElementBlock("div",Kz,[e.createElementVNode("div",{class:"absolute inset-0 bg-black/50","aria-hidden":"true",onMousedown:c[0]||(c[0]=h=>l.closeClickBack&&h.target===h.currentTarget&&s())},null,32),e.createVNode(e.Transition,{name:"vs-modal",appear:""},{default:e.withCtx(()=>[l.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["vs-modal-panel relative flex flex-col bg-white dark:bg-[#1A1A1A] rounded-xl shadow-xl max-h-[85vh] min-w-0 border border-gray-200 dark:border-[#454545]",o.value]),role:"dialog","aria-modal":"true",onMousedown:c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Jz,[e.createElementVNode("h3",Yz,e.toDisplayString(l.title),1),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center rounded-full bg-gray-100 text-gray-800 hover:bg-gray-200 dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-300","aria-label":"Закрити",onClick:s},c[2]||(c[2]=[e.createElementVNode("svg",{class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),e.createElementVNode("div",Xz,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",Qz,[e.renderSlot(d.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],34)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],8,["to"]))}},[["__scopeId","data-v-335a5d48"]]),eB={__name:"icon-plus",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Oa),e.mergeProps(t.$attrs,{size:24}),null,16))}},tB={class:"mb-4 overflow-auto scrollbar max-h-96"},aB={__name:"vs-editor-create-widget",props:{columns:{type:Array,default:()=>[]},selectedDashboard:String,inline:{type:Boolean,default:!1}},emits:"update-data",setup(l,{expose:t,emit:a}){var f;const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),o=(f=e.getCurrentInstance().proxy)==null?void 0:f.$notify,s=a,i=l,d=e.ref(!1),c=e.ref({}),h=e.ref();function p(){d.value=!0}function y(){d.value=!1}t({open:p,close:y});const w=async()=>{try{await h.value.doValidation(),await je.post(`/bi-dashboard/${i.selectedDashboard}`,c.value),await o({type:"success",title:"Успішно!",message:"Віджет успішно створено"}),await s("update-data"),c.value={},d.value=!1}catch{o({type:"error",title:"Помилка!",message:"При спробі створити віджет сталася помилка"})}},m=e.computed(()=>{var u,g,M,x;return{title:{type:"text",label:"Widget title",placeholder:"Widget title",validators:["required"]},x:{type:"radio",label:"X Axis",view:"buttons",style:{size:"xs"},validators:["required"],options:(g=(u=i.columns)==null?void 0:u.filter(k=>(k==null?void 0:k.type)=="text"||(k==null?void 0:k.type)==="date"||(k==null?void 0:k.type)==="timestamp without time zone"||(k==null?void 0:k.type)==="boolean"||(k==null?void 0:k.type)==="integer"))==null?void 0:g.map(({name:k,type:v})=>({id:k,label:k,type:v}))},metric:{type:"radio",label:"Y Axis",view:"buttons",validators:["required"],style:{size:"xs"},options:[{id:"count",label:"count"},...(x=(M=i.columns)==null?void 0:M.filter(k=>(k==null?void 0:k.type)==="numeric"||(k==null?void 0:k.type)==="double precision"))==null?void 0:x.map(({name:k,type:v})=>({id:k,label:k,type:v}))]},col:{type:"radio",label:"Columns count",validators:["required"],options:[{id:1,label:1},{id:2,label:2},{id:3,label:3},{id:4,label:4},{id:6,label:6},{id:9,label:9},{id:12,label:12}]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"Text",ua:"Table",placeholder:"Table"},query:{type:"Text",ua:"Query",placeholder:"Query"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}}});return(u,g)=>{const M=e.resolveComponent("VsPopover");return e.openBlock(),e.createElementBlock("div",null,[l.inline?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:0,placement:"right",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("button",{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",onClick:p},[e.createVNode(eB,{height:"20",width:"20"})])])]),default:e.withCtx(()=>[g[1]||(g[1]=e.createTextVNode(" Створити віджет "))]),_:1})),e.createVNode($t,{teleport:"#modal",visible:d.value,title:"Створити віджет",onClose:y},{footer:e.withCtx(()=>[e.createElementVNode("div",{class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:y,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:w,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:e.withCtx(()=>[e.createElementVNode("div",tB,[e.createVNode(e.unref(n),{ref_key:"form",ref:h,schema:m.value,values:c.value,"onUpdate:values":g[0]||(g[0]=x=>c.value=x)},null,8,["schema","values"])])]),_:1},8,["visible"])])}}},nr={__name:"delete",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Y1),e.mergeProps(t.$attrs,{size:24}),null,16))}},Ga={__name:"close",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Ua),e.mergeProps(t.$attrs,{size:24}),null,16))}},or={__name:"edit",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(W1),e.mergeProps(t.$attrs,{size:24}),null,16))}},rB={class:"space-y-4"},lB={__name:"vs-editor-form-style",props:{widgetName:{type:String},data:{type:Object,default:()=>{}}},setup(l,{expose:t}){var f,u,g,M,x,k;const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),{$notify:n}=e.getCurrentInstance().proxy,o=l,s=e.ref(null),i={show:{label:"Label",type:"switcher",title:"Show label"},rotate:{type:"number",label:"Rotate angel",conditions:["show","==",!0]},align:{type:"radio",view:"buttons",style:{size:"xs"},conditions:["show","==",!0],options:[{id:"center",text:"Center"},{id:"left",text:"Left"},{id:"right",text:"Right"}]},position:{type:"radio",view:"buttons",style:{size:"xs"},conditions:["show","==",!0],options:[{id:"top",text:"Top"},{id:"right",text:"Right"},{id:"left",text:"Left"},{id:"bottom",text:"Bottom"}]}},d={show:{label:"Legend",type:"switcher",title:"Show legend"}},c={show:{label:"Tooltip ",type:"switcher",title:"Show tooltip"}},h=e.ref({...((u=(f=o.data)==null?void 0:f.style)==null?void 0:u.label)||{}}),p=e.ref({...((M=(g=o.data)==null?void 0:g.style)==null?void 0:M.legend)||{}}),y=e.ref({...((k=(x=o.data)==null?void 0:x.style)==null?void 0:k.tooltip)||{}}),w=()=>{const v=new CustomEvent(`update-style-${o.widgetName}`);v.chartId=o.widgetName,v.options={options:{legend:p.value,tooltip:y.value,label:h.value},seriesOptions:h.value},window.dispatchEvent(v)};e.watch(h,w,{deep:!0}),e.watch(p,w,{deep:!0}),e.watch(y,w,{deep:!0});const m=async()=>{try{await je.put(`/bi-dashboard/${s.value}/${o.widgetName}`,{style:{legend:p.value,tooltip:y.value,label:h.value}});const v=new CustomEvent(`update-style-${o.widgetName}`);v.chartId=o.widgetName,v.options={options:{legend:p.value,tooltip:y.value,label:h.value},seriesOptions:h.value},window.dispatchEvent(v),n({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{n({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.onMounted(()=>{const v=new URLSearchParams(window.top.location.search);s.value=v.get("dashboard")}),t({requestUpdateWidget:m}),(v,V)=>(e.openBlock(),e.createElementBlock("div",rB,[e.createVNode(e.unref(a),{schema:i,values:h.value,"onUpdate:values":V[0]||(V[0]=C=>h.value=C),class:"p-0"},null,8,["values"]),e.createVNode(e.unref(a),{schema:d,values:p.value,"onUpdate:values":V[1]||(V[1]=C=>p.value=C),class:"p-0"},null,8,["values"]),e.createVNode(e.unref(a),{schema:c,values:y.value,"onUpdate:values":V[2]||(V[2]=C=>y.value=C),class:"p-0"},null,8,["values"])]))}};function Ka(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ft=Ka();function sr(l){ft=l}const ir=/[&<>"']/,nB=new RegExp(ir.source,"g"),dr=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,oB=new RegExp(dr.source,"g"),sB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cr=l=>sB[l];function Oe(l,t){if(t){if(ir.test(l))return l.replace(nB,cr)}else if(dr.test(l))return l.replace(oB,cr);return l}const iB=/(^|[^\[])\^/g;function Ve(l,t){let a=typeof l=="string"?l:l.source;t=t||"";const n={replace:(o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(iB,"$1"),a=a.replace(o,i),n},getRegex:()=>new RegExp(a,t)};return n}function hr(l){try{l=encodeURI(l).replace(/%25/g,"%")}catch{return null}return l}const Ft={exec:()=>null};function pr(l,t){const a=l.replace(/\|/g,(s,i,d)=>{let c=!1,h=i;for(;--h>=0&&d[h]==="\\";)c=!c;return c?"|":" |"}),n=a.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(/\\\|/g,"|");return n}function Tt(l,t,a){const n=l.length;if(n===0)return"";let o=0;for(;o<n&&l.charAt(n-o-1)===t;)o++;return l.slice(0,n-o)}function dB(l,t){if(l.indexOf(t[1])===-1)return-1;let a=0;for(let n=0;n<l.length;n++)if(l[n]==="\\")n++;else if(l[n]===t[0])a++;else if(l[n]===t[1]&&(a--,a<0))return n;return-1}function yr(l,t,a,n){const o=t.href,s=t.title?Oe(t.title):null,i=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){n.state.inLink=!0;const d={type:"link",raw:a,href:o,title:s,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,d}return{type:"image",raw:a,href:o,title:s,text:Oe(i)}}function cB(l,t){const a=l.match(/^(\s+)(?:```)/);if(a===null)return t;const n=a[1];return t.split(`
8216
+ */const tz=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:Yl,AArrowUp:Xl,ALargeSmall:Ql,Accessibility:en,Activity:tn,AirVent:an,Airplay:rn,AlarmClock:dn,AlarmClockCheck:ln,AlarmClockMinus:nn,AlarmClockOff:on,AlarmClockPlus:sn,AlarmSmoke:cn,Album:hn,AlignCenterHorizontal:pn,AlignCenterVertical:yn,AlignEndHorizontal:un,AlignEndVertical:kn,AlignHorizontalDistributeCenter:mn,AlignHorizontalDistributeEnd:fn,AlignHorizontalDistributeStart:gn,AlignHorizontalJustifyCenter:Mn,AlignHorizontalJustifyEnd:xn,AlignHorizontalJustifyStart:bn,AlignHorizontalSpaceAround:wn,AlignHorizontalSpaceBetween:vn,AlignStartHorizontal:Vn,AlignStartVertical:Cn,AlignVerticalDistributeCenter:zn,AlignVerticalDistributeEnd:Bn,AlignVerticalDistributeStart:En,AlignVerticalJustifyCenter:_n,AlignVerticalJustifyEnd:qn,AlignVerticalJustifyStart:Sn,AlignVerticalSpaceAround:jn,AlignVerticalSpaceBetween:An,Ambulance:Dn,Ampersand:Nn,Ampersands:Ln,Amphora:Hn,Anchor:$n,Angry:Fn,Annoyed:Tn,Antenna:Pn,Anvil:In,Aperture:Rn,AppWindow:Un,AppWindowMac:On,Apple:Zn,Archive:Kn,ArchiveRestore:Wn,ArchiveX:Gn,Armchair:Jn,ArrowBigDown:Xn,ArrowBigDownDash:Yn,ArrowBigLeft:eo,ArrowBigLeftDash:Qn,ArrowBigRight:ao,ArrowBigRightDash:to,ArrowBigUp:lo,ArrowBigUpDash:ro,ArrowDown:go,ArrowDown01:no,ArrowDown10:oo,ArrowDownAZ:so,ArrowDownFromLine:io,ArrowDownLeft:co,ArrowDownNarrowWide:ho,ArrowDownRight:po,ArrowDownToDot:yo,ArrowDownToLine:uo,ArrowDownUp:ko,ArrowDownWideNarrow:mo,ArrowDownZA:fo,ArrowLeft:wo,ArrowLeftFromLine:xo,ArrowLeftRight:Mo,ArrowLeftToLine:bo,ArrowRight:zo,ArrowRightFromLine:vo,ArrowRightLeft:Vo,ArrowRightToLine:Co,ArrowUp:Fo,ArrowUp01:Bo,ArrowUp10:Eo,ArrowUpAZ:_o,ArrowUpDown:qo,ArrowUpFromDot:So,ArrowUpFromLine:jo,ArrowUpLeft:Ao,ArrowUpNarrowWide:Do,ArrowUpRight:No,ArrowUpToLine:Lo,ArrowUpWideNarrow:Ho,ArrowUpZA:$o,ArrowsUpFromLine:To,Asterisk:Po,AtSign:Io,Atom:Ro,AudioLines:Oo,AudioWaveform:Uo,Award:Zo,Axe:Wo,Axis3d:Go,Baby:Ko,Backpack:Jo,Badge:u0,BadgeAlert:Yo,BadgeCent:Xo,BadgeCheck:Qo,BadgeDollarSign:e0,BadgeEuro:t0,BadgeIndianRupee:a0,BadgeInfo:r0,BadgeJapaneseYen:l0,BadgeMinus:n0,BadgePercent:o0,BadgePlus:s0,BadgePoundSterling:i0,BadgeQuestionMark:d0,BadgeRussianRuble:c0,BadgeSwissFranc:h0,BadgeTurkishLira:p0,BadgeX:y0,BaggageClaim:k0,Ban:m0,Banana:f0,Bandage:g0,Banknote:w0,BanknoteArrowDown:x0,BanknoteArrowUp:M0,BanknoteX:b0,Barcode:v0,Barrel:V0,Baseline:C0,Bath:z0,Battery:A0,BatteryCharging:B0,BatteryFull:E0,BatteryLow:_0,BatteryMedium:q0,BatteryPlus:S0,BatteryWarning:j0,Beaker:D0,Bean:L0,BeanOff:N0,Bed:F0,BedDouble:H0,BedSingle:$0,Beef:T0,Beer:I0,BeerOff:P0,Bell:K0,BellDot:R0,BellElectric:O0,BellMinus:U0,BellOff:Z0,BellPlus:W0,BellRing:G0,BetweenHorizontalEnd:J0,BetweenHorizontalStart:Y0,BetweenVerticalEnd:X0,BetweenVerticalStart:Q0,BicepsFlexed:e2,Bike:t2,Binary:r2,Binoculars:a2,Biohazard:l2,Bird:n2,Bitcoin:o2,Blend:s2,Blinds:i2,Blocks:d2,Bluetooth:y2,BluetoothConnected:c2,BluetoothOff:h2,BluetoothSearching:p2,Bold:u2,Bolt:k2,Bomb:m2,Bone:f2,Book:I2,BookA:g2,BookAlert:x2,BookAudio:M2,BookCheck:b2,BookCopy:w2,BookDashed:v2,BookDown:V2,BookHeadphones:C2,BookHeart:z2,BookImage:B2,BookKey:E2,BookLock:_2,BookMarked:q2,BookMinus:S2,BookOpen:D2,BookOpenCheck:j2,BookOpenText:A2,BookPlus:N2,BookText:L2,BookType:H2,BookUp:F2,BookUp2:$2,BookUser:T2,BookX:P2,Bookmark:Z2,BookmarkCheck:R2,BookmarkMinus:O2,BookmarkPlus:U2,BookmarkX:W2,BoomBox:G2,Bot:Y2,BotMessageSquare:K2,BotOff:J2,BottleWine:X2,BowArrow:Q2,Box:es,Boxes:ts,Braces:as,Brackets:rs,Brain:os,BrainCircuit:ls,BrainCog:ns,BrickWall:ds,BrickWallFire:ss,BrickWallShield:is,Briefcase:ys,BriefcaseBusiness:cs,BriefcaseConveyorBelt:hs,BriefcaseMedical:ps,BringToFront:ks,Brush:ms,BrushCleaning:us,Bubbles:fs,Bug:Ms,BugOff:gs,BugPlay:xs,Building:ws,Building2:bs,Bus:Vs,BusFront:vs,Cable:zs,CableCar:Cs,Cake:Es,CakeSlice:Bs,Calculator:_s,Calendar:Js,Calendar1:qs,CalendarArrowDown:Ss,CalendarArrowUp:js,CalendarCheck:Ds,CalendarCheck2:As,CalendarClock:Ns,CalendarCog:Ls,CalendarDays:Hs,CalendarFold:$s,CalendarHeart:Fs,CalendarMinus:Ps,CalendarMinus2:Ts,CalendarOff:Is,CalendarPlus:Os,CalendarPlus2:Rs,CalendarRange:Us,CalendarSearch:Zs,CalendarSync:Ws,CalendarX:Ks,CalendarX2:Gs,Camera:Xs,CameraOff:Ys,Candy:ti,CandyCane:Qs,CandyOff:ei,Cannabis:ai,Captions:li,CaptionsOff:ri,Car:si,CarFront:ni,CarTaxiFront:oi,Caravan:di,CardSim:ii,Carrot:ci,CaseLower:hi,CaseSensitive:pi,CaseUpper:yi,CassetteTape:ui,Cast:ki,Castle:mi,Cat:fi,Cctv:gi,ChartArea:xi,ChartBar:Vi,ChartBarBig:Mi,ChartBarDecreasing:bi,ChartBarIncreasing:wi,ChartBarStacked:vi,ChartCandlestick:Ci,ChartColumn:qi,ChartColumnBig:zi,ChartColumnDecreasing:Bi,ChartColumnIncreasing:Ei,ChartColumnStacked:_i,ChartGantt:Si,ChartLine:ji,ChartNetwork:Ai,ChartNoAxesColumn:Li,ChartNoAxesColumnDecreasing:Di,ChartNoAxesColumnIncreasing:Ni,ChartNoAxesCombined:Hi,ChartNoAxesGantt:$i,ChartPie:Fi,ChartScatter:Ti,ChartSpline:Pi,Check:Oi,CheckCheck:Ii,CheckLine:Ri,ChefHat:Ui,Cherry:Zi,ChevronDown:Wi,ChevronFirst:Gi,ChevronLast:Ki,ChevronLeft:Ji,ChevronRight:$1,ChevronUp:Yi,ChevronsDown:Qi,ChevronsDownUp:Xi,ChevronsLeft:ad,ChevronsLeftRight:td,ChevronsLeftRightEllipsis:ed,ChevronsRight:ld,ChevronsRightLeft:rd,ChevronsUp:od,ChevronsUpDown:nd,Chromium:sd,Church:id,Cigarette:cd,CigaretteOff:dd,Circle:tc,CircleAlert:hd,CircleArrowDown:pd,CircleArrowLeft:yd,CircleArrowOutDownLeft:ud,CircleArrowOutDownRight:kd,CircleArrowOutUpLeft:md,CircleArrowOutUpRight:fd,CircleArrowRight:gd,CircleArrowUp:xd,CircleCheck:bd,CircleCheckBig:Md,CircleChevronDown:wd,CircleChevronLeft:vd,CircleChevronRight:Cd,CircleChevronUp:Vd,CircleDashed:zd,CircleDivide:Bd,CircleDollarSign:Ed,CircleDot:qd,CircleDotDashed:_d,CircleEllipsis:Sd,CircleEqual:jd,CircleFadingArrowUp:Ad,CircleFadingPlus:Dd,CircleGauge:Nd,CircleMinus:Ld,CircleOff:Hd,CircleParking:Fd,CircleParkingOff:$d,CirclePause:Td,CirclePercent:Pd,CirclePlay:Id,CirclePlus:Rd,CirclePoundSterling:Od,CirclePower:Ud,CircleQuestionMark:Zd,CircleSlash:Wd,CircleSlash2:Gd,CircleSmall:Kd,CircleStar:Jd,CircleStop:Yd,CircleUser:Qd,CircleUserRound:Xd,CircleX:ec,CircuitBoard:ac,Citrus:rc,Clapperboard:lc,Clipboard:mc,ClipboardCheck:nc,ClipboardClock:oc,ClipboardCopy:sc,ClipboardList:ic,ClipboardMinus:dc,ClipboardPaste:cc,ClipboardPen:pc,ClipboardPenLine:hc,ClipboardPlus:yc,ClipboardType:uc,ClipboardX:kc,Clock:Dc,Clock1:fc,Clock10:gc,Clock11:xc,Clock12:Mc,Clock2:bc,Clock3:wc,Clock4:vc,Clock5:Vc,Clock6:Cc,Clock7:zc,Clock8:Bc,Clock9:Ec,ClockAlert:_c,ClockArrowDown:qc,ClockArrowUp:Sc,ClockFading:jc,ClockPlus:Ac,ClosedCaption:Nc,Cloud:Qc,CloudAlert:Lc,CloudCheck:Hc,CloudCog:$c,CloudDownload:Fc,CloudDrizzle:Tc,CloudFog:Pc,CloudHail:Ic,CloudLightning:Rc,CloudMoon:Uc,CloudMoonRain:Oc,CloudOff:Zc,CloudRain:Kc,CloudRainWind:Wc,CloudSnow:Gc,CloudSun:Yc,CloudSunRain:Jc,CloudUpload:Xc,Cloudy:eh,Clover:th,Club:ah,Code:nh,CodeXml:rh,Codepen:lh,Codesandbox:sh,Coffee:oh,Cog:ih,Coins:dh,Columns2:ch,Columns3:ph,Columns3Cog:hh,Columns4:yh,Combine:uh,Command:kh,Compass:mh,Component:fh,Computer:gh,ConciergeBell:xh,Cone:Mh,Construction:bh,Contact:vh,ContactRound:wh,Container:Vh,Contrast:Ch,Cookie:zh,CookingPot:Bh,Copy:Ah,CopyCheck:Eh,CopyMinus:_h,CopyPlus:qh,CopySlash:Sh,CopyX:jh,Copyleft:Dh,Copyright:Nh,CornerDownLeft:Lh,CornerDownRight:Hh,CornerLeftDown:$h,CornerLeftUp:Fh,CornerRightDown:Th,CornerRightUp:Ph,CornerUpLeft:Ih,CornerUpRight:Rh,Cpu:Uh,CreativeCommons:Oh,CreditCard:Zh,Croissant:Wh,Crop:Gh,Cross:Kh,Crosshair:Jh,Crown:Yh,Cuboid:Xh,CupSoda:Qh,Currency:ep,Cylinder:ap,Dam:tp,Database:np,DatabaseBackup:rp,DatabaseZap:lp,DecimalsArrowLeft:op,DecimalsArrowRight:sp,Delete:ip,Dessert:dp,Diameter:cp,Diamond:up,DiamondMinus:hp,DiamondPercent:pp,DiamondPlus:yp,Dice1:kp,Dice2:mp,Dice3:gp,Dice4:fp,Dice5:xp,Dice6:Mp,Dices:wp,Diff:bp,Disc:zp,Disc2:vp,Disc3:Vp,DiscAlbum:Cp,Divide:Bp,Dna:Ep,DnaOff:_p,Dock:jp,Dog:qp,DollarSign:Sp,Donut:Ap,DoorClosed:Np,DoorClosedLocked:Dp,DoorOpen:Lp,Dot:Hp,Download:F1,DraftingCompass:$p,Drama:Fp,Dribbble:Tp,Drill:Pp,Drone:Ip,Droplet:Op,DropletOff:Rp,Droplets:Up,Drum:Zp,Drumstick:Wp,Dumbbell:Gp,Ear:Jp,EarOff:Kp,Earth:Xp,EarthLock:Yp,Eclipse:Qp,Egg:ay,EggFried:ey,EggOff:ty,Ellipsis:ry,EllipsisVertical:T1,Equal:oy,EqualApproximately:ny,EqualNot:ly,Eraser:iy,EthernetPort:sy,Euro:dy,EvCharger:cy,Expand:hy,ExternalLink:py,Eye:ky,EyeClosed:yy,EyeOff:uy,Facebook:my,Factory:fy,Fan:gy,FastForward:xy,Feather:My,Fence:by,FerrisWheel:wy,Figma:vy,File:Eu,FileArchive:Vy,FileAudio:zy,FileAudio2:Cy,FileAxis3d:By,FileBadge:_y,FileBadge2:Ey,FileBox:qy,FileChartColumn:jy,FileChartColumnIncreasing:Sy,FileChartLine:Ay,FileChartPie:Dy,FileCheck:Ly,FileCheck2:Ny,FileClock:Hy,FileCode:Fy,FileCode2:$y,FileCog:Ty,FileDiff:Py,FileDigit:Iy,FileDown:Ry,FileHeart:Oy,FileImage:Uy,FileInput:Zy,FileJson:Gy,FileJson2:Wy,FileKey:Jy,FileKey2:Ky,FileLock:Xy,FileLock2:Yy,FileMinus:eu,FileMinus2:Qy,FileMusic:tu,FileOutput:ru,FilePen:lu,FilePenLine:au,FilePlay:nu,FilePlus:su,FilePlus2:ou,FileQuestionMark:iu,FileScan:du,FileSearch:pu,FileSearch2:cu,FileSliders:hu,FileSpreadsheet:yu,FileStack:uu,FileSymlink:ku,FileTerminal:mu,FileText:fu,FileType:xu,FileType2:gu,FileUp:Mu,FileUser:bu,FileVideoCamera:wu,FileVolume:vu,FileVolume2:Vu,FileWarning:Cu,FileX:Bu,FileX2:zu,Files:_u,Film:qu,Fingerprint:Su,FireExtinguisher:ju,Fish:Nu,FishOff:Au,FishSymbol:Du,Flag:Fu,FlagOff:Lu,FlagTriangleLeft:Hu,FlagTriangleRight:$u,Flame:Pu,FlameKindling:Tu,Flashlight:Ru,FlashlightOff:Iu,FlaskConical:Ou,FlaskConicalOff:Uu,FlaskRound:Zu,FlipHorizontal:Gu,FlipHorizontal2:Wu,FlipVertical:Ju,FlipVertical2:Ku,Flower:Xu,Flower2:Yu,Focus:Qu,FoldHorizontal:ek,FoldVertical:tk,Folder:Sk,FolderArchive:ak,FolderCheck:rk,FolderClock:lk,FolderClosed:nk,FolderCode:ok,FolderCog:sk,FolderDot:ik,FolderDown:dk,FolderGit:pk,FolderGit2:ck,FolderHeart:hk,FolderInput:yk,FolderKanban:uk,FolderKey:kk,FolderLock:mk,FolderMinus:fk,FolderOpen:xk,FolderOpenDot:gk,FolderOutput:Mk,FolderPen:bk,FolderPlus:wk,FolderRoot:vk,FolderSearch:Ck,FolderSearch2:Vk,FolderSymlink:zk,FolderSync:Bk,FolderTree:Ek,FolderUp:_k,FolderX:qk,Folders:jk,Footprints:Ak,Forklift:Dk,Forward:Hk,Frame:Nk,Framer:Lk,Frown:$k,Fuel:Fk,Fullscreen:Tk,Funnel:Ra,FunnelPlus:Pk,FunnelX:Ik,GalleryHorizontal:Ok,GalleryHorizontalEnd:Rk,GalleryThumbnails:Zk,GalleryVertical:Wk,GalleryVerticalEnd:Uk,Gamepad:Kk,Gamepad2:Gk,Gauge:Jk,Gavel:Yk,Gem:Xk,GeorgianLari:Qk,Ghost:e4,Gift:t4,GitBranch:r4,GitBranchPlus:a4,GitCommitHorizontal:l4,GitCommitVertical:n4,GitCompare:s4,GitCompareArrows:o4,GitFork:i4,GitGraph:d4,GitMerge:c4,GitPullRequest:m4,GitPullRequestArrow:h4,GitPullRequestClosed:p4,GitPullRequestCreate:u4,GitPullRequestCreateArrow:y4,GitPullRequestDraft:k4,Github:f4,Gitlab:g4,GlassWater:x4,Glasses:M4,Globe:w4,GlobeLock:b4,Goal:V4,Gpu:v4,GraduationCap:C4,Grape:z4,Grid2x2:q4,Grid2x2Check:B4,Grid2x2Plus:E4,Grid2x2X:_4,Grid3x2:S4,Grid3x3:j4,Grip:D4,GripHorizontal:A4,GripVertical:P1,Group:N4,Guitar:L4,Ham:H4,Hamburger:$4,Hammer:F4,Hand:W4,HandCoins:T4,HandFist:P4,HandGrab:I4,HandHeart:R4,HandHelping:O4,HandMetal:U4,HandPlatter:Z4,Handbag:G4,Handshake:K4,HardDrive:X4,HardDriveDownload:J4,HardDriveUpload:Y4,HardHat:Q4,Hash:em,HatGlasses:tm,Haze:am,HdmiPort:rm,Heading:cm,Heading1:lm,Heading2:nm,Heading3:om,Heading4:sm,Heading5:dm,Heading6:im,HeadphoneOff:hm,Headphones:pm,Headset:ym,Heart:Mm,HeartCrack:um,HeartHandshake:km,HeartMinus:mm,HeartOff:fm,HeartPlus:gm,HeartPulse:xm,Heater:bm,Hexagon:wm,Highlighter:vm,History:Vm,Hop:zm,HopOff:Cm,Hospital:Bm,Hotel:Em,Hourglass:_m,House:I1,HouseHeart:qm,HousePlug:Sm,HousePlus:jm,HouseWifi:Am,IceCreamBowl:Dm,IceCreamCone:Nm,IdCard:Hm,IdCardLanyard:Lm,Image:Um,ImageDown:$m,ImageMinus:Fm,ImageOff:Tm,ImagePlay:Pm,ImagePlus:Im,ImageUp:Rm,ImageUpscale:Om,Images:Zm,Import:Gm,Inbox:Wm,IndianRupee:Jm,Infinity:Km,Info:Ym,InspectionPanel:Xm,Instagram:Qm,Italic:e5,IterationCcw:t5,IterationCw:a5,JapaneseYen:r5,Joystick:l5,Kanban:n5,Kayak:o5,Key:d5,KeyRound:s5,KeySquare:i5,Keyboard:p5,KeyboardMusic:c5,KeyboardOff:h5,Lamp:x5,LampCeiling:y5,LampDesk:u5,LampFloor:k5,LampWallDown:m5,LampWallUp:f5,LandPlot:M5,Landmark:g5,Languages:b5,Laptop:V5,LaptopMinimal:v5,LaptopMinimalCheck:w5,Lasso:z5,LassoSelect:C5,Laugh:B5,Layers:_5,Layers2:E5,LayoutDashboard:R1,LayoutGrid:O1,LayoutList:q5,LayoutPanelLeft:S5,LayoutPanelTop:j5,LayoutTemplate:A5,Leaf:D5,LeafyGreen:N5,Lectern:L5,Library:$5,LibraryBig:H5,LifeBuoy:F5,Ligature:T5,Lightbulb:P5,LightbulbOff:I5,LineSquiggle:R5,Link:Z5,Link2:U5,Link2Off:O5,Linkedin:W5,List:U1,ListCheck:G5,ListChecks:K5,ListChevronsDownUp:J5,ListChevronsUpDown:Y5,ListCollapse:X5,ListEnd:e3,ListFilter:t3,ListFilterPlus:Q5,ListIndentDecrease:a3,ListIndentIncrease:r3,ListMinus:l3,ListMusic:n3,ListOrdered:o3,ListPlus:s3,ListRestart:i3,ListStart:c3,ListTodo:d3,ListTree:h3,ListVideo:p3,ListX:u3,Loader:m3,LoaderCircle:y3,LoaderPinwheel:k3,Locate:x3,LocateFixed:f3,LocateOff:g3,Lock:v3,LockKeyhole:b3,LockKeyholeOpen:M3,LockOpen:w3,LogIn:V3,LogOut:C3,Logs:z3,Lollipop:B3,Luggage:E3,Magnet:_3,Mail:$3,MailCheck:q3,MailMinus:S3,MailOpen:j3,MailPlus:A3,MailQuestionMark:D3,MailSearch:N3,MailWarning:L3,MailX:H3,Mailbox:F3,Mails:T3,Map:Z1,MapMinus:P3,MapPin:Q3,MapPinCheck:R3,MapPinCheckInside:I3,MapPinHouse:O3,MapPinMinus:Z3,MapPinMinusInside:U3,MapPinOff:W3,MapPinPen:G3,MapPinPlus:Y3,MapPinPlusInside:K3,MapPinX:X3,MapPinXInside:J3,MapPinned:e6,MapPlus:t6,Mars:r6,MarsStroke:a6,Martini:l6,Maximize:o6,Maximize2:n6,Medal:s6,Megaphone:c6,MegaphoneOff:i6,Meh:d6,MemoryStick:h6,Menu:p6,Merge:y6,MessageCircle:V6,MessageCircleCode:u6,MessageCircleDashed:k6,MessageCircleHeart:m6,MessageCircleMore:f6,MessageCircleOff:g6,MessageCirclePlus:x6,MessageCircleQuestionMark:M6,MessageCircleReply:b6,MessageCircleWarning:w6,MessageCircleX:v6,MessageSquare:T6,MessageSquareCode:C6,MessageSquareDashed:B6,MessageSquareDiff:z6,MessageSquareDot:E6,MessageSquareHeart:_6,MessageSquareLock:S6,MessageSquareMore:q6,MessageSquareOff:j6,MessageSquarePlus:A6,MessageSquareQuote:D6,MessageSquareReply:N6,MessageSquareShare:L6,MessageSquareText:H6,MessageSquareWarning:$6,MessageSquareX:F6,MessagesSquare:P6,Mic:O6,MicOff:I6,MicVocal:R6,Microchip:Z6,Microscope:U6,Microwave:W6,Milestone:G6,Milk:J6,MilkOff:K6,Minimize:X6,Minimize2:Y6,Minus:Q6,Monitor:uf,MonitorCheck:ef,MonitorCloud:tf,MonitorCog:af,MonitorDot:rf,MonitorDown:lf,MonitorOff:nf,MonitorPause:of,MonitorPlay:sf,MonitorSmartphone:df,MonitorSpeaker:cf,MonitorStop:hf,MonitorUp:pf,MonitorX:yf,Moon:mf,MoonStar:kf,Motorbike:ff,Mountain:xf,MountainSnow:gf,Mouse:zf,MouseOff:Mf,MousePointer:Vf,MousePointer2:bf,MousePointerBan:wf,MousePointerClick:vf,Move:$f,Move3d:Cf,MoveDiagonal:Ef,MoveDiagonal2:Bf,MoveDown:Sf,MoveDownLeft:_f,MoveDownRight:qf,MoveHorizontal:jf,MoveLeft:Af,MoveRight:Df,MoveUp:Ff,MoveUpLeft:Nf,MoveUpRight:Lf,MoveVertical:Hf,Music:Rf,Music2:Tf,Music3:Pf,Music4:If,Navigation:Wf,Navigation2:Uf,Navigation2Off:Of,NavigationOff:Zf,Network:Gf,Newspaper:Kf,Nfc:Jf,NonBinary:Yf,Notebook:t8,NotebookPen:e8,NotebookTabs:Xf,NotebookText:Qf,NotepadText:r8,NotepadTextDashed:a8,Nut:n8,NutOff:l8,Octagon:d8,OctagonAlert:o8,OctagonMinus:s8,OctagonPause:i8,OctagonX:h8,Omega:c8,Option:p8,Orbit:y8,Origami:u8,Package:w8,Package2:k8,PackageCheck:m8,PackageMinus:f8,PackageOpen:g8,PackagePlus:x8,PackageSearch:M8,PackageX:b8,PaintBucket:v8,PaintRoller:C8,Paintbrush:z8,PaintbrushVertical:V8,Palette:B8,Panda:E8,PanelBottom:S8,PanelBottomClose:_8,PanelBottomDashed:q8,PanelBottomOpen:j8,PanelLeft:H8,PanelLeftClose:A8,PanelLeftDashed:D8,PanelLeftOpen:N8,PanelLeftRightDashed:L8,PanelRight:P8,PanelRightClose:$8,PanelRightDashed:T8,PanelRightOpen:F8,PanelTop:Z8,PanelTopBottomDashed:I8,PanelTopClose:R8,PanelTopDashed:O8,PanelTopOpen:U8,PanelsLeftBottom:W8,PanelsRightBottom:G8,PanelsTopLeft:K8,Paperclip:J8,Parentheses:Y8,ParkingMeter:X8,PartyPopper:Q8,Pause:eg,PawPrint:tg,PcCase:ag,Pen:og,PenLine:rg,PenOff:lg,PenTool:ng,Pencil:W1,PencilLine:sg,PencilOff:ig,PencilRuler:dg,Pentagon:cg,Percent:pg,PersonStanding:hg,PhilippinePeso:yg,Phone:Mg,PhoneCall:ug,PhoneForwarded:kg,PhoneIncoming:mg,PhoneMissed:gg,PhoneOff:fg,PhoneOutgoing:xg,Pi:bg,Piano:vg,Pickaxe:wg,PictureInPicture:Vg,PictureInPicture2:Cg,PiggyBank:zg,Pilcrow:_g,PilcrowLeft:Bg,PilcrowRight:Eg,Pill:Sg,PillBottle:qg,Pin:Ag,PinOff:jg,Pipette:Dg,Pizza:Ng,Plane:$g,PlaneLanding:Lg,PlaneTakeoff:Hg,Play:Fg,Plug:Ig,Plug2:Tg,PlugZap:Pg,Plus:Oa,Pocket:Og,PocketKnife:Rg,Podcast:Ug,Pointer:Wg,PointerOff:Zg,Popcorn:Gg,Popsicle:Kg,PoundSterling:Jg,Power:Xg,PowerOff:Yg,Presentation:Qg,Printer:t7,PrinterCheck:e7,Projector:a7,Proportions:r7,Puzzle:l7,Pyramid:n7,QrCode:o7,Quote:s7,Rabbit:i7,Radar:d7,Radiation:c7,Radical:h7,Radio:u7,RadioReceiver:p7,RadioTower:y7,Radius:k7,RailSymbol:m7,Rainbow:f7,Rat:g7,Ratio:M7,Receipt:q7,ReceiptCent:x7,ReceiptEuro:b7,ReceiptIndianRupee:v7,ReceiptJapaneseYen:w7,ReceiptPoundSterling:V7,ReceiptRussianRuble:C7,ReceiptSwissFranc:z7,ReceiptText:B7,ReceiptTurkishLira:E7,RectangleCircle:_7,RectangleEllipsis:S7,RectangleGoggles:j7,RectangleHorizontal:A7,RectangleVertical:D7,Recycle:N7,Redo:$7,Redo2:L7,RedoDot:H7,RefreshCcw:T7,RefreshCcwDot:F7,RefreshCw:I7,RefreshCwOff:P7,Refrigerator:R7,Regex:O7,RemoveFormatting:U7,Repeat:G7,Repeat1:Z7,Repeat2:W7,Replace:J7,ReplaceAll:K7,Reply:X7,ReplyAll:Y7,Rewind:Q7,Ribbon:e9,Rocket:t9,RockingChair:a9,RollerCoaster:r9,Rose:l9,Rotate3d:n9,RotateCcw:i9,RotateCcwKey:o9,RotateCcwSquare:s9,RotateCw:c9,RotateCwSquare:d9,Route:p9,RouteOff:h9,Router:y9,Rows2:u9,Rows3:k9,Rows4:m9,Rss:f9,Ruler:x9,RulerDimensionLine:g9,RussianRuble:M9,Sailboat:b9,Salad:w9,Sandwich:v9,Satellite:V9,SatelliteDish:C9,SaudiRiyal:z9,Save:G1,SaveAll:B9,SaveOff:E9,Scale:q9,Scale3d:_9,Scaling:S9,Scan:T9,ScanBarcode:j9,ScanEye:A9,ScanFace:D9,ScanHeart:N9,ScanLine:L9,ScanQrCode:H9,ScanSearch:$9,ScanText:F9,School:P9,Scissors:R9,ScissorsLineDashed:I9,ScreenShare:W9,ScreenShareOff:O9,Scroll:Z9,ScrollText:U9,Search:K1,SearchCheck:G9,SearchCode:K9,SearchSlash:J9,SearchX:Y9,Section:X9,Send:tx,SendHorizontal:Q9,SendToBack:ex,SeparatorHorizontal:ax,SeparatorVertical:rx,Server:sx,ServerCog:lx,ServerCrash:nx,ServerOff:ox,Settings:dx,Settings2:ix,Shapes:cx,Share:px,Share2:hx,Sheet:yx,Shell:ux,Shield:zx,ShieldAlert:kx,ShieldBan:mx,ShieldCheck:fx,ShieldEllipsis:gx,ShieldHalf:xx,ShieldMinus:Mx,ShieldOff:bx,ShieldPlus:wx,ShieldQuestionMark:vx,ShieldUser:Vx,ShieldX:Cx,Ship:Ex,ShipWheel:Bx,Shirt:_x,ShoppingBag:qx,ShoppingBasket:Sx,ShoppingCart:jx,Shovel:Ax,ShowerHead:Dx,Shredder:Nx,Shrimp:Lx,Shrink:Hx,Shrub:$x,Shuffle:Fx,Sigma:Px,Signal:Ux,SignalHigh:Tx,SignalLow:Ix,SignalMedium:Rx,SignalZero:Ox,Signature:Zx,Signpost:Gx,SignpostBig:Wx,Siren:Kx,SkipBack:Jx,SkipForward:Yx,Skull:Xx,Slack:eM,Slash:Qx,Slice:tM,SlidersHorizontal:rM,SlidersVertical:aM,Smartphone:oM,SmartphoneCharging:lM,SmartphoneNfc:nM,Smile:iM,SmilePlus:sM,Snail:dM,Snowflake:cM,SoapDispenserDroplet:hM,Sofa:pM,Soup:yM,Space:uM,Spade:kM,Sparkle:mM,Sparkles:fM,Speaker:gM,Speech:xM,SpellCheck:bM,SpellCheck2:MM,Spline:vM,SplinePointer:wM,Split:VM,Spool:CM,Spotlight:zM,SprayCan:BM,Sprout:EM,Square:Fb,SquareActivity:_M,SquareArrowDown:jM,SquareArrowDownLeft:qM,SquareArrowDownRight:SM,SquareArrowLeft:AM,SquareArrowOutDownLeft:DM,SquareArrowOutDownRight:NM,SquareArrowOutUpLeft:LM,SquareArrowOutUpRight:HM,SquareArrowRight:$M,SquareArrowUp:PM,SquareArrowUpLeft:FM,SquareArrowUpRight:TM,SquareAsterisk:IM,SquareBottomDashedScissors:RM,SquareChartGantt:OM,SquareCheck:ZM,SquareCheckBig:UM,SquareChevronDown:GM,SquareChevronLeft:WM,SquareChevronRight:KM,SquareChevronUp:JM,SquareCode:YM,SquareDashed:rb,SquareDashedBottom:QM,SquareDashedBottomCode:XM,SquareDashedKanban:eb,SquareDashedMousePointer:tb,SquareDashedTopSolid:ab,SquareDivide:lb,SquareDot:nb,SquareEqual:ob,SquareFunction:sb,SquareKanban:ib,SquareLibrary:db,SquareM:cb,SquareMenu:hb,SquareMinus:pb,SquareMousePointer:yb,SquareParking:kb,SquareParkingOff:ub,SquarePause:mb,SquarePen:fb,SquarePercent:gb,SquarePi:xb,SquarePilcrow:Mb,SquarePlay:bb,SquarePlus:wb,SquarePower:vb,SquareRadical:Cb,SquareRoundCorner:Vb,SquareScissors:zb,SquareSigma:Bb,SquareSlash:Eb,SquareSplitHorizontal:_b,SquareSplitVertical:qb,SquareSquare:Sb,SquareStack:Ab,SquareStar:jb,SquareStop:Db,SquareTerminal:Nb,SquareUser:Hb,SquareUserRound:Lb,SquareX:$b,SquaresExclude:Tb,SquaresIntersect:Pb,SquaresSubtract:Ib,SquaresUnite:Rb,Squircle:Ub,SquircleDashed:Ob,Squirrel:Zb,Stamp:Wb,Star:Jb,StarHalf:Gb,StarOff:Kb,StepBack:Yb,StepForward:Xb,Stethoscope:Qb,Sticker:ew,StickyNote:tw,Store:aw,StretchHorizontal:rw,StretchVertical:lw,Strikethrough:nw,Subscript:ow,Sun:hw,SunDim:sw,SunMedium:iw,SunMoon:dw,SunSnow:cw,Sunrise:pw,Sunset:yw,Superscript:uw,SwatchBook:kw,SwissFranc:mw,SwitchCamera:fw,Sword:gw,Swords:xw,Syringe:Mw,Table:Bw,Table2:J1,TableCellsMerge:bw,TableCellsSplit:ww,TableColumnsSplit:vw,TableOfContents:Vw,TableProperties:Cw,TableRowsSplit:zw,Tablet:_w,TabletSmartphone:Ew,Tablets:qw,Tag:Sw,Tags:jw,Tally1:Aw,Tally2:Dw,Tally3:Nw,Tally4:Lw,Tally5:Hw,Tangent:$w,Target:Fw,Telescope:Tw,Tent:Iw,TentTree:Pw,Terminal:Rw,TestTube:Uw,TestTubeDiagonal:Ow,TestTubes:Zw,TextAlignCenter:Ww,TextAlignEnd:Gw,TextAlignJustify:Kw,TextAlignStart:Jw,TextCursor:Xw,TextCursorInput:Yw,TextInitial:Qw,TextQuote:ev,TextSearch:tv,TextSelect:av,TextWrap:rv,Theater:lv,Thermometer:sv,ThermometerSnowflake:nv,ThermometerSun:ov,ThumbsDown:iv,ThumbsUp:dv,Ticket:mv,TicketCheck:cv,TicketMinus:pv,TicketPercent:hv,TicketPlus:yv,TicketSlash:uv,TicketX:kv,Tickets:gv,TicketsPlane:fv,Timer:bv,TimerOff:xv,TimerReset:Mv,ToggleLeft:wv,ToggleRight:Vv,Toilet:vv,ToolCase:Cv,Tornado:zv,Torus:Bv,Touchpad:_v,TouchpadOff:Ev,TowerControl:qv,ToyBrick:Sv,Tractor:jv,TrafficCone:Av,TrainFront:Nv,TrainFrontTunnel:Dv,TrainTrack:Lv,TramFront:$v,Transgender:Hv,Trash:Fv,Trash2:Y1,TreeDeciduous:Tv,TreePalm:Pv,TreePine:Iv,Trees:Rv,Trello:Ov,TrendingDown:Uv,TrendingUp:Wv,TrendingUpDown:Zv,Triangle:Yv,TriangleAlert:Gv,TriangleDashed:Kv,TriangleRight:Jv,Trophy:Xv,Truck:eV,TruckElectric:Qv,TurkishLira:tV,Turntable:aV,Turtle:rV,Tv:oV,TvMinimal:nV,TvMinimalPlay:lV,Twitch:sV,Twitter:iV,Type:hV,TypeOutline:dV,Umbrella:pV,UmbrellaOff:cV,Underline:yV,Undo:mV,Undo2:uV,UndoDot:kV,UnfoldHorizontal:fV,UnfoldVertical:gV,Ungroup:xV,University:MV,Unlink:wV,Unlink2:bV,Unplug:vV,Upload:VV,Usb:CV,User:RV,UserCheck:zV,UserCog:BV,UserLock:EV,UserMinus:_V,UserPen:qV,UserPlus:SV,UserRound:FV,UserRoundCheck:jV,UserRoundCog:AV,UserRoundMinus:DV,UserRoundPen:NV,UserRoundPlus:LV,UserRoundSearch:HV,UserRoundX:$V,UserSearch:TV,UserStar:PV,UserX:IV,Users:UV,UsersRound:OV,Utensils:WV,UtensilsCrossed:ZV,UtilityPole:GV,Variable:KV,Vault:JV,VectorSquare:YV,Vegan:XV,VenetianMask:QV,Venus:tC,VenusAndMars:eC,Vibrate:rC,VibrateOff:aC,Video:nC,VideoOff:lC,Videotape:sC,View:oC,Voicemail:iC,Volleyball:dC,Volume:uC,Volume1:cC,Volume2:hC,VolumeOff:yC,VolumeX:pC,Vote:kC,Wallet:gC,WalletCards:mC,WalletMinimal:fC,Wallpaper:xC,Wand:bC,WandSparkles:MC,Warehouse:wC,WashingMachine:VC,Watch:vC,Waves:zC,WavesLadder:CC,Waypoints:BC,Webcam:EC,Webhook:qC,WebhookOff:_C,Weight:SC,Wheat:DC,WheatOff:jC,WholeWord:AC,Wifi:IC,WifiCog:NC,WifiHigh:LC,WifiLow:HC,WifiOff:$C,WifiPen:FC,WifiSync:TC,WifiZero:PC,Wind:OC,WindArrowDown:RC,Wine:ZC,WineOff:UC,Workflow:WC,Worm:GC,Wrench:KC,X:Ua,Youtube:JC,Zap:XC,ZapOff:YC,ZoomIn:QC,ZoomOut:ez},Symbol.toStringTag,{value:"Module"})),Za={week:"Тиждень",month:"Місяць",quarter:"Квартал",year:"Рік"},az=["onClick"],rz={class:"flex items-center justify-between w-full"},lz={key:0},nz=e.defineComponent({__name:"vs-bi-dropdown",props:{title:{},options:{},value:{default:null}},emits:["selected"],setup(l,{emit:t}){const a=l,n=t,o=e.ref(!1),s=e.ref(a.value??null),i=e.ref(null),d=e.computed(()=>{const m=a.options;return typeof m=="string"?m.split(",").map((f,u)=>({id:u,text:f.trim()})):Array.isArray(m)?m:[]}),c=e.computed(()=>{const m=d.value.find(f=>(f.id??f)===s.value);return m?m.text??String(m):a.title??""}),h=m=>{const f=(m==null?void 0:m.id)??m;s.value=f,o.value=!1,n("selected",f),document.removeEventListener("click",p)},p=m=>{i.value&&!i.value.contains(m.target)&&(o.value=!1,document.removeEventListener("click",p))},y=()=>{o.value=!o.value,o.value?setTimeout(()=>{document.addEventListener("click",p)},200):document.removeEventListener("click",p)},w=m=>(Za==null?void 0:Za[m])??m;return e.onUnmounted(()=>{document.removeEventListener("click",p)}),(m,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("button",{type:"button","aria-expanded":"true",class:"hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",onClick:y},[e.createTextVNode(e.toDisplayString(w(c.value))+" ",1),f[0]||(f[0]=e.createElementVNode("svg",{class:"shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"m6 9 6 6 6-6"})],-1))]),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"biDropdown",ref:i,"data-hs-select-dropdown":"",class:"absolute mt-2 z-50 w-48 p-1 space-y-0.5 bg-white rounded-xl shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] dark:bg-neutral-950 opened",role:"listbox",tabindex:"-1","aria-orientation":"vertical",style:{"margin-top":"10px"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.id||u,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",onClick:g=>h(u)},[e.createElementVNode("div",rz,[e.createElementVNode("span",null,e.toDisplayString(w(u.text||u)),1),s.value===(u.id||u)?(e.openBlock(),e.createElementBlock("span",lz,f[1]||(f[1]=[e.createElementVNode("svg",{class:"shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",xmlns:"http:.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("polyline",{points:"20 6 9 17 4 12"})],-1)]))):e.createCommentVNode("",!0)])],8,az))),128))],512)):e.createCommentVNode("",!0)],64))}}),oz={class:"flex items-center space-x-2"},sz=e.defineComponent({__name:"vs-bi-switch",props:e.mergeModels({leftLabel:{},rightLabel:{},modelValue:{type:Boolean}},{modelValue:{default:()=>!1,type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["update:is-enabled"],["update:modelValue"]),setup(l,{emit:t}){const a=t,n=e.useModel(l,"modelValue"),o=()=>{a("update:is-enabled",n)};return(s,i)=>(e.openBlock(),e.createElementBlock("div",oz,[s.leftLabel?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["transition-colors",{"text-blue-500":!n.value}])},e.toDisplayString(s.leftLabel),3)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=d=>n.value=d),type:"checkbox",class:"relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",onChange:o},null,544),[[e.vModelCheckbox,n.value]]),s.rightLabel?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["transition-colors",{"text-blue-500":n.value}])},e.toDisplayString(s.rightLabel),3)):e.createCommentVNode("",!0)]))}}),ve=(l,t)=>{const a=l.__vccOpts||l;for(const[n,o]of t)a[n]=o;return a},iz={},dz={class:"flex items-center justify-center h-full"};function cz(l,t){return e.openBlock(),e.createElementBlock("div",dz,t[0]||(t[0]=[e.createElementVNode("div",{class:"text-center text-gray-500"},[e.createElementVNode("h2",{class:"text-2xl font-bold"},"No data available")],-1)]))}const hz=ve(iz,[["render",cz]]),X1={"bi-bar":e.defineAsyncComponent(()=>Promise.resolve().then(()=>d_)),"bi-number":e.defineAsyncComponent(()=>Promise.resolve().then(()=>wq)),"bi-text":e.defineAsyncComponent(()=>Promise.resolve().then(()=>Bq)),"bi-listbar":e.defineAsyncComponent(()=>Promise.resolve().then(()=>aq)),"bi-pie":e.defineAsyncComponent(()=>Promise.resolve().then(()=>f_)),"bi-donut":e.defineAsyncComponent(()=>Promise.resolve().then(()=>y_)),"bi-line":e.defineAsyncComponent(()=>Promise.resolve().then(()=>b_)),"bi-stat":e.defineAsyncComponent(()=>Promise.resolve().then(()=>L_)),"bi-pivot":e.defineAsyncComponent(()=>Promise.resolve().then(()=>gq)),"bi-progress":e.defineAsyncComponent(()=>Promise.resolve().then(()=>G_)),"bi-funnel":e.defineAsyncComponent(()=>Promise.resolve().then(()=>Sq)),"bi-map":e.defineAsyncComponent(()=>Promise.resolve().then(()=>_S)),"bi-cluster":e.defineAsyncComponent(()=>Promise.resolve().then(()=>KS)),"bi-table":e.defineAsyncComponent(()=>Promise.resolve().then(()=>ij))};let Q1="/api";function da(l){Q1=l||"/api"}function pz(l,t){const a=Q1.replace(/\/$/,""),o=l.startsWith("http")||l.startsWith("//")||a&&l.startsWith(a)?l:`${a}${l.startsWith("/")?l:`/${l}`}`;if(!t||!Object.keys(t).length)return o;const s=new URLSearchParams;Object.entries(t).forEach(([d,c])=>{c!==void 0&&c!==""&&s.set(d,String(c))});const i=s.toString();return i?`${o}${o.includes("?")?"&":"?"}${i}`:o}async function ca(l,t={}){const{params:a,...n}=t,o=pz(l,a),s=await fetch(o,{...n,headers:{"Content-Type":"application/json",...n.headers}});if(!s.ok){const d=new Error(s.statusText);throw d.status=s.status,d}const i=await s.text();if(i)try{return JSON.parse(i)}catch{return i}}const Se={get(l,t){return ca(l,{...t,method:"GET"})},post(l,t){return ca(l,{method:"POST",body:t!=null?JSON.stringify(t):void 0})},put(l,t){return ca(l,{method:"PUT",body:t!=null?JSON.stringify(t):void 0})},delete(l){return ca(l,{method:"DELETE"})}},yz={key:0,class:"text-[16px] flex max-w-full items-center min-h-0 justify-between max-h-[50px] h-fit shrink-0"},uz={class:"flex items-center justify-between w-full gap-2"},kz={class:"flex items-center gap-2 min-w-0"},mz={class:"text-gray-800 max-h-[30px] inline-block line-clamp-1 font-semibold"},fz={class:"flex flex-col justify-end"},gz={key:0,class:"flex items-center justify-end w-full gap-2"},xz={class:"w-full h-full"},Ht=e.defineComponent({__name:"vs-widget",props:{dashboard:{},prefix:{default:""},widget:{},filterURl:{},dashboardWidgets:{},selectedWidget:{}},emits:["update:current-widget-data"],setup(l,{emit:t}){const a=l,n=t,o=e.ref(null),s=e.ref(null),i=e.ref(null),d=e.ref({}),c=e.ref([]),h=e.computed(()=>{var x,k;const M=(x=a.dashboardWidgets)==null?void 0:x.find(v=>v.name===a.widget);return((k=M==null?void 0:M.data)==null?void 0:k.title)??(M==null?void 0:M.title)??""}),p=e.computed(()=>{var x;const M=(x=a.dashboardWidgets)==null?void 0:x.find(k=>k.name===a.widget);return(M==null?void 0:M.type)??"text"}),y=e.computed(()=>{var x;const M=(x=d.value)==null?void 0:x.controls;return!M||typeof M=="boolean"?[]:Object.keys(M).map(k=>({name:k,options:M[k]}))}),w=e.computed(()=>{const M=p.value?`bi-${p.value}`:"";return M&&M in X1?X1[M]:null});function m(M,x){var k,v;(v=(k=s.value)==null?void 0:k.changeStyle)==null||v.call(k,M,x)}function f(M,x){const k=c.value.find(v=>v.name===x);k?k.option=M:c.value.push({name:x,option:M}),u()}function u(){var x,k;let M=`/bi-data?dashboard=${a.dashboard}&widget=${a.widget}`;c.value.forEach(v=>{M+=`&${v.name}=${v.option}`}),(k=(x=s.value)==null?void 0:x.getDataFromURL)==null||k.call(x,M)}function g(){const M=i.value;if(M!=null&&M.getDataURL){const x=M.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#ffffff"}),k=document.createElement("a");k.href=x,k.download="chart.png",document.body.appendChild(k),k.click(),document.body.removeChild(k)}}return e.onMounted(()=>{a.prefix&&da(a.prefix)}),e.watch(()=>a.filterURl,M=>{var x,k;M&&((k=(x=s.value)==null?void 0:x.setFilter)==null||k.call(x,M))}),e.watch(()=>a.selectedWidget,(M,x)=>{var k;M!==x&&M===((k=d.value)==null?void 0:k.id)&&n("update:current-widget-data",d.value)}),e.watch(d,(M,x)=>{if((M==null?void 0:M.id)===(x==null?void 0:x.id))return;const k=typeof window<"u"?new URLSearchParams(window.top.location.search).get("widget"):null;k&&k===(M==null?void 0:M.id)&&n("update:current-widget-data",M)},{deep:!0}),(M,x)=>{var k,v,V,C,q,L,ee,K,H;return e.openBlock(),e.createElementBlock("div",{ref_key:"widgetRef",ref:o,class:e.normalizeClass(["box-border relative h-full p-4 bg-white border border-gray-200 rounded-xl shadow-sm select-auto",[(v=(k=d.value)==null?void 0:k.style)!=null&&v.height?`max-h-[${(C=(V=d.value)==null?void 0:V.style)==null?void 0:C.height}px] h-[${(L=(q=d.value)==null?void 0:q.style)==null?void 0:L.height}px]`:"max-h-[460px]"]])},[["text","cluster","map"].includes(p.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yz,[e.createElementVNode("div",uz,[e.createElementVNode("div",kz,[e.createElementVNode("span",mz,e.toDisplayString(h.value),1)]),e.createElementVNode("div",fz,[(ee=y.value)!=null&&ee.length?(e.openBlock(),e.createElementBlock("span",gz,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((K=y.value)==null?void 0:K.filter(B=>(B==null?void 0:B.options)&&(B==null?void 0:B.name)!=="export"),B=>{var T,N;return e.openBlock(),e.createElementBlock("div",{key:B==null?void 0:B.name},[Array.isArray(B==null?void 0:B.options)?(e.openBlock(),e.createBlock(nz,{key:0,title:B==null?void 0:B.name,options:B==null?void 0:B.options,value:((N=(T=d.value)==null?void 0:T.data)==null?void 0:N[B==null?void 0:B.name])??null,onSelected:U=>f(U,B==null?void 0:B.name)},null,8,["title","options","value","onSelected"])):typeof B.options=="boolean"?(e.openBlock(),e.createBlock(sz,{key:1,"left-label":B==null?void 0:B.name,"model-value":!!(B!=null&&B.options),"onUpdate:isEnabled":U=>m(B==null?void 0:B.name,U)},null,8,["left-label","model-value","onUpdate:isEnabled"])):e.createCommentVNode("",!0)])}),128)),(H=y.value)!=null&&H.some(B=>(B==null?void 0:B.name)==="export")?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center",onClick:g},[e.createVNode(e.unref(F1),{size:16,class:"text-gray-800"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])])),e.createElementVNode("div",xz,[w.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value),{key:0,ref_key:"chartRef",ref:s,"current-widget":i.value,"onUpdate:currentWidget":x[0]||(x[0]=B=>i.value=B),"widget-data":d.value,"onUpdate:widgetData":x[1]||(x[1]=B=>d.value=B),dashboard:M.dashboard,title:h.value,widget:M.widget},null,40,["current-widget","widget-data","dashboard","title","widget"])):(e.openBlock(),e.createBlock(hz,{key:1,class:"w-full h-full"}))])],2)}}}),Mz={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},bz={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},wz={class:"max-w-sm mx-auto mt-6"},vz={class:"font-medium text-gray-800 dark:text-neutral-200"},Vz={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"},ha=e.defineComponent({__name:"vs-new-nodata",props:{title:{default:"Дані для відображення відсутні"},text:{default:"Змініть параметри пошуку або спробуйте пізніше"}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Mz,[e.createElementVNode("div",null,[e.createElementVNode("div",bz,[a[0]||(a[0]=e.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),e.createElementVNode("div",wz,[e.createElementVNode("p",vz,e.toDisplayString(t.title),1),e.createElementVNode("p",Vz,e.toDisplayString(t.text),1)])])])]))}}),Cz={components:{filterIcon:{__name:"filter",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Ra),e.mergeProps(t.$attrs,{size:24}),null,16))}}},props:["filterScheme"],emits:["filters:changed"]},zz={class:"flex items-center"},Bz={key:0,type:"button",class:"py-2 px-2.5 ml-3 h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 opacity-60 cursor-not-allowed",disabled:"",title:"Фільтри вимкнено (v3-filter видалено)"};function Ez(l,t,a,n,o,s){const i=e.resolveComponent("filterIcon");return e.openBlock(),e.createElementBlock("div",zz,[a.filterScheme?(e.openBlock(),e.createElementBlock("button",Bz,[e.createVNode(i),t[0]||(t[0]=e.createTextVNode(" Фільтри "))])):e.createCommentVNode("",!0)])}const _z={components:{VsFilterHeader:ve(Cz,[["render",Ez]])},props:{dashboardData:{type:Object,default:null},filters:{type:Array,default:null}}},qz={class:"bg-white px-5 flex gap-4 h-[90px] border border-gray-200 rounded-xl mb-2 pt-[3px] justify-between items-center"},Sz={class:"grow"},jz={class:"text-lg font-semibold text-stone-800 dark:text-neutral-200"},Az={key:0,class:"inline-flex items-center text-sm gap-x-2 text-stone-800 hover:text-stone-500 focus:outline-none focus:text-stone-500 dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400"},Dz={key:0,class:"flex items-center gap-3"};function Nz(l,t,a,n,o,s){var d,c,h;const i=e.resolveComponent("VsFilterHeader");return e.openBlock(),e.createElementBlock("div",qz,[e.createElementVNode("div",Sz,[e.createElementVNode("h1",jz,e.toDisplayString((d=a.dashboardData)==null?void 0:d.title),1),(c=a.dashboardData)!=null&&c.description?(e.openBlock(),e.createElementBlock("button",Az,e.toDisplayString((h=a.dashboardData)==null?void 0:h.description),1)):e.createCommentVNode("",!0)]),a.filters?(e.openBlock(),e.createElementBlock("div",Dz,[e.createVNode(i,{filterScheme:a.filters,"onFilters:changed":t[0]||(t[0]=p=>l.$emit("filters:changed",p))},null,8,["filterScheme"])])):e.createCommentVNode("",!0)])}const Lz=ve(_z,[["render",Nz]]);var er={},tr;(function(l){l.pop="pop",l.push="push"})(tr||(tr={}));var ar;(function(l){l.back="back",l.forward="forward",l.unknown=""})(ar||(ar={}));var rr;(function(l){l[l.aborted=4]="aborted",l[l.cancelled=8]="cancelled",l[l.duplicated=16]="duplicated"})(rr||(rr={}));const Hz=Symbol(er.NODE_ENV!=="production"?"router":""),$z=Symbol(er.NODE_ENV!=="production"?"route location":"");function Wa(){return e.inject(Hz)}function Fz(l){return e.inject($z)}const Tz={key:0,class:"text-gray-400 shrink-0"},Pz=["onClick"],Iz=["onClick"],Rz={key:4,class:"text-gray-900 font-medium truncate"},lr={__name:"vs-breadcrumbs",props:{items:{type:Array,default:()=>[]},compact:{type:Boolean,default:!1}},setup(l){const t=l,a=Wa(),n=e.computed(()=>Array.isArray(t.items)?t.items:[]);function o(s){a!=null&&a.push?a.push(s):typeof s=="string"&&(window!=null&&window.location)&&(window.location.href=s)}return(s,i)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["flex items-center gap-2 text-sm text-gray-600",l.compact?"py-1":"py-6"]),"aria-label":"Breadcrumb"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(c,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[h>0?(e.openBlock(),e.createElementBlock("span",Tz,[e.createVNode(e.unref($1),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),typeof c.onClick=="function"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"hover:text-gray-900 transition-colors cursor-pointer",onClick:p=>c.onClick()},e.toDisplayString(c.label),9,Pz)):e.unref(a)&&c.to?(e.openBlock(),e.createBlock(d,{key:2,to:c.to,class:"hover:text-gray-900 transition-colors"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),_:2},1032,["to"])):c.to?(e.openBlock(),e.createElementBlock("span",{key:3,class:"hover:text-gray-900 transition-colors cursor-pointer",onClick:p=>o(c.to)},e.toDisplayString(c.label),9,Iz)):(e.openBlock(),e.createElementBlock("span",Rz,e.toDisplayString(c.label),1))],64))),128))],2)}}},Oz={components:{VsWidget:Ht,VsNewNodata:ha,VsHeader:Lz,VsBreadcrumbs:lr},props:["id","prefix"],data(){return{widgets:[],panels:[],error:!1,selectedPanel:"",filterURl:null,dashboardData:null}},async mounted(){da(this.prefix||"/api"),await this.fetchData()},methods:{async fetchData(){if(this.id)try{const l=await Se.get(`/bi-dashboard/${this.id}`);this.dashboardData=l}catch(l){console.error(l)}},columnClass(l){const t=l!=null&&l.col?l==null?void 0:l.col:12;return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[t]||"w-full"},async filterHandler(l){var a;this.filterURl="";let t="&filter=";(a=l==null?void 0:l.url)!=null&&a.length&&(l.url.split("|").forEach(o=>{const s=o.split("=");t+=`${s[0]}=${s[1]}`}),this.filterURl+=t)}}},Uz={class:"w-full pb-8 overflow-y-auto mx-auto"},Zz={class:"grid flex-grow w-full grid-cols-12 gap-4 h-fit"};function Wz(l,t,a,n,o,s){var c;const i=e.resolveComponent("VsNewNodata"),d=e.resolveComponent("VsWidget");return e.openBlock(),e.createElementBlock("div",Uz,[e.createElementVNode("div",Zz,[o.error||!o.dashboardData?(e.openBlock(),e.createBlock(i,{key:0,class:"col-span-12"})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((c=o.dashboardData)==null?void 0:c.panels)||[],(h,p)=>{var y;return e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass([`col-span-${h.col||12}`,"flex flex-col gap-[10px]"])},[(y=h.widgets)!=null&&y.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h.widgets,w=>(e.openBlock(),e.createBlock(d,{key:w,dashboard:a.id,widget:w,"dashboard-widgets":o.dashboardData.widgets,"filter-u-rl":o.filterURl},null,8,["dashboard","widget","dashboard-widgets","filter-u-rl"]))),128)):(e.openBlock(),e.createBlock(d,{key:1,class:"flex flex-col",dashboard:a.id,widget:h.widget,"dashboard-widgets":o.dashboardData.widgets,"filter-u-rl":o.filterURl},null,8,["dashboard","widget","dashboard-widgets","filter-u-rl"]))],2)}),128))])])}const Gz=ve(Oz,[["render",Wz]]),Kz={key:0,class:"vs-modal-wrapper fixed inset-0 flex items-center justify-center p-4"},Jz={class:"flex items-center justify-between shrink-0 py-2.5 px-4 border-b border-gray-200 dark:border-[#454545]"},Yz={class:"font-medium text-gray-800 dark:text-white"},Xz={class:"vs-modal-content flex-1 min-h-0 overflow-auto p-4"},Qz={key:0,class:"shrink-0 border-t border-gray-200 dark:border-neutral-700"},$t=ve({__name:"vs-modal",props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},size:{type:String,default:"medium"},closeClickBack:{type:Boolean,default:!1},teleport:{type:String,default:"#modal"}},emits:["close","update:visible"],setup(l,{emit:t}){const a=l,n=t,o=e.computed(()=>a.size==="small"?"md:max-w-[40%] w-full max-w-md":a.size==="lg"?"md:max-w-[70%] w-full max-w-4xl":"md:max-w-[50%] w-full max-w-lg");function s(){n("update:visible",!1),n("close")}function i(d){d.key==="Escape"&&s()}return e.onMounted(()=>{window.addEventListener("keydown",i)}),e.onUnmounted(()=>{window.removeEventListener("keydown",i)}),(d,c)=>(e.openBlock(),e.createBlock(e.Teleport,{to:l.teleport},[l.visible?(e.openBlock(),e.createElementBlock("div",Kz,[e.createElementVNode("div",{class:"absolute inset-0 bg-black/50","aria-hidden":"true",onMousedown:c[0]||(c[0]=h=>l.closeClickBack&&h.target===h.currentTarget&&s())},null,32),e.createVNode(e.Transition,{name:"vs-modal",appear:""},{default:e.withCtx(()=>[l.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["vs-modal-panel relative flex flex-col bg-white dark:bg-[#1A1A1A] rounded-xl shadow-xl max-h-[85vh] min-w-0 border border-gray-200 dark:border-[#454545]",o.value]),role:"dialog","aria-modal":"true",onMousedown:c[1]||(c[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Jz,[e.createElementVNode("h3",Yz,e.toDisplayString(l.title),1),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center rounded-full bg-gray-100 text-gray-800 hover:bg-gray-200 dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-300","aria-label":"Закрити",onClick:s},c[2]||(c[2]=[e.createElementVNode("svg",{class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),e.createElementVNode("div",Xz,[e.renderSlot(d.$slots,"default",{},void 0,!0)]),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",Qz,[e.renderSlot(d.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],34)):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)],8,["to"]))}},[["__scopeId","data-v-5722a50f"]]),eB={__name:"icon-plus",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Oa),e.mergeProps(t.$attrs,{size:24}),null,16))}},tB={class:"mb-4 overflow-auto scrollbar max-h-96"},aB={__name:"vs-editor-create-widget",props:{columns:{type:Array,default:()=>[]},selectedDashboard:String,inline:{type:Boolean,default:!1}},emits:"update-data",setup(l,{expose:t,emit:a}){var f;const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),o=(f=e.getCurrentInstance().proxy)==null?void 0:f.$notify,s=a,i=l,d=e.ref(!1),c=e.ref({}),h=e.ref();function p(){d.value=!0}function y(){d.value=!1}t({open:p,close:y});const w=async()=>{try{await h.value.doValidation(),await Se.post(`/bi-dashboard/${i.selectedDashboard}`,c.value),await o({type:"success",title:"Успішно!",message:"Віджет успішно створено"}),await s("update-data"),c.value={},d.value=!1}catch{o({type:"error",title:"Помилка!",message:"При спробі створити віджет сталася помилка"})}},m=e.computed(()=>{var u,g,M,x;return{title:{type:"text",label:"Widget title",placeholder:"Widget title",validators:["required"]},x:{type:"radio",label:"X Axis",view:"buttons",style:{size:"xs"},validators:["required"],options:(g=(u=i.columns)==null?void 0:u.filter(k=>(k==null?void 0:k.type)=="text"||(k==null?void 0:k.type)==="date"||(k==null?void 0:k.type)==="timestamp without time zone"||(k==null?void 0:k.type)==="boolean"||(k==null?void 0:k.type)==="integer"))==null?void 0:g.map(({name:k,type:v})=>({id:k,label:k,type:v}))},metric:{type:"radio",label:"Y Axis",view:"buttons",validators:["required"],style:{size:"xs"},options:[{id:"count",label:"count"},...(x=(M=i.columns)==null?void 0:M.filter(k=>(k==null?void 0:k.type)==="numeric"||(k==null?void 0:k.type)==="double precision"))==null?void 0:x.map(({name:k,type:v})=>({id:k,label:k,type:v}))]},col:{type:"radio",label:"Columns count",validators:["required"],options:[{id:1,label:1},{id:2,label:2},{id:3,label:3},{id:4,label:4},{id:6,label:6},{id:9,label:9},{id:12,label:12}]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"Text",ua:"Table",placeholder:"Table"},query:{type:"Text",ua:"Query",placeholder:"Query"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}}});return(u,g)=>{const M=e.resolveComponent("VsPopover");return e.openBlock(),e.createElementBlock("div",null,[l.inline?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M,{key:0,placement:"right",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("button",{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",onClick:p},[e.createVNode(eB,{height:"20",width:"20"})])])]),default:e.withCtx(()=>[g[1]||(g[1]=e.createTextVNode(" Створити віджет "))]),_:1})),e.createVNode($t,{teleport:"#modal",visible:d.value,title:"Створити віджет",onClose:y},{footer:e.withCtx(()=>[e.createElementVNode("div",{class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:y,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:w,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:e.withCtx(()=>[e.createElementVNode("div",tB,[e.createVNode(e.unref(n),{ref_key:"form",ref:h,schema:m.value,values:c.value,"onUpdate:values":g[0]||(g[0]=x=>c.value=x)},null,8,["schema","values"])])]),_:1},8,["visible"])])}}},nr={__name:"delete",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Y1),e.mergeProps(t.$attrs,{size:24}),null,16))}},Ga={__name:"close",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Ua),e.mergeProps(t.$attrs,{size:24}),null,16))}},or={__name:"edit",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(W1),e.mergeProps(t.$attrs,{size:24}),null,16))}},rB={class:"space-y-4"},lB={__name:"vs-editor-form-style",props:{widgetName:{type:String},data:{type:Object,default:()=>{}}},setup(l,{expose:t}){var f,u,g,M,x,k;const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),{$notify:n}=e.getCurrentInstance().proxy,o=l,s=e.ref(null),i={show:{label:"Label",type:"switcher",title:"Show label"},rotate:{type:"number",label:"Rotate angel",conditions:["show","==",!0]},align:{type:"radio",view:"buttons",style:{size:"xs"},conditions:["show","==",!0],options:[{id:"center",text:"Center"},{id:"left",text:"Left"},{id:"right",text:"Right"}]},position:{type:"radio",view:"buttons",style:{size:"xs"},conditions:["show","==",!0],options:[{id:"top",text:"Top"},{id:"right",text:"Right"},{id:"left",text:"Left"},{id:"bottom",text:"Bottom"}]}},d={show:{label:"Legend",type:"switcher",title:"Show legend"}},c={show:{label:"Tooltip ",type:"switcher",title:"Show tooltip"}},h=e.ref({...((u=(f=o.data)==null?void 0:f.style)==null?void 0:u.label)||{}}),p=e.ref({...((M=(g=o.data)==null?void 0:g.style)==null?void 0:M.legend)||{}}),y=e.ref({...((k=(x=o.data)==null?void 0:x.style)==null?void 0:k.tooltip)||{}}),w=()=>{const v=new CustomEvent(`update-style-${o.widgetName}`);v.chartId=o.widgetName,v.options={options:{legend:p.value,tooltip:y.value,label:h.value},seriesOptions:h.value},window.dispatchEvent(v)};e.watch(h,w,{deep:!0}),e.watch(p,w,{deep:!0}),e.watch(y,w,{deep:!0});const m=async()=>{try{await Se.put(`/bi-dashboard/${s.value}/${o.widgetName}`,{style:{legend:p.value,tooltip:y.value,label:h.value}});const v=new CustomEvent(`update-style-${o.widgetName}`);v.chartId=o.widgetName,v.options={options:{legend:p.value,tooltip:y.value,label:h.value},seriesOptions:h.value},window.dispatchEvent(v),n({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{n({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.onMounted(()=>{const v=new URLSearchParams(window.top.location.search);s.value=v.get("dashboard")}),t({requestUpdateWidget:m}),(v,V)=>(e.openBlock(),e.createElementBlock("div",rB,[e.createVNode(e.unref(a),{schema:i,values:h.value,"onUpdate:values":V[0]||(V[0]=C=>h.value=C),class:"p-0"},null,8,["values"]),e.createVNode(e.unref(a),{schema:d,values:p.value,"onUpdate:values":V[1]||(V[1]=C=>p.value=C),class:"p-0"},null,8,["values"]),e.createVNode(e.unref(a),{schema:c,values:y.value,"onUpdate:values":V[2]||(V[2]=C=>y.value=C),class:"p-0"},null,8,["values"])]))}};function Ka(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ft=Ka();function sr(l){ft=l}const ir=/[&<>"']/,nB=new RegExp(ir.source,"g"),dr=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,oB=new RegExp(dr.source,"g"),sB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cr=l=>sB[l];function Re(l,t){if(t){if(ir.test(l))return l.replace(nB,cr)}else if(dr.test(l))return l.replace(oB,cr);return l}const iB=/(^|[^\[])\^/g;function Ve(l,t){let a=typeof l=="string"?l:l.source;t=t||"";const n={replace:(o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(iB,"$1"),a=a.replace(o,i),n},getRegex:()=>new RegExp(a,t)};return n}function hr(l){try{l=encodeURI(l).replace(/%25/g,"%")}catch{return null}return l}const Ft={exec:()=>null};function pr(l,t){const a=l.replace(/\|/g,(s,i,d)=>{let c=!1,h=i;for(;--h>=0&&d[h]==="\\";)c=!c;return c?"|":" |"}),n=a.split(/ \|/);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(/\\\|/g,"|");return n}function Tt(l,t,a){const n=l.length;if(n===0)return"";let o=0;for(;o<n&&l.charAt(n-o-1)===t;)o++;return l.slice(0,n-o)}function dB(l,t){if(l.indexOf(t[1])===-1)return-1;let a=0;for(let n=0;n<l.length;n++)if(l[n]==="\\")n++;else if(l[n]===t[0])a++;else if(l[n]===t[1]&&(a--,a<0))return n;return-1}function yr(l,t,a,n){const o=t.href,s=t.title?Re(t.title):null,i=l[1].replace(/\\([\[\]])/g,"$1");if(l[0].charAt(0)!=="!"){n.state.inLink=!0;const d={type:"link",raw:a,href:o,title:s,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,d}return{type:"image",raw:a,href:o,title:s,text:Re(i)}}function cB(l,t){const a=l.match(/^(\s+)(?:```)/);if(a===null)return t;const n=a[1];return t.split(`
8217
8217
  `).map(o=>{const s=o.match(/^\s+/);if(s===null)return o;const[i]=s;return i.length>=n.length?o.slice(n.length):o}).join(`
8218
8218
  `)}class pa{constructor(t){Be(this,"options");Be(this,"rules");Be(this,"lexer");this.options=t||ft}space(t){const a=this.rules.block.newline.exec(t);if(a&&a[0].length>0)return{type:"space",raw:a[0]}}code(t){const a=this.rules.block.code.exec(t);if(a){const n=a[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:a[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Tt(n,`
8219
8219
  `)}}}fences(t){const a=this.rules.block.fences.exec(t);if(a){const n=a[0],o=cB(n,a[3]||"");return{type:"code",raw:n,lang:a[2]?a[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):a[2],text:o}}}heading(t){const a=this.rules.block.heading.exec(t);if(a){let n=a[2].trim();if(/#$/.test(n)){const o=Tt(n,"#");(this.options.pedantic||!o||/ $/.test(o))&&(n=o.trim())}return{type:"heading",raw:a[0],depth:a[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const a=this.rules.block.hr.exec(t);if(a)return{type:"hr",raw:Tt(a[0],`
@@ -8237,8 +8237,8 @@ ${y}`:y;const w=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
8237
8237
  `+w}!m&&!w.trim()&&(m=!0),h+=C+`
8238
8238
  `,t=t.substring(C.length+1),y=q.slice(f)}}s.loose||(d?s.loose=!0:/\n[ \t]*\n[ \t]*$/.test(h)&&(d=!0));let u=null,g;this.options.gfm&&(u=/^\[[ xX]\] /.exec(p),u&&(g=u[0]!=="[ ] ",p=p.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:h,task:!!u,checked:g,loose:!1,text:p,tokens:[]}),s.raw+=h}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){const h=s.items[c].tokens.filter(y=>y.type==="space"),p=h.length>0&&h.some(y=>/\n.*\n/.test(y.raw));s.loose=p}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){const a=this.rules.block.html.exec(t);if(a)return{type:"html",block:!0,raw:a[0],pre:a[1]==="pre"||a[1]==="script"||a[1]==="style",text:a[0]}}def(t){const a=this.rules.block.def.exec(t);if(a){const n=a[1].toLowerCase().replace(/\s+/g," "),o=a[2]?a[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=a[3]?a[3].substring(1,a[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):a[3];return{type:"def",tag:n,raw:a[0],href:o,title:s}}}table(t){const a=this.rules.block.table.exec(t);if(!a||!/[:|]/.test(a[2]))return;const n=pr(a[1]),o=a[2].replace(/^\||\| *$/g,"").split("|"),s=a[3]&&a[3].trim()?a[3].replace(/\n[ \t]*$/,"").split(`
8239
8239
  `):[],i={type:"table",raw:a[0],header:[],align:[],rows:[]};if(n.length===o.length){for(const d of o)/^ *-+: *$/.test(d)?i.align.push("right"):/^ *:-+: *$/.test(d)?i.align.push("center"):/^ *:-+ *$/.test(d)?i.align.push("left"):i.align.push(null);for(let d=0;d<n.length;d++)i.header.push({text:n[d],tokens:this.lexer.inline(n[d]),header:!0,align:i.align[d]});for(const d of s)i.rows.push(pr(d,i.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[h]})));return i}}lheading(t){const a=this.rules.block.lheading.exec(t);if(a)return{type:"heading",raw:a[0],depth:a[2].charAt(0)==="="?1:2,text:a[1],tokens:this.lexer.inline(a[1])}}paragraph(t){const a=this.rules.block.paragraph.exec(t);if(a){const n=a[1].charAt(a[1].length-1)===`
8240
- `?a[1].slice(0,-1):a[1];return{type:"paragraph",raw:a[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const a=this.rules.block.text.exec(t);if(a)return{type:"text",raw:a[0],text:a[0],tokens:this.lexer.inline(a[0])}}escape(t){const a=this.rules.inline.escape.exec(t);if(a)return{type:"escape",raw:a[0],text:Oe(a[1])}}tag(t){const a=this.rules.inline.tag.exec(t);if(a)return!this.lexer.state.inLink&&/^<a /i.test(a[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(a[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:a[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:a[0]}}link(t){const a=this.rules.inline.link.exec(t);if(a){const n=a[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const i=Tt(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=dB(a[2],"()");if(i>-1){const c=(a[0].indexOf("!")===0?5:4)+a[1].length+i;a[2]=a[2].substring(0,i),a[0]=a[0].substring(0,c).trim(),a[3]=""}}let o=a[2],s="";if(this.options.pedantic){const i=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);i&&(o=i[1],s=i[3])}else s=a[3]?a[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),yr(a,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},a[0],this.lexer)}}reflink(t,a){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const o=(n[2]||n[1]).replace(/\s+/g," "),s=a[o.toLowerCase()];if(!s){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return yr(n,s,n[0],this.lexer)}}emStrong(t,a,n=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const i=[...o[0]].length-1;let d,c,h=i,p=0;const y=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,a=a.slice(-1*t.length+i);(o=y.exec(a))!=null;){if(d=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!d)continue;if(c=[...d].length,o[3]||o[4]){h+=c;continue}else if((o[5]||o[6])&&i%3&&!((i+c)%3)){p+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+p);const w=[...o[0]][0].length,m=t.slice(0,i+o.index+w+c);if(Math.min(i,c)%2){const u=m.slice(1,-1);return{type:"em",raw:m,text:u,tokens:this.lexer.inlineTokens(u)}}const f=m.slice(2,-2);return{type:"strong",raw:m,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){const a=this.rules.inline.code.exec(t);if(a){let n=a[2].replace(/\n/g," ");const o=/[^ ]/.test(n),s=/^ /.test(n)&&/ $/.test(n);return o&&s&&(n=n.substring(1,n.length-1)),n=Oe(n,!0),{type:"codespan",raw:a[0],text:n}}}br(t){const a=this.rules.inline.br.exec(t);if(a)return{type:"br",raw:a[0]}}del(t){const a=this.rules.inline.del.exec(t);if(a)return{type:"del",raw:a[0],text:a[2],tokens:this.lexer.inlineTokens(a[2])}}autolink(t){const a=this.rules.inline.autolink.exec(t);if(a){let n,o;return a[2]==="@"?(n=Oe(a[1]),o="mailto:"+n):(n=Oe(a[1]),o=n),{type:"link",raw:a[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let a;if(a=this.rules.inline.url.exec(t)){let o,s;if(a[2]==="@")o=Oe(a[0]),s="mailto:"+o;else{let i;do i=a[0],a[0]=((n=this.rules.inline._backpedal.exec(a[0]))==null?void 0:n[0])??"";while(i!==a[0]);o=Oe(a[0]),a[1]==="www."?s="http://"+a[0]:s=a[0]}return{type:"link",raw:a[0],text:o,href:s,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){const a=this.rules.inline.text.exec(t);if(a){let n;return this.lexer.state.inRawBlock?n=a[0]:n=Oe(a[0]),{type:"text",raw:a[0],text:n}}}}const hB=/^(?:[ \t]*(?:\n|$))+/,pB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,uB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ur=/(?:[*+-]|\d{1,9}[.)])/,kr=Ve(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ur).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ja=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kB=/^[^\n]+/,Ya=/(?!\s*\])(?:\\.|[^\[\]\\])+/,mB=Ve(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ya).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fB=Ve(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ur).getRegex(),ya="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xa=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gB=Ve("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Xa).replace("tag",ya).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mr=Ve(Ja).replace("hr",Pt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex(),Qa={blockquote:Ve(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mr).getRegex(),code:pB,def:mB,fences:yB,heading:uB,hr:Pt,html:gB,lheading:kr,list:fB,newline:hB,paragraph:mr,table:Ft,text:kB},fr=Ve("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Pt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex(),xB={...Qa,table:fr,paragraph:Ve(Ja).replace("hr",Pt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex()},MB={...Qa,html:Ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xa).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ft,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ve(Ja).replace("hr",Pt).replace("heading",` *#{1,6} *[^
8241
- ]`).replace("lheading",kr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},gr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xr=/^( {2,}|\\)\n(?!\s*$)/,wB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,It="\\p{P}\\p{S}",vB=Ve(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,It).getRegex(),VB=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,CB=Ve(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,It).getRegex(),zB=Ve("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,It).getRegex(),BB=Ve("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,It).getRegex(),_B=Ve(/\\([punct])/,"gu").replace(/punct/g,It).getRegex(),EB=Ve(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qB=Ve(Xa).replace("(?:-->|$)","-->").getRegex(),SB=Ve("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",qB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ua=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,jB=Ve(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ua).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Mr=Ve(/^!?\[(label)\]\[(ref)\]/).replace("label",ua).replace("ref",Ya).getRegex(),br=Ve(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ya).getRegex(),AB=Ve("reflink|nolink(?!\\()","g").replace("reflink",Mr).replace("nolink",br).getRegex(),e1={_backpedal:Ft,anyPunctuation:_B,autolink:EB,blockSkip:VB,br:xr,code:bB,del:Ft,emStrongLDelim:CB,emStrongRDelimAst:zB,emStrongRDelimUnd:BB,escape:gr,link:jB,nolink:br,punctuation:vB,reflink:Mr,reflinkSearch:AB,tag:SB,text:wB,url:Ft},DB={...e1,link:Ve(/^!?\[(label)\]\((.*?)\)/).replace("label",ua).getRegex(),reflink:Ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ua).getRegex()},t1={...e1,escape:Ve(gr).replace("])","~|])").getRegex(),url:Ve(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},NB={...t1,br:Ve(xr).replace("{2,}","*").getRegex(),text:Ve(t1.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ka={normal:Qa,gfm:xB,pedantic:MB},Rt={normal:e1,gfm:t1,breaks:NB,pedantic:DB};class Ue{constructor(t){Be(this,"tokens");Be(this,"options");Be(this,"state");Be(this,"tokenizer");Be(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ft,this.options.tokenizer=this.options.tokenizer||new pa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const a={block:ka.normal,inline:Rt.normal};this.options.pedantic?(a.block=ka.pedantic,a.inline=Rt.pedantic):this.options.gfm&&(a.block=ka.gfm,this.options.breaks?a.inline=Rt.breaks:a.inline=Rt.gfm),this.tokenizer.rules=a}static get rules(){return{block:ka,inline:Rt}}static lex(t,a){return new Ue(a).lex(t)}static lexInline(t,a){return new Ue(a).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
8240
+ `?a[1].slice(0,-1):a[1];return{type:"paragraph",raw:a[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const a=this.rules.block.text.exec(t);if(a)return{type:"text",raw:a[0],text:a[0],tokens:this.lexer.inline(a[0])}}escape(t){const a=this.rules.inline.escape.exec(t);if(a)return{type:"escape",raw:a[0],text:Re(a[1])}}tag(t){const a=this.rules.inline.tag.exec(t);if(a)return!this.lexer.state.inLink&&/^<a /i.test(a[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(a[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:a[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:a[0]}}link(t){const a=this.rules.inline.link.exec(t);if(a){const n=a[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const i=Tt(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{const i=dB(a[2],"()");if(i>-1){const c=(a[0].indexOf("!")===0?5:4)+a[1].length+i;a[2]=a[2].substring(0,i),a[0]=a[0].substring(0,c).trim(),a[3]=""}}let o=a[2],s="";if(this.options.pedantic){const i=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);i&&(o=i[1],s=i[3])}else s=a[3]?a[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(n)?o=o.slice(1):o=o.slice(1,-1)),yr(a,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},a[0],this.lexer)}}reflink(t,a){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const o=(n[2]||n[1]).replace(/\s+/g," "),s=a[o.toLowerCase()];if(!s){const i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return yr(n,s,n[0],this.lexer)}}emStrong(t,a,n=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const i=[...o[0]].length-1;let d,c,h=i,p=0;const y=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,a=a.slice(-1*t.length+i);(o=y.exec(a))!=null;){if(d=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!d)continue;if(c=[...d].length,o[3]||o[4]){h+=c;continue}else if((o[5]||o[6])&&i%3&&!((i+c)%3)){p+=c;continue}if(h-=c,h>0)continue;c=Math.min(c,c+h+p);const w=[...o[0]][0].length,m=t.slice(0,i+o.index+w+c);if(Math.min(i,c)%2){const u=m.slice(1,-1);return{type:"em",raw:m,text:u,tokens:this.lexer.inlineTokens(u)}}const f=m.slice(2,-2);return{type:"strong",raw:m,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){const a=this.rules.inline.code.exec(t);if(a){let n=a[2].replace(/\n/g," ");const o=/[^ ]/.test(n),s=/^ /.test(n)&&/ $/.test(n);return o&&s&&(n=n.substring(1,n.length-1)),n=Re(n,!0),{type:"codespan",raw:a[0],text:n}}}br(t){const a=this.rules.inline.br.exec(t);if(a)return{type:"br",raw:a[0]}}del(t){const a=this.rules.inline.del.exec(t);if(a)return{type:"del",raw:a[0],text:a[2],tokens:this.lexer.inlineTokens(a[2])}}autolink(t){const a=this.rules.inline.autolink.exec(t);if(a){let n,o;return a[2]==="@"?(n=Re(a[1]),o="mailto:"+n):(n=Re(a[1]),o=n),{type:"link",raw:a[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let a;if(a=this.rules.inline.url.exec(t)){let o,s;if(a[2]==="@")o=Re(a[0]),s="mailto:"+o;else{let i;do i=a[0],a[0]=((n=this.rules.inline._backpedal.exec(a[0]))==null?void 0:n[0])??"";while(i!==a[0]);o=Re(a[0]),a[1]==="www."?s="http://"+a[0]:s=a[0]}return{type:"link",raw:a[0],text:o,href:s,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(t){const a=this.rules.inline.text.exec(t);if(a){let n;return this.lexer.state.inRawBlock?n=a[0]:n=Re(a[0]),{type:"text",raw:a[0],text:n}}}}const hB=/^(?:[ \t]*(?:\n|$))+/,pB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,uB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ur=/(?:[*+-]|\d{1,9}[.)])/,kr=Ve(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ur).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Ja=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kB=/^[^\n]+/,Ya=/(?!\s*\])(?:\\.|[^\[\]\\])+/,mB=Ve(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ya).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fB=Ve(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ur).getRegex(),ya="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xa=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gB=Ve("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Xa).replace("tag",ya).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mr=Ve(Ja).replace("hr",Pt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex(),Qa={blockquote:Ve(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mr).getRegex(),code:pB,def:mB,fences:yB,heading:uB,hr:Pt,html:gB,lheading:kr,list:fB,newline:hB,paragraph:mr,table:Ft,text:kB},fr=Ve("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Pt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex(),xB={...Qa,table:fr,paragraph:Ve(Ja).replace("hr",Pt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ya).getRegex()},MB={...Qa,html:Ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xa).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ft,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ve(Ja).replace("hr",Pt).replace("heading",` *#{1,6} *[^
8241
+ ]`).replace("lheading",kr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},gr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xr=/^( {2,}|\\)\n(?!\s*$)/,wB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,It="\\p{P}\\p{S}",vB=Ve(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,It).getRegex(),VB=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,CB=Ve(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,It).getRegex(),zB=Ve("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,It).getRegex(),BB=Ve("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,It).getRegex(),EB=Ve(/\\([punct])/,"gu").replace(/punct/g,It).getRegex(),_B=Ve(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qB=Ve(Xa).replace("(?:-->|$)","-->").getRegex(),SB=Ve("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",qB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ua=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,jB=Ve(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ua).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Mr=Ve(/^!?\[(label)\]\[(ref)\]/).replace("label",ua).replace("ref",Ya).getRegex(),br=Ve(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ya).getRegex(),AB=Ve("reflink|nolink(?!\\()","g").replace("reflink",Mr).replace("nolink",br).getRegex(),e1={_backpedal:Ft,anyPunctuation:EB,autolink:_B,blockSkip:VB,br:xr,code:bB,del:Ft,emStrongLDelim:CB,emStrongRDelimAst:zB,emStrongRDelimUnd:BB,escape:gr,link:jB,nolink:br,punctuation:vB,reflink:Mr,reflinkSearch:AB,tag:SB,text:wB,url:Ft},DB={...e1,link:Ve(/^!?\[(label)\]\((.*?)\)/).replace("label",ua).getRegex(),reflink:Ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ua).getRegex()},t1={...e1,escape:Ve(gr).replace("])","~|])").getRegex(),url:Ve(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},NB={...t1,br:Ve(xr).replace("{2,}","*").getRegex(),text:Ve(t1.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ka={normal:Qa,gfm:xB,pedantic:MB},Rt={normal:e1,gfm:t1,breaks:NB,pedantic:DB};class Oe{constructor(t){Be(this,"tokens");Be(this,"options");Be(this,"state");Be(this,"tokenizer");Be(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ft,this.options.tokenizer=this.options.tokenizer||new pa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const a={block:ka.normal,inline:Rt.normal};this.options.pedantic?(a.block=ka.pedantic,a.inline=Rt.pedantic):this.options.gfm&&(a.block=ka.gfm,this.options.breaks?a.inline=Rt.breaks:a.inline=Rt.gfm),this.tokenizer.rules=a}static get rules(){return{block:ka,inline:Rt}}static lex(t,a){return new Oe(a).lex(t)}static lexInline(t,a){return new Oe(a).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
8242
8242
  `),this.blockTokens(t,this.tokens);for(let a=0;a<this.inlineQueue.length;a++){const n=this.inlineQueue[a];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,a=[],n=!1){this.options.pedantic&&(t=t.replace(/\t/g," ").replace(/^ +$/gm,""));let o,s,i;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(d=>(o=d.call({lexer:this},t,a))?(t=t.substring(o.raw.length),a.push(o),!0):!1))){if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length),o.raw.length===1&&a.length>0?a[a.length-1].raw+=`
8243
8243
  `:a.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length),s=a[a.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=`
8244
8244
  `+o.raw,s.text+=`
@@ -8249,8 +8249,8 @@ ${y}`:y;const w=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block
8249
8249
  `+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):a.push(o),n=i.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length),s=a[a.length-1],s&&s.type==="text"?(s.raw+=`
8250
8250
  `+o.raw,s.text+=`
8251
8251
  `+o.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):a.push(o);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,a}inline(t,a=[]){return this.inlineQueue.push({src:t,tokens:a}),a}inlineTokens(t,a=[]){let n,o,s,i=t,d,c,h;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(d=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)p.includes(d[0].slice(d[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(d=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,d.index)+"["+"a".repeat(d[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(d=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,d.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(c||(h=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(n=p.call({lexer:this},t,a))?(t=t.substring(n.raw.length),a.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),o=a[a.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):a.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),o=a[a.length-1],o&&n.type==="text"&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):a.push(n);continue}if(n=this.tokenizer.emStrong(t,i,h)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),a.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),a.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),a.push(n);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let p=1/0;const y=t.slice(1);let w;this.options.extensions.startInline.forEach(m=>{w=m.call({lexer:this},y),typeof w=="number"&&w>=0&&(p=Math.min(p,w))}),p<1/0&&p>=0&&(s=t.substring(0,p+1))}if(n=this.tokenizer.inlineText(s)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(h=n.raw.slice(-1)),c=!0,o=a[a.length-1],o&&o.type==="text"?(o.raw+=n.raw,o.text+=n.text):a.push(n);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return a}}class ma{constructor(t){Be(this,"options");Be(this,"parser");this.options=t||ft}space(t){return""}code({text:t,lang:a,escaped:n}){var i;const o=(i=(a||"").match(/^\S*/))==null?void 0:i[0],s=t.replace(/\n$/,"")+`
8252
- `;return o?'<pre><code class="language-'+Oe(o)+'">'+(n?s:Oe(s,!0))+`</code></pre>
8253
- `:"<pre><code>"+(n?s:Oe(s,!0))+`</code></pre>
8252
+ `;return o?'<pre><code class="language-'+Re(o)+'">'+(n?s:Re(s,!0))+`</code></pre>
8253
+ `:"<pre><code>"+(n?s:Re(s,!0))+`</code></pre>
8254
8254
  `}blockquote({tokens:t}){return`<blockquote>
8255
8255
  ${this.parser.parse(t)}</blockquote>
8256
8256
  `}html({text:t}){return t}heading({tokens:t,depth:a}){return`<h${a}>${this.parser.parseInline(t)}</h${a}>
@@ -8266,9 +8266,9 @@ ${this.parser.parse(t)}</blockquote>
8266
8266
  `}tablerow({text:t}){return`<tr>
8267
8267
  ${t}</tr>
8268
8268
  `}tablecell(t){const a=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+a+`</${n}>
8269
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:a,tokens:n}){const o=this.parser.parseInline(n),s=hr(t);if(s===null)return o;t=s;let i='<a href="'+t+'"';return a&&(i+=' title="'+a+'"'),i+=">"+o+"</a>",i}image({href:t,title:a,text:n}){const o=hr(t);if(o===null)return n;t=o;let s=`<img src="${t}" alt="${n}"`;return a&&(s+=` title="${a}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class a1{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}}class Ze{constructor(t){Be(this,"options");Be(this,"renderer");Be(this,"textRenderer");this.options=t||ft,this.options.renderer=this.options.renderer||new ma,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new a1}static parse(t,a){return new Ze(a).parse(t)}static parseInline(t,a){return new Ze(a).parseInline(t)}parse(t,a=!0){let n="";for(let o=0;o<t.length;o++){const s=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const d=s,c=this.options.extensions.renderers[d.type].call({parser:this},d);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=c||"";continue}}const i=s;switch(i.type){case"space":{n+=this.renderer.space(i);continue}case"hr":{n+=this.renderer.hr(i);continue}case"heading":{n+=this.renderer.heading(i);continue}case"code":{n+=this.renderer.code(i);continue}case"table":{n+=this.renderer.table(i);continue}case"blockquote":{n+=this.renderer.blockquote(i);continue}case"list":{n+=this.renderer.list(i);continue}case"html":{n+=this.renderer.html(i);continue}case"paragraph":{n+=this.renderer.paragraph(i);continue}case"text":{let d=i,c=this.renderer.text(d);for(;o+1<t.length&&t[o+1].type==="text";)d=t[++o],c+=`
8270
- `+this.renderer.text(d);a?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c}]}):n+=c;continue}default:{const d='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,a){a=a||this.renderer;let n="";for(let o=0;o<t.length;o++){const s=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const d=this.options.extensions.renderers[s.type].call({parser:this},s);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=d||"";continue}}const i=s;switch(i.type){case"escape":{n+=a.text(i);break}case"html":{n+=a.html(i);break}case"link":{n+=a.link(i);break}case"image":{n+=a.image(i);break}case"strong":{n+=a.strong(i);break}case"em":{n+=a.em(i);break}case"codespan":{n+=a.codespan(i);break}case"br":{n+=a.br(i);break}case"del":{n+=a.del(i);break}case"text":{n+=a.text(i);break}default:{const d='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}}class Ot{constructor(t){Be(this,"options");Be(this,"block");this.options=t||ft}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Ue.lex:Ue.lexInline}provideParser(){return this.block?Ze.parse:Ze.parseInline}}Be(Ot,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class LB{constructor(...t){Be(this,"defaults",Ka());Be(this,"options",this.setOptions);Be(this,"parse",this.parseMarkdown(!0));Be(this,"parseInline",this.parseMarkdown(!1));Be(this,"Parser",Ze);Be(this,"Renderer",ma);Be(this,"TextRenderer",a1);Be(this,"Lexer",Ue);Be(this,"Tokenizer",pa);Be(this,"Hooks",Ot);this.use(...t)}walkTokens(t,a){var o,s;let n=[];for(const i of t)switch(n=n.concat(a.call(this,i)),i.type){case"table":{const d=i;for(const c of d.header)n=n.concat(this.walkTokens(c.tokens,a));for(const c of d.rows)for(const h of c)n=n.concat(this.walkTokens(h.tokens,a));break}case"list":{const d=i;n=n.concat(this.walkTokens(d.items,a));break}default:{const d=i;(s=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&s[d.type]?this.defaults.extensions.childTokens[d.type].forEach(c=>{const h=d[c].flat(1/0);n=n.concat(this.walkTokens(h,a))}):d.tokens&&(n=n.concat(this.walkTokens(d.tokens,a)))}}return n}use(...t){const a=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const i=a.renderers[s.name];i?a.renderers[s.name]=function(...d){let c=s.renderer.apply(this,d);return c===!1&&(c=i.apply(this,d)),c}:a.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=a[s.level];i?i.unshift(s.tokenizer):a[s.level]=[s.tokenizer],s.start&&(s.level==="block"?a.startBlock?a.startBlock.push(s.start):a.startBlock=[s.start]:s.level==="inline"&&(a.startInline?a.startInline.push(s.start):a.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(a.childTokens[s.name]=s.childTokens)}),o.extensions=a),n.renderer){const s=this.defaults.renderer||new ma(this.defaults);for(const i in n.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const d=i,c=n.renderer[d],h=s[d];s[d]=(...p)=>{let y=c.apply(s,p);return y===!1&&(y=h.apply(s,p)),y||""}}o.renderer=s}if(n.tokenizer){const s=this.defaults.tokenizer||new pa(this.defaults);for(const i in n.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const d=i,c=n.tokenizer[d],h=s[d];s[d]=(...p)=>{let y=c.apply(s,p);return y===!1&&(y=h.apply(s,p)),y}}o.tokenizer=s}if(n.hooks){const s=this.defaults.hooks||new Ot;for(const i in n.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const d=i,c=n.hooks[d],h=s[d];Ot.passThroughHooks.has(i)?s[d]=p=>{if(this.defaults.async)return Promise.resolve(c.call(s,p)).then(w=>h.call(s,w));const y=c.call(s,p);return h.call(s,y)}:s[d]=(...p)=>{let y=c.apply(s,p);return y===!1&&(y=h.apply(s,p)),y}}o.hooks=s}if(n.walkTokens){const s=this.defaults.walkTokens,i=n.walkTokens;o.walkTokens=function(d){let c=[];return c.push(i.call(this,d)),s&&(c=c.concat(s.call(this,d))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,a){return Ue.lex(t,a??this.defaults)}parser(t,a){return Ze.parse(t,a??this.defaults)}parseMarkdown(t){return(n,o)=>{const s={...o},i={...this.defaults,...s},d=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return d(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return d(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return d(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const c=i.hooks?i.hooks.provideLexer():t?Ue.lex:Ue.lexInline,h=i.hooks?i.hooks.provideParser():t?Ze.parse:Ze.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(p=>c(p,i)).then(p=>i.hooks?i.hooks.processAllTokens(p):p).then(p=>i.walkTokens?Promise.all(this.walkTokens(p,i.walkTokens)).then(()=>p):p).then(p=>h(p,i)).then(p=>i.hooks?i.hooks.postprocess(p):p).catch(d);try{i.hooks&&(n=i.hooks.preprocess(n));let p=c(n,i);i.hooks&&(p=i.hooks.processAllTokens(p)),i.walkTokens&&this.walkTokens(p,i.walkTokens);let y=h(p,i);return i.hooks&&(y=i.hooks.postprocess(y)),y}catch(p){return d(p)}}}onError(t,a){return n=>{if(n.message+=`
8271
- Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+Oe(n.message+"",!0)+"</pre>";return a?Promise.resolve(o):o}if(a)return Promise.reject(n);throw n}}}const gt=new LB;function be(l,t){return gt.parse(l,t)}be.options=be.setOptions=function(l){return gt.setOptions(l),be.defaults=gt.defaults,sr(be.defaults),be},be.getDefaults=Ka,be.defaults=ft,be.use=function(...l){return gt.use(...l),be.defaults=gt.defaults,sr(be.defaults),be},be.walkTokens=function(l,t){return gt.walkTokens(l,t)},be.parseInline=gt.parseInline,be.Parser=Ze,be.parser=Ze.parse,be.Renderer=ma,be.TextRenderer=a1,be.Lexer=Ue,be.lexer=Ue.lex,be.Tokenizer=pa,be.Hooks=Ot,be.parse=be,be.options,be.setOptions,be.use,be.walkTokens,be.parseInline,Ze.parse,Ue.lex;const HB={class:"space-y-4"},$B={__name:"vs-editor-form-data",props:{widgetName:{type:String},data:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(l,{expose:t,emit:a}){var w,m,f,u,g,M,x,k,v,V,C,q,H,Q,G,$,B,P,L,Z,F,X,J,se,ce,Ee,$e,Y,ne,ue,he,fe,T,le,D,I,W,re,ie,we,A;const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),{$notify:o}=e.getCurrentInstance().proxy,s=a,i=l,d=e.ref(null),c={text:{type:"Text",label:"Text",conditions:["type","==","text"]},x:{type:"radio",label:"X Axis",view:"buttons",style:{size:"xs"},conditions:["type","not_in",["text","table","map"]],options:[...((f=(m=(w=i.columns)==null?void 0:w.filter(S=>(S==null?void 0:S.type)=="text"||(S==null?void 0:S.type)==="date"||(S==null?void 0:S.type)==="timestamp without time zone"||(S==null?void 0:S.type)==="boolean"||(S==null?void 0:S.type)==="integer"))==null?void 0:m.map(({name:S,type:O})=>S!=null?{id:S,label:S,type:O}:null))==null?void 0:f.filter(Boolean))??[]]},cls:{label:"X Axis classifier",type:"text",conditions:["type","not_in",["text","table","map","cluster"]]},y_type:{label:"Y type",type:"radio",options:[{id:"columns",label:"columns"},{id:"function",label:"function"}],conditions:["type","not_in",["text","table","map","number","cluster"]]},tableSQL:{label:"tableSQL",type:"text",hidden:!0},metric:{type:"radio",label:"Y Axis",view:"buttons",style:{size:"xs"},conditions:[["type","not_in",["text","table","map","cluster"]],["y_type","!=","function"]],options:[{id:"count",label:"count"},...((M=(g=(u=i.columns)==null?void 0:u.filter(S=>(S==null?void 0:S.type)==="numeric"||(S==null?void 0:S.type)==="double precision"))==null?void 0:g.map(({name:S,type:O})=>S!=null?{id:S,label:S,type:O}:null))==null?void 0:M.filter(Boolean))??[]]},fx:{type:"text",label:"Function",conditions:[["y_type","==","function"]]},query:{label:"Query",type:"text",conditions:["type","not_in",["text","table","map","number"]]},groupby:{type:"radio",label:"Groupby",view:"buttons",style:{size:"xs"},options:[{id:"null",label:"null"},...((v=(k=(x=i.columns)==null?void 0:x.filter(S=>(S==null?void 0:S.type)=="text"||(S==null?void 0:S.type)==="boolean"||(S==null?void 0:S.type)==="integer"))==null?void 0:k.map(({name:S})=>S!=null?{id:S,label:S}:null))==null?void 0:v.filter(Boolean))??[]],conditions:["type","==","bar"]},columns:{type:"checkbox",label:"Columns",style:{size:"xs"},options:(i.columns??[]).map(({name:S})=>S!=null?{id:S,label:S}:null).filter(Boolean),conditions:["type","in",["table","map"]]},granularity:{type:"radio",label:"Granularity",options:[{id:"year",label:"year"},{id:"quarter",label:"quarter"},{id:"month",label:"month"},{id:"week",label:"week"}],conditions:["x.type","==","date"]},type:{type:"Text",hidden:!0}},h=e.ref({x:((C=(V=i.data)==null?void 0:V.data)==null?void 0:C.x)||((q=i.data)==null?void 0:q.x)||null,metric:((Q=(H=i.data)==null?void 0:H.data)==null?void 0:Q.metric)||((G=i.data)==null?void 0:G.metric)||null,columns:((B=($=i.data)==null?void 0:$.data)==null?void 0:B.columns)||((P=i.data)==null?void 0:P.columns)||null,granularity:((Z=(L=i.data)==null?void 0:L.data)==null?void 0:Z.granularity)||((F=i.data)==null?void 0:F.granularity)||null,type:((J=(X=i.data)==null?void 0:X.data)==null?void 0:J.type)||((se=i.data)==null?void 0:se.type)||null,groupby:((Ee=(ce=i.data)==null?void 0:ce.data)==null?void 0:Ee.groupby)||i.data.groupby||null,fx:((Y=($e=i.data)==null?void 0:$e.data)==null?void 0:Y.fx)||((ne=i.data)==null?void 0:ne.fx)||null,query:((he=(ue=i.data)==null?void 0:ue.data)==null?void 0:he.query)||((fe=i.data)==null?void 0:fe.query)||null,y_type:((le=(T=i.data)==null?void 0:T.data)==null?void 0:le.y_type)||((D=i.data)==null?void 0:D.y_type)||null,tableSQL:((W=(I=i.data)==null?void 0:I.data)==null?void 0:W.tableSQL)||((re=i.data)==null?void 0:re.tableSQL)||null,cls:((we=(ie=i.data)==null?void 0:ie.data)==null?void 0:we.cls)||((A=i.data)==null?void 0:A.cls)||null}),p=async()=>{try{await je.put(`/bi-dashboard/${d.value}/${i.widgetName}`,{data:h.value});let S=`/bi-data?dashboard=${d.value}&widget=${i.widgetName}`;Object.entries(h.value).forEach(([ke,Re])=>{S+=`&${ke}=${Re}`});const O=new CustomEvent(`update-data-${i.widgetName}`);O.filterUrl=S,window.dispatchEvent(O),s("update-dashboard"),o({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{o({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}},y=async()=>{try{let S=`/bi-data?dashboard=${d.value}&widget=${i.widgetName}`;Object.entries(h.value).forEach(([ke,Re])=>{S+=`&${ke}=${Re}`});const O=new CustomEvent(`update-data-${i.widgetName}`);O.filterUrl=S,window.dispatchEvent(O),s("update-dashboard")}catch{await o({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.watch(h,()=>{y()},{deep:!0}),e.onMounted(()=>{const S=new URLSearchParams(window.top.location.search);d.value=S.get("dashboard")}),t({requestUpdateWidget:p}),(S,O)=>(e.openBlock(),e.createElementBlock("div",HB,[e.createVNode(e.unref(n),{schema:c,values:h.value,"onUpdate:values":O[0]||(O[0]=ke=>h.value=ke)},null,8,["values"])]))}},FB={class:"space-y-4"},TB={__name:"vs-editor-form-yaml",props:{yamlValue:{type:null,default:()=>""},widgetName:{type:String},data:{type:Object}},setup(l,{expose:t}){const a=typeof window<"u"?window.echarts:null,n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it).then(y=>y.VsInputMonaco)),o=e.ref(null),{$notify:s}=e.getCurrentInstance().proxy,i=l,d=(y,{dimensions:w,source:m})=>{const f=y.getOption(),{data:u,...g}=(f==null?void 0:f.series)[0],[,...M]=w||[],x=M.map((k,v)=>({...(f==null?void 0:f.series[v])||{},data:m.map(V=>V[v+1]),name:k}));y==null||y.setOption({...f||{},dataset:{dimensions:w,source:m},series:x,xAxis:{type:"category"},yAxis:{}},!0)},c=y=>{const w=document.getElementById(y);if(!w)return null;const m=a==null?void 0:a.getInstanceByDom(w);return m||null},h=e.ref(i.yamlValue),p=async()=>{try{await je.put(`/bi-dashboard/${o.value}/${i.widgetName}`,{yml:h.value});const y=c(i.widgetName);if(y){const w=await je.get(`/bi-data?dashboard=${o.value}&widget=${i.widgetName}`);d(y,w)}s({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{s({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.onMounted(()=>{const y=new URLSearchParams(window.top.location.search);o.value=y.get("dashboard")}),t({requestUpdateWidget:p}),(y,w)=>(e.openBlock(),e.createElementBlock("div",FB,[e.createVNode(e.unref(n),{modelValue:h.value,"onUpdate:modelValue":w[0]||(w[0]=m=>h.value=m),syntax:"yaml",theme:"vs-light",height:400,minimap:!1},null,8,["modelValue"])]))}},PB={class:"pt-[10px]"},wr={"vs-editor-form-style":lB,"vs-editor-form-data":$B,"vs-editor-form-yaml":TB,"vs-editor-form-controls":{__name:"vs-editor-form-controls",props:{widgetName:{type:String},controls:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(l,{emit:t}){var p;const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),{$notify:n}=e.getCurrentInstance().proxy,o=t,s=l,i=e.ref(null),d={granularity:{ua:"Granularity",type:"checkbox",options:["week","month","quarter","year"]},export:{ua:"Export",type:"Switcher"},groupby:{ua:"Groupby",type:"checkbox",options:(p=s.columns)==null?void 0:p.map(({name:y})=>y)}},c=e.ref(s.controls||{}),h=async()=>{try{await je.put(`/bi-dashboard/${i.value}/${s.widgetName}`,{controls:c.value}),await n({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),staticTypes!=null&&staticTypes.includes(c.value.type)&&o("update-dashboard")}catch{await n({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.onMounted(()=>{const y=new URLSearchParams(window.top.location.search);i.value=y.get("dashboard")}),(y,w)=>{const m=e.resolveComponent("VsButton");return e.openBlock(),e.createElementBlock("div",PB,[e.createVNode(m,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:h},{default:e.withCtx(()=>w[1]||(w[1]=[e.createTextVNode(" Зберегти ")])),_:1}),e.createVNode(e.unref(a),{schema:d,values:c.value,"onUpdate:values":w[0]||(w[0]=f=>c.value=f)},null,8,["values"])])}}}},IB={key:0,class:"p-4 text-sm text-amber-700 bg-amber-50 rounded-lg"},vr={__name:"editor-tab-error-boundary",props:{tabComponent:{type:Object,default:null},tabKey:{type:[String,Number],default:""}},emits:["update-dashboard"],setup(l,{expose:t}){const a=l,n=e.ref(null);function o(){var i,d;(d=(i=n.value)==null?void 0:i.requestUpdateWidget)==null||d.call(i)}t({save:o});const s=e.ref(!1);return e.onErrorCaptured((i,d,c)=>(console.error("Editor tab error:",i,c),s.value=!0,!1)),e.watch(()=>a.tabComponent,()=>{s.value=!1},{immediate:!0}),(i,d)=>s.value?(e.openBlock(),e.createElementBlock("div",IB," Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.tabComponent),e.mergeProps({ref_key:"tabRef",ref:n,key:l.tabKey||"tab"},i.$attrs,{onUpdateDashboard:d[0]||(d[0]=c=>i.$emit("update-dashboard"))}),null,16))}},RB={class:"h-full flex flex-col bg-white shrink-0 !w-[400px] border rounded-xl overflow-hidden border-gray-200"},OB={key:0,class:"flex flex-col min-h-0 flex-1"},UB={class:"flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]"},ZB={class:"flex items-center gap-6 min-w-0"},WB=["onClick"],GB={key:0,class:"absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 rounded-full"},KB={class:"flex items-center gap-1 ml-auto shrink-0"},JB={key:1,class:"flex-1 min-h-0 overflow-auto px-4 py-4 [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},YB={key:0},XB={key:1},QB={class:"p-4"},e_={class:"flex justify-end mt-4 gap-x-3"},t_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},a_={__name:"vs-editor-forms",props:e.mergeModels({selectedWidgetData:{type:Object,required:!1,default:null},selectedDashboard:{type:String,default:()=>""},currentWidgetData:{type:String,default:()=>""}},{selectedWidget:{},selectedWidgetModifiers:{}}),emits:e.mergeModels(["update-data"],["update:selectedWidget"]),setup(l,{emit:t}){var k,v;const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),n=(v=(k=e.getCurrentInstance())==null?void 0:k.proxy)==null?void 0:v.$notify,o=t,s=e.ref(null),i=l,d=e.ref(!1),c=e.ref(!0),h=e.ref(!1),p=e.ref({}),y=e.useModel(l,"selectedWidget"),w=["table","text","number","stat","progress","listbar","map","pivot"],m=e.ref("data"),f=async()=>{try{await je.delete(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`);const V=new URL(window.top.location.href);V.searchParams.set("dashboard",i.selectedDashboard),V.searchParams.delete("widget"),window.top.history.pushState({},"",V),o("update-data"),d.value=!1,n({type:"success",title:"Успішно!",message:"Віджет успішно видалено"})}catch(V){console.error(V),n({type:"error",title:"Помилка!",message:"При спробі видалити віджет виникла помилка"})}},u=e.computed(()=>{const V=[{id:"data",label:"Дані"},{id:"style",label:"Стилі"},{id:"yaml",label:"{ }"}];return V==null?void 0:V.filter(C=>{var q,H,Q;return C.id==="style"?!(w!=null&&w.includes(((q=i.selectedWidgetData)==null?void 0:q.type)||((Q=(H=i.selectedWidgetData)==null?void 0:H.data)==null?void 0:Q.type))):!0})}),g=()=>{var V,C,q,H,Q,G,$,B,P;p.value={title:(V=i.selectedWidgetData)==null?void 0:V.title,type:(C=i.selectedWidgetData)==null?void 0:C.type,table:(q=i.selectedWidgetData)==null?void 0:q.table_name,query:(Q=(H=i.selectedWidgetData)==null?void 0:H.data)==null?void 0:Q.query,x:($=(G=i.selectedWidgetData)==null?void 0:G.data)==null?void 0:$.x,cls:(P=(B=i.selectedWidgetData)==null?void 0:B.data)==null?void 0:P.cls},h.value=!0},M=async()=>{try{await je.put(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`,p.value),n({type:"success",title:"Успішно!",message:"Дані успішно змінено"}),await o("update-data"),h.value=!1}catch{n({type:"error",title:"Помилка!",message:"При спробі внести зміни виникла помилка"})}};e.watch(y,V=>{c.value=!1;const C=new URL(window.top.location.href);V?(C.searchParams.set("widget",V),window.top.history.pushState({},"",C)):(C.searchParams.delete("widget"),window.top.history.pushState({},"",C)),setTimeout(()=>c.value=!0)});const x={title:{type:"text",ua:"Заголовок",placeholder:"Заголовок",validators:["required"]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"text",ua:"Таблиця",placeholder:"Таблиця"},query:{type:"Text",ua:"Query",placeholder:"Query"},x:{type:"Text",ua:"X Axis",placeholder:"X Axis"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}};return(V,C)=>{var H,Q,G,$,B,P,L,Z,F,X,J;const q=e.resolveComponent("VsPopover");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",RB,[l.selectedWidgetData?(e.openBlock(),e.createElementBlock("div",OB,[e.createElementVNode("div",UB,[e.createElementVNode("nav",ZB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,se=>(e.openBlock(),e.createElementBlock("button",{key:se.id,type:"button",class:e.normalizeClass(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap",m.value===se.id?"text-blue-600":"text-gray-600 hover:text-gray-900"]),onClick:ce=>m.value=se.id},[e.createTextVNode(e.toDisplayString(se.label)+" ",1),m.value===se.id?(e.openBlock(),e.createElementBlock("span",GB)):e.createCommentVNode("",!0)],10,WB))),128))]),e.createElementVNode("div",KB,[e.createVNode(q,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{type:"button",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",title:"Зберегти",onClick:C[0]||(C[0]=se=>{var ce,Ee;return(Ee=(ce=s.value)==null?void 0:ce.save)==null?void 0:Ee.call(ce)})},[e.createVNode(e.unref(G1),{class:"h-4 w-4"})])]),default:e.withCtx(()=>[C[9]||(C[9]=e.createTextVNode(" Зберегти "))]),_:1}),e.createVNode(q,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{type:"button",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",onClick:g},[e.createVNode(or,{class:"h-4 w-4"})])]),default:e.withCtx(()=>[C[10]||(C[10]=e.createTextVNode(" Редагувати віджет "))]),_:1}),e.createVNode(q,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{type:"button",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",onClick:C[1]||(C[1]=se=>d.value=!0)},[e.createVNode(e.unref(nr),{class:"h-4 w-4"})])]),default:e.withCtx(()=>[C[11]||(C[11]=e.createTextVNode(" Видалити віджет "))]),_:1})])]),(H=l.currentWidgetData)!=null&&H.status?(e.openBlock(),e.createBlock(ha,{key:0,title:(Q=l.currentWidgetData)==null?void 0:Q.title,text:(G=l.currentWidgetData)==null?void 0:G.message},null,8,["title","text"])):(e.openBlock(),e.createElementBlock("div",JB,[c.value&&l.currentWidgetData?(e.openBlock(),e.createElementBlock("div",YB,[e.createVNode(vr,{ref_key:"tabPanelRef",ref:s,"tab-key":m.value,"tab-component":e.unref(wr)["vs-editor-form-"+m.value],widgetName:($=l.selectedWidgetData)==null?void 0:$.name,yamlValue:((B=l.selectedWidgetData)==null?void 0:B.yml)||"",data:l.selectedWidgetData,controls:(P=l.selectedWidgetData)==null?void 0:P.controls,columns:(L=l.currentWidgetData)==null?void 0:L.columns,onUpdateDashboard:C[2]||(C[2]=se=>V.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","yamlValue","data","controls","columns"])])):(e.openBlock(),e.createElementBlock("div",XB,[e.createVNode(vr,{ref_key:"tabPanelRef",ref:s,"tab-key":m.value,"tab-component":e.unref(wr)["vs-editor-form-"+m.value],widgetName:(Z=l.selectedWidgetData)==null?void 0:Z.name,yamlValue:((F=l.selectedWidgetData)==null?void 0:F.yml)||"",data:l.selectedWidgetData,controls:(X=l.selectedWidgetData)==null?void 0:X.controls,columns:(J=l.currentWidgetData)==null?void 0:J.columns,onUpdateDashboard:C[3]||(C[3]=se=>V.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","yamlValue","data","controls","columns"])])),e.createVNode($t,{teleport:"#modal",visible:d.value,title:"Ви впевнені?",onClose:C[5]||(C[5]=se=>d.value=!1)},{default:e.withCtx(()=>[e.createElementVNode("div",QB,[C[12]||(C[12]=e.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей віджет? ",-1)),e.createElementVNode("div",e_,[e.createElementVNode("button",{type:"button",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",onClick:C[4]||(C[4]=se=>d.value=!1)}," Скасувати "),e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:f}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])]))])):(e.openBlock(),e.createBlock(ha,{key:1,title:"Оберіть один з віджетів",text:"",class:"p-4"}))]),e.createVNode($t,{teleport:"#modal",visible:h.value,title:"Редагувати віджет",onClose:C[8]||(C[8]=se=>h.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",t_,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:C[7]||(C[7]=se=>h.value=!1),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"}," Скасувати "),e.createElementVNode("button",{onClick:M,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[x?(e.openBlock(),e.createBlock(e.unref(a),{key:0,schema:x,values:p.value,"onUpdate:values":C[6]||(C[6]=se=>p.value=se)},null,8,["values"])):e.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}}},r_={class:"overflow-hidden flex flex-col min-h-[480px]"},l_={class:"flex-1 flex min-h-0 gap-4"},n_={class:"flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50"},o_={class:"w-[400px] shrink-0 flex flex-col"},s_={__name:"vs-widget-editor-panel",props:{selectedWidget:{type:String,default:""},selectedWidgetData:{type:Object,default:null},currentWidgetData:{type:Object,default:null},selectedDashboard:{type:String,default:""},dashboardWidgets:{type:Array,default:()=>[]}},emits:["update:selectedWidget","update-data"],setup(l,{emit:t}){const a=l,n=t,o=e.computed({get:()=>a.selectedWidget,set:s=>n("update:selectedWidget",s)});return(s,i)=>(e.openBlock(),e.createElementBlock("div",r_,[e.createElementVNode("div",l_,[e.createElementVNode("div",n_,[e.createVNode(Ht,{dashboard:l.selectedDashboard,widget:l.selectedWidget,"selected-widget":l.selectedWidget,"dashboard-widgets":l.dashboardWidgets,"filter-u-rl":void 0,class:"max-h-full"},null,8,["dashboard","widget","selected-widget","dashboard-widgets"])]),e.createElementVNode("div",o_,[e.createVNode(a_,{selectedWidget:o.value,"onUpdate:selectedWidget":i[0]||(i[0]=d=>o.value=d),selectedWidgetData:l.selectedWidgetData,currentWidgetData:l.currentWidgetData,selectedDashboard:l.selectedDashboard,onUpdateData:i[1]||(i[1]=d=>s.$emit("update-data"))},null,8,["selectedWidget","selectedWidgetData","currentWidgetData","selectedDashboard"])])])]))}},Vr={__name:"icon-grid",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(O1),e.mergeProps(t.$attrs,{size:24}),null,16))}},i_={__name:"icon-filter",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Ra),e.mergeProps(t.$attrs,{size:24}),null,16))}},Cr={__name:"icon-table",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(J1),e.mergeProps(t.$attrs,{size:24}),null,16))}},d_={__name:"icon-more",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(T1),e.mergeProps(t.$attrs,{size:24}),null,16))}},c_=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),h_={components:{VsModal:$t,VForm:c_,deleteIcon:nr,editIcon:or,IconGrid:Vr,IconMore:d_,IconFilter:i_,IconTable:Cr},watch:{dashboardData:{handler(l){var a,n;if(this.formEditValue={title:l==null?void 0:l.title,description:l==null?void 0:l.description,table_name:l==null?void 0:l.table_name,db:l==null?void 0:l.db,public:l==null?void 0:l.public,words:l==null?void 0:l.words},!((a=l==null?void 0:l.panels)!=null&&a.length)){this.formGridValue={panels:[]},this.formFilterValue={filters:(l==null?void 0:l.filters)||null};return}const t=(n=l==null?void 0:l.panels)==null?void 0:n.map(o=>{var d,c;const{title:s="",type:i=""}=((c=(d=l==null?void 0:l.widgets)==null?void 0:d.find(h=>(h==null?void 0:h.name)===(o==null?void 0:o.widget)))==null?void 0:c.data)||{};return{title:s,type:i,...o}});this.formGridValue={panels:t},this.formFilterValue={filters:(l==null?void 0:l.filters)||null}},immediate:!0}},data(){return{isDeleteConfirm:!1,isFormEdit:!1,isFormGrid:!1,isFormFilter:!1,isVisibleTableColumns:!1,formEditValue:{},formGridValue:{},formFilterValue:{},editDashboardScheme:[{type:"Text",key:"title",label:"Заголовок",validators:["required"]},{type:"Text",key:"description",label:"Опис"},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці"},{type:"Text",key:"words",label:"Ключові слова"},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],editGridScheme:[{type:"DataTable",ua:"Панелі",key:"panels",editable:!1,addition:!1,colModel:[{name:"title",ua:"Назва",type:"Text",key:"col"},{name:"type",ua:"Тип",type:"Text",key:"col",disabled:!0},{name:"widget",type:"Text",ua:"Назва",key:"widget",hiddenCol:!0},{name:"col",ua:"Кількість стовпчиків",type:"Text",key:"col"}]}],editFilterScheme:[{name:"filters",type:"DataTable",colModel:[{ua:"Підпис",type:"Text",key:"label"},{ua:"Тип",type:"Text",key:"type"}]}]}},props:{selected:{type:String,default:()=>""},dashboardData:{type:Object,default:()=>{}},selectedWidgetData:{type:Object,default:()=>{}},columns:{type:Array}},methods:{async editDashboard(){var l,t;try{(t=(l=this.$refs)==null?void 0:l.formEdit)==null||t.doValidation(),await je.put(`/bi-dashboard/${this.selected}`,this.formEditValue),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormEdit=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"при спробі оновити дані виникла помилка"})}},async editDashboardGrid(){var l,t;try{(t=(l=this.$refs)==null?void 0:l.formGrid)==null||t.doValidation(),await je.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormGrid=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async editDashboardFilters(){var l,t;try{(t=(l=this.$refs)==null?void 0:l.formFilter)==null||t.doValidation(),await je.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue,...this.formFilterValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormFilter=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async deleteDashboard(){try{await je.delete(`/bi-dashboard/${this.selected}`);const l=new URL(window.top.location.href);l.searchParams.delete("dashboard"),l.searchParams.delete("widget"),window.history.pushState({},"",l),await this.$notify({title:"Успішно!",type:"success",message:"Дашборд видалено успішно"}),this.isDeleteConfirm=!1,await this.$emit("update:selected",null),await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі видалити дашборд виникла помилка"})}},closePopover(){document.body.click()}}},p_={key:0,class:"flex items-center gap-4"},y_={class:"h-[30px] w-[30px] flex items-center justify-center"},u_={class:"flex flex-col items-start -ml-2 -mr-2"},k_={class:"p-4"},m_={class:"flex justify-end mt-4 gap-x-3"},f_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},g_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},x_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function M_(l,t,a,n,o,s){const i=e.resolveComponent("IconFilter"),d=e.resolveComponent("VsPopover"),c=e.resolveComponent("IconGrid"),h=e.resolveComponent("IconMore"),p=e.resolveComponent("VsModal"),y=e.resolveComponent("VForm");return e.openBlock(),e.createElementBlock("div",null,[a.selected?(e.openBlock(),e.createElementBlock("div",p_,[e.createVNode(d,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:t[0]||(t[0]=w=>o.isFormFilter=!0)},[e.createVNode(i,{class:"h-[20px] text-gray-500"})])]),default:e.withCtx(()=>[t[19]||(t[19]=e.createTextVNode(" Редагувати фільтри "))]),_:1}),e.createVNode(d,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:t[1]||(t[1]=w=>o.isFormGrid=!0)},[e.createVNode(c,{class:"h-[20px] text-gray-500"})])]),default:e.withCtx(()=>[t[20]||(t[20]=e.createTextVNode(" Редагувати структуру дашборду "))]),_:1}),e.createVNode(d,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(d,{placement:"bottom-left"},{reference:e.withCtx(()=>[e.createElementVNode("button",y_,[e.createVNode(h,{class:"h-[20px]"})])]),default:e.withCtx(()=>[e.createElementVNode("div",u_,[e.createElementVNode("button",{onClick:t[2]||(t[2]=w=>{s.closePopover(),o.isFormEdit=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Редагувати дашборд "),e.createElementVNode("button",{onClick:t[3]||(t[3]=w=>{s.closePopover(),o.isDeleteConfirm=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Видалити дашборд ")])]),_:1})]),default:e.withCtx(()=>[t[21]||(t[21]=e.createTextVNode(" Керування дашбордом "))]),_:1})])):e.createCommentVNode("",!0),e.createVNode(p,{teleport:"#modal",visible:o.isDeleteConfirm,size:"small",title:"Ви впевнені?",onClose:t[6]||(t[6]=w=>o.isDeleteConfirm=!1)},{default:e.withCtx(()=>[e.createElementVNode("div",k_,[t[22]||(t[22]=e.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей дашборд? ",-1)),e.createElementVNode("div",m_,[e.createElementVNode("button",{type:"button",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",onClick:t[4]||(t[4]=w=>o.isDeleteConfirm=!1)}," Скасувати "),e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[5]||(t[5]=(...w)=>s.deleteDashboard&&s.deleteDashboard(...w))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"]),e.createVNode(p,{teleport:"#modal",visible:o.isFormEdit,title:"Редагувати дашборд",onClose:t[10]||(t[10]=w=>o.isFormEdit=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",f_,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:t[8]||(t[8]=w=>o.isFormEdit=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:t[9]||(t[9]=(...w)=>s.editDashboard&&s.editDashboard(...w)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(y,{ref:"formEdit",schema:o.editDashboardScheme,values:o.formEditValue,"onUpdate:values":t[7]||(t[7]=w=>o.formEditValue=w)},null,8,["schema","values"])]),_:1},8,["visible"]),e.createVNode(p,{teleport:"#modal",visible:o.isFormGrid,title:"Редагувати структуру дашборду",onClose:t[14]||(t[14]=w=>o.isFormGrid=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",g_,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:t[12]||(t[12]=w=>o.isFormGrid=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:t[13]||(t[13]=(...w)=>s.editDashboardGrid&&s.editDashboardGrid(...w)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(y,{ref:"formgrid",schema:o.editGridScheme,values:o.formGridValue,"onUpdate:values":t[11]||(t[11]=w=>o.formGridValue=w)},null,8,["schema","values"])]),_:1},8,["visible"]),e.createVNode(p,{teleport:"#modal",visible:o.isFormFilter,title:"Редагувати фільтри",onClose:t[18]||(t[18]=w=>o.isFormFilter=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",x_,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:t[16]||(t[16]=w=>o.isFormFilter=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:t[17]||(t[17]=(...w)=>s.editDashboardFilters&&s.editDashboardFilters(...w)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(y,{ref:"formFilter",schema:o.editFilterScheme,values:o.formFilterValue,"onUpdate:values":t[15]||(t[15]=w=>o.formFilterValue=w)},null,8,["schema","values"])]),_:1},8,["visible"])])}const b_=ve(h_,[["render",M_]]),w_={class:"flex-1 min-w-0 flex flex-col overflow-auto"},v_={class:"max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1"},V_={class:"relative z-10 shrink-0 mt-4 mb-6"},C_={class:"flex items-center text-sm text-gray-600"},z_={key:0,class:"flex items-center justify-between gap-4 mt-3"},B_={class:"min-w-0"},__={class:"text-2xl font-bold text-gray-900"},E_={key:0,class:"mt-1.5 text-sm text-gray-600"},q_={class:"flex items-center shrink-0"},S_={key:1,class:"grid flex-grow w-full grid-cols-12 gap-4 py-4 pr-[15px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},j_=ve({__name:"vs-editor",props:{prefix:String,customClass:{type:String,default:()=>"w-screen h-screen"},initialDashboardId:{type:String,default:""}},emits:["back"],setup(l,{emit:t}){const a=l;da(a.prefix||"/api");const n=t,o=e.inject("biClearDashboard",null),s=e.ref(a.initialDashboardId||""),i=e.ref(""),d=e.ref(null),c=e.ref(null),h=e.ref(null),p=async()=>{if(!s.value){d.value=null;return}try{const m=await je.get(`/bi-dashboard/${s.value}`);d.value=m}catch(m){console.error(m)}},y=e.computed(()=>{var m,f,u;return(u=Array.isArray((m=d.value)==null?void 0:m.widgets)?(f=d.value)==null?void 0:f.widgets:[])==null?void 0:u.find(g=>(g==null?void 0:g.name)===i.value)}),w=e.computed(()=>{var u,g,M,x,k;const f=[o?{label:"Дашборди",onClick:()=>{o(),n("back")}}:{label:"Дашборди",to:"/editor"}];if((u=d.value)!=null&&u.title||s.value){const v=((g=d.value)==null?void 0:g.title)||s.value||"Редактор",V=!!i.value;f.push({label:v,...V?{onClick:()=>{i.value=""}}:{}})}else f.push({label:"Редактор"});if(i.value&&y.value){const v=((x=(M=y.value)==null?void 0:M.data)==null?void 0:x.title)||((k=y.value)==null?void 0:k.title)||i.value;f.push({label:v})}return f});return e.watch(s,(m,f)=>{var g,M,x;f&&(i.value="");const u=new URL(window.top.location.href);m?((g=u==null?void 0:u.searchParams)==null||g.set("dashboard",m),(x=(M=window.top)==null?void 0:M.history)==null||x.pushState({},"",u),p()):(u==null||u.searchParams.delete("dashboard"),u==null||u.searchParams.delete("widget"))}),e.onMounted(()=>{var m,f;if(a.initialDashboardId)s.value=a.initialDashboardId;else{const u=new URLSearchParams(((f=(m=window.top)==null?void 0:m.location)==null?void 0:f.search)||""),g=u.get("dashboard");g&&(s.value=g),i.value=u.get("widget")||""}p()}),(m,f)=>{var u,g;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex w-full h-full",[l.customClass]])},[e.createElementVNode("div",w_,[e.createElementVNode("div",v_,[e.createElementVNode("div",V_,[e.createElementVNode("div",C_,[e.createVNode(lr,{items:w.value,compact:""},null,8,["items"])]),s.value&&d.value?(e.openBlock(),e.createElementBlock("div",z_,[e.createElementVNode("div",B_,[e.createElementVNode("h1",__,e.toDisplayString(d.value.title||s.value),1),d.value.description?(e.openBlock(),e.createElementBlock("p",E_,e.toDisplayString(d.value.description),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",q_,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",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",onClick:f[0]||(f[0]=M=>i.value="")},[e.createVNode(e.unref(Ua),{class:"w-4 h-4"}),f[6]||(f[6]=e.createTextVNode(" Закрити "))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(b_,{selected:s.value,"onUpdate:selected":f[1]||(f[1]=M=>s.value=M),dashboardData:d.value,columns:(u=d.value)==null?void 0:u.columns,selectedWidgetData:y.value,prefix:l.prefix,onUpdateEditor:p},null,8,["selected","dashboardData","columns","selectedWidgetData","prefix"]),e.createElementVNode("button",{type:"button",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",onClick:f[2]||(f[2]=M=>{var x,k;return(k=(x=h.value)==null?void 0:x.open)==null?void 0:k.call(x)})},f[7]||(f[7]=[e.createElementVNode("span",{class:"leading-none"},"+",-1),e.createTextVNode(" Створити віджет ")])),s.value?(e.openBlock(),e.createBlock(aB,{key:0,ref_key:"createWidgetRef",ref:h,inline:"",columns:(g=d.value)==null?void 0:g.columns,selectedDashboard:s.value,onUpdateData:p},null,8,["columns","selectedDashboard"])):e.createCommentVNode("",!0)],64))])])):e.createCommentVNode("",!0)]),i.value&&d.value?(e.openBlock(),e.createBlock(s_,{key:0,"selected-widget":i.value,"onUpdate:selectedWidget":f[3]||(f[3]=M=>i.value=M),"selected-widget-data":y.value,"current-widget-data":c.value,"selected-dashboard":s.value,"dashboard-widgets":d.value.widgets||[],onUpdateData:p},null,8,["selected-widget","selected-widget-data","current-widget-data","selected-dashboard","dashboard-widgets"])):(e.openBlock(),e.createElementBlock("div",S_,[d.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.panels,(M,x)=>{var k;return e.openBlock(),e.createElementBlock("div",{key:x,class:e.normalizeClass([`col-span-${M.col||12}`,"flex flex-col gap-[10px]"])},[(k=M.widgets)!=null&&k.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(M.widgets,v=>(e.openBlock(),e.createBlock(Ht,{onClick:V=>i.value=v,"onUpdate:currentWidgetData":f[4]||(f[4]=V=>c.value=V),key:v,dashboard:s.value,widget:v,selectedWidget:i.value,"dashboard-widgets":d.value.widgets,class:e.normalizeClass({"border border-blue-500":i.value===v})},null,8,["onClick","dashboard","widget","selectedWidget","dashboard-widgets","class"]))),128)):(e.openBlock(),e.createBlock(Ht,{key:1,onClick:v=>i.value=M.widget,"onUpdate:currentWidgetData":f[5]||(f[5]=v=>c.value=v),class:e.normalizeClass(["flex flex-col",{"border border-blue-500":i.value===M.widget}]),dashboard:s.value,widget:M.widget,selectedWidget:i.value,"dashboard-widgets":d.value.widgets},null,8,["onClick","class","dashboard","widget","selectedWidget","dashboard-widgets"]))],2)}),128)):(e.openBlock(),e.createBlock(ha,{key:0,class:"col-span-12"}))]))])])],2)}}},[["__scopeId","data-v-cc75be6a"]]),A_={class:"w-full h-screen"},D_=e.defineComponent({__name:"vs-editor-page",props:{prefix:{default:"/api"},dashboardId:{default:""}},emits:["back"],setup(l){const t=l,a=t.prefix,n=t.dashboardId;return(o,s)=>(e.openBlock(),e.createElementBlock("div",A_,[e.createVNode(j_,{customClass:"h-full w-full",prefix:e.unref(a),"initial-dashboard-id":e.unref(n),onBack:s[0]||(s[0]=i=>o.$emit("back"))},null,8,["prefix","initial-dashboard-id"])]))}}),N_={class:"relative group h-full"},L_={class:"flex items-start gap-3 flex-1 min-h-0"},H_={class:"p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0"},$_={class:"flex-1 min-w-0 flex flex-col min-h-0"},F_={class:"font-semibold text-gray-900 mb-1 truncate"},T_={key:0,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10"},P_={key:1,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10 invisible","aria-hidden":"true"},I_={key:2,class:"text-sm text-gray-400 mt-1 shrink-0"},R_=ve({__name:"dashboard-card",props:{title:String,description:String,modified:String,name:String,widgetCount:Number,reserveLines:Number,dashboardRouteName:String,onOpenEditor:Function,onOpenView:Function},setup(l){const t=l,a=Wa(),n=e.ref(!1);function o(){var i;t.dashboardRouteName&&(t.onOpenEditor?t.onOpenEditor(t.dashboardRouteName):(i=a==null?void 0:a.push)==null||i.call(a,{path:"/editor",query:{dashboard:t.dashboardRouteName}}))}function s(i){i.target.closest(".dashboard-card-menu")||(n.value=!1)}return e.onMounted(()=>document.addEventListener("click",s)),e.onUnmounted(()=>document.removeEventListener("click",s)),(i,d)=>(e.openBlock(),e.createElementBlock("div",N_,[e.createElementVNode("button",{type:"button",class:"w-full h-full bg-white border border-gray-200 rounded-lg p-6 hover:shadow-md hover:border-blue-200 transition-all text-left animate-fade-in flex flex-col",onClick:o},[e.createElementVNode("div",L_,[e.createElementVNode("div",H_,[e.createVNode(e.unref(R1),{size:24,class:"w-5 h-5 text-blue-600"})]),e.createElementVNode("div",$_,[e.createElementVNode("h3",F_,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("p",T_,e.toDisplayString(l.description),1)):(e.openBlock(),e.createElementBlock("p",P_,"   ")),l.widgetCount!=null?(e.openBlock(),e.createElementBlock("p",I_,e.toDisplayString(l.widgetCount)+" віджетів ",1)):e.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-cde0f33b"]]),O_=[{type:"Text",key:"name",label:"Назва",validators:["required"],original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"title",label:"Заголовок",validators:["required"],original:{type:"Text",ua:"Титул",col:8}},{type:"Text",key:"description",label:"Опис",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"words",label:"Ключові слова",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}];function U_(l){return!Array.isArray(l)||l.length===0?{}:l.reduce((t,a)=>{if(!a||a.key==null)return t;const{key:n,...o}=a;return t[n]=o,t},{})}const Z_={class:"flex-1 bg-gray-50"},W_={class:"max-w-7xl mx-auto px-6 py-8"},G_={class:"mb-6"},K_={class:"flex items-center justify-between mb-6"},J_={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Y_={class:"flex items-center space-x-4"},X_={class:"flex-1 relative"},Q_={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},eE=e.defineComponent({__name:"all-dashboards-page",props:{prefix:{}},setup(l){const t=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),a=U_(O_),n=e.ref([]),o=e.ref([]);Wa();const s=e.inject("biSetDashboard"),i=l,d=e.ref(null),c=e.ref(!1),h=e.ref({});da(i.prefix||"/api");async function p(){try{const g=await je.get("/bi-dashboard?type=db"),M=Array.isArray(g==null?void 0:g.rows)?g.rows:[];o.value=M,n.value=M.map(x=>({routeName:String(x.name??""),title:x.title??x.name??"Без назви",description:x.description??null,modified:"-",name:"-"}))}catch(g){console.error("Failed to load dashboards",g),o.value=[],n.value=[]}}async function y(){var M,x,k;const g=(x=(M=e.getCurrentInstance())==null?void 0:M.proxy)==null?void 0:x.$notify;try{await((k=d.value)==null?void 0:k.doValidation()),await je.post("/bi-dashboard",h.value),c.value=!1,h.value={},g==null||g({type:"success",title:"Успішно!",message:"Дашборд створено успішно"}),await p()}catch{g==null||g({type:"error",title:"Помилка!",message:"При спробі створити дашборд виникла помилка"})}}e.onMounted(p);const w=e.ref(1),m=()=>{const g=window.innerWidth;w.value=g>=1024?3:g>=768?2:1};e.onMounted(()=>{m(),window.addEventListener("resize",m)}),e.onUnmounted(()=>{window.removeEventListener("resize",m)});const f=g=>g?g.trim().length>70?2:1:0,u=g=>{const M=w.value||1,k=Math.floor(g/M)*M,v=k+M,V=n.value.slice(k,v);let C=0;for(const q of V){const H=f(q.description??null);if(H>C&&(C=H),C===2)break}return C};return e.ref("grid"),(g,M)=>(e.openBlock(),e.createElementBlock("div",Z_,[e.createElementVNode("div",W_,[e.createElementVNode("div",G_,[e.createElementVNode("div",K_,[M[5]||(M[5]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-3xl font-bold text-gray-900"},"Дашборди"),e.createElementVNode("p",{class:"mt-2 text-gray-600"}," Керуйте та переглядайте свої аналітичні дашборди ")],-1)),e.createElementVNode("button",{type:"button",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",onClick:M[0]||(M[0]=x=>c.value=!0)},[e.createVNode(e.unref(Oa),{size:24,class:"w-4 h-4"}),M[4]||(M[4]=e.createElementVNode("span",null,"Новий дашборд",-1))])]),e.createVNode($t,{teleport:"#modal",visible:c.value,title:"Створити дашборд",onClose:M[3]||(M[3]=x=>c.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",J_,[e.createElementVNode("button",{type:"button",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",onClick:M[2]||(M[2]=x=>c.value=!1)}," Скасувати "),e.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",onClick:y}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(e.unref(t),{ref_key:"createFormRef",ref:d,schema:e.unref(a),values:h.value,"onUpdate:values":M[1]||(M[1]=x=>h.value=x)},null,8,["schema","values"])]),_:1},8,["visible"]),e.createElementVNode("div",Y_,[e.createElementVNode("div",X_,[e.createVNode(e.unref(K1),{size:24,class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),M[6]||(M[6]=e.createElementVNode("input",{type:"text",placeholder:"Пошук дашбордів...",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",value:""},null,-1))])])]),e.createElementVNode("div",Q_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(x,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"cursor-pointer h-full"},[e.createVNode(R_,{title:x.title,description:x.description,modified:x.modified,name:x.name,reserveLines:u(k),"dashboard-route-name":x.routeName,"on-open-editor":e.unref(s),"on-open-view":e.unref(s)},null,8,["title","description","modified","name","reserveLines","dashboard-route-name","on-open-editor","on-open-view"])]))),128))])])]))}}),tE=e.defineComponent({__name:"editor-root-page",props:{prefix:{default:"/api"}},setup(l){const t=l,a=e.computed(()=>t.prefix),n=e.ref(""),o=Fz();e.onMounted(()=>{var d;const i=(d=o==null?void 0:o.query)==null?void 0:d.dashboard;i!=null&&typeof i=="string"&&(n.value=i.trim())});const s=e.computed(()=>n.value.length>0);return e.provide("biSetDashboard",i=>{n.value=i||""}),e.provide("biClearDashboard",()=>{n.value=""}),e.provide("biSelectedDashboardId",e.readonly(n)),(i,d)=>s.value?(e.openBlock(),e.createBlock(D_,{key:`editor-${n.value}`,prefix:a.value,"dashboard-id":n.value,onBack:d[0]||(d[0]=c=>n.value="")},null,8,["prefix","dashboard-id"])):(e.openBlock(),e.createBlock(eE,{key:0,prefix:a.value},null,8,["prefix"]))}});function We(l,t){const a=l&&typeof l=="object"&&"value"in l?l.value:l;if(a==null)return"";const n=Number(a);return Number.isNaN(n)?String(a):new Intl.NumberFormat("en",t??{notation:"compact"}).format(n)}function Ut(l){if(!(l!=null&&l.includes("T")))return l??"";const[t,a,n]=l.split("T")[0].split("-");return`${n}.${a}.${t}`}function aE(l){return Intl.NumberFormat("en").format(l??0)}class rE{static getTooltipOptions(t=!0){return{show:t,axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}}}}const lE={show_label:!1,show_legend:!1,label:null,legend:{position:null},colors:null,color:null,title:null};function nE(){const l="0123456789ABCDEF";let t="#";for(let a=0;a<6;a+=1)t+=l[Math.floor(Math.random()*16)];return t}function xt(l=lE){var a;const t={label:{show:l==null?void 0:l.show_label,formatter:(l==null?void 0:l.formatter)??(n=>We(n)),...(l==null?void 0:l.label)||{}},legend:{...(l==null?void 0:l.legend)||{},[((a=l==null?void 0:l.legend)==null?void 0:a.position)||"bottom"]:"0",show:(l==null?void 0:l.show_legend)||!1},barWidth:"70%",grid:{borderColor:"#e5e7eb"},title:{...(l==null?void 0:l.title)||{}}};return(l!=null&&l.colors||l!=null&&l.color)&&(t.color=(l==null?void 0:l.colors)||(l==null?void 0:l.color)||null),t}function zr(l){return{color:"#9ca3af",fontSize:10,fontFamily:"Inter, ui-sans-serif, system-ui",fontWeight:400,label:l==null?void 0:l.label,show:!0,formatter:(l==null?void 0:l.formatter)??(t=>We(t)),margin:(l==null?void 0:l.margin)??7,interval:(l==null?void 0:l.interval)??"auto",rotate:(l==null?void 0:l.rotate)??0}}const Br=["#d3c7e6","#bedae3","#f8e9cb","#ff8c8c","#c5d8be","#ffc6c6","#ffc39a","#fff7c5","#d8ffc0","#d4f7ff"];class fa{static getLabelOptions(t={}){return{show:(t==null?void 0:t.show_label)||(t==null?void 0:t.show)||!1,fontSize:"10",position:(t==null?void 0:t.position)||"inside",formatter:(t==null?void 0:t.formatter)||"{d}%",...t}}static getLegendOpions(t={}){return{...t,position:(t==null?void 0:t.position)||"bottom"}}}const Ct=typeof window<"u"?window.echarts:null,Pe={props:["source","style","widget","dashboard","title","currentWidget","widgetData","prefix"],data(){return{sourceData:null,styleData:null,widgetName:"",dimensions:[],dashboardName:"",titleCharts:"",widgetInstance:null}},mounted(){window.addEventListener("resize",this.handleResize),window.addEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.addEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},unmounted(){window.removeEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.removeEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},watch:{sourceData:{async handler(){setTimeout(()=>{this==null||this.onChangedData()},0)}}},methods:{checkCustomStyleEvent(l){this.changeOptionsByName(l.chartId,l.options)},checkCustomEvent({filterUrl:l}){this.getDataFromURL(l)},handleResize(){this.widgetInstance&&this.widgetInstance.resize()},async getDataFromURL(l){var t;try{const a=await je.get(l);this.sourceData=(a==null?void 0:a.source)||[],this.$emit("update:widgetData",a),this.dimensions=Object.keys(((t=this.sourceData)==null?void 0:t[0])||{}),this.titleCharts=this.style?this.style:(a==null?void 0:a.title)||"",this.styleData=(a==null?void 0:a.style)||{}}catch(a){const n={message:"Дані не знайдено",title:"Помилка!",type:"error",status:400,id:this.widgetName};(a==null?void 0:a.status)=="404"&&(n.status=404,n.message="Дані не знайдено"),(a==null?void 0:a.status)=="400"&&(n.message="Перевірте налаштування або зверніться до адміністратора"),(a==null?void 0:a.status)=="500"&&(n.message="Сталася помилка сервера"),this.$emit("update:widgetData",n)}},getValues(){return this.sourceData.map(l=>{var t;return parseFloat(l[(t=this.columns)==null?void 0:t[1]])})},formatDate(l){const t=new Date(l);if(isNaN(t))return l;const a=String(t.getDate()).padStart(2,"0"),o=["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"][t.getMonth()],s=t.getFullYear();return`${a} ${o} ${s}`},async getData(){var l;try{if(this.source)this.sourceData=[...this.source],this.styleData=this.style,this.titleCharts=this.title,this.dimensions=Object.keys(((l=this.sourceData)==null?void 0:l[0])||{});else{this.widgetName=this.widget,this.dashboardName=this.dashboard;const t=this.dashboardName?`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}`:`${this.prefix||""}/bi-data?&widget=${this.widgetName}`;await this.getDataFromURL(t)}}catch(t){console.error(t)}},async initChart(l,t,a){var n,o,s,i,d,c,h;this.widgetInstance&&this.widgetInstance.clear();try{const p=this.$refs.chart,y=Ct==null?void 0:Ct.init(p);if(!y)return;const w={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"transparent",shadowColor:"transparent",padding:[0,0,0,0],borderWidth:0,formatter:m=>{var M;const f=(M=m[0])==null?void 0:M.axisValue;let g=`
8269
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:a,tokens:n}){const o=this.parser.parseInline(n),s=hr(t);if(s===null)return o;t=s;let i='<a href="'+t+'"';return a&&(i+=' title="'+a+'"'),i+=">"+o+"</a>",i}image({href:t,title:a,text:n}){const o=hr(t);if(o===null)return n;t=o;let s=`<img src="${t}" alt="${n}"`;return a&&(s+=` title="${a}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}}class a1{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}}class Ue{constructor(t){Be(this,"options");Be(this,"renderer");Be(this,"textRenderer");this.options=t||ft,this.options.renderer=this.options.renderer||new ma,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new a1}static parse(t,a){return new Ue(a).parse(t)}static parseInline(t,a){return new Ue(a).parseInline(t)}parse(t,a=!0){let n="";for(let o=0;o<t.length;o++){const s=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const d=s,c=this.options.extensions.renderers[d.type].call({parser:this},d);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=c||"";continue}}const i=s;switch(i.type){case"space":{n+=this.renderer.space(i);continue}case"hr":{n+=this.renderer.hr(i);continue}case"heading":{n+=this.renderer.heading(i);continue}case"code":{n+=this.renderer.code(i);continue}case"table":{n+=this.renderer.table(i);continue}case"blockquote":{n+=this.renderer.blockquote(i);continue}case"list":{n+=this.renderer.list(i);continue}case"html":{n+=this.renderer.html(i);continue}case"paragraph":{n+=this.renderer.paragraph(i);continue}case"text":{let d=i,c=this.renderer.text(d);for(;o+1<t.length&&t[o+1].type==="text";)d=t[++o],c+=`
8270
+ `+this.renderer.text(d);a?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c}]}):n+=c;continue}default:{const d='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,a){a=a||this.renderer;let n="";for(let o=0;o<t.length;o++){const s=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const d=this.options.extensions.renderers[s.type].call({parser:this},s);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=d||"";continue}}const i=s;switch(i.type){case"escape":{n+=a.text(i);break}case"html":{n+=a.html(i);break}case"link":{n+=a.link(i);break}case"image":{n+=a.image(i);break}case"strong":{n+=a.strong(i);break}case"em":{n+=a.em(i);break}case"codespan":{n+=a.codespan(i);break}case"br":{n+=a.br(i);break}case"del":{n+=a.del(i);break}case"text":{n+=a.text(i);break}default:{const d='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}}class Ot{constructor(t){Be(this,"options");Be(this,"block");this.options=t||ft}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Oe.lex:Oe.lexInline}provideParser(){return this.block?Ue.parse:Ue.parseInline}}Be(Ot,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));class LB{constructor(...t){Be(this,"defaults",Ka());Be(this,"options",this.setOptions);Be(this,"parse",this.parseMarkdown(!0));Be(this,"parseInline",this.parseMarkdown(!1));Be(this,"Parser",Ue);Be(this,"Renderer",ma);Be(this,"TextRenderer",a1);Be(this,"Lexer",Oe);Be(this,"Tokenizer",pa);Be(this,"Hooks",Ot);this.use(...t)}walkTokens(t,a){var o,s;let n=[];for(const i of t)switch(n=n.concat(a.call(this,i)),i.type){case"table":{const d=i;for(const c of d.header)n=n.concat(this.walkTokens(c.tokens,a));for(const c of d.rows)for(const h of c)n=n.concat(this.walkTokens(h.tokens,a));break}case"list":{const d=i;n=n.concat(this.walkTokens(d.items,a));break}default:{const d=i;(s=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&s[d.type]?this.defaults.extensions.childTokens[d.type].forEach(c=>{const h=d[c].flat(1/0);n=n.concat(this.walkTokens(h,a))}):d.tokens&&(n=n.concat(this.walkTokens(d.tokens,a)))}}return n}use(...t){const a=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const o={...n};if(o.async=this.defaults.async||o.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const i=a.renderers[s.name];i?a.renderers[s.name]=function(...d){let c=s.renderer.apply(this,d);return c===!1&&(c=i.apply(this,d)),c}:a.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=a[s.level];i?i.unshift(s.tokenizer):a[s.level]=[s.tokenizer],s.start&&(s.level==="block"?a.startBlock?a.startBlock.push(s.start):a.startBlock=[s.start]:s.level==="inline"&&(a.startInline?a.startInline.push(s.start):a.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(a.childTokens[s.name]=s.childTokens)}),o.extensions=a),n.renderer){const s=this.defaults.renderer||new ma(this.defaults);for(const i in n.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const d=i,c=n.renderer[d],h=s[d];s[d]=(...p)=>{let y=c.apply(s,p);return y===!1&&(y=h.apply(s,p)),y||""}}o.renderer=s}if(n.tokenizer){const s=this.defaults.tokenizer||new pa(this.defaults);for(const i in n.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const d=i,c=n.tokenizer[d],h=s[d];s[d]=(...p)=>{let y=c.apply(s,p);return y===!1&&(y=h.apply(s,p)),y}}o.tokenizer=s}if(n.hooks){const s=this.defaults.hooks||new Ot;for(const i in n.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const d=i,c=n.hooks[d],h=s[d];Ot.passThroughHooks.has(i)?s[d]=p=>{if(this.defaults.async)return Promise.resolve(c.call(s,p)).then(w=>h.call(s,w));const y=c.call(s,p);return h.call(s,y)}:s[d]=(...p)=>{let y=c.apply(s,p);return y===!1&&(y=h.apply(s,p)),y}}o.hooks=s}if(n.walkTokens){const s=this.defaults.walkTokens,i=n.walkTokens;o.walkTokens=function(d){let c=[];return c.push(i.call(this,d)),s&&(c=c.concat(s.call(this,d))),c}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,a){return Oe.lex(t,a??this.defaults)}parser(t,a){return Ue.parse(t,a??this.defaults)}parseMarkdown(t){return(n,o)=>{const s={...o},i={...this.defaults,...s},d=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return d(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return d(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return d(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const c=i.hooks?i.hooks.provideLexer():t?Oe.lex:Oe.lexInline,h=i.hooks?i.hooks.provideParser():t?Ue.parse:Ue.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then(p=>c(p,i)).then(p=>i.hooks?i.hooks.processAllTokens(p):p).then(p=>i.walkTokens?Promise.all(this.walkTokens(p,i.walkTokens)).then(()=>p):p).then(p=>h(p,i)).then(p=>i.hooks?i.hooks.postprocess(p):p).catch(d);try{i.hooks&&(n=i.hooks.preprocess(n));let p=c(n,i);i.hooks&&(p=i.hooks.processAllTokens(p)),i.walkTokens&&this.walkTokens(p,i.walkTokens);let y=h(p,i);return i.hooks&&(y=i.hooks.postprocess(y)),y}catch(p){return d(p)}}}onError(t,a){return n=>{if(n.message+=`
8271
+ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+Re(n.message+"",!0)+"</pre>";return a?Promise.resolve(o):o}if(a)return Promise.reject(n);throw n}}}const gt=new LB;function we(l,t){return gt.parse(l,t)}we.options=we.setOptions=function(l){return gt.setOptions(l),we.defaults=gt.defaults,sr(we.defaults),we},we.getDefaults=Ka,we.defaults=ft,we.use=function(...l){return gt.use(...l),we.defaults=gt.defaults,sr(we.defaults),we},we.walkTokens=function(l,t){return gt.walkTokens(l,t)},we.parseInline=gt.parseInline,we.Parser=Ue,we.parser=Ue.parse,we.Renderer=ma,we.TextRenderer=a1,we.Lexer=Oe,we.lexer=Oe.lex,we.Tokenizer=pa,we.Hooks=Ot,we.parse=we,we.options,we.setOptions,we.use,we.walkTokens,we.parseInline,Ue.parse,Oe.lex;const HB={class:"space-y-4"},$B={__name:"vs-editor-form-data",props:{widgetName:{type:String},dashboardId:{type:String,default:""},data:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(l,{expose:t,emit:a}){var k,v,V,C,q,L,ee,K,H,B,T,N,U,$,Q,Y,ie,he,_e,$e,X,oe,ke,pe,fe,F,ne,A,P,W,le,de;const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),{$notify:o}=e.getCurrentInstance().proxy,s=a,i=l,d=e.ref(null),c=e.ref([]),h=e.computed(()=>{const G=i.columns??[];return G.length?G:c.value}),p=e.computed(()=>i.dashboardId||d.value);async function y(){const G=p.value;if(!(h.value.length||!G||!i.widgetName))try{const S=await Se.get(`/bi-data?dashboard=${G}&widget=${i.widgetName}`);Array.isArray(S==null?void 0:S.columns)&&S.columns.length&&(c.value=S.columns)}catch{}}const w=G=>(G==null?void 0:G.name)!=null?{id:G.name,text:G.title||G.name}:null,m=e.computed(()=>(h.value??[]).filter(G=>(G==null?void 0:G.type)=="text"||(G==null?void 0:G.type)==="date"||(G==null?void 0:G.type)==="timestamp without time zone"||(G==null?void 0:G.type)==="boolean"||(G==null?void 0:G.type)==="integer").map(w).filter(Boolean)),f=e.computed(()=>`${i.widgetName}-${m.value.length}-${(h.value??[]).length}`),u=e.computed(()=>({text:{type:"Text",label:"Text",conditions:["type","==","text"]},x:{type:"select",label:"X Axis",style:{size:"xs"},conditions:["type","not_in",["text","table","map"]],options:[...m.value]},cls:{label:"X Axis classifier",type:"text",conditions:["type","not_in",["text","table","map","cluster"]]},y_type:{label:"Y type",type:"select",options:[{id:"columns",text:"columns"},{id:"function",text:"function"}],conditions:["type","not_in",["text","table","map","number","cluster"]]},tableSQL:{label:"tableSQL",type:"text",hidden:!0},metric:{type:"select",label:"Y Axis",conditions:[["type","not_in",["text","table","map","cluster"]],["y_type","!=","function"]],options:[{id:"count",text:"count"},...h.value.filter(G=>(G==null?void 0:G.type)==="numeric"||(G==null?void 0:G.type)==="double precision").map(w).filter(Boolean)]},fx:{type:"text",label:"Function",conditions:[["y_type","==","function"]]},query:{label:"Query",type:"text",conditions:["type","not_in",["text","table","map","number"]]},groupby:{type:"select",label:"Groupby",view:"buttons",style:{size:"xs"},options:[{id:"null",text:"null"},...h.value.filter(G=>(G==null?void 0:G.type)=="text"||(G==null?void 0:G.type)==="boolean"||(G==null?void 0:G.type)==="integer").map(w).filter(Boolean)],conditions:["type","==","bar"]},columns:{type:"checkbox",label:"Columns",style:{size:"xs"},options:(h.value??[]).map(w).filter(Boolean),conditions:["type","in",["table","map"]]},granularity:{type:"radio",label:"Granularity",options:[{id:"year",text:"year"},{id:"quarter",text:"quarter"},{id:"month",text:"month"},{id:"week",text:"week"}],conditions:["x.type","==","date"]},type:{type:"Text",hidden:!0}})),g=e.ref({x:((v=(k=i.data)==null?void 0:k.data)==null?void 0:v.x)||((V=i.data)==null?void 0:V.x)||null,metric:((q=(C=i.data)==null?void 0:C.data)==null?void 0:q.metric)||((L=i.data)==null?void 0:L.metric)||null,columns:((K=(ee=i.data)==null?void 0:ee.data)==null?void 0:K.columns)||((H=i.data)==null?void 0:H.columns)||null,granularity:((T=(B=i.data)==null?void 0:B.data)==null?void 0:T.granularity)||((N=i.data)==null?void 0:N.granularity)||null,type:(($=(U=i.data)==null?void 0:U.data)==null?void 0:$.type)||((Q=i.data)==null?void 0:Q.type)||null,groupby:((ie=(Y=i.data)==null?void 0:Y.data)==null?void 0:ie.groupby)||i.data.groupby||null,fx:((_e=(he=i.data)==null?void 0:he.data)==null?void 0:_e.fx)||(($e=i.data)==null?void 0:$e.fx)||null,query:((oe=(X=i.data)==null?void 0:X.data)==null?void 0:oe.query)||((ke=i.data)==null?void 0:ke.query)||null,y_type:((fe=(pe=i.data)==null?void 0:pe.data)==null?void 0:fe.y_type)||((F=i.data)==null?void 0:F.y_type)||null,tableSQL:((A=(ne=i.data)==null?void 0:ne.data)==null?void 0:A.tableSQL)||((P=i.data)==null?void 0:P.tableSQL)||null,cls:((le=(W=i.data)==null?void 0:W.data)==null?void 0:le.cls)||((de=i.data)==null?void 0:de.cls)||null}),M=async()=>{try{await Se.put(`/bi-dashboard/${p.value}/${i.widgetName}`,{data:g.value});let G=`/bi-data?dashboard=${p.value}&widget=${i.widgetName}`;Object.entries(g.value).forEach(([R,Z])=>{G+=`&${R}=${Z}`});const S=new CustomEvent(`update-data-${i.widgetName}`);S.filterUrl=G,window.dispatchEvent(S),s("update-dashboard"),o({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{o({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}},x=async()=>{try{let G=`/bi-data?dashboard=${p.value}&widget=${i.widgetName}`;Object.entries(g.value).forEach(([R,Z])=>{G+=`&${R}=${Z}`});const S=new CustomEvent(`update-data-${i.widgetName}`);S.filterUrl=G,window.dispatchEvent(S),s("update-dashboard")}catch{await o({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.watch(g,()=>{x()},{deep:!0}),e.onMounted(()=>{const G=new URLSearchParams(window.top.location.search);d.value=G.get("dashboard"),y()}),e.watch(()=>[i.widgetName,i.dashboardId,d.value],()=>{c.value=[],y()},{immediate:!0}),t({requestUpdateWidget:M}),(G,S)=>(e.openBlock(),e.createElementBlock("div",HB,[(e.openBlock(),e.createBlock(e.unref(n),{key:f.value,schema:u.value,values:g.value,"onUpdate:values":S[0]||(S[0]=R=>g.value=R)},null,8,["schema","values"]))]))}},FB={class:"space-y-4"},TB={__name:"vs-editor-form-yaml",props:{yamlValue:{type:null,default:()=>""},widgetName:{type:String},data:{type:Object}},setup(l,{expose:t}){const a=typeof window<"u"?window.echarts:null,n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it).then(y=>y.VsInputMonaco)),o=e.ref(null),{$notify:s}=e.getCurrentInstance().proxy,i=l,d=(y,{dimensions:w,source:m})=>{const f=y.getOption(),{data:u,...g}=(f==null?void 0:f.series)[0],[,...M]=w||[],x=M.map((k,v)=>({...(f==null?void 0:f.series[v])||{},data:m.map(V=>V[v+1]),name:k}));y==null||y.setOption({...f||{},dataset:{dimensions:w,source:m},series:x,xAxis:{type:"category"},yAxis:{}},!0)},c=y=>{const w=document.getElementById(y);if(!w)return null;const m=a==null?void 0:a.getInstanceByDom(w);return m||null},h=e.ref(i.yamlValue),p=async()=>{try{await Se.put(`/bi-dashboard/${o.value}/${i.widgetName}`,{yml:h.value});const y=c(i.widgetName);if(y){const w=await Se.get(`/bi-data?dashboard=${o.value}&widget=${i.widgetName}`);d(y,w)}s({type:"success",title:"Успішно!",message:"Дані успішно оновлено"})}catch{s({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.onMounted(()=>{const y=new URLSearchParams(window.top.location.search);o.value=y.get("dashboard")}),t({requestUpdateWidget:p}),(y,w)=>(e.openBlock(),e.createElementBlock("div",FB,[e.createVNode(e.unref(n),{modelValue:h.value,"onUpdate:modelValue":w[0]||(w[0]=m=>h.value=m),syntax:"yaml",theme:"vs-light",height:400,minimap:!1},null,8,["modelValue"])]))}},PB={class:"pt-[10px]"},wr={"vs-editor-form-style":lB,"vs-editor-form-data":$B,"vs-editor-form-yaml":TB,"vs-editor-form-controls":{__name:"vs-editor-form-controls",props:{widgetName:{type:String},controls:{type:Object,default:()=>{}},columns:{type:Array,default:()=>[]}},emits:["update-dashboard"],setup(l,{emit:t}){var p;const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),{$notify:n}=e.getCurrentInstance().proxy,o=t,s=l,i=e.ref(null),d={granularity:{ua:"Granularity",type:"checkbox",options:["week","month","quarter","year"]},export:{ua:"Export",type:"Switcher"},groupby:{ua:"Groupby",type:"checkbox",options:(p=s.columns)==null?void 0:p.map(({name:y})=>y)}},c=e.ref(s.controls||{}),h=async()=>{try{await Se.put(`/bi-dashboard/${i.value}/${s.widgetName}`,{controls:c.value}),await n({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),staticTypes!=null&&staticTypes.includes(c.value.type)&&o("update-dashboard")}catch{await n({type:"error",title:"Помилка!",message:"При спробі оновити данні сталася помилка"})}};return e.onMounted(()=>{const y=new URLSearchParams(window.top.location.search);i.value=y.get("dashboard")}),(y,w)=>{const m=e.resolveComponent("VsButton");return e.openBlock(),e.createElementBlock("div",PB,[e.createVNode(m,{class:"ml-[10px] mb-[10px]",type:"plain",onClick:h},{default:e.withCtx(()=>w[1]||(w[1]=[e.createTextVNode(" Зберегти ")])),_:1}),e.createVNode(e.unref(a),{schema:d,values:c.value,"onUpdate:values":w[0]||(w[0]=f=>c.value=f)},null,8,["values"])])}}}},IB={key:0,class:"p-4 text-sm text-amber-700 bg-amber-50 rounded-lg"},vr={__name:"editor-tab-error-boundary",props:{tabComponent:{type:Object,default:null},tabKey:{type:[String,Number],default:""}},emits:["update-dashboard"],setup(l,{expose:t}){const a=l,n=e.ref(null);function o(){var i,d;(d=(i=n.value)==null?void 0:i.requestUpdateWidget)==null||d.call(i)}t({save:o});const s=e.ref(!1);return e.onErrorCaptured((i,d,c)=>(console.error("Editor tab error:",i,c),s.value=!0,!1)),e.watch(()=>a.tabComponent,()=>{s.value=!1},{immediate:!0}),(i,d)=>s.value?(e.openBlock(),e.createElementBlock("div",IB," Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.tabComponent),e.mergeProps({ref_key:"tabRef",ref:n,key:l.tabKey||"tab"},i.$attrs,{onUpdateDashboard:d[0]||(d[0]=c=>i.$emit("update-dashboard"))}),null,16))}},RB={class:"h-full flex flex-col bg-white shrink-0 !w-[400px] border rounded-xl overflow-hidden border-gray-200"},OB={key:0,class:"flex flex-col min-h-0 flex-1"},UB={class:"flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]"},ZB={class:"flex items-center gap-6 min-w-0"},WB=["onClick"],GB={key:0,class:"absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 rounded-full"},KB={class:"flex items-center gap-1 ml-auto shrink-0"},JB={key:1,class:"flex-1 min-h-0 overflow-auto px-4 py-4 [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},YB={key:0},XB={key:1},QB={class:"p-4"},eE={class:"flex justify-end mt-4 gap-x-3"},tE={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},aE={__name:"vs-editor-forms",props:e.mergeModels({selectedWidgetData:{type:Object,required:!1,default:null},selectedDashboard:{type:String,default:()=>""},currentWidgetData:{type:String,default:()=>""}},{selectedWidget:{},selectedWidgetModifiers:{}}),emits:e.mergeModels(["update-data"],["update:selectedWidget"]),setup(l,{emit:t}){var k,v;const a=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),n=(v=(k=e.getCurrentInstance())==null?void 0:k.proxy)==null?void 0:v.$notify,o=t,s=e.ref(null),i=l,d=e.ref(!1),c=e.ref(!0),h=e.ref(!1),p=e.ref({}),y=e.useModel(l,"selectedWidget"),w=["table","text","number","stat","progress","listbar","map","pivot"],m=e.ref("data"),f=async()=>{try{await Se.delete(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`);const V=new URL(window.top.location.href);V.searchParams.set("dashboard",i.selectedDashboard),V.searchParams.delete("widget"),window.top.history.pushState({},"",V),o("update-data"),d.value=!1,n({type:"success",title:"Успішно!",message:"Віджет успішно видалено"})}catch(V){console.error(V),n({type:"error",title:"Помилка!",message:"При спробі видалити віджет виникла помилка"})}},u=e.computed(()=>{const V=[{id:"data",label:"Дані"},{id:"style",label:"Стилі"},{id:"yaml",label:"{ }"}];return V==null?void 0:V.filter(C=>{var q,L,ee;return C.id==="style"?!(w!=null&&w.includes(((q=i.selectedWidgetData)==null?void 0:q.type)||((ee=(L=i.selectedWidgetData)==null?void 0:L.data)==null?void 0:ee.type))):!0})}),g=()=>{var V,C,q,L,ee,K,H,B,T;p.value={title:(V=i.selectedWidgetData)==null?void 0:V.title,type:(C=i.selectedWidgetData)==null?void 0:C.type,table:(q=i.selectedWidgetData)==null?void 0:q.table_name,query:(ee=(L=i.selectedWidgetData)==null?void 0:L.data)==null?void 0:ee.query,x:(H=(K=i.selectedWidgetData)==null?void 0:K.data)==null?void 0:H.x,cls:(T=(B=i.selectedWidgetData)==null?void 0:B.data)==null?void 0:T.cls},h.value=!0},M=async()=>{try{await Se.put(`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`,p.value),n({type:"success",title:"Успішно!",message:"Дані успішно змінено"}),await o("update-data"),h.value=!1}catch{n({type:"error",title:"Помилка!",message:"При спробі внести зміни виникла помилка"})}};e.watch(y,V=>{c.value=!1;const C=new URL(window.top.location.href);V?(C.searchParams.set("widget",V),window.top.history.pushState({},"",C)):(C.searchParams.delete("widget"),window.top.history.pushState({},"",C)),setTimeout(()=>c.value=!0)});const x={title:{type:"text",ua:"Заголовок",placeholder:"Заголовок",validators:["required"]},type:{type:"radio",view:"buttons",validators:["required"],slots:{label:'<div style="width: 120px; height:160px" class="flex gap-[12px] flex-col"><img class="block" style="height: calc(100% - 40px)" :src="`https://cdn.softpro.ua/data/icons/bi/${id}.png`"/><span class="font-[500]">{{ label }}</span></div>'},options:[{label:"Bar",id:"bar"},{label:"Funnel",id:"funnel"},{label:"Line",id:"line"},{label:"List bar",id:"listbar"},{label:"Number",id:"number"},{label:"Pie",id:"pie"},{label:"Donut",id:"donut"},{label:"Pivot",id:"pivot"},{label:"Table",id:"table"},{label:"Progress",id:"progress"},{label:"Stat",id:"stat"},{label:"Text",id:"text"},{label:"Map",id:"map"}]},table:{type:"text",ua:"Таблиця",placeholder:"Таблиця"},query:{type:"Text",ua:"Query",placeholder:"Query"},x:{type:"Text",ua:"X Axis",placeholder:"X Axis"},cls:{type:"Text",ua:"Cls",placeholder:"Cls"}};return(V,C)=>{var L,ee,K,H,B,T,N,U,$,Q,Y;const q=e.resolveComponent("VsPopover");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",RB,[l.selectedWidgetData?(e.openBlock(),e.createElementBlock("div",OB,[e.createElementVNode("div",UB,[e.createElementVNode("nav",ZB,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,ie=>(e.openBlock(),e.createElementBlock("button",{key:ie.id,type:"button",class:e.normalizeClass(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap",m.value===ie.id?"text-blue-600":"text-gray-600 hover:text-gray-900"]),onClick:he=>m.value=ie.id},[e.createTextVNode(e.toDisplayString(ie.label)+" ",1),m.value===ie.id?(e.openBlock(),e.createElementBlock("span",GB)):e.createCommentVNode("",!0)],10,WB))),128))]),e.createElementVNode("div",KB,[e.createVNode(q,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{type:"button",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",title:"Зберегти",onClick:C[0]||(C[0]=ie=>{var he,_e;return(_e=(he=s.value)==null?void 0:he.save)==null?void 0:_e.call(he)})},[e.createVNode(e.unref(G1),{class:"h-4 w-4"})])]),default:e.withCtx(()=>[C[9]||(C[9]=e.createTextVNode(" Зберегти "))]),_:1}),e.createVNode(q,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{type:"button",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",onClick:g},[e.createVNode(or,{class:"h-4 w-4"})])]),default:e.withCtx(()=>[C[10]||(C[10]=e.createTextVNode(" Редагувати віджет "))]),_:1}),e.createVNode(q,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{type:"button",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",onClick:C[1]||(C[1]=ie=>d.value=!0)},[e.createVNode(e.unref(nr),{class:"h-4 w-4"})])]),default:e.withCtx(()=>[C[11]||(C[11]=e.createTextVNode(" Видалити віджет "))]),_:1})])]),(L=l.currentWidgetData)!=null&&L.status?(e.openBlock(),e.createBlock(ha,{key:0,title:(ee=l.currentWidgetData)==null?void 0:ee.title,text:(K=l.currentWidgetData)==null?void 0:K.message},null,8,["title","text"])):(e.openBlock(),e.createElementBlock("div",JB,[c.value&&l.currentWidgetData?(e.openBlock(),e.createElementBlock("div",YB,[e.createVNode(vr,{ref_key:"tabPanelRef",ref:s,"tab-key":m.value,"tab-component":e.unref(wr)["vs-editor-form-"+m.value],widgetName:(H=l.selectedWidgetData)==null?void 0:H.name,dashboardId:l.selectedDashboard,yamlValue:((B=l.selectedWidgetData)==null?void 0:B.yml)||"",data:l.selectedWidgetData,controls:(T=l.selectedWidgetData)==null?void 0:T.controls,columns:(N=l.currentWidgetData)==null?void 0:N.columns,onUpdateDashboard:C[2]||(C[2]=ie=>V.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","dashboardId","yamlValue","data","controls","columns"])])):(e.openBlock(),e.createElementBlock("div",XB,[e.createVNode(vr,{ref_key:"tabPanelRef",ref:s,"tab-key":m.value,"tab-component":e.unref(wr)["vs-editor-form-"+m.value],widgetName:(U=l.selectedWidgetData)==null?void 0:U.name,dashboardId:l.selectedDashboard,yamlValue:(($=l.selectedWidgetData)==null?void 0:$.yml)||"",data:l.selectedWidgetData,controls:(Q=l.selectedWidgetData)==null?void 0:Q.controls,columns:(Y=l.currentWidgetData)==null?void 0:Y.columns,onUpdateDashboard:C[3]||(C[3]=ie=>V.$emit("update-data"))},null,8,["tab-key","tab-component","widgetName","dashboardId","yamlValue","data","controls","columns"])])),e.createVNode($t,{teleport:"#modal",visible:d.value,title:"Ви впевнені?",onClose:C[5]||(C[5]=ie=>d.value=!1)},{default:e.withCtx(()=>[e.createElementVNode("div",QB,[C[12]||(C[12]=e.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей віджет? ",-1)),e.createElementVNode("div",eE,[e.createElementVNode("button",{type:"button",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",onClick:C[4]||(C[4]=ie=>d.value=!1)}," Скасувати "),e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:f}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"])]))])):(e.openBlock(),e.createBlock(ha,{key:1,title:"Оберіть один з віджетів",text:"",class:"p-4"}))]),e.createVNode($t,{teleport:"#modal",visible:h.value,title:"Редагувати віджет",onClose:C[8]||(C[8]=ie=>h.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",tE,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:C[7]||(C[7]=ie=>h.value=!1),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"}," Скасувати "),e.createElementVNode("button",{onClick:M,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[x?(e.openBlock(),e.createBlock(e.unref(a),{key:0,schema:x,values:p.value,"onUpdate:values":C[6]||(C[6]=ie=>p.value=ie)},null,8,["values"])):e.createCommentVNode("",!0)]),_:1},8,["visible"])],64)}}},rE={class:"overflow-hidden flex flex-col min-h-[480px]"},lE={class:"flex-1 flex min-h-0 gap-4"},nE={class:"flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50"},oE={class:"w-[400px] shrink-0 flex flex-col"},sE={__name:"vs-widget-editor-panel",props:{selectedWidget:{type:String,default:""},selectedWidgetData:{type:Object,default:null},currentWidgetData:{type:Object,default:null},selectedDashboard:{type:String,default:""},dashboardWidgets:{type:Array,default:()=>[]}},emits:["update:selectedWidget","update-data"],setup(l,{emit:t}){const a=l,n=t,o=e.computed({get:()=>a.selectedWidget,set:s=>n("update:selectedWidget",s)});return(s,i)=>(e.openBlock(),e.createElementBlock("div",rE,[e.createElementVNode("div",lE,[e.createElementVNode("div",nE,[e.createVNode(Ht,{dashboard:l.selectedDashboard,widget:l.selectedWidget,"selected-widget":l.selectedWidget,"dashboard-widgets":l.dashboardWidgets,"filter-u-rl":void 0,class:"max-h-full"},null,8,["dashboard","widget","selected-widget","dashboard-widgets"])]),e.createElementVNode("div",oE,[e.createVNode(aE,{selectedWidget:o.value,"onUpdate:selectedWidget":i[0]||(i[0]=d=>o.value=d),selectedWidgetData:l.selectedWidgetData,currentWidgetData:l.currentWidgetData,selectedDashboard:l.selectedDashboard,onUpdateData:i[1]||(i[1]=d=>s.$emit("update-data"))},null,8,["selectedWidget","selectedWidgetData","currentWidgetData","selectedDashboard"])])])]))}},Vr={__name:"icon-grid",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(O1),e.mergeProps(t.$attrs,{size:24}),null,16))}},iE={__name:"icon-filter",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Ra),e.mergeProps(t.$attrs,{size:24}),null,16))}},Cr={__name:"icon-table",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(J1),e.mergeProps(t.$attrs,{size:24}),null,16))}},dE={__name:"icon-more",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(T1),e.mergeProps(t.$attrs,{size:24}),null,16))}},cE=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),hE={components:{VsModal:$t,VForm:cE,deleteIcon:nr,editIcon:or,IconGrid:Vr,IconMore:dE,IconFilter:iE,IconTable:Cr},watch:{dashboardData:{handler(l){var a,n;if(this.formEditValue={title:l==null?void 0:l.title,description:l==null?void 0:l.description,table_name:l==null?void 0:l.table_name,db:l==null?void 0:l.db,public:l==null?void 0:l.public,words:l==null?void 0:l.words},!((a=l==null?void 0:l.panels)!=null&&a.length)){this.formGridValue={panels:[]},this.formFilterValue={filters:(l==null?void 0:l.filters)||null};return}const t=(n=l==null?void 0:l.panels)==null?void 0:n.map(o=>{var d,c;const{title:s="",type:i=""}=((c=(d=l==null?void 0:l.widgets)==null?void 0:d.find(h=>(h==null?void 0:h.name)===(o==null?void 0:o.widget)))==null?void 0:c.data)||{};return{title:s,type:i,...o}});this.formGridValue={panels:t},this.formFilterValue={filters:(l==null?void 0:l.filters)||null}},immediate:!0}},data(){return{isDeleteConfirm:!1,isFormEdit:!1,isFormGrid:!1,isFormFilter:!1,isVisibleTableColumns:!1,formEditValue:{},formGridValue:{},formFilterValue:{},editDashboardScheme:[{type:"Text",key:"title",label:"Заголовок",validators:["required"]},{type:"Text",key:"description",label:"Опис"},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці"},{type:"Text",key:"words",label:"Ключові слова"},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}],editGridScheme:[{type:"DataTable",ua:"Панелі",key:"panels",editable:!1,addition:!1,colModel:[{name:"title",ua:"Назва",type:"Text",key:"col"},{name:"type",ua:"Тип",type:"Text",key:"col",disabled:!0},{name:"widget",type:"Text",ua:"Назва",key:"widget",hiddenCol:!0},{name:"col",ua:"Кількість стовпчиків",type:"Text",key:"col"}]}],editFilterScheme:[{name:"filters",type:"DataTable",colModel:[{ua:"Підпис",type:"Text",key:"label"},{ua:"Тип",type:"Text",key:"type"}]}]}},props:{selected:{type:String,default:()=>""},dashboardData:{type:Object,default:()=>{}},selectedWidgetData:{type:Object,default:()=>{}},columns:{type:Array}},methods:{async editDashboard(){var l,t;try{(t=(l=this.$refs)==null?void 0:l.formEdit)==null||t.doValidation(),await Se.put(`/bi-dashboard/${this.selected}`,this.formEditValue),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormEdit=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"при спробі оновити дані виникла помилка"})}},async editDashboardGrid(){var l,t;try{(t=(l=this.$refs)==null?void 0:l.formGrid)==null||t.doValidation(),await Se.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormGrid=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async editDashboardFilters(){var l,t;try{(t=(l=this.$refs)==null?void 0:l.formFilter)==null||t.doValidation(),await Se.put(`/bi-dashboard/${this.selected}`,{...this.formEditValue,...this.formGridValue,...this.formFilterValue}),await this.$notify({title:"Успішно!",type:"success",message:"Дані успішно оновлено"}),this.isFormFilter=!1,await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі оновити дані виникла помилка"})}},async deleteDashboard(){try{await Se.delete(`/bi-dashboard/${this.selected}`);const l=new URL(window.top.location.href);l.searchParams.delete("dashboard"),l.searchParams.delete("widget"),window.history.pushState({},"",l),await this.$notify({title:"Успішно!",type:"success",message:"Дашборд видалено успішно"}),this.isDeleteConfirm=!1,await this.$emit("update:selected",null),await this.$emit("update-editor")}catch{this.$notify({title:"Помилка!",type:"error",message:"При спробі видалити дашборд виникла помилка"})}},closePopover(){document.body.click()}}},pE={key:0,class:"flex items-center gap-4"},yE={class:"h-[30px] w-[30px] flex items-center justify-center"},uE={class:"flex flex-col items-start -ml-2 -mr-2"},kE={class:"p-4"},mE={class:"flex justify-end mt-4 gap-x-3"},fE={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},gE={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},xE={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function ME(l,t,a,n,o,s){const i=e.resolveComponent("IconFilter"),d=e.resolveComponent("VsPopover"),c=e.resolveComponent("IconGrid"),h=e.resolveComponent("IconMore"),p=e.resolveComponent("VsModal"),y=e.resolveComponent("VForm");return e.openBlock(),e.createElementBlock("div",null,[a.selected?(e.openBlock(),e.createElementBlock("div",pE,[e.createVNode(d,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:t[0]||(t[0]=w=>o.isFormFilter=!0)},[e.createVNode(i,{class:"h-[20px] text-gray-500"})])]),default:e.withCtx(()=>[t[19]||(t[19]=e.createTextVNode(" Редагувати фільтри "))]),_:1}),e.createVNode(d,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createElementVNode("button",{class:"h-[30px] w-[30px] flex items-center justify-center",onClick:t[1]||(t[1]=w=>o.isFormGrid=!0)},[e.createVNode(c,{class:"h-[20px] text-gray-500"})])]),default:e.withCtx(()=>[t[20]||(t[20]=e.createTextVNode(" Редагувати структуру дашборду "))]),_:1}),e.createVNode(d,{placement:"left",trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(d,{placement:"bottom-left"},{reference:e.withCtx(()=>[e.createElementVNode("button",yE,[e.createVNode(h,{class:"h-[20px]"})])]),default:e.withCtx(()=>[e.createElementVNode("div",uE,[e.createElementVNode("button",{onClick:t[2]||(t[2]=w=>{s.closePopover(),o.isFormEdit=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Редагувати дашборд "),e.createElementVNode("button",{onClick:t[3]||(t[3]=w=>{s.closePopover(),o.isDeleteConfirm=!0}),class:"px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"}," Видалити дашборд ")])]),_:1})]),default:e.withCtx(()=>[t[21]||(t[21]=e.createTextVNode(" Керування дашбордом "))]),_:1})])):e.createCommentVNode("",!0),e.createVNode(p,{teleport:"#modal",visible:o.isDeleteConfirm,size:"small",title:"Ви впевнені?",onClose:t[6]||(t[6]=w=>o.isDeleteConfirm=!1)},{default:e.withCtx(()=>[e.createElementVNode("div",kE,[t[22]||(t[22]=e.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей дашборд? ",-1)),e.createElementVNode("div",mE,[e.createElementVNode("button",{type:"button",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",onClick:t[4]||(t[4]=w=>o.isDeleteConfirm=!1)}," Скасувати "),e.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:t[5]||(t[5]=(...w)=>s.deleteDashboard&&s.deleteDashboard(...w))}," Так, я впевнена(ий) ")])])]),_:1},8,["visible"]),e.createVNode(p,{teleport:"#modal",visible:o.isFormEdit,title:"Редагувати дашборд",onClose:t[10]||(t[10]=w=>o.isFormEdit=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",fE,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:t[8]||(t[8]=w=>o.isFormEdit=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:t[9]||(t[9]=(...w)=>s.editDashboard&&s.editDashboard(...w)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(y,{ref:"formEdit",schema:o.editDashboardScheme,values:o.formEditValue,"onUpdate:values":t[7]||(t[7]=w=>o.formEditValue=w)},null,8,["schema","values"])]),_:1},8,["visible"]),e.createVNode(p,{teleport:"#modal",visible:o.isFormGrid,title:"Редагувати структуру дашборду",onClose:t[14]||(t[14]=w=>o.isFormGrid=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",gE,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:t[12]||(t[12]=w=>o.isFormGrid=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:t[13]||(t[13]=(...w)=>s.editDashboardGrid&&s.editDashboardGrid(...w)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(y,{ref:"formgrid",schema:o.editGridScheme,values:o.formGridValue,"onUpdate:values":t[11]||(t[11]=w=>o.formGridValue=w)},null,8,["schema","values"])]),_:1},8,["visible"]),e.createVNode(p,{teleport:"#modal",visible:o.isFormFilter,title:"Редагувати фільтри",onClose:t[18]||(t[18]=w=>o.isFormFilter=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",xE,[e.createElementVNode("button",{style:{border:"1px solid #000"},onClick:t[16]||(t[16]=w=>o.isFormFilter=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),e.createElementVNode("button",{onClick:t[17]||(t[17]=(...w)=>s.editDashboardFilters&&s.editDashboardFilters(...w)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(y,{ref:"formFilter",schema:o.editFilterScheme,values:o.formFilterValue,"onUpdate:values":t[15]||(t[15]=w=>o.formFilterValue=w)},null,8,["schema","values"])]),_:1},8,["visible"])])}const bE=ve(hE,[["render",ME]]),wE={class:"flex-1 min-w-0 flex flex-col overflow-auto"},vE={class:"max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1"},VE={class:"relative z-10 shrink-0 mt-4 mb-6"},CE={class:"flex items-center text-sm text-gray-600"},zE={key:0,class:"flex items-center justify-between gap-4 mt-3"},BE={class:"min-w-0"},EE={class:"text-2xl font-bold text-gray-900"},_E={key:0,class:"mt-1.5 text-sm text-gray-600"},qE={class:"flex items-center shrink-0"},SE={key:1,class:"grid flex-grow w-full grid-cols-12 gap-4 py-4 pr-[15px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},jE=ve({__name:"vs-editor",props:{prefix:String,customClass:{type:String,default:()=>"w-screen h-screen"},initialDashboardId:{type:String,default:""}},emits:["back"],setup(l,{emit:t}){const a=l;da(a.prefix||"/api");const n=t,o=e.inject("biClearDashboard",null),s=e.ref(a.initialDashboardId||""),i=e.ref(""),d=e.ref(null),c=e.ref(null),h=e.ref(null),p=async()=>{if(!s.value){d.value=null;return}try{const m=await Se.get(`/bi-dashboard/${s.value}`);d.value=m}catch(m){console.error(m)}},y=e.computed(()=>{var m,f,u;return(u=Array.isArray((m=d.value)==null?void 0:m.widgets)?(f=d.value)==null?void 0:f.widgets:[])==null?void 0:u.find(g=>(g==null?void 0:g.name)===i.value)}),w=e.computed(()=>{var u,g,M,x,k;const f=[o?{label:"Дашборди",onClick:()=>{o(),n("back")}}:{label:"Дашборди",to:"/editor"}];if((u=d.value)!=null&&u.title||s.value){const v=((g=d.value)==null?void 0:g.title)||s.value||"Редактор",V=!!i.value;f.push({label:v,...V?{onClick:()=>{i.value=""}}:{}})}else f.push({label:"Редактор"});if(i.value&&y.value){const v=((x=(M=y.value)==null?void 0:M.data)==null?void 0:x.title)||((k=y.value)==null?void 0:k.title)||i.value;f.push({label:v})}return f});return e.watch(s,(m,f)=>{var g,M,x;f&&(i.value="");const u=new URL(window.top.location.href);m?((g=u==null?void 0:u.searchParams)==null||g.set("dashboard",m),(x=(M=window.top)==null?void 0:M.history)==null||x.pushState({},"",u),p()):(u==null||u.searchParams.delete("dashboard"),u==null||u.searchParams.delete("widget"))}),e.onMounted(()=>{var m,f;if(a.initialDashboardId)s.value=a.initialDashboardId;else{const u=new URLSearchParams(((f=(m=window.top)==null?void 0:m.location)==null?void 0:f.search)||""),g=u.get("dashboard");g&&(s.value=g),i.value=u.get("widget")||""}p()}),(m,f)=>{var u,g;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex w-full h-full",[l.customClass]])},[e.createElementVNode("div",wE,[e.createElementVNode("div",vE,[e.createElementVNode("div",VE,[e.createElementVNode("div",CE,[e.createVNode(lr,{items:w.value,compact:""},null,8,["items"])]),s.value&&d.value?(e.openBlock(),e.createElementBlock("div",zE,[e.createElementVNode("div",BE,[e.createElementVNode("h1",EE,e.toDisplayString(d.value.title||s.value),1),d.value.description?(e.openBlock(),e.createElementBlock("p",_E,e.toDisplayString(d.value.description),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",qE,[i.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",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",onClick:f[0]||(f[0]=M=>i.value="")},[e.createVNode(e.unref(Ua),{class:"w-4 h-4"}),f[6]||(f[6]=e.createTextVNode(" Закрити "))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(bE,{selected:s.value,"onUpdate:selected":f[1]||(f[1]=M=>s.value=M),dashboardData:d.value,columns:(u=d.value)==null?void 0:u.columns,selectedWidgetData:y.value,prefix:l.prefix,onUpdateEditor:p},null,8,["selected","dashboardData","columns","selectedWidgetData","prefix"]),e.createElementVNode("button",{type:"button",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",onClick:f[2]||(f[2]=M=>{var x,k;return(k=(x=h.value)==null?void 0:x.open)==null?void 0:k.call(x)})},f[7]||(f[7]=[e.createElementVNode("span",{class:"leading-none"},"+",-1),e.createTextVNode(" Створити віджет ")])),s.value?(e.openBlock(),e.createBlock(aB,{key:0,ref_key:"createWidgetRef",ref:h,inline:"",columns:(g=d.value)==null?void 0:g.columns,selectedDashboard:s.value,onUpdateData:p},null,8,["columns","selectedDashboard"])):e.createCommentVNode("",!0)],64))])])):e.createCommentVNode("",!0)]),i.value&&d.value?(e.openBlock(),e.createBlock(sE,{key:0,"selected-widget":i.value,"onUpdate:selectedWidget":f[3]||(f[3]=M=>i.value=M),"selected-widget-data":y.value,"current-widget-data":c.value,"selected-dashboard":s.value,"dashboard-widgets":d.value.widgets||[],onUpdateData:p},null,8,["selected-widget","selected-widget-data","current-widget-data","selected-dashboard","dashboard-widgets"])):(e.openBlock(),e.createElementBlock("div",SE,[d.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.panels,(M,x)=>{var k;return e.openBlock(),e.createElementBlock("div",{key:x,class:e.normalizeClass([`col-span-${M.col||12}`,"flex flex-col gap-[10px]"])},[(k=M.widgets)!=null&&k.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(M.widgets,v=>(e.openBlock(),e.createBlock(Ht,{onClick:V=>i.value=v,"onUpdate:currentWidgetData":f[4]||(f[4]=V=>c.value=V),key:v,dashboard:s.value,widget:v,selectedWidget:i.value,"dashboard-widgets":d.value.widgets,class:e.normalizeClass({"border border-blue-500":i.value===v})},null,8,["onClick","dashboard","widget","selectedWidget","dashboard-widgets","class"]))),128)):(e.openBlock(),e.createBlock(Ht,{key:1,onClick:v=>i.value=M.widget,"onUpdate:currentWidgetData":f[5]||(f[5]=v=>c.value=v),class:e.normalizeClass(["flex flex-col",{"border border-blue-500":i.value===M.widget}]),dashboard:s.value,widget:M.widget,selectedWidget:i.value,"dashboard-widgets":d.value.widgets},null,8,["onClick","class","dashboard","widget","selectedWidget","dashboard-widgets"]))],2)}),128)):(e.openBlock(),e.createBlock(ha,{key:0,class:"col-span-12"}))]))])])],2)}}},[["__scopeId","data-v-cc75be6a"]]),AE={class:"w-full h-screen"},DE=e.defineComponent({__name:"vs-editor-page",props:{prefix:{default:"/api"},dashboardId:{default:""}},emits:["back"],setup(l){const t=l,a=t.prefix,n=t.dashboardId;return(o,s)=>(e.openBlock(),e.createElementBlock("div",AE,[e.createVNode(jE,{customClass:"h-full w-full",prefix:e.unref(a),"initial-dashboard-id":e.unref(n),onBack:s[0]||(s[0]=i=>o.$emit("back"))},null,8,["prefix","initial-dashboard-id"])]))}}),NE={class:"relative group h-full"},LE={class:"flex items-start gap-3 flex-1 min-h-0"},HE={class:"p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0"},$E={class:"flex-1 min-w-0 flex flex-col min-h-0"},FE={class:"font-semibold text-gray-900 mb-1 truncate"},TE={key:0,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10"},PE={key:1,class:"text-sm text-gray-600 mb-2 line-clamp-2 min-h-10 invisible","aria-hidden":"true"},IE={key:2,class:"text-sm text-gray-400 mt-1 shrink-0"},RE=ve({__name:"dashboard-card",props:{title:String,description:String,modified:String,name:String,widgetCount:Number,reserveLines:Number,dashboardRouteName:String,onOpenEditor:Function,onOpenView:Function},setup(l){const t=l,a=Wa(),n=e.ref(!1);function o(){var i;t.dashboardRouteName&&(t.onOpenEditor?t.onOpenEditor(t.dashboardRouteName):(i=a==null?void 0:a.push)==null||i.call(a,{path:"/editor",query:{dashboard:t.dashboardRouteName}}))}function s(i){i.target.closest(".dashboard-card-menu")||(n.value=!1)}return e.onMounted(()=>document.addEventListener("click",s)),e.onUnmounted(()=>document.removeEventListener("click",s)),(i,d)=>(e.openBlock(),e.createElementBlock("div",NE,[e.createElementVNode("button",{type:"button",class:"w-full h-full bg-white border border-gray-200 rounded-lg p-6 hover:shadow-md hover:border-blue-200 transition-all text-left animate-fade-in flex flex-col",onClick:o},[e.createElementVNode("div",LE,[e.createElementVNode("div",HE,[e.createVNode(e.unref(R1),{size:24,class:"w-5 h-5 text-blue-600"})]),e.createElementVNode("div",$E,[e.createElementVNode("h3",FE,e.toDisplayString(l.title),1),l.description?(e.openBlock(),e.createElementBlock("p",TE,e.toDisplayString(l.description),1)):(e.openBlock(),e.createElementBlock("p",PE,"   ")),l.widgetCount!=null?(e.openBlock(),e.createElementBlock("p",IE,e.toDisplayString(l.widgetCount)+" віджетів ",1)):e.createCommentVNode("",!0)])])])]))}},[["__scopeId","data-v-cde0f33b"]]),OE=[{type:"Text",key:"name",label:"Назва",validators:["required"],original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"title",label:"Заголовок",validators:["required"],original:{type:"Text",ua:"Титул",col:8}},{type:"Text",key:"description",label:"Опис",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"words",label:"Ключові слова",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"table_name",validators:["required"],label:"Назва таблиці",original:{type:"Text",ua:"Назва",col:8}},{type:"Text",key:"db",label:"База даних",original:{type:"Text",ua:"Назва",col:8}},{type:"Switcher",key:"public",label:"Публічний",original:{type:"Text",ua:"Назва",col:8}}];function UE(l){return!Array.isArray(l)||l.length===0?{}:l.reduce((t,a)=>{if(!a||a.key==null)return t;const{key:n,...o}=a;return t[n]=o,t},{})}const ZE={class:"flex-1 bg-gray-50"},WE={class:"max-w-7xl mx-auto px-6 py-8"},GE={class:"mb-6"},KE={class:"flex items-center justify-between mb-6"},JE={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},YE={class:"flex items-center space-x-4"},XE={class:"flex-1 relative"},QE={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},e_=e.defineComponent({__name:"all-dashboards-page",props:{prefix:{}},setup(l){const t=e.defineAsyncComponent(()=>Promise.resolve().then(()=>it)),a=UE(OE),n=e.ref([]),o=e.ref([]);Wa();const s=e.inject("biSetDashboard"),i=l,d=e.ref(null),c=e.ref(!1),h=e.ref({});da(i.prefix||"/api");async function p(){try{const g=await Se.get("/bi-dashboard?type=db"),M=Array.isArray(g==null?void 0:g.rows)?g.rows:[];o.value=M,n.value=M.map(x=>({routeName:String(x.name??""),title:x.title??x.name??"Без назви",description:x.description??null,modified:"-",name:"-"}))}catch(g){console.error("Failed to load dashboards",g),o.value=[],n.value=[]}}async function y(){var M,x,k;const g=(x=(M=e.getCurrentInstance())==null?void 0:M.proxy)==null?void 0:x.$notify;try{await((k=d.value)==null?void 0:k.doValidation()),await Se.post("/bi-dashboard",h.value),c.value=!1,h.value={},g==null||g({type:"success",title:"Успішно!",message:"Дашборд створено успішно"}),await p()}catch{g==null||g({type:"error",title:"Помилка!",message:"При спробі створити дашборд виникла помилка"})}}e.onMounted(p);const w=e.ref(1),m=()=>{const g=window.innerWidth;w.value=g>=1024?3:g>=768?2:1};e.onMounted(()=>{m(),window.addEventListener("resize",m)}),e.onUnmounted(()=>{window.removeEventListener("resize",m)});const f=g=>g?g.trim().length>70?2:1:0,u=g=>{const M=w.value||1,k=Math.floor(g/M)*M,v=k+M,V=n.value.slice(k,v);let C=0;for(const q of V){const L=f(q.description??null);if(L>C&&(C=L),C===2)break}return C};return e.ref("grid"),(g,M)=>(e.openBlock(),e.createElementBlock("div",ZE,[e.createElementVNode("div",WE,[e.createElementVNode("div",GE,[e.createElementVNode("div",KE,[M[5]||(M[5]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-3xl font-bold text-gray-900"},"Дашборди"),e.createElementVNode("p",{class:"mt-2 text-gray-600"}," Керуйте та переглядайте свої аналітичні дашборди ")],-1)),e.createElementVNode("button",{type:"button",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",onClick:M[0]||(M[0]=x=>c.value=!0)},[e.createVNode(e.unref(Oa),{size:24,class:"w-4 h-4"}),M[4]||(M[4]=e.createElementVNode("span",null,"Новий дашборд",-1))])]),e.createVNode($t,{teleport:"#modal",visible:c.value,title:"Створити дашборд",onClose:M[3]||(M[3]=x=>c.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",JE,[e.createElementVNode("button",{type:"button",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",onClick:M[2]||(M[2]=x=>c.value=!1)}," Скасувати "),e.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",onClick:y}," Зберегти ")])]),default:e.withCtx(()=>[e.createVNode(e.unref(t),{ref_key:"createFormRef",ref:d,schema:e.unref(a),values:h.value,"onUpdate:values":M[1]||(M[1]=x=>h.value=x)},null,8,["schema","values"])]),_:1},8,["visible"]),e.createElementVNode("div",YE,[e.createElementVNode("div",XE,[e.createVNode(e.unref(K1),{size:24,class:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"}),M[6]||(M[6]=e.createElementVNode("input",{type:"text",placeholder:"Пошук дашбордів...",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",value:""},null,-1))])])]),e.createElementVNode("div",QE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(x,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"cursor-pointer h-full"},[e.createVNode(RE,{title:x.title,description:x.description,modified:x.modified,name:x.name,reserveLines:u(k),"dashboard-route-name":x.routeName,"on-open-editor":e.unref(s),"on-open-view":e.unref(s)},null,8,["title","description","modified","name","reserveLines","dashboard-route-name","on-open-editor","on-open-view"])]))),128))])])]))}}),t_=e.defineComponent({__name:"editor-root-page",props:{prefix:{default:"/api"}},setup(l){const t=l,a=e.computed(()=>t.prefix),n=e.ref(""),o=Fz();e.onMounted(()=>{var d;const i=(d=o==null?void 0:o.query)==null?void 0:d.dashboard;i!=null&&typeof i=="string"&&(n.value=i.trim())});const s=e.computed(()=>n.value.length>0);return e.provide("biSetDashboard",i=>{n.value=i||""}),e.provide("biClearDashboard",()=>{n.value=""}),e.provide("biSelectedDashboardId",e.readonly(n)),(i,d)=>s.value?(e.openBlock(),e.createBlock(DE,{key:`editor-${n.value}`,prefix:a.value,"dashboard-id":n.value,onBack:d[0]||(d[0]=c=>n.value="")},null,8,["prefix","dashboard-id"])):(e.openBlock(),e.createBlock(e_,{key:0,prefix:a.value},null,8,["prefix"]))}});function Ze(l,t){const a=l&&typeof l=="object"&&"value"in l?l.value:l;if(a==null)return"";const n=Number(a);return Number.isNaN(n)?String(a):new Intl.NumberFormat("en",t??{notation:"compact"}).format(n)}function Ut(l){if(!(l!=null&&l.includes("T")))return l??"";const[t,a,n]=l.split("T")[0].split("-");return`${n}.${a}.${t}`}function a_(l){return Intl.NumberFormat("en").format(l??0)}class r_{static getTooltipOptions(t=!0){return{show:t,axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}}}}const l_={show_label:!1,show_legend:!1,label:null,legend:{position:null},colors:null,color:null,title:null};function n_(){const l="0123456789ABCDEF";let t="#";for(let a=0;a<6;a+=1)t+=l[Math.floor(Math.random()*16)];return t}function xt(l=l_){var a;const t={label:{show:l==null?void 0:l.show_label,formatter:(l==null?void 0:l.formatter)??(n=>Ze(n)),...(l==null?void 0:l.label)||{}},legend:{...(l==null?void 0:l.legend)||{},[((a=l==null?void 0:l.legend)==null?void 0:a.position)||"bottom"]:"0",show:(l==null?void 0:l.show_legend)||!1},barWidth:"70%",grid:{borderColor:"#e5e7eb"},title:{...(l==null?void 0:l.title)||{}}};return(l!=null&&l.colors||l!=null&&l.color)&&(t.color=(l==null?void 0:l.colors)||(l==null?void 0:l.color)||null),t}function zr(l){return{color:"#9ca3af",fontSize:10,fontFamily:"Inter, ui-sans-serif, system-ui",fontWeight:400,label:l==null?void 0:l.label,show:!0,formatter:(l==null?void 0:l.formatter)??(t=>Ze(t)),margin:(l==null?void 0:l.margin)??7,interval:(l==null?void 0:l.interval)??"auto",rotate:(l==null?void 0:l.rotate)??0}}const Br=["#d3c7e6","#bedae3","#f8e9cb","#ff8c8c","#c5d8be","#ffc6c6","#ffc39a","#fff7c5","#d8ffc0","#d4f7ff"];class fa{static getLabelOptions(t={}){return{show:(t==null?void 0:t.show_label)||(t==null?void 0:t.show)||!1,fontSize:"10",position:(t==null?void 0:t.position)||"inside",formatter:(t==null?void 0:t.formatter)||"{d}%",...t}}static getLegendOpions(t={}){return{...t,position:(t==null?void 0:t.position)||"bottom"}}}const Ct=typeof window<"u"?window.echarts:null,Pe={props:["source","style","widget","dashboard","title","currentWidget","widgetData","prefix"],data(){return{sourceData:null,styleData:null,widgetName:"",dimensions:[],dashboardName:"",titleCharts:"",widgetInstance:null}},mounted(){window.addEventListener("resize",this.handleResize),window.addEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.addEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},unmounted(){window.removeEventListener(`update-data-${this.widget}`,this.checkCustomEvent),window.removeEventListener(`update-style-${this.widget}`,this.checkCustomStyleEvent)},watch:{sourceData:{async handler(){setTimeout(()=>{this==null||this.onChangedData()},0)}}},methods:{checkCustomStyleEvent(l){this.changeOptionsByName(l.chartId,l.options)},checkCustomEvent({filterUrl:l}){this.getDataFromURL(l)},handleResize(){this.widgetInstance&&this.widgetInstance.resize()},async getDataFromURL(l){var t;try{const a=await Se.get(l);this.sourceData=(a==null?void 0:a.source)||[],this.$emit("update:widgetData",a),this.dimensions=Object.keys(((t=this.sourceData)==null?void 0:t[0])||{}),this.titleCharts=this.style?this.style:(a==null?void 0:a.title)||"",this.styleData=(a==null?void 0:a.style)||{}}catch(a){const n={message:"Дані не знайдено",title:"Помилка!",type:"error",status:400,id:this.widgetName};(a==null?void 0:a.status)=="404"&&(n.status=404,n.message="Дані не знайдено"),(a==null?void 0:a.status)=="400"&&(n.message="Перевірте налаштування або зверніться до адміністратора"),(a==null?void 0:a.status)=="500"&&(n.message="Сталася помилка сервера"),this.$emit("update:widgetData",n)}},getValues(){return this.sourceData.map(l=>{var t;return parseFloat(l[(t=this.columns)==null?void 0:t[1]])})},formatDate(l){const t=new Date(l);if(isNaN(t))return l;const a=String(t.getDate()).padStart(2,"0"),o=["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"][t.getMonth()],s=t.getFullYear();return`${a} ${o} ${s}`},async getData(){var l;try{if(this.source)this.sourceData=[...this.source],this.styleData=this.style,this.titleCharts=this.title,this.dimensions=Object.keys(((l=this.sourceData)==null?void 0:l[0])||{});else{this.widgetName=this.widget,this.dashboardName=this.dashboard;const t=this.dashboardName?`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}`:`${this.prefix||""}/bi-data?&widget=${this.widgetName}`;await this.getDataFromURL(t)}}catch(t){console.error(t)}},async initChart(l,t,a){var n,o,s,i,d,c,h;this.widgetInstance&&this.widgetInstance.clear();try{const p=this.$refs.chart,y=Ct==null?void 0:Ct.init(p);if(!y)return;const w={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"transparent",shadowColor:"transparent",padding:[0,0,0,0],borderWidth:0,formatter:m=>{var M;const f=(M=m[0])==null?void 0:M.axisValue;let g=`
8272
8272
  <div style="background-color: rgba(255, 255, 255, 0.7)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
8273
8273
  <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">
8274
8274
  ${f?this.formatDate(f):"N/A"}
@@ -8281,16 +8281,16 @@ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An err
8281
8281
  </span>
8282
8282
  <span>${this.getMetricValue(x==null?void 0:x.data)}</span>
8283
8283
  </div>
8284
- `}),g+="</div>",g}},xAxis:{data:t!=null&&t.length?t:null,type:t?"category":"value",name:((o=(n=this.styleData)==null?void 0:n.x_axis)==null?void 0:o.name)||"",axisLabel:{...zr((s=this.styleData)==null?void 0:s.x_axis),formatter:m=>{var u,g;const f=this.formatDate(m);return((g=(u=this.styleData)==null?void 0:u.x_axis)==null?void 0:g.overflow)==="ellipsis"&&f.length>10?`${f.slice(0,10)}...`:f}}},yAxis:{data:a!=null&&a.length?a:null,type:a?"category":"value",name:((d=(i=this.styleData)==null?void 0:i.y_axis)==null?void 0:d.name)||"",axisLabel:zr((c=this.styleData)==null?void 0:c.y_axis)},series:l!=null&&l.length?l:null,...xt(this.styleData),grid:{bottom:"0%",right:"0%",left:"0%",top:"20px",containLabel:!0,...((h=this.styleData)==null?void 0:h.grid)||{}}};await y.setOption(w),y.resize(),this.widgetInstance=y,this.$emit("update:currentWidget",y)}catch(p){console.error(p)}},async setSeriesOption(l,t){const a=l.getOption(),{series:n=[]}=a,o=n.map(s=>({...s,...t}));l.setOption({...a,series:o})},async changeOptionsByName(l,t){const a=document.getElementById(l);if(!a)return null;const n=Ct==null?void 0:Ct.getInstanceByDom(a);if(!n)return null;const o=n.getOption();t.seriesOptions&&this.setSeriesOption(n,t.seriesOptions),n.setOption({...o,...t.options,tooltip:{...rE.getTooltipOptions(t.options.tooltip.show)}})},async changeData(l){var t;try{let a=this.dashboard?`${this.prefix||""}/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`:`${this.prefix||""}/bi-data?&widget=${this.widget}`;(t=l==null?void 0:l.granularity)!=null&&t.length&&(a+=`&granularity=${l.granularity}`),l!=null&&l.metrics&&(a+=`&metrics=${l.metrics}`),this.getDataFromURL(a)}catch(a){console.error(a)}},async setFilter(l){const t=`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}${l||""}`;await this.getDataFromURL(t)},async changeStyle(l,t){this.styleData[l]=t,this.onChangedData()},getMetricValue(l){var n;const t=(l==null?void 0:l.metric)||l;return parseFloat(t)?(n=We(t,{notation:"standard"}))==null?void 0:n.replaceAll(","," "):t}}},oE={name:"VsBar",mixins:[Pe],data(){return{resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var t;this.getData(),this.onChangedData();const l=(t=this.$refs)==null?void 0:t.chart;l&&(this.resizeObserver=new ResizeObserver(()=>{var a;this.widgetInstance&&((a=this.widgetInstance)==null||a.resize())}),this.resizeObserver.observe(l))},unmounted(){this.resizeObserver.disconnect()},methods:{async onChangedData(){try{if(this.sourceData){await this.$nextTick();const{series:l,xs:t,ys:a}=this.prepareData();l&&(this==null||this.initChart(l,t,a))}}catch(l){console.error(l)}},prepareData(){var l,t,a,n,o,s;try{if(!((l=this.sourceData)!=null&&l.length))return{series:[],xs:[],ys:void 0};const i=Array.from(new Set(this.sourceData.filter(w=>w[this.dimensions[0]]).map(w=>w[this.dimensions[0]])));let d;this.dimensions[0].includes("date")?d=i.map(w=>Ut(w)):d=[...i];let c,h;((t=this.styleData)==null?void 0:t.horizontal)===!0?h=[...d]:c=[...d];const p=this.sourceData.filter(w=>parseFloat(w[this.dimensions[1]])&&w[this.dimensions[0]]).map(w=>parseFloat(w[this.dimensions[1]]));let y;return((a=this.styleData)==null?void 0:a.stack)!==!1?y=this.prepareStackData():((n=this.styleData)==null?void 0:n.negative_waterfall)===!0?y=this.prepareNegativeWaterfall():((o=this.styleData)==null?void 0:o.waterfall)===!0?y=this.prepareWaterfallData(p):((s=this.styleData)==null?void 0:s.accumulative)===!0?y=this.prepareAccumulative(p):y=this.dimensions.slice(1).map((m,f)=>({name:m,type:"bar",stack:`a${f}`,data:this.sourceData.filter(u=>parseFloat(u[m])&&m).map(u=>parseFloat(u[m]))})),{series:y,xs:c,ys:h}}catch(i){return console.error(i),{series:[],xs:[],ys:[]}}},prepareWaterfallData(l){let t=l.reduce((s,i)=>s+i,0);const a=[t,...l],n=a.map((s,i)=>{if(i===0)return 0;const d=t-s;return t-=s,d>=0?d:0});return[{type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},data:n,tooltip:{show:!1}},{name:this.title?this.title:this.dimensions[0],type:"bar",stack:"Total",data:a}]},prepareStackData(){return this.dimensions.slice(1).map(a=>({name:a,type:"bar",stack:"a",data:this.sourceData.filter(n=>parseFloat(n[a])&&a).map(n=>parseFloat(n[a]))}))},prepareNegativeWaterfall(){const l=this.sourceData.map(s=>Number.isNaN(s[this.dimensions[1]])?0:Number(s[this.dimensions[1]])),t=this.sourceData.map(s=>Number.isNaN(s[this.dimensions[2]])?0:Number(s[this.dimensions[2]]));let a=0;const n=l.map((s,i)=>{const d=a;return a+=Number.isNaN(s)?0:s,i===0&&(a-=Number.isNaN(t[i])?0:t[i]),a-=Number.isNaN(t[i+1])?0:t[i+1],d>=0?d:0});return[{type:"bar",stack:"a",itemStyle:{borderColor:"transparent",color:"transparent"},data:n,tooltip:{show:!1}},{name:this.dimensions[1],type:"bar",stack:"a",data:l},{name:this.dimensions[2],type:"bar",stack:"a",data:t}]},prepareAccumulative(l){let t=0;const a=l.map(o=>(t+=o,t));return[{name:this.titleCharts,type:"bar",stack:"Total",data:a}]}}},sE=["id"];function iE(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:s.uniqueID,ref:"chart",class:"h-full w-full min-h-[200px]"},null,8,sE)}const r1=ve(oE,[["render",iE]]),dE=Object.freeze(Object.defineProperty({__proto__:null,default:r1},Symbol.toStringTag,{value:"Module"}));var _r=(l=>(l.Dashboard="/dashboard",l.BiPlatform="/bi-platform",l.EditorBase="/editor",l.AllDashboards="/dashboards",l.DashboardByName="/dashboards/:name",l))(_r||{}),Er;(l=>{(t=>{t.Bar="bar",t.ListBar="listbar",t.Number="number",t.Text="text",t.Pie="pie",t.Heatmap="heatmap",t.Calendar="calendar",t.Line="line",t.Stat="stat",t.Pivot="pivot",t.Funnel="funnel",t.Progress="progress"})(l.Types||(l.Types={}))})(Er||(Er={}));var qr=(l=>(l.AllDashboards="all-dashboards",l.BiPlatform="bi-platform",l.Dashboard="dashboard",l.Erobota="erobota",l.Datatest="datatest",l.Sourcedate="sourcedate",l.Widgetwidget="widgetwidget",l.Test="test",l.Demo="demo",l.Crm="crm",l.Editor="editor",l.Editordetails="editordetails",l.Dbtables="dbtables",l.Biviewer="biviewer",l.Biviewerinner="biviewerinner",l.Bieditor="bieditor",l.Bieditorinner="bieditorinner",l))(qr||{});const l1=typeof window<"u"?window.echarts:null,cE={name:"VsPie",props:["currentWidget"],mixins:[Pe],data(){return{chartInstance:null,resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var a;await this.$nextTick(),await this.getData();const{series:l}=this.prepareData()||{};l&&this.initChart(l);const t=(a=this.$refs)==null?void 0:a.chart;t&&(this.resizeObserver=new ResizeObserver(()=>{this.chartInstance&&this.chartInstance.resize()}),this.resizeObserver.observe(t))},beforeUnmount(){var l;(l=this.resizeObserver)==null||l.disconnect()},methods:{onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&this.initChart(l,t,a)}}catch(l){console.error(l)}},buildTooltipForDonut(l,t){const{name:a,value:n,percent:o}=l;return`
8284
+ `}),g+="</div>",g}},xAxis:{data:t!=null&&t.length?t:null,type:t?"category":"value",name:((o=(n=this.styleData)==null?void 0:n.x_axis)==null?void 0:o.name)||"",axisLabel:{...zr((s=this.styleData)==null?void 0:s.x_axis),formatter:m=>{var u,g;const f=this.formatDate(m);return((g=(u=this.styleData)==null?void 0:u.x_axis)==null?void 0:g.overflow)==="ellipsis"&&f.length>10?`${f.slice(0,10)}...`:f}}},yAxis:{data:a!=null&&a.length?a:null,type:a?"category":"value",name:((d=(i=this.styleData)==null?void 0:i.y_axis)==null?void 0:d.name)||"",axisLabel:zr((c=this.styleData)==null?void 0:c.y_axis)},series:l!=null&&l.length?l:null,...xt(this.styleData),grid:{bottom:"0%",right:"0%",left:"0%",top:"20px",containLabel:!0,...((h=this.styleData)==null?void 0:h.grid)||{}}};await y.setOption(w),y.resize(),this.widgetInstance=y,this.$emit("update:currentWidget",y)}catch(p){console.error(p)}},async setSeriesOption(l,t){const a=l.getOption(),{series:n=[]}=a,o=n.map(s=>({...s,...t}));l.setOption({...a,series:o})},async changeOptionsByName(l,t){const a=document.getElementById(l);if(!a)return null;const n=Ct==null?void 0:Ct.getInstanceByDom(a);if(!n)return null;const o=n.getOption();t.seriesOptions&&this.setSeriesOption(n,t.seriesOptions),n.setOption({...o,...t.options,tooltip:{...r_.getTooltipOptions(t.options.tooltip.show)}})},async changeData(l){var t;try{let a=this.dashboard?`${this.prefix||""}/bi-data?dashboard=${this.dashboard}&widget=${this.widget}`:`${this.prefix||""}/bi-data?&widget=${this.widget}`;(t=l==null?void 0:l.granularity)!=null&&t.length&&(a+=`&granularity=${l.granularity}`),l!=null&&l.metrics&&(a+=`&metrics=${l.metrics}`),this.getDataFromURL(a)}catch(a){console.error(a)}},async setFilter(l){const t=`${this.prefix||""}/bi-data?dashboard=${this.dashboardName}&widget=${this.widgetName}${l||""}`;await this.getDataFromURL(t)},async changeStyle(l,t){this.styleData[l]=t,this.onChangedData()},getMetricValue(l){var n;const t=(l==null?void 0:l.metric)||l;return parseFloat(t)?(n=Ze(t,{notation:"standard"}))==null?void 0:n.replaceAll(","," "):t}}},o_={name:"VsBar",mixins:[Pe],data(){return{resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var t;this.getData(),this.onChangedData();const l=(t=this.$refs)==null?void 0:t.chart;l&&(this.resizeObserver=new ResizeObserver(()=>{var a;this.widgetInstance&&((a=this.widgetInstance)==null||a.resize())}),this.resizeObserver.observe(l))},unmounted(){this.resizeObserver.disconnect()},methods:{async onChangedData(){try{if(this.sourceData){await this.$nextTick();const{series:l,xs:t,ys:a}=this.prepareData();l&&(this==null||this.initChart(l,t,a))}}catch(l){console.error(l)}},prepareData(){var l,t,a,n,o,s;try{if(!((l=this.sourceData)!=null&&l.length))return{series:[],xs:[],ys:void 0};const i=Array.from(new Set(this.sourceData.filter(w=>w[this.dimensions[0]]).map(w=>w[this.dimensions[0]])));let d;this.dimensions[0].includes("date")?d=i.map(w=>Ut(w)):d=[...i];let c,h;((t=this.styleData)==null?void 0:t.horizontal)===!0?h=[...d]:c=[...d];const p=this.sourceData.filter(w=>parseFloat(w[this.dimensions[1]])&&w[this.dimensions[0]]).map(w=>parseFloat(w[this.dimensions[1]]));let y;return((a=this.styleData)==null?void 0:a.stack)!==!1?y=this.prepareStackData():((n=this.styleData)==null?void 0:n.negative_waterfall)===!0?y=this.prepareNegativeWaterfall():((o=this.styleData)==null?void 0:o.waterfall)===!0?y=this.prepareWaterfallData(p):((s=this.styleData)==null?void 0:s.accumulative)===!0?y=this.prepareAccumulative(p):y=this.dimensions.slice(1).map((m,f)=>({name:m,type:"bar",stack:`a${f}`,data:this.sourceData.filter(u=>parseFloat(u[m])&&m).map(u=>parseFloat(u[m]))})),{series:y,xs:c,ys:h}}catch(i){return console.error(i),{series:[],xs:[],ys:[]}}},prepareWaterfallData(l){let t=l.reduce((s,i)=>s+i,0);const a=[t,...l],n=a.map((s,i)=>{if(i===0)return 0;const d=t-s;return t-=s,d>=0?d:0});return[{type:"bar",stack:"Total",itemStyle:{borderColor:"transparent",color:"transparent"},data:n,tooltip:{show:!1}},{name:this.title?this.title:this.dimensions[0],type:"bar",stack:"Total",data:a}]},prepareStackData(){return this.dimensions.slice(1).map(a=>({name:a,type:"bar",stack:"a",data:this.sourceData.filter(n=>parseFloat(n[a])&&a).map(n=>parseFloat(n[a]))}))},prepareNegativeWaterfall(){const l=this.sourceData.map(s=>Number.isNaN(s[this.dimensions[1]])?0:Number(s[this.dimensions[1]])),t=this.sourceData.map(s=>Number.isNaN(s[this.dimensions[2]])?0:Number(s[this.dimensions[2]]));let a=0;const n=l.map((s,i)=>{const d=a;return a+=Number.isNaN(s)?0:s,i===0&&(a-=Number.isNaN(t[i])?0:t[i]),a-=Number.isNaN(t[i+1])?0:t[i+1],d>=0?d:0});return[{type:"bar",stack:"a",itemStyle:{borderColor:"transparent",color:"transparent"},data:n,tooltip:{show:!1}},{name:this.dimensions[1],type:"bar",stack:"a",data:l},{name:this.dimensions[2],type:"bar",stack:"a",data:t}]},prepareAccumulative(l){let t=0;const a=l.map(o=>(t+=o,t));return[{name:this.titleCharts,type:"bar",stack:"Total",data:a}]}}},s_=["id"];function i_(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:s.uniqueID,ref:"chart",class:"h-full w-full min-h-[200px]"},null,8,s_)}const r1=ve(o_,[["render",i_]]),d_=Object.freeze(Object.defineProperty({__proto__:null,default:r1},Symbol.toStringTag,{value:"Module"}));var Er=(l=>(l.Dashboard="/dashboard",l.BiPlatform="/bi-platform",l.EditorBase="/editor",l.AllDashboards="/dashboards",l.DashboardByName="/dashboards/:name",l))(Er||{}),_r;(l=>{(t=>{t.Bar="bar",t.ListBar="listbar",t.Number="number",t.Text="text",t.Pie="pie",t.Heatmap="heatmap",t.Calendar="calendar",t.Line="line",t.Stat="stat",t.Pivot="pivot",t.Funnel="funnel",t.Progress="progress"})(l.Types||(l.Types={}))})(_r||(_r={}));var qr=(l=>(l.AllDashboards="all-dashboards",l.BiPlatform="bi-platform",l.Dashboard="dashboard",l.Erobota="erobota",l.Datatest="datatest",l.Sourcedate="sourcedate",l.Widgetwidget="widgetwidget",l.Test="test",l.Demo="demo",l.Crm="crm",l.Editor="editor",l.Editordetails="editordetails",l.Dbtables="dbtables",l.Biviewer="biviewer",l.Biviewerinner="biviewerinner",l.Bieditor="bieditor",l.Bieditorinner="bieditorinner",l))(qr||{});const l1=typeof window<"u"?window.echarts:null,c_={name:"VsPie",props:["currentWidget"],mixins:[Pe],data(){return{chartInstance:null,resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var a;await this.$nextTick(),await this.getData();const{series:l}=this.prepareData()||{};l&&this.initChart(l);const t=(a=this.$refs)==null?void 0:a.chart;t&&(this.resizeObserver=new ResizeObserver(()=>{this.chartInstance&&this.chartInstance.resize()}),this.resizeObserver.observe(t))},beforeUnmount(){var l;(l=this.resizeObserver)==null||l.disconnect()},methods:{onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&this.initChart(l,t,a)}}catch(l){console.error(l)}},buildTooltipForDonut(l,t){const{name:a,value:n,percent:o}=l;return`
8285
8285
  <div style="background-color:${t[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
8286
- ${a==null?void 0:a.replace("null","Не визначено")}: ${We(n)} (${o}%)
8287
- </div>`},prepareData(){var l,t,a,n,o,s;try{if(this.styleData=this.styleData||{},!((l=this.sourceData)!=null&&l.length))return console.warn("No source data available"),null;const i=Array.from(new Set((this.sourceData||[]).map(f=>f[this.dimensions[0]]))),d=Array.from(new Set((this.sourceData||[]).map(f=>f[this.dimensions[1]]))),c=parseInt((this.sourceData||[]).reduce((f,u)=>f+parseFloat((u==null?void 0:u.metric)||0),0),10),h=i.map((f,u)=>{const g=(d[u]/c*100).toFixed(2);return{name:`${f} (${g}%)`,value:d[u]}}),p=((t=this.styleData)==null?void 0:t.innerRadius)||"80%",y=((a=this.styleData)==null?void 0:a.outerRadius)||"100%",w=[p,y];return this.styleData.legend=fa.getLegendOpions({borderRadius:10,height:"100%",padding:10,bottom:"0",type:"scroll",itemWidth:14,itemHeight:14,formatter:f=>{var u;return(u=f==null?void 0:f.replace("null","Не визначено"))==null?void 0:u.replace("NaN","0.00")},...((n=this.styleData)==null?void 0:n.legend)||{}}),this.styleData.label=fa.getLabelOptions((o=this.styleData)==null?void 0:o.label),this.styleData.show_legend=((s=this.styleData)==null?void 0:s.show_legend)??!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:w,center:["50%","60%"],height:"75%",...xt(this.styleData),data:h}]}}catch(i){return console.error("Error in prepareData:",i),null}},async initChart(l){try{if(!l){console.warn("No series data available for chart initialization");return}const t=this.$refs.chart;if(!t){console.warn("Chart DOM element not found");return}if(this.chartInstance=l1==null?void 0:l1.init(t),!this.chartInstance)return;const a=parseInt((this.sourceData||[]).reduce((o,s)=>o+parseFloat((s==null?void 0:s.metric)||0),0),10),n={tooltip:{trigger:"item",formatter:o=>this.buildTooltipForDonut(o,[o.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:l,...xt(this.styleData||{}),title:{text:We(a),left:"center",top:"41%",textStyle:{color:"black",fontWeight:400,fontSize:"22px"}}};this.chartInstance.setOption(n),this.$emit("update:currentWidget",this.chartInstance),this.chartInstance.resize(),window.addEventListener("resize",()=>{var o;(o=this.chartInstance)==null||o.resize()})}catch(t){console.error("Error in initChart:",t)}}}},hE=["id"];function pE(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:s.uniqueID,ref:"chart",class:"h-full min-h-[200px] flex items-center"},null,8,hE)}const Sr=ve(cE,[["render",pE]]),yE=Object.freeze(Object.defineProperty({__proto__:null,default:Sr},Symbol.toStringTag,{value:"Module"})),n1=typeof window<"u"?window.echarts:null,uE={name:"VsPie",props:["currentWidget"],mixins:[Pe],data(){return{chartInstance:null,resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var a;await this.$nextTick(),await this.getData();const{series:l}=this.prepareData()||{};l&&this.initChart(l);const t=(a=this.$refs)==null?void 0:a.chart;t&&(this.resizeObserver=new ResizeObserver(()=>{this.chartInstance&&this.chartInstance.resize()}),this.resizeObserver.observe(t))},unmounted(){var l;(l=this.resizeObserver)==null||l.disconnect()},methods:{onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&this.initChart(l,t,a)}}catch(l){console.error(l)}},buildTooltipForDonut(l,t){const{name:a,value:n,percent:o}=l;return`
8286
+ ${a==null?void 0:a.replace("null","Не визначено")}: ${Ze(n)} (${o}%)
8287
+ </div>`},prepareData(){var l,t,a,n,o,s;try{if(this.styleData=this.styleData||{},!((l=this.sourceData)!=null&&l.length))return console.warn("No source data available"),null;const i=Array.from(new Set((this.sourceData||[]).map(f=>f[this.dimensions[0]]))),d=Array.from(new Set((this.sourceData||[]).map(f=>f[this.dimensions[1]]))),c=parseInt((this.sourceData||[]).reduce((f,u)=>f+parseFloat((u==null?void 0:u.metric)||0),0),10),h=i.map((f,u)=>{const g=(d[u]/c*100).toFixed(2);return{name:`${f} (${g}%)`,value:d[u]}}),p=((t=this.styleData)==null?void 0:t.innerRadius)||"80%",y=((a=this.styleData)==null?void 0:a.outerRadius)||"100%",w=[p,y];return this.styleData.legend=fa.getLegendOpions({borderRadius:10,height:"100%",padding:10,bottom:"0",type:"scroll",itemWidth:14,itemHeight:14,formatter:f=>{var u;return(u=f==null?void 0:f.replace("null","Не визначено"))==null?void 0:u.replace("NaN","0.00")},...((n=this.styleData)==null?void 0:n.legend)||{}}),this.styleData.label=fa.getLabelOptions((o=this.styleData)==null?void 0:o.label),this.styleData.show_legend=((s=this.styleData)==null?void 0:s.show_legend)??!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:w,center:["50%","60%"],height:"75%",...xt(this.styleData),data:h}]}}catch(i){return console.error("Error in prepareData:",i),null}},async initChart(l){try{if(!l){console.warn("No series data available for chart initialization");return}const t=this.$refs.chart;if(!t){console.warn("Chart DOM element not found");return}if(this.chartInstance=l1==null?void 0:l1.init(t),!this.chartInstance)return;const a=parseInt((this.sourceData||[]).reduce((o,s)=>o+parseFloat((s==null?void 0:s.metric)||0),0),10),n={tooltip:{trigger:"item",formatter:o=>this.buildTooltipForDonut(o,[o.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:l,...xt(this.styleData||{}),title:{text:Ze(a),left:"center",top:"41%",textStyle:{color:"black",fontWeight:400,fontSize:"22px"}}};this.chartInstance.setOption(n),this.$emit("update:currentWidget",this.chartInstance),this.chartInstance.resize(),window.addEventListener("resize",()=>{var o;(o=this.chartInstance)==null||o.resize()})}catch(t){console.error("Error in initChart:",t)}}}},h_=["id"];function p_(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:s.uniqueID,ref:"chart",class:"h-full min-h-[200px] flex items-center"},null,8,h_)}const Sr=ve(c_,[["render",p_]]),y_=Object.freeze(Object.defineProperty({__proto__:null,default:Sr},Symbol.toStringTag,{value:"Module"})),n1=typeof window<"u"?window.echarts:null,u_={name:"VsPie",props:["currentWidget"],mixins:[Pe],data(){return{chartInstance:null,resizeObserver:null}},computed:{uniqueID(){return this.widget}},async mounted(){var a;await this.$nextTick(),await this.getData();const{series:l}=this.prepareData()||{};l&&this.initChart(l);const t=(a=this.$refs)==null?void 0:a.chart;t&&(this.resizeObserver=new ResizeObserver(()=>{this.chartInstance&&this.chartInstance.resize()}),this.resizeObserver.observe(t))},unmounted(){var l;(l=this.resizeObserver)==null||l.disconnect()},methods:{onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&this.initChart(l,t,a)}}catch(l){console.error(l)}},buildTooltipForDonut(l,t){const{name:a,value:n,percent:o}=l;return`
8288
8288
  <div style="background-color:${t[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
8289
- ${a==null?void 0:a.replace("null","Не визначено")}: ${We(n)} (${o}%)
8290
- </div>`},prepareData(){var l,t,a,n,o;try{this.styleData=this.styleData||{};const s=Array.from(new Set((this.sourceData||[]).map(m=>m[this.dimensions[0]]))),i=Array.from(new Set((this.sourceData||[]).map(m=>m[this.dimensions[1]]))),d=parseInt((this.sourceData||[]).reduce((m,f)=>m+parseFloat(f==null?void 0:f.metric),0),10),c=s.map((m,f)=>{const u=(i[f]/d*100).toFixed(2);return{name:`${m} (${u}%)`,value:i[f]}}),h=((l=this.styleData)==null?void 0:l.innerRadius)||"0%",p=((t=this.styleData)==null?void 0:t.outerRadius)||"100%",y=[h,p];return this.styleData.legend=fa.getLegendOpions({borderRadius:10,height:"100%",padding:10,type:"scroll",itemWidth:14,itemHeight:14,formatter:m=>m==null?void 0:m.replace("null","Не визначено"),textStyle:{fontSize:"14px"},...((a=this.styleData)==null?void 0:a.legend)||{}}),this.styleData.label=fa.getLabelOptions((n=this.styleData)==null?void 0:n.label),this.styleData.show_legend=((o=this.styleData)==null?void 0:o.show_legend)??!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:y,center:["50%","60%"],height:"75%",...xt(this.styleData),data:c}]}}catch(s){return console.error("Error in prepareData:",s),null}},async initChart(l){try{if(!l){console.warn("No series data available for chart initialization");return}const t=this.$refs.chart;if(!t){console.warn("Chart DOM element not found");return}if(this.chartInstance=n1==null?void 0:n1.init(t),!this.chartInstance)return;const a={tooltip:{trigger:"item",formatter:n=>this.buildTooltipForDonut(n,[n.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:l,...xt(this.styleData||{})};this.chartInstance.setOption(a),this.$emit("update:currentWidget",this.chartInstance),this.chartInstance.resize(),window.addEventListener("resize",()=>{var n;(n=this.chartInstance)==null||n.resize()})}catch(t){console.error("Error in initChart:",t)}}}},kE=["id"];function mE(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:s.uniqueID,ref:"chart",class:"h-full min-h-[200px] flex items-center"},null,8,kE)}const jr=ve(uE,[["render",mE]]),fE=Object.freeze(Object.defineProperty({__proto__:null,default:jr},Symbol.toStringTag,{value:"Module"})),gE={name:"VsLine",mixins:[Pe],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:l,xs:t}=this.prepareData();l&&this.initChart(l,t)},methods:{onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&(this==null||this.initChart(l,t,a))}}catch(l){console.error(l)}},prepareData(){var l,t;try{const a=Array.from(new Set(this.sourceData.map(i=>i[this.dimensions[0]])));let n;this.dimensions[0].includes("date")?n=a.map(i=>Ut(i)):n=[...a];const o=this.sourceData.map(i=>parseFloat(i[this.dimensions[1]]));let s;return(l=this.styleData)!=null&&l.stack?s=this.dimensions.slice(1).map(d=>({name:d,type:"line",stack:"a",areaStyle:this.styleData.area?{}:null,data:this.sourceData.filter(c=>parseFloat(c[d])).map(c=>parseFloat(c[d]))})):s=[{name:this.title,type:"line",areaStyle:(t=this.styleData)!=null&&t.area?{}:null,data:o,stack:"a"}],{series:s,xs:n}}catch(a){return console.error(a),null}}}},xE=["id"];function ME(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:o.uniqueID,ref:"chart",style:{height:"400px"}},null,8,xE)}const Ar=ve(gE,[["render",ME]]),bE=Object.freeze(Object.defineProperty({__proto__:null,default:Ar},Symbol.toStringTag,{value:"Module"})),wE={name:"VsStat",mixins:[Pe],data(){return{restDimensions:[],sumValue:0,columns:null,showTooltip:-1}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){this.columns=Object.keys(this.sourceData[0]);const l=this.getValues();this.sumValue=l.reduce((t,a)=>t+a,0),this.sourceData.forEach((t,a)=>{t.color=a<Br.length-1?Br[a]:nE()})},formattedValue(l){const t=parseFloat(l);return We(t)}}},vE={class:"flex flex-col w-full h-full pt-[16px] rounded-xl"},VE={class:"flex flex-col justify-between w-full h-full"},CE={class:"w-full h-full pb-6 space-y-4"},zE={class:"flex w-full h-3 rounded-full gap-x-1 min-h-3 custom-x-scrollbar"},BE=["onMouseover"],_E={key:0,class:"absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"},EE={class:"h-[calc(100%-20px)] w-full custom-scrollbar"},qE={class:"grid items-center justify-between grid-cols-2 py-2 gap-x-4"},SE={class:"flex items-center"},jE={class:"text-sm text-gray-800"},AE={class:"text-end"},DE={class:"text-sm text-gray-500"};function NE(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",vE,[e.createElementVNode("div",VE,[e.createElementVNode("div",CE,[e.createElementVNode("div",zE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>{var c,h,p,y;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap",`bg-[${i.color}]`]),style:e.normalizeStyle({width:`${parseFloat(i==null?void 0:i[(c=o.columns)==null?void 0:c[1]])/o.sumValue*100}%`}),role:"progressbar","aria-valuenow":"42","aria-valuemin":"0","aria-valuemax":"100",onMouseover:w=>o.showTooltip=d,onMouseleave:t[0]||(t[0]=w=>o.showTooltip=-1)},[o.showTooltip>-1?(e.openBlock(),e.createElementBlock("div",_E,e.toDisplayString(l.sourceData[o.showTooltip][o.columns[0]])+" "+e.toDisplayString((parseFloat((y=(h=l.sourceData)==null?void 0:h[o.showTooltip])==null?void 0:y[(p=o.columns)==null?void 0:p[1]])/o.sumValue*100).toFixed(2))+"% ",1)):e.createCommentVNode("",!0)],46,BE)}),256))]),e.createElementVNode("ul",EE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,i=>{var d,c;return e.openBlock(),e.createElementBlock("li",qE,[e.createElementVNode("div",SE,[e.createElementVNode("span",{class:e.normalizeClass(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]",`bg-[${i.color}]`])},null,2),e.createElementVNode("span",jE,e.toDisplayString((i==null?void 0:i[(d=o.columns)==null?void 0:d[0]])||"Не визначено"),1)]),e.createElementVNode("div",AE,[e.createElementVNode("span",DE,e.toDisplayString(s.formattedValue(i==null?void 0:i[(c=o.columns)==null?void 0:c[1]])||"-"),1)])])}),256))])])])])}const Dr=ve(wE,[["render",NE]]),LE=Object.freeze(Object.defineProperty({__proto__:null,default:Dr},Symbol.toStringTag,{value:"Module"})),HE={name:"VsProgressBar",mixins:[Pe],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){var t;this.columns=Object.keys((t=this.sourceData)==null?void 0:t[0])||null;const l=this.getValues();this.maxValue=Math.max(...l)},formattedValue(l){return We(l)}}},$E={key:0,class:"flex flex-col h-full pt-[16px] rounded-xl"},FE={class:"h-full pt-0 pb-6 space-y-4"},TE={class:"h-full space-y-4 custom-scrollbar"},PE={class:"flex items-center justify-between mr-2 gap-x-2"},IE={class:"grid items-center w-full grid-cols-2 gap-x-2"},RE={class:"text-sm text-gray-800"},OE={class:"flex justify-end",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100"},UE={class:"min-w-[60px] text-end"},ZE={class:"text-sm text-gray-500"};function WE(l,t,a,n,o,s){return o.columns?(e.openBlock(),e.createElementBlock("div",$E,[e.createElementVNode("div",FE,[e.createElementVNode("ul",TE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>(e.openBlock(),e.createElementBlock("li",PE,[e.createElementVNode("div",IE,[e.createElementVNode("span",RE,e.toDisplayString(i[o.columns[0]]),1),e.createElementVNode("div",OE,[e.createElementVNode("div",{class:"h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",style:e.normalizeStyle({width:`${parseFloat(i[o.columns[1]])/o.maxValue*100}%`})},null,4)])]),e.createElementVNode("div",UE,[e.createElementVNode("span",ZE,e.toDisplayString(s.formattedValue(i[o.columns[1]])),1)])]))),256))])])])):e.createCommentVNode("",!0)}const Nr=ve(HE,[["render",WE]]),GE=Object.freeze(Object.defineProperty({__proto__:null,default:Nr},Symbol.toStringTag,{value:"Module"})),KE={name:"VsListbar",mixins:[Pe],props:["source"],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch(l){console.error(l)}},prepareData(){var t,a,n;this.columns=Object.keys(((t=this.sourceData)==null?void 0:t[0])||{});const l=(a=this.sourceData)==null?void 0:a.map(o=>{var s;return o==null?void 0:o[(s=this.columns)==null?void 0:s[1]]});this.maxValue=Math.max(...l||[]),this.restDimensions=(n=this.columns)==null?void 0:n.filter((o,s)=>s!==0)},formattedValue(l){return We(l)},getWidth(l){return`${l/this.maxValue*100}%`}}},JE={class:"h-full pt-[20px] list-bar"},YE={class:"space-y-2 custom-scrollbar h-full h-[calc(100%-20px)]"},XE={class:"relative w-full truncate"},QE={class:"relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800"},eq={class:"text-[14px] text-gray-500"};function tq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",JE,[e.createElementVNode("ul",YE,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>{var c,h,p;return e.openBlock(),e.createElementBlock("li",{key:d,class:"flex items-center justify-between w-full gap-x-2"},[e.createElementVNode("div",XE,[e.createElementVNode("span",QE,e.toDisplayString((i==null?void 0:i[(c=o.columns)==null?void 0:c[0]])||"Без категорії"),1),e.createElementVNode("div",{class:e.normalizeClass(["absolute inset-y-0 h-full rounded start-0",i!=null&&i[(h=o.columns)==null?void 0:h[0]]?"bg-indigo-100":"bg-gray-100"]),style:e.normalizeStyle({width:s.getWidth(i==null?void 0:i[(p=o.columns)==null?void 0:p[1]])})},null,6)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.restDimensions,(y,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"w-20 mr-2 text-end"},[e.createElementVNode("span",eq,e.toDisplayString(s.formattedValue(i==null?void 0:i[y])),1)]))),128))])}),128))])])}const Lr=ve(KE,[["render",tq]]),aq=Object.freeze(Object.defineProperty({__proto__:null,default:Lr},Symbol.toStringTag,{value:"Module"})),rq={name:"VsPivotTable",mixins:[Pe],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const l=Array.from(new Set(this.sourceData.map(t=>t[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=l.map(t=>Ut(t)):this.xs=[...l],this.products=this.dimensions.filter((t,a)=>a!=0),this.values=this.products.map((t,a)=>({name:t,data:this.sourceData.filter(n=>parseFloat(n[t])).map(n=>We(parseFloat(n[t])))}))}catch(l){console.error(l)}}}},lq={class:"flex flex-col h-full p-5 space-y-4 rounded-xl custom-scrollbar"},nq={class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 custom-scrollbar"},oq={class:"inline-block min-w-full align-middle"},sq={class:"min-w-full divide-y divide-gray-200"},iq={class:"space-x-2"},dq={scope:"col",class:"xl:min-w-[120px] min-w-48"},cq={class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"},hq={class:"divide-y divide-gray-200 text-[12px]"},pq={class:"py-3 size-px whitespace-nowrap"},yq={class:"flex items-center gap-x-3"},uq={class:"font-medium text-gray-800"},kq={class:"py-3 size-px whitespace-nowrap"},mq={class:"text-gray-600"};function fq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",lq,[e.createElementVNode("div",nq,[e.createElementVNode("div",oq,[e.createElementVNode("table",sq,[e.createElementVNode("thead",null,[e.createElementVNode("tr",iq,[t[0]||(t[0]=e.createElementVNode("th",{scope:"col",class:"min-w-[200px]"},[e.createElementVNode("div",{class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"})],-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.xs,i=>(e.openBlock(),e.createElementBlock("th",dq,[e.createElementVNode("div",cq,e.toDisplayString(i),1)]))),256))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.values,i=>(e.openBlock(),e.createElementBlock("tbody",hq,[e.createElementVNode("tr",null,[e.createElementVNode("td",pq,[e.createElementVNode("div",yq,[e.createElementVNode("span",uq,e.toDisplayString(i.name),1)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.xs,(d,c)=>(e.openBlock(),e.createElementBlock("td",kq,[e.createElementVNode("span",mq,e.toDisplayString(i.data[c]),1)]))),256))])]))),256))])])])])}const Hr=ve(rq,[["render",fq]]),gq=Object.freeze(Object.defineProperty({__proto__:null,default:Hr},Symbol.toStringTag,{value:"Module"})),xq={name:"VsNumber",mixins:[Pe],data(){return{number:""}},computed:{formattedNumber(){return aE(this.number)},prefix(){var l,t;return(l=this.styleData)!=null&&l.prefix?(t=this.styleData)==null?void 0:t.prefix:""}},watch:{sourceData:{async handler(){this.getNumber()},deep:!0}},async mounted(){await this.getData(),this.getNumber()},methods:{onChangedData(){try{this.sourceData&&this.getNumber()}catch(l){console.error(l)}},async getNumber(){var l,t;try{this.number=((t=this.sourceData[0])==null?void 0:t[Object.keys((l=this.sourceData)==null?void 0:l[0])])||0}catch(a){console.error(a)}}}},Mq={class:"text-lg lg:text-xl xl:text-2xl text-gray-800 h-[32px] flex items-center"};function bq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",Mq,e.toDisplayString(s.prefix)+e.toDisplayString(s.formattedNumber),1)}const wq=Object.freeze(Object.defineProperty({__proto__:null,default:ve(xq,[["render",bq]])},Symbol.toStringTag,{value:"Module"})),vq={name:"VsText",mixins:[Pe],data(){return{markedText:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget;try{await this.getData(),this.markedText=be(this.sourceData)}catch(l){console.error(l)}},methods:{onChangedData(){return null}}},Vq=["id"],Cq=["innerHTML"];function zq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:o.uniqueID,class:"relative select-auto h-full rounded-xl text-[12px] box-border bg-white custom-scrollbar text-widget"},[o.markedText?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:o.markedText},null,8,Cq)):e.createCommentVNode("",!0)],8,Vq)}const Bq=Object.freeze(Object.defineProperty({__proto__:null,default:ve(vq,[["render",zq]])},Symbol.toStringTag,{value:"Module"})),o1=typeof window<"u"?window.echarts:null,_q={name:"VsFunnelBar",mixins:[Pe],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:l}=this.prepareData();l&&this.initChart(l)},methods:{buildTooltipForDonut(l,t){const{name:a,value:n,percent:o}=l;return`
8289
+ ${a==null?void 0:a.replace("null","Не визначено")}: ${Ze(n)} (${o}%)
8290
+ </div>`},prepareData(){var l,t,a,n,o;try{this.styleData=this.styleData||{};const s=Array.from(new Set((this.sourceData||[]).map(m=>m[this.dimensions[0]]))),i=Array.from(new Set((this.sourceData||[]).map(m=>m[this.dimensions[1]]))),d=parseInt((this.sourceData||[]).reduce((m,f)=>m+parseFloat(f==null?void 0:f.metric),0),10),c=s.map((m,f)=>{const u=(i[f]/d*100).toFixed(2);return{name:`${m} (${u}%)`,value:i[f]}}),h=((l=this.styleData)==null?void 0:l.innerRadius)||"0%",p=((t=this.styleData)==null?void 0:t.outerRadius)||"100%",y=[h,p];return this.styleData.legend=fa.getLegendOpions({borderRadius:10,height:"100%",padding:10,type:"scroll",itemWidth:14,itemHeight:14,formatter:m=>m==null?void 0:m.replace("null","Не визначено"),textStyle:{fontSize:"14px"},...((a=this.styleData)==null?void 0:a.legend)||{}}),this.styleData.label=fa.getLabelOptions((n=this.styleData)==null?void 0:n.label),this.styleData.show_legend=((o=this.styleData)==null?void 0:o.show_legend)??!0,{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"pie",radius:y,center:["50%","60%"],height:"75%",...xt(this.styleData),data:c}]}}catch(s){return console.error("Error in prepareData:",s),null}},async initChart(l){try{if(!l){console.warn("No series data available for chart initialization");return}const t=this.$refs.chart;if(!t){console.warn("Chart DOM element not found");return}if(this.chartInstance=n1==null?void 0:n1.init(t),!this.chartInstance)return;const a={tooltip:{trigger:"item",formatter:n=>this.buildTooltipForDonut(n,[n.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[15,15],shadowColor:"transparent",backgroundColor:"transparent"},series:l,...xt(this.styleData||{})};this.chartInstance.setOption(a),this.$emit("update:currentWidget",this.chartInstance),this.chartInstance.resize(),window.addEventListener("resize",()=>{var n;(n=this.chartInstance)==null||n.resize()})}catch(t){console.error("Error in initChart:",t)}}}},k_=["id"];function m_(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:s.uniqueID,ref:"chart",class:"h-full min-h-[200px] flex items-center"},null,8,k_)}const jr=ve(u_,[["render",m_]]),f_=Object.freeze(Object.defineProperty({__proto__:null,default:jr},Symbol.toStringTag,{value:"Module"})),g_={name:"VsLine",mixins:[Pe],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:l,xs:t}=this.prepareData();l&&this.initChart(l,t)},methods:{onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&(this==null||this.initChart(l,t,a))}}catch(l){console.error(l)}},prepareData(){var l,t;try{const a=Array.from(new Set(this.sourceData.map(i=>i[this.dimensions[0]])));let n;this.dimensions[0].includes("date")?n=a.map(i=>Ut(i)):n=[...a];const o=this.sourceData.map(i=>parseFloat(i[this.dimensions[1]]));let s;return(l=this.styleData)!=null&&l.stack?s=this.dimensions.slice(1).map(d=>({name:d,type:"line",stack:"a",areaStyle:this.styleData.area?{}:null,data:this.sourceData.filter(c=>parseFloat(c[d])).map(c=>parseFloat(c[d]))})):s=[{name:this.title,type:"line",areaStyle:(t=this.styleData)!=null&&t.area?{}:null,data:o,stack:"a"}],{series:s,xs:n}}catch(a){return console.error(a),null}}}},x_=["id"];function M_(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:o.uniqueID,ref:"chart",style:{height:"400px"}},null,8,x_)}const Ar=ve(g_,[["render",M_]]),b_=Object.freeze(Object.defineProperty({__proto__:null,default:Ar},Symbol.toStringTag,{value:"Module"})),w_={name:"VsStat",mixins:[Pe],data(){return{restDimensions:[],sumValue:0,columns:null,showTooltip:-1}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){this.columns=Object.keys(this.sourceData[0]);const l=this.getValues();this.sumValue=l.reduce((t,a)=>t+a,0),this.sourceData.forEach((t,a)=>{t.color=a<Br.length-1?Br[a]:n_()})},formattedValue(l){const t=parseFloat(l);return Ze(t)}}},v_={class:"flex flex-col w-full h-full pt-[16px] rounded-xl"},V_={class:"flex flex-col justify-between w-full h-full"},C_={class:"w-full h-full pb-6 space-y-4"},z_={class:"flex w-full h-3 rounded-full gap-x-1 min-h-3 custom-x-scrollbar"},B_=["onMouseover"],E_={key:0,class:"absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"},__={class:"h-[calc(100%-20px)] w-full custom-scrollbar"},q_={class:"grid items-center justify-between grid-cols-2 py-2 gap-x-4"},S_={class:"flex items-center"},j_={class:"text-sm text-gray-800"},A_={class:"text-end"},D_={class:"text-sm text-gray-500"};function N_(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",v_,[e.createElementVNode("div",V_,[e.createElementVNode("div",C_,[e.createElementVNode("div",z_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>{var c,h,p,y;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap",`bg-[${i.color}]`]),style:e.normalizeStyle({width:`${parseFloat(i==null?void 0:i[(c=o.columns)==null?void 0:c[1]])/o.sumValue*100}%`}),role:"progressbar","aria-valuenow":"42","aria-valuemin":"0","aria-valuemax":"100",onMouseover:w=>o.showTooltip=d,onMouseleave:t[0]||(t[0]=w=>o.showTooltip=-1)},[o.showTooltip>-1?(e.openBlock(),e.createElementBlock("div",E_,e.toDisplayString(l.sourceData[o.showTooltip][o.columns[0]])+" "+e.toDisplayString((parseFloat((y=(h=l.sourceData)==null?void 0:h[o.showTooltip])==null?void 0:y[(p=o.columns)==null?void 0:p[1]])/o.sumValue*100).toFixed(2))+"% ",1)):e.createCommentVNode("",!0)],46,B_)}),256))]),e.createElementVNode("ul",__,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,i=>{var d,c;return e.openBlock(),e.createElementBlock("li",q_,[e.createElementVNode("div",S_,[e.createElementVNode("span",{class:e.normalizeClass(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]",`bg-[${i.color}]`])},null,2),e.createElementVNode("span",j_,e.toDisplayString((i==null?void 0:i[(d=o.columns)==null?void 0:d[0]])||"Не визначено"),1)]),e.createElementVNode("div",A_,[e.createElementVNode("span",D_,e.toDisplayString(s.formattedValue(i==null?void 0:i[(c=o.columns)==null?void 0:c[1]])||"-"),1)])])}),256))])])])])}const Dr=ve(w_,[["render",N_]]),L_=Object.freeze(Object.defineProperty({__proto__:null,default:Dr},Symbol.toStringTag,{value:"Module"})),H_={name:"VsProgressBar",mixins:[Pe],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){var t;this.columns=Object.keys((t=this.sourceData)==null?void 0:t[0])||null;const l=this.getValues();this.maxValue=Math.max(...l)},formattedValue(l){return Ze(l)}}},$_={key:0,class:"flex flex-col h-full pt-[16px] rounded-xl"},F_={class:"h-full pt-0 pb-6 space-y-4"},T_={class:"h-full space-y-4 custom-scrollbar"},P_={class:"flex items-center justify-between mr-2 gap-x-2"},I_={class:"grid items-center w-full grid-cols-2 gap-x-2"},R_={class:"text-sm text-gray-800"},O_={class:"flex justify-end",role:"progressbar","aria-valuenow":"100","aria-valuemin":"0","aria-valuemax":"100"},U_={class:"min-w-[60px] text-end"},Z_={class:"text-sm text-gray-500"};function W_(l,t,a,n,o,s){return o.columns?(e.openBlock(),e.createElementBlock("div",$_,[e.createElementVNode("div",F_,[e.createElementVNode("ul",T_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>(e.openBlock(),e.createElementBlock("li",P_,[e.createElementVNode("div",I_,[e.createElementVNode("span",R_,e.toDisplayString(i[o.columns[0]]),1),e.createElementVNode("div",O_,[e.createElementVNode("div",{class:"h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",style:e.normalizeStyle({width:`${parseFloat(i[o.columns[1]])/o.maxValue*100}%`})},null,4)])]),e.createElementVNode("div",U_,[e.createElementVNode("span",Z_,e.toDisplayString(s.formattedValue(i[o.columns[1]])),1)])]))),256))])])])):e.createCommentVNode("",!0)}const Nr=ve(H_,[["render",W_]]),G_=Object.freeze(Object.defineProperty({__proto__:null,default:Nr},Symbol.toStringTag,{value:"Module"})),K_={name:"VsListbar",mixins:[Pe],props:["source"],data(){return{restDimensions:[],maxValue:0,columns:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch(l){console.error(l)}},prepareData(){var t,a,n;this.columns=Object.keys(((t=this.sourceData)==null?void 0:t[0])||{});const l=(a=this.sourceData)==null?void 0:a.map(o=>{var s;return o==null?void 0:o[(s=this.columns)==null?void 0:s[1]]});this.maxValue=Math.max(...l||[]),this.restDimensions=(n=this.columns)==null?void 0:n.filter((o,s)=>s!==0)},formattedValue(l){return Ze(l)},getWidth(l){return`${l/this.maxValue*100}%`}}},J_={class:"h-full pt-[20px] list-bar"},Y_={class:"space-y-2 custom-scrollbar h-full h-[calc(100%-20px)]"},X_={class:"relative w-full truncate"},Q_={class:"relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800"},eq={class:"text-[14px] text-gray-500"};function tq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",J_,[e.createElementVNode("ul",Y_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>{var c,h,p;return e.openBlock(),e.createElementBlock("li",{key:d,class:"flex items-center justify-between w-full gap-x-2"},[e.createElementVNode("div",X_,[e.createElementVNode("span",Q_,e.toDisplayString((i==null?void 0:i[(c=o.columns)==null?void 0:c[0]])||"Без категорії"),1),e.createElementVNode("div",{class:e.normalizeClass(["absolute inset-y-0 h-full rounded start-0",i!=null&&i[(h=o.columns)==null?void 0:h[0]]?"bg-indigo-100":"bg-gray-100"]),style:e.normalizeStyle({width:s.getWidth(i==null?void 0:i[(p=o.columns)==null?void 0:p[1]])})},null,6)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.restDimensions,(y,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"w-20 mr-2 text-end"},[e.createElementVNode("span",eq,e.toDisplayString(s.formattedValue(i==null?void 0:i[y])),1)]))),128))])}),128))])])}const Lr=ve(K_,[["render",tq]]),aq=Object.freeze(Object.defineProperty({__proto__:null,default:Lr},Symbol.toStringTag,{value:"Module"})),rq={name:"VsPivotTable",mixins:[Pe],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const l=Array.from(new Set(this.sourceData.map(t=>t[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=l.map(t=>Ut(t)):this.xs=[...l],this.products=this.dimensions.filter((t,a)=>a!=0),this.values=this.products.map((t,a)=>({name:t,data:this.sourceData.filter(n=>parseFloat(n[t])).map(n=>Ze(parseFloat(n[t])))}))}catch(l){console.error(l)}}}},lq={class:"flex flex-col h-full p-5 space-y-4 rounded-xl custom-scrollbar"},nq={class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 custom-scrollbar"},oq={class:"inline-block min-w-full align-middle"},sq={class:"min-w-full divide-y divide-gray-200"},iq={class:"space-x-2"},dq={scope:"col",class:"xl:min-w-[120px] min-w-48"},cq={class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"},hq={class:"divide-y divide-gray-200 text-[12px]"},pq={class:"py-3 size-px whitespace-nowrap"},yq={class:"flex items-center gap-x-3"},uq={class:"font-medium text-gray-800"},kq={class:"py-3 size-px whitespace-nowrap"},mq={class:"text-gray-600"};function fq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",lq,[e.createElementVNode("div",nq,[e.createElementVNode("div",oq,[e.createElementVNode("table",sq,[e.createElementVNode("thead",null,[e.createElementVNode("tr",iq,[t[0]||(t[0]=e.createElementVNode("th",{scope:"col",class:"min-w-[200px]"},[e.createElementVNode("div",{class:"py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500"})],-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.xs,i=>(e.openBlock(),e.createElementBlock("th",dq,[e.createElementVNode("div",cq,e.toDisplayString(i),1)]))),256))])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.values,i=>(e.openBlock(),e.createElementBlock("tbody",hq,[e.createElementVNode("tr",null,[e.createElementVNode("td",pq,[e.createElementVNode("div",yq,[e.createElementVNode("span",uq,e.toDisplayString(i.name),1)])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.xs,(d,c)=>(e.openBlock(),e.createElementBlock("td",kq,[e.createElementVNode("span",mq,e.toDisplayString(i.data[c]),1)]))),256))])]))),256))])])])])}const Hr=ve(rq,[["render",fq]]),gq=Object.freeze(Object.defineProperty({__proto__:null,default:Hr},Symbol.toStringTag,{value:"Module"})),xq={name:"VsNumber",mixins:[Pe],data(){return{number:""}},computed:{formattedNumber(){return a_(this.number)},prefix(){var l,t;return(l=this.styleData)!=null&&l.prefix?(t=this.styleData)==null?void 0:t.prefix:""}},watch:{sourceData:{async handler(){this.getNumber()},deep:!0}},async mounted(){await this.getData(),this.getNumber()},methods:{onChangedData(){try{this.sourceData&&this.getNumber()}catch(l){console.error(l)}},async getNumber(){var l,t;try{this.number=((t=this.sourceData[0])==null?void 0:t[Object.keys((l=this.sourceData)==null?void 0:l[0])])||0}catch(a){console.error(a)}}}},Mq={class:"text-lg lg:text-xl xl:text-2xl text-gray-800 h-[32px] flex items-center"};function bq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",Mq,e.toDisplayString(s.prefix)+e.toDisplayString(s.formattedNumber),1)}const wq=Object.freeze(Object.defineProperty({__proto__:null,default:ve(xq,[["render",bq]])},Symbol.toStringTag,{value:"Module"})),vq={name:"VsText",mixins:[Pe],data(){return{markedText:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget;try{await this.getData(),this.markedText=we(this.sourceData)}catch(l){console.error(l)}},methods:{onChangedData(){return null}}},Vq=["id"],Cq=["innerHTML"];function zq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{id:o.uniqueID,class:"relative select-auto h-full rounded-xl text-[12px] box-border bg-white custom-scrollbar text-widget"},[o.markedText?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:o.markedText},null,8,Cq)):e.createCommentVNode("",!0)],8,Vq)}const Bq=Object.freeze(Object.defineProperty({__proto__:null,default:ve(vq,[["render",zq]])},Symbol.toStringTag,{value:"Module"})),o1=typeof window<"u"?window.echarts:null,Eq={name:"VsFunnelBar",mixins:[Pe],data(){return{chartInstance:null,uniqueID:null}},async mounted(){this.uniqueID=this.widget,await this.$nextTick(),await this.getData();const{series:l}=this.prepareData();l&&this.initChart(l)},methods:{buildTooltipForDonut(l,t){const{name:a,value:n,percent:o}=l;return`
8291
8291
  <div style="background-color:${t[0]};font-size: 12px; font-family: Helvetica, Arial, sans-serif;color:#ffff; padding:5px; border-radius:5px; ![box-shadow:none]">
8292
- ${Ut(a)}: ${We(n)} (${o}%)
8293
- </div>`},onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&(this==null||this.initChart(l,t,a))}}catch{}},prepareData(){try{const l=Array.from(new Set(this.sourceData.map(o=>o[this.dimensions[0]]))),t=Array.from(new Set(this.sourceData.map(o=>o[this.dimensions[1]]))),a=l.map((o,s)=>({name:o,value:t[s]}));return{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"funnel",...xt(this.styleData),data:a,height:"80%",emphasis:{label:{show:!1}}}]}}catch(l){console.error(l)}},async initChart(l){try{const t=this.$refs.chart,a=o1==null?void 0:o1.init(t);if(!a)return;const n={series:l,...xt(this.styleData),tooltip:{trigger:"item",formatter:o=>this.buildTooltipForDonut(o,[o.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[10,15],shadowColor:"transparent",backgroundColor:"transparent"},itemStyle:{height:"15px"},legend:{borderRadius:10,type:"scroll",itemWidth:14,itemHeight:14,...this.styleData.legend},labelLine:{show:!1},grid:{bottom:"0"}};a.setOption(n),a.resize(),window.addEventListener("resize",()=>{a.resize()})}catch(t){console.error(t)}}}},Eq=["id"];function qq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{ref:"chart",id:o.uniqueID,class:"h-[90%] custom-scrollbar min-h-[200px]"},null,8,Eq)}const Sq=Object.freeze(Object.defineProperty({__proto__:null,default:ve(_q,[["render",qq]])},Symbol.toStringTag,{value:"Module"}));function jq(l){return[{type:"fill",paint:{"fill-color":l.color||"#ccc","fill-outline-color":l.color||"blue","fill-opacity":l.opacity||1}}]}function Aq(l){return[{type:"line",paint:{"line-color":l.color||"#ccc","line-opacity":l.opacity||1}}]}function Dq(l){return[{type:"circle",paint:{"circle-radius":l.radius||6,"circle-stroke-color":l.stroke||"#ccc","circle-stroke-width":l.width||1,"circle-color":l.color||"blue"}}]}function $r(l){if(!l)return null;const t=l.type||"point";return t==="polygon"?jq(l):t==="line"?Aq(l):Dq(l)}const s1={data(){return{layerList:[],activeLayer:""}},computed:{interactiveSources(){return this.layerList.filter(l=>l==null?void 0:l.interactive).map(l=>l.id)}},methods:{moveLayer(l,t=this.map){t.getStyle().layers.forEach(a=>{a.id.match(l)&&t.moveLayer(a.id)})},async setVisible(l,t=!0,a=this.map){if(!l)return;const n=(l==null?void 0:l.id)||l,o=this.layerList.find(i=>i.id===l)||l;if(!(o!=null&&o.id))throw new Error("MixinError: Layer has no id");const s=a.getStyle().layers.filter(i=>i.id.match(n));s.forEach(i=>{a.setLayoutProperty(i.id,"visibility",t?"visible":"none")}),!s.length&&t&&await this.addLayer(o)},async addLayer(l,t=this==null?void 0:this.map){var o,s;const a=this.layerList.find(i=>i.id===l)||l;!this.map.getStyle()||this.map.getStyle().layers.find(i=>i.id===a.id)||(this.layerList.find(i=>i.id===a.id)||this.layerList.push(a),(a.service==="vtile"||a.service==="vector"||(o=a.url)!=null&&o.includes(".vmt"))&&this.addVtileLayer(a,t),a.service==="geojson"&&this.addGeoJsonLayer(a,t),((s=a.url)!=null&&s.includes(".png")||["tms","raster"].includes(a.service))&&await this.addRasterLayer(a,t))},async addRasterLayer(l,t=this==null?void 0:this.map){var a,n;t.getSource(l.id)||(await t.addSource(l.id,{type:"raster",tiles:[l==null?void 0:l.url],tileSize:256,...l!=null&&l.scheme?{scheme:l==null?void 0:l.scheme}:{}}),await t.addLayer({id:l.id,type:"raster",source:l.id,minzoom:0,maxzoom:(l==null?void 0:l.maxzoom)||22},l.basemap?(n=(a=this.map.getStyle().layers)==null?void 0:a[0])==null?void 0:n.id:null))},async addVtileLayer(l,t=this==null?void 0:this.map){var s;const a=["props","pointZoom"].filter(i=>l[i]).map(i=>`&${i}=${l[i]}`),n={type:"vector",tiles:[`${(s=l==null?void 0:l.url)!=null&&s.startsWith("http")?"":window.location.origin}${l==null?void 0:l.url}${a}`],minzoom:l.minzoom||3,maxzoom:l.maxzoom||24};t.addSource(l.id,n),($r(l.style)||l.layers||[]).forEach((i,d)=>{const c={...i,id:`${l.id}-${d}`,source:l.id,"source-layer":i["source-layer"]||l.source||l.id,maxzoom:+i.maxzoom||24,minzoom:+i.minzoom||0};t.addLayer(c)})},async addGeoJsonLayer(l,t=this.map){var o;const a=l.data||((o=l==null?void 0:l.url)!=null&&o.startsWith("http")?"":window.location.origin)+l.url;t.addSource(l.id,{type:"geojson",data:a}),($r(l.style)||l.layers||[]).forEach(s=>{const i={...s,source:l.id,id:s.id||l.id,maxzoom:+s.maxzoom||24,minzoom:+s.minzoom||0,type:s.type||"circle"};t.addLayer(i)})},setLayerData(l,t){this.layerList=this.layerList.map(a=>a.id===l?{...a,...t}:a)},async removeLayer(l,t=this.map){t.getSource(l)&&(await t.getStyle().layers.forEach(async a=>{a.source===l&&await t.removeLayer(a.id)}),await t.removeSource(l))},async setFilter(l,t){var o;const a=this.layerList.find(s=>s.id===l),n=await((o=this.map)==null?void 0:o.getSource(l));if(n&&a.service==="vtile"){await n.setTiles([`${window.location.origin}${a.url}${a.url.includes("?")?"&":"?"}filter=${t}${a.props?`&props=${a.props}`:""}`]);return}n&&a.service},async changeBaseLayer(l){const t=l!=null&&l.id?l:this.layerList.find(n=>n.id===l),{id:a}=t;if(a&&a!==this.activeLayer){if(this.activeLayer&&this.map.setLayoutProperty(this.activeLayer,"visibility","none"),this.activeLayer=a,this.map.getLayer(a)){this.map.setLayoutProperty(a,"visibility","visible");return}await this.addRasterLayer(t)}},async refreshLayer(l,t=this.map){await t.getStyle().layers.forEach(a=>{a.source===l&&t.removeLayer(a.id)}),await t.removeSource(l),this.setVisible(l)}}},Nq="https://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.js",Lq="https://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.css";let ga=null;function Hq(l){return new Promise((t,a)=>{if(document.querySelector(`script[src="${l}"]`)){t();return}const n=document.createElement("script");n.src=l,n.onload=()=>t(),n.onerror=()=>a(new Error(`Failed to load ${l}`)),document.head.appendChild(n)})}function $q(l){return new Promise((t,a)=>{if(document.querySelector(`link[href="${l}"]`)){t();return}const n=document.createElement("link");n.rel="stylesheet",n.href=l,n.onload=()=>t(),n.onerror=()=>a(new Error(`Failed to load ${l}`)),document.head.appendChild(n)})}function Fr(){return typeof window>"u"?Promise.resolve(null):window.maplibregl?Promise.resolve(window.maplibregl):ga||(ga=$q(Lq).then(()=>Hq(Nq)).then(()=>window.maplibregl),ga)}const i1={__name:"legend",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(U1),e.mergeProps(t.$attrs,{size:24}),null,16))}},d1={pink:["#fde7e2","#feafbe","#fd58a4","#d7038e","#86007b"],blue:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],green:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],pink2:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],red:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],teal:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"]},Fq={components:{legendIcon:i1,closeIcon:Ga},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:d1}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((l,t)=>l-t)},maxWidht(){var a;const l=((a=this.sizes)==null?void 0:a.length)-1;return this.calcSize(l)}},methods:{sizeClass(l){return this.resizeItem?`h-[${this.calcSize(l)}] w-[${this.calcSize(l)}] ${this.borderRadius}`:`h-[18px] w-[18px] ${this.borderRadius}`},calcSize(l){return`${10+l*2}px`},getOpacity(l){return(l+1)/this.sortedSizes.length}}},Tq={class:"w-full absolute max-w-[200px] bg-white border rounded-lg bottom-[10px] right-[50px]"},Pq={class:"flex items-center justify-between border-b border-[#0000001A] px-2"},Iq={class:"w-full flex flex-col gap-[8px] px-2 py-2 max-h-[200px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},Rq={key:0,class:"flex flex-col w-full"},Oq={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},Uq={class:"flex flex-col gap-[6px]"},Zq={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"},Wq={key:1,class:"flex flex-col w-full"},Gq={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},Kq={class:"flex flex-col gap-[6px]"},Jq={class:"flex flex-row items-center justify-start"},Yq={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"};function Xq(l,t,a,n,o,s){var c,h;const i=e.resolveComponent("legendIcon"),d=e.resolveComponent("closeIcon");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]",onClick:t[0]||(t[0]=p=>o.isOpenLegend=!o.isOpenLegend)},[e.createVNode(i)]),o.isOpenLegend?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:`#wrapper-${a.mapId}`},[e.createElementVNode("div",Tq,[e.createElementVNode("div",Pq,[t[2]||(t[2]=e.createElementVNode("h3",{class:"text-[16px] font-normal text-black"},"Легенда",-1)),e.createElementVNode("button",{type:"button",class:"inline-flex items-center text-sm font-medium text-gray-500 rounded-lg gap-x-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500 dark:focus:text-blue-500",onClick:t[1]||(t[1]=p=>o.isOpenLegend=!1)},[e.createVNode(d,{class:"w-[20px]"})])]),e.createElementVNode("div",Iq,[(c=a.colors)!=null&&c.length?(e.openBlock(),e.createElementBlock("div",Rq,[a.colorTitle?(e.openBlock(),e.createElementBlock("h4",Oq,e.toDisplayString(a.colorTitle),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Uq,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.colors,(p,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"flex items-center gap-[10px]"},[p.color?(e.openBlock(),e.createElementBlock("div",{key:0,class:"w-[12px] h-[12px] rounded-full",style:e.normalizeStyle({backgroundColor:p.color})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("p",Zq,e.toDisplayString(p.text||p.val),1)]))),128))])])):e.createCommentVNode("",!0),(h=a.sizes)!=null&&h.length?(e.openBlock(),e.createElementBlock("div",Wq,[l.sizeTitle?(e.openBlock(),e.createElementBlock("h4",Gq,e.toDisplayString(l.sizeTitle),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Kq,[s.sortedSizes.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.sortedSizes,(p,y)=>{var w,m,f,u,g;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Jq,[e.createElementVNode("div",{class:e.normalizeClass([s.maxWidht?`w-[${s.maxWidht}]`:"","mr-[10px]"])},[e.createElementVNode("div",{class:e.normalizeClass(s.sizeClass(y)),style:e.normalizeStyle({backgroundColor:((m=(w=o.palette)==null?void 0:w[a.color])==null?void 0:m[y])||a.color})},null,6)],2),e.createElementVNode("p",Yq,e.toDisplayString(y===((f=s.sortedSizes)==null?void 0:f.length)-1?">"+p:y==((u=s.sortedSizes)==null?void 0:u.length)-1?">"+s.sortedSizes[((g=s.sortedSizes)==null?void 0:g.length)-1]:p+"-"+s.sortedSizes[y+1]),1)])])}),256)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])])],8,["to"])):e.createCommentVNode("",!0)],64)}const Qq=ve(Fq,[["render",Xq]]),eS={props:["map","coordinates"],data(){return{isMenuVisible:!1}},computed:{getCoordinates(){var t;return!(this!=null&&this.coordinates)||((t=this.coordinates)==null?void 0:t.length)!==2?"":(this==null?void 0:this.coordinates).slice().reverse().map(a=>Number(a).toFixed(5)).join(", ")}}},tS={class:"map__settings"},aS={ref:"attribution",class:"map__settings-attribution map__settings-item mt-[3px]"};function rS(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",tS,[e.createElementVNode("div",aS,[e.withDirectives(e.createElementVNode("div",{ref:"mouse",class:"map__settings-item",style:{"min-width":"115px"}},e.toDisplayString(s.getCoordinates),513),[[e.vShow,s.getCoordinates]])],512)])}const Tr=ve(eS,[["render",rS]]),lS={mixins:[s1],props:{map:{type:Object,default:()=>null}},data(){return{baseLayers:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png"},{id:"graymap",name:"Сіра карта",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/positron/ua/10/601/348.png"}]}},watch:{map(l){l&&l.on("load",this.handleMapLoad)}},created(){this.baseLayers.forEach(l=>{const t={...l,basemap:!0};this.layerList.push(t)})},methods:{handleMapLoad(){this.changeBaseLayer("graymap")},isLayerInFocus(l){return l.id===this.activeLayer}}},nS={class:"vs-map-slot-layers"},oS=["onClick"],sS=["src"];function iS(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",nS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.baseLayers,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:e.normalizeClass(["vs-map-slot-layers__layer",{focused:s.isLayerInFocus(i)}]),onClick:d=>l.changeBaseLayer(i.id)},[e.createElementVNode("img",{src:i.image,class:"vs-map-slot-layers__image"},null,8,sS)],10,oS))),128))])}const Pr=ve(lS,[["render",iS]]);function Ir(l,t,a){if(l!==null)for(var n,o,s,i,d,c,h,p=0,y=0,w,m=l.type,f=m==="FeatureCollection",u=m==="Feature",g=f?l.features.length:1,M=0;M<g;M++){h=f?l.features[M].geometry:u?l.geometry:l,w=h?h.type==="GeometryCollection":!1,d=w?h.geometries.length:1;for(var x=0;x<d;x++){var k=0,v=0;if(i=w?h.geometries[x]:h,i!==null){c=i.coordinates;var V=i.type;switch(p=0,V){case null:break;case"Point":if(t(c,y,M,k,v)===!1)return!1;y++,k++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(t(c[n],y,M,k,v)===!1)return!1;y++,V==="MultiPoint"&&k++}V==="LineString"&&k++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(o=0;o<c[n].length-p;o++){if(t(c[n][o],y,M,k,v)===!1)return!1;y++}V==="MultiLineString"&&k++,V==="Polygon"&&v++}V==="Polygon"&&k++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(v=0,o=0;o<c[n].length;o++){for(s=0;s<c[n][o].length-p;s++){if(t(c[n][o][s],y,M,k,v)===!1)return!1;y++}v++}k++}break;case"GeometryCollection":for(n=0;n<i.geometries.length;n++)if(Ir(i.geometries[n],t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function dS(l,t={}){if(l.bbox!=null&&t.recompute!==!0)return l.bbox;const a=[1/0,1/0,-1/0,-1/0];return Ir(l,n=>{a[0]>n[0]&&(a[0]=n[0]),a[1]>n[1]&&(a[1]=n[1]),a[2]<n[0]&&(a[2]=n[0]),a[3]<n[1]&&(a[3]=n[1])}),a}const cS={props:["bbox","map"],components:{homeIcon:{__name:"home",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(I1),e.mergeProps(t.$attrs,{size:24}),null,16))}}},methods:{setBounds(){const l={type:"Feature",geometry:this==null?void 0:this.bbox},t=dS(l);this.map.fitBounds(t)}}},hS={class:"z-100 flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]"};function pS(l,t,a,n,o,s){const i=e.resolveComponent("homeIcon");return e.openBlock(),e.createElementBlock("div",hS,[e.createVNode(i,{onClick:s.setBounds},null,8,["onClick"])])}const Rr=ve(cS,[["render",pS]]),yS={components:{legendIcon:i1,menuIcon:{__name:"menu",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(P1),e.mergeProps(t.$attrs,{size:24}),null,16))}},closeIcon:Ga},props:["source","count","total","mapId"],data(){return{isOpenLegend:!1,palette:["#69D2E7","yellow","#FE4365"]}},methods:{calcSize(l){return l/this.maxValue*100*50/100}},computed:{maxValue(){var l,t,a,n,o,s;return((l=this.sizes)==null?void 0:l[0])>((a=this.sizes)==null?void 0:a[((t=this.sizes)==null?void 0:t.length)-1])?(n=this.sizes)==null?void 0:n[0]:(s=this.sizes)==null?void 0:s[((o=this.sizes)==null?void 0:o.length)-1]}}},uS={class:"w-full h-[calc(100%-40px)] bg-white"},kS={class:"w-full flex flex-col gap-[8px] h-[250px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent text-xs"},mS={class:"relative min-w-full bg-white text-[12px]"},fS={class:"divide-gray-200 dark:divide-neutral-700"},gS={class:"px-2 py-1"},xS={class:"px-2 py-1"};function MS(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",uS,[e.createElementVNode("div",kS,[e.createElementVNode("table",mS,[t[0]||(t[0]=e.createElementVNode("thead",{class:"sticky top-[-1px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},[e.createElementVNode("tr",null,[e.createElementVNode("th",{class:"px-2 py-1 text-start"},"Назва"),e.createElementVNode("th",{class:"px-2 py-1 text-start"},"Метрика")])],-1)),e.createElementVNode("tbody",fS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.source,i=>(e.openBlock(),e.createElementBlock("tr",{key:i.id,class:"border-b cursor-pointer hover:bg-gray-100 odd:bg-gray-50"},[e.createElementVNode("td",gS,e.toDisplayString(i.title||"—"),1),e.createElementVNode("td",xS,e.toDisplayString(i.metric),1)]))),128))])])])])}const Or=ve(yS,[["render",MS]]),bS={mixins:[Pe,s1,{components:{VsMapSetting:Tr,VsMapSlotLayers:Pr,VsMapLegend:Qq,VsMapGoHome:Rr,VsList:Or},data(){return{mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7"}},methods:{async createMap(){var a,n;const l=await Fr();if(!l)return;const t={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new l.Map({container:this.mapId,style:t,center:[31,48.5],zoom:((n=(a=this.data)==null?void 0:a.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new l.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",o=>{this.moveMouseHadler(o)}),this.map.on("mouseout",()=>{var o;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(o=this.popup)==null||o.remove()})},getPopoverTitle(l){var t,a,n,o,s;return(a=(t=this.data)==null?void 0:t.colors)!=null&&a.find(i=>i.val===l)?(s=(o=(n=this.data)==null?void 0:n.colors)==null?void 0:o.find(i=>i.val===l))==null?void 0:s.text:l},moveMouseHadler(l){var t;try{const a=this.map.queryRenderedFeatures(l.point),n=((t=a[0])==null?void 0:t.properties)||{};if(!a.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg px-2 py-1">
8292
+ ${Ut(a)}: ${Ze(n)} (${o}%)
8293
+ </div>`},onChangedData(){try{if(this.sourceData){const{series:l,xs:t,ys:a}=this.prepareData();l&&(this==null||this.initChart(l,t,a))}}catch{}},prepareData(){try{const l=Array.from(new Set(this.sourceData.map(o=>o[this.dimensions[0]]))),t=Array.from(new Set(this.sourceData.map(o=>o[this.dimensions[1]]))),a=l.map((o,s)=>({name:o,value:t[s]}));return{series:[{name:this.titleCharts?this.titleCharts:this.dimensions[0],type:"funnel",...xt(this.styleData),data:a,height:"80%",emphasis:{label:{show:!1}}}]}}catch(l){console.error(l)}},async initChart(l){try{const t=this.$refs.chart,a=o1==null?void 0:o1.init(t);if(!a)return;const n={series:l,...xt(this.styleData),tooltip:{trigger:"item",formatter:o=>this.buildTooltipForDonut(o,[o.color]),borderWidth:0,appendToBody:!0,borderColor:"transparent",textStyle:{color:"#000"},padding:[10,15],shadowColor:"transparent",backgroundColor:"transparent"},itemStyle:{height:"15px"},legend:{borderRadius:10,type:"scroll",itemWidth:14,itemHeight:14,...this.styleData.legend},labelLine:{show:!1},grid:{bottom:"0"}};a.setOption(n),a.resize(),window.addEventListener("resize",()=>{a.resize()})}catch(t){console.error(t)}}}},_q=["id"];function qq(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{ref:"chart",id:o.uniqueID,class:"h-[90%] custom-scrollbar min-h-[200px]"},null,8,_q)}const Sq=Object.freeze(Object.defineProperty({__proto__:null,default:ve(Eq,[["render",qq]])},Symbol.toStringTag,{value:"Module"}));function jq(l){return[{type:"fill",paint:{"fill-color":l.color||"#ccc","fill-outline-color":l.color||"blue","fill-opacity":l.opacity||1}}]}function Aq(l){return[{type:"line",paint:{"line-color":l.color||"#ccc","line-opacity":l.opacity||1}}]}function Dq(l){return[{type:"circle",paint:{"circle-radius":l.radius||6,"circle-stroke-color":l.stroke||"#ccc","circle-stroke-width":l.width||1,"circle-color":l.color||"blue"}}]}function $r(l){if(!l)return null;const t=l.type||"point";return t==="polygon"?jq(l):t==="line"?Aq(l):Dq(l)}const s1={data(){return{layerList:[],activeLayer:""}},computed:{interactiveSources(){return this.layerList.filter(l=>l==null?void 0:l.interactive).map(l=>l.id)}},methods:{moveLayer(l,t=this.map){t.getStyle().layers.forEach(a=>{a.id.match(l)&&t.moveLayer(a.id)})},async setVisible(l,t=!0,a=this.map){if(!l)return;const n=(l==null?void 0:l.id)||l,o=this.layerList.find(i=>i.id===l)||l;if(!(o!=null&&o.id))throw new Error("MixinError: Layer has no id");const s=a.getStyle().layers.filter(i=>i.id.match(n));s.forEach(i=>{a.setLayoutProperty(i.id,"visibility",t?"visible":"none")}),!s.length&&t&&await this.addLayer(o)},async addLayer(l,t=this==null?void 0:this.map){var o,s;const a=this.layerList.find(i=>i.id===l)||l;!this.map.getStyle()||this.map.getStyle().layers.find(i=>i.id===a.id)||(this.layerList.find(i=>i.id===a.id)||this.layerList.push(a),(a.service==="vtile"||a.service==="vector"||(o=a.url)!=null&&o.includes(".vmt"))&&this.addVtileLayer(a,t),a.service==="geojson"&&this.addGeoJsonLayer(a,t),((s=a.url)!=null&&s.includes(".png")||["tms","raster"].includes(a.service))&&await this.addRasterLayer(a,t))},async addRasterLayer(l,t=this==null?void 0:this.map){var a,n;t.getSource(l.id)||(await t.addSource(l.id,{type:"raster",tiles:[l==null?void 0:l.url],tileSize:256,...l!=null&&l.scheme?{scheme:l==null?void 0:l.scheme}:{}}),await t.addLayer({id:l.id,type:"raster",source:l.id,minzoom:0,maxzoom:(l==null?void 0:l.maxzoom)||22},l.basemap?(n=(a=this.map.getStyle().layers)==null?void 0:a[0])==null?void 0:n.id:null))},async addVtileLayer(l,t=this==null?void 0:this.map){var s;const a=["props","pointZoom"].filter(i=>l[i]).map(i=>`&${i}=${l[i]}`),n={type:"vector",tiles:[`${(s=l==null?void 0:l.url)!=null&&s.startsWith("http")?"":window.location.origin}${l==null?void 0:l.url}${a}`],minzoom:l.minzoom||3,maxzoom:l.maxzoom||24};t.addSource(l.id,n),($r(l.style)||l.layers||[]).forEach((i,d)=>{const c={...i,id:`${l.id}-${d}`,source:l.id,"source-layer":i["source-layer"]||l.source||l.id,maxzoom:+i.maxzoom||24,minzoom:+i.minzoom||0};t.addLayer(c)})},async addGeoJsonLayer(l,t=this.map){var o;const a=l.data||((o=l==null?void 0:l.url)!=null&&o.startsWith("http")?"":window.location.origin)+l.url;t.addSource(l.id,{type:"geojson",data:a}),($r(l.style)||l.layers||[]).forEach(s=>{const i={...s,source:l.id,id:s.id||l.id,maxzoom:+s.maxzoom||24,minzoom:+s.minzoom||0,type:s.type||"circle"};t.addLayer(i)})},setLayerData(l,t){this.layerList=this.layerList.map(a=>a.id===l?{...a,...t}:a)},async removeLayer(l,t=this.map){t.getSource(l)&&(await t.getStyle().layers.forEach(async a=>{a.source===l&&await t.removeLayer(a.id)}),await t.removeSource(l))},async setFilter(l,t){var o;const a=this.layerList.find(s=>s.id===l),n=await((o=this.map)==null?void 0:o.getSource(l));if(n&&a.service==="vtile"){await n.setTiles([`${window.location.origin}${a.url}${a.url.includes("?")?"&":"?"}filter=${t}${a.props?`&props=${a.props}`:""}`]);return}n&&a.service},async changeBaseLayer(l){const t=l!=null&&l.id?l:this.layerList.find(n=>n.id===l),{id:a}=t;if(a&&a!==this.activeLayer){if(this.activeLayer&&this.map.setLayoutProperty(this.activeLayer,"visibility","none"),this.activeLayer=a,this.map.getLayer(a)){this.map.setLayoutProperty(a,"visibility","visible");return}await this.addRasterLayer(t)}},async refreshLayer(l,t=this.map){await t.getStyle().layers.forEach(a=>{a.source===l&&t.removeLayer(a.id)}),await t.removeSource(l),this.setVisible(l)}}},Nq="https://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.js",Lq="https://unpkg.com/maplibre-gl@5.6.2/dist/maplibre-gl.css";let ga=null;function Hq(l){return new Promise((t,a)=>{if(document.querySelector(`script[src="${l}"]`)){t();return}const n=document.createElement("script");n.src=l,n.onload=()=>t(),n.onerror=()=>a(new Error(`Failed to load ${l}`)),document.head.appendChild(n)})}function $q(l){return new Promise((t,a)=>{if(document.querySelector(`link[href="${l}"]`)){t();return}const n=document.createElement("link");n.rel="stylesheet",n.href=l,n.onload=()=>t(),n.onerror=()=>a(new Error(`Failed to load ${l}`)),document.head.appendChild(n)})}function Fr(){return typeof window>"u"?Promise.resolve(null):window.maplibregl?Promise.resolve(window.maplibregl):ga||(ga=$q(Lq).then(()=>Hq(Nq)).then(()=>window.maplibregl),ga)}const i1={__name:"legend",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(U1),e.mergeProps(t.$attrs,{size:24}),null,16))}},d1={pink:["#fde7e2","#feafbe","#fd58a4","#d7038e","#86007b"],blue:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],green:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],pink2:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],red:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],teal:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"]},Fq={components:{legendIcon:i1,closeIcon:Ga},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:d1}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((l,t)=>l-t)},maxWidht(){var a;const l=((a=this.sizes)==null?void 0:a.length)-1;return this.calcSize(l)}},methods:{sizeClass(l){return this.resizeItem?`h-[${this.calcSize(l)}] w-[${this.calcSize(l)}] ${this.borderRadius}`:`h-[18px] w-[18px] ${this.borderRadius}`},calcSize(l){return`${10+l*2}px`},getOpacity(l){return(l+1)/this.sortedSizes.length}}},Tq={class:"w-full absolute max-w-[200px] bg-white border rounded-lg bottom-[10px] right-[50px]"},Pq={class:"flex items-center justify-between border-b border-[#0000001A] px-2"},Iq={class:"w-full flex flex-col gap-[8px] px-2 py-2 max-h-[200px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},Rq={key:0,class:"flex flex-col w-full"},Oq={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},Uq={class:"flex flex-col gap-[6px]"},Zq={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"},Wq={key:1,class:"flex flex-col w-full"},Gq={key:0,class:"text-xs font-semibold leading-[1.2] text-[#1F2937] mb-[8px]"},Kq={class:"flex flex-col gap-[6px]"},Jq={class:"flex flex-row items-center justify-start"},Yq={class:"text-xs text-[#1F2937] font-normal leading-[1.2]"};function Xq(l,t,a,n,o,s){var c,h;const i=e.resolveComponent("legendIcon"),d=e.resolveComponent("closeIcon");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]",onClick:t[0]||(t[0]=p=>o.isOpenLegend=!o.isOpenLegend)},[e.createVNode(i)]),o.isOpenLegend?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:`#wrapper-${a.mapId}`},[e.createElementVNode("div",Tq,[e.createElementVNode("div",Pq,[t[2]||(t[2]=e.createElementVNode("h3",{class:"text-[16px] font-normal text-black"},"Легенда",-1)),e.createElementVNode("button",{type:"button",class:"inline-flex items-center text-sm font-medium text-gray-500 rounded-lg gap-x-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 dark:hover:text-blue-500 dark:focus:text-blue-500",onClick:t[1]||(t[1]=p=>o.isOpenLegend=!1)},[e.createVNode(d,{class:"w-[20px]"})])]),e.createElementVNode("div",Iq,[(c=a.colors)!=null&&c.length?(e.openBlock(),e.createElementBlock("div",Rq,[a.colorTitle?(e.openBlock(),e.createElementBlock("h4",Oq,e.toDisplayString(a.colorTitle),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Uq,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.colors,(p,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"flex items-center gap-[10px]"},[p.color?(e.openBlock(),e.createElementBlock("div",{key:0,class:"w-[12px] h-[12px] rounded-full",style:e.normalizeStyle({backgroundColor:p.color})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("p",Zq,e.toDisplayString(p.text||p.val),1)]))),128))])])):e.createCommentVNode("",!0),(h=a.sizes)!=null&&h.length?(e.openBlock(),e.createElementBlock("div",Wq,[l.sizeTitle?(e.openBlock(),e.createElementBlock("h4",Gq,e.toDisplayString(l.sizeTitle),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Kq,[s.sortedSizes.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.sortedSizes,(p,y)=>{var w,m,f,u,g;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Jq,[e.createElementVNode("div",{class:e.normalizeClass([s.maxWidht?`w-[${s.maxWidht}]`:"","mr-[10px]"])},[e.createElementVNode("div",{class:e.normalizeClass(s.sizeClass(y)),style:e.normalizeStyle({backgroundColor:((m=(w=o.palette)==null?void 0:w[a.color])==null?void 0:m[y])||a.color})},null,6)],2),e.createElementVNode("p",Yq,e.toDisplayString(y===((f=s.sortedSizes)==null?void 0:f.length)-1?">"+p:y==((u=s.sortedSizes)==null?void 0:u.length)-1?">"+s.sortedSizes[((g=s.sortedSizes)==null?void 0:g.length)-1]:p+"-"+s.sortedSizes[y+1]),1)])])}),256)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])])],8,["to"])):e.createCommentVNode("",!0)],64)}const Qq=ve(Fq,[["render",Xq]]),eS={props:["map","coordinates"],data(){return{isMenuVisible:!1}},computed:{getCoordinates(){var t;return!(this!=null&&this.coordinates)||((t=this.coordinates)==null?void 0:t.length)!==2?"":(this==null?void 0:this.coordinates).slice().reverse().map(a=>Number(a).toFixed(5)).join(", ")}}},tS={class:"map__settings"},aS={ref:"attribution",class:"map__settings-attribution map__settings-item mt-[3px]"};function rS(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",tS,[e.createElementVNode("div",aS,[e.withDirectives(e.createElementVNode("div",{ref:"mouse",class:"map__settings-item",style:{"min-width":"115px"}},e.toDisplayString(s.getCoordinates),513),[[e.vShow,s.getCoordinates]])],512)])}const Tr=ve(eS,[["render",rS]]),lS={mixins:[s1],props:{map:{type:Object,default:()=>null}},data(){return{baseLayers:[{id:"orto10",name:"Ortophoto 1:10К",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4954/2876.png"},{id:"graymap",name:"Сіра карта",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",service:"TMS",image:"https://data.gki.com.ua/api-user/rtile/positron/ua/10/601/348.png"}]}},watch:{map(l){l&&l.on("load",this.handleMapLoad)}},created(){this.baseLayers.forEach(l=>{const t={...l,basemap:!0};this.layerList.push(t)})},methods:{handleMapLoad(){this.changeBaseLayer("graymap")},isLayerInFocus(l){return l.id===this.activeLayer}}},nS={class:"vs-map-slot-layers"},oS=["onClick"],sS=["src"];function iS(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",nS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.baseLayers,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:e.normalizeClass(["vs-map-slot-layers__layer",{focused:s.isLayerInFocus(i)}]),onClick:d=>l.changeBaseLayer(i.id)},[e.createElementVNode("img",{src:i.image,class:"vs-map-slot-layers__image"},null,8,sS)],10,oS))),128))])}const Pr=ve(lS,[["render",iS]]);function Ir(l,t,a){if(l!==null)for(var n,o,s,i,d,c,h,p=0,y=0,w,m=l.type,f=m==="FeatureCollection",u=m==="Feature",g=f?l.features.length:1,M=0;M<g;M++){h=f?l.features[M].geometry:u?l.geometry:l,w=h?h.type==="GeometryCollection":!1,d=w?h.geometries.length:1;for(var x=0;x<d;x++){var k=0,v=0;if(i=w?h.geometries[x]:h,i!==null){c=i.coordinates;var V=i.type;switch(p=0,V){case null:break;case"Point":if(t(c,y,M,k,v)===!1)return!1;y++,k++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(t(c[n],y,M,k,v)===!1)return!1;y++,V==="MultiPoint"&&k++}V==="LineString"&&k++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(o=0;o<c[n].length-p;o++){if(t(c[n][o],y,M,k,v)===!1)return!1;y++}V==="MultiLineString"&&k++,V==="Polygon"&&v++}V==="Polygon"&&k++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(v=0,o=0;o<c[n].length;o++){for(s=0;s<c[n][o].length-p;s++){if(t(c[n][o][s],y,M,k,v)===!1)return!1;y++}v++}k++}break;case"GeometryCollection":for(n=0;n<i.geometries.length;n++)if(Ir(i.geometries[n],t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function dS(l,t={}){if(l.bbox!=null&&t.recompute!==!0)return l.bbox;const a=[1/0,1/0,-1/0,-1/0];return Ir(l,n=>{a[0]>n[0]&&(a[0]=n[0]),a[1]>n[1]&&(a[1]=n[1]),a[2]<n[0]&&(a[2]=n[0]),a[3]<n[1]&&(a[3]=n[1])}),a}const cS={props:["bbox","map"],components:{homeIcon:{__name:"home",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(I1),e.mergeProps(t.$attrs,{size:24}),null,16))}}},methods:{setBounds(){const l={type:"Feature",geometry:this==null?void 0:this.bbox},t=dS(l);this.map.fitBounds(t)}}},hS={class:"z-100 flex justify-center items-center rounded-md w-[32px] h-[32px] cursor-pointer bg-white p-1 border-[2px]"};function pS(l,t,a,n,o,s){const i=e.resolveComponent("homeIcon");return e.openBlock(),e.createElementBlock("div",hS,[e.createVNode(i,{onClick:s.setBounds},null,8,["onClick"])])}const Rr=ve(cS,[["render",pS]]),yS={components:{legendIcon:i1,menuIcon:{__name:"menu",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(P1),e.mergeProps(t.$attrs,{size:24}),null,16))}},closeIcon:Ga},props:["source","count","total","mapId"],data(){return{isOpenLegend:!1,palette:["#69D2E7","yellow","#FE4365"]}},methods:{calcSize(l){return l/this.maxValue*100*50/100}},computed:{maxValue(){var l,t,a,n,o,s;return((l=this.sizes)==null?void 0:l[0])>((a=this.sizes)==null?void 0:a[((t=this.sizes)==null?void 0:t.length)-1])?(n=this.sizes)==null?void 0:n[0]:(s=this.sizes)==null?void 0:s[((o=this.sizes)==null?void 0:o.length)-1]}}},uS={class:"w-full h-[calc(100%-40px)] bg-white"},kS={class:"w-full flex flex-col gap-[8px] h-[250px] overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent text-xs"},mS={class:"relative min-w-full bg-white text-[12px]"},fS={class:"divide-gray-200 dark:divide-neutral-700"},gS={class:"px-2 py-1"},xS={class:"px-2 py-1"};function MS(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",uS,[e.createElementVNode("div",kS,[e.createElementVNode("table",mS,[t[0]||(t[0]=e.createElementVNode("thead",{class:"sticky top-[-1px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},[e.createElementVNode("tr",null,[e.createElementVNode("th",{class:"px-2 py-1 text-start"},"Назва"),e.createElementVNode("th",{class:"px-2 py-1 text-start"},"Метрика")])],-1)),e.createElementVNode("tbody",fS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.source,i=>(e.openBlock(),e.createElementBlock("tr",{key:i.id,class:"border-b cursor-pointer hover:bg-gray-100 odd:bg-gray-50"},[e.createElementVNode("td",gS,e.toDisplayString(i.title||"—"),1),e.createElementVNode("td",xS,e.toDisplayString(i.metric),1)]))),128))])])])])}const Or=ve(yS,[["render",MS]]),bS={mixins:[Pe,s1,{components:{VsMapSetting:Tr,VsMapSlotLayers:Pr,VsMapLegend:Qq,VsMapGoHome:Rr,VsList:Or},data(){return{mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7"}},methods:{async createMap(){var a,n;const l=await Fr();if(!l)return;const t={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new l.Map({container:this.mapId,style:t,center:[31,48.5],zoom:((n=(a=this.data)==null?void 0:a.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new l.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",o=>{this.moveMouseHadler(o)}),this.map.on("mouseout",()=>{var o;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(o=this.popup)==null||o.remove()})},getPopoverTitle(l){var t,a,n,o,s;return(a=(t=this.data)==null?void 0:t.colors)!=null&&a.find(i=>i.val===l)?(s=(o=(n=this.data)==null?void 0:n.colors)==null?void 0:o.find(i=>i.val===l))==null?void 0:s.text:l},moveMouseHadler(l){var t;try{const a=this.map.queryRenderedFeatures(l.point),n=((t=a[0])==null?void 0:t.properties)||{};if(!a.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg px-2 py-1">
8294
8294
  ${this.getPopoverTitle((n==null?void 0:n.x)||(n==null?void 0:n.title)||(n==null?void 0:n.name))||""}
8295
8295
  </div>
8296
8296
 
@@ -8299,7 +8299,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An err
8299
8299
  <span class="font-medium mr-[6px]">Значення</span>
8300
8300
  </span>
8301
8301
  <span>${(n==null?void 0:n.metric)||0}</span>
8302
- </div>`;const o=this.map.project(l.lngLat);this.popupElement.style.left=`${o.x}px`,this.popupElement.style.top=`${o.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(a){console.error(a)}}}}],name:"VsMap",async mounted(){await this.getMapData(),await this.createMap()},methods:{async getMapData(){const t=await(await fetch(`/api/bi-map?widget=${this.widget}&dashboard=${this.dashboard}`)).json();this.data=t,this.$emit("update:widgetData",t),setTimeout(()=>{var a;return(a=this.map)==null?void 0:a.resize()})},async loadHandler(){const l=["#69D2E7","yellow","#FE4365"],t=this.data.colors?["match",["get","x"]].concat(this.data.colors.reduce((s,i,d)=>s.concat(i.val,(i==null?void 0:i.color)||l[d]),[])).concat(["gray"]):"blue",a=[5,7,9,11,13],n=this.data.sizes?["case"]:5;this.data.sizes&&(this.data.sizes.reverse().forEach((s,i)=>{n.push([">",["get","metric"],s]),n.push(a[i])}),n.push(5));const o={type:"circle",color:t,width:2,radius:n,stroke:"#eee"};Object.assign(o,this.data.style||{}),this.addVtileLayer({id:"bi",url:`${window.top.location.origin}/api/bi-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:o})}}},wS={class:"w-full h-full"},vS={class:"flex items-start justify-between mb-[6px] w-full"},VS={class:"text-gray-800 font-[600]"},CS=["id"],zS=["id"],BS={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"};function _S(l,t,a,n,o,s){var p,y,w;const i=e.resolveComponent("VsMapSetting"),d=e.resolveComponent("VsMapSlotLayers"),c=e.resolveComponent("VsMapLegend"),h=e.resolveComponent("VsMapGoHome");return e.openBlock(),e.createElementBlock("div",wS,[e.createElementVNode("div",vS,[e.createElementVNode("h5",VS,e.toDisplayString(l.title),1)]),e.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${l.mapId}`},[e.createElementVNode("div",{id:l.mapId,class:"w-full flex items-end relative h-full min-h-[250px]"},null,8,zS),l.showSetting?(e.openBlock(),e.createBlock(i,{key:0,map:l.map,coordinates:l.coordinatesByMouse},null,8,["map","coordinates"])):e.createCommentVNode("",!0),e.createVNode(d,{map:l.map},null,8,["map"]),e.createElementVNode("div",BS,[e.createVNode(c,{mapId:l.mapId,colors:(p=l.data)==null?void 0:p.colors,sizes:(y=l.data)==null?void 0:y.sizes,color:l.color,resizeItem:"true"},null,8,["mapId","colors","sizes","color"]),e.createVNode(h,{map:l.map,bbox:(w=l.data)==null?void 0:w.bounds},null,8,["map","bbox"])])],8,CS)])}const ES=Object.freeze(Object.defineProperty({__proto__:null,default:ve(bS,[["render",_S]])},Symbol.toStringTag,{value:"Module"})),qS={components:{legendIcon:i1,closeIcon:Ga},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:d1}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((l,t)=>l-t)},maxWidht(){var a;const l=((a=this.sizes)==null?void 0:a.length)-1;return this.calcSize(l)}},methods:{sizeClass(l){return this.resizeItem?`h-[${this.calcSize(l)}] w-[${this.calcSize(l)}] ${this.borderRadius}`:`h-[10px] ${this.borderRadius}`},calcSize(l){return`${10+l*2}px`},getOpacity(l){return(l+1)/this.sortedSizes.length}}},SS={key:0,class:"absolute flex items-end w-fit bottom-[10px] max-w-[80%] left-[50%] translate-x-[-50%] bg-[rgba(255,255,255,0.7)] p-[10px] rounded"},jS={class:"w-[80px] mr-[10px]"},AS=["title"],DS={class:"text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]"};function NS(l,t,a,n,o,s){var i;return(i=a.sizes)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",SS,[e.createElementVNode("div",jS,[t[0]||(t[0]=e.createElementVNode("p",{class:"text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]"}," Дані відсутні ",-1)),e.createElementVNode("div",{class:e.normalizeClass([s.sizeClass(l.index),"w-full border border-gray-500"])},null,2)]),s.sortedSizes.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.sortedSizes,(d,c)=>{var h,p,y,w,m,f,u,g;return e.openBlock(),e.createElementBlock("div",{class:"w-[80px]",title:c===((h=s.sortedSizes)==null?void 0:h.length)-1?">"+d:c==((p=s.sortedSizes)==null?void 0:p.length)-1?">"+s.sortedSizes[((y=s.sortedSizes)==null?void 0:y.length)-1]:d+"-"+s.sortedSizes[c+1]},[e.createElementVNode("p",DS,e.toDisplayString(c===((w=s.sortedSizes)==null?void 0:w.length)-1?">"+parseInt(d):c==((m=s.sortedSizes)==null?void 0:m.length)-1?">"+parseInt(s.sortedSizes[((f=s.sortedSizes)==null?void 0:f.length)-1]):parseInt(d)+"-"+parseInt(s.sortedSizes[c+1])),1),e.createElementVNode("div",{class:e.normalizeClass([s.sizeClass(c),"w-full border border-r-0 border-gray-500"]),style:e.normalizeStyle({backgroundColor:((g=(u=o.palette)==null?void 0:u[a.color])==null?void 0:g[c])||a.color})},null,6)],8,AS)}),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}const LS=ve(qS,[["render",NS]]),HS={__name:"icon-map",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Z1),e.mergeProps(t.$attrs,{size:24}),null,16))}},$S={mixins:[Pe,s1],components:{VsMapSetting:Tr,VsClusterLegend:LS,VsMapGoHome:Rr,VsList:Or,VsMapSlotLayers:Pr,VsBar:r1},data(){return{baseColor:"pink",kattotg:"",options:[{id:"map",text:"Карта",component:HS},{id:"table",text:"Таблиця",component:Cr},{id:"chart",text:"Віджет",component:Vr}],activeTab:"map",mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7",label:"<div><icon-map/></div>"}},async mounted(){await this.getMapData(),await this.createMap()},watch:{kattotg(){this.loadHandler()}},methods:{async getMapData(){const l=await je.get(`/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`);this.data=l,this.$emit("update:widgetData",this.data),setTimeout(()=>{var t;return(t=this.map)==null?void 0:t.resize()})},async loadHandler(){var n,o,s,i;this.baseColor=((n=this.data.style)==null?void 0:n.color)||"blue";const l=["case"];(i=(s=(o=this.data)==null?void 0:o.sizes)==null?void 0:s.toReversed())==null||i.forEach((d,c)=>{var h,p;l.push([">",["get","metric"],d]),l.push((p=(h=d1[this.baseColor])==null?void 0:h.toReversed())==null?void 0:p[c]),c++}),l.push("gray");const t={type:"polygon",color:l,opacity:.4};Object.assign(t,this.data.style||{}),this.map.getSource("bi")||this.addVtileLayer({id:"bi",url:`${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:t}),this.map.getLayer("highlighted")&&this.map.removeLayer("highlighted"),this.map.getSource("highlighted")&&this.map.removeSource("highlighted");const a=["case"];this.kattotg&&a.push(["==",["to-string",["get","name"]],String(this.kattotg)],"red"),a.push("transparent"),this.map.addLayer({id:"highlighted",type:"fill",source:"bi","source-layer":"bi",paint:{"fill-color":a,"fill-opacity":.6}})},async createMap(){var a,n;const l=await Fr();if(!l)return;const t={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new l.Map({container:this.mapId,style:t,center:[31,48.5],zoom:((n=(a=this.data)==null?void 0:a.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new l.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",o=>{this.moveMouseHadler(o)}),this.map.on("mouseout",()=>{var o;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(o=this.popup)==null||o.remove()})},moveMouseHadler(l){var t;try{const a=this.map.queryRenderedFeatures(l.point),n=((t=a[0])==null?void 0:t.properties)||{};if(!a.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="px-2 py-1 text-sm font-semibold text-gray-800 border-b border-gray-200 border-solid rounded-t-lg">
8302
+ </div>`;const o=this.map.project(l.lngLat);this.popupElement.style.left=`${o.x}px`,this.popupElement.style.top=`${o.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(a){console.error(a)}}}}],name:"VsMap",async mounted(){await this.getMapData(),await this.createMap()},methods:{async getMapData(){const t=await(await fetch(`/api/bi-map?widget=${this.widget}&dashboard=${this.dashboard}`)).json();this.data=t,this.$emit("update:widgetData",t),setTimeout(()=>{var a;return(a=this.map)==null?void 0:a.resize()})},async loadHandler(){const l=["#69D2E7","yellow","#FE4365"],t=this.data.colors?["match",["get","x"]].concat(this.data.colors.reduce((s,i,d)=>s.concat(i.val,(i==null?void 0:i.color)||l[d]),[])).concat(["gray"]):"blue",a=[5,7,9,11,13],n=this.data.sizes?["case"]:5;this.data.sizes&&(this.data.sizes.reverse().forEach((s,i)=>{n.push([">",["get","metric"],s]),n.push(a[i])}),n.push(5));const o={type:"circle",color:t,width:2,radius:n,stroke:"#eee"};Object.assign(o,this.data.style||{}),this.addVtileLayer({id:"bi",url:`${window.top.location.origin}/api/bi-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:o})}}},wS={class:"w-full h-full"},vS={class:"flex items-start justify-between mb-[6px] w-full"},VS={class:"text-gray-800 font-[600]"},CS=["id"],zS=["id"],BS={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"};function ES(l,t,a,n,o,s){var p,y,w;const i=e.resolveComponent("VsMapSetting"),d=e.resolveComponent("VsMapSlotLayers"),c=e.resolveComponent("VsMapLegend"),h=e.resolveComponent("VsMapGoHome");return e.openBlock(),e.createElementBlock("div",wS,[e.createElementVNode("div",vS,[e.createElementVNode("h5",VS,e.toDisplayString(l.title),1)]),e.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${l.mapId}`},[e.createElementVNode("div",{id:l.mapId,class:"w-full flex items-end relative h-full min-h-[250px]"},null,8,zS),l.showSetting?(e.openBlock(),e.createBlock(i,{key:0,map:l.map,coordinates:l.coordinatesByMouse},null,8,["map","coordinates"])):e.createCommentVNode("",!0),e.createVNode(d,{map:l.map},null,8,["map"]),e.createElementVNode("div",BS,[e.createVNode(c,{mapId:l.mapId,colors:(p=l.data)==null?void 0:p.colors,sizes:(y=l.data)==null?void 0:y.sizes,color:l.color,resizeItem:"true"},null,8,["mapId","colors","sizes","color"]),e.createVNode(h,{map:l.map,bbox:(w=l.data)==null?void 0:w.bounds},null,8,["map","bbox"])])],8,CS)])}const _S=Object.freeze(Object.defineProperty({__proto__:null,default:ve(bS,[["render",ES]])},Symbol.toStringTag,{value:"Module"})),qS={components:{legendIcon:i1,closeIcon:Ga},props:{mapId:{type:String},colors:{type:Array},sizes:{type:Array,default:()=>[]},cluster:{type:[Boolean,String]},color:{type:String,default:"gray"},colorTitle:{type:String},sizesTitle:{type:String},resizeItem:{type:[Boolean,String],default:!1},changeOpacityItem:{type:[Boolean,String],default:!1}},data(){return{isOpenLegend:!1,palette:d1}},computed:{borderRadius(){return this.cluster?"rounded-sm":"rounded-full"},sortedSizes(){return[...this.sizes].sort((l,t)=>l-t)},maxWidht(){var a;const l=((a=this.sizes)==null?void 0:a.length)-1;return this.calcSize(l)}},methods:{sizeClass(l){return this.resizeItem?`h-[${this.calcSize(l)}] w-[${this.calcSize(l)}] ${this.borderRadius}`:`h-[10px] ${this.borderRadius}`},calcSize(l){return`${10+l*2}px`},getOpacity(l){return(l+1)/this.sortedSizes.length}}},SS={key:0,class:"absolute flex items-end w-fit bottom-[10px] max-w-[80%] left-[50%] translate-x-[-50%] bg-[rgba(255,255,255,0.7)] p-[10px] rounded"},jS={class:"w-[80px] mr-[10px]"},AS=["title"],DS={class:"text-[10px] mb-[2px] text-[#1F2937] font-normal leading-[1.2]"};function NS(l,t,a,n,o,s){var i;return(i=a.sizes)!=null&&i.length?(e.openBlock(),e.createElementBlock("div",SS,[e.createElementVNode("div",jS,[t[0]||(t[0]=e.createElementVNode("p",{class:"text-[10px] mb-[2px] text-[#1F2937] leading-[1.2]"}," Дані відсутні ",-1)),e.createElementVNode("div",{class:e.normalizeClass([s.sizeClass(l.index),"w-full border border-gray-500"])},null,2)]),s.sortedSizes.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.sortedSizes,(d,c)=>{var h,p,y,w,m,f,u,g;return e.openBlock(),e.createElementBlock("div",{class:"w-[80px]",title:c===((h=s.sortedSizes)==null?void 0:h.length)-1?">"+d:c==((p=s.sortedSizes)==null?void 0:p.length)-1?">"+s.sortedSizes[((y=s.sortedSizes)==null?void 0:y.length)-1]:d+"-"+s.sortedSizes[c+1]},[e.createElementVNode("p",DS,e.toDisplayString(c===((w=s.sortedSizes)==null?void 0:w.length)-1?">"+parseInt(d):c==((m=s.sortedSizes)==null?void 0:m.length)-1?">"+parseInt(s.sortedSizes[((f=s.sortedSizes)==null?void 0:f.length)-1]):parseInt(d)+"-"+parseInt(s.sortedSizes[c+1])),1),e.createElementVNode("div",{class:e.normalizeClass([s.sizeClass(c),"w-full border border-r-0 border-gray-500"]),style:e.normalizeStyle({backgroundColor:((g=(u=o.palette)==null?void 0:u[a.color])==null?void 0:g[c])||a.color})},null,6)],8,AS)}),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}const LS=ve(qS,[["render",NS]]),HS={__name:"icon-map",setup(l){return(t,a)=>(e.openBlock(),e.createBlock(e.unref(Z1),e.mergeProps(t.$attrs,{size:24}),null,16))}},$S={mixins:[Pe,s1],components:{VsMapSetting:Tr,VsClusterLegend:LS,VsMapGoHome:Rr,VsList:Or,VsMapSlotLayers:Pr,VsBar:r1},data(){return{baseColor:"pink",kattotg:"",options:[{id:"map",text:"Карта",component:HS},{id:"table",text:"Таблиця",component:Cr},{id:"chart",text:"Віджет",component:Vr}],activeTab:"map",mapId:`map-${Math.floor(Math.random()*1e3)}`,layerId:`layer${Math.floor(Math.random()*1e3)}`,map:null,hoverData:null,data:null,coordinatesByMouse:[],showSetting:!1,popup:null,color:"#69D2E7",label:"<div><icon-map/></div>"}},async mounted(){await this.getMapData(),await this.createMap()},watch:{kattotg(){this.loadHandler()}},methods:{async getMapData(){const l=await Se.get(`/bi-cluster?widget=${this.widget}&dashboard=${this.dashboard}`);this.data=l,this.$emit("update:widgetData",this.data),setTimeout(()=>{var t;return(t=this.map)==null?void 0:t.resize()})},async loadHandler(){var n,o,s,i;this.baseColor=((n=this.data.style)==null?void 0:n.color)||"blue";const l=["case"];(i=(s=(o=this.data)==null?void 0:o.sizes)==null?void 0:s.toReversed())==null||i.forEach((d,c)=>{var h,p;l.push([">",["get","metric"],d]),l.push((p=(h=d1[this.baseColor])==null?void 0:h.toReversed())==null?void 0:p[c]),c++}),l.push("gray");const t={type:"polygon",color:l,opacity:.4};Object.assign(t,this.data.style||{}),this.map.getSource("bi")||this.addVtileLayer({id:"bi",url:`${window.location.origin}/api/bi-cluster-vtile/{z}/{x}/{y}.vmt?widget=${this.widget}&dashboard=${this.dashboard}&nocache=1`,style:t}),this.map.getLayer("highlighted")&&this.map.removeLayer("highlighted"),this.map.getSource("highlighted")&&this.map.removeSource("highlighted");const a=["case"];this.kattotg&&a.push(["==",["to-string",["get","name"]],String(this.kattotg)],"red"),a.push("transparent"),this.map.addLayer({id:"highlighted",type:"fill",source:"bi","source-layer":"bi",paint:{"fill-color":a,"fill-opacity":.6}})},async createMap(){var a,n;const l=await Fr();if(!l)return;const t={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{},layers:[]};this.map=await new l.Map({container:this.mapId,style:t,center:[31,48.5],zoom:((n=(a=this.data)==null?void 0:a.style)==null?void 0:n.zoom)||5,minZoom:3,maxZoom:20,attributionControl:!1}),this.map.addControl(new l.NavigationControl({visualizePitch:!0})),this.map.on("load",()=>{this.loadHandler()}),this.map.on("mousemove",o=>{this.moveMouseHadler(o)}),this.map.on("mouseout",()=>{var o;this.showLegend=!1,this.showSetting=!1,this.coordinatesByMouse=0,(o=this.popup)==null||o.remove()})},moveMouseHadler(l){var t;try{const a=this.map.queryRenderedFeatures(l.point),n=((t=a[0])==null?void 0:t.properties)||{};if(!a.length){this.map.getCanvas().style.cursor="",this.popupElement&&this.popupElement.remove();return}this.map.getCanvas().style.cursor="pointer",this.popupElement&&this.popupElement.remove(),this.popupElement=document.createElement("div"),this.popupElement.className="absolute text-gray-800 border border-gray-200 rounded-lg shadow-md min-w-28",this.popupElement.style.backgroundColor="rgba(255, 255, 255, 0.7)",this.popupElement.innerHTML=`<div class="px-2 py-1 text-sm font-semibold text-gray-800 border-b border-gray-200 border-solid rounded-t-lg">
8303
8303
  ${(n==null?void 0:n.x)||(n==null?void 0:n.title)||(n==null?void 0:n.name)||""}
8304
8304
  </div>
8305
8305
 
@@ -8308,6 +8308,6 @@ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An err
8308
8308
  <span class="font-medium mr-[6px]">Значення</span>
8309
8309
  </span>
8310
8310
  <span>${(n==null?void 0:n.metric)||0}</span>
8311
- </div>`;const o=this.map.project(l.lngLat);this.popupElement.style.left=`${o.x}px`,this.popupElement.style.top=`${o.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(a){console.error(a)}}}},FS={class:"h-full"},TS={class:"flex items-start justify-between mb-[6px] w-full"},PS={class:"text-gray-800 font-[600]"},IS={class:"flex gap-2"},RS=["onClick"],OS=["id"],US=["id"],ZS={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"},WS={class:"h-[calc(250px)]"};function GS(l,t,a,n,o,s){var w,m,f,u,g,M,x,k,v,V;const i=e.resolveComponent("VsMapSetting"),d=e.resolveComponent("VsMapSlotLayers"),c=e.resolveComponent("VsMapGoHome"),h=e.resolveComponent("VsClusterLegend"),p=e.resolveComponent("VsList"),y=e.resolveComponent("VsBar");return e.openBlock(),e.createElementBlock("div",FS,[e.createElementVNode("div",TS,[e.createElementVNode("h3",PS,e.toDisplayString(l.title),1),e.createElementVNode("div",IS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,C=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["p-1 text-gray-700 border rounded",[o.activeTab===(C==null?void 0:C.id)?"ring-2 ring-blue-500":""]]),onClick:q=>o.activeTab=C==null?void 0:C.id},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C==null?void 0:C.component),{height:"16",width:"16"}))],10,RS))),256))])]),e.withDirectives(e.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${o.mapId}`},[e.createElementVNode("div",{id:o.mapId,class:"h-full w-full flex items-end min-h-[250px]"},null,8,US),o.showSetting?(e.openBlock(),e.createBlock(i,{key:0,map:o.map,coordinates:o.coordinatesByMouse},null,8,["map","coordinates"])):e.createCommentVNode("",!0),e.createVNode(d,{map:o.map},null,8,["map"]),e.createElementVNode("div",ZS,[e.createVNode(c,{map:o.map,bbox:(w=o.data)==null?void 0:w.bounds},null,8,["map","bbox"])]),e.createVNode(h,{mapId:o.mapId,colors:(m=o.data)==null?void 0:m.colors,sizes:(f=o.data)==null?void 0:f.sizes,color:o.baseColor,changeOpacityItem:"true",cluster:"true"},null,8,["mapId","colors","sizes","color"])],8,OS),[[e.vShow,o.activeTab=="map"]]),e.withDirectives(e.createVNode(p,{mapId:o.mapId,source:(u=o.data)==null?void 0:u.rows,total:((g=o.data)==null?void 0:g.total)||0,count:((M=o.data)==null?void 0:M.count)||0,onKattotg:t[0]||(t[0]=C=>o.kattotg=C)},null,8,["mapId","source","total","count"]),[[e.vShow,o.activeTab=="table"]]),e.withDirectives(e.createElementVNode("div",WS,[(k=(x=o.data)==null?void 0:x.rows)!=null&&k.length?(e.openBlock(),e.createBlock(y,{key:0,source:(V=(v=o.data)==null?void 0:v.rows)==null?void 0:V.map(C=>({title:C==null?void 0:C.title,metric:C==null?void 0:C.metric}))},null,8,["source"])):e.createCommentVNode("",!0)],512),[[e.vShow,o.activeTab=="chart"]])])}const KS=Object.freeze(Object.defineProperty({__proto__:null,default:ve($S,[["render",GS]])},Symbol.toStringTag,{value:"Module"})),JS={name:"VsTable",mixins:[Pe],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const l=Array.from(new Set(this.sourceData.map(t=>t[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=l.map(t=>Ut(t)):this.xs=[...l],this.products=this.dimensions.filter((t,a)=>a!=0),this.values=this.products.map((t,a)=>({name:t,data:this.sourceData.filter(n=>parseFloat(n[t])).map(n=>We(parseFloat(n[t])))}))}catch(l){console.error(l)}}}},YS={class:"flex flex-col h-full pt-[16px] pb-[16px] space-y-4 rounded-xl"},XS={class:"overflow-auto h-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300"},QS={class:"inline-block min-w-full align-middle"},ej={class:"relative min-w-full divide-y divide-gray-200 text-[12px]"},tj={class:"sticky top-0 bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},aj={class:"space-x-2"},rj={scope:"col",class:"xl:min-w-[120px] min-w-48"},lj={class:"flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1"},nj={class:"divide-y divide-gray-200"},oj={class:"text-gray-600"};function sj(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",YS,[e.createElementVNode("div",XS,[e.createElementVNode("div",QS,[e.createElementVNode("table",ej,[e.createElementVNode("thead",tj,[e.createElementVNode("tr",aj,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dimensions,i=>(e.openBlock(),e.createElementBlock("th",rj,[e.createElementVNode("div",lj,e.toDisplayString(i),1)]))),256))])]),e.createElementVNode("tbody",nj,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>(e.openBlock(),e.createElementBlock("tr",{key:d},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dimensions,(c,h)=>(e.openBlock(),e.createElementBlock("td",{key:h,class:"py-3 whitespace-nowrap"},[e.createElementVNode("span",oj,e.toDisplayString(i==null?void 0:i[c]),1)]))),128))]))),128))])])])])])}const ij=Object.freeze(Object.defineProperty({__proto__:null,default:ve(JS,[["render",sj]])},Symbol.toStringTag,{value:"Module"})),Zt=(l,t)=>{const a=l.__vccOpts||l;for(const[n,o]of t)a[n]=o;return a},dj={},cj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-green-600"};function hj(l,t){return e.openBlock(),e.createElementBlock("svg",cj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))}const pj=Zt(dj,[["render",hj]]),yj={},uj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"orange",class:"size-6 text-orange-600"};function kj(l,t){return e.openBlock(),e.createElementBlock("svg",uj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))}const mj=Zt(yj,[["render",kj]]),fj={},gj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-blue-600"};function xj(l,t){return e.openBlock(),e.createElementBlock("svg",gj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"},null,-1)]))}const Mj=Zt(fj,[["render",xj]]),bj={},wj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"red",class:"size-6 text-red-600"};function vj(l,t){return e.openBlock(),e.createElementBlock("svg",wj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)]))}const Vj=Zt(bj,[["render",vj]]),Cj={class:"rounded-md border border-gray-300 bg-white p-4 shadow-sm"},zj={class:"flex items-start gap-4 opacity-100 scale-5 transition-all duration-300"},Bj={class:"flex-1"},_j={class:"font-medium text-gray-900"},Ej={class:"mt-0.5 text-sm text-gray-700"},qj=e.defineComponent({__name:"vs-notify",props:{type:{},title:{},message:{}},setup(l){const t={success:pj,warning:mj,error:Vj,info:Mj};return(a,n)=>(e.openBlock(),e.createElementBlock("div",Cj,[e.createElementVNode("div",zj,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[a.type]))),e.createElementVNode("div",Bj,[e.createElementVNode("strong",_j,e.toDisplayString(a.title),1),e.createElementVNode("p",Ej,e.toDisplayString(a.message),1)]),n[0]||(n[0]=e.createElementVNode("button",{class:"m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",type:"button","aria-label":"Dismiss notify"},[e.createElementVNode("span",{class:"sr-only"},"Dismiss popup"),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1))])]))}}),xa={top:"top-4 left-1/2 transform -translate-x-1/2","left-bottom":"bottom-4 left-4 transform","right-bottom":"bottom-4 right-4 transform",bottom:"bottom-4 left-1/2 transform -translate-x-1/2"},xe=l=>{var c;const{type:t="info",title:a,message:n,position:o="right-bottom"}=l||{};let s=document.querySelector("#notify-root");s||(s=document.createElement("div"),s.id="notify-root",s.className=`fixed z-[2000] flex flex-col gap-3 ${xa[o]} p-6 max-w-md mx-auto font-sans antialiased`,document.body.appendChild(s)),s.className.includes(xa[o])||(Object.values(xa).forEach(h=>{s.classList.remove(...h.split(" "))}),s.classList.add(...xa[o].split(" ")));const i=document.createElement("div");s.appendChild(i);const d=e.createApp({render(){return e.h(qj,{type:t,title:a,message:n,onClose:()=>{d.unmount(),i.remove()}})}});d.mount(i),(c=i.querySelector("button"))==null||c.addEventListener("click",()=>{i.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{d.unmount(),i.remove()},350)}),setTimeout(()=>{i.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{d.unmount(),i.remove()},350)},3500)};e.defineComponent({name:"Copy",props:{text:{type:String,default:""},width:{type:[String,Number],default:null},notify:{type:Boolean,default:!0},notifyOptions:{type:Object,default:()=>({})}},emits:["copied","copy-error"],data(){return{slotText:""}},computed:{rootClasses(){return["vs-copy inline-flex items-center gap-2 cursor-pointer select-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500"]},containerStyle(){return!this.width&&this.width!==0?{}:{width:typeof this.width=="number"?`${this.width}px`:this.width.trim()}},displayText(){return this.text||this.slotText}},mounted(){this.updateSlotText()},updated(){this.updateSlotText()},methods:{updateSlotText(){var t,a;const l=((a=(t=this.$refs.text)==null?void 0:t.textContent)==null?void 0:a.trim())||"";l!==this.slotText&&(this.slotText=l)},async handleCopy(){const l=this.displayText;if(l)try{await this.copyToClipboard(l),this.$emit("copied",l),this.showNotify(l)}catch(t){this.$emit("copy-error",t)}},async copyToClipboard(l){var a;if((a=navigator.clipboard)!=null&&a.writeText){await navigator.clipboard.writeText(l);return}const t=document.createElement("textarea");t.value=l,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select();try{if(!document.execCommand("copy"))throw new Error("Copy command was unsuccessful")}finally{document.body.removeChild(t)}},showNotify(l){var a,n,o,s;if(!this.notify)return;const t={type:((a=this.notifyOptions)==null?void 0:a.type)??"success",title:((n=this.notifyOptions)==null?void 0:n.title)??"Copied",message:((o=this.notifyOptions)==null?void 0:o.message)??l,position:(s=this.notifyOptions)==null?void 0:s.position};xe(t)}}}),e.defineComponent({props:{modelValue:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{}},mounted(){this.modelValue||this.$emit("update:modelValue",!1)},computed:{modelState:{get(){return this.modelValue},set(l){this.$emit("update:modelValue",l)}},labelCursorClasses(){return[{"cursor-not-allowed":this.disabled},{"cursor-pointer":!this.disabled}]}},methods:{handleEnterDown(l){const{keyCode:t}=l;t===13&&(this.modelState=!this.modelState)},addKeyHandler(){window.addEventListener("keydown",this.handleEnterDown)},removeKeyHandler(){window.removeEventListener("keydown",this.handleEnterDown)}}});const Sj={key:0,class:"vsTailwind ui-dialog__wrapper text-gray-800"},jj={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},Aj={class:"font-medium text-gray-800 dark:text-[#ffffff]"},Dj={class:"ui-dialog__content p-4"},Nj={key:0,class:"flex justify-end gap-x-2"},Lj={key:1,class:"flex justify-end items-center gap-x-2 py-3 px-4 border-t border-gray-200 dark:border-neutral-700"},Hj=e.defineComponent({__name:"vs-modal",props:{title:{default:""},template:{},visible:{type:Boolean,default:!1},size:{default:"small"},closeClickBack:{type:Boolean,default:!1},content:{},buttonText:{},contentProps:{},teleport:{default:"body"}},emits:["update:visible","close","done"],setup(l,{emit:t}){const a=l,n=t,o=e.computed(()=>a.size==="small"?"md:w-5/12 w-9/12":a.size==="medium"?"md:w-6/12 w-9/12":"lg:w-7/12 w-11/12"),s=e.useAttrs();function i(){n("done")}function d(){n("update:visible",!1),n("close")}function c(p){p.key==="Escape"&&d()}function h(p,y){y&&p.target.classList.contains("vs-dialog-overlay")&&d()}return e.onMounted(()=>{window.addEventListener("keydown",c)}),e.onUnmounted(()=>{window.removeEventListener("keydown",c)}),(p,y)=>(e.openBlock(),e.createBlock(e.Teleport,{to:p.teleport},[p.visible?(e.openBlock(),e.createElementBlock("div",Sj,[e.createElementVNode("div",{onMousedown:y[0]||(y[0]=w=>h(w,p.closeClickBack)),class:e.normalizeClass(["vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 bg-black bg-opacity-50",[e.unref(s).class]])},[e.createVNode(e.Transition,{name:"content",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["ui-dialog__modal opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",o.value])},[e.createElementVNode("div",jj,[e.createElementVNode("h3",Aj,e.toDisplayString(p.title),1),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:d},y[1]||(y[1]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))]),e.createElementVNode("div",Dj,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),p.$slots.footer?(e.openBlock(),e.createElementBlock("div",Nj,[e.renderSlot(p.$slots,"footer",{handleClose:d},void 0,!0)])):e.createCommentVNode("",!0),p.buttonText?(e.openBlock(),e.createElementBlock("div",Lj,[e.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:d}," Close "),e.createElementVNode("button",{type:"button",onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-hidden focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"},e.toDisplayString(p.buttonText),1)])):e.createCommentVNode("",!0)],2)]),_:3})],34)])):e.createCommentVNode("",!0)],8,["to"]))}}),c1=Zt(Hj,[["__scopeId","data-v-670eae4f"]]);e.reactive({visible:!0});const $j=l=>{const{template:t="",title:a="",content:n,contentProps:o={},size:s="medium"}=l||{},i=document.querySelector("body");if(!i)return console.error('Modal root element with id "#modal" not found!'),{close:()=>{}};const d=document.createElement("div");i.appendChild(d);const c={title:a,template:t,visible:!0,size:s,closeClickBack:!0,onClose:p},h=e.createApp({render(){return e.h(c1,c,{default:()=>[n?e.h(n,o):e.h("p",t)]})}});function p(){h.unmount(),d.remove()}return h.mount(d),{close:p}},Ur=e.defineComponent({__name:"vs-info-tooltip",props:{text:{}},setup(l){const t=l,a=e.ref(!1),n=e.ref({top:"0px",left:"0px"});function o(i){if(!t.text)return;const d=i.currentTarget.getBoundingClientRect();n.value={top:`${d.bottom+4}px`,left:`${Math.min(d.left,window.innerWidth-230)}px`},a.value=!0}function s(){a.value=!1}return(i,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",{class:"inline-flex items-center",onMouseenter:o,onMouseleave:s},[e.renderSlot(i.$slots,"default",{},()=>[d[0]||(d[0]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-gray-400 cursor-help"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("path",{d:"M12 16v-4"}),e.createElementVNode("path",{d:"M12 8h.01"})],-1))])],32),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[a.value&&i.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(n.value),class:"fixed z-[9999] max-w-xs p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none"},e.toDisplayString(i.text),5)):e.createCommentVNode("",!0)]))],64))}}),Fj={class:"w-full relative"},Tj={key:0,class:"text-[14px] font-medium text-gray-900 mb-2 flex items-center gap-1"},Pj={class:"opacity-100"},Ij={key:0,class:"text-red-500 text-[14px]"},Rj={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Oj=e.defineComponent({__name:"vs-layout-default",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=l,a=e.computed(()=>{var i,d;return typeof((i=t.item)==null?void 0:i.label)=="string"&&t.item.label?t.item.label:((d=t.item)==null?void 0:d.ua)||t.label||t.ua}),n=e.computed(()=>!!a.value),o=e.computed(()=>{var i,d;return!!((d=(i=t.item)==null?void 0:i.rules)!=null&&d.includes("required"))}),s=e.computed(()=>{var i;return((i=t.item)==null?void 0:i.info)||""});return(i,d)=>(e.openBlock(),e.createElementBlock("div",Fj,[n.value?(e.openBlock(),e.createElementBlock("div",Tj,[e.createElementVNode("span",Pj,e.toDisplayString(a.value),1),o.value?(e.openBlock(),e.createElementBlock("span",Ij,"*")):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createBlock(Ur,{key:1,text:s.value},null,8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",e.mergeProps(i.$attrs,{class:{"opacity-60":i.item.disabled}})),i.error?(e.openBlock(),e.createElementBlock("span",Rj,e.toDisplayString(i.error),1)):e.createCommentVNode("",!0)]))}}),Uj={class:"w-full relative flex flex-row items-center gap-2"},Zj={key:0,class:"text-red-500 text-[14px]"},Wj={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Gj=e.defineComponent({__name:"vs-layout-horizontal",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{default:()=>({container:12,label:3})}},setup(l){const t=l,a=e.computed(()=>{var h;return((h=t.item)==null?void 0:h.label)||t.label||t.ua}),n=e.computed(()=>{var h;return((h=t.item)==null?void 0:h.info)||""}),o=e.computed(()=>t.columns??{container:12,label:3}),s=e.computed(()=>{const{container:h,label:p}=o.value;return!h||h<=0?0:Math.min(Math.max(p??0,0),h)/h}),i=e.computed(()=>{var h;return((h=t.item)==null?void 0:h.type)==="html"||s.value<=0?!1:!!a.value}),d=e.computed(()=>{if(!i.value)return{};const h=`${s.value*100}%`;return{flexBasis:h,maxWidth:h}}),c=e.computed(()=>{var m;const{container:h,label:p}=o.value;if(!h||h<=0)return{};if(((m=t.item)==null?void 0:m.type)==="html")return{flexBasis:"100%",maxWidth:"100%"};if(!i.value)return{flexBasis:"100%",maxWidth:"100%"};const y=Math.max(h-Math.max(p??0,0),0)/h;if(!y)return{};const w=`${y*100}%`;return{flexBasis:w,maxWidth:w}});return(h,p)=>{var y,w;return e.openBlock(),e.createElementBlock("div",Uj,[i.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-sm text-gray-900 font-medium flex shrink-0 items-center gap-1",style:e.normalizeStyle(d.value)},[e.createTextVNode(e.toDisplayString(a.value)+" ",1),(w=(y=h.item)==null?void 0:y.rules)!=null&&w.includes("required")&&a.value?(e.openBlock(),e.createElementBlock("span",Zj,"*")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(Ur,{key:1,text:n.value},null,8,["text"])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"flex-1 min-w-0",style:e.normalizeStyle(c.value)},[e.renderSlot(h.$slots,"default",e.normalizeProps(e.guardReactiveProps(h.$attrs)))],4),h.error?(e.openBlock(),e.createElementBlock("span",Wj,e.toDisplayString(h.error),1)):e.createCommentVNode("",!0)])}}}),Kj={class:"w-full relative"},Jj={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Yj=e.defineComponent({__name:"vs-layout-inline",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Kj,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.$attrs))),t.error?(e.openBlock(),e.createElementBlock("span",Jj,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)]))}}),Xj={class:"flex-1 min-w-0"},Qj={key:0,class:"text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"},eA={class:"truncate"},tA={key:0,class:"text-red-500 text-[14px]"},aA=["innerHTML"],rA={key:0,class:"mt-1 text-xs text-red-500"},lA=e.defineComponent({__name:"vs-layout-settings",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=l,a=e.ref("uk");e.computed(()=>{var d;return((d=t.item??{})==null?void 0:d[a.value])??t.ua??t.label??""});const n=e.computed(()=>{var d;return((d=t.item)==null?void 0:d.description)??""}),o=e.computed(()=>{var d;return Array.isArray((d=t.item)==null?void 0:d.rules)&&t.item.rules.includes("required")}),s=e.computed(()=>(typeof t.error=="string"?t.error:"")??""),i=()=>{const d=typeof localStorage<"u"?localStorage.getItem("locale"):null;a.value=d||"uk"};return e.onMounted(()=>{try{typeof localStorage<"u"&&localStorage.locale&&(a.value=localStorage.locale)}catch{}window.addEventListener("storage",i)}),e.onUnmounted(()=>{window.removeEventListener("storage",i)}),(d,c)=>{var h;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full relative",{"opacity-60":(h=d.item)==null?void 0:h.disabled}])},[e.createElementVNode("div",{class:e.normalizeClass(["gap-2 md:flex-row md:items-center md:justify-between",[["switcher","native-select"].includes(d.item.type)?"flex flex-col":""]])},[e.createElementVNode("div",Xj,[d.ua||d.label?(e.openBlock(),e.createElementBlock("p",Qj,[e.createElementVNode("span",eA,e.toDisplayString(d.item[a.value]||d.ua||d.label),1),o.value?(e.openBlock(),e.createElementBlock("span",tA,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("p",{key:1,class:"text-xs text-slate-500 dark:text-slate-400",innerHTML:n.value},null,8,aA)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["w-full",["select","native-select"].includes(d.item.type)?"md:w-[30%]":"md:w-auto"])},[e.renderSlot(d.$slots,"default",e.normalizeProps(e.guardReactiveProps(d.$attrs)))],2)],2),s.value?(e.openBlock(),e.createElementBlock("p",rA,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)],2)}}}),nA={default:Oj,horizontal:Gj,inline:Yj,settings:lA};function He(l){return{inputClass:e.computed(()=>{const t=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${(l==null?void 0:l.primaryColor)||"blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;return(l==null?void 0:l.size)==="sm"?`${t}h-[32px]`:`${t}h-[38px]`})}}const oA=["placeholder","disabled"],sA=e.defineComponent({__name:"vs-input-password",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled),s=e.computed(()=>t.placeholder??"");return(i,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"password","onUpdate:modelValue":d[0]||(d[0]=c=>n.value=c),placeholder:s.value,disabled:o.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":i.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,oA)),[[e.vModelText,n.value]])}}),iA=["placeholder","disabled","maxlength","minlength"],zt=e.defineComponent({__name:"vs-input-text",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled),s=e.computed(()=>t.placeholder??""),i=e.computed(()=>t.maxlength??void 0),d=e.computed(()=>t.minlength??void 0);function c(){typeof n.value=="string"&&(n.value=n.value.trim())}return(h,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"text","onUpdate:modelValue":p[0]||(p[0]=y=>n.value=y),placeholder:s.value,disabled:o.value,maxlength:i.value,minlength:d.value,onBlur:c,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[h.customClass,e.unref(a),{"!border-red-600":h.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,iA)),[[e.vModelText,n.value]])}}),dA=["placeholder","disabled","min","max"],Zr=e.defineComponent({__name:"vs-input-number",props:e.mergeModels({min:{},max:{},style:{default:()=>({})},customClass:{},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled);return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"number",step:"any","onUpdate:modelValue":i[0]||(i[0]=d=>n.value=d),placeholder:s.placeholder,disabled:o.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"},min:s.min,max:s.max},null,10,dA)),[[e.vModelText,n.value]])}}),de=(l,t)=>{const a=l.__vccOpts||l;for(const[n,o]of t)a[n]=o;return a},cA={},hA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function pA(l,t){return e.openBlock(),e.createElementBlock("svg",hA,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const yA=de(cA,[["render",pA]]),uA={class:"flex items-center gap-[4px]"},kA=["value","id","disabled"],mA=["for"],fA={class:"text-[14px] text-gray-700 flex items-center dark:text-neutral-400"},gA=e.defineComponent({__name:"vs-checkbox-default",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},id:{},modelValue:{default:""},info:{},error:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=t,n=l,o=e.computed({get:()=>n.modelValue,set:i=>a("update:modelValue",i)}),s=e.computed(()=>!!n.disabled);return(i,d)=>(e.openBlock(),e.createElementBlock("div",uA,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:i.value,"onUpdate:modelValue":d[0]||(d[0]=c=>o.value=c),class:e.normalizeClass(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":s.value}]),id:i.id,disabled:s.value},null,10,kA),[[e.vModelCheckbox,o.value]]),e.createElementVNode("label",{for:i.id,class:e.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":s.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[o.value?"bg-blue-600 border-blue-600":"bg-white border-gray-600",i.error?"border-red-600":""]])},[e.createVNode(yA,{height:"12",width:"12"})],2),e.createElementVNode("span",fA,[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(i.label),1)])])],10,mA)]))}}),xA=["name","value","disabled"],MA={class:"flex items-center gap-[6px] text-[14px]"},bA={key:0,class:"text-[16px]"},wA=["src"],vA=e.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{default:""},modelValue:{default:""},disabled:{type:Boolean},id:{},icon:{},imgUrl:{},style:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,o=e.computed({get:()=>a.modelValue,set:d=>{n("update:modelValue",d)}}),s=e.computed(()=>Array.isArray(o.value)?o.value.includes(a.value):o.value===!0||o.value===a.value),i=e.computed(()=>{var d,c;return((d=a.style)==null?void 0:d.size)==="xs"?"p-1.5 text-xs":((c=a.style)==null?void 0:c.size)==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs"});return(d,c)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[i.value,s.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"hidden",name:d.id,value:d.value,"onUpdate:modelValue":c[0]||(c[0]=h=>o.value=h),disabled:d.disabled},null,8,xA),[[e.vModelCheckbox,o.value]]),e.createElementVNode("span",MA,[d.icon||d.imgUrl?(e.openBlock(),e.createElementBlock("span",bA,[d.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(d.icon)},null,2)):e.createCommentVNode("",!0),d.imgUrl?(e.openBlock(),e.createElementBlock("img",{key:1,src:d.imgUrl,width:"16",height:"16",alt:"icon"},null,8,wA)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(d.label),1)])])],2))}}),VA={class:"flex items-center"},h1=e.defineComponent({__name:"vs-input-checkbox-item",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},view:{default:"default"},modelValue:{type:[Boolean,Array],default:!1},icon:{},imgUrl:{},slots:{},option:{},style:{},error:{default:""}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,o=`radio-${Math.floor(Math.random()*1e4)}`,s=e.computed({get:()=>Array.isArray(a.modelValue)?Array.isArray(a.modelValue)&&a.modelValue.includes(a.value):a.modelValue,set:d=>{if(Array.isArray(a.modelValue)){let c=[...a.modelValue];d?c.includes(a.value)||c.push(a.value):c=c.filter(h=>h!==a.value),n("update:modelValue",c)}else n("update:modelValue",d)}}),i=e.ref(`vs-checkbox-${a.view||"default"}`);return(d,c)=>{var h;return e.openBlock(),e.createElementBlock("div",VA,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value==="vs-checkbox-buttons"?e.unref(vA):e.unref(gA)),{value:d.value,label:d.label,info:(h=d.option)==null?void 0:h.info,disabled:d.disabled,modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=p=>s.value=p),id:o,icon:d.icon,imgUrl:d.imgUrl,style:e.normalizeStyle(d.style),error:d.error},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style","error"]))])}}}),CA={},zA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function BA(l,t){return e.openBlock(),e.createElementBlock("svg",zA,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const p1=de(CA,[["render",BA]]),_A={},EA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x"};function qA(l,t){return e.openBlock(),e.createElementBlock("svg",EA,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const Ma=de(_A,[["render",qA]]),SA={},jA={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function AA(l,t){return e.openBlock(),e.createElementBlock("svg",jA,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 9h.01"},null,-1),e.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1),e.createElementVNode("path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"},null,-1)]))}const DA=de(SA,[["render",AA]]),NA={key:0,class:"flex items-start gap-x-1"},LA={key:0,class:"text-red-500 text-[14px]"},HA=["title"],$A=["disabled"],y1=e.defineComponent({__name:"vs-input-switcher",props:e.mergeModels({rules:{default:()=>[]},view:{default:"checkbox"},label:{default:""},i:{default:""},text:{default:""},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue");return(n,o)=>{var s,i;return t.view==="checkbox"?(e.openBlock(),e.createElementBlock("div",NA,[e.createVNode(h1,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=d=>a.value=d),label:n.text,error:n.error||""},null,8,["modelValue","label","error"]),(s=n.rules)!=null&&s.includes("required")?(e.openBlock(),e.createElementBlock("span",LA,"*")):e.createCommentVNode("",!0),n.i?(e.openBlock(),e.createElementBlock("button",{key:1,class:"cursor-pointer",title:n.i,onClick:o[1]||(o[1]=e.withModifiers(()=>{},["prevent"]))},[e.createVNode(e.unref(DA),{class:"text-gray-500 w-[14px] h-[14px]"})],8,HA)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[a.value?`bg-${((i=n.style)==null?void 0:i.primaryColor)||"blue"}-500`:"bg-stone-200",n.customClass]]),disabled:n.disabled,onClick:o[2]||(o[2]=d=>a.value=!a.value)},[e.createElementVNode("span",{"data-state":"checked",class:e.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[a.value?"translate-x-4":"translate-x-0"]])},null,2)],10,$A))}}}),FA=["id","innerHTML"],u1=e.defineComponent({__name:"vs-input-static",props:{text:{default:""},html:{default:""},style:{},customClass:{default:""},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",{id:t.name,class:e.normalizeClass(["text-gray-900",t.customClass]),innerHTML:t.html?t.html:t.text},null,10,FA))}}),TA=["placeholder","disabled","name"],k1=e.defineComponent({__name:"vs-input-mask",props:e.mergeModels({name:{},mask:{default:""},unmask:{type:Boolean,default:!1},placeholder:{default:"_"},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.ref(null);let s=null;function i(d){const c={9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},h=new Set;let p=!1;for(let w=0;w<d.length;w+=1){const m=d[w];m==="{"?p=!0:m==="}"?p=!1:p&&h.add(m)}const y={};return Object.keys(c).forEach(w=>{h.has(w)||(y[w]=c[w])}),{mask:d,definitions:y,lazy:!1}}return e.onMounted(async()=>{if(o.value){const{default:d}=await Promise.resolve().then(()=>D1),c=i(t.mask||"");s=d(o.value,c),s.on("accept",()=>{n.value=t.unmask?s.unmaskedValue:s.value}),s.on("complete",()=>{n.value=t.unmask?s.unmaskedValue:s.value}),s.value=n.value!=null?String(n.value):""}}),e.onBeforeUnmount(()=>{s==null||s.destroy()}),e.watch(()=>t.mask,d=>{if(s){const c=i(d||"");s.updateOptions(c)}}),e.watch(n,d=>{s&&s.unmaskedValue!==d&&(s.value=d!=null?String(d):"")}),(d,c)=>(e.openBlock(),e.createElementBlock("input",{type:"text",ref_key:"inputEl",ref:o,placeholder:d.placeholder,disabled:d.disabled,name:d.name,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,10,TA))}}),PA={class:"relative w-full bg-white rounded-lg"},IA=["placeholder","disabled"],m1=e.defineComponent({__name:"vs-input-email",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:null},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",PA,[s[1]||(s[1]=e.createStaticVNode('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>',1)),e.withDirectives(e.createElementVNode("input",{type:"email","onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),placeholder:o.placeholder,disabled:o.disabled,class:e.normalizeClass(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":o.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,IA),[[e.vModelText,n.value]])]))}}),RA={class:"relative w-full bg-white rounded-lg"},OA=["value","placeholder","disabled"],f1=e.defineComponent({__name:"vs-input-tel",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:null},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>n.value?n.value.startsWith("+")?n.value.slice(1):n.value:""),s=d=>{let{value:c}=d.target;c=c.replace(/^\+/,""),n.value=c?`+${c}`:""},i=d=>{const c=d,{data:h,inputType:p}=c;p&&p.startsWith("delete")||h&&/\D/.test(h)&&c.preventDefault()};return e.watch(()=>n.value,d=>{d&&!d.startsWith("+")?n.value=`+${d.replace(/^\+/,"")}`:d||(n.value="")},{immediate:!0}),(d,c)=>(e.openBlock(),e.createElementBlock("div",RA,[c[0]||(c[0]=e.createElementVNode("div",{class:"absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"stroke-gray-500 transition-all"},[e.createElementVNode("path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"})])],-1)),c[1]||(c[1]=e.createElementVNode("div",{class:"absolute bottom-2/4 translate-y-2/4 left-[30px] text-gray-500 select-none pointer-events-none"}," + ",-1)),e.createElementVNode("input",{type:"tel",value:o.value,onInput:s,onBeforeinput:i,pattern:"^\\+[1-9]\\d{1,14}$",maxlength:"15",placeholder:d.placeholder,disabled:d.disabled,class:e.normalizeClass(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":d.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,OA)]))}}),UA=["value","disabled"],ZA={class:"text-[13px] text-gray-700"},WA=e.defineComponent({__name:"vs-input-radio-default",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled);return(o,s)=>{var i,d;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center gap-0",[t.customClass,n.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=c=>a.value=c),type:"radio",value:t.value,disabled:n.value,class:"hidden"},null,8,UA),[[e.vModelRadio,a.value]]),e.createElementVNode("span",{class:e.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${((i=t.style)==null?void 0:i.primaryColor)||"blue"}-500`,n.value?"opacity-50 cursor-not-allowed":""]])},[a.value==t.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${((d=t.style)==null?void 0:d.primaryColor)||"blue"}-500`]])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("span",ZA,e.toDisplayString(t.text),1)],2)}}}),GA=["value","disabled"],KA={class:"text-[13px] text-gray-700"},JA=e.defineComponent({__name:"vs-input-radio-buttons",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled);return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[a.value==t.value?`ring-2 ring-ring ring-${((i=t.style)==null?void 0:i.primaryColor)||"blue"}-500`:"",t.customClass,n.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=d=>a.value=d),type:"radio",value:t.value,disabled:n.value,class:"hidden"},null,8,GA),[[e.vModelRadio,a.value]]),e.createElementVNode("span",KA,e.toDisplayString(t.text),1)],2)}}}),YA={"vs-input-radio-default":WA,"vs-input-radio-buttons":JA},g1=e.defineComponent({__name:"vs-input-radio",props:e.mergeModels({options:{},position:{default:"vertical"},view:{default:"default"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>YA[`vs-input-radio-${t.view}`]);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,i=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),e.mergeProps({key:i==null?void 0:i.id,text:i.text,value:i.id.toString(),checked:a.value===i.id,modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=d=>a.value=d)},{ref_for:!0},o.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}}),XA={key:1,class:"w-full flex flex-col gap-4"},QA={key:0,class:"text-sm font-medium text-muted-foreground my-2"},eD="Без категорії",tD=e.defineComponent({__name:"vs-input-checkbox",props:{options:{default:()=>[]},position:{default:"vertical"},slots:{default:null},colSpan:{default:0},data:{},view:{},group:{default:void 0},values:{default:()=>[]},style:{},customClass:{},disabled:{type:Boolean},modelValue:{default:!1},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,o=e.ref([]),s=e.reactive({}),i=m=>(m==null?void 0:m.value)||(m==null?void 0:m.id)||(m==null?void 0:m.text)||m,d=m=>m.text||String(m),c=m=>`lg:col-span-${m||12}`,h=e.computed(()=>[a.position==="vertical"?"flex flex-col":"",a.colSpan?"grid":"flex justify-start"]),p=m=>m==null||m===""?null:typeof m=="string"||typeof m=="number"?m:String(m),y=e.computed(()=>{var x;if(!a.group)return[];const m=new Map;o.value.forEach(k=>{var C;const v=k[a.group],V=p(v);m.has(V)||m.set(V,[]),(C=m.get(V))==null||C.push(k)});const f=[];(x=a.values)!=null&&x.length&&a.values.forEach(k=>{const v=p(k);f.push(v)});const u=new Set,g=k=>{const v=m.get(k)||[];if(!v.length)return null;const V=k===null?"group-null":`group-${String(k)}`,C=k===null?eD:String(k);return u.add(k),{key:V,label:C,options:v}},M=[];return f.forEach(k=>{const v=g(k);v&&M.push(v)}),m.forEach((k,v)=>{if(u.has(v))return;const V=g(v);V&&M.push(V)}),M}),w=async()=>{try{const m=await fetch(`/api/suggest/${a.data}`).then(f=>f.json());o.value=(m==null?void 0:m.data)||m}catch(m){console.error(m)}};return e.watch(()=>a.modelValue,m=>{if(typeof m=="boolean"&&o.value.length===1){const f=i(o.value[0]);s[f]=m}else if(Array.isArray(m)){const f=new Set(m);o.value.forEach(u=>{if(!u.disabled){const g=i(u);s[g]=f.has(g)}})}},{immediate:!0}),e.watch(s,()=>{if(!o.value.length){n("update:modelValue",null);return}const m=Object.entries(s).filter(([,f])=>f).map(([f])=>f);n("update:modelValue",m.length===0?[]:m)},{deep:!0}),e.onMounted(()=>{if(a.data)w().then(()=>{if(typeof a.modelValue=="boolean"&&o.value.length===1){const m=i(o.value[0]);s[m]=a.modelValue}else if(Array.isArray(a.modelValue)){const m=new Set(a.modelValue);o.value.forEach(f=>{if(!f.disabled){const u=i(f);s[u]=m.has(u)}})}});else if(o.value=a.options,typeof a.modelValue=="boolean"&&o.value.length===1){const m=i(o.value[0]);s[m]=a.modelValue}else if(Array.isArray(a.modelValue)){const m=new Set(a.modelValue);o.value.forEach(f=>{if(!f.disabled){const u=i(f);s[u]=m.has(u)}})}}),(m,f)=>a.group?(e.openBlock(),e.createElementBlock("div",XA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.key,class:"flex flex-col gap-2"},[u.label?(e.openBlock(),e.createElementBlock("span",QA,e.toDisplayString(u.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["p-0 w-full gap-[12px]",h.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.options,g=>(e.openBlock(),e.createBlock(h1,{modelValue:s[i(g)],"onUpdate:modelValue":M=>s[i(g)]=M,value:i(g),class:e.normalizeClass(c(m.colSpan)),disabled:a.disabled||g.disabled,label:d(g),key:`${u.key}-${i(g)}`,icon:g==null?void 0:g.icon,imgUrl:g==null?void 0:g.imgUrl,option:g,view:m.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2)]))),128))])):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["p-0 w-full gap-[10px]",h.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(h1,{modelValue:s[i(u)],"onUpdate:modelValue":g=>s[i(u)]=g,value:i(u),class:e.normalizeClass(c(m.colSpan)),disabled:a.disabled||u.disabled,label:d(u),key:i(u),icon:u==null?void 0:u.icon,imgUrl:u==null?void 0:u.imgUrl,option:u,view:m.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2))}}),Wr=de(tD,[["__scopeId","data-v-8e66207e"]]),aD=["type","placeholder","disabled"],rD=e.defineComponent({__name:"vs-input-date1",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{},mode:{default:"date"}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l;function n(p){return p?a.mode==="datetime"?(p.includes("T")?p:null)||p+(p.includes(" ")?"":"T00:00"):p==null?void 0:p.split(" ")[0]:null}const{inputClass:o}=He(a.style),s=t,i=e.computed({get:()=>n(a.modelValue),set:p=>s("update:modelValue",p)}),d=e.computed(()=>a.mode==="datetime"?"datetime-local":a.mode),c=e.computed(()=>!!a.disabled),h=e.computed(()=>a.placeholder??"");return(p,y)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:d.value,"onUpdate:modelValue":y[0]||(y[0]=w=>i.value=w),placeholder:h.value,disabled:c.value,ref:"date",class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[p.modelValue?"":"text-opacity-50",e.unref(o)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,aD)),[[e.vModelDynamic,i.value]])}}),lD=(l,t)=>{if(!t||!Object.keys(t).length)return l;const[a,n=""]=l.split("?"),o=new URLSearchParams(n);Object.entries(t).forEach(([i,d])=>{d==null||d===""||o.set(i,String(d))});const s=o.toString();return s?`${a}?${s}`:a},Gr=async(l,t={})=>{var a;try{const n=new FormData;n.append("unique","true"),n.append("file",l);const{api:o,id:s="1",form:i="form",table:d="table",customParams:c}=t,h=o||`/file/upload/uploads?id=${s||""}&form=${i||""}&table=${d||""}`,p=lD(h,c);return(a=await fetch(p,{method:"POST",body:n}).then(y=>y.json()))==null?void 0:a.result}catch(n){return xe({type:"error",title:"Помилка!",message:"Сталась помилка під час завантаження файлу",position:"right-bottom"}),console.error("Сталась помилка завантаження файлу",n),null}},nD=async l=>{try{return await fetch(`file/delete${l}`),!0}catch(t){return console.error(t),!1}},Kr=async l=>{try{const t=await fetch(`/file/download/files/uploads${l}`),a=await t.arrayBuffer(),n=t.headers["content-type"],o=new TextDecoder("utf-8").decode(a),s=new Blob([o],{type:n}),i=document.createElement("a");i.setAttribute("download",l),i.href=window.URL.createObjectURL(s),i.click()}catch(t){console.error(t.message)}},oD={},sD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function iD(l,t){return e.openBlock(),e.createElementBlock("svg",sD,t[0]||(t[0]=[e.createElementVNode("path",{d:"M5 12h14"},null,-1),e.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const et=de(oD,[["render",iD]]),dD={},cD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function hD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",cD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const pD=de(dD,[["render",hD]]),yD={},uD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function kD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",uD,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),e.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),e.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const mD=de(yD,[["render",kD]]),fD={},gD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function xD(l,t){return e.openBlock(),e.createElementBlock("svg",gD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>',6)]))}const Jr=de(fD,[["render",xD]]),MD={},bD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function wD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",bD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const vD=de(MD,[["render",wD]]),VD={},CD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function zD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",CD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const BD=de(VD,[["render",zD]]),_D=l=>{if(!l)return"";const t=l==null?void 0:l.split(".");return t[t.length-1]},ED=l=>{const t=_D(l),a={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return a.imageFormat.includes(t)?"img":a.sheetsFormat.includes(t)?mD:a.textsFormat.includes(t)?BD:a.documentsFormat.includes(t)?pD:a.archivesFormat.includes(t)?vD:Jr},qD={},SD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function jD(l,t){return e.openBlock(),e.createElementBlock("svg",SD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const Bt=de(qD,[["render",jD]]),AD={},DD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function ND(l,t){return e.openBlock(),e.createElementBlock("svg",DD,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const Yr=de(AD,[["render",ND]]),LD=["title"],HD={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},$D=e.defineComponent({__name:"vs-input-file-list-item",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},api:{},customParams:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(l){const t=e.useModel(l,"value"),a=e.useModel(l,"item"),n=l;return(o,s)=>(e.openBlock(),e.createElementBlock("div",{title:a.value,class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ED)(a.value)),{src:a.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:s[0]||(s[0]=i=>e.unref(Kr)(a.value))},null,8,["src"])),e.createElementVNode("div",HD,[e.createElementVNode("button",{type:"button",onClick:s[1]||(s[1]=i=>{var d;e.unref(nD)(a.value),t.value=n.multiple?(d=t.value)==null?void 0:d.filter(c=>c!==a.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[e.createVNode(Bt,{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=i=>e.unref(Kr)(a.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[e.createVNode(Yr,{class:"w-4 h-4"})])])],8,LD))}}),x1=de($D,[["__scopeId","data-v-286cdbc0"]]),FD={class:"flex items-center gap-x-2"},TD=["accept","multiple","disabled"],PD={key:1,class:"flex items-center flex-wrap gap-2"},ID={key:1,class:"loader"},RD={key:1,class:"loader"},OD=e.defineComponent({__name:"vs-input-file",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},api:{},customParams:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=e.useModel(l,"modelValue"),o=t,s=e.ref(null),i=e.ref(!1),d=e.inject("values"),c=e.computed(()=>a.format?a.format.split(",").map(x=>x.trim().toLowerCase()).filter(Boolean):[]),h=x=>Array.isArray(n.value)&&n.value[x]||"",p=x=>{if(a.max_size&&x.size>a.max_size*1024*1024){const k=(x.size/1048576).toFixed(2);return xe({type:"error",title:"Помилка!",message:`Файл "${x.name}" занадто великий. Максимальний розмір: ${a.max_size} МБ, розмір файлу: ${k} МБ`,position:"right-bottom"}),!1}return!0},y=x=>{var V;if(!c.value.length)return!0;const k=`.${((V=x.name.split(".").pop())==null?void 0:V.toLowerCase())||""}`,v=c.value.includes(k);return v||xe({type:"error",title:"Помилка!",message:`Неприпустимий формат файлу "${x.name}". Дозволені формати: ${c.value.join(", ")}`,position:"right-bottom"}),v},w=e.computed(()=>{var V;const x={},k=[];if(!((V=a.customParams)!=null&&V.length))return{params:x,missingSources:k};const v=(d==null?void 0:d.value)??{};return a.customParams.forEach(C=>{if(!C)return;const[q,H]=C.split("="),Q=q==null?void 0:q.trim(),G=H==null?void 0:H.trim();if(!Q||!G)return;const $=v[G];if($==null||$===""){k.push(G);return}x[Q]=$}),{params:x,missingSources:k}}),m=()=>{const{params:x}=w.value;return{api:a.api,customParams:Object.keys(x).length?x:void 0}},f=()=>{const x=w.value.missingSources;if(!x.length)return!0;const k=x.join(", ");return xe({type:"warning",title:"Заповніть поля",message:`Поля (${k}) необхідні для завантаження файлу`,position:"right-bottom"}),!1},u=x=>{xe({type:"error",title:"Помилка завантаження",message:x||"Не вдалося завантажити файл. Спробуйте ще раз.",position:"right-bottom"})},g=()=>{var x;a.disabled||i.value||f()&&((x=s.value)==null||x.click())},M=async x=>{const{files:k}=x.target;if(!k||k.length===0)return;if(!f()){s.value&&(s.value.value="");return}const v=Array.from(k);if(a.max_size&&v.filter(V=>!p(V)).length>0){s.value&&(s.value.value="");return}if(v.filter(V=>!y(V)).length>0){s.value&&(s.value.value="");return}i.value=!0;try{if(a.multiple){const V=Array.from(k).map(async H=>await Gr(H,m())),C=await Promise.all(V),q=C.filter(H=>H!==null).map(H=>H==null?void 0:H.file_path).filter(Boolean);if(q.length===0){u();return}q.length<C.length&&u("Деякі файли не вдалося завантажити. Перевірте їх та спробуйте знову."),n.value=[...n.value||[],...q],o("change",n.value)}else{const V=k[0],C=await Gr(V,m());if(!(C!=null&&C.file_path)){u();return}n.value=C==null?void 0:C.file_path,o("change",n.value||"")}}catch(V){const C=(V==null?void 0:V.message)||void 0;u(C)}finally{i.value=!1,s.value&&(s.value.value="")}};return(x,k)=>(e.openBlock(),e.createElementBlock("div",FD,[e.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:s,type:"file",accept:a.format,multiple:x.multiple,onChange:M,disabled:i.value||x.disabled},null,40,TD),!x.multiple&&n.value?(e.openBlock(),e.createBlock(x1,{key:0,item:n.value,"onUpdate:item":k[0]||(k[0]=v=>n.value=v),value:n.value,"onUpdate:value":k[1]||(k[1]=v=>n.value=v)},null,8,["item","value"])):x.multiple?(e.openBlock(),e.createElementBlock("div",PD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(v,V)=>(e.openBlock(),e.createBlock(x1,{multiple:x.multiple,key:V,value:n.value,"onUpdate:value":k[2]||(k[2]=C=>n.value=C),item:h(V)},null,8,["multiple","value","item"]))),128)),e.createElementVNode("div",{onClick:g,class:e.normalizeClass(["relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",x.disabled||i.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[i.value?(e.openBlock(),e.createElementBlock("div",ID)):(e.openBlock(),e.createBlock(et,{key:0,class:"w-6 h-6"}))],2)])):e.createCommentVNode("",!0),x.multiple?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:g,class:e.normalizeClass([x.disabled||i.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[i.value?(e.openBlock(),e.createElementBlock("div",RD)):(e.openBlock(),e.createBlock(et,{key:0,class:"w-6 h-6"}))],2))]))}}),Xr=de(OD,[["__scopeId","data-v-cf6efbaa"]]),UD={class:"vs-input-file2 flex flex-col gap-4"},ZD={class:"flex items-center gap-x-2"},WD=["accept","disabled"],GD={key:0,class:"absolute inset-0 flex flex-col items-center justify-center gap-1 rounded-lg bg-white/90 text-xs font-medium text-slate-600"},KD={key:0,class:"rounded-lg border border-[#CFD9E0] bg-white p-4 shadow-sm"},JD={class:"flex items-center justify-between text-sm"},YD={class:"truncate pr-4"},XD={class:"font-medium text-slate-800 truncate"},QD={class:"text-slate-500"},eN={class:"text-slate-500 whitespace-nowrap"},tN={class:"mt-3 h-2 rounded-full bg-slate-100 overflow-hidden"},aN={class:"mt-3 flex flex-wrap gap-2 text-sm"},rN={key:0,class:"mt-2 text-sm text-rose-600"},lN=e.defineComponent({__name:"vs-input-file2",props:e.mergeModels({format:{},max_size:{},api:{},chunkSize:{default:5*1024*1024},subdir:{default:""},customParams:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(null),o=e.ref(null),s=e.ref(""),i=e.ref(0),d=e.ref(!1),c=e.ref(""),h=e.ref(null),p=e.inject("values"),y=e.computed(()=>t.format?t.format.split(",").map(B=>B.trim().toLowerCase()).filter(Boolean):[]),w=e.computed(()=>!o.value||!o.value.size?0:Math.min(100,Math.round(i.value/o.value.size*100))),m=e.computed(()=>o.value?`${g(i.value)} / ${g(o.value.size)}`:""),f=e.computed(()=>t.disabled?"opacity-50 cursor-not-allowed":d.value?"cursor-default text-blue-500":"cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"),u=()=>{var B;t.disabled||d.value||v()&&((B=n.value)==null||B.click())},g=B=>{if(!Number.isFinite(B))return"0 B";const P=["B","KB","MB","GB"];let L=0,Z=B;for(;Z>=1024&&L<P.length-1;)Z/=1024,L+=1;return`${Z.toFixed(L===0?0:1)} ${P[L]}`},M=B=>{if(!t.max_size)return!0;const P=t.max_size*1024*1024;return B.size>P?(xe({type:"error",title:"Файл занадто великий",message:`Максимальний розмір ${t.max_size} МБ`,position:"right-bottom"}),!1):!0},x=B=>{var L;if(!y.value.length)return!0;const P=`.${((L=B.name.split(".").pop())==null?void 0:L.toLowerCase())||""}`;return y.value.includes(P)?!0:(xe({type:"error",title:"Непідтримуваний формат",message:`Дозволені формати: ${y.value.join(", ")}`,position:"right-bottom"}),!1)},k=e.computed(()=>{var Z;const B={},P=[];if(!((Z=t.customParams)!=null&&Z.length))return{params:B,missing:P};const L=(p==null?void 0:p.value)??{};return t.customParams.forEach(F=>{if(!F)return;const[X,J]=F.split("="),se=X==null?void 0:X.trim(),ce=J==null?void 0:J.trim();if(!se||!ce)return;const Ee=L[ce];Ee==null||Ee===""?P.push(ce):B[se]=Ee}),{params:B,missing:P}}),v=()=>k.value.missing.length?(xe({type:"warning",title:"Заповніть поля",message:`Потрібні значення: ${k.value.missing.join(", ")}`,position:"right-bottom"}),!1):!0,V=B=>{var Z;const P=B.target,L=(Z=P.files)==null?void 0:Z[0];if(L){if(!v()){P.value="";return}if(!M(L)||!x(L)){P.value="";return}o.value=L,i.value=0,s.value="",c.value=""}},C=async()=>{if(!o.value){u();return}try{c.value="";const B={id:s.value||"",fileName:o.value.name,subdir:t.subdir,size:o.value.size,...k.value.params},P=await fetch("/api/file/upload2/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!P.ok)throw new Error("Не вдалося ініціалізувати завантаження");const L=await P.json();s.value=L.id||s.value,i.value=L.uploaded||0,await q()}catch(B){c.value=(B==null?void 0:B.message)||"Помилка при старті завантаження"}},q=async()=>{if(!(!o.value||!s.value)){d.value=!0;try{for(;i.value<o.value.size;){const B=i.value,P=Math.min(B+t.chunkSize,o.value.size),L=o.value.slice(B,P);h.value=new AbortController;const Z=await fetch(`/api/file/upload2/${s.value}`,{method:"PATCH",headers:{"Content-Range":`bytes ${B}-${P-1}/${o.value.size}`},body:L,signal:h.value.signal});if(!Z.ok)throw new Error("Помилка завантаження частини");const F=await Z.json().catch(()=>({}));if(F.uploaded!=null?i.value=Number(F.uploaded):i.value=P,F.finished||i.value>=o.value.size){d.value=!1,a.value=F.file_path||F.url||s.value,xe({type:"success",title:"Файл завантажено",message:o.value.name,position:"right-bottom"}),$();return}}}catch(B){if((B==null?void 0:B.name)==="AbortError")return;c.value=(B==null?void 0:B.message)||"Помилка при завантаженні",d.value=!1}finally{h.value=null,d.value=!1}}},H=()=>{var B;d.value&&((B=h.value)==null||B.abort(),h.value=null,d.value=!1)},Q=async()=>{if(o.value){if(!s.value){await C();return}await q()}},G=()=>{var B;(B=h.value)==null||B.abort(),h.value=null,$()},$=()=>{const B=n.value;B&&(B.value=""),o.value=null,s.value="",i.value=0,c.value=""};return(B,P)=>{var L;return e.openBlock(),e.createElementBlock("div",UD,[e.createElementVNode("div",ZD,[e.createElementVNode("input",{ref_key:"fileInput",ref:n,type:"file",class:"hidden",accept:t.format,disabled:d.value||t.disabled,onChange:V},null,40,WD),a.value?(e.openBlock(),e.createBlock(x1,{key:0,item:a.value,"onUpdate:item":P[0]||(P[0]=Z=>a.value=Z),value:a.value,"onUpdate:value":P[1]||(P[1]=Z=>a.value=Z)},null,8,["item","value"])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:u,class:e.normalizeClass(["relative h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",f.value])},[d.value?(e.openBlock(),e.createElementBlock("div",GD,[P[2]||(P[2]=e.createElementVNode("div",{class:"loader"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(w.value)+"%",1)])):(e.openBlock(),e.createBlock(et,{key:1,class:"w-6 h-6"}))],2))]),o.value&&!a.value?(e.openBlock(),e.createElementBlock("div",KD,[e.createElementVNode("div",JD,[e.createElementVNode("div",YD,[e.createElementVNode("div",XD,e.toDisplayString(o.value.name),1),e.createElementVNode("div",QD,e.toDisplayString(g(o.value.size)),1)]),e.createElementVNode("div",eN,e.toDisplayString(m.value),1)]),e.createElementVNode("div",tN,[e.createElementVNode("div",{class:"h-full rounded-full bg-blue-500 transition-all duration-300",style:e.normalizeStyle({width:`${w.value}%`})},null,4)]),e.createElementVNode("div",aN,[!d.value&&i.value>0&&i.value<(((L=o.value)==null?void 0:L.size)||0)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"rounded border border-slate-300 px-3 py-1",onClick:Q}," Resume ")):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"rounded border border-slate-300 px-3 py-1",onClick:H}," Pause ")):e.createCommentVNode("",!0),!d.value&&i.value===0?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"rounded border border-slate-300 px-3 py-1",onClick:C}," Upload ")):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"rounded border border-rose-200 px-3 py-1 text-rose-600",onClick:G}," Cancel ")]),c.value?(e.openBlock(),e.createElementBlock("p",rN,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])}}}),M1=de(lN,[["__scopeId","data-v-ea9f874f"]]),nN={class:"max-w-[55vw]"},oN={class:"text-sm font-semibold text-gray-800 truncate dark:text-neutral-200"},sN={class:"flex items-center text-xs text-gray-500 truncate dark:text-neutral-500"},iN={class:"px-[5px]"},dN={class:""},ba=e.defineComponent({__name:"vs-widget-file-info",props:{item:{default:null}},setup(l){const t=l,a=e.computed(()=>{try{return new Date(t.item.cdate).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}});function n(o){if(o<1024)return`${o} B`;const s=o/1024;return s<1024?`${s.toFixed(2)} KB`:`${(s/1024).toFixed(2)} MB`}return(o,s)=>{var i,d,c,h;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s[1]||(s[1]=e.createStaticVNode('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>',1)),e.createElementVNode("div",nN,[e.createElementVNode("p",oN,e.toDisplayString((i=o.item)==null?void 0:i.uploaded_name),1),e.createElementVNode("p",sN,[e.createElementVNode("span",null,e.toDisplayString((d=o.item)==null?void 0:d.username),1),e.withDirectives(e.createElementVNode("span",iN,"|",512),[[e.vShow,(c=o.item)==null?void 0:c.username]]),e.createElementVNode("span",null,e.toDisplayString(a.value),1),s[0]||(s[0]=e.createElementVNode("span",{class:"px-[5px]"},"|",-1)),e.createElementVNode("span",dN,e.toDisplayString(n((h=o.item)==null?void 0:h.size)),1)])])],64)}}}),cN={class:"p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full"},hN={key:0,class:"flex w-full gap-x-3 items-center"},pN={key:1,class:"flex gap-x-3 w-full items-center"},yN={key:2,class:"flex gap-x-3 w-full items-center"},uN=["href"],kN={key:3,class:"flex gap-x-3 w-full items-center"},mN={class:"lg:absolute lg:top-3 lg:end-1 opacity-100"},fN={class:"p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},gN={class:"inline-block"},xN={class:"inline-block"},MN=e.defineComponent({__name:"vs-widget-file-item",props:{item:{default:null},index:{default:0},prefix:{default:"/api"}},emits:["update","openModal","openLightbox"],setup(l,{emit:t}){const a=l,n=t;function o(p){return["pdf","json"].includes(p.ext)}function s(p){return["ppt","pptx","doc","docx","xls","xlsx"].includes(p.ext)}function i(p){const y=document.createElement("a");y.setAttribute("download",p==null?void 0:p.uploaded_name),y.href=p==null?void 0:p.file_path,y.click()}async function d(){try{await fetch(`${a.prefix}/widget/file/${a.item.entity_id}/${a.item.file_id}`),n("update")}catch(p){console.error(p)}}function c(){n("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:d,updateListOnConfirm:!0})}function h(p){(a.item.ext==="jpg"||a.item.ext==="png")&&n("openLightbox",{item:a.item,index:p})}return(p,y)=>(e.openBlock(),e.createElementBlock("div",cN,[p.item.ext==="jpg"||p.item.ext==="png"?(e.openBlock(),e.createElementBlock("div",hN,[e.createElementVNode("div",{class:"max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",onClick:y[0]||(y[0]=w=>h(p.index))},[e.createVNode(ba,{item:p.item},null,8,["item"])])])):o(p.item)?(e.openBlock(),e.createElementBlock("div",pN,[e.createVNode(ba,{item:p.item},null,8,["item"])])):s(p.item)?(e.openBlock(),e.createElementBlock("div",yN,[e.createElementVNode("a",{href:`/api/file-preview?id=${p.item.file_id}`,target:"_blank",class:"flex gap-x-3 w-full items-center"},[e.createVNode(ba,{item:p.item},null,8,["item"])],8,uN)])):(e.openBlock(),e.createElementBlock("div",kN,[e.createVNode(ba,{item:p.item},null,8,["item"])])),e.createElementVNode("div",mN,[e.createElementVNode("div",fN,[e.createElementVNode("div",gN,[e.createElementVNode("button",{class:"inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:y[1]||(y[1]=w=>i(p.item))},[e.createVNode(Yr,{height:"14",width:"14"})])]),y[3]||(y[3]=e.createElementVNode("div",{class:"w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700"},null,-1)),e.createElementVNode("div",xN,[e.createElementVNode("button",{type:"button",class:"size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",onClick:y[2]||(y[2]=w=>c())},[e.createVNode(Bt,{height:"14",width:"14"})])])])])]))}}),bN={},wN={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function vN(l,t){return e.openBlock(),e.createElementBlock("svg",wN,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const VN=de(bN,[["render",vN]]),CN={class:"flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full"},zN={class:"flex w-full mb-[12px] items-center gap-x-2"},BN={class:"font-semibold text-gray-800 dark:text-neutral-200 text-[14px]"},_N={class1:"ml-auto"},EN={class:"py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},qN={key:0,class:"py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"},SN={class:"relative"},jN={key:1,class:"space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},AN={key:0},Qr=e.defineComponent({__name:"vs-input-file-list",props:{id:{default:""},prefix:{default:"/api"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},emits:["update"],setup(l,{emit:t}){const a=l,n=e.inject("form"),o=e.computed(()=>n.value.formId),s=e.ref(!1),i=e.ref(0),d=t,c=e.ref(!1),h=e.ref({}),p=e.ref([]),y=e.ref(""),w=e.computed(()=>Array.isArray(p.value)?p.value.filter(k=>k.ext==="jpg"||k.ext==="png").map(k=>k==null?void 0:k.file_path):[]),m=e.computed(()=>y.value===""?p.value:p.value.filter(k=>{var v;return(v=k==null?void 0:k.uploaded_name)==null?void 0:v.includes(y.value)})),f=k=>{const v=w.value.findIndex(V=>V===k.item.file_path);v!==-1&&(s.value=!0,i.value=v)},u=async()=>{try{const k=await fetch(`${a.prefix}/widget/file/${o.value}`).then(v=>v.json());p.value=k==null?void 0:k.rows}catch(k){console.error(k)}},g=async k=>{await Promise.all(Array.from(k.target.files).map(async v=>{const V=new FormData;V.append("file",v);try{const C=`${a.prefix}/widget/file/${o.value}`,q=await fetch(C,{method:"POST",body:V});return q.ok?(d("update","file-list"),v):(xe({type:q.status>=400&&q.status<500?"warning":"error",title:"Error",message:`Error code: ${q.status}`}),null)}catch(C){return xe({type:"error",title:"Error",message:C.message||"Unknown error"}),console.error(C),null}})),await u()},M=k=>{const v={...k};return k.cancel||(v.cancel=()=>{c.value=!1}),k.updateListOnConfirm&&(v.confirm=async()=>{await k.confirm(),c.value=!1,u()}),v},x=k=>{h.value=M(k),c.value=!0};return e.watch(o,k=>{k&&u()}),e.onMounted(()=>{o.value&&u()}),(k,v)=>{var q,H,Q;const V=e.resolveComponent("Lightbox"),C=e.resolveComponent("MessageBox");return e.openBlock(),e.createElementBlock("div",CN,[e.createElementVNode("div",zN,[e.createElementVNode("h2",BN," Файлів: "+e.toDisplayString((q=p.value)==null?void 0:q.length),1),e.createElementVNode("div",_N,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:v[0]||(v[0]=G=>g(G))},null,32),e.createElementVNode("div",EN,[e.createVNode(VN,{height:"16",width:"16"})])])])]),((H=p.value)==null?void 0:H.length)>4?(e.openBlock(),e.createElementBlock("div",qN,[e.createElementVNode("div",null,[e.createElementVNode("div",SN,[v[8]||(v[8]=e.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5"},[e.createElementVNode("svg",{class:"flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("path",{d:"m21 21-4.3-4.3"})])],-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":v[1]||(v[1]=G=>y.value=G),class:"py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Введіть назву файлу"},null,512),[[e.vModelText,y.value,void 0,{trim:!0}]])])])])):e.createCommentVNode("",!0),(Q=p.value)!=null&&Q.length?(e.openBlock(),e.createElementBlock("div",jN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(G,$)=>(e.openBlock(),e.createBlock(MN,{key:$,prefix:k.prefix,item:G,index:$,onUpdate:v[2]||(v[2]=B=>k.$emit("update","file-list")),onOpenModal:v[3]||(v[3]=B=>x(B)),onOpenLightbox:v[4]||(v[4]=B=>f(B))},null,8,["prefix","item","index"]))),128)),m.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",AN,v[9]||(v[9]=[e.createElementVNode("p",{class:"text-sm text-gray-600 font-sm"}," Файлів з такою назвою не існує, введіть інше пошукове слово ",-1)])))])):e.createCommentVNode("",!0),e.createVNode(V,{modelValue:s.value,"onUpdate:modelValue":v[5]||(v[5]=G=>s.value=G),startIndex:i.value,"onUpdate:index":v[6]||(v[6]=G=>i.value=G),images:w.value},null,8,["modelValue","startIndex","images"]),e.createVNode(C,e.mergeProps({modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=G=>c.value=G),onConfirm:h.value.confirm},h.value),null,16,["modelValue","onConfirm"])])}}}),DN={class:"flex items-center justify-between"},NN={class:"text-[16px] text-gray-900 font-medium"},LN={class:"grid gap-3"},HN=e.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,n=>{a.value=n}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",DN,[e.createElementVNode("p",NN,e.toDisplayString(l.title),1),e.createVNode(y1,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=s=>a.value=s),style:e.normalizeStyle(l.style)},null,8,["modelValue","style"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",LN,[e.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),$N=de(HN,[["__scopeId","data-v-90320b87"]]),FN={class:"text-[16px] text-gray-900 font-medium"},TN={class:"grid gap-3"},PN=e.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,n=>{a.value=n}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",onClick:o[0]||(o[0]=s=>a.value=!a.value),class:"flex items-center gap-2"},[e.createVNode(e.unref(p1),{class:e.normalizeClass(["h-4 w-4 duration-300",[a.value?"-rotate-180":""]])},null,8,["class"]),e.createElementVNode("span",FN,e.toDisplayString(l.title),1)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",TN,[e.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),IN=de(PN,[["__scopeId","data-v-590eff11"]]),RN={class:"flex items-center justify-between"},ON=e.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",RN,[e.createElementVNode("p",null,e.toDisplayString(l.title),1)]),e.renderSlot(t.$slots,"default")]))}}),UN={switcher:$N,accordion:IN,default:ON},Ge={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},ZN=(l,t)=>String(l)===String(t),WN=(l,t)=>String(l)!==String(t),GN=(l,t)=>l>t,KN=(l,t)=>l>=t,JN=(l,t)=>l<t,YN=(l,t)=>l<=t,XN=(l,t)=>Array.isArray(t)&&t.length===2?l>=t[0]&&l<=t[1]:!1,QN=(l,t)=>String(l).startsWith(String(t)),eL=(l,t)=>String(l).endsWith(String(t)),tL=(l,t)=>String(l).includes(String(t)),aL=(l,t)=>Array.isArray(t)?t.includes(l):!1,rL=(l,t)=>Array.isArray(t)?!t.includes(l):!0,el=(l,t)=>{if(!t)return!0;switch(t==null?void 0:t[1]){case Ge.Equal:return ZN(l,t==null?void 0:t[2]);case Ge.Inequal:return WN(l,t==null?void 0:t[2]);case Ge.Higer:return GN(l,t==null?void 0:t[2]);case Ge.HigerOrEqual:return KN(l,t==null?void 0:t[2]);case Ge.Lower:return JN(l,t==null?void 0:t[2]);case Ge.LowerOrEqual:return YN(l,t==null?void 0:t[2]);case Ge.Between:return XN(l,t==null?void 0:t[2]);case Ge.StartWith:return QN(l,t==null?void 0:t[2]);case Ge.EndWith:return eL(l,t==null?void 0:t[2]);case Ge.Contain:return tL(l,t==null?void 0:t[2]);case Ge.In:return aL(l,t==null?void 0:t[2]);case Ge.NotIn:return rL(l,t==null?void 0:t[2]);default:return!0}},tl=e.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},name:{type:String,default:""},schema:{type:Array,default:()=>[]}},setup(l){const t=l,a=e.inject("values",e.ref({})),n=e.inject("form"),o=e.computed(()=>{var d;return(d=t.schema)==null?void 0:d.filter(c=>{var w,m,f,u;const h=c==null?void 0:c.conditions;if(!h)return!0;const p=Array.isArray(h)?h[0]:h,y=t.name?((m=(w=a.value)==null?void 0:w[t.name])==null?void 0:m[p])??((f=a.value)==null?void 0:f[p]):(u=a.value)==null?void 0:u[p];return el(y,h)})}),s=e.computed(()=>UN[t.view]),i=e.computed(()=>{if(a.value||(a.value={}),!t.name)return a.value;const d=a.value[t.name];if(d)return d;const c={};return a.value={...a.value,[t.name]:c},c});return(d,c)=>{var h;return(h=l.schema)!=null&&h.length?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{key:0,title:l.title,style:e.normalizeStyle(l.style)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,p=>{var y,w;return e.openBlock(),e.createBlock(fl,e.mergeProps({key:p.name},{ref_for:!0},p,{item:p,modelValue:i.value[p.name],"onUpdate:modelValue":m=>i.value[p.name]=m,style:l.style,error:(w=(y=e.unref(n))==null?void 0:y.errors)==null?void 0:w[p.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"])}),128))]),_:1},8,["title","style"])):e.createCommentVNode("",!0)}}}),lL=["aria-expanded","data-focus"],nL={class:"flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden h-full"},oL={key:0,class:"flex flex-nowrap items-center gap-1 overflow-x-auto overflow-y-hidden min-w-0 flex-1 py-0.5"},sL={class:"flex items-center gap-1 min-w-0"},iL=["title"],dL=["innerHTML"],cL=["onClick"],hL={class:"flex-1 min-w-[2px]"},pL=["placeholder"],yL=["title"],uL=["innerHTML"],kL={key:3,class:"truncate flex-1 min-w-0"},mL={key:2,class:"flex-1 min-w-[2px]"},fL=["placeholder"],gL={class:"flex items-center shrink-0"},xL=["disabled"],ML=["disabled","title"],bL=["aria-disabled","onClick"],wL=["innerHTML"],vL={key:1,class:"px-3 py-2 text-center text-gray-500"},VL=["disabled"],b1="w-[16px] h-[16px] flex items-center justify-center flex-shrink-0 text-current",CL=e.defineComponent({__name:"vs-input-select",props:{multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},mode:{},defaultValue:{},search:{type:Boolean,default:!0},placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:""},options:{default:()=>[]},api:{default:null},maxHeight:{default:400},parent:{},set:{},slot:{},add:{},teleport:{default:"body"},auto:{default:0},start:{default:0},style:{default:()=>({})},customClass:{default:""},modelValue:{},error:{default:null},name:{},maxlength:{},minlength:{}},emits:["change","update:modelValue","value-selected"],setup(l,{emit:t}){const a=l,n=t,o=e.computed(()=>a.multiple),s=e.computed(()=>a.disabled);He(a.style);const i=e.computed({get:()=>a.modelValue,set:_=>n("update:modelValue",_)});!i.value&&a.defaultValue&&(i.value=a.defaultValue);const d=e.ref(null),c=e.ref(null),h=e.ref(null),p=e.ref(null),y=e.ref(!1),w=e.ref(!1),m=e.ref(null),f=e.ref([]),u=e.ref(-1),g=e.ref([]),M=e.ref(""),x=e.ref(null),k=e.ref("bottom"),v=e.ref({}),V=e.ref([]),C=e.computed(()=>{if(!V.value.length)return[];const _=f.value,N=new Map(_.map(K=>{var ee;return[(ee=K.id)==null?void 0:ee.toString(),K]}));return V.value.map(K=>N.get(K==null?void 0:K.toString())).filter(K=>!!K)}),q=e.computed(()=>a.placeholder||"Select..."),H=e.computed(()=>J(m.value));e.computed(()=>o.value?!V.value.length&&M.value==="":!H.value&&M.value==="");const Q=e.computed(()=>s.value?!1:o.value?V.value.length>0:!!i.value),G=_=>{var N;return o.value?V.value.some(K=>(K==null?void 0:K.toString())===(_==null?void 0:_.toString())):((N=i.value)==null?void 0:N.toString())===(_==null?void 0:_.toString())},$=e.computed(()=>{let _=f.value??[];if(!a.data&&M.value.trim()!==""){const N=M.value.toLowerCase();_=_.filter(K=>{var me,ge;const ee=J(K).toLowerCase(),U=((ge=(me=K.text)==null?void 0:me.toLowerCase)==null?void 0:ge.call(me))||"";return ee.includes(N)||U.includes(N)})}if(o.value&&V.value.length){const N=new Set(V.value.map(K=>K==null?void 0:K.toString()));_=_.filter(K=>{var ee;return!N.has((ee=K.id)==null?void 0:ee.toString())})}return _}),B=e.inject("values"),P=e.inject("field-props"),L=/\{\{\s*([^}]+?)\s*\}\}/g,Z=_=>(_?String(_):"").replace(/<[^>]*>/g,"").trim(),F=e.computed(()=>a.slot??(a==null?void 0:a.optionTemplate)??""),X=_=>{if(!_)return"";const N=F.value;return N?N.replace(L,(K,ee)=>{const U=ee.trim(),me=_[U];return me!=null?String(me):""}):_.text??""},J=_=>{if(!_)return"";if(!F.value)return _.text??"";const N=X(_);return Z(N)||_.text||""},se=new Map,ce=tz,Ee=_=>_.replace(/^([A-Z])|[\s-_]+(\w)/g,(N,K,ee)=>ee?ee.toUpperCase():K.toLowerCase()),$e=_=>{const N=Ee(_);return N?N.charAt(0).toUpperCase()+N.slice(1):""},Y=_=>{if(!_)return;const N=$e(_);if(se.has(N))return se.get(N);const K=[N,`${N}Icon`,`Lucide${N}`,`Lucide${N}Icon`].map(ee=>ce[ee]).find(Boolean);return se.set(N,K),K},ne=_=>_?typeof _.icon=="string"?Y(_.icon)??null:_.icon??null:null,ue=_=>!!(_!=null&&_.color&&!ne(_)),he=_=>_!=null&&_.color?{color:_.color}:void 0,fe=_=>!!ne(_),T=(_,N,K)=>{var ge;if(!P)return!1;const ee=((ge=P.value)==null?void 0:ge[_])??{},U=(Ce,qe,Le)=>{if(!qe.length)return Ce;const[Fe,...Xe]=qe,b={...Ce};if(!Xe.length)return b[Fe]=Le,b;const z=typeof Ce[Fe]=="object"&&Ce[Fe]!==null?Ce[Fe]:{};return b[Fe]=U(z,Xe,Le),b},me=U(ee,N,K);return P.value={...P.value||{},[_]:me},!0},le=_=>{if(!a.set)return;const N=B==null?void 0:B.value;!N&&!P||Object.entries(a.set).forEach(([K,ee])=>{if(!K)return;const U=_?_[ee]:null,me=K.split(".").map(qe=>qe.trim()).filter(Boolean);if(!me.length)return;const[ge,...Ce]=me;Ce.length&&T(ge,Ce,U??null)||N&&(N[ge]=U??null)})},D=e.computed(()=>{var _,N;return a.parent?((N=(_=B==null?void 0:B.value)==null?void 0:_[a.parent])==null?void 0:N.toString())??null:null}),I=async _=>{var N;if(!a.data){let K=a.options??[];if(_!=null&&_.trim()){const ee=_.toLowerCase();K=K.filter(U=>{var Ce,qe;const me=J(U).toLowerCase(),ge=((qe=(Ce=U.text)==null?void 0:Ce.toLowerCase)==null?void 0:qe.call(Ce))||"";return me.includes(ee)||ge.includes(ee)})}return K}try{const K=a.host??"",ee=a.prefix??"api",U=a.api??`/${ee}/suggest/${a.data}`,me=`${K}${U}`,ge=new URLSearchParams;return ge.set("json","1"),_&&ge.set("key",_),D.value!==void 0&&D.value!==null&&D.value!==""&&ge.set("parent",D.value),a.start===1&&ge.set("start","1"),((N=await fetch(`${me}?${ge.toString()}`).then(Ce=>Ce.json()))==null?void 0:N.data)??[]}catch{return[]}},W=async()=>{a.data?f.value=await I(M.value):f.value=a.options?[...a.options]:[]},re=async _=>{var K,ee,U;if(_==null||_==="")return null;const N=(K=f.value)==null?void 0:K.find(me=>{var ge;return((ge=me==null?void 0:me.id)==null?void 0:ge.toString())===String(_)});if(N)return N;if(a.data)try{const me=a.host??"",ge=a.prefix??"api",Ce=a.api??`/${ge}/suggest/${a.data}`,qe=`${me}${Ce}`,Le=new URLSearchParams;return Le.set("json","1"),Le.set("val",String(_)),D.value!==void 0&&D.value!==null&&D.value!==""&&Le.set("parent",D.value),a.start===1&&Le.set("start","1"),((U=((ee=await fetch(`${qe}?${Le.toString()}`).then(Fe=>Fe.json()))==null?void 0:ee.data)??[])==null?void 0:U[0])??null}catch{return null}return null},ie=async _=>{const N=new Set(f.value.map(ee=>{var U;return(U=ee.id)==null?void 0:U.toString()})),K=_.filter(ee=>!N.has(ee==null?void 0:ee.toString()));K.length&&await K.reduce(async(ee,U)=>{await ee;const me=await re(U);me&&f.value.push(me)},Promise.resolve())},we=()=>{var N;if(!$.value.length){u.value=-1;return}let _=0;if(!o.value&&m.value){const K=(N=m.value.id)==null?void 0:N.toString(),ee=$.value.findIndex(U=>{var me;return((me=U.id)==null?void 0:me.toString())===K});ee>=0&&(_=ee)}u.value=_,e.nextTick(()=>{Ke(g.value[_],h.value)})},A=async()=>{s.value||(y.value=!0,await W(),await e.nextTick(()=>{var _;qt(),(_=x.value)==null||_.focus()}),we())},S=()=>{y.value=!1,u.value=-1,e.nextTick(()=>{var _;(_=x.value)==null||_.blur()})},O=async _=>{s.value||(y.value?S():await A())},ke=async()=>{if(!s.value){if(y.value){S();return}await A()}},Re=()=>{o.value?(V.value=[],i.value=[],n("change",[]),wt(null,[])):(m.value=null,i.value=null,n("change",null),wt(null,null)),le(null),M.value="",e.nextTick(()=>{var _;return(_=x.value)==null?void 0:_.focus()})},ot=_=>{o.value&&(V.value=V.value.filter(N=>(N==null?void 0:N.toString())!==(_==null?void 0:_.toString())),i.value=[...V.value],n("change",i.value),wt(null),e.nextTick(()=>{var N;return(N=x.value)==null?void 0:N.focus()}))},wt=(_,N)=>{const K=N??(o.value?[...V.value]:(_==null?void 0:_.id)??null);n("value-selected",{name:a.name,value:K,option:_})},ht=_=>{o.value?(G(_.id)||(V.value=[...V.value,_.id],i.value=[...V.value],n("change",i.value),wt(_)),M.value="",e.nextTick(()=>{var N;(N=x.value)==null||N.focus(),u.value=Math.min(u.value,$.value.length-1)}),le(null)):(m.value=_,i.value=_.id,n("change",i.value),wt(_),M.value="",S(),le(_))},N1=_=>{if(G(_.id)){o.value||S();return}ht(_)},Ke=(_,N)=>{if(!_||!N)return;const K=_.offsetTop,ee=K+_.offsetHeight,U=N.scrollTop,me=U+N.clientHeight;let ge=N.scrollTop;K<U?ge=K-80:ee>me&&(ge=ee-N.clientHeight+4);const Ce=N;Ce.scrollTop=ge},pt=_=>{let N=_.parentElement;for(;N;){if(N.classList.contains("ui-dialog__content"))return N;const K=window.getComputedStyle(N),ee=K.overflow+K.overflowY+K.overflowX;if(ee.includes("auto")||ee.includes("scroll")||N===document.body||N===document.documentElement)return N;N=N.parentElement}return document.body},qt=()=>{if(!c.value)return;const _=c.value.getBoundingClientRect(),N=window.innerHeight||document.documentElement.clientHeight,K=window.innerWidth||document.documentElement.clientWidth,ee=8,U=8,me=a.maxHeight||300,ge=N-_.bottom-U-ee,Ce=_.top-U-ee,qe=ge>=Ce,Le=Math.max(K-ee*2,0);let{width:Fe}=_;Le>0&&Fe>Le&&(Fe=Le);let{left:Xe}=_;Xe+Fe+ee>K&&(Xe=K-Fe-ee),Xe=Math.max(Xe,ee);const b=Math.min(me,Math.max(qe?ge:Ce,50));k.value=qe?"bottom":"top",v.value={position:"fixed",left:`${Xe}px`,width:`${Fe}px`,maxHeight:`${b}px`,transform:qe?"none":"translateY(-100%)",top:qe?`${_.bottom+U}px`:`${_.top-U}px`}},st=async _=>{s.value||!y.value&&(_.key==="ArrowDown"||_.key==="ArrowUp")&&(_.preventDefault(),await A())},Ta=_=>{var K;if(!y.value)return;const{key:N}=_;if(N==="ArrowDown")_.preventDefault(),u.value+1<$.value.length&&(u.value+=1,Ke(g.value[u.value],h.value));else if(N==="ArrowUp")_.preventDefault(),u.value>0&&(u.value-=1,Ke(g.value[u.value],h.value));else if(N==="Enter"){_.preventDefault();const ee=$.value[u.value];ee&&ht(ee),(K=x.value)==null||K.blur()}else N==="Escape"?(_.preventDefault(),S()):N==="Backspace"?o.value&&M.value===""&&V.value.length&&(V.value=V.value.slice(0,-1),i.value=[...V.value],n("change",i.value)):N==="Home"?(u.value=0,Ke(g.value[0],h.value)):N==="End"?(u.value=$.value.length-1,Ke(g.value[u.value],h.value)):N==="Tab"&&S()},St=()=>{s.value||(w.value=!0)},ta=()=>{w.value=!1,M.value=""},aa=_=>{_.key==="Escape"&&y.value&&S()},ra=_=>{var K,ee;const N=_.target;(K=d.value)!=null&&K.contains(N)||(ee=p.value)!=null&&ee.contains(N)||S()},Pa=_=>{y.value&&h.value&&!h.value.contains(_.target)&&qt()},la=()=>{y.value&&qt()},Ia=()=>{y.value&&qt()};e.watch(()=>a.options,_=>{_!=null&&_.length&&(f.value=[..._],yt())},{immediate:!0});async function yt(){if(o.value)Array.isArray(i.value)?V.value=[...i.value]:(V.value=i.value==null?[]:[i.value],i.value=[...V.value]),a.data&&V.value.length&&(await ie(V.value),await e.nextTick());else{if(Array.isArray(i.value)){const _=i.value[0]??null;i.value=_??null}i.value!=null&&(m.value=await re(i.value)),le(m.value??null)}}e.watch(i,()=>{yt()}),e.onMounted(async()=>{var _;addEventListener("keydown",aa),addEventListener("scroll",Pa,!0),addEventListener("resize",la),document.addEventListener("click",ra,!0),c.value&&pt(c.value).addEventListener("scroll",Ia,!0),(_=a.options)!=null&&_.length&&!a.data?f.value=[...a.options]:a.data&&(f.value=await I("")),await yt(),kt.value=!1}),e.onUnmounted(()=>{removeEventListener("keydown",aa),removeEventListener("scroll",Pa,!0),removeEventListener("resize",la),document.removeEventListener("click",ra,!0),c.value&&pt(c.value).removeEventListener("scroll",Ia,!0)});const vt=e.ref(!1),jt=e.ref({}),na=e.ref([]),ut=e.ref(null);async function oa(){var _,N;if(!(!((_=a.add)!=null&&_.token)||ut!=null&&ut.value.validate()))try{const K=a.add.api??`/api/table/${a.add.token}`,ee=await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(jt.value)}),U=await ee.json().catch(()=>({})),me=(U==null?void 0:U.error)||(U==null?void 0:U.message),ge=Number(U==null?void 0:U.code)>=400;if(!ee.ok||ge){xe({title:"Помилка",type:"error",message:me||`Код помилки: ${(U==null?void 0:U.code)||ee.status}`});return}const Ce=U==null?void 0:U.id;if(!Ce){xe({title:"Помилка",type:"error",message:"Обʼєкт створено, але в відповіді відсутній ID."});return}if(!((N=a.options)!=null&&N.length)&&a.data){const qe=await fetch(`${a.api??`/api/suggest/${a.data}`}?val=${Ce}`).then(Le=>Le.json());m.value=qe[0],f.value.push(qe[0]),i.value=Ce}vt.value=!1,xe({title:"Успіх",message:"Обʼєкт успішно створено."})}catch(K){xe({title:"Помилка",type:"error",message:(K==null?void 0:K.message)||"Не вдалося створити обʼєкт."})}}async function At(){if(!a.add)return null;const _=await fetch(`/api/template/form/${a.add.form}`).then(N=>N.json());return na.value=_.schema,vt.value=!0,null}function sa(_,N=200){let K;return(...ee)=>{K&&clearTimeout(K),K=window.setTimeout(()=>_(...ee),N)}}const L1=sa(async _=>{f.value=await I(_)},200);e.watch(M,_=>{a.data&&L1(_.trim())}),e.watch(()=>a.options,_=>{!a.data&&(_!=null&&_.length)&&(f.value=[..._],yt())},{immediate:!0}),e.watch(()=>a.parent??a.parentValue,()=>{a.data&&W()});const kt=e.ref(!0);return e.watch(D,async()=>{if(a.data&&(kt.value||(o.value?(V.value=[],i.value=[],n("change",[])):(m.value=null,i.value=null,n("change",null))),await W(),a.auto===1&&D.value&&f.value.length>0)){const _=f.value[0];_&&ht(_)}}),(_,N)=>{var K,ee;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(c1),{visible:vt.value,"onUpdate:visible":N[1]||(N[1]=U=>vt.value=U),class:"z-[1000]",title:"Додати",buttonText:"Додати",onDone:oa,teleport:_.teleport},{default:e.withCtx(()=>[e.createVNode(nt,{schema:na.value,modelValue:jt.value,"onUpdate:modelValue":N[0]||(N[0]=U=>jt.value=U),ref_key:"addForm",ref:ut},null,8,["schema","modelValue"])]),_:1},8,["visible","teleport"]),e.createElementVNode("div",{class:"flex gap-1 w-full",ref_key:"selectRoot",ref:d,onClick:N[5]||(N[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass])},[N[10]||(N[10]=e.createElementVNode("span",{id:"react-select-live-region",class:"sr-only"},null,-1)),N[11]||(N[11]=e.createElementVNode("span",{"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text",role:"log",class:"sr-only"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["vs-input-select__control flex min-h-[38px] items-center justify-between rounded transition-colors bg-white",s.value?"bg-gray-100 text-gray-400 cursor-not-allowed":""]),role:"combobox","aria-expanded":y.value,"aria-haspopup":"listbox",onKeydown:st,onClick:ke,"data-focus":y.value||w.value?"true":"false",ref_key:"triggerRef",ref:c},[e.createElementVNode("div",nL,[o.value?(e.openBlock(),e.createElementBlock("div",oL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,U=>(e.openBlock(),e.createElementBlock("div",{class:"flex min-w-0 bg-[rgb(230,230,230)] rounded-[2px] m-[2px] box-border max-w-full",key:U.id},[e.createElementVNode("div",sL,[ue(U)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",style:e.normalizeStyle({backgroundColor:U==null?void 0:U.color})},null,4)):e.createCommentVNode("",!0),!F.value&&fe(U)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(b1),style:e.normalizeStyle(he(U)),"aria-hidden":"true"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ne(U)),{class:"w-full h-full",focusable:"false"}))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"truncate text-[#172b4d] overflow-hidden max-w-[200px] px-0.5 pl-1.5",title:J(U)},[F.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:X(U)},null,8,dL)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(U.text),1)],64))],8,iL)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border text-[#172b4d] hover:bg-[rgb(255,189,173)] hover:text-[rgb(222,53,11)] flex-shrink-0",onClick:e.withModifiers(me=>ot(U.id),["stop"])},N[6]||(N[6]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,cL)]))),128)),e.createElementVNode("div",hL,[!s.value&&_.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:x,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900 hover:cursor-pointer",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:V.value.length?" ":q.value,"onUpdate:modelValue":N[2]||(N[2]=U=>M.value=U),onFocus:St,onBlur:ta,onKeydown:Ta},null,40,pL)),[[e.vModelText,M.value]]):e.createCommentVNode("",!0)])])):!o.value&&H.value&&M.value===""?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["truncate text-gray-900 absolute flex items-center gap-1 min-w-0"]),title:H.value},[ue(m.value)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[14px] h-[14px] rounded-md block flex-shrink-0",style:e.normalizeStyle({backgroundColor:(K=m.value)==null?void 0:K.color})},null,4)):e.createCommentVNode("",!0),!F.value&&fe(m.value)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(b1),style:e.normalizeStyle(he(m.value)),"aria-hidden":"true"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ne(m.value)),{class:"w-full h-full",focusable:"false"}))],4)):e.createCommentVNode("",!0),F.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"truncate flex-1 min-w-0",innerHTML:X(m.value)},null,8,uL)):(e.openBlock(),e.createElementBlock("span",kL,e.toDisplayString((ee=m.value)==null?void 0:ee.text),1))],8,yL)):e.createCommentVNode("",!0),o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mL,[!s.value&&_.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:x,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900 hover:cursor-pointer",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:H.value?" ":q.value,"onUpdate:modelValue":N[3]||(N[3]=U=>M.value=U),onFocus:St,onBlur:ta,onKeydown:Ta},null,40,fL)),[[e.vModelText,M.value]]):e.createCommentVNode("",!0)]))]),e.createElementVNode("div",gL,[Q.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:s.value,onClick:e.withModifiers(Re,["stop"])},N[7]||(N[7]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,xL)):e.createCommentVNode("",!0),N[9]||(N[9]=e.createElementVNode("div",{class:"self-stretch w-px bg-[#ccc] my-[1px]"},null,-1)),e.createElementVNode("button",{type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:s.value,onClick:N[4]||(N[4]=e.withModifiers(U=>O(),["stop"])),title:y.value?"Закрити список":"Відкрити список"},N[8]||(N[8]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})],-1)]),8,ML)])],42,lL),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:p,class:e.normalizeClass(["fixed z-[3000] rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]"]),style:e.normalizeStyle(v.value),role:"listbox"},[e.createElementVNode("div",{class:"overflow-y-auto py-1",style:e.normalizeStyle({maxHeight:v.value.maxHeight||"300px"}),ref_key:"listRef",ref:h},[$.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList($.value,(U,me)=>(e.openBlock(),e.createElementBlock("div",{key:U.id,ref_for:!0,ref:ge=>g.value[me]=ge,class:e.normalizeClass(["flex px-3 py-2 gap-2 cursor-pointer select-none text-gray-900",G(U.id)?"bg-[#2684ff] text-white":"bg-white hover:bg-[#deebff] hover:text-[#172b4d]",u.value===me&&!G(U.id)?"bg-[#deebff] text-[#172b4d]":""]),"aria-disabled":G(U.id)?"true":"false",role:"option",tabindex:"-1",onClick:ge=>N1(U)},[ue(U)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[11px] h-[11px] rounded-full block flex-shrink-0",style:e.normalizeStyle({backgroundColor:U==null?void 0:U.color})},null,4)):e.createCommentVNode("",!0),!F.value&&fe(U)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(b1),style:e.normalizeStyle(he(U)),"aria-hidden":"true"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ne(U)),{class:"w-full h-full",focusable:"false"}))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["leading-[19px]",u.value===U.id?"text-white":"",(u.value,"")])},[F.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:X(U)},null,8,wL)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(U.text),1)],64))],2)],10,bL))),128)):(e.openBlock(),e.createElementBlock("div",vL," No options "))],4)],4)):e.createCommentVNode("",!0)]))],2),a.add?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:At,class:"bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",disabled:s.value,type:"button"},[e.createVNode(et,{width:"16",height:"16"}),N[12]||(N[12]=e.createElementVNode("span",null,"Додати",-1))],8,VL)):e.createCommentVNode("",!0)],512)],64)}}}),w1=de(CL,[["__scopeId","data-v-6c691161"]]),zL=["placeholder","disabled"],al=e.defineComponent({__name:"vs-input-textarea",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled),s=e.computed(()=>t.placeholder??"");function i(){typeof n.value=="string"&&(n.value=n.value.trim())}return(d,c)=>e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{"onUpdate:modelValue":c[0]||(c[0]=h=>n.value=h),placeholder:s.value,disabled:o.value,row:"2",onBlur:i,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,42,zL)),[[e.vModelText,n.value]])}}),BL={key:1,class:"richtext-error"},rl=e.defineComponent({__name:"vs-input-richtext",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{},richtextProps:{default:()=>({})}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.ref(null);e.onMounted(async()=>{try{const c=await Promise.resolve().then(()=>eI);t.value=c.VsRichtext}catch{console.warn("@opengis/richtext is not installed. Please install it in your app to use richtext input.")}});const a=l,{inputClass:n}=He(a.style),o=e.useModel(l,"modelValue"),s=e.computed(()=>!!a.disabled),i=e.computed(()=>a.placeholder??""),d=e.computed(()=>({height:"300px",...a.richtextProps}));return(c,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["richtext-wrapper !h-full !border-transparent",[c.customClass,e.unref(n),{"richtext-disabled":s.value}]]),style:e.normalizeStyle(s.value?{pointerEvents:"none",opacity:.6}:{})},[t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.mergeProps({key:0,modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=p=>o.value=p),placeholder:i.value},d.value),null,16,["modelValue","placeholder"])):(e.openBlock(),e.createElementBlock("div",BL,h[1]||(h[1]=[e.createElementVNode("p",null,"@opengis/richtext package is not installed.",-1),e.createElementVNode("p",null,"Please install it: npm install @opengis/richtext",-1)])))],6))}}),_L={},EL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"};function qL(l,t){return e.openBlock(),e.createElementBlock("svg",EL,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)]))}const SL=de(_L,[["render",qL]]),jL={},AL={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function DL(l,t){return e.openBlock(),e.createElementBlock("svg",AL,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 9l5 -5l5 5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const NL=de(jL,[["render",DL]]),LL={},HL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function $L(l,t){return e.openBlock(),e.createElementBlock("svg",HL,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const FL=de(LL,[["render",$L]]),TL={},PL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function IL(l,t){return e.openBlock(),e.createElementBlock("svg",PL,t[0]||(t[0]=[e.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)]))}const wa=de(TL,[["render",IL]]),RL={},OL={viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function UL(l,t){return e.openBlock(),e.createElementBlock("svg",OL,t[0]||(t[0]=[e.createStaticVNode('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>',12)]))}const ZL=de(RL,[["render",UL]]),WL={},GL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function KL(l,t){return e.openBlock(),e.createElementBlock("svg",GL,t[0]||(t[0]=[e.createElementVNode("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"},null,-1)]))}const JL=de(WL,[["render",KL]]),YL={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden flex flex-col"},XL={class:"flex flex-col gap-2 !p-4 border-b border-gray-200 sm:flex-row sm:items-center sm:justify-between bg-gray-50"},QL={class:"relative w-full"},eH={class:"flex flex-nowrap items-center justify-end gap-2 w-full overflow-x-auto"},tH={class:"w-full overflow-x-auto"},aH={class:"w-full min-w-[640px] table-auto divide-y divide-gray-200"},rH={class:"bg-gray-50"},lH={class:"border-b border-gray-200"},nH={class:"px-4 py-3 text-left text-xs font-semibold text-gray-900 w-12 text-center"},oH=["onClick"],sH={key:0,class:"text-gray-400"},iH={key:0,colspan:"100%",class:"text-center"},dH={class:"w-full"},cH={class:"p-5 min-h-[200px] flex flex-col justify-center items-center text-center"},hH=["onDragstart","onDragover","onDrop"],pH={class:"px-4 py-3 text-center align-middle"},yH={class:"flex items-center justify-center"},uH=["innerHTML"],kH={key:0,class:"flex items-center gap-3 text-sm text-gray-700"},mH={key:0},fH=["src"],gH={key:1,class:"rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"},xH={key:1,class:"flex items-center justify-center"},MH={key:2,class:"text-sm font-medium text-gray-900"},bH={class:"px-4 py-3 text-right whitespace-nowrap"},wH={class:"flex items-center justify-end gap-2"},vH=["onClick"],VH=["onClick"],CH={class:"vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},ll=e.defineComponent({__name:"vs-input-datatable",props:e.mergeModels({colModel:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useSlots(),n=e.useModel(l,"modelValue"),o=e.ref({}),s=e.ref(""),i=e.ref(null),d=e.ref("asc"),c=e.computed(()=>{const D=n.value??[],I=s.value?D.filter(ie=>{var we;return(we=t.colModel)==null?void 0:we.some(A=>{const S=A.key||A.name;if(!S)return!1;const O=ie[S];return O?Array.isArray(O)?O.join(", ").toLowerCase().includes(s.value.toLowerCase()):String(O).toLowerCase().includes(s.value.toLowerCase()):!1})}):D;if(!i.value)return I;const W=i.value,re=[...I].sort((ie,we)=>{const A=ce(ie==null?void 0:ie[W]),S=ce(we==null?void 0:we[W]);return typeof A=="number"&&typeof S=="number"?A-S:String(A).localeCompare(String(S))});return d.value==="asc"?re:re.reverse()}),h=e.ref(null),p=e.ref(null),y=e.ref(null),w=D=>{h.value=D},m=D=>{p.value=D},f=D=>{if(h.value===null||h.value===D){h.value=null,p.value=null;return}const I=[...n.value],[W]=I.splice(h.value,1);I.splice(D,0,W),n.value=I,h.value=null,p.value=null},u=()=>{y.value&&y.value.click()},g=D=>{const I=[".jpg",".jpeg",".png",".gif",".bmp",".webp",".svg",".ico",".tiff",".tif"],W=D.toLowerCase();return I.some(re=>W.endsWith(re))},M=D=>{var re;const I=(re=D.target.files)==null?void 0:re[0];if(!I)return;const W=new FileReader;W.onload=ie=>{var we;try{const A=(we=ie.target)==null?void 0:we.result;if(typeof A=="string"){const S=JSON.parse(A);Array.isArray(S)&&n.value.push(...S)}}catch(A){console.error("Error parsing file:",A)}},W.readAsText(I)},x=()=>{const D=JSON.stringify(n.value,null,2),I=new Blob([D],{type:"application/json"}),W=URL.createObjectURL(I),re=document.createElement("a");re.href=W,re.download="data.json",re.click(),URL.revokeObjectURL(W)},k=new Set(["autocomplete","select","radio","checkbox","combobox"]),v=new Map,V=(D,I)=>{const W=`/api/suggest/${D}`,re=W.includes("?")?"&":"?",ie=I?`&val=${I}`:"";return`${W}${re}json=1${ie}`},C=D=>D==null||D===""?null:typeof D=="object"?(D==null?void 0:D.id)!==void 0&&D.id!==null&&D.id!==""?D.id:null:D,q=D=>{const I=new Set;return Array.isArray(n.value)&&n.value.forEach(W=>{const re=W==null?void 0:W[D];if(re==null||re==="")return;if(Array.isArray(re)){re.forEach(we=>{const A=C(we);A!==null&&I.add(A)});return}const ie=C(re);ie!==null&&I.add(ie)}),I},H=async()=>{var I;if(!((I=t.colModel)!=null&&I.length))return;const D=t.colModel.filter(W=>{var re;return W.data&&k.has(((re=W.type)==null?void 0:re.toLowerCase())||"")});D.length&&await Promise.all(D.map(async W=>{const re=W.key||W.name;if(!re)return;const ie=q(re),we=Array.from(ie).map(O=>String(O)).sort(),A=we.join(",");if(!we.length||v.get(re)===A)return;v.set(re,A);const S=we.map(encodeURIComponent).join(",");try{const O=await(await fetch(V(W.data,S))).json();o.value[re]=(O==null?void 0:O.data)??O}catch(O){console.error("Failed to fetch column values",O)}}))};e.watch([()=>t.colModel,()=>n.value],()=>{H()},{immediate:!0,deep:!0});const Q=e.ref(""),G=e.ref(!1);let $="edit",B=0;const P=D=>((D==null?void 0:D.format)||(D==null?void 0:D.type)||"").toString().toLowerCase(),L=e.computed(()=>{var D;return((D=t.colModel)==null?void 0:D.filter(I=>P(I)!=="slot").map(I=>{const{slot:W,...re}=I;return re}))??[]}),Z=e.ref({}),F=e.ref({}),X=D=>typeof D!="string"?!1:!!a[D],J=(D,I)=>I?I.split(".").reduce((W,re)=>W==null?W:W[re.trim()],D):D,se=(D,I)=>typeof D!="string"?"":D.replace(/{{\s*([^}]+)\s*}}/g,(W,re)=>J(I,re.trim())??""),ce=D=>{if(D==null||D==="")return"";if(typeof D=="number")return D;if(typeof D=="boolean")return D?1:0;if(typeof D=="string")return D.toLowerCase();if(Array.isArray(D))return D.map(I=>ce(I)).join(", ");if(typeof D=="object"){if(D.text!==void 0)return String(D.text).toLowerCase();if(D.label!==void 0)return String(D.label).toLowerCase();if(D.id!==void 0)return String(D.id).toLowerCase()}return String(D).toLowerCase()},Ee=D=>{const I=D.key||D.name;if(I){if(i.value===I){d.value=d.value==="asc"?"desc":"asc";return}i.value=I,d.value="asc"}};async function $e(){Q.value="Додати",G.value=!0,$="add",Z.value={}}function Y(D,I){var re;if(!(D!=null&&D.length))return null;const W=typeof I=="object"?I==null?void 0:I.id:I;return W==null||W===""?null:((re=D.find(ie=>{var we;return((we=ie==null?void 0:ie.id)==null?void 0:we.toString())===W.toString()}))==null?void 0:re.text)??null}function ne(D){return D==null||D===""?"-":Array.isArray(D)?D.map(I=>typeof I=="object"?(I==null?void 0:I.text)??(I==null?void 0:I.id)??"-":I).join(", "):typeof D=="object"?(D==null?void 0:D.text)??(D==null?void 0:D.id)??"-":D}function ue(D,I){const W=I.key||I.name,re=D==null?void 0:D[W],ie=o.value[W];if(!re)return"-";if(Array.isArray(re)){const A=re.map(S=>Y(ie,S)).filter(Boolean);return A.length?A.join(", "):ne(re)}return Y(ie,re)||ne(re)}async function he(D,I){Q.value="Редагувати",G.value=!0,$="edit",B=I,Z.value={...D}}function fe(){const D=F.value.validate();if(D){xe({type:"warning",title:"Помилка валідації",message:Object.entries(D).map(([I,W])=>`${I}: ${W}`).join(`
8312
- `)});return}$==="add"?Array.isArray(n.value)?n.value=[...n.value,Z.value]:n.value=[Z.value]:n.value=n.value.map((I,W)=>W===B?Z.value:I),G.value=!1}function T(D){n.value=n.value.filter((I,W)=>W!==D)}function le(){G.value=!1}return(D,I)=>(e.openBlock(),e.createElementBlock("div",YL,[e.createElementVNode("div",XL,[e.createElementVNode("div",QL,[e.createVNode(SL,{width:"16",height:"16",class:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":I[0]||(I[0]=W=>s.value=W),placeholder:"Пошук",class:"w-full rounded-md border border-gray-200 bg-white pl-10 pr-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100"},null,512),[[e.vModelText,s.value]])]),e.createElementVNode("div",eH,[e.createElementVNode("input",{ref_key:"fileInput",ref:y,onChange:M,class:"hidden",accept:".json",type:"file"},null,544),e.createElementVNode("button",{type:"button",onClick:u,class:"inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"},[e.createVNode(NL,{class:"text-gray-700",width:"16",height:"16"}),I[4]||(I[4]=e.createTextVNode(" Імпорт ",-1))]),e.createElementVNode("button",{type:"button",onClick:x,class:"inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"},[e.createVNode(FL,{class:"text-gray-700",width:"16",height:"16"}),I[5]||(I[5]=e.createTextVNode(" Експорт ",-1))]),e.createElementVNode("button",{onClick:$e,type:"button",class:"inline-flex items-center gap-2 rounded-md bg-blue-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-600 transition-colors"},[e.createVNode(et,{class:"text-white"}),I[6]||(I[6]=e.createTextVNode(" Додати ",-1))])])]),e.createElementVNode("div",tH,[e.createElementVNode("table",aH,[e.createElementVNode("thead",rH,[e.createElementVNode("tr",lH,[e.createElementVNode("th",nH,[e.createVNode(wa,{width:"20",height:"20",class:"mx-auto text-gray-400"})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.colModel,W=>(e.openBlock(),e.createElementBlock("th",{key:W.key,class:"px-4 py-3 text-left text-xs font-semibold text-gray-900"},[e.createElementVNode("button",{type:"button",onClick:re=>Ee(W),class:"flex items-center gap-1 text-xs font-semibold text-gray-700 hover:text-gray-900 transition-colors"},[e.createElementVNode("span",null,e.toDisplayString(W.ua||W.label),1),i.value===(W.key||W.name)?(e.openBlock(),e.createElementBlock("span",sH,e.toDisplayString(d.value==="asc"?"▲":"▼"),1)):e.createCommentVNode("",!0)],8,oH)]))),128)),I[7]||(I[7]=e.createElementVNode("th",{class:"px-4 py-3 text-left text-xs font-semibold text-gray-900 text-center w-[1%] whitespace-nowrap"}," Дії ",-1))])]),e.createElementVNode("tbody",{class:e.normalizeClass(["divide-y divide-gray-200",{"[&_tr:last-child]:border-0":!p.value}])},[c.value.length===0?(e.openBlock(),e.createElementBlock("td",iH,[e.createElementVNode("div",dH,[e.createElementVNode("div",cH,[e.createVNode(ZL,{class:"w-48 mx-auto"}),I[8]||(I[8]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"Нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(W,re)=>(e.openBlock(),e.createElementBlock("tr",{key:W.id,class:e.normalizeClass(["border-b transition-colors hover:bg-gray-50 cursor-move text-sm text-gray-700",{"opacity-50":h.value===re,"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":p.value===re}]),draggable:"true",onDragstart:ie=>w(re),onDragover:e.withModifiers(ie=>m(re),["prevent"]),onDrop:ie=>f(re)},[e.createElementVNode("td",pH,[e.createElementVNode("div",yH,[e.createVNode(wa,{width:"24",height:"24",class:"w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"})])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.colModel,ie=>(e.openBlock(),e.createElementBlock("td",{key:ie.key,class:"px-4 py-3 align-middle"},[P(ie)==="slot"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[X(ie.slot)?e.renderSlot(D.$slots,ie.slot,{key:0,row:W,value:W[ie.key],column:ie}):(e.openBlock(),e.createElementBlock("div",{key:1,class:"text-sm text-gray-900",innerHTML:se(ie.slot,W)},null,8,uH))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[P(ie)==="file"?(e.openBlock(),e.createElementBlock("div",kH,[g(ue(W,ie))?(e.openBlock(),e.createElementBlock("div",mH,[e.createElementVNode("img",{src:ue(W,ie),alt:"alt",width:"45",class:"rounded-md max-w-[45px] h-[45px] object-cover"},null,8,fH)])):(e.openBlock(),e.createElementBlock("div",gH,[e.createVNode(Jr,{class:"w-[25px] min-w-[25px] h-[25px]"})]))])):P(ie)==="color"?(e.openBlock(),e.createElementBlock("div",xH,[e.createElementVNode("span",{class:"inline-flex h-6 w-6 rounded border border-gray-200",style:e.normalizeStyle({backgroundColor:ue(W,ie)||"#ffffff"})},null,4)])):(e.openBlock(),e.createElementBlock("div",MH,e.toDisplayString(ue(W,ie)),1))],64))]))),128)),e.createElementVNode("td",bH,[e.createElementVNode("div",wH,[e.createElementVNode("button",{onClick:ie=>he(W,re),class:"p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"},[e.createVNode(JL,{width:"16",height:"16"})],8,vH),e.createElementVNode("button",{onClick:ie=>T(re),class:"p-1.5 text-gray-600 hover:text-red-600 hover:bg-red-50 rounded transition-colors"},[e.createVNode(Bt,{width:"16",height:"16"})],8,VH)])])],42,hH))),128))],2)])]),e.createVNode(e.unref(c1),{visible:G.value,title:Q.value,size:"lg",onClose:le,teleport:"#modal"},{default:e.withCtx(()=>[e.createVNode(nt,{schema:L.value,values:Z.value,"onUpdate:values":I[1]||(I[1]=W=>Z.value=W),form:F.value,"onUpdate:form":I[2]||(I[2]=W=>F.value=W)},null,8,["schema","values","form"]),e.createElementVNode("div",CH,[e.createElementVNode("button",{type:"button",onClick:I[3]||(I[3]=W=>G.value=!1),class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:fe,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])]),_:1},8,["visible","title"])]))}}),zH={},BH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map-pin"};function _H(l,t){return e.openBlock(),e.createElementBlock("svg",BH,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},null,-1),e.createElementVNode("path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z"},null,-1)]))}const EH=de(zH,[["render",_H]]),qH={},SH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-line"};function jH(l,t){return e.openBlock(),e.createElementBlock("svg",SH,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M7.5 16.5l9 -9"},null,-1)]))}const AH=de(qH,[["render",jH]]),DH={},NH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-polygon"};function LH(l,t){return e.openBlock(),e.createElementBlock("svg",NH,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>',9)]))}const HH=de(DH,[["render",LH]]),$H={},FH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"};function TH(l,t){return e.openBlock(),e.createElementBlock("svg",FH,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>',9)]))}const PH=de($H,[["render",TH]]),IH={},RH={version:"1.1",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg","xmlns:sketch":"http://www.bohemiancoding.com/sketch/ns","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"fullscreen-icon"};function OH(l,t){return e.openBlock(),e.createElementBlock("svg",RH,t[0]||(t[0]=[e.createElementVNode("title",null,null,-1),e.createElementVNode("desc",null,null,-1),e.createElementVNode("defs",null,null,-1),e.createElementVNode("g",{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"},[e.createElementVNode("g",{fill:"#000000",id:"Core",transform:"translate(-215.000000, -257.000000)"},[e.createElementVNode("g",{id:"fullscreen",transform:"translate(215.000000, 257.000000)"},[e.createElementVNode("path",{d:"M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",id:"Shape"})])])],-1)]))}const UH=de(IH,[["render",OH]]),ZH={class:"bg-white/30 p-1 rounded-md shadow w-fit"},WH={class:"flex gap-2"},GH=["onClick","title"],KH=["src"],JH=e.defineComponent({__name:"map-layers",props:{basemaps:{}},emits:["onLayerChange"],setup(l,{emit:t}){const a=e.ref(Object.keys(l.basemaps)[0]),n=t;function o(d){n("onLayerChange",d),a.value=d}const s={z:13,x:4790,y:2762};function i(d){if(d!=null&&d.preview)return d.preview;if(!(d!=null&&d.url))return;const c={"{z}":s.z,"{x}":s.x,"{y}":s.y};let h=d.url;return Object.entries(c).forEach(([p,y])=>{h=h.replace(new RegExp(p,"gi"),String(y))}),h}return(d,c)=>(e.openBlock(),e.createElementBlock("div",ZH,[e.createElementVNode("div",WH,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.basemaps,(h,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm",{"ring-2 ring-blue-500 border-blue-300":a.value===p}]),onClick:y=>o(p),title:h.name||p,role:"button",tabindex:"0"},[e.createElementVNode("img",{src:i(h),alt:"",class:"w-10 h-10 object-cover"},null,8,KH)],10,GH))),128))])]))}}),YH={class:"map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]"},XH={key:0,class:"vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"},QH=["onClick"],e$={class:"relative flex-1 min-w-[140px]"},t$=["placeholder"],a$="https://data.softpro.ua/api-user/gis-url-proxy",r$="https://geo.rv.ua/api-user/dzk.api",l$=e.defineComponent({__name:"map-search",props:{config:{}},emits:["goToCoordinates"],setup(l,{emit:t}){const a=l,n=t,o=["here","xy","parcel"],s=e.computed(()=>{var V,C;const v=(C=(V=a.config)==null?void 0:V.tools)==null?void 0:C.filter(q=>o.includes(q));return v&&v.length?v:o}),i=e.computed(()=>{var v,V;return((V=(v=a.config)==null?void 0:v.placeholder)==null?void 0:V.trim())||"Пошук…"}),d=e.ref(s.value[0]??o[0]);e.watch(s,v=>{v.includes(d.value)||(d.value=v[0])});const c=e.ref(""),h=e.ref(!1),p=e.ref(null);e.watch(d,()=>{c.value="",h.value=!1});function y(v){d.value=v}function w(v){if(!h.value)return;const V=p.value;V&&!V.contains(v.target)&&(h.value=!1)}e.onMounted(()=>{window.addEventListener("click",w,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("click",w,!0)});function m(v){return v==="xy"?"Координати":v==="parcel"?"Кадастр":"Адреси"}function f(v){const V=v.replace(/[,]+/g," ").trim();if(!V)return null;const C=V.split(/\s+/).filter(Boolean);if(C.length<2)return null;const q=C.slice(0,2).map(Number);if(!q.every(L=>Number.isFinite(L)))return null;const[H,Q]=q;let G=H,$=Q;const B=L=>Math.abs(L)<=90,P=L=>Math.abs(L)<=180;if(!B(G)||!P($))if(B($)&&P(G))G=Q,$=H;else return null;return{lat:G,lng:$}}function u(v){return((v==null?void 0:v.items)||[]).map((V,C)=>{var q,H,Q;return{id:String((V==null?void 0:V.id)??C),title:(V==null?void 0:V.title)||((q=V==null?void 0:V.address)==null?void 0:q.label)||"Знайдений обʼєкт",lat:Number((H=V==null?void 0:V.position)==null?void 0:H.lat),lng:Number((Q=V==null?void 0:V.position)==null?void 0:Q.lng)}}).filter(V=>Number.isFinite(V.lat)&&Number.isFinite(V.lng))}function g(v){const V=(v==null?void 0:v.result)||(v==null?void 0:v.data)||v;if(!V)return[];const C=V.geom_centroid;if(!C||!Array.isArray(C.coordinates))return[];const[q,H]=C.coordinates;return!Number.isFinite(H)||!Number.isFinite(q)?[]:[{id:"parcel",title:V.cadnum||V.cad_num||"Земельна ділянка",lat:H,lng:q}]}function M(v){const V=v.replace(/\s+/g,"").split(":");if(V.length!==4)return!1;const C=[10,2,3,4];return V.every((q,H)=>q.length===C[H]&&/^\d+$/.test(q))}function x(v){n("goToCoordinates",[v.lat,v.lng])}async function k(){const v=c.value.trim();if(v){if(d.value==="xy"){const V=f(v);if(!V){xe({type:"warning",title:"Пошук координат",message:"Не знайдено або невірний формат координат"});return}x(V),c.value="";return}try{const V=new URL(d.value==="here"?a$:r$);if(d.value==="here")V.searchParams.set("searchtext",v);else{if(!M(v)){xe({type:"warning",title:"Пошук кадастру",message:"Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ"});return}V.searchParams.set("cad_num",v)}const C=await fetch(V.toString());if(!C.ok)throw new Error(`HTTP ${C.status}`);const q=await C.json(),H=d.value==="here"?u(q):g(q);if(!H.length)xe({type:"warning",title:"Пошук",message:"Не знайдено результатів"});else{const Q=H[0];x(Q),c.value=""}}catch(V){const C=(V==null?void 0:V.message)||"Помилка пошуку";xe({type:"error",title:"Пошук",message:C})}}}return(v,V)=>(e.openBlock(),e.createElementBlock("div",YH,[e.createElementVNode("form",{class:"flex gap-2",onSubmit:e.withModifiers(k,["prevent"])},[s.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:p,class:"relative search-type w-[140px]"},[e.createElementVNode("button",{type:"button",class:"vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",onClick:V[0]||(V[0]=C=>h.value=!h.value)},[e.createElementVNode("span",null,e.toDisplayString(m(d.value)),1),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-4 h-4 text-gray-500 transition-transform",{"rotate-180":h.value}]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V[2]||(V[2]=[e.createElementVNode("path",{d:"M6 9l6 6 6-6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2))]),h.value?(e.openBlock(),e.createElementBlock("div",XH,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,C=>(e.openBlock(),e.createElementBlock("li",{key:C,class:"px-3 py-2 cursor-pointer hover:bg-gray-100",onClick:q=>y(C)},e.toDisplayString(m(C)),9,QH))),128))])])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),e.createElementVNode("div",e$,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V[1]||(V[1]=C=>c.value=C),placeholder:i.value,type:"text",class:"vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"},null,8,t$),[[e.vModelText,c.value,void 0,{trim:!0}]]),V[3]||(V[3]=e.createElementVNode("button",{type:"submit",class:"absolute inset-y-0 right-2 flex items-center text-gray-400 hover:text-gray-600","aria-label":"Пошук"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-4.35-4.35m0 0A7.5 7.5 0 1 0 5 5a7.5 7.5 0 0 0 11.65 11.65Z"})])],-1))])],32)]))}}),n$=de(l$,[["__scopeId","data-v-b5059a01"]]),o$={key:0,class:"absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]"},s$={key:1,class:"form-geom__panel flex gap-1 items-start mt-2"},i$={class:"flex items-center gap-1"},d$=["disabled"],c$=["disabled"],h$=["disabled"],p$={class:"absolute top-4 right-4 z-[1000]"},y$={class:"flex flex-col gap-[2px]"},u$=["disabled"],k$=["disabled"],m$=["disabled"],f$=["disabled"],g$={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},x$={class:"space-y-0.5"},M$={class:"text-gray-500"},b$={class:"text-gray-900 text-right break-all"},w$={class:"absolute left-4 bottom-[36px] z-[1000]"},v$={class:"flex flex-col gap-2"},V$={key:0,class:"bg-white/95 border border-gray-200 rounded-md shadow-sm px-3 py-2 text-xs text-gray-700 min-w-[200px]"},C$={class:"flex flex-col gap-1"},z$=["checked","disabled","onChange"],B$={class:"text-gray-700 text-xs font-medium"},_$={class:"absolute bottom-0 left-0 right-0 z-[1000] min-h-[28px] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1"},E$={key:0,class:"form-geom__feature flex items-center text-xs transition-all gap-2 w-full px-2 pb-1"},q$={class:"mr-auto flex items-center gap-2 min-w-0 relative"},S$={class:"shrink-0"},j$={class:"font-bold"},A$={class:"flex items-center"},D$={class:"text-xs mr-2"},N$={key:0,class:"text-xs mr-2"},L$={key:1,class:"text-xs mr-2"},H$=["disabled"],$$=["disabled"],va="__vs_form_maplibre_loader__",v1="__vs_form_maplibre_scripts__",Va="vs-global-bounds-src",Ca="vs-global-bounds-line",F$=e.defineComponent({__name:"vs-input-map",props:{tools:{},handleZoom:{type:Boolean,default:!0},ctrlZoom:{type:Boolean,default:!0},geomType:{default:()=>[]},prefix:{default:""},katottg:{default:""},layers:{default:()=>[]},bounds:{},api:{},center:{default:void 0},zoom:{default:void 0},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){var qe,Le,Fe,Xe;const a=l,n=t,o=e.computed(()=>!!a.disabled),s=e.ref(!1),i=e.ref(null),d=e.ref(0),c=e.ref(""),h=e.ref(null),p=e.getCurrentInstance(),y=((Fe=(Le=(qe=p==null?void 0:p.appContext)==null?void 0:qe.config)==null?void 0:Le.globalProperties)==null?void 0:Fe.$settings)??{},w=(y==null?void 0:y.map)??{},m=((Xe=p==null?void 0:p.vnode)==null?void 0:Xe.props)??{};function f(b){return Object.prototype.hasOwnProperty.call(m,b)||Object.prototype.hasOwnProperty.call(m,b.replace(/[A-Z]/g,z=>`-${z.toLowerCase()}`))}const u=Array.isArray(w.center)&&w.center.length===2?w.center:Array.isArray(y.center)&&y.center.length===2?y.center:[30,50];console.log(w);const g=typeof w.zoom=="number"?w.zoom:typeof y.zoom=="number"?y.zoom:typeof y.defaultZoom=="number"?y.defaultZoom:10,M=e.computed(()=>f("center")?a.center:w.center??a.center),x=e.computed(()=>f("zoom")?a.zoom:w.zoom??a.zoom),k=e.computed(()=>f("katottg")?String(a.katottg??""):String(w.katottg??a.katottg??"")),v=e.computed(()=>f("layers")?a.layers??[]:w.layers??a.layers??[]),V=e.computed(()=>f("bounds")?a.bounds:w.bounds??a.bounds),C=e.ref(Array.isArray(M.value)&&M.value.length===2?[...M.value]:u),q=e.ref(typeof x.value=="number"?x.value:g),H=e.ref(a.modelValue),Q=e.ref(null),G=e.ref([]);let $=!1;const B=e.reactive({}),P=e.ref([]),L=e.computed(()=>P.value.map(b=>B[b]).filter(Boolean)),Z=e.ref(null),F=e.computed(()=>{var b;return((b=Z.value)==null?void 0:b.entries)??[]}),X=e.computed(()=>{if(Z.value)return{left:`${Z.value.point.x+12}px`,top:`${Z.value.point.y+12}px`}}),J=e.computed(()=>{var E;const b={search:!1,import:!1,export:!1,point:!1,line:!1,polygon:!1,rectangle:!1};if(!((E=a.tools)!=null&&E.length))return{...b,point:!0,line:!0,polygon:!0,rectangle:!0};const z=new Set(a.tools.map(j=>j.toLowerCase()));return{search:z.has("search"),import:z.has("import"),export:z.has("export"),point:z.has("point"),line:z.has("line"),polygon:z.has("polygon"),rectangle:z.has("rectangle")}});function se(b){var j;if(typeof b!="string"||!b.trim())return"";if(/^https?:\/\//i.test(b))return b;const z=((j=window==null?void 0:window.location)==null?void 0:j.origin)??"",E=b.replace(/^\/+/,"");return E?z?`${z}/${E}`:`/${E}`:z}function ce(){const b=Array.isArray(w.basemaps)&&w.basemaps.length?w.basemaps:y.basemaps;if(Array.isArray(b)&&b.length){const z=b.map((E,j)=>{const R=String((E==null?void 0:E.key)??(E==null?void 0:E.id)??(E==null?void 0:E.name)??`b${j}`),te=se(String((E==null?void 0:E.url)??""));if(!te)return null;const ae=typeof(E==null?void 0:E.preview)=="string"&&E.preview?se(E.preview):"";return[R,{...E,url:te,preview:ae}]}).filter(E=>Array.isArray(E)&&E.length===2).reduce((E,[j,R])=>(E[j]=R,E),{});if(Object.keys(z).length)return z}return{voyager:{name:"Оглядова карта",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"},orto10:{name:"Ортофото 1:10K",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4790/2762.png"},osmb:{name:"Open Street Maps",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png",preview:"https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"}}}const Ee=ce(),$e=Object.keys(Ee),Y=e.ref($e.length?$e[0]:"");async function ne(){if(typeof window>"u")return null;const b=window;if(b[va])return b[va];b[v1]=b[v1]||{};const z=b[v1],E=te=>{if(Array.from(document.styleSheets).some(Me=>{var ze;return(ze=Me==null?void 0:Me.href)==null?void 0:ze.includes(te)}))return;const ae=document.createElement("link");ae.rel="stylesheet",ae.href=te,document.head.appendChild(ae)},j=te=>(z[te]||(z[te]=new Promise((ae,Me)=>{const ze=Array.from(document.scripts).find(Je=>Je.src===te);if(ze){ze.addEventListener("load",()=>ae(),{once:!0}),ze.addEventListener("error",Me,{once:!0}),te.includes("maplibre")&&window.maplibregl&&ae(),te.includes("mapbox-gl-draw")&&window.MapboxDraw&&ae();return}const Se=document.createElement("script");Se.src=te,Se.async=!1,Se.onload=()=>ae(),Se.onerror=Me,document.head.appendChild(Se)})),z[te]),R=(async()=>{E("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css"),E("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.css"),window.maplibregl||await j("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js"),window.MapboxDraw||await j("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.js");const te=window.maplibregl,ae=window.MapboxDraw;if(!te)throw new Error("maplibregl not available after load");if(!ae)throw new Error("MapboxDraw not available after load");return{maplibregl:te,MapboxDraw:ae}})().catch(te=>{throw delete b[va],te});return b[va]=R,R}function ue(b){return{version:8,sources:{rasterSource:{type:"raster",tiles:[b],tileSize:256}},layers:[{id:"rasterLayer",type:"raster",source:"rasterSource"}]}}let he=null,fe=null,T=null,le=null,D=null,I=null,W=!1,re=!1;function ie(){return{onSetup(){const b=this.newFeature({type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[0,0],[0,0],[0,0],[0,0],[0,0]]]}});return this.addFeature(b),this.clearSelectedFeatures(),this.updateUIClasses({mouse:"add"}),this.setActionableState({trash:!0}),{rectangle:b,startPoint:null,hasCoordinates:!1}},onMouseMove(b,z){if(!b.startPoint)return;const[E,j]=b.startPoint,R=z.lngLat.lng,te=z.lngLat.lat;b.rectangle.setCoordinates([[[E,j],[R,j],[R,te],[E,te],[E,j]]])},onClick(b,z){if(!b.startPoint){b.startPoint=[z.lngLat.lng,z.lngLat.lat],b.hasCoordinates=!0,b.rectangle.setCoordinates([[[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat]]]);return}const[E,j]=b.startPoint,R=z.lngLat.lng,te=z.lngLat.lat;return Math.abs(E-R)>0&&Math.abs(j-te)>0?(b.rectangle.setCoordinates([[[E,j],[R,j],[R,te],[E,te],[E,j]]]),this.map.fire("draw.create",{features:[b.rectangle.toGeoJSON()]}),this.changeMode("simple_select",{featureIds:[b.rectangle.id]})):(this.deleteFeature([b.rectangle.id],{silent:!0}),b.hasCoordinates=!1,this.changeMode("simple_select"))},onStop(){},onTrash(b){this.deleteFeature([b.rectangle.id],{silent:!0}),this.changeMode("simple_select")},toDisplayFeatures(b,z,E){if(!b.hasCoordinates)return;const j=z.properties.id===b.rectangle.id;z.properties.active=j?"true":"false",E(z)}}}const we=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","$type","Polygon"],["!=","active","true"]],paint:{"fill-color":"#3b82f6","fill-outline-color":"#3b82f6","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","$type","Polygon"],["==","active","true"]],paint:{"fill-color":"#2563eb","fill-outline-color":"#2563eb","fill-opacity":.2}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","$type","Polygon"],["!=","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3b82f6","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","$type","Polygon"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#2563eb","line-width":2}},{id:"gl-draw-lines-inactive",type:"line",filter:["all",["==","$type","LineString"],["!=","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3b82f6","line-width":2}},{id:"gl-draw-lines-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#2563eb","line-width":2}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["!=","active","true"]],paint:{"circle-radius":5,"circle-color":"#3b82f6"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":6,"circle-color":"#2563eb"}},{id:"gl-draw-polygon-and-line-vertex-halo-active",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-active",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#2563eb"}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","meta","midpoint"],["==","$type","Point"]],paint:{"circle-radius":4,"circle-color":"#1d4ed8"}}];function A(){var z;const b=Y.value;return!b||!((z=Ee[b])!=null&&z.url)?"":Ee[b].url}function S(b,z){return b!=null&&b.id?String(b.id):b!=null&&b.url?`${b.url}-${z}`:`layer-${z}`}function O(b){var R;const z=String((b==null?void 0:b.url)??"").trim();if(!z)return"";if(/^https?:\/\//i.test(z))return z;const E=((R=window.location)==null?void 0:R.origin)??"",j=z.replace(/^\/+/,"");return`${E}/${j}`}function ke(b){var z;b&&((z=Z.value)==null?void 0:z.layerId)!==b||(Z.value=null)}function Re(b,z={}){return b.popup===!1?[]:Array.isArray(b.popup)?b.popup.length?b.popup.map(E=>{const j=(E==null?void 0:E.field)||(E==null?void 0:E.name);if(!j)return null;const R=z[j];return R==null||R===""?null:{key:E.label||j,value:String(R)}}).filter(Boolean):[]:Object.entries(z).slice(0,5).map(([E,j])=>({key:E,value:j==null?"—":String(j)}))}function ot(b){if(!Array.isArray(b))return[];const z=j=>Array.isArray(j)&&j.length>=2&&Number.isFinite(Number(j[0]))&&Number.isFinite(Number(j[1])),E=j=>{if(!j.length)return j;const R=j[0],te=j[j.length-1];return!te||R[0]!==te[0]||R[1]!==te[1]?[...j,R]:j};if(b.length&&z(b[0])){const j=b.map(R=>[Number(R[0]),Number(R[1])]).filter(z);return j.length?[E(j)]:[]}return b.length&&Array.isArray(b[0])&&z(b[0][0])?b.map(j=>Array.isArray(j)?j.map(R=>[Number(R[0]),Number(R[1])]):[]).filter(j=>j.length).map(E):b.length&&Array.isArray(b[0])&&Array.isArray(b[0][0])&&z(b[0][0][0])?b.flatMap(j=>Array.isArray(j)?j:[]).map(j=>Array.isArray(j)?j.map(R=>[Number(R[0]),Number(R[1])]):[]).filter(j=>j.length).map(E):[]}function wt(b){const z=b.style??{},E=z.color??"#3b82f6";if(!z.colorAttr||!z.colorSet)return E;const j=Object.keys(z.colorSet);if(!j.length)return E;const R=["match",["to-string",["get",z.colorAttr]]];return j.forEach(te=>{var ae;R.push(String(te),((ae=z.colorSet)==null?void 0:ae[te])??E)}),R.push(E),R}function ht(b){if(!T)return;b.handlers.forEach(E=>{try{T.off(E.type,E.layerId,E.handler)}catch{}}),b.handlers=[],[...b.layerIds,...b.boundsIds].forEach(E=>{T.getLayer(E)&&T.removeLayer(E)}),T.getSource(b.sourceId)&&T.removeSource(b.sourceId);const z=`vs-ov-bounds-src-${b.id}`;T.getSource(z)&&T.removeSource(z),ke(b.id)}function N1(b,z){var Me,ze,Se,Je;if(!T)return[];const E=`vs-ov-bounds-src-${z}`,j=`vs-ov-bounds-line-${z}`,R=b.bounds??V.value??G.value,te=ot(R);if(!te.length)return[];const ae={type:"FeatureCollection",features:te.map(Vt=>({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:Vt}}))};return T.getSource(E)&&T.removeSource(E),T.addSource(E,{type:"geojson",data:ae}),T.addLayer({id:j,type:"line",source:E,paint:{"line-color":((Me=b.style)==null?void 0:Me.stroke)??((ze=b.style)==null?void 0:ze.color)??"#2563eb","line-width":((Se=b.style)==null?void 0:Se.width)??2,"line-opacity":((Je=b.style)==null?void 0:Je.opacity)??.8,"line-dasharray":[2,2]}}),[j]}function Ke(b){var ae,Me,ze,Se,Je,Vt,Rl,Ol;if(!T)return;ht(b);const z=b.config,E=O(z);if(!E)return;const j=[],R=[];if(/\.v(?:m)?t(?:\?|$)/i.test(E)||/\.pbf(?:\?|$)/i.test(E)){const Te=z.sourceLayer||z.layer||z.service_layer||((ae=z.dataset)==null?void 0:ae.layer)||z.id;T.addSource(b.sourceId,{type:"vector",tiles:[E]});const Dt=String(((Me=z.style)==null?void 0:Me.type)??"polygon").toLowerCase(),Nt=wt(z),Qe=((ze=z.style)==null?void 0:ze.opacity)??.5;if(Dt==="point"){const lt=`vs-ov-point-${b.id}`;T.addLayer({id:lt,type:"circle",source:b.sourceId,"source-layer":Te,paint:{"circle-color":Nt,"circle-radius":5,"circle-opacity":Qe}}),j.push(lt)}else if(Dt==="polyline"||Dt==="line"){const lt=`vs-ov-line-${b.id}`;T.addLayer({id:lt,type:"line",source:b.sourceId,"source-layer":Te,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":Nt,"line-width":((Se=z.style)==null?void 0:Se.width)??2,"line-opacity":Qe}}),j.push(lt)}else{const lt=`vs-ov-fill-${b.id}`,ia=`vs-ov-border-${b.id}`;T.addLayer({id:lt,type:"fill",source:b.sourceId,"source-layer":Te,paint:{"fill-color":Nt,"fill-opacity":Qe}}),T.addLayer({id:ia,type:"line",source:b.sourceId,"source-layer":Te,paint:{"line-color":((Je=z.style)==null?void 0:Je.stroke)??((Vt=z.style)==null?void 0:Vt.color)??"#2563eb","line-width":((Rl=z.style)==null?void 0:Rl.width)??1,"line-opacity":Qe}}),j.push(lt,ia)}}else{T.addSource(b.sourceId,{type:"raster",tiles:[E],tileSize:256});const Te=`vs-ov-raster-${b.id}`;T.addLayer({id:Te,type:"raster",source:b.sourceId,paint:{"raster-opacity":((Ol=z.style)==null?void 0:Ol.opacity)??1}}),j.push(Te)}j.forEach(Te=>{const Dt=Qe=>{var Ul,Zl;if(!((Ul=Qe==null?void 0:Qe.features)!=null&&Ul.length)){ke(b.id);return}const lt=((Zl=Qe.features[0])==null?void 0:Zl.properties)??{},ia=Re(b.config,lt);if(!ia.length){ke(b.id);return}Z.value={layerId:b.id,entries:ia,point:{x:Qe.point.x,y:Qe.point.y}}},Nt=()=>ke(b.id);T.on("mousemove",Te,Dt),T.on("mouseleave",Te,Nt),R.push({layerId:Te,type:"mousemove",handler:Dt},{layerId:Te,type:"mouseleave",handler:Nt})}),b.layerIds=j,b.boundsIds=N1(b.config,b.id),b.handlers=R;const te=b.visible?"visible":"none";[...b.layerIds,...b.boundsIds].forEach(Te=>{T.getLayer(Te)&&T.setLayoutProperty(Te,"visibility",te)})}function pt(){if(!T)return;const b={type:"FeatureCollection",features:ot(V.value??G.value).map(z=>({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:z}}))};T.getSource(Va)?T.getSource(Va).setData(b):T.addSource(Va,{type:"geojson",data:b}),T.getLayer(Ca)||T.addLayer({id:Ca,type:"line",source:Va,paint:{"line-color":"#2563eb","line-width":2,"line-opacity":.8,"line-dasharray":[2,2]}})}function qt(b){if(!T||o.value)return;const z=B[b];if(!z)return;z.visible=!z.visible;const E=z.visible?"visible":"none";[...z.layerIds,...z.boundsIds].forEach(j=>{T.getLayer(j)&&T.setLayoutProperty(j,"visibility",E)}),st(),z.visible||ke(b)}function st(){var R,te;if(!T)return;const b=[],z=[],E=[],j=[];P.value.forEach(ae=>{var Vt;const Me=B[ae];if(!Me)return;const ze=String(((Vt=Me.config)==null?void 0:Vt.url)??""),Se=/\.v(?:m)?t(?:\?|$)/i.test(ze),Je=/\.png(?:\?|$)/i.test(ze);Se?E.push(...Me.layerIds):Je?b.push(...Me.layerIds):z.push(...Me.layerIds),j.push(...Me.boundsIds)}),[...b,...z,...E,...j].forEach(ae=>{T.getLayer(ae)&&T.moveLayer(ae)}),T.getLayer(Ca)&&T.moveLayer(Ca),(((te=(R=T.getStyle)==null?void 0:R.call(T))==null?void 0:te.layers)??[]).map(ae=>String((ae==null?void 0:ae.id)??"")).filter(ae=>ae.startsWith("gl-draw-")).forEach(ae=>{T.getLayer(ae)&&T.moveLayer(ae)})}function Ta(b){var te,ae,Me;if(!Ee[b]||(Y.value=b,!T))return;const z=A();if(!z)return;const E=(te=T.getCenter)==null?void 0:te.call(T),j=(ae=T.getZoom)==null?void 0:ae.call(T),R=(Me=le==null?void 0:le.getAll)==null?void 0:Me.call(le);T.setStyle(ue(z)),T.once("style.load",()=>{var ze;if(T&&(E&&Number.isFinite(j)&&T.jumpTo({center:[E.lng,E.lat],zoom:j}),pt(),P.value.forEach(Se=>{const Je=B[Se];Je&&Ke(Je)}),st(),((ze=R==null?void 0:R.features)==null?void 0:ze.length)&&le))try{R.features.forEach(Se=>le.add(Se)),d.value=R.features.length}catch{d.value=0}})}function St(b){var z,E,j;return b?b.type==="FeatureCollection"?((E=(z=b.features)==null?void 0:z[0])==null?void 0:E.geometry)??null:b.type==="Feature"?b.geometry??null:(j=b.geom)!=null&&j.type&&Array.isArray(b.geom.coordinates)?{type:b.geom.type,coordinates:b.geom.coordinates}:typeof b.type=="string"&&Array.isArray(b.coordinates)?b:null:null}function ta(b){return{type:"Feature",properties:{},geometry:b}}function aa(b){if(!b)return null;try{return JSON.parse(JSON.stringify(b))}catch{return null}}function ra(b){if(!b)return"__null__";try{return JSON.stringify(b)}catch{return"__invalid__"}}function Pa(b){const z=jt(b);if(!z)return null;const[[E,j],[R,te]]=z;return{lat:(j+te)/2,lng:(E+R)/2}}function la(b){if(!Array.isArray(b)||b.length<3)return 0;const z=(j,R)=>{const te=j*2003750834e-2/180,ae=Math.log(Math.tan((90+R)*Math.PI/360))/(Math.PI/180);return[te,ae*2003750834e-2/180]};let E=0;for(let j=0;j<b.length-1;j+=1){const[R,te]=z(Number(b[j][0]),Number(b[j][1])),[ae,Me]=z(Number(b[j+1][0]),Number(b[j+1][1]));E+=R*Me-ae*te}return Math.abs(E/2)/1e6}function Ia(b){var z;if(!(b!=null&&b.type)||!(b!=null&&b.coordinates))return null;if(b.type==="Polygon"){const E=(z=b.coordinates)==null?void 0:z[0];return Array.isArray(E)?la(E):null}return b.type==="MultiPolygon"?b.coordinates.reduce((E,j)=>{const R=j==null?void 0:j[0];return Array.isArray(R)?E+la(R):E},0):null}function yt(b){if(!b){h.value=null;return}const z=Pa(b);if(!z){h.value=null;return}h.value={type:String(b.type??"Feature"),center:z,areaKm2:Ia(b)}}function vt(b,z){if(!Array.isArray(b)||!Array.isArray(z)||b.length!==2||z.length!==2)return!1;const E=1e-9;return Math.abs(Number(b[0])-Number(z[0]))<E&&Math.abs(Number(b[1])-Number(z[1]))<E}function jt(b){if(!b)return null;let z=1/0,E=1/0,j=-1/0,R=-1/0;const te=ae=>{if(Array.isArray(ae)){if(ae.length>=2&&Number.isFinite(ae[0])&&Number.isFinite(ae[1])){const Me=Number(ae[0]),ze=Number(ae[1]);z=Math.min(z,Me),E=Math.min(E,ze),j=Math.max(j,Me),R=Math.max(R,ze);return}ae.forEach(te)}};return te(b.coordinates),!Number.isFinite(z)||!Number.isFinite(E)?null:[[z,E],[j,R]]}function na(b){if(!T||!b)return;const z=jt(b);if(!z)return;const[[E,j],[R,te]]=z;if(E===R&&j===te){T.easeTo({center:[E,j],zoom:Math.max(q.value,14)});return}T.fitBounds(z,{padding:30,duration:250,maxZoom:18})}function ut(){var z;if(!le){d.value=0;return}const b=le.getAll();d.value=((z=b==null?void 0:b.features)==null?void 0:z.length)??0}function oa(){var E,j,R;if(!le)return;const b=le.getAll();if(d.value=((E=b==null?void 0:b.features)==null?void 0:E.length)??0,!((j=b==null?void 0:b.features)!=null&&j.length)){D=null,h.value=null,$||(I="__null__",n("update:modelValue",null));return}const z=aa(((R=b.features[b.features.length-1])==null?void 0:R.geometry)??null);D=z,yt(z),$||(I=ra(z),n("update:modelValue",z))}function At(){var b;le&&((((b=le.getAll())==null?void 0:b.features)||[]).forEach(z=>le.delete(z.id)),ut())}function sa(b){if(!le)return;const z=St(b);if($=!0,At(),z)try{le.add(ta(z))}catch{}$=!1,D=aa(z),ut(),yt(z),z&&(na(z),o.value||N())}function L1(){if(le){if($=!0,At(),D)try{le.add(ta(D))}catch{}$=!1,ut(),yt(D)}}function kt(){if(le){try{le.changeMode("simple_select",{featureIds:[]})}catch{}c.value=""}}function _(b){if(o.value||!le)return;re=!0,kt(),c.value=b;const z=b==="marker"?"draw_point":b==="polyline"?"draw_line_string":b==="rectangle"?"draw_rectangle":"draw_polygon";$=!0,At(),$=!1;try{le.changeMode(z)}catch{c.value=""}finally{requestAnimationFrame(()=>{re=!1})}}function N(){var z;if(o.value||!le)return;const b=le.getAll();if((z=b==null?void 0:b.features)!=null&&z.length)try{le.changeMode("direct_select",{featureId:b.features[0].id}),c.value="edit"}catch{c.value=""}}function K(){o.value||!le||(kt(),At(),I="__null__",h.value=null,n("update:modelValue",null))}function ee(){o.value||!D||na(D)}function U(b){T&&T.easeTo({center:[b[1],b[0]],zoom:13,duration:250})}function me(){var b;o.value||((b=Q.value)==null||b.click())}function ge(b){var R;if(o.value||!le)return;const z=b.target,E=(R=z.files)==null?void 0:R[0];if(!E)return;const j=new FileReader;j.onload=()=>{try{const te=JSON.parse(String(j.result)),ae=St(te);if(!ae)return;sa(ae)}finally{z.value=""}},j.readAsText(E)}function Ce(){if(o.value||!le)return;const b=le.getAll(),z=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),E=URL.createObjectURL(z),j=document.createElement("a");j.href=E,j.download="data.geojson",j.click(),URL.revokeObjectURL(E)}return e.onMounted(async()=>{if(!i.value)return;const b=await ne();he=b.maplibregl,fe=b.MapboxDraw;const z=A();z&&(T=new he.Map({container:i.value,style:ue(z),center:[C.value[0],C.value[1]],zoom:q.value,attributionControl:!1}),T.addControl(new he.NavigationControl({showCompass:!0}),"bottom-right"),T.on("load",()=>{if(!(!fe||!T)){if(le=new fe({displayControlsDefault:!1,modes:{...fe.modes,draw_rectangle:ie()},controls:{point:!1,line_string:!1,polygon:!1,trash:!1},styles:we}),T.addControl(le),T.on("draw.create",()=>{if(!le)return;const E=le.getAll();if(E.features.length>1){const j=E.features[E.features.length-1];$=!0,E.features.slice(0,-1).forEach(R=>le.delete(R.id)),$=!1,j&&($=!0,le.add(j),$=!1)}oa(),N()}),T.on("draw.update",E=>{var j,R,te;if(!W){if((E==null?void 0:E.action)==="move"){if(W=!0,L1(),W=!1,c.value==="edit"){const ae=(te=(R=(j=le==null?void 0:le.getAll)==null?void 0:j.call(le))==null?void 0:R.features)==null?void 0:te[0];if(ae!=null&&ae.id)try{le.changeMode("direct_select",{featureId:ae.id})}catch{c.value=""}}return}oa()}}),T.on("draw.delete",()=>{c.value==="marker"||c.value==="polyline"||c.value==="polygon"||c.value==="rectangle"||(oa(),c.value="",kt())}),T.on("draw.selectionchange",()=>{if(!(!le||W)&&c.value!=="edit"&&!(c.value==="marker"||c.value==="polyline"||c.value==="polygon"||c.value==="rectangle")){if(!o.value&&d.value>0){N();return}try{le.changeMode("simple_select",{featureIds:[]})}catch{}}}),H.value!==void 0){const E=H.value;H.value=void 0,requestAnimationFrame(()=>{le&&sa(E)})}pt(),P.value.forEach(E=>{const j=B[E];j&&Ke(j)}),st()}}),T.on("zoomend",()=>{T&&(q.value=T.getZoom())}))}),e.onUnmounted(()=>{Object.values(B).forEach(b=>{T&&ht(b)}),ke(),T!=null&&T.remove&&T.remove(),T=null,le=null}),e.watch(()=>a.modelValue,b=>{if(!le){H.value=b;return}const z=St(b),E=ra(z);if(I&&E===I){I=null;return}I=null,sa(b)},{deep:!0}),e.watch(()=>v.value,b=>{const z=Array.isArray(b)?b:[],E=[],j=new Set;z.forEach((R,te)=>{if(!R)return;const ae=S(R,te);E.push(ae),j.add(ae);const Me={...R,id:ae},ze=B[ae],Se=(ze==null?void 0:ze.visible)??!!Me.visible;ze&&T&&ht(ze),B[ae]={id:ae,config:Me,visible:Se,sourceId:`vs-ov-src-${ae}`,layerIds:[],boundsIds:[],handlers:[]}}),Object.keys(B).forEach(R=>{if(j.has(R))return;const te=B[R];te&&T&&ht(te),delete B[R]}),P.value=E,T&&(P.value.forEach(R=>{const te=B[R];te&&Ke(te)}),st())},{immediate:!0,deep:!0}),e.watch(()=>V.value,()=>{T&&(pt(),P.value.forEach(b=>{const z=B[b];z&&Ke(z)}),st())},{deep:!0}),e.watch(()=>k.value,async b=>{var z,E;if(G.value=[],!b){T&&(pt(),P.value.forEach(j=>{const R=B[j];R&&Ke(R)}),st());return}try{const j=await fetch(`https://data.gki.com.ua/api-user/atu/${b}`);if(!(j!=null&&j.ok))return;const R=(E=(z=await j.json())==null?void 0:z.geometry)==null?void 0:E.coordinates;Array.isArray(R)&&R.length&&(G.value=R)}catch(j){console.error("Failed to fetch KATOTTG bounds",j)}finally{if(!T)return;pt(),P.value.forEach(j=>{const R=B[j];R&&Ke(R)}),st()}},{immediate:!0}),e.watch(()=>M.value,b=>{var j;if(!Array.isArray(b)||b.length!==2)return;const z=[Number(b[0]),Number(b[1])];if(vt(C.value,z)||(C.value=[...z],!T))return;const E=(j=T.getCenter)==null?void 0:j.call(T);E&&vt([E.lng,E.lat],C.value)||T.easeTo({center:[C.value[0],C.value[1]]})},{deep:!0}),e.watch(()=>x.value,b=>{typeof b=="number"&&(q.value=b,T&&T.setZoom(b))}),e.watch(o,b=>{b&&kt()}),e.watch(d,b=>{if(b>0){o.value||N();return}re||kt()}),e.watch(s,()=>{setTimeout(()=>{T!=null&&T.resize&&T.resize()},50)}),(b,z)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!s.value},[e.createElementVNode("div",{class:e.normalizeClass(["vs-map-wrapper relative w-full h-[400px]",{fullscreen:s.value}])},[e.createElementVNode("div",{ref_key:"mapContainer",ref:i,class:"w-full h-[calc(100%-28px)]"},null,512),J.value.search||J.value.import||J.value.export?(e.openBlock(),e.createElementBlock("div",o$,[J.value.search?(e.openBlock(),e.createBlock(n$,{key:0,onGoToCoordinates:U})):e.createCommentVNode("",!0),J.value.import||J.value.export?(e.openBlock(),e.createElementBlock("div",s$,[e.createElementVNode("div",i$,[J.value.import?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:me,disabled:o.value}," Import ",8,d$)):e.createCommentVNode("",!0),J.value.export?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:Ce,disabled:o.value||d.value===0}," Export ",8,c$)):e.createCommentVNode("",!0)]),e.createElementVNode("input",{ref_key:"importRef",ref:Q,type:"file",onChange:ge,accept:".json,.geojson",class:"hidden",disabled:o.value},null,40,h$)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p$,[e.createElementVNode("div",y$,[J.value.point?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="marker"}]),title:"Point",onClick:z[0]||(z[0]=E=>_("marker")),disabled:o.value},[e.createVNode(EH)],10,u$)):e.createCommentVNode("",!0),J.value.line?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="polyline"}]),title:"Line",onClick:z[1]||(z[1]=E=>_("polyline")),disabled:o.value},[e.createVNode(AH)],10,k$)):e.createCommentVNode("",!0),J.value.polygon?(e.openBlock(),e.createElementBlock("button",{key:2,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="polygon"}]),title:"Polygon",onClick:z[2]||(z[2]=E=>_("polygon")),disabled:o.value},[e.createVNode(HH)],10,m$)):e.createCommentVNode("",!0),J.value.rectangle?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="rectangle"}]),title:"Rectangle",onClick:z[3]||(z[3]=E=>_("rectangle")),disabled:o.value},[e.createVNode(PH)],10,f$)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"vs-btn mt-5",onClick:z[4]||(z[4]=E=>s.value=!s.value),title:"Full Screen"},[e.createVNode(UH,{style:{width:"12px",height:"12px"}})])])]),F.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[1500] pointer-events-none",style:e.normalizeStyle(X.value)},[e.createElementVNode("div",g$,[e.createElementVNode("dl",x$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,E=>(e.openBlock(),e.createElementBlock("div",{key:`${E.key}-${E.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",M$,e.toDisplayString(E.key),1),e.createElementVNode("dd",b$,e.toDisplayString(E.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),e.createElementVNode("div",w$,[e.createElementVNode("div",v$,[e.createVNode(JH,{basemaps:e.unref(Ee),onOnLayerChange:Ta},null,8,["basemaps"]),L.value.length?(e.openBlock(),e.createElementBlock("div",V$,[z[5]||(z[5]=e.createElementVNode("p",{class:"font-semibold text-[11px] uppercase tracking-wide text-gray-500 mb-2"},"Шари",-1)),e.createElementVNode("div",C$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,E=>(e.openBlock(),e.createElementBlock("label",{key:E.id,class:"flex items-center gap-2 cursor-pointer select-none"},[e.createElementVNode("input",{type:"checkbox",class:"rounded border-gray-300 text-blue-600 focus:ring-blue-500",checked:E.visible,disabled:o.value,onChange:j=>qt(E.id)},null,40,z$),e.createElementVNode("span",B$,e.toDisplayString(E.config.title||E.config.name||E.id),1)]))),128))])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",_$,[h.value?(e.openBlock(),e.createElementBlock("div",E$,[e.createElementVNode("div",q$,[e.createElementVNode("div",S$,[z[6]||(z[6]=e.createTextVNode(" Type: ",-1)),e.createElementVNode("span",j$,e.toDisplayString(h.value.type),1)])]),e.createElementVNode("div",A$,[e.createElementVNode("div",D$,[z[7]||(z[7]=e.createTextVNode(" Center: ",-1)),e.createElementVNode("b",null,e.toDisplayString(h.value.center.lat.toFixed(5))+", "+e.toDisplayString(h.value.center.lng.toFixed(5)),1)]),h.value.areaKm2!==null?(e.openBlock(),e.createElementBlock("div",N$,[z[8]||(z[8]=e.createTextVNode(" Area: ",-1)),e.createElementVNode("b",null,e.toDisplayString(h.value.areaKm2.toFixed(1))+" km²",1)])):(e.openBlock(),e.createElementBlock("div",L$,z[9]||(z[9]=[e.createTextVNode("Area: ",-1),e.createElementVNode("b",null,"—",-1)]))),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Zoom to feature",onClick:ee,disabled:o.value},z[10]||(z[10]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-3 h-3"},[e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),e.createElementVNode("path",{d:"M7 10l6 0"}),e.createElementVNode("path",{d:"M10 7l0 6"}),e.createElementVNode("path",{d:"M21 21l-6 -6"})],-1)]),8,H$),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Delete feature",onClick:K,disabled:o.value},[e.createVNode(Bt,{class:"w-3 h-3"})],8,$$)])])):e.createCommentVNode("",!0)])],2)],8,["disabled"]))}}),nl=de(F$,[["__scopeId","data-v-3b015982"]]),T$=["data-focus"],P$={class:"flex items-center"},I$={class:"overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border"},R$=["onClick","aria-label"],O$={key:0,class:"absolute text-gray-500 truncate pl-2"},U$={class:"flex-1 min-w-[2px]"},Z$=["placeholder"],W$={class:"flex items-center shrink-0"},G$=["disabled"],ol=e.defineComponent({__name:"vs-input-tag",props:e.mergeModels({unique:{type:Boolean,default:!0},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:"Введіть тег"},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=t;He(a.style);const o=e.ref(null),s=e.ref(null),i=e.ref(null),d=e.ref(!1),c=e.ref(""),h=e.useModel(l,"modelValue"),p=e.computed(()=>a.placeholder||"Add tag…"),y=e.computed(()=>{var C;return((C=h.value)==null?void 0:C.length)===0&&c.value===""}),w=e.computed(()=>{var C;return!a.disabled&&((C=h.value)==null?void 0:C.length)>0}),m=e.computed(()=>a.disabled),f=async()=>{m.value||await e.nextTick(()=>{var C;return(C=i.value)==null?void 0:C.focus()})},u=C=>{const q=C.trim();q!==""&&(!h.value||!Array.isArray(h.value)?h.value=[q]:a.unique?h.value.includes(q)||(h.value=[...h.value,q]):h.value=[...h.value,q],c.value="")},g=()=>{const C=c.value;C.trim()!==""&&u(C),c.value=""},M=C=>{const q=h.value.slice();q.splice(C,1),n("update:modelValue",q)},x=()=>{n("update:modelValue",[])},k=()=>{m.value||(d.value=!0)},v=()=>{d.value=!1,!m.value&&g()},V=C=>{const{key:q}=C;q==="Enter"?(C.preventDefault(),g()):q==="Backspace"&&c.value===""&&h.value.length>0&&M(h.value.length-1)};return(C,q)=>(e.openBlock(),e.createElementBlock("div",{class:"flex gap-1 w-full",ref_key:"root",ref:o,onClick:q[1]||(q[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass]),role:"group","aria-label":"Tag input"},[e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white","border-gray-300 hover:border-gray-400",d.value?"border-blue-500 ring-1 ring-blue-500":"",m.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),"data-focus":d.value?"true":"false",onClick:f},[e.createElementVNode("div",{class:"flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",ref_key:"chipsRef",ref:s},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(H,Q)=>(e.openBlock(),e.createElementBlock("div",{key:Q,class:"flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"},[e.createElementVNode("div",P$,[e.createElementVNode("div",I$,e.toDisplayString(H),1)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",onClick:e.withModifiers(G=>M(Q),["stop"]),"aria-label":`Remove ${H}`},q[2]||(q[2]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,R$)]))),128)),y.value?(e.openBlock(),e.createElementBlock("div",O$,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",U$,[m.value?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:i,class:"pl-2 w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-label":"Add tag","onUpdate:modelValue":q[0]||(q[0]=H=>c.value=H),onFocus:k,onBlur:v,onKeydown:V,placeholder:h.value&&h.value.length?"":void 0},null,40,Z$)),[[e.vModelText,c.value]])])],512),e.createElementVNode("div",W$,[w.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-label":"Clear all tags",disabled:m.value,onClick:e.withModifiers(x,["stop"])},q[3]||(q[3]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,G$)):e.createCommentVNode("",!0)])],10,T$)],2)],512))}}),K$={class:"relative flex gap-1 bg-white w-full"},J$=["disabled","placeholder"],Y$=e.defineComponent({__name:"vs-input-slug",props:e.mergeModels({disabled:{type:Boolean},placeholder:{},parent:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.inject("values"),a=l,n=e.useModel(l,"modelValue");function o(i){const d={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return i.toLowerCase().split("").map(c=>d[c]||c).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const s=()=>{var c,h;const i=(h=(c=t==null?void 0:t.value)==null?void 0:c[a.parent||""])==null?void 0:h.toString(),d=o(i);n.value=d.toString()};return(i,d)=>(e.openBlock(),e.createElementBlock("div",K$,[e.withDirectives(e.createElementVNode("input",{ref:"vsText",disabled:i.disabled,placeholder:i.placeholder,"onUpdate:modelValue":d[0]||(d[0]=c=>n.value=c),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,J$),[[e.vModelText,n.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",onClick:s}," Gen ")]))}}),sl=de(Y$,[["__scopeId","data-v-b0eba370"]]),X$={class:"relative flex gap-1 bg-white w-full"},Q$=["disabled","placeholder"],eF=["disabled"],tF={key:0},aF={key:1},rF=e.defineComponent({__name:"vs-input-codegen",props:e.mergeModels({table:{},code:{},init:{type:Boolean},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(!1),o=e.computed(()=>t.init!==!1),s=e.computed(()=>!!t.table&&!!t.code),i=()=>{if(!s.value)return"";const h=encodeURIComponent(String(t.table)),p=encodeURIComponent(String(t.code));return`/api/code-gen/${h}/${p}`},d=async()=>{if(!s.value||n.value)return;const h=i();if(h){n.value=!0;try{const p=await(await fetch(h)).text();a.value=p}finally{n.value=!1}}},c=()=>{o.value&&(a.value||d())};return e.onMounted(()=>{c()}),e.watch(()=>[t.table,t.code,t.init],()=>{c()}),(h,p)=>(e.openBlock(),e.createElementBlock("div",X$,[e.withDirectives(e.createElementVNode("input",{disabled:h.disabled,placeholder:h.placeholder,"onUpdate:modelValue":p[0]||(p[0]=y=>a.value=y),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,Q$),[[e.vModelText,a.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed",disabled:n.value||h.disabled||!s.value,onClick:d},[n.value?(e.openBlock(),e.createElementBlock("span",aF,"...")):(e.openBlock(),e.createElementBlock("span",tF,"Gen"))],8,eF)]))}}),il=de(rF,[["__scopeId","data-v-6ee5237d"]]),lF={class:"w-full"},nF={ref:"sortableContainer",class:"flex flex-col gap-1"},oF=["onDragstart","onDrop"],sF={class:"w-1/3"},iF={class:"w-2/3"},dF=["onClick"],cF={key:0,class:"text-[14px] text-gray-700"},hF={class:"mt-2 w-full flex items-center"},pF=["disabled"],yF=e.defineComponent({__name:"vs-input-key-value",props:{parent:{},ignore:{},addButtonText:{},modelValue:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=u=>`${u}-${Math.random().toString(36).substring(2,15)}`,n=e.inject("values"),o=l,s=t,i=o.addButtonText??"Додати",d=o.ignore??[],c=e.ref([]),h=e.ref(null);(()=>{var g;const u=o.parent&&((g=n==null?void 0:n.value)==null?void 0:g[o.parent])||o.modelValue||{};c.value=Object.entries(u).filter(([M])=>!d.includes(M)).map(([M,x])=>({id:a("key-value-"),key:M,value:x}))})();function p(u){h.value=u}function y(u){if(h.value===null||h.value===u)return;const g=c.value.splice(h.value,1)[0];c.value.splice(u,0,g),h.value=null}const w=e.computed(()=>c.value.some(u=>u.key&&!u.value||!u.key&&u.value)),m=()=>{c.value.push({id:a("key-value-"),key:"",value:""})},f=u=>{c.value=c.value.filter(g=>g.id!==u)};return e.watch(c,u=>{const g={};u.forEach(x=>{x.key&&x.value!==void 0&&(g[x.key]=x.value)});const M={};d.length&&d.forEach(x=>{var k,v;M[x]=o.parent?(v=(k=n==null?void 0:n.value)==null?void 0:k[o.parent])==null?void 0:v[x]:void 0}),n!=null&&n.value&&o.parent&&(n.value[o.parent]={...M,...g}),s("update:modelValue",g)},{deep:!0}),(u,g)=>(e.openBlock(),e.createElementBlock("div",lF,[e.createElementVNode("div",nF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(M,x)=>(e.openBlock(),e.createElementBlock("div",{key:M.id,class:e.normalizeClass(["flex items-center gap-2 w-full",{"opacity-50":h.value===x}]),draggable:"true",onDragstart:k=>p(x),onDragover:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"])),onDrop:k=>y(x)},[g[1]||(g[1]=e.createStaticVNode('<button class="cursor-move" data-v-81b9444f><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-81b9444f><circle cx="15" cy="12" r="1.5" data-v-81b9444f></circle><circle cx="15" cy="24" r="1.5" data-v-81b9444f></circle><circle cx="21" cy="12" r="1.5" data-v-81b9444f></circle><circle cx="21" cy="24" r="1.5" data-v-81b9444f></circle><circle cx="21" cy="18" r="1.5" data-v-81b9444f></circle><circle cx="15" cy="18" r="1.5" data-v-81b9444f></circle></svg></button>',1)),e.createElementVNode("div",sF,[e.createVNode(zt,{modelValue:M.key,"onUpdate:modelValue":k=>M.key=k,placeholder:"Ключ"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",iF,[e.createVNode(zt,{modelValue:M.value,"onUpdate:modelValue":k=>M.value=k,placeholder:"Значення"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("button",{onClick:k=>f(M.id),class:"shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"},[e.createVNode(e.unref(Ma),{height:"16",width:"16"})],8,dF)],42,oF))),128))],512),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",cF," Дані для відображення відсутні ")),e.createElementVNode("div",hF,[e.createElementVNode("button",{type:"button",onClick:m,disabled:w.value,class:"py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"},[e.createVNode(et,{height:"14",width:"14"}),e.createTextVNode(" "+e.toDisplayString(e.unref(i)),1)],8,pF)])]))}}),dl=de(yF,[["__scopeId","data-v-81b9444f"]]),uF={class:"w-full"},kF={ref:"sortableContainer",class:"flex flex-col gap-1"},mF=["onDragstart","onDrop"],fF=["disabled"],gF={class:"flex-1"},xF=["onClick","disabled"],MF={key:0,class:"text-[14px] text-gray-700"},bF={class:"mt-2 w-full flex items-center"},wF=["disabled"],vF=e.defineComponent({__name:"vs-input-text-array",props:e.mergeModels({addButtonText:{default:"Додати"},inputType:{default:"text"},placeholder:{default:"Значення"},mask:{default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref([]),o=e.ref(null),s=e.computed(()=>!!t.disabled),i=e.computed(()=>t.placeholder??""),d=e.computed(()=>t.addButtonText??"Додати");let c=!1;const h=g=>`${g}-${Math.random().toString(36).substring(2,15)}`,p=g=>{const M=g??a.value??[];n.value=M.map((x,k)=>{var v;return{id:((v=n.value[k])==null?void 0:v.id)??h("text-array"),value:x??""}})};p(),e.watch(()=>a.value,g=>{if(c){c=!1;return}p(g||[])},{deep:!0}),e.watch(n,g=>{c=!0,a.value=g.map(M=>M.value).filter(M=>M!=null&&M!=="")},{deep:!0});const y=e.computed(()=>s.value||n.value.some(g=>!g.value));function w(){y.value||(n.value=[...n.value,{id:h("text-array"),value:""}])}function m(g){s.value||(n.value=n.value.filter(M=>M.id!==g))}function f(g){s.value||(o.value=g)}function u(g){if(s.value||o.value===null||o.value===g)return;const M=[...n.value],[x]=M.splice(o.value,1);M.splice(g,0,x),n.value=M,o.value=null}return(g,M)=>(e.openBlock(),e.createElementBlock("div",uF,[e.createElementVNode("div",kF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(x,k)=>(e.openBlock(),e.createElementBlock("div",{key:x.id,class:e.normalizeClass(["flex items-center gap-2 w-full",{"opacity-50":o.value===k}]),draggable:"true",onDragstart:v=>f(k),onDragover:M[0]||(M[0]=e.withModifiers(()=>{},["prevent"])),onDrop:v=>u(k)},[e.createElementVNode("button",{class:"cursor-move",type:"button",disabled:s.value},M[1]||(M[1]=[e.createStaticVNode('<svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-66316a33><circle cx="15" cy="12" r="1.5" data-v-66316a33></circle><circle cx="15" cy="24" r="1.5" data-v-66316a33></circle><circle cx="21" cy="12" r="1.5" data-v-66316a33></circle><circle cx="21" cy="24" r="1.5" data-v-66316a33></circle><circle cx="21" cy="18" r="1.5" data-v-66316a33></circle><circle cx="15" cy="18" r="1.5" data-v-66316a33></circle></svg>',1)]),8,fF),e.createElementVNode("div",gF,[g.inputType==="text"?(e.openBlock(),e.createBlock(zt,{key:0,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])):e.createCommentVNode("",!0),g.inputType==="tel"?(e.openBlock(),e.createBlock(f1,{key:1,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])):e.createCommentVNode("",!0),g.inputType==="email"?(e.openBlock(),e.createBlock(m1,{key:2,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])):e.createCommentVNode("",!0),g.inputType==="mask"?(e.openBlock(),e.createBlock(k1,{key:3,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,mask:g.mask,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","mask","disabled","placeholder"])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",onClick:v=>m(x.id),disabled:s.value,class:"shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200 disabled:opacity-50"},[e.createVNode(e.unref(Ma),{height:"16",width:"16"})],8,xF)],42,mF))),128))],512),n.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",MF," Дані для відображення відсутні ")),e.createElementVNode("div",bF,[e.createElementVNode("button",{type:"button",onClick:w,disabled:y.value,class:"py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"},[e.createVNode(et,{height:"14",width:"14"}),e.createTextVNode(" "+e.toDisplayString(d.value),1)],8,wF)])]))}}),cl=de(vF,[["__scopeId","data-v-66316a33"]]),VF={class:"flex items-center gap-2 w-full"},CF=["disabled"],zF=["disabled"],hl=e.defineComponent({__name:"vs-input-color",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:n}=He(a.style),o=t,s=e.computed({get:()=>a.modelValue||"#000000",set:d=>o("update:modelValue",d)}),i=e.computed(()=>!!a.disabled);return(d,c)=>(e.openBlock(),e.createElementBlock("div",VF,[e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":c[0]||(c[0]=h=>s.value=h),disabled:i.value,ref:"color",class:e.normalizeClass(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]",[d.modelValue?"":"text-opacity-50",e.unref(n)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,CF),[[e.vModelText,s.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2","onUpdate:modelValue":c[1]||(c[1]=h=>s.value=h),disabled:i.value},null,8,zF),[[e.vModelText,s.value]])]))}}),BF={class:"flex items-center gap-2 w-full"},_F=["min","max","step","disabled"],EF=["disabled"],pl=e.defineComponent({__name:"vs-input-range",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{},min:{default:0},max:{default:100},step:{default:1}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:n}=He(a.style),o=t,s=e.computed({get:()=>Number(a.modelValue??a.min),set:d=>o("update:modelValue",Number(d))}),i=e.computed(()=>!!a.disabled);return(d,c)=>(e.openBlock(),e.createElementBlock("div",BF,[e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":c[0]||(c[0]=h=>s.value=h),min:d.min,max:d.max,step:d.step,disabled:i.value,ref:"range",class:e.normalizeClass(["w-full cursor-pointer accent-blue-500",[d.modelValue?"":"text-opacity-50",e.unref(n)].join(" ")])},null,10,_F),[[e.vModelText,s.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",type:"number","onUpdate:modelValue":c[1]||(c[1]=h=>s.value=h),disabled:i.value},null,8,EF),[[e.vModelText,s.value]])]))}}),qF=["placeholder","disabled","name"],SF=["type","value","onInput","placeholder","disabled"],jF=["onClick"],yl=e.defineComponent({__name:"vs-input-array",props:e.mergeModels({count:{default:1},limit:{default:1},mask:{default:""},unmask:{type:Boolean,default:!1},inputType:{default:"text"},isAdded:{type:Boolean,default:!1},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.ref(t.count),n=e.computed(()=>t.limit),{inputClass:o}=He(t.style),s=e.useModel(l,"modelValue"),i=e.computed(()=>!!t.disabled),d=e.computed(()=>t.placeholder??"");e.watchEffect(()=>{var g;const u=((g=s.value)==null?void 0:g.length)??0;u<a.value&&(s.value=[...s.value??[],...Array(a.value-u)])});const c=e.ref({}),h=e.ref({});function p(u,g){u&&(c.value[g]=u)}async function y(u,g){var x;if(!u||t.inputType!=="mask")return;const{default:M}=await Promise.resolve().then(()=>D1);h.value[g]&&h.value[g].destroy(),h.value[g]=M(u,{mask:t.mask||"",definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},lazy:!1}),h.value[g].on("accept",()=>{const k=[...s.value||[]];k[g]=t.unmask?h.value[g].unmaskedValue:h.value[g].value,s.value=k}),h.value[g].on("complete",()=>{const k=[...s.value||[]];k[g]=t.unmask?h.value[g].unmaskedValue:h.value[g].value,s.value=k}),(x=s.value)!=null&&x[g]&&(h.value[g].value=s.value[g])}function w(u,g){if(i.value)return;const M=u.target.value??null,x=[...s.value];x[g]=t.inputType==="text"?M:Number(M),s.value=x}function m(){a.value+=1;const u=t.inputType==="text"||t.inputType==="mask"?null:0;s.value=[...s.value,u],t.inputType==="mask"&&setTimeout(()=>{const g=a.value-1;c.value[g]&&y(c.value[g],g)},0)}function f(u){if(a.value>1){h.value[u]&&(h.value[u].destroy(),delete h.value[u]),a.value-=1,s.value=s.value.filter((M,x)=>x!==u);const g={};Object.keys(h.value).forEach(M=>{const x=parseInt(M,10);x>u?g[x-1]=h.value[x]:x<u&&(g[x]=h.value[x])}),h.value=g}}return e.onMounted(()=>{if(t.inputType==="mask")for(let u=0;u<a.value;u+=1)c.value[u]&&y(c.value[u],u)}),e.onBeforeUnmount(()=>{Object.values(h.value).forEach(u=>{u&&u.destroy()})}),e.watch(()=>t.mask,u=>{t.inputType==="mask"&&Object.values(h.value).forEach(g=>{g&&g.updateOptions({mask:u,definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/}})})}),e.watch(s,u=>{t.inputType==="mask"&&u&&u.forEach((g,M)=>{h.value[M]&&h.value[M].value!==g&&(h.value[M].value=g||"")})},{deep:!0}),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid gap-2",`grid-cols-${n.value}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,M=>{var x;return e.openBlock(),e.createElementBlock("div",{key:M,class:"flex items-center gap-2 w-full"},[u.inputType==="mask"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",ref_for:!0,ref:k=>p(k,M-1),placeholder:u.placeholder,disabled:u.disabled,name:`${u.name}[${M-1}]`,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(o),{"!border-red-600":u.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,qF)):(e.openBlock(),e.createElementBlock("input",{key:1,type:u.inputType,value:(x=s.value)==null?void 0:x[M-1],onInput:k=>w(k,M-1),placeholder:d.value,disabled:i.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(o),{"!border-red-600":u.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,SF)),!u.disabled&&M===a.value&&u.isAdded?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",onClick:e.withModifiers(m,["stop"]),class:"cursor-pointer shrink-0 w-[38px] text-green-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"},[e.createVNode(et,{height:"18",width:"18"})])):e.createCommentVNode("",!0),!u.disabled&&a.value>1&&u.isAdded?(e.openBlock(),e.createElementBlock("button",{key:3,type:"button",onClick:e.withModifiers(k=>f(M-1),["stop"]),class:"cursor-pointer shrink-0 w-[38px] text-red-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"},[e.createVNode(Ma,{height:"18",width:"18"})],8,jF)):e.createCommentVNode("",!0)])}),128))],2))}}),AF=["aria-expanded","data-focus"],DF=["placeholder","disabled","readonly"],NF={class:"max-h-full"},LF=["onClick","disabled"],HF={key:0,class:"px-3 py-2 text-sm text-stone-500"},$F={class:"flex flex-col gap-1"},FF=["onDragstart","onDrop"],TF=["disabled"],PF=["title"],IF=["disabled","onClick","aria-label"],RF={key:0,class:"text-xs text-stone-500"},OF=e.defineComponent({__name:"vs-input-array-select",props:e.mergeModels({options:{default:()=>[]},data:{default:""},api:{default:""},prefix:{default:"api"},host:{default:""},parent:{},search:{type:Boolean,default:!0},maxHeight:{default:280},start:{default:0},slot:{},disabled:{type:Boolean,default:!1},style:{},customClass:{},modelValue:{},error:{},name:{},placeholder:{default:"Оберіть значення"},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:e.mergeModels(["change","update:modelValue","value-selected"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=t,o=e.useModel(l,"modelValue"),s=e.ref([]),i=e.ref(a.options??[]),d=e.ref({}),c=e.ref({}),h=e.ref({keyword:"",parent:null}),p=e.ref(""),y=e.ref(!1),w=e.ref(null),m=e.ref(null),f=e.ref(null);let u=!1,g=!1;const M=e.inject("values"),x=e.computed(()=>!!a.disabled),k=e.computed(()=>a.placeholder??"Оберіть значення"),v=e.computed(()=>a.search!==!1),V=e.computed(()=>`${a.maxHeight??280}px`),C=e.computed(()=>{const A=a.parent??a.parentValue;return A?String(A):""}),q=e.computed(()=>{var A;return C.value?((A=M==null?void 0:M.value)==null?void 0:A[C.value])??null:null}),H=A=>A==null?"__null__":String(A),Q=A=>{if(!A)return"";const S=A.label??A.text??A.name??A.ua??A.en;return S?String(S):A.id!==void 0&&A.id!==null?String(A.id):""},G=A=>{const S=H(A);return c.value[S]||(c.value[S]=`array-select-${S}-${Math.random().toString(36).slice(2,8)}`),c.value[S]},$=e.computed(()=>new Set(s.value.map(A=>H(A.id)))),B=e.computed(()=>{const A=$.value;let S=[...i.value];if(!a.data&&p.value.trim()){const O=p.value.toLowerCase();S=S.filter(ke=>Q(ke).toLowerCase().includes(O))}return S.filter(O=>!A.has(H(O.id)))}),P=()=>{if(!a.data)return"";const A=a.prefix??"api",S=a.api??`/${A}/suggest/${a.data}`;return`${a.host??""}${S}`},L=()=>{s.value.length&&(u=!0,s.value=s.value.map(A=>({...A,text:d.value[H(A.id)]??A.text})))},Z=A=>{const S=H(A.id),O=Q(A);O&&(d.value[S]=O)},F=A=>{i.value=A?[...A]:[],A==null||A.forEach(Z),L()},X=A=>{if(!A.length)return;const S=new Map(i.value.map(O=>[H(O.id),O]));A.forEach(O=>{const ke=H(O.id);S.set(ke,O),Z(O)}),i.value=Array.from(S.values()),L()},J=async(A="")=>{var ke;if(!a.data)return[];const S=P();if(!S)return[];const O=new URLSearchParams;O.set("json","1"),A&&O.set("key",A),a.start===1&&O.set("start","1"),q.value!==null&&q.value!==void 0&&q.value!==""&&O.set("parent",String(q.value));try{return((ke=await(await fetch(`${S}?${O.toString()}`)).json())==null?void 0:ke.data)??[]}catch{return[]}},se=async A=>{var Re;if(!a.data||!A.length)return[];const S=P();if(!S)return[];const O=Array.from(new Set(A.map(ot=>H(ot)))),ke=new URLSearchParams;ke.set("json","1"),ke.set("val",O.join(",")),a.start===1&&ke.set("start","1"),q.value!==null&&q.value!==void 0&&q.value!==""&&ke.set("parent",String(q.value));try{const ot=((Re=await(await fetch(`${S}?${ke.toString()}`)).json())==null?void 0:Re.data)??[];return X(ot),ot}catch{return[]}},ce=async(A="",{force:S=!1}={})=>{if(!a.data)return;const O=q.value??null;if(!S&&h.value.keyword===A&&h.value.parent===O&&i.value.length>0)return;h.value={keyword:A,parent:O};const ke=await J(A);F(ke)},Ee=((A,S=200)=>{let O;return(...ke)=>{O&&clearTimeout(O),O=setTimeout(()=>A(...ke),S)}})(async A=>{a.data&&await ce(A,{force:!0})},250),$e=e.ref(null),Y=async(A="click")=>{var S;x.value||y.value||($e.value=A,await ce(p.value.trim()),y.value=!0,await e.nextTick(),(S=f.value)==null||S.focus())},ne=()=>{y.value=!1,$e.value=null,e.nextTick(()=>{var A;(A=f.value)==null||A.blur()})},ue=async A=>{if(A.stopPropagation(),!x.value){if(y.value){if($e.value==="focus"){$e.value=null;return}ne();return}await Y("click")}},he=A=>{A.key==="Escape"&&ne()},fe=A=>{var O;const S=A.target;(O=m.value)!=null&&O.contains(S)||ne()},T=A=>{if(A.key==="Escape"){A.preventDefault(),ne();return}if(A.key==="Enter"){A.preventDefault();const S=B.value[0];S&&le(S)}},le=A=>{if(!A)return;const S=H(A.id);if($.value.has(S))return;Z(A);const O={id:A.id,text:Q(A)||String(A.id??""),key:G(A.id)};s.value=[...s.value,O],D(A),p.value="",e.nextTick(()=>{var ke;(ke=f.value)==null||ke.focus()})},D=A=>{const S=s.value.map(O=>O.id);n("value-selected",{name:a.name,value:S,option:A})},I=A=>{if(x.value)return;const S=s.value.filter(O=>H(O.id)!==H(A));s.value=S},W=A=>{x.value||(w.value=A)},re=A=>{if(x.value||w.value===null||w.value===A)return;const S=[...s.value],[O]=S.splice(w.value,1);S.splice(A,0,O),w.value=null,s.value=S},ie=async()=>{const A=(Array.isArray(o.value)?[...o.value]:[]).filter(O=>O!=null);if(a.data&&A.length){const O=A.filter(ke=>!d.value[H(ke)]);O.length&&await se(O)}const S=A.map(O=>({id:O,text:d.value[H(O)]??String(O),key:G(O)}));u=!0,s.value=S};e.watch(s,A=>{if(u){u=!1;return}const S=A.map(O=>O.id);g=!0,o.value=S,n("change",S)},{deep:!0}),e.watch(o,()=>{if(g){g=!1;return}ie()},{deep:!0}),e.watch(p,A=>{!a.data||!y.value||Ee(A.trim())}),e.watch(x,A=>{A&&ne()}),e.watch(()=>a.options,async A=>{a.data||(F(A??[]),await ie())},{immediate:!0,deep:!0}),e.watch(()=>a.data,async A=>{A&&(await ce(p.value.trim()),await ie())},{immediate:!0});const we=e.ref(!1);return e.watch(q,async()=>{if(a.data){if(!we.value){we.value=!0;return}s.value=[],await ce(p.value.trim()),await ie()}}),e.onMounted(async()=>{document.addEventListener("click",fe,!0),window.addEventListener("keydown",he),await ie()}),e.onUnmounted(()=>{document.removeEventListener("click",fe,!0),window.removeEventListener("keydown",he)}),(A,S)=>(e.openBlock(),e.createElementBlock("div",{class:"flex flex-col gap-2 w-full",ref_key:"rootRef",ref:m},[e.createElementVNode("div",{class:"relative",onClick:S[2]||(S[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white px-3","border-gray-300 hover:border-[#b3d4ff]",y.value?"border-[#2684ff] ring-1 ring-[#2684ff] shadow-[0_0_0_1px_rgba(38,132,255,0.5)]":"",x.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),role:"combobox","aria-expanded":y.value,"aria-haspopup":"listbox","data-focus":y.value?"true":"false",onClick:ue},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:f,"onUpdate:modelValue":S[0]||(S[0]=O=>p.value=O),placeholder:k.value,disabled:x.value,readonly:!v.value,onFocus:S[1]||(S[1]=()=>Y("focus")),onKeydown:T,class:"flex-1 bg-transparent border-0 outline-none px-0 py-1 text-sm text-stone-900 placeholder:text-stone-400"},null,40,DF),[[e.vModelText,p.value]]),e.createElementVNode("span",{class:e.normalizeClass(["text-stone-400 transition-transform duration-150",y.value?"rotate-180":""]),"aria-hidden":"true"},[e.createVNode(p1,{width:"16",height:"16"})],2)],10,AF),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute left-0 right-0 z-10 mt-1 rounded-md border border-stone-200 bg-white shadow-lg overflow-auto",style:e.normalizeStyle({maxHeight:V.value})},[e.createElementVNode("div",NF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,O=>(e.openBlock(),e.createElementBlock("button",{key:H(O.id),type:"button",class:"w-full px-3 py-2 text-left text-sm text-stone-900 hover:bg-stone-100 disabled:opacity-50",onClick:e.withModifiers(ke=>le(O),["stop"]),disabled:x.value},e.toDisplayString(Q(O)),9,LF))),128)),B.value.length===0?(e.openBlock(),e.createElementBlock("p",HF," Немає варіантів ")):e.createCommentVNode("",!0)])],4)):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",$F,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(O,ke)=>(e.openBlock(),e.createElementBlock("div",{key:O.key,class:e.normalizeClass(["flex items-center gap-2 rounded-md border border-stone-200 bg-white px-2 py-2",{"opacity-60":w.value===ke}]),draggable:"true",onDragstart:Re=>W(ke),onDragover:S[3]||(S[3]=e.withModifiers(()=>{},["prevent"])),onDrop:Re=>re(ke),onDragend:S[4]||(S[4]=Re=>w.value=null)},[e.createElementVNode("button",{type:"button",class:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-stone-500 hover:text-stone-900",disabled:x.value,"aria-label":"Перетягнути"},[e.createVNode(wa,{width:"14",height:"14"})],8,TF),e.createElementVNode("div",{class:"flex-1 text-sm text-stone-900",title:O.text},e.toDisplayString(O.text),9,PF),e.createElementVNode("button",{type:"button",class:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-stone-400 hover:text-stone-900",disabled:x.value,onClick:e.withModifiers(Re=>I(O.id),["stop"]),"aria-label":`Видалити ${O.text}`},[e.createVNode(Ma,{width:"14",height:"14"})],8,IF)],42,FF))),128)),s.value.length===0?(e.openBlock(),e.createElementBlock("p",RF,"Немає вибраних значень")):e.createCommentVNode("",!0)])],512))}}),za=de(OF,[["__scopeId","data-v-8dc8c204"]]),UF={class:"flex items-center gap-2 w-full"},ZF={class:"relative flex-1"},WF=["placeholder","disabled","onKeydown"],GF=["disabled"],KF={key:0,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},JF={key:1,class:"animate-spin h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},YF={key:0,class:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/50"},XF={class:"bg-white text-gray-900 rounded-lg shadow-lg w-[480px] max-h-[80vh] overflow-y-auto"},QF={class:"p-3 border-b font-semibold text-gray-900 flex justify-between items-center"},eT=["onClick"],tT={key:0,class:"p-4 text-sm text-gray-500"},ul=e.defineComponent({__name:"vs-input-address",props:e.mergeModels({api:{default:""},geom:{default:""},includes:{default:()=>[]},bbox:{},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","update:geom"],["update:modelValue"]),setup(l,{emit:t}){const a=/{{\s*([^}]+?)\s*}}/g,n=l,o=t,{inputClass:s}=He(n.style),i=e.useModel(l,"modelValue"),d=e.computed({get:()=>i.value,set:q=>{i.value=q}}),c=e.ref(!1),h=e.ref([]),p=e.ref(!1),y=e.ref(null);e.watch(p,q=>{typeof document>"u"||(q?(y.value=document.body.style.overflow,document.body.style.overflow="hidden"):y.value!=null?(document.body.style.overflow=y.value,y.value=null):document.body.style.removeProperty("overflow"))}),e.onBeforeUnmount(()=>{typeof document>"u"||(y.value!=null?document.body.style.overflow=y.value:document.body.style.removeProperty("overflow"))});const w=e.computed(()=>n.placeholder??""),m=e.computed(()=>!!n.disabled),f=q=>{if(!q)return null;if(Array.isArray(q))return q;if(typeof q=="string"){const H=q.split(",").map(Q=>Q.trim()).filter(Boolean);return H.length!==4?null:H.map(Number)}return null},u=e.computed(()=>{const q=f(n.bbox);if(!q||q.length!==4)return null;const H=q.map(Number);return H.some(Q=>Number.isNaN(Q))?null:H}),g=e.computed(()=>{const q=u.value;if(!q)return"";const[H,Q,G,$]=q;return`${H},${Math.max(Q,$)},${G},${Math.min(Q,$)}`});e.computed(()=>g.value?"1":"0");const M=e.inject("values");function x(){!m.value&&d.value.trim()&&k()}async function k(){var G;const q=(d.value||"").trim();if(!q)return;let H=q;if((G=n.includes)!=null&&G.length&&(M!=null&&M.value)){const $=n.includes.map(B=>{var P;return(P=M.value)==null?void 0:P[B]}).filter(Boolean);$.length&&(H=`${$.join(", ")}, ${q}`)}const Q=C(H);if(Q){c.value=!0;try{const $=await(await fetch(Q)).json();h.value=Array.isArray($)?$:[],p.value=!0}catch($){console.error("Address search error:",$)}finally{c.value=!1}}}function v(){p.value=!p.value}function V(q){if(!q)return;p.value=!1;const H=parseFloat(q.lat),Q={type:"Point",coordinates:[parseFloat(q.lon),H]};n.geom&&(M!=null&&M.value)&&(M.value[n.geom]=Q),o("update:geom",Q)}function C(q){if(!n.api)return"";const H={value:encodeURIComponent(q),bbox:u.value?u.value.join(","):""};return n.api.replace(a,(Q,G)=>H[G.trim()]??"")}return(q,H)=>{var Q;return e.openBlock(),e.createElementBlock("div",UF,[e.createElementVNode("div",ZF,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":H[0]||(H[0]=G=>d.value=G),placeholder:w.value,disabled:m.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500",[e.unref(s),{"!border-red-600":n.error}]]),style:{border:"1px solid #CFD9E0"},onKeydown:e.withKeys(e.withModifiers(x,["prevent"]),["enter"])},null,42,WF),[[e.vModelText,d.value]]),h.value.length?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-blue-600",onClick:v,title:"Show search results"},H[2]||(H[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("path",{d:"M12 16v-4"}),e.createElementVNode("path",{d:"M12 8h.01"})],-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",onClick:k,class:"flex items-center justify-center px-2 py-2 border rounded-md bg-white hover:bg-gray-50 text-gray-600 hover:text-blue-600 disabled:opacity-50 h-[38px]",disabled:c.value||!((Q=d.value)!=null&&Q.trim())},[c.value?(e.openBlock(),e.createElementBlock("svg",JF,H[4]||(H[4]=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",KF,H[3]||(H[3]=[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},null,-1)])))],8,GF),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[p.value?(e.openBlock(),e.createElementBlock("div",YF,[e.createElementVNode("div",XF,[e.createElementVNode("div",QF,[H[6]||(H[6]=e.createElementVNode("span",null,"Search results",-1)),e.createElementVNode("button",{class:"text-gray-500 hover:text-blue-600",onClick:H[1]||(H[1]=G=>p.value=!1),title:"Close"},H[5]||(H[5]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)]))]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(G,$)=>(e.openBlock(),e.createElementBlock("li",{key:$,onClick:B=>V(G),class:"px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"},e.toDisplayString(G.display_name),9,eT))),128))]),h.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tT," No results found "))])])):e.createCommentVNode("",!0)]))])}}}),kl=(l="")=>`${l}${Math.floor(Math.random()*1e4)}`,aT={class:"vs-datalist space-y-3"},rT={class:"space-y-3"},lT=["onClick","disabled"],nT={key:0,class:"rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"},oT=["disabled"],sT=e.defineComponent({__name:"vs-input-datalist",props:e.mergeModels({schema:{default:()=>[]},minItems:{default:0},maxItems:{default:void 0},addButtonText:{default:"Додати позицію"},emptyLabel:{default:"Немає рядків"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>Array.isArray(a.value)?a.value:[]),o=e.ref([]),s=e.computed(()=>{var u;return((u=t.schema)==null?void 0:u.map(g=>({...g,disabled:t.disabled||g.disabled})))??[]}),i=e.computed(()=>s.value.map(u=>f(u))),d=e.computed(()=>t.disabled?!1:t.maxItems?n.value.length<t.maxItems:!0),c=e.computed(()=>t.disabled||n.value.length<=(t.minItems||0));e.watch(()=>n.value.length,()=>{h(),p()},{immediate:!0}),e.watch(()=>t.schema,p,{immediate:!0,deep:!0});function h(){const u=n.value.length;o.value.length<u?o.value=[...o.value,...Array.from({length:u-o.value.length},()=>kl())]:o.value.length>u&&o.value.splice(u)}function p(){if(!t.minItems||n.value.length>=t.minItems)return;const u=t.minItems-n.value.length,g=Array.from({length:u},y);a.value=[...n.value,...g]}function y(){const u={};return s.value.forEach(g=>{u[g.name]=(g==null?void 0:g.default)??null}),u}function w(){d.value&&(a.value=[...n.value,y()],h())}function m(u){c.value||(a.value=n.value.filter((g,M)=>M!==u),h(),p())}function f(u){return{...u}}return(u,g)=>(e.openBlock(),e.createElementBlock("div",aT,[e.createElementVNode("div",rT,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(M,x)=>(e.openBlock(),e.createElementBlock("div",{key:o.value[x],class:"flex items-center gap-3"},[e.createVNode(nt,{schema:i.value,layout:"inline",navigation:!1,values:n.value[x],"onUpdate:values":k=>n.value[x]=k,"form-id":o.value[x]},null,8,["schema","values","onUpdate:values","form-id"]),e.createElementVNode("button",{type:"button",class:"h-[38px] w-[38px] flex items-center justify-center text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",onClick:k=>m(x),disabled:c.value},[e.createVNode(Bt,{class:"w-5 h-5"})],8,lT)]))),128)),n.value.length===0?(e.openBlock(),e.createElementBlock("div",nT,e.toDisplayString(t.emptyLabel),1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:"flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",onClick:w,disabled:!d.value},[e.createVNode(et,{class:"w-5 h-5"}),e.createTextVNode(" "+e.toDisplayString(t.addButtonText),1)],8,oT)]))}}),iT=de(sT,[["__scopeId","data-v-8bcb5436"]]),dT={};function cT(l,t){return e.openBlock(),e.createElementBlock("svg",e.mergeProps({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},l.$attrs),t[0]||(t[0]=[e.createElementVNode("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},null,-1)]),16)}const hT=de(dT,[["render",cT]]),pT={class:"vs-dataform space-y-4"},yT=["draggable","onDragstart","onDragover","onDragenter","onDrop"],uT={class:"flex items-center gap-2"},kT=["onClick"],mT={class:"text-sm font-medium text-gray-700"},fT={class:"flex items-center gap-2"},gT=["title","onClick","disabled"],xT=["title","onClick","disabled"],MT={key:0,class:"rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"},bT=["disabled"],wT=e.defineComponent({__name:"vs-input-dataform",props:e.mergeModels({schema:{default:()=>[]},minGroups:{default:0},maxGroups:{default:void 0},addButtonText:{default:"Додати групу фільтрів"},groupLabel:{default:void 0},duplicateTitle:{default:"Дублювати групу"},removeTitle:{default:"Видалити групу"},emptyLabel:{},view:{default:"default"},collapsible:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref([]),o=e.ref([]),s=e.ref(0),i=e.ref(null),d=e.ref(null),c=e.ref(null),h=e.computed(()=>t.groupLabel??"Group"),p=e.computed(()=>t.emptyLabel??"Ще немає груп"),y=e.computed(()=>{var Y;return((Y=t.schema)==null?void 0:Y.map(ne=>({...ne,disabled:t.disabled||ne.disabled})))??[]}),w=e.computed(()=>y.value.map(Y=>Q(Y))),m=e.computed(()=>t.view==="accordion"),f=e.computed(()=>!!(t.collapsible||m.value)),u=e.computed(()=>t.draggable!==!1),g=e.computed(()=>t.disabled?!1:t.maxGroups?a.value.length<t.maxGroups:!0),M=e.computed(()=>t.disabled||a.value.length<=(t.minGroups||0));e.watch(()=>a.value.length,()=>{x(),k(),v()},{immediate:!0}),e.watch(()=>t.schema,v,{immediate:!0,deep:!0}),e.watch(()=>t.view,()=>{k()},{immediate:!0});function x(){const Y=a.value.length;n.value.length<Y?n.value=[...n.value,...Array.from({length:Y-n.value.length},()=>kl())]:n.value.length>Y&&n.value.splice(Y)}function k(){const Y=a.value.length;m.value?Y===0?s.value=-1:s.value>=Y?s.value=Y-1:s.value<0&&(s.value=0):o.value.length<Y?o.value=[...o.value,...Array.from({length:Y-o.value.length},()=>!1)]:o.value.length>Y&&o.value.splice(Y)}function v(){if(!t.minGroups||a.value.length>=t.minGroups)return;const Y=t.minGroups-a.value.length,ne=Array.from({length:Y},V);a.value=[...a.value,...ne],k()}function V(){const Y={};return y.value.forEach(ne=>{Y[ne.name]=(ne==null?void 0:ne.default)??null}),Y}function C(){g.value&&(a.value=[...a.value,V()],x(),k())}function q(Y){M.value||(a.value=a.value.filter((ne,ue)=>ue!==Y),x(),m.value?s.value>=a.value.length&&(s.value=a.value.length-1):o.value.splice(Y,1),v())}function H(Y){if(t.disabled)return;const ne=JSON.parse(JSON.stringify(a.value[Y]??{}));a.value=[...a.value.slice(0,Y+1),ne,...a.value.slice(Y+1)],x(),m.value?s.value>Y&&(s.value+=1):o.value.splice(Y+1,0,o.value[Y]??!1)}function Q(Y){return{...Y}}function G(Y){return m.value?s.value===-1&&Y===0?!1:s.value!==Y:!!o.value[Y]}function $(Y){if(f.value){if(m.value){s.value=Y;return}o.value[Y]=!o.value[Y]}}function B(Y,ne){var ue,he,fe;if(!u.value||t.disabled){ne.preventDefault();return}i.value=Y,d.value=Y,c.value={groups:JSON.parse(JSON.stringify(a.value)),keys:[...n.value],states:[...o.value]},(ue=ne.dataTransfer)==null||ue.setData("text/plain",String(Y)),(fe=(he=ne.dataTransfer)==null?void 0:he.setDragImage)==null||fe.call(he,ne.currentTarget,0,0)}function P(Y,ne){!u.value||t.disabled||i.value!==null&&se(Y,ne)}function L(Y,ne){se(Y,ne)}function Z(Y){!u.value||t.disabled||$e()}function F(){c.value&&J(),i.value=null,d.value=null,c.value=null}function X(Y,ne){const ue=[...a.value],[he]=ue.splice(Y,1);ue.splice(ne,0,he),a.value=ue;const fe=[...n.value],[T]=fe.splice(Y,1);if(fe.splice(ne,0,T),n.value=fe,m.value)s.value===Y&&(s.value=ne);else{const le=[...o.value],[D]=le.splice(Y,1);le.splice(ne,0,D),o.value=le}}function J(){c.value&&(a.value=c.value.groups,n.value=c.value.keys,o.value=c.value.states,c.value=null,d.value=null)}function se(Y,ne){if(i.value===null)return;const ue=ce(Y,ne);d.value=ue,Ee(ue)}function ce(Y,ne){if(!(ne!=null&&ne.currentTarget))return Y;const ue=ne.currentTarget.getBoundingClientRect(),he=ne.clientY-ue.top>ue.height/2?Y+1:Y;return Math.max(0,Math.min(he,a.value.length))}function Ee(Y){const ne=i.value;if(ne===null)return;let ue=Y;if(ue>a.value.length&&(ue=a.value.length),ue===ne||ue===ne+1)return;const he=ue>ne?ue-1:ue;X(ne,he),i.value=he,d.value=ue>ne?he+1:he}function $e(){c.value=null,i.value=null,d.value=null}return(Y,ne)=>(e.openBlock(),e.createElementBlock("div",pT,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(ue,he)=>(e.openBlock(),e.createElementBlock("div",{key:n.value[he],class:e.normalizeClass(["relative border border-gray-200 rounded-lg bg-white transition vs-dataform__group",[t.view==="accordion"?"overflow-hidden":G(he)?"pt-6 px-6":"p-6"]]),draggable:u.value&&!t.disabled,onDragstart:fe=>B(he,fe),onDragend:F,onDragover:e.withModifiers(fe=>P(he,fe),["prevent"]),onDragenter:e.withModifiers(fe=>L(he,fe),["prevent"]),onDrop:e.withModifiers(fe=>Z(),["prevent"])},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center justify-between gap-2 border-b border-gray-100 px-4 py-3",[t.view!=="accordion"?"-mx-6 -mt-6 px-6":"",t.view!=="accordion"&&!G(he)?"rounded-t-lg":"rounded-lg"]])},[e.createElementVNode("div",uT,[u.value?(e.openBlock(),e.createBlock(wa,{key:0,class:"w-4 h-4 text-gray-400","aria-hidden":"true"})):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"rounded-full p-1 text-gray-500 transition hover:bg-gray-100",onClick:fe=>$(he)},[e.createVNode(p1,{class:e.normalizeClass(["h-4 w-4 transition",G(he)?"-rotate-90":"rotate-0"])},null,8,["class"])],8,kT)):e.createCommentVNode("",!0),e.createElementVNode("div",mT,e.toDisplayString(`${h.value} (${he+1})`),1)]),e.createElementVNode("div",fT,[e.createElementVNode("button",{type:"button",class:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",title:t.duplicateTitle,onClick:fe=>H(he),disabled:t.disabled,draggable:"false"},[e.createVNode(hT,{class:"w-5 h-5"})],8,gT),e.createElementVNode("button",{type:"button",class:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",title:t.removeTitle,onClick:fe=>q(he),disabled:M.value,draggable:"false"},[e.createVNode(Bt,{class:"w-5 h-5"})],8,xT)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(t.view==="accordion"?"p-6":"pt-6")},[e.createVNode(nt,{class:"vs-dataform__form",schema:w.value,layout:"inline",navigation:!1,values:a.value[he],"onUpdate:values":fe=>a.value[he]=fe,"form-id":n.value[he],disabled:t.disabled},null,8,["schema","values","onUpdate:values","form-id","disabled"])],2),[[e.vShow,!G(he)]])],42,yT))),128)),a.value.length===0?(e.openBlock(),e.createElementBlock("div",MT,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",onClick:C,disabled:!g.value},[e.createVNode(et,{class:"w-5 h-5"}),e.createTextVNode(" "+e.toDisplayString(t.addButtonText),1)],8,bT)]))}}),vT=de(wT,[["__scopeId","data-v-3b71fe50"]]),Ba="__vs_form_monaco_loader__",ml=e.defineComponent({__name:"vs-input-monaco",props:e.mergeModels({syntax:{default:"xml"},theme:{default:"vs-light"},height:{default:280},minimap:{type:Boolean,default:!1},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(null),o=e.computed(()=>typeof t.height=="number"?`${t.height}px`:t.height||"280px");let s=null,i=null,d=!1;const c=()=>{var w,m;if(i)return Promise.resolve(i);if(typeof window>"u")return Promise.resolve(null);const p=window;if((m=(w=p.monaco)==null?void 0:w.editor)!=null&&m.create)return i=p.monaco,Promise.resolve(i);if(p[Ba])return p[Ba];const y=(async()=>{const f=M=>{if(Array.from(document.styleSheets||[]).some(k=>{var v;return(v=k==null?void 0:k.href)==null?void 0:v.includes(M)}))return;const x=document.createElement("link");x.rel="stylesheet",x.href=M,document.head.appendChild(x)},u=M=>new Promise((x,k)=>{if(Array.from(document.scripts).some(V=>V.src===M))return x();const v=document.createElement("script");v.src=M,v.async=!0,v.onload=()=>x(),v.onerror=V=>k(V),document.body.appendChild(v)}),g="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.0/min/vs";return f(`${g}/editor/editor.main.min.css`),await u(`${g}/loader.min.js`),new Promise((M,x)=>{window.require.config({paths:{vs:g}}),window.require(["vs/editor/editor.main"],()=>{i=window.monaco,p.monaco=i,M(i)},k=>x(k))})})().catch(f=>{throw delete p[Ba],f});return p[Ba]=y,y},h=()=>{!n.value||!i||(s&&(s.dispose(),s=null),s=i.editor.create(n.value,{value:a.value||"",language:t.syntax,theme:t.theme,automaticLayout:!0,minimap:{enabled:!!t.minimap},readOnly:!!t.disabled}),s.onDidChangeModelContent(()=>{d||(a.value=s.getValue())}))};return e.watch(()=>a.value,p=>{if(!s)return;const y=s.getValue();p!==y&&(d=!0,s.setValue(p||""),d=!1)}),e.watch(()=>t.syntax,p=>{!s||!i||i.editor.setModelLanguage(s.getModel(),p||"xml")}),e.watch(()=>t.theme,p=>{i&&i.editor.setTheme(p||"vs-light")}),e.watch(()=>t.disabled,p=>{s&&s.updateOptions({readOnly:!!p})}),e.watch(()=>t.minimap,p=>{s&&s.updateOptions({minimap:{enabled:!!p}})}),e.onMounted(async()=>{try{const p=await c();if(!p||!p.editor)return;i=p,h()}catch(p){console.error("Failed to load Monaco editor",p)}}),e.onBeforeUnmount(()=>{s&&(s.dispose(),s=null)}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{class:"w-full",style:e.normalizeStyle({height:o.value})},[e.createElementVNode("div",{ref_key:"editorContainer",ref:n,class:"w-full h-full overflow-hidden border border-[#CFD9E0] rounded"},null,512)],4))}}),_a={VsInputText:zt,VsInputRadio:g1,"vs-input-text":zt,"vs-input-password":sA,"vs-input-textarea":al,"vs-input-richtext":rl,"vs-input-mask":k1,"vs-input-number":Zr,"vs-input-radio":g1,"vs-input-select":w1,"vs-input-switcher":y1,"vs-input-static":u1,"vs-input-container":tl,"vs-input-date":rD,"vs-input-checkbox":Wr,"vs-input-file":Xr,"vs-input-file2":M1,file2:M1,File2:M1,"vs-input-html":u1,"vs-input-email":m1,"vs-input-tel":f1,"vs-input-datatable":ll,"vs-input-map":nl,"vs-input-file-list":Qr,"vs-input-tags":ol,"vs-input-slug":sl,"vs-input-codegen":il,"vs-input-key-value":dl,"vs-input-text[]":cl,"vs-input-range":pl,"vs-input-color":hl,"vs-input-native-select":w1,VsInputArraySelect:za,"vs-input-array":yl,"vs-input-array-select":za,"array-select":za,"vs-input-address":ul,"vs-input-datalist":iT,"vs-input-dataform":vT,"vs-input-monaco":ml},VT=e.defineComponent({__name:"behavior",props:{api:{},set:{},button:{},error:{},value:{}},setup(l){const t=l,a=e.inject("values");async function n(){try{if(!t.api)return;const o=t.api.replace("{{value}}",t.value),s=await fetch(o);if(!s.ok){xe({type:"warning",title:"Validation",message:"При спробі завантажити дані виникла помилка."});return}const i=await s.json();if(!t.set||!a)return;for(const[d,c]of Object.entries(t.set))a.value[d]=i.result[c]}catch(o){console.error(t.error,o)}}return(o,s)=>(e.openBlock(),e.createElementBlock("button",{onClick:n,class:"vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"},e.toDisplayString(o.button),1))}}),CT={class:"flex flex-col gap-1 w-full"},zT=["innerHTML"],fl=e.defineComponent({__name:"vs-compact-form-layout",props:e.mergeModels({item:{default:{}},layout:{default:"default"},style:{default:{}},type:{default:""},error:{type:[String,Boolean]},columns:{default:()=>({container:12,label:3})}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["value-selected"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=e.useModel(l,"modelValue"),o=t,s=e.computed(()=>nA[`${a.layout}`]),i=["label","placeholder","info","description","text","html"],d=e.ref(M()),c=e.computed(()=>f(a.item,d.value)),h=e.computed(()=>_a==null?void 0:_a[`vs-input-${a.item.type}`]),p=e.inject("field-props"),y=e.computed(()=>{var C;const k=e.unref(h);if(!k)return new Set;const v=k.props??((C=k.__vccOpts)==null?void 0:C.props);if(!v)return new Set;const V=Array.isArray(v)?v:Object.keys(v);return new Set(V)}),w=e.computed(()=>{var C,q;const k={...c.value??{}},v=(C=a.item)==null?void 0:C.name;v&&((q=p==null?void 0:p.value)!=null&&q[v])&&Object.assign(k,p.value[v]);const V=y.value;return V.size?Object.fromEntries(Object.entries(k).filter(([H])=>V.has(H))):{}}),m=k=>{var V;const v=typeof k=="object"&&k!==null?k:{value:k};o("value-selected",{...v,name:v.name??((V=a.item)==null?void 0:V.name)})};e.onMounted(()=>{d.value=M(),window.addEventListener("storage",x)}),e.onUnmounted(()=>{window.removeEventListener("storage",x)});function f(k,v){if(!k)return{};const V={...k};return i.forEach(C=>{const q=g(k,C,v);q!=null&&(V[C]=q)}),Array.isArray(k.options)&&(V.options=k.options.map(C=>u(C,v))),V}function u(k,v){if(!k)return k;const V={...k},C=g(k,"label",v),q=g(k,"text",v);return C!=null&&(V.label=C),q!=null?V.text=q:C!=null&&(V.text=C),V}function g(k,v,V){const C=`${v}:${V}`;if((k==null?void 0:k[C])!=null)return k[C];if(v==="label"&&(k==null?void 0:k[V])!=null)return k[V];if((k==null?void 0:k[v])!=null)return k[v];if(v==="label"){if((k==null?void 0:k.ua)!=null)return k.ua;if((k==null?void 0:k.en)!=null)return k.en}if(v==="text"||v==="html"){if((k==null?void 0:k.ua)!=null)return k.ua;if((k==null?void 0:k.en)!=null)return k.en}return null}function M(){return typeof window>"u"?"uk":localStorage.getItem("locale")||"uk"}function x(){d.value=M()}return(k,v)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{ua:c.value.ua,error:a.error||"",item:c.value,columns:a.columns,label:c.value.label},{default:e.withCtx(()=>{var V,C;return[e.createElementVNode("div",{class:e.normalizeClass(["flex w-full",`${a.item.type}-component`])},[e.createElementVNode("div",CT,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),e.mergeProps(w.value,{modelValue:n.value,"onUpdate:modelValue":v[0]||(v[0]=q=>n.value=q),onValueSelected:m}),null,16,["modelValue"])),c.value.description&&a.layout!=="settings"?(e.openBlock(),e.createElementBlock("p",{key:0,class:"text-sm text-gray-500",innerHTML:c.value.description},null,8,zT)):e.createCommentVNode("",!0)]),(V=c.value.behavior)!=null&&V.api&&((C=c.value.behavior)!=null&&C.button)?(e.openBlock(),e.createBlock(VT,e.mergeProps({key:0},c.value.behavior,{value:n.value}),null,16,["value"])):e.createCommentVNode("",!0)],2)]}),_:1},8,["ua","error","item","columns","label"]))}}),BT={class:"text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300"},_T={class:"vs-compact-form-navigation__rail mt-[6px]"},ET=["onClick"],qT=e.defineComponent({__name:"vs-compact-form-navigation",props:{target:{},scrollContainer:{},title:{default:"Навігація"},enabled:{type:Boolean,default:!0},width:{default:400}},setup(l,{expose:t}){const a=l,n=e.ref([]),o=e.ref(""),s=e.ref(""),i=e.computed(()=>!!a.enabled),d=e.computed(()=>["vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]","sticky top-0 self-start shrink-0","max-h-full min-h-0 overflow-y-auto"]),c=e.computed(()=>{const $=a.width;if($==null)return{};const B=typeof $=="number"?`${$}px`:`${$}`;return{width:B,minWidth:B}});let h=null,p=0,y=0,w=null,m=null,f=null;const u=()=>Q(),g=()=>x();e.watch(()=>a.target,async $=>{if(C(),!$){w=null,n.value=[],o.value="";return}w=$,i.value&&(await e.nextTick(),V($),x())},{immediate:!0}),e.watch(()=>a.scrollContainer,$=>{if(!i.value){m=$??null;return}M($??null),e.nextTick(()=>x())},{immediate:!0}),e.onMounted(()=>{a.scrollContainer||M(null),x()}),e.onBeforeUnmount(()=>{C(),M(null,!0),w=null,typeof window<"u"&&(p&&window.cancelAnimationFrame(p),y&&window.cancelAnimationFrame(y))});function M($,B=!1){if(f&&(f(),f=null),B){m=null;return}if(m=$??null,typeof window>"u")return;const P=$??window,L=window;P.addEventListener("scroll",u,{passive:!0}),L.addEventListener("resize",g),f=()=>{P.removeEventListener("scroll",u),L.removeEventListener("resize",g)}}function x(){if(!i.value||!w)return;p&&typeof window<"u"&&window.cancelAnimationFrame(p);const $=()=>{k(),p=0};typeof window>"u"?$():p=window.requestAnimationFrame($)}function k(){if(!i.value||!w)return;const $=Array.from(w.querySelectorAll("h1, h2")),B=new Set,P=[];$.forEach((L,Z)=>{var ce;const F=((ce=L.textContent)==null?void 0:ce.trim())??"";if(!F)return;let X=(L.getAttribute("id")??"").trim();X||(X=v(F)||`heading-${Z+1}`);let J=X,se=1;for(;B.has(J);)J=`${X}-${se+=1}`;L.id!==J&&Object.assign(L,{id:J}),B.add(J),P.push({id:J,text:F,level:L.tagName.toLowerCase()==="h1"?1:2})}),n.value=P,P.length||(o.value=""),H()}function v($){return $.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function V($){!$||!i.value||typeof MutationObserver>"u"||(C(),h=new MutationObserver(()=>x()),h.observe($,{childList:!0,subtree:!0}))}function C(){h&&(h.disconnect(),h=null)}function q($){const B=m;if(!B)return typeof window>"u"?$.offsetTop:$.getBoundingClientRect().top+window.scrollY;const P=$.getBoundingClientRect(),L=B.getBoundingClientRect();return P.top-L.top+B.scrollTop}function H(){if(!i.value||!n.value.length)return;const $=m,B=($?$.scrollTop:null)||(typeof window<"u"?window.scrollY:0),P=($?$.clientHeight:null)||(typeof window<"u"?window.innerHeight:0),L=B+P;let Z=null;for(let X=0;X<n.value.length;X+=1){const J=n.value[X],se=document.getElementById(J.id);if(se){const ce=q(se);ce+se.offsetHeight>B&&ce<L&&(Z=J.id)}}!Z&&s.value&&(Z=s.value),Z&&(s.value=Z);const F=$?$.scrollHeight-$.clientHeight:document.documentElement.scrollHeight-window.innerHeight;B+5>=F&&(Z=n.value[n.value.length-1].id),Z&&(o.value=Z)}function Q(){i.value&&(y&&window.cancelAnimationFrame(y),y=window.requestAnimationFrame(()=>{H(),y=0}))}function G($){if(!i.value)return;const B=document.getElementById($);if(!B)return;const P=m,L=Math.max(0,q(B));P?P.scrollTo({top:L,behavior:"smooth"}):typeof window<"u"&&window.scrollTo({top:L,behavior:"smooth"})}return t({refresh:x}),($,B)=>i.value&&n.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value),style:e.normalizeStyle(c.value)},[e.createElementVNode("h2",BT,e.toDisplayString($.title),1),e.createElementVNode("div",_T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,P=>(e.openBlock(),e.createElementBlock("div",{key:P.id,class:e.normalizeClass(["vs-compact-form-navigation__item relative",P.level===2?"vs-compact-form-navigation__item--nested":"",P.id===o.value?"vs-compact-form-navigation__item--active":""])},[e.createElementVNode("button",{type:"button",onClick:L=>G(P.id),class:e.normalizeClass(["vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",P.level===2?"pl-[15px]":"pl-[18px]",P.id===o.value?"text-gray-800":"text-gray-500"])},[e.createElementVNode("span",null,e.toDisplayString(P.text),1)],10,ET)],2))),128))])],6)):e.createCommentVNode("",!0)}}),ST=de(qT,[["__scopeId","data-v-1584a562"]]),Mt={required:"Це поле є обов’язковим",email:"Неправильний email",tel:"Неправильний телефон",minlength:l=>`Мінімальна довжина — ${l} символів`,maxlength:l=>`Максимальна довжина — ${l} символів`},jT=l=>typeof l=="string"?l.trim()?!1:Mt.required:Array.isArray(l)?l.map(t=>typeof t=="string"?t.trim():t).filter(t=>t!=null&&t!=="").length?!1:Mt.required:l?!1:Mt.required,AT=l=>l?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)?!1:Mt.email:!1,DT=l=>l?/^\+[1-9]\d{1,14}$/.test(l)?!1:Mt.tel:!1,gl=l=>l==null?0:typeof l=="string"?l.trim().length:Array.isArray(l)?l.length:typeof l=="number"?l.toString().length:String(l).length,NT=(l,t)=>{if(l==null)return!1;const a=Number((t==null?void 0:t.value)??(t==null?void 0:t.length));return Number.isFinite(a)&&gl(l)<a?(t==null?void 0:t.message)||Mt.minlength(a):!1},LT=(l,t)=>{if(l==null||l==="")return!1;const a=Number((t==null?void 0:t.value)??(t==null?void 0:t.length));return Number.isFinite(a)&&gl(l)>a?(t==null?void 0:t.message)||Mt.maxlength(a):!1},HT=(l,t)=>{const a=t.pattern??t.regexp,n=typeof a=="string"?new RegExp(a):a;if(Array.isArray(l)){const o=l.filter(Boolean);return o.length===0||o.every(s=>n.test(s))?!1:t.message}return!n.test(l)&&l?t.message:!1},$T=(l,t)=>!1,FT=(l,t)=>{switch(typeof t=="string"?t:t.type){case"required":return jT(l);case"email":return AT(l);case"tel":return DT(l);case"regexp":return HT(l,t);case"minlength":return NT(l,t);case"maxlength":return LT(l,t);case"custom":return $T();default:return!1}},TT={autocomplete:"select",combobox:"select",datepicker:"date",markedtext:"mask",html:"static",geom:"map",filelist:"file-list",file:"file",dropzone:"file"};function xl(l){const t=l==null?void 0:l.toLowerCase();return TT[t]||t}function V1(l,t=!1){if(Array.isArray(l)){const n=[];return l.forEach(o=>{const s={...o};s.name=(o.name||o.id||o.key||"").toString(),s.type=xl(o.type),s.label=o.label||o.ua,s.rules=o.rules||o.validators,s.type==="email"&&!s.rules&&(s.rules=["email"]),o.data&&(s.api=`/api/suggest/${o.data}`),s.disabled=s.disabled??t,Array.isArray(s.schema)&&(s.schema=V1(s.schema,s.disabled)),n.push(s)}),n}const a=[];return Object.entries(l).forEach(n=>{var s;const o={name:n[0],...n[1],type:xl(n[1].type),label:n[1].label||n[1].ua,rules:n[1].rules||n[1].validators,disabled:n[1].disabled??t};o.type==="email"&&!o.rules&&(o.rules=["email"]),(s=n[1].type)!=null&&s.includes("list")&&(o.multiple=!0),!o.api&&n[1].data&&(o.api=`/api/suggest/${n[1].data}`),Array.isArray(o.schema)&&(o.schema=V1(o.schema,o.disabled)),a.push(o)}),a}function PT(l,t,a=!1){const n=e.computed(()=>V1(t,typeof a=="boolean"?a:a.value)),o=e.ref({});function s(c){var w;const h=c==null?void 0:c.conditions;if(!h)return!0;const p=Array.isArray(h)?h[0]:h,y=(w=l==null?void 0:l.value)==null?void 0:w[p];return el(y,h)}const i=(c=n.value,h=!0)=>(c.forEach(p=>{const y=[],w=Number(p==null?void 0:p.minlength),m=Number(p==null?void 0:p.maxlength);!Number.isNaN(w)&&Number.isFinite(w)&&y.push({type:"minlength",value:w}),!Number.isNaN(m)&&Number.isFinite(m)&&y.push({type:"maxlength",value:m});const f=[...y,...p.rules||[]];if(f.length){if(!s(p)){delete o.value[p.name];return}let u=!1,g=null;f.forEach(M=>{const x=FT(l.value[p.name],M);x&&(u=!0,!g&&typeof x=="string"&&(g=x))}),u&&g?o.value[p.name]=g:delete o.value[p.name]}p.schema&&i(p.schema,!1)}),h&&Object.values(o.value).some(Boolean)?o.value:null),d=e.computed(()=>{var c;return(c=n.value)==null?void 0:c.filter(h=>h.hidden!==!0&&s(h))});return{errors:o,validate:i,reset:()=>{l.value={},o.value={}},visibleSchema:d}}const IT={class:"flex w-full h-full min-h-0 gap-6"},RT={key:0,"data-orientation":"horizontal",role:"none",class:"mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"},nt=e.defineComponent({__name:"vs-compact-form",props:e.mergeModels({schema:{default:()=>[]},style:{default:()=>({})},modelValue:{},layout:{default:()=>"default"},formId:{default:()=>""},disabled:{type:Boolean,default:!1},navigation:{type:Boolean,default:!1},navWidth:{default:400},columns:{}},{form:{default:()=>({})},formModifiers:{},modelValue:{default:()=>({})},modelModifiers:{},values:{default:void 0},valuesModifiers:{}}),emits:e.mergeModels(["handle-submit","update:modelValue","value-selected"],["update:form","update:modelValue","update:values"]),setup(l,{expose:t,emit:a}){const n=a,o=l,s=e.useModel(l,"form"),i=e.useModel(l,"modelValue"),d=e.useModel(l,"values"),c=e.computed({get:()=>d.value??i.value,set:B=>{i.value=B,d.value=B}}),{errors:h,validate:p,reset:y,visibleSchema:w}=PT(c,o.schema,e.toRef(o,"disabled")),m=e.ref(null),f=e.ref(null),u=e.ref({}),g=e.computed(()=>o.navigation),M=e.computed(()=>o.navWidth),x=e.computed(()=>{var B;return(B=o.style)==null?void 0:B.columns}),k=Object.freeze({container:12,label:3}),v=e.computed(()=>o.columns??x.value??k),V=e.computed(()=>o.columns!=null||x.value!=null),C=e.computed(()=>V.value?"horizontal":o.layout),q=B=>B!=null&&B.columns?"horizontal":C.value,H=B=>(B==null?void 0:B.columns)??v.value,Q=()=>{n("update:modelValue",c.value),p(),n("handle-submit",c.value)},G=B=>{n("value-selected",B)};t({validate:p,reset:y,errors:h}),e.onMounted(()=>{s.value={value:c.value,errors:h.value,reset:y,validate:p,formId:o.formId}});function $(B,P){if(B===P)return!0;if(typeof B!="object"||typeof P!="object"||!B||!P)return!1;const L=Object.keys(B),Z=Object.keys(P);return L.length!==Z.length?!1:L.every(F=>B[F]===P[F])}return e.provide("form",s),e.provide("values",c),e.provide("field-props",u),(B,P)=>(e.openBlock(),e.createElementBlock("div",IT,[e.createElementVNode("div",{class:"flex-1 min-h-0 overflow-y-auto overflow-x-visible",ref_key:"formScrollContainer",ref:f},[e.createElementVNode("form",{ref_key:"formRef",ref:m,onSubmit:e.withModifiers(Q,["prevent"]),class:e.normalizeClass(["grid grid-cols-12 p-1",C.value==="default"?"gap-6":"gap-4"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(L,Z)=>(e.openBlock(),e.createElementBlock("div",{key:L.name,class:e.normalizeClass(q(L)==="horizontal"?"col-span-12":`col-span-${L.col||12}`)},[e.createVNode(fl,{style:e.normalizeStyle(B.style),item:L,layout:q(L),columns:H(L),"model-value":c.value[L.name],"onUpdate:modelValue":F=>{const X=c.value[L.name];$(X,F)||(c.value[L.name]=F)},error:e.unref(h)[L.name],onValueSelected:G},null,8,["style","item","layout","columns","model-value","onUpdate:modelValue","error"]),q(L)==="settings"&&Z+1!==e.unref(w).length?(e.openBlock(),e.createElementBlock("div",RT)):e.createCommentVNode("",!0)],2))),128))],34)],512),e.createVNode(ST,{target:m.value,"scroll-container":f.value,enabled:g.value,width:M.value},null,8,["target","scroll-container","enabled","width"])]))}}),OT={class:"relative"},UT={class:"w-full h-full fixed top-0 start-0 bg-black bg-opacity-50"},ZT={class:"m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12"},WT={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},GT={class:"font-medium text-gray-800 dark:text-[#ffffff]"},KT={class:"p-4 mim-h-0 h-full overflow-auto"},Ml=e.defineComponent({__name:"modal-edit",props:{schema:{},defaultValue:{},mode:{},token:{},form:{},api:{},method:{}},emits:["close","save","edit"],setup(l,{emit:t}){const a=l,n=t,o=e.ref(a.schema),s=e.ref(a.defaultValue?JSON.parse(JSON.stringify(a.defaultValue)):{}),i=e.ref({}),d=e.ref(a.token||""),c=e.ref(a.mode),h=()=>{var u;const f=(u=a.method)==null?void 0:u.trim().toUpperCase();return f==="GET"||f==="POST"||f==="PUT"?f:c.value==="add"?"POST":"PUT"},p=()=>{xe({type:"success",title:"Успішно",message:`Дані успішно ${c.value==="add"?"збережено":"оновлено"}`})},y=async f=>{if(console.log(f),f.ok){await f.json().catch(()=>({})),p(),n("save",s.value);return}if(f.status===400){const u=await f.json().catch(()=>({}));xe({type:"warning",title:"Помилка валідації",message:u.message||"Некоректні дані (400)"});return}if(f.status===500){xe({type:"error",title:"Серверна помилка",message:"Виникла помилка на сервері (500)"});return}xe({type:"error",title:"Помилка",message:`Статус: ${f.status}`})};async function w(){var g;const f=i.value.validate();if(f){xe({type:"warning",title:"Помилка валідації",message:Object.entries(f).map(([M,x])=>`${M}: ${x}`).join(`
8313
- `)});return}const u=(g=a.api)==null?void 0:g.trim();if(u){const M=h();try{const x=await fetch(u,{method:M,headers:M==="GET"?void 0:{"Content-Type":"application/json"},body:M==="GET"?void 0:JSON.stringify(s.value)});await y(x)}catch(x){xe({type:"error",title:"Помилка з’єднання",message:x.message||"Не вдалося виконати запит"})}return}if(d.value)try{const M=await fetch(`/api/table/${d.value}`,{method:c.value==="add"?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s.value)});await y(M)}catch(M){xe({type:"error",title:"Помилка з’єднання",message:M.message||"Не вдалося виконати запит"})}else n("edit",s.value),m()}function m(){n("close")}return e.onMounted(async()=>{try{if(a.form&&!a.schema){const f=await fetch(`/api/template/form/${a.form}`);if(!f.ok){xe({type:f.status>=400&&f.status<500?"warning":"error",title:"Error",message:`Error code: ${f.status}`});return}const u=await f.json();o.value=u.schema,u.token&&(d.value=u.token)}else if(a.token&&!a.defaultValue){d.value=a.token;const f=await fetch(`/api/form/${d.value}`);if(!f.ok){xe({type:f.status>=400&&f.status<500?"warning":"error",title:"Error",message:`Error code: ${f.status}`});return}const u=await f.json();o.value=u.schema,u.data?s.value=u.data:c.value="add",u.obj&&(s.value={...s.value,...u.obj})}}catch(f){xe({type:"error",title:"Error",message:f.message||"Unexpected error"}),console.error(f)}}),(f,u)=>(e.openBlock(),e.createElementBlock("div",OT,[e.createElementVNode("div",UT,[e.createElementVNode("div",ZT,[e.createElementVNode("div",WT,[e.createElementVNode("h3",GT,e.toDisplayString(c.value==="add"?"Додати":"Змінити"),1),e.createElementVNode("button",{onClick:m,type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"},u[2]||(u[2]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))]),e.createElementVNode("div",KT,[o.value?(e.openBlock(),e.createBlock(nt,{key:0,schema:o.value,values:s.value,"onUpdate:values":u[0]||(u[0]=g=>s.value=g),form:i.value,"onUpdate:form":u[1]||(u[1]=g=>i.value=g),formId:d.value},null,8,["schema","values","form","formId"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},[e.createElementVNode("button",{type:"button",onClick:m,class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:w,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])])])]))}}),JT=1440*60*1e3,YT=["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"],XT=["січ","лют","бер","квіт","трав","черв","лип","серп","вер","жовт","лист","груд"],QT=["нд","пн","вт","ср","чт","пт","сб"];function Ae(l){return l instanceof Date&&!Number.isNaN(l.getTime())}const _t=l=>new Date(l.getTime());function bt(l){const t=_t(l);return t.setHours(0,0,0,0),t}function Wt(l){const t=_t(l);return t.setHours(23,59,59,999),t}function C1(l){return bt(new Date(l.getFullYear(),l.getMonth(),1))}function z1(l){return Wt(new Date(l.getFullYear(),l.getMonth()+1,0))}function B1(l,t){const a=new Date(l),n=a.getDate();a.setDate(1),a.setMonth(a.getMonth()+t);const o=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return a.setDate(Math.min(n,o)),a}function eP(l,t){return B1(l,-1)}function Ea(l,t){const a=new Date(l);return a.setFullYear(a.getFullYear()+t),a}function bl(l,t){return Ea(l,-t)}function wl(l){return bt(new Date(l.getFullYear(),0,1))}function vl(l){return Wt(new Date(l.getFullYear(),11,31))}function tP(l){const t=Math.floor(l.getFullYear()/10)*10;return bt(new Date(t,0,1))}function aP(l){const t=Math.floor(l.getFullYear()/10)*10+9;return Wt(new Date(t,11,31))}const Ye=l=>l.getFullYear(),qa=l=>Math.floor(l.getFullYear()/10)*10;function rP(l){const t=[];let a=bt(l.start);const n=bt(l.end);for(;a<=n;)t.push(_t(a)),a=new Date(a.getTime()+JT);return t}function lP(l){const t=[];let a=C1(l.start);const n=z1(l.end);for(;a<=n;)t.push(_t(a)),a=B1(a,1);return t}function nP(l){const t=[];let a=wl(l.start);const n=vl(l.end);for(;a<=n;)t.push(_t(a)),a=Ea(a,1);return t}function _1(l,t=1){const a=bt(l),n=(a.getDay()-t+7)%7;return a.setDate(a.getDate()-n),a}function oP(l,t=1){const a=_1(l,t);return a.setDate(a.getDate()+6),Wt(a)}function sP(l,t,a=0){const n=_1(l,a),o=(t-a+7)%7;return n.setDate(n.getDate()+o),n}const Sa=(l,t)=>!!l&&!!t&&l.getFullYear()===t.getFullYear()&&l.getMonth()===t.getMonth()&&l.getDate()===t.getDate(),E1=(l,t)=>!!l&&!!t&&l.getFullYear()===t.getFullYear()&&l.getMonth()===t.getMonth(),Vl=(l,t)=>!!l&&!!t&&l.getFullYear()===t.getFullYear(),Cl=(l,t)=>!!l&&!!t&&Sa(l,t)&&l.getHours()===t.getHours(),iP=(l,t)=>!!l&&!!t&&Cl(l,t)&&l.getMinutes()===t.getMinutes();function dP(l,t){const a=l.getTime();return a>=t.start.getTime()&&a<=t.end.getTime()}const Gt=(l,t)=>!!l&&!!t&&l.getTime()<t.getTime(),Kt=(l,t)=>!!l&&!!t&&l.getTime()>t.getTime();function cP(l){const t=l.filter(a=>Ae(a));if(t.length)return t.reduce((a,n)=>a.getTime()>=n.getTime()?a:n)}function hP(l){const t=l.filter(a=>Ae(a));if(t.length)return t.reduce((a,n)=>a.getTime()<=n.getTime()?a:n)}function zl(l,t){const a=_t(l);return typeof t.year=="number"&&a.setFullYear(t.year),typeof t.month=="number"&&a.setMonth(t.month),typeof t.date=="number"&&a.setDate(t.date),typeof t.hours=="number"&&a.setHours(t.hours),typeof t.minutes=="number"&&a.setMinutes(t.minutes),typeof t.seconds=="number"&&a.setSeconds(t.seconds),typeof t.milliseconds=="number"&&a.setMilliseconds(t.milliseconds),a}const ja=(l,t=2)=>String(l).padStart(t,"0");function Bl(l,t){return t==="wide"?YT[l]:XT[l]}function pP(l){return QT[l]}const yP=[{token:"LLLL",format:l=>Bl(l.getMonth(),"wide")},{token:"LLL",format:l=>Bl(l.getMonth(),"abbreviated")},{token:"EE",format:l=>pP(l.getDay())},{token:"yyyy",format:l=>String(l.getFullYear())},{token:"MM",format:l=>ja(l.getMonth()+1)},{token:"dd",format:l=>ja(l.getDate())},{token:"HH",format:l=>ja(l.getHours())},{token:"mm",format:l=>ja(l.getMinutes())}];function Aa(l,t){if(!Ae(l))return"";let a="",n=0;for(;n<t.length;){const o=yP.find(s=>t.startsWith(s.token,n));o?(a+=o.format(l),n+=o.token.length):(a+=t[n],n+=1)}return a}const uP={"yyyy-MM-dd":/^(\d{4})-(\d{2})-(\d{2})$/,"dd.MM.yyyy":/^(\d{2})\.(\d{2})\.(\d{4})$/,"dd.MM.yyyy HH:mm":/^(\d{2})\.(\d{2})\.(\d{4}) (\d{2}):(\d{2})$/,"HH:mm":/^(\d{2}):(\d{2})$/,"MM.yyyy":/^(\d{2})\.(\d{4})$/,yyyy:/^(\d{4})$/};function _l(l,t){const a=uP[t];if(!a){const o=new Date(l);return Ae(o)?o:null}const n=l.match(a);if(!n)return null;switch(t){case"yyyy-MM-dd":{const[,o,s,i]=n,d=new Date(Number(o),Number(s)-1,Number(i));return Ae(d)?d:null}case"dd.MM.yyyy":{const[,o,s,i]=n,d=new Date(Number(i),Number(s)-1,Number(o));return Ae(d)?d:null}case"dd.MM.yyyy HH:mm":{const[,o,s,i,d,c]=n,h=new Date(Number(i),Number(s)-1,Number(o),Number(d),Number(c));return Ae(h)?h:null}case"HH:mm":{const[,o,s]=n,i=new Date;return i.setHours(Number(o),Number(s),0,0),i}case"MM.yyyy":{const[,o,s]=n;return new Date(Number(s),Number(o)-1,1)}case"yyyy":{const[,o]=n;return new Date(Number(o),0,1)}default:return null}}const kP=["year","month","day","time","custom"],mP=e.defineComponent({emits:{elementClick:l=>Ae(l),left:()=>!0,right:()=>!0,heading:()=>!0},props:{headingClickable:{type:Boolean,default:!1},leftDisabled:{type:Boolean,default:!1},rightDisabled:{type:Boolean,default:!1},columnCount:{type:Number,default:7},items:{type:Array,default:()=>[]},viewMode:{type:String,required:!0,validate:l=>typeof l=="string"&&kP.includes(l)}}}),fP={class:"v3dp__heading"},gP=["disabled"],xP=["disabled"],MP={class:"v3dp__body"},bP={class:"v3dp__subheading"},wP={class:"v3dp__elements"},vP=["disabled","onClick"];function VP(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["v3dp__popout",`v3dp__popout-${l.viewMode}`]),style:e.normalizeStyle({"--popout-column-definition":`repeat(${l.columnCount}, 1fr)`}),onMousedown:t[3]||(t[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",fP,[e.createElementVNode("button",{class:"v3dp__heading__button v3dp__heading__button__left",disabled:l.leftDisabled,onClick:t[0]||(t[0]=e.withModifiers(i=>l.$emit("left"),["stop","prevent"]))},[e.renderSlot(l.$slots,"arrow-left",{},()=>[t[4]||(t[4]=e.createElementVNode("svg",{class:"v3dp__heading__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 8"},[e.createElementVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{stroke:"none",d:"M-9 16V-8h24v24z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 0L1 4l4 4"})])],-1))],!0)],8,gP),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.headingClickable?"button":"span"),{class:"v3dp__heading__center",onClick:t[1]||(t[1]=e.withModifiers(i=>l.$emit("heading"),["stop","prevent"]))},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"heading",{},void 0,!0)]),_:3})),e.createElementVNode("button",{class:"v3dp__heading__button v3dp__heading__button__right",disabled:l.rightDisabled,onClick:t[2]||(t[2]=e.withModifiers(i=>l.$emit("right"),["stop","prevent"]))},[e.renderSlot(l.$slots,"arrow-right",{},()=>[t[5]||(t[5]=e.createElementVNode("svg",{class:"v3dp__heading__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 8"},[e.createElementVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{stroke:"none",d:"M15-8v24H-9V-8z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M1 8l4-4-4-4"})])],-1))],!0)],8,xP)]),e.createElementVNode("div",MP,["subheading"in l.$slots?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",bP,[e.renderSlot(l.$slots,"subheading",{},void 0,!0)]),t[6]||(t[6]=e.createElementVNode("hr",{class:"v3dp__divider"},null,-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("div",wP,[e.renderSlot(l.$slots,"body",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,i=>(e.openBlock(),e.createElementBlock("button",{key:i.key,disabled:i.disabled,class:e.normalizeClass([{selected:i.selected,current:i.current},`v3dp__element__button__${l.viewMode}`]),onClick:e.withModifiers(d=>l.$emit("elementClick",i.value),["stop","prevent"])},[e.createElementVNode("span",null,e.toDisplayString(i.display),1)],10,vP))),128))],!0)])])],38)}const Da=de(mP,[["render",VP],["__scopeId","data-v-bc92af04"]]),CP=e.defineComponent({components:{PickerPopup:Da},emits:{"update:pageDate":l=>Ae(l),select:l=>Ae(l)},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},lowerLimit:{type:Date,required:!1},upperLimit:{type:Date,required:!1}},setup(l,{emit:t}){const a=e.computed(()=>tP(l.pageDate)),n=e.computed(()=>aP(l.pageDate)),o=(h,p,y)=>!p&&!y?!0:!(p&&Ye(h)<Ye(p)||y&&Ye(h)>Ye(y)),s=e.computed(()=>nP({start:a.value,end:n.value}).map(h=>({value:h,key:String(Ye(h)),display:Ye(h),selected:!!l.selected&&Ye(h)===Ye(l.selected),disabled:!o(h,l.lowerLimit,l.upperLimit)}))),i=e.computed(()=>{const h=Ye(a.value),p=Ye(n.value);return`${h} - ${p}`}),d=e.computed(()=>l.lowerLimit&&(qa(l.lowerLimit)===qa(l.pageDate)||Gt(l.pageDate,l.lowerLimit))),c=e.computed(()=>l.upperLimit&&(qa(l.upperLimit)===qa(l.pageDate)||Kt(l.pageDate,l.upperLimit)));return{years:s,heading:i,leftDisabled:d,rightDisabled:c,previousPage:()=>t("update:pageDate",bl(l.pageDate,10)),nextPage:()=>t("update:pageDate",Ea(l.pageDate,10))}}});function zP(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{columnCount:3,leftDisabled:l.leftDisabled,rightDisabled:l.rightDisabled,items:l.years,viewMode:"year",onLeft:l.previousPage,onRight:l.nextPage,onElementClick:t[0]||(t[0]=d=>l.$emit("select",d))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.heading),1)]),_:1},8,["leftDisabled","rightDisabled","items","onLeft","onRight"])}const BP=de(CP,[["render",zP]]),_P=e.defineComponent({components:{PickerPopup:Da},emits:{"update:pageDate":l=>Ae(l),select:l=>Ae(l),back:()=>!0},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},format:{type:String,required:!1,default:"LLL"},lowerLimit:{type:Date,required:!1},upperLimit:{type:Date,required:!1}},setup(l,{emit:t}){const a=e.computed(()=>wl(l.pageDate)),n=e.computed(()=>vl(l.pageDate)),o=e.computed(()=>p=>Aa(p,l.format)),s=(p,y,w)=>!y&&!w?!0:!(y&&Gt(p,C1(y))||w&&Kt(p,z1(w))),i=e.computed(()=>lP({start:a.value,end:n.value}).map(p=>({value:p,display:o.value(p),key:o.value(p),selected:!!l.selected&&E1(l.selected,p),disabled:!s(p,l.lowerLimit,l.upperLimit)}))),d=e.computed(()=>Ye(a.value)),c=e.computed(()=>l.lowerLimit&&(Vl(l.lowerLimit,l.pageDate)||Gt(l.pageDate,l.lowerLimit))),h=e.computed(()=>l.upperLimit&&(Vl(l.upperLimit,l.pageDate)||Kt(l.pageDate,l.upperLimit)));return{months:i,heading:d,leftDisabled:c,rightDisabled:h,previousPage:()=>t("update:pageDate",bl(l.pageDate,1)),nextPage:()=>t("update:pageDate",Ea(l.pageDate,1))}}});function EP(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{headingClickable:"",columnCount:3,items:l.months,leftDisabled:l.leftDisabled,rightDisabled:l.rightDisabled,viewMode:"month",onLeft:l.previousPage,onRight:l.nextPage,onHeading:t[0]||(t[0]=d=>l.$emit("back")),onElementClick:t[1]||(t[1]=d=>l.$emit("select",d))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.heading),1)]),_:1},8,["items","leftDisabled","rightDisabled","onLeft","onRight"])}const qP=de(_P,[["render",EP]]),SP=e.defineComponent({components:{PickerPopup:Da},emits:{"update:pageDate":l=>Ae(l),select:l=>Ae(l),back:()=>!0},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},format:{type:String,required:!1,default:"dd"},headingFormat:{type:String,required:!1,default:"LLLL yyyy"},weekdayFormat:{type:String,required:!1,default:"EE"},weekStartsOn:{type:Number,required:!1,default:1,validator:l=>typeof l=="number"&&Number.isInteger(l)&&l>=0&&l<=6},customWeekdays:{type:Array,required:!1},lowerLimit:{type:Date,required:!1},upperLimit:{type:Date,required:!1},disabledDates:{type:Object,required:!1},allowOutsideInterval:{type:Boolean,required:!1,default:!1}},setup(l,{emit:t}){const a=e.computed(()=>f=>u=>Aa(u,f)),n=e.computed(()=>C1(l.pageDate)),o=e.computed(()=>z1(l.pageDate)),s=e.computed(()=>({start:n.value,end:o.value})),i=e.computed(()=>({start:_1(n.value,l.weekStartsOn),end:oP(o.value,l.weekStartsOn)})),d=e.computed(()=>{var f;return((f=l.customWeekdays)==null?void 0:f.length)===7?l.customWeekdays:null}),c=e.computed(()=>{const f=l.weekStartsOn,u=d.value;if(u)return Array.from({length:7}).map((M,x)=>u[(f+x)%7]);const g=a.value(l.weekdayFormat);return Array.from(Array(7)).map((M,x)=>(f+x)%7).map(M=>sP(new Date,M,l.weekStartsOn)).map(g)}),h=(f,u,g,M)=>{var x,k;return(x=M==null?void 0:M.dates)!=null&&x.some(v=>Sa(f,v))||(k=M==null?void 0:M.predicate)!=null&&k.call(M,f)?!1:!u&&!g?!0:!(u&&Gt(f,bt(u))||g&&Kt(f,Wt(g)))},p=e.computed(()=>{const f=new Date,u=a.value(l.format);return rP(i.value).map(g=>({value:g,display:u(g),selected:!!l.selected&&Sa(l.selected,g),current:Sa(f,g),disabled:!l.allowOutsideInterval&&!dP(g,s.value)||!h(g,l.lowerLimit,l.upperLimit,l.disabledDates),key:a.value("yyyy-MM-dd")(g)}))}),y=e.computed(()=>a.value(l.headingFormat)(l.pageDate)),w=e.computed(()=>l.lowerLimit&&(E1(l.lowerLimit,l.pageDate)||Gt(l.pageDate,l.lowerLimit))),m=e.computed(()=>l.upperLimit&&(E1(l.upperLimit,l.pageDate)||Kt(l.pageDate,l.upperLimit)));return{weekDays:c,days:p,heading:y,leftDisabled:w,rightDisabled:m,previousPage:()=>t("update:pageDate",eP(l.pageDate)),nextPage:()=>t("update:pageDate",B1(l.pageDate,1))}}});function jP(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{headingClickable:"",leftDisabled:l.leftDisabled,rightDisabled:l.rightDisabled,items:l.days,viewMode:"day",onLeft:l.previousPage,onRight:l.nextPage,onHeading:t[0]||(t[0]=d=>l.$emit("back")),onElementClick:t[1]||(t[1]=d=>l.$emit("select",d))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.heading),1)]),subheading:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.weekDays,(d,c)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:e.normalizeClass(`v3dp__subheading__weekday__${c}`)},e.toDisplayString(d),3))),128))]),_:1},8,["leftDisabled","rightDisabled","items","onLeft","onRight"])}const AP=de(SP,[["render",jP]]);function El(l,t){const a=l.getBoundingClientRect(),n={height:l.clientHeight,width:l.clientWidth},o=t.getBoundingClientRect();if(!(o.top>=a.top&&o.bottom<=a.top+n.height)){const s=o.top-a.top,i=o.bottom-a.bottom;Math.abs(s)<Math.abs(i)?l.scrollTop+=s:l.scrollTop+=i}}const DP=e.defineComponent({components:{PickerPopup:Da},emits:{select:l=>Ae(l),back:()=>!0},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},visible:{type:Boolean,required:!0},disabledTime:{type:Object,required:!1}},setup(l,{emit:t}){const a=e.ref(null),n=e.ref(null),o=e.computed(()=>l.pageDate??l.selected),s=e.ref(o.value.getHours()),i=e.ref(o.value.getMinutes());e.watch(()=>l.selected,y=>{let w=0,m=0;y&&(w=y.getHours(),m=y.getMinutes()),s.value=w,i.value=m});const d=e.computed(()=>[...Array(24).keys()].map(y=>({value:y,date:zl(new Date(o.value.getTime()),{hours:y,minutes:i.value,seconds:0}),selected:s.value===y,ref:e.ref(null)}))),c=e.computed(()=>[...Array(60).keys()].map(y=>({value:y,date:zl(new Date(o.value.getTime()),{hours:s.value,minutes:y,seconds:0}),selected:i.value===y,ref:e.ref(null)}))),h=y=>{i.value=y.value,t("select",y.date)},p=()=>{const y=d.value.find(m=>{var f,u;return((u=(f=m.ref.value)==null?void 0:f.classList)==null?void 0:u.contains("selected"))??!1}),w=c.value.find(m=>{var f,u;return((u=(f=m.ref.value)==null?void 0:f.classList)==null?void 0:u.contains("selected"))??!1});y&&w&&(El(a.value,y.ref.value),El(n.value,w.ref.value))};return e.watch(()=>l.visible,y=>{y&&e.nextTick(p)}),{hoursListRef:a,minutesListRef:n,hours:s,minutes:i,hoursList:d,minutesList:c,padStartZero:y=>`0${y}`.substr(-2),selectMinutes:h,isEnabled:y=>{var w,m,f,u;return!((m=(w=l.disabledTime)==null?void 0:w.dates)!=null&&m.some(g=>Cl(y,g)&&iP(y,g))||(u=(f=l.disabledTime)==null?void 0:f.predicate)!=null&&u.call(f,y))},scroll:p}}}),NP={ref:"hoursListRef",class:"v3dp__column"},LP=["disabled","onClick"],HP={ref:"minutesListRef",class:"v3dp__column"},$P=["disabled","onClick"];function FP(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{headingClickable:"",columnCount:2,leftDisabled:!0,rightDisabled:!0,viewMode:"time",onHeading:t[0]||(t[0]=d=>l.$emit("back"))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.padStartZero(l.hours))+":"+e.toDisplayString(l.padStartZero(l.minutes)),1)]),body:e.withCtx(()=>[e.createElementVNode("div",NP,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.hoursList,d=>(e.openBlock(),e.createElementBlock("button",{key:d.value,ref_for:!0,ref:d.ref,class:e.normalizeClass([{selected:d.selected},"v3dp__element_button__hour"]),disabled:!l.isEnabled(d.date),onClick:e.withModifiers(c=>l.hours=d.value,["stop","prevent"])},[e.createElementVNode("span",null,e.toDisplayString(l.padStartZero(d.value)),1)],10,LP))),128))],512),e.createElementVNode("div",HP,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.minutesList,d=>(e.openBlock(),e.createElementBlock("button",{key:d.value,ref_for:!0,ref:d.ref,class:e.normalizeClass([{selected:d.selected},"v3dp__element_button__minute"]),disabled:!l.isEnabled(d.date),onClick:e.withModifiers(c=>l.selectMinutes(d),["stop","prevent"])},[e.createElementVNode("span",null,e.toDisplayString(l.padStartZero(d.value)),1)],10,$P))),128))],512)]),_:1})}const TP=de(DP,[["render",FP],["__scopeId","data-v-610b89e1"]]),Na=["time","day","month","year"],PP=(l,t,a=void 0)=>{let n=a||new Date;const o=cP([l,n]);o&&(n=o);const s=hP([t,n]);return s&&(n=s),n},IP=e.defineComponent({components:{YearPicker:BP,MonthPicker:qP,DayPicker:AP,TimePicker:TP},inheritAttrs:!1,props:{placeholder:{type:String,default:""},modelValue:{type:Date,required:!1},disabledDates:{type:Object,required:!1},allowOutsideInterval:{type:Boolean,required:!1,default:!1},disabledTime:{type:Object,required:!1},upperLimit:{type:Date,required:!1},lowerLimit:{type:Date,required:!1},startingView:{type:String,required:!1,default:"day",validate:l=>typeof l=="string"&&Na.includes(l)},startingViewDate:{type:Date,required:!1,default:()=>new Date},dayPickerHeadingFormat:{type:String,required:!1,default:"LLLL yyyy"},monthListFormat:{type:String,required:!1,default:"LLL"},weekdayFormat:{type:String,required:!1,default:"EE"},dayFormat:{type:String,required:!1,default:"dd"},inputFormat:{type:String,required:!1,default:"yyyy-MM-dd"},weekDayNames:{type:Array,required:!1},weekStartsOn:{type:Number,required:!1,default:1,validator:l=>[0,1,2,3,4,5,6].includes(l)},disabled:{type:Boolean,required:!1,default:!1},clearable:{type:Boolean,required:!1,default:!1},typeable:{type:Boolean,required:!1,default:!1},minimumView:{type:String,required:!1,default:"day",validate:l=>typeof l=="string"&&Na.includes(l)}},emits:{"update:modelValue":l=>l==null||Ae(l),decadePageChanged:l=>!0,yearPageChanged:l=>!0,monthPageChanged:l=>!0,opened:()=>!0,closed:()=>!0},setup(l,{emit:t,attrs:a}){const n=e.ref("none"),o=e.ref(l.startingViewDate),s=e.ref(null),i=e.ref(!1),d=e.ref(""),c=L=>{const Z=L.replace(/[a-zA-Z]/g,"0");return/0/.test(Z)?Z:""},h=e.computed(()=>c(l.inputFormat));let p=null,y=null;const w=()=>{p==null||p.destroy(),p=null},m=async()=>{if(!y){const{default:L}=await Promise.resolve().then(()=>D1);y=L}return y},f=()=>{p&&p.value!==d.value&&(p.value=d.value??"")},u=async()=>{w(),!(!s.value||!h.value)&&(p=(await m())(s.value,{mask:h.value,lazy:!0,overwrite:!0}),f())};e.watchEffect(()=>{if(!d.value)return;const L=_l(d.value,l.inputFormat);L&&(o.value=L)}),e.watchEffect(()=>{d.value=l.modelValue&&Ae(l.modelValue)?Aa(l.modelValue,l.inputFormat):""}),e.onMounted(()=>{h.value&&e.nextTick(()=>{u()})}),e.onBeforeUnmount(()=>{w()}),e.watch(h,L=>{L?e.nextTick(()=>{u()}):w()}),e.watch(d,()=>{f()});const g=(L="none")=>{l.disabled||(L!=="none"&&n.value==="none"&&(o.value=l.modelValue||PP(l.lowerLimit,l.upperLimit,o.value)),n.value=L,t(L!=="none"?"opened":"closed"))};e.watchEffect(()=>{l.disabled&&(n.value="none")});const M=(L,Z)=>{o.value=Z,L==="year"?t("decadePageChanged",Z):L==="month"?t("yearPageChanged",Z):L==="day"&&t("monthPageChanged",Z)},x=L=>{o.value=L,l.minimumView==="year"?(g("none"),t("update:modelValue",L)):n.value="month"},k=L=>{o.value=L,l.minimumView==="month"?(g("none"),t("update:modelValue",L)):n.value="day"},v=L=>{o.value=L,l.minimumView==="day"?(g("none"),t("update:modelValue",L)):n.value="time"},V=L=>{g("none"),t("update:modelValue",L)},C=()=>{l.clearable&&(g("none"),t("update:modelValue",null),o.value=l.startingViewDate)},q=()=>i.value=!0,H=()=>g($.value),Q=()=>{i.value=!1,g()},G=L=>{const Z=L.keyCode?L.keyCode:L.which;if([27,13].includes(Z)&&s.value.blur(),l.typeable){const F=_l(s.value.value,l.inputFormat);F&&d.value===Aa(F,l.inputFormat)&&(d.value=s.value.value,t("update:modelValue",F))}},$=e.computed(()=>{const L=Na.indexOf(l.startingView),Z=Na.indexOf(l.minimumView);return L<Z?l.minimumView:l.startingView}),B=L=>Object.fromEntries(Object.entries(L??{}).filter(([Z,F])=>Z.startsWith("--"))),P=e.computed(()=>{var L;return((L=l.weekDayNames)==null?void 0:L.length)===7?l.weekDayNames:void 0});return{blur:Q,focus:H,click:q,input:d,inputRef:s,pageDate:o,renderView:g,updatePageDate:M,selectYear:x,selectMonth:k,selectDay:v,selectTime:V,keyUp:G,normalizedWeekdayNames:P,viewShown:n,goBackFromTimepicker:()=>l.startingView==="time"&&l.minimumView==="time"?null:n.value="day",clearModelValue:C,initialView:$,log:L=>console.log(L),variables:B}}}),RP={class:"v3dp__input_wrapper"},OP=["readonly","placeholder","disabled","tabindex"],UP={class:"v3dp__clearable"};function ZP(l,t,a,n,o,s){const i=e.resolveComponent("year-picker"),d=e.resolveComponent("month-picker"),c=e.resolveComponent("day-picker"),h=e.resolveComponent("time-picker");return e.openBlock(),e.createElementBlock("div",{class:"v3dp__datepicker",style:e.normalizeStyle(l.variables(l.$attrs.style))},[e.createElementVNode("div",RP,[e.withDirectives(e.createElementVNode("input",e.mergeProps({type:"text",ref:"inputRef",readonly:!l.typeable,"onUpdate:modelValue":t[0]||(t[0]=p=>l.input=p)},l.$attrs,{placeholder:l.placeholder,disabled:l.disabled,tabindex:l.disabled?-1:0,onKeyup:t[1]||(t[1]=(...p)=>l.keyUp&&l.keyUp(...p)),onBlur:t[2]||(t[2]=(...p)=>l.blur&&l.blur(...p)),onFocus:t[3]||(t[3]=(...p)=>l.focus&&l.focus(...p)),onClick:t[4]||(t[4]=(...p)=>l.click&&l.click(...p))}),null,16,OP),[[e.vModelText,l.input]]),e.withDirectives(e.createElementVNode("div",UP,[e.renderSlot(l.$slots,"clear",{onClear:l.clearModelValue},()=>[e.createElementVNode("i",{onClick:t[5]||(t[5]=p=>l.clearModelValue())},"x")])],512),[[e.vShow,l.clearable&&l.modelValue]])]),e.withDirectives(e.createVNode(i,{pageDate:l.pageDate,"onUpdate:pageDate":t[6]||(t[6]=p=>l.updatePageDate("year",p)),selected:l.modelValue,lowerLimit:l.lowerLimit,upperLimit:l.upperLimit,onSelect:l.selectYear},null,8,["pageDate","selected","lowerLimit","upperLimit","onSelect"]),[[e.vShow,l.viewShown==="year"]]),e.withDirectives(e.createVNode(d,{pageDate:l.pageDate,"onUpdate:pageDate":t[7]||(t[7]=p=>l.updatePageDate("month",p)),selected:l.modelValue,onSelect:l.selectMonth,lowerLimit:l.lowerLimit,upperLimit:l.upperLimit,format:l.monthListFormat,onBack:t[8]||(t[8]=p=>l.viewShown="year")},null,8,["pageDate","selected","onSelect","lowerLimit","upperLimit","format"]),[[e.vShow,l.viewShown==="month"]]),e.withDirectives(e.createVNode(c,{pageDate:l.pageDate,"onUpdate:pageDate":t[9]||(t[9]=p=>l.updatePageDate("day",p)),selected:l.modelValue,weekStartsOn:l.weekStartsOn,lowerLimit:l.lowerLimit,upperLimit:l.upperLimit,headingFormat:l.dayPickerHeadingFormat,disabledDates:l.disabledDates,weekdayFormat:l.weekdayFormat,"allow-outside-interval":l.allowOutsideInterval,format:l.dayFormat,"custom-weekdays":l.normalizedWeekdayNames,onSelect:l.selectDay,onBack:t[10]||(t[10]=p=>l.viewShown="month")},null,8,["pageDate","selected","weekStartsOn","lowerLimit","upperLimit","headingFormat","disabledDates","weekdayFormat","allow-outside-interval","format","custom-weekdays","onSelect"]),[[e.vShow,l.viewShown==="day"]]),e.withDirectives(e.createVNode(h,{pageDate:l.pageDate,visible:l.viewShown==="time",selected:l.modelValue,disabledTime:l.disabledTime,onSelect:l.selectTime,onBack:l.goBackFromTimepicker},null,8,["pageDate","visible","selected","disabledTime","onSelect","onBack"]),[[e.vShow,l.viewShown==="time"]])],4)}const WP=de(IP,[["render",ZP]]),GP=e.defineComponent({__name:"vs-input-date2",props:{clearable:{type:Boolean,default:!0},now:{type:Boolean},editable:{type:Boolean,default:!0},time:{type:Boolean},isInfinity:{type:Boolean},mode:{default:"date"},weekStart:{},dayNames:{},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,{inputClass:o}=He(a.style),s=e.computed(()=>a.mode?a.mode:a.time?"datetime":"date"),i={date:"дд.мм.рррр",datetime:"дд.мм.рррр гг:хх",month:"мм.рррр",week:"рррр-тиждень",time:"гг:хх",year:"рррр"},d=e.computed(()=>a.placeholder||i[s.value]||""),c=e.computed(()=>["py-1.5 px-3 block w-full placeholder:text-[#767f8f] bg-white",o.value,a.customClass,{"!border-red-600":a.error}]),h=e.computed(()=>!a.modelValue&&a.now?new Date:null),p=e.computed({get:()=>k(a.modelValue??h.value,s.value)||void 0,set:F=>n("update:modelValue",v(F,s.value))}),y=["Пн","Вт","Ср","Чт","Пт","Сб","Нд"],w=e.computed(()=>{var F;if((F=a.dayNames)!=null&&F.length)return a.dayNames.length===7?a.dayNames:y}),m=e.computed(()=>{const F=a.weekStart,X=typeof F=="string"?Number(F):F;return X===void 0||Number.isNaN(X)?1:Math.min(6,Math.max(0,X))}),f=e.computed(()=>{switch(s.value){case"time":return{startingView:"time",minimumView:"time"};case"month":return{startingView:"month",minimumView:"month"};case"year":return{startingView:"year",minimumView:"year"};case"datetime":return{startingView:"day",minimumView:"time"};default:return{startingView:"day",minimumView:"day"}}}),u={date:"dd.MM.yyyy",datetime:"dd.MM.yyyy HH:mm",month:"MM.yyyy",time:"HH:mm",week:"dd.MM.yyyy",year:"yyyy"},g=e.computed(()=>u[s.value]||"dd.MM.yyyy"),M=e.computed(()=>{var F,X,J,se;return{"--vdp-selected-bg-color":((F=a.style)==null?void 0:F.primaryColor)||"#2563eb","--vdp-hover-bg-color":((X=a.style)==null?void 0:X.primaryColor)||"#2563eb","--vdp-selected-color":"#ffffff","--vdp-hover-color":"#ffffff","--vdp-border-radius":((J=a.style)==null?void 0:J.size)==="sm"?"6px":"8px","--vdp-elem-font-size":((se=a.style)==null?void 0:se.size)==="sm"?"0.75em":"0.85em"}}),x=e.ref(!1);e.watch(()=>a.modelValue,F=>{F?x.value=!0:a.now||(x.value=!1)},{immediate:!0}),e.watchEffect(()=>{a.now&&!a.modelValue&&!x.value&&(n("update:modelValue",v(new Date,s.value)),x.value=!0)});function k(F,X){if(!F)return null;if(F instanceof Date&&!Number.isNaN(F.getTime()))return F;if(typeof F!="string")return null;switch(X){case"datetime":return H(F);case"time":return $(F);case"month":return Q(F);case"year":return G(F);case"week":return B(F);case"date":default:return q(F)}}function v(F,X){if(!F)return null;const J=F instanceof Date?F:k(F,X);if(!J)return null;switch(X){case"datetime":return`${V(J)}T${C(J)}`;case"time":return C(J);case"month":return`${J.getFullYear()}-${Z(J.getMonth()+1)}`;case"year":return`${J.getFullYear()}`;case"week":{const{year:se,week:ce}=P(J);return`${se}-W${Z(ce)}`}case"date":default:return V(J)}}function V(F){return`${F.getFullYear()}-${Z(F.getMonth()+1)}-${Z(F.getDate())}`}function C(F){return`${Z(F.getHours())}:${Z(F.getMinutes())}`}function q(F){const X=F.split("-");if(X.length<3)return null;const[J,se,ce]=X.map(Number);return!J||!se||!ce?null:new Date(J,se-1,ce)}function H(F){const X=F.includes("T")?F:F.replace(" ","T"),J=new Date(X);return Number.isNaN(J.getTime())?null:J}function Q(F){const[X,J]=F.split("-").map(Number);return!X||Number.isNaN(J)?null:new Date(X,(J||1)-1,1)}function G(F){const X=Number(F);return X?new Date(X,0,1):null}function $(F){const X=F.match(/^(\d{1,2}):(\d{2})$/);if(!X)return null;const[,J,se]=X,ce=new Date;return ce.setHours(Number(J),Number(se),0,0),ce}function B(F){const X=F.match(/^(\d{4})-W(\d{2})$/);if(!X)return null;const[,J,se]=X,ce=Number(se);return L(Number(J),ce)}function P(F){const X=new Date(Date.UTC(F.getFullYear(),F.getMonth(),F.getDate())),J=X.getUTCDay()||7;X.setUTCDate(X.getUTCDate()+4-J);const se=new Date(Date.UTC(X.getUTCFullYear(),0,1)),ce=Math.ceil(((X.getTime()-se.getTime())/864e5+1)/7);return{year:X.getUTCFullYear(),week:ce}}function L(F,X){if(!F||!X)return null;const J=new Date(F,0,1+(X-1)*7),se=J.getDay(),ce=J;return se<=4?ce.setDate(J.getDate()-J.getDay()+1):ce.setDate(J.getDate()+8-J.getDay()),ce}function Z(F){return String(F).padStart(2,"0")}return(F,X)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vs-date-picker",a.customClass]),style:e.normalizeStyle(M.value)},[e.createVNode(WP,{modelValue:p.value,"onUpdate:modelValue":X[0]||(X[0]=J=>p.value=J),placeholder:d.value,disabled:a.disabled,clearable:a.clearable,typeable:a.editable,"week-day-names":w.value,"week-starts-on":m.value,"starting-view":f.value.startingView,"minimum-view":f.value.minimumView,"input-format":g.value,name:a.name,class:e.normalizeClass(c.value)},null,8,["modelValue","placeholder","disabled","clearable","typeable","week-day-names","week-starts-on","starting-view","minimum-view","input-format","name","class"])],6))}}),KP=de(GP,[["__scopeId","data-v-a65a2ac3"]]),ql=(l={mode:"edit",schema:null})=>new Promise(t=>{const{close:a}=$j({title:l.mode==="add"?"Додати":"Редагувати",template:"",size:"medium",content:Ml,contentProps:{...l,onClose:()=>{t(null),a()},onSave:n=>{t(n),a()}}})});nt.install=function(l){l.component("VForm",nt),Object.assign(l.config.globalProperties,{$form:ql}),l.provide("form",ql),window.v3plugin||(window.v3plugin={})};const it=Object.freeze(Object.defineProperty({__proto__:null,ModalEdit:Ml,VForm:nt,VsInputAddress:ul,VsInputArray:yl,VsInputArraySelect:za,VsInputCheckbox:Wr,VsInputCodegen:il,VsInputColor:hl,VsInputContainer:tl,VsInputDate:KP,VsInputEmail:m1,VsInputFile:Xr,VsInputFileList:Qr,VsInputKeyValue:dl,VsInputMask:k1,VsInputMonaco:ml,VsInputNumber:Zr,VsInputRadio:g1,VsInputRange:pl,VsInputRichtext:rl,VsInputSelect:w1,VsInputSlug:sl,VsInputStatic:u1,VsInputSwitcher:y1,VsInputTag:ol,VsInputTel:f1,VsInputText:zt,VsInputTextArray:cl,VsInputTextarea:al,default:nt,inputs:_a,vsInputDatatable:ll,vsInputMap:nl},Symbol.toStringTag,{value:"Module"}));function dt(l){return typeof l=="string"||l instanceof String}function Sl(l){var t;return typeof l=="object"&&l!=null&&(l==null||(t=l.constructor)==null?void 0:t.name)==="Object"}function jl(l,t){return Array.isArray(t)?jl(l,(a,n)=>t.includes(n)):Object.entries(l).reduce((a,n)=>{let[o,s]=n;return t(s,o)&&(a[o]=s),a},{})}const oe={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Al(l){switch(l){case oe.LEFT:return oe.FORCE_LEFT;case oe.RIGHT:return oe.FORCE_RIGHT;default:return l}}function q1(l){return l.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function La(l,t){if(t===l)return!0;const a=Array.isArray(t),n=Array.isArray(l);let o;if(a&&n){if(t.length!=l.length)return!1;for(o=0;o<t.length;o++)if(!La(t[o],l[o]))return!1;return!0}if(a!=n)return!1;if(t&&l&&typeof t=="object"&&typeof l=="object"){const s=t instanceof Date,i=l instanceof Date;if(s&&i)return t.getTime()==l.getTime();if(s!=i)return!1;const d=t instanceof RegExp,c=l instanceof RegExp;if(d&&c)return t.toString()==l.toString();if(d!=c)return!1;const h=Object.keys(t);for(o=0;o<h.length;o++)if(!Object.prototype.hasOwnProperty.call(l,h[o]))return!1;for(o=0;o<h.length;o++)if(!La(l[h[o]],t[h[o]]))return!1;return!0}else if(t&&l&&typeof t=="function"&&typeof l=="function")return t.toString()===l.toString();return!1}class JP{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?oe.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?oe.RIGHT:oe.LEFT}}function pe(l,t){return new pe.InputMask(l,t)}function Dl(l){if(l==null)throw new Error("mask property should be defined");return l instanceof RegExp?pe.MaskedRegExp:dt(l)?pe.MaskedPattern:l===Date?pe.MaskedDate:l===Number?pe.MaskedNumber:Array.isArray(l)||l===Array?pe.MaskedDynamic:pe.Masked&&l.prototype instanceof pe.Masked?l:pe.Masked&&l instanceof pe.Masked?l.constructor:l instanceof Function?pe.MaskedFunction:(console.warn("Mask not found for mask",l),pe.Masked)}function Et(l){if(!l)throw new Error("Options in not defined");if(pe.Masked){if(l.prototype instanceof pe.Masked)return{mask:l};const{mask:t=void 0,...a}=l instanceof pe.Masked?{mask:l}:Sl(l)&&l.mask instanceof pe.Masked?l:{};if(t){const n=t.mask;return{...jl(t,(o,s)=>!s.startsWith("_")),mask:t.constructor,_mask:n,...a}}}return Sl(l)?{...l}:{mask:l}}function tt(l){if(pe.Masked&&l instanceof pe.Masked)return l;const t=Et(l),a=Dl(t.mask);if(!a)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===a&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new a(t)}pe.createMask=tt;class Ha{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,a){if(!(t==null||a==null||t===this.selectionStart&&a===this.selectionEnd))try{this._unsafeSelect(t,a)}catch{}}get isActive(){return!1}}pe.MaskElement=Ha;const Nl=90,YP=89;class Jt extends Ha{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,a,n;return(t=(a=(n=this.input).getRootNode)==null?void 0:a.call(n))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===Nl&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===YP&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===Nl&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}pe.HTMLMaskElement=Jt;class Ll extends Jt{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,a){this.input.setSelectionRange(t,a)}get value(){return this.input.value}set value(t){this.input.value=t}}pe.HTMLMaskElement=Jt;class S1 extends Jt{get _unsafeSelectionStart(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),n=a&&a.anchorOffset,o=a&&a.focusOffset;return o==null||n==null||n<o?n:o}get _unsafeSelectionEnd(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),n=a&&a.anchorOffset,o=a&&a.focusOffset;return o==null||n==null||n>o?n:o}_unsafeSelect(t,a){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,a);const o=this.rootElement,s=o.getSelection&&o.getSelection();s&&(s.removeAllRanges(),s.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}pe.HTMLContenteditableMaskElement=S1;class $a{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>$a.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}$a.MAX_LENGTH=100;class Hl{constructor(t,a){this.el=t instanceof Ha?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new S1(t):new Ll(t),this.masked=tt(a),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new $a,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var a;return t==null||((a=this.masked)==null?void 0:a.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof pe.Masked)&&this.masked.constructor===Dl(t)){this.masked.updateOptions({mask:t});return}const a=t instanceof pe.Masked?t:tt({mask:t});a.unmaskedValue=this.masked.unmaskedValue,this.masked=a}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,a){const n=this._listeners[t];n&&n.forEach(o=>o(a))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const a=this.masked.unmaskedValue,n=this.masked.value,o=this.masked.rawInputValue,s=this.displayValue,i=this.unmaskedValue!==a||this.value!==n||this._rawInputValue!==o;this._unmaskedValue=a,this._value=n,this._rawInputValue=o,this.el.value!==s&&(this.el.value=s),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:a,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:a,...n}=t,o=!this.maskEquals(a),s=this.masked.optionsIsChanged(n);o&&(this.mask=a),s&&this.masked.updateOptions(n),(o||s)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,oe.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,a){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(a),this}off(t,a){if(!this._listeners[t])return this;if(!a)return delete this._listeners[t],this;const n=this._listeners[t].indexOf(a);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const a=new JP({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,o=this.masked.splice(a.startChangePos,a.removed.length,a.inserted,a.removeDirection,{input:!0,raw:!0}).offset,s=n===this.masked.rawInputValue?a.removeDirection:oe.NONE;let i=this.masked.nearestInputPos(a.startChangePos+o,s);s!==oe.NONE&&(i=this.masked.nearestInputPos(i,oe.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}pe.InputMask=Hl;class ye{static normalize(t){return Array.isArray(t)?t:[t,new ye]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}pe.ChangeDetails=ye;class at{constructor(t,a,n){t===void 0&&(t=""),a===void 0&&(a=0),this.value=t,this.from=a,this.stop=n}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const a=this.value[0];return this.value=this.value.slice(1),a}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class De{constructor(t){this._value="",this._update({...De.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,a){a===void 0&&(a={input:!0}),this.reset(),this.append(t,a,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,a){return t}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),Math.min(this.displayValue.length,a-t)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this.displayValue.slice(t,a)}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new at(this.extractInput(t,a),t)}appendTail(t){return dt(t)&&(t=new at(String(t))),t.appendTo(this)}_appendCharRaw(t,a){return t?(this._value+=t,new ye({inserted:t,rawInserted:t})):new ye}_appendChar(t,a,n){a===void 0&&(a={});const o=this.state;let s;if([t,s]=this.doPrepareChar(t,a),t&&(s=s.aggregate(this._appendCharRaw(t,a)),!s.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=o;let d=this.pad(a);const c=this._appendCharRaw(t,a);d=d.aggregate(c),c.rawInserted||d.equals(s)?s=d:this.state=i}if(s.inserted){let i,d=this.doValidate(a)!==!1;if(d&&n!=null){const c=this.state;if(this.overwrite===!0){i=n.state;for(let p=0;p<s.rawInserted.length;++p)n.unshift(this.displayValue.length-s.tailShift)}let h=this.appendTail(n);if(d=h.rawInserted.length===n.toString().length,!(d&&h.inserted)&&this.overwrite==="shift"){this.state=c,i=n.state;for(let p=0;p<s.rawInserted.length;++p)n.shift();h=this.appendTail(n),d=h.rawInserted.length===n.toString().length}d&&h.inserted&&(this.state=c)}d||(s=new ye,this.state=o,n&&i&&(n.state=i))}return s}_appendPlaceholder(){return new ye}_appendEager(){return new ye}append(t,a,n){if(!dt(t))throw new Error("value should be string");const o=dt(n)?new at(String(n)):n;a!=null&&a.tail&&(a._beforeTailState=this.state);let s;[t,s]=this.doPrepare(t,a);for(let i=0;i<t.length;++i){const d=this._appendChar(t[i],a,o);if(!d.rawInserted&&!this.doSkipInvalid(t[i],a,o))break;s.aggregate(d)}return(this.eager===!0||this.eager==="append")&&a!=null&&a.input&&t&&s.aggregate(this._appendEager()),o!=null&&(s.tailShift+=this.appendTail(o).tailShift),s}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(a),new ye}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const a=this.rawInputValue,n=this.value,o=t();return this.rawInputValue=a,this.value&&this.value!==n&&n.indexOf(this.value)===0&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,o}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const a=this.state,n=t(this);return this.state=a,delete this._isolated,n}doSkipInvalid(t,a,n){return!!this.skipInvalid}doPrepare(t,a){return a===void 0&&(a={}),ye.normalize(this.prepare?this.prepare(t,this,a):t)}doPrepareChar(t,a){return a===void 0&&(a={}),ye.normalize(this.prepareChar?this.prepareChar(t,this,a):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,a,n,o,s){n===void 0&&(n=""),o===void 0&&(o=oe.NONE),s===void 0&&(s={input:!0});const i=t+a,d=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let h;c&&(o=Al(o),h=this.extractInput(0,i,{raw:!0}));let p=t;const y=new ye;if(o!==oe.NONE&&(p=this.nearestInputPos(t,a>1&&t!==0&&!c?oe.NONE:o),y.tailShift=p-t),y.aggregate(this.remove(p)),c&&o!==oe.NONE&&h===this.rawInputValue)if(o===oe.FORCE_LEFT){let w;for(;h===this.rawInputValue&&(w=this.displayValue.length);)y.aggregate(new ye({tailShift:-1})).aggregate(this.remove(w-1))}else o===oe.FORCE_RIGHT&&d.unshift();return y.aggregate(this.append(n,s,d))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!La(this,t)}typedValueEquals(t){const a=this.typedValue;return t===a||De.EMPTY_VALUES.includes(t)&&De.EMPTY_VALUES.includes(a)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new ye}}De.DEFAULTS={skipInvalid:!0},De.EMPTY_VALUES=[void 0,null,""],pe.Masked=De;class ct{constructor(t,a){t===void 0&&(t=[]),a===void 0&&(a=0),this.chunks=t,this.from=a}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=dt(t)?new at(String(t)):t;const a=this.chunks[this.chunks.length-1],n=a&&(a.stop===t.stop||t.stop==null)&&t.from===a.from+a.toString().length;if(t instanceof at)n?a.extend(t.toString()):this.chunks.push(t);else if(t instanceof ct){if(t.stop==null){let o;for(;t.chunks.length&&t.chunks[0].stop==null;)o=t.chunks.shift(),o.from+=t.from,this.extend(o)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof pe.MaskedPattern))return new at(this.toString()).appendTo(t);const a=new ye;for(let n=0;n<this.chunks.length;++n){const o=this.chunks[n],s=t._mapPosToBlock(t.displayValue.length),i=o.stop;let d;if(i!=null&&(!s||s.index<=i)&&((o instanceof ct||t._stops.indexOf(i)>=0)&&a.aggregate(t._appendPlaceholder(i)),d=o instanceof ct&&t._blocks[i]),d){const c=d.appendTail(o);a.aggregate(c);const h=o.toString().slice(c.rawInserted.length);h&&a.aggregate(t.append(h,{tail:!0}))}else a.aggregate(t.append(o.toString(),{tail:!0}))}return a}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:a,...n}=t;Object.assign(this,n),this.chunks=a.map(o=>{const s="chunks"in o?new ct:new at;return s.state=o,s})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const a=t!=null?t-this.from:t;let n=0;for(;n<this.chunks.length;){const o=this.chunks[n],s=o.unshift(a);if(o.toString()){if(!s)break;++n}else this.chunks.splice(n,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const a=this.chunks[t],n=a.shift();if(a.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class XP{constructor(t,a){this.masked=t,this._log=[];const{offset:n,index:o}=t._mapPosToBlock(a)||(a<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=o,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((a=this.block)==null?void 0:a.displayValue.length)||0){var a;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,oe.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,oe.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,oe.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,oe.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,oe.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,oe.NONE),!0})}}class j1{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(a),this._value||(this._isRawInput=!1),new ye}nearestInputPos(t,a){a===void 0&&(a=oe.NONE);const n=0,o=this._value.length;switch(a){case oe.LEFT:case oe.FORCE_LEFT:return n;case oe.NONE:case oe.RIGHT:case oe.FORCE_RIGHT:default:return o}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._isRawInput?a-t:0}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,a)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new ye;const n=this.eager===!0||this.eager==="append",o=this.char===t&&(this.isUnmasking||a.input||a.raw)&&(!a.raw||!n)&&!a.tail,s=new ye({inserted:this.char,rawInserted:o?this.char:""});return this._value=this.char,this._isRawInput=o&&(a.raw||a.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new ye;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new at("")}appendTail(t){return dt(t)&&(t=new at(String(t))),t.appendTo(this)}append(t,a,n){const o=this._appendChar(t[0],a);return n!=null&&(o.tailShift+=this.appendTail(n).tailShift),o}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}}class Yt{constructor(t){const{parent:a,isOptional:n,placeholderChar:o,displayChar:s,lazy:i,eager:d,...c}=t;this.masked=tt(c),Object.assign(this,{parent:a,isOptional:n,placeholderChar:o,displayChar:s,lazy:i,eager:d})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),t===0&&a>=1?(this.isFilled=!1,this.masked.remove(t,a)):new ye}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new ye;const n=this.masked.state;let o=this.masked._appendChar(t,this.currentMaskFlags(a));return o.inserted&&this.doValidate(a)===!1&&(o=new ye,this.masked.state=n),!o.inserted&&!this.isOptional&&!this.lazy&&!a.input&&(o.inserted=this.placeholderChar),o.skip=!o.inserted&&!this.isOptional,this.isFilled=!!o.inserted,o}append(t,a,n){return this.masked.append(t,this.currentMaskFlags(a),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ye:(this.isFilled=!0,new ye({inserted:this.placeholderChar}))}_appendEager(){return new ye}extractTail(t,a){return this.masked.extractTail(t,a)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.masked.extractInput(t,a,n)}nearestInputPos(t,a){a===void 0&&(a=oe.NONE);const n=0,o=this.value.length,s=Math.min(Math.max(t,n),o);switch(a){case oe.LEFT:case oe.FORCE_LEFT:return this.isComplete?s:n;case oe.RIGHT:case oe.FORCE_RIGHT:return this.isComplete?s:o;case oe.NONE:default:return s}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.value.slice(t,a).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var a;return{...t,_beforeTailState:(t==null||(a=t._beforeTailState)==null?void 0:a.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new ye}}Yt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class $l extends De{updateOptions(t){super.updateOptions(t)}_update(t){const a=t.mask;a&&(t.validate=n=>n.search(a)>=0),super._update(t)}}pe.MaskedRegExp=$l;class Ne extends De{constructor(t){super({...Ne.DEFAULTS,...t,definitions:Object.assign({},Yt.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const a=this.mask;if(!a||!t)return;let n=!1,o=!1;for(let s=0;s<a.length;++s){if(this.blocks){const h=a.slice(s),p=Object.keys(this.blocks).filter(w=>h.indexOf(w)===0);p.sort((w,m)=>m.length-w.length);const y=p[0];if(y){const{expose:w,repeat:m,...f}=Et(this.blocks[y]),u={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...f,repeat:m,parent:this},g=m!=null?new pe.RepeatBlock(u):tt(u);g&&(this._blocks.push(g),w&&(this.exposeBlock=g),this._maskedBlocks[y]||(this._maskedBlocks[y]=[]),this._maskedBlocks[y].push(this._blocks.length-1)),s+=y.length-1;continue}}let i=a[s],d=i in t;if(i===Ne.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){n=!n;continue}if(i==="["||i==="]"){o=!o;continue}if(i===Ne.ESCAPE_CHAR){if(++s,i=a[s],!i)break;d=!1}const c=d?new Yt({isOptional:o,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Et(t[i]),parent:this}):new j1({char:i,eager:this.eager,isUnmasking:n});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:a,...n}=t;this._blocks.forEach((o,s)=>o.state=a[s]),super.state=n}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,a)=>t+=a.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(a),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,a)=>t+=a.value,"")}set value(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(a),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(a),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,a)=>t+=a.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const a=new ye;let n=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(n==null)return a;this._blocks[n].isFilled&&++n;for(let o=n;o<this._blocks.length;++o){const s=this._blocks[o]._appendEager();if(!s.inserted)break;a.aggregate(s)}return a}_appendCharRaw(t,a){a===void 0&&(a={});const n=this._mapPosToBlock(this.displayValue.length),o=new ye;if(!n)return o;for(let i=n.index,d;d=this._blocks[i];++i){var s;const c=d._appendChar(t,{...a,_beforeTailState:(s=a._beforeTailState)==null||(s=s._blocks)==null?void 0:s[i]});if(o.aggregate(c),c.consumed)break}return o}extractTail(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=new ct;return t===a||this._forEachBlocksInRange(t,a,(o,s,i,d)=>{const c=o.extractTail(i,d);c.stop=this._findStopBefore(s),c.from=this._blockStartPos(s),c instanceof ct&&(c.blockIndex=s),n.extend(c)}),n}extractInput(t,a,n){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),n===void 0&&(n={}),t===a)return"";let o="";return this._forEachBlocksInRange(t,a,(s,i,d,c)=>{o+=s.extractInput(d,c,n)}),o}_findStopBefore(t){let a;for(let n=0;n<this._stops.length;++n){const o=this._stops[n];if(o<=t)a=o;else break}return a}_appendPlaceholder(t){const a=new ye;if(this.lazy&&t==null)return a;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return a;const o=n.index,s=t??this._blocks.length;return this._blocks.slice(o,s).forEach(i=>{if(!i.lazy||t!=null){var d;a.aggregate(i._appendPlaceholder((d=i._blocks)==null?void 0:d.length))}}),a}_mapPosToBlock(t){let a="";for(let n=0;n<this._blocks.length;++n){const o=this._blocks[n],s=a.length;if(a+=o.displayValue,t<=a.length)return{index:n,offset:t-s}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((a,n)=>a+=n.displayValue.length,0)}_forEachBlocksInRange(t,a,n){a===void 0&&(a=this.displayValue.length);const o=this._mapPosToBlock(t);if(o){const s=this._mapPosToBlock(a),i=s&&o.index===s.index,d=o.offset,c=s&&i?s.offset:this._blocks[o.index].displayValue.length;if(n(this._blocks[o.index],o.index,d,c),s&&!i){for(let h=o.index+1;h<s.index;++h)n(this._blocks[h],h,0,this._blocks[h].displayValue.length);n(this._blocks[s.index],s.index,0,s.offset)}}}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=super.remove(t,a);return this._forEachBlocksInRange(t,a,(o,s,i,d)=>{n.aggregate(o.remove(i,d))}),n}nearestInputPos(t,a){if(a===void 0&&(a=oe.NONE),!this._blocks.length)return 0;const n=new XP(this,t);if(a===oe.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(a===oe.LEFT||a===oe.FORCE_LEFT){if(a===oe.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),a===oe.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t||(n.popState(),n.ok&&n.pos<=t))return n.pos;n.popState()}return n.ok?n.pos:a===oe.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return a===oe.RIGHT||a===oe.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:a===oe.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(t,oe.LEFT))):t}totalInputPositions(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,a,(o,s,i,d)=>{n+=o.totalInputPositions(i,d)}),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const a=this._maskedBlocks[t];return a?a.map(n=>this._blocks[n]):[]}pad(t){const a=new ye;return this._forEachBlocksInRange(0,this.displayValue.length,n=>a.aggregate(n.pad(t))),a}}Ne.DEFAULTS={...De.DEFAULTS,lazy:!0,placeholderChar:"_"},Ne.STOP_CHAR="`",Ne.ESCAPE_CHAR="\\",Ne.InputDefinition=Yt,Ne.FixedDefinition=j1,pe.MaskedPattern=Ne;class Xt extends Ne{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:a=this.to||0,from:n=this.from||0,maxLength:o=this.maxLength||0,autofix:s=this.autofix,...i}=t;this.to=a,this.from=n,this.maxLength=Math.max(String(a).length,o),this.autofix=s;const d=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<c.length&&c[h]===d[h];)++h;i.mask=c.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let a="",n="";const[,o,s]=t.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(a="0".repeat(o.length)+s,n="9".repeat(o.length)+s),a=a.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[a,n]}doPrepareChar(t,a){a===void 0&&(a={});let n;return[t,n]=super.doPrepareChar(t.replace(/\D/g,""),a),t||(n.skip=!this.isComplete),[t,n]}_appendCharRaw(t,a){if(a===void 0&&(a={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,a);const n=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0"),[s,i]=this.boundaries(this.value+t);return Number(i)<this.from?super._appendCharRaw(n[this.value.length],a):Number(s)>this.to?!a.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],a).aggregate(this._appendCharRaw(t,a)):super._appendCharRaw(o[this.value.length],a):super._appendCharRaw(t,a)}doValidate(t){const a=this.value;if(a.search(/[^0]/)===-1&&a.length<=this._matchFrom)return!0;const[n,o]=this.boundaries(a);return this.from<=Number(o)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){const a=new ye;if(this.value.length===this.maxLength)return a;const n=this.value,o=this.maxLength-this.value.length;if(o){this.reset();for(let s=0;s<o;++s)a.aggregate(super._appendCharRaw("0",t));n.split("").forEach(s=>this._appendCharRaw(s))}return a}}pe.MaskedRange=Xt;const QP="d{.}`m{.}`Y";class rt extends Ne{static extractPatternOptions(t){const{mask:a,pattern:n,...o}=t;return{...o,mask:dt(a)?a:n}}constructor(t){super(rt.extractPatternOptions({...rt.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:a,pattern:n,blocks:o,...s}={...rt.DEFAULTS,...t},i=Object.assign({},rt.GET_DEFAULT_BLOCKS());t.min&&(i.Y.from=t.min.getFullYear()),t.max&&(i.Y.to=t.max.getFullYear()),t.min&&t.max&&i.Y.from===i.Y.to&&(i.m.from=t.min.getMonth()+1,i.m.to=t.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=t.min.getDate(),i.d.to=t.max.getDate())),Object.assign(i,this.blocks,o),super._update({...s,mask:dt(a)?a:n,blocks:i})}doValidate(t){const a=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&a!=null&&(this.min==null||this.min<=a)&&(this.max==null||a<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(rt.extractPatternOptions(t))}}rt.GET_DEFAULT_BLOCKS=()=>({d:{mask:Xt,from:1,to:31,maxLength:2},m:{mask:Xt,from:1,to:12,maxLength:2},Y:{mask:Xt,from:1900,to:9999}}),rt.DEFAULTS={...Ne.DEFAULTS,mask:Date,pattern:QP,format:(l,t)=>{if(!l)return"";const a=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),o=l.getFullYear();return[a,n,o].join(".")},parse:(l,t)=>{const[a,n,o]=l.split(".").map(Number);return new Date(o,n-1,a)}},pe.MaskedDate=rt;class Qt extends De{constructor(t){super({...Qt.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(a=>{const{expose:n,...o}=Et(a),s=tt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...o});return n&&(this.exposeMask=s),s}):[])}_appendCharRaw(t,a){a===void 0&&(a={});const n=this._applyDispatch(t,a);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(a))),n}_applyDispatch(t,a,n){t===void 0&&(t=""),a===void 0&&(a={}),n===void 0&&(n="");const o=a.tail&&a._beforeTailState!=null?a._beforeTailState._value:this.value,s=this.rawInputValue,i=a.tail&&a._beforeTailState!=null?a._beforeTailState._rawInputValue:s,d=s.slice(i.length),c=this.currentMask,h=new ye,p=c==null?void 0:c.state;return this.currentMask=this.doDispatch(t,{...a},n),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),h.tailShift=this.currentMask.value.length-o.length),d&&(h.tailShift+=this.currentMask.append(d,{raw:!0,tail:!0}).tailShift)):p&&(this.currentMask.state=p)),h}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const a=new ye;return t&&a.aggregate(this._applyDispatch("",{},t)),a.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var a,n;return{...t,_beforeTailState:((a=t._beforeTailState)==null?void 0:a.currentMaskRef)===this.currentMask&&((n=t._beforeTailState)==null?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,a,n){return a===void 0&&(a={}),n===void 0&&(n=""),this.dispatch(t,this,a,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,a){a===void 0&&(a={});let[n,o]=super.doPrepare(t,a);if(this.currentMask){let s;[n,s]=super.doPrepare(n,this.currentMaskFlags(a)),o=o.aggregate(s)}return[n,o]}doPrepareChar(t,a){a===void 0&&(a={});let[n,o]=super.doPrepareChar(t,a);if(this.currentMask){let s;[n,s]=super.doPrepareChar(n,this.currentMaskFlags(a)),o=o.aggregate(s)}return[n,o]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(a=>a.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let a=String(t);this.currentMask&&(this.currentMask.typedValue=t,a=this.currentMask.unmaskedValue),this.unmaskedValue=a}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,a){const n=new ye;return this.currentMask&&n.aggregate(this.currentMask.remove(t,a)).aggregate(this._applyDispatch()),n}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(a=>a.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:a,currentMaskRef:n,currentMask:o,...s}=t;a&&this.compiledMasks.forEach((i,d)=>i.state=a[d]),n!=null&&(this.currentMask=n,this.currentMask.state=o),super.state=s}extractInput(t,a,n){return this.currentMask?this.currentMask.extractInput(t,a,n):""}extractTail(t,a){return this.currentMask?this.currentMask.extractTail(t,a):super.extractTail(t,a)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,a){return this.currentMask?this.currentMask.nearestInputPos(t,a):super.nearestInputPos(t,a)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((a,n)=>{if(!t[n])return;const{mask:o,...s}=t[n];return La(a,s)&&a.maskEquals(o)}):super.maskEquals(t)}typedValueEquals(t){var a;return!!((a=this.currentMask)!=null&&a.typedValueEquals(t))}}Qt.DEFAULTS={...De.DEFAULTS,dispatch:(l,t,a,n)=>{if(!t.compiledMasks.length)return;const o=t.rawInputValue,s=t.compiledMasks.map((i,d)=>{const c=t.currentMask===i,h=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,oe.FORCE_LEFT);return i.rawInputValue!==o?(i.reset(),i.append(o,{raw:!0})):c||i.remove(h),i.append(l,t.currentMaskFlags(a)),i.appendTail(n),{index:d,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(h,i.nearestInputPos(i.displayValue.length,oe.FORCE_LEFT)))}});return s.sort((i,d)=>d.weight-i.weight||d.totalInputPositions-i.totalInputPositions),t.compiledMasks[s[0].index]}},pe.MaskedDynamic=Qt;class ea extends Ne{constructor(t){super({...ea.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:a,...n}=t;if(a){const o=a.map(d=>d.length),s=Math.min(...o),i=Math.max(...o)-s;n.mask="*".repeat(s),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=a}super._update(n)}_appendCharRaw(t,a){a===void 0&&(a={});const n=Math.min(this.nearestInputPos(0,oe.FORCE_RIGHT),this.value.length),o=this.enum.filter(s=>this.matchValue(s,this.unmaskedValue+t,n));if(o.length){o.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,d)=>{const c=o[0][d];d>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,a))});const s=super._appendCharRaw(o[0][this.value.length],a);return o.length===1&&o[0].slice(this.unmaskedValue.length).split("").forEach(i=>s.aggregate(super._appendCharRaw(i))),s}return new ye({skip:!this.isComplete})}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new at("",t)}remove(t,a){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),t===a)return new ye;const n=Math.min(super.nearestInputPos(0,oe.FORCE_RIGHT),this.value.length);let o;for(o=t;o>=0&&!(this.enum.filter(i=>this.matchValue(i,this.value.slice(n,o),n)).length>1);--o);const s=super.remove(o,a);return s.tailShift+=o-t,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}ea.DEFAULTS={...Ne.DEFAULTS,matchValue:(l,t,a)=>l.indexOf(t,a)===a},pe.MaskedEnum=ea;class Fl extends De{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}pe.MaskedFunction=Fl;var Tl;class Ie extends De{constructor(t){super({...Ie.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),a="\\d*",n=(this.scale?"("+q1(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+a+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(q1).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(q1(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const a=t.split(this.radix);return a[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),a.join(this.radix)}doPrepareChar(t,a){a===void 0&&(a={});const[n,o]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(a.input&&a.raw||!a.input&&!a.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),a);return t&&!n&&(o.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&o.aggregate(this._appendChar("-")),[n,o]}_separatorsCount(t,a){a===void 0&&(a=!1);let n=0;for(let o=0;o<t;++o)this._value.indexOf(this.thousandsSeparator,o)===o&&(++n,a&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a),this._removeThousandsSeparators(super.extractInput(t,a,n))}_appendCharRaw(t,a){a===void 0&&(a={});const n=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,o=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=t;const i=this.number;let d=!isNaN(i),c=!1;if(d){let w;this.min!=null&&this.min<0&&this.number<this.min&&(w=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(w=this.max),w!=null&&(this.autofix?(this._value=this.format(w,this).replace(Ie.UNMASKED_RADIX,this.radix),c||(c=s===this._value&&!a.tail)):d=!1),d&&(d=!!this._value.match(this._numberRegExp))}let h;d?h=new ye({inserted:this._value.slice(s.length),rawInserted:c?"":t,skip:c}):(this._value=s,h=new ye),this._value=this._insertThousandsSeparators(this._value);const p=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,y=this._separatorsCountFromSlice(p);return h.tailShift+=(y-o)*this.thousandsSeparator.length,h}_findSeparatorAround(t){if(this.thousandsSeparator){const a=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,a);if(n<=t)return n}return-1}_adjustRangeWithSeparators(t,a){const n=this._findSeparatorAround(t);n>=0&&(t=n);const o=this._findSeparatorAround(a);return o>=0&&(a=o+this.thousandsSeparator.length),[t,a]}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a);const n=this.value.slice(0,t),o=this.value.slice(a),s=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+o));const i=this._separatorsCountFromSlice(n);return new ye({tailShift:(i-s)*this.thousandsSeparator.length})}nearestInputPos(t,a){if(!this.thousandsSeparator)return t;switch(a){case oe.NONE:case oe.LEFT:case oe.FORCE_LEFT:{const n=this._findSeparatorAround(t-1);if(n>=0){const o=n+this.thousandsSeparator.length;if(t<o||this.value.length<=o||a===oe.FORCE_LEFT)return n}break}case oe.RIGHT:case oe.FORCE_RIGHT:{const n=this._findSeparatorAround(t);if(n>=0)return n+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let a=t;this.min!=null&&(a=Math.max(a,this.min)),this.max!=null&&(a=Math.min(a,this.max)),a!==t&&(this.unmaskedValue=this.format(a,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const a=this._removeThousandsSeparators(t).split(this.radix);return a[0]=a[0].replace(/^(\D*)(0*)(\d*)/,(n,o,s,i)=>o+i),t.length&&!/\d$/.test(a[0])&&(a[0]=a[0]+"0"),a.length>1&&(a[1]=a[1].replace(/0*$/,""),a[1].length||(a.length=1)),this._insertThousandsSeparators(a.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const a=t.split(this.radix);return a.length<2&&a.push(""),a[1]=a[1].padEnd(this.scale,"0"),a.join(this.radix)}doSkipInvalid(t,a,n){a===void 0&&(a={});const o=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===Ie.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,a,n)&&!o}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Ie.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(Ie.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||Ie.EMPTY_VALUES.includes(t)&&Ie.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Tl=Ie,Ie.UNMASKED_RADIX=".",Ie.EMPTY_VALUES=[...De.EMPTY_VALUES,0],Ie.DEFAULTS={...De.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tl.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:l=>l.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},pe.MaskedNumber=Ie;const Fa={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function A1(l,t,a){t===void 0&&(t=Fa.MASKED),a===void 0&&(a=Fa.MASKED);const n=tt(l);return o=>n.runIsolated(s=>(s[t]=o,s[a]))}function Pl(l,t,a,n){return A1(t,a,n)(l)}pe.PIPE_TYPE=Fa,pe.createPipe=A1,pe.pipe=Pl;class Il extends Ne{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var a,n,o;const{repeat:s,...i}=Et(t);this._blockOpts=Object.assign({},this._blockOpts,i);const d=tt(this._blockOpts);this.repeat=(a=(n=s??d.repeat)!=null?n:this.repeat)!=null?a:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((o=this._blocks)==null?void 0:o.length)||0,this.repeatFrom)),blocks:{m:d},eager:d.eager,overwrite:d.overwrite,skipInvalid:d.skipInvalid,lazy:d.lazy,placeholderChar:d.placeholderChar,displayChar:d.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(tt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,a){a===void 0&&(a={});const n=new ye;for(let c=(o=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?o:Math.max(this._blocks.length-1,0),h,p;h=(i=this._blocks[c])!=null?i:p=!p&&this._allocateBlock(c);++c){var o,s,i,d;const y=h._appendChar(t,{...a,_beforeTailState:(d=a._beforeTailState)==null||(d=d._blocks)==null?void 0:d[c]});if(y.skip&&p){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(y),y.consumed)break}return n}_trimEmptyTail(t,a){var n,o;t===void 0&&(t=0);const s=Math.max(((n=this._mapPosToBlock(t))==null?void 0:n.index)||0,this.repeatFrom,0);let i;a!=null&&(i=(o=this._mapPosToBlock(a))==null?void 0:o.index),i==null&&(i=this._blocks.length-1);let d=0;for(let c=i;s<=c&&!this._blocks[c].unmaskedValue;--c,++d);d&&(this._blocks.splice(i-d+1,d),this.mask=this.mask.slice(d))}reset(){super.reset(),this._trimEmptyTail()}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=super.remove(t,a);return this._trimEmptyTail(t,a),n}totalInputPositions(t,a){return t===void 0&&(t=0),a==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,a)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}pe.RepeatBlock=Il;try{globalThis.IMask=pe}catch{}const D1=Object.freeze(Object.defineProperty({__proto__:null,ChangeDetails:ye,ChunksTailDetails:ct,DIRECTION:oe,HTMLContenteditableMaskElement:S1,HTMLInputMaskElement:Ll,HTMLMaskElement:Jt,InputMask:Hl,MaskElement:Ha,Masked:De,MaskedDate:rt,MaskedDynamic:Qt,MaskedEnum:ea,MaskedFunction:Fl,MaskedNumber:Ie,MaskedPattern:Ne,MaskedRange:Xt,MaskedRegExp:$l,PIPE_TYPE:Fa,PatternFixedDefinition:j1,PatternInputDefinition:Yt,RepeatBlock:Il,createMask:tt,createPipe:A1,default:pe,forceDirection:Al,normalizeOpts:Et,pipe:Pl},Symbol.toStringTag,{value:"Module"})),eI=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));_e.EditorRootPage=tE,_e.ROUTES_NAMES=qr,_e.Urls=_r,_e.VsBar=r1,_e.VsDashboard=Gz,_e.VsDonut=Sr,_e.VsLine=Ar,_e.VsListBar=Lr,_e.VsPie=jr,_e.VsPivotTable=Hr,_e.VsProgressBar=Nr,_e.VsStat=Dr,_e.VsWidget=Ht,Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"})});
8311
+ </div>`;const o=this.map.project(l.lngLat);this.popupElement.style.left=`${o.x}px`,this.popupElement.style.top=`${o.y-60}px`,this.map.getContainer().appendChild(this.popupElement)}catch(a){console.error(a)}}}},FS={class:"h-full"},TS={class:"flex items-start justify-between mb-[6px] w-full"},PS={class:"text-gray-800 font-[600]"},IS={class:"flex gap-2"},RS=["onClick"],OS=["id"],US=["id"],ZS={class:"absolute flex flex-col right-[10px] top-[105px] gap-1"},WS={class:"h-[calc(250px)]"};function GS(l,t,a,n,o,s){var w,m,f,u,g,M,x,k,v,V;const i=e.resolveComponent("VsMapSetting"),d=e.resolveComponent("VsMapSlotLayers"),c=e.resolveComponent("VsMapGoHome"),h=e.resolveComponent("VsClusterLegend"),p=e.resolveComponent("VsList"),y=e.resolveComponent("VsBar");return e.openBlock(),e.createElementBlock("div",FS,[e.createElementVNode("div",TS,[e.createElementVNode("h3",PS,e.toDisplayString(l.title),1),e.createElementVNode("div",IS,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,C=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["p-1 text-gray-700 border rounded",[o.activeTab===(C==null?void 0:C.id)?"ring-2 ring-blue-500":""]]),onClick:q=>o.activeTab=C==null?void 0:C.id},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C==null?void 0:C.component),{height:"16",width:"16"}))],10,RS))),256))])]),e.withDirectives(e.createElementVNode("div",{class:"relative w-full h-[calc(100%-40px)]",id:`wrapper-${o.mapId}`},[e.createElementVNode("div",{id:o.mapId,class:"h-full w-full flex items-end min-h-[250px]"},null,8,US),o.showSetting?(e.openBlock(),e.createBlock(i,{key:0,map:o.map,coordinates:o.coordinatesByMouse},null,8,["map","coordinates"])):e.createCommentVNode("",!0),e.createVNode(d,{map:o.map},null,8,["map"]),e.createElementVNode("div",ZS,[e.createVNode(c,{map:o.map,bbox:(w=o.data)==null?void 0:w.bounds},null,8,["map","bbox"])]),e.createVNode(h,{mapId:o.mapId,colors:(m=o.data)==null?void 0:m.colors,sizes:(f=o.data)==null?void 0:f.sizes,color:o.baseColor,changeOpacityItem:"true",cluster:"true"},null,8,["mapId","colors","sizes","color"])],8,OS),[[e.vShow,o.activeTab=="map"]]),e.withDirectives(e.createVNode(p,{mapId:o.mapId,source:(u=o.data)==null?void 0:u.rows,total:((g=o.data)==null?void 0:g.total)||0,count:((M=o.data)==null?void 0:M.count)||0,onKattotg:t[0]||(t[0]=C=>o.kattotg=C)},null,8,["mapId","source","total","count"]),[[e.vShow,o.activeTab=="table"]]),e.withDirectives(e.createElementVNode("div",WS,[(k=(x=o.data)==null?void 0:x.rows)!=null&&k.length?(e.openBlock(),e.createBlock(y,{key:0,source:(V=(v=o.data)==null?void 0:v.rows)==null?void 0:V.map(C=>({title:C==null?void 0:C.title,metric:C==null?void 0:C.metric}))},null,8,["source"])):e.createCommentVNode("",!0)],512),[[e.vShow,o.activeTab=="chart"]])])}const KS=Object.freeze(Object.defineProperty({__proto__:null,default:ve($S,[["render",GS]])},Symbol.toStringTag,{value:"Module"})),JS={name:"VsTable",mixins:[Pe],data(){return{values:null,xs:null,products:null}},async mounted(){await this.getData(),this.prepareData()},methods:{onChangedData(){try{this.sourceData&&this.prepareData()}catch{}},prepareData(){try{const l=Array.from(new Set(this.sourceData.map(t=>t[this.dimensions[0]])));this.dimensions[0].includes("date")?this.xs=l.map(t=>Ut(t)):this.xs=[...l],this.products=this.dimensions.filter((t,a)=>a!=0),this.values=this.products.map((t,a)=>({name:t,data:this.sourceData.filter(n=>parseFloat(n[t])).map(n=>Ze(parseFloat(n[t])))}))}catch(l){console.error(l)}}}},YS={class:"flex flex-col h-full pt-[16px] pb-[16px] space-y-4 rounded-xl"},XS={class:"overflow-auto h-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300"},QS={class:"inline-block min-w-full align-middle"},ej={class:"relative min-w-full divide-y divide-gray-200 text-[12px]"},tj={class:"sticky top-0 bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},aj={class:"space-x-2"},rj={scope:"col",class:"xl:min-w-[120px] min-w-48"},lj={class:"flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1"},nj={class:"divide-y divide-gray-200"},oj={class:"text-gray-600"};function sj(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",YS,[e.createElementVNode("div",XS,[e.createElementVNode("div",QS,[e.createElementVNode("table",ej,[e.createElementVNode("thead",tj,[e.createElementVNode("tr",aj,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dimensions,i=>(e.openBlock(),e.createElementBlock("th",rj,[e.createElementVNode("div",lj,e.toDisplayString(i),1)]))),256))])]),e.createElementVNode("tbody",nj,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.sourceData,(i,d)=>(e.openBlock(),e.createElementBlock("tr",{key:d},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.dimensions,(c,h)=>(e.openBlock(),e.createElementBlock("td",{key:h,class:"py-3 whitespace-nowrap"},[e.createElementVNode("span",oj,e.toDisplayString(i==null?void 0:i[c]),1)]))),128))]))),128))])])])])])}const ij=Object.freeze(Object.defineProperty({__proto__:null,default:ve(JS,[["render",sj]])},Symbol.toStringTag,{value:"Module"})),Zt=(l,t)=>{const a=l.__vccOpts||l;for(const[n,o]of t)a[n]=o;return a},dj={},cj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-green-600"};function hj(l,t){return e.openBlock(),e.createElementBlock("svg",cj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))}const pj=Zt(dj,[["render",hj]]),yj={},uj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"orange",class:"size-6 text-orange-600"};function kj(l,t){return e.openBlock(),e.createElementBlock("svg",uj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))}const mj=Zt(yj,[["render",kj]]),fj={},gj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-blue-600"};function xj(l,t){return e.openBlock(),e.createElementBlock("svg",gj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"},null,-1)]))}const Mj=Zt(fj,[["render",xj]]),bj={},wj={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"red",class:"size-6 text-red-600"};function vj(l,t){return e.openBlock(),e.createElementBlock("svg",wj,t[0]||(t[0]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)]))}const Vj=Zt(bj,[["render",vj]]),Cj={class:"rounded-md border border-gray-300 bg-white p-4 shadow-sm"},zj={class:"flex items-start gap-4 opacity-100 scale-5 transition-all duration-300"},Bj={class:"flex-1"},Ej={class:"font-medium text-gray-900"},_j={class:"mt-0.5 text-sm text-gray-700"},qj=e.defineComponent({__name:"vs-notify",props:{type:{},title:{},message:{}},setup(l){const t={success:pj,warning:mj,error:Vj,info:Mj};return(a,n)=>(e.openBlock(),e.createElementBlock("div",Cj,[e.createElementVNode("div",zj,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t[a.type]))),e.createElementVNode("div",Bj,[e.createElementVNode("strong",Ej,e.toDisplayString(a.title),1),e.createElementVNode("p",_j,e.toDisplayString(a.message),1)]),n[0]||(n[0]=e.createElementVNode("button",{class:"m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",type:"button","aria-label":"Dismiss notify"},[e.createElementVNode("span",{class:"sr-only"},"Dismiss popup"),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1))])]))}}),xa={top:"top-4 left-1/2 transform -translate-x-1/2","left-bottom":"bottom-4 left-4 transform","right-bottom":"bottom-4 right-4 transform",bottom:"bottom-4 left-1/2 transform -translate-x-1/2"},Me=l=>{var c;const{type:t="info",title:a,message:n,position:o="right-bottom"}=l||{};let s=document.querySelector("#notify-root");s||(s=document.createElement("div"),s.id="notify-root",s.className=`fixed z-[2000] flex flex-col gap-3 ${xa[o]} p-6 max-w-md mx-auto font-sans antialiased`,document.body.appendChild(s)),s.className.includes(xa[o])||(Object.values(xa).forEach(h=>{s.classList.remove(...h.split(" "))}),s.classList.add(...xa[o].split(" ")));const i=document.createElement("div");s.appendChild(i);const d=e.createApp({render(){return e.h(qj,{type:t,title:a,message:n,onClose:()=>{d.unmount(),i.remove()}})}});d.mount(i),(c=i.querySelector("button"))==null||c.addEventListener("click",()=>{i.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{d.unmount(),i.remove()},350)}),setTimeout(()=>{i.classList.add("opacity-0","scale-95","transition-all","duration-300"),setTimeout(()=>{d.unmount(),i.remove()},350)},3500)};e.defineComponent({name:"Copy",props:{text:{type:String,default:""},width:{type:[String,Number],default:null},notify:{type:Boolean,default:!0},notifyOptions:{type:Object,default:()=>({})}},emits:["copied","copy-error"],data(){return{slotText:""}},computed:{rootClasses(){return["vs-copy inline-flex items-center gap-2 cursor-pointer select-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500"]},containerStyle(){return!this.width&&this.width!==0?{}:{width:typeof this.width=="number"?`${this.width}px`:this.width.trim()}},displayText(){return this.text||this.slotText}},mounted(){this.updateSlotText()},updated(){this.updateSlotText()},methods:{updateSlotText(){var t,a;const l=((a=(t=this.$refs.text)==null?void 0:t.textContent)==null?void 0:a.trim())||"";l!==this.slotText&&(this.slotText=l)},async handleCopy(){const l=this.displayText;if(l)try{await this.copyToClipboard(l),this.$emit("copied",l),this.showNotify(l)}catch(t){this.$emit("copy-error",t)}},async copyToClipboard(l){var a;if((a=navigator.clipboard)!=null&&a.writeText){await navigator.clipboard.writeText(l);return}const t=document.createElement("textarea");t.value=l,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select();try{if(!document.execCommand("copy"))throw new Error("Copy command was unsuccessful")}finally{document.body.removeChild(t)}},showNotify(l){var a,n,o,s;if(!this.notify)return;const t={type:((a=this.notifyOptions)==null?void 0:a.type)??"success",title:((n=this.notifyOptions)==null?void 0:n.title)??"Copied",message:((o=this.notifyOptions)==null?void 0:o.message)??l,position:(s=this.notifyOptions)==null?void 0:s.position};Me(t)}}}),e.defineComponent({props:{modelValue:{type:Boolean,default:()=>!1},title:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{}},mounted(){this.modelValue||this.$emit("update:modelValue",!1)},computed:{modelState:{get(){return this.modelValue},set(l){this.$emit("update:modelValue",l)}},labelCursorClasses(){return[{"cursor-not-allowed":this.disabled},{"cursor-pointer":!this.disabled}]}},methods:{handleEnterDown(l){const{keyCode:t}=l;t===13&&(this.modelState=!this.modelState)},addKeyHandler(){window.addEventListener("keydown",this.handleEnterDown)},removeKeyHandler(){window.removeEventListener("keydown",this.handleEnterDown)}}});const Sj={key:0,class:"vsTailwind ui-dialog__wrapper text-gray-800"},jj={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},Aj={class:"font-medium text-gray-800 dark:text-[#ffffff]"},Dj={class:"ui-dialog__content p-4"},Nj={key:0,class:"flex justify-end gap-x-2"},Lj={key:1,class:"flex justify-end items-center gap-x-2 py-3 px-4 border-t border-gray-200 dark:border-neutral-700"},Hj=e.defineComponent({__name:"vs-modal",props:{title:{default:""},template:{},visible:{type:Boolean,default:!1},size:{default:"small"},closeClickBack:{type:Boolean,default:!1},content:{},buttonText:{},contentProps:{},teleport:{default:"body"}},emits:["update:visible","close","done"],setup(l,{emit:t}){const a=l,n=t,o=e.computed(()=>a.size==="small"?"md:w-5/12 w-9/12":a.size==="medium"?"md:w-6/12 w-9/12":"lg:w-7/12 w-11/12"),s=e.useAttrs();function i(){n("done")}function d(){n("update:visible",!1),n("close")}function c(p){p.key==="Escape"&&d()}function h(p,y){y&&p.target.classList.contains("vs-dialog-overlay")&&d()}return e.onMounted(()=>{window.addEventListener("keydown",c)}),e.onUnmounted(()=>{window.removeEventListener("keydown",c)}),(p,y)=>(e.openBlock(),e.createBlock(e.Teleport,{to:p.teleport},[p.visible?(e.openBlock(),e.createElementBlock("div",Sj,[e.createElementVNode("div",{onMousedown:y[0]||(y[0]=w=>h(w,p.closeClickBack)),class:e.normalizeClass(["vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 bg-black bg-opacity-50",[e.unref(s).class]])},[e.createVNode(e.Transition,{name:"content",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["ui-dialog__modal opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl",o.value])},[e.createElementVNode("div",jj,[e.createElementVNode("h3",Aj,e.toDisplayString(p.title),1),e.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:d},y[1]||(y[1]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))]),e.createElementVNode("div",Dj,[e.renderSlot(p.$slots,"default",{},void 0,!0)]),p.$slots.footer?(e.openBlock(),e.createElementBlock("div",Nj,[e.renderSlot(p.$slots,"footer",{handleClose:d},void 0,!0)])):e.createCommentVNode("",!0),p.buttonText?(e.openBlock(),e.createElementBlock("div",Lj,[e.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:d}," Close "),e.createElementVNode("button",{type:"button",onClick:i,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-hidden focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"},e.toDisplayString(p.buttonText),1)])):e.createCommentVNode("",!0)],2)]),_:3})],34)])):e.createCommentVNode("",!0)],8,["to"]))}}),c1=Zt(Hj,[["__scopeId","data-v-670eae4f"]]);e.reactive({visible:!0});const $j=l=>{const{template:t="",title:a="",content:n,contentProps:o={},size:s="medium"}=l||{},i=document.querySelector("body");if(!i)return console.error('Modal root element with id "#modal" not found!'),{close:()=>{}};const d=document.createElement("div");i.appendChild(d);const c={title:a,template:t,visible:!0,size:s,closeClickBack:!0,onClose:p},h=e.createApp({render(){return e.h(c1,c,{default:()=>[n?e.h(n,o):e.h("p",t)]})}});function p(){h.unmount(),d.remove()}return h.mount(d),{close:p}},Ur=e.defineComponent({__name:"vs-info-tooltip",props:{text:{}},setup(l){const t=l,a=e.ref(!1),n=e.ref({top:"0px",left:"0px"});function o(i){if(!t.text)return;const d=i.currentTarget.getBoundingClientRect();n.value={top:`${d.bottom+4}px`,left:`${Math.min(d.left,window.innerWidth-230)}px`},a.value=!0}function s(){a.value=!1}return(i,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",{class:"inline-flex items-center",onMouseenter:o,onMouseleave:s},[e.renderSlot(i.$slots,"default",{},()=>[d[0]||(d[0]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"text-gray-400 cursor-help"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("path",{d:"M12 16v-4"}),e.createElementVNode("path",{d:"M12 8h.01"})],-1))])],32),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[a.value&&i.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(n.value),class:"fixed z-[9999] max-w-xs p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none"},e.toDisplayString(i.text),5)):e.createCommentVNode("",!0)]))],64))}}),Fj={class:"w-full relative"},Tj={key:0,class:"text-[14px] font-medium text-gray-900 mb-2 flex items-center gap-1"},Pj={class:"opacity-100"},Ij={key:0,class:"text-red-500 text-[14px]"},Rj={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Oj=e.defineComponent({__name:"vs-layout-default",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=l,a=e.computed(()=>{var i,d;return typeof((i=t.item)==null?void 0:i.label)=="string"&&t.item.label?t.item.label:((d=t.item)==null?void 0:d.ua)||t.label||t.ua}),n=e.computed(()=>!!a.value),o=e.computed(()=>{var i,d;return!!((d=(i=t.item)==null?void 0:i.rules)!=null&&d.includes("required"))}),s=e.computed(()=>{var i;return((i=t.item)==null?void 0:i.info)||""});return(i,d)=>(e.openBlock(),e.createElementBlock("div",Fj,[n.value?(e.openBlock(),e.createElementBlock("div",Tj,[e.createElementVNode("span",Pj,e.toDisplayString(a.value),1),o.value?(e.openBlock(),e.createElementBlock("span",Ij,"*")):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createBlock(Ur,{key:1,text:s.value},null,8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default",e.mergeProps(i.$attrs,{class:{"opacity-60":i.item.disabled}})),i.error?(e.openBlock(),e.createElementBlock("span",Rj,e.toDisplayString(i.error),1)):e.createCommentVNode("",!0)]))}}),Uj={class:"w-full relative flex flex-row items-center gap-2"},Zj={key:0,class:"text-red-500 text-[14px]"},Wj={key:1,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Gj=e.defineComponent({__name:"vs-layout-horizontal",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{default:()=>({container:12,label:3})}},setup(l){const t=l,a=e.computed(()=>{var h;return((h=t.item)==null?void 0:h.label)||t.label||t.ua}),n=e.computed(()=>{var h;return((h=t.item)==null?void 0:h.info)||""}),o=e.computed(()=>t.columns??{container:12,label:3}),s=e.computed(()=>{const{container:h,label:p}=o.value;return!h||h<=0?0:Math.min(Math.max(p??0,0),h)/h}),i=e.computed(()=>{var h;return((h=t.item)==null?void 0:h.type)==="html"||s.value<=0?!1:!!a.value}),d=e.computed(()=>{if(!i.value)return{};const h=`${s.value*100}%`;return{flexBasis:h,maxWidth:h}}),c=e.computed(()=>{var m;const{container:h,label:p}=o.value;if(!h||h<=0)return{};if(((m=t.item)==null?void 0:m.type)==="html")return{flexBasis:"100%",maxWidth:"100%"};if(!i.value)return{flexBasis:"100%",maxWidth:"100%"};const y=Math.max(h-Math.max(p??0,0),0)/h;if(!y)return{};const w=`${y*100}%`;return{flexBasis:w,maxWidth:w}});return(h,p)=>{var y,w;return e.openBlock(),e.createElementBlock("div",Uj,[i.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-sm text-gray-900 font-medium flex shrink-0 items-center gap-1",style:e.normalizeStyle(d.value)},[e.createTextVNode(e.toDisplayString(a.value)+" ",1),(w=(y=h.item)==null?void 0:y.rules)!=null&&w.includes("required")&&a.value?(e.openBlock(),e.createElementBlock("span",Zj,"*")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createBlock(Ur,{key:1,text:n.value},null,8,["text"])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"flex-1 min-w-0",style:e.normalizeStyle(c.value)},[e.renderSlot(h.$slots,"default",e.normalizeProps(e.guardReactiveProps(h.$attrs)))],4),h.error?(e.openBlock(),e.createElementBlock("span",Wj,e.toDisplayString(h.error),1)):e.createCommentVNode("",!0)])}}}),Kj={class:"w-full relative"},Jj={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},Yj=e.defineComponent({__name:"vs-layout-inline",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",Kj,[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps(t.$attrs))),t.error?(e.openBlock(),e.createElementBlock("span",Jj,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)]))}}),Xj={class:"flex-1 min-w-0"},Qj={key:0,class:"text-sm font-medium text-slate-700 dark:text-slate-200 flex items-center gap-1"},eA={class:"truncate"},tA={key:0,class:"text-red-500 text-[14px]"},aA=["innerHTML"],rA={key:0,class:"mt-1 text-xs text-red-500"},lA=e.defineComponent({__name:"vs-layout-settings",props:{ua:{default:""},uk:{},en:{},de:{},es:{},fr:{},item:{default:()=>({})},error:{type:[String,Boolean],default:""},label:{default:""},columns:{}},setup(l){const t=l,a=e.ref("uk");e.computed(()=>{var d;return((d=t.item??{})==null?void 0:d[a.value])??t.ua??t.label??""});const n=e.computed(()=>{var d;return((d=t.item)==null?void 0:d.description)??""}),o=e.computed(()=>{var d;return Array.isArray((d=t.item)==null?void 0:d.rules)&&t.item.rules.includes("required")}),s=e.computed(()=>(typeof t.error=="string"?t.error:"")??""),i=()=>{const d=typeof localStorage<"u"?localStorage.getItem("locale"):null;a.value=d||"uk"};return e.onMounted(()=>{try{typeof localStorage<"u"&&localStorage.locale&&(a.value=localStorage.locale)}catch{}window.addEventListener("storage",i)}),e.onUnmounted(()=>{window.removeEventListener("storage",i)}),(d,c)=>{var h;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full relative",{"opacity-60":(h=d.item)==null?void 0:h.disabled}])},[e.createElementVNode("div",{class:e.normalizeClass(["gap-2 md:flex-row md:items-center md:justify-between",[["switcher","native-select"].includes(d.item.type)?"flex flex-col":""]])},[e.createElementVNode("div",Xj,[d.ua||d.label?(e.openBlock(),e.createElementBlock("p",Qj,[e.createElementVNode("span",eA,e.toDisplayString(d.item[a.value]||d.ua||d.label),1),o.value?(e.openBlock(),e.createElementBlock("span",tA,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("p",{key:1,class:"text-xs text-slate-500 dark:text-slate-400",innerHTML:n.value},null,8,aA)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["w-full",["select","native-select"].includes(d.item.type)?"md:w-[30%]":"md:w-auto"])},[e.renderSlot(d.$slots,"default",e.normalizeProps(e.guardReactiveProps(d.$attrs)))],2)],2),s.value?(e.openBlock(),e.createElementBlock("p",rA,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)],2)}}}),nA={default:Oj,horizontal:Gj,inline:Yj,settings:lA};function He(l){return{inputClass:e.computed(()=>{const t=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${(l==null?void 0:l.primaryColor)||"blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;return(l==null?void 0:l.size)==="sm"?`${t}h-[32px]`:`${t}h-[38px]`})}}const oA=["placeholder","disabled"],sA=e.defineComponent({__name:"vs-input-password",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled),s=e.computed(()=>t.placeholder??"");return(i,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"password","onUpdate:modelValue":d[0]||(d[0]=c=>n.value=c),placeholder:s.value,disabled:o.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":i.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,oA)),[[e.vModelText,n.value]])}}),iA=["placeholder","disabled","maxlength","minlength"],zt=e.defineComponent({__name:"vs-input-text",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled),s=e.computed(()=>t.placeholder??""),i=e.computed(()=>t.maxlength??void 0),d=e.computed(()=>t.minlength??void 0);function c(){typeof n.value=="string"&&(n.value=n.value.trim())}return(h,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"text","onUpdate:modelValue":p[0]||(p[0]=y=>n.value=y),placeholder:s.value,disabled:o.value,maxlength:i.value,minlength:d.value,onBlur:c,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[h.customClass,e.unref(a),{"!border-red-600":h.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,iA)),[[e.vModelText,n.value]])}}),dA=["placeholder","disabled","min","max"],Zr=e.defineComponent({__name:"vs-input-number",props:e.mergeModels({min:{},max:{},style:{default:()=>({})},customClass:{},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled);return(s,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"number",step:"any","onUpdate:modelValue":i[0]||(i[0]=d=>n.value=d),placeholder:s.placeholder,disabled:o.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"},min:s.min,max:s.max},null,10,dA)),[[e.vModelText,n.value]])}}),ce=(l,t)=>{const a=l.__vccOpts||l;for(const[n,o]of t)a[n]=o;return a},cA={},hA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function pA(l,t){return e.openBlock(),e.createElementBlock("svg",hA,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const yA=ce(cA,[["render",pA]]),uA={class:"flex items-center gap-[4px]"},kA=["value","id","disabled"],mA=["for"],fA={class:"text-[14px] text-gray-700 flex items-center dark:text-neutral-400"},gA=e.defineComponent({__name:"vs-checkbox-default",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},id:{},modelValue:{default:""},info:{},error:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=t,n=l,o=e.computed({get:()=>n.modelValue,set:i=>a("update:modelValue",i)}),s=e.computed(()=>!!n.disabled);return(i,d)=>(e.openBlock(),e.createElementBlock("div",uA,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:i.value,"onUpdate:modelValue":d[0]||(d[0]=c=>o.value=c),class:e.normalizeClass(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":s.value}]),id:i.id,disabled:s.value},null,10,kA),[[e.vModelCheckbox,o.value]]),e.createElementVNode("label",{for:i.id,class:e.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":s.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[o.value?"bg-blue-600 border-blue-600":"bg-white border-gray-600",i.error?"border-red-600":""]])},[e.createVNode(yA,{height:"12",width:"12"})],2),e.createElementVNode("span",fA,[e.renderSlot(i.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(i.label),1)])])],10,mA)]))}}),xA=["name","value","disabled"],MA={class:"flex items-center gap-[6px] text-[14px]"},bA={key:0,class:"text-[16px]"},wA=["src"],vA=e.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{default:""},modelValue:{default:""},disabled:{type:Boolean},id:{},icon:{},imgUrl:{},style:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,o=e.computed({get:()=>a.modelValue,set:d=>{n("update:modelValue",d)}}),s=e.computed(()=>Array.isArray(o.value)?o.value.includes(a.value):o.value===!0||o.value===a.value),i=e.computed(()=>{var d,c;return((d=a.style)==null?void 0:d.size)==="xs"?"p-1.5 text-xs":((c=a.style)==null?void 0:c.size)==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs"});return(d,c)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[i.value,s.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"hidden",name:d.id,value:d.value,"onUpdate:modelValue":c[0]||(c[0]=h=>o.value=h),disabled:d.disabled},null,8,xA),[[e.vModelCheckbox,o.value]]),e.createElementVNode("span",MA,[d.icon||d.imgUrl?(e.openBlock(),e.createElementBlock("span",bA,[d.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(d.icon)},null,2)):e.createCommentVNode("",!0),d.imgUrl?(e.openBlock(),e.createElementBlock("img",{key:1,src:d.imgUrl,width:"16",height:"16",alt:"icon"},null,8,wA)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(d.label),1)])])],2))}}),VA={class:"flex items-center"},h1=e.defineComponent({__name:"vs-input-checkbox-item",props:{value:{default:""},label:{default:""},disabled:{type:Boolean,default:!1},view:{default:"default"},modelValue:{type:[Boolean,Array],default:!1},icon:{},imgUrl:{},slots:{},option:{},style:{},error:{default:""}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,o=`radio-${Math.floor(Math.random()*1e4)}`,s=e.computed({get:()=>Array.isArray(a.modelValue)?Array.isArray(a.modelValue)&&a.modelValue.includes(a.value):a.modelValue,set:d=>{if(Array.isArray(a.modelValue)){let c=[...a.modelValue];d?c.includes(a.value)||c.push(a.value):c=c.filter(h=>h!==a.value),n("update:modelValue",c)}else n("update:modelValue",d)}}),i=e.ref(`vs-checkbox-${a.view||"default"}`);return(d,c)=>{var h;return e.openBlock(),e.createElementBlock("div",VA,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value==="vs-checkbox-buttons"?e.unref(vA):e.unref(gA)),{value:d.value,label:d.label,info:(h=d.option)==null?void 0:h.info,disabled:d.disabled,modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=p=>s.value=p),id:o,icon:d.icon,imgUrl:d.imgUrl,style:e.normalizeStyle(d.style),error:d.error},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style","error"]))])}}}),CA={},zA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function BA(l,t){return e.openBlock(),e.createElementBlock("svg",zA,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const p1=ce(CA,[["render",BA]]),EA={},_A={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x"};function qA(l,t){return e.openBlock(),e.createElementBlock("svg",_A,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const Ma=ce(EA,[["render",qA]]),SA={},jA={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function AA(l,t){return e.openBlock(),e.createElementBlock("svg",jA,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M12 9h.01"},null,-1),e.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1),e.createElementVNode("path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z"},null,-1)]))}const DA=ce(SA,[["render",AA]]),NA={key:0,class:"flex items-start gap-x-1"},LA={key:0,class:"text-red-500 text-[14px]"},HA=["title"],$A=["disabled"],y1=e.defineComponent({__name:"vs-input-switcher",props:e.mergeModels({rules:{default:()=>[]},view:{default:"checkbox"},label:{default:""},i:{default:""},text:{default:""},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue");return(n,o)=>{var s,i;return t.view==="checkbox"?(e.openBlock(),e.createElementBlock("div",NA,[e.createVNode(h1,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=d=>a.value=d),label:n.text,error:n.error||""},null,8,["modelValue","label","error"]),(s=n.rules)!=null&&s.includes("required")?(e.openBlock(),e.createElementBlock("span",LA,"*")):e.createCommentVNode("",!0),n.i?(e.openBlock(),e.createElementBlock("button",{key:1,class:"cursor-pointer",title:n.i,onClick:o[1]||(o[1]=e.withModifiers(()=>{},["prevent"]))},[e.createVNode(e.unref(DA),{class:"text-gray-500 w-[14px] h-[14px]"})],8,HA)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[a.value?`bg-${((i=n.style)==null?void 0:i.primaryColor)||"blue"}-500`:"bg-stone-200",n.customClass]]),disabled:n.disabled,onClick:o[2]||(o[2]=d=>a.value=!a.value)},[e.createElementVNode("span",{"data-state":"checked",class:e.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[a.value?"translate-x-4":"translate-x-0"]])},null,2)],10,$A))}}}),FA=["id","innerHTML"],u1=e.defineComponent({__name:"vs-input-static",props:{text:{default:""},html:{default:""},style:{},customClass:{default:""},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",{id:t.name,class:e.normalizeClass(["text-gray-900",t.customClass]),innerHTML:t.html?t.html:t.text},null,10,FA))}}),TA=["placeholder","disabled","name"],k1=e.defineComponent({__name:"vs-input-mask",props:e.mergeModels({name:{},mask:{default:""},unmask:{type:Boolean,default:!1},placeholder:{default:"_"},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.ref(null);let s=null;function i(d){const c={9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},h=new Set;let p=!1;for(let w=0;w<d.length;w+=1){const m=d[w];m==="{"?p=!0:m==="}"?p=!1:p&&h.add(m)}const y={};return Object.keys(c).forEach(w=>{h.has(w)||(y[w]=c[w])}),{mask:d,definitions:y,lazy:!1}}return e.onMounted(async()=>{if(o.value){const{default:d}=await Promise.resolve().then(()=>D1),c=i(t.mask||"");s=d(o.value,c),s.on("accept",()=>{n.value=t.unmask?s.unmaskedValue:s.value}),s.on("complete",()=>{n.value=t.unmask?s.unmaskedValue:s.value}),s.value=n.value!=null?String(n.value):""}}),e.onBeforeUnmount(()=>{s==null||s.destroy()}),e.watch(()=>t.mask,d=>{if(s){const c=i(d||"");s.updateOptions(c)}}),e.watch(n,d=>{s&&s.unmaskedValue!==d&&(s.value=d!=null?String(d):"")}),(d,c)=>(e.openBlock(),e.createElementBlock("input",{type:"text",ref_key:"inputEl",ref:o,placeholder:d.placeholder,disabled:d.disabled,name:d.name,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,10,TA))}}),PA={class:"relative w-full bg-white rounded-lg"},IA=["placeholder","disabled"],m1=e.defineComponent({__name:"vs-input-email",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:null},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue");return(o,s)=>(e.openBlock(),e.createElementBlock("div",PA,[s[1]||(s[1]=e.createStaticVNode('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>',1)),e.withDirectives(e.createElementVNode("input",{type:"email","onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),placeholder:o.placeholder,disabled:o.disabled,class:e.normalizeClass(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":o.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,IA),[[e.vModelText,n.value]])]))}}),RA={class:"relative w-full bg-white rounded-lg"},OA=["value","placeholder","disabled"],f1=e.defineComponent({__name:"vs-input-tel",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:null},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>n.value?n.value.startsWith("+")?n.value.slice(1):n.value:""),s=d=>{let{value:c}=d.target;c=c.replace(/^\+/,""),n.value=c?`+${c}`:""},i=d=>{const c=d,{data:h,inputType:p}=c;p&&p.startsWith("delete")||h&&/\D/.test(h)&&c.preventDefault()};return e.watch(()=>n.value,d=>{d&&!d.startsWith("+")?n.value=`+${d.replace(/^\+/,"")}`:d||(n.value="")},{immediate:!0}),(d,c)=>(e.openBlock(),e.createElementBlock("div",RA,[c[0]||(c[0]=e.createElementVNode("div",{class:"absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"stroke-gray-500 transition-all"},[e.createElementVNode("path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"})])],-1)),c[1]||(c[1]=e.createElementVNode("div",{class:"absolute bottom-2/4 translate-y-2/4 left-[30px] text-gray-500 select-none pointer-events-none"}," + ",-1)),e.createElementVNode("input",{type:"tel",value:o.value,onInput:s,onBeforeinput:i,pattern:"^\\+[1-9]\\d{1,14}$",maxlength:"15",placeholder:d.placeholder,disabled:d.disabled,class:e.normalizeClass(["!pl-10 py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(a),{"!border-red-600":d.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,OA)]))}}),UA=["value","disabled"],ZA={class:"text-[13px] text-gray-700"},WA=e.defineComponent({__name:"vs-input-radio-default",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled);return(o,s)=>{var i,d;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center gap-0",[t.customClass,n.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=c=>a.value=c),type:"radio",value:t.value,disabled:n.value,class:"hidden"},null,8,UA),[[e.vModelRadio,a.value]]),e.createElementVNode("span",{class:e.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${((i=t.style)==null?void 0:i.primaryColor)||"blue"}-500`,n.value?"opacity-50 cursor-not-allowed":""]])},[a.value==t.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${((d=t.style)==null?void 0:d.primaryColor)||"blue"}-500`]])},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("span",ZA,e.toDisplayString(t.text),1)],2)}}}),GA=["value","disabled"],KA={class:"text-[13px] text-gray-700"},JA=e.defineComponent({__name:"vs-input-radio-buttons",props:e.mergeModels({style:{},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{},value:{},text:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>!!t.disabled);return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[a.value==t.value?`ring-2 ring-ring ring-${((i=t.style)==null?void 0:i.primaryColor)||"blue"}-500`:"",t.customClass,n.value?"cursor-not-allowed opacity-60":""]])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=d=>a.value=d),type:"radio",value:t.value,disabled:n.value,class:"hidden"},null,8,GA),[[e.vModelRadio,a.value]]),e.createElementVNode("span",KA,e.toDisplayString(t.text),1)],2)}}}),YA={"vs-input-radio-default":WA,"vs-input-radio-buttons":JA},g1=e.defineComponent({__name:"vs-input-radio",props:e.mergeModels({options:{},position:{default:"vertical"},view:{default:"default"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>YA[`vs-input-radio-${t.view}`]);return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,i=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),e.mergeProps({key:i==null?void 0:i.id,text:i.text,value:i.id.toString(),checked:a.value===i.id,modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=d=>a.value=d)},{ref_for:!0},o.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}}),XA={key:1,class:"w-full flex flex-col gap-4"},QA={key:0,class:"text-sm font-medium text-muted-foreground my-2"},eD="Без категорії",tD=e.defineComponent({__name:"vs-input-checkbox",props:{options:{default:()=>[]},position:{default:"vertical"},slots:{default:null},colSpan:{default:0},data:{},view:{},group:{default:void 0},values:{default:()=>[]},style:{},customClass:{},disabled:{type:Boolean},modelValue:{default:!1},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,o=e.ref([]),s=e.reactive({}),i=m=>(m==null?void 0:m.value)||(m==null?void 0:m.id)||(m==null?void 0:m.text)||m,d=m=>m.text||String(m),c=m=>`lg:col-span-${m||12}`,h=e.computed(()=>[a.position==="vertical"?"flex flex-col":"",a.colSpan?"grid":"flex justify-start"]),p=m=>m==null||m===""?null:typeof m=="string"||typeof m=="number"?m:String(m),y=e.computed(()=>{var x;if(!a.group)return[];const m=new Map;o.value.forEach(k=>{var C;const v=k[a.group],V=p(v);m.has(V)||m.set(V,[]),(C=m.get(V))==null||C.push(k)});const f=[];(x=a.values)!=null&&x.length&&a.values.forEach(k=>{const v=p(k);f.push(v)});const u=new Set,g=k=>{const v=m.get(k)||[];if(!v.length)return null;const V=k===null?"group-null":`group-${String(k)}`,C=k===null?eD:String(k);return u.add(k),{key:V,label:C,options:v}},M=[];return f.forEach(k=>{const v=g(k);v&&M.push(v)}),m.forEach((k,v)=>{if(u.has(v))return;const V=g(v);V&&M.push(V)}),M}),w=async()=>{try{const m=await fetch(`/api/suggest/${a.data}`).then(f=>f.json());o.value=(m==null?void 0:m.data)||m}catch(m){console.error(m)}};return e.watch(()=>a.modelValue,m=>{if(typeof m=="boolean"&&o.value.length===1){const f=i(o.value[0]);s[f]=m}else if(Array.isArray(m)){const f=new Set(m);o.value.forEach(u=>{if(!u.disabled){const g=i(u);s[g]=f.has(g)}})}},{immediate:!0}),e.watch(s,()=>{if(!o.value.length){n("update:modelValue",null);return}const m=Object.entries(s).filter(([,f])=>f).map(([f])=>f);n("update:modelValue",m.length===0?[]:m)},{deep:!0}),e.onMounted(()=>{if(a.data)w().then(()=>{if(typeof a.modelValue=="boolean"&&o.value.length===1){const m=i(o.value[0]);s[m]=a.modelValue}else if(Array.isArray(a.modelValue)){const m=new Set(a.modelValue);o.value.forEach(f=>{if(!f.disabled){const u=i(f);s[u]=m.has(u)}})}});else if(o.value=a.options,typeof a.modelValue=="boolean"&&o.value.length===1){const m=i(o.value[0]);s[m]=a.modelValue}else if(Array.isArray(a.modelValue)){const m=new Set(a.modelValue);o.value.forEach(f=>{if(!f.disabled){const u=i(f);s[u]=m.has(u)}})}}),(m,f)=>a.group?(e.openBlock(),e.createElementBlock("div",XA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u.key,class:"flex flex-col gap-2"},[u.label?(e.openBlock(),e.createElementBlock("span",QA,e.toDisplayString(u.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["p-0 w-full gap-[12px]",h.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.options,g=>(e.openBlock(),e.createBlock(h1,{modelValue:s[i(g)],"onUpdate:modelValue":M=>s[i(g)]=M,value:i(g),class:e.normalizeClass(c(m.colSpan)),disabled:a.disabled||g.disabled,label:d(g),key:`${u.key}-${i(g)}`,icon:g==null?void 0:g.icon,imgUrl:g==null?void 0:g.imgUrl,option:g,view:m.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2)]))),128))])):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["p-0 w-full gap-[10px]",h.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(h1,{modelValue:s[i(u)],"onUpdate:modelValue":g=>s[i(u)]=g,value:i(u),class:e.normalizeClass(c(m.colSpan)),disabled:a.disabled||u.disabled,label:d(u),key:i(u),icon:u==null?void 0:u.icon,imgUrl:u==null?void 0:u.imgUrl,option:u,view:m.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","view"]))),128))],2))}}),Wr=ce(tD,[["__scopeId","data-v-8e66207e"]]),aD=["type","placeholder","disabled"],rD=e.defineComponent({__name:"vs-input-date1",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{},mode:{default:"date"}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l;function n(p){return p?a.mode==="datetime"?(p.includes("T")?p:null)||p+(p.includes(" ")?"":"T00:00"):p==null?void 0:p.split(" ")[0]:null}const{inputClass:o}=He(a.style),s=t,i=e.computed({get:()=>n(a.modelValue),set:p=>s("update:modelValue",p)}),d=e.computed(()=>a.mode==="datetime"?"datetime-local":a.mode),c=e.computed(()=>!!a.disabled),h=e.computed(()=>a.placeholder??"");return(p,y)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:d.value,"onUpdate:modelValue":y[0]||(y[0]=w=>i.value=w),placeholder:h.value,disabled:c.value,ref:"date",class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[p.modelValue?"":"text-opacity-50",e.unref(o)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,aD)),[[e.vModelDynamic,i.value]])}}),lD=(l,t)=>{if(!t||!Object.keys(t).length)return l;const[a,n=""]=l.split("?"),o=new URLSearchParams(n);Object.entries(t).forEach(([i,d])=>{d==null||d===""||o.set(i,String(d))});const s=o.toString();return s?`${a}?${s}`:a},Gr=async(l,t={})=>{var a;try{const n=new FormData;n.append("unique","true"),n.append("file",l);const{api:o,id:s="1",form:i="form",table:d="table",customParams:c}=t,h=o||`/file/upload/uploads?id=${s||""}&form=${i||""}&table=${d||""}`,p=lD(h,c);return(a=await fetch(p,{method:"POST",body:n}).then(y=>y.json()))==null?void 0:a.result}catch(n){return Me({type:"error",title:"Помилка!",message:"Сталась помилка під час завантаження файлу",position:"right-bottom"}),console.error("Сталась помилка завантаження файлу",n),null}},nD=async l=>{try{return await fetch(`file/delete${l}`),!0}catch(t){return console.error(t),!1}},Kr=async l=>{try{const t=await fetch(`/file/download/files/uploads${l}`),a=await t.arrayBuffer(),n=t.headers["content-type"],o=new TextDecoder("utf-8").decode(a),s=new Blob([o],{type:n}),i=document.createElement("a");i.setAttribute("download",l),i.href=window.URL.createObjectURL(s),i.click()}catch(t){console.error(t.message)}},oD={},sD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function iD(l,t){return e.openBlock(),e.createElementBlock("svg",sD,t[0]||(t[0]=[e.createElementVNode("path",{d:"M5 12h14"},null,-1),e.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const Qe=ce(oD,[["render",iD]]),dD={},cD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function hD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",cD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const pD=ce(dD,[["render",hD]]),yD={},uD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function kD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",uD,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),e.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),e.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const mD=ce(yD,[["render",kD]]),fD={},gD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function xD(l,t){return e.openBlock(),e.createElementBlock("svg",gD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path>',6)]))}const Jr=ce(fD,[["render",xD]]),MD={},bD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function wD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",bD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const vD=ce(MD,[["render",wD]]),VD={},CD={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function zD(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("svg",CD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const BD=ce(VD,[["render",zD]]),ED=l=>{if(!l)return"";const t=l==null?void 0:l.split(".");return t[t.length-1]},_D=l=>{const t=ED(l),a={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return a.imageFormat.includes(t)?"img":a.sheetsFormat.includes(t)?mD:a.textsFormat.includes(t)?BD:a.documentsFormat.includes(t)?pD:a.archivesFormat.includes(t)?vD:Jr},qD={},SD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function jD(l,t){return e.openBlock(),e.createElementBlock("svg",SD,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const Bt=ce(qD,[["render",jD]]),AD={},DD={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function ND(l,t){return e.openBlock(),e.createElementBlock("svg",DD,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const Yr=ce(AD,[["render",ND]]),LD=["title"],HD={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},$D=e.defineComponent({__name:"vs-input-file-list-item",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},api:{},customParams:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(l){const t=e.useModel(l,"value"),a=e.useModel(l,"item"),n=l;return(o,s)=>(e.openBlock(),e.createElementBlock("div",{title:a.value,class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_D)(a.value)),{src:a.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:s[0]||(s[0]=i=>e.unref(Kr)(a.value))},null,8,["src"])),e.createElementVNode("div",HD,[e.createElementVNode("button",{type:"button",onClick:s[1]||(s[1]=i=>{var d;e.unref(nD)(a.value),t.value=n.multiple?(d=t.value)==null?void 0:d.filter(c=>c!==a.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[e.createVNode(Bt,{class:"w-4 h-4"})]),e.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=i=>e.unref(Kr)(a.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[e.createVNode(Yr,{class:"w-4 h-4"})])])],8,LD))}}),x1=ce($D,[["__scopeId","data-v-286cdbc0"]]),FD={class:"flex items-center gap-x-2"},TD=["accept","multiple","disabled"],PD={key:1,class:"flex items-center flex-wrap gap-2"},ID={key:1,class:"loader"},RD={key:1,class:"loader"},OD=e.defineComponent({__name:"vs-input-file",props:e.mergeModels({format:{},multiple:{type:Boolean},max_size:{},api:{},customParams:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=e.useModel(l,"modelValue"),o=t,s=e.ref(null),i=e.ref(!1),d=e.inject("values"),c=e.computed(()=>a.format?a.format.split(",").map(x=>x.trim().toLowerCase()).filter(Boolean):[]),h=x=>Array.isArray(n.value)&&n.value[x]||"",p=x=>{if(a.max_size&&x.size>a.max_size*1024*1024){const k=(x.size/1048576).toFixed(2);return Me({type:"error",title:"Помилка!",message:`Файл "${x.name}" занадто великий. Максимальний розмір: ${a.max_size} МБ, розмір файлу: ${k} МБ`,position:"right-bottom"}),!1}return!0},y=x=>{var V;if(!c.value.length)return!0;const k=`.${((V=x.name.split(".").pop())==null?void 0:V.toLowerCase())||""}`,v=c.value.includes(k);return v||Me({type:"error",title:"Помилка!",message:`Неприпустимий формат файлу "${x.name}". Дозволені формати: ${c.value.join(", ")}`,position:"right-bottom"}),v},w=e.computed(()=>{var V;const x={},k=[];if(!((V=a.customParams)!=null&&V.length))return{params:x,missingSources:k};const v=(d==null?void 0:d.value)??{};return a.customParams.forEach(C=>{if(!C)return;const[q,L]=C.split("="),ee=q==null?void 0:q.trim(),K=L==null?void 0:L.trim();if(!ee||!K)return;const H=v[K];if(H==null||H===""){k.push(K);return}x[ee]=H}),{params:x,missingSources:k}}),m=()=>{const{params:x}=w.value;return{api:a.api,customParams:Object.keys(x).length?x:void 0}},f=()=>{const x=w.value.missingSources;if(!x.length)return!0;const k=x.join(", ");return Me({type:"warning",title:"Заповніть поля",message:`Поля (${k}) необхідні для завантаження файлу`,position:"right-bottom"}),!1},u=x=>{Me({type:"error",title:"Помилка завантаження",message:x||"Не вдалося завантажити файл. Спробуйте ще раз.",position:"right-bottom"})},g=()=>{var x;a.disabled||i.value||f()&&((x=s.value)==null||x.click())},M=async x=>{const{files:k}=x.target;if(!k||k.length===0)return;if(!f()){s.value&&(s.value.value="");return}const v=Array.from(k);if(a.max_size&&v.filter(V=>!p(V)).length>0){s.value&&(s.value.value="");return}if(v.filter(V=>!y(V)).length>0){s.value&&(s.value.value="");return}i.value=!0;try{if(a.multiple){const V=Array.from(k).map(async L=>await Gr(L,m())),C=await Promise.all(V),q=C.filter(L=>L!==null).map(L=>L==null?void 0:L.file_path).filter(Boolean);if(q.length===0){u();return}q.length<C.length&&u("Деякі файли не вдалося завантажити. Перевірте їх та спробуйте знову."),n.value=[...n.value||[],...q],o("change",n.value)}else{const V=k[0],C=await Gr(V,m());if(!(C!=null&&C.file_path)){u();return}n.value=C==null?void 0:C.file_path,o("change",n.value||"")}}catch(V){const C=(V==null?void 0:V.message)||void 0;u(C)}finally{i.value=!1,s.value&&(s.value.value="")}};return(x,k)=>(e.openBlock(),e.createElementBlock("div",FD,[e.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:s,type:"file",accept:a.format,multiple:x.multiple,onChange:M,disabled:i.value||x.disabled},null,40,TD),!x.multiple&&n.value?(e.openBlock(),e.createBlock(x1,{key:0,item:n.value,"onUpdate:item":k[0]||(k[0]=v=>n.value=v),value:n.value,"onUpdate:value":k[1]||(k[1]=v=>n.value=v)},null,8,["item","value"])):x.multiple?(e.openBlock(),e.createElementBlock("div",PD,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(v,V)=>(e.openBlock(),e.createBlock(x1,{multiple:x.multiple,key:V,value:n.value,"onUpdate:value":k[2]||(k[2]=C=>n.value=C),item:h(V)},null,8,["multiple","value","item"]))),128)),e.createElementVNode("div",{onClick:g,class:e.normalizeClass(["relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",x.disabled||i.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[i.value?(e.openBlock(),e.createElementBlock("div",ID)):(e.openBlock(),e.createBlock(Qe,{key:0,class:"w-6 h-6"}))],2)])):e.createCommentVNode("",!0),x.multiple?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:g,class:e.normalizeClass([x.disabled||i.value?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","relative h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[i.value?(e.openBlock(),e.createElementBlock("div",RD)):(e.openBlock(),e.createBlock(Qe,{key:0,class:"w-6 h-6"}))],2))]))}}),Xr=ce(OD,[["__scopeId","data-v-cf6efbaa"]]),UD={class:"vs-input-file2 flex flex-col gap-4"},ZD={class:"flex items-center gap-x-2"},WD=["accept","disabled"],GD={key:0,class:"absolute inset-0 flex flex-col items-center justify-center gap-1 rounded-lg bg-white/90 text-xs font-medium text-slate-600"},KD={key:0,class:"rounded-lg border border-[#CFD9E0] bg-white p-4 shadow-sm"},JD={class:"flex items-center justify-between text-sm"},YD={class:"truncate pr-4"},XD={class:"font-medium text-slate-800 truncate"},QD={class:"text-slate-500"},eN={class:"text-slate-500 whitespace-nowrap"},tN={class:"mt-3 h-2 rounded-full bg-slate-100 overflow-hidden"},aN={class:"mt-3 flex flex-wrap gap-2 text-sm"},rN={key:0,class:"mt-2 text-sm text-rose-600"},lN=e.defineComponent({__name:"vs-input-file2",props:e.mergeModels({format:{},max_size:{},api:{},chunkSize:{default:5*1024*1024},subdir:{default:""},customParams:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(null),o=e.ref(null),s=e.ref(""),i=e.ref(0),d=e.ref(!1),c=e.ref(""),h=e.ref(null),p=e.inject("values"),y=e.computed(()=>t.format?t.format.split(",").map(B=>B.trim().toLowerCase()).filter(Boolean):[]),w=e.computed(()=>!o.value||!o.value.size?0:Math.min(100,Math.round(i.value/o.value.size*100))),m=e.computed(()=>o.value?`${g(i.value)} / ${g(o.value.size)}`:""),f=e.computed(()=>t.disabled?"opacity-50 cursor-not-allowed":d.value?"cursor-default text-blue-500":"cursor-pointer hover:border-blue-500 hover:bg-blue-50 hover:text-blue-500"),u=()=>{var B;t.disabled||d.value||v()&&((B=n.value)==null||B.click())},g=B=>{if(!Number.isFinite(B))return"0 B";const T=["B","KB","MB","GB"];let N=0,U=B;for(;U>=1024&&N<T.length-1;)U/=1024,N+=1;return`${U.toFixed(N===0?0:1)} ${T[N]}`},M=B=>{if(!t.max_size)return!0;const T=t.max_size*1024*1024;return B.size>T?(Me({type:"error",title:"Файл занадто великий",message:`Максимальний розмір ${t.max_size} МБ`,position:"right-bottom"}),!1):!0},x=B=>{var N;if(!y.value.length)return!0;const T=`.${((N=B.name.split(".").pop())==null?void 0:N.toLowerCase())||""}`;return y.value.includes(T)?!0:(Me({type:"error",title:"Непідтримуваний формат",message:`Дозволені формати: ${y.value.join(", ")}`,position:"right-bottom"}),!1)},k=e.computed(()=>{var U;const B={},T=[];if(!((U=t.customParams)!=null&&U.length))return{params:B,missing:T};const N=(p==null?void 0:p.value)??{};return t.customParams.forEach($=>{if(!$)return;const[Q,Y]=$.split("="),ie=Q==null?void 0:Q.trim(),he=Y==null?void 0:Y.trim();if(!ie||!he)return;const _e=N[he];_e==null||_e===""?T.push(he):B[ie]=_e}),{params:B,missing:T}}),v=()=>k.value.missing.length?(Me({type:"warning",title:"Заповніть поля",message:`Потрібні значення: ${k.value.missing.join(", ")}`,position:"right-bottom"}),!1):!0,V=B=>{var U;const T=B.target,N=(U=T.files)==null?void 0:U[0];if(N){if(!v()){T.value="";return}if(!M(N)||!x(N)){T.value="";return}o.value=N,i.value=0,s.value="",c.value=""}},C=async()=>{if(!o.value){u();return}try{c.value="";const B={id:s.value||"",fileName:o.value.name,subdir:t.subdir,size:o.value.size,...k.value.params},T=await fetch("/api/file/upload2/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!T.ok)throw new Error("Не вдалося ініціалізувати завантаження");const N=await T.json();s.value=N.id||s.value,i.value=N.uploaded||0,await q()}catch(B){c.value=(B==null?void 0:B.message)||"Помилка при старті завантаження"}},q=async()=>{if(!(!o.value||!s.value)){d.value=!0;try{for(;i.value<o.value.size;){const B=i.value,T=Math.min(B+t.chunkSize,o.value.size),N=o.value.slice(B,T);h.value=new AbortController;const U=await fetch(`/api/file/upload2/${s.value}`,{method:"PATCH",headers:{"Content-Range":`bytes ${B}-${T-1}/${o.value.size}`},body:N,signal:h.value.signal});if(!U.ok)throw new Error("Помилка завантаження частини");const $=await U.json().catch(()=>({}));if($.uploaded!=null?i.value=Number($.uploaded):i.value=T,$.finished||i.value>=o.value.size){d.value=!1,a.value=$.file_path||$.url||s.value,Me({type:"success",title:"Файл завантажено",message:o.value.name,position:"right-bottom"}),H();return}}}catch(B){if((B==null?void 0:B.name)==="AbortError")return;c.value=(B==null?void 0:B.message)||"Помилка при завантаженні",d.value=!1}finally{h.value=null,d.value=!1}}},L=()=>{var B;d.value&&((B=h.value)==null||B.abort(),h.value=null,d.value=!1)},ee=async()=>{if(o.value){if(!s.value){await C();return}await q()}},K=()=>{var B;(B=h.value)==null||B.abort(),h.value=null,H()},H=()=>{const B=n.value;B&&(B.value=""),o.value=null,s.value="",i.value=0,c.value=""};return(B,T)=>{var N;return e.openBlock(),e.createElementBlock("div",UD,[e.createElementVNode("div",ZD,[e.createElementVNode("input",{ref_key:"fileInput",ref:n,type:"file",class:"hidden",accept:t.format,disabled:d.value||t.disabled,onChange:V},null,40,WD),a.value?(e.openBlock(),e.createBlock(x1,{key:0,item:a.value,"onUpdate:item":T[0]||(T[0]=U=>a.value=U),value:a.value,"onUpdate:value":T[1]||(T[1]=U=>a.value=U)},null,8,["item","value"])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:u,class:e.normalizeClass(["relative h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",f.value])},[d.value?(e.openBlock(),e.createElementBlock("div",GD,[T[2]||(T[2]=e.createElementVNode("div",{class:"loader"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(w.value)+"%",1)])):(e.openBlock(),e.createBlock(Qe,{key:1,class:"w-6 h-6"}))],2))]),o.value&&!a.value?(e.openBlock(),e.createElementBlock("div",KD,[e.createElementVNode("div",JD,[e.createElementVNode("div",YD,[e.createElementVNode("div",XD,e.toDisplayString(o.value.name),1),e.createElementVNode("div",QD,e.toDisplayString(g(o.value.size)),1)]),e.createElementVNode("div",eN,e.toDisplayString(m.value),1)]),e.createElementVNode("div",tN,[e.createElementVNode("div",{class:"h-full rounded-full bg-blue-500 transition-all duration-300",style:e.normalizeStyle({width:`${w.value}%`})},null,4)]),e.createElementVNode("div",aN,[!d.value&&i.value>0&&i.value<(((N=o.value)==null?void 0:N.size)||0)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"rounded border border-slate-300 px-3 py-1",onClick:ee}," Resume ")):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"rounded border border-slate-300 px-3 py-1",onClick:L}," Pause ")):e.createCommentVNode("",!0),!d.value&&i.value===0?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"rounded border border-slate-300 px-3 py-1",onClick:C}," Upload ")):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"rounded border border-rose-200 px-3 py-1 text-rose-600",onClick:K}," Cancel ")]),c.value?(e.openBlock(),e.createElementBlock("p",rN,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])}}}),M1=ce(lN,[["__scopeId","data-v-ea9f874f"]]),nN={class:"max-w-[55vw]"},oN={class:"text-sm font-semibold text-gray-800 truncate dark:text-neutral-200"},sN={class:"flex items-center text-xs text-gray-500 truncate dark:text-neutral-500"},iN={class:"px-[5px]"},dN={class:""},ba=e.defineComponent({__name:"vs-widget-file-info",props:{item:{default:null}},setup(l){const t=l,a=e.computed(()=>{try{return new Date(t.item.cdate).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}});function n(o){if(o<1024)return`${o} B`;const s=o/1024;return s<1024?`${s.toFixed(2)} KB`:`${(s/1024).toFixed(2)} MB`}return(o,s)=>{var i,d,c,h;return e.openBlock(),e.createElementBlock(e.Fragment,null,[s[1]||(s[1]=e.createStaticVNode('<div class="flex items-center justify-center h-[30px] w-[30px]"><svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-file"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path></svg></div>',1)),e.createElementVNode("div",nN,[e.createElementVNode("p",oN,e.toDisplayString((i=o.item)==null?void 0:i.uploaded_name),1),e.createElementVNode("p",sN,[e.createElementVNode("span",null,e.toDisplayString((d=o.item)==null?void 0:d.username),1),e.withDirectives(e.createElementVNode("span",iN,"|",512),[[e.vShow,(c=o.item)==null?void 0:c.username]]),e.createElementVNode("span",null,e.toDisplayString(a.value),1),s[0]||(s[0]=e.createElementVNode("span",{class:"px-[5px]"},"|",-1)),e.createElementVNode("span",dN,e.toDisplayString(n((h=o.item)==null?void 0:h.size)),1)])])],64)}}}),cN={class:"p-3 relative group flex items-center gap-x-3 border border-gray-200 bg-white rounded-md w-full"},hN={key:0,class:"flex w-full gap-x-3 items-center"},pN={key:1,class:"flex gap-x-3 w-full items-center"},yN={key:2,class:"flex gap-x-3 w-full items-center"},uN=["href"],kN={key:3,class:"flex gap-x-3 w-full items-center"},mN={class:"lg:absolute lg:top-3 lg:end-1 opacity-100"},fN={class:"p-0.5 sm:p-1 inline-flex items-center gap-0.5 bg-white rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},gN={class:"inline-block"},xN={class:"inline-block"},MN=e.defineComponent({__name:"vs-widget-file-item",props:{item:{default:null},index:{default:0},prefix:{default:"/api"}},emits:["update","openModal","openLightbox"],setup(l,{emit:t}){const a=l,n=t;function o(p){return["pdf","json"].includes(p.ext)}function s(p){return["ppt","pptx","doc","docx","xls","xlsx"].includes(p.ext)}function i(p){const y=document.createElement("a");y.setAttribute("download",p==null?void 0:p.uploaded_name),y.href=p==null?void 0:p.file_path,y.click()}async function d(){try{await fetch(`${a.prefix}/widget/file/${a.item.entity_id}/${a.item.file_id}`),n("update")}catch(p){console.error(p)}}function c(){n("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:d,updateListOnConfirm:!0})}function h(p){(a.item.ext==="jpg"||a.item.ext==="png")&&n("openLightbox",{item:a.item,index:p})}return(p,y)=>(e.openBlock(),e.createElementBlock("div",cN,[p.item.ext==="jpg"||p.item.ext==="png"?(e.openBlock(),e.createElementBlock("div",hN,[e.createElementVNode("div",{class:"max-w-[55vw] cursor-pointer flex gap-x-3 w-full items-center",onClick:y[0]||(y[0]=w=>h(p.index))},[e.createVNode(ba,{item:p.item},null,8,["item"])])])):o(p.item)?(e.openBlock(),e.createElementBlock("div",pN,[e.createVNode(ba,{item:p.item},null,8,["item"])])):s(p.item)?(e.openBlock(),e.createElementBlock("div",yN,[e.createElementVNode("a",{href:`/api/file-preview?id=${p.item.file_id}`,target:"_blank",class:"flex gap-x-3 w-full items-center"},[e.createVNode(ba,{item:p.item},null,8,["item"])],8,uN)])):(e.openBlock(),e.createElementBlock("div",kN,[e.createVNode(ba,{item:p.item},null,8,["item"])])),e.createElementVNode("div",mN,[e.createElementVNode("div",fN,[e.createElementVNode("div",gN,[e.createElementVNode("button",{class:"inline-flex p-[6px] justify-center items-center gap-x-2 rounded-lg border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none dark:text-neutral-400 focus:outline-none focus:bg-gray-100 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:y[1]||(y[1]=w=>i(p.item))},[e.createVNode(Yr,{height:"14",width:"14"})])]),y[3]||(y[3]=e.createElementVNode("div",{class:"w-px h-5 mx-1 bg-gray-200 dark:bg-neutral-700"},null,-1)),e.createElementVNode("div",xN,[e.createElementVNode("button",{type:"button",class:"size-[30px] inline-flex justify-center items-center gap-x-2 rounded-lg border border-transparent text-red-600 hover:bg-red-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-red-100 dark:text-red-500 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",onClick:y[2]||(y[2]=w=>c())},[e.createVNode(Bt,{height:"14",width:"14"})])])])])]))}}),bN={},wN={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function vN(l,t){return e.openBlock(),e.createElementBlock("svg",wN,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const VN=ce(bN,[["render",vN]]),CN={class:"flex flex-col widget-file xl:bg-white xl:rounded-xl dark:xl:bg-neutral-800 dark:xl:border-neutral-700 w-full"},zN={class:"flex w-full mb-[12px] items-center gap-x-2"},BN={class:"font-semibold text-gray-800 dark:text-neutral-200 text-[14px]"},EN={class1:"ml-auto"},_N={class:"py-1.5 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg bg-gray-100 cursor-pointer hover:bg-gray-200 text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},qN={key:0,class:"py-4 mb-4 space-y-4 border-gray-200 border-y dark:border-neutral-700"},SN={class:"relative"},jN={key:1,class:"space-y-3 max-h-[300px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},AN={key:0},Qr=e.defineComponent({__name:"vs-input-file-list",props:{id:{default:""},prefix:{default:"/api"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},emits:["update"],setup(l,{emit:t}){const a=l,n=e.inject("form"),o=e.computed(()=>n.value.formId),s=e.ref(!1),i=e.ref(0),d=t,c=e.ref(!1),h=e.ref({}),p=e.ref([]),y=e.ref(""),w=e.computed(()=>Array.isArray(p.value)?p.value.filter(k=>k.ext==="jpg"||k.ext==="png").map(k=>k==null?void 0:k.file_path):[]),m=e.computed(()=>y.value===""?p.value:p.value.filter(k=>{var v;return(v=k==null?void 0:k.uploaded_name)==null?void 0:v.includes(y.value)})),f=k=>{const v=w.value.findIndex(V=>V===k.item.file_path);v!==-1&&(s.value=!0,i.value=v)},u=async()=>{try{const k=await fetch(`${a.prefix}/widget/file/${o.value}`).then(v=>v.json());p.value=k==null?void 0:k.rows}catch(k){console.error(k)}},g=async k=>{await Promise.all(Array.from(k.target.files).map(async v=>{const V=new FormData;V.append("file",v);try{const C=`${a.prefix}/widget/file/${o.value}`,q=await fetch(C,{method:"POST",body:V});return q.ok?(d("update","file-list"),v):(Me({type:q.status>=400&&q.status<500?"warning":"error",title:"Error",message:`Error code: ${q.status}`}),null)}catch(C){return Me({type:"error",title:"Error",message:C.message||"Unknown error"}),console.error(C),null}})),await u()},M=k=>{const v={...k};return k.cancel||(v.cancel=()=>{c.value=!1}),k.updateListOnConfirm&&(v.confirm=async()=>{await k.confirm(),c.value=!1,u()}),v},x=k=>{h.value=M(k),c.value=!0};return e.watch(o,k=>{k&&u()}),e.onMounted(()=>{o.value&&u()}),(k,v)=>{var q,L,ee;const V=e.resolveComponent("Lightbox"),C=e.resolveComponent("MessageBox");return e.openBlock(),e.createElementBlock("div",CN,[e.createElementVNode("div",zN,[e.createElementVNode("h2",BN," Файлів: "+e.toDisplayString((q=p.value)==null?void 0:q.length),1),e.createElementVNode("div",EN,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:v[0]||(v[0]=K=>g(K))},null,32),e.createElementVNode("div",_N,[e.createVNode(VN,{height:"16",width:"16"})])])])]),((L=p.value)==null?void 0:L.length)>4?(e.openBlock(),e.createElementBlock("div",qN,[e.createElementVNode("div",null,[e.createElementVNode("div",SN,[v[8]||(v[8]=e.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-[1] ps-3.5"},[e.createElementVNode("svg",{class:"flex-shrink-0 text-gray-500 size-4 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),e.createElementVNode("path",{d:"m21 21-4.3-4.3"})])],-1)),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":v[1]||(v[1]=K=>y.value=K),class:"py-2 px-3 ps-10 pe-16 block w-full bg-gray-200 xl:bg-gray-100 rounded-lg text-sm focus:border-blue-500 h-[40px] focus:border-2 focus:outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Введіть назву файлу"},null,512),[[e.vModelText,y.value,void 0,{trim:!0}]])])])])):e.createCommentVNode("",!0),(ee=p.value)!=null&&ee.length?(e.openBlock(),e.createElementBlock("div",jN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(K,H)=>(e.openBlock(),e.createBlock(MN,{key:H,prefix:k.prefix,item:K,index:H,onUpdate:v[2]||(v[2]=B=>k.$emit("update","file-list")),onOpenModal:v[3]||(v[3]=B=>x(B)),onOpenLightbox:v[4]||(v[4]=B=>f(B))},null,8,["prefix","item","index"]))),128)),m.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",AN,v[9]||(v[9]=[e.createElementVNode("p",{class:"text-sm text-gray-600 font-sm"}," Файлів з такою назвою не існує, введіть інше пошукове слово ",-1)])))])):e.createCommentVNode("",!0),e.createVNode(V,{modelValue:s.value,"onUpdate:modelValue":v[5]||(v[5]=K=>s.value=K),startIndex:i.value,"onUpdate:index":v[6]||(v[6]=K=>i.value=K),images:w.value},null,8,["modelValue","startIndex","images"]),e.createVNode(C,e.mergeProps({modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=K=>c.value=K),onConfirm:h.value.confirm},h.value),null,16,["modelValue","onConfirm"])])}}}),DN={class:"flex items-center justify-between"},NN={class:"text-[16px] text-gray-900 font-medium"},LN={class:"grid gap-3"},HN=e.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,n=>{a.value=n}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",DN,[e.createElementVNode("p",NN,e.toDisplayString(l.title),1),e.createVNode(y1,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=s=>a.value=s),style:e.normalizeStyle(l.style)},null,8,["modelValue","style"])]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",LN,[e.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),$N=ce(HN,[["__scopeId","data-v-90320b87"]]),FN={class:"text-[16px] text-gray-900 font-medium"},TN={class:"grid gap-3"},PN=e.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(l){const t=l,a=e.ref(t.isOpen);return e.watch(()=>t.isOpen,n=>{a.value=n}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{type:"button",onClick:o[0]||(o[0]=s=>a.value=!a.value),class:"flex items-center gap-2"},[e.createVNode(e.unref(p1),{class:e.normalizeClass(["h-4 w-4 duration-300",[a.value?"-rotate-180":""]])},null,8,["class"]),e.createElementVNode("span",FN,e.toDisplayString(l.title),1)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",TN,[e.renderSlot(n.$slots,"default",{},void 0,!0)],512),[[e.vShow,a.value]])]),_:3})]))}}),IN=ce(PN,[["__scopeId","data-v-590eff11"]]),RN={class:"flex items-center justify-between"},ON=e.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",RN,[e.createElementVNode("p",null,e.toDisplayString(l.title),1)]),e.renderSlot(t.$slots,"default")]))}}),UN={switcher:$N,accordion:IN,default:ON},We={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},ZN=(l,t)=>String(l)===String(t),WN=(l,t)=>String(l)!==String(t),GN=(l,t)=>l>t,KN=(l,t)=>l>=t,JN=(l,t)=>l<t,YN=(l,t)=>l<=t,XN=(l,t)=>Array.isArray(t)&&t.length===2?l>=t[0]&&l<=t[1]:!1,QN=(l,t)=>String(l).startsWith(String(t)),eL=(l,t)=>String(l).endsWith(String(t)),tL=(l,t)=>String(l).includes(String(t)),aL=(l,t)=>Array.isArray(t)?t.includes(l):!1,rL=(l,t)=>Array.isArray(t)?!t.includes(l):!0,el=(l,t)=>{if(!t)return!0;switch(t==null?void 0:t[1]){case We.Equal:return ZN(l,t==null?void 0:t[2]);case We.Inequal:return WN(l,t==null?void 0:t[2]);case We.Higer:return GN(l,t==null?void 0:t[2]);case We.HigerOrEqual:return KN(l,t==null?void 0:t[2]);case We.Lower:return JN(l,t==null?void 0:t[2]);case We.LowerOrEqual:return YN(l,t==null?void 0:t[2]);case We.Between:return XN(l,t==null?void 0:t[2]);case We.StartWith:return QN(l,t==null?void 0:t[2]);case We.EndWith:return eL(l,t==null?void 0:t[2]);case We.Contain:return tL(l,t==null?void 0:t[2]);case We.In:return aL(l,t==null?void 0:t[2]);case We.NotIn:return rL(l,t==null?void 0:t[2]);default:return!0}},tl=e.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},name:{type:String,default:""},schema:{type:Array,default:()=>[]}},setup(l){const t=l,a=e.inject("values",e.ref({})),n=e.inject("form"),o=e.computed(()=>{var d;return(d=t.schema)==null?void 0:d.filter(c=>{var w,m,f,u;const h=c==null?void 0:c.conditions;if(!h)return!0;const p=Array.isArray(h)?h[0]:h,y=t.name?((m=(w=a.value)==null?void 0:w[t.name])==null?void 0:m[p])??((f=a.value)==null?void 0:f[p]):(u=a.value)==null?void 0:u[p];return el(y,h)})}),s=e.computed(()=>UN[t.view]),i=e.computed(()=>{if(a.value||(a.value={}),!t.name)return a.value;const d=a.value[t.name];if(d)return d;const c={};return a.value={...a.value,[t.name]:c},c});return(d,c)=>{var h;return(h=l.schema)!=null&&h.length?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{key:0,title:l.title,style:e.normalizeStyle(l.style)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,p=>{var y,w;return e.openBlock(),e.createBlock(fl,e.mergeProps({key:p.name},{ref_for:!0},p,{item:p,modelValue:i.value[p.name],"onUpdate:modelValue":m=>i.value[p.name]=m,style:l.style,error:(w=(y=e.unref(n))==null?void 0:y.errors)==null?void 0:w[p.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"])}),128))]),_:1},8,["title","style"])):e.createCommentVNode("",!0)}}}),lL=["aria-expanded","data-focus"],nL={class:"flex flex-1 items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden h-full"},oL={key:0,class:"flex flex-nowrap items-center gap-1 overflow-x-auto overflow-y-hidden min-w-0 flex-1 py-0.5"},sL={class:"flex items-center gap-1 min-w-0"},iL=["title"],dL=["innerHTML"],cL=["onClick"],hL={class:"flex-1 min-w-[2px]"},pL=["placeholder"],yL=["title"],uL=["innerHTML"],kL={key:3,class:"truncate flex-1 min-w-0"},mL={key:2,class:"flex-1 min-w-[2px]"},fL=["placeholder"],gL={class:"flex items-center shrink-0"},xL=["disabled"],ML=["disabled","title"],bL=["aria-disabled","onClick"],wL=["innerHTML"],vL={key:1,class:"px-3 py-2 text-center text-gray-500"},VL=["disabled"],b1="w-[16px] h-[16px] flex items-center justify-center flex-shrink-0 text-current",CL=e.defineComponent({__name:"vs-input-select",props:{multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},mode:{},defaultValue:{},search:{type:Boolean,default:!0},placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:""},options:{default:()=>[]},api:{default:null},maxHeight:{default:400},parent:{},set:{},slot:{},add:{},teleport:{default:"body"},auto:{default:0},start:{default:0},style:{default:()=>({})},customClass:{default:""},modelValue:{},error:{default:null},name:{},maxlength:{},minlength:{}},emits:["change","update:modelValue","value-selected"],setup(l,{emit:t}){const a=l,n=t,o=e.computed(()=>a.multiple),s=e.computed(()=>a.disabled);He(a.style);const i=e.computed({get:()=>a.modelValue,set:E=>n("update:modelValue",E)});!i.value&&a.defaultValue&&(i.value=a.defaultValue);const d=e.ref(null),c=e.ref(null),h=e.ref(null),p=e.ref(null),y=e.ref(!1),w=e.ref(!1),m=e.ref(null),f=e.ref([]),u=e.ref(-1),g=e.ref([]),M=e.ref(""),x=e.ref(null),k=e.ref("bottom"),v=e.ref({}),V=e.ref([]),C=e.computed(()=>{if(!V.value.length)return[];const E=f.value,D=new Map(E.map(J=>{var te;return[(te=J.id)==null?void 0:te.toString(),J]}));return V.value.map(J=>D.get(J==null?void 0:J.toString())).filter(J=>!!J)}),q=e.computed(()=>a.placeholder||"Select..."),L=e.computed(()=>Y(m.value));e.computed(()=>o.value?!V.value.length&&M.value==="":!L.value&&M.value==="");const ee=e.computed(()=>s.value?!1:o.value?V.value.length>0:!!i.value),K=E=>{var D;return o.value?V.value.some(J=>(J==null?void 0:J.toString())===(E==null?void 0:E.toString())):((D=i.value)==null?void 0:D.toString())===(E==null?void 0:E.toString())},H=e.computed(()=>{let E=f.value??[];if(!a.data&&M.value.trim()!==""){const D=M.value.toLowerCase();E=E.filter(J=>{var me,xe;const te=Y(J).toLowerCase(),O=((xe=(me=J.text)==null?void 0:me.toLowerCase)==null?void 0:xe.call(me))||"";return te.includes(D)||O.includes(D)})}if(o.value&&V.value.length){const D=new Set(V.value.map(J=>J==null?void 0:J.toString()));E=E.filter(J=>{var te;return!D.has((te=J.id)==null?void 0:te.toString())})}return E}),B=e.inject("values"),T=e.inject("field-props"),N=/\{\{\s*([^}]+?)\s*\}\}/g,U=E=>(E?String(E):"").replace(/<[^>]*>/g,"").trim(),$=e.computed(()=>a.slot??(a==null?void 0:a.optionTemplate)??""),Q=E=>{if(!E)return"";const D=$.value;return D?D.replace(N,(J,te)=>{const O=te.trim(),me=E[O];return me!=null?String(me):""}):E.text??""},Y=E=>{if(!E)return"";if(!$.value)return E.text??"";const D=Q(E);return U(D)||E.text||""},ie=new Map,he=tz,_e=E=>E.replace(/^([A-Z])|[\s-_]+(\w)/g,(D,J,te)=>te?te.toUpperCase():J.toLowerCase()),$e=E=>{const D=_e(E);return D?D.charAt(0).toUpperCase()+D.slice(1):""},X=E=>{if(!E)return;const D=$e(E);if(ie.has(D))return ie.get(D);const J=[D,`${D}Icon`,`Lucide${D}`,`Lucide${D}Icon`].map(te=>he[te]).find(Boolean);return ie.set(D,J),J},oe=E=>E?typeof E.icon=="string"?X(E.icon)??null:E.icon??null:null,ke=E=>!!(E!=null&&E.color&&!oe(E)),pe=E=>E!=null&&E.color?{color:E.color}:void 0,fe=E=>!!oe(E),F=(E,D,J)=>{var xe;if(!T)return!1;const te=((xe=T.value)==null?void 0:xe[E])??{},O=(Ce,qe,Le)=>{if(!qe.length)return Ce;const[Fe,...Ye]=qe,b={...Ce};if(!Ye.length)return b[Fe]=Le,b;const z=typeof Ce[Fe]=="object"&&Ce[Fe]!==null?Ce[Fe]:{};return b[Fe]=O(z,Ye,Le),b},me=O(te,D,J);return T.value={...T.value||{},[E]:me},!0},ne=E=>{if(!a.set)return;const D=B==null?void 0:B.value;!D&&!T||Object.entries(a.set).forEach(([J,te])=>{if(!J)return;const O=E?E[te]:null,me=J.split(".").map(qe=>qe.trim()).filter(Boolean);if(!me.length)return;const[xe,...Ce]=me;Ce.length&&F(xe,Ce,O??null)||D&&(D[xe]=O??null)})},A=e.computed(()=>{var E,D;return a.parent?((D=(E=B==null?void 0:B.value)==null?void 0:E[a.parent])==null?void 0:D.toString())??null:null}),P=async E=>{var D;if(!a.data){let J=a.options??[];if(E!=null&&E.trim()){const te=E.toLowerCase();J=J.filter(O=>{var Ce,qe;const me=Y(O).toLowerCase(),xe=((qe=(Ce=O.text)==null?void 0:Ce.toLowerCase)==null?void 0:qe.call(Ce))||"";return me.includes(te)||xe.includes(te)})}return J}try{const J=a.host??"",te=a.prefix??"api",O=a.api??`/${te}/suggest/${a.data}`,me=`${J}${O}`,xe=new URLSearchParams;return xe.set("json","1"),E&&xe.set("key",E),A.value!==void 0&&A.value!==null&&A.value!==""&&xe.set("parent",A.value),a.start===1&&xe.set("start","1"),((D=await fetch(`${me}?${xe.toString()}`).then(Ce=>Ce.json()))==null?void 0:D.data)??[]}catch{return[]}},W=async()=>{a.data?f.value=await P(M.value):f.value=a.options?[...a.options]:[]},le=async E=>{var J,te,O;if(E==null||E==="")return null;const D=(J=f.value)==null?void 0:J.find(me=>{var xe;return((xe=me==null?void 0:me.id)==null?void 0:xe.toString())===String(E)});if(D)return D;if(a.data)try{const me=a.host??"",xe=a.prefix??"api",Ce=a.api??`/${xe}/suggest/${a.data}`,qe=`${me}${Ce}`,Le=new URLSearchParams;return Le.set("json","1"),Le.set("val",String(E)),A.value!==void 0&&A.value!==null&&A.value!==""&&Le.set("parent",A.value),a.start===1&&Le.set("start","1"),((O=((te=await fetch(`${qe}?${Le.toString()}`).then(Fe=>Fe.json()))==null?void 0:te.data)??[])==null?void 0:O[0])??null}catch{return null}return null},de=async E=>{const D=new Set(f.value.map(te=>{var O;return(O=te.id)==null?void 0:O.toString()})),J=E.filter(te=>!D.has(te==null?void 0:te.toString()));J.length&&await J.reduce(async(te,O)=>{await te;const me=await le(O);me&&f.value.push(me)},Promise.resolve())},G=()=>{var D;if(!H.value.length){u.value=-1;return}let E=0;if(!o.value&&m.value){const J=(D=m.value.id)==null?void 0:D.toString(),te=H.value.findIndex(O=>{var me;return((me=O.id)==null?void 0:me.toString())===J});te>=0&&(E=te)}u.value=E,e.nextTick(()=>{Ge(g.value[E],h.value)})},S=async()=>{s.value||(y.value=!0,await W(),await e.nextTick(()=>{var E;qt(),(E=x.value)==null||E.focus()}),G())},R=()=>{y.value=!1,u.value=-1,e.nextTick(()=>{var E;(E=x.value)==null||E.blur()})},Z=async E=>{s.value||(y.value?R():await S())},ge=async()=>{if(!s.value){if(y.value){R();return}await S()}},rt=()=>{o.value?(V.value=[],i.value=[],n("change",[]),wt(null,[])):(m.value=null,i.value=null,n("change",null),wt(null,null)),ne(null),M.value="",e.nextTick(()=>{var E;return(E=x.value)==null?void 0:E.focus()})},ot=E=>{o.value&&(V.value=V.value.filter(D=>(D==null?void 0:D.toString())!==(E==null?void 0:E.toString())),i.value=[...V.value],n("change",i.value),wt(null),e.nextTick(()=>{var D;return(D=x.value)==null?void 0:D.focus()}))},wt=(E,D)=>{const J=D??(o.value?[...V.value]:(E==null?void 0:E.id)??null);n("value-selected",{name:a.name,value:J,option:E})},ht=E=>{o.value?(K(E.id)||(V.value=[...V.value,E.id],i.value=[...V.value],n("change",i.value),wt(E)),M.value="",e.nextTick(()=>{var D;(D=x.value)==null||D.focus(),u.value=Math.min(u.value,H.value.length-1)}),ne(null)):(m.value=E,i.value=E.id,n("change",i.value),wt(E),M.value="",R(),ne(E))},N1=E=>{if(K(E.id)){o.value||R();return}ht(E)},Ge=(E,D)=>{if(!E||!D)return;const J=E.offsetTop,te=J+E.offsetHeight,O=D.scrollTop,me=O+D.clientHeight;let xe=D.scrollTop;J<O?xe=J-80:te>me&&(xe=te-D.clientHeight+4);const Ce=D;Ce.scrollTop=xe},pt=E=>{let D=E.parentElement;for(;D;){if(D.classList.contains("ui-dialog__content"))return D;const J=window.getComputedStyle(D),te=J.overflow+J.overflowY+J.overflowX;if(te.includes("auto")||te.includes("scroll")||D===document.body||D===document.documentElement)return D;D=D.parentElement}return document.body},qt=()=>{if(!c.value)return;const E=c.value.getBoundingClientRect(),D=window.innerHeight||document.documentElement.clientHeight,J=window.innerWidth||document.documentElement.clientWidth,te=8,O=8,me=a.maxHeight||300,xe=D-E.bottom-O-te,Ce=E.top-O-te,qe=xe>=Ce,Le=Math.max(J-te*2,0);let{width:Fe}=E;Le>0&&Fe>Le&&(Fe=Le);let{left:Ye}=E;Ye+Fe+te>J&&(Ye=J-Fe-te),Ye=Math.max(Ye,te);const b=Math.min(me,Math.max(qe?xe:Ce,50));k.value=qe?"bottom":"top",v.value={position:"fixed",left:`${Ye}px`,width:`${Fe}px`,maxHeight:`${b}px`,transform:qe?"none":"translateY(-100%)",top:qe?`${E.bottom+O}px`:`${E.top-O}px`}},st=async E=>{s.value||!y.value&&(E.key==="ArrowDown"||E.key==="ArrowUp")&&(E.preventDefault(),await S())},Ta=E=>{var J;if(!y.value)return;const{key:D}=E;if(D==="ArrowDown")E.preventDefault(),u.value+1<H.value.length&&(u.value+=1,Ge(g.value[u.value],h.value));else if(D==="ArrowUp")E.preventDefault(),u.value>0&&(u.value-=1,Ge(g.value[u.value],h.value));else if(D==="Enter"){E.preventDefault();const te=H.value[u.value];te&&ht(te),(J=x.value)==null||J.blur()}else D==="Escape"?(E.preventDefault(),R()):D==="Backspace"?o.value&&M.value===""&&V.value.length&&(V.value=V.value.slice(0,-1),i.value=[...V.value],n("change",i.value)):D==="Home"?(u.value=0,Ge(g.value[0],h.value)):D==="End"?(u.value=H.value.length-1,Ge(g.value[u.value],h.value)):D==="Tab"&&R()},St=()=>{s.value||(w.value=!0)},ta=()=>{w.value=!1,M.value=""},aa=E=>{E.key==="Escape"&&y.value&&R()},ra=E=>{var J,te;const D=E.target;(J=d.value)!=null&&J.contains(D)||(te=p.value)!=null&&te.contains(D)||R()},Pa=E=>{y.value&&h.value&&!h.value.contains(E.target)&&qt()},la=()=>{y.value&&qt()},Ia=()=>{y.value&&qt()};e.watch(()=>a.options,E=>{E!=null&&E.length&&(f.value=[...E],yt())},{immediate:!0});async function yt(){if(o.value)Array.isArray(i.value)?V.value=[...i.value]:(V.value=i.value==null?[]:[i.value],i.value=[...V.value]),a.data&&V.value.length&&(await de(V.value),await e.nextTick());else{if(Array.isArray(i.value)){const E=i.value[0]??null;i.value=E??null}i.value!=null&&(m.value=await le(i.value)),ne(m.value??null)}}e.watch(i,()=>{yt()}),e.onMounted(async()=>{var E;addEventListener("keydown",aa),addEventListener("scroll",Pa,!0),addEventListener("resize",la),document.addEventListener("click",ra,!0),c.value&&pt(c.value).addEventListener("scroll",Ia,!0),(E=a.options)!=null&&E.length&&!a.data?f.value=[...a.options]:a.data&&(f.value=await P("")),await yt(),kt.value=!1}),e.onUnmounted(()=>{removeEventListener("keydown",aa),removeEventListener("scroll",Pa,!0),removeEventListener("resize",la),document.removeEventListener("click",ra,!0),c.value&&pt(c.value).removeEventListener("scroll",Ia,!0)});const vt=e.ref(!1),jt=e.ref({}),na=e.ref([]),ut=e.ref(null);async function oa(){var E,D;if(!(!((E=a.add)!=null&&E.token)||ut!=null&&ut.value.validate()))try{const J=a.add.api??`/api/table/${a.add.token}`,te=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(jt.value)}),O=await te.json().catch(()=>({})),me=(O==null?void 0:O.error)||(O==null?void 0:O.message),xe=Number(O==null?void 0:O.code)>=400;if(!te.ok||xe){Me({title:"Помилка",type:"error",message:me||`Код помилки: ${(O==null?void 0:O.code)||te.status}`});return}const Ce=O==null?void 0:O.id;if(!Ce){Me({title:"Помилка",type:"error",message:"Обʼєкт створено, але в відповіді відсутній ID."});return}if(!((D=a.options)!=null&&D.length)&&a.data){const qe=await fetch(`${a.api??`/api/suggest/${a.data}`}?val=${Ce}`).then(Le=>Le.json());m.value=qe[0],f.value.push(qe[0]),i.value=Ce}vt.value=!1,Me({title:"Успіх",message:"Обʼєкт успішно створено."})}catch(J){Me({title:"Помилка",type:"error",message:(J==null?void 0:J.message)||"Не вдалося створити обʼєкт."})}}async function At(){if(!a.add)return null;const E=await fetch(`/api/template/form/${a.add.form}`).then(D=>D.json());return na.value=E.schema,vt.value=!0,null}function sa(E,D=200){let J;return(...te)=>{J&&clearTimeout(J),J=window.setTimeout(()=>E(...te),D)}}const L1=sa(async E=>{f.value=await P(E)},200);e.watch(M,E=>{a.data&&L1(E.trim())}),e.watch(()=>a.options,E=>{!a.data&&(E!=null&&E.length)&&(f.value=[...E],yt())},{immediate:!0}),e.watch(()=>a.parent??a.parentValue,()=>{a.data&&W()});const kt=e.ref(!0);return e.watch(A,async()=>{if(a.data&&(kt.value||(o.value?(V.value=[],i.value=[],n("change",[])):(m.value=null,i.value=null,n("change",null))),await W(),a.auto===1&&A.value&&f.value.length>0)){const E=f.value[0];E&&ht(E)}}),(E,D)=>{var J,te;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(c1),{visible:vt.value,"onUpdate:visible":D[1]||(D[1]=O=>vt.value=O),class:"z-[1000]",title:"Додати",buttonText:"Додати",onDone:oa,teleport:E.teleport},{default:e.withCtx(()=>[e.createVNode(nt,{schema:na.value,modelValue:jt.value,"onUpdate:modelValue":D[0]||(D[0]=O=>jt.value=O),ref_key:"addForm",ref:ut},null,8,["schema","modelValue"])]),_:1},8,["visible","teleport"]),e.createElementVNode("div",{class:"flex gap-1 w-full",ref_key:"selectRoot",ref:d,onClick:D[5]||(D[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass])},[D[10]||(D[10]=e.createElementVNode("span",{id:"react-select-live-region",class:"sr-only"},null,-1)),D[11]||(D[11]=e.createElementVNode("span",{"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text",role:"log",class:"sr-only"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["vs-input-select__control flex min-h-[38px] items-center justify-between rounded transition-colors bg-white",s.value?"bg-gray-100 text-gray-400 cursor-not-allowed":""]),role:"combobox","aria-expanded":y.value,"aria-haspopup":"listbox",onKeydown:st,onClick:ge,"data-focus":y.value||w.value?"true":"false",ref_key:"triggerRef",ref:c},[e.createElementVNode("div",nL,[o.value?(e.openBlock(),e.createElementBlock("div",oL,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,O=>(e.openBlock(),e.createElementBlock("div",{class:"flex min-w-0 bg-[rgb(230,230,230)] rounded-[2px] m-[2px] box-border max-w-full",key:O.id},[e.createElementVNode("div",sL,[ke(O)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block ml-1.5 flex-shrink-0",style:e.normalizeStyle({backgroundColor:O==null?void 0:O.color})},null,4)):e.createCommentVNode("",!0),!$.value&&fe(O)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(b1),style:e.normalizeStyle(pe(O)),"aria-hidden":"true"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(oe(O)),{class:"w-full h-full",focusable:"false"}))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"truncate text-[#172b4d] overflow-hidden max-w-[200px] px-0.5 pl-1.5",title:Y(O)},[$.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:Q(O)},null,8,dL)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(O.text),1)],64))],8,iL)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border text-[#172b4d] hover:bg-[rgb(255,189,173)] hover:text-[rgb(222,53,11)] flex-shrink-0",onClick:e.withModifiers(me=>ot(O.id),["stop"])},D[6]||(D[6]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,cL)]))),128)),e.createElementVNode("div",hL,[!s.value&&E.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:x,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900 hover:cursor-pointer",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:V.value.length?" ":q.value,"onUpdate:modelValue":D[2]||(D[2]=O=>M.value=O),onFocus:St,onBlur:ta,onKeydown:Ta},null,40,pL)),[[e.vModelText,M.value]]):e.createCommentVNode("",!0)])])):!o.value&&L.value&&M.value===""?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["truncate text-gray-900 absolute flex items-center gap-1 min-w-0"]),title:L.value},[ke(m.value)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[14px] h-[14px] rounded-md block flex-shrink-0",style:e.normalizeStyle({backgroundColor:(J=m.value)==null?void 0:J.color})},null,4)):e.createCommentVNode("",!0),!$.value&&fe(m.value)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(b1),style:e.normalizeStyle(pe(m.value)),"aria-hidden":"true"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(oe(m.value)),{class:"w-full h-full",focusable:"false"}))],4)):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:"truncate flex-1 min-w-0",innerHTML:Q(m.value)},null,8,uL)):(e.openBlock(),e.createElementBlock("span",kL,e.toDisplayString((te=m.value)==null?void 0:te.text),1))],8,yL)):e.createCommentVNode("",!0),o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",mL,[!s.value&&E.search?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:x,class:"w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900 hover:cursor-pointer",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-autocomplete":"list",placeholder:L.value?" ":q.value,"onUpdate:modelValue":D[3]||(D[3]=O=>M.value=O),onFocus:St,onBlur:ta,onKeydown:Ta},null,40,fL)),[[e.vModelText,M.value]]):e.createCommentVNode("",!0)]))]),e.createElementVNode("div",gL,[ee.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:s.value,onClick:e.withModifiers(rt,["stop"])},D[7]||(D[7]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,xL)):e.createCommentVNode("",!0),D[9]||(D[9]=e.createElementVNode("div",{class:"self-stretch w-px bg-[#ccc] my-[1px]"},null,-1)),e.createElementVNode("button",{type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-hidden":"true",disabled:s.value,onClick:D[4]||(D[4]=e.withModifiers(O=>Z(),["stop"])),title:y.value?"Закрити список":"Відкрити список"},D[8]||(D[8]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})],-1)]),8,ML)])],42,lL),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:p,class:e.normalizeClass(["fixed z-[3000] rounded bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.1),0_4px_11px_rgba(0,0,0,0.1)]"]),style:e.normalizeStyle(v.value),role:"listbox"},[e.createElementVNode("div",{class:"overflow-y-auto py-1",style:e.normalizeStyle({maxHeight:v.value.maxHeight||"300px"}),ref_key:"listRef",ref:h},[H.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(H.value,(O,me)=>(e.openBlock(),e.createElementBlock("div",{key:O.id,ref_for:!0,ref:xe=>g.value[me]=xe,class:e.normalizeClass(["flex px-3 py-2 gap-2 cursor-pointer select-none text-gray-900",K(O.id)?"bg-[#2684ff] text-white":"bg-white hover:bg-[#deebff] hover:text-[#172b4d]",u.value===me&&!K(O.id)?"bg-[#deebff] text-[#172b4d]":""]),"aria-disabled":K(O.id)?"true":"false",role:"option",tabindex:"-1",onClick:xe=>N1(O)},[ke(O)?(e.openBlock(),e.createElementBlock("span",{key:0,class:"w-[11px] h-[11px] rounded-full block flex-shrink-0",style:e.normalizeStyle({backgroundColor:O==null?void 0:O.color})},null,4)):e.createCommentVNode("",!0),!$.value&&fe(O)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(b1),style:e.normalizeStyle(pe(O)),"aria-hidden":"true"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(oe(O)),{class:"w-full h-full",focusable:"false"}))],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["leading-[19px]",u.value===O.id?"text-white":"",(u.value,"")])},[$.value?(e.openBlock(),e.createElementBlock("span",{key:0,innerHTML:Q(O)},null,8,wL)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(O.text),1)],64))],2)],10,bL))),128)):(e.openBlock(),e.createElementBlock("div",vL," No options "))],4)],4)):e.createCommentVNode("",!0)]))],2),a.add?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:At,class:"bg-white hover:bg-gray-100 text-sm text-gray-900 py-[10px] px-3 border border-stone-200 rounded-md h-[38px] flex items-center gap-2",disabled:s.value,type:"button"},[e.createVNode(Qe,{width:"16",height:"16"}),D[12]||(D[12]=e.createElementVNode("span",null,"Додати",-1))],8,VL)):e.createCommentVNode("",!0)],512)],64)}}}),w1=ce(CL,[["__scopeId","data-v-6c691161"]]),zL=["placeholder","disabled"],al=e.defineComponent({__name:"vs-input-textarea",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,{inputClass:a}=He(t.style),n=e.useModel(l,"modelValue"),o=e.computed(()=>!!t.disabled),s=e.computed(()=>t.placeholder??"");function i(){typeof n.value=="string"&&(n.value=n.value.trim())}return(d,c)=>e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{"onUpdate:modelValue":c[0]||(c[0]=h=>n.value=h),placeholder:s.value,disabled:o.value,row:"2",onBlur:i,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto bg-white",[e.unref(a)]]),style:{border:"1px solid #CFD9E0"}},null,42,zL)),[[e.vModelText,n.value]])}}),BL={key:1,class:"richtext-error"},rl=e.defineComponent({__name:"vs-input-richtext",props:e.mergeModels({style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{},richtextProps:{default:()=>({})}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.ref(null);e.onMounted(async()=>{try{const c=await Promise.resolve().then(()=>eI);t.value=c.VsRichtext}catch{console.warn("@opengis/richtext is not installed. Please install it in your app to use richtext input.")}});const a=l,{inputClass:n}=He(a.style),o=e.useModel(l,"modelValue"),s=e.computed(()=>!!a.disabled),i=e.computed(()=>a.placeholder??""),d=e.computed(()=>({height:"300px",...a.richtextProps}));return(c,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["richtext-wrapper !h-full !border-transparent",[c.customClass,e.unref(n),{"richtext-disabled":s.value}]]),style:e.normalizeStyle(s.value?{pointerEvents:"none",opacity:.6}:{})},[t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.mergeProps({key:0,modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=p=>o.value=p),placeholder:i.value},d.value),null,16,["modelValue","placeholder"])):(e.openBlock(),e.createElementBlock("div",BL,h[1]||(h[1]=[e.createElementVNode("p",null,"@opengis/richtext package is not installed.",-1),e.createElementVNode("p",null,"Please install it: npm install @opengis/richtext",-1)])))],6))}}),EL={},_L={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-search stroke-gray-500 transition-all"};function qL(l,t){return e.openBlock(),e.createElementBlock("svg",_L,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},null,-1),e.createElementVNode("path",{d:"M21 21l-6 -6"},null,-1)]))}const SL=ce(EL,[["render",qL]]),jL={},AL={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function DL(l,t){return e.openBlock(),e.createElementBlock("svg",AL,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 9l5 -5l5 5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const NL=ce(jL,[["render",DL]]),LL={},HL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function $L(l,t){return e.openBlock(),e.createElementBlock("svg",HL,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),e.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),e.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const FL=ce(LL,[["render",$L]]),TL={},PL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function IL(l,t){return e.openBlock(),e.createElementBlock("svg",PL,t[0]||(t[0]=[e.createStaticVNode('<circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle>',6)]))}const wa=ce(TL,[["render",IL]]),RL={},OL={viewBox:"0 0 178 90",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function UL(l,t){return e.openBlock(),e.createElementBlock("svg",OL,t[0]||(t[0]=[e.createStaticVNode('<rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs>',12)]))}const ZL=ce(RL,[["render",UL]]),WL={},GL={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function KL(l,t){return e.openBlock(),e.createElementBlock("svg",GL,t[0]||(t[0]=[e.createElementVNode("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"},null,-1)]))}const JL=ce(WL,[["render",KL]]),YL={class:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden flex flex-col"},XL={class:"flex flex-col gap-2 !p-4 border-b border-gray-200 sm:flex-row sm:items-center sm:justify-between bg-gray-50"},QL={class:"relative w-full"},eH={class:"flex flex-nowrap items-center justify-end gap-2 w-full overflow-x-auto"},tH={class:"w-full overflow-x-auto"},aH={class:"w-full min-w-[640px] table-auto divide-y divide-gray-200"},rH={class:"bg-gray-50"},lH={class:"border-b border-gray-200"},nH={class:"px-4 py-3 text-left text-xs font-semibold text-gray-900 w-12 text-center"},oH=["onClick"],sH={key:0,class:"text-gray-400"},iH={key:0,colspan:"100%",class:"text-center"},dH={class:"w-full"},cH={class:"p-5 min-h-[200px] flex flex-col justify-center items-center text-center"},hH=["onDragstart","onDragover","onDrop"],pH={class:"px-4 py-3 text-center align-middle"},yH={class:"flex items-center justify-center"},uH=["innerHTML"],kH={key:0,class:"flex items-center gap-3 text-sm text-gray-700"},mH={key:0},fH=["src"],gH={key:1,class:"rounded-md max-w-[45px] w-[45px] max-h-[45px] h-[45px] bg-gray-200 flex items-center justify-center"},xH={key:1,class:"flex items-center justify-center"},MH={key:2,class:"text-sm font-medium text-gray-900"},bH={class:"px-4 py-3 text-right whitespace-nowrap"},wH={class:"flex items-center justify-end gap-2"},vH=["onClick"],VH=["onClick"],CH={class:"vs-form__head mr-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},ll=e.defineComponent({__name:"vs-input-datatable",props:e.mergeModels({colModel:{},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useSlots(),n=e.useModel(l,"modelValue"),o=e.ref({}),s=e.ref(""),i=e.ref(null),d=e.ref("asc"),c=e.computed(()=>{const A=n.value??[],P=s.value?A.filter(de=>{var G;return(G=t.colModel)==null?void 0:G.some(S=>{const R=S.key||S.name;if(!R)return!1;const Z=de[R];return Z?Array.isArray(Z)?Z.join(", ").toLowerCase().includes(s.value.toLowerCase()):String(Z).toLowerCase().includes(s.value.toLowerCase()):!1})}):A;if(!i.value)return P;const W=i.value,le=[...P].sort((de,G)=>{const S=he(de==null?void 0:de[W]),R=he(G==null?void 0:G[W]);return typeof S=="number"&&typeof R=="number"?S-R:String(S).localeCompare(String(R))});return d.value==="asc"?le:le.reverse()}),h=e.ref(null),p=e.ref(null),y=e.ref(null),w=A=>{h.value=A},m=A=>{p.value=A},f=A=>{if(h.value===null||h.value===A){h.value=null,p.value=null;return}const P=[...n.value],[W]=P.splice(h.value,1);P.splice(A,0,W),n.value=P,h.value=null,p.value=null},u=()=>{y.value&&y.value.click()},g=A=>{const P=[".jpg",".jpeg",".png",".gif",".bmp",".webp",".svg",".ico",".tiff",".tif"],W=A.toLowerCase();return P.some(le=>W.endsWith(le))},M=A=>{var le;const P=(le=A.target.files)==null?void 0:le[0];if(!P)return;const W=new FileReader;W.onload=de=>{var G;try{const S=(G=de.target)==null?void 0:G.result;if(typeof S=="string"){const R=JSON.parse(S);Array.isArray(R)&&n.value.push(...R)}}catch(S){console.error("Error parsing file:",S)}},W.readAsText(P)},x=()=>{const A=JSON.stringify(n.value,null,2),P=new Blob([A],{type:"application/json"}),W=URL.createObjectURL(P),le=document.createElement("a");le.href=W,le.download="data.json",le.click(),URL.revokeObjectURL(W)},k=new Set(["autocomplete","select","radio","checkbox","combobox"]),v=new Map,V=(A,P)=>{const W=`/api/suggest/${A}`,le=W.includes("?")?"&":"?",de=P?`&val=${P}`:"";return`${W}${le}json=1${de}`},C=A=>A==null||A===""?null:typeof A=="object"?(A==null?void 0:A.id)!==void 0&&A.id!==null&&A.id!==""?A.id:null:A,q=A=>{const P=new Set;return Array.isArray(n.value)&&n.value.forEach(W=>{const le=W==null?void 0:W[A];if(le==null||le==="")return;if(Array.isArray(le)){le.forEach(G=>{const S=C(G);S!==null&&P.add(S)});return}const de=C(le);de!==null&&P.add(de)}),P},L=async()=>{var P;if(!((P=t.colModel)!=null&&P.length))return;const A=t.colModel.filter(W=>{var le;return W.data&&k.has(((le=W.type)==null?void 0:le.toLowerCase())||"")});A.length&&await Promise.all(A.map(async W=>{const le=W.key||W.name;if(!le)return;const de=q(le),G=Array.from(de).map(Z=>String(Z)).sort(),S=G.join(",");if(!G.length||v.get(le)===S)return;v.set(le,S);const R=G.map(encodeURIComponent).join(",");try{const Z=await(await fetch(V(W.data,R))).json();o.value[le]=(Z==null?void 0:Z.data)??Z}catch(Z){console.error("Failed to fetch column values",Z)}}))};e.watch([()=>t.colModel,()=>n.value],()=>{L()},{immediate:!0,deep:!0});const ee=e.ref(""),K=e.ref(!1);let H="edit",B=0;const T=A=>((A==null?void 0:A.format)||(A==null?void 0:A.type)||"").toString().toLowerCase(),N=e.computed(()=>{var A;return((A=t.colModel)==null?void 0:A.filter(P=>T(P)!=="slot").map(P=>{const{slot:W,...le}=P;return le}))??[]}),U=e.ref({}),$=e.ref({}),Q=A=>typeof A!="string"?!1:!!a[A],Y=(A,P)=>P?P.split(".").reduce((W,le)=>W==null?W:W[le.trim()],A):A,ie=(A,P)=>typeof A!="string"?"":A.replace(/{{\s*([^}]+)\s*}}/g,(W,le)=>Y(P,le.trim())??""),he=A=>{if(A==null||A==="")return"";if(typeof A=="number")return A;if(typeof A=="boolean")return A?1:0;if(typeof A=="string")return A.toLowerCase();if(Array.isArray(A))return A.map(P=>he(P)).join(", ");if(typeof A=="object"){if(A.text!==void 0)return String(A.text).toLowerCase();if(A.label!==void 0)return String(A.label).toLowerCase();if(A.id!==void 0)return String(A.id).toLowerCase()}return String(A).toLowerCase()},_e=A=>{const P=A.key||A.name;if(P){if(i.value===P){d.value=d.value==="asc"?"desc":"asc";return}i.value=P,d.value="asc"}};async function $e(){ee.value="Додати",K.value=!0,H="add",U.value={}}function X(A,P){var le;if(!(A!=null&&A.length))return null;const W=typeof P=="object"?P==null?void 0:P.id:P;return W==null||W===""?null:((le=A.find(de=>{var G;return((G=de==null?void 0:de.id)==null?void 0:G.toString())===W.toString()}))==null?void 0:le.text)??null}function oe(A){return A==null||A===""?"-":Array.isArray(A)?A.map(P=>typeof P=="object"?(P==null?void 0:P.text)??(P==null?void 0:P.id)??"-":P).join(", "):typeof A=="object"?(A==null?void 0:A.text)??(A==null?void 0:A.id)??"-":A}function ke(A,P){const W=P.key||P.name,le=A==null?void 0:A[W],de=o.value[W];if(!le)return"-";if(Array.isArray(le)){const S=le.map(R=>X(de,R)).filter(Boolean);return S.length?S.join(", "):oe(le)}return X(de,le)||oe(le)}async function pe(A,P){ee.value="Редагувати",K.value=!0,H="edit",B=P,U.value={...A}}function fe(){const A=$.value.validate();if(A){Me({type:"warning",title:"Помилка валідації",message:Object.entries(A).map(([P,W])=>`${P}: ${W}`).join(`
8312
+ `)});return}H==="add"?Array.isArray(n.value)?n.value=[...n.value,U.value]:n.value=[U.value]:n.value=n.value.map((P,W)=>W===B?U.value:P),K.value=!1}function F(A){n.value=n.value.filter((P,W)=>W!==A)}function ne(){K.value=!1}return(A,P)=>(e.openBlock(),e.createElementBlock("div",YL,[e.createElementVNode("div",XL,[e.createElementVNode("div",QL,[e.createVNode(SL,{width:"16",height:"16",class:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":P[0]||(P[0]=W=>s.value=W),placeholder:"Пошук",class:"w-full rounded-md border border-gray-200 bg-white pl-10 pr-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-100"},null,512),[[e.vModelText,s.value]])]),e.createElementVNode("div",eH,[e.createElementVNode("input",{ref_key:"fileInput",ref:y,onChange:M,class:"hidden",accept:".json",type:"file"},null,544),e.createElementVNode("button",{type:"button",onClick:u,class:"inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"},[e.createVNode(NL,{class:"text-gray-700",width:"16",height:"16"}),P[4]||(P[4]=e.createTextVNode(" Імпорт ",-1))]),e.createElementVNode("button",{type:"button",onClick:x,class:"inline-flex items-center gap-2 rounded-md border border-gray-200 bg-white px-3 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:bg-gray-50 transition-colors"},[e.createVNode(FL,{class:"text-gray-700",width:"16",height:"16"}),P[5]||(P[5]=e.createTextVNode(" Експорт ",-1))]),e.createElementVNode("button",{onClick:$e,type:"button",class:"inline-flex items-center gap-2 rounded-md bg-blue-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-600 transition-colors"},[e.createVNode(Qe,{class:"text-white"}),P[6]||(P[6]=e.createTextVNode(" Додати ",-1))])])]),e.createElementVNode("div",tH,[e.createElementVNode("table",aH,[e.createElementVNode("thead",rH,[e.createElementVNode("tr",lH,[e.createElementVNode("th",nH,[e.createVNode(wa,{width:"20",height:"20",class:"mx-auto text-gray-400"})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.colModel,W=>(e.openBlock(),e.createElementBlock("th",{key:W.key,class:"px-4 py-3 text-left text-xs font-semibold text-gray-900"},[e.createElementVNode("button",{type:"button",onClick:le=>_e(W),class:"flex items-center gap-1 text-xs font-semibold text-gray-700 hover:text-gray-900 transition-colors"},[e.createElementVNode("span",null,e.toDisplayString(W.ua||W.label),1),i.value===(W.key||W.name)?(e.openBlock(),e.createElementBlock("span",sH,e.toDisplayString(d.value==="asc"?"▲":"▼"),1)):e.createCommentVNode("",!0)],8,oH)]))),128)),P[7]||(P[7]=e.createElementVNode("th",{class:"px-4 py-3 text-left text-xs font-semibold text-gray-900 text-center w-[1%] whitespace-nowrap"}," Дії ",-1))])]),e.createElementVNode("tbody",{class:e.normalizeClass(["divide-y divide-gray-200",{"[&_tr:last-child]:border-0":!p.value}])},[c.value.length===0?(e.openBlock(),e.createElementBlock("td",iH,[e.createElementVNode("div",dH,[e.createElementVNode("div",cH,[e.createVNode(ZL,{class:"w-48 mx-auto"}),P[8]||(P[8]=e.createElementVNode("div",{class:"max-w-sm mx-auto mt-6"},[e.createElementVNode("p",{class:"font-medium text-gray-800 dark:text-neutral-200"},"Нічого не знайдено"),e.createElementVNode("p",{class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"})],-1))])])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(W,le)=>(e.openBlock(),e.createElementBlock("tr",{key:W.id,class:e.normalizeClass(["border-b transition-colors hover:bg-gray-50 cursor-move text-sm text-gray-700",{"opacity-50":h.value===le,"border-t-2 border-b-2 border-blue-500 bg-blue-50 dark:bg-blue-900/20":p.value===le}]),draggable:"true",onDragstart:de=>w(le),onDragover:e.withModifiers(de=>m(le),["prevent"]),onDrop:de=>f(le)},[e.createElementVNode("td",pH,[e.createElementVNode("div",yH,[e.createVNode(wa,{width:"24",height:"24",class:"w-4 h-4 mx-auto text-slate-400 dark:text-slate-500"})])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.colModel,de=>(e.openBlock(),e.createElementBlock("td",{key:de.key,class:"px-4 py-3 align-middle"},[T(de)==="slot"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Q(de.slot)?e.renderSlot(A.$slots,de.slot,{key:0,row:W,value:W[de.key],column:de}):(e.openBlock(),e.createElementBlock("div",{key:1,class:"text-sm text-gray-900",innerHTML:ie(de.slot,W)},null,8,uH))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[T(de)==="file"?(e.openBlock(),e.createElementBlock("div",kH,[g(ke(W,de))?(e.openBlock(),e.createElementBlock("div",mH,[e.createElementVNode("img",{src:ke(W,de),alt:"alt",width:"45",class:"rounded-md max-w-[45px] h-[45px] object-cover"},null,8,fH)])):(e.openBlock(),e.createElementBlock("div",gH,[e.createVNode(Jr,{class:"w-[25px] min-w-[25px] h-[25px]"})]))])):T(de)==="color"?(e.openBlock(),e.createElementBlock("div",xH,[e.createElementVNode("span",{class:"inline-flex h-6 w-6 rounded border border-gray-200",style:e.normalizeStyle({backgroundColor:ke(W,de)||"#ffffff"})},null,4)])):(e.openBlock(),e.createElementBlock("div",MH,e.toDisplayString(ke(W,de)),1))],64))]))),128)),e.createElementVNode("td",bH,[e.createElementVNode("div",wH,[e.createElementVNode("button",{onClick:de=>pe(W,le),class:"p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"},[e.createVNode(JL,{width:"16",height:"16"})],8,vH),e.createElementVNode("button",{onClick:de=>F(le),class:"p-1.5 text-gray-600 hover:text-red-600 hover:bg-red-50 rounded transition-colors"},[e.createVNode(Bt,{width:"16",height:"16"})],8,VH)])])],42,hH))),128))],2)])]),e.createVNode(e.unref(c1),{visible:K.value,title:ee.value,size:"lg",onClose:ne,teleport:"#modal"},{default:e.withCtx(()=>[e.createVNode(nt,{schema:N.value,values:U.value,"onUpdate:values":P[1]||(P[1]=W=>U.value=W),form:$.value,"onUpdate:form":P[2]||(P[2]=W=>$.value=W)},null,8,["schema","values","form"]),e.createElementVNode("div",CH,[e.createElementVNode("button",{type:"button",onClick:P[3]||(P[3]=W=>K.value=!1),class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:fe,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])]),_:1},8,["visible","title"])]))}}),zH={},BH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-map-pin"};function EH(l,t){return e.openBlock(),e.createElementBlock("svg",BH,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},null,-1),e.createElementVNode("path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z"},null,-1)]))}const _H=ce(zH,[["render",EH]]),qH={},SH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-line"};function jH(l,t){return e.openBlock(),e.createElementBlock("svg",SH,t[0]||(t[0]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M6 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M18 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null,-1),e.createElementVNode("path",{d:"M7.5 16.5l9 -9"},null,-1)]))}const AH=ce(qH,[["render",jH]]),DH={},NH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-polygon"};function LH(l,t){return e.openBlock(),e.createElementBlock("svg",NH,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M6.5 9.5l3.5 -3"></path><path d="M14 5.5l3 1.5"></path><path d="M18.5 10l-2.5 7"></path><path d="M13.5 17.5l-7 -5"></path>',9)]))}const HH=ce(DH,[["render",LH]]),$H={},FH={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-topology-ring-3"};function TH(l,t){return e.openBlock(),e.createElementBlock("svg",FH,t[0]||(t[0]=[e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M20 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M8 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z"></path><path d="M6 8v8"></path><path d="M18 16v-8"></path><path d="M8 6h8"></path><path d="M16 18h-8"></path>',9)]))}const PH=ce($H,[["render",TH]]),IH={},RH={version:"1.1",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg","xmlns:sketch":"http://www.bohemiancoding.com/sketch/ns","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"fullscreen-icon"};function OH(l,t){return e.openBlock(),e.createElementBlock("svg",RH,t[0]||(t[0]=[e.createElementVNode("title",null,null,-1),e.createElementVNode("desc",null,null,-1),e.createElementVNode("defs",null,null,-1),e.createElementVNode("g",{fill:"none","fill-rule":"evenodd",id:"Page-1",stroke:"none","stroke-width":"1"},[e.createElementVNode("g",{fill:"#000000",id:"Core",transform:"translate(-215.000000, -257.000000)"},[e.createElementVNode("g",{id:"fullscreen",transform:"translate(215.000000, 257.000000)"},[e.createElementVNode("path",{d:"M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z",id:"Shape"})])])],-1)]))}const UH=ce(IH,[["render",OH]]),ZH={class:"bg-white/30 p-1 rounded-md shadow w-fit"},WH={class:"flex gap-2"},GH=["onClick","title"],KH=["src"],JH=e.defineComponent({__name:"map-layers",props:{basemaps:{}},emits:["onLayerChange"],setup(l,{emit:t}){const a=e.ref(Object.keys(l.basemaps)[0]),n=t;function o(d){n("onLayerChange",d),a.value=d}const s={z:13,x:4790,y:2762};function i(d){if(d!=null&&d.preview)return d.preview;if(!(d!=null&&d.url))return;const c={"{z}":s.z,"{x}":s.x,"{y}":s.y};let h=d.url;return Object.entries(c).forEach(([p,y])=>{h=h.replace(new RegExp(p,"gi"),String(y))}),h}return(d,c)=>(e.openBlock(),e.createElementBlock("div",ZH,[e.createElementVNode("div",WH,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.basemaps,(h,p)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass(["cursor-pointer border rounded-lg overflow-hidden hover:shadow-sm",{"ring-2 ring-blue-500 border-blue-300":a.value===p}]),onClick:y=>o(p),title:h.name||p,role:"button",tabindex:"0"},[e.createElementVNode("img",{src:i(h),alt:"",class:"w-10 h-10 object-cover"},null,8,KH)],10,GH))),128))])]))}}),YH={class:"map-search-widget flex flex-col gap-2 rounded-xl widget min-w-[200px]"},XH={key:0,class:"vs-select__options absolute z-50 mt-1 w-full bg-white border border-gray-300 shadow-lg rounded-lg text-sm"},QH=["onClick"],e$={class:"relative flex-1 min-w-[140px]"},t$=["placeholder"],a$="https://data.softpro.ua/api-user/gis-url-proxy",r$="https://geo.rv.ua/api-user/dzk.api",l$=e.defineComponent({__name:"map-search",props:{config:{}},emits:["goToCoordinates"],setup(l,{emit:t}){const a=l,n=t,o=["here","xy","parcel"],s=e.computed(()=>{var V,C;const v=(C=(V=a.config)==null?void 0:V.tools)==null?void 0:C.filter(q=>o.includes(q));return v&&v.length?v:o}),i=e.computed(()=>{var v,V;return((V=(v=a.config)==null?void 0:v.placeholder)==null?void 0:V.trim())||"Пошук…"}),d=e.ref(s.value[0]??o[0]);e.watch(s,v=>{v.includes(d.value)||(d.value=v[0])});const c=e.ref(""),h=e.ref(!1),p=e.ref(null);e.watch(d,()=>{c.value="",h.value=!1});function y(v){d.value=v}function w(v){if(!h.value)return;const V=p.value;V&&!V.contains(v.target)&&(h.value=!1)}e.onMounted(()=>{window.addEventListener("click",w,!0)}),e.onBeforeUnmount(()=>{window.removeEventListener("click",w,!0)});function m(v){return v==="xy"?"Координати":v==="parcel"?"Кадастр":"Адреси"}function f(v){const V=v.replace(/[,]+/g," ").trim();if(!V)return null;const C=V.split(/\s+/).filter(Boolean);if(C.length<2)return null;const q=C.slice(0,2).map(Number);if(!q.every(N=>Number.isFinite(N)))return null;const[L,ee]=q;let K=L,H=ee;const B=N=>Math.abs(N)<=90,T=N=>Math.abs(N)<=180;if(!B(K)||!T(H))if(B(H)&&T(K))K=ee,H=L;else return null;return{lat:K,lng:H}}function u(v){return((v==null?void 0:v.items)||[]).map((V,C)=>{var q,L,ee;return{id:String((V==null?void 0:V.id)??C),title:(V==null?void 0:V.title)||((q=V==null?void 0:V.address)==null?void 0:q.label)||"Знайдений обʼєкт",lat:Number((L=V==null?void 0:V.position)==null?void 0:L.lat),lng:Number((ee=V==null?void 0:V.position)==null?void 0:ee.lng)}}).filter(V=>Number.isFinite(V.lat)&&Number.isFinite(V.lng))}function g(v){const V=(v==null?void 0:v.result)||(v==null?void 0:v.data)||v;if(!V)return[];const C=V.geom_centroid;if(!C||!Array.isArray(C.coordinates))return[];const[q,L]=C.coordinates;return!Number.isFinite(L)||!Number.isFinite(q)?[]:[{id:"parcel",title:V.cadnum||V.cad_num||"Земельна ділянка",lat:L,lng:q}]}function M(v){const V=v.replace(/\s+/g,"").split(":");if(V.length!==4)return!1;const C=[10,2,3,4];return V.every((q,L)=>q.length===C[L]&&/^\d+$/.test(q))}function x(v){n("goToCoordinates",[v.lat,v.lng])}async function k(){const v=c.value.trim();if(v){if(d.value==="xy"){const V=f(v);if(!V){Me({type:"warning",title:"Пошук координат",message:"Не знайдено або невірний формат координат"});return}x(V),c.value="";return}try{const V=new URL(d.value==="here"?a$:r$);if(d.value==="here")V.searchParams.set("searchtext",v);else{if(!M(v)){Me({type:"warning",title:"Пошук кадастру",message:"Кадастровий номер має формат ХХХХХХХХХХ:ХХ:ХХХ:ХХХХ"});return}V.searchParams.set("cad_num",v)}const C=await fetch(V.toString());if(!C.ok)throw new Error(`HTTP ${C.status}`);const q=await C.json(),L=d.value==="here"?u(q):g(q);if(!L.length)Me({type:"warning",title:"Пошук",message:"Не знайдено результатів"});else{const ee=L[0];x(ee),c.value=""}}catch(V){const C=(V==null?void 0:V.message)||"Помилка пошуку";Me({type:"error",title:"Пошук",message:C})}}}return(v,V)=>(e.openBlock(),e.createElementBlock("div",YH,[e.createElementVNode("form",{class:"flex gap-2",onSubmit:e.withModifiers(k,["prevent"])},[s.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:p,class:"relative search-type w-[140px]"},[e.createElementVNode("button",{type:"button",class:"vstSelect-input transition-all text-left bg-white border border-gray-200 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-100 block w-full py-1.5 px-3 text-sm cursor-pointer flex items-center justify-between gap-2",onClick:V[0]||(V[0]=C=>h.value=!h.value)},[e.createElementVNode("span",null,e.toDisplayString(m(d.value)),1),(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["w-4 h-4 text-gray-500 transition-transform",{"rotate-180":h.value}]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},V[2]||(V[2]=[e.createElementVNode("path",{d:"M6 9l6 6 6-6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]),2))]),h.value?(e.openBlock(),e.createElementBlock("div",XH,[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,C=>(e.openBlock(),e.createElementBlock("li",{key:C,class:"px-3 py-2 cursor-pointer hover:bg-gray-100",onClick:q=>y(C)},e.toDisplayString(m(C)),9,QH))),128))])])):e.createCommentVNode("",!0)],512)):e.createCommentVNode("",!0),e.createElementVNode("div",e$,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V[1]||(V[1]=C=>c.value=C),placeholder:i.value,type:"text",class:"vs-input transition-all border block w-full border-gray-200 rounded-md focus:border-blue-100 border-solid !pr-8 py-1.5 pl-3 text-sm"},null,8,t$),[[e.vModelText,c.value,void 0,{trim:!0}]]),V[3]||(V[3]=e.createElementVNode("button",{type:"submit",class:"absolute inset-y-0 right-2 flex items-center text-gray-400 hover:text-gray-600","aria-label":"Пошук"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-4.35-4.35m0 0A7.5 7.5 0 1 0 5 5a7.5 7.5 0 0 0 11.65 11.65Z"})])],-1))])],32)]))}}),n$=ce(l$,[["__scopeId","data-v-b5059a01"]]),o$={key:0,class:"absolute top-4 left-4 z-[1000] w-[calc(100%-20px)] sm:w-[350px]"},s$={key:1,class:"form-geom__panel flex gap-1 items-start mt-2"},i$={class:"flex items-center gap-1"},d$=["disabled"],c$=["disabled"],h$=["disabled"],p$={class:"absolute top-4 right-4 z-[1000]"},y$={class:"flex flex-col gap-[2px]"},u$=["disabled"],k$=["disabled"],m$=["disabled"],f$=["disabled"],g$={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},x$={class:"space-y-0.5"},M$={class:"text-gray-500"},b$={class:"text-gray-900 text-right break-all"},w$={class:"absolute left-4 bottom-[36px] z-[1000]"},v$={class:"flex flex-col gap-2"},V$={key:0,class:"bg-white/95 border border-gray-200 rounded-md shadow-sm px-3 py-2 text-xs text-gray-700 min-w-[200px]"},C$={class:"flex flex-col gap-1"},z$=["checked","disabled","onChange"],B$={class:"text-gray-700 text-xs font-medium"},E$={class:"absolute bottom-0 left-0 right-0 z-[1000] min-h-[28px] bg-white/95 border-t border-gray-200 text-xs text-gray-700 flex items-center gap-4 pt-1"},_$={key:0,class:"form-geom__feature flex items-center text-xs transition-all gap-2 w-full px-2 pb-1"},q$={class:"mr-auto flex items-center gap-2 min-w-0 relative"},S$={class:"shrink-0"},j$={class:"font-bold"},A$={class:"flex items-center"},D$={class:"text-xs mr-2"},N$={key:0,class:"text-xs mr-2"},L$={key:1,class:"text-xs mr-2"},H$=["disabled"],$$=["disabled"],va="__vs_form_maplibre_loader__",v1="__vs_form_maplibre_scripts__",Va="vs-global-bounds-src",Ca="vs-global-bounds-line",F$=e.defineComponent({__name:"vs-input-map",props:{tools:{},handleZoom:{type:Boolean,default:!0},ctrlZoom:{type:Boolean,default:!0},geomType:{default:()=>[]},prefix:{default:""},katottg:{default:""},layers:{default:()=>[]},bounds:{},api:{},center:{default:void 0},zoom:{default:void 0},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){var qe,Le,Fe,Ye;const a=l,n=t,o=e.computed(()=>!!a.disabled),s=e.ref(!1),i=e.ref(null),d=e.ref(0),c=e.ref(""),h=e.ref(null),p=e.getCurrentInstance(),y=((Fe=(Le=(qe=p==null?void 0:p.appContext)==null?void 0:qe.config)==null?void 0:Le.globalProperties)==null?void 0:Fe.$settings)??{},w=(y==null?void 0:y.map)??{},m=((Ye=p==null?void 0:p.vnode)==null?void 0:Ye.props)??{};function f(b){return Object.prototype.hasOwnProperty.call(m,b)||Object.prototype.hasOwnProperty.call(m,b.replace(/[A-Z]/g,z=>`-${z.toLowerCase()}`))}const u=Array.isArray(w.center)&&w.center.length===2?w.center:Array.isArray(y.center)&&y.center.length===2?y.center:[30,50];console.log(w);const g=typeof w.zoom=="number"?w.zoom:typeof y.zoom=="number"?y.zoom:typeof y.defaultZoom=="number"?y.defaultZoom:10,M=e.computed(()=>f("center")?a.center:w.center??a.center),x=e.computed(()=>f("zoom")?a.zoom:w.zoom??a.zoom),k=e.computed(()=>f("katottg")?String(a.katottg??""):String(w.katottg??a.katottg??"")),v=e.computed(()=>f("layers")?a.layers??[]:w.layers??a.layers??[]),V=e.computed(()=>f("bounds")?a.bounds:w.bounds??a.bounds),C=e.ref(Array.isArray(M.value)&&M.value.length===2?[...M.value]:u),q=e.ref(typeof x.value=="number"?x.value:g),L=e.ref(a.modelValue),ee=e.ref(null),K=e.ref([]);let H=!1;const B=e.reactive({}),T=e.ref([]),N=e.computed(()=>T.value.map(b=>B[b]).filter(Boolean)),U=e.ref(null),$=e.computed(()=>{var b;return((b=U.value)==null?void 0:b.entries)??[]}),Q=e.computed(()=>{if(U.value)return{left:`${U.value.point.x+12}px`,top:`${U.value.point.y+12}px`}}),Y=e.computed(()=>{var _;const b={search:!1,import:!1,export:!1,point:!1,line:!1,polygon:!1,rectangle:!1};if(!((_=a.tools)!=null&&_.length))return{...b,point:!0,line:!0,polygon:!0,rectangle:!0};const z=new Set(a.tools.map(j=>j.toLowerCase()));return{search:z.has("search"),import:z.has("import"),export:z.has("export"),point:z.has("point"),line:z.has("line"),polygon:z.has("polygon"),rectangle:z.has("rectangle")}});function ie(b){var j;if(typeof b!="string"||!b.trim())return"";if(/^https?:\/\//i.test(b))return b;const z=((j=window==null?void 0:window.location)==null?void 0:j.origin)??"",_=b.replace(/^\/+/,"");return _?z?`${z}/${_}`:`/${_}`:z}function he(){const b=Array.isArray(w.basemaps)&&w.basemaps.length?w.basemaps:y.basemaps;if(Array.isArray(b)&&b.length){const z=b.map((_,j)=>{const I=String((_==null?void 0:_.key)??(_==null?void 0:_.id)??(_==null?void 0:_.name)??`b${j}`),ae=ie(String((_==null?void 0:_.url)??""));if(!ae)return null;const re=typeof(_==null?void 0:_.preview)=="string"&&_.preview?ie(_.preview):"";return[I,{..._,url:ae,preview:re}]}).filter(_=>Array.isArray(_)&&_.length===2).reduce((_,[j,I])=>(_[j]=I,_),{});if(Object.keys(z).length)return z}return{voyager:{name:"Оглядова карта",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"},orto10:{name:"Ортофото 1:10K",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4790/2762.png"},osmb:{name:"Open Street Maps",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png",preview:"https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"}}}const _e=he(),$e=Object.keys(_e),X=e.ref($e.length?$e[0]:"");async function oe(){if(typeof window>"u")return null;const b=window;if(b[va])return b[va];b[v1]=b[v1]||{};const z=b[v1],_=ae=>{if(Array.from(document.styleSheets).some(be=>{var ze;return(ze=be==null?void 0:be.href)==null?void 0:ze.includes(ae)}))return;const re=document.createElement("link");re.rel="stylesheet",re.href=ae,document.head.appendChild(re)},j=ae=>(z[ae]||(z[ae]=new Promise((re,be)=>{const ze=Array.from(document.scripts).find(Ke=>Ke.src===ae);if(ze){ze.addEventListener("load",()=>re(),{once:!0}),ze.addEventListener("error",be,{once:!0}),ae.includes("maplibre")&&window.maplibregl&&re(),ae.includes("mapbox-gl-draw")&&window.MapboxDraw&&re();return}const je=document.createElement("script");je.src=ae,je.async=!1,je.onload=()=>re(),je.onerror=be,document.head.appendChild(je)})),z[ae]),I=(async()=>{_("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.css"),_("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.css"),window.maplibregl||await j("https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js"),window.MapboxDraw||await j("https://unpkg.com/@mapbox/mapbox-gl-draw@1.5.0/dist/mapbox-gl-draw.js");const ae=window.maplibregl,re=window.MapboxDraw;if(!ae)throw new Error("maplibregl not available after load");if(!re)throw new Error("MapboxDraw not available after load");return{maplibregl:ae,MapboxDraw:re}})().catch(ae=>{throw delete b[va],ae});return b[va]=I,I}function ke(b){return{version:8,sources:{rasterSource:{type:"raster",tiles:[b],tileSize:256}},layers:[{id:"rasterLayer",type:"raster",source:"rasterSource"}]}}let pe=null,fe=null,F=null,ne=null,A=null,P=null,W=!1,le=!1;function de(){return{onSetup(){const b=this.newFeature({type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[0,0],[0,0],[0,0],[0,0],[0,0]]]}});return this.addFeature(b),this.clearSelectedFeatures(),this.updateUIClasses({mouse:"add"}),this.setActionableState({trash:!0}),{rectangle:b,startPoint:null,hasCoordinates:!1}},onMouseMove(b,z){if(!b.startPoint)return;const[_,j]=b.startPoint,I=z.lngLat.lng,ae=z.lngLat.lat;b.rectangle.setCoordinates([[[_,j],[I,j],[I,ae],[_,ae],[_,j]]])},onClick(b,z){if(!b.startPoint){b.startPoint=[z.lngLat.lng,z.lngLat.lat],b.hasCoordinates=!0,b.rectangle.setCoordinates([[[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat],[z.lngLat.lng,z.lngLat.lat]]]);return}const[_,j]=b.startPoint,I=z.lngLat.lng,ae=z.lngLat.lat;return Math.abs(_-I)>0&&Math.abs(j-ae)>0?(b.rectangle.setCoordinates([[[_,j],[I,j],[I,ae],[_,ae],[_,j]]]),this.map.fire("draw.create",{features:[b.rectangle.toGeoJSON()]}),this.changeMode("simple_select",{featureIds:[b.rectangle.id]})):(this.deleteFeature([b.rectangle.id],{silent:!0}),b.hasCoordinates=!1,this.changeMode("simple_select"))},onStop(){},onTrash(b){this.deleteFeature([b.rectangle.id],{silent:!0}),this.changeMode("simple_select")},toDisplayFeatures(b,z,_){if(!b.hasCoordinates)return;const j=z.properties.id===b.rectangle.id;z.properties.active=j?"true":"false",_(z)}}}const G=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","$type","Polygon"],["!=","active","true"]],paint:{"fill-color":"#3b82f6","fill-outline-color":"#3b82f6","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","$type","Polygon"],["==","active","true"]],paint:{"fill-color":"#2563eb","fill-outline-color":"#2563eb","fill-opacity":.2}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","$type","Polygon"],["!=","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3b82f6","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","$type","Polygon"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#2563eb","line-width":2}},{id:"gl-draw-lines-inactive",type:"line",filter:["all",["==","$type","LineString"],["!=","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3b82f6","line-width":2}},{id:"gl-draw-lines-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#2563eb","line-width":2}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["!=","active","true"]],paint:{"circle-radius":5,"circle-color":"#3b82f6"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":6,"circle-color":"#2563eb"}},{id:"gl-draw-polygon-and-line-vertex-halo-active",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-active",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#2563eb"}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","meta","midpoint"],["==","$type","Point"]],paint:{"circle-radius":4,"circle-color":"#1d4ed8"}}];function S(){var z;const b=X.value;return!b||!((z=_e[b])!=null&&z.url)?"":_e[b].url}function R(b,z){return b!=null&&b.id?String(b.id):b!=null&&b.url?`${b.url}-${z}`:`layer-${z}`}function Z(b){var I;const z=String((b==null?void 0:b.url)??"").trim();if(!z)return"";if(/^https?:\/\//i.test(z))return z;const _=((I=window.location)==null?void 0:I.origin)??"",j=z.replace(/^\/+/,"");return`${_}/${j}`}function ge(b){var z;b&&((z=U.value)==null?void 0:z.layerId)!==b||(U.value=null)}function rt(b,z={}){return b.popup===!1?[]:Array.isArray(b.popup)?b.popup.length?b.popup.map(_=>{const j=(_==null?void 0:_.field)||(_==null?void 0:_.name);if(!j)return null;const I=z[j];return I==null||I===""?null:{key:_.label||j,value:String(I)}}).filter(Boolean):[]:Object.entries(z).slice(0,5).map(([_,j])=>({key:_,value:j==null?"—":String(j)}))}function ot(b){if(!Array.isArray(b))return[];const z=j=>Array.isArray(j)&&j.length>=2&&Number.isFinite(Number(j[0]))&&Number.isFinite(Number(j[1])),_=j=>{if(!j.length)return j;const I=j[0],ae=j[j.length-1];return!ae||I[0]!==ae[0]||I[1]!==ae[1]?[...j,I]:j};if(b.length&&z(b[0])){const j=b.map(I=>[Number(I[0]),Number(I[1])]).filter(z);return j.length?[_(j)]:[]}return b.length&&Array.isArray(b[0])&&z(b[0][0])?b.map(j=>Array.isArray(j)?j.map(I=>[Number(I[0]),Number(I[1])]):[]).filter(j=>j.length).map(_):b.length&&Array.isArray(b[0])&&Array.isArray(b[0][0])&&z(b[0][0][0])?b.flatMap(j=>Array.isArray(j)?j:[]).map(j=>Array.isArray(j)?j.map(I=>[Number(I[0]),Number(I[1])]):[]).filter(j=>j.length).map(_):[]}function wt(b){const z=b.style??{},_=z.color??"#3b82f6";if(!z.colorAttr||!z.colorSet)return _;const j=Object.keys(z.colorSet);if(!j.length)return _;const I=["match",["to-string",["get",z.colorAttr]]];return j.forEach(ae=>{var re;I.push(String(ae),((re=z.colorSet)==null?void 0:re[ae])??_)}),I.push(_),I}function ht(b){if(!F)return;b.handlers.forEach(_=>{try{F.off(_.type,_.layerId,_.handler)}catch{}}),b.handlers=[],[...b.layerIds,...b.boundsIds].forEach(_=>{F.getLayer(_)&&F.removeLayer(_)}),F.getSource(b.sourceId)&&F.removeSource(b.sourceId);const z=`vs-ov-bounds-src-${b.id}`;F.getSource(z)&&F.removeSource(z),ge(b.id)}function N1(b,z){var be,ze,je,Ke;if(!F)return[];const _=`vs-ov-bounds-src-${z}`,j=`vs-ov-bounds-line-${z}`,I=b.bounds??V.value??K.value,ae=ot(I);if(!ae.length)return[];const re={type:"FeatureCollection",features:ae.map(Vt=>({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:Vt}}))};return F.getSource(_)&&F.removeSource(_),F.addSource(_,{type:"geojson",data:re}),F.addLayer({id:j,type:"line",source:_,paint:{"line-color":((be=b.style)==null?void 0:be.stroke)??((ze=b.style)==null?void 0:ze.color)??"#2563eb","line-width":((je=b.style)==null?void 0:je.width)??2,"line-opacity":((Ke=b.style)==null?void 0:Ke.opacity)??.8,"line-dasharray":[2,2]}}),[j]}function Ge(b){var re,be,ze,je,Ke,Vt,Rl,Ol;if(!F)return;ht(b);const z=b.config,_=Z(z);if(!_)return;const j=[],I=[];if(/\.v(?:m)?t(?:\?|$)/i.test(_)||/\.pbf(?:\?|$)/i.test(_)){const Te=z.sourceLayer||z.layer||z.service_layer||((re=z.dataset)==null?void 0:re.layer)||z.id;F.addSource(b.sourceId,{type:"vector",tiles:[_]});const Dt=String(((be=z.style)==null?void 0:be.type)??"polygon").toLowerCase(),Nt=wt(z),Xe=((ze=z.style)==null?void 0:ze.opacity)??.5;if(Dt==="point"){const lt=`vs-ov-point-${b.id}`;F.addLayer({id:lt,type:"circle",source:b.sourceId,"source-layer":Te,paint:{"circle-color":Nt,"circle-radius":5,"circle-opacity":Xe}}),j.push(lt)}else if(Dt==="polyline"||Dt==="line"){const lt=`vs-ov-line-${b.id}`;F.addLayer({id:lt,type:"line",source:b.sourceId,"source-layer":Te,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":Nt,"line-width":((je=z.style)==null?void 0:je.width)??2,"line-opacity":Xe}}),j.push(lt)}else{const lt=`vs-ov-fill-${b.id}`,ia=`vs-ov-border-${b.id}`;F.addLayer({id:lt,type:"fill",source:b.sourceId,"source-layer":Te,paint:{"fill-color":Nt,"fill-opacity":Xe}}),F.addLayer({id:ia,type:"line",source:b.sourceId,"source-layer":Te,paint:{"line-color":((Ke=z.style)==null?void 0:Ke.stroke)??((Vt=z.style)==null?void 0:Vt.color)??"#2563eb","line-width":((Rl=z.style)==null?void 0:Rl.width)??1,"line-opacity":Xe}}),j.push(lt,ia)}}else{F.addSource(b.sourceId,{type:"raster",tiles:[_],tileSize:256});const Te=`vs-ov-raster-${b.id}`;F.addLayer({id:Te,type:"raster",source:b.sourceId,paint:{"raster-opacity":((Ol=z.style)==null?void 0:Ol.opacity)??1}}),j.push(Te)}j.forEach(Te=>{const Dt=Xe=>{var Ul,Zl;if(!((Ul=Xe==null?void 0:Xe.features)!=null&&Ul.length)){ge(b.id);return}const lt=((Zl=Xe.features[0])==null?void 0:Zl.properties)??{},ia=rt(b.config,lt);if(!ia.length){ge(b.id);return}U.value={layerId:b.id,entries:ia,point:{x:Xe.point.x,y:Xe.point.y}}},Nt=()=>ge(b.id);F.on("mousemove",Te,Dt),F.on("mouseleave",Te,Nt),I.push({layerId:Te,type:"mousemove",handler:Dt},{layerId:Te,type:"mouseleave",handler:Nt})}),b.layerIds=j,b.boundsIds=N1(b.config,b.id),b.handlers=I;const ae=b.visible?"visible":"none";[...b.layerIds,...b.boundsIds].forEach(Te=>{F.getLayer(Te)&&F.setLayoutProperty(Te,"visibility",ae)})}function pt(){if(!F)return;const b={type:"FeatureCollection",features:ot(V.value??K.value).map(z=>({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:z}}))};F.getSource(Va)?F.getSource(Va).setData(b):F.addSource(Va,{type:"geojson",data:b}),F.getLayer(Ca)||F.addLayer({id:Ca,type:"line",source:Va,paint:{"line-color":"#2563eb","line-width":2,"line-opacity":.8,"line-dasharray":[2,2]}})}function qt(b){if(!F||o.value)return;const z=B[b];if(!z)return;z.visible=!z.visible;const _=z.visible?"visible":"none";[...z.layerIds,...z.boundsIds].forEach(j=>{F.getLayer(j)&&F.setLayoutProperty(j,"visibility",_)}),st(),z.visible||ge(b)}function st(){var I,ae;if(!F)return;const b=[],z=[],_=[],j=[];T.value.forEach(re=>{var Vt;const be=B[re];if(!be)return;const ze=String(((Vt=be.config)==null?void 0:Vt.url)??""),je=/\.v(?:m)?t(?:\?|$)/i.test(ze),Ke=/\.png(?:\?|$)/i.test(ze);je?_.push(...be.layerIds):Ke?b.push(...be.layerIds):z.push(...be.layerIds),j.push(...be.boundsIds)}),[...b,...z,..._,...j].forEach(re=>{F.getLayer(re)&&F.moveLayer(re)}),F.getLayer(Ca)&&F.moveLayer(Ca),(((ae=(I=F.getStyle)==null?void 0:I.call(F))==null?void 0:ae.layers)??[]).map(re=>String((re==null?void 0:re.id)??"")).filter(re=>re.startsWith("gl-draw-")).forEach(re=>{F.getLayer(re)&&F.moveLayer(re)})}function Ta(b){var ae,re,be;if(!_e[b]||(X.value=b,!F))return;const z=S();if(!z)return;const _=(ae=F.getCenter)==null?void 0:ae.call(F),j=(re=F.getZoom)==null?void 0:re.call(F),I=(be=ne==null?void 0:ne.getAll)==null?void 0:be.call(ne);F.setStyle(ke(z)),F.once("style.load",()=>{var ze;if(F&&(_&&Number.isFinite(j)&&F.jumpTo({center:[_.lng,_.lat],zoom:j}),pt(),T.value.forEach(je=>{const Ke=B[je];Ke&&Ge(Ke)}),st(),((ze=I==null?void 0:I.features)==null?void 0:ze.length)&&ne))try{I.features.forEach(je=>ne.add(je)),d.value=I.features.length}catch{d.value=0}})}function St(b){var z,_,j;return b?b.type==="FeatureCollection"?((_=(z=b.features)==null?void 0:z[0])==null?void 0:_.geometry)??null:b.type==="Feature"?b.geometry??null:(j=b.geom)!=null&&j.type&&Array.isArray(b.geom.coordinates)?{type:b.geom.type,coordinates:b.geom.coordinates}:typeof b.type=="string"&&Array.isArray(b.coordinates)?b:null:null}function ta(b){return{type:"Feature",properties:{},geometry:b}}function aa(b){if(!b)return null;try{return JSON.parse(JSON.stringify(b))}catch{return null}}function ra(b){if(!b)return"__null__";try{return JSON.stringify(b)}catch{return"__invalid__"}}function Pa(b){const z=jt(b);if(!z)return null;const[[_,j],[I,ae]]=z;return{lat:(j+ae)/2,lng:(_+I)/2}}function la(b){if(!Array.isArray(b)||b.length<3)return 0;const z=(j,I)=>{const ae=j*2003750834e-2/180,re=Math.log(Math.tan((90+I)*Math.PI/360))/(Math.PI/180);return[ae,re*2003750834e-2/180]};let _=0;for(let j=0;j<b.length-1;j+=1){const[I,ae]=z(Number(b[j][0]),Number(b[j][1])),[re,be]=z(Number(b[j+1][0]),Number(b[j+1][1]));_+=I*be-re*ae}return Math.abs(_/2)/1e6}function Ia(b){var z;if(!(b!=null&&b.type)||!(b!=null&&b.coordinates))return null;if(b.type==="Polygon"){const _=(z=b.coordinates)==null?void 0:z[0];return Array.isArray(_)?la(_):null}return b.type==="MultiPolygon"?b.coordinates.reduce((_,j)=>{const I=j==null?void 0:j[0];return Array.isArray(I)?_+la(I):_},0):null}function yt(b){if(!b){h.value=null;return}const z=Pa(b);if(!z){h.value=null;return}h.value={type:String(b.type??"Feature"),center:z,areaKm2:Ia(b)}}function vt(b,z){if(!Array.isArray(b)||!Array.isArray(z)||b.length!==2||z.length!==2)return!1;const _=1e-9;return Math.abs(Number(b[0])-Number(z[0]))<_&&Math.abs(Number(b[1])-Number(z[1]))<_}function jt(b){if(!b)return null;let z=1/0,_=1/0,j=-1/0,I=-1/0;const ae=re=>{if(Array.isArray(re)){if(re.length>=2&&Number.isFinite(re[0])&&Number.isFinite(re[1])){const be=Number(re[0]),ze=Number(re[1]);z=Math.min(z,be),_=Math.min(_,ze),j=Math.max(j,be),I=Math.max(I,ze);return}re.forEach(ae)}};return ae(b.coordinates),!Number.isFinite(z)||!Number.isFinite(_)?null:[[z,_],[j,I]]}function na(b){if(!F||!b)return;const z=jt(b);if(!z)return;const[[_,j],[I,ae]]=z;if(_===I&&j===ae){F.easeTo({center:[_,j],zoom:Math.max(q.value,14)});return}F.fitBounds(z,{padding:30,duration:250,maxZoom:18})}function ut(){var z;if(!ne){d.value=0;return}const b=ne.getAll();d.value=((z=b==null?void 0:b.features)==null?void 0:z.length)??0}function oa(){var _,j,I;if(!ne)return;const b=ne.getAll();if(d.value=((_=b==null?void 0:b.features)==null?void 0:_.length)??0,!((j=b==null?void 0:b.features)!=null&&j.length)){A=null,h.value=null,H||(P="__null__",n("update:modelValue",null));return}const z=aa(((I=b.features[b.features.length-1])==null?void 0:I.geometry)??null);A=z,yt(z),H||(P=ra(z),n("update:modelValue",z))}function At(){var b;ne&&((((b=ne.getAll())==null?void 0:b.features)||[]).forEach(z=>ne.delete(z.id)),ut())}function sa(b){if(!ne)return;const z=St(b);if(H=!0,At(),z)try{ne.add(ta(z))}catch{}H=!1,A=aa(z),ut(),yt(z),z&&(na(z),o.value||D())}function L1(){if(ne){if(H=!0,At(),A)try{ne.add(ta(A))}catch{}H=!1,ut(),yt(A)}}function kt(){if(ne){try{ne.changeMode("simple_select",{featureIds:[]})}catch{}c.value=""}}function E(b){if(o.value||!ne)return;le=!0,kt(),c.value=b;const z=b==="marker"?"draw_point":b==="polyline"?"draw_line_string":b==="rectangle"?"draw_rectangle":"draw_polygon";H=!0,At(),H=!1;try{ne.changeMode(z)}catch{c.value=""}finally{requestAnimationFrame(()=>{le=!1})}}function D(){var z;if(o.value||!ne)return;const b=ne.getAll();if((z=b==null?void 0:b.features)!=null&&z.length)try{ne.changeMode("direct_select",{featureId:b.features[0].id}),c.value="edit"}catch{c.value=""}}function J(){o.value||!ne||(kt(),At(),P="__null__",h.value=null,n("update:modelValue",null))}function te(){o.value||!A||na(A)}function O(b){F&&F.easeTo({center:[b[1],b[0]],zoom:13,duration:250})}function me(){var b;o.value||((b=ee.value)==null||b.click())}function xe(b){var I;if(o.value||!ne)return;const z=b.target,_=(I=z.files)==null?void 0:I[0];if(!_)return;const j=new FileReader;j.onload=()=>{try{const ae=JSON.parse(String(j.result)),re=St(ae);if(!re)return;sa(re)}finally{z.value=""}},j.readAsText(_)}function Ce(){if(o.value||!ne)return;const b=ne.getAll(),z=new Blob([JSON.stringify(b,null,2)],{type:"application/json"}),_=URL.createObjectURL(z),j=document.createElement("a");j.href=_,j.download="data.geojson",j.click(),URL.revokeObjectURL(_)}return e.onMounted(async()=>{if(!i.value)return;const b=await oe();pe=b.maplibregl,fe=b.MapboxDraw;const z=S();z&&(F=new pe.Map({container:i.value,style:ke(z),center:[C.value[0],C.value[1]],zoom:q.value,attributionControl:!1}),F.addControl(new pe.NavigationControl({showCompass:!0}),"bottom-right"),F.on("load",()=>{if(!(!fe||!F)){if(ne=new fe({displayControlsDefault:!1,modes:{...fe.modes,draw_rectangle:de()},controls:{point:!1,line_string:!1,polygon:!1,trash:!1},styles:G}),F.addControl(ne),F.on("draw.create",()=>{if(!ne)return;const _=ne.getAll();if(_.features.length>1){const j=_.features[_.features.length-1];H=!0,_.features.slice(0,-1).forEach(I=>ne.delete(I.id)),H=!1,j&&(H=!0,ne.add(j),H=!1)}oa(),D()}),F.on("draw.update",_=>{var j,I,ae;if(!W){if((_==null?void 0:_.action)==="move"){if(W=!0,L1(),W=!1,c.value==="edit"){const re=(ae=(I=(j=ne==null?void 0:ne.getAll)==null?void 0:j.call(ne))==null?void 0:I.features)==null?void 0:ae[0];if(re!=null&&re.id)try{ne.changeMode("direct_select",{featureId:re.id})}catch{c.value=""}}return}oa()}}),F.on("draw.delete",()=>{c.value==="marker"||c.value==="polyline"||c.value==="polygon"||c.value==="rectangle"||(oa(),c.value="",kt())}),F.on("draw.selectionchange",()=>{if(!(!ne||W)&&c.value!=="edit"&&!(c.value==="marker"||c.value==="polyline"||c.value==="polygon"||c.value==="rectangle")){if(!o.value&&d.value>0){D();return}try{ne.changeMode("simple_select",{featureIds:[]})}catch{}}}),L.value!==void 0){const _=L.value;L.value=void 0,requestAnimationFrame(()=>{ne&&sa(_)})}pt(),T.value.forEach(_=>{const j=B[_];j&&Ge(j)}),st()}}),F.on("zoomend",()=>{F&&(q.value=F.getZoom())}))}),e.onUnmounted(()=>{Object.values(B).forEach(b=>{F&&ht(b)}),ge(),F!=null&&F.remove&&F.remove(),F=null,ne=null}),e.watch(()=>a.modelValue,b=>{if(!ne){L.value=b;return}const z=St(b),_=ra(z);if(P&&_===P){P=null;return}P=null,sa(b)},{deep:!0}),e.watch(()=>v.value,b=>{const z=Array.isArray(b)?b:[],_=[],j=new Set;z.forEach((I,ae)=>{if(!I)return;const re=R(I,ae);_.push(re),j.add(re);const be={...I,id:re},ze=B[re],je=(ze==null?void 0:ze.visible)??!!be.visible;ze&&F&&ht(ze),B[re]={id:re,config:be,visible:je,sourceId:`vs-ov-src-${re}`,layerIds:[],boundsIds:[],handlers:[]}}),Object.keys(B).forEach(I=>{if(j.has(I))return;const ae=B[I];ae&&F&&ht(ae),delete B[I]}),T.value=_,F&&(T.value.forEach(I=>{const ae=B[I];ae&&Ge(ae)}),st())},{immediate:!0,deep:!0}),e.watch(()=>V.value,()=>{F&&(pt(),T.value.forEach(b=>{const z=B[b];z&&Ge(z)}),st())},{deep:!0}),e.watch(()=>k.value,async b=>{var z,_;if(K.value=[],!b){F&&(pt(),T.value.forEach(j=>{const I=B[j];I&&Ge(I)}),st());return}try{const j=await fetch(`https://data.gki.com.ua/api-user/atu/${b}`);if(!(j!=null&&j.ok))return;const I=(_=(z=await j.json())==null?void 0:z.geometry)==null?void 0:_.coordinates;Array.isArray(I)&&I.length&&(K.value=I)}catch(j){console.error("Failed to fetch KATOTTG bounds",j)}finally{if(!F)return;pt(),T.value.forEach(j=>{const I=B[j];I&&Ge(I)}),st()}},{immediate:!0}),e.watch(()=>M.value,b=>{var j;if(!Array.isArray(b)||b.length!==2)return;const z=[Number(b[0]),Number(b[1])];if(vt(C.value,z)||(C.value=[...z],!F))return;const _=(j=F.getCenter)==null?void 0:j.call(F);_&&vt([_.lng,_.lat],C.value)||F.easeTo({center:[C.value[0],C.value[1]]})},{deep:!0}),e.watch(()=>x.value,b=>{typeof b=="number"&&(q.value=b,F&&F.setZoom(b))}),e.watch(o,b=>{b&&kt()}),e.watch(d,b=>{if(b>0){o.value||D();return}le||kt()}),e.watch(s,()=>{setTimeout(()=>{F!=null&&F.resize&&F.resize()},50)}),(b,z)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!s.value},[e.createElementVNode("div",{class:e.normalizeClass(["vs-map-wrapper relative w-full h-[400px]",{fullscreen:s.value}])},[e.createElementVNode("div",{ref_key:"mapContainer",ref:i,class:"w-full h-[calc(100%-28px)]"},null,512),Y.value.search||Y.value.import||Y.value.export?(e.openBlock(),e.createElementBlock("div",o$,[Y.value.search?(e.openBlock(),e.createBlock(n$,{key:0,onGoToCoordinates:O})):e.createCommentVNode("",!0),Y.value.import||Y.value.export?(e.openBlock(),e.createElementBlock("div",s$,[e.createElementVNode("div",i$,[Y.value.import?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:me,disabled:o.value}," Import ",8,d$)):e.createCommentVNode("",!0),Y.value.export?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"inline-flex items-center gap-2 text-sm font-medium border rounded-md px-3 py-2 bg-white text-blue-600 border-stone-200 hover:bg-blue-500 hover:text-white transition",onClick:Ce,disabled:o.value||d.value===0}," Export ",8,c$)):e.createCommentVNode("",!0)]),e.createElementVNode("input",{ref_key:"importRef",ref:ee,type:"file",onChange:xe,accept:".json,.geojson",class:"hidden",disabled:o.value},null,40,h$)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p$,[e.createElementVNode("div",y$,[Y.value.point?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="marker"}]),title:"Point",onClick:z[0]||(z[0]=_=>E("marker")),disabled:o.value},[e.createVNode(_H)],10,u$)):e.createCommentVNode("",!0),Y.value.line?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="polyline"}]),title:"Line",onClick:z[1]||(z[1]=_=>E("polyline")),disabled:o.value},[e.createVNode(AH)],10,k$)):e.createCommentVNode("",!0),Y.value.polygon?(e.openBlock(),e.createElementBlock("button",{key:2,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="polygon"}]),title:"Polygon",onClick:z[2]||(z[2]=_=>E("polygon")),disabled:o.value},[e.createVNode(HH)],10,m$)):e.createCommentVNode("",!0),Y.value.rectangle?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(["vs-btn",{"vs-active":c.value==="rectangle"}]),title:"Rectangle",onClick:z[3]||(z[3]=_=>E("rectangle")),disabled:o.value},[e.createVNode(PH)],10,f$)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"vs-btn mt-5",onClick:z[4]||(z[4]=_=>s.value=!s.value),title:"Full Screen"},[e.createVNode(UH,{style:{width:"12px",height:"12px"}})])])]),$.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[1500] pointer-events-none",style:e.normalizeStyle(Q.value)},[e.createElementVNode("div",g$,[e.createElementVNode("dl",x$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,_=>(e.openBlock(),e.createElementBlock("div",{key:`${_.key}-${_.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",M$,e.toDisplayString(_.key),1),e.createElementVNode("dd",b$,e.toDisplayString(_.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),e.createElementVNode("div",w$,[e.createElementVNode("div",v$,[e.createVNode(JH,{basemaps:e.unref(_e),onOnLayerChange:Ta},null,8,["basemaps"]),N.value.length?(e.openBlock(),e.createElementBlock("div",V$,[z[5]||(z[5]=e.createElementVNode("p",{class:"font-semibold text-[11px] uppercase tracking-wide text-gray-500 mb-2"},"Шари",-1)),e.createElementVNode("div",C$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,_=>(e.openBlock(),e.createElementBlock("label",{key:_.id,class:"flex items-center gap-2 cursor-pointer select-none"},[e.createElementVNode("input",{type:"checkbox",class:"rounded border-gray-300 text-blue-600 focus:ring-blue-500",checked:_.visible,disabled:o.value,onChange:j=>qt(_.id)},null,40,z$),e.createElementVNode("span",B$,e.toDisplayString(_.config.title||_.config.name||_.id),1)]))),128))])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",E$,[h.value?(e.openBlock(),e.createElementBlock("div",_$,[e.createElementVNode("div",q$,[e.createElementVNode("div",S$,[z[6]||(z[6]=e.createTextVNode(" Type: ",-1)),e.createElementVNode("span",j$,e.toDisplayString(h.value.type),1)])]),e.createElementVNode("div",A$,[e.createElementVNode("div",D$,[z[7]||(z[7]=e.createTextVNode(" Center: ",-1)),e.createElementVNode("b",null,e.toDisplayString(h.value.center.lat.toFixed(5))+", "+e.toDisplayString(h.value.center.lng.toFixed(5)),1)]),h.value.areaKm2!==null?(e.openBlock(),e.createElementBlock("div",N$,[z[8]||(z[8]=e.createTextVNode(" Area: ",-1)),e.createElementVNode("b",null,e.toDisplayString(h.value.areaKm2.toFixed(1))+" km²",1)])):(e.openBlock(),e.createElementBlock("div",L$,z[9]||(z[9]=[e.createTextVNode("Area: ",-1),e.createElementVNode("b",null,"—",-1)]))),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md mr-1 cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Zoom to feature",onClick:te,disabled:o.value},z[10]||(z[10]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-3 h-3"},[e.createElementVNode("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),e.createElementVNode("path",{d:"M7 10l6 0"}),e.createElementVNode("path",{d:"M10 7l0 6"}),e.createElementVNode("path",{d:"M21 21l-6 -6"})],-1)]),8,H$),e.createElementVNode("button",{class:"tool bg-gray-100 py-1.5 px-2 rounded-lg text-md cursor-pointer hover:bg-blue-500 hover:text-white transition-all",title:"Delete feature",onClick:J,disabled:o.value},[e.createVNode(Bt,{class:"w-3 h-3"})],8,$$)])])):e.createCommentVNode("",!0)])],2)],8,["disabled"]))}}),nl=ce(F$,[["__scopeId","data-v-3b015982"]]),T$=["data-focus"],P$={class:"flex items-center"},I$={class:"overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-[#333] text-[85%] px-0.5 py-[3px] pl-1.5 box-border"},R$=["onClick","aria-label"],O$={key:0,class:"absolute text-gray-500 truncate pl-2"},U$={class:"flex-1 min-w-[2px]"},Z$=["placeholder"],W$={class:"flex items-center shrink-0"},G$=["disabled"],ol=e.defineComponent({__name:"vs-input-tag",props:e.mergeModels({unique:{type:Boolean,default:!0},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:"Введіть тег"},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=t;He(a.style);const o=e.ref(null),s=e.ref(null),i=e.ref(null),d=e.ref(!1),c=e.ref(""),h=e.useModel(l,"modelValue"),p=e.computed(()=>a.placeholder||"Add tag…"),y=e.computed(()=>{var C;return((C=h.value)==null?void 0:C.length)===0&&c.value===""}),w=e.computed(()=>{var C;return!a.disabled&&((C=h.value)==null?void 0:C.length)>0}),m=e.computed(()=>a.disabled),f=async()=>{m.value||await e.nextTick(()=>{var C;return(C=i.value)==null?void 0:C.focus()})},u=C=>{const q=C.trim();q!==""&&(!h.value||!Array.isArray(h.value)?h.value=[q]:a.unique?h.value.includes(q)||(h.value=[...h.value,q]):h.value=[...h.value,q],c.value="")},g=()=>{const C=c.value;C.trim()!==""&&u(C),c.value=""},M=C=>{const q=h.value.slice();q.splice(C,1),n("update:modelValue",q)},x=()=>{n("update:modelValue",[])},k=()=>{m.value||(d.value=!0)},v=()=>{d.value=!1,!m.value&&g()},V=C=>{const{key:q}=C;q==="Enter"?(C.preventDefault(),g()):q==="Backspace"&&c.value===""&&h.value.length>0&&M(h.value.length-1)};return(C,q)=>(e.openBlock(),e.createElementBlock("div",{class:"flex gap-1 w-full",ref_key:"root",ref:o,onClick:q[1]||(q[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["relative w-full font-sans",a.customClass]),role:"group","aria-label":"Tag input"},[e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white","border-gray-300 hover:border-gray-400",d.value?"border-blue-500 ring-1 ring-blue-500":"",m.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),"data-focus":d.value?"true":"false",onClick:f},[e.createElementVNode("div",{class:"flex flex-1 flex-wrap items-center gap-1 py-0.5 pl-2 pr-0 overflow-hidden",ref_key:"chipsRef",ref:s},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(L,ee)=>(e.openBlock(),e.createElementBlock("div",{key:ee,class:"flex min-w-0 bg-[#e6e6e6] rounded-sm m-0.5 box-border"},[e.createElementVNode("div",P$,[e.createElementVNode("div",I$,e.toDisplayString(L),1)]),e.createElementVNode("div",{role:"button",class:"flex items-center rounded-sm px-1 box-border hover:bg-[#ffbdad] hover:text-[#de350b]",onClick:e.withModifiers(K=>M(ee),["stop"]),"aria-label":`Remove ${L}`},q[2]||(q[2]=[e.createElementVNode("svg",{height:"14",width:"14",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",class:"inline-block fill-current stroke-current leading-none stroke-0"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,R$)]))),128)),y.value?(e.openBlock(),e.createElementBlock("div",O$,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",U$,[m.value?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,ref_key:"inputRef",ref:i,class:"pl-2 w-full bg-transparent outline-none border-0 m-0 p-0 text-gray-900",autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text",tabindex:"0","aria-label":"Add tag","onUpdate:modelValue":q[0]||(q[0]=L=>c.value=L),onFocus:k,onBlur:v,onKeydown:V,placeholder:h.value&&h.value.length?"":void 0},null,40,Z$)),[[e.vModelText,c.value]])])],512),e.createElementVNode("div",W$,[w.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-2 text-gray-400 hover:text-gray-500 transition-colors disabled:opacity-50","aria-label":"Clear all tags",disabled:m.value,onClick:e.withModifiers(x,["stop"])},q[3]||(q[3]=[e.createElementVNode("svg",{height:"20",width:"20",viewBox:"0 0 20 20",class:"fill-current"},[e.createElementVNode("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"})],-1)]),8,G$)):e.createCommentVNode("",!0)])],10,T$)],2)],512))}}),K$={class:"relative flex gap-1 bg-white w-full"},J$=["disabled","placeholder"],Y$=e.defineComponent({__name:"vs-input-slug",props:e.mergeModels({disabled:{type:Boolean},placeholder:{},parent:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=e.inject("values"),a=l,n=e.useModel(l,"modelValue");function o(i){const d={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return i.toLowerCase().split("").map(c=>d[c]||c).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const s=()=>{var c,h;const i=(h=(c=t==null?void 0:t.value)==null?void 0:c[a.parent||""])==null?void 0:h.toString(),d=o(i);n.value=d.toString()};return(i,d)=>(e.openBlock(),e.createElementBlock("div",K$,[e.withDirectives(e.createElementVNode("input",{ref:"vsText",disabled:i.disabled,placeholder:i.placeholder,"onUpdate:modelValue":d[0]||(d[0]=c=>n.value=c),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,J$),[[e.vModelText,n.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200",onClick:s}," Gen ")]))}}),sl=ce(Y$,[["__scopeId","data-v-b0eba370"]]),X$={class:"relative flex gap-1 bg-white w-full"},Q$=["disabled","placeholder"],eF=["disabled"],tF={key:0},aF={key:1},rF=e.defineComponent({__name:"vs-input-codegen",props:e.mergeModels({table:{},code:{},init:{type:Boolean},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(!1),o=e.computed(()=>t.init!==!1),s=e.computed(()=>!!t.table&&!!t.code),i=()=>{if(!s.value)return"";const h=encodeURIComponent(String(t.table)),p=encodeURIComponent(String(t.code));return`/api/code-gen/${h}/${p}`},d=async()=>{if(!s.value||n.value)return;const h=i();if(h){n.value=!0;try{const p=await(await fetch(h)).text();a.value=p}finally{n.value=!1}}},c=()=>{o.value&&(a.value||d())};return e.onMounted(()=>{c()}),e.watch(()=>[t.table,t.code,t.init],()=>{c()}),(h,p)=>(e.openBlock(),e.createElementBlock("div",X$,[e.withDirectives(e.createElementVNode("input",{disabled:h.disabled,placeholder:h.placeholder,"onUpdate:modelValue":p[0]||(p[0]=y=>a.value=y),class:"block w-full px-3 py-2 text-sm border border-solid rounded-lg placeholder:text-nowrap border-stone-200 text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,8,Q$),[[e.vModelText,a.value]]),e.createElementVNode("button",{class:"px-2 bg-gray-100 border rounded-lg hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed",disabled:n.value||h.disabled||!s.value,onClick:d},[n.value?(e.openBlock(),e.createElementBlock("span",aF,"...")):(e.openBlock(),e.createElementBlock("span",tF,"Gen"))],8,eF)]))}}),il=ce(rF,[["__scopeId","data-v-6ee5237d"]]),lF={class:"w-full"},nF={ref:"sortableContainer",class:"flex flex-col gap-1"},oF=["onDragstart","onDrop"],sF={class:"w-1/3"},iF={class:"w-2/3"},dF=["onClick"],cF={key:0,class:"text-[14px] text-gray-700"},hF={class:"mt-2 w-full flex items-center"},pF=["disabled"],yF=e.defineComponent({__name:"vs-input-key-value",props:{parent:{},ignore:{},addButtonText:{},modelValue:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=u=>`${u}-${Math.random().toString(36).substring(2,15)}`,n=e.inject("values"),o=l,s=t,i=o.addButtonText??"Додати",d=o.ignore??[],c=e.ref([]),h=e.ref(null);(()=>{var g;const u=o.parent&&((g=n==null?void 0:n.value)==null?void 0:g[o.parent])||o.modelValue||{};c.value=Object.entries(u).filter(([M])=>!d.includes(M)).map(([M,x])=>({id:a("key-value-"),key:M,value:x}))})();function p(u){h.value=u}function y(u){if(h.value===null||h.value===u)return;const g=c.value.splice(h.value,1)[0];c.value.splice(u,0,g),h.value=null}const w=e.computed(()=>c.value.some(u=>u.key&&!u.value||!u.key&&u.value)),m=()=>{c.value.push({id:a("key-value-"),key:"",value:""})},f=u=>{c.value=c.value.filter(g=>g.id!==u)};return e.watch(c,u=>{const g={};u.forEach(x=>{x.key&&x.value!==void 0&&(g[x.key]=x.value)});const M={};d.length&&d.forEach(x=>{var k,v;M[x]=o.parent?(v=(k=n==null?void 0:n.value)==null?void 0:k[o.parent])==null?void 0:v[x]:void 0}),n!=null&&n.value&&o.parent&&(n.value[o.parent]={...M,...g}),s("update:modelValue",g)},{deep:!0}),(u,g)=>(e.openBlock(),e.createElementBlock("div",lF,[e.createElementVNode("div",nF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(M,x)=>(e.openBlock(),e.createElementBlock("div",{key:M.id,class:e.normalizeClass(["flex items-center gap-2 w-full",{"opacity-50":h.value===x}]),draggable:"true",onDragstart:k=>p(x),onDragover:g[0]||(g[0]=e.withModifiers(()=>{},["prevent"])),onDrop:k=>y(x)},[g[1]||(g[1]=e.createStaticVNode('<button class="cursor-move" data-v-81b9444f><svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-81b9444f><circle cx="15" cy="12" r="1.5" data-v-81b9444f></circle><circle cx="15" cy="24" r="1.5" data-v-81b9444f></circle><circle cx="21" cy="12" r="1.5" data-v-81b9444f></circle><circle cx="21" cy="24" r="1.5" data-v-81b9444f></circle><circle cx="21" cy="18" r="1.5" data-v-81b9444f></circle><circle cx="15" cy="18" r="1.5" data-v-81b9444f></circle></svg></button>',1)),e.createElementVNode("div",sF,[e.createVNode(zt,{modelValue:M.key,"onUpdate:modelValue":k=>M.key=k,placeholder:"Ключ"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",iF,[e.createVNode(zt,{modelValue:M.value,"onUpdate:modelValue":k=>M.value=k,placeholder:"Значення"},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("button",{onClick:k=>f(M.id),class:"shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200"},[e.createVNode(e.unref(Ma),{height:"16",width:"16"})],8,dF)],42,oF))),128))],512),c.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",cF," Дані для відображення відсутні ")),e.createElementVNode("div",hF,[e.createElementVNode("button",{type:"button",onClick:m,disabled:w.value,class:"py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"},[e.createVNode(Qe,{height:"14",width:"14"}),e.createTextVNode(" "+e.toDisplayString(e.unref(i)),1)],8,pF)])]))}}),dl=ce(yF,[["__scopeId","data-v-81b9444f"]]),uF={class:"w-full"},kF={ref:"sortableContainer",class:"flex flex-col gap-1"},mF=["onDragstart","onDrop"],fF=["disabled"],gF={class:"flex-1"},xF=["onClick","disabled"],MF={key:0,class:"text-[14px] text-gray-700"},bF={class:"mt-2 w-full flex items-center"},wF=["disabled"],vF=e.defineComponent({__name:"vs-input-text-array",props:e.mergeModels({addButtonText:{default:"Додати"},inputType:{default:"text"},placeholder:{default:"Значення"},mask:{default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref([]),o=e.ref(null),s=e.computed(()=>!!t.disabled),i=e.computed(()=>t.placeholder??""),d=e.computed(()=>t.addButtonText??"Додати");let c=!1;const h=g=>`${g}-${Math.random().toString(36).substring(2,15)}`,p=g=>{const M=g??a.value??[];n.value=M.map((x,k)=>{var v;return{id:((v=n.value[k])==null?void 0:v.id)??h("text-array"),value:x??""}})};p(),e.watch(()=>a.value,g=>{if(c){c=!1;return}p(g||[])},{deep:!0}),e.watch(n,g=>{c=!0,a.value=g.map(M=>M.value).filter(M=>M!=null&&M!=="")},{deep:!0});const y=e.computed(()=>s.value||n.value.some(g=>!g.value));function w(){y.value||(n.value=[...n.value,{id:h("text-array"),value:""}])}function m(g){s.value||(n.value=n.value.filter(M=>M.id!==g))}function f(g){s.value||(o.value=g)}function u(g){if(s.value||o.value===null||o.value===g)return;const M=[...n.value],[x]=M.splice(o.value,1);M.splice(g,0,x),n.value=M,o.value=null}return(g,M)=>(e.openBlock(),e.createElementBlock("div",uF,[e.createElementVNode("div",kF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(x,k)=>(e.openBlock(),e.createElementBlock("div",{key:x.id,class:e.normalizeClass(["flex items-center gap-2 w-full",{"opacity-50":o.value===k}]),draggable:"true",onDragstart:v=>f(k),onDragover:M[0]||(M[0]=e.withModifiers(()=>{},["prevent"])),onDrop:v=>u(k)},[e.createElementVNode("button",{class:"cursor-move",type:"button",disabled:s.value},M[1]||(M[1]=[e.createStaticVNode('<svg fill="#000000" width="20" height="20" viewBox="0 0 36 36" data-v-66316a33><circle cx="15" cy="12" r="1.5" data-v-66316a33></circle><circle cx="15" cy="24" r="1.5" data-v-66316a33></circle><circle cx="21" cy="12" r="1.5" data-v-66316a33></circle><circle cx="21" cy="24" r="1.5" data-v-66316a33></circle><circle cx="21" cy="18" r="1.5" data-v-66316a33></circle><circle cx="15" cy="18" r="1.5" data-v-66316a33></circle></svg>',1)]),8,fF),e.createElementVNode("div",gF,[g.inputType==="text"?(e.openBlock(),e.createBlock(zt,{key:0,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])):e.createCommentVNode("",!0),g.inputType==="tel"?(e.openBlock(),e.createBlock(f1,{key:1,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])):e.createCommentVNode("",!0),g.inputType==="email"?(e.openBlock(),e.createBlock(m1,{key:2,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])):e.createCommentVNode("",!0),g.inputType==="mask"?(e.openBlock(),e.createBlock(k1,{key:3,modelValue:x.value,"onUpdate:modelValue":v=>x.value=v,mask:g.mask,disabled:s.value,placeholder:i.value},null,8,["modelValue","onUpdate:modelValue","mask","disabled","placeholder"])):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",onClick:v=>m(x.id),disabled:s.value,class:"shrink-0 w-[30px] text-gray-600 h-[30px] rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200 disabled:opacity-50"},[e.createVNode(e.unref(Ma),{height:"16",width:"16"})],8,xF)],42,mF))),128))],512),n.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",MF," Дані для відображення відсутні ")),e.createElementVNode("div",bF,[e.createElementVNode("button",{type:"button",onClick:w,disabled:y.value,class:"py-1.5 px-2 flex items-center gap-x-1 text-xs font-medium rounded-full border border-dashed border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"},[e.createVNode(Qe,{height:"14",width:"14"}),e.createTextVNode(" "+e.toDisplayString(d.value),1)],8,wF)])]))}}),cl=ce(vF,[["__scopeId","data-v-66316a33"]]),VF={class:"flex items-center gap-2 w-full"},CF=["disabled"],zF=["disabled"],hl=e.defineComponent({__name:"vs-input-color",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:n}=He(a.style),o=t,s=e.computed({get:()=>a.modelValue||"#000000",set:d=>o("update:modelValue",d)}),i=e.computed(()=>!!a.disabled);return(d,c)=>(e.openBlock(),e.createElementBlock("div",VF,[e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":c[0]||(c[0]=h=>s.value=h),disabled:i.value,ref:"color",class:e.normalizeClass(["py-1.5 px-1 block w-full bg-white cursor-pointer max-w-[50px]",[d.modelValue?"":"text-opacity-50",e.unref(n)].join(" ")]),style:{border:"1px solid #CFD9E0"}},null,10,CF),[[e.vModelText,s.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2","onUpdate:modelValue":c[1]||(c[1]=h=>s.value=h),disabled:i.value},null,8,zF),[[e.vModelText,s.value]])]))}}),BF={class:"flex items-center gap-2 w-full"},EF=["min","max","step","disabled"],_F=["disabled"],pl=e.defineComponent({__name:"vs-input-range",props:{style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{},name:{},placeholder:{default:""},maxlength:{},minlength:{},min:{default:0},max:{default:100},step:{default:1}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,{inputClass:n}=He(a.style),o=t,s=e.computed({get:()=>Number(a.modelValue??a.min),set:d=>o("update:modelValue",Number(d))}),i=e.computed(()=>!!a.disabled);return(d,c)=>(e.openBlock(),e.createElementBlock("div",BF,[e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":c[0]||(c[0]=h=>s.value=h),min:d.min,max:d.max,step:d.step,disabled:i.value,ref:"range",class:e.normalizeClass(["w-full cursor-pointer accent-blue-500",[d.modelValue?"":"text-opacity-50",e.unref(n)].join(" ")])},null,10,EF),[[e.vModelText,s.value]]),e.withDirectives(e.createElementVNode("input",{class:"text-sm text-gray-600 border border-solid border-stone-200 rounded-md p-2 max-w-[100px]",type:"number","onUpdate:modelValue":c[1]||(c[1]=h=>s.value=h),disabled:i.value},null,8,_F),[[e.vModelText,s.value]])]))}}),qF=["placeholder","disabled","name"],SF=["type","value","onInput","placeholder","disabled"],jF=["onClick"],yl=e.defineComponent({__name:"vs-input-array",props:e.mergeModels({count:{default:1},limit:{default:1},mask:{default:""},unmask:{type:Boolean,default:!1},inputType:{default:"text"},isAdded:{type:Boolean,default:!1},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.ref(t.count),n=e.computed(()=>t.limit),{inputClass:o}=He(t.style),s=e.useModel(l,"modelValue"),i=e.computed(()=>!!t.disabled),d=e.computed(()=>t.placeholder??"");e.watchEffect(()=>{var g;const u=((g=s.value)==null?void 0:g.length)??0;u<a.value&&(s.value=[...s.value??[],...Array(a.value-u)])});const c=e.ref({}),h=e.ref({});function p(u,g){u&&(c.value[g]=u)}async function y(u,g){var x;if(!u||t.inputType!=="mask")return;const{default:M}=await Promise.resolve().then(()=>D1);h.value[g]&&h.value[g].destroy(),h.value[g]=M(u,{mask:t.mask||"",definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},lazy:!1}),h.value[g].on("accept",()=>{const k=[...s.value||[]];k[g]=t.unmask?h.value[g].unmaskedValue:h.value[g].value,s.value=k}),h.value[g].on("complete",()=>{const k=[...s.value||[]];k[g]=t.unmask?h.value[g].unmaskedValue:h.value[g].value,s.value=k}),(x=s.value)!=null&&x[g]&&(h.value[g].value=s.value[g])}function w(u,g){if(i.value)return;const M=u.target.value??null,x=[...s.value];x[g]=t.inputType==="text"?M:Number(M),s.value=x}function m(){a.value+=1;const u=t.inputType==="text"||t.inputType==="mask"?null:0;s.value=[...s.value,u],t.inputType==="mask"&&setTimeout(()=>{const g=a.value-1;c.value[g]&&y(c.value[g],g)},0)}function f(u){if(a.value>1){h.value[u]&&(h.value[u].destroy(),delete h.value[u]),a.value-=1,s.value=s.value.filter((M,x)=>x!==u);const g={};Object.keys(h.value).forEach(M=>{const x=parseInt(M,10);x>u?g[x-1]=h.value[x]:x<u&&(g[x]=h.value[x])}),h.value=g}}return e.onMounted(()=>{if(t.inputType==="mask")for(let u=0;u<a.value;u+=1)c.value[u]&&y(c.value[u],u)}),e.onBeforeUnmount(()=>{Object.values(h.value).forEach(u=>{u&&u.destroy()})}),e.watch(()=>t.mask,u=>{t.inputType==="mask"&&Object.values(h.value).forEach(g=>{g&&g.updateOptions({mask:u,definitions:{9:/[0-9]/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/}})})}),e.watch(s,u=>{t.inputType==="mask"&&u&&u.forEach((g,M)=>{h.value[M]&&h.value[M].value!==g&&(h.value[M].value=g||"")})},{deep:!0}),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["grid gap-2",`grid-cols-${n.value}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,M=>{var x;return e.openBlock(),e.createElementBlock("div",{key:M,class:"flex items-center gap-2 w-full"},[u.inputType==="mask"?(e.openBlock(),e.createElementBlock("input",{key:0,type:"text",ref_for:!0,ref:k=>p(k,M-1),placeholder:u.placeholder,disabled:u.disabled,name:`${u.name}[${M-1}]`,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(o),{"!border-red-600":u.error}]]),style:{border:"1px solid #CFD9E0"}},null,10,qF)):(e.openBlock(),e.createElementBlock("input",{key:1,type:u.inputType,value:(x=s.value)==null?void 0:x[M-1],onInput:k=>w(k,M-1),placeholder:d.value,disabled:i.value,class:e.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] bg-white",[e.unref(o),{"!border-red-600":u.error}]]),style:{border:"1px solid #CFD9E0"}},null,42,SF)),!u.disabled&&M===a.value&&u.isAdded?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",onClick:e.withModifiers(m,["stop"]),class:"cursor-pointer shrink-0 w-[38px] text-green-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"},[e.createVNode(Qe,{height:"18",width:"18"})])):e.createCommentVNode("",!0),!u.disabled&&a.value>1&&u.isAdded?(e.openBlock(),e.createElementBlock("button",{key:3,type:"button",onClick:e.withModifiers(k=>f(M-1),["stop"]),class:"cursor-pointer shrink-0 w-[38px] text-red-600 h-[38px] rounded-md flex items-center justify-center border border-stone-200 hover:bg-stone-100"},[e.createVNode(Ma,{height:"18",width:"18"})],8,jF)):e.createCommentVNode("",!0)])}),128))],2))}}),AF=["aria-expanded","data-focus"],DF=["placeholder","disabled","readonly"],NF={class:"max-h-full"},LF=["onClick","disabled"],HF={key:0,class:"px-3 py-2 text-sm text-stone-500"},$F={class:"flex flex-col gap-1"},FF=["onDragstart","onDrop"],TF=["disabled"],PF=["title"],IF=["disabled","onClick","aria-label"],RF={key:0,class:"text-xs text-stone-500"},OF=e.defineComponent({__name:"vs-input-array-select",props:e.mergeModels({options:{default:()=>[]},data:{default:""},api:{default:""},prefix:{default:"api"},host:{default:""},parent:{},search:{type:Boolean,default:!0},maxHeight:{default:280},start:{default:0},slot:{},disabled:{type:Boolean,default:!1},style:{},customClass:{},modelValue:{},error:{},name:{},placeholder:{default:"Оберіть значення"},maxlength:{},minlength:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:e.mergeModels(["change","update:modelValue","value-selected"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=t,o=e.useModel(l,"modelValue"),s=e.ref([]),i=e.ref(a.options??[]),d=e.ref({}),c=e.ref({}),h=e.ref({keyword:"",parent:null}),p=e.ref(""),y=e.ref(!1),w=e.ref(null),m=e.ref(null),f=e.ref(null);let u=!1,g=!1;const M=e.inject("values"),x=e.computed(()=>!!a.disabled),k=e.computed(()=>a.placeholder??"Оберіть значення"),v=e.computed(()=>a.search!==!1),V=e.computed(()=>`${a.maxHeight??280}px`),C=e.computed(()=>{const S=a.parent??a.parentValue;return S?String(S):""}),q=e.computed(()=>{var S;return C.value?((S=M==null?void 0:M.value)==null?void 0:S[C.value])??null:null}),L=S=>S==null?"__null__":String(S),ee=S=>{if(!S)return"";const R=S.label??S.text??S.name??S.ua??S.en;return R?String(R):S.id!==void 0&&S.id!==null?String(S.id):""},K=S=>{const R=L(S);return c.value[R]||(c.value[R]=`array-select-${R}-${Math.random().toString(36).slice(2,8)}`),c.value[R]},H=e.computed(()=>new Set(s.value.map(S=>L(S.id)))),B=e.computed(()=>{const S=H.value;let R=[...i.value];if(!a.data&&p.value.trim()){const Z=p.value.toLowerCase();R=R.filter(ge=>ee(ge).toLowerCase().includes(Z))}return R.filter(Z=>!S.has(L(Z.id)))}),T=()=>{if(!a.data)return"";const S=a.prefix??"api",R=a.api??`/${S}/suggest/${a.data}`;return`${a.host??""}${R}`},N=()=>{s.value.length&&(u=!0,s.value=s.value.map(S=>({...S,text:d.value[L(S.id)]??S.text})))},U=S=>{const R=L(S.id),Z=ee(S);Z&&(d.value[R]=Z)},$=S=>{i.value=S?[...S]:[],S==null||S.forEach(U),N()},Q=S=>{if(!S.length)return;const R=new Map(i.value.map(Z=>[L(Z.id),Z]));S.forEach(Z=>{const ge=L(Z.id);R.set(ge,Z),U(Z)}),i.value=Array.from(R.values()),N()},Y=async(S="")=>{var ge;if(!a.data)return[];const R=T();if(!R)return[];const Z=new URLSearchParams;Z.set("json","1"),S&&Z.set("key",S),a.start===1&&Z.set("start","1"),q.value!==null&&q.value!==void 0&&q.value!==""&&Z.set("parent",String(q.value));try{return((ge=await(await fetch(`${R}?${Z.toString()}`)).json())==null?void 0:ge.data)??[]}catch{return[]}},ie=async S=>{var rt;if(!a.data||!S.length)return[];const R=T();if(!R)return[];const Z=Array.from(new Set(S.map(ot=>L(ot)))),ge=new URLSearchParams;ge.set("json","1"),ge.set("val",Z.join(",")),a.start===1&&ge.set("start","1"),q.value!==null&&q.value!==void 0&&q.value!==""&&ge.set("parent",String(q.value));try{const ot=((rt=await(await fetch(`${R}?${ge.toString()}`)).json())==null?void 0:rt.data)??[];return Q(ot),ot}catch{return[]}},he=async(S="",{force:R=!1}={})=>{if(!a.data)return;const Z=q.value??null;if(!R&&h.value.keyword===S&&h.value.parent===Z&&i.value.length>0)return;h.value={keyword:S,parent:Z};const ge=await Y(S);$(ge)},_e=((S,R=200)=>{let Z;return(...ge)=>{Z&&clearTimeout(Z),Z=setTimeout(()=>S(...ge),R)}})(async S=>{a.data&&await he(S,{force:!0})},250),$e=e.ref(null),X=async(S="click")=>{var R;x.value||y.value||($e.value=S,await he(p.value.trim()),y.value=!0,await e.nextTick(),(R=f.value)==null||R.focus())},oe=()=>{y.value=!1,$e.value=null,e.nextTick(()=>{var S;(S=f.value)==null||S.blur()})},ke=async S=>{if(S.stopPropagation(),!x.value){if(y.value){if($e.value==="focus"){$e.value=null;return}oe();return}await X("click")}},pe=S=>{S.key==="Escape"&&oe()},fe=S=>{var Z;const R=S.target;(Z=m.value)!=null&&Z.contains(R)||oe()},F=S=>{if(S.key==="Escape"){S.preventDefault(),oe();return}if(S.key==="Enter"){S.preventDefault();const R=B.value[0];R&&ne(R)}},ne=S=>{if(!S)return;const R=L(S.id);if(H.value.has(R))return;U(S);const Z={id:S.id,text:ee(S)||String(S.id??""),key:K(S.id)};s.value=[...s.value,Z],A(S),p.value="",e.nextTick(()=>{var ge;(ge=f.value)==null||ge.focus()})},A=S=>{const R=s.value.map(Z=>Z.id);n("value-selected",{name:a.name,value:R,option:S})},P=S=>{if(x.value)return;const R=s.value.filter(Z=>L(Z.id)!==L(S));s.value=R},W=S=>{x.value||(w.value=S)},le=S=>{if(x.value||w.value===null||w.value===S)return;const R=[...s.value],[Z]=R.splice(w.value,1);R.splice(S,0,Z),w.value=null,s.value=R},de=async()=>{const S=(Array.isArray(o.value)?[...o.value]:[]).filter(Z=>Z!=null);if(a.data&&S.length){const Z=S.filter(ge=>!d.value[L(ge)]);Z.length&&await ie(Z)}const R=S.map(Z=>({id:Z,text:d.value[L(Z)]??String(Z),key:K(Z)}));u=!0,s.value=R};e.watch(s,S=>{if(u){u=!1;return}const R=S.map(Z=>Z.id);g=!0,o.value=R,n("change",R)},{deep:!0}),e.watch(o,()=>{if(g){g=!1;return}de()},{deep:!0}),e.watch(p,S=>{!a.data||!y.value||_e(S.trim())}),e.watch(x,S=>{S&&oe()}),e.watch(()=>a.options,async S=>{a.data||($(S??[]),await de())},{immediate:!0,deep:!0}),e.watch(()=>a.data,async S=>{S&&(await he(p.value.trim()),await de())},{immediate:!0});const G=e.ref(!1);return e.watch(q,async()=>{if(a.data){if(!G.value){G.value=!0;return}s.value=[],await he(p.value.trim()),await de()}}),e.onMounted(async()=>{document.addEventListener("click",fe,!0),window.addEventListener("keydown",pe),await de()}),e.onUnmounted(()=>{document.removeEventListener("click",fe,!0),window.removeEventListener("keydown",pe)}),(S,R)=>(e.openBlock(),e.createElementBlock("div",{class:"flex flex-col gap-2 w-full",ref_key:"rootRef",ref:m},[e.createElementVNode("div",{class:"relative",onClick:R[2]||(R[2]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(["flex min-h-[38px] items-center justify-between rounded border transition-colors bg-white px-3","border-gray-300 hover:border-[#b3d4ff]",y.value?"border-[#2684ff] ring-1 ring-[#2684ff] shadow-[0_0_0_1px_rgba(38,132,255,0.5)]":"",x.value?"bg-gray-100 text-gray-400 cursor-not-allowed hover:border-gray-300":""]),role:"combobox","aria-expanded":y.value,"aria-haspopup":"listbox","data-focus":y.value?"true":"false",onClick:ke},[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:f,"onUpdate:modelValue":R[0]||(R[0]=Z=>p.value=Z),placeholder:k.value,disabled:x.value,readonly:!v.value,onFocus:R[1]||(R[1]=()=>X("focus")),onKeydown:F,class:"flex-1 bg-transparent border-0 outline-none px-0 py-1 text-sm text-stone-900 placeholder:text-stone-400"},null,40,DF),[[e.vModelText,p.value]]),e.createElementVNode("span",{class:e.normalizeClass(["text-stone-400 transition-transform duration-150",y.value?"rotate-180":""]),"aria-hidden":"true"},[e.createVNode(p1,{width:"16",height:"16"})],2)],10,AF),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute left-0 right-0 z-10 mt-1 rounded-md border border-stone-200 bg-white shadow-lg overflow-auto",style:e.normalizeStyle({maxHeight:V.value})},[e.createElementVNode("div",NF,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,Z=>(e.openBlock(),e.createElementBlock("button",{key:L(Z.id),type:"button",class:"w-full px-3 py-2 text-left text-sm text-stone-900 hover:bg-stone-100 disabled:opacity-50",onClick:e.withModifiers(ge=>ne(Z),["stop"]),disabled:x.value},e.toDisplayString(ee(Z)),9,LF))),128)),B.value.length===0?(e.openBlock(),e.createElementBlock("p",HF," Немає варіантів ")):e.createCommentVNode("",!0)])],4)):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",$F,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(Z,ge)=>(e.openBlock(),e.createElementBlock("div",{key:Z.key,class:e.normalizeClass(["flex items-center gap-2 rounded-md border border-stone-200 bg-white px-2 py-2",{"opacity-60":w.value===ge}]),draggable:"true",onDragstart:rt=>W(ge),onDragover:R[3]||(R[3]=e.withModifiers(()=>{},["prevent"])),onDrop:rt=>le(ge),onDragend:R[4]||(R[4]=rt=>w.value=null)},[e.createElementVNode("button",{type:"button",class:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-stone-500 hover:text-stone-900",disabled:x.value,"aria-label":"Перетягнути"},[e.createVNode(wa,{width:"14",height:"14"})],8,TF),e.createElementVNode("div",{class:"flex-1 text-sm text-stone-900",title:Z.text},e.toDisplayString(Z.text),9,PF),e.createElementVNode("button",{type:"button",class:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-stone-400 hover:text-stone-900",disabled:x.value,onClick:e.withModifiers(rt=>P(Z.id),["stop"]),"aria-label":`Видалити ${Z.text}`},[e.createVNode(Ma,{width:"14",height:"14"})],8,IF)],42,FF))),128)),s.value.length===0?(e.openBlock(),e.createElementBlock("p",RF,"Немає вибраних значень")):e.createCommentVNode("",!0)])],512))}}),za=ce(OF,[["__scopeId","data-v-8dc8c204"]]),UF={class:"flex items-center gap-2 w-full"},ZF={class:"relative flex-1"},WF=["placeholder","disabled","onKeydown"],GF=["disabled"],KF={key:0,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},JF={key:1,class:"animate-spin h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},YF={key:0,class:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/50"},XF={class:"bg-white text-gray-900 rounded-lg shadow-lg w-[480px] max-h-[80vh] overflow-y-auto"},QF={class:"p-3 border-b font-semibold text-gray-900 flex justify-between items-center"},eT=["onClick"],tT={key:0,class:"p-4 text-sm text-gray-500"},ul=e.defineComponent({__name:"vs-input-address",props:e.mergeModels({api:{default:""},geom:{default:""},includes:{default:()=>[]},bbox:{},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","update:geom"],["update:modelValue"]),setup(l,{emit:t}){const a=/{{\s*([^}]+?)\s*}}/g,n=l,o=t,{inputClass:s}=He(n.style),i=e.useModel(l,"modelValue"),d=e.computed({get:()=>i.value,set:q=>{i.value=q}}),c=e.ref(!1),h=e.ref([]),p=e.ref(!1),y=e.ref(null);e.watch(p,q=>{typeof document>"u"||(q?(y.value=document.body.style.overflow,document.body.style.overflow="hidden"):y.value!=null?(document.body.style.overflow=y.value,y.value=null):document.body.style.removeProperty("overflow"))}),e.onBeforeUnmount(()=>{typeof document>"u"||(y.value!=null?document.body.style.overflow=y.value:document.body.style.removeProperty("overflow"))});const w=e.computed(()=>n.placeholder??""),m=e.computed(()=>!!n.disabled),f=q=>{if(!q)return null;if(Array.isArray(q))return q;if(typeof q=="string"){const L=q.split(",").map(ee=>ee.trim()).filter(Boolean);return L.length!==4?null:L.map(Number)}return null},u=e.computed(()=>{const q=f(n.bbox);if(!q||q.length!==4)return null;const L=q.map(Number);return L.some(ee=>Number.isNaN(ee))?null:L}),g=e.computed(()=>{const q=u.value;if(!q)return"";const[L,ee,K,H]=q;return`${L},${Math.max(ee,H)},${K},${Math.min(ee,H)}`});e.computed(()=>g.value?"1":"0");const M=e.inject("values");function x(){!m.value&&d.value.trim()&&k()}async function k(){var K;const q=(d.value||"").trim();if(!q)return;let L=q;if((K=n.includes)!=null&&K.length&&(M!=null&&M.value)){const H=n.includes.map(B=>{var T;return(T=M.value)==null?void 0:T[B]}).filter(Boolean);H.length&&(L=`${H.join(", ")}, ${q}`)}const ee=C(L);if(ee){c.value=!0;try{const H=await(await fetch(ee)).json();h.value=Array.isArray(H)?H:[],p.value=!0}catch(H){console.error("Address search error:",H)}finally{c.value=!1}}}function v(){p.value=!p.value}function V(q){if(!q)return;p.value=!1;const L=parseFloat(q.lat),ee={type:"Point",coordinates:[parseFloat(q.lon),L]};n.geom&&(M!=null&&M.value)&&(M.value[n.geom]=ee),o("update:geom",ee)}function C(q){if(!n.api)return"";const L={value:encodeURIComponent(q),bbox:u.value?u.value.join(","):""};return n.api.replace(a,(ee,K)=>L[K.trim()]??"")}return(q,L)=>{var ee;return e.openBlock(),e.createElementBlock("div",UF,[e.createElementVNode("div",ZF,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":L[0]||(L[0]=K=>d.value=K),placeholder:w.value,disabled:m.value,class:e.normalizeClass(["py-1.5 px-3 block w-full bg-white border rounded-md placeholder:text-gray-400 focus:ring-2 focus:ring-blue-500",[e.unref(s),{"!border-red-600":n.error}]]),style:{border:"1px solid #CFD9E0"},onKeydown:e.withKeys(e.withModifiers(x,["prevent"]),["enter"])},null,42,WF),[[e.vModelText,d.value]]),h.value.length?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-blue-600",onClick:v,title:"Show search results"},L[2]||(L[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("path",{d:"M12 16v-4"}),e.createElementVNode("path",{d:"M12 8h.01"})],-1)]))):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",onClick:k,class:"flex items-center justify-center px-2 py-2 border rounded-md bg-white hover:bg-gray-50 text-gray-600 hover:text-blue-600 disabled:opacity-50 h-[38px]",disabled:c.value||!((ee=d.value)!=null&&ee.trim())},[c.value?(e.openBlock(),e.createElementBlock("svg",JF,L[4]||(L[4]=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",KF,L[3]||(L[3]=[e.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),e.createElementVNode("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},null,-1)])))],8,GF),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[p.value?(e.openBlock(),e.createElementBlock("div",YF,[e.createElementVNode("div",XF,[e.createElementVNode("div",QF,[L[6]||(L[6]=e.createElementVNode("span",null,"Search results",-1)),e.createElementVNode("button",{class:"text-gray-500 hover:text-blue-600",onClick:L[1]||(L[1]=K=>p.value=!1),title:"Close"},L[5]||(L[5]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElementVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)]))]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(K,H)=>(e.openBlock(),e.createElementBlock("li",{key:H,onClick:B=>V(K),class:"px-3 py-2 cursor-pointer hover:bg-gray-100 border-b text-sm"},e.toDisplayString(K.display_name),9,eT))),128))]),h.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tT," No results found "))])])):e.createCommentVNode("",!0)]))])}}}),kl=(l="")=>`${l}${Math.floor(Math.random()*1e4)}`,aT={class:"vs-datalist space-y-3"},rT={class:"space-y-3"},lT=["onClick","disabled"],nT={key:0,class:"rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"},oT=["disabled"],sT=e.defineComponent({__name:"vs-input-datalist",props:e.mergeModels({schema:{default:()=>[]},minItems:{default:0},maxItems:{default:void 0},addButtonText:{default:"Додати позицію"},emptyLabel:{default:"Немає рядків"},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.computed(()=>Array.isArray(a.value)?a.value:[]),o=e.ref([]),s=e.computed(()=>{var u;return((u=t.schema)==null?void 0:u.map(g=>({...g,disabled:t.disabled||g.disabled})))??[]}),i=e.computed(()=>s.value.map(u=>f(u))),d=e.computed(()=>t.disabled?!1:t.maxItems?n.value.length<t.maxItems:!0),c=e.computed(()=>t.disabled||n.value.length<=(t.minItems||0));e.watch(()=>n.value.length,()=>{h(),p()},{immediate:!0}),e.watch(()=>t.schema,p,{immediate:!0,deep:!0});function h(){const u=n.value.length;o.value.length<u?o.value=[...o.value,...Array.from({length:u-o.value.length},()=>kl())]:o.value.length>u&&o.value.splice(u)}function p(){if(!t.minItems||n.value.length>=t.minItems)return;const u=t.minItems-n.value.length,g=Array.from({length:u},y);a.value=[...n.value,...g]}function y(){const u={};return s.value.forEach(g=>{u[g.name]=(g==null?void 0:g.default)??null}),u}function w(){d.value&&(a.value=[...n.value,y()],h())}function m(u){c.value||(a.value=n.value.filter((g,M)=>M!==u),h(),p())}function f(u){return{...u}}return(u,g)=>(e.openBlock(),e.createElementBlock("div",aT,[e.createElementVNode("div",rT,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(M,x)=>(e.openBlock(),e.createElementBlock("div",{key:o.value[x],class:"flex items-center gap-3"},[e.createVNode(nt,{schema:i.value,layout:"inline",navigation:!1,values:n.value[x],"onUpdate:values":k=>n.value[x]=k,"form-id":o.value[x]},null,8,["schema","values","onUpdate:values","form-id"]),e.createElementVNode("button",{type:"button",class:"h-[38px] w-[38px] flex items-center justify-center text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",onClick:k=>m(x),disabled:c.value},[e.createVNode(Bt,{class:"w-5 h-5"})],8,lT)]))),128)),n.value.length===0?(e.openBlock(),e.createElementBlock("div",nT,e.toDisplayString(t.emptyLabel),1)):e.createCommentVNode("",!0)]),e.createElementVNode("button",{type:"button",class:"flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",onClick:w,disabled:!d.value},[e.createVNode(Qe,{class:"w-5 h-5"}),e.createTextVNode(" "+e.toDisplayString(t.addButtonText),1)],8,oT)]))}}),iT=ce(sT,[["__scopeId","data-v-8bcb5436"]]),dT={};function cT(l,t){return e.openBlock(),e.createElementBlock("svg",e.mergeProps({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},l.$attrs),t[0]||(t[0]=[e.createElementVNode("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},null,-1),e.createElementVNode("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},null,-1)]),16)}const hT=ce(dT,[["render",cT]]),pT={class:"vs-dataform space-y-4"},yT=["draggable","onDragstart","onDragover","onDragenter","onDrop"],uT={class:"flex items-center gap-2"},kT=["onClick"],mT={class:"text-sm font-medium text-gray-700"},fT={class:"flex items-center gap-2"},gT=["title","onClick","disabled"],xT=["title","onClick","disabled"],MT={key:0,class:"rounded-lg border border-dashed border-gray-200 p-4 text-sm text-gray-500"},bT=["disabled"],wT=e.defineComponent({__name:"vs-input-dataform",props:e.mergeModels({schema:{default:()=>[]},minGroups:{default:0},maxGroups:{default:void 0},addButtonText:{default:"Додати групу фільтрів"},groupLabel:{default:void 0},duplicateTitle:{default:"Дублювати групу"},removeTitle:{default:"Видалити групу"},emptyLabel:{},view:{default:"default"},collapsible:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref([]),o=e.ref([]),s=e.ref(0),i=e.ref(null),d=e.ref(null),c=e.ref(null),h=e.computed(()=>t.groupLabel??"Group"),p=e.computed(()=>t.emptyLabel??"Ще немає груп"),y=e.computed(()=>{var X;return((X=t.schema)==null?void 0:X.map(oe=>({...oe,disabled:t.disabled||oe.disabled})))??[]}),w=e.computed(()=>y.value.map(X=>ee(X))),m=e.computed(()=>t.view==="accordion"),f=e.computed(()=>!!(t.collapsible||m.value)),u=e.computed(()=>t.draggable!==!1),g=e.computed(()=>t.disabled?!1:t.maxGroups?a.value.length<t.maxGroups:!0),M=e.computed(()=>t.disabled||a.value.length<=(t.minGroups||0));e.watch(()=>a.value.length,()=>{x(),k(),v()},{immediate:!0}),e.watch(()=>t.schema,v,{immediate:!0,deep:!0}),e.watch(()=>t.view,()=>{k()},{immediate:!0});function x(){const X=a.value.length;n.value.length<X?n.value=[...n.value,...Array.from({length:X-n.value.length},()=>kl())]:n.value.length>X&&n.value.splice(X)}function k(){const X=a.value.length;m.value?X===0?s.value=-1:s.value>=X?s.value=X-1:s.value<0&&(s.value=0):o.value.length<X?o.value=[...o.value,...Array.from({length:X-o.value.length},()=>!1)]:o.value.length>X&&o.value.splice(X)}function v(){if(!t.minGroups||a.value.length>=t.minGroups)return;const X=t.minGroups-a.value.length,oe=Array.from({length:X},V);a.value=[...a.value,...oe],k()}function V(){const X={};return y.value.forEach(oe=>{X[oe.name]=(oe==null?void 0:oe.default)??null}),X}function C(){g.value&&(a.value=[...a.value,V()],x(),k())}function q(X){M.value||(a.value=a.value.filter((oe,ke)=>ke!==X),x(),m.value?s.value>=a.value.length&&(s.value=a.value.length-1):o.value.splice(X,1),v())}function L(X){if(t.disabled)return;const oe=JSON.parse(JSON.stringify(a.value[X]??{}));a.value=[...a.value.slice(0,X+1),oe,...a.value.slice(X+1)],x(),m.value?s.value>X&&(s.value+=1):o.value.splice(X+1,0,o.value[X]??!1)}function ee(X){return{...X}}function K(X){return m.value?s.value===-1&&X===0?!1:s.value!==X:!!o.value[X]}function H(X){if(f.value){if(m.value){s.value=X;return}o.value[X]=!o.value[X]}}function B(X,oe){var ke,pe,fe;if(!u.value||t.disabled){oe.preventDefault();return}i.value=X,d.value=X,c.value={groups:JSON.parse(JSON.stringify(a.value)),keys:[...n.value],states:[...o.value]},(ke=oe.dataTransfer)==null||ke.setData("text/plain",String(X)),(fe=(pe=oe.dataTransfer)==null?void 0:pe.setDragImage)==null||fe.call(pe,oe.currentTarget,0,0)}function T(X,oe){!u.value||t.disabled||i.value!==null&&ie(X,oe)}function N(X,oe){ie(X,oe)}function U(X){!u.value||t.disabled||$e()}function $(){c.value&&Y(),i.value=null,d.value=null,c.value=null}function Q(X,oe){const ke=[...a.value],[pe]=ke.splice(X,1);ke.splice(oe,0,pe),a.value=ke;const fe=[...n.value],[F]=fe.splice(X,1);if(fe.splice(oe,0,F),n.value=fe,m.value)s.value===X&&(s.value=oe);else{const ne=[...o.value],[A]=ne.splice(X,1);ne.splice(oe,0,A),o.value=ne}}function Y(){c.value&&(a.value=c.value.groups,n.value=c.value.keys,o.value=c.value.states,c.value=null,d.value=null)}function ie(X,oe){if(i.value===null)return;const ke=he(X,oe);d.value=ke,_e(ke)}function he(X,oe){if(!(oe!=null&&oe.currentTarget))return X;const ke=oe.currentTarget.getBoundingClientRect(),pe=oe.clientY-ke.top>ke.height/2?X+1:X;return Math.max(0,Math.min(pe,a.value.length))}function _e(X){const oe=i.value;if(oe===null)return;let ke=X;if(ke>a.value.length&&(ke=a.value.length),ke===oe||ke===oe+1)return;const pe=ke>oe?ke-1:ke;Q(oe,pe),i.value=pe,d.value=ke>oe?pe+1:pe}function $e(){c.value=null,i.value=null,d.value=null}return(X,oe)=>(e.openBlock(),e.createElementBlock("div",pT,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(ke,pe)=>(e.openBlock(),e.createElementBlock("div",{key:n.value[pe],class:e.normalizeClass(["relative border border-gray-200 rounded-lg bg-white transition vs-dataform__group",[t.view==="accordion"?"overflow-hidden":K(pe)?"pt-6 px-6":"p-6"]]),draggable:u.value&&!t.disabled,onDragstart:fe=>B(pe,fe),onDragend:$,onDragover:e.withModifiers(fe=>T(pe,fe),["prevent"]),onDragenter:e.withModifiers(fe=>N(pe,fe),["prevent"]),onDrop:e.withModifiers(fe=>U(),["prevent"])},[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center justify-between gap-2 border-b border-gray-100 px-4 py-3",[t.view!=="accordion"?"-mx-6 -mt-6 px-6":"",t.view!=="accordion"&&!K(pe)?"rounded-t-lg":"rounded-lg"]])},[e.createElementVNode("div",uT,[u.value?(e.openBlock(),e.createBlock(wa,{key:0,class:"w-4 h-4 text-gray-400","aria-hidden":"true"})):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"rounded-full p-1 text-gray-500 transition hover:bg-gray-100",onClick:fe=>H(pe)},[e.createVNode(p1,{class:e.normalizeClass(["h-4 w-4 transition",K(pe)?"-rotate-90":"rotate-0"])},null,8,["class"])],8,kT)):e.createCommentVNode("",!0),e.createElementVNode("div",mT,e.toDisplayString(`${h.value} (${pe+1})`),1)]),e.createElementVNode("div",fT,[e.createElementVNode("button",{type:"button",class:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",title:t.duplicateTitle,onClick:fe=>L(pe),disabled:t.disabled,draggable:"false"},[e.createVNode(hT,{class:"w-5 h-5"})],8,gT),e.createElementVNode("button",{type:"button",class:"p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-50 rounded-lg transition-all disabled:opacity-40",title:t.removeTitle,onClick:fe=>q(pe),disabled:M.value,draggable:"false"},[e.createVNode(Bt,{class:"w-5 h-5"})],8,xT)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(t.view==="accordion"?"p-6":"pt-6")},[e.createVNode(nt,{class:"vs-dataform__form",schema:w.value,layout:"inline",navigation:!1,values:a.value[pe],"onUpdate:values":fe=>a.value[pe]=fe,"form-id":n.value[pe],disabled:t.disabled},null,8,["schema","values","onUpdate:values","form-id","disabled"])],2),[[e.vShow,!K(pe)]])],42,yT))),128)),a.value.length===0?(e.openBlock(),e.createElementBlock("div",MT,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"flex items-center gap-2 text-gray-600 hover:text-gray-900 font-medium transition-colors text-sm",onClick:C,disabled:!g.value},[e.createVNode(Qe,{class:"w-5 h-5"}),e.createTextVNode(" "+e.toDisplayString(t.addButtonText),1)],8,bT)]))}}),vT=ce(wT,[["__scopeId","data-v-3b71fe50"]]),Ba="__vs_form_monaco_loader__",ml=e.defineComponent({__name:"vs-input-monaco",props:e.mergeModels({syntax:{default:"xml"},theme:{default:"vs-light"},height:{default:280},minimap:{type:Boolean,default:!1},style:{},customClass:{},disabled:{type:Boolean},modelValue:{},error:{},name:{},placeholder:{},maxlength:{},minlength:{}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=e.useModel(l,"modelValue"),n=e.ref(null),o=e.computed(()=>typeof t.height=="number"?`${t.height}px`:t.height||"280px");let s=null,i=null,d=!1;const c=()=>{var w,m;if(i)return Promise.resolve(i);if(typeof window>"u")return Promise.resolve(null);const p=window;if((m=(w=p.monaco)==null?void 0:w.editor)!=null&&m.create)return i=p.monaco,Promise.resolve(i);if(p[Ba])return p[Ba];const y=(async()=>{const f=M=>{if(Array.from(document.styleSheets||[]).some(k=>{var v;return(v=k==null?void 0:k.href)==null?void 0:v.includes(M)}))return;const x=document.createElement("link");x.rel="stylesheet",x.href=M,document.head.appendChild(x)},u=M=>new Promise((x,k)=>{if(Array.from(document.scripts).some(V=>V.src===M))return x();const v=document.createElement("script");v.src=M,v.async=!0,v.onload=()=>x(),v.onerror=V=>k(V),document.body.appendChild(v)}),g="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.52.0/min/vs";return f(`${g}/editor/editor.main.min.css`),await u(`${g}/loader.min.js`),new Promise((M,x)=>{window.require.config({paths:{vs:g}}),window.require(["vs/editor/editor.main"],()=>{i=window.monaco,p.monaco=i,M(i)},k=>x(k))})})().catch(f=>{throw delete p[Ba],f});return p[Ba]=y,y},h=()=>{!n.value||!i||(s&&(s.dispose(),s=null),s=i.editor.create(n.value,{value:a.value||"",language:t.syntax,theme:t.theme,automaticLayout:!0,minimap:{enabled:!!t.minimap},readOnly:!!t.disabled}),s.onDidChangeModelContent(()=>{d||(a.value=s.getValue())}))};return e.watch(()=>a.value,p=>{if(!s)return;const y=s.getValue();p!==y&&(d=!0,s.setValue(p||""),d=!1)}),e.watch(()=>t.syntax,p=>{!s||!i||i.editor.setModelLanguage(s.getModel(),p||"xml")}),e.watch(()=>t.theme,p=>{i&&i.editor.setTheme(p||"vs-light")}),e.watch(()=>t.disabled,p=>{s&&s.updateOptions({readOnly:!!p})}),e.watch(()=>t.minimap,p=>{s&&s.updateOptions({minimap:{enabled:!!p}})}),e.onMounted(async()=>{try{const p=await c();if(!p||!p.editor)return;i=p,h()}catch(p){console.error("Failed to load Monaco editor",p)}}),e.onBeforeUnmount(()=>{s&&(s.dispose(),s=null)}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{class:"w-full",style:e.normalizeStyle({height:o.value})},[e.createElementVNode("div",{ref_key:"editorContainer",ref:n,class:"w-full h-full overflow-hidden border border-[#CFD9E0] rounded"},null,512)],4))}}),Ea={VsInputText:zt,VsInputRadio:g1,"vs-input-text":zt,"vs-input-password":sA,"vs-input-textarea":al,"vs-input-richtext":rl,"vs-input-mask":k1,"vs-input-number":Zr,"vs-input-radio":g1,"vs-input-select":w1,"vs-input-switcher":y1,"vs-input-static":u1,"vs-input-container":tl,"vs-input-date":rD,"vs-input-checkbox":Wr,"vs-input-file":Xr,"vs-input-file2":M1,file2:M1,File2:M1,"vs-input-html":u1,"vs-input-email":m1,"vs-input-tel":f1,"vs-input-datatable":ll,"vs-input-map":nl,"vs-input-file-list":Qr,"vs-input-tags":ol,"vs-input-slug":sl,"vs-input-codegen":il,"vs-input-key-value":dl,"vs-input-text[]":cl,"vs-input-range":pl,"vs-input-color":hl,"vs-input-native-select":w1,VsInputArraySelect:za,"vs-input-array":yl,"vs-input-array-select":za,"array-select":za,"vs-input-address":ul,"vs-input-datalist":iT,"vs-input-dataform":vT,"vs-input-monaco":ml},VT=e.defineComponent({__name:"behavior",props:{api:{},set:{},button:{},error:{},value:{}},setup(l){const t=l,a=e.inject("values");async function n(){try{if(!t.api)return;const o=t.api.replace("{{value}}",t.value),s=await fetch(o);if(!s.ok){Me({type:"warning",title:"Validation",message:"При спробі завантажити дані виникла помилка."});return}const i=await s.json();if(!t.set||!a)return;for(const[d,c]of Object.entries(t.set))a.value[d]=i.result[c]}catch(o){console.error(t.error,o)}}return(o,s)=>(e.openBlock(),e.createElementBlock("button",{onClick:n,class:"vs-button relative inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-blue-500 hover:border-blue-500 hover:bg-blue-500 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 ml-0 md:ml-2 mt-2 md:mt-0 py-[8px] md:w-2/4 whitespace-nowrap w-full"},e.toDisplayString(o.button),1))}}),CT={class:"flex flex-col gap-1 w-full"},zT=["innerHTML"],fl=e.defineComponent({__name:"vs-compact-form-layout",props:e.mergeModels({item:{default:{}},layout:{default:"default"},style:{default:{}},type:{default:""},error:{type:[String,Boolean]},columns:{default:()=>({container:12,label:3})}},{modelValue:{default:null},modelModifiers:{}}),emits:e.mergeModels(["value-selected"],["update:modelValue"]),setup(l,{emit:t}){const a=l,n=e.useModel(l,"modelValue"),o=t,s=e.computed(()=>nA[`${a.layout}`]),i=["label","placeholder","info","description","text","html"],d=e.ref(M()),c=e.computed(()=>f(a.item,d.value)),h=e.computed(()=>Ea==null?void 0:Ea[`vs-input-${a.item.type}`]),p=e.inject("field-props"),y=e.computed(()=>{var C;const k=e.unref(h);if(!k)return new Set;const v=k.props??((C=k.__vccOpts)==null?void 0:C.props);if(!v)return new Set;const V=Array.isArray(v)?v:Object.keys(v);return new Set(V)}),w=e.computed(()=>{var C,q;const k={...c.value??{}},v=(C=a.item)==null?void 0:C.name;v&&((q=p==null?void 0:p.value)!=null&&q[v])&&Object.assign(k,p.value[v]);const V=y.value;return V.size?Object.fromEntries(Object.entries(k).filter(([L])=>V.has(L))):{}}),m=k=>{var V;const v=typeof k=="object"&&k!==null?k:{value:k};o("value-selected",{...v,name:v.name??((V=a.item)==null?void 0:V.name)})};e.onMounted(()=>{d.value=M(),window.addEventListener("storage",x)}),e.onUnmounted(()=>{window.removeEventListener("storage",x)});function f(k,v){if(!k)return{};const V={...k};return i.forEach(C=>{const q=g(k,C,v);q!=null&&(V[C]=q)}),Array.isArray(k.options)&&(V.options=k.options.map(C=>u(C,v))),V}function u(k,v){if(!k)return k;const V={...k},C=g(k,"label",v),q=g(k,"text",v);return C!=null&&(V.label=C),q!=null?V.text=q:C!=null&&(V.text=C),V}function g(k,v,V){const C=`${v}:${V}`;if((k==null?void 0:k[C])!=null)return k[C];if(v==="label"&&(k==null?void 0:k[V])!=null)return k[V];if((k==null?void 0:k[v])!=null)return k[v];if(v==="label"){if((k==null?void 0:k.ua)!=null)return k.ua;if((k==null?void 0:k.en)!=null)return k.en}if(v==="text"||v==="html"){if((k==null?void 0:k.ua)!=null)return k.ua;if((k==null?void 0:k.en)!=null)return k.en}return null}function M(){return typeof window>"u"?"uk":localStorage.getItem("locale")||"uk"}function x(){d.value=M()}return(k,v)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value),{ua:c.value.ua,error:a.error||"",item:c.value,columns:a.columns,label:c.value.label},{default:e.withCtx(()=>{var V,C;return[e.createElementVNode("div",{class:e.normalizeClass(["flex w-full",`${a.item.type}-component`])},[e.createElementVNode("div",CT,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),e.mergeProps(w.value,{modelValue:n.value,"onUpdate:modelValue":v[0]||(v[0]=q=>n.value=q),onValueSelected:m}),null,16,["modelValue"])),c.value.description&&a.layout!=="settings"?(e.openBlock(),e.createElementBlock("p",{key:0,class:"text-sm text-gray-500",innerHTML:c.value.description},null,8,zT)):e.createCommentVNode("",!0)]),(V=c.value.behavior)!=null&&V.api&&((C=c.value.behavior)!=null&&C.button)?(e.openBlock(),e.createBlock(VT,e.mergeProps({key:0},c.value.behavior,{value:n.value}),null,16,["value"])):e.createCommentVNode("",!0)],2)]}),_:1},8,["ua","error","item","columns","label"]))}}),BT={class:"text-sm text-gray-800 mb-[4px] font-medium dark:text-neutral-300"},ET={class:"vs-compact-form-navigation__rail mt-[6px]"},_T=["onClick"],qT=e.defineComponent({__name:"vs-compact-form-navigation",props:{target:{},scrollContainer:{},title:{default:"Навігація"},enabled:{type:Boolean,default:!0},width:{default:400}},setup(l,{expose:t}){const a=l,n=e.ref([]),o=e.ref(""),s=e.ref(""),i=e.computed(()=>!!a.enabled),d=e.computed(()=>["vs-compact-form-navigation flex flex-col pl-[6px] pt-[8px] pr-[8px]","sticky top-0 self-start shrink-0","max-h-full min-h-0 overflow-y-auto"]),c=e.computed(()=>{const H=a.width;if(H==null)return{};const B=typeof H=="number"?`${H}px`:`${H}`;return{width:B,minWidth:B}});let h=null,p=0,y=0,w=null,m=null,f=null;const u=()=>ee(),g=()=>x();e.watch(()=>a.target,async H=>{if(C(),!H){w=null,n.value=[],o.value="";return}w=H,i.value&&(await e.nextTick(),V(H),x())},{immediate:!0}),e.watch(()=>a.scrollContainer,H=>{if(!i.value){m=H??null;return}M(H??null),e.nextTick(()=>x())},{immediate:!0}),e.onMounted(()=>{a.scrollContainer||M(null),x()}),e.onBeforeUnmount(()=>{C(),M(null,!0),w=null,typeof window<"u"&&(p&&window.cancelAnimationFrame(p),y&&window.cancelAnimationFrame(y))});function M(H,B=!1){if(f&&(f(),f=null),B){m=null;return}if(m=H??null,typeof window>"u")return;const T=H??window,N=window;T.addEventListener("scroll",u,{passive:!0}),N.addEventListener("resize",g),f=()=>{T.removeEventListener("scroll",u),N.removeEventListener("resize",g)}}function x(){if(!i.value||!w)return;p&&typeof window<"u"&&window.cancelAnimationFrame(p);const H=()=>{k(),p=0};typeof window>"u"?H():p=window.requestAnimationFrame(H)}function k(){if(!i.value||!w)return;const H=Array.from(w.querySelectorAll("h1, h2")),B=new Set,T=[];H.forEach((N,U)=>{var he;const $=((he=N.textContent)==null?void 0:he.trim())??"";if(!$)return;let Q=(N.getAttribute("id")??"").trim();Q||(Q=v($)||`heading-${U+1}`);let Y=Q,ie=1;for(;B.has(Y);)Y=`${Q}-${ie+=1}`;N.id!==Y&&Object.assign(N,{id:Y}),B.add(Y),T.push({id:Y,text:$,level:N.tagName.toLowerCase()==="h1"?1:2})}),n.value=T,T.length||(o.value=""),L()}function v(H){return H.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function V(H){!H||!i.value||typeof MutationObserver>"u"||(C(),h=new MutationObserver(()=>x()),h.observe(H,{childList:!0,subtree:!0}))}function C(){h&&(h.disconnect(),h=null)}function q(H){const B=m;if(!B)return typeof window>"u"?H.offsetTop:H.getBoundingClientRect().top+window.scrollY;const T=H.getBoundingClientRect(),N=B.getBoundingClientRect();return T.top-N.top+B.scrollTop}function L(){if(!i.value||!n.value.length)return;const H=m,B=(H?H.scrollTop:null)||(typeof window<"u"?window.scrollY:0),T=(H?H.clientHeight:null)||(typeof window<"u"?window.innerHeight:0),N=B+T;let U=null;for(let Q=0;Q<n.value.length;Q+=1){const Y=n.value[Q],ie=document.getElementById(Y.id);if(ie){const he=q(ie);he+ie.offsetHeight>B&&he<N&&(U=Y.id)}}!U&&s.value&&(U=s.value),U&&(s.value=U);const $=H?H.scrollHeight-H.clientHeight:document.documentElement.scrollHeight-window.innerHeight;B+5>=$&&(U=n.value[n.value.length-1].id),U&&(o.value=U)}function ee(){i.value&&(y&&window.cancelAnimationFrame(y),y=window.requestAnimationFrame(()=>{L(),y=0}))}function K(H){if(!i.value)return;const B=document.getElementById(H);if(!B)return;const T=m,N=Math.max(0,q(B));T?T.scrollTo({top:N,behavior:"smooth"}):typeof window<"u"&&window.scrollTo({top:N,behavior:"smooth"})}return t({refresh:x}),(H,B)=>i.value&&n.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d.value),style:e.normalizeStyle(c.value)},[e.createElementVNode("h2",BT,e.toDisplayString(H.title),1),e.createElementVNode("div",ET,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,T=>(e.openBlock(),e.createElementBlock("div",{key:T.id,class:e.normalizeClass(["vs-compact-form-navigation__item relative",T.level===2?"vs-compact-form-navigation__item--nested":"",T.id===o.value?"vs-compact-form-navigation__item--active":""])},[e.createElementVNode("button",{type:"button",onClick:N=>K(T.id),class:e.normalizeClass(["vs-compact-form-navigation__button flex gap-x-3 py-[6px] pr-3 text-sm duration-200 hover:text-gray-800",T.level===2?"pl-[15px]":"pl-[18px]",T.id===o.value?"text-gray-800":"text-gray-500"])},[e.createElementVNode("span",null,e.toDisplayString(T.text),1)],10,_T)],2))),128))])],6)):e.createCommentVNode("",!0)}}),ST=ce(qT,[["__scopeId","data-v-1584a562"]]),Mt={required:"Це поле є обов’язковим",email:"Неправильний email",tel:"Неправильний телефон",minlength:l=>`Мінімальна довжина — ${l} символів`,maxlength:l=>`Максимальна довжина — ${l} символів`},jT=l=>typeof l=="string"?l.trim()?!1:Mt.required:Array.isArray(l)?l.map(t=>typeof t=="string"?t.trim():t).filter(t=>t!=null&&t!=="").length?!1:Mt.required:l?!1:Mt.required,AT=l=>l?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)?!1:Mt.email:!1,DT=l=>l?/^\+[1-9]\d{1,14}$/.test(l)?!1:Mt.tel:!1,gl=l=>l==null?0:typeof l=="string"?l.trim().length:Array.isArray(l)?l.length:typeof l=="number"?l.toString().length:String(l).length,NT=(l,t)=>{if(l==null)return!1;const a=Number((t==null?void 0:t.value)??(t==null?void 0:t.length));return Number.isFinite(a)&&gl(l)<a?(t==null?void 0:t.message)||Mt.minlength(a):!1},LT=(l,t)=>{if(l==null||l==="")return!1;const a=Number((t==null?void 0:t.value)??(t==null?void 0:t.length));return Number.isFinite(a)&&gl(l)>a?(t==null?void 0:t.message)||Mt.maxlength(a):!1},HT=(l,t)=>{const a=t.pattern??t.regexp,n=typeof a=="string"?new RegExp(a):a;if(Array.isArray(l)){const o=l.filter(Boolean);return o.length===0||o.every(s=>n.test(s))?!1:t.message}return!n.test(l)&&l?t.message:!1},$T=(l,t)=>!1,FT=(l,t)=>{switch(typeof t=="string"?t:t.type){case"required":return jT(l);case"email":return AT(l);case"tel":return DT(l);case"regexp":return HT(l,t);case"minlength":return NT(l,t);case"maxlength":return LT(l,t);case"custom":return $T();default:return!1}},TT={autocomplete:"select",combobox:"select",datepicker:"date",markedtext:"mask",html:"static",geom:"map",filelist:"file-list",file:"file",dropzone:"file"};function xl(l){const t=l==null?void 0:l.toLowerCase();return TT[t]||t}function V1(l,t=!1){if(Array.isArray(l)){const n=[];return l.forEach(o=>{const s={...o};s.name=(o.name||o.id||o.key||"").toString(),s.type=xl(o.type),s.label=o.label||o.ua,s.rules=o.rules||o.validators,s.type==="email"&&!s.rules&&(s.rules=["email"]),o.data&&(s.api=`/api/suggest/${o.data}`),s.disabled=s.disabled??t,Array.isArray(s.schema)&&(s.schema=V1(s.schema,s.disabled)),n.push(s)}),n}const a=[];return Object.entries(l).forEach(n=>{var s;const o={name:n[0],...n[1],type:xl(n[1].type),label:n[1].label||n[1].ua,rules:n[1].rules||n[1].validators,disabled:n[1].disabled??t};o.type==="email"&&!o.rules&&(o.rules=["email"]),(s=n[1].type)!=null&&s.includes("list")&&(o.multiple=!0),!o.api&&n[1].data&&(o.api=`/api/suggest/${n[1].data}`),Array.isArray(o.schema)&&(o.schema=V1(o.schema,o.disabled)),a.push(o)}),a}function PT(l,t,a=!1){const n=e.computed(()=>V1(t,typeof a=="boolean"?a:a.value)),o=e.ref({});function s(c){var w;const h=c==null?void 0:c.conditions;if(!h)return!0;const p=Array.isArray(h)?h[0]:h,y=(w=l==null?void 0:l.value)==null?void 0:w[p];return el(y,h)}const i=(c=n.value,h=!0)=>(c.forEach(p=>{const y=[],w=Number(p==null?void 0:p.minlength),m=Number(p==null?void 0:p.maxlength);!Number.isNaN(w)&&Number.isFinite(w)&&y.push({type:"minlength",value:w}),!Number.isNaN(m)&&Number.isFinite(m)&&y.push({type:"maxlength",value:m});const f=[...y,...p.rules||[]];if(f.length){if(!s(p)){delete o.value[p.name];return}let u=!1,g=null;f.forEach(M=>{const x=FT(l.value[p.name],M);x&&(u=!0,!g&&typeof x=="string"&&(g=x))}),u&&g?o.value[p.name]=g:delete o.value[p.name]}p.schema&&i(p.schema,!1)}),h&&Object.values(o.value).some(Boolean)?o.value:null),d=e.computed(()=>{var c;return(c=n.value)==null?void 0:c.filter(h=>h.hidden!==!0&&s(h))});return{errors:o,validate:i,reset:()=>{l.value={},o.value={}},visibleSchema:d}}const IT={class:"flex w-full h-full min-h-0 gap-6"},RT={key:0,"data-orientation":"horizontal",role:"none",class:"mt-1 shrink-0 h-[1px] w-full bg-slate-100 dark:bg-slate-600"},nt=e.defineComponent({__name:"vs-compact-form",props:e.mergeModels({schema:{default:()=>[]},style:{default:()=>({})},modelValue:{},layout:{default:()=>"default"},formId:{default:()=>""},disabled:{type:Boolean,default:!1},navigation:{type:Boolean,default:!1},navWidth:{default:400},columns:{}},{form:{default:()=>({})},formModifiers:{},modelValue:{default:()=>({})},modelModifiers:{},values:{default:void 0},valuesModifiers:{}}),emits:e.mergeModels(["handle-submit","update:modelValue","value-selected"],["update:form","update:modelValue","update:values"]),setup(l,{expose:t,emit:a}){const n=a,o=l,s=e.useModel(l,"form"),i=e.useModel(l,"modelValue"),d=e.useModel(l,"values"),c=e.computed({get:()=>d.value??i.value,set:B=>{i.value=B,d.value=B}}),{errors:h,validate:p,reset:y,visibleSchema:w}=PT(c,o.schema,e.toRef(o,"disabled")),m=e.ref(null),f=e.ref(null),u=e.ref({}),g=e.computed(()=>o.navigation),M=e.computed(()=>o.navWidth),x=e.computed(()=>{var B;return(B=o.style)==null?void 0:B.columns}),k=Object.freeze({container:12,label:3}),v=e.computed(()=>o.columns??x.value??k),V=e.computed(()=>o.columns!=null||x.value!=null),C=e.computed(()=>V.value?"horizontal":o.layout),q=B=>B!=null&&B.columns?"horizontal":C.value,L=B=>(B==null?void 0:B.columns)??v.value,ee=()=>{n("update:modelValue",c.value),p(),n("handle-submit",c.value)},K=B=>{n("value-selected",B)};t({validate:p,reset:y,errors:h}),e.onMounted(()=>{s.value={value:c.value,errors:h.value,reset:y,validate:p,formId:o.formId}});function H(B,T){if(B===T)return!0;if(typeof B!="object"||typeof T!="object"||!B||!T)return!1;const N=Object.keys(B),U=Object.keys(T);return N.length!==U.length?!1:N.every($=>B[$]===T[$])}return e.provide("form",s),e.provide("values",c),e.provide("field-props",u),(B,T)=>(e.openBlock(),e.createElementBlock("div",IT,[e.createElementVNode("div",{class:"flex-1 min-h-0 overflow-y-auto overflow-x-visible",ref_key:"formScrollContainer",ref:f},[e.createElementVNode("form",{ref_key:"formRef",ref:m,onSubmit:e.withModifiers(ee,["prevent"]),class:e.normalizeClass(["grid grid-cols-12 p-1",C.value==="default"?"gap-6":"gap-4"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(N,U)=>(e.openBlock(),e.createElementBlock("div",{key:N.name,class:e.normalizeClass(q(N)==="horizontal"?"col-span-12":`col-span-${N.col||12}`)},[e.createVNode(fl,{style:e.normalizeStyle(B.style),item:N,layout:q(N),columns:L(N),"model-value":c.value[N.name],"onUpdate:modelValue":$=>{const Q=c.value[N.name];H(Q,$)||(c.value[N.name]=$)},error:e.unref(h)[N.name],onValueSelected:K},null,8,["style","item","layout","columns","model-value","onUpdate:modelValue","error"]),q(N)==="settings"&&U+1!==e.unref(w).length?(e.openBlock(),e.createElementBlock("div",RT)):e.createCommentVNode("",!0)],2))),128))],34)],512),e.createVNode(ST,{target:m.value,"scroll-container":f.value,enabled:g.value,width:M.value},null,8,["target","scroll-container","enabled","width"])]))}}),OT={class:"relative"},UT={class:"w-full h-full fixed top-0 start-0 bg-black bg-opacity-50"},ZT={class:"m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12"},WT={class:"py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]"},GT={class:"font-medium text-gray-800 dark:text-[#ffffff]"},KT={class:"p-4 mim-h-0 h-full overflow-auto"},Ml=e.defineComponent({__name:"modal-edit",props:{schema:{},defaultValue:{},mode:{},token:{},form:{},api:{},method:{}},emits:["close","save","edit"],setup(l,{emit:t}){const a=l,n=t,o=e.ref(a.schema),s=e.ref(a.defaultValue?JSON.parse(JSON.stringify(a.defaultValue)):{}),i=e.ref({}),d=e.ref(a.token||""),c=e.ref(a.mode),h=()=>{var u;const f=(u=a.method)==null?void 0:u.trim().toUpperCase();return f==="GET"||f==="POST"||f==="PUT"?f:c.value==="add"?"POST":"PUT"},p=()=>{Me({type:"success",title:"Успішно",message:`Дані успішно ${c.value==="add"?"збережено":"оновлено"}`})},y=async f=>{if(console.log(f),f.ok){await f.json().catch(()=>({})),p(),n("save",s.value);return}if(f.status===400){const u=await f.json().catch(()=>({}));Me({type:"warning",title:"Помилка валідації",message:u.message||"Некоректні дані (400)"});return}if(f.status===500){Me({type:"error",title:"Серверна помилка",message:"Виникла помилка на сервері (500)"});return}Me({type:"error",title:"Помилка",message:`Статус: ${f.status}`})};async function w(){var g;const f=i.value.validate();if(f){Me({type:"warning",title:"Помилка валідації",message:Object.entries(f).map(([M,x])=>`${M}: ${x}`).join(`
8313
+ `)});return}const u=(g=a.api)==null?void 0:g.trim();if(u){const M=h();try{const x=await fetch(u,{method:M,headers:M==="GET"?void 0:{"Content-Type":"application/json"},body:M==="GET"?void 0:JSON.stringify(s.value)});await y(x)}catch(x){Me({type:"error",title:"Помилка з’єднання",message:x.message||"Не вдалося виконати запит"})}return}if(d.value)try{const M=await fetch(`/api/table/${d.value}`,{method:c.value==="add"?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s.value)});await y(M)}catch(M){Me({type:"error",title:"Помилка з’єднання",message:M.message||"Не вдалося виконати запит"})}else n("edit",s.value),m()}function m(){n("close")}return e.onMounted(async()=>{try{if(a.form&&!a.schema){const f=await fetch(`/api/template/form/${a.form}`);if(!f.ok){Me({type:f.status>=400&&f.status<500?"warning":"error",title:"Error",message:`Error code: ${f.status}`});return}const u=await f.json();o.value=u.schema,u.token&&(d.value=u.token)}else if(a.token&&!a.defaultValue){d.value=a.token;const f=await fetch(`/api/form/${d.value}`);if(!f.ok){Me({type:f.status>=400&&f.status<500?"warning":"error",title:"Error",message:`Error code: ${f.status}`});return}const u=await f.json();o.value=u.schema,u.data?s.value=u.data:c.value="add",u.obj&&(s.value={...s.value,...u.obj})}}catch(f){Me({type:"error",title:"Error",message:f.message||"Unexpected error"}),console.error(f)}}),(f,u)=>(e.openBlock(),e.createElementBlock("div",OT,[e.createElementVNode("div",UT,[e.createElementVNode("div",ZT,[e.createElementVNode("div",WT,[e.createElementVNode("h3",GT,e.toDisplayString(c.value==="add"?"Додати":"Змінити"),1),e.createElementVNode("button",{onClick:m,type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"},u[2]||(u[2]=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M18 6 6 18"}),e.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))]),e.createElementVNode("div",KT,[o.value?(e.openBlock(),e.createBlock(nt,{key:0,schema:o.value,values:s.value,"onUpdate:values":u[0]||(u[0]=g=>s.value=g),form:i.value,"onUpdate:form":u[1]||(u[1]=g=>i.value=g),formId:d.value},null,8,["schema","values","form","formId"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"vs-form__head mr-5 mb-5 mt-3 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white"},[e.createElementVNode("button",{type:"button",onClick:m,class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"}," Скасувати "),e.createElementVNode("button",{onClick:w,type:"button",class:"vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"}," Зберегти ")])])])]))}}),JT=1440*60*1e3,YT=["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"],XT=["січ","лют","бер","квіт","трав","черв","лип","серп","вер","жовт","лист","груд"],QT=["нд","пн","вт","ср","чт","пт","сб"];function Ae(l){return l instanceof Date&&!Number.isNaN(l.getTime())}const Et=l=>new Date(l.getTime());function bt(l){const t=Et(l);return t.setHours(0,0,0,0),t}function Wt(l){const t=Et(l);return t.setHours(23,59,59,999),t}function C1(l){return bt(new Date(l.getFullYear(),l.getMonth(),1))}function z1(l){return Wt(new Date(l.getFullYear(),l.getMonth()+1,0))}function B1(l,t){const a=new Date(l),n=a.getDate();a.setDate(1),a.setMonth(a.getMonth()+t);const o=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return a.setDate(Math.min(n,o)),a}function eP(l,t){return B1(l,-1)}function _a(l,t){const a=new Date(l);return a.setFullYear(a.getFullYear()+t),a}function bl(l,t){return _a(l,-t)}function wl(l){return bt(new Date(l.getFullYear(),0,1))}function vl(l){return Wt(new Date(l.getFullYear(),11,31))}function tP(l){const t=Math.floor(l.getFullYear()/10)*10;return bt(new Date(t,0,1))}function aP(l){const t=Math.floor(l.getFullYear()/10)*10+9;return Wt(new Date(t,11,31))}const Je=l=>l.getFullYear(),qa=l=>Math.floor(l.getFullYear()/10)*10;function rP(l){const t=[];let a=bt(l.start);const n=bt(l.end);for(;a<=n;)t.push(Et(a)),a=new Date(a.getTime()+JT);return t}function lP(l){const t=[];let a=C1(l.start);const n=z1(l.end);for(;a<=n;)t.push(Et(a)),a=B1(a,1);return t}function nP(l){const t=[];let a=wl(l.start);const n=vl(l.end);for(;a<=n;)t.push(Et(a)),a=_a(a,1);return t}function E1(l,t=1){const a=bt(l),n=(a.getDay()-t+7)%7;return a.setDate(a.getDate()-n),a}function oP(l,t=1){const a=E1(l,t);return a.setDate(a.getDate()+6),Wt(a)}function sP(l,t,a=0){const n=E1(l,a),o=(t-a+7)%7;return n.setDate(n.getDate()+o),n}const Sa=(l,t)=>!!l&&!!t&&l.getFullYear()===t.getFullYear()&&l.getMonth()===t.getMonth()&&l.getDate()===t.getDate(),_1=(l,t)=>!!l&&!!t&&l.getFullYear()===t.getFullYear()&&l.getMonth()===t.getMonth(),Vl=(l,t)=>!!l&&!!t&&l.getFullYear()===t.getFullYear(),Cl=(l,t)=>!!l&&!!t&&Sa(l,t)&&l.getHours()===t.getHours(),iP=(l,t)=>!!l&&!!t&&Cl(l,t)&&l.getMinutes()===t.getMinutes();function dP(l,t){const a=l.getTime();return a>=t.start.getTime()&&a<=t.end.getTime()}const Gt=(l,t)=>!!l&&!!t&&l.getTime()<t.getTime(),Kt=(l,t)=>!!l&&!!t&&l.getTime()>t.getTime();function cP(l){const t=l.filter(a=>Ae(a));if(t.length)return t.reduce((a,n)=>a.getTime()>=n.getTime()?a:n)}function hP(l){const t=l.filter(a=>Ae(a));if(t.length)return t.reduce((a,n)=>a.getTime()<=n.getTime()?a:n)}function zl(l,t){const a=Et(l);return typeof t.year=="number"&&a.setFullYear(t.year),typeof t.month=="number"&&a.setMonth(t.month),typeof t.date=="number"&&a.setDate(t.date),typeof t.hours=="number"&&a.setHours(t.hours),typeof t.minutes=="number"&&a.setMinutes(t.minutes),typeof t.seconds=="number"&&a.setSeconds(t.seconds),typeof t.milliseconds=="number"&&a.setMilliseconds(t.milliseconds),a}const ja=(l,t=2)=>String(l).padStart(t,"0");function Bl(l,t){return t==="wide"?YT[l]:XT[l]}function pP(l){return QT[l]}const yP=[{token:"LLLL",format:l=>Bl(l.getMonth(),"wide")},{token:"LLL",format:l=>Bl(l.getMonth(),"abbreviated")},{token:"EE",format:l=>pP(l.getDay())},{token:"yyyy",format:l=>String(l.getFullYear())},{token:"MM",format:l=>ja(l.getMonth()+1)},{token:"dd",format:l=>ja(l.getDate())},{token:"HH",format:l=>ja(l.getHours())},{token:"mm",format:l=>ja(l.getMinutes())}];function Aa(l,t){if(!Ae(l))return"";let a="",n=0;for(;n<t.length;){const o=yP.find(s=>t.startsWith(s.token,n));o?(a+=o.format(l),n+=o.token.length):(a+=t[n],n+=1)}return a}const uP={"yyyy-MM-dd":/^(\d{4})-(\d{2})-(\d{2})$/,"dd.MM.yyyy":/^(\d{2})\.(\d{2})\.(\d{4})$/,"dd.MM.yyyy HH:mm":/^(\d{2})\.(\d{2})\.(\d{4}) (\d{2}):(\d{2})$/,"HH:mm":/^(\d{2}):(\d{2})$/,"MM.yyyy":/^(\d{2})\.(\d{4})$/,yyyy:/^(\d{4})$/};function El(l,t){const a=uP[t];if(!a){const o=new Date(l);return Ae(o)?o:null}const n=l.match(a);if(!n)return null;switch(t){case"yyyy-MM-dd":{const[,o,s,i]=n,d=new Date(Number(o),Number(s)-1,Number(i));return Ae(d)?d:null}case"dd.MM.yyyy":{const[,o,s,i]=n,d=new Date(Number(i),Number(s)-1,Number(o));return Ae(d)?d:null}case"dd.MM.yyyy HH:mm":{const[,o,s,i,d,c]=n,h=new Date(Number(i),Number(s)-1,Number(o),Number(d),Number(c));return Ae(h)?h:null}case"HH:mm":{const[,o,s]=n,i=new Date;return i.setHours(Number(o),Number(s),0,0),i}case"MM.yyyy":{const[,o,s]=n;return new Date(Number(s),Number(o)-1,1)}case"yyyy":{const[,o]=n;return new Date(Number(o),0,1)}default:return null}}const kP=["year","month","day","time","custom"],mP=e.defineComponent({emits:{elementClick:l=>Ae(l),left:()=>!0,right:()=>!0,heading:()=>!0},props:{headingClickable:{type:Boolean,default:!1},leftDisabled:{type:Boolean,default:!1},rightDisabled:{type:Boolean,default:!1},columnCount:{type:Number,default:7},items:{type:Array,default:()=>[]},viewMode:{type:String,required:!0,validate:l=>typeof l=="string"&&kP.includes(l)}}}),fP={class:"v3dp__heading"},gP=["disabled"],xP=["disabled"],MP={class:"v3dp__body"},bP={class:"v3dp__subheading"},wP={class:"v3dp__elements"},vP=["disabled","onClick"];function VP(l,t,a,n,o,s){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["v3dp__popout",`v3dp__popout-${l.viewMode}`]),style:e.normalizeStyle({"--popout-column-definition":`repeat(${l.columnCount}, 1fr)`}),onMousedown:t[3]||(t[3]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",fP,[e.createElementVNode("button",{class:"v3dp__heading__button v3dp__heading__button__left",disabled:l.leftDisabled,onClick:t[0]||(t[0]=e.withModifiers(i=>l.$emit("left"),["stop","prevent"]))},[e.renderSlot(l.$slots,"arrow-left",{},()=>[t[4]||(t[4]=e.createElementVNode("svg",{class:"v3dp__heading__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 8"},[e.createElementVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{stroke:"none",d:"M-9 16V-8h24v24z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 0L1 4l4 4"})])],-1))],!0)],8,gP),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.headingClickable?"button":"span"),{class:"v3dp__heading__center",onClick:t[1]||(t[1]=e.withModifiers(i=>l.$emit("heading"),["stop","prevent"]))},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"heading",{},void 0,!0)]),_:3})),e.createElementVNode("button",{class:"v3dp__heading__button v3dp__heading__button__right",disabled:l.rightDisabled,onClick:t[2]||(t[2]=e.withModifiers(i=>l.$emit("right"),["stop","prevent"]))},[e.renderSlot(l.$slots,"arrow-right",{},()=>[t[5]||(t[5]=e.createElementVNode("svg",{class:"v3dp__heading__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 8"},[e.createElementVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createElementVNode("path",{stroke:"none",d:"M15-8v24H-9V-8z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M1 8l4-4-4-4"})])],-1))],!0)],8,xP)]),e.createElementVNode("div",MP,["subheading"in l.$slots?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",bP,[e.renderSlot(l.$slots,"subheading",{},void 0,!0)]),t[6]||(t[6]=e.createElementVNode("hr",{class:"v3dp__divider"},null,-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("div",wP,[e.renderSlot(l.$slots,"body",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,i=>(e.openBlock(),e.createElementBlock("button",{key:i.key,disabled:i.disabled,class:e.normalizeClass([{selected:i.selected,current:i.current},`v3dp__element__button__${l.viewMode}`]),onClick:e.withModifiers(d=>l.$emit("elementClick",i.value),["stop","prevent"])},[e.createElementVNode("span",null,e.toDisplayString(i.display),1)],10,vP))),128))],!0)])])],38)}const Da=ce(mP,[["render",VP],["__scopeId","data-v-bc92af04"]]),CP=e.defineComponent({components:{PickerPopup:Da},emits:{"update:pageDate":l=>Ae(l),select:l=>Ae(l)},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},lowerLimit:{type:Date,required:!1},upperLimit:{type:Date,required:!1}},setup(l,{emit:t}){const a=e.computed(()=>tP(l.pageDate)),n=e.computed(()=>aP(l.pageDate)),o=(h,p,y)=>!p&&!y?!0:!(p&&Je(h)<Je(p)||y&&Je(h)>Je(y)),s=e.computed(()=>nP({start:a.value,end:n.value}).map(h=>({value:h,key:String(Je(h)),display:Je(h),selected:!!l.selected&&Je(h)===Je(l.selected),disabled:!o(h,l.lowerLimit,l.upperLimit)}))),i=e.computed(()=>{const h=Je(a.value),p=Je(n.value);return`${h} - ${p}`}),d=e.computed(()=>l.lowerLimit&&(qa(l.lowerLimit)===qa(l.pageDate)||Gt(l.pageDate,l.lowerLimit))),c=e.computed(()=>l.upperLimit&&(qa(l.upperLimit)===qa(l.pageDate)||Kt(l.pageDate,l.upperLimit)));return{years:s,heading:i,leftDisabled:d,rightDisabled:c,previousPage:()=>t("update:pageDate",bl(l.pageDate,10)),nextPage:()=>t("update:pageDate",_a(l.pageDate,10))}}});function zP(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{columnCount:3,leftDisabled:l.leftDisabled,rightDisabled:l.rightDisabled,items:l.years,viewMode:"year",onLeft:l.previousPage,onRight:l.nextPage,onElementClick:t[0]||(t[0]=d=>l.$emit("select",d))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.heading),1)]),_:1},8,["leftDisabled","rightDisabled","items","onLeft","onRight"])}const BP=ce(CP,[["render",zP]]),EP=e.defineComponent({components:{PickerPopup:Da},emits:{"update:pageDate":l=>Ae(l),select:l=>Ae(l),back:()=>!0},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},format:{type:String,required:!1,default:"LLL"},lowerLimit:{type:Date,required:!1},upperLimit:{type:Date,required:!1}},setup(l,{emit:t}){const a=e.computed(()=>wl(l.pageDate)),n=e.computed(()=>vl(l.pageDate)),o=e.computed(()=>p=>Aa(p,l.format)),s=(p,y,w)=>!y&&!w?!0:!(y&&Gt(p,C1(y))||w&&Kt(p,z1(w))),i=e.computed(()=>lP({start:a.value,end:n.value}).map(p=>({value:p,display:o.value(p),key:o.value(p),selected:!!l.selected&&_1(l.selected,p),disabled:!s(p,l.lowerLimit,l.upperLimit)}))),d=e.computed(()=>Je(a.value)),c=e.computed(()=>l.lowerLimit&&(Vl(l.lowerLimit,l.pageDate)||Gt(l.pageDate,l.lowerLimit))),h=e.computed(()=>l.upperLimit&&(Vl(l.upperLimit,l.pageDate)||Kt(l.pageDate,l.upperLimit)));return{months:i,heading:d,leftDisabled:c,rightDisabled:h,previousPage:()=>t("update:pageDate",bl(l.pageDate,1)),nextPage:()=>t("update:pageDate",_a(l.pageDate,1))}}});function _P(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{headingClickable:"",columnCount:3,items:l.months,leftDisabled:l.leftDisabled,rightDisabled:l.rightDisabled,viewMode:"month",onLeft:l.previousPage,onRight:l.nextPage,onHeading:t[0]||(t[0]=d=>l.$emit("back")),onElementClick:t[1]||(t[1]=d=>l.$emit("select",d))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.heading),1)]),_:1},8,["items","leftDisabled","rightDisabled","onLeft","onRight"])}const qP=ce(EP,[["render",_P]]),SP=e.defineComponent({components:{PickerPopup:Da},emits:{"update:pageDate":l=>Ae(l),select:l=>Ae(l),back:()=>!0},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},format:{type:String,required:!1,default:"dd"},headingFormat:{type:String,required:!1,default:"LLLL yyyy"},weekdayFormat:{type:String,required:!1,default:"EE"},weekStartsOn:{type:Number,required:!1,default:1,validator:l=>typeof l=="number"&&Number.isInteger(l)&&l>=0&&l<=6},customWeekdays:{type:Array,required:!1},lowerLimit:{type:Date,required:!1},upperLimit:{type:Date,required:!1},disabledDates:{type:Object,required:!1},allowOutsideInterval:{type:Boolean,required:!1,default:!1}},setup(l,{emit:t}){const a=e.computed(()=>f=>u=>Aa(u,f)),n=e.computed(()=>C1(l.pageDate)),o=e.computed(()=>z1(l.pageDate)),s=e.computed(()=>({start:n.value,end:o.value})),i=e.computed(()=>({start:E1(n.value,l.weekStartsOn),end:oP(o.value,l.weekStartsOn)})),d=e.computed(()=>{var f;return((f=l.customWeekdays)==null?void 0:f.length)===7?l.customWeekdays:null}),c=e.computed(()=>{const f=l.weekStartsOn,u=d.value;if(u)return Array.from({length:7}).map((M,x)=>u[(f+x)%7]);const g=a.value(l.weekdayFormat);return Array.from(Array(7)).map((M,x)=>(f+x)%7).map(M=>sP(new Date,M,l.weekStartsOn)).map(g)}),h=(f,u,g,M)=>{var x,k;return(x=M==null?void 0:M.dates)!=null&&x.some(v=>Sa(f,v))||(k=M==null?void 0:M.predicate)!=null&&k.call(M,f)?!1:!u&&!g?!0:!(u&&Gt(f,bt(u))||g&&Kt(f,Wt(g)))},p=e.computed(()=>{const f=new Date,u=a.value(l.format);return rP(i.value).map(g=>({value:g,display:u(g),selected:!!l.selected&&Sa(l.selected,g),current:Sa(f,g),disabled:!l.allowOutsideInterval&&!dP(g,s.value)||!h(g,l.lowerLimit,l.upperLimit,l.disabledDates),key:a.value("yyyy-MM-dd")(g)}))}),y=e.computed(()=>a.value(l.headingFormat)(l.pageDate)),w=e.computed(()=>l.lowerLimit&&(_1(l.lowerLimit,l.pageDate)||Gt(l.pageDate,l.lowerLimit))),m=e.computed(()=>l.upperLimit&&(_1(l.upperLimit,l.pageDate)||Kt(l.pageDate,l.upperLimit)));return{weekDays:c,days:p,heading:y,leftDisabled:w,rightDisabled:m,previousPage:()=>t("update:pageDate",eP(l.pageDate)),nextPage:()=>t("update:pageDate",B1(l.pageDate,1))}}});function jP(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{headingClickable:"",leftDisabled:l.leftDisabled,rightDisabled:l.rightDisabled,items:l.days,viewMode:"day",onLeft:l.previousPage,onRight:l.nextPage,onHeading:t[0]||(t[0]=d=>l.$emit("back")),onElementClick:t[1]||(t[1]=d=>l.$emit("select",d))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.heading),1)]),subheading:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.weekDays,(d,c)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:e.normalizeClass(`v3dp__subheading__weekday__${c}`)},e.toDisplayString(d),3))),128))]),_:1},8,["leftDisabled","rightDisabled","items","onLeft","onRight"])}const AP=ce(SP,[["render",jP]]);function _l(l,t){const a=l.getBoundingClientRect(),n={height:l.clientHeight,width:l.clientWidth},o=t.getBoundingClientRect();if(!(o.top>=a.top&&o.bottom<=a.top+n.height)){const s=o.top-a.top,i=o.bottom-a.bottom;Math.abs(s)<Math.abs(i)?l.scrollTop+=s:l.scrollTop+=i}}const DP=e.defineComponent({components:{PickerPopup:Da},emits:{select:l=>Ae(l),back:()=>!0},props:{selected:{type:Date,required:!1},pageDate:{type:Date,required:!0},visible:{type:Boolean,required:!0},disabledTime:{type:Object,required:!1}},setup(l,{emit:t}){const a=e.ref(null),n=e.ref(null),o=e.computed(()=>l.pageDate??l.selected),s=e.ref(o.value.getHours()),i=e.ref(o.value.getMinutes());e.watch(()=>l.selected,y=>{let w=0,m=0;y&&(w=y.getHours(),m=y.getMinutes()),s.value=w,i.value=m});const d=e.computed(()=>[...Array(24).keys()].map(y=>({value:y,date:zl(new Date(o.value.getTime()),{hours:y,minutes:i.value,seconds:0}),selected:s.value===y,ref:e.ref(null)}))),c=e.computed(()=>[...Array(60).keys()].map(y=>({value:y,date:zl(new Date(o.value.getTime()),{hours:s.value,minutes:y,seconds:0}),selected:i.value===y,ref:e.ref(null)}))),h=y=>{i.value=y.value,t("select",y.date)},p=()=>{const y=d.value.find(m=>{var f,u;return((u=(f=m.ref.value)==null?void 0:f.classList)==null?void 0:u.contains("selected"))??!1}),w=c.value.find(m=>{var f,u;return((u=(f=m.ref.value)==null?void 0:f.classList)==null?void 0:u.contains("selected"))??!1});y&&w&&(_l(a.value,y.ref.value),_l(n.value,w.ref.value))};return e.watch(()=>l.visible,y=>{y&&e.nextTick(p)}),{hoursListRef:a,minutesListRef:n,hours:s,minutes:i,hoursList:d,minutesList:c,padStartZero:y=>`0${y}`.substr(-2),selectMinutes:h,isEnabled:y=>{var w,m,f,u;return!((m=(w=l.disabledTime)==null?void 0:w.dates)!=null&&m.some(g=>Cl(y,g)&&iP(y,g))||(u=(f=l.disabledTime)==null?void 0:f.predicate)!=null&&u.call(f,y))},scroll:p}}}),NP={ref:"hoursListRef",class:"v3dp__column"},LP=["disabled","onClick"],HP={ref:"minutesListRef",class:"v3dp__column"},$P=["disabled","onClick"];function FP(l,t,a,n,o,s){const i=e.resolveComponent("picker-popup");return e.openBlock(),e.createBlock(i,{headingClickable:"",columnCount:2,leftDisabled:!0,rightDisabled:!0,viewMode:"time",onHeading:t[0]||(t[0]=d=>l.$emit("back"))},{heading:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.padStartZero(l.hours))+":"+e.toDisplayString(l.padStartZero(l.minutes)),1)]),body:e.withCtx(()=>[e.createElementVNode("div",NP,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.hoursList,d=>(e.openBlock(),e.createElementBlock("button",{key:d.value,ref_for:!0,ref:d.ref,class:e.normalizeClass([{selected:d.selected},"v3dp__element_button__hour"]),disabled:!l.isEnabled(d.date),onClick:e.withModifiers(c=>l.hours=d.value,["stop","prevent"])},[e.createElementVNode("span",null,e.toDisplayString(l.padStartZero(d.value)),1)],10,LP))),128))],512),e.createElementVNode("div",HP,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.minutesList,d=>(e.openBlock(),e.createElementBlock("button",{key:d.value,ref_for:!0,ref:d.ref,class:e.normalizeClass([{selected:d.selected},"v3dp__element_button__minute"]),disabled:!l.isEnabled(d.date),onClick:e.withModifiers(c=>l.selectMinutes(d),["stop","prevent"])},[e.createElementVNode("span",null,e.toDisplayString(l.padStartZero(d.value)),1)],10,$P))),128))],512)]),_:1})}const TP=ce(DP,[["render",FP],["__scopeId","data-v-610b89e1"]]),Na=["time","day","month","year"],PP=(l,t,a=void 0)=>{let n=a||new Date;const o=cP([l,n]);o&&(n=o);const s=hP([t,n]);return s&&(n=s),n},IP=e.defineComponent({components:{YearPicker:BP,MonthPicker:qP,DayPicker:AP,TimePicker:TP},inheritAttrs:!1,props:{placeholder:{type:String,default:""},modelValue:{type:Date,required:!1},disabledDates:{type:Object,required:!1},allowOutsideInterval:{type:Boolean,required:!1,default:!1},disabledTime:{type:Object,required:!1},upperLimit:{type:Date,required:!1},lowerLimit:{type:Date,required:!1},startingView:{type:String,required:!1,default:"day",validate:l=>typeof l=="string"&&Na.includes(l)},startingViewDate:{type:Date,required:!1,default:()=>new Date},dayPickerHeadingFormat:{type:String,required:!1,default:"LLLL yyyy"},monthListFormat:{type:String,required:!1,default:"LLL"},weekdayFormat:{type:String,required:!1,default:"EE"},dayFormat:{type:String,required:!1,default:"dd"},inputFormat:{type:String,required:!1,default:"yyyy-MM-dd"},weekDayNames:{type:Array,required:!1},weekStartsOn:{type:Number,required:!1,default:1,validator:l=>[0,1,2,3,4,5,6].includes(l)},disabled:{type:Boolean,required:!1,default:!1},clearable:{type:Boolean,required:!1,default:!1},typeable:{type:Boolean,required:!1,default:!1},minimumView:{type:String,required:!1,default:"day",validate:l=>typeof l=="string"&&Na.includes(l)}},emits:{"update:modelValue":l=>l==null||Ae(l),decadePageChanged:l=>!0,yearPageChanged:l=>!0,monthPageChanged:l=>!0,opened:()=>!0,closed:()=>!0},setup(l,{emit:t,attrs:a}){const n=e.ref("none"),o=e.ref(l.startingViewDate),s=e.ref(null),i=e.ref(!1),d=e.ref(""),c=N=>{const U=N.replace(/[a-zA-Z]/g,"0");return/0/.test(U)?U:""},h=e.computed(()=>c(l.inputFormat));let p=null,y=null;const w=()=>{p==null||p.destroy(),p=null},m=async()=>{if(!y){const{default:N}=await Promise.resolve().then(()=>D1);y=N}return y},f=()=>{p&&p.value!==d.value&&(p.value=d.value??"")},u=async()=>{w(),!(!s.value||!h.value)&&(p=(await m())(s.value,{mask:h.value,lazy:!0,overwrite:!0}),f())};e.watchEffect(()=>{if(!d.value)return;const N=El(d.value,l.inputFormat);N&&(o.value=N)}),e.watchEffect(()=>{d.value=l.modelValue&&Ae(l.modelValue)?Aa(l.modelValue,l.inputFormat):""}),e.onMounted(()=>{h.value&&e.nextTick(()=>{u()})}),e.onBeforeUnmount(()=>{w()}),e.watch(h,N=>{N?e.nextTick(()=>{u()}):w()}),e.watch(d,()=>{f()});const g=(N="none")=>{l.disabled||(N!=="none"&&n.value==="none"&&(o.value=l.modelValue||PP(l.lowerLimit,l.upperLimit,o.value)),n.value=N,t(N!=="none"?"opened":"closed"))};e.watchEffect(()=>{l.disabled&&(n.value="none")});const M=(N,U)=>{o.value=U,N==="year"?t("decadePageChanged",U):N==="month"?t("yearPageChanged",U):N==="day"&&t("monthPageChanged",U)},x=N=>{o.value=N,l.minimumView==="year"?(g("none"),t("update:modelValue",N)):n.value="month"},k=N=>{o.value=N,l.minimumView==="month"?(g("none"),t("update:modelValue",N)):n.value="day"},v=N=>{o.value=N,l.minimumView==="day"?(g("none"),t("update:modelValue",N)):n.value="time"},V=N=>{g("none"),t("update:modelValue",N)},C=()=>{l.clearable&&(g("none"),t("update:modelValue",null),o.value=l.startingViewDate)},q=()=>i.value=!0,L=()=>g(H.value),ee=()=>{i.value=!1,g()},K=N=>{const U=N.keyCode?N.keyCode:N.which;if([27,13].includes(U)&&s.value.blur(),l.typeable){const $=El(s.value.value,l.inputFormat);$&&d.value===Aa($,l.inputFormat)&&(d.value=s.value.value,t("update:modelValue",$))}},H=e.computed(()=>{const N=Na.indexOf(l.startingView),U=Na.indexOf(l.minimumView);return N<U?l.minimumView:l.startingView}),B=N=>Object.fromEntries(Object.entries(N??{}).filter(([U,$])=>U.startsWith("--"))),T=e.computed(()=>{var N;return((N=l.weekDayNames)==null?void 0:N.length)===7?l.weekDayNames:void 0});return{blur:ee,focus:L,click:q,input:d,inputRef:s,pageDate:o,renderView:g,updatePageDate:M,selectYear:x,selectMonth:k,selectDay:v,selectTime:V,keyUp:K,normalizedWeekdayNames:T,viewShown:n,goBackFromTimepicker:()=>l.startingView==="time"&&l.minimumView==="time"?null:n.value="day",clearModelValue:C,initialView:H,log:N=>console.log(N),variables:B}}}),RP={class:"v3dp__input_wrapper"},OP=["readonly","placeholder","disabled","tabindex"],UP={class:"v3dp__clearable"};function ZP(l,t,a,n,o,s){const i=e.resolveComponent("year-picker"),d=e.resolveComponent("month-picker"),c=e.resolveComponent("day-picker"),h=e.resolveComponent("time-picker");return e.openBlock(),e.createElementBlock("div",{class:"v3dp__datepicker",style:e.normalizeStyle(l.variables(l.$attrs.style))},[e.createElementVNode("div",RP,[e.withDirectives(e.createElementVNode("input",e.mergeProps({type:"text",ref:"inputRef",readonly:!l.typeable,"onUpdate:modelValue":t[0]||(t[0]=p=>l.input=p)},l.$attrs,{placeholder:l.placeholder,disabled:l.disabled,tabindex:l.disabled?-1:0,onKeyup:t[1]||(t[1]=(...p)=>l.keyUp&&l.keyUp(...p)),onBlur:t[2]||(t[2]=(...p)=>l.blur&&l.blur(...p)),onFocus:t[3]||(t[3]=(...p)=>l.focus&&l.focus(...p)),onClick:t[4]||(t[4]=(...p)=>l.click&&l.click(...p))}),null,16,OP),[[e.vModelText,l.input]]),e.withDirectives(e.createElementVNode("div",UP,[e.renderSlot(l.$slots,"clear",{onClear:l.clearModelValue},()=>[e.createElementVNode("i",{onClick:t[5]||(t[5]=p=>l.clearModelValue())},"x")])],512),[[e.vShow,l.clearable&&l.modelValue]])]),e.withDirectives(e.createVNode(i,{pageDate:l.pageDate,"onUpdate:pageDate":t[6]||(t[6]=p=>l.updatePageDate("year",p)),selected:l.modelValue,lowerLimit:l.lowerLimit,upperLimit:l.upperLimit,onSelect:l.selectYear},null,8,["pageDate","selected","lowerLimit","upperLimit","onSelect"]),[[e.vShow,l.viewShown==="year"]]),e.withDirectives(e.createVNode(d,{pageDate:l.pageDate,"onUpdate:pageDate":t[7]||(t[7]=p=>l.updatePageDate("month",p)),selected:l.modelValue,onSelect:l.selectMonth,lowerLimit:l.lowerLimit,upperLimit:l.upperLimit,format:l.monthListFormat,onBack:t[8]||(t[8]=p=>l.viewShown="year")},null,8,["pageDate","selected","onSelect","lowerLimit","upperLimit","format"]),[[e.vShow,l.viewShown==="month"]]),e.withDirectives(e.createVNode(c,{pageDate:l.pageDate,"onUpdate:pageDate":t[9]||(t[9]=p=>l.updatePageDate("day",p)),selected:l.modelValue,weekStartsOn:l.weekStartsOn,lowerLimit:l.lowerLimit,upperLimit:l.upperLimit,headingFormat:l.dayPickerHeadingFormat,disabledDates:l.disabledDates,weekdayFormat:l.weekdayFormat,"allow-outside-interval":l.allowOutsideInterval,format:l.dayFormat,"custom-weekdays":l.normalizedWeekdayNames,onSelect:l.selectDay,onBack:t[10]||(t[10]=p=>l.viewShown="month")},null,8,["pageDate","selected","weekStartsOn","lowerLimit","upperLimit","headingFormat","disabledDates","weekdayFormat","allow-outside-interval","format","custom-weekdays","onSelect"]),[[e.vShow,l.viewShown==="day"]]),e.withDirectives(e.createVNode(h,{pageDate:l.pageDate,visible:l.viewShown==="time",selected:l.modelValue,disabledTime:l.disabledTime,onSelect:l.selectTime,onBack:l.goBackFromTimepicker},null,8,["pageDate","visible","selected","disabledTime","onSelect","onBack"]),[[e.vShow,l.viewShown==="time"]])],4)}const WP=ce(IP,[["render",ZP]]),GP=e.defineComponent({__name:"vs-input-date2",props:{clearable:{type:Boolean,default:!0},now:{type:Boolean},editable:{type:Boolean,default:!0},time:{type:Boolean},isInfinity:{type:Boolean},mode:{default:"date"},weekStart:{},dayNames:{},style:{default:()=>({})},customClass:{default:""},disabled:{type:Boolean,default:!1},modelValue:{},error:{default:""},name:{},placeholder:{default:""},maxlength:{},minlength:{}},emits:["update:modelValue"],setup(l,{emit:t}){const a=l,n=t,{inputClass:o}=He(a.style),s=e.computed(()=>a.mode?a.mode:a.time?"datetime":"date"),i={date:"дд.мм.рррр",datetime:"дд.мм.рррр гг:хх",month:"мм.рррр",week:"рррр-тиждень",time:"гг:хх",year:"рррр"},d=e.computed(()=>a.placeholder||i[s.value]||""),c=e.computed(()=>["py-1.5 px-3 block w-full placeholder:text-[#767f8f] bg-white",o.value,a.customClass,{"!border-red-600":a.error}]),h=e.computed(()=>!a.modelValue&&a.now?new Date:null),p=e.computed({get:()=>k(a.modelValue??h.value,s.value)||void 0,set:$=>n("update:modelValue",v($,s.value))}),y=["Пн","Вт","Ср","Чт","Пт","Сб","Нд"],w=e.computed(()=>{var $;if(($=a.dayNames)!=null&&$.length)return a.dayNames.length===7?a.dayNames:y}),m=e.computed(()=>{const $=a.weekStart,Q=typeof $=="string"?Number($):$;return Q===void 0||Number.isNaN(Q)?1:Math.min(6,Math.max(0,Q))}),f=e.computed(()=>{switch(s.value){case"time":return{startingView:"time",minimumView:"time"};case"month":return{startingView:"month",minimumView:"month"};case"year":return{startingView:"year",minimumView:"year"};case"datetime":return{startingView:"day",minimumView:"time"};default:return{startingView:"day",minimumView:"day"}}}),u={date:"dd.MM.yyyy",datetime:"dd.MM.yyyy HH:mm",month:"MM.yyyy",time:"HH:mm",week:"dd.MM.yyyy",year:"yyyy"},g=e.computed(()=>u[s.value]||"dd.MM.yyyy"),M=e.computed(()=>{var $,Q,Y,ie;return{"--vdp-selected-bg-color":(($=a.style)==null?void 0:$.primaryColor)||"#2563eb","--vdp-hover-bg-color":((Q=a.style)==null?void 0:Q.primaryColor)||"#2563eb","--vdp-selected-color":"#ffffff","--vdp-hover-color":"#ffffff","--vdp-border-radius":((Y=a.style)==null?void 0:Y.size)==="sm"?"6px":"8px","--vdp-elem-font-size":((ie=a.style)==null?void 0:ie.size)==="sm"?"0.75em":"0.85em"}}),x=e.ref(!1);e.watch(()=>a.modelValue,$=>{$?x.value=!0:a.now||(x.value=!1)},{immediate:!0}),e.watchEffect(()=>{a.now&&!a.modelValue&&!x.value&&(n("update:modelValue",v(new Date,s.value)),x.value=!0)});function k($,Q){if(!$)return null;if($ instanceof Date&&!Number.isNaN($.getTime()))return $;if(typeof $!="string")return null;switch(Q){case"datetime":return L($);case"time":return H($);case"month":return ee($);case"year":return K($);case"week":return B($);case"date":default:return q($)}}function v($,Q){if(!$)return null;const Y=$ instanceof Date?$:k($,Q);if(!Y)return null;switch(Q){case"datetime":return`${V(Y)}T${C(Y)}`;case"time":return C(Y);case"month":return`${Y.getFullYear()}-${U(Y.getMonth()+1)}`;case"year":return`${Y.getFullYear()}`;case"week":{const{year:ie,week:he}=T(Y);return`${ie}-W${U(he)}`}case"date":default:return V(Y)}}function V($){return`${$.getFullYear()}-${U($.getMonth()+1)}-${U($.getDate())}`}function C($){return`${U($.getHours())}:${U($.getMinutes())}`}function q($){const Q=$.split("-");if(Q.length<3)return null;const[Y,ie,he]=Q.map(Number);return!Y||!ie||!he?null:new Date(Y,ie-1,he)}function L($){const Q=$.includes("T")?$:$.replace(" ","T"),Y=new Date(Q);return Number.isNaN(Y.getTime())?null:Y}function ee($){const[Q,Y]=$.split("-").map(Number);return!Q||Number.isNaN(Y)?null:new Date(Q,(Y||1)-1,1)}function K($){const Q=Number($);return Q?new Date(Q,0,1):null}function H($){const Q=$.match(/^(\d{1,2}):(\d{2})$/);if(!Q)return null;const[,Y,ie]=Q,he=new Date;return he.setHours(Number(Y),Number(ie),0,0),he}function B($){const Q=$.match(/^(\d{4})-W(\d{2})$/);if(!Q)return null;const[,Y,ie]=Q,he=Number(ie);return N(Number(Y),he)}function T($){const Q=new Date(Date.UTC($.getFullYear(),$.getMonth(),$.getDate())),Y=Q.getUTCDay()||7;Q.setUTCDate(Q.getUTCDate()+4-Y);const ie=new Date(Date.UTC(Q.getUTCFullYear(),0,1)),he=Math.ceil(((Q.getTime()-ie.getTime())/864e5+1)/7);return{year:Q.getUTCFullYear(),week:he}}function N($,Q){if(!$||!Q)return null;const Y=new Date($,0,1+(Q-1)*7),ie=Y.getDay(),he=Y;return ie<=4?he.setDate(Y.getDate()-Y.getDay()+1):he.setDate(Y.getDate()+8-Y.getDay()),he}function U($){return String($).padStart(2,"0")}return($,Q)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vs-date-picker",a.customClass]),style:e.normalizeStyle(M.value)},[e.createVNode(WP,{modelValue:p.value,"onUpdate:modelValue":Q[0]||(Q[0]=Y=>p.value=Y),placeholder:d.value,disabled:a.disabled,clearable:a.clearable,typeable:a.editable,"week-day-names":w.value,"week-starts-on":m.value,"starting-view":f.value.startingView,"minimum-view":f.value.minimumView,"input-format":g.value,name:a.name,class:e.normalizeClass(c.value)},null,8,["modelValue","placeholder","disabled","clearable","typeable","week-day-names","week-starts-on","starting-view","minimum-view","input-format","name","class"])],6))}}),KP=ce(GP,[["__scopeId","data-v-a65a2ac3"]]),ql=(l={mode:"edit",schema:null})=>new Promise(t=>{const{close:a}=$j({title:l.mode==="add"?"Додати":"Редагувати",template:"",size:"medium",content:Ml,contentProps:{...l,onClose:()=>{t(null),a()},onSave:n=>{t(n),a()}}})});nt.install=function(l){l.component("VForm",nt),Object.assign(l.config.globalProperties,{$form:ql}),l.provide("form",ql),window.v3plugin||(window.v3plugin={})};const it=Object.freeze(Object.defineProperty({__proto__:null,ModalEdit:Ml,VForm:nt,VsInputAddress:ul,VsInputArray:yl,VsInputArraySelect:za,VsInputCheckbox:Wr,VsInputCodegen:il,VsInputColor:hl,VsInputContainer:tl,VsInputDate:KP,VsInputEmail:m1,VsInputFile:Xr,VsInputFileList:Qr,VsInputKeyValue:dl,VsInputMask:k1,VsInputMonaco:ml,VsInputNumber:Zr,VsInputRadio:g1,VsInputRange:pl,VsInputRichtext:rl,VsInputSelect:w1,VsInputSlug:sl,VsInputStatic:u1,VsInputSwitcher:y1,VsInputTag:ol,VsInputTel:f1,VsInputText:zt,VsInputTextArray:cl,VsInputTextarea:al,default:nt,inputs:Ea,vsInputDatatable:ll,vsInputMap:nl},Symbol.toStringTag,{value:"Module"}));function dt(l){return typeof l=="string"||l instanceof String}function Sl(l){var t;return typeof l=="object"&&l!=null&&(l==null||(t=l.constructor)==null?void 0:t.name)==="Object"}function jl(l,t){return Array.isArray(t)?jl(l,(a,n)=>t.includes(n)):Object.entries(l).reduce((a,n)=>{let[o,s]=n;return t(s,o)&&(a[o]=s),a},{})}const se={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Al(l){switch(l){case se.LEFT:return se.FORCE_LEFT;case se.RIGHT:return se.FORCE_RIGHT;default:return l}}function q1(l){return l.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function La(l,t){if(t===l)return!0;const a=Array.isArray(t),n=Array.isArray(l);let o;if(a&&n){if(t.length!=l.length)return!1;for(o=0;o<t.length;o++)if(!La(t[o],l[o]))return!1;return!0}if(a!=n)return!1;if(t&&l&&typeof t=="object"&&typeof l=="object"){const s=t instanceof Date,i=l instanceof Date;if(s&&i)return t.getTime()==l.getTime();if(s!=i)return!1;const d=t instanceof RegExp,c=l instanceof RegExp;if(d&&c)return t.toString()==l.toString();if(d!=c)return!1;const h=Object.keys(t);for(o=0;o<h.length;o++)if(!Object.prototype.hasOwnProperty.call(l,h[o]))return!1;for(o=0;o<h.length;o++)if(!La(l[h[o]],t[h[o]]))return!1;return!0}else if(t&&l&&typeof t=="function"&&typeof l=="function")return t.toString()===l.toString();return!1}class JP{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?se.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?se.RIGHT:se.LEFT}}function ye(l,t){return new ye.InputMask(l,t)}function Dl(l){if(l==null)throw new Error("mask property should be defined");return l instanceof RegExp?ye.MaskedRegExp:dt(l)?ye.MaskedPattern:l===Date?ye.MaskedDate:l===Number?ye.MaskedNumber:Array.isArray(l)||l===Array?ye.MaskedDynamic:ye.Masked&&l.prototype instanceof ye.Masked?l:ye.Masked&&l instanceof ye.Masked?l.constructor:l instanceof Function?ye.MaskedFunction:(console.warn("Mask not found for mask",l),ye.Masked)}function _t(l){if(!l)throw new Error("Options in not defined");if(ye.Masked){if(l.prototype instanceof ye.Masked)return{mask:l};const{mask:t=void 0,...a}=l instanceof ye.Masked?{mask:l}:Sl(l)&&l.mask instanceof ye.Masked?l:{};if(t){const n=t.mask;return{...jl(t,(o,s)=>!s.startsWith("_")),mask:t.constructor,_mask:n,...a}}}return Sl(l)?{...l}:{mask:l}}function et(l){if(ye.Masked&&l instanceof ye.Masked)return l;const t=_t(l),a=Dl(t.mask);if(!a)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===a&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new a(t)}ye.createMask=et;class Ha{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return t??this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return t??this.value.length}select(t,a){if(!(t==null||a==null||t===this.selectionStart&&a===this.selectionEnd))try{this._unsafeSelect(t,a)}catch{}}get isActive(){return!1}}ye.MaskElement=Ha;const Nl=90,YP=89;class Jt extends Ha{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,a,n;return(t=(a=(n=this.input).getRootNode)==null?void 0:a.call(n))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===Nl&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===YP&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===Nl&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}ye.HTMLMaskElement=Jt;class Ll extends Jt{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,a){this.input.setSelectionRange(t,a)}get value(){return this.input.value}set value(t){this.input.value=t}}ye.HTMLMaskElement=Jt;class S1 extends Jt{get _unsafeSelectionStart(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),n=a&&a.anchorOffset,o=a&&a.focusOffset;return o==null||n==null||n<o?n:o}get _unsafeSelectionEnd(){const t=this.rootElement,a=t.getSelection&&t.getSelection(),n=a&&a.anchorOffset,o=a&&a.focusOffset;return o==null||n==null||n>o?n:o}_unsafeSelect(t,a){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,t),n.setEnd(this.input.lastChild||this.input,a);const o=this.rootElement,s=o.getSelection&&o.getSelection();s&&(s.removeAllRanges(),s.addRange(n))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}ye.HTMLContenteditableMaskElement=S1;class $a{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>$a.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}$a.MAX_LENGTH=100;class Hl{constructor(t,a){this.el=t instanceof Ha?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new S1(t):new Ll(t),this.masked=et(a),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new $a,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var a;return t==null||((a=this.masked)==null?void 0:a.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof ye.Masked)&&this.masked.constructor===Dl(t)){this.masked.updateOptions({mask:t});return}const a=t instanceof ye.Masked?t:et({mask:t});a.unmaskedValue=this.masked.unmaskedValue,this.masked=a}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,a){const n=this._listeners[t];n&&n.forEach(o=>o(a))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const a=this.masked.unmaskedValue,n=this.masked.value,o=this.masked.rawInputValue,s=this.displayValue,i=this.unmaskedValue!==a||this.value!==n||this._rawInputValue!==o;this._unmaskedValue=a,this._value=n,this._rawInputValue=o,this.el.value!==s&&(this.el.value=s),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:a,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:a,...n}=t,o=!this.maskEquals(a),s=this.masked.optionsIsChanged(n);o&&(this.mask=a),s&&this.masked.updateOptions(n),(o||s)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,se.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,a){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(a),this}off(t,a){if(!this._listeners[t])return this;if(!a)return delete this._listeners[t],this;const n=this._listeners[t].indexOf(a);return n>=0&&this._listeners[t].splice(n,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const a=new JP({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,o=this.masked.splice(a.startChangePos,a.removed.length,a.inserted,a.removeDirection,{input:!0,raw:!0}).offset,s=n===this.masked.rawInputValue?a.removeDirection:se.NONE;let i=this.masked.nearestInputPos(a.startChangePos+o,s);s!==se.NONE&&(i=this.masked.nearestInputPos(i,se.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}ye.InputMask=Hl;class ue{static normalize(t){return Array.isArray(t)?t:[t,new ue]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}ye.ChangeDetails=ue;class tt{constructor(t,a,n){t===void 0&&(t=""),a===void 0&&(a=0),this.value=t,this.from=a,this.stop=n}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";const a=this.value[0];return this.value=this.value.slice(1),a}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class De{constructor(t){this._value="",this._update({...De.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,a){a===void 0&&(a={input:!0}),this.reset(),this.append(t,a,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,a){return t}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),Math.min(this.displayValue.length,a-t)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this.displayValue.slice(t,a)}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new tt(this.extractInput(t,a),t)}appendTail(t){return dt(t)&&(t=new tt(String(t))),t.appendTo(this)}_appendCharRaw(t,a){return t?(this._value+=t,new ue({inserted:t,rawInserted:t})):new ue}_appendChar(t,a,n){a===void 0&&(a={});const o=this.state;let s;if([t,s]=this.doPrepareChar(t,a),t&&(s=s.aggregate(this._appendCharRaw(t,a)),!s.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=o;let d=this.pad(a);const c=this._appendCharRaw(t,a);d=d.aggregate(c),c.rawInserted||d.equals(s)?s=d:this.state=i}if(s.inserted){let i,d=this.doValidate(a)!==!1;if(d&&n!=null){const c=this.state;if(this.overwrite===!0){i=n.state;for(let p=0;p<s.rawInserted.length;++p)n.unshift(this.displayValue.length-s.tailShift)}let h=this.appendTail(n);if(d=h.rawInserted.length===n.toString().length,!(d&&h.inserted)&&this.overwrite==="shift"){this.state=c,i=n.state;for(let p=0;p<s.rawInserted.length;++p)n.shift();h=this.appendTail(n),d=h.rawInserted.length===n.toString().length}d&&h.inserted&&(this.state=c)}d||(s=new ue,this.state=o,n&&i&&(n.state=i))}return s}_appendPlaceholder(){return new ue}_appendEager(){return new ue}append(t,a,n){if(!dt(t))throw new Error("value should be string");const o=dt(n)?new tt(String(n)):n;a!=null&&a.tail&&(a._beforeTailState=this.state);let s;[t,s]=this.doPrepare(t,a);for(let i=0;i<t.length;++i){const d=this._appendChar(t[i],a,o);if(!d.rawInserted&&!this.doSkipInvalid(t[i],a,o))break;s.aggregate(d)}return(this.eager===!0||this.eager==="append")&&a!=null&&a.input&&t&&s.aggregate(this._appendEager()),o!=null&&(s.tailShift+=this.appendTail(o).tailShift),s}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(a),new ue}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const a=this.rawInputValue,n=this.value,o=t();return this.rawInputValue=a,this.value&&this.value!==n&&n.indexOf(this.value)===0&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,o}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const a=this.state,n=t(this);return this.state=a,delete this._isolated,n}doSkipInvalid(t,a,n){return!!this.skipInvalid}doPrepare(t,a){return a===void 0&&(a={}),ue.normalize(this.prepare?this.prepare(t,this,a):t)}doPrepareChar(t,a){return a===void 0&&(a={}),ue.normalize(this.prepareChar?this.prepareChar(t,this,a):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,a,n,o,s){n===void 0&&(n=""),o===void 0&&(o=se.NONE),s===void 0&&(s={input:!0});const i=t+a,d=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let h;c&&(o=Al(o),h=this.extractInput(0,i,{raw:!0}));let p=t;const y=new ue;if(o!==se.NONE&&(p=this.nearestInputPos(t,a>1&&t!==0&&!c?se.NONE:o),y.tailShift=p-t),y.aggregate(this.remove(p)),c&&o!==se.NONE&&h===this.rawInputValue)if(o===se.FORCE_LEFT){let w;for(;h===this.rawInputValue&&(w=this.displayValue.length);)y.aggregate(new ue({tailShift:-1})).aggregate(this.remove(w-1))}else o===se.FORCE_RIGHT&&d.unshift();return y.aggregate(this.append(n,s,d))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!La(this,t)}typedValueEquals(t){const a=this.typedValue;return t===a||De.EMPTY_VALUES.includes(t)&&De.EMPTY_VALUES.includes(a)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new ue}}De.DEFAULTS={skipInvalid:!0},De.EMPTY_VALUES=[void 0,null,""],ye.Masked=De;class ct{constructor(t,a){t===void 0&&(t=[]),a===void 0&&(a=0),this.chunks=t,this.from=a}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=dt(t)?new tt(String(t)):t;const a=this.chunks[this.chunks.length-1],n=a&&(a.stop===t.stop||t.stop==null)&&t.from===a.from+a.toString().length;if(t instanceof tt)n?a.extend(t.toString()):this.chunks.push(t);else if(t instanceof ct){if(t.stop==null){let o;for(;t.chunks.length&&t.chunks[0].stop==null;)o=t.chunks.shift(),o.from+=t.from,this.extend(o)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof ye.MaskedPattern))return new tt(this.toString()).appendTo(t);const a=new ue;for(let n=0;n<this.chunks.length;++n){const o=this.chunks[n],s=t._mapPosToBlock(t.displayValue.length),i=o.stop;let d;if(i!=null&&(!s||s.index<=i)&&((o instanceof ct||t._stops.indexOf(i)>=0)&&a.aggregate(t._appendPlaceholder(i)),d=o instanceof ct&&t._blocks[i]),d){const c=d.appendTail(o);a.aggregate(c);const h=o.toString().slice(c.rawInserted.length);h&&a.aggregate(t.append(h,{tail:!0}))}else a.aggregate(t.append(o.toString(),{tail:!0}))}return a}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:a,...n}=t;Object.assign(this,n),this.chunks=a.map(o=>{const s="chunks"in o?new ct:new tt;return s.state=o,s})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";const a=t!=null?t-this.from:t;let n=0;for(;n<this.chunks.length;){const o=this.chunks[n],s=o.unshift(a);if(o.toString()){if(!s)break;++n}else this.chunks.splice(n,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const a=this.chunks[t],n=a.shift();if(a.toString()){if(!n)break;--t}else this.chunks.splice(t,1);if(n)return n}return""}}class XP{constructor(t,a){this.masked=t,this._log=[];const{offset:n,index:o}=t._mapPosToBlock(a)||(a<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=o,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((a=this.block)==null?void 0:a.displayValue.length)||0){var a;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,se.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,se.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,se.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,se.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,se.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,se.NONE),!0})}}class j1{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(a),this._value||(this._isRawInput=!1),new ue}nearestInputPos(t,a){a===void 0&&(a=se.NONE);const n=0,o=this._value.length;switch(a){case se.LEFT:case se.FORCE_LEFT:return n;case se.NONE:case se.RIGHT:case se.FORCE_RIGHT:default:return o}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),this._isRawInput?a-t:0}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(t,a)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new ue;const n=this.eager===!0||this.eager==="append",o=this.char===t&&(this.isUnmasking||a.input||a.raw)&&(!a.raw||!n)&&!a.tail,s=new ue({inserted:this.char,rawInserted:o?this.char:""});return this._value=this.char,this._isRawInput=o&&(a.raw||a.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new ue;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new tt("")}appendTail(t){return dt(t)&&(t=new tt(String(t))),t.appendTo(this)}append(t,a,n){const o=this._appendChar(t[0],a);return n!=null&&(o.tailShift+=this.appendTail(n).tailShift),o}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}}class Yt{constructor(t){const{parent:a,isOptional:n,placeholderChar:o,displayChar:s,lazy:i,eager:d,...c}=t;this.masked=et(c),Object.assign(this,{parent:a,isOptional:n,placeholderChar:o,displayChar:s,lazy:i,eager:d})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),t===0&&a>=1?(this.isFilled=!1,this.masked.remove(t,a)):new ue}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,a){if(a===void 0&&(a={}),this.isFilled)return new ue;const n=this.masked.state;let o=this.masked._appendChar(t,this.currentMaskFlags(a));return o.inserted&&this.doValidate(a)===!1&&(o=new ue,this.masked.state=n),!o.inserted&&!this.isOptional&&!this.lazy&&!a.input&&(o.inserted=this.placeholderChar),o.skip=!o.inserted&&!this.isOptional,this.isFilled=!!o.inserted,o}append(t,a,n){return this.masked.append(t,this.currentMaskFlags(a),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ue:(this.isFilled=!0,new ue({inserted:this.placeholderChar}))}_appendEager(){return new ue}extractTail(t,a){return this.masked.extractTail(t,a)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.masked.extractInput(t,a,n)}nearestInputPos(t,a){a===void 0&&(a=se.NONE);const n=0,o=this.value.length,s=Math.min(Math.max(t,n),o);switch(a){case se.LEFT:case se.FORCE_LEFT:return this.isComplete?s:n;case se.RIGHT:case se.FORCE_RIGHT:return this.isComplete?s:o;case se.NONE:default:return s}}totalInputPositions(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.value.length),this.value.slice(t,a).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var a;return{...t,_beforeTailState:(t==null||(a=t._beforeTailState)==null?void 0:a.masked)||(t==null?void 0:t._beforeTailState)}}pad(t){return new ue}}Yt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class $l extends De{updateOptions(t){super.updateOptions(t)}_update(t){const a=t.mask;a&&(t.validate=n=>n.search(a)>=0),super._update(t)}}ye.MaskedRegExp=$l;class Ne extends De{constructor(t){super({...Ne.DEFAULTS,...t,definitions:Object.assign({},Yt.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const a=this.mask;if(!a||!t)return;let n=!1,o=!1;for(let s=0;s<a.length;++s){if(this.blocks){const h=a.slice(s),p=Object.keys(this.blocks).filter(w=>h.indexOf(w)===0);p.sort((w,m)=>m.length-w.length);const y=p[0];if(y){const{expose:w,repeat:m,...f}=_t(this.blocks[y]),u={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...f,repeat:m,parent:this},g=m!=null?new ye.RepeatBlock(u):et(u);g&&(this._blocks.push(g),w&&(this.exposeBlock=g),this._maskedBlocks[y]||(this._maskedBlocks[y]=[]),this._maskedBlocks[y].push(this._blocks.length-1)),s+=y.length-1;continue}}let i=a[s],d=i in t;if(i===Ne.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){n=!n;continue}if(i==="["||i==="]"){o=!o;continue}if(i===Ne.ESCAPE_CHAR){if(++s,i=a[s],!i)break;d=!1}const c=d?new Yt({isOptional:o,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,..._t(t[i]),parent:this}):new j1({char:i,eager:this.eager,isUnmasking:n});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(t=>t.state)}}set state(t){if(!t){this.reset();return}const{_blocks:a,...n}=t;this._blocks.forEach((o,s)=>o.state=a[s]),super.state=n}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,a)=>t+=a.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(a),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,a)=>t+=a.value,"")}set value(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(a),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const a=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(a),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,a)=>t+=a.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const a=new ue;let n=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(n==null)return a;this._blocks[n].isFilled&&++n;for(let o=n;o<this._blocks.length;++o){const s=this._blocks[o]._appendEager();if(!s.inserted)break;a.aggregate(s)}return a}_appendCharRaw(t,a){a===void 0&&(a={});const n=this._mapPosToBlock(this.displayValue.length),o=new ue;if(!n)return o;for(let i=n.index,d;d=this._blocks[i];++i){var s;const c=d._appendChar(t,{...a,_beforeTailState:(s=a._beforeTailState)==null||(s=s._blocks)==null?void 0:s[i]});if(o.aggregate(c),c.consumed)break}return o}extractTail(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=new ct;return t===a||this._forEachBlocksInRange(t,a,(o,s,i,d)=>{const c=o.extractTail(i,d);c.stop=this._findStopBefore(s),c.from=this._blockStartPos(s),c instanceof ct&&(c.blockIndex=s),n.extend(c)}),n}extractInput(t,a,n){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),n===void 0&&(n={}),t===a)return"";let o="";return this._forEachBlocksInRange(t,a,(s,i,d,c)=>{o+=s.extractInput(d,c,n)}),o}_findStopBefore(t){let a;for(let n=0;n<this._stops.length;++n){const o=this._stops[n];if(o<=t)a=o;else break}return a}_appendPlaceholder(t){const a=new ue;if(this.lazy&&t==null)return a;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return a;const o=n.index,s=t??this._blocks.length;return this._blocks.slice(o,s).forEach(i=>{if(!i.lazy||t!=null){var d;a.aggregate(i._appendPlaceholder((d=i._blocks)==null?void 0:d.length))}}),a}_mapPosToBlock(t){let a="";for(let n=0;n<this._blocks.length;++n){const o=this._blocks[n],s=a.length;if(a+=o.displayValue,t<=a.length)return{index:n,offset:t-s}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((a,n)=>a+=n.displayValue.length,0)}_forEachBlocksInRange(t,a,n){a===void 0&&(a=this.displayValue.length);const o=this._mapPosToBlock(t);if(o){const s=this._mapPosToBlock(a),i=s&&o.index===s.index,d=o.offset,c=s&&i?s.offset:this._blocks[o.index].displayValue.length;if(n(this._blocks[o.index],o.index,d,c),s&&!i){for(let h=o.index+1;h<s.index;++h)n(this._blocks[h],h,0,this._blocks[h].displayValue.length);n(this._blocks[s.index],s.index,0,s.offset)}}}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=super.remove(t,a);return this._forEachBlocksInRange(t,a,(o,s,i,d)=>{n.aggregate(o.remove(i,d))}),n}nearestInputPos(t,a){if(a===void 0&&(a=se.NONE),!this._blocks.length)return 0;const n=new XP(this,t);if(a===se.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(a===se.LEFT||a===se.FORCE_LEFT){if(a===se.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===t)return t;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),a===se.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=t||(n.popState(),n.ok&&n.pos<=t))return n.pos;n.popState()}return n.ok?n.pos:a===se.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return a===se.RIGHT||a===se.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:a===se.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(t,se.LEFT))):t}totalInputPositions(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);let n=0;return this._forEachBlocksInRange(t,a,(o,s,i,d)=>{n+=o.totalInputPositions(i,d)}),n}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const a=this._maskedBlocks[t];return a?a.map(n=>this._blocks[n]):[]}pad(t){const a=new ue;return this._forEachBlocksInRange(0,this.displayValue.length,n=>a.aggregate(n.pad(t))),a}}Ne.DEFAULTS={...De.DEFAULTS,lazy:!0,placeholderChar:"_"},Ne.STOP_CHAR="`",Ne.ESCAPE_CHAR="\\",Ne.InputDefinition=Yt,Ne.FixedDefinition=j1,ye.MaskedPattern=Ne;class Xt extends Ne{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:a=this.to||0,from:n=this.from||0,maxLength:o=this.maxLength||0,autofix:s=this.autofix,...i}=t;this.to=a,this.from=n,this.maxLength=Math.max(String(a).length,o),this.autofix=s;const d=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<c.length&&c[h]===d[h];)++h;i.mask=c.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let a="",n="";const[,o,s]=t.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(a="0".repeat(o.length)+s,n="9".repeat(o.length)+s),a=a.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[a,n]}doPrepareChar(t,a){a===void 0&&(a={});let n;return[t,n]=super.doPrepareChar(t.replace(/\D/g,""),a),t||(n.skip=!this.isComplete),[t,n]}_appendCharRaw(t,a){if(a===void 0&&(a={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,a);const n=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0"),[s,i]=this.boundaries(this.value+t);return Number(i)<this.from?super._appendCharRaw(n[this.value.length],a):Number(s)>this.to?!a.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],a).aggregate(this._appendCharRaw(t,a)):super._appendCharRaw(o[this.value.length],a):super._appendCharRaw(t,a)}doValidate(t){const a=this.value;if(a.search(/[^0]/)===-1&&a.length<=this._matchFrom)return!0;const[n,o]=this.boundaries(a);return this.from<=Number(o)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){const a=new ue;if(this.value.length===this.maxLength)return a;const n=this.value,o=this.maxLength-this.value.length;if(o){this.reset();for(let s=0;s<o;++s)a.aggregate(super._appendCharRaw("0",t));n.split("").forEach(s=>this._appendCharRaw(s))}return a}}ye.MaskedRange=Xt;const QP="d{.}`m{.}`Y";class at extends Ne{static extractPatternOptions(t){const{mask:a,pattern:n,...o}=t;return{...o,mask:dt(a)?a:n}}constructor(t){super(at.extractPatternOptions({...at.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:a,pattern:n,blocks:o,...s}={...at.DEFAULTS,...t},i=Object.assign({},at.GET_DEFAULT_BLOCKS());t.min&&(i.Y.from=t.min.getFullYear()),t.max&&(i.Y.to=t.max.getFullYear()),t.min&&t.max&&i.Y.from===i.Y.to&&(i.m.from=t.min.getMonth()+1,i.m.to=t.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=t.min.getDate(),i.d.to=t.max.getDate())),Object.assign(i,this.blocks,o),super._update({...s,mask:dt(a)?a:n,blocks:i})}doValidate(t){const a=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&a!=null&&(this.min==null||this.min<=a)&&(this.max==null||a<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(at.extractPatternOptions(t))}}at.GET_DEFAULT_BLOCKS=()=>({d:{mask:Xt,from:1,to:31,maxLength:2},m:{mask:Xt,from:1,to:12,maxLength:2},Y:{mask:Xt,from:1900,to:9999}}),at.DEFAULTS={...Ne.DEFAULTS,mask:Date,pattern:QP,format:(l,t)=>{if(!l)return"";const a=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),o=l.getFullYear();return[a,n,o].join(".")},parse:(l,t)=>{const[a,n,o]=l.split(".").map(Number);return new Date(o,n-1,a)}},ye.MaskedDate=at;class Qt extends De{constructor(t){super({...Qt.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(a=>{const{expose:n,...o}=_t(a),s=et({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...o});return n&&(this.exposeMask=s),s}):[])}_appendCharRaw(t,a){a===void 0&&(a={});const n=this._applyDispatch(t,a);return this.currentMask&&n.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(a))),n}_applyDispatch(t,a,n){t===void 0&&(t=""),a===void 0&&(a={}),n===void 0&&(n="");const o=a.tail&&a._beforeTailState!=null?a._beforeTailState._value:this.value,s=this.rawInputValue,i=a.tail&&a._beforeTailState!=null?a._beforeTailState._rawInputValue:s,d=s.slice(i.length),c=this.currentMask,h=new ue,p=c==null?void 0:c.state;return this.currentMask=this.doDispatch(t,{...a},n),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),h.tailShift=this.currentMask.value.length-o.length),d&&(h.tailShift+=this.currentMask.append(d,{raw:!0,tail:!0}).tailShift)):p&&(this.currentMask.state=p)),h}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const a=new ue;return t&&a.aggregate(this._applyDispatch("",{},t)),a.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var a,n;return{...t,_beforeTailState:((a=t._beforeTailState)==null?void 0:a.currentMaskRef)===this.currentMask&&((n=t._beforeTailState)==null?void 0:n.currentMask)||t._beforeTailState}}doDispatch(t,a,n){return a===void 0&&(a={}),n===void 0&&(n=""),this.dispatch(t,this,a,n)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,a){a===void 0&&(a={});let[n,o]=super.doPrepare(t,a);if(this.currentMask){let s;[n,s]=super.doPrepare(n,this.currentMaskFlags(a)),o=o.aggregate(s)}return[n,o]}doPrepareChar(t,a){a===void 0&&(a={});let[n,o]=super.doPrepareChar(t,a);if(this.currentMask){let s;[n,s]=super.doPrepareChar(n,this.currentMaskFlags(a)),o=o.aggregate(s)}return[n,o]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(a=>a.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let a=String(t);this.currentMask&&(this.currentMask.typedValue=t,a=this.currentMask.unmaskedValue),this.unmaskedValue=a}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,a){const n=new ue;return this.currentMask&&n.aggregate(this.currentMask.remove(t,a)).aggregate(this._applyDispatch()),n}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(a=>a.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state}}set state(t){const{compiledMasks:a,currentMaskRef:n,currentMask:o,...s}=t;a&&this.compiledMasks.forEach((i,d)=>i.state=a[d]),n!=null&&(this.currentMask=n,this.currentMask.state=o),super.state=s}extractInput(t,a,n){return this.currentMask?this.currentMask.extractInput(t,a,n):""}extractTail(t,a){return this.currentMask?this.currentMask.extractTail(t,a):super.extractTail(t,a)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,a){return this.currentMask?this.currentMask.nearestInputPos(t,a):super.nearestInputPos(t,a)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((a,n)=>{if(!t[n])return;const{mask:o,...s}=t[n];return La(a,s)&&a.maskEquals(o)}):super.maskEquals(t)}typedValueEquals(t){var a;return!!((a=this.currentMask)!=null&&a.typedValueEquals(t))}}Qt.DEFAULTS={...De.DEFAULTS,dispatch:(l,t,a,n)=>{if(!t.compiledMasks.length)return;const o=t.rawInputValue,s=t.compiledMasks.map((i,d)=>{const c=t.currentMask===i,h=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,se.FORCE_LEFT);return i.rawInputValue!==o?(i.reset(),i.append(o,{raw:!0})):c||i.remove(h),i.append(l,t.currentMaskFlags(a)),i.appendTail(n),{index:d,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(h,i.nearestInputPos(i.displayValue.length,se.FORCE_LEFT)))}});return s.sort((i,d)=>d.weight-i.weight||d.totalInputPositions-i.totalInputPositions),t.compiledMasks[s[0].index]}},ye.MaskedDynamic=Qt;class ea extends Ne{constructor(t){super({...ea.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:a,...n}=t;if(a){const o=a.map(d=>d.length),s=Math.min(...o),i=Math.max(...o)-s;n.mask="*".repeat(s),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=a}super._update(n)}_appendCharRaw(t,a){a===void 0&&(a={});const n=Math.min(this.nearestInputPos(0,se.FORCE_RIGHT),this.value.length),o=this.enum.filter(s=>this.matchValue(s,this.unmaskedValue+t,n));if(o.length){o.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,d)=>{const c=o[0][d];d>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,a))});const s=super._appendCharRaw(o[0][this.value.length],a);return o.length===1&&o[0].slice(this.unmaskedValue.length).split("").forEach(i=>s.aggregate(super._appendCharRaw(i))),s}return new ue({skip:!this.isComplete})}extractTail(t,a){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),new tt("",t)}remove(t,a){if(t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),t===a)return new ue;const n=Math.min(super.nearestInputPos(0,se.FORCE_RIGHT),this.value.length);let o;for(o=t;o>=0&&!(this.enum.filter(i=>this.matchValue(i,this.value.slice(n,o),n)).length>1);--o);const s=super.remove(o,a);return s.tailShift+=o-t,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}ea.DEFAULTS={...Ne.DEFAULTS,matchValue:(l,t,a)=>l.indexOf(t,a)===a},ye.MaskedEnum=ea;class Fl extends De{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}ye.MaskedFunction=Fl;var Tl;class Ie extends De{constructor(t){super({...Ie.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),a="\\d*",n=(this.scale?"("+q1(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+a+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(q1).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(q1(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const a=t.split(this.radix);return a[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),a.join(this.radix)}doPrepareChar(t,a){a===void 0&&(a={});const[n,o]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(a.input&&a.raw||!a.input&&!a.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),a);return t&&!n&&(o.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&o.aggregate(this._appendChar("-")),[n,o]}_separatorsCount(t,a){a===void 0&&(a=!1);let n=0;for(let o=0;o<t;++o)this._value.indexOf(this.thousandsSeparator,o)===o&&(++n,a&&(t+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,a,n){return t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a),this._removeThousandsSeparators(super.extractInput(t,a,n))}_appendCharRaw(t,a){a===void 0&&(a={});const n=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,o=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=t;const i=this.number;let d=!isNaN(i),c=!1;if(d){let w;this.min!=null&&this.min<0&&this.number<this.min&&(w=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(w=this.max),w!=null&&(this.autofix?(this._value=this.format(w,this).replace(Ie.UNMASKED_RADIX,this.radix),c||(c=s===this._value&&!a.tail)):d=!1),d&&(d=!!this._value.match(this._numberRegExp))}let h;d?h=new ue({inserted:this._value.slice(s.length),rawInserted:c?"":t,skip:c}):(this._value=s,h=new ue),this._value=this._insertThousandsSeparators(this._value);const p=a.tail&&a._beforeTailState?a._beforeTailState._value:this._value,y=this._separatorsCountFromSlice(p);return h.tailShift+=(y-o)*this.thousandsSeparator.length,h}_findSeparatorAround(t){if(this.thousandsSeparator){const a=t-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,a);if(n<=t)return n}return-1}_adjustRangeWithSeparators(t,a){const n=this._findSeparatorAround(t);n>=0&&(t=n);const o=this._findSeparatorAround(a);return o>=0&&(a=o+this.thousandsSeparator.length),[t,a]}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length),[t,a]=this._adjustRangeWithSeparators(t,a);const n=this.value.slice(0,t),o=this.value.slice(a),s=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+o));const i=this._separatorsCountFromSlice(n);return new ue({tailShift:(i-s)*this.thousandsSeparator.length})}nearestInputPos(t,a){if(!this.thousandsSeparator)return t;switch(a){case se.NONE:case se.LEFT:case se.FORCE_LEFT:{const n=this._findSeparatorAround(t-1);if(n>=0){const o=n+this.thousandsSeparator.length;if(t<o||this.value.length<=o||a===se.FORCE_LEFT)return n}break}case se.RIGHT:case se.FORCE_RIGHT:{const n=this._findSeparatorAround(t);if(n>=0)return n+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let a=t;this.min!=null&&(a=Math.max(a,this.min)),this.max!=null&&(a=Math.min(a,this.max)),a!==t&&(this.unmaskedValue=this.format(a,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(t){const a=this._removeThousandsSeparators(t).split(this.radix);return a[0]=a[0].replace(/^(\D*)(0*)(\d*)/,(n,o,s,i)=>o+i),t.length&&!/\d$/.test(a[0])&&(a[0]=a[0]+"0"),a.length>1&&(a[1]=a[1].replace(/0*$/,""),a[1].length||(a.length=1)),this._insertThousandsSeparators(a.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const a=t.split(this.radix);return a.length<2&&a.push(""),a[1]=a[1].padEnd(this.scale,"0"),a.join(this.radix)}doSkipInvalid(t,a,n){a===void 0&&(a={});const o=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===Ie.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,a,n)&&!o}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Ie.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(Ie.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||Ie.EMPTY_VALUES.includes(t)&&Ie.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}}Tl=Ie,Ie.UNMASKED_RADIX=".",Ie.EMPTY_VALUES=[...De.EMPTY_VALUES,0],Ie.DEFAULTS={...De.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Tl.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:l=>l.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},ye.MaskedNumber=Ie;const Fa={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function A1(l,t,a){t===void 0&&(t=Fa.MASKED),a===void 0&&(a=Fa.MASKED);const n=et(l);return o=>n.runIsolated(s=>(s[t]=o,s[a]))}function Pl(l,t,a,n){return A1(t,a,n)(l)}ye.PIPE_TYPE=Fa,ye.createPipe=A1,ye.pipe=Pl;class Il extends Ne{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var a,n,o;const{repeat:s,...i}=_t(t);this._blockOpts=Object.assign({},this._blockOpts,i);const d=et(this._blockOpts);this.repeat=(a=(n=s??d.repeat)!=null?n:this.repeat)!=null?a:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((o=this._blocks)==null?void 0:o.length)||0,this.repeatFrom)),blocks:{m:d},eager:d.eager,overwrite:d.overwrite,skipInvalid:d.skipInvalid,lazy:d.lazy,placeholderChar:d.placeholderChar,displayChar:d.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(et(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,a){a===void 0&&(a={});const n=new ue;for(let c=(o=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?o:Math.max(this._blocks.length-1,0),h,p;h=(i=this._blocks[c])!=null?i:p=!p&&this._allocateBlock(c);++c){var o,s,i,d;const y=h._appendChar(t,{...a,_beforeTailState:(d=a._beforeTailState)==null||(d=d._blocks)==null?void 0:d[c]});if(y.skip&&p){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(y),y.consumed)break}return n}_trimEmptyTail(t,a){var n,o;t===void 0&&(t=0);const s=Math.max(((n=this._mapPosToBlock(t))==null?void 0:n.index)||0,this.repeatFrom,0);let i;a!=null&&(i=(o=this._mapPosToBlock(a))==null?void 0:o.index),i==null&&(i=this._blocks.length-1);let d=0;for(let c=i;s<=c&&!this._blocks[c].unmaskedValue;--c,++d);d&&(this._blocks.splice(i-d+1,d),this.mask=this.mask.slice(d))}reset(){super.reset(),this._trimEmptyTail()}remove(t,a){t===void 0&&(t=0),a===void 0&&(a=this.displayValue.length);const n=super.remove(t,a);return this._trimEmptyTail(t,a),n}totalInputPositions(t,a){return t===void 0&&(t=0),a==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,a)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}ye.RepeatBlock=Il;try{globalThis.IMask=ye}catch{}const D1=Object.freeze(Object.defineProperty({__proto__:null,ChangeDetails:ue,ChunksTailDetails:ct,DIRECTION:se,HTMLContenteditableMaskElement:S1,HTMLInputMaskElement:Ll,HTMLMaskElement:Jt,InputMask:Hl,MaskElement:Ha,Masked:De,MaskedDate:at,MaskedDynamic:Qt,MaskedEnum:ea,MaskedFunction:Fl,MaskedNumber:Ie,MaskedPattern:Ne,MaskedRange:Xt,MaskedRegExp:$l,PIPE_TYPE:Fa,PatternFixedDefinition:j1,PatternInputDefinition:Yt,RepeatBlock:Il,createMask:et,createPipe:A1,default:ye,forceDirection:Al,normalizeOpts:_t,pipe:Pl},Symbol.toStringTag,{value:"Module"})),eI=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));Ee.EditorRootPage=t_,Ee.ROUTES_NAMES=qr,Ee.Urls=Er,Ee.VsBar=r1,Ee.VsDashboard=Gz,Ee.VsDonut=Sr,Ee.VsLine=Ar,Ee.VsListBar=Lr,Ee.VsPie=jr,Ee.VsPivotTable=Hr,Ee.VsProgressBar=Nr,Ee.VsStat=Dr,Ee.VsWidget=Ht,Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"})});