@topvisor/ui 1.4.3-fixSelector2.0 → 1.4.3-fixTabsView.1

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 (104) hide show
  1. package/.chunks/{core-Baaq63Be.es.js → core-Dgj_YGWh.es.js} +94 -87
  2. package/.chunks/{core-Baaq63Be.es.js.map → core-Dgj_YGWh.es.js.map} +1 -1
  3. package/.chunks/{core-DCw0zLc3.amd.js → core-DzDFXOdI.amd.js} +2 -2
  4. package/.chunks/{core-DCw0zLc3.amd.js.map → core-DzDFXOdI.amd.js.map} +1 -1
  5. package/.chunks/{datepicker-DPgavbKe.es.js → datepicker-qToxk2nN.es.js} +2 -2
  6. package/.chunks/{datepicker-DPgavbKe.es.js.map → datepicker-qToxk2nN.es.js.map} +1 -1
  7. package/.chunks/{dialog_regionSelectorRegions-D7x41iZu.es.js → dialog_regionSelectorRegions-qDW2Ejsv.es.js} +5 -5
  8. package/.chunks/{dialog_regionSelectorRegions-D7x41iZu.es.js.map → dialog_regionSelectorRegions-qDW2Ejsv.es.js.map} +1 -1
  9. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-D8WYUfXI.es.js → dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js} +3 -3
  10. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-D8WYUfXI.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js.map} +1 -1
  11. package/.chunks/{forms-BpbQYyEQ.es.js → forms-DtC-EKJL.es.js} +24 -24
  12. package/.chunks/{forms-BpbQYyEQ.es.js.map → forms-DtC-EKJL.es.js.map} +1 -1
  13. package/.chunks/lazy-DDNqYkXn.amd.js +2 -0
  14. package/.chunks/lazy-DDNqYkXn.amd.js.map +1 -0
  15. package/.chunks/{lazy-40pjr8cZ.es.js → lazy-HKSyLh72.es.js} +23 -19
  16. package/.chunks/lazy-HKSyLh72.es.js.map +1 -0
  17. package/.chunks/{notice-Ckc8r96E.es.js → notice-BvQl911b.es.js} +3 -3
  18. package/.chunks/{notice-Ckc8r96E.es.js.map → notice-BvQl911b.es.js.map} +1 -1
  19. package/.chunks/{page.vue_vue_type_script_setup_true_lang-D3_o-DIM.es.js → page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js} +9 -9
  20. package/.chunks/{page.vue_vue_type_script_setup_true_lang-D3_o-DIM.es.js.map → page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js.map} +1 -1
  21. package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js +519 -0
  22. package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js.map +1 -0
  23. package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js +2 -0
  24. package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js.map +1 -0
  25. package/.chunks/{popup-DpyyE2Cs.es.js → popup-OuDglAOF.es.js} +2 -2
  26. package/.chunks/{popup-DpyyE2Cs.es.js.map → popup-OuDglAOF.es.js.map} +1 -1
  27. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-CdQostog.amd.js → popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js} +2 -2
  28. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-CdQostog.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js.map} +1 -1
  29. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js → popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js} +5 -5
  30. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js.map → popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js.map} +1 -1
  31. package/.chunks/{utils-MzIaxkRQ.es.js → utils-BNzP9anP.es.js} +2 -2
  32. package/.chunks/{utils-MzIaxkRQ.es.js.map → utils-BNzP9anP.es.js.map} +1 -1
  33. package/.chunks/{utils-CyE38wuQ.es.js → utils-Dma85ehT.es.js} +3 -3
  34. package/.chunks/{utils-CyE38wuQ.es.js.map → utils-Dma85ehT.es.js.map} +1 -1
  35. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Dy8jWadl.es.js → widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js} +6 -6
  36. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Dy8jWadl.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js.map} +1 -1
  37. package/api/index.amd.js +1 -1
  38. package/api/index.js +6 -6
  39. package/assets/policy.css +1 -1
  40. package/assets/project.css +1 -1
  41. package/assets/tabsView.css +1 -1
  42. package/charts/charts.js +14 -14
  43. package/core/app.amd.js +1 -1
  44. package/core/app.js +15 -15
  45. package/dialog/dialog.js +6 -6
  46. package/extra/extra.js +2 -2
  47. package/forms/forms.js +1 -1
  48. package/formsExt/formsExt.amd.js +1 -1
  49. package/formsExt/formsExt.js +21 -21
  50. package/icomoon/Topvisor icons.json +285 -229
  51. package/icomoon/demo.html +29 -1
  52. package/icomoon/fonts/Topvisor-2.eot +0 -0
  53. package/icomoon/fonts/Topvisor-2.svg +2 -0
  54. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  55. package/icomoon/fonts/Topvisor-2.woff +0 -0
  56. package/icomoon/selection.json +1 -1
  57. package/icomoon/style.css +11 -5
  58. package/layout/layout.js +7 -7
  59. package/package.json +2 -2
  60. package/popup/popup.amd.js +1 -1
  61. package/popup/popup.js +9 -9
  62. package/popup/worker.js +2 -2
  63. package/project/project.amd.js +1 -1
  64. package/project/project.amd.js.map +1 -1
  65. package/project/project.js +1008 -629
  66. package/project/project.js.map +1 -1
  67. package/src/components/formsExt/selector2/composables/useMenu.d.ts +1 -1
  68. package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
  69. package/src/components/formsExt/selector2/types.d.ts +35 -1
  70. package/src/components/formsExt/selector2/utils.d.ts +2 -0
  71. package/src/components/project/groupSelector/folders/utils.d.ts +6 -26
  72. package/src/components/project/groupSelector/groupSelector.vue.d.ts +1 -1
  73. package/src/components/project/groupSelector/groups/groups.vue.d.ts +13 -6
  74. package/src/components/project/groupSelector/groups/utils.d.ts +18 -53
  75. package/src/components/project/groupSelector/utils.d.ts +37 -0
  76. package/src/components/project/project.d.ts +2 -0
  77. package/src/components/project/projectSelector/cache.d.ts +29 -0
  78. package/src/components/project/projectSelector/projectSelector.vue.d.ts +128 -0
  79. package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
  80. package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
  81. package/src/components/project/projectSelector/types.d.ts +48 -0
  82. package/src/components/project/projectSelector/utils.d.ts +240 -0
  83. package/src/components/tabsView/tabsView/menu.vue.d.ts +2 -6
  84. package/src/core/directives/tooltip.d.ts +2 -6
  85. package/tabs/tabs.js +5 -5
  86. package/tabsView/tabsView.amd.js +1 -1
  87. package/tabsView/tabsView.amd.js.map +1 -1
  88. package/tabsView/tabsView.js +93 -104
  89. package/tabsView/tabsView.js.map +1 -1
  90. package/utils/clipboard.js +1 -1
  91. package/utils/date.js +1 -1
  92. package/utils/device.js +1 -1
  93. package/utils/lodash.js +1 -1
  94. package/utils/price.js +1 -1
  95. package/utils/searchers.amd.js +1 -1
  96. package/utils/searchers.js +3 -3
  97. package/utils/string.js +1 -1
  98. package/.chunks/lazy-40pjr8cZ.es.js.map +0 -1
  99. package/.chunks/lazy-DSFLxvj4.amd.js +0 -2
  100. package/.chunks/lazy-DSFLxvj4.amd.js.map +0 -1
  101. package/.chunks/policy.vue_vue_type_style_index_0_lang-BDyhjT5Y.amd.js +0 -2
  102. package/.chunks/policy.vue_vue_type_style_index_0_lang-BDyhjT5Y.amd.js.map +0 -1
  103. package/.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js +0 -498
  104. package/.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js.map +0 -1
@@ -3,20 +3,23 @@
3
3
  const fileNames = ['../assets/project.css'].map(fileName => import.meta.resolve(fileName));
4
4
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
5
5
 
6
- import { defineComponent as R, mergeModels as b, useModel as T, computed as w, createElementBlock as A, openBlock as h, createBlock as C, unref as v, withCtx as B, Fragment as H, renderList as me, normalizeClass as X, createElementVNode as oe, toDisplayString as M, createVNode as P, createTextVNode as J, toValue as ye, ref as K, watch as E, createCommentVNode as L, reactive as be, isRef as he, withModifiers as U, mergeProps as Ve, withKeys as Ie, nextTick as Re, resolveDirective as Pe, withDirectives as Ne, resolveDynamicComponent as qe, renderSlot as De, shallowRef as Fe, createSlots as Ue } from "vue";
7
- import { u as V, C as z, e as Q, q as ce, d as ze } from "../.chunks/forms-BpbQYyEQ.es.js";
8
- import { _ as Me, b as ve, a as Je } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js";
9
- import { a as We, _ as we, b as $e, c as Ee, I as ue } from "../.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js";
10
- import { u as Ye } from "../.chunks/utils-MzIaxkRQ.es.js";
11
- import { getSearcherGIcon as He, getLangLabel as Qe, getDeviceGIcon as _e } from "../utils/searchers.js";
12
- import "../.chunks/core-Baaq63Be.es.js";
13
- import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-D8WYUfXI.es.js";
14
- import { g as Se } from "../.chunks/field-CyyFzM-Y.es.js";
15
- import { storage as W } from "../utils/dom.js";
16
- import { TopPopupWorker as Xe } from "../popup/worker.js";
17
- const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" }, Pt = /* @__PURE__ */ R({
6
+ import { defineComponent as K, useModel as P, computed as E, openBlock as h, createElementBlock as j, unref as v, createBlock as A, withCtx as B, Fragment as F, renderList as pe, normalizeClass as oe, createElementVNode as N, toDisplayString as b, createVNode as U, createTextVNode as W, mergeModels as G, toValue as be, ref as _, watch as L, createCommentVNode as M, reactive as De, resolveComponent as Fe, shallowRef as qe, onMounted as et, withModifiers as H, isRef as Pe, mergeProps as We, withKeys as Ee, nextTick as tt, resolveDirective as ot, withDirectives as at, resolveDynamicComponent as lt, renderSlot as nt, createSlots as rt } from "vue";
7
+ import { u as w, C as X, e as ee, q as xe, d as it } from "../.chunks/forms-DtC-EKJL.es.js";
8
+ import { _ as je, a as Ae, b as dt } from "../.chunks/popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js";
9
+ import { _ as st, b as Be, c as He, I as Je, a as ye } from "../.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js";
10
+ import { u as ut } from "../.chunks/utils-BNzP9anP.es.js";
11
+ import { getSearcherGIcon as ct, getLangLabel as ft, getDeviceGIcon as gt } from "../utils/searchers.js";
12
+ import "../.chunks/core-Dgj_YGWh.es.js";
13
+ import "../.chunks/dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js";
14
+ import { g as ie, a as le } from "../.chunks/field-CyyFzM-Y.es.js";
15
+ import { validUrl as mt } from "../utils/check.js";
16
+ import { ellipsis as vt } from "../utils/string.js";
17
+ import { invertKeyboardLayout as pt } from "../utils/keyboard.js";
18
+ import { storage as Z } from "../utils/dom.js";
19
+ import { TopPopupWorker as ht } from "../popup/worker.js";
20
+ const yt = { class: "top-competitorSelector" }, St = { class: "top-ellipsis1" }, Bo = /* @__PURE__ */ K({
18
21
  __name: "competitorSelector",
19
- props: /* @__PURE__ */ b({
22
+ props: /* @__PURE__ */ G({
20
23
  modelValue: {},
21
24
  items: {},
22
25
  showSelectAllItem: { type: Boolean, default: !0 }
@@ -26,64 +29,64 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
26
29
  }),
27
30
  emits: ["update:modelValue"],
28
31
  setup(e) {
29
- const a = e, o = T(e, "modelValue"), t = w(() => {
30
- if (a.showSelectAllItem)
32
+ const t = e, o = P(e, "modelValue"), a = E(() => {
33
+ if (t.showSelectAllItem)
31
34
  return {
32
35
  icon: "",
33
- title: V().Common.Select_all,
36
+ title: w().Common.Select_all,
34
37
  value: "all",
35
38
  content: ""
36
39
  };
37
40
  });
38
- return (r, l) => (h(), A("div", Ze, [
39
- v(z).state.isMobile ? (h(), C(Me, { key: 0 }, {
41
+ return (n, l) => (h(), j("div", yt, [
42
+ v(X).state.isMobile ? (h(), A(je, { key: 0 }, {
40
43
  opener: B(() => [
41
- P(Q, {
44
+ U(ee, {
42
45
  class: "top-competitorSelector_opener",
43
46
  color: "theme",
44
47
  icon: "",
45
48
  icon2: ""
46
49
  }, {
47
50
  default: B(() => [
48
- J(M(e.items.find((n) => n.value === o.value?.[0])?.content), 1)
51
+ W(b(e.items.find((r) => r.value === o.value?.[0])?.content), 1)
49
52
  ]),
50
53
  _: 1
51
54
  })
52
55
  ]),
53
56
  contentList: B(() => [
54
- (h(!0), A(H, null, me(e.items, (n) => (h(), C(ve, {
55
- class: X({
56
- "top-active": o.value?.includes(n.value)
57
+ (h(!0), j(F, null, pe(e.items, (r) => (h(), A(Ae, {
58
+ class: oe({
59
+ "top-active": o.value?.includes(r.value)
57
60
  }),
58
- "data-top-icon": n.icon,
59
- title: n.title,
60
- onClick: () => o.value = [n.value]
61
+ "data-top-icon": r.icon,
62
+ title: r.title,
63
+ onClick: () => o.value = [r.value]
61
64
  }, {
62
65
  default: B(() => [
63
- oe("span", et, M(n.content), 1)
66
+ N("span", St, b(r.content), 1)
64
67
  ]),
65
68
  _: 2
66
69
  }, 1032, ["class", "data-top-icon", "title", "onClick"]))), 256))
67
70
  ]),
68
71
  _: 1
69
- })) : (h(), C(We, {
72
+ })) : (h(), A(st, {
70
73
  key: 1,
71
74
  modelValue: o.value,
72
- "onUpdate:modelValue": l[0] || (l[0] = (n) => o.value = n),
75
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => o.value = r),
73
76
  items: e.items,
74
77
  isMultiple: !0,
75
78
  styling: "bar",
76
79
  canBeEmptyMultiple: !1,
77
- selectAllItem: t.value
80
+ selectAllItem: a.value
78
81
  }, null, 8, ["modelValue", "items", "selectAllItem"]))
79
82
  ]));
80
83
  }
81
- }), Nt = (e, a) => w(() => ye(e).filter((r) => r.on >= 0 || r.id === a).map((r) => ({
82
- value: r.id,
83
- title: r.url + ` [${r.id}]`,
84
- icon: r.id === ye(a) ? "" : "",
85
- content: r.name
86
- }))), O = -1, y = -2, le = -1, tt = {
84
+ }), wo = (e, t) => E(() => be(e).filter((n) => n.on >= 0 || n.id === t).map((n) => ({
85
+ value: n.id,
86
+ title: n.url + ` [${n.id}]`,
87
+ icon: n.id === be(t) ? "" : "",
88
+ content: n.name
89
+ }))), D = -1, S = -2, de = -1, It = {
87
90
  0: "Yandex",
88
91
  1: "Google",
89
92
  4: "YouTube",
@@ -93,241 +96,241 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
93
96
  9: "GoogleStore",
94
97
  20: "Yandex.com",
95
98
  21: "Yandex.com.tr"
96
- }, xe = {
97
- key: y,
99
+ }, Me = {
100
+ key: S,
98
101
  name: "--",
99
- index: y
100
- }, Ge = {
101
- key: y,
102
+ index: S
103
+ }, ze = {
104
+ key: S,
102
105
  name: "--",
103
- regions: [xe],
104
- regionByIndex: /* @__PURE__ */ new Map([[y, xe]])
105
- }, ae = {
106
- key: y,
107
- name: "Autoselect",
108
- index: y
106
+ regions: [Me],
107
+ regionByIndex: /* @__PURE__ */ new Map([[S, Me]])
109
108
  }, se = {
110
- key: y,
109
+ key: S,
110
+ name: "Autoselect",
111
+ index: S
112
+ }, Se = {
113
+ key: S,
111
114
  name: "Autoselect",
112
- regions: [ae],
113
- regionByIndex: /* @__PURE__ */ new Map([[y, ae]])
114
- }, ke = {
115
+ regions: [se],
116
+ regionByIndex: /* @__PURE__ */ new Map([[S, se]])
117
+ }, _e = {
115
118
  countryCode: "00",
116
119
  depth: 1,
117
120
  device: 0,
118
- key: le,
119
- index: le,
121
+ key: de,
122
+ index: de,
120
123
  lang: "ru",
121
124
  name: "Without region"
122
- }, ot = () => (ae.name = V().Common.Autoselect, ae), lt = () => (ot(), se.name = V().Common.Autoselect, console.log(se), se), at = () => (ke.name = V().Keywords.Without_region, ke), Ke = (e = !1, a = !1, o = []) => {
123
- let t;
124
- return e ? t = nt(o) : t = Le(o), a && t.set(y, lt()), t.size || t.set(y, Ge), t;
125
- }, Le = (e, a = !0, o = [], t = !1) => {
126
- const r = /* @__PURE__ */ new Map();
125
+ }, xt = () => (se.name = w().Common.Autoselect, se), Ct = () => (xt(), Se.name = w().Common.Autoselect, console.log(Se), Se), kt = () => (_e.name = w().Keywords.Without_region, _e), Ye = (e = !1, t = !1, o = []) => {
126
+ let a;
127
+ return e ? a = Tt(o) : a = Qe(o), t && a.set(S, Ct()), a.size || a.set(S, ze), a;
128
+ }, Qe = (e, t = !0, o = [], a = !1) => {
129
+ const n = /* @__PURE__ */ new Map();
127
130
  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((u) => {
131
- if (a && !u.enabled) return;
132
- const f = { ...u };
133
- n.regionByIndex.set(f.index, f);
134
- }), !n.regionByIndex.size && o.length, // режим вывода ПС без регионов
131
+ if (!l.enabled || a && typeof l.key == "number" && l.key > 1) return;
132
+ const r = { ...l };
133
+ r.regionByIndex = /* @__PURE__ */ new Map(), l.regions && l.regions.forEach((i) => {
134
+ if (t && !i.enabled) return;
135
+ const u = { ...i };
136
+ r.regionByIndex.set(u.index, u);
137
+ }), !r.regionByIndex.size && o.length, // режим вывода ПС без регионов
135
138
  (!l.regions || // есть включенные регионы
136
- n.regionByIndex.size || // запрошен вывод конкретных ПС
137
- o.length) && r.set(n.key, n);
139
+ r.regionByIndex.size || // запрошен вывод конкретных ПС
140
+ o.length) && n.set(r.key, r);
138
141
  }), o.forEach((l) => {
139
- if (r.has(l)) return;
140
- const n = {
142
+ if (n.has(l)) return;
143
+ const r = {
141
144
  key: l,
142
- name: tt[l],
145
+ name: It[l],
143
146
  regions: [],
144
147
  regionByIndex: /* @__PURE__ */ new Map()
145
148
  };
146
- r.set(n.key, n);
147
- }), r;
148
- }, nt = (e) => {
149
- const a = Le(e, !1, [0, 1], !0);
150
- if (a.has(2)) {
151
- const o = a.get(2);
149
+ n.set(r.key, r);
150
+ }), n;
151
+ }, Tt = (e) => {
152
+ const t = Qe(e, !1, [0, 1], !0);
153
+ if (t.has(2)) {
154
+ const o = t.get(2);
152
155
  o && (o.regionByIndex = /* @__PURE__ */ new Map());
153
156
  }
154
- return a.forEach((o) => {
157
+ return t.forEach((o) => {
155
158
  if (!o.regionByIndex) return;
156
- const t = { ...at() };
157
- o.regionByIndex.set(t.index, t);
158
- }), a;
159
- }, rt = (e, a, o = []) => {
160
- const t = Ke(e, !1, o);
161
- let r;
162
- return t.forEach((l) => {
163
- if (!(a.searcher_key !== void 0 && a.searcher_key != l.key) && l.regions && (l.regions.forEach((n) => {
164
- if (!r && !(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)))
165
- return n.searcher_key = l.key, r = n, !1;
166
- }), r))
159
+ const a = { ...kt() };
160
+ o.regionByIndex.set(a.index, a);
161
+ }), t;
162
+ }, jt = (e, t, o = []) => {
163
+ const a = Ye(e, !1, o);
164
+ let n;
165
+ return a.forEach((l) => {
166
+ if (!(t.searcher_key !== void 0 && t.searcher_key != l.key) && l.regions && (l.regions.forEach((r) => {
167
+ if (!n && !(t.key !== void 0 && t.key != r.key) && !(t.index !== void 0 && t.index != r.index) && !(!e && (t.lang !== void 0 && t.lang != r.lang || t.device !== void 0 && t.device != r.device)))
168
+ return r.searcher_key = l.key, n = r, !1;
169
+ }), n))
167
170
  return !1;
168
- }), r;
169
- }, it = Ye(() => import("../.chunks/dialog_regionSelectorRegions-D7x41iZu.es.js")), dt = (e, a) => {
170
- const o = V(), t = K(a.value.keys().next().value ?? y), r = w(() => {
171
+ }), n;
172
+ }, At = ut(() => import("../.chunks/dialog_regionSelectorRegions-qDW2Ejsv.es.js")), Bt = (e, t) => {
173
+ const o = w(), a = _(t.value.keys().next().value ?? S), n = E(() => {
171
174
  const l = /* @__PURE__ */ new Map();
172
- if (a.value.forEach((n) => {
173
- let u = {
174
- value: n.key,
175
- title: n.name
175
+ if (t.value.forEach((r) => {
176
+ let i = {
177
+ value: r.key,
178
+ title: r.name
176
179
  };
177
- e.addSearcherIcon && (u.icon = He(n.key)), l.set(n.key, u);
178
- }), e.addCompare && !l.has(y)) {
179
- const n = {
180
+ e.addSearcherIcon && (i.icon = ct(r.key)), l.set(r.key, i);
181
+ }), e.addCompare && !l.has(S)) {
182
+ const r = {
180
183
  value: "",
181
184
  title: "--------------------",
182
185
  disabled: !0
183
186
  };
184
- l.set(n.value, n);
185
- const u = {
186
- value: O,
187
+ l.set(r.value, r);
188
+ const i = {
189
+ value: D,
187
190
  title: o.Common.Compare
188
191
  };
189
- l.set(u.value, u);
192
+ l.set(i.value, i);
190
193
  }
191
194
  return l;
192
195
  });
193
196
  return {
194
- searcherKey: t,
195
- optionBySearcherKey: r
197
+ searcherKey: a,
198
+ optionBySearcherKey: n
196
199
  };
197
- }, ut = (e, a) => {
198
- const o = V(), t = K(y);
199
- e.modelValue.length === 1 && (t.value = e.modelValue[0]), t.value === y && (e.forFrequency ? t.value = a.value?.regionByIndex.values().next().value?.key ?? y : t.value = a.value?.regionByIndex.keys().next().value ?? y);
200
- const r = w(() => {
200
+ }, wt = (e, t) => {
201
+ const o = w(), a = _(S);
202
+ e.modelValue.length === 1 && (a.value = e.modelValue[0]), a.value === S && (e.forFrequency ? a.value = t.value?.regionByIndex.values().next().value?.key ?? S : a.value = t.value?.regionByIndex.keys().next().value ?? S);
203
+ const n = E(() => {
201
204
  const l = /* @__PURE__ */ new Map();
202
- return a.value.regionByIndex?.forEach((n) => {
203
- let u = n.name;
205
+ return t.value.regionByIndex?.forEach((r) => {
206
+ let i = r.name;
204
207
  if (e.forFrequency) {
205
208
  const x = {
206
- value: n.key,
207
- title: u
209
+ value: r.key,
210
+ title: i
208
211
  };
209
- l.has(n.key) || l.set(n.key, x);
212
+ l.has(r.key) || l.set(r.key, x);
210
213
  return;
211
214
  }
212
- n.device && (u += " (" + o.Common["Device_" + n.device] + ")");
213
- const f = Qe(a.value.key || 0, n.lang ?? "");
214
- f && (u += " / " + f);
215
- const c = {
216
- value: n.index,
217
- title: u,
218
- icon: n.device ? _e(n.device) : void 0
215
+ r.device && (i += " (" + o.Common["Device_" + r.device] + ")");
216
+ const u = ft(t.value.key || 0, r.lang ?? "");
217
+ u && (i += " / " + u);
218
+ const g = {
219
+ value: r.index,
220
+ title: i,
221
+ icon: r.device ? gt(r.device) : void 0
219
222
  };
220
- l.set(n.index, c);
223
+ l.set(r.index, g);
221
224
  }), l;
222
225
  });
223
- return E(r, (l, n) => {
224
- if (e.onlySearcher || t.value !== void 0 && l.get(t.value))
226
+ return L(n, (l, r) => {
227
+ if (e.onlySearcher || a.value !== void 0 && l.get(a.value))
225
228
  return;
226
- let u = l.keys().next().value;
227
- if (t.value === y || u === y) {
228
- t.value = u;
229
+ let i = l.keys().next().value;
230
+ if (a.value === S || i === S) {
231
+ a.value = i;
229
232
  return;
230
233
  }
231
- let f = n?.get(t.value)?.title || "", c = -1;
232
- for (const [x, i] of l.entries()) {
233
- const m = i.title;
234
- if (typeof m != "string" || typeof x == "string")
234
+ let u = r?.get(a.value)?.title || "", g = -1;
235
+ for (const [x, d] of l.entries()) {
236
+ const f = d.title;
237
+ if (typeof f != "string" || typeof x == "string")
235
238
  break;
236
- if (m === f) {
237
- u = x;
239
+ if (f === u) {
240
+ i = x;
238
241
  break;
239
242
  }
240
- const d = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
241
- let s = f, g = 3;
242
- m.indexOf(s) === -1 && (s = f.replace(/^[^a-zа-я]/i, "").replace(d, ""), g--), m.indexOf(s) === -1 && (s = f.replace(/ \/.*/, ""), g--), m.indexOf(s) === -1 && (s = f.replace(/ \/.*/, ""), s = s.replace(/^[^a-zа-я]/i, "").replace(d, ""), g--), m.indexOf(s) !== -1 && (g <= c || (c = g, u = x));
243
+ const s = new RegExp(` \\((${o.Common.Device_1}|${o.Common.Device_2})\\)`);
244
+ let c = u, m = 3;
245
+ f.indexOf(c) === -1 && (c = u.replace(/^[^a-zа-я]/i, "").replace(s, ""), m--), f.indexOf(c) === -1 && (c = u.replace(/ \/.*/, ""), m--), f.indexOf(c) === -1 && (c = u.replace(/ \/.*/, ""), c = c.replace(/^[^a-zа-я]/i, "").replace(s, ""), m--), f.indexOf(c) !== -1 && (m <= g || (g = m, i = x));
243
246
  }
244
- t.value = u;
247
+ a.value = i;
245
248
  }), {
246
- regionIndex: t,
247
- optionByRegionIndex: r
249
+ regionIndex: a,
250
+ optionByRegionIndex: n
248
251
  };
249
- }, st = (e, a, o) => {
250
- const t = K([]), r = () => {
251
- if (e.onlySearcher && a.value) {
252
- t.value = Array.from(a.value.keys());
252
+ }, $t = (e, t, o) => {
253
+ const a = _([]), n = () => {
254
+ if (e.onlySearcher && t.value) {
255
+ a.value = Array.from(t.value.keys());
253
256
  return;
254
257
  }
255
- let n = [];
258
+ let r = [];
256
259
  if (e.modelValue.length > 1)
257
- n = [...e.modelValue];
260
+ r = [...e.modelValue];
258
261
  else
259
262
  try {
260
- n = JSON.parse(
263
+ r = JSON.parse(
261
264
  localStorage.getItem("ui:project:regionSelector" + e.projectId + ":regionsIndexes")
262
265
  ) ?? [];
263
266
  } catch {
264
267
  }
265
- n.length && (n = n.filter((u) => o.value.has(u))), n.length || (n = Array.from(o.value)), t.value = [...n];
268
+ r.length && (r = r.filter((i) => o.value.has(i))), r.length || (r = Array.from(o.value)), a.value = [...r];
266
269
  }, l = () => {
267
- t.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(t.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
270
+ a.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(a.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
268
271
  };
269
- return E(t, () => {
272
+ return L(a, () => {
270
273
  l();
271
- }), e.addCompare && r(), {
272
- regionsIndexes: t
274
+ }), e.addCompare && n(), {
275
+ regionsIndexes: a
273
276
  };
274
- }, ct = (e) => {
275
- const a = w(() => Ke(e.forFrequency, e.autoRegion, e.searchers)), o = w(() => a.value.get(r.searcherKey.value) || Ge), t = w(() => {
276
- const i = /* @__PURE__ */ new Set();
277
- return a.value.forEach((m) => {
278
- m.regionByIndex.forEach((d) => {
279
- d.index !== le && d.index !== y && i.add(d.index);
277
+ }, bt = (e) => {
278
+ const t = E(() => Ye(e.forFrequency, e.autoRegion, e.searchers)), o = E(() => t.value.get(n.searcherKey.value) || ze), a = E(() => {
279
+ const d = /* @__PURE__ */ new Set();
280
+ return t.value.forEach((f) => {
281
+ f.regionByIndex.forEach((s) => {
282
+ s.index !== de && s.index !== S && d.add(s.index);
280
283
  });
281
- }), i;
282
- }), r = dt(e, a), l = ut(e, o), n = st(e, a, t);
283
- E(a, () => {
284
- if (e.onlySearcher ? n.regionsIndexes.value = Array.from(a.value.keys()) : n.regionsIndexes.value = n.regionsIndexes.value.filter((m) => t.value.has(m)), r.searcherKey.value === O) return;
285
- let i = a.value.keys().next().value;
286
- a.value.forEach((m) => {
287
- if (e.onlySearcher && m.key === r.searcherKey.value) {
288
- i = r.searcherKey.value;
284
+ }), d;
285
+ }), n = Bt(e, t), l = wt(e, o), r = $t(e, t, a);
286
+ L(t, () => {
287
+ if (e.onlySearcher ? r.regionsIndexes.value = Array.from(t.value.keys()) : r.regionsIndexes.value = r.regionsIndexes.value.filter((f) => a.value.has(f)), n.searcherKey.value === D) return;
288
+ let d = t.value.keys().next().value;
289
+ t.value.forEach((f) => {
290
+ if (e.onlySearcher && f.key === n.searcherKey.value) {
291
+ d = n.searcherKey.value;
289
292
  return;
290
293
  }
291
- if (l.regionIndex.value && m.regionByIndex?.has(l.regionIndex.value) && (i = m.key), !e.onlySearcher) {
292
- let d;
293
- i !== void 0 && (d = a.value.get(i)?.regionByIndex);
294
- const s = a.value.get(m.key)?.regionByIndex;
295
- d?.has(y) && !s?.has(y) && (i = m.key);
294
+ if (l.regionIndex.value && f.regionByIndex?.has(l.regionIndex.value) && (d = f.key), !e.onlySearcher) {
295
+ let s;
296
+ d !== void 0 && (s = t.value.get(d)?.regionByIndex);
297
+ const c = t.value.get(f.key)?.regionByIndex;
298
+ s?.has(S) && !c?.has(S) && (d = f.key);
296
299
  }
297
- }), i !== void 0 && (r.searcherKey.value = i), l.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(l.regionIndex.value) && (l.regionIndex.value = o.value?.regions?.keys().next().value);
300
+ }), d !== void 0 && (n.searcherKey.value = d), l.regionIndex.value !== void 0 && !o.value?.regionByIndex?.has(l.regionIndex.value) && (l.regionIndex.value = o.value?.regions?.keys().next().value);
298
301
  }, { immediate: !0 });
299
- const u = () => {
300
- if (!(r.searcherKey.value === O || r.searcherKey.value === y))
301
- return r.searcherKey.value;
302
- }, f = () => {
303
- if (e.onlySearcher || l.regionIndex.value === y) return;
304
- let i = l.regionIndex.value;
302
+ const i = () => {
303
+ if (!(n.searcherKey.value === D || n.searcherKey.value === S))
304
+ return n.searcherKey.value;
305
+ }, u = () => {
306
+ if (e.onlySearcher || l.regionIndex.value === S) return;
307
+ let d = l.regionIndex.value;
305
308
  if (e.forFrequency) {
306
- const m = l.regionIndex.value;
307
- i = rt(e.forFrequency, { searcher_key: u(), key: m }, e.searchers)?.index;
309
+ const f = l.regionIndex.value;
310
+ d = jt(e.forFrequency, { searcher_key: i(), key: f }, e.searchers)?.index;
308
311
  }
309
- return i;
310
- }, c = () => {
311
- const i = u();
312
- if (i !== void 0)
313
- return a.value.get(i);
312
+ return d;
313
+ }, g = () => {
314
+ const d = i();
315
+ if (d !== void 0)
316
+ return t.value.get(d);
314
317
  };
315
318
  return {
316
- selectSearcher: r,
319
+ selectSearcher: n,
317
320
  selectRegion: l,
318
- compare: n,
319
- searcherByKey: a,
320
- allRegionsIndexes: t,
321
- getSearcher: c,
321
+ compare: r,
322
+ searcherByKey: t,
323
+ allRegionsIndexes: a,
324
+ getSearcher: g,
322
325
  getRegion: () => {
323
- const i = f();
324
- if (i !== void 0)
325
- return c()?.regionByIndex?.get(i);
326
+ const d = u();
327
+ if (d !== void 0)
328
+ return g()?.regionByIndex?.get(d);
326
329
  }
327
330
  };
328
- }, qt = /* @__PURE__ */ R({
331
+ }, $o = /* @__PURE__ */ K({
329
332
  __name: "regionSelector",
330
- props: /* @__PURE__ */ b({
333
+ props: /* @__PURE__ */ G({
331
334
  projectId: {},
332
335
  searchers: { default: () => [] },
333
336
  modelValue: {},
@@ -346,163 +349,178 @@ const Ze = { class: "top-competitorSelector" }, et = { class: "top-ellipsis1" },
346
349
  modelValueSingleModifiers: {}
347
350
  }),
348
351
  emits: ["update:modelValue", "update:modelValueSingle"],
349
- setup(e, { expose: a }) {
350
- const o = e, t = T(e, "modelValue"), r = T(e, "modelValueSingle"), {
352
+ setup(e, { expose: t }) {
353
+ const o = e, a = P(e, "modelValue"), n = P(e, "modelValueSingle"), {
351
354
  selectSearcher: l,
352
- selectRegion: n,
353
- compare: u,
354
- searcherByKey: f,
355
- allRegionsIndexes: c,
355
+ selectRegion: r,
356
+ compare: i,
357
+ searcherByKey: u,
358
+ allRegionsIndexes: g,
356
359
  getSearcher: x,
357
- getRegion: i
358
- } = ct(o), m = () => {
359
- const d = [];
360
- f.value.forEach((s) => {
361
- s.enabled && s.regions.forEach((g) => {
362
- g.enabled && d.push(g);
360
+ getRegion: d
361
+ } = bt(o), f = () => {
362
+ const s = [];
363
+ u.value.forEach((c) => {
364
+ c.enabled && c.regions.forEach((m) => {
365
+ m.enabled && s.push(m);
363
366
  });
364
- }), it.open("regions", {
365
- regions: d,
366
- regionsIndexes: u.regionsIndexes.value,
367
- "@update:regionsIndexes": (s) => u.regionsIndexes.value = s
367
+ }), At.open("regions", {
368
+ regions: s,
369
+ regionsIndexes: i.regionsIndexes.value,
370
+ "@update:regionsIndexes": (c) => i.regionsIndexes.value = c
368
371
  });
369
372
  };
370
- return E([n.regionIndex, l.searcherKey, u.regionsIndexes], () => {
371
- if (l.searcherKey.value === O && u.regionsIndexes.value.length) {
372
- if (JSON.stringify(t.value) === JSON.stringify(u.regionsIndexes.value))
373
+ return L([r.regionIndex, l.searcherKey, i.regionsIndexes], () => {
374
+ if (l.searcherKey.value === D && i.regionsIndexes.value.length) {
375
+ if (JSON.stringify(a.value) === JSON.stringify(i.regionsIndexes.value))
373
376
  return;
374
- t.value = [...u.regionsIndexes.value];
377
+ a.value = [...i.regionsIndexes.value];
375
378
  } else
376
- o.onlySearcher ? (t.value = [l.searcherKey.value], l.searcherKey.value === y && !o.autoRegion && (t.value.length = 0)) : (t.value = [n.regionIndex.value], n.regionIndex.value === y && !o.autoRegion && (t.value.length = 0));
377
- !o.onlySearcher && !c.value.size && (l.searcherKey.value = y);
378
- }), r.value && E(r, () => {
379
- r.value && (t.value = [r.value]);
380
- }, { immediate: !0 }), E(t, () => {
381
- if (t.value[0] && (r.value = t.value[0]), o.onlySearcher) {
382
- if (!t.value.length || t.value.length === 1 && !f.value.has(t.value[0]) || t.value.length === 1 && t.value[0] === y && !o.autoRegion) {
383
- let d = f.value.keys().next().value;
384
- d === y && !o.autoRegion && (d = void 0, r.value = y), d !== void 0 ? t.value = [d] : t.value.length = 0;
379
+ o.onlySearcher ? (a.value = [l.searcherKey.value], l.searcherKey.value === S && !o.autoRegion && (a.value.length = 0)) : (a.value = [r.regionIndex.value], r.regionIndex.value === S && !o.autoRegion && (a.value.length = 0));
380
+ !o.onlySearcher && !g.value.size && (l.searcherKey.value = S);
381
+ }), n.value && L(n, () => {
382
+ n.value && (a.value = [n.value]);
383
+ }, { immediate: !0 }), L(a, () => {
384
+ if (a.value[0] && (n.value = a.value[0]), o.onlySearcher) {
385
+ if (!a.value.length || a.value.length === 1 && !u.value.has(a.value[0]) || a.value.length === 1 && a.value[0] === S && !o.autoRegion) {
386
+ let s = u.value.keys().next().value;
387
+ s === S && !o.autoRegion && (s = void 0, n.value = S), s !== void 0 ? a.value = [s] : a.value.length = 0;
385
388
  return;
386
389
  }
387
- if (t.value.length > 1 && JSON.stringify(t.value) !== JSON.stringify(u.regionsIndexes.value)) {
388
- t.value = [...u.regionsIndexes.value];
390
+ if (a.value.length > 1 && JSON.stringify(a.value) !== JSON.stringify(i.regionsIndexes.value)) {
391
+ a.value = [...i.regionsIndexes.value];
389
392
  return;
390
393
  }
391
394
  } else {
392
- let d = [...new Set(t.value)], s = f.value.values().next().value?.regionByIndex?.keys().next().value;
393
- if (o.forFrequency && (s = f.value.values().next().value?.regionByIndex?.values().next().value?.key), s === y && !o.autoRegion && (s = void 0, r.value = y), !d.length)
394
- s !== void 0 && d.push(s);
395
- else if (d.length === 1) {
396
- let g = c.value;
397
- o.forFrequency && (g = /* @__PURE__ */ new Set(), f.value.forEach((Z) => {
398
- Z.regionByIndex.forEach((N) => {
399
- N.index !== le && N.index !== y && g.add(N.key);
395
+ let s = [...new Set(a.value)], c = u.value.values().next().value?.regionByIndex?.keys().next().value;
396
+ if (o.forFrequency && (c = u.value.values().next().value?.regionByIndex?.values().next().value?.key), c === S && !o.autoRegion && (c = void 0, n.value = S), !s.length)
397
+ c !== void 0 && s.push(c);
398
+ else if (s.length === 1) {
399
+ let m = g.value;
400
+ o.forFrequency && (m = /* @__PURE__ */ new Set(), u.value.forEach((I) => {
401
+ I.regionByIndex.forEach((C) => {
402
+ C.index !== de && C.index !== S && m.add(C.key);
400
403
  });
401
- })), g.has(d[0]) || (d = [], s !== void 0 && d.push(s));
404
+ })), m.has(s[0]) || (s = [], c !== void 0 && s.push(c));
402
405
  } else
403
- d = d.filter((g) => c.value.has(g)), !d.length && s !== void 0 && d.push(s);
404
- if (JSON.stringify(t.value) !== JSON.stringify(d)) {
405
- t.value = d;
406
+ s = s.filter((m) => g.value.has(m)), !s.length && c !== void 0 && s.push(c);
407
+ if (JSON.stringify(a.value) !== JSON.stringify(s)) {
408
+ a.value = s;
406
409
  return;
407
410
  }
408
411
  }
409
- if (!(t.value.length === 1 && t.value[0] === (o.onlySearcher ? l.searcherKey.value : n.regionIndex.value)))
412
+ if (!(a.value.length === 1 && a.value[0] === (o.onlySearcher ? l.searcherKey.value : r.regionIndex.value)))
410
413
  if (o.onlySearcher) {
411
- if (t.value.length === 1) {
412
- l.searcherKey.value = t.value[0];
414
+ if (a.value.length === 1) {
415
+ l.searcherKey.value = a.value[0];
413
416
  return;
414
417
  }
415
- l.searcherKey.value = O;
418
+ l.searcherKey.value = D;
416
419
  return;
417
420
  } else {
418
- if (!t.value.length)
421
+ if (!a.value.length)
419
422
  return;
420
- if (t.value.length === 1 && l.searcherKey.value !== O) {
421
- n.regionIndex.value = t.value[0];
422
- let d;
423
- for (const s of f.value.values()) {
424
- for (const g of s.regionByIndex.values())
425
- if ((o.forFrequency ? g.key : g.index) === n.regionIndex.value) {
426
- d = s.key;
423
+ if (a.value.length === 1 && l.searcherKey.value !== D) {
424
+ r.regionIndex.value = a.value[0];
425
+ let s;
426
+ for (const c of u.value.values()) {
427
+ for (const m of c.regionByIndex.values())
428
+ if ((o.forFrequency ? m.key : m.index) === r.regionIndex.value) {
429
+ s = c.key;
427
430
  break;
428
431
  }
429
- if (d !== void 0)
432
+ if (s !== void 0)
430
433
  break;
431
434
  }
432
- d !== void 0 && (l.searcherKey.value = d);
435
+ s !== void 0 && (l.searcherKey.value = s);
433
436
  } else
434
- l.searcherKey.value = O, u.regionsIndexes.value = [...t.value];
437
+ l.searcherKey.value = D, i.regionsIndexes.value = [...a.value];
435
438
  }
436
- }, { immediate: !0 }), a({
439
+ }, { immediate: !0 }), t({
437
440
  getSearcher: x,
438
- getRegion: i
439
- }), (d, s) => (h(), A("div", {
440
- class: X({
441
+ getRegion: d
442
+ }), (s, c) => (h(), j("div", {
443
+ class: oe({
441
444
  "top-selectorRegion": !0,
442
445
  "top-selectorRegion-onlySearcher": e.onlySearcher
443
446
  })
444
447
  }, [
445
- P(ce, {
448
+ U(xe, {
446
449
  options: v(l).optionBySearcherKey.value,
447
450
  modelValue: v(l).searcherKey.value,
448
- "onUpdate:modelValue": s[0] || (s[0] = (g) => v(l).searcherKey.value = g),
451
+ "onUpdate:modelValue": c[0] || (c[0] = (m) => v(l).searcherKey.value = m),
449
452
  name: "searcher_key",
450
453
  addChanger: e.addChanger
451
454
  }, null, 8, ["options", "modelValue", "addChanger"]),
452
- !e.onlySearcher && v(l).searcherKey.value !== v(O) ? (h(), C(ce, {
455
+ !e.onlySearcher && v(l).searcherKey.value !== v(D) ? (h(), A(xe, {
453
456
  key: 0,
454
457
  class: "top-select-region",
455
- options: v(n).optionByRegionIndex.value,
456
- modelValue: v(n).regionIndex.value,
457
- "onUpdate:modelValue": s[1] || (s[1] = (g) => v(n).regionIndex.value = g),
458
+ options: v(r).optionByRegionIndex.value,
459
+ modelValue: v(r).regionIndex.value,
460
+ "onUpdate:modelValue": c[1] || (c[1] = (m) => v(r).regionIndex.value = m),
458
461
  name: e.forFrequency ? "region_key" : "region_index",
459
462
  addChanger: e.addChanger,
460
463
  "data-top-icon": e.addRegionIcon ? "" : void 0
461
- }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : L("", !0),
462
- e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(O) ? (h(), C(Q, {
464
+ }, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : M("", !0),
465
+ e.addCompare && !e.onlySearcher && v(l).searcherKey.value === v(D) ? (h(), A(ee, {
463
466
  key: 1,
464
467
  name: "compare",
465
- onClick: m,
466
- "data-count-compare-regions-indexes": v(u).regionsIndexes.value.length
468
+ onClick: f,
469
+ "data-count-compare-regions-indexes": v(i).regionsIndexes.value.length
467
470
  }, {
468
471
  default: B(() => [
469
- J(M(d.$i18n.Common.Selected_regions), 1)
472
+ W(b(s.$i18n.Common.Selected_regions), 1)
470
473
  ]),
471
474
  _: 1
472
- }, 8, ["data-count-compare-regions-indexes"])) : L("", !0)
475
+ }, 8, ["data-count-compare-regions-indexes"])) : M("", !0)
473
476
  ], 2));
474
477
  }
475
- }), j = {
478
+ }), ue = (e) => (e = e.replace(/&quot;/g, '"'), e.replace(/&apos;/g, "'")), we = (e) => ({
479
+ ...e,
480
+ name: ue(e.name),
481
+ path: ue(e.path)
482
+ }), ce = (e) => {
483
+ const t = {
484
+ ...e,
485
+ name: ue(e.name)
486
+ };
487
+ return "folder_path" in t && typeof t.folder_path == "string" && (t.folder_path = ue(t.folder_path)), t;
488
+ }, q = {
476
489
  id: 0,
477
490
  name: "/",
478
491
  path: "/"
479
492
  };
480
- function gt(e) {
481
- return e ? V()?.Common.All_folders : "/ (" + V()?.Keywords.Root_folder + ")";
493
+ function Pt(e) {
494
+ return e ? w()?.Common.All_folders : "/ (" + w()?.Keywords.Root_folder + ")";
482
495
  }
483
- const pe = (e, a, o = /* @__PURE__ */ new Map(), t = { id: "root" }, r = 0) => (t.childsIds = [], t.id && (t.countAllGroupsActive = t.count_groups_active), e[t.id] && e[t.id].forEach((l) => {
484
- l = { ...l }, t.childsIds.push(l.id), l.id === 0 && (l.name = gt(a));
485
- const n = r > 1 ? "-".repeat(r - 1) + " " : "";
486
- n && !l.name.startsWith(n) && (l.name = n + l.name), o.set(l.id, l), pe(e, a, o, l, r + 1), t.childsIds = t.childsIds.concat(l.childsIds), t.id && l.count_groups_active && (t.countAllGroupsActive += l.count_groups_active);
487
- }), o), ft = (e, a) => e.gen(`/get/${a}/folders/`, ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
488
- function ge(e, a, o) {
489
- const t = Object.keys(e), r = t.map((l) => e[l]);
490
- return E(r, (l, n, u) => {
491
- const f = {};
492
- l.forEach((c, x) => {
493
- if (!Object.is(c, n[x])) {
494
- const i = t[x];
495
- f[i] = {
496
- old: n[x],
497
- new: c
496
+ const $e = (e, t, o = /* @__PURE__ */ new Map(), a = { id: "root" }, n = 0) => (a.childsIds = [], a.id && (a.countAllGroupsActive = a.count_groups_active), e[a.id] && e[a.id].forEach((l) => {
497
+ l = { ...l }, a.childsIds.push(l.id), l.id === 0 && (l.name = Pt(t));
498
+ const r = n > 1 ? "-".repeat(n - 1) + " " : "";
499
+ r && !l.name.startsWith(r) && (l.name = r + l.name), o.set(l.id, l), $e(e, t, o, l, n + 1), a.childsIds = a.childsIds.concat(l.childsIds), a.id && l.count_groups_active && (a.countAllGroupsActive += l.count_groups_active);
500
+ }), o), Et = (e, t) => {
501
+ const o = e.gen(`/get/${t}/folders/`, ["id", "parent_id", "name", "path"]).changeParams({ orders: ["ord_path"], limit: 100 });
502
+ return o.options.onApiLoaded = (a, n, l) => {
503
+ a.result && (a.result = a.result.map((r) => we(r))), l?.(a, n);
504
+ }, o;
505
+ };
506
+ function Ce(e, t, o) {
507
+ const a = Object.keys(e), n = a.map((l) => e[l]);
508
+ return L(n, (l, r, i) => {
509
+ const u = {};
510
+ l.forEach((g, x) => {
511
+ if (!Object.is(g, r[x])) {
512
+ const d = a[x];
513
+ u[d] = {
514
+ old: r[x],
515
+ new: g
498
516
  };
499
517
  }
500
- }), Object.keys(f).length && a(f, u);
518
+ }), Object.keys(u).length && t(u, i);
501
519
  }, o);
502
520
  }
503
- const mt = /* @__PURE__ */ R({
521
+ const Mt = /* @__PURE__ */ K({
504
522
  __name: "folders",
505
- props: /* @__PURE__ */ b({
523
+ props: /* @__PURE__ */ G({
506
524
  folderId: {},
507
525
  folder: {},
508
526
  folders: {},
@@ -515,64 +533,72 @@ const mt = /* @__PURE__ */ R({
515
533
  }, {
516
534
  folderId: { required: !0 },
517
535
  folderIdModifiers: {},
518
- folder: { default: j },
536
+ folder: { default: q },
519
537
  folderModifiers: {}
520
538
  }),
521
539
  emits: ["update:folderId", "update:folder"],
522
540
  setup(e) {
523
- const a = e, o = T(e, "folderId"), t = T(e, "folder"), r = a.client && !a.folders ? ft(a.client, a.service) : void 0, l = K(null);
524
- E(() => a.projectId, () => {
525
- r?.changeParams({
526
- project_id: a.projectId
527
- }), r?.setOptions({
528
- checkFingerprint: "TopGroupSelectorFolders:" + a.projectId
541
+ const t = e, o = P(e, "folderId"), a = P(e, "folder"), n = t.client && !t.folders && t.service ? Et(t.client, t.service) : void 0, l = _(null), r = E(() => {
542
+ const i = $e(t.folders ?? { root: [q] }, t.canSelectAll), u = /* @__PURE__ */ new Map();
543
+ return i.forEach((g, x) => {
544
+ u.set(x, we(g));
545
+ }), u;
546
+ });
547
+ return L(() => t.projectId, () => {
548
+ n?.changeParams({
549
+ project_id: t.projectId
550
+ }), n?.setOptions({
551
+ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId
529
552
  }), l.value?.resetCache();
530
- }, { immediate: !0 });
531
- const n = w(() => pe(a.folders ?? { root: [j] }, a.canSelectAll));
532
- return ge({
533
- modelFolder: t,
553
+ }, { immediate: !0 }), Ce({
554
+ modelFolder: a,
534
555
  modelFolderId: o
535
- }, async (u) => {
536
- if (o.value === t.value.id)
556
+ }, async (i) => {
557
+ if (o.value === a.value.id)
537
558
  return;
538
- if (u.modelFolder && !u.modelFolderId) {
539
- o.value = t.value.id;
559
+ if (i.modelFolder && !i.modelFolderId) {
560
+ o.value = a.value.id;
540
561
  return;
541
562
  }
542
- let f = n.value.get(a.folderId);
543
- f || (f = j), t.value = f, o.value = f.id;
544
- }, { immediate: !0 }), (u, f) => (h(), C(we, {
563
+ let u = r.value.get(t.folderId);
564
+ u || (u = q), a.value = u, o.value = u.id;
565
+ }, { immediate: !0 }), (i, u) => (h(), A(Be, {
545
566
  class: "top-groupSelector_folder",
546
- modelValue: t.value,
547
- "onUpdate:modelValue": f[0] || (f[0] = (c) => t.value = c),
548
- items: e.folders ? [...n.value.values()] : void 0,
567
+ modelValue: a.value,
568
+ "onUpdate:modelValue": u[0] || (u[0] = (g) => a.value = g),
569
+ items: e.folders ? [...r.value.values()] : void 0,
549
570
  "search-type": "inline",
550
571
  icon: e.addIcon ? "" : void 0,
551
- api: e.folders ? void 0 : v(r),
552
- apiSetSearchParams: (...c) => v($e)(...c, "name"),
572
+ api: e.folders ? void 0 : v(n),
573
+ apiSetSearchParams: (...g) => v(He)(...g, "name"),
553
574
  addChanger: e.addChanger,
554
575
  useCache: ""
555
576
  }, null, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "addChanger"]));
556
577
  }
557
- }), ne = {
578
+ }), fe = {
558
579
  id: -1,
559
580
  name: "--",
560
- folder_id: j.id,
561
- folder_path: j.path
562
- }, re = {
563
- id: Ee,
581
+ folder_id: q.id,
582
+ folder_path: q.path
583
+ }, ge = {
584
+ id: Je,
564
585
  name: "All groups",
565
- folder_id: j.id,
566
- folder_path: j.path
567
- }, Y = () => (re.name = V()?.Common.All_groups, re), Oe = () => (re.name = V()?.Keywords.Choose_group, re), vt = (e, a, o) => (e = [...e], a !== void 0 && (e = e.filter((t) => t.on == Number(a))), o && o.id && o.childsIds && (e = e.filter((t) => t.folder_id === o.id || o.childsIds.includes(t.folder_id))), e), Ce = (e, a) => e.gen(`/get/${a}/groups/`, ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 }), pt = (e, a) => e.gen(`/add/${a}/groups/`), yt = { class: "top-groupSelector_groupItem" }, ht = {
586
+ folder_id: q.id,
587
+ folder_path: q.path
588
+ }, re = () => (ge.name = w()?.Common.All_groups, ge), Xe = () => (ge.name = w()?.Keywords.Choose_group, ge), _t = (e, t, o) => (e = [...e], t !== void 0 && (e = e.filter((a) => a.on == Number(t))), o && o.id && o.childsIds && (e = e.filter((a) => a.folder_id === o.id || o.childsIds.includes(a.folder_id))), e), Ve = (e, t) => {
589
+ const o = e.gen(`/get/${t}/groups/`, ["id", "name", "folder_id", "folder_path"]).changeParams({ folder_id_depth: !0, limit: 100 });
590
+ return o.options.onApiLoaded = (a, n, l) => {
591
+ a.result && (a.result = a.result.map((r) => ce(r))), l?.(a, n);
592
+ }, o;
593
+ }, Vt = (e, t) => e.gen(`/add/${t}/groups/`), Gt = { class: "top-groupSelector_groupItem" }, Lt = {
568
594
  key: 0,
569
595
  class: "top-comment"
570
- }, It = ["innerHTML"], St = {
596
+ }, Rt = {
571
597
  key: 1,
572
598
  class: "top-groupSelector_groupItemFolderPath"
573
- }, xt = /* @__PURE__ */ R({
599
+ }, Kt = /* @__PURE__ */ K({
574
600
  __name: "groups",
575
- props: /* @__PURE__ */ b({
601
+ props: /* @__PURE__ */ G({
576
602
  groupId: {},
577
603
  group: {},
578
604
  projectId: {},
@@ -593,113 +619,116 @@ const mt = /* @__PURE__ */ R({
593
619
  group: { required: !0 },
594
620
  groupModifiers: {}
595
621
  }),
596
- emits: /* @__PURE__ */ b(["addGroup"], ["update:groupId", "update:group"]),
597
- setup(e, { emit: a }) {
598
- const o = e, t = a, r = T(e, "groupId"), l = T(e, "group"), n = o.client && !o.groups ? Ce(o.client, o.service) : void 0, u = o.client ? pt(o.client, o.service) : void 0, f = K(null), c = K(void 0), x = Se("folder_id", "EQUALS", [o.folder?.id ?? 0]);
599
- n?.changeParams({
622
+ emits: /* @__PURE__ */ G(["addGroup"], ["update:groupId", "update:group"]),
623
+ setup(e, { emit: t }) {
624
+ const o = e, a = t, n = P(e, "groupId"), l = P(e, "group"), r = o.client && !o.groups && o.service ? Ve(o.client, o.service) : void 0, i = o.client && o.service ? Vt(o.client, o.service) : void 0, u = _(null), g = _(void 0), x = ie("folder_id", "EQUALS", [o.folder?.id ?? 0]);
625
+ r?.changeParams({
600
626
  project_id: o.projectId,
601
627
  folder_id_depth: !0,
602
628
  filters: [
603
629
  x
604
630
  ]
605
- }), o.on !== void 0 && n?.params.filters?.push(Se("on", "EQUALS", [Number(o.on)]));
606
- const i = (d) => {
607
- l.value = d, r.value = d.id;
631
+ }), o.on !== void 0 && r?.params.filters?.push(ie("on", "EQUALS", [Number(o.on)]));
632
+ const d = E(() => {
633
+ const c = g.value ?? o.groups;
634
+ if (c)
635
+ return c.map((m) => ce(m));
636
+ }), f = (c) => {
637
+ const m = ce(c);
638
+ l.value = m, n.value = m.id;
608
639
  };
609
- ge({
640
+ Ce({
610
641
  projectId: () => o.projectId,
611
642
  folderId: () => o.folder?.id,
612
643
  canSelectAll: () => o.canSelectAll
613
- }, (d) => {
614
- if (d.projectId && (n?.changeParams({
644
+ }, (c) => {
645
+ if (c.projectId && (r?.changeParams({
615
646
  project_id: o.projectId
616
- }), n?.setOptions({
647
+ }), r?.setOptions({
617
648
  checkFingerprint: "TopGroupSelectorGroups:" + o.projectId
618
- })), d.folderId && (x.values = [
649
+ })), c.folderId && (x.values = [
619
650
  o.folder?.id ?? 0
620
- ], o.groups && (c.value = vt(o.groups, o.on, o.folder))), f.value?.resetCache(), (d.folderId?.old !== void 0 || d.canSelectAll?.old !== void 0) && r.value !== ue) {
621
- let s;
622
- o.autoselect === "first" && (s = c.value?.[0], o.canSelectAll && (s = be(Y()))), (o.autoselect === "placeholder" || !s) && (s = Oe()), i(s);
651
+ ], o.groups && (g.value = _t(o.groups, o.on, o.folder))), u.value?.resetCache(), (c.folderId?.old !== void 0 || c.canSelectAll?.old !== void 0) && n.value !== ye) {
652
+ let m;
653
+ o.autoselect === "first" && (m = g.value?.[0], o.canSelectAll && (m = De(re()))), (o.autoselect === "placeholder" || !m) && (m = Xe()), f(m);
623
654
  }
624
- }, { immediate: !0 }), ge({
655
+ }, { immediate: !0 }), Ce({
625
656
  modelGroup: l,
626
- modelGroupId: r
627
- }, async (d) => {
628
- if (r.value !== l.value.id) {
629
- if (d.modelGroup && !d.modelGroupId) {
630
- r.value = l.value.id;
657
+ modelGroupId: n
658
+ }, async (c) => {
659
+ if (n.value !== l.value.id) {
660
+ if (c.modelGroup && !c.modelGroupId) {
661
+ n.value = l.value.id;
631
662
  return;
632
663
  }
633
- if (!(o.canAdd && r.value === ue)) {
664
+ if (!(o.canAdd && n.value === ye)) {
634
665
  if (o.groups) {
635
- let s = c.value?.find((g) => g.id === r.value);
636
- if (!s && o.canSelectAll && (s = Y()), s)
637
- i(s);
666
+ let m = g.value?.find((I) => I.id === n.value);
667
+ if (!m && o.canSelectAll && (m = re()), m)
668
+ f(m);
638
669
  else {
639
- const g = c.value?.[0];
640
- g && !r.value ? i(g) : i(ne);
670
+ const I = g.value?.[0];
671
+ I && !n.value ? f(I) : f(fe);
641
672
  }
642
673
  }
643
- if (o.client && !o.groups && (r.value || r.value === Ee && !o.canSelectAll)) {
644
- const s = Ce(o.client, o.service).changeParams({
674
+ if (o.client && !o.groups && o.service && (n.value || n.value === Je && !o.canSelectAll)) {
675
+ const m = Ve(o.client, o.service).changeParams({
645
676
  project_id: o.projectId,
646
- id: r.value,
677
+ id: n.value,
647
678
  filters: [
648
679
  x
649
680
  ]
650
681
  });
651
- s?.setOptions({
682
+ m?.setOptions({
652
683
  checkFingerprint: "TopGroupSelectorFindGroup:" + o.projectId
653
684
  });
654
- const g = await s.call();
655
- if (!g.errors?.length && !g.result) return;
656
- !g.errors && g.result[0] ? i(g.result[0]) : i(ne);
685
+ const I = await m.call();
686
+ if (!I.errors?.length && !I.result) return;
687
+ !I.errors && I.result[0] ? f(I.result[0]) : f(fe);
657
688
  }
658
689
  }
659
690
  }
660
691
  }, { immediate: !0 });
661
- const m = async (d) => {
662
- if (o.canAdd !== "api" || !u) return;
663
- const s = l.value, g = await u.changeParams({
692
+ const s = async (c) => {
693
+ if (o.canAdd !== "api" || !i) return;
694
+ const m = l.value, I = await i.changeParams({
664
695
  project_id: o.projectId,
665
- names: [d.name],
666
- to_id: o.folder?.id ?? j.id,
696
+ names: [c.name],
697
+ to_id: o.folder?.id ?? q.id,
667
698
  to_type: "in_folder_last"
668
699
  }).call();
669
- g.result ? (i(g.result), t("addGroup", g.result)) : i(s), f.value?.resetCache(!0);
700
+ I.result ? (f(I.result), a("addGroup", I.result)) : f(m), u.value?.resetCache(!0);
670
701
  };
671
- return (d, s) => (h(), C(we, {
702
+ return (c, m) => (h(), A(Be, {
672
703
  ref_key: "refSelector",
673
- ref: f,
704
+ ref: u,
674
705
  class: "top-groupSelector_group",
675
706
  modelValue: l.value,
676
- "onUpdate:modelValue": s[0] || (s[0] = (g) => l.value = g),
677
- items: c.value ?? e.groups,
707
+ "onUpdate:modelValue": m[0] || (m[0] = (I) => l.value = I),
708
+ items: d.value,
678
709
  searchType: "inline",
679
710
  icon: e.addIcon ? "" : void 0,
680
- api: e.groups ? void 0 : v(n),
681
- apiSetSearchParams: (...g) => v($e)(...g, "name"),
711
+ api: e.groups ? void 0 : v(r),
712
+ apiSetSearchParams: (...I) => v(He)(...I, "name"),
682
713
  appendSearchToResult: !!e.canAdd,
683
- useAllItem: e.canSelectAll ? v(Y)().name : !1,
714
+ useAllItem: e.canSelectAll ? v(re)().name : !1,
684
715
  addChanger: e.addChanger,
685
716
  useCache: "",
686
- onAppendItem: m
717
+ onAppendItem: s
687
718
  }, {
688
- item: B(({ item: g }) => [
689
- oe("div", yt, [
690
- g.id === v(ue) ? (h(), A("div", ht, M(d.$i18n.Common.Add) + ": ", 1)) : L("", !0),
691
- oe("span", {
692
- innerHTML: g.name
693
- }, null, 8, It),
694
- g.folder_path && e.showPath ? (h(), A("span", St, M(g.folder_path), 1)) : L("", !0)
719
+ item: B(({ item: I }) => [
720
+ N("div", Gt, [
721
+ I.id === v(ye) ? (h(), j("div", Lt, b(c.$i18n.Common.Add) + ": ", 1)) : M("", !0),
722
+ N("span", null, b(I.name), 1),
723
+ I.folder_path && e.showPath ? (h(), j("span", Rt, b(I.folder_path), 1)) : M("", !0)
695
724
  ])
696
725
  ]),
697
726
  _: 1
698
727
  }, 8, ["modelValue", "items", "icon", "api", "apiSetSearchParams", "appendSearchToResult", "useAllItem", "addChanger"]));
699
728
  }
700
- }), kt = { class: "top-groupSelector" }, Dt = /* @__PURE__ */ R({
729
+ }), Ot = { class: "top-groupSelector" }, bo = /* @__PURE__ */ K({
701
730
  __name: "groupSelector",
702
- props: /* @__PURE__ */ b({
731
+ props: /* @__PURE__ */ G({
703
732
  folderId: {},
704
733
  folder: {},
705
734
  groupId: {},
@@ -709,7 +738,7 @@ const mt = /* @__PURE__ */ R({
709
738
  groups: {},
710
739
  on: { type: Boolean, default: void 0 },
711
740
  canSelectAllGroups: { type: Boolean },
712
- canAddGroup: {},
741
+ canAddGroup: { type: [String, Boolean] },
713
742
  autoselect: { default: "first" },
714
743
  addChanger: { type: Boolean, default: !0 },
715
744
  showFolders: { type: Boolean, default: !0 },
@@ -724,26 +753,26 @@ const mt = /* @__PURE__ */ R({
724
753
  folderModifiers: {},
725
754
  groupId: { required: !0 },
726
755
  groupIdModifiers: {},
727
- group: { default: ne },
756
+ group: { default: fe },
728
757
  groupModifiers: {}
729
758
  }),
730
- emits: /* @__PURE__ */ b(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
731
- setup(e, { emit: a }) {
732
- const o = e, t = T(e, "folderId"), r = T(e, "folder"), l = T(e, "groupId"), n = T(e, "group"), u = a, f = pe(o.folders ?? { root: [j] }, o.canSelectAllGroups);
733
- r.value = f.get(t.value);
734
- let c = o.groups?.find((i) => i.id === l.value);
735
- l.value || (c = o.groups?.[0]), o.canSelectAllGroups && !c && (c = Y()), o.canSelectAllGroups && !c && (c = Y()), (o.autoselect === "placeholder" || !c) && (c = Oe()), c ??= ne, n.value = c;
736
- const x = (i) => {
737
- let m;
738
- o.groups && i && (m = [...o.groups, i]), u("update:groups", m);
759
+ emits: /* @__PURE__ */ G(["update:groups"], ["update:folderId", "update:folder", "update:groupId", "update:group"]),
760
+ setup(e, { emit: t }) {
761
+ const o = e, a = P(e, "folderId"), n = P(e, "folder"), l = P(e, "groupId"), r = P(e, "group"), i = t, u = $e(o.folders ?? { root: [q] }, o.canSelectAllGroups);
762
+ n.value = u.get(a.value), n.value && (n.value = we(n.value));
763
+ let g = o.groups?.find((d) => d.id === l.value);
764
+ l.value || (g = o.groups?.[0]), o.canSelectAllGroups && !g && (g = re()), (o.autoselect === "placeholder" || !g) && (g = Xe()), g ??= fe, r.value = g, r.value = ce(r.value);
765
+ const x = (d) => {
766
+ let f;
767
+ o.groups && d && (f = [...o.groups, d]), i("update:groups", f);
739
768
  };
740
- return (i, m) => (h(), A("div", kt, [
741
- e.showFolders ? (h(), C(mt, {
769
+ return (d, f) => (h(), j("div", Ot, [
770
+ e.showFolders ? (h(), A(Mt, {
742
771
  key: 0,
743
- folderId: t.value,
744
- "onUpdate:folderId": m[0] || (m[0] = (d) => t.value = d),
745
- folder: r.value,
746
- "onUpdate:folder": m[1] || (m[1] = (d) => r.value = d),
772
+ folderId: a.value,
773
+ "onUpdate:folderId": f[0] || (f[0] = (s) => a.value = s),
774
+ folder: n.value,
775
+ "onUpdate:folder": f[1] || (f[1] = (s) => n.value = s),
747
776
  projectId: e.projectId,
748
777
  folders: e.folders,
749
778
  canSelectAll: e.canSelectAllGroups,
@@ -751,15 +780,15 @@ const mt = /* @__PURE__ */ R({
751
780
  addIcon: e.addIcon,
752
781
  client: e.client,
753
782
  service: e.service
754
- }, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client", "service"])) : L("", !0),
755
- e.showGroups ? (h(), C(xt, {
783
+ }, null, 8, ["folderId", "folder", "projectId", "folders", "canSelectAll", "addChanger", "addIcon", "client", "service"])) : M("", !0),
784
+ e.showGroups ? (h(), A(Kt, {
756
785
  key: 1,
757
786
  groupId: l.value,
758
- "onUpdate:groupId": m[2] || (m[2] = (d) => l.value = d),
759
- group: n.value,
760
- "onUpdate:group": m[3] || (m[3] = (d) => n.value = d),
787
+ "onUpdate:groupId": f[2] || (f[2] = (s) => l.value = s),
788
+ group: r.value,
789
+ "onUpdate:group": f[3] || (f[3] = (s) => r.value = s),
761
790
  projectId: e.projectId,
762
- folder: r.value,
791
+ folder: n.value,
763
792
  groups: e.groups,
764
793
  on: e.on,
765
794
  canAdd: e.canAddGroup,
@@ -771,64 +800,412 @@ const mt = /* @__PURE__ */ R({
771
800
  client: e.client,
772
801
  service: e.service,
773
802
  onAddGroup: x
774
- }, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client", "service"])) : L("", !0)
803
+ }, null, 8, ["groupId", "group", "projectId", "folder", "groups", "on", "canAdd", "canSelectAll", "autoselect", "addChanger", "showPath", "addIcon", "client", "service"])) : M("", !0)
775
804
  ]));
776
805
  }
777
- }), Be = (e) => "-" + e, _ = (e) => e[0] === "-" ? e.substring(1) : e, ie = (e, a) => {
778
- e = _(e);
779
- const o = a.find((t) => t.id === e);
806
+ }), Ut = { class: "top-projectSelectorSubmenu_item" }, Nt = ["href", "title", "data-top-icon", "data-right"], Dt = { class: "top-projectSelectorSubmenu_item" }, Ft = ["href"], qt = /* @__PURE__ */ K({
807
+ __name: "submenu",
808
+ props: {
809
+ id: {},
810
+ right: {},
811
+ url: {}
812
+ },
813
+ setup(e) {
814
+ const t = e, o = w(), a = [
815
+ {
816
+ href: `/project/keywords/${t.id}/`,
817
+ title: o.Common.Menu_phrases,
818
+ icon: "",
819
+ right: "2"
820
+ },
821
+ {
822
+ href: `/project/dynamics/${t.id}/`,
823
+ title: o.Common.Menu_dynamics,
824
+ icon: "",
825
+ right: "1"
826
+ },
827
+ {
828
+ href: `/project/snapshots/${t.id}/`,
829
+ title: o.Common.Menu_snapshots,
830
+ icon: "",
831
+ right: "1"
832
+ },
833
+ {
834
+ href: `/project/competitors/${t.id}/`,
835
+ title: o.Common.Menu_competitors,
836
+ icon: "",
837
+ right: "1"
838
+ },
839
+ {
840
+ href: `/project/analytics/${t.id}/`,
841
+ title: o.Common.Menu_analytics,
842
+ icon: "",
843
+ right: "5"
844
+ },
845
+ {
846
+ href: `/project/broker/${t.id}/`,
847
+ title: o.Common.Menu_broker,
848
+ icon: "",
849
+ right: "6"
850
+ },
851
+ {
852
+ href: `/project/audit/${t.id}/sitemap/`,
853
+ title: o.Audit.Sitemap_gen,
854
+ icon: "",
855
+ right: "8"
856
+ },
857
+ {
858
+ href: `/project/audit/${t.id}/audit/`,
859
+ title: o.Common.Menu_audit,
860
+ icon: "",
861
+ right: "8"
862
+ },
863
+ {
864
+ href: `/project/audit/${t.id}/indexing/`,
865
+ title: o.Audit.Indexing,
866
+ icon: "",
867
+ right: "8"
868
+ },
869
+ {
870
+ href: `/project/audit/${t.id}/watcher/`,
871
+ title: o.Audit.Watcher,
872
+ icon: "",
873
+ right: "9"
874
+ },
875
+ {
876
+ href: `/project/settings/${t.id}/`,
877
+ title: o.Common.Menu_settings,
878
+ icon: "",
879
+ right: "2"
880
+ }
881
+ ], n = E(() => t.right.includes("0") ? a.filter((l) => t.right[l.right] === "1") : a);
882
+ return (l, r) => {
883
+ const i = Fe("TopButton");
884
+ return h(), A(v(je), {
885
+ class: "top-projectSelectorSubmenu",
886
+ notch: !1,
887
+ pos: "2"
888
+ }, {
889
+ opener: B(() => [
890
+ U(i, {
891
+ class: "top-projectSelectorSubmenu_opener",
892
+ "data-top-icon": "",
893
+ color: "theme"
894
+ })
895
+ ]),
896
+ contentList: B(() => [
897
+ (h(!0), j(F, null, pe(n.value, (u) => (h(), j("li", Ut, [
898
+ N("a", {
899
+ href: u.href,
900
+ title: u.title,
901
+ "data-top-icon": u.icon,
902
+ "data-right": u.right
903
+ }, null, 8, Nt)
904
+ ]))), 256)),
905
+ N("li", Dt, [
906
+ N("a", {
907
+ href: e.url,
908
+ "data-top-icon": "",
909
+ target: "_blank"
910
+ }, null, 8, Ft)
911
+ ])
912
+ ]),
913
+ _: 1
914
+ });
915
+ };
916
+ }
917
+ }), Ie = (e) => ({
918
+ id: null,
919
+ name: e,
920
+ listItemProps: {
921
+ type: "title"
922
+ }
923
+ }), ke = {
924
+ scheduledUpdate: !1,
925
+ manualUpdate: !1,
926
+ guestProjects: !1
927
+ }, Wt = (e, t) => {
928
+ const o = [], a = {
929
+ scheduledUpdate: Ie(w().Projects.Scheduled_update),
930
+ manualUpdate: Ie(w().Projects.Manual_update),
931
+ guestProjects: Ie(w().Projects.Guest_projects)
932
+ }, n = t ? {
933
+ scheduledUpdate: !1,
934
+ manualUpdate: !1,
935
+ guestProjects: !1
936
+ } : ke;
937
+ for (const l of e)
938
+ !n.scheduledUpdate && l.right?.startsWith("1") && l.on > 0 && (o.push(a.scheduledUpdate), n.scheduledUpdate = !0), !n.manualUpdate && l.right?.startsWith("1") && l.on === 0 && (o.push(a.manualUpdate), n.manualUpdate = !0), !n.guestProjects && l.right?.startsWith("0") && l.on >= 0 && (o.push(a.guestProjects), n.guestProjects = !0), o.push(l);
939
+ return o;
940
+ }, Ht = (e) => e.map((t) => ({
941
+ ...t,
942
+ listItemProps: {
943
+ attrs: { title: t.name }
944
+ }
945
+ })), Jt = (e, t, o) => {
946
+ if (!e || e.length === 0) return [];
947
+ t && Object.keys(ke).forEach((n) => ke[n] = !1);
948
+ const a = Ht(e);
949
+ return Wt(a, o);
950
+ }, zt = (e) => {
951
+ if (!e) return "";
952
+ let t = e;
953
+ return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/competitorsIds=[^&]*/, ""), t = t.replace(/searchersKeys=[^&]*/, ""), t = t.replace(/regionIndex=[^&]*/, ""), t = t.replace(/regionsIndexes=[^&]*/, ""), t = t.replace(/folderId=[^&]*/, ""), t = t.replace(/groupId=[^&]*/, ""), t = t.replace(/tags=[^&]*/, ""), window.mo?.getHash && !window.mo.getHash("dataSort").toString().includes("0000-00-00") && (t = t.replace(/dataSort=[^&]*/, "")), t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22competitorsIds%22:\[[^\]]*],/, ""), t = t.replace(/%22searchersKeys%22:\[[^\]]*],/, ""), t = t.replace(/%22regionIndex%22:[^,]*,/, ""), t = t.replace(/%22regionsIndexes%22:\[[^\]]*],/, ""), t = t.replace(/%22folderId%22:[^,]*,/, ""), t = t.replace(/%22groupId%22:[^,]*,/, ""), t = t.replace(/%22tagsIds%22:\[[^\]]*],/, ""), /%22dataSort%22:\{[^}]*0000-00-00[^}]*}/.test(t) || (t = t.replace(/%22dataSort%22:\{[^}]*},/, "")), t;
954
+ }, Yt = (e) => {
955
+ const t = location.pathname.split("/");
956
+ let o = "project/dynamics/", a = "";
957
+ t[1] == "project" && (o = t[1] + "/" + t[2] + "/"), ["watcher", "indexing", "sitemap", "audit", "direct", "adwords"].includes(t[4]) && (a = t[4] + "/");
958
+ let n = "/" + o + e + "/" + a;
959
+ const l = zt(location.hash);
960
+ return n += l, n;
961
+ }, Ge = (e) => {
962
+ let t = e.startsWith("http") ? e : "http://" + e;
963
+ return t = t.replace(/"/g, "%22"), t;
964
+ }, Qt = (e, t) => {
965
+ let o = e.params.filters ?? [];
966
+ o = o.filter((r) => r.name !== "GEN_SEARCH_STRING()");
967
+ const a = pt(t), n = t.replace(/([[^$.|?*+()])/g, "\\$1"), l = a.replace(/([[^$.|?*+()])/g, "\\$1");
968
+ t && o.push(ie("GEN_SEARCH_STRING()", "REGEXP", [`(${n}|${l})`])), e.changeParams({ filters: o });
969
+ }, Le = (e, t, o) => {
970
+ const a = e.gen("/get/projects_2/projects/", ["id", "user_id", "name", "url", "on", "right"]);
971
+ return a.params = {
972
+ ...o,
973
+ filters: [
974
+ ie("on", "GREATER_THAN_EQUALS", [0])
975
+ ],
976
+ orders: [
977
+ le("user_id", "DESC", [t]),
978
+ le("on", "DESC"),
979
+ le("favorite", "DESC"),
980
+ le("id", "DESC")
981
+ ]
982
+ }, a.options.onApiLoaded = (n, l, r) => {
983
+ const i = l.data.filters.length === 1 && l.data.offset === 0 || l.data.limit === 1e3, u = l.data.limit === 100 && l.data.filters.length > 1 ? !0 : void 0;
984
+ n.result = Jt(n.result, i, u), r?.(n, l);
985
+ }, a;
986
+ }, Xt = (e) => e.gen("/add/projects_2/projects/"), me = "ui_project_selector_total:", Zt = 1440 * 60 * 1e3, V = qe(), Ze = _(0), Q = _(null), Re = (e, t) => {
987
+ localStorage.setItem(
988
+ me + e,
989
+ JSON.stringify({ projectsTotal: t, expiresAt: Date.now() + Zt })
990
+ );
991
+ }, eo = (e) => {
992
+ const t = localStorage.getItem(me + e);
993
+ if (!t) return;
994
+ const { projectsTotal: o, expiresAt: a } = JSON.parse(t);
995
+ if (Date.now() > a) {
996
+ localStorage.removeItem(me + e);
997
+ return;
998
+ }
999
+ return o;
1000
+ }, to = (e, t = !0) => {
1001
+ V.value = void 0, localStorage.removeItem(me + e), t && Ze.value++;
1002
+ }, oo = { class: "top-projectSelector_item" }, ao = { class: "top-projectSelector_itemText" }, lo = { class: "top-comment" }, no = {
1003
+ key: 0,
1004
+ class: "top-comment"
1005
+ }, ro = ["href"], Ke = 1e3, Po = /* @__PURE__ */ K({
1006
+ __name: "projectSelector",
1007
+ props: /* @__PURE__ */ G({
1008
+ client: {},
1009
+ project: {},
1010
+ addLinksToProjects: { type: Boolean, default: !0 },
1011
+ excludeProjectId: {},
1012
+ modificator: {},
1013
+ placeholder: {},
1014
+ buttonProps: {},
1015
+ openerShortcut: {}
1016
+ }, {
1017
+ project: { default: { id: null, name: "" } },
1018
+ projectModifiers: {}
1019
+ }),
1020
+ emits: ["update:project"],
1021
+ setup(e) {
1022
+ const t = w();
1023
+ if (!window.mo?.user?.id)
1024
+ throw new Error("TopProjectSelector: не удалось определить userId. Компонент требует авторизованного пользователя (см. window.mo.user.id)");
1025
+ const o = window.mo.user.id, a = e, n = P(e, "project"), l = Le(
1026
+ a.client,
1027
+ o
1028
+ ), r = Xt(a.client), i = _(eo(o)), u = _(null), g = E(() => a.placeholder ?? t.Projects.Select_project), x = E(() => !V.value || !a.excludeProjectId ? V.value : V.value.filter((C) => C.id !== a.excludeProjectId)), d = E(() => {
1029
+ if (!(!i.value && i.value !== 0))
1030
+ return i.value < Ke ? "static" : "api";
1031
+ });
1032
+ L(Ze, () => {
1033
+ m();
1034
+ });
1035
+ const f = async () => {
1036
+ if (!Q.value) {
1037
+ const R = Le(
1038
+ a.client,
1039
+ o,
1040
+ { limit: Ke }
1041
+ );
1042
+ Q.value = R.call();
1043
+ }
1044
+ const C = await Q.value;
1045
+ if (C.errors) {
1046
+ Q.value = null;
1047
+ return;
1048
+ }
1049
+ return Q.value = null, C;
1050
+ }, s = async () => {
1051
+ if (i.value) return;
1052
+ const C = await f();
1053
+ C && (i.value = C.total, d.value === "static" && !V.value && (V.value = C.result), i.value && Re(o, i.value));
1054
+ }, c = async (C) => {
1055
+ const R = await r.changeParams({
1056
+ url: C.name,
1057
+ name: C.name
1058
+ }).call();
1059
+ if (!R.errors) {
1060
+ if (V.value && d.value === "static") {
1061
+ const y = {
1062
+ id: Number(R.result),
1063
+ user_id: o,
1064
+ name: C.name,
1065
+ url: C.name,
1066
+ on: 0,
1067
+ right: "11111111111111111111",
1068
+ listItemProps: {
1069
+ attrs: { title: C.name }
1070
+ }
1071
+ }, p = V.value.findIndex((k) => k.on === 0);
1072
+ V.value = [
1073
+ ...V.value.slice(0, p),
1074
+ y,
1075
+ ...V.value.slice(p)
1076
+ ], i.value && (i.value += 1, Re(o, i.value));
1077
+ }
1078
+ d.value === "api" && to(o);
1079
+ }
1080
+ }, m = () => {
1081
+ d.value === "api" && u.value?.resetCache(!0);
1082
+ }, I = async () => {
1083
+ if (V.value || d.value !== "static") return;
1084
+ const C = await f();
1085
+ C && (V.value = C.result);
1086
+ };
1087
+ return et(async () => {
1088
+ await s();
1089
+ }), (C, R) => {
1090
+ const y = Fe("TopButton");
1091
+ return h(), A(Be, {
1092
+ ref_key: "refSelector",
1093
+ ref: u,
1094
+ class: "top-projectSelector",
1095
+ modelValue: n.value,
1096
+ "onUpdate:modelValue": R[1] || (R[1] = (p) => n.value = p),
1097
+ items: x.value,
1098
+ title: C.$i18n.Projects.Search_projects,
1099
+ modificator: e.modificator,
1100
+ searchFields: ["id", "name", "url"],
1101
+ placeholder: g.value,
1102
+ hasCloserBtn: "",
1103
+ api: d.value === "api" ? v(l) : void 0,
1104
+ apiSetSearchParams: d.value === "api" ? (...p) => v(Qt)(...p) : void 0,
1105
+ useCache: "",
1106
+ appendSearchToResult: "",
1107
+ appendSearchAllowDuplicate: "",
1108
+ appendSearchToResultCond: v(mt),
1109
+ appendWithoutSelect: "",
1110
+ buttonProps: e.buttonProps,
1111
+ openerShortcut: e.openerShortcut,
1112
+ onAppendItem: c,
1113
+ onOpen: I
1114
+ }, {
1115
+ item: B(({ item: p }) => [
1116
+ N("div", oo, [
1117
+ N("div", ao, [
1118
+ p.id ? (h(), j(F, { key: 0 }, [
1119
+ W(b(v(vt)(p.name, 20)) + " ", 1),
1120
+ N("span", lo, " id " + b(p.id), 1)
1121
+ ], 64)) : (h(), j(F, { key: 1 }, [
1122
+ p.listItemProps?.type ? M("", !0) : (h(), j("div", no, b(C.$i18n.Projects.Add_project) + ": ", 1)),
1123
+ W(" " + b(p.name), 1)
1124
+ ], 64))
1125
+ ]),
1126
+ p.id ? (h(), j(F, { key: 0 }, [
1127
+ e.addLinksToProjects ? (h(), j("a", {
1128
+ key: 0,
1129
+ class: "top-projectSelector_itemLink",
1130
+ href: v(Yt)(p.id)
1131
+ }, null, 8, ro)) : M("", !0),
1132
+ C.$core.state.isMobile ? M("", !0) : (h(), A(y, {
1133
+ key: 1,
1134
+ class: "top-projectSelector_itemExtLink",
1135
+ href: v(Ge)(p.url),
1136
+ "data-top-icon": "",
1137
+ color: "theme",
1138
+ target: "_blank",
1139
+ onClick: R[0] || (R[0] = H(() => {
1140
+ }, ["stop"]))
1141
+ }, null, 8, ["href"])),
1142
+ U(qt, {
1143
+ id: p.id,
1144
+ right: p.right ?? void 0,
1145
+ url: v(Ge)(p.url)
1146
+ }, null, 8, ["id", "right", "url"])
1147
+ ], 64)) : M("", !0)
1148
+ ])
1149
+ ]),
1150
+ _: 1
1151
+ }, 8, ["modelValue", "items", "title", "modificator", "placeholder", "api", "apiSetSearchParams", "appendSearchToResultCond", "buttonProps", "openerShortcut"]);
1152
+ };
1153
+ }
1154
+ }), Oe = (e) => "-" + e, te = (e) => e[0] === "-" ? e.substring(1) : e, ve = (e, t) => {
1155
+ e = te(e);
1156
+ const o = t.find((a) => a.id === e);
780
1157
  if (o)
781
1158
  return o;
782
- }, Ft = (e, a, o) => {
783
- a || (a = { id: e.id }), a.id = e.id, a.pos ??= "3", a.notch ??= !0, a.posBy ??= "fixed";
784
- const t = Xe.genElPopupOpener("div", a);
785
- return t.classList.add("top-tagSelector"), e.useTopButton && t.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || t.classList.add("top-tagSelector-custom"), 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) => {
786
- r.preventDefault(), r.stopPropagation(), t.onclick = null;
787
- const l = K(e.modelValue), n = {
1159
+ }, Eo = (e, t, o) => {
1160
+ t || (t = { id: e.id }), t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1161
+ const a = ht.genElPopupOpener("div", t);
1162
+ return a.classList.add("top-tagSelector"), e.useTopButton && a.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || a.classList.add("top-tagSelector-custom"), e.mode === "filter" && a.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && a.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && a.classList.add("top-tagSelector-setter_several"), a.onclick = (n) => {
1163
+ n.preventDefault(), n.stopPropagation(), a.onclick = null;
1164
+ const l = _(e.modelValue), r = {
788
1165
  model: l,
789
1166
  mode: e.mode,
790
1167
  targetId: e.targetId,
791
1168
  filters: e.filters,
792
1169
  payload: e.payload
793
1170
  };
794
- W(t, "topTagSelectorTarget", n), delete t.dataset.topPopupDisabled, he(e.modelValue) || E(l, () => {
795
- e.modelValue = l.value, te(t, e, o);
796
- }), t.click();
797
- }, he(e.modelValue) ? E(e.modelValue, () => te(t, e, o)) : W(t, "topTagSelectorRender", (r) => {
798
- e.modelValue = r;
799
- const l = W(t, "topTagSelectorTarget");
800
- l && (l.model.value = r), te(t, e, o);
801
- }), te(t, e, o), t;
802
- }, Ut = (e, a) => {
803
- W(e, "topTagSelectorRender")?.(a);
804
- }, te = (e, a, o) => {
805
- const t = v(a.modelValue);
806
- 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) {
1171
+ Z(a, "topTagSelectorTarget", r), delete a.dataset.topPopupDisabled, Pe(e.modelValue) || L(l, () => {
1172
+ e.modelValue = l.value, ne(a, e, o);
1173
+ }), a.click();
1174
+ }, Pe(e.modelValue) ? L(e.modelValue, () => ne(a, e, o)) : Z(a, "topTagSelectorRender", (n) => {
1175
+ e.modelValue = n;
1176
+ const l = Z(a, "topTagSelectorTarget");
1177
+ l && (l.model.value = n), ne(a, e, o);
1178
+ }), ne(a, e, o), a;
1179
+ }, Mo = (e, t) => {
1180
+ Z(e, "topTagSelectorRender")?.(t);
1181
+ }, ne = (e, t, o) => {
1182
+ const a = v(t.modelValue);
1183
+ if (e.classList.toggle("top-tagSelector-selectedOne", !a.length || a.length === 1), e.classList.toggle("top-tagSelector-toTwoLine", a.length > 5), t.mode === "setter" && t.filters) {
807
1184
  e.innerHTML = `<div>${o}</div>`;
808
1185
  return;
809
1186
  }
810
- if (e.innerHTML = "", !t.length && a.mode === "filter") {
811
- const r = Te({
1187
+ if (e.innerHTML = "", !a.length && t.mode === "filter") {
1188
+ const n = Ue({
812
1189
  id: "all",
813
1190
  colorId: "",
814
- name: V().Common?.All_tags ?? "",
1191
+ name: w().Common?.All_tags ?? "",
815
1192
  state: ""
816
1193
  });
817
- e.append(r);
1194
+ e.append(n);
818
1195
  }
819
- t.forEach((r) => {
820
- const l = Te({
821
- id: _(r),
822
- colorId: ie(r, a.tags)?.color_id ?? "",
823
- name: ie(r, a.tags)?.name ?? "",
824
- state: _(r) === r ? "selected" : "excluded"
1196
+ a.forEach((n) => {
1197
+ const l = Ue({
1198
+ id: te(n),
1199
+ colorId: ve(n, t.tags)?.color_id ?? "",
1200
+ name: ve(n, t.tags)?.name ?? "",
1201
+ state: te(n) === n ? "selected" : "excluded"
825
1202
  });
826
1203
  e.append(l);
827
1204
  });
828
- }, Te = (e) => {
829
- const a = document.createElement("div");
830
- 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;
831
- }, Ct = [
1205
+ }, Ue = (e) => {
1206
+ const t = document.createElement("div");
1207
+ return t.classList.add("top-tagSelector_tagIcon"), t.classList.toggle("top-tagSelector-active", !!e.state), t.classList.toggle("top-tagSelector-excluded", e.state === "excluded"), t.dataset.tag_id = e.id, t.dataset.tag_color_id = e.colorId, t.title = e.name, t;
1208
+ }, io = [
832
1209
  {
833
1210
  id: "1",
834
1211
  name: "Without Tag",
@@ -879,7 +1256,7 @@ const mt = /* @__PURE__ */ R({
879
1256
  name: "Turquoise",
880
1257
  color_id: "10"
881
1258
  }
882
- ], Bt = ["data-tag_id", "data-tag_color_id", "title"], fe = /* @__PURE__ */ R({
1259
+ ], so = ["data-tag_id", "data-tag_color_id", "title"], Te = /* @__PURE__ */ K({
883
1260
  __name: "tagIcon",
884
1261
  props: {
885
1262
  id: {},
@@ -888,8 +1265,8 @@ const mt = /* @__PURE__ */ R({
888
1265
  state: {}
889
1266
  },
890
1267
  setup(e) {
891
- return (a, o) => (h(), A("div", {
892
- class: X({
1268
+ return (t, o) => (h(), j("div", {
1269
+ class: oe({
893
1270
  "top-tagSelector_tagIcon": !0,
894
1271
  "top-tagSelector-active": !!e.state,
895
1272
  "top-tagSelector-excluded": e.state === "excluded"
@@ -897,11 +1274,11 @@ const mt = /* @__PURE__ */ R({
897
1274
  "data-tag_id": e.id,
898
1275
  "data-tag_color_id": e.colorId,
899
1276
  title: e.name
900
- }, null, 10, Bt));
1277
+ }, null, 10, so));
901
1278
  }
902
- }), Tt = ["contenteditable", "onKeydown"], Ae = /* @__PURE__ */ R({
1279
+ }), uo = ["contenteditable", "onKeydown"], Ne = /* @__PURE__ */ K({
903
1280
  __name: "tagPopupListItem",
904
- props: /* @__PURE__ */ b({
1281
+ props: /* @__PURE__ */ G({
905
1282
  editable: { type: Boolean },
906
1283
  disabled: { type: Boolean },
907
1284
  canExclude: { type: Boolean },
@@ -915,74 +1292,74 @@ const mt = /* @__PURE__ */ R({
915
1292
  },
916
1293
  nameModifiers: {}
917
1294
  }),
918
- emits: /* @__PURE__ */ b(["update:name", "unselect", "exclude", "select"], ["update:name"]),
919
- setup(e, { emit: a }) {
920
- const o = e, t = a, r = T(e, "name"), l = K(null), n = w(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
921
- contenteditable: u.value,
922
- onpaste: (m) => m.preventDefault()
923
- } : {}), u = K(!1), f = async () => {
924
- u.value = !0, await Re(), l.value?.focus();
925
- }, c = () => {
926
- const m = l.value?.innerText;
927
- if (!m) return x();
928
- l.value && (l.value.innerText = m), u.value = !1, t("update:name", m);
1295
+ emits: /* @__PURE__ */ G(["update:name", "unselect", "exclude", "select"], ["update:name"]),
1296
+ setup(e, { emit: t }) {
1297
+ const o = e, a = t, n = P(e, "name"), l = _(null), r = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
1298
+ contenteditable: i.value,
1299
+ onpaste: (f) => f.preventDefault()
1300
+ } : {}), i = _(!1), u = async () => {
1301
+ i.value = !0, await tt(), l.value?.focus();
1302
+ }, g = () => {
1303
+ const f = l.value?.innerText;
1304
+ if (!f) return x();
1305
+ l.value && (l.value.innerText = f), i.value = !1, a("update:name", f);
929
1306
  }, x = async () => {
930
- l.value && (l.value.innerText = o.name), u.value = !1;
931
- }, i = (m) => {
932
- if (u.value || o.disabled) return;
933
- let d = "selected";
934
- o.canExclude && (m.ctrlKey || m.metaKey) && (d = "excluded"), o.state == d && (d = ""), d === "" && t("unselect"), d === "selected" && t("select"), d === "excluded" && t("exclude");
1307
+ l.value && (l.value.innerText = o.name), i.value = !1;
1308
+ }, d = (f) => {
1309
+ if (i.value || o.disabled) return;
1310
+ let s = "selected";
1311
+ o.canExclude && (f.ctrlKey || f.metaKey) && (s = "excluded"), o.state == s && (s = ""), s === "" && a("unselect"), s === "selected" && a("select"), s === "excluded" && a("exclude");
935
1312
  };
936
- return (m, d) => (h(), C(ve, {
937
- class: X({
1313
+ return (f, s) => (h(), A(Ae, {
1314
+ class: oe({
938
1315
  "top-tagSelector_tagListItem": !0,
939
- "top-tagSelector_tagListItem-inEdit": u.value,
1316
+ "top-tagSelector_tagListItem-inEdit": i.value,
940
1317
  "top-tagSelector_tagListItem-disabled": e.disabled,
941
1318
  "top-tagSelector_tagListItem-canExclude": e.canExclude,
942
1319
  "top-tagSelector-active": !!e.state,
943
1320
  "top-tagSelector-excluded": e.state === "excluded"
944
1321
  }),
945
- onClick: U(i, ["stop"])
1322
+ onClick: H(d, ["stop"])
946
1323
  }, {
947
1324
  default: B(() => [
948
- P(fe, {
1325
+ U(Te, {
949
1326
  id: e.id,
950
- name: r.value,
1327
+ name: n.value,
951
1328
  colorId: e.colorId,
952
1329
  state: e.state
953
1330
  }, null, 8, ["id", "name", "colorId", "state"]),
954
- oe("span", Ve({
1331
+ N("span", We({
955
1332
  ref_key: "elName",
956
1333
  ref: l,
957
1334
  class: "top-tagSelector_tagListItemName",
958
- contenteditable: u.value ? "plaintext-only" : !1
959
- }, n.value, {
1335
+ contenteditable: i.value ? "plaintext-only" : !1
1336
+ }, r.value, {
960
1337
  onKeydown: [
961
- Ie(U(c, ["stop"]), ["enter"]),
962
- Ie(U(x, ["stop"]), ["esc"])
1338
+ Ee(H(g, ["stop"]), ["enter"]),
1339
+ Ee(H(x, ["stop"]), ["esc"])
963
1340
  ]
964
- }), M(r.value), 17, Tt),
965
- e.editable ? (h(), A(H, { key: 0 }, [
966
- u.value ? (h(), A("span", {
1341
+ }), b(n.value), 17, uo),
1342
+ e.editable ? (h(), j(F, { key: 0 }, [
1343
+ i.value ? (h(), j("span", {
967
1344
  key: 1,
968
1345
  "data-top-icon": "",
969
1346
  class: "top-tagSelector_edit",
970
- onClick: U(c, ["stop"])
971
- })) : (h(), A("span", {
1347
+ onClick: H(g, ["stop"])
1348
+ })) : (h(), j("span", {
972
1349
  key: 0,
973
1350
  "data-top-icon": "",
974
1351
  class: "top-tagSelector_edit",
975
- onClick: f
1352
+ onClick: u
976
1353
  }))
977
- ], 64)) : L("", !0)
1354
+ ], 64)) : M("", !0)
978
1355
  ]),
979
1356
  _: 1
980
1357
  }, 8, ["class"]));
981
1358
  }
982
- }), At = { key: 1 }, bt = /* @__PURE__ */ R({
1359
+ }), co = { key: 1 }, fo = /* @__PURE__ */ K({
983
1360
  inheritAttrs: !1,
984
1361
  __name: "popupOpener",
985
- props: /* @__PURE__ */ b({
1362
+ props: /* @__PURE__ */ G({
986
1363
  modelValue: {},
987
1364
  id: {},
988
1365
  tags: {},
@@ -1000,61 +1377,61 @@ const mt = /* @__PURE__ */ R({
1000
1377
  }),
1001
1378
  emits: ["update:modelValue"],
1002
1379
  setup(e) {
1003
- const a = e, o = T(e, "modelValue"), t = a.useTopButton ? Q : "div", r = a.useTopButton ? "html" : "default", l = {
1380
+ const t = e, o = P(e, "modelValue"), a = t.useTopButton ? ee : "div", n = t.useTopButton ? "html" : "default", l = {
1004
1381
  model: o,
1005
- mode: a.mode,
1006
- targetId: a.targetId,
1007
- filters: a.filters,
1008
- payload: a.payload
1382
+ mode: t.mode,
1383
+ targetId: t.targetId,
1384
+ filters: t.filters,
1385
+ payload: t.payload
1009
1386
  };
1010
- return (n, u) => {
1011
- const f = Pe("top-data");
1012
- return h(), C(Je, { id: e.id }, {
1387
+ return (r, i) => {
1388
+ const u = ot("top-data");
1389
+ return h(), A(dt, { id: e.id }, {
1013
1390
  default: B(() => [
1014
- Ne((h(), C(qe(v(t)), Ve({
1391
+ at((h(), A(lt(v(a)), We({
1015
1392
  class: {
1016
1393
  "top-tagSelector": !0,
1017
- "top-tagSelector-useTopButton": a.useTopButton,
1018
- "top-tagSelector-custom": !a.useTopButton,
1019
- "top-as-selector": a.useTopButton,
1020
- "top-tagSelector-filter": a.mode === "filter",
1021
- "top-tagSelector-setter_single": a.mode === "setter" && !e.filters,
1022
- "top-tagSelector-setter_several": a.mode === "setter" && e.filters,
1394
+ "top-tagSelector-useTopButton": t.useTopButton,
1395
+ "top-tagSelector-custom": !t.useTopButton,
1396
+ "top-as-selector": t.useTopButton,
1397
+ "top-tagSelector-filter": t.mode === "filter",
1398
+ "top-tagSelector-setter_single": t.mode === "setter" && !e.filters,
1399
+ "top-tagSelector-setter_several": t.mode === "setter" && e.filters,
1023
1400
  "top-tagSelector-selectedOne": !o.value.length || o.value.length === 1,
1024
1401
  "top-tagSelector-toTwoLine": o.value.length > 5
1025
1402
  },
1026
1403
  color: "theme",
1027
1404
  styling: e.styling
1028
- }, n.$attrs), {
1029
- [v(r)]: B(() => [
1030
- !o.value.length && e.mode === "filter" ? (h(), C(fe, {
1405
+ }, r.$attrs), {
1406
+ [v(n)]: B(() => [
1407
+ !o.value.length && e.mode === "filter" ? (h(), A(Te, {
1031
1408
  key: 0,
1032
1409
  id: "all",
1033
1410
  colorId: "",
1034
- name: n.$i18n.Common.All_tags ?? "",
1411
+ name: r.$i18n.Common.All_tags ?? "",
1035
1412
  state: ""
1036
- }, null, 8, ["name"])) : L("", !0),
1037
- e.mode === "setter" && e.filters ? (h(), A("div", At, [
1038
- De(n.$slots, "default")
1039
- ])) : (h(!0), A(H, { key: 2 }, me(o.value, (c) => (h(), C(fe, {
1040
- id: v(_)(c),
1041
- colorId: v(ie)(c, e.tags)?.color_id ?? "",
1042
- name: v(ie)(c, e.tags)?.name ?? "",
1043
- state: v(_)(c) === c ? "selected" : "excluded"
1413
+ }, null, 8, ["name"])) : M("", !0),
1414
+ e.mode === "setter" && e.filters ? (h(), j("div", co, [
1415
+ nt(r.$slots, "default")
1416
+ ])) : (h(!0), j(F, { key: 2 }, pe(o.value, (g) => (h(), A(Te, {
1417
+ id: v(te)(g),
1418
+ colorId: v(ve)(g, e.tags)?.color_id ?? "",
1419
+ name: v(ve)(g, e.tags)?.name ?? "",
1420
+ state: v(te)(g) === g ? "selected" : "excluded"
1044
1421
  }, null, 8, ["id", "colorId", "name", "state"]))), 256))
1045
1422
  ]),
1046
1423
  _: 2
1047
1424
  }, 1040, ["class", "styling"])), [
1048
- [f, l, "topTagSelectorTarget"]
1425
+ [u, l, "topTagSelectorTarget"]
1049
1426
  ])
1050
1427
  ]),
1051
1428
  _: 3
1052
1429
  }, 8, ["id"]);
1053
1430
  };
1054
1431
  }
1055
- }), zt = /* @__PURE__ */ R({
1432
+ }), _o = /* @__PURE__ */ K({
1056
1433
  __name: "tagSelector",
1057
- props: /* @__PURE__ */ b({
1434
+ props: /* @__PURE__ */ G({
1058
1435
  modelValue: {},
1059
1436
  tags: {},
1060
1437
  tagsEditable: { type: Boolean },
@@ -1072,177 +1449,177 @@ const mt = /* @__PURE__ */ R({
1072
1449
  },
1073
1450
  modelModifiers: {},
1074
1451
  tags: {
1075
- default: be(Ct)
1452
+ default: De(io)
1076
1453
  },
1077
1454
  tagsModifiers: {}
1078
1455
  }),
1079
- emits: /* @__PURE__ */ b(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
1080
- setup(e, { emit: a }) {
1081
- const o = V(), t = e, r = T(e, "modelValue"), l = T(e, "tags"), n = a, u = ze((p, I) => {
1082
- n(p, I);
1083
- }, t.emitDelay);
1084
- t.singleMode && !r.value.length && (r.value = [l.value[0].id]);
1085
- const f = t.id ?? "top-popup-id-" + Math.random(), c = K("add"), x = () => {
1086
- const p = " " + o.Common.Tags?.toLowerCase(), I = /* @__PURE__ */ new Map();
1087
- return I.set("add", { value: "add", title: o.Common.Add + p }), I.set("replace", { value: "replace", title: o.Common.Replace + p }), I.set("delete", { value: "delete", title: o.Common.Delete + p }), I;
1456
+ emits: /* @__PURE__ */ G(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
1457
+ setup(e, { emit: t }) {
1458
+ const o = w(), a = e, n = P(e, "modelValue"), l = P(e, "tags"), r = t, i = it((y, p) => {
1459
+ r(y, p);
1460
+ }, a.emitDelay);
1461
+ a.singleMode && !n.value.length && (n.value = [l.value[0].id]);
1462
+ const u = a.id ?? "top-popup-id-" + Math.random(), g = _("add"), x = () => {
1463
+ const y = " " + o.Common.Tags?.toLowerCase(), p = /* @__PURE__ */ new Map();
1464
+ return p.set("add", { value: "add", title: o.Common.Add + y }), p.set("replace", { value: "replace", title: o.Common.Replace + y }), p.set("delete", { value: "delete", title: o.Common.Delete + y }), p;
1088
1465
  };
1089
- let i = Fe({
1090
- model: r,
1466
+ let d = qe({
1467
+ model: n,
1091
1468
  mode: "filter",
1092
1469
  targetId: void 0,
1093
1470
  filters: void 0,
1094
1471
  payload: void 0
1095
1472
  });
1096
- E(r, () => {
1097
- u("selector", r.value);
1473
+ L(n, () => {
1474
+ i("selector", n.value);
1098
1475
  });
1099
- const m = w(() => {
1100
- if (i.value.mode === "setter" && t.maxTagsForSetter && !i.value.filters)
1101
- return i.value.model.value.length >= t.maxTagsForSetter;
1102
- }), d = (p) => {
1103
- if (p !== "all") {
1104
- if (i.value.model.value.includes(p)) return "selected";
1105
- if (i.value.model.value.includes(Be(p))) return "excluded";
1476
+ const f = E(() => {
1477
+ if (d.value.mode === "setter" && a.maxTagsForSetter && !d.value.filters)
1478
+ return d.value.model.value.length >= a.maxTagsForSetter;
1479
+ }), s = (y) => {
1480
+ if (y !== "all") {
1481
+ if (d.value.model.value.includes(y)) return "selected";
1482
+ if (d.value.model.value.includes(Oe(y))) return "excluded";
1106
1483
  }
1107
- return p === "all" && !i.value.model.value.length ? "selected" : "";
1108
- }, s = (p, I) => {
1109
- const S = Be(p);
1110
- let k = i.value.model.value.filter((G) => G !== p && G !== S);
1111
- I === "select" && k.push(p), I === "exclude" && k.push(S), i.value.mode === "setter" && i.value.targetId !== void 0 && t.requiredForSetter && (k.length || k.push("1"), k.length === 2 && i.value.model.value.length === 1 && i.value.model.value[0] === "1" && (k = k.filter((G) => G !== "1"))), t.singleMode && !i.value.filters && (k.length || (k = i.value.model.value), k.length > 1 && (k = [k[k.length - 1]])), k.sort((G, ee) => {
1112
- if (!t.tags) return 0;
1113
- const q = t.tags.findIndex((F) => F.id === G), D = t.tags.findIndex((F) => F.id === ee);
1114
- return q - D;
1115
- }), i.value.model.value = k, i.value.mode === "setter" && i.value.targetId !== void 0 && u("setter", {
1116
- tagsIds: k,
1117
- targetId: i.value.targetId,
1118
- payload: i.value.payload
1484
+ return y === "all" && !d.value.model.value.length ? "selected" : "";
1485
+ }, c = (y, p) => {
1486
+ const k = Oe(y);
1487
+ let T = d.value.model.value.filter((O) => O !== y && O !== k);
1488
+ p === "select" && T.push(y), p === "exclude" && T.push(k), d.value.mode === "setter" && d.value.targetId !== void 0 && a.requiredForSetter && (T.length || T.push("1"), T.length === 2 && d.value.model.value.length === 1 && d.value.model.value[0] === "1" && (T = T.filter((O) => O !== "1"))), a.singleMode && !d.value.filters && (T.length || (T = d.value.model.value), T.length > 1 && (T = [T[T.length - 1]])), T.sort((O, ae) => {
1489
+ if (!a.tags) return 0;
1490
+ const J = a.tags.findIndex((Y) => Y.id === O), z = a.tags.findIndex((Y) => Y.id === ae);
1491
+ return J - z;
1492
+ }), d.value.model.value = T, d.value.mode === "setter" && d.value.targetId !== void 0 && i("setter", {
1493
+ tagsIds: T,
1494
+ targetId: d.value.targetId,
1495
+ payload: d.value.payload
1119
1496
  });
1120
- }, g = w(() => {
1121
- let p = "top-tagSelector_popup";
1122
- return i.value.mode === "filter" && (p += " top-tagSelector_popup-filter"), i.value.mode === "setter" && (p += " top-tagSelector_popup-setter"), p;
1123
- }), Z = () => {
1124
- const p = prompt("", "New tag");
1125
- if (!p || p === "New tag") return;
1126
- const I = l.value.length + 1;
1497
+ }, m = E(() => {
1498
+ let y = "top-tagSelector_popup";
1499
+ return d.value.mode === "filter" && (y += " top-tagSelector_popup-filter"), d.value.mode === "setter" && (y += " top-tagSelector_popup-setter"), y;
1500
+ }), I = () => {
1501
+ const y = prompt("", "New tag");
1502
+ if (!y || y === "New tag") return;
1503
+ const p = l.value.length + 1;
1127
1504
  l.value.push({
1128
- id: String(I),
1129
- name: p,
1130
- color_id: String((I - 1) % 10 + 1)
1131
- }), n("tagsChanged", l.value);
1132
- }, N = (p) => {
1133
- if (i.value = W(p.elPopupOpener, "topTagSelectorTarget"), !i.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1134
- if (i.value.filters && (c.value = "add", i.value.model.value = []), !z.$?.ui.sortable) {
1505
+ id: String(p),
1506
+ name: y,
1507
+ color_id: String((p - 1) % 10 + 1)
1508
+ }), r("tagsChanged", l.value);
1509
+ }, C = (y) => {
1510
+ if (d.value = Z(y.elPopupOpener, "topTagSelectorTarget"), !d.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1511
+ if (d.value.filters && (g.value = "add", d.value.model.value = []), !X.$?.ui.sortable) {
1135
1512
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
1136
1513
  return;
1137
1514
  }
1138
- !z.state.isMobile && !z.state.isMobileUA && l.value && $(p.elPopup).sortable({
1515
+ !X.state.isMobile && !X.state.isMobileUA && l.value && $(y.elPopup).sortable({
1139
1516
  items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
1140
1517
  /**
1141
1518
  * @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
1142
1519
  */
1143
1520
  cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
1144
1521
  distance: 10,
1145
- stop: function(I, S) {
1522
+ stop: function(p, k) {
1146
1523
  if (!l.value) return;
1147
- const k = $(S.item).parent().find("[data-tag_id]"), G = [];
1148
- k.each((ee, q) => {
1524
+ const T = $(k.item).parent().find("[data-tag_id]"), O = [];
1525
+ T.each((ae, J) => {
1149
1526
  if (!l.value) return;
1150
- const D = $(q).attr("data-tag_id");
1151
- G.push(D);
1152
- }), l.value.sort((ee, q) => {
1153
- const D = G.findIndex((de) => de === ee.id), F = G.findIndex((de) => de === q.id);
1154
- return D - F;
1155
- }), u("tagsChanged", l.value);
1527
+ const z = $(J).attr("data-tag_id");
1528
+ O.push(z);
1529
+ }), l.value.sort((ae, J) => {
1530
+ const z = O.findIndex((he) => he === ae.id), Y = O.findIndex((he) => he === J.id);
1531
+ return z - Y;
1532
+ }), i("tagsChanged", l.value);
1156
1533
  }
1157
1534
  });
1158
- }, je = (p) => {
1159
- z.$?.ui.sortable && $(p.elPopup).data("ui-sortable") && $(p.elPopup).sortable("destroy");
1535
+ }, R = (y) => {
1536
+ X.$?.ui.sortable && $(y.elPopup).data("ui-sortable") && $(y.elPopup).sortable("destroy");
1160
1537
  };
1161
- return (p, I) => (h(), A(H, null, [
1162
- P(bt, {
1163
- modelValue: r.value,
1164
- "onUpdate:modelValue": I[0] || (I[0] = (S) => r.value = S),
1165
- id: v(f),
1538
+ return (y, p) => (h(), j(F, null, [
1539
+ U(fo, {
1540
+ modelValue: n.value,
1541
+ "onUpdate:modelValue": p[0] || (p[0] = (k) => n.value = k),
1542
+ id: v(u),
1166
1543
  tags: l.value,
1167
1544
  styling: e.styling,
1168
1545
  mode: "filter",
1169
1546
  useTopButton: e.useTopButton
1170
1547
  }, null, 8, ["modelValue", "id", "tags", "styling", "useTopButton"]),
1171
- P(Me, {
1172
- id: v(f),
1173
- class: X(g.value),
1174
- onOpen: I[4] || (I[4] = (S) => N(S)),
1175
- onClose: I[5] || (I[5] = (S) => je(S)),
1548
+ U(je, {
1549
+ id: v(u),
1550
+ class: oe(m.value),
1551
+ onOpen: p[4] || (p[4] = (k) => C(k)),
1552
+ onClose: p[5] || (p[5] = (k) => R(k)),
1176
1553
  "transition-duration": 50
1177
- }, Ue({
1554
+ }, rt({
1178
1555
  contentList: B(() => [
1179
- v(i).mode === "filter" && !e.singleMode ? (h(), C(Ae, {
1556
+ v(d).mode === "filter" && !e.singleMode ? (h(), A(Ne, {
1180
1557
  key: 0,
1181
1558
  id: "all",
1182
1559
  colorId: "",
1183
- name: p.$i18n.Common.All_tags ?? "",
1184
- state: v(i).model.value.length ? "" : "selected",
1185
- onSelect: I[3] || (I[3] = (S) => v(i).model.value = [])
1186
- }, null, 8, ["name", "state"])) : L("", !0),
1187
- (h(!0), A(H, null, me(l.value, (S) => (h(), C(Ae, {
1188
- key: S.id,
1189
- id: S.id,
1190
- colorId: S.color_id,
1191
- name: S.name,
1192
- state: d(S.id),
1193
- canExclude: v(i).mode === "filter" && !e.singleMode,
1560
+ name: y.$i18n.Common.All_tags ?? "",
1561
+ state: v(d).model.value.length ? "" : "selected",
1562
+ onSelect: p[3] || (p[3] = (k) => v(d).model.value = [])
1563
+ }, null, 8, ["name", "state"])) : M("", !0),
1564
+ (h(!0), j(F, null, pe(l.value, (k) => (h(), A(Ne, {
1565
+ key: k.id,
1566
+ id: k.id,
1567
+ colorId: k.color_id,
1568
+ name: k.name,
1569
+ state: s(k.id),
1570
+ canExclude: v(d).mode === "filter" && !e.singleMode,
1194
1571
  editable: e.tagsEditable,
1195
- disabled: m.value && d(S.id) === "",
1196
- onUnselect: (k) => s(S.id, "unselect"),
1197
- onSelect: (k) => s(S.id, "select"),
1198
- onExclude: (k) => s(S.id, "exclude"),
1199
- "onUpdate:name": (k) => {
1200
- S.name = k, v(u)("tagsChanged", l.value);
1572
+ disabled: f.value && s(k.id) === "",
1573
+ onUnselect: (T) => c(k.id, "unselect"),
1574
+ onSelect: (T) => c(k.id, "select"),
1575
+ onExclude: (T) => c(k.id, "exclude"),
1576
+ "onUpdate:name": (T) => {
1577
+ k.name = T, v(i)("tagsChanged", l.value);
1201
1578
  }
1202
1579
  }, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
1203
- e.tagsEditable && l.value.length < e.tagsMax && l.value.length < 20 ? (h(), C(ve, {
1580
+ e.tagsEditable && l.value.length < e.tagsMax && l.value.length < 20 ? (h(), A(Ae, {
1204
1581
  key: 1,
1205
1582
  "data-top-icon": "",
1206
- onClick: U(Z, ["stop"])
1583
+ onClick: H(I, ["stop"])
1207
1584
  }, {
1208
1585
  default: B(() => [
1209
- J(M(p.$i18n.Common.Add), 1)
1586
+ W(b(y.$i18n.Common.Add), 1)
1210
1587
  ]),
1211
1588
  _: 1
1212
- })) : L("", !0)
1589
+ })) : M("", !0)
1213
1590
  ]),
1214
1591
  _: 2
1215
1592
  }, [
1216
- v(i).mode === "setter" && v(i).filters ? {
1593
+ v(d).mode === "setter" && v(d).filters ? {
1217
1594
  name: "header",
1218
1595
  fn: B(() => [
1219
- P(ce, {
1220
- modelValue: c.value,
1221
- "onUpdate:modelValue": I[1] || (I[1] = (S) => c.value = S),
1596
+ U(xe, {
1597
+ modelValue: g.value,
1598
+ "onUpdate:modelValue": p[1] || (p[1] = (k) => g.value = k),
1222
1599
  options: x()
1223
1600
  }, null, 8, ["modelValue", "options"])
1224
1601
  ]),
1225
1602
  key: "0"
1226
1603
  } : void 0,
1227
- v(i).mode === "setter" && v(i).filters ? {
1604
+ v(d).mode === "setter" && v(d).filters ? {
1228
1605
  name: "footer",
1229
1606
  fn: B(() => [
1230
- P(Q, { color: "theme" }, {
1607
+ U(ee, { color: "theme" }, {
1231
1608
  default: B(() => [
1232
- J(M(p.$i18n.Common.Cancel), 1)
1609
+ W(b(y.$i18n.Common.Cancel), 1)
1233
1610
  ]),
1234
1611
  _: 1
1235
1612
  }),
1236
- P(Q, {
1237
- onClick: I[2] || (I[2] = (S) => v(u)("setter", {
1238
- tagsIds: v(i).model.value,
1239
- filters: v(i).filters,
1240
- filtersAction: c.value,
1241
- payload: v(i).payload
1613
+ U(ee, {
1614
+ onClick: p[2] || (p[2] = (k) => v(i)("setter", {
1615
+ tagsIds: v(d).model.value,
1616
+ filters: v(d).filters,
1617
+ filtersAction: g.value,
1618
+ payload: v(d).payload
1242
1619
  }))
1243
1620
  }, {
1244
1621
  default: B(() => [
1245
- J(M(c.value === "add" ? p.$i18n.Common.Add : "") + " " + M(c.value === "replace" ? p.$i18n.Common.Replace : "") + " " + M(c.value === "delete" ? p.$i18n.Common.Delete : ""), 1)
1622
+ W(b(g.value === "add" ? y.$i18n.Common.Add : "") + " " + b(g.value === "replace" ? y.$i18n.Common.Replace : "") + " " + b(g.value === "delete" ? y.$i18n.Common.Delete : ""), 1)
1246
1623
  ]),
1247
1624
  _: 1
1248
1625
  })
@@ -1254,17 +1631,19 @@ const mt = /* @__PURE__ */ R({
1254
1631
  }
1255
1632
  });
1256
1633
  export {
1257
- Pt as TopCompetitorSelector,
1258
- Dt as TopGroupSelector,
1259
- qt as TopRegionSelector,
1260
- zt as TopTagSelector,
1261
- bt as TopTagSelectorPopupOpener,
1262
- fe as TopTagSelectorTagIcon,
1263
- it as dialogRegionSelector,
1264
- rt as findRegion,
1265
- Ft as genElTopTagSelectorPopupOpener,
1266
- Ke as genSearcherByKey,
1267
- Ut as renderElTopTagSelectorPopupOpener,
1268
- Nt as useItemsFromCompetitors
1634
+ Bo as TopCompetitorSelector,
1635
+ bo as TopGroupSelector,
1636
+ Po as TopProjectSelector,
1637
+ $o as TopRegionSelector,
1638
+ _o as TopTagSelector,
1639
+ fo as TopTagSelectorPopupOpener,
1640
+ Te as TopTagSelectorTagIcon,
1641
+ to as clearCache,
1642
+ At as dialogRegionSelector,
1643
+ jt as findRegion,
1644
+ Eo as genElTopTagSelectorPopupOpener,
1645
+ Ye as genSearcherByKey,
1646
+ Mo as renderElTopTagSelectorPopupOpener,
1647
+ wo as useItemsFromCompetitors
1269
1648
  };
1270
1649
  //# sourceMappingURL=project.js.map