@topvisor/ui 1.0.7 → 1.0.8-fixed-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import P from "../core/core.js";
2
- import { defineComponent as j, mergeModels as N, useModel as b, computed as R, openBlock as V, createElementBlock as q, unref as K, createBlock as w, withCtx as _, createVNode as J, createTextVNode as A, toDisplayString as E, Fragment as H, renderList as Q, normalizeClass as D, createElementVNode as W, ref as F, watch as B, createCommentVNode as T } from "vue";
2
+ import { defineComponent as j, mergeModels as N, useModel as b, computed as R, openBlock as V, createElementBlock as q, unref as C, createBlock as w, withCtx as _, createVNode as A, createTextVNode as J, toDisplayString as E, Fragment as H, renderList as Q, normalizeClass as D, createElementVNode as W, ref as F, watch as B, createCommentVNode as T } from "vue";
3
3
  import { b as L, C as X, T as z, _ as U, S as $ } from "../.chunks/forms-CHiMZ8vg.es.js";
4
4
  import { P as Y, a as Z } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Bb7B8CTJ.es.js";
5
5
  import { M as ee } from "../.chunks/menu-CHeV29rC.es.js";
6
- import { d as h, g as ne, s as oe, f as te } from "../.chunks/utils-BOlUthaH.es.js";
6
+ import { d as p, g as ne, s as oe, f as te } from "../.chunks/utils-BOlUthaH.es.js";
7
7
  import { getSearcherGIcon as le, getLangLabel as ae, getDeviceGIcon as re } from "../utils/searchers.js";
8
8
  const G = ["../assets/project.css"].map((n) => import.meta.resolve(n));
9
9
  P.insertCSSLinkToPage(G, !0);
@@ -19,8 +19,8 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
19
19
  }),
20
20
  emits: ["update:modelValue"],
21
21
  setup(n) {
22
- const s = n, d = b(n, "modelValue"), t = R(() => {
23
- if (s.showSelectAllItem)
22
+ const i = n, v = b(n, "modelValue"), t = R(() => {
23
+ if (i.showSelectAllItem)
24
24
  return {
25
25
  icon: "",
26
26
  title: L().Common.Select_all,
@@ -29,9 +29,9 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
29
29
  };
30
30
  });
31
31
  return (e, r) => (V(), q("div", ie, [
32
- K(X).state.isMobile ? (V(), w(Y, { key: 0 }, {
32
+ C(X).state.isMobile ? (V(), w(Y, { key: 0 }, {
33
33
  opener: _(() => [
34
- J(z, {
34
+ A(z, {
35
35
  class: "top-selectorCompetitors_opener",
36
36
  color: "theme",
37
37
  icon: "",
@@ -40,9 +40,9 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
40
40
  default: _(() => {
41
41
  var o;
42
42
  return [
43
- A(E((o = e.items.find((a) => {
44
- var u;
45
- return a.value === ((u = d.value) == null ? void 0 : u[0]);
43
+ J(E((o = e.items.find((a) => {
44
+ var c;
45
+ return a.value === ((c = v.value) == null ? void 0 : c[0]);
46
46
  })) == null ? void 0 : o.content), 1)
47
47
  ];
48
48
  }),
@@ -51,14 +51,14 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
51
51
  ]),
52
52
  contentList: _(() => [
53
53
  (V(!0), q(H, null, Q(e.items, (o, a) => {
54
- var u;
54
+ var c;
55
55
  return V(), w(Z, {
56
56
  class: D({
57
- "top-active": (u = d.value) == null ? void 0 : u.includes(o.value)
57
+ "top-active": (c = v.value) == null ? void 0 : c.includes(o.value)
58
58
  }),
59
59
  "data-top-icon": o.icon,
60
60
  title: o.title,
61
- onClick: () => d.value = [o.value]
61
+ onClick: () => v.value = [o.value]
62
62
  }, {
63
63
  default: _(() => [
64
64
  W("span", se, E(o.content), 1)
@@ -70,8 +70,8 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
70
70
  _: 1
71
71
  })) : (V(), w(ee, {
72
72
  key: 1,
73
- modelValue: d.value,
74
- "onUpdate:modelValue": r[0] || (r[0] = (o) => d.value = o),
73
+ modelValue: v.value,
74
+ "onUpdate:modelValue": r[0] || (r[0] = (o) => v.value = o),
75
75
  items: e.items,
76
76
  isMultiple: !0,
77
77
  styling: "bar",
@@ -85,16 +85,16 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
85
85
  "top-button": "top-button"
86
86
  }, de = {
87
87
  $style: ce
88
- }, ve = /* @__PURE__ */ U(ue, [["__cssModules", de]]), ge = (n, s) => {
89
- const d = L(), t = F(s.value.keys().next().value ?? h), e = R(() => {
88
+ }, ve = /* @__PURE__ */ U(ue, [["__cssModules", de]]), fe = (n, i) => {
89
+ const v = L(), t = F(i.value.keys().next().value ?? p), e = R(() => {
90
90
  const r = /* @__PURE__ */ new Map();
91
- if (s.value.forEach((o) => {
91
+ if (i.value.forEach((o) => {
92
92
  let a = {
93
93
  value: o.key,
94
94
  title: o.name
95
95
  };
96
96
  n.addSearcherIcon && (a.icon = le(o.key)), r.set(o.key, a);
97
- }), n.addCompare && !r.has(h)) {
97
+ }), n.addCompare && !r.has(p)) {
98
98
  const o = {
99
99
  value: "",
100
100
  title: "--------------------",
@@ -103,7 +103,7 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
103
103
  r.set(o.value, o);
104
104
  const a = {
105
105
  value: -1,
106
- title: d.Common.Compare
106
+ title: v.Common.Compare
107
107
  };
108
108
  r.set(a.value, a);
109
109
  }
@@ -113,65 +113,65 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
113
113
  searcherKey: t,
114
114
  optionBySearcherKey: e
115
115
  };
116
- }, fe = (n, s) => {
116
+ }, ge = (n, i) => {
117
117
  var r, o, a;
118
- const d = L(), t = F(h);
119
- n.modelValue.length === 1 && (t.value = n.modelValue[0]), t.value === h && (n.forFrequency ? t.value = ((o = (r = s.value) == null ? void 0 : r.regionByIndex.values().next().value) == null ? void 0 : o.key) ?? h : t.value = ((a = s.value) == null ? void 0 : a.regionByIndex.keys().next().value) ?? h);
118
+ const v = L(), t = F(p);
119
+ n.modelValue.length === 1 && (t.value = n.modelValue[0]), t.value === p && (n.forFrequency ? t.value = ((o = (r = i.value) == null ? void 0 : r.regionByIndex.values().next().value) == null ? void 0 : o.key) ?? p : t.value = ((a = i.value) == null ? void 0 : a.regionByIndex.keys().next().value) ?? p);
120
120
  const e = R(() => {
121
- var v;
122
- const u = /* @__PURE__ */ new Map();
123
- return (v = s.value.regionByIndex) == null || v.forEach((i) => {
124
- let l = i.name;
121
+ var f;
122
+ const c = /* @__PURE__ */ new Map();
123
+ return (f = i.value.regionByIndex) == null || f.forEach((s) => {
124
+ let l = s.name;
125
125
  if (n.forFrequency) {
126
- const S = {
127
- value: i.key,
126
+ const x = {
127
+ value: s.key,
128
128
  title: l
129
129
  };
130
- u.has(i.key) || u.set(i.key, S);
130
+ c.has(s.key) || c.set(s.key, x);
131
131
  return;
132
132
  }
133
- i.device && (l += " (" + d.Common["Device_" + i.device] + ")");
134
- const y = ae(s.value.key || 0, i.lang ?? "");
133
+ s.device && (l += " (" + v.Common["Device_" + s.device] + ")");
134
+ const y = ae(i.value.key || 0, s.lang ?? "");
135
135
  y && (l += " / " + y);
136
- const f = {
137
- value: i.index,
136
+ const m = {
137
+ value: s.index,
138
138
  title: l,
139
- icon: i.device ? re(i.device) : void 0
139
+ icon: s.device ? re(s.device) : void 0
140
140
  };
141
- u.set(i.index, f);
142
- }), u;
141
+ c.set(s.index, m);
142
+ }), c;
143
143
  });
144
- return B(e, (u, v) => {
145
- var f;
146
- if (n.onlySearcher || t.value !== void 0 && u.get(t.value))
144
+ return B(e, (c, f) => {
145
+ var m;
146
+ if (n.onlySearcher || t.value !== void 0 && c.get(t.value))
147
147
  return;
148
- let i = u.keys().next().value;
149
- if (t.value === h || i === h) {
150
- t.value = i;
148
+ let s = c.keys().next().value;
149
+ if (t.value === p || s === p) {
150
+ t.value = s;
151
151
  return;
152
152
  }
153
- let l = ((f = v == null ? void 0 : v.get(t.value)) == null ? void 0 : f.title) || "", y = -1;
154
- for (const [S, g] of u.entries()) {
155
- const m = g.title;
156
- if (typeof m != "string" || typeof S == "string")
153
+ let l = ((m = f == null ? void 0 : f.get(t.value)) == null ? void 0 : m.title) || "", y = -1;
154
+ for (const [x, g] of c.entries()) {
155
+ const d = g.title;
156
+ if (typeof d != "string" || typeof x == "string")
157
157
  break;
158
- if (m === l) {
159
- i = S;
158
+ if (d === l) {
159
+ s = x;
160
160
  break;
161
161
  }
162
- const p = new RegExp(` \\((${d.Common.Device_1}|${d.Common.Device_2})\\)`);
163
- let x = l, C = 3;
164
- m.indexOf(x) === -1 && (x = l.replace(/^[^a-zа-я]/i, "").replace(p, ""), C--), m.indexOf(x) === -1 && (x = l.replace(/ \/.*/, ""), C--), m.indexOf(x) === -1 && (x = l.replace(/ \/.*/, ""), x = x.replace(/^[^a-zа-я]/i, "").replace(p, ""), C--), m.indexOf(x) !== -1 && (C <= y || (y = C, i = S));
162
+ const I = new RegExp(` \\((${v.Common.Device_1}|${v.Common.Device_2})\\)`);
163
+ let h = l, k = 3;
164
+ d.indexOf(h) === -1 && (h = l.replace(/^[^a-zа-я]/i, "").replace(I, ""), k--), d.indexOf(h) === -1 && (h = l.replace(/ \/.*/, ""), k--), d.indexOf(h) === -1 && (h = l.replace(/ \/.*/, ""), h = h.replace(/^[^a-zа-я]/i, "").replace(I, ""), k--), d.indexOf(h) !== -1 && (k <= y || (y = k, s = x));
165
165
  }
166
- t.value = i;
166
+ t.value = s;
167
167
  }), {
168
168
  regionIndex: t,
169
169
  optionByRegionIndex: e
170
170
  };
171
- }, me = (n, s, d) => {
171
+ }, me = (n, i, v) => {
172
172
  const t = F([]), e = () => {
173
- if (n.onlySearcher && s.value) {
174
- t.value = Array.from(s.value.keys());
173
+ if (n.onlySearcher && i.value) {
174
+ t.value = Array.from(i.value.keys());
175
175
  return;
176
176
  }
177
177
  let o = [];
@@ -184,7 +184,7 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
184
184
  ) ?? [];
185
185
  } catch {
186
186
  }
187
- o.length && (o = o.filter((a) => d.value.has(a))), o.length || (o = Array.from(d.value)), t.value = [...o];
187
+ o.length && (o = o.filter((a) => v.value.has(a))), o.length || (o = Array.from(v.value)), t.value = [...o];
188
188
  }, r = () => {
189
189
  t.value.length ? localStorage.setItem("ui:project:regionSelector:" + n.projectId + ":regionsIndexes", JSON.stringify(t.value)) : localStorage.removeItem("ui:project:regionSelector:" + n.projectId + ":regionsIndexes");
190
190
  };
@@ -194,60 +194,61 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
194
194
  regionsIndexes: t
195
195
  };
196
196
  }, ye = (n) => {
197
- const s = R(() => ne(n.forFrequency, n.autoRegion, n.searchers)), d = R(() => s.value.get(e.searcherKey.value) || oe), t = R(() => {
197
+ const i = R(() => ne(n.forFrequency, n.autoRegion, n.searchers)), v = R(() => i.value.get(e.searcherKey.value) || oe), t = R(() => {
198
198
  const l = /* @__PURE__ */ new Set();
199
- return s.value.forEach((y) => {
200
- var f;
201
- (f = y.regions) == null || f.forEach((S) => {
202
- S.index !== -1 && S.index !== h && l.add(S.index);
199
+ return i.value.forEach((y) => {
200
+ var m;
201
+ (m = y.regions) == null || m.forEach((x) => {
202
+ x.index !== -1 && x.index !== p && l.add(x.index);
203
203
  });
204
204
  }), l;
205
- }), e = ge(n, s), r = fe(n, d), o = me(n, s, t);
206
- B(s, () => {
207
- var y, f, S, g, m;
208
- if (e.searcherKey.value === -1) {
209
- o.regionsIndexes.value = o.regionsIndexes.value.filter((p) => t.value.has(p));
210
- return;
211
- }
212
- let l = s.value.keys().next().value;
213
- s.value.forEach((p) => {
214
- var x, C, c;
215
- if (r.regionIndex.value && ((x = p.regionByIndex) != null && x.has(r.regionIndex.value)) && (l = p.key), !n.onlySearcher) {
216
- let I;
217
- l !== void 0 && (I = (C = s.value.get(l)) == null ? void 0 : C.regionByIndex);
218
- const k = (c = s.value.get(p.key)) == null ? void 0 : c.regionByIndex;
219
- I != null && I.has(h) && !(k != null && k.has(h)) && (l = p.key);
205
+ }), e = fe(n, i), r = ge(n, v), o = me(n, i, t);
206
+ B(i, () => {
207
+ var y, m, x, g;
208
+ if (n.onlySearcher ? o.regionsIndexes.value = Array.from(i.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((d) => t.value.has(d)), e.searcherKey.value === -1) return;
209
+ let l = i.value.keys().next().value;
210
+ i.value.forEach((d) => {
211
+ var I, h, k;
212
+ if (n.onlySearcher && d.key === e.searcherKey.value) {
213
+ l = e.searcherKey.value;
214
+ return;
215
+ }
216
+ if (r.regionIndex.value && ((I = d.regionByIndex) != null && I.has(r.regionIndex.value)) && (l = d.key), !n.onlySearcher) {
217
+ let u;
218
+ l !== void 0 && (u = (h = i.value.get(l)) == null ? void 0 : h.regionByIndex);
219
+ const S = (k = i.value.get(d.key)) == null ? void 0 : k.regionByIndex;
220
+ u != null && u.has(p) && !(S != null && S.has(p)) && (l = d.key);
220
221
  }
221
- }), n.addCompare && !e.optionBySearcherKey.value.has(h) && !r.regionIndex.value && (y = o.regionsIndexes.value) != null && y.length && (l = -1), n.onlySearcher && r.regionIndex.value !== h && (l = r.regionIndex.value), l !== void 0 && (e.searcherKey.value = l), r.regionIndex.value !== void 0 && !((S = (f = d.value) == null ? void 0 : f.regionByIndex) != null && S.has(r.regionIndex.value)) && (r.regionIndex.value = (m = (g = d.value) == null ? void 0 : g.regions) == null ? void 0 : m.keys().next().value);
222
+ }), l !== void 0 && (e.searcherKey.value = l), r.regionIndex.value !== void 0 && !((m = (y = v.value) == null ? void 0 : y.regionByIndex) != null && m.has(r.regionIndex.value)) && (r.regionIndex.value = (g = (x = v.value) == null ? void 0 : x.regions) == null ? void 0 : g.keys().next().value);
222
223
  }, { immediate: !0 });
223
224
  const a = () => {
224
- if (!(e.searcherKey.value === -1 || e.searcherKey.value === h))
225
+ if (!(e.searcherKey.value === -1 || e.searcherKey.value === p))
225
226
  return e.searcherKey.value;
226
- }, u = () => {
227
- if (n.onlySearcher || r.regionIndex.value === h) return;
227
+ }, c = () => {
228
+ if (n.onlySearcher || r.regionIndex.value === p) return;
228
229
  let l = r.regionIndex.value;
229
230
  if (n.forFrequency) {
230
- const y = r.regionIndex.value, f = te(n.forFrequency, { searcher_key: a(), key: y }, n.searchers);
231
- l = f == null ? void 0 : f.index;
231
+ const y = r.regionIndex.value, m = te(n.forFrequency, { searcher_key: a(), key: y }, n.searchers);
232
+ l = m == null ? void 0 : m.index;
232
233
  }
233
234
  return l;
234
- }, v = () => {
235
+ }, f = () => {
235
236
  const l = a();
236
237
  if (l !== void 0)
237
- return s.value.get(l);
238
+ return i.value.get(l);
238
239
  };
239
240
  return {
240
241
  selectSearcher: e,
241
242
  selectRegion: r,
242
243
  compare: o,
243
- searcherByKey: s,
244
+ searcherByKey: i,
244
245
  allRegionsIndexes: t,
245
- getSearcher: v,
246
+ getSearcher: f,
246
247
  getRegion: () => {
247
- var y, f;
248
- const l = u();
248
+ var y, m;
249
+ const l = c();
249
250
  if (l !== void 0)
250
- return (f = (y = v()) == null ? void 0 : y.regionByIndex) == null ? void 0 : f.get(l);
251
+ return (m = (y = f()) == null ? void 0 : y.regionByIndex) == null ? void 0 : m.get(l);
251
252
  }
252
253
  };
253
254
  }, he = /* @__PURE__ */ j({
@@ -271,68 +272,68 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
271
272
  modelValueSingleModifiers: {}
272
273
  }),
273
274
  emits: /* @__PURE__ */ N(["compareRegions"], ["update:modelValue", "update:modelValueSingle"]),
274
- setup(n, { expose: s, emit: d }) {
275
- const t = n, e = b(n, "modelValue"), r = b(n, "modelValueSingle"), o = d, {
275
+ setup(n, { expose: i, emit: v }) {
276
+ const t = n, e = b(n, "modelValue"), r = b(n, "modelValueSingle"), o = v, {
276
277
  selectSearcher: a,
277
- selectRegion: u,
278
- compare: v,
279
- searcherByKey: i,
278
+ selectRegion: c,
279
+ compare: f,
280
+ searcherByKey: s,
280
281
  allRegionsIndexes: l,
281
282
  getSearcher: y,
282
- getRegion: f
283
- } = ye(t), S = () => {
283
+ getRegion: m
284
+ } = ye(t), x = () => {
284
285
  var g;
285
286
  if (window.fieldTemplates && ((g = window.fieldTemplates) != null && g.openSelectorRegions)) {
286
287
  window.fieldTemplates.openSelectorRegions(
287
- i.value,
288
- v.regionsIndexes.value,
289
- (m) => v.regionsIndexes.value = m
288
+ s.value,
289
+ f.regionsIndexes.value,
290
+ (d) => f.regionsIndexes.value = d
290
291
  );
291
292
  return;
292
293
  }
293
- o("compareRegions", i.value);
294
+ o("compareRegions", s.value);
294
295
  };
295
- return B([u.regionIndex, a.searcherKey, v.regionsIndexes], () => {
296
- if (a.searcherKey.value === -1 && v.regionsIndexes.value.length) {
297
- if (JSON.stringify(e.value) === JSON.stringify(v.regionsIndexes.value))
296
+ return B([c.regionIndex, a.searcherKey, f.regionsIndexes], () => {
297
+ if (a.searcherKey.value === -1 && f.regionsIndexes.value.length) {
298
+ if (JSON.stringify(e.value) === JSON.stringify(f.regionsIndexes.value))
298
299
  return;
299
- e.value = [...v.regionsIndexes.value];
300
+ e.value = [...f.regionsIndexes.value];
300
301
  } else
301
- e.value = [t.onlySearcher ? a.searcherKey.value : u.regionIndex.value];
302
- l.value.size || (a.searcherKey.value = h);
302
+ e.value = [t.onlySearcher ? a.searcherKey.value : c.regionIndex.value];
303
+ !t.onlySearcher && !l.value.size && (a.searcherKey.value = p);
303
304
  }), r.value && B(r, () => {
304
305
  e.value = [r.value];
305
306
  }, { immediate: !0 }), B(e, () => {
306
- var g, m, p, x, C;
307
+ var g, d, I, h, k;
307
308
  if (e.value[0] && (r.value = e.value[0]), t.onlySearcher) {
308
- if (!e.value.length || e.value.length === 1 && !i.value.has(e.value[0])) {
309
- let c = i.value.keys().next().value;
310
- c !== void 0 && (e.value = [c]);
309
+ if (!e.value.length || e.value.length === 1 && !s.value.has(e.value[0])) {
310
+ let u = s.value.keys().next().value;
311
+ u !== void 0 && (e.value = [u]);
311
312
  return;
312
313
  }
313
- if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(v.regionsIndexes.value)) {
314
- e.value = [...v.regionsIndexes.value];
314
+ if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(f.regionsIndexes.value)) {
315
+ e.value = [...f.regionsIndexes.value];
315
316
  return;
316
317
  }
317
318
  } else {
318
- let c = [...new Set(e.value)], I = (m = (g = i.value.values().next().value) == null ? void 0 : g.regionByIndex) == null ? void 0 : m.keys().next().value;
319
- if (t.forFrequency && (I = (C = (x = (p = i.value.values().next().value) == null ? void 0 : p.regionByIndex) == null ? void 0 : x.values().next().value) == null ? void 0 : C.key), !c.length)
320
- I !== void 0 && c.push(I);
321
- else if (c.length === 1) {
322
- let k = l.value;
323
- t.forFrequency && (k = /* @__PURE__ */ new Set(), i.value.forEach((O) => {
319
+ let u = [...new Set(e.value)], S = (d = (g = s.value.values().next().value) == null ? void 0 : g.regionByIndex) == null ? void 0 : d.keys().next().value;
320
+ if (t.forFrequency && (S = (k = (h = (I = s.value.values().next().value) == null ? void 0 : I.regionByIndex) == null ? void 0 : h.values().next().value) == null ? void 0 : k.key), !u.length)
321
+ S !== void 0 && u.push(S);
322
+ else if (u.length === 1) {
323
+ let K = l.value;
324
+ t.forFrequency && (K = /* @__PURE__ */ new Set(), s.value.forEach((O) => {
324
325
  O.regionByIndex.forEach((M) => {
325
- M.index !== -1 && M.index !== h && k.add(M.key);
326
+ M.index !== -1 && M.index !== p && K.add(M.key);
326
327
  });
327
- })), !k.has(c[0]) && c[0] !== -2 && (c = [], I !== void 0 && c.push(I));
328
+ })), !K.has(u[0]) && u[0] !== -2 && (u = [], S !== void 0 && u.push(S));
328
329
  } else
329
- c = c.filter((k) => l.value.has(k)), !c.length && I !== void 0 && c.push(I);
330
- if (JSON.stringify(e.value) !== JSON.stringify(c)) {
331
- e.value = c;
330
+ u = u.filter((K) => l.value.has(K)), !u.length && S !== void 0 && u.push(S);
331
+ if (JSON.stringify(e.value) !== JSON.stringify(u)) {
332
+ e.value = u;
332
333
  return;
333
334
  }
334
335
  }
335
- if (!(e.value.length === 1 && e.value[0] === (t.onlySearcher ? a.searcherKey.value : u.regionIndex.value)))
336
+ if (!(e.value.length === 1 && e.value[0] === (t.onlySearcher ? a.searcherKey.value : c.regionIndex.value)))
336
337
  if (t.onlySearcher) {
337
338
  if (e.value.length === 1) {
338
339
  a.searcherKey.value = e.value[0];
@@ -341,54 +342,54 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
341
342
  a.searcherKey.value = -1;
342
343
  return;
343
344
  } else if (e.value.length === 1 && a.searcherKey.value !== -1) {
344
- u.regionIndex.value = e.value[0];
345
- let c;
346
- for (const I of i.value.values()) {
347
- for (const k of I.regionByIndex.values())
348
- if ((t.forFrequency ? k.key : k.index) === u.regionIndex.value) {
349
- c = I.key;
345
+ c.regionIndex.value = e.value[0];
346
+ let u;
347
+ for (const S of s.value.values()) {
348
+ for (const K of S.regionByIndex.values())
349
+ if ((t.forFrequency ? K.key : K.index) === c.regionIndex.value) {
350
+ u = S.key;
350
351
  break;
351
352
  }
352
- if (c !== void 0)
353
+ if (u !== void 0)
353
354
  break;
354
355
  }
355
- c !== void 0 && (a.searcherKey.value = c);
356
+ u !== void 0 && (a.searcherKey.value = u);
356
357
  } else
357
- a.searcherKey.value = -1, v.regionsIndexes.value = [...e.value];
358
- }, { immediate: !0 }), s({
358
+ a.searcherKey.value = -1, f.regionsIndexes.value = [...e.value];
359
+ }, { immediate: !0 }), i({
359
360
  getSearcher: y,
360
- getRegion: f
361
- }), (g, m) => (V(), q("div", {
361
+ getRegion: m
362
+ }), (g, d) => (V(), q("div", {
362
363
  class: D({
363
364
  "top-selectorRegion": !0,
364
365
  "top-selectorRegion-onlySearcher": g.onlySearcher
365
366
  })
366
367
  }, [
367
- J($, {
368
- options: K(a).optionBySearcherKey.value,
369
- modelValue: K(a).searcherKey.value,
370
- "onUpdate:modelValue": m[0] || (m[0] = (p) => K(a).searcherKey.value = p),
368
+ A($, {
369
+ options: C(a).optionBySearcherKey.value,
370
+ modelValue: C(a).searcherKey.value,
371
+ "onUpdate:modelValue": d[0] || (d[0] = (I) => C(a).searcherKey.value = I),
371
372
  name: "searcher_key",
372
373
  addChanger: g.addChanger
373
374
  }, null, 8, ["options", "modelValue", "addChanger"]),
374
- !g.onlySearcher && K(a).searcherKey.value !== -1 ? (V(), w($, {
375
+ !g.onlySearcher && C(a).searcherKey.value !== -1 ? (V(), w($, {
375
376
  key: 0,
376
377
  class: "top-select-region",
377
- options: K(u).optionByRegionIndex.value,
378
- modelValue: K(u).regionIndex.value,
379
- "onUpdate:modelValue": m[1] || (m[1] = (p) => K(u).regionIndex.value = p),
378
+ options: C(c).optionByRegionIndex.value,
379
+ modelValue: C(c).regionIndex.value,
380
+ "onUpdate:modelValue": d[1] || (d[1] = (I) => C(c).regionIndex.value = I),
380
381
  name: g.forFrequency ? "region_key" : "region_index",
381
382
  addChanger: g.addChanger,
382
383
  "data-top-icon": g.addRegionIcon ? "" : void 0
383
384
  }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : T("", !0),
384
- g.addCompare && !g.onlySearcher && K(a).searcherKey.value === -1 ? (V(), w(z, {
385
+ g.addCompare && !g.onlySearcher && C(a).searcherKey.value === -1 ? (V(), w(z, {
385
386
  key: 1,
386
387
  name: "compare",
387
- onClick: S,
388
- "data-count-compare-regions-indexes": K(v).regionsIndexes.value.length
388
+ onClick: x,
389
+ "data-count-compare-regions-indexes": C(f).regionsIndexes.value.length
389
390
  }, {
390
391
  default: _(() => [
391
- A(E(g.$i18n.Common.Selected_regions), 1)
392
+ J(E(g.$i18n.Common.Selected_regions), 1)
392
393
  ]),
393
394
  _: 1
394
395
  }, 8, ["data-count-compare-regions-indexes"])) : T("", !0)
@@ -404,7 +405,7 @@ const ie = { class: "top-selectorCompetitors" }, se = { class: "top-ellipsis1" }
404
405
  "top-selectorRegion-onlySearcher": "top-selectorRegion-onlySearcher"
405
406
  }, xe = {
406
407
  $style: pe
407
- }, Ie = /* @__PURE__ */ U(he, [["__cssModules", xe]]), _e = ve, we = Ie;
408
+ }, Se = /* @__PURE__ */ U(he, [["__cssModules", xe]]), _e = ve, we = Se;
408
409
  export {
409
410
  _e as TopSelectorCompetitors,
410
411
  we as TopSelectorRegion