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