@topvisor/ui 1.0.13 → 1.0.14

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.
Files changed (173) hide show
  1. package/.chunks/{datepicker-DX0qKxI_.amd.js → datepicker-DW_EVh8-.amd.js} +2 -2
  2. package/.chunks/datepicker-DW_EVh8-.amd.js.map +1 -0
  3. package/.chunks/{datepicker-DOmAO7Nq.es.js → datepicker-Ri3BN3-Y.es.js} +2 -2
  4. package/.chunks/datepicker-Ri3BN3-Y.es.js.map +1 -0
  5. package/.chunks/{forms-FHMqYVvM.es.js → forms-CHyoeELv.es.js} +126 -126
  6. package/.chunks/forms-CHyoeELv.es.js.map +1 -0
  7. package/.chunks/{forms-Dg1N8Jv3.amd.js → forms-CORLOoYZ.amd.js} +3 -3
  8. package/.chunks/forms-CORLOoYZ.amd.js.map +1 -0
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-tzOQcPs_.amd.js → listItem.vue_vue_type_script_setup_true_lang-BZar2z_p.amd.js} +2 -2
  10. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-BZar2z_p.amd.js.map +1 -0
  11. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CuWOLCGe.es.js → listItem.vue_vue_type_script_setup_true_lang-Dvz76-gx.es.js} +2 -2
  12. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Dvz76-gx.es.js.map +1 -0
  13. package/.chunks/{menu.vue_vue_type_style_index_0_lang-C_ND48ou.amd.js → menu.vue_vue_type_style_index_0_lang-Chd1ygyG.amd.js} +2 -2
  14. package/.chunks/menu.vue_vue_type_style_index_0_lang-Chd1ygyG.amd.js.map +1 -0
  15. package/.chunks/{menu.vue_vue_type_style_index_0_lang-BGdS1bYl.es.js → menu.vue_vue_type_style_index_0_lang-Rex3a5_T.es.js} +2 -2
  16. package/.chunks/menu.vue_vue_type_style_index_0_lang-Rex3a5_T.es.js.map +1 -0
  17. package/.chunks/notice-Bh-LvHpR.es.js +175 -0
  18. package/.chunks/notice-Bh-LvHpR.es.js.map +1 -0
  19. package/.chunks/notice-BnvlWLlj.amd.js +4 -0
  20. package/.chunks/notice-BnvlWLlj.amd.js.map +1 -0
  21. package/.chunks/{popup-CBNL-Ixi.es.js → popup-0nFCdjiM.es.js} +4 -4
  22. package/.chunks/popup-0nFCdjiM.es.js.map +1 -0
  23. package/.chunks/{popup-CSNWKE4F.amd.js → popup-B285SUGc.amd.js} +2 -2
  24. package/.chunks/popup-B285SUGc.amd.js.map +1 -0
  25. package/.chunks/store-CX_6ZXhO.es.js.map +1 -1
  26. package/.chunks/store-esTid5oI.amd.js.map +1 -1
  27. package/.chunks/{utils-B6497Bik.es.js → utils-B3neE-vU.es.js} +52 -44
  28. package/.chunks/utils-B3neE-vU.es.js.map +1 -0
  29. package/.chunks/{utils-DINqzHO_.amd.js → utils-COOeS9rk.amd.js} +2 -2
  30. package/.chunks/utils-COOeS9rk.amd.js.map +1 -0
  31. package/.chunks/utils-k0wIxxij.amd.js +2 -0
  32. package/.chunks/utils-k0wIxxij.amd.js.map +1 -0
  33. package/.chunks/{utils-BgirCapu.es.js → utils-tB3V9IWe.es.js} +59 -54
  34. package/.chunks/utils-tB3V9IWe.es.js.map +1 -0
  35. package/README.md +82 -87
  36. package/assets/core.css +1 -1
  37. package/assets/forms.css +1 -1
  38. package/assets/layout.css +1 -0
  39. package/charts/charts.amd.js +1 -1
  40. package/charts/charts.amd.js.map +1 -1
  41. package/charts/charts.js +47 -42
  42. package/charts/charts.js.map +1 -1
  43. package/components/charts/miniChart/miniChart.d.ts +5 -0
  44. package/components/core/notice/item/item.vue.d.ts +3 -1
  45. package/components/core/notice/item/types.d.ts +4 -0
  46. package/components/core/notice/utils.d.ts +1 -0
  47. package/components/dialog/dialog/composables/{asyncDialogWorker.d.ts → asyncDialogHandle.d.ts} +1 -1
  48. package/components/dialog/dialog/composables/utils.d.ts +2 -2
  49. package/components/dialog/dialog/dialogs/dialogs.vue.d.ts +1 -1
  50. package/components/dialog/lib/types.d.ts +6 -1
  51. package/components/dialog/lib/worker.d.ts +5 -0
  52. package/components/layout/islandRows/islandRows.vue.d.ts +16 -0
  53. package/components/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +17 -0
  54. package/components/layout/islandRows/islandRowsRow/types.d.ts +2 -0
  55. package/components/layout/islandRows/types.d.ts +10 -0
  56. package/components/layout/layout.d.ts +7 -0
  57. package/components/layout/rows/rows.vue.d.ts +20 -0
  58. package/components/layout/rows/types.d.ts +6 -0
  59. package/components/project/project.d.ts +1 -0
  60. package/core/app.amd.js +1 -1
  61. package/core/app.amd.js.map +1 -1
  62. package/core/app.js +14 -15
  63. package/core/app.js.map +1 -1
  64. package/core/core/options.d.ts +2 -2
  65. package/core/utils/check.d.ts +1 -1
  66. package/dialog/dialog.amd.js +1 -1
  67. package/dialog/dialog.amd.js.map +1 -1
  68. package/dialog/dialog.js +2 -2
  69. package/dialog/dialog.js.map +1 -1
  70. package/forms/forms.amd.js +1 -1
  71. package/forms/forms.js +1 -1
  72. package/forms/helpers.amd.js.map +1 -1
  73. package/forms/helpers.js.map +1 -1
  74. package/formsExt/formsExt.amd.js +1 -1
  75. package/formsExt/formsExt.amd.js.map +1 -1
  76. package/formsExt/formsExt.js +54 -54
  77. package/formsExt/formsExt.js.map +1 -1
  78. package/icomoon/Read Me.txt +7 -7
  79. package/icomoon/Topvisor icons.json +6073 -5845
  80. package/icomoon/demo-files/demo.css +158 -161
  81. package/icomoon/demo-files/demo.js +30 -30
  82. package/icomoon/demo.html +3446 -3379
  83. package/icomoon/fonts/Topvisor-2.eot +0 -0
  84. package/icomoon/fonts/Topvisor-2.svg +268 -263
  85. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  86. package/icomoon/fonts/Topvisor-2.woff +0 -0
  87. package/icomoon/selection.json +1 -1
  88. package/icomoon/style.css +756 -740
  89. package/jquery-ui.min.css +5 -5
  90. package/layout/layout.amd.js +2 -0
  91. package/layout/layout.amd.js.map +1 -0
  92. package/layout/layout.d.ts +2 -0
  93. package/layout/layout.js +54 -0
  94. package/layout/layout.js.map +1 -0
  95. package/package.json +33 -33
  96. package/popup/popup.amd.js +1 -1
  97. package/popup/popup.amd.js.map +1 -1
  98. package/popup/popup.js +2 -2
  99. package/popup/popup.js.map +1 -1
  100. package/popup/worker.amd.js +1 -1
  101. package/popup/worker.amd.js.map +1 -1
  102. package/popup/worker.js +2 -2
  103. package/popup/worker.js.map +1 -1
  104. package/project/project.amd.js +1 -1
  105. package/project/project.amd.js.map +1 -1
  106. package/project/project.js +482 -469
  107. package/project/project.js.map +1 -1
  108. package/require/css.amd.js +12 -12
  109. package/tabs/tabs.amd.js.map +1 -1
  110. package/tabs/tabs.js.map +1 -1
  111. package/tabsView/tabsView.amd.js +1 -1
  112. package/tabsView/tabsView.amd.js.map +1 -1
  113. package/tabsView/tabsView.js +16 -16
  114. package/tabsView/tabsView.js.map +1 -1
  115. package/utils/check.amd.js +1 -1
  116. package/utils/check.amd.js.map +1 -1
  117. package/utils/check.js +12 -12
  118. package/utils/check.js.map +1 -1
  119. package/utils/clipboard.amd.js.map +1 -1
  120. package/utils/clipboard.js.map +1 -1
  121. package/utils/date.amd.js +1 -1
  122. package/utils/date.js +1 -1
  123. package/utils/device.amd.js +1 -1
  124. package/utils/device.js +1 -1
  125. package/utils/dom.amd.js.map +1 -1
  126. package/utils/dom.js.map +1 -1
  127. package/utils/image.amd.js.map +1 -1
  128. package/utils/image.js.map +1 -1
  129. package/utils/keyboard.amd.js.map +1 -1
  130. package/utils/keyboard.js.map +1 -1
  131. package/utils/lodash.amd.js +1 -1
  132. package/utils/lodash.js +5 -5
  133. package/utils/number.amd.js.map +1 -1
  134. package/utils/number.js.map +1 -1
  135. package/utils/price.amd.js +1 -1
  136. package/utils/price.amd.js.map +1 -1
  137. package/utils/price.js +1 -1
  138. package/utils/price.js.map +1 -1
  139. package/utils/route.amd.js.map +1 -1
  140. package/utils/route.js.map +1 -1
  141. package/utils/scroll.amd.js.map +1 -1
  142. package/utils/scroll.js.map +1 -1
  143. package/utils/searchers.amd.js.map +1 -1
  144. package/utils/searchers.js.map +1 -1
  145. package/utils/string.amd.js +1 -1
  146. package/utils/string.amd.js.map +1 -1
  147. package/utils/string.js +1 -1
  148. package/utils/string.js.map +1 -1
  149. package/utils/system.amd.js.map +1 -1
  150. package/utils/system.js.map +1 -1
  151. package/utils/url.amd.js.map +1 -1
  152. package/utils/url.js.map +1 -1
  153. package/web-types.json +89 -89
  154. package/.chunks/datepicker-DOmAO7Nq.es.js.map +0 -1
  155. package/.chunks/datepicker-DX0qKxI_.amd.js.map +0 -1
  156. package/.chunks/forms-Dg1N8Jv3.amd.js.map +0 -1
  157. package/.chunks/forms-FHMqYVvM.es.js.map +0 -1
  158. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-CuWOLCGe.es.js.map +0 -1
  159. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-tzOQcPs_.amd.js.map +0 -1
  160. package/.chunks/menu.vue_vue_type_style_index_0_lang-BGdS1bYl.es.js.map +0 -1
  161. package/.chunks/menu.vue_vue_type_style_index_0_lang-C_ND48ou.amd.js.map +0 -1
  162. package/.chunks/notice-BixWe-8g.amd.js +0 -4
  163. package/.chunks/notice-BixWe-8g.amd.js.map +0 -1
  164. package/.chunks/notice-D07Kq3fU.es.js +0 -172
  165. package/.chunks/notice-D07Kq3fU.es.js.map +0 -1
  166. package/.chunks/popup-CBNL-Ixi.es.js.map +0 -1
  167. package/.chunks/popup-CSNWKE4F.amd.js.map +0 -1
  168. package/.chunks/utils-B6497Bik.es.js.map +0 -1
  169. package/.chunks/utils-BgirCapu.es.js.map +0 -1
  170. package/.chunks/utils-Bxmh9YxC.amd.js +0 -2
  171. package/.chunks/utils-Bxmh9YxC.amd.js.map +0 -1
  172. package/.chunks/utils-DINqzHO_.amd.js.map +0 -1
  173. /package/components/dialog/dialog/composables/{dialogWorker.d.ts → dialogHandle.d.ts} +0 -0
@@ -1,14 +1,14 @@
1
- import { Core as ke } from "../core/app.js";
2
- import { defineComponent as P, mergeModels as O, useModel as q, computed as A, openBlock as I, createElementBlock as w, unref as y, createBlock as b, withCtx as B, createVNode as L, createTextVNode as z, toDisplayString as E, Fragment as Y, renderList as ie, normalizeClass as Q, createElementVNode as ve, ref as D, watch as K, createCommentVNode as F, withModifiers as j, withKeys as de, nextTick as Te, resolveDirective as _e, withDirectives as Be, resolveDynamicComponent as be, mergeProps as Ve, renderSlot as we, reactive as Me, shallowRef as Ee, createSlots as Ke, isRef as ue } from "vue";
3
- import { c as R, C as J, _ as W, y as re, r as $e } from "../.chunks/forms-FHMqYVvM.es.js";
4
- import { _ as ye, b as se, a as Le } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-CuWOLCGe.es.js";
5
- import { _ as Ae } from "../.chunks/menu.vue_vue_type_style_index_0_lang-BGdS1bYl.es.js";
6
- import { getSearcherGIcon as Oe, getLangLabel as Re, getDeviceGIcon as Ne } from "../utils/searchers.js";
1
+ import { Core as Ce } from "../core/app.js";
2
+ import { defineComponent as P, mergeModels as O, useModel as D, computed as M, openBlock as x, createElementBlock as w, unref as h, createBlock as B, withCtx as b, createVNode as A, createTextVNode as z, toDisplayString as K, Fragment as Y, renderList as ie, normalizeClass as Q, createElementVNode as ve, ref as F, watch as L, createCommentVNode as q, withModifiers as j, mergeProps as ye, withKeys as de, nextTick as _e, resolveDirective as be, withDirectives as Be, resolveDynamicComponent as Ve, renderSlot as we, reactive as Me, shallowRef as $e, createSlots as Ee, toValue as Ke, isRef as ue } from "vue";
3
+ import { c as R, C as J, _ as W, y as re, s as Le } from "../.chunks/forms-CHyoeELv.es.js";
4
+ import { _ as pe, b as se, a as Ae } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Dvz76-gx.es.js";
5
+ import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-Rex3a5_T.es.js";
6
+ import { getSearcherGIcon as Re, getLangLabel as Ne, getDeviceGIcon as De } from "../utils/searchers.js";
7
7
  import { storage as G } from "../utils/dom.js";
8
- import { TopPopupWorker as qe } from "../popup/worker.js";
9
- const Ce = ["../assets/project.css"].map((e) => import.meta.resolve(e));
10
- ke.insertCSSLinkToPage(Ce, !0);
11
- const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }, Pe = /* @__PURE__ */ P({
8
+ import { TopPopupWorker as Fe } from "../popup/worker.js";
9
+ const Te = ["../assets/project.css"].map((e) => import.meta.resolve(e));
10
+ Ce.insertCSSLinkToPage(Te, !0);
11
+ const qe = { class: "top-selectorCompetitors" }, Pe = { class: "top-ellipsis1" }, Ue = /* @__PURE__ */ P({
12
12
  __name: "selectorCompetitors",
13
13
  props: /* @__PURE__ */ O({
14
14
  modelValue: {},
@@ -20,8 +20,8 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
20
20
  }),
21
21
  emits: ["update:modelValue"],
22
22
  setup(e) {
23
- const l = e, i = q(e, "modelValue"), t = A(() => {
24
- if (l.showSelectAllItem)
23
+ const a = e, i = D(e, "modelValue"), t = M(() => {
24
+ if (a.showSelectAllItem)
25
25
  return {
26
26
  icon: "",
27
27
  title: R().Common.Select_all,
@@ -29,51 +29,51 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
29
29
  content: ""
30
30
  };
31
31
  });
32
- return (r, o) => (I(), w("div", De, [
33
- y(J).state.isMobile ? (I(), b(ye, { key: 0 }, {
34
- opener: B(() => [
35
- L(W, {
32
+ return (o, l) => (x(), w("div", qe, [
33
+ h(J).state.isMobile ? (x(), B(pe, { key: 0 }, {
34
+ opener: b(() => [
35
+ A(W, {
36
36
  class: "top-selectorCompetitors_opener",
37
37
  color: "theme",
38
38
  icon: "",
39
39
  icon2: ""
40
40
  }, {
41
- default: B(() => {
41
+ default: b(() => {
42
42
  var n;
43
43
  return [
44
- z(E((n = r.items.find((u) => {
45
- var m;
46
- return u.value === ((m = i.value) == null ? void 0 : m[0]);
44
+ z(K((n = o.items.find((d) => {
45
+ var g;
46
+ return d.value === ((g = i.value) == null ? void 0 : g[0]);
47
47
  })) == null ? void 0 : n.content), 1)
48
48
  ];
49
49
  }),
50
50
  _: 1
51
51
  })
52
52
  ]),
53
- contentList: B(() => [
54
- (I(!0), w(Y, null, ie(r.items, (n, u) => {
55
- var m;
56
- return I(), b(se, {
53
+ contentList: b(() => [
54
+ (x(!0), w(Y, null, ie(o.items, (n, d) => {
55
+ var g;
56
+ return x(), B(se, {
57
57
  class: Q({
58
- "top-active": (m = i.value) == null ? void 0 : m.includes(n.value)
58
+ "top-active": (g = i.value) == null ? void 0 : g.includes(n.value)
59
59
  }),
60
60
  "data-top-icon": n.icon,
61
61
  title: n.title,
62
62
  onClick: () => i.value = [n.value]
63
63
  }, {
64
- default: B(() => [
65
- ve("span", Fe, E(n.content), 1)
64
+ default: b(() => [
65
+ ve("span", Pe, K(n.content), 1)
66
66
  ]),
67
67
  _: 2
68
68
  }, 1032, ["class", "data-top-icon", "title", "onClick"]);
69
69
  }), 256))
70
70
  ]),
71
71
  _: 1
72
- })) : (I(), b(Ae, {
72
+ })) : (x(), B(Oe, {
73
73
  key: 1,
74
74
  modelValue: i.value,
75
- "onUpdate:modelValue": o[0] || (o[0] = (n) => i.value = n),
76
- items: r.items,
75
+ "onUpdate:modelValue": l[0] || (l[0] = (n) => i.value = n),
76
+ items: o.items,
77
77
  isMultiple: !0,
78
78
  styling: "bar",
79
79
  canBeEmptyMultiple: !1,
@@ -81,7 +81,7 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
81
81
  }, null, 8, ["modelValue", "items", "selectAllItem"]))
82
82
  ]));
83
83
  }
84
- }), S = -2, Ue = {
84
+ }), I = -2, je = {
85
85
  0: "Yandex",
86
86
  1: "Google",
87
87
  2: "go.Mail",
@@ -94,23 +94,23 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
94
94
  20: "Yandex.com",
95
95
  21: "Yandex.com.tr"
96
96
  }, ee = {
97
- key: S,
97
+ key: I,
98
98
  name: "--",
99
- index: S
100
- }, pe = {
101
- key: S,
99
+ index: I
100
+ }, he = {
101
+ key: I,
102
102
  name: "--",
103
103
  regions: [ee],
104
- regionByIndex: /* @__PURE__ */ new Map([[S, ee]])
104
+ regionByIndex: /* @__PURE__ */ new Map([[I, ee]])
105
105
  }, te = {
106
- key: S,
106
+ key: I,
107
107
  name: "Autoselect",
108
- index: S
108
+ index: I
109
109
  }, ne = {
110
- key: S,
110
+ key: I,
111
111
  name: "Autoselect",
112
112
  regions: [te],
113
- regionByIndex: /* @__PURE__ */ new Map([[S, te]])
113
+ regionByIndex: /* @__PURE__ */ new Map([[I, te]])
114
114
  }, ce = {
115
115
  countryCode: "00",
116
116
  depth: 1,
@@ -119,137 +119,137 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
119
119
  index: -1,
120
120
  lang: "ru",
121
121
  name: "Without region"
122
- }, je = () => (te.name = R().Common.Autoselect, te), Je = () => (je(), ne.name = R().Common.Autoselect, console.log(ne), ne), ze = () => (ce.name = R().Keywords.Without_region, ce), he = (e = !1, l = !1, i = []) => {
122
+ }, Je = () => (te.name = R().Common.Autoselect, te), ze = () => (Je(), ne.name = R().Common.Autoselect, console.log(ne), ne), Ge = () => (ce.name = R().Keywords.Without_region, ce), Se = (e = !1, a = !1, i = []) => {
123
123
  let t;
124
- return e ? t = Ge(i) : t = Se(i), l && t.set(S, Je()), t.size || t.set(S, pe), t;
125
- }, Se = (e, l = !0, i = [], t = !1) => {
126
- const r = /* @__PURE__ */ new Map();
127
- return e.forEach((o) => {
128
- if (!o.enabled || t && typeof o.key == "number" && o.key > 1) return;
129
- const n = { ...o };
130
- n.regionByIndex = /* @__PURE__ */ new Map(), o.regions && o.regions.forEach((u) => {
131
- if (l && !u.enabled) return;
132
- const m = { ...u };
133
- n.regionByIndex && n.regionByIndex.set(m.index, m);
134
- }), !n.regionByIndex.size && !i.length && n.regionByIndex.set(ee.index, ee), typeof n.key == "number" && r.set(n.key, n);
135
- }), i.forEach((o) => {
136
- if (r.has(o)) return;
124
+ return e ? t = Ye(i) : t = Ie(i), a && t.set(I, ze()), t.size || t.set(I, he), t;
125
+ }, Ie = (e, a = !0, i = [], t = !1) => {
126
+ const o = /* @__PURE__ */ new Map();
127
+ return e.forEach((l) => {
128
+ if (!l.enabled || t && typeof l.key == "number" && l.key > 1) return;
129
+ const n = { ...l };
130
+ n.regionByIndex = /* @__PURE__ */ new Map(), l.regions && l.regions.forEach((d) => {
131
+ if (a && !d.enabled) return;
132
+ const g = { ...d };
133
+ n.regionByIndex && n.regionByIndex.set(g.index, g);
134
+ }), !n.regionByIndex.size && !i.length && n.regionByIndex.set(ee.index, ee), typeof n.key == "number" && o.set(n.key, n);
135
+ }), i.forEach((l) => {
136
+ if (o.has(l)) return;
137
137
  const n = {
138
- key: o,
139
- name: Ue[o],
138
+ key: l,
139
+ name: je[l],
140
140
  regions: [],
141
141
  regionByIndex: /* @__PURE__ */ new Map()
142
142
  };
143
- r.set(n.key, n);
144
- }), r;
145
- }, Ge = (e) => {
146
- const l = Se(e, !1, [0, 1], !0);
147
- if (l.has(2)) {
148
- const i = l.get(2);
143
+ o.set(n.key, n);
144
+ }), o;
145
+ }, Ye = (e) => {
146
+ const a = Ie(e, !1, [0, 1], !0);
147
+ if (a.has(2)) {
148
+ const i = a.get(2);
149
149
  i && (i.regionByIndex = /* @__PURE__ */ new Map());
150
150
  }
151
- return l.forEach((i) => {
151
+ return a.forEach((i) => {
152
152
  if (!i.regionByIndex) return;
153
- const t = { ...ze() };
153
+ const t = { ...Ge() };
154
154
  i.regionByIndex.set(t.index, t);
155
- }), l;
156
- }, Ye = (e, l, i = []) => {
157
- const t = he(e, !1, i);
158
- let r;
159
- return t.forEach((o) => {
160
- if (!(l.searcher_key !== void 0 && l.searcher_key != o.key) && o.regions && (o.regions.forEach((n) => {
161
- if (!r && !(l.key !== void 0 && l.key != n.key) && !(l.index !== void 0 && l.index != n.index) && !(!e && (l.lang !== void 0 && l.lang != n.lang || l.device !== void 0 && l.device != n.device)))
162
- return n.searcher_key = o.key, r = n, !1;
163
- }), r))
155
+ }), a;
156
+ }, We = (e, a, i = []) => {
157
+ const t = Se(e, !1, i);
158
+ let o;
159
+ return t.forEach((l) => {
160
+ if (!(a.searcher_key !== void 0 && a.searcher_key != l.key) && l.regions && (l.regions.forEach((n) => {
161
+ if (!o && !(a.key !== void 0 && a.key != n.key) && !(a.index !== void 0 && a.index != n.index) && !(!e && (a.lang !== void 0 && a.lang != n.lang || a.device !== void 0 && a.device != n.device)))
162
+ return n.searcher_key = l.key, o = n, !1;
163
+ }), o))
164
164
  return !1;
165
- }), r;
166
- }, We = (e, l) => {
167
- const i = R(), t = D(l.value.keys().next().value ?? S), r = A(() => {
168
- const o = /* @__PURE__ */ new Map();
169
- if (l.value.forEach((n) => {
170
- let u = {
165
+ }), o;
166
+ }, He = (e, a) => {
167
+ const i = R(), t = F(a.value.keys().next().value ?? I), o = M(() => {
168
+ const l = /* @__PURE__ */ new Map();
169
+ if (a.value.forEach((n) => {
170
+ let d = {
171
171
  value: n.key,
172
172
  title: n.name
173
173
  };
174
- e.addSearcherIcon && (u.icon = Oe(n.key)), o.set(n.key, u);
175
- }), e.addCompare && !o.has(S)) {
174
+ e.addSearcherIcon && (d.icon = Re(n.key)), l.set(n.key, d);
175
+ }), e.addCompare && !l.has(I)) {
176
176
  const n = {
177
177
  value: "",
178
178
  title: "--------------------",
179
179
  disabled: !0
180
180
  };
181
- o.set(n.value, n);
182
- const u = {
181
+ l.set(n.value, n);
182
+ const d = {
183
183
  value: -1,
184
184
  title: i.Common.Compare
185
185
  };
186
- o.set(u.value, u);
186
+ l.set(d.value, d);
187
187
  }
188
- return o;
188
+ return l;
189
189
  });
190
190
  return {
191
191
  searcherKey: t,
192
- optionBySearcherKey: r
192
+ optionBySearcherKey: o
193
193
  };
194
- }, He = (e, l) => {
195
- var o, n, u;
196
- const i = R(), t = D(S);
197
- e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value === S && (e.forFrequency ? t.value = ((n = (o = l.value) == null ? void 0 : o.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? S : t.value = ((u = l.value) == null ? void 0 : u.regionByIndex.keys().next().value) ?? S);
198
- const r = A(() => {
199
- var g;
200
- const m = /* @__PURE__ */ new Map();
201
- return (g = l.value.regionByIndex) == null || g.forEach((f) => {
202
- let a = f.name;
194
+ }, Qe = (e, a) => {
195
+ var l, n, d;
196
+ const i = R(), t = F(I);
197
+ e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value === I && (e.forFrequency ? t.value = ((n = (l = a.value) == null ? void 0 : l.regionByIndex.values().next().value) == null ? void 0 : n.key) ?? I : t.value = ((d = a.value) == null ? void 0 : d.regionByIndex.keys().next().value) ?? I);
198
+ const o = M(() => {
199
+ var f;
200
+ const g = /* @__PURE__ */ new Map();
201
+ return (f = a.value.regionByIndex) == null || f.forEach((v) => {
202
+ let r = v.name;
203
203
  if (e.forFrequency) {
204
204
  const C = {
205
- value: f.key,
206
- title: a
205
+ value: v.key,
206
+ title: r
207
207
  };
208
- m.has(f.key) || m.set(f.key, C);
208
+ g.has(v.key) || g.set(v.key, C);
209
209
  return;
210
210
  }
211
- f.device && (a += " (" + i.Common["Device_" + f.device] + ")");
212
- const p = Re(l.value.key || 0, f.lang ?? "");
213
- p && (a += " / " + p);
214
- const x = {
215
- value: f.index,
216
- title: a,
217
- icon: f.device ? Ne(f.device) : void 0
211
+ v.device && (r += " (" + i.Common["Device_" + v.device] + ")");
212
+ const m = Ne(a.value.key || 0, v.lang ?? "");
213
+ m && (r += " / " + m);
214
+ const y = {
215
+ value: v.index,
216
+ title: r,
217
+ icon: v.device ? De(v.device) : void 0
218
218
  };
219
- m.set(f.index, x);
220
- }), m;
219
+ g.set(v.index, y);
220
+ }), g;
221
221
  });
222
- return K(r, (m, g) => {
223
- var x;
224
- if (e.onlySearcher || t.value !== void 0 && m.get(t.value))
222
+ return L(o, (g, f) => {
223
+ var y;
224
+ if (e.onlySearcher || t.value !== void 0 && g.get(t.value))
225
225
  return;
226
- let f = m.keys().next().value;
227
- if (t.value === S || f === S) {
228
- t.value = f;
226
+ let v = g.keys().next().value;
227
+ if (t.value === I || v === I) {
228
+ t.value = v;
229
229
  return;
230
230
  }
231
- let a = ((x = g == null ? void 0 : g.get(t.value)) == null ? void 0 : x.title) || "", p = -1;
232
- for (const [C, k] of m.entries()) {
233
- const h = k.title;
234
- if (typeof h != "string" || typeof C == "string")
231
+ let r = ((y = f == null ? void 0 : f.get(t.value)) == null ? void 0 : y.title) || "", m = -1;
232
+ for (const [C, k] of g.entries()) {
233
+ const S = k.title;
234
+ if (typeof S != "string" || typeof C == "string")
235
235
  break;
236
- if (h === a) {
237
- f = C;
236
+ if (S === r) {
237
+ v = C;
238
238
  break;
239
239
  }
240
240
  const _ = new RegExp(` \\((${i.Common.Device_1}|${i.Common.Device_2})\\)`);
241
- let T = a, d = 3;
242
- h.indexOf(T) === -1 && (T = a.replace(/^[^a-zа-я]/i, "").replace(_, ""), d--), h.indexOf(T) === -1 && (T = a.replace(/ \/.*/, ""), d--), h.indexOf(T) === -1 && (T = a.replace(/ \/.*/, ""), T = T.replace(/^[^a-zа-я]/i, "").replace(_, ""), d--), h.indexOf(T) !== -1 && (d <= p || (p = d, f = C));
241
+ let T = r, u = 3;
242
+ S.indexOf(T) === -1 && (T = r.replace(/^[^a-zа-я]/i, "").replace(_, ""), u--), S.indexOf(T) === -1 && (T = r.replace(/ \/.*/, ""), u--), S.indexOf(T) === -1 && (T = r.replace(/ \/.*/, ""), T = T.replace(/^[^a-zа-я]/i, "").replace(_, ""), u--), S.indexOf(T) !== -1 && (u <= m || (m = u, v = C));
243
243
  }
244
- t.value = f;
244
+ t.value = v;
245
245
  }), {
246
246
  regionIndex: t,
247
- optionByRegionIndex: r
247
+ optionByRegionIndex: o
248
248
  };
249
- }, Qe = (e, l, i) => {
250
- const t = D([]), r = () => {
251
- if (e.onlySearcher && l.value) {
252
- t.value = Array.from(l.value.keys());
249
+ }, Xe = (e, a, i) => {
250
+ const t = F([]), o = () => {
251
+ if (e.onlySearcher && a.value) {
252
+ t.value = Array.from(a.value.keys());
253
253
  return;
254
254
  }
255
255
  let n = [];
@@ -262,74 +262,74 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
262
262
  ) ?? [];
263
263
  } catch {
264
264
  }
265
- n.length && (n = n.filter((u) => i.value.has(u))), n.length || (n = Array.from(i.value)), t.value = [...n];
266
- }, o = () => {
265
+ n.length && (n = n.filter((d) => i.value.has(d))), n.length || (n = Array.from(i.value)), t.value = [...n];
266
+ }, l = () => {
267
267
  t.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(t.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
268
268
  };
269
- return K(t, () => {
270
- o();
271
- }), e.addCompare && r(), {
269
+ return L(t, () => {
270
+ l();
271
+ }), e.addCompare && o(), {
272
272
  regionsIndexes: t
273
273
  };
274
- }, Xe = (e) => {
275
- const l = A(() => he(e.forFrequency, e.autoRegion, e.searchers)), i = A(() => l.value.get(r.searcherKey.value) || pe), t = A(() => {
276
- const a = /* @__PURE__ */ new Set();
277
- return l.value.forEach((p) => {
278
- var x;
279
- (x = p.regions) == null || x.forEach((C) => {
280
- C.index !== -1 && C.index !== S && a.add(C.index);
274
+ }, Ze = (e) => {
275
+ const a = M(() => Se(e.forFrequency, e.autoRegion, e.searchers)), i = M(() => a.value.get(o.searcherKey.value) || he), t = M(() => {
276
+ const r = /* @__PURE__ */ new Set();
277
+ return a.value.forEach((m) => {
278
+ var y;
279
+ (y = m.regions) == null || y.forEach((C) => {
280
+ C.index !== -1 && C.index !== I && r.add(C.index);
281
281
  });
282
- }), a;
283
- }), r = We(e, l), o = He(e, i), n = Qe(e, l, t);
284
- K(l, () => {
285
- var p, x, C, k;
286
- if (e.onlySearcher ? n.regionsIndexes.value = Array.from(l.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((h) => t.value.has(h)), r.searcherKey.value === -1) return;
287
- let a = l.value.keys().next().value;
288
- l.value.forEach((h) => {
289
- var _, T, d;
290
- if (e.onlySearcher && h.key === r.searcherKey.value) {
291
- a = r.searcherKey.value;
282
+ }), r;
283
+ }), o = He(e, a), l = Qe(e, i), n = Xe(e, a, t);
284
+ L(a, () => {
285
+ var m, y, C, k;
286
+ if (e.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((S) => t.value.has(S)), o.searcherKey.value === -1) return;
287
+ let r = a.value.keys().next().value;
288
+ a.value.forEach((S) => {
289
+ var _, T, u;
290
+ if (e.onlySearcher && S.key === o.searcherKey.value) {
291
+ r = o.searcherKey.value;
292
292
  return;
293
293
  }
294
- if (o.regionIndex.value && ((_ = h.regionByIndex) != null && _.has(o.regionIndex.value)) && (a = h.key), !e.onlySearcher) {
294
+ if (l.regionIndex.value && ((_ = S.regionByIndex) != null && _.has(l.regionIndex.value)) && (r = S.key), !e.onlySearcher) {
295
295
  let s;
296
- a !== void 0 && (s = (T = l.value.get(a)) == null ? void 0 : T.regionByIndex);
297
- const c = (d = l.value.get(h.key)) == null ? void 0 : d.regionByIndex;
298
- s != null && s.has(S) && !(c != null && c.has(S)) && (a = h.key);
296
+ r !== void 0 && (s = (T = a.value.get(r)) == null ? void 0 : T.regionByIndex);
297
+ const c = (u = a.value.get(S.key)) == null ? void 0 : u.regionByIndex;
298
+ s != null && s.has(I) && !(c != null && c.has(I)) && (r = S.key);
299
299
  }
300
- }), a !== void 0 && (r.searcherKey.value = a), o.regionIndex.value !== void 0 && !((x = (p = i.value) == null ? void 0 : p.regionByIndex) != null && x.has(o.regionIndex.value)) && (o.regionIndex.value = (k = (C = i.value) == null ? void 0 : C.regions) == null ? void 0 : k.keys().next().value);
300
+ }), r !== void 0 && (o.searcherKey.value = r), l.regionIndex.value !== void 0 && !((y = (m = i.value) == null ? void 0 : m.regionByIndex) != null && y.has(l.regionIndex.value)) && (l.regionIndex.value = (k = (C = i.value) == null ? void 0 : C.regions) == null ? void 0 : k.keys().next().value);
301
301
  }, { immediate: !0 });
302
- const u = () => {
303
- if (!(r.searcherKey.value === -1 || r.searcherKey.value === S))
304
- return r.searcherKey.value;
305
- }, m = () => {
306
- if (e.onlySearcher || o.regionIndex.value === S) return;
307
- let a = o.regionIndex.value;
302
+ const d = () => {
303
+ if (!(o.searcherKey.value === -1 || o.searcherKey.value === I))
304
+ return o.searcherKey.value;
305
+ }, g = () => {
306
+ if (e.onlySearcher || l.regionIndex.value === I) return;
307
+ let r = l.regionIndex.value;
308
308
  if (e.forFrequency) {
309
- const p = o.regionIndex.value, x = Ye(e.forFrequency, { searcher_key: u(), key: p }, e.searchers);
310
- a = x == null ? void 0 : x.index;
309
+ const m = l.regionIndex.value, y = We(e.forFrequency, { searcher_key: d(), key: m }, e.searchers);
310
+ r = y == null ? void 0 : y.index;
311
311
  }
312
- return a;
313
- }, g = () => {
314
- const a = u();
315
- if (a !== void 0)
316
- return l.value.get(a);
312
+ return r;
313
+ }, f = () => {
314
+ const r = d();
315
+ if (r !== void 0)
316
+ return a.value.get(r);
317
317
  };
318
318
  return {
319
- selectSearcher: r,
320
- selectRegion: o,
319
+ selectSearcher: o,
320
+ selectRegion: l,
321
321
  compare: n,
322
- searcherByKey: l,
322
+ searcherByKey: a,
323
323
  allRegionsIndexes: t,
324
- getSearcher: g,
324
+ getSearcher: f,
325
325
  getRegion: () => {
326
- var p, x;
327
- const a = m();
328
- if (a !== void 0)
329
- return (x = (p = g()) == null ? void 0 : p.regionByIndex) == null ? void 0 : x.get(a);
326
+ var m, y;
327
+ const r = g();
328
+ if (r !== void 0)
329
+ return (y = (m = f()) == null ? void 0 : m.regionByIndex) == null ? void 0 : y.get(r);
330
330
  }
331
331
  };
332
- }, Ze = /* @__PURE__ */ P({
332
+ }, et = /* @__PURE__ */ P({
333
333
  __name: "selectorRegion",
334
334
  props: /* @__PURE__ */ O({
335
335
  projectId: {},
@@ -350,130 +350,130 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
350
350
  modelValueSingleModifiers: {}
351
351
  }),
352
352
  emits: /* @__PURE__ */ O(["compareRegions"], ["update:modelValue", "update:modelValueSingle"]),
353
- setup(e, { expose: l, emit: i }) {
354
- const t = e, r = q(e, "modelValue"), o = q(e, "modelValueSingle"), n = i, {
355
- selectSearcher: u,
356
- selectRegion: m,
357
- compare: g,
358
- searcherByKey: f,
359
- allRegionsIndexes: a,
360
- getSearcher: p,
361
- getRegion: x
362
- } = Xe(t), C = () => {
353
+ setup(e, { expose: a, emit: i }) {
354
+ const t = e, o = D(e, "modelValue"), l = D(e, "modelValueSingle"), n = i, {
355
+ selectSearcher: d,
356
+ selectRegion: g,
357
+ compare: f,
358
+ searcherByKey: v,
359
+ allRegionsIndexes: r,
360
+ getSearcher: m,
361
+ getRegion: y
362
+ } = Ze(t), C = () => {
363
363
  var k;
364
364
  if (window.fieldTemplates && ((k = window.fieldTemplates) != null && k.openSelectorRegions)) {
365
365
  window.fieldTemplates.openSelectorRegions(
366
- f.value,
367
- g.regionsIndexes.value,
368
- (h) => g.regionsIndexes.value = h
366
+ v.value,
367
+ f.regionsIndexes.value,
368
+ (S) => f.regionsIndexes.value = S
369
369
  );
370
370
  return;
371
371
  }
372
- n("compareRegions", f.value);
372
+ n("compareRegions", v.value);
373
373
  };
374
- return K([m.regionIndex, u.searcherKey, g.regionsIndexes], () => {
375
- if (u.searcherKey.value === -1 && g.regionsIndexes.value.length) {
376
- if (JSON.stringify(r.value) === JSON.stringify(g.regionsIndexes.value))
374
+ return L([g.regionIndex, d.searcherKey, f.regionsIndexes], () => {
375
+ if (d.searcherKey.value === -1 && f.regionsIndexes.value.length) {
376
+ if (JSON.stringify(o.value) === JSON.stringify(f.regionsIndexes.value))
377
377
  return;
378
- r.value = [...g.regionsIndexes.value];
378
+ o.value = [...f.regionsIndexes.value];
379
379
  } else
380
- r.value = [t.onlySearcher ? u.searcherKey.value : m.regionIndex.value];
381
- !t.onlySearcher && !a.value.size && (u.searcherKey.value = S);
382
- }), o.value && K(o, () => {
383
- r.value = [o.value];
384
- }, { immediate: !0 }), K(r, () => {
385
- var k, h, _, T, d;
386
- if (r.value[0] && (o.value = r.value[0]), t.onlySearcher) {
387
- if (!r.value.length || r.value.length === 1 && !f.value.has(r.value[0])) {
388
- let s = f.value.keys().next().value;
389
- s !== void 0 && (r.value = [s]);
380
+ o.value = [t.onlySearcher ? d.searcherKey.value : g.regionIndex.value];
381
+ !t.onlySearcher && !r.value.size && (d.searcherKey.value = I);
382
+ }), l.value && L(l, () => {
383
+ o.value = [l.value];
384
+ }, { immediate: !0 }), L(o, () => {
385
+ var k, S, _, T, u;
386
+ if (o.value[0] && (l.value = o.value[0]), t.onlySearcher) {
387
+ if (!o.value.length || o.value.length === 1 && !v.value.has(o.value[0])) {
388
+ let s = v.value.keys().next().value;
389
+ s !== void 0 && (o.value = [s]);
390
390
  return;
391
391
  }
392
- if (r.value.length > 1 && JSON.stringify(r.value) !== JSON.stringify(g.regionsIndexes.value)) {
393
- r.value = [...g.regionsIndexes.value];
392
+ if (o.value.length > 1 && JSON.stringify(o.value) !== JSON.stringify(f.regionsIndexes.value)) {
393
+ o.value = [...f.regionsIndexes.value];
394
394
  return;
395
395
  }
396
396
  } else {
397
- let s = [...new Set(r.value)], c = (h = (k = f.value.values().next().value) == null ? void 0 : k.regionByIndex) == null ? void 0 : h.keys().next().value;
398
- if (t.forFrequency && (c = (d = (T = (_ = f.value.values().next().value) == null ? void 0 : _.regionByIndex) == null ? void 0 : T.values().next().value) == null ? void 0 : d.key), !s.length)
397
+ let s = [...new Set(o.value)], c = (S = (k = v.value.values().next().value) == null ? void 0 : k.regionByIndex) == null ? void 0 : S.keys().next().value;
398
+ if (t.forFrequency && (c = (u = (T = (_ = v.value.values().next().value) == null ? void 0 : _.regionByIndex) == null ? void 0 : T.values().next().value) == null ? void 0 : u.key), !s.length)
399
399
  c !== void 0 && s.push(c);
400
400
  else if (s.length === 1) {
401
- let v = a.value;
402
- t.forFrequency && (v = /* @__PURE__ */ new Set(), f.value.forEach((V) => {
403
- V.regionByIndex.forEach((M) => {
404
- M.index !== -1 && M.index !== S && v.add(M.key);
401
+ let p = r.value;
402
+ t.forFrequency && (p = /* @__PURE__ */ new Set(), v.value.forEach((V) => {
403
+ V.regionByIndex.forEach((E) => {
404
+ E.index !== -1 && E.index !== I && p.add(E.key);
405
405
  });
406
- })), !v.has(s[0]) && s[0] !== -2 && (s = [], c !== void 0 && s.push(c));
406
+ })), !p.has(s[0]) && s[0] !== -2 && (s = [], c !== void 0 && s.push(c));
407
407
  } else
408
- s = s.filter((v) => a.value.has(v)), !s.length && c !== void 0 && s.push(c);
409
- if (JSON.stringify(r.value) !== JSON.stringify(s)) {
410
- r.value = s;
408
+ s = s.filter((p) => r.value.has(p)), !s.length && c !== void 0 && s.push(c);
409
+ if (JSON.stringify(o.value) !== JSON.stringify(s)) {
410
+ o.value = s;
411
411
  return;
412
412
  }
413
413
  }
414
- if (!(r.value.length === 1 && r.value[0] === (t.onlySearcher ? u.searcherKey.value : m.regionIndex.value)))
414
+ if (!(o.value.length === 1 && o.value[0] === (t.onlySearcher ? d.searcherKey.value : g.regionIndex.value)))
415
415
  if (t.onlySearcher) {
416
- if (r.value.length === 1) {
417
- u.searcherKey.value = r.value[0];
416
+ if (o.value.length === 1) {
417
+ d.searcherKey.value = o.value[0];
418
418
  return;
419
419
  }
420
- u.searcherKey.value = -1;
420
+ d.searcherKey.value = -1;
421
421
  return;
422
- } else if (r.value.length === 1 && u.searcherKey.value !== -1) {
423
- m.regionIndex.value = r.value[0];
422
+ } else if (o.value.length === 1 && d.searcherKey.value !== -1) {
423
+ g.regionIndex.value = o.value[0];
424
424
  let s;
425
- for (const c of f.value.values()) {
426
- for (const v of c.regionByIndex.values())
427
- if ((t.forFrequency ? v.key : v.index) === m.regionIndex.value) {
425
+ for (const c of v.value.values()) {
426
+ for (const p of c.regionByIndex.values())
427
+ if ((t.forFrequency ? p.key : p.index) === g.regionIndex.value) {
428
428
  s = c.key;
429
429
  break;
430
430
  }
431
431
  if (s !== void 0)
432
432
  break;
433
433
  }
434
- s !== void 0 && (u.searcherKey.value = s);
434
+ s !== void 0 && (d.searcherKey.value = s);
435
435
  } else
436
- u.searcherKey.value = -1, g.regionsIndexes.value = [...r.value];
437
- }, { immediate: !0 }), l({
438
- getSearcher: p,
439
- getRegion: x
440
- }), (k, h) => (I(), w("div", {
436
+ d.searcherKey.value = -1, f.regionsIndexes.value = [...o.value];
437
+ }, { immediate: !0 }), a({
438
+ getSearcher: m,
439
+ getRegion: y
440
+ }), (k, S) => (x(), w("div", {
441
441
  class: Q({
442
442
  "top-selectorRegion": !0,
443
443
  "top-selectorRegion-onlySearcher": k.onlySearcher
444
444
  })
445
445
  }, [
446
- L(re, {
447
- options: y(u).optionBySearcherKey.value,
448
- modelValue: y(u).searcherKey.value,
449
- "onUpdate:modelValue": h[0] || (h[0] = (_) => y(u).searcherKey.value = _),
446
+ A(re, {
447
+ options: h(d).optionBySearcherKey.value,
448
+ modelValue: h(d).searcherKey.value,
449
+ "onUpdate:modelValue": S[0] || (S[0] = (_) => h(d).searcherKey.value = _),
450
450
  name: "searcher_key",
451
451
  addChanger: k.addChanger
452
452
  }, null, 8, ["options", "modelValue", "addChanger"]),
453
- !k.onlySearcher && y(u).searcherKey.value !== -1 ? (I(), b(re, {
453
+ !k.onlySearcher && h(d).searcherKey.value !== -1 ? (x(), B(re, {
454
454
  key: 0,
455
455
  class: "top-select-region",
456
- options: y(m).optionByRegionIndex.value,
457
- modelValue: y(m).regionIndex.value,
458
- "onUpdate:modelValue": h[1] || (h[1] = (_) => y(m).regionIndex.value = _),
456
+ options: h(g).optionByRegionIndex.value,
457
+ modelValue: h(g).regionIndex.value,
458
+ "onUpdate:modelValue": S[1] || (S[1] = (_) => h(g).regionIndex.value = _),
459
459
  name: k.forFrequency ? "region_key" : "region_index",
460
460
  addChanger: k.addChanger,
461
461
  "data-top-icon": k.addRegionIcon ? "" : void 0
462
- }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : F("", !0),
463
- k.addCompare && !k.onlySearcher && y(u).searcherKey.value === -1 ? (I(), b(W, {
462
+ }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : q("", !0),
463
+ k.addCompare && !k.onlySearcher && h(d).searcherKey.value === -1 ? (x(), B(W, {
464
464
  key: 1,
465
465
  name: "compare",
466
466
  onClick: C,
467
- "data-count-compare-regions-indexes": y(g).regionsIndexes.value.length
467
+ "data-count-compare-regions-indexes": h(f).regionsIndexes.value.length
468
468
  }, {
469
- default: B(() => [
470
- z(E(k.$i18n.Common.Selected_regions), 1)
469
+ default: b(() => [
470
+ z(K(k.$i18n.Common.Selected_regions), 1)
471
471
  ]),
472
472
  _: 1
473
- }, 8, ["data-count-compare-regions-indexes"])) : F("", !0)
473
+ }, 8, ["data-count-compare-regions-indexes"])) : q("", !0)
474
474
  ], 2));
475
475
  }
476
- }), et = [
476
+ }), tt = [
477
477
  {
478
478
  id: "1",
479
479
  name: "Without Tag",
@@ -524,12 +524,12 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
524
524
  name: "Turquoise",
525
525
  color_id: "10"
526
526
  }
527
- ], me = (e) => "-" + e, H = (e) => e[0] === "-" ? e.substring(1) : e, ae = (e, l) => {
527
+ ], me = (e) => "-" + e, H = (e) => e[0] === "-" ? e.substring(1) : e, ae = (e, a) => {
528
528
  e = H(e);
529
- const i = l.find((t) => t.id === e);
529
+ const i = a.find((t) => t.id === e);
530
530
  if (i)
531
531
  return i;
532
- }, tt = ["data-tag_id", "data-tag_color_id", "title"], le = /* @__PURE__ */ P({
532
+ }, at = ["data-tag_id", "data-tag_color_id", "title"], le = /* @__PURE__ */ P({
533
533
  __name: "tagIcon",
534
534
  props: {
535
535
  id: {},
@@ -538,18 +538,18 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
538
538
  state: {}
539
539
  },
540
540
  setup(e) {
541
- return (l, i) => (I(), w("div", {
541
+ return (a, i) => (x(), w("div", {
542
542
  class: Q({
543
543
  "top-tagSelector_tagIcon": !0,
544
- "top-tagSelector-active": !!l.state,
545
- "top-tagSelector-excluded": l.state === "excluded"
544
+ "top-tagSelector-active": !!a.state,
545
+ "top-tagSelector-excluded": a.state === "excluded"
546
546
  }),
547
- "data-tag_id": l.id,
548
- "data-tag_color_id": l.colorId,
549
- title: l.name
550
- }, null, 10, tt));
547
+ "data-tag_id": a.id,
548
+ "data-tag_color_id": a.colorId,
549
+ title: a.name
550
+ }, null, 10, at));
551
551
  }
552
- }), at = ["contenteditable", "onKeydown"], ge = /* @__PURE__ */ P({
552
+ }), lt = ["contenteditable", "onKeydown"], ge = /* @__PURE__ */ P({
553
553
  __name: "tagPopupListItem",
554
554
  props: /* @__PURE__ */ O({
555
555
  editable: { type: Boolean },
@@ -566,68 +566,72 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
566
566
  nameModifiers: {}
567
567
  }),
568
568
  emits: /* @__PURE__ */ O(["update:name", "unselect", "exclude", "select"], ["update:name"]),
569
- setup(e, { emit: l }) {
570
- const i = e, t = l, r = q(e, "name"), o = D(null), n = D(!1), u = async () => {
571
- var a;
572
- n.value = !0, await Te(), (a = o.value) == null || a.focus();
573
- }, m = () => {
574
- var p;
575
- const a = (p = o.value) == null ? void 0 : p.innerText;
576
- if (!a) return g();
577
- o.value && (o.value.innerText = a), n.value = !1, t("update:name", a);
578
- }, g = async () => {
579
- o.value && (o.value.innerText = i.name), n.value = !1;
580
- }, f = (a) => {
581
- if (n.value || i.disabled) return;
582
- let p = "selected";
583
- i.canExclude && (a.ctrlKey || a.metaKey) && (p = "excluded"), i.state == p && (p = ""), p === "" && t("unselect"), p === "selected" && t("select"), p === "excluded" && t("exclude");
569
+ setup(e, { emit: a }) {
570
+ const i = e, t = a, o = D(e, "name"), l = F(null), n = M(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
571
+ contenteditable: d.value,
572
+ onpaste: (m) => m.preventDefault()
573
+ } : {}), d = F(!1), g = async () => {
574
+ var m;
575
+ d.value = !0, await _e(), (m = l.value) == null || m.focus();
576
+ }, f = () => {
577
+ var y;
578
+ const m = (y = l.value) == null ? void 0 : y.innerText;
579
+ if (!m) return v();
580
+ l.value && (l.value.innerText = m), d.value = !1, t("update:name", m);
581
+ }, v = async () => {
582
+ l.value && (l.value.innerText = i.name), d.value = !1;
583
+ }, r = (m) => {
584
+ if (d.value || i.disabled) return;
585
+ let y = "selected";
586
+ i.canExclude && (m.ctrlKey || m.metaKey) && (y = "excluded"), i.state == y && (y = ""), y === "" && t("unselect"), y === "selected" && t("select"), y === "excluded" && t("exclude");
584
587
  };
585
- return (a, p) => (I(), b(se, {
588
+ return (m, y) => (x(), B(se, {
586
589
  class: Q({
587
590
  "top-tagSelector_tagListItem": !0,
588
- "top-tagSelector_tagListItem-inEdit": n.value,
589
- "top-tagSelector_tagListItem-disabled": a.disabled,
590
- "top-tagSelector_tagListItem-canExclude": a.canExclude,
591
- "top-tagSelector-active": !!a.state,
592
- "top-tagSelector-excluded": a.state === "excluded"
591
+ "top-tagSelector_tagListItem-inEdit": d.value,
592
+ "top-tagSelector_tagListItem-disabled": m.disabled,
593
+ "top-tagSelector_tagListItem-canExclude": m.canExclude,
594
+ "top-tagSelector-active": !!m.state,
595
+ "top-tagSelector-excluded": m.state === "excluded"
593
596
  }),
594
- onClick: j(f, ["stop"])
597
+ onClick: j(r, ["stop"])
595
598
  }, {
596
- default: B(() => [
597
- L(le, {
598
- id: a.id,
599
- name: r.value,
600
- colorId: a.colorId,
601
- state: a.state
599
+ default: b(() => [
600
+ A(le, {
601
+ id: m.id,
602
+ name: o.value,
603
+ colorId: m.colorId,
604
+ state: m.state
602
605
  }, null, 8, ["id", "name", "colorId", "state"]),
603
- ve("span", {
606
+ ve("span", ye({
604
607
  ref_key: "elName",
605
- ref: o,
608
+ ref: l,
606
609
  class: "top-tagSelector_tagListItemName",
607
- contenteditable: n.value ? "plaintext-only" : !1,
610
+ contenteditable: d.value ? "plaintext-only" : !1
611
+ }, n.value, {
608
612
  onKeydown: [
609
- de(j(m, ["stop"]), ["enter"]),
610
- de(j(g, ["stop"]), ["esc"])
613
+ de(j(f, ["stop"]), ["enter"]),
614
+ de(j(v, ["stop"]), ["esc"])
611
615
  ]
612
- }, E(r.value), 41, at),
613
- a.editable ? (I(), w(Y, { key: 0 }, [
614
- n.value ? (I(), w("span", {
616
+ }), K(o.value), 17, lt),
617
+ m.editable ? (x(), w(Y, { key: 0 }, [
618
+ d.value ? (x(), w("span", {
615
619
  key: 1,
616
620
  "data-top-icon": "",
617
621
  class: "top-tagSelector_edit",
618
- onClick: j(m, ["stop"])
619
- })) : (I(), w("span", {
622
+ onClick: j(f, ["stop"])
623
+ })) : (x(), w("span", {
620
624
  key: 0,
621
625
  "data-top-icon": "",
622
626
  class: "top-tagSelector_edit",
623
- onClick: u
627
+ onClick: g
624
628
  }))
625
- ], 64)) : F("", !0)
629
+ ], 64)) : q("", !0)
626
630
  ]),
627
631
  _: 1
628
632
  }, 8, ["class"]));
629
633
  }
630
- }), lt = { key: 1 }, Ie = /* @__PURE__ */ P({
634
+ }), ot = { key: 1 }, xe = /* @__PURE__ */ P({
631
635
  inheritAttrs: !1,
632
636
  __name: "popupOpener",
633
637
  props: /* @__PURE__ */ O({
@@ -647,59 +651,59 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
647
651
  }),
648
652
  emits: ["update:modelValue"],
649
653
  setup(e) {
650
- const l = e, i = q(e, "modelValue"), t = l.useTopButton ? W : "div", r = l.useTopButton ? "html" : "default", o = {
654
+ const a = e, i = D(e, "modelValue"), t = a.useTopButton ? W : "div", o = a.useTopButton ? "html" : "default", l = {
651
655
  model: i,
652
- mode: l.mode,
653
- targetId: l.targetId,
654
- filters: l.filters,
655
- payload: l.payload
656
+ mode: a.mode,
657
+ targetId: a.targetId,
658
+ filters: a.filters,
659
+ payload: a.payload
656
660
  };
657
- return (n, u) => {
658
- const m = _e("top-data");
659
- return I(), b(Le, { id: n.id }, {
660
- default: B(() => [
661
- Be((I(), b(be(y(t)), Ve({
661
+ return (n, d) => {
662
+ const g = be("top-data");
663
+ return x(), B(Ae, { id: n.id }, {
664
+ default: b(() => [
665
+ Be((x(), B(Ve(h(t)), ye({
662
666
  class: {
663
667
  "top-tagSelector": !0,
664
- "top-tagSelector-filter": l.mode === "filter",
665
- "top-tagSelector-setter_single": l.mode === "setter" && !n.filters,
666
- "top-tagSelector-setter_several": l.mode === "setter" && n.filters,
668
+ "top-tagSelector-filter": a.mode === "filter",
669
+ "top-tagSelector-setter_single": a.mode === "setter" && !n.filters,
670
+ "top-tagSelector-setter_several": a.mode === "setter" && n.filters,
667
671
  "top-tagSelector-selectedOne": !i.value.length || i.value.length === 1,
668
672
  "top-tagSelector-toTwoLine": i.value.length > 5
669
673
  },
670
674
  color: "theme",
671
675
  styling: ""
672
676
  }, n.$attrs), {
673
- [y(r)]: B(() => [
674
- !i.value.length && n.mode === "filter" ? (I(), b(le, {
677
+ [h(o)]: b(() => [
678
+ !i.value.length && n.mode === "filter" ? (x(), B(le, {
675
679
  key: 0,
676
680
  id: "all",
677
681
  colorId: "",
678
682
  name: n.$i18n.Common.All_tags ?? "",
679
683
  state: ""
680
- }, null, 8, ["name"])) : F("", !0),
681
- n.mode === "setter" && n.filters ? (I(), w("div", lt, [
684
+ }, null, 8, ["name"])) : q("", !0),
685
+ n.mode === "setter" && n.filters ? (x(), w("div", ot, [
682
686
  we(n.$slots, "default")
683
- ])) : (I(!0), w(Y, { key: 2 }, ie(i.value, (g) => {
684
- var f, a;
685
- return I(), b(le, {
686
- id: y(H)(g),
687
- colorId: ((f = y(ae)(g, n.tags)) == null ? void 0 : f.color_id) ?? "",
688
- name: ((a = y(ae)(g, n.tags)) == null ? void 0 : a.name) ?? "",
689
- state: y(H)(g) === g ? "selected" : "excluded"
687
+ ])) : (x(!0), w(Y, { key: 2 }, ie(i.value, (f) => {
688
+ var v, r;
689
+ return x(), B(le, {
690
+ id: h(H)(f),
691
+ colorId: ((v = h(ae)(f, n.tags)) == null ? void 0 : v.color_id) ?? "",
692
+ name: ((r = h(ae)(f, n.tags)) == null ? void 0 : r.name) ?? "",
693
+ state: h(H)(f) === f ? "selected" : "excluded"
690
694
  }, null, 8, ["id", "colorId", "name", "state"]);
691
695
  }), 256))
692
696
  ]),
693
697
  _: 2
694
698
  }, 1040, ["class"])), [
695
- [m, o, "topTagSelectorTarget"]
699
+ [g, l, "topTagSelectorTarget"]
696
700
  ])
697
701
  ]),
698
702
  _: 3
699
703
  }, 8, ["id"]);
700
704
  };
701
705
  }
702
- }), ot = /* @__PURE__ */ P({
706
+ }), nt = /* @__PURE__ */ P({
703
707
  __name: "tagSelector",
704
708
  props: /* @__PURE__ */ O({
705
709
  modelValue: {},
@@ -717,177 +721,180 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
717
721
  },
718
722
  modelModifiers: {},
719
723
  tags: {
720
- default: Me(et)
724
+ default: Me(tt)
721
725
  },
722
726
  tagsModifiers: {}
723
727
  }),
724
728
  emits: /* @__PURE__ */ O(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
725
- setup(e, { emit: l }) {
726
- const i = R(), t = e, r = q(e, "modelValue"), o = q(e, "tags"), n = l, u = $e((d, s) => {
727
- n(d, s);
729
+ setup(e, { emit: a }) {
730
+ const i = R(), t = e, o = D(e, "modelValue"), l = D(e, "tags"), n = a, d = Le((u, s) => {
731
+ n(u, s);
728
732
  }, t.emitDelay);
729
- t.singleMode && !r.value.length && (r.value = [o.value[0].id]);
730
- const m = t.id ?? "top-popup-id-" + Math.random(), g = D("add"), f = () => {
733
+ t.singleMode && !o.value.length && (o.value = [l.value[0].id]);
734
+ const g = t.id ?? "top-popup-id-" + Math.random(), f = F("add"), v = () => {
731
735
  var c;
732
- const d = " " + ((c = i.Common.Tags) == null ? void 0 : c.toLowerCase()), s = /* @__PURE__ */ new Map();
733
- return s.set("add", { value: "add", title: i.Common.Add + d }), s.set("replace", { value: "replace", title: i.Common.Replace + d }), s.set("delete", { value: "delete", title: i.Common.Delete + d }), s;
736
+ const u = " " + ((c = i.Common.Tags) == null ? void 0 : c.toLowerCase()), s = /* @__PURE__ */ new Map();
737
+ return s.set("add", { value: "add", title: i.Common.Add + u }), s.set("replace", { value: "replace", title: i.Common.Replace + u }), s.set("delete", { value: "delete", title: i.Common.Delete + u }), s;
734
738
  };
735
- let a = Ee({
736
- model: r,
739
+ let r = $e({
740
+ model: o,
737
741
  mode: "filter",
738
742
  targetId: void 0,
739
743
  filters: void 0,
740
744
  payload: void 0
741
745
  });
742
- K(r, () => {
743
- u("selector", r.value);
746
+ L(o, () => {
747
+ d("selector", o.value);
744
748
  });
745
- const p = A(() => {
746
- if (a.value.mode === "setter" && t.maxTagsForSetter && !a.value.filters)
747
- return a.value.model.value.length >= t.maxTagsForSetter;
748
- }), x = (d) => {
749
- if (d !== "all") {
750
- if (a.value.model.value.includes(d)) return "selected";
751
- if (a.value.model.value.includes(me(d))) return "excluded";
749
+ const m = M(() => {
750
+ if (r.value.mode === "setter" && t.maxTagsForSetter && !r.value.filters)
751
+ return r.value.model.value.length >= t.maxTagsForSetter;
752
+ }), y = (u) => {
753
+ if (u !== "all") {
754
+ if (r.value.model.value.includes(u)) return "selected";
755
+ if (r.value.model.value.includes(me(u))) return "excluded";
752
756
  }
753
- return d === "all" && !a.value.model.value.length ? "selected" : "";
754
- }, C = (d, s) => {
755
- const c = me(d);
756
- let v = a.value.model.value.filter((V) => V !== d && V !== c);
757
- s === "select" && v.push(d), s === "exclude" && v.push(c), a.value.mode === "setter" && a.value.targetId !== void 0 && t.requiredForSetter && (v.length || v.push("1"), v.length === 2 && a.value.model.value.length === 1 && a.value.model.value[0] === "1" && (v = v.filter((V) => V !== "1"))), t.singleMode && !a.value.filters && (v.length || (v = a.value.model.value), v.length > 1 && (v = [v[v.length - 1]])), v.sort((V, M) => {
757
+ return u === "all" && !r.value.model.value.length ? "selected" : "";
758
+ }, C = (u, s) => {
759
+ const c = me(u);
760
+ let p = r.value.model.value.filter((V) => V !== u && V !== c);
761
+ s === "select" && p.push(u), s === "exclude" && p.push(c), r.value.mode === "setter" && r.value.targetId !== void 0 && t.requiredForSetter && (p.length || p.push("1"), p.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (p = p.filter((V) => V !== "1"))), t.singleMode && !r.value.filters && (p.length || (p = r.value.model.value), p.length > 1 && (p = [p[p.length - 1]])), p.sort((V, E) => {
758
762
  if (!t.tags) return 0;
759
- const X = t.tags.findIndex((N) => N.id === V), U = t.tags.findIndex((N) => N.id === M);
763
+ const X = t.tags.findIndex((N) => N.id === V), U = t.tags.findIndex((N) => N.id === E);
760
764
  return X - U;
761
- }), a.value.model.value = v, a.value.mode === "setter" && a.value.targetId !== void 0 && u("setter", {
762
- tagsIds: v,
763
- targetId: a.value.targetId,
764
- payload: a.value.payload
765
+ }), r.value.model.value = p, r.value.mode === "setter" && r.value.targetId !== void 0 && d("setter", {
766
+ tagsIds: p,
767
+ targetId: r.value.targetId,
768
+ payload: r.value.payload
765
769
  });
766
- }, k = A(() => {
767
- let d = "top-tagSelector_popup";
768
- return a.value.mode === "filter" && (d += " top-tagSelector_popup-filter"), a.value.mode === "setter" && (d += " top-tagSelector_popup-setter"), d;
769
- }), h = () => {
770
- const d = prompt("", "New tag");
771
- if (!d || d === "New tag") return;
772
- const s = o.value.length + 1;
773
- o.value.push({
770
+ }, k = M(() => {
771
+ let u = "top-tagSelector_popup";
772
+ return r.value.mode === "filter" && (u += " top-tagSelector_popup-filter"), r.value.mode === "setter" && (u += " top-tagSelector_popup-setter"), u;
773
+ }), S = () => {
774
+ const u = prompt("", "New tag");
775
+ if (!u || u === "New tag") return;
776
+ const s = l.value.length + 1;
777
+ l.value.push({
774
778
  id: String(s),
775
- name: d,
779
+ name: u,
776
780
  color_id: String((s - 1) % 10 + 1)
777
- }), n("tagsChanged", o.value);
778
- }, _ = (d) => {
781
+ }), n("tagsChanged", l.value);
782
+ }, _ = (u) => {
779
783
  var s;
780
- if (a.value = G(d.elPopupOpener, "topTagSelectorTarget"), !a.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
781
- if (a.value.filters && (g.value = "add", a.value.model.value = []), !((s = J.$) != null && s.ui.sortable)) {
784
+ if (r.value = G(u.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
785
+ if (r.value.filters && (f.value = "add", r.value.model.value = []), !((s = J.$) != null && s.ui.sortable)) {
782
786
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
783
787
  return;
784
788
  }
785
- !J.state.isMobile && !J.state.isMobileUA && o.value && $(d.elPopup).sortable({
789
+ !J.state.isMobile && !J.state.isMobileUA && l.value && $(u.elPopup).sortable({
786
790
  items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
787
- cancel: '[contenteditable="plaintext-only"]',
791
+ /**
792
+ * @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
793
+ */
794
+ cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
788
795
  distance: 10,
789
- stop: function(c, v) {
790
- if (!o.value) return;
791
- const V = $(v.item).parent().find("[data-tag_id]"), M = [];
796
+ stop: function(c, p) {
797
+ if (!l.value) return;
798
+ const V = $(p.item).parent().find("[data-tag_id]"), E = [];
792
799
  V.each((X, U) => {
793
- if (!o.value) return;
800
+ if (!l.value) return;
794
801
  const N = $(U).attr("data-tag_id");
795
- M.push(N);
796
- }), o.value.sort((X, U) => {
797
- const N = M.findIndex((oe) => oe === X.id), xe = M.findIndex((oe) => oe === U.id);
798
- return N - xe;
799
- }), u("tagsChanged", o.value);
802
+ E.push(N);
803
+ }), l.value.sort((X, U) => {
804
+ const N = E.findIndex((oe) => oe === X.id), ke = E.findIndex((oe) => oe === U.id);
805
+ return N - ke;
806
+ }), d("tagsChanged", l.value);
800
807
  }
801
808
  });
802
- }, T = (d) => {
809
+ }, T = (u) => {
803
810
  var s;
804
- (s = J.$) != null && s.ui.sortable && $(d.elPopup).data("ui-sortable") && $(d.elPopup).sortable("destroy");
811
+ (s = J.$) != null && s.ui.sortable && $(u.elPopup).data("ui-sortable") && $(u.elPopup).sortable("destroy");
805
812
  };
806
- return (d, s) => (I(), w(Y, null, [
807
- L(Ie, {
813
+ return (u, s) => (x(), w(Y, null, [
814
+ A(xe, {
808
815
  class: "top-select_arrow",
809
- modelValue: r.value,
810
- "onUpdate:modelValue": s[0] || (s[0] = (c) => r.value = c),
811
- id: y(m),
812
- tags: o.value,
816
+ modelValue: o.value,
817
+ "onUpdate:modelValue": s[0] || (s[0] = (c) => o.value = c),
818
+ id: h(g),
819
+ tags: l.value,
813
820
  mode: "filter",
814
821
  useTopButton: ""
815
822
  }, null, 8, ["modelValue", "id", "tags"]),
816
- L(ye, {
817
- id: y(m),
823
+ A(pe, {
824
+ id: h(g),
818
825
  class: Q(k.value),
819
826
  onOpen: s[4] || (s[4] = (c) => _(c)),
820
827
  onClose: s[5] || (s[5] = (c) => T(c)),
821
828
  "transition-duration": 50
822
- }, Ke({
823
- contentList: B(() => [
824
- y(a).mode === "filter" && !d.singleMode ? (I(), b(ge, {
829
+ }, Ee({
830
+ contentList: b(() => [
831
+ h(r).mode === "filter" && !u.singleMode ? (x(), B(ge, {
825
832
  key: 0,
826
833
  id: "all",
827
834
  colorId: "",
828
- name: d.$i18n.Common.All_tags ?? "",
829
- state: y(a).model.value.length ? "" : "selected",
830
- onSelect: s[3] || (s[3] = (c) => y(a).model.value = [])
831
- }, null, 8, ["name", "state"])) : F("", !0),
832
- (I(!0), w(Y, null, ie(o.value, (c) => (I(), b(ge, {
835
+ name: u.$i18n.Common.All_tags ?? "",
836
+ state: h(r).model.value.length ? "" : "selected",
837
+ onSelect: s[3] || (s[3] = (c) => h(r).model.value = [])
838
+ }, null, 8, ["name", "state"])) : q("", !0),
839
+ (x(!0), w(Y, null, ie(l.value, (c) => (x(), B(ge, {
833
840
  key: c.id,
834
841
  id: c.id,
835
842
  colorId: c.color_id,
836
843
  name: c.name,
837
- state: x(c.id),
838
- canExclude: y(a).mode === "filter" && !d.singleMode,
839
- editable: d.tagsEditable,
840
- disabled: p.value && x(c.id) === "",
841
- onUnselect: (v) => C(c.id, "unselect"),
842
- onSelect: (v) => C(c.id, "select"),
843
- onExclude: (v) => C(c.id, "exclude"),
844
- "onUpdate:name": (v) => {
845
- c.name = v, y(u)("tagsChanged", o.value);
844
+ state: y(c.id),
845
+ canExclude: h(r).mode === "filter" && !u.singleMode,
846
+ editable: u.tagsEditable,
847
+ disabled: m.value && y(c.id) === "",
848
+ onUnselect: (p) => C(c.id, "unselect"),
849
+ onSelect: (p) => C(c.id, "select"),
850
+ onExclude: (p) => C(c.id, "exclude"),
851
+ "onUpdate:name": (p) => {
852
+ c.name = p, h(d)("tagsChanged", l.value);
846
853
  }
847
854
  }, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
848
- d.tagsEditable && o.value.length < d.tagsMax && o.value.length < 20 ? (I(), b(se, {
855
+ u.tagsEditable && l.value.length < u.tagsMax && l.value.length < 20 ? (x(), B(se, {
849
856
  key: 1,
850
857
  "data-top-icon": "",
851
- onClick: j(h, ["stop"])
858
+ onClick: j(S, ["stop"])
852
859
  }, {
853
- default: B(() => [
854
- z(E(d.$i18n.Common.Add), 1)
860
+ default: b(() => [
861
+ z(K(u.$i18n.Common.Add), 1)
855
862
  ]),
856
863
  _: 1
857
- })) : F("", !0)
864
+ })) : q("", !0)
858
865
  ]),
859
866
  _: 2
860
867
  }, [
861
- y(a).mode === "setter" && y(a).filters ? {
868
+ h(r).mode === "setter" && h(r).filters ? {
862
869
  name: "header",
863
- fn: B(() => [
864
- L(re, {
865
- modelValue: g.value,
866
- "onUpdate:modelValue": s[1] || (s[1] = (c) => g.value = c),
867
- options: f()
870
+ fn: b(() => [
871
+ A(re, {
872
+ modelValue: f.value,
873
+ "onUpdate:modelValue": s[1] || (s[1] = (c) => f.value = c),
874
+ options: v()
868
875
  }, null, 8, ["modelValue", "options"])
869
876
  ]),
870
877
  key: "0"
871
878
  } : void 0,
872
- y(a).mode === "setter" && y(a).filters ? {
879
+ h(r).mode === "setter" && h(r).filters ? {
873
880
  name: "footer",
874
- fn: B(() => [
875
- L(W, { color: "theme" }, {
876
- default: B(() => [
877
- z(E(d.$i18n.Common.Cancel), 1)
881
+ fn: b(() => [
882
+ A(W, { color: "theme" }, {
883
+ default: b(() => [
884
+ z(K(u.$i18n.Common.Cancel), 1)
878
885
  ]),
879
886
  _: 1
880
887
  }),
881
- L(W, {
882
- onClick: s[2] || (s[2] = (c) => y(u)("setter", {
883
- tagsIds: y(a).model.value,
884
- filters: y(a).filters,
885
- filtersAction: g.value,
886
- payload: y(a).payload
888
+ A(W, {
889
+ onClick: s[2] || (s[2] = (c) => h(d)("setter", {
890
+ tagsIds: h(r).model.value,
891
+ filters: h(r).filters,
892
+ filtersAction: f.value,
893
+ payload: h(r).payload
887
894
  }))
888
895
  }, {
889
- default: B(() => [
890
- z(E(g.value === "add" ? d.$i18n.Common.Add : "") + " " + E(g.value === "replace" ? d.$i18n.Common.Replace : "") + " " + E(g.value === "delete" ? d.$i18n.Common.Remove : ""), 1)
896
+ default: b(() => [
897
+ z(K(f.value === "add" ? u.$i18n.Common.Add : "") + " " + K(f.value === "replace" ? u.$i18n.Common.Replace : "") + " " + K(f.value === "delete" ? u.$i18n.Common.Remove : ""), 1)
891
898
  ]),
892
899
  _: 1
893
900
  })
@@ -897,68 +904,74 @@ const De = { class: "top-selectorCompetitors" }, Fe = { class: "top-ellipsis1" }
897
904
  ]), 1032, ["id", "class"])
898
905
  ], 64));
899
906
  }
900
- }), gt = (e, l, i) => {
901
- l || (l = { id: e.id }), l.id = e.id;
902
- const t = qe.genElPopupOpener("div", l);
903
- return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-button", "top-color_theme"), e.mode === "filter" && t.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && t.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && t.classList.add("top-tagSelector-setter_several"), t.onclick = (r) => {
904
- r.preventDefault(), r.stopPropagation(), t.onclick = null;
905
- const o = D(e.modelValue), n = {
906
- model: o,
907
+ }), ft = (e, a) => M(() => Ke(e).map((t) => ({
908
+ value: t.id,
909
+ title: t.url + ` [${t.id}]`,
910
+ icon: t.id === a ? "" : "",
911
+ content: t.name
912
+ }))), vt = (e, a, i) => {
913
+ a || (a = { id: e.id }), a.id = e.id;
914
+ const t = Fe.genElPopupOpener("div", a);
915
+ return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-button", "top-color_theme"), e.mode === "filter" && t.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && t.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && t.classList.add("top-tagSelector-setter_several"), t.onclick = (o) => {
916
+ o.preventDefault(), o.stopPropagation(), t.onclick = null;
917
+ const l = F(e.modelValue), n = {
918
+ model: l,
907
919
  mode: e.mode,
908
920
  targetId: e.targetId,
909
921
  filters: e.filters,
910
922
  payload: e.payload
911
923
  };
912
- G(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, ue(e.modelValue) || K(o, () => {
913
- e.modelValue = o.value, Z(t, e, i);
924
+ G(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, ue(e.modelValue) || L(l, () => {
925
+ e.modelValue = l.value, Z(t, e, i);
914
926
  }), t.click();
915
- }, ue(e.modelValue) ? K(e.modelValue, () => Z(t, e, i)) : G(t, "topTagSelectorRender", (r) => {
916
- e.modelValue = r;
917
- const o = G(t, "topTagSelectorTarget");
918
- o && (o.model.value = r), Z(t, e, i);
927
+ }, ue(e.modelValue) ? L(e.modelValue, () => Z(t, e, i)) : G(t, "topTagSelectorRender", (o) => {
928
+ e.modelValue = o;
929
+ const l = G(t, "topTagSelectorTarget");
930
+ l && (l.model.value = o), Z(t, e, i);
919
931
  }), Z(t, e, i), t;
920
- }, ft = (e, l) => {
932
+ }, yt = (e, a) => {
921
933
  var i;
922
- (i = G(e, "topTagSelectorRender")) == null || i(l);
923
- }, Z = (e, l, i) => {
924
- var r;
925
- const t = y(l.modelValue);
926
- if (e.classList.toggle("top-tagSelector-selectedOne", !t.length || t.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", t.length > 5), l.mode === "setter" && l.filters) {
934
+ (i = G(e, "topTagSelectorRender")) == null || i(a);
935
+ }, Z = (e, a, i) => {
936
+ var o;
937
+ const t = h(a.modelValue);
938
+ if (e.classList.toggle("top-tagSelector-selectedOne", !t.length || t.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", t.length > 5), a.mode === "setter" && a.filters) {
927
939
  e.innerHTML = `<div>${i}</div>`;
928
940
  return;
929
941
  }
930
- if (e.innerHTML = "", !t.length && l.mode === "filter") {
931
- const o = fe({
942
+ if (e.innerHTML = "", !t.length && a.mode === "filter") {
943
+ const l = fe({
932
944
  id: "all",
933
945
  colorId: "",
934
- name: ((r = R().Common) == null ? void 0 : r.All_tags) ?? "",
946
+ name: ((o = R().Common) == null ? void 0 : o.All_tags) ?? "",
935
947
  state: ""
936
948
  });
937
- e.append(o);
949
+ e.append(l);
938
950
  }
939
- t.forEach((o) => {
940
- var u, m;
951
+ t.forEach((l) => {
952
+ var d, g;
941
953
  const n = fe({
942
- id: H(o),
943
- colorId: ((u = ae(o, l.tags)) == null ? void 0 : u.color_id) ?? "",
944
- name: ((m = ae(o, l.tags)) == null ? void 0 : m.name) ?? "",
945
- state: H(o) === o ? "selected" : "excluded"
954
+ id: H(l),
955
+ colorId: ((d = ae(l, a.tags)) == null ? void 0 : d.color_id) ?? "",
956
+ name: ((g = ae(l, a.tags)) == null ? void 0 : g.name) ?? "",
957
+ state: H(l) === l ? "selected" : "excluded"
946
958
  });
947
959
  e.append(n);
948
960
  });
949
961
  }, fe = (e) => {
950
- const l = document.createElement("div");
951
- return l.classList.add("top-tagSelector_tagIcon"), l.classList.toggle("top-tagSelector-active", !!e.state), l.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), l.dataset.tag_id = e.id, l.dataset.tag_color_id = e.colorId, l.title = e.name, l;
952
- }, vt = Pe, yt = Ze, pt = ot, ht = Ie, St = le;
962
+ const a = document.createElement("div");
963
+ return a.classList.add("top-tagSelector_tagIcon"), a.classList.toggle("top-tagSelector-active", !!e.state), a.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), a.dataset.tag_id = e.id, a.dataset.tag_color_id = e.colorId, a.title = e.name, a;
964
+ }, pt = Ue, ht = et, St = nt, It = xe, xt = le;
953
965
  export {
954
- vt as TopSelectorCompetitors,
955
- yt as TopSelectorRegion,
956
- pt as TopTagSelector,
957
- ht as TopTagSelectorPopupOpener,
958
- St as TopTagSelectorTagIcon,
959
- Ye as findRegion,
960
- gt as genElTopTagSelectorPopupOpener,
961
- he as genSearcherByKey,
962
- ft as renderElTopTagSelectorPopupOpener
966
+ pt as TopSelectorCompetitors,
967
+ ht as TopSelectorRegion,
968
+ St as TopTagSelector,
969
+ It as TopTagSelectorPopupOpener,
970
+ xt as TopTagSelectorTagIcon,
971
+ We as findRegion,
972
+ vt as genElTopTagSelectorPopupOpener,
973
+ Se as genSearcherByKey,
974
+ yt as renderElTopTagSelectorPopupOpener,
975
+ ft as useItemsFromCompetitors
963
976
  };
964
977
  //# sourceMappingURL=project.js.map