@topvisor/ui 1.0.13 → 1.0.14-pinia-prepare

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 (119) hide show
  1. package/.chunks/{datepicker-DOmAO7Nq.es.js → datepicker-BuFX5Ibd.es.js} +2 -2
  2. package/.chunks/{datepicker-DOmAO7Nq.es.js.map → datepicker-BuFX5Ibd.es.js.map} +1 -1
  3. package/.chunks/{datepicker-DX0qKxI_.amd.js → datepicker-nf_2LrjW.amd.js} +2 -2
  4. package/.chunks/{datepicker-DX0qKxI_.amd.js.map → datepicker-nf_2LrjW.amd.js.map} +1 -1
  5. package/.chunks/{forms-Dg1N8Jv3.amd.js → forms-BLpuaGu3.amd.js} +3 -3
  6. package/.chunks/{forms-Dg1N8Jv3.amd.js.map → forms-BLpuaGu3.amd.js.map} +1 -1
  7. package/.chunks/{forms-FHMqYVvM.es.js → forms-CO7gZ-Jf.es.js} +124 -124
  8. package/.chunks/{forms-FHMqYVvM.es.js.map → forms-CO7gZ-Jf.es.js.map} +1 -1
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CuWOLCGe.es.js → listItem.vue_vue_type_script_setup_true_lang-BViq2HMb.es.js} +2 -2
  10. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-CuWOLCGe.es.js.map → listItem.vue_vue_type_script_setup_true_lang-BViq2HMb.es.js.map} +1 -1
  11. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-tzOQcPs_.amd.js → listItem.vue_vue_type_script_setup_true_lang-C3_ynkiW.amd.js} +2 -2
  12. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-tzOQcPs_.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-C3_ynkiW.amd.js.map} +1 -1
  13. package/.chunks/{menu.vue_vue_type_style_index_0_lang-C_ND48ou.amd.js → menu.vue_vue_type_style_index_0_lang-B3O5DQLa.amd.js} +2 -2
  14. package/.chunks/{menu.vue_vue_type_style_index_0_lang-C_ND48ou.amd.js.map → menu.vue_vue_type_style_index_0_lang-B3O5DQLa.amd.js.map} +1 -1
  15. package/.chunks/{menu.vue_vue_type_style_index_0_lang-BGdS1bYl.es.js → menu.vue_vue_type_style_index_0_lang-tVQzbd1R.es.js} +2 -2
  16. package/.chunks/{menu.vue_vue_type_style_index_0_lang-BGdS1bYl.es.js.map → menu.vue_vue_type_style_index_0_lang-tVQzbd1R.es.js.map} +1 -1
  17. package/.chunks/notice-BShByAqB.amd.js +4 -0
  18. package/.chunks/notice-BShByAqB.amd.js.map +1 -0
  19. package/.chunks/notice-DqPTC2Eb.es.js +175 -0
  20. package/.chunks/notice-DqPTC2Eb.es.js.map +1 -0
  21. package/.chunks/{popup-CSNWKE4F.amd.js → popup-3eJtfdGC.amd.js} +2 -2
  22. package/.chunks/popup-3eJtfdGC.amd.js.map +1 -0
  23. package/.chunks/{popup-CBNL-Ixi.es.js → popup-PVygOyt6.es.js} +4 -4
  24. package/.chunks/popup-PVygOyt6.es.js.map +1 -0
  25. package/.chunks/{utils-B6497Bik.es.js → utils-CaTXdV8x.es.js} +52 -44
  26. package/.chunks/utils-CaTXdV8x.es.js.map +1 -0
  27. package/.chunks/utils-DqBBCGAB.amd.js +2 -0
  28. package/.chunks/utils-DqBBCGAB.amd.js.map +1 -0
  29. package/.chunks/{utils-BgirCapu.es.js → utils-DtkfhYfA.es.js} +59 -54
  30. package/.chunks/utils-DtkfhYfA.es.js.map +1 -0
  31. package/.chunks/{utils-DINqzHO_.amd.js → utils-FeIFDJOE.amd.js} +2 -2
  32. package/.chunks/utils-FeIFDJOE.amd.js.map +1 -0
  33. package/README.md +7 -12
  34. package/assets/core.css +1 -1
  35. package/assets/layout.css +1 -0
  36. package/charts/charts.amd.js +1 -1
  37. package/charts/charts.amd.js.map +1 -1
  38. package/charts/charts.js +47 -42
  39. package/charts/charts.js.map +1 -1
  40. package/components/charts/miniChart/miniChart.d.ts +5 -0
  41. package/components/core/notice/item/item.vue.d.ts +3 -1
  42. package/components/core/notice/item/types.d.ts +4 -0
  43. package/components/core/notice/utils.d.ts +1 -0
  44. package/components/dialog/dialog/composables/{asyncDialogWorker.d.ts → asyncDialogHandle.d.ts} +1 -1
  45. package/components/dialog/dialog/composables/utils.d.ts +2 -2
  46. package/components/dialog/dialog/dialogs/dialogs.vue.d.ts +1 -1
  47. package/components/dialog/lib/types.d.ts +6 -1
  48. package/components/dialog/lib/worker.d.ts +5 -0
  49. package/components/layout/islandRows/islandRows.vue.d.ts +16 -0
  50. package/components/layout/islandRows/islandRowsRow/islandRowsRow.vue.d.ts +17 -0
  51. package/components/layout/islandRows/islandRowsRow/types.d.ts +2 -0
  52. package/components/layout/islandRows/types.d.ts +10 -0
  53. package/components/layout/layout.d.ts +7 -0
  54. package/components/layout/rows/rows.vue.d.ts +20 -0
  55. package/components/layout/rows/types.d.ts +6 -0
  56. package/components/project/project.d.ts +1 -0
  57. package/core/app.amd.js +1 -1
  58. package/core/app.amd.js.map +1 -1
  59. package/core/app.js +28 -31
  60. package/core/app.js.map +1 -1
  61. package/core/core/options.d.ts +2 -2
  62. package/core/utils/check.d.ts +1 -1
  63. package/dialog/dialog.amd.js +1 -1
  64. package/dialog/dialog.js +2 -2
  65. package/forms/forms.amd.js +1 -1
  66. package/forms/forms.js +1 -1
  67. package/formsExt/formsExt.amd.js +1 -1
  68. package/formsExt/formsExt.js +54 -54
  69. package/icomoon/Topvisor icons.json +1421 -1192
  70. package/icomoon/demo-files/demo.css +0 -3
  71. package/icomoon/demo.html +103 -36
  72. package/icomoon/fonts/Topvisor-2.eot +0 -0
  73. package/icomoon/fonts/Topvisor-2.svg +8 -3
  74. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  75. package/icomoon/fonts/Topvisor-2.woff +0 -0
  76. package/icomoon/selection.json +1 -1
  77. package/icomoon/style.css +21 -5
  78. package/layout/layout.amd.js +2 -0
  79. package/layout/layout.amd.js.map +1 -0
  80. package/layout/layout.d.ts +2 -0
  81. package/layout/layout.js +54 -0
  82. package/layout/layout.js.map +1 -0
  83. package/package.json +3 -3
  84. package/popup/popup.amd.js +1 -1
  85. package/popup/popup.js +2 -2
  86. package/popup/worker.amd.js +1 -1
  87. package/popup/worker.js +2 -2
  88. package/project/project.amd.js +1 -1
  89. package/project/project.amd.js.map +1 -1
  90. package/project/project.js +457 -444
  91. package/project/project.js.map +1 -1
  92. package/tabsView/tabsView.amd.js +1 -1
  93. package/tabsView/tabsView.js +16 -16
  94. package/utils/check.amd.js +1 -1
  95. package/utils/check.amd.js.map +1 -1
  96. package/utils/check.js +12 -12
  97. package/utils/check.js.map +1 -1
  98. package/utils/date.amd.js +1 -1
  99. package/utils/date.js +1 -1
  100. package/utils/device.amd.js +1 -1
  101. package/utils/device.js +1 -1
  102. package/utils/lodash.amd.js +1 -1
  103. package/utils/lodash.js +5 -5
  104. package/utils/price.amd.js +1 -1
  105. package/utils/price.js +1 -1
  106. package/utils/string.amd.js +1 -1
  107. package/utils/string.js +1 -1
  108. package/.chunks/notice-BixWe-8g.amd.js +0 -4
  109. package/.chunks/notice-BixWe-8g.amd.js.map +0 -1
  110. package/.chunks/notice-D07Kq3fU.es.js +0 -172
  111. package/.chunks/notice-D07Kq3fU.es.js.map +0 -1
  112. package/.chunks/popup-CBNL-Ixi.es.js.map +0 -1
  113. package/.chunks/popup-CSNWKE4F.amd.js.map +0 -1
  114. package/.chunks/utils-B6497Bik.es.js.map +0 -1
  115. package/.chunks/utils-BgirCapu.es.js.map +0 -1
  116. package/.chunks/utils-Bxmh9YxC.amd.js +0 -2
  117. package/.chunks/utils-Bxmh9YxC.amd.js.map +0 -1
  118. package/.chunks/utils-DINqzHO_.amd.js.map +0 -1
  119. /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 Te } 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 ye, ref as F, watch as L, createCommentVNode as q, withModifiers as j, mergeProps as pe, withKeys as de, nextTick as be, resolveDirective as Be, withDirectives as Ve, resolveDynamicComponent as we, renderSlot as Me, reactive as $e, shallowRef as Ee, createSlots as Ke, toValue as ue, isRef as ce } from "vue";
3
+ import { c as R, C as J, _ as W, y as re, s as Le } from "../.chunks/forms-CO7gZ-Jf.es.js";
4
+ import { _ as he, b as se, a as Ae } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-BViq2HMb.es.js";
5
+ import { _ as Oe } from "../.chunks/menu.vue_vue_type_style_index_0_lang-tVQzbd1R.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 _e = ["../assets/project.css"].map((e) => import.meta.resolve(e));
10
+ Te.insertCSSLinkToPage(_e, !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 (l, o) => (x(), w("div", qe, [
33
+ h(J).state.isMobile ? (x(), B(he, { 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 = l.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(l.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
+ ye("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
75
  "onUpdate:modelValue": o[0] || (o[0] = (n) => i.value = n),
76
- items: r.items,
76
+ items: l.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,24 +94,24 @@ 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
+ }, Se = {
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]])
114
- }, ce = {
113
+ regionByIndex: /* @__PURE__ */ new Map([[I, te]])
114
+ }, me = {
115
115
  countryCode: "00",
116
116
  depth: 1,
117
117
  device: 0,
@@ -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 = () => (me.name = R().Keywords.Without_region, me), Ie = (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();
124
+ return e ? t = Ye(i) : t = xe(i), a && t.set(I, ze()), t.size || t.set(I, Se), t;
125
+ }, xe = (e, a = !0, i = [], t = !1) => {
126
+ const l = /* @__PURE__ */ new Map();
127
127
  return e.forEach((o) => {
128
128
  if (!o.enabled || t && typeof o.key == "number" && o.key > 1) return;
129
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);
130
+ n.regionByIndex = /* @__PURE__ */ new Map(), o.regions && o.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" && l.set(n.key, n);
135
135
  }), i.forEach((o) => {
136
- if (r.has(o)) return;
136
+ if (l.has(o)) return;
137
137
  const n = {
138
138
  key: o,
139
- name: Ue[o],
139
+ name: je[o],
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
+ l.set(n.key, n);
144
+ }), l;
145
+ }, Ye = (e) => {
146
+ const a = xe(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;
155
+ }), a;
156
+ }, We = (e, a, i = []) => {
157
+ const t = Ie(e, !1, i);
158
+ let l;
159
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))
160
+ if (!(a.searcher_key !== void 0 && a.searcher_key != o.key) && o.regions && (o.regions.forEach((n) => {
161
+ if (!l && !(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 = o.key, l = n, !1;
163
+ }), l))
164
164
  return !1;
165
- }), r;
166
- }, We = (e, l) => {
167
- const i = R(), t = D(l.value.keys().next().value ?? S), r = A(() => {
165
+ }), l;
166
+ }, He = (e, a) => {
167
+ const i = R(), t = F(a.value.keys().next().value ?? I), l = M(() => {
168
168
  const o = /* @__PURE__ */ new Map();
169
- if (l.value.forEach((n) => {
170
- let u = {
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)), o.set(n.key, d);
175
+ }), e.addCompare && !o.has(I)) {
176
176
  const n = {
177
177
  value: "",
178
178
  title: "--------------------",
179
179
  disabled: !0
180
180
  };
181
181
  o.set(n.value, n);
182
- const u = {
182
+ const d = {
183
183
  value: -1,
184
184
  title: i.Common.Compare
185
185
  };
186
- o.set(u.value, u);
186
+ o.set(d.value, d);
187
187
  }
188
188
  return o;
189
189
  });
190
190
  return {
191
191
  searcherKey: t,
192
- optionBySearcherKey: r
192
+ optionBySearcherKey: l
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 o, 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 = (o = a.value) == null ? void 0 : o.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 l = 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(l, (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: l
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([]), l = () => {
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];
265
+ n.length && (n = n.filter((d) => i.value.has(d))), n.length || (n = Array.from(i.value)), t.value = [...n];
266
266
  }, o = () => {
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, () => {
269
+ return L(t, () => {
270
270
  o();
271
- }), e.addCompare && r(), {
271
+ }), e.addCompare && l(), {
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(() => Ie(e.forFrequency, e.autoRegion, e.searchers)), i = M(() => a.value.get(l.searcherKey.value) || Se), 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
+ }), l = He(e, a), o = 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)), l.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 === l.searcherKey.value) {
291
+ r = l.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 (o.regionIndex.value && ((_ = S.regionByIndex) != null && _.has(o.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 && (l.searcherKey.value = r), o.regionIndex.value !== void 0 && !((y = (m = i.value) == null ? void 0 : m.regionByIndex) != null && y.has(o.regionIndex.value)) && (o.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 (!(l.searcherKey.value === -1 || l.searcherKey.value === I))
304
+ return l.searcherKey.value;
305
+ }, g = () => {
306
+ if (e.onlySearcher || o.regionIndex.value === I) return;
307
+ let r = o.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 = o.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,
319
+ selectSearcher: l,
320
320
  selectRegion: o,
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, l = D(e, "modelValue"), o = 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(l.value) === JSON.stringify(f.regionsIndexes.value))
377
377
  return;
378
- r.value = [...g.regionsIndexes.value];
378
+ l.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
+ l.value = [t.onlySearcher ? d.searcherKey.value : g.regionIndex.value];
381
+ !t.onlySearcher && !r.value.size && (d.searcherKey.value = I);
382
+ }), o.value && L(o, () => {
383
+ l.value = [o.value];
384
+ }, { immediate: !0 }), L(l, () => {
385
+ var k, S, _, T, u;
386
+ if (l.value[0] && (o.value = l.value[0]), t.onlySearcher) {
387
+ if (!l.value.length || l.value.length === 1 && !v.value.has(l.value[0])) {
388
+ let s = v.value.keys().next().value;
389
+ s !== void 0 && (l.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 (l.value.length > 1 && JSON.stringify(l.value) !== JSON.stringify(f.regionsIndexes.value)) {
393
+ l.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(l.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(l.value) !== JSON.stringify(s)) {
410
+ l.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 (!(l.value.length === 1 && l.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 (l.value.length === 1) {
417
+ d.searcherKey.value = l.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 (l.value.length === 1 && d.searcherKey.value !== -1) {
423
+ g.regionIndex.value = l.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 = [...l.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
+ ], ge = (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"], fe = /* @__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, l = D(e, "name"), o = 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 be(), (m = o.value) == null || m.focus();
576
+ }, f = () => {
577
+ var y;
578
+ const m = (y = o.value) == null ? void 0 : y.innerText;
579
+ if (!m) return v();
580
+ o.value && (o.value.innerText = m), d.value = !1, t("update:name", m);
581
+ }, v = async () => {
582
+ o.value && (o.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: l.value,
603
+ colorId: m.colorId,
604
+ state: m.state
602
605
  }, null, 8, ["id", "name", "colorId", "state"]),
603
- ve("span", {
606
+ ye("span", pe({
604
607
  ref_key: "elName",
605
608
  ref: o,
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(l.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 }, ke = /* @__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", l = a.useTopButton ? "html" : "default", o = {
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
+ Ve((x(), B(we(h(t)), pe({
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(l)]: 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, [
682
- 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"
684
+ }, null, 8, ["name"])) : q("", !0),
685
+ n.mode === "setter" && n.filters ? (x(), w("div", ot, [
686
+ Me(n.$slots, "default")
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, o, "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: $e(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, l = D(e, "modelValue"), o = 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 && !l.value.length && (l.value = [o.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 = Ee({
740
+ model: l,
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(l, () => {
747
+ d("selector", l.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(ge(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 = ge(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;
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;
772
776
  const s = o.value.length + 1;
773
777
  o.value.push({
774
778
  id: String(s),
775
- name: d,
779
+ name: u,
776
780
  color_id: String((s - 1) % 10 + 1)
777
781
  }), n("tagsChanged", o.value);
778
- }, _ = (d) => {
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 && o.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) {
796
+ stop: function(c, p) {
790
797
  if (!o.value) return;
791
- const V = $(v.item).parent().find("[data-tag_id]"), M = [];
798
+ const V = $(p.item).parent().find("[data-tag_id]"), E = [];
792
799
  V.each((X, U) => {
793
800
  if (!o.value) return;
794
801
  const N = $(U).attr("data-tag_id");
795
- M.push(N);
802
+ E.push(N);
796
803
  }), 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);
804
+ const N = E.findIndex((oe) => oe === X.id), Ce = E.findIndex((oe) => oe === U.id);
805
+ return N - Ce;
806
+ }), d("tagsChanged", o.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(ke, {
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),
816
+ modelValue: l.value,
817
+ "onUpdate:modelValue": s[0] || (s[0] = (c) => l.value = c),
818
+ id: h(g),
812
819
  tags: o.value,
813
820
  mode: "filter",
814
821
  useTopButton: ""
815
822
  }, null, 8, ["modelValue", "id", "tags"]),
816
- L(ye, {
817
- id: y(m),
823
+ A(he, {
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
829
  }, Ke({
823
- contentList: B(() => [
824
- y(a).mode === "filter" && !d.singleMode ? (I(), b(ge, {
830
+ contentList: b(() => [
831
+ h(r).mode === "filter" && !u.singleMode ? (x(), B(fe, {
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(o.value, (c) => (x(), B(fe, {
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", o.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 && o.value.length < u.tagsMax && o.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 = {
907
+ }), ft = (e, a) => M(() => ue(e).filter((l) => l.on >= 0 || l.id === a).map((l) => ({
908
+ value: l.id,
909
+ title: l.url + ` [${l.id}]`,
910
+ icon: l.id === ue(a) ? "" : "",
911
+ content: l.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 = (l) => {
916
+ l.preventDefault(), l.stopPropagation(), t.onclick = null;
917
+ const o = F(e.modelValue), n = {
906
918
  model: o,
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, () => {
924
+ G(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, ce(e.modelValue) || L(o, () => {
913
925
  e.modelValue = o.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;
927
+ }, ce(e.modelValue) ? L(e.modelValue, () => Z(t, e, i)) : G(t, "topTagSelectorRender", (l) => {
928
+ e.modelValue = l;
917
929
  const o = G(t, "topTagSelectorTarget");
918
- o && (o.model.value = r), Z(t, e, i);
930
+ o && (o.model.value = l), 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 l;
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 o = ve({
932
944
  id: "all",
933
945
  colorId: "",
934
- name: ((r = R().Common) == null ? void 0 : r.All_tags) ?? "",
946
+ name: ((l = R().Common) == null ? void 0 : l.All_tags) ?? "",
935
947
  state: ""
936
948
  });
937
949
  e.append(o);
938
950
  }
939
951
  t.forEach((o) => {
940
- var u, m;
941
- const n = fe({
952
+ var d, g;
953
+ const n = ve({
942
954
  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) ?? "",
955
+ colorId: ((d = ae(o, a.tags)) == null ? void 0 : d.color_id) ?? "",
956
+ name: ((g = ae(o, a.tags)) == null ? void 0 : g.name) ?? "",
945
957
  state: H(o) === o ? "selected" : "excluded"
946
958
  });
947
959
  e.append(n);
948
960
  });
949
- }, 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;
961
+ }, ve = (e) => {
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 = ke, 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
+ Ie as genSearcherByKey,
974
+ yt as renderElTopTagSelectorPopupOpener,
975
+ ft as useItemsFromCompetitors
963
976
  };
964
977
  //# sourceMappingURL=project.js.map