@topvisor/ui 1.5.6-topSelectorReactive.0 → 1.5.6-yandexLive.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 (187) hide show
  1. package/.chunks/api-DZQlrC2R.amd.js +2 -0
  2. package/.chunks/api-DZQlrC2R.amd.js.map +1 -0
  3. package/.chunks/{api-D5wIZnrK.esm.js → api-DZQlrC2R.esm.js} +21 -18
  4. package/.chunks/api-DZQlrC2R.esm.js.map +1 -0
  5. package/.chunks/{app-CQnQGya1.amd.js → app-DinkodXi.amd.js} +2 -2
  6. package/.chunks/{app-CQnQGya1.amd.js.map → app-DinkodXi.amd.js.map} +1 -1
  7. package/.chunks/{app-CQnQGya1.esm.js → app-DinkodXi.esm.js} +11 -11
  8. package/.chunks/app-DinkodXi.esm.js.map +1 -0
  9. package/.chunks/{datepicker-CYAhR3K9.amd.js → datepicker-bozIEbDA.amd.js} +2 -2
  10. package/.chunks/{datepicker-CYAhR3K9.amd.js.map → datepicker-bozIEbDA.amd.js.map} +1 -1
  11. package/.chunks/{datepicker-CYAhR3K9.esm.js → datepicker-bozIEbDA.esm.js} +2 -2
  12. package/.chunks/{datepicker-CYAhR3K9.esm.js.map → datepicker-bozIEbDA.esm.js.map} +1 -1
  13. package/.chunks/{dialog-B7DkbSQZ.amd.js → dialog-BCDVMWG1.amd.js} +2 -2
  14. package/.chunks/{dialog-B7DkbSQZ.amd.js.map → dialog-BCDVMWG1.amd.js.map} +1 -1
  15. package/.chunks/{dialog-B7DkbSQZ.esm.js → dialog-BCDVMWG1.esm.js} +3 -3
  16. package/.chunks/{dialog-B7DkbSQZ.esm.js.map → dialog-BCDVMWG1.esm.js.map} +1 -1
  17. package/.chunks/{dialog_regionSelectorRegions-DnDFRV42.amd.js → dialog_regionSelectorRegions-0M1fMu1a.amd.js} +2 -2
  18. package/.chunks/dialog_regionSelectorRegions-0M1fMu1a.amd.js.map +1 -0
  19. package/.chunks/{dialog_regionSelectorRegions-DnDFRV42.esm.js → dialog_regionSelectorRegions-0M1fMu1a.esm.js} +6 -6
  20. package/.chunks/dialog_regionSelectorRegions-0M1fMu1a.esm.js.map +1 -0
  21. package/.chunks/forms-CY5MOh7a.amd.js +2 -0
  22. package/.chunks/forms-CY5MOh7a.amd.js.map +1 -0
  23. package/.chunks/{forms-BiKUURH4.esm.js → forms-CY5MOh7a.esm.js} +16 -14
  24. package/.chunks/forms-CY5MOh7a.esm.js.map +1 -0
  25. package/.chunks/formsExt-C9r4Gz9y.amd.js +2 -0
  26. package/.chunks/formsExt-C9r4Gz9y.amd.js.map +1 -0
  27. package/.chunks/{formsExt-kZL0--bf.esm.js → formsExt-C9r4Gz9y.esm.js} +162 -162
  28. package/.chunks/formsExt-C9r4Gz9y.esm.js.map +1 -0
  29. package/.chunks/{mocker-C3O-c0Np.amd.js → mocker-Bl1SzAJY.amd.js} +2 -2
  30. package/.chunks/mocker-Bl1SzAJY.amd.js.map +1 -0
  31. package/.chunks/{mocker-C3O-c0Np.esm.js → mocker-Bl1SzAJY.esm.js} +6 -2
  32. package/.chunks/mocker-Bl1SzAJY.esm.js.map +1 -0
  33. package/.chunks/notice-bro62vCA.amd.js +4 -0
  34. package/.chunks/notice-bro62vCA.amd.js.map +1 -0
  35. package/.chunks/{notice-LFdPfo-5.esm.js → notice-bro62vCA.esm.js} +3 -3
  36. package/.chunks/notice-bro62vCA.esm.js.map +1 -0
  37. package/.chunks/popup-3cwJ8Hev.amd.js +2 -0
  38. package/.chunks/popup-3cwJ8Hev.amd.js.map +1 -0
  39. package/.chunks/{popup-KKfSSrM6.esm.js → popup-3cwJ8Hev.esm.js} +5 -3
  40. package/.chunks/popup-3cwJ8Hev.esm.js.map +1 -0
  41. package/.chunks/popup-CzhBQhVH.amd.js +2 -0
  42. package/.chunks/popup-CzhBQhVH.amd.js.map +1 -0
  43. package/.chunks/{popup-DB5g_8kB.esm.js → popup-CzhBQhVH.esm.js} +5 -5
  44. package/.chunks/popup-CzhBQhVH.esm.js.map +1 -0
  45. package/.chunks/punycode.es6-CMafsPEb.amd.js +2 -0
  46. package/.chunks/punycode.es6-CMafsPEb.amd.js.map +1 -0
  47. package/.chunks/punycode.es6-CMafsPEb.esm.js +105 -0
  48. package/.chunks/{punycode.es6-BZRFIj88.esm.js.map → punycode.es6-CMafsPEb.esm.js.map} +1 -1
  49. package/.chunks/store-DjQAOnrn.esm.js.map +1 -1
  50. package/.chunks/{utils-D4nhUVHm.amd.js → utils-Be-ScFyj.amd.js} +2 -2
  51. package/.chunks/{utils-D4nhUVHm.amd.js.map → utils-Be-ScFyj.amd.js.map} +1 -1
  52. package/.chunks/{utils-D4nhUVHm.esm.js → utils-Be-ScFyj.esm.js} +3 -3
  53. package/.chunks/{utils-D4nhUVHm.esm.js.map → utils-Be-ScFyj.esm.js.map} +1 -1
  54. package/.chunks/{utils-DKbnf1Th.amd.js → utils-ds_g-L_r.amd.js} +2 -2
  55. package/.chunks/{utils-DKbnf1Th.amd.js.map → utils-ds_g-L_r.amd.js.map} +1 -1
  56. package/.chunks/{utils-DKbnf1Th.esm.js → utils-ds_g-L_r.esm.js} +4 -4
  57. package/.chunks/{utils-DKbnf1Th.esm.js.map → utils-ds_g-L_r.esm.js.map} +1 -1
  58. package/.chunks/{worker-BufdAd-a.amd.js → worker-Bv_yPPMv.amd.js} +2 -2
  59. package/.chunks/{worker-BufdAd-a.amd.js.map → worker-Bv_yPPMv.amd.js.map} +1 -1
  60. package/.chunks/{worker-BufdAd-a.esm.js → worker-Bv_yPPMv.esm.js} +3 -3
  61. package/.chunks/{worker-BufdAd-a.esm.js.map → worker-Bv_yPPMv.esm.js.map} +1 -1
  62. package/api/additional.js.map +1 -1
  63. package/api/index.amd.js +1 -1
  64. package/api/index.amd.js.map +1 -1
  65. package/api/index.js +1 -1
  66. package/assets/formsExt.css +1 -1
  67. package/assets/project.css +1 -1
  68. package/autoload-css-manifest.amd.json +4 -4
  69. package/autoload-css-manifest.json +4 -4
  70. package/charts/charts.amd.js +1 -1
  71. package/charts/charts.amd.js.map +1 -1
  72. package/charts/charts.js +1 -1
  73. package/charts/charts.js.map +1 -1
  74. package/core/app.amd.js +1 -1
  75. package/core/app.amd.js.map +1 -1
  76. package/core/app.js +3 -3
  77. package/dialog/dialog.amd.js +1 -1
  78. package/dialog/dialog.amd.js.map +1 -1
  79. package/dialog/dialog.js +2 -2
  80. package/forms/forms.amd.js +1 -1
  81. package/forms/forms.amd.js.map +1 -1
  82. package/forms/forms.js +1 -1
  83. package/formsExt/formsExt.amd.js +1 -1
  84. package/formsExt/formsExt.amd.js.map +1 -1
  85. package/formsExt/formsExt.js +1 -1
  86. package/layout/layout.amd.js +1 -1
  87. package/layout/layout.amd.js.map +1 -1
  88. package/layout/layout.js +1 -1
  89. package/package.json +2 -2
  90. package/popup/popup.amd.js +1 -1
  91. package/popup/popup.amd.js.map +1 -1
  92. package/popup/popup.js +1 -1
  93. package/popup/worker.amd.js +1 -1
  94. package/popup/worker.amd.js.map +1 -1
  95. package/popup/worker.js +1 -1
  96. package/project/project.amd.js +1 -1
  97. package/project/project.amd.js.map +1 -1
  98. package/project/project.js +561 -560
  99. package/project/project.js.map +1 -1
  100. package/schedule/schedule.amd.js +1 -1
  101. package/schedule/schedule.amd.js.map +1 -1
  102. package/schedule/schedule.js +8 -6
  103. package/schedule/schedule.js.map +1 -1
  104. package/src/api/api/mocker/index.d.ts +1 -6
  105. package/src/api/api/types/api.d.ts +1 -1
  106. package/src/components/formsExt/selector2/composables/useAPI.d.ts +406 -0
  107. package/src/components/formsExt/selector2/composables/useMenu.d.ts +412 -0
  108. package/src/components/formsExt/selector2/types.d.ts +17 -11
  109. package/src/components/popup/popup/types.d.ts +6 -1
  110. package/src/components/project/project.d.ts +1 -1
  111. package/src/components/project/projectSelector/cache.d.ts +14 -12
  112. package/src/components/project/projectSelector/submenu/types.d.ts +7 -14
  113. package/src/components/project/projectSelector/types.d.ts +22 -9
  114. package/src/components/project/projectSelector/utils.d.ts +8 -4
  115. package/src/components/project/regionSelector/utils/consts.d.ts +1 -0
  116. package/src/core/core/core.d.ts +2 -3
  117. package/src/core/core/options.d.ts +26 -19
  118. package/src/core/core/state.d.ts +3 -4
  119. package/src/core/plugins/core.d.ts +1 -1
  120. package/src/core/utils/searchers.d.ts +1 -0
  121. package/tabsView/tabsView.amd.js +1 -1
  122. package/tabsView/tabsView.amd.js.map +1 -1
  123. package/tabsView/tabsView.js +2 -2
  124. package/tabsView/tabsView.js.map +1 -1
  125. package/utils/check.js.map +1 -1
  126. package/utils/clipboard.amd.js +1 -1
  127. package/utils/clipboard.amd.js.map +1 -1
  128. package/utils/clipboard.js +1 -1
  129. package/utils/clipboard.js.map +1 -1
  130. package/utils/date.amd.js +1 -1
  131. package/utils/date.amd.js.map +1 -1
  132. package/utils/date.js +1 -1
  133. package/utils/device.amd.js +1 -1
  134. package/utils/device.amd.js.map +1 -1
  135. package/utils/device.js +1 -1
  136. package/utils/dom.amd.js.map +1 -1
  137. package/utils/dom.js.map +1 -1
  138. package/utils/image.amd.js +1 -1
  139. package/utils/image.amd.js.map +1 -1
  140. package/utils/image.js +1 -1
  141. package/utils/lodash.amd.js +1 -1
  142. package/utils/lodash.amd.js.map +1 -1
  143. package/utils/lodash.js +1 -1
  144. package/utils/price.amd.js +1 -1
  145. package/utils/price.amd.js.map +1 -1
  146. package/utils/price.js +1 -1
  147. package/utils/price.js.map +1 -1
  148. package/utils/route.js.map +1 -1
  149. package/utils/scroll.js.map +1 -1
  150. package/utils/searchers.amd.js +1 -1
  151. package/utils/searchers.amd.js.map +1 -1
  152. package/utils/searchers.js +3 -1
  153. package/utils/searchers.js.map +1 -1
  154. package/utils/string.amd.js +1 -1
  155. package/utils/string.amd.js.map +1 -1
  156. package/utils/string.js +2 -2
  157. package/utils/string.js.map +1 -1
  158. package/utils/url.amd.js +1 -1
  159. package/utils/url.amd.js.map +1 -1
  160. package/utils/url.js +1 -1
  161. package/utils/url.js.map +1 -1
  162. package/.chunks/api-D5wIZnrK.amd.js +0 -2
  163. package/.chunks/api-D5wIZnrK.amd.js.map +0 -1
  164. package/.chunks/api-D5wIZnrK.esm.js.map +0 -1
  165. package/.chunks/app-CQnQGya1.esm.js.map +0 -1
  166. package/.chunks/dialog_regionSelectorRegions-DnDFRV42.amd.js.map +0 -1
  167. package/.chunks/dialog_regionSelectorRegions-DnDFRV42.esm.js.map +0 -1
  168. package/.chunks/forms-BiKUURH4.amd.js +0 -2
  169. package/.chunks/forms-BiKUURH4.amd.js.map +0 -1
  170. package/.chunks/forms-BiKUURH4.esm.js.map +0 -1
  171. package/.chunks/formsExt-kZL0--bf.amd.js +0 -2
  172. package/.chunks/formsExt-kZL0--bf.amd.js.map +0 -1
  173. package/.chunks/formsExt-kZL0--bf.esm.js.map +0 -1
  174. package/.chunks/mocker-C3O-c0Np.amd.js.map +0 -1
  175. package/.chunks/mocker-C3O-c0Np.esm.js.map +0 -1
  176. package/.chunks/notice-LFdPfo-5.amd.js +0 -4
  177. package/.chunks/notice-LFdPfo-5.amd.js.map +0 -1
  178. package/.chunks/notice-LFdPfo-5.esm.js.map +0 -1
  179. package/.chunks/popup-DB5g_8kB.amd.js +0 -2
  180. package/.chunks/popup-DB5g_8kB.amd.js.map +0 -1
  181. package/.chunks/popup-DB5g_8kB.esm.js.map +0 -1
  182. package/.chunks/popup-KKfSSrM6.amd.js +0 -2
  183. package/.chunks/popup-KKfSSrM6.amd.js.map +0 -1
  184. package/.chunks/popup-KKfSSrM6.esm.js.map +0 -1
  185. package/.chunks/punycode.es6-BZRFIj88.amd.js +0 -2
  186. package/.chunks/punycode.es6-BZRFIj88.amd.js.map +0 -1
  187. package/.chunks/punycode.es6-BZRFIj88.esm.js +0 -105
@@ -5,25 +5,24 @@
5
5
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
6
6
  /* end import css */
7
7
 
8
- import "../.chunks/api-D5wIZnrK.esm.js";
9
- import { E as e, O as t, P as n, h as r, n as i } from "../.chunks/forms-BiKUURH4.esm.js";
8
+ import "../.chunks/api-DZQlrC2R.esm.js";
9
+ import { E as e, O as t, P as n, h as r, n as i } from "../.chunks/forms-CY5MOh7a.esm.js";
10
10
  import { n as a, t as o } from "../.chunks/field-DEusYVqS.esm.js";
11
11
  import { storage as s } from "../utils/dom.js";
12
- import { t as c } from "../.chunks/worker-BufdAd-a.esm.js";
13
- import "../.chunks/app-CQnQGya1.esm.js";
14
- import { t as l } from "../.chunks/utils-D4nhUVHm.esm.js";
12
+ import { t as c } from "../.chunks/worker-Bv_yPPMv.esm.js";
13
+ import "../.chunks/app-DinkodXi.esm.js";
14
+ import { t as l } from "../.chunks/utils-Be-ScFyj.esm.js";
15
15
  import { validUrl as u } from "../utils/check.js";
16
16
  import { ellipsis as d } from "../utils/string.js";
17
17
  import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
18
18
  import { invertKeyboardLayout as h } from "../utils/keyboard.js";
19
- import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-KKfSSrM6.esm.js";
20
- import { d as b, s as x, u as te } from "../.chunks/formsExt-kZL0--bf.esm.js";
21
- import "../popup/worker.js";
22
- import { Fragment as S, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createSlots as ne, createTextVNode as O, createVNode as k, defineComponent as A, isRef as re, mergeModels as j, mergeProps as ie, nextTick as ae, normalizeClass as M, onMounted as oe, openBlock as N, reactive as se, ref as P, renderList as F, renderSlot as ce, resolveComponent as le, resolveDirective as ue, resolveDynamicComponent as de, shallowRef as fe, toDisplayString as I, toValue as pe, unref as L, useModel as R, watch as z, withCtx as B, withDirectives as me, withKeys as he, withModifiers as V } from "vue";
19
+ import { c as g, n as _, o as v, r as ee, s as y } from "../.chunks/popup-3cwJ8Hev.esm.js";
20
+ import { d as b, f as x, s as S, u as te } from "../.chunks/formsExt-C9r4Gz9y.esm.js";
21
+ import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as ne, createTextVNode as k, createVNode as A, defineComponent as j, isRef as re, mergeModels as M, mergeProps as ie, nextTick as ae, normalizeClass as N, onMounted as oe, openBlock as P, reactive as se, ref as F, renderList as I, renderSlot as ce, resolveComponent as le, resolveDirective as ue, resolveDynamicComponent as de, shallowRef as fe, toDisplayString as L, toValue as pe, unref as R, useId as me, useModel as z, watch as B, withCtx as V, withDirectives as he, withKeys as ge, withModifiers as H } from "vue";
23
22
  //#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
24
- var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, ve = /* @__PURE__ */ A({
23
+ var _e = { class: "top-competitorSelector" }, ve = { class: "top-ellipsis1" }, ye = /* @__PURE__ */ j({
25
24
  __name: "competitorSelector",
26
- props: /*@__PURE__*/ j({
25
+ props: /*@__PURE__*/ M({
27
26
  modelValue: {},
28
27
  items: {},
29
28
  showSelectAllItem: {
@@ -37,7 +36,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
37
36
  }),
38
37
  emits: ["update:modelValue"],
39
38
  setup(n) {
40
- let i = n, a = R(n, "modelValue"), o = C(() => {
39
+ let i = n, a = z(n, "modelValue"), o = w(() => {
41
40
  if (i.showSelectAllItem) return {
42
41
  icon: i.selectAllItemIcon,
43
42
  title: e().Common.Select_all,
@@ -45,23 +44,23 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
45
44
  content: ""
46
45
  };
47
46
  });
48
- return (e, i) => (N(), E("div", ge, [L(t).state.isMobile ? (N(), w(y, { key: 0 }, {
49
- opener: B(() => [k(r, {
47
+ return (e, i) => (P(), D("div", _e, [R(t).state.isMobile ? (P(), T(y, { key: 0 }, {
48
+ opener: V(() => [A(r, {
50
49
  class: "top-competitorSelector_opener",
51
50
  color: "theme",
52
51
  icon: "",
53
52
  icon2: ""
54
53
  }, {
55
- default: B(() => [O(I(n.items.find((e) => e.value === a.value?.[0])?.content), 1)]),
54
+ default: V(() => [k(L(n.items.find((e) => e.value === a.value?.[0])?.content), 1)]),
56
55
  _: 1
57
56
  })]),
58
- contentList: B(() => [(N(!0), E(S, null, F(n.items, (e) => (N(), w(v, {
59
- class: M({ "top-active": a.value?.includes(e.value) }),
57
+ contentList: V(() => [(P(!0), D(C, null, I(n.items, (e) => (P(), T(v, {
58
+ class: N({ "top-active": a.value?.includes(e.value) }),
60
59
  "data-top-icon": e.icon,
61
60
  title: e.title,
62
61
  onClick: () => a.value = [e.value]
63
62
  }, {
64
- default: B(() => [D("span", _e, I(e.content), 1)]),
63
+ default: V(() => [O("span", ve, L(e.content), 1)]),
65
64
  _: 2
66
65
  }, 1032, [
67
66
  "class",
@@ -70,7 +69,7 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
70
69
  "onClick"
71
70
  ]))), 256))]),
72
71
  _: 1
73
- })) : (N(), w(b, {
72
+ })) : (P(), T(x, {
74
73
  key: 1,
75
74
  modelValue: a.value,
76
75
  "onUpdate:modelValue": i[0] ||= (e) => a.value = e,
@@ -85,12 +84,12 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
85
84
  "selectAllItem"
86
85
  ]))]));
87
86
  }
88
- }), ye = (e, t) => C(() => pe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
87
+ }), be = (e, t) => w(() => pe(e).filter((e) => e.on >= 0 || e.id === t).map((e) => ({
89
88
  value: e.id,
90
89
  title: e.url + ` [${e.id}]`,
91
90
  icon: e.id === pe(t) ? "" : "",
92
91
  content: e.name
93
- }))), be = {
92
+ }))), xe = {
94
93
  0: "Yandex",
95
94
  1: "Google",
96
95
  4: "YouTube",
@@ -99,26 +98,27 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
99
98
  8: "AppStore",
100
99
  9: "GoogleStore",
101
100
  20: "Yandex.com",
102
- 21: "Yandex.com.tr"
103
- }, xe = {
101
+ 21: "Yandex.com.tr",
102
+ 22: "YandexLive"
103
+ }, Se = {
104
104
  key: -2,
105
105
  name: "--",
106
106
  index: -2
107
- }, Se = {
107
+ }, Ce = {
108
108
  key: -2,
109
109
  name: "--",
110
- regions: [xe],
111
- regionByIndex: new Map([[-2, xe]])
112
- }, H = {
110
+ regions: [Se],
111
+ regionByIndex: /* @__PURE__ */ new Map([[-2, Se]])
112
+ }, U = {
113
113
  key: -2,
114
114
  name: "Autoselect",
115
115
  index: -2
116
- }, Ce = {
116
+ }, we = {
117
117
  key: -2,
118
118
  name: "Autoselect",
119
- regions: [H],
120
- regionByIndex: new Map([[-2, H]])
121
- }, we = {
119
+ regions: [U],
120
+ regionByIndex: /* @__PURE__ */ new Map([[-2, U]])
121
+ }, Te = {
122
122
  countryCode: "00",
123
123
  depth: 1,
124
124
  device: 0,
@@ -126,13 +126,13 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
126
126
  index: -1,
127
127
  lang: "ru",
128
128
  name: "Without region"
129
- }, Te = () => (H.name = e().Common.Autoselect, H), Ee = () => (Te(), Ce.name = e().Common.Autoselect, console.log(Ce), Ce), De = () => (we.name = e().Keywords.Without_region, we), Oe = (e = "", t = !1, n = []) => {
129
+ }, Ee = () => (U.name = e().Common.Autoselect, U), De = () => (Ee(), we.name = e().Common.Autoselect, console.log(we), we), Oe = () => (Te.name = e().Keywords.Without_region, Te), ke = (e = "", t = !1, n = []) => {
130
130
  let r;
131
- return r = e ? Ae(n, e) : ke(n), t && r.set(-2, Ee()), r.size || r.set(-2, Se), r;
132
- }, ke = (e, t = !0, n = [], r = "") => {
131
+ return r = e ? je(n, e) : Ae(n), t && r.set(-2, De()), r.size || r.set(-2, Ce), r;
132
+ }, Ae = (e, t = !0, n = [], r = "") => {
133
133
  let i = /* @__PURE__ */ new Map();
134
134
  return e.forEach((e) => {
135
- if (!e.enabled || r && typeof e.key == "number" && e.key > 1) return;
135
+ if (r !== "project_relevant_url" && !e.enabled || r && typeof e.key == "number" && e.key > 1) return;
136
136
  let a = { ...e };
137
137
  a.regionByIndex = /* @__PURE__ */ new Map(), e.regions && e.regions.forEach((e) => {
138
138
  if (t && !e.enabled) return;
@@ -143,35 +143,35 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
143
143
  if (i.has(e)) return;
144
144
  let t = {
145
145
  key: e,
146
- name: be[e],
146
+ name: xe[e],
147
147
  regions: [],
148
148
  regionByIndex: /* @__PURE__ */ new Map()
149
149
  };
150
150
  i.set(t.key, t);
151
151
  }), i;
152
- }, Ae = (e, n) => {
153
- let r = ke(e, !1, t.state.forceSearchersKeysForKeywordsStats, n);
152
+ }, je = (e, n) => {
153
+ let r = Ae(e, !1, t.state.forceSearchersKeysForKeywordsStats, n);
154
154
  if (r.has(2)) {
155
155
  let e = r.get(2);
156
156
  e && (e.regionByIndex = /* @__PURE__ */ new Map());
157
157
  }
158
158
  return (n === "volume" || n === "cost_forecast") && t.state.showGlobalRegionForKeywordsStats && r.forEach((e) => {
159
159
  if (!e.regionByIndex) return;
160
- let t = { ...De() };
160
+ let t = { ...Oe() };
161
161
  e.regionByIndex.set(t.index, t);
162
162
  }), r;
163
- }, je = (e, t, n = []) => {
164
- let r = Oe(e, !1, n), i;
163
+ }, Me = (e, t, n = []) => {
164
+ let r = ke(e, !1, n), i;
165
165
  return r.forEach((n) => {
166
166
  if (!(t.searcher_key !== void 0 && t.searcher_key != n.key) && n.regions && (n.regions.forEach((r) => {
167
167
  if (!i && !(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))) return r.searcher_key = n.key, i = r, !1;
168
168
  }), i)) return !1;
169
169
  }), i;
170
- }, Me = l(() => import("../.chunks/dialog_regionSelectorRegions-DnDFRV42.esm.js")), Ne = (t, n) => {
170
+ }, Ne = l(() => import("../.chunks/dialog_regionSelectorRegions-0M1fMu1a.esm.js")), Pe = (t, n) => {
171
171
  let r = e();
172
172
  return {
173
- searcherKey: P(n.value.keys().next().value ?? -2),
174
- optionBySearcherKey: C(() => {
173
+ searcherKey: F(n.value.keys().next().value ?? -2),
174
+ optionBySearcherKey: w(() => {
175
175
  let e = /* @__PURE__ */ new Map();
176
176
  if (n.value.forEach((n) => {
177
177
  let r = {
@@ -195,57 +195,57 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
195
195
  return e;
196
196
  })
197
197
  };
198
- }, Pe = (t, n) => {
199
- let r = e(), i = P(-2);
200
- t.modelValue.length === 1 && (i.value = t.modelValue[0]), i.value === -2 && (t.forMode ? i.value = n.value?.regionByIndex.values().next().value?.key ?? -2 : i.value = n.value?.regionByIndex.keys().next().value ?? -2);
201
- let a = C(() => {
198
+ }, Fe = (t, n) => {
199
+ let r = e(), i = w(() => t.forMode === "volume" || t.forMode === "cost_forecast"), a = F(-2);
200
+ t.modelValue.length === 1 && (a.value = t.modelValue[0]), a.value === -2 && (i.value ? a.value = n.value?.regionByIndex.values().next().value?.key ?? -2 : a.value = n.value?.regionByIndex.keys().next().value ?? -2);
201
+ let o = w(() => {
202
202
  let e = /* @__PURE__ */ new Map();
203
- return n.value.regionByIndex?.forEach((i) => {
204
- let a = i.name;
205
- if (t.forMode) {
206
- let t = {
207
- value: i.key,
203
+ return n.value.regionByIndex?.forEach((t) => {
204
+ let a = t.name;
205
+ if (i.value) {
206
+ let n = {
207
+ value: t.key,
208
208
  title: a
209
209
  };
210
- e.has(i.key) || e.set(i.key, t);
210
+ e.has(t.key) || e.set(t.key, n);
211
211
  return;
212
212
  }
213
- i.device && (a += " (" + r.Common["Device_" + i.device] + ")");
214
- let o = p(n.value.key || 0, i.lang ?? "");
213
+ t.device && (a += " (" + r.Common["Device_" + t.device] + ")");
214
+ let o = p(n.value.key || 0, t.lang ?? "");
215
215
  o && (a += " / " + o);
216
216
  let s = {
217
- value: i.index,
217
+ value: t.index,
218
218
  title: a,
219
- icon: i.device ? f(i.device) : void 0
219
+ icon: t.device ? f(t.device) : void 0
220
220
  };
221
- e.set(i.index, s);
221
+ e.set(t.index, s);
222
222
  }), e;
223
223
  });
224
- return z(a, (e, n) => {
225
- if (t.onlySearcher || i.value !== void 0 && e.get(i.value)) return;
226
- let a = e.keys().next().value;
227
- if (i.value === -2 || a === -2) {
228
- i.value = a;
224
+ return B(o, (e, n) => {
225
+ if (t.onlySearcher || a.value !== void 0 && e.get(a.value)) return;
226
+ let i = e.keys().next().value;
227
+ if (a.value === -2 || i === -2) {
228
+ a.value = i;
229
229
  return;
230
230
  }
231
- let o = n?.get(i.value)?.title || "", s = -1;
231
+ let o = n?.get(a.value)?.title || "", s = -1;
232
232
  for (let [t, n] of e.entries()) {
233
233
  let e = n.title;
234
234
  if (typeof e != "string" || typeof t == "string") break;
235
235
  if (e === o) {
236
- a = t;
236
+ i = t;
237
237
  break;
238
238
  }
239
- let i = RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`), c = o, l = 3;
240
- e.indexOf(c) === -1 && (c = o.replace(/^[^a-zа-я]/i, "").replace(i, ""), l--), e.indexOf(c) === -1 && (c = o.replace(/ \/.*/, ""), l--), e.indexOf(c) === -1 && (c = o.replace(/ \/.*/, ""), c = c.replace(/^[^a-zа-я]/i, "").replace(i, ""), l--), e.indexOf(c) !== -1 && (l <= s || (s = l, a = t));
239
+ let a = RegExp(` \\((${r.Common.Device_1}|${r.Common.Device_2})\\)`), c = o, l = 3;
240
+ e.indexOf(c) === -1 && (c = o.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), e.indexOf(c) === -1 && (c = o.replace(/ \/.*/, ""), l--), e.indexOf(c) === -1 && (c = o.replace(/ \/.*/, ""), c = c.replace(/^[^a-zа-я]/i, "").replace(a, ""), l--), e.indexOf(c) !== -1 && (l <= s || (s = l, i = t));
241
241
  }
242
- i.value = a;
242
+ a.value = i;
243
243
  }), {
244
- regionIndex: i,
245
- optionByRegionIndex: a
244
+ regionIndex: a,
245
+ optionByRegionIndex: o
246
246
  };
247
- }, Fe = (e, t, n) => {
248
- let r = P([]), i = () => {
247
+ }, Ie = (e, t, n) => {
248
+ let r = F([]), i = () => {
249
249
  if (e.onlySearcher && t.value) {
250
250
  r.value = Array.from(t.value.keys());
251
251
  return;
@@ -259,66 +259,66 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
259
259
  }, a = () => {
260
260
  r.value.length ? localStorage.setItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes", JSON.stringify(r.value)) : localStorage.removeItem("ui:project:regionSelector:" + e.projectId + ":regionsIndexes");
261
261
  };
262
- return z(r, () => {
262
+ return B(r, () => {
263
263
  a();
264
264
  }), e.addCompare && i(), { regionsIndexes: r };
265
- }, Ie = (e) => {
266
- let t = C(() => Oe(e.forMode, e.autoRegion, e.searchers)), n = C(() => t.value.get(i.searcherKey.value) || Se), r = C(() => {
265
+ }, Le = (e) => {
266
+ let t = w(() => e.forMode === "volume" || e.forMode === "cost_forecast"), n = w(() => ke(e.forMode, e.autoRegion, e.searchers)), r = w(() => n.value.get(a.searcherKey.value) || Ce), i = w(() => {
267
267
  let e = /* @__PURE__ */ new Set();
268
- return t.value.forEach((t) => {
268
+ return n.value.forEach((t) => {
269
269
  t.regionByIndex.forEach((t) => {
270
270
  t.index !== -1 && t.index !== -2 && e.add(t.index);
271
271
  });
272
272
  }), e;
273
- }), i = Ne(e, t), a = Pe(e, n), o = Fe(e, t, r);
274
- z(t, () => {
275
- if (e.onlySearcher ? o.regionsIndexes.value = Array.from(t.value.keys()) : o.regionsIndexes.value = o.regionsIndexes.value.filter((e) => r.value.has(e)), i.searcherKey.value === -1) return;
276
- let s = t.value.keys().next().value;
277
- t.value.forEach((n) => {
278
- if (e.onlySearcher && n.key === i.searcherKey.value) {
279
- s = i.searcherKey.value;
273
+ }), a = Pe(e, n), o = Fe(e, r), s = Ie(e, n, i);
274
+ B(n, () => {
275
+ if (e.onlySearcher ? s.regionsIndexes.value = Array.from(n.value.keys()) : s.regionsIndexes.value = s.regionsIndexes.value.filter((e) => i.value.has(e)), a.searcherKey.value === -1) return;
276
+ let t = n.value.keys().next().value;
277
+ n.value.forEach((r) => {
278
+ if (e.onlySearcher && r.key === a.searcherKey.value) {
279
+ t = a.searcherKey.value;
280
280
  return;
281
281
  }
282
- if (a.regionIndex.value && n.regionByIndex?.has(a.regionIndex.value) && (s = n.key), !e.onlySearcher) {
282
+ if (o.regionIndex.value && r.regionByIndex?.has(o.regionIndex.value) && (t = r.key), !e.onlySearcher) {
283
283
  let e;
284
- s !== void 0 && (e = t.value.get(s)?.regionByIndex);
285
- let r = t.value.get(n.key)?.regionByIndex;
286
- e?.has(-2) && !r?.has(-2) && (s = n.key);
284
+ t !== void 0 && (e = n.value.get(t)?.regionByIndex);
285
+ let i = n.value.get(r.key)?.regionByIndex;
286
+ e?.has(-2) && !i?.has(-2) && (t = r.key);
287
287
  }
288
- }), s !== void 0 && (i.searcherKey.value = s), a.regionIndex.value !== void 0 && !(n.value?.regionByIndex)?.has(a.regionIndex.value) && (a.regionIndex.value = n.value?.regions?.keys().next().value);
288
+ }), t !== void 0 && (a.searcherKey.value = t), o.regionIndex.value !== void 0 && !(r.value?.regionByIndex)?.has(o.regionIndex.value) && (o.regionIndex.value = r.value?.regions?.keys().next().value);
289
289
  }, { immediate: !0 });
290
- let s = () => {
291
- if (!(i.searcherKey.value === -1 || i.searcherKey.value === -2)) return i.searcherKey.value;
292
- }, c = () => {
293
- if (e.onlySearcher || a.regionIndex.value === -2) return;
294
- let t = a.regionIndex.value;
295
- if (e.forMode) {
296
- let n = a.regionIndex.value;
297
- t = je(e.forMode, {
298
- searcher_key: s(),
299
- key: n
290
+ let c = () => {
291
+ if (!(a.searcherKey.value === -1 || a.searcherKey.value === -2)) return a.searcherKey.value;
292
+ }, l = () => {
293
+ if (e.onlySearcher || o.regionIndex.value === -2) return;
294
+ let n = o.regionIndex.value;
295
+ if (t.value && e.forMode) {
296
+ let t = o.regionIndex.value;
297
+ n = Me(e.forMode, {
298
+ searcher_key: c(),
299
+ key: t
300
300
  }, e.searchers)?.index;
301
301
  }
302
- return t;
303
- }, l = () => {
304
- let e = s();
305
- if (e !== void 0) return t.value.get(e);
302
+ return n;
303
+ }, u = () => {
304
+ let e = c();
305
+ if (e !== void 0) return n.value.get(e);
306
306
  };
307
307
  return {
308
- selectSearcher: i,
309
- selectRegion: a,
310
- compare: o,
311
- searcherByKey: t,
312
- allRegionsIndexes: r,
313
- getSearcher: l,
308
+ selectSearcher: a,
309
+ selectRegion: o,
310
+ compare: s,
311
+ searcherByKey: n,
312
+ allRegionsIndexes: i,
313
+ getSearcher: u,
314
314
  getRegion: () => {
315
- let e = c();
316
- if (e !== void 0) return l()?.regionByIndex?.get(e);
315
+ let e = l();
316
+ if (e !== void 0) return u()?.regionByIndex?.get(e);
317
317
  }
318
318
  };
319
- }, Le = /* @__PURE__ */ A({
319
+ }, Re = /* @__PURE__ */ j({
320
320
  __name: "regionSelector",
321
- props: /*@__PURE__*/ j({
321
+ props: /*@__PURE__*/ M({
322
322
  projectId: {},
323
323
  searchers: { default: () => [] },
324
324
  modelValue: {},
@@ -347,90 +347,90 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
347
347
  }),
348
348
  emits: ["update:modelValue", "update:modelValueSingle"],
349
349
  setup(e, { expose: t }) {
350
- let n = e, a = R(e, "modelValue"), o = R(e, "modelValueSingle"), { selectSearcher: s, selectRegion: c, compare: l, searcherByKey: u, allRegionsIndexes: d, getSearcher: f, getRegion: p } = Ie(n), m = () => {
350
+ let n = e, a = w(() => n.forMode === "volume" || n.forMode === "cost_forecast"), o = z(e, "modelValue"), s = z(e, "modelValueSingle"), { selectSearcher: c, selectRegion: l, compare: u, searcherByKey: d, allRegionsIndexes: f, getSearcher: p, getRegion: m } = Le(n), h = () => {
351
351
  let e = [];
352
- u.value.forEach((t) => {
353
- t.enabled && t.regions.forEach((t) => {
354
- t.enabled && e.push(t);
352
+ d.value.forEach((t) => {
353
+ n.forMode !== "project_relevant_url" && !t.enabled || t.regions.forEach((t) => {
354
+ n.forMode !== "project_relevant_url" && !t.enabled || t.index !== -1 && e.push(t);
355
355
  });
356
- }), Me.open("regions", {
356
+ }), Ne.open("regions", {
357
357
  regions: e,
358
- regionsIndexes: l.regionsIndexes.value,
359
- "@update:regionsIndexes": (e) => l.regionsIndexes.value = e
358
+ regionsIndexes: u.regionsIndexes.value,
359
+ "@update:regionsIndexes": (e) => u.regionsIndexes.value = e
360
360
  });
361
361
  };
362
- return z([
363
- c.regionIndex,
364
- s.searcherKey,
365
- l.regionsIndexes
362
+ return B([
363
+ l.regionIndex,
364
+ c.searcherKey,
365
+ u.regionsIndexes
366
366
  ], () => {
367
- if (s.searcherKey.value === -1 && l.regionsIndexes.value.length) {
368
- if (JSON.stringify(a.value) === JSON.stringify(l.regionsIndexes.value)) return;
369
- a.value = [...l.regionsIndexes.value];
370
- } else n.onlySearcher ? (a.value = [s.searcherKey.value], s.searcherKey.value === -2 && !n.autoRegion && (a.value.length = 0)) : (a.value = [c.regionIndex.value], c.regionIndex.value === -2 && !n.autoRegion && (a.value.length = 0));
371
- !n.onlySearcher && !d.value.size && (s.searcherKey.value = -2);
372
- }), o.value && z(o, () => {
373
- o.value && (a.value = [o.value]);
374
- }, { immediate: !0 }), z(a, () => {
375
- if (a.value[0] && (o.value = a.value[0]), n.onlySearcher) {
376
- if (!a.value.length || a.value.length === 1 && !u.value.has(a.value[0]) || a.value.length === 1 && a.value[0] === -2 && !n.autoRegion) {
377
- let e = u.value.keys().next().value;
378
- e === -2 && !n.autoRegion && (e = void 0, o.value = -2), e === void 0 ? a.value.length = 0 : a.value = [e];
367
+ if (c.searcherKey.value === -1 && u.regionsIndexes.value.length) {
368
+ if (JSON.stringify(o.value) === JSON.stringify(u.regionsIndexes.value)) return;
369
+ o.value = [...u.regionsIndexes.value];
370
+ } else n.onlySearcher ? (o.value = [c.searcherKey.value], c.searcherKey.value === -2 && !n.autoRegion && (o.value.length = 0)) : (o.value = [l.regionIndex.value], l.regionIndex.value === -2 && !n.autoRegion && (o.value.length = 0));
371
+ !n.onlySearcher && !f.value.size && (c.searcherKey.value = -2);
372
+ }), s.value && B(s, () => {
373
+ s.value && (o.value = [s.value]);
374
+ }, { immediate: !0 }), B(o, () => {
375
+ if (o.value[0] && (s.value = o.value[0]), n.onlySearcher) {
376
+ if (!o.value.length || o.value.length === 1 && !d.value.has(o.value[0]) || o.value.length === 1 && o.value[0] === -2 && !n.autoRegion) {
377
+ let e = d.value.keys().next().value;
378
+ e === -2 && !n.autoRegion && (e = void 0, s.value = -2), e === void 0 ? o.value.length = 0 : o.value = [e];
379
379
  return;
380
380
  }
381
- if (a.value.length > 1 && JSON.stringify(a.value) !== JSON.stringify(l.regionsIndexes.value)) {
382
- a.value = [...l.regionsIndexes.value];
381
+ if (o.value.length > 1 && JSON.stringify(o.value) !== JSON.stringify(u.regionsIndexes.value)) {
382
+ o.value = [...u.regionsIndexes.value];
383
383
  return;
384
384
  }
385
385
  } else {
386
- let e = [...new Set(a.value)], t = u.value.values().next().value?.regionByIndex?.keys().next().value;
387
- if (n.forMode && (t = u.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, o.value = -2), !e.length) t !== void 0 && e.push(t);
386
+ let e = [...new Set(o.value)], t = d.value.values().next().value?.regionByIndex?.keys().next().value;
387
+ if (a.value && (t = d.value.values().next().value?.regionByIndex?.values().next().value?.key), t === -2 && !n.autoRegion && (t = void 0, s.value = -2), !e.length) t !== void 0 && e.push(t);
388
388
  else if (e.length === 1) {
389
- let r = d.value;
390
- n.forMode && (r = /* @__PURE__ */ new Set(), u.value.forEach((e) => {
389
+ let n = f.value;
390
+ a.value && (n = /* @__PURE__ */ new Set(), d.value.forEach((e) => {
391
391
  e.regionByIndex.forEach((e) => {
392
- e.index !== -1 && e.index !== -2 && r.add(e.key);
392
+ e.index !== -1 && e.index !== -2 && n.add(e.key);
393
393
  });
394
- })), r.has(e[0]) || (e = [], t !== void 0 && e.push(t));
395
- } else e = e.filter((e) => d.value.has(e)), !e.length && t !== void 0 && e.push(t);
396
- if (JSON.stringify(a.value) !== JSON.stringify(e)) {
397
- a.value = e;
394
+ })), n.has(e[0]) || (e = [], t !== void 0 && e.push(t));
395
+ } else e = e.filter((e) => f.value.has(e)), !e.length && t !== void 0 && e.push(t);
396
+ if (JSON.stringify(o.value) !== JSON.stringify(e)) {
397
+ o.value = e;
398
398
  return;
399
399
  }
400
400
  }
401
- if (!(a.value.length === 1 && a.value[0] === (n.onlySearcher ? s.searcherKey.value : c.regionIndex.value))) if (n.onlySearcher) {
402
- if (a.value.length === 1) {
403
- s.searcherKey.value = a.value[0];
401
+ if (!(o.value.length === 1 && o.value[0] === (n.onlySearcher ? c.searcherKey.value : l.regionIndex.value))) if (n.onlySearcher) {
402
+ if (o.value.length === 1) {
403
+ c.searcherKey.value = o.value[0];
404
404
  return;
405
405
  }
406
- s.searcherKey.value = -1;
406
+ c.searcherKey.value = -1;
407
407
  return;
408
408
  } else {
409
- if (!a.value.length) return;
410
- if (a.value.length === 1 && s.searcherKey.value !== -1) {
411
- c.regionIndex.value = a.value[0];
409
+ if (!o.value.length) return;
410
+ if (o.value.length === 1 && c.searcherKey.value !== -1) {
411
+ l.regionIndex.value = o.value[0];
412
412
  let e;
413
- for (let t of u.value.values()) {
414
- for (let r of t.regionByIndex.values()) if ((n.forMode ? r.key : r.index) === c.regionIndex.value) {
413
+ for (let t of d.value.values()) {
414
+ for (let n of t.regionByIndex.values()) if ((a.value ? n.key : n.index) === l.regionIndex.value) {
415
415
  e = t.key;
416
416
  break;
417
417
  }
418
418
  if (e !== void 0) break;
419
419
  }
420
- e !== void 0 && (s.searcherKey.value = e);
421
- } else s.searcherKey.value = -1, l.regionsIndexes.value = [...a.value];
420
+ e !== void 0 && (c.searcherKey.value = e);
421
+ } else c.searcherKey.value = -1, u.regionsIndexes.value = [...o.value];
422
422
  }
423
423
  }, { immediate: !0 }), t({
424
- getSearcher: f,
425
- getRegion: p
426
- }), (t, n) => (N(), E("div", { class: M({
424
+ getSearcher: p,
425
+ getRegion: m
426
+ }), (t, n) => (P(), D("div", { class: N({
427
427
  "top-regionSelector": !0,
428
428
  "top-regionSelector-onlySearcher": e.onlySearcher
429
429
  }) }, [
430
- k(i, {
431
- options: L(s).optionBySearcherKey.value,
432
- modelValue: L(s).searcherKey.value,
433
- "onUpdate:modelValue": n[0] ||= (e) => L(s).searcherKey.value = e,
430
+ A(i, {
431
+ options: R(c).optionBySearcherKey.value,
432
+ modelValue: R(c).searcherKey.value,
433
+ "onUpdate:modelValue": n[0] ||= (e) => R(c).searcherKey.value = e,
434
434
  name: "searcher_key",
435
435
  addChanger: e.addChanger
436
436
  }, null, 8, [
@@ -438,13 +438,13 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
438
438
  "modelValue",
439
439
  "addChanger"
440
440
  ]),
441
- !e.onlySearcher && L(s).searcherKey.value !== L(-1) ? (N(), w(i, {
441
+ !e.onlySearcher && R(c).searcherKey.value !== R(-1) ? (P(), T(i, {
442
442
  key: 0,
443
443
  class: "top-select-region",
444
- options: L(c).optionByRegionIndex.value,
445
- modelValue: L(c).regionIndex.value,
446
- "onUpdate:modelValue": n[1] ||= (e) => L(c).regionIndex.value = e,
447
- name: e.forMode ? "region_key" : "region_index",
444
+ options: R(l).optionByRegionIndex.value,
445
+ modelValue: R(l).regionIndex.value,
446
+ "onUpdate:modelValue": n[1] ||= (e) => R(l).regionIndex.value = e,
447
+ name: a.value ? "region_key" : "region_index",
448
448
  addChanger: e.addChanger,
449
449
  "data-top-icon": e.addRegionIcon ? "" : void 0
450
450
  }, null, 8, [
@@ -453,31 +453,31 @@ var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, v
453
453
  "name",
454
454
  "addChanger",
455
455
  "data-top-icon"
456
- ])) : T("", !0),
457
- e.addCompare && !e.onlySearcher && L(s).searcherKey.value === L(-1) ? (N(), w(r, {
456
+ ])) : E("", !0),
457
+ e.addCompare && !e.onlySearcher && R(c).searcherKey.value === R(-1) ? (P(), T(r, {
458
458
  key: 1,
459
459
  name: "compare",
460
- onClick: m,
461
- "data-count-compare-regions-indexes": L(l).regionsIndexes.value.length
460
+ onClick: h,
461
+ "data-count-compare-regions-indexes": R(u).regionsIndexes.value.length
462
462
  }, {
463
- default: B(() => [O(I(t.$i18n.Common.Selected_regions), 1)]),
463
+ default: V(() => [k(L(t.$i18n.Common.Selected_regions), 1)]),
464
464
  _: 1
465
- }, 8, ["data-count-compare-regions-indexes"])) : T("", !0)
465
+ }, 8, ["data-count-compare-regions-indexes"])) : E("", !0)
466
466
  ], 2));
467
467
  }
468
- }), U = {
468
+ }), W = {
469
469
  id: 0,
470
470
  name: "/",
471
471
  path: "/"
472
472
  };
473
- function Re(t) {
473
+ function ze(t) {
474
474
  return t ? e()?.Common.All_folders : "/ (" + e()?.Keywords.Root_folder + ")";
475
475
  }
476
- var ze = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
477
- a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = Re(t));
476
+ var Be = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.childsIds = [], r.id && (r.countAllGroupsActive = r.count_groups_active), e[r.id] && e[r.id].forEach((a) => {
477
+ a = { ...a }, r.childsIds.push(a.id), a.id === 0 && (a.name = ze(t));
478
478
  let o = i > 1 ? "-".repeat(i - 1) + " " : "";
479
- o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), ze(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
480
- }), n), Be = (e, t) => e.gen(`/get/${t}/folders/`, [
479
+ o && !a.name.startsWith(o) && (a.name = o + a.name), n.set(a.id, a), Be(e, t, n, a, i + 1), r.childsIds = r.childsIds.concat(a.childsIds), r.id && a.count_groups_active && (r.countAllGroupsActive += a.count_groups_active);
480
+ }), n), Ve = (e, t) => e.gen(`/get/${t}/folders/`, [
481
481
  "id",
482
482
  "parent_id",
483
483
  "name",
@@ -488,9 +488,9 @@ var ze = (e, t, n = /* @__PURE__ */ new Map(), r = { id: "root" }, i = 0) => (r.
488
488
  });
489
489
  //#endregion
490
490
  //#region src/core/utils/composables/useWatch.ts
491
- function Ve(e, t, n) {
491
+ function He(e, t, n) {
492
492
  let r = Object.keys(e);
493
- return z(r.map((t) => e[t]), (e, n, i) => {
493
+ return B(r.map((t) => e[t]), (e, n, i) => {
494
494
  let a = {};
495
495
  e.forEach((e, t) => {
496
496
  if (!Object.is(e, n[t])) {
@@ -505,9 +505,9 @@ function Ve(e, t, n) {
505
505
  }
506
506
  //#endregion
507
507
  //#region src/components/project/groupSelector/folders/folders.vue?vue&type=script&setup=true&lang.ts
508
- var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
508
+ var Ue = ["innerHTML"], We = /* @__PURE__ */ j({
509
509
  __name: "folders",
510
- props: /*@__PURE__*/ j({
510
+ props: /*@__PURE__*/ M({
511
511
  folderId: {},
512
512
  folder: {},
513
513
  folders: {},
@@ -523,20 +523,20 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
523
523
  }, {
524
524
  folderId: { required: !0 },
525
525
  folderIdModifiers: {},
526
- folder: { default: U },
526
+ folder: { default: W },
527
527
  folderModifiers: {}
528
528
  }),
529
529
  emits: ["update:folderId", "update:folder"],
530
530
  setup(e) {
531
- let t = e, n = R(e, "folderId"), r = R(e, "folder"), i = t.client && !t.folders ? Be(t.client, t.service) : void 0, a = P(null);
532
- z(() => t.projectId, () => {
531
+ let t = e, n = z(e, "folderId"), r = z(e, "folder"), i = t.client && !t.folders ? Ve(t.client, t.service) : void 0, a = F(null);
532
+ B(() => t.projectId, () => {
533
533
  i?.changeParams({ project_id: t.projectId }), i?.setOptions({ checkFingerprint: "TopGroupSelectorFolders:" + t.projectId }), a.value?.resetCache();
534
534
  }, { immediate: !0 });
535
- let o = C(() => ze(t.folders ?? { root: [U] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
535
+ let o = w(() => Be(t.folders ?? { root: [W] }, t.canSelectAll)), s = (e) => (t.canSelectAll && e[0]?.id === 0 && (e[0] = {
536
536
  ...e[0],
537
- name: Re(!0)
537
+ name: ze(!0)
538
538
  }), e);
539
- return Ve({
539
+ return He({
540
540
  modelFolder: r,
541
541
  modelFolderId: n
542
542
  }, async (e) => {
@@ -546,21 +546,21 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
546
546
  return;
547
547
  }
548
548
  let i = o.value.get(t.folderId);
549
- i ||= U, r.value = i, n.value = i.id;
550
- }, { immediate: !0 }), (t, n) => (N(), w(x, {
549
+ i ||= W, r.value = i, n.value = i.id;
550
+ }, { immediate: !0 }), (t, n) => (P(), T(S, {
551
551
  class: "top-groupSelector_folder",
552
552
  modelValue: r.value,
553
553
  "onUpdate:modelValue": n[0] ||= (e) => r.value = e,
554
554
  items: e.folders ? [...o.value.values()] : void 0,
555
555
  "search-type": "inline",
556
556
  icon: e.addIcon ? "" : void 0,
557
- api: e.folders ? void 0 : L(i),
558
- apiSetSearchParams: (...e) => L(te)(...e, "name"),
557
+ api: e.folders ? void 0 : R(i),
558
+ apiSetSearchParams: (...e) => R(te)(...e, "name"),
559
559
  prepareItemsBeforeRender: s,
560
560
  addChanger: e.addChanger,
561
561
  useCache: ""
562
562
  }, {
563
- item: B(({ item: e }) => [D("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, He)]),
563
+ item: V(({ item: e }) => [O("div", { innerHTML: e.name.replaceAll(/</g, "< ") }, null, 8, Ue)]),
564
564
  _: 1
565
565
  }, 8, [
566
566
  "modelValue",
@@ -571,17 +571,17 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
571
571
  "addChanger"
572
572
  ]));
573
573
  }
574
- }), W = {
574
+ }), G = {
575
575
  id: -1,
576
576
  name: "--",
577
- folder_id: U.id,
578
- folder_path: U.path
579
- }, G = {
577
+ folder_id: W.id,
578
+ folder_path: W.path
579
+ }, K = {
580
580
  id: 0,
581
581
  name: "All groups",
582
- folder_id: U.id,
583
- folder_path: U.path
584
- }, K = () => (G.name = e()?.Common.All_groups, G), We = () => (G.name = e()?.Keywords.Choose_group, G), Ge = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), Ke = (e, t) => e.gen(`/get/${t}/groups/`, [
582
+ folder_id: W.id,
583
+ folder_path: W.path
584
+ }, q = () => (K.name = e()?.Common.All_groups, K), Ge = () => (K.name = e()?.Keywords.Choose_group, K), Ke = (e, t, n) => (e = [...e], t !== void 0 && (e = e.filter((e) => e.on == Number(t))), n && n.id && n.childsIds && (e = e.filter((e) => e.folder_id === n.id || n.childsIds.includes(e.folder_id))), e), qe = (e, t) => e.gen(`/get/${t}/groups/`, [
585
585
  "id",
586
586
  "name",
587
587
  "folder_id",
@@ -589,12 +589,12 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
589
589
  ]).changeParams({
590
590
  folder_id_depth: !0,
591
591
  limit: 100
592
- }), qe = (e, t) => e.gen(`/add/${t}/groups/`), Je = (e, t) => e.gen(`/del/${t}/groups/`), Ye = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Xe = { class: "top-groupSelector_groupItem top-ellipsis1" }, Ze = {
592
+ }), Je = (e, t) => e.gen(`/add/${t}/groups/`), Ye = (e, t) => e.gen(`/del/${t}/groups/`), Xe = (e, t) => e.gen(`/edit/${t}/groups/rename/`), Ze = { class: "top-groupSelector_groupItem top-ellipsis1" }, Qe = {
593
593
  key: 0,
594
594
  class: "top-comment"
595
- }, Qe = ["innerHTML"], $e = ["innerHTML"], et = ["innerHTML"], tt = /* @__PURE__ */ A({
595
+ }, $e = ["innerHTML"], et = ["innerHTML"], tt = ["innerHTML"], nt = /* @__PURE__ */ j({
596
596
  __name: "groups",
597
- props: /*@__PURE__*/ j({
597
+ props: /*@__PURE__*/ M({
598
598
  groupId: {},
599
599
  group: {},
600
600
  projectId: {},
@@ -625,14 +625,14 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
625
625
  group: { required: !0 },
626
626
  groupModifiers: {}
627
627
  }),
628
- emits: /*@__PURE__*/ j([
628
+ emits: /*@__PURE__*/ M([
629
629
  "addGroup",
630
630
  "editGroup",
631
631
  "delGroup"
632
632
  ], ["update:groupId", "update:group"]),
633
633
  setup(e, { expose: t, emit: n }) {
634
- let r = e, i = n, a = R(e, "groupId"), s = R(e, "group"), c = r.client && !r.groups ? Ke(r.client, r.service) : void 0, l = r.client ? qe(r.client, r.service) : void 0, u = r.client ? Je(r.client, r.service) : void 0, d = r.client ? Ye(r.client, r.service) : void 0, f = P(null), p = C(() => {
635
- if (r.groups !== void 0) return Ge(r.groups, r.on, r.folder);
634
+ let r = e, i = n, a = z(e, "groupId"), s = z(e, "group"), c = r.client && !r.groups ? qe(r.client, r.service) : void 0, l = r.client ? Je(r.client, r.service) : void 0, u = r.client ? Ye(r.client, r.service) : void 0, d = r.client ? Xe(r.client, r.service) : void 0, f = F(null), p = w(() => {
635
+ if (r.groups !== void 0) return Ke(r.groups, r.on, r.folder);
636
636
  }), m = o("folder_id", "EQUALS", [r.folder?.id ?? 0]);
637
637
  c?.changeParams({
638
638
  project_id: r.projectId,
@@ -644,16 +644,16 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
644
644
  }, g = (e = !1) => {
645
645
  f.value?.resetCache(e);
646
646
  };
647
- Ve({
647
+ He({
648
648
  projectId: () => r.projectId,
649
649
  folderId: () => r.folder?.id,
650
650
  canSelectAll: () => r.canSelectAll
651
651
  }, (e) => {
652
652
  if (e.projectId && (c?.changeParams({ project_id: r.projectId }), c?.setOptions({ checkFingerprint: "TopGroupSelectorGroups:" + r.projectId })), e.folderId && (m.values = [r.folder?.id ?? 0]), g(), (e.folderId?.old !== void 0 || e.canSelectAll?.old !== void 0) && a.value !== null) {
653
653
  let e;
654
- r.autoselect === "first" && (e = p.value?.[0], r.canSelectAll && (e = se(K()))), (r.autoselect === "placeholder" || !e) && (e = We()), h(e);
654
+ r.autoselect === "first" && (e = p.value?.[0], r.canSelectAll && (e = se(q()))), (r.autoselect === "placeholder" || !e) && (e = Ge()), h(e);
655
655
  }
656
- }, { immediate: !0 }), Ve({
656
+ }, { immediate: !0 }), He({
657
657
  modelGroup: s,
658
658
  modelGroupId: a
659
659
  }, async (e) => {
@@ -665,14 +665,14 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
665
665
  if (!(r.canAdd && a.value === null)) {
666
666
  if (r.groups) {
667
667
  let e = p.value?.find((e) => e.id === a.value);
668
- if (!e && r.canSelectAll && (e = K()), e) h(e);
668
+ if (!e && r.canSelectAll && (e = q()), e) h(e);
669
669
  else {
670
670
  let e = p.value?.[0];
671
- e && !a.value ? h(e) : h(W);
671
+ e && !a.value ? h(e) : h(G);
672
672
  }
673
673
  }
674
674
  if (r.client && !r.groups && (a.value || a.value === 0 && !r.canSelectAll)) {
675
- let e = Ke(r.client, r.service).changeParams({
675
+ let e = qe(r.client, r.service).changeParams({
676
676
  project_id: r.projectId,
677
677
  id: a.value,
678
678
  filters: [m]
@@ -680,7 +680,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
680
680
  e?.setOptions({ checkFingerprint: "TopGroupSelectorFindGroup:" + r.projectId });
681
681
  let t = await e.call();
682
682
  if (!t.errors?.length && !t.result) return;
683
- !t.errors && t.result[0] ? h(t.result[0]) : h(W);
683
+ !t.errors && t.result[0] ? h(t.result[0]) : h(G);
684
684
  }
685
685
  }
686
686
  }
@@ -690,7 +690,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
690
690
  let t = s.value, n = await l.changeParams({
691
691
  project_id: r.projectId,
692
692
  names: [e.name],
693
- to_id: r.folder?.id ?? U.id,
693
+ to_id: r.folder?.id ?? W.id,
694
694
  to_type: "in_folder_last"
695
695
  }).call();
696
696
  if (n.result) {
@@ -703,7 +703,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
703
703
  project_id: r.projectId,
704
704
  id: e.id,
705
705
  name: t
706
- }).call()).errors || (i("editGroup", {
706
+ }).call()).errors || (s.value.id === e.id && (s.value.name = t), i("editGroup", {
707
707
  id: e.id,
708
708
  name: t
709
709
  }), f.value?.updateCacheItemById(e.id, { name: t })));
@@ -711,9 +711,9 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
711
711
  u && ((await u.changeParams({
712
712
  project_id: r.projectId,
713
713
  id: e.id
714
- }).call()).errors || (s.value.id === e.id && h(r.canSelectAll ? K() : W), i("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
714
+ }).call()).errors || (s.value.id === e.id && h(r.canSelectAll ? q() : G), i("delGroup", e.id), f.value?.deleteCacheItemById(e.id)));
715
715
  };
716
- return t({ resetCacheGroups: g }), (t, n) => (N(), w(x, {
716
+ return t({ resetCacheGroups: g }), (t, n) => (P(), T(S, {
717
717
  ref_key: "refSelector",
718
718
  ref: f,
719
719
  class: "top-groupSelector_group",
@@ -722,51 +722,51 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
722
722
  items: p.value ?? e.groups,
723
723
  searchType: "inline",
724
724
  icon: e.addIcon ? "" : void 0,
725
- api: e.groups ? void 0 : L(c),
726
- apiSetSearchParams: (...e) => L(te)(...e, "name"),
725
+ api: e.groups ? void 0 : R(c),
726
+ apiSetSearchParams: (...e) => R(te)(...e, "name"),
727
727
  appendSearchToResult: !!e.canAdd,
728
- useAllItem: e.canSelectAll ? L(K)().name : !1,
728
+ useAllItem: e.canSelectAll ? R(q)().name : !1,
729
729
  addChanger: e.addChanger,
730
730
  useCache: "",
731
731
  onAppendItem: v
732
732
  }, ne({
733
- item: B(({ item: n }) => [D("div", Xe, [
734
- n.id === L(null) ? (N(), E("div", Ze, I(t.$i18n.Common.Add) + ": ", 1)) : T("", !0),
735
- D("span", {
733
+ item: V(({ item: n }) => [O("div", Ze, [
734
+ n.id === R(null) ? (P(), D("div", Qe, L(t.$i18n.Common.Add) + ": ", 1)) : E("", !0),
735
+ O("span", {
736
736
  class: "top-groupSelector_groupItemName top-ellipsis1",
737
737
  innerHTML: n.name
738
- }, null, 8, Qe),
739
- n.folder_path && e.showPath ? (N(), E("span", {
738
+ }, null, 8, $e),
739
+ n.folder_path && e.showPath ? (P(), D("span", {
740
740
  key: 1,
741
741
  class: "top-groupSelector_groupItemFolderPath top-ellipsis1",
742
742
  innerHTML: n.folder_path
743
- }, null, 8, $e)) : T("", !0)
743
+ }, null, 8, et)) : E("", !0)
744
744
  ])]),
745
745
  _: 2
746
746
  }, [e.canEditAndDel && e.client ? {
747
747
  name: "actions",
748
- fn: B(({ item: r }) => [r.id ? (N(), E(S, { key: 0 }, [k(_, {
748
+ fn: V(({ item: r }) => [r.id ? (P(), D(C, { key: 0 }, [A(_, {
749
749
  submitText: t.$i18n.Common.Save,
750
750
  defaultValue: r.name,
751
751
  inputProps: { addCleaner: !1 },
752
752
  onSubmit: (e) => y(r, e)
753
753
  }, {
754
- opener: B(() => [...n[1] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
755
- default: B(() => [...n[2] ||= []]),
754
+ opener: V(() => [...n[1] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
755
+ default: V(() => [...n[2] ||= []]),
756
756
  _: 1
757
757
  }, 8, [
758
758
  "submitText",
759
759
  "defaultValue",
760
760
  "onSubmit"
761
- ]), k(ee, {
761
+ ]), A(ee, {
762
762
  isWarning: "",
763
763
  submitText: t.$i18n.Common.Delete,
764
764
  onSubmit: (e) => b(r)
765
765
  }, {
766
- opener: B(() => [...n[3] ||= [D("div", { "data-top-icon": "" }, null, -1)]]),
767
- default: B(() => [D("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n["Ai.Tracker"].Delete_group_warning }, null, 8, et)]),
766
+ opener: V(() => [...n[3] ||= [O("div", { "data-top-icon": "" }, null, -1)]]),
767
+ default: V(() => [O("span", { innerHTML: e.service === "keywords_2" ? t.$i18n.Keywords.Delete_group_warning : t.$i18n["Ai.Tracker"].Delete_group_warning }, null, 8, tt)]),
768
768
  _: 1
769
- }, 8, ["submitText", "onSubmit"])], 64)) : T("", !0)]),
769
+ }, 8, ["submitText", "onSubmit"])], 64)) : E("", !0)]),
770
770
  key: "0"
771
771
  } : void 0]), 1032, [
772
772
  "modelValue",
@@ -779,9 +779,9 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
779
779
  "addChanger"
780
780
  ]));
781
781
  }
782
- }), nt = { class: "top-groupSelector" }, rt = /* @__PURE__ */ A({
782
+ }), rt = { class: "top-groupSelector" }, it = /* @__PURE__ */ j({
783
783
  __name: "groupSelector",
784
- props: /*@__PURE__*/ j({
784
+ props: /*@__PURE__*/ M({
785
785
  folderId: {},
786
786
  folder: {},
787
787
  groupId: {},
@@ -826,20 +826,20 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
826
826
  folderModifiers: {},
827
827
  groupId: { required: !0 },
828
828
  groupIdModifiers: {},
829
- group: { default: W },
829
+ group: { default: G },
830
830
  groupModifiers: {}
831
831
  }),
832
- emits: /*@__PURE__*/ j(["update:groups"], [
832
+ emits: /*@__PURE__*/ M(["update:groups"], [
833
833
  "update:folderId",
834
834
  "update:folder",
835
835
  "update:groupId",
836
836
  "update:group"
837
837
  ]),
838
838
  setup(e, { expose: t, emit: n }) {
839
- let r = e, i = P(null), a = R(e, "folderId"), o = R(e, "folder"), s = R(e, "groupId"), c = R(e, "group"), l = n;
840
- o.value = ze(r.folders ?? { root: [U] }, r.canSelectAllGroups).get(a.value);
839
+ let r = e, i = F(null), a = z(e, "folderId"), o = z(e, "folder"), s = z(e, "groupId"), c = z(e, "group"), l = n;
840
+ o.value = Be(r.folders ?? { root: [W] }, r.canSelectAllGroups).get(a.value);
841
841
  let u = r.groups?.find((e) => e.id === s.value);
842
- s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = K()), (r.autoselect === "placeholder" || !u) && (u = We()), u ??= W, c.value = u;
842
+ s.value || (u = r.groups?.[0]), r.canSelectAllGroups && !u && (u = q()), (r.autoselect === "placeholder" || !u) && (u = Ge()), u ??= G, c.value = u;
843
843
  let d = (e) => {
844
844
  let t;
845
845
  r.groups && e && (t = [...r.groups, e]), l("update:groups", t);
@@ -848,17 +848,24 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
848
848
  l("update:groups");
849
849
  return;
850
850
  }
851
- l("update:groups", r.groups.map((t) => t.id === e.id ? e : t));
851
+ let t = r.groups.find((t) => t.id === e.id);
852
+ if (!t) return;
853
+ let n = {
854
+ ...t,
855
+ ...e
856
+ }, i = r.groups.map((e) => e.id === n.id ? n : e);
857
+ l("update:groups", i);
852
858
  }, p = (e) => {
853
859
  if (!r.groups) {
854
860
  l("update:groups");
855
861
  return;
856
862
  }
857
- l("update:groups", r.groups.filter((t) => t.id !== e.id));
863
+ let t = r.groups.filter((t) => t.id !== e);
864
+ l("update:groups", t);
858
865
  };
859
866
  return t({ resetCacheGroups: (e = !1) => {
860
867
  i.value?.resetCacheGroups(e);
861
- } }), (t, n) => (N(), E("div", nt, [e.showFolders ? (N(), w(Ue, {
868
+ } }), (t, n) => (P(), D("div", rt, [e.showFolders ? (P(), T(We, {
862
869
  key: 0,
863
870
  folderId: a.value,
864
871
  "onUpdate:folderId": n[0] ||= (e) => a.value = e,
@@ -881,7 +888,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
881
888
  "addIcon",
882
889
  "client",
883
890
  "service"
884
- ])) : T("", !0), e.showGroups ? (N(), w(tt, {
891
+ ])) : E("", !0), e.showGroups ? (P(), T(nt, {
885
892
  key: 1,
886
893
  ref_key: "componentGroupsRef",
887
894
  ref: i,
@@ -921,58 +928,65 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
921
928
  "addIcon",
922
929
  "client",
923
930
  "service"
924
- ])) : T("", !0)]));
931
+ ])) : E("", !0)]));
925
932
  }
926
- }), it = (e) => ({
933
+ }), at = (e) => ({
927
934
  id: null,
928
935
  name: e,
929
- listItemProps: { type: "title" }
930
- }), at = {
936
+ listItemProps: {
937
+ type: "title",
938
+ class: "top-projectSelector_item"
939
+ }
940
+ }), ot = {
931
941
  scheduledUpdate: !1,
932
942
  manualUpdate: !1,
933
943
  guestProjects: !1
934
- }, ot = (t, n) => {
944
+ }, st = (t, n) => {
935
945
  let r = [], i = {
936
- scheduledUpdate: it(e().Projects.Scheduled_update),
937
- manualUpdate: it(e().Projects.Manual_update),
938
- guestProjects: it(e().Projects.Guest_projects)
946
+ scheduledUpdate: at(e().Projects.Scheduled_update),
947
+ manualUpdate: at(e().Projects.Manual_update),
948
+ guestProjects: at(e().Projects.Guest_projects)
939
949
  }, a = n ? {
940
950
  scheduledUpdate: !1,
941
951
  manualUpdate: !1,
942
952
  guestProjects: !1
943
- } : at;
953
+ } : ot;
944
954
  for (let e of t) !a.scheduledUpdate && e.right?.startsWith("1") && e.on > 0 && (r.push(i.scheduledUpdate), a.scheduledUpdate = !0), !a.manualUpdate && e.right?.startsWith("1") && e.on === 0 && (r.push(i.manualUpdate), a.manualUpdate = !0), !a.guestProjects && e.right?.startsWith("0") && e.on >= 0 && (r.push(i.guestProjects), a.guestProjects = !0), r.push(e);
945
955
  return r;
946
- }, st = (e) => e.map((e) => ({
956
+ }, ct = (e) => ({
947
957
  ...e,
948
- listItemProps: { attrs: { title: e.name } }
949
- })), ct = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(at).forEach((e) => at[e] = !1), ot(st(e), n)), lt = (e) => {
958
+ externalLink: mt(e.url ?? ""),
959
+ listItemProps: {
960
+ class: "top-projectSelector_item",
961
+ attrs: { title: e.name }
962
+ }
963
+ }), lt = (e, t, n) => !e || e.length === 0 ? [] : (t && Object.keys(ot).forEach((e) => ot[e] = !1), st(e.map(ct), n)), ut = (e) => {
950
964
  e = e.replace(/#.*/, "");
951
965
  let t = location.hash;
952
- return t = t.replace(/historyView=[^&]*/, ""), t = t.replace(/modelsKeys=[^&]*/, ""), 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(/%22modelsKeys%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:\{[^}]*}(,?)/, "$1")), e + t;
953
- }, ut = (e, t) => {
954
- t && t.target instanceof HTMLElement && c.close(t.target.closest(".top-popup-wrapper"));
955
- let n = lt(e);
956
- location.href = n;
966
+ return t = t.replace(/%22historyView%22:[^,]*,/, ""), t = t.replace(/%22modelsKeys%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:\{[^}]*}(,?)/, "$1")), e + t;
957
967
  }, dt = (e) => {
958
- let t = ft(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
959
- return n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
968
+ location.href = ft(e);
969
+ }, ft = (e) => {
970
+ let t = pt(), n = location.pathname.split("/"), r = "project/dynamics/", i = "";
971
+ n[1] == "project" && (r = n[1] + "/" + n[2] + "/"), n[2] == "settings" && (i = location.hash), [
960
972
  "watcher",
961
973
  "indexing",
962
974
  "sitemap",
963
975
  "audit",
964
976
  "direct",
965
977
  "adwords"
966
- ].includes(n[4]) && (i = n[4] + "/"), "https://" + t + "/" + r + e + "/" + i;
967
- }, ft = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, pt = (e) => {
968
- let t = e.startsWith("http") ? e : "http://" + e;
978
+ ].includes(n[4]) && (i = n[4] + "/");
979
+ let a = "https://" + t + "/" + r + e + "/" + i;
980
+ return a = ut(a), a;
981
+ }, pt = () => window.page?.subdomain ? window.location.host.replace(window.page?.subdomain + ".", "") : window.location.host, mt = (e) => {
982
+ let t = e.startsWith("http") ? e : "https://" + e;
969
983
  return t = t.replace(/"/g, "%22"), t;
970
- }, mt = (e, t) => {
984
+ }, ht = (e, t) => {
971
985
  let n = e.params.filters ?? [];
972
986
  n = n.filter((e) => e.name !== "GEN_SEARCH_STRING()");
973
987
  let r = h(t), i = t.replace(/([[^$.|?*+()])/g, "\\$1"), a = r.replace(/([[^$.|?*+()])/g, "\\$1");
974
988
  t && n.push(o("GEN_SEARCH_STRING()", "REGEXP", [`(${i}|${a})`])), e.changeParams({ filters: n });
975
- }, ht = (e) => {
989
+ }, gt = (e) => {
976
990
  let n = e.gen("/get/projects_2/projects/", [
977
991
  "id",
978
992
  "user_id",
@@ -984,234 +998,218 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
984
998
  return n.changeParams({
985
999
  filters: [o("on", "GREATER_THAN_EQUALS", [0])],
986
1000
  orders: [
987
- a("user_id", "DESC", [t.state.user.id]),
1001
+ a("user_id", "DESC", [t.state.userId]),
988
1002
  a("on", "DESC"),
989
1003
  a("favorite", "DESC"),
990
1004
  a("id", "DESC")
991
1005
  ]
992
- }), n.options.onApiLoaded = (e, t, n) => {
993
- let r = t.data.filters.length === 1 && t.data.offset === 0 || t.data.limit === 1e3, i = t.data.limit === 100 && t.data.filters.length > 1 ? !0 : void 0;
994
- e.result = ct(e.result, r, i), n?.(e, t);
1006
+ }), n.options.loadingShowSpinner = !1, n.options.onApiLoaded = (e, t, n) => {
1007
+ let r = t.data.filters.length > 1, i = t.data.offset === 0, a = t.data.offset === void 0 || i && !r, o = r;
1008
+ e.result = lt(e.result, a, o), n?.(e, t);
995
1009
  }, n;
996
- }, gt = (e) => e.gen("/add/projects_2/projects/"), _t = { class: "top-projectSelectorSubmenu_item" }, vt = [
997
- "href",
998
- "title",
999
- "data-top-icon",
1000
- "data-right"
1001
- ], yt = { class: "top-projectSelectorSubmenu_item" }, bt = ["href"], xt = /* @__PURE__ */ A({
1010
+ }, _t = (e) => e.gen("/add/projects_2/projects/"), vt = { class: "top-ellipsis1" }, yt = /* @__PURE__ */ j({
1002
1011
  __name: "submenu",
1003
- props: {
1004
- id: {},
1005
- right: {},
1006
- url: {}
1007
- },
1008
- setup(t) {
1009
- let n = t, r = e(), i = ft(), a = [
1010
- {
1011
- href: `https://${i}/project/keywords/${n.id}/`,
1012
- title: r.Common.Menu_phrases,
1013
- icon: "",
1014
- right: "2"
1015
- },
1016
- {
1017
- href: `https://${i}/project/dynamics/${n.id}/`,
1018
- title: r.Common.Menu_dynamics,
1019
- icon: "",
1020
- right: "1"
1021
- },
1022
- {
1023
- href: `https://${i}/project/snapshots/${n.id}/`,
1024
- title: r.Common.Menu_snapshots,
1025
- icon: "",
1026
- right: "1"
1027
- },
1028
- {
1029
- href: `https://${i}/project/competitors/${n.id}/`,
1030
- title: r.Common.Menu_competitors,
1031
- icon: "",
1032
- right: "1"
1033
- },
1034
- {
1035
- href: `https://${i}/project/ai-tracker/${n.id}/`,
1036
- title: r.Common.Menu_aiTracker,
1037
- icon: "",
1038
- right: "13"
1039
- },
1040
- {
1041
- href: `https://${i}/project/analytics/${n.id}/`,
1042
- title: r.Common.Menu_analytics,
1043
- icon: "",
1044
- right: "5"
1045
- },
1046
- {
1047
- href: `https://${i}/project/broker/${n.id}/`,
1048
- title: r.Common.Menu_broker,
1049
- icon: "",
1050
- right: "6"
1051
- },
1052
- {
1053
- href: `https://${i}/project/audit/${n.id}/sitemap/`,
1054
- title: r.Audit.Sitemap_gen,
1055
- icon: "",
1056
- right: "8"
1057
- },
1058
- {
1059
- href: `https://${i}/project/audit/${n.id}/audit/`,
1060
- title: r.Common.Menu_audit,
1061
- icon: "",
1062
- right: "8"
1063
- },
1064
- {
1065
- href: `https://${i}/project/audit/${n.id}/indexing/`,
1066
- title: r.Audit.Indexing,
1067
- icon: "",
1068
- right: "8"
1069
- },
1070
- {
1071
- href: `https://${i}/project/audit/${n.id}/watcher/`,
1072
- title: r.Audit.Watcher,
1073
- icon: "",
1074
- right: "9"
1075
- },
1076
- {
1077
- href: `https://${i}/project/settings/${n.id}/`,
1078
- title: r.Common.Menu_settings,
1079
- icon: "",
1080
- right: "2"
1081
- }
1082
- ], o = C(() => n.right.includes("0") ? a.filter((e) => n.right[e.right] === "1") : a);
1083
- return (e, n) => {
1084
- let r = le("TopButton");
1085
- return N(), w(L(y), {
1086
- class: "top-projectSelectorSubmenu",
1087
- notch: !1,
1088
- pos: "2"
1089
- }, {
1090
- opener: B(() => [k(r, {
1091
- class: "top-projectSelectorSubmenu_opener",
1092
- "data-top-icon": "",
1093
- color: "theme"
1094
- })]),
1095
- contentList: B(() => [(N(!0), E(S, null, F(o.value, (e) => (N(), E("li", _t, [D("a", {
1096
- href: e.href,
1097
- title: e.title,
1098
- "data-top-icon": e.icon,
1099
- "data-right": e.right
1100
- }, null, 8, vt)]))), 256)), D("li", yt, [D("a", {
1101
- href: t.url,
1102
- "data-top-icon": "",
1103
- target: "_blank"
1104
- }, null, 8, bt)])]),
1105
- _: 1
1106
- });
1012
+ props: { id: {} },
1013
+ setup(n) {
1014
+ let r = n, i = e(), a = pt(), o = (e) => {
1015
+ let n = [
1016
+ {
1017
+ href: `https://${a}/project/keywords/${e.id}/`,
1018
+ title: i.Common.Menu_phrases,
1019
+ icon: "",
1020
+ right: "2"
1021
+ },
1022
+ {
1023
+ href: `https://${a}/project/dynamics/${e.id}/`,
1024
+ title: i.Common.Menu_dynamics,
1025
+ icon: "",
1026
+ right: "1"
1027
+ },
1028
+ {
1029
+ href: `https://${a}/project/snapshots/${e.id}/`,
1030
+ title: i.Common.Menu_snapshots,
1031
+ icon: "",
1032
+ right: "1"
1033
+ },
1034
+ {
1035
+ href: `https://${a}/project/competitors/${e.id}/`,
1036
+ title: i.Common.Menu_competitors,
1037
+ icon: "",
1038
+ right: "1"
1039
+ },
1040
+ {
1041
+ href: `https://${a}/project/ai-tracker/${e.id}/`,
1042
+ title: i.Common.Menu_aiTracker,
1043
+ icon: "",
1044
+ right: "13"
1045
+ },
1046
+ {
1047
+ href: `https://${a}/project/analytics/${e.id}/`,
1048
+ title: i.Common.Menu_analytics,
1049
+ icon: "",
1050
+ right: "5"
1051
+ },
1052
+ {
1053
+ href: `https://${a}/project/broker/${e.id}/`,
1054
+ title: i.Common.Menu_broker,
1055
+ icon: "",
1056
+ right: "6"
1057
+ },
1058
+ {
1059
+ href: `https://${a}/project/audit/${e.id}/sitemap/`,
1060
+ title: i.Audit.Sitemap_gen,
1061
+ icon: "",
1062
+ right: "8"
1063
+ },
1064
+ {
1065
+ href: `https://${a}/project/audit/${e.id}/audit/`,
1066
+ title: i.Common.Menu_audit,
1067
+ icon: "",
1068
+ right: "8"
1069
+ },
1070
+ {
1071
+ href: `https://${a}/project/audit/${e.id}/indexing/`,
1072
+ title: i.Audit.Indexing,
1073
+ icon: "",
1074
+ right: "8"
1075
+ },
1076
+ {
1077
+ href: `https://${a}/project/audit/${e.id}/watcher/`,
1078
+ title: i.Audit.Watcher,
1079
+ icon: "",
1080
+ right: "9"
1081
+ },
1082
+ {
1083
+ href: `https://${a}/project/settings/${e.id}/`,
1084
+ title: i.Common.Menu_settings,
1085
+ icon: "",
1086
+ right: "2"
1087
+ }
1088
+ ].filter((e) => !Object.entries(t.state.closedByMod).some(([t, n]) => n && e.href.includes(`/${t}/`)));
1089
+ return e.right.includes("0") ? n.filter((t) => e.right[t.right] === "1") : n;
1107
1090
  };
1091
+ return (e, t) => (P(), T(R(y), {
1092
+ id: r.id,
1093
+ class: "top-projectSelectorSubmenu",
1094
+ notch: !1,
1095
+ pos: "2"
1096
+ }, {
1097
+ contentList: V(({ data: t }) => [t ? (P(), D(C, { key: 0 }, [(P(!0), D(C, null, I(o(t.projectItem), (t) => (P(), T(R(v), {
1098
+ href: t.href,
1099
+ title: t.title,
1100
+ "data-top-icon": t.icon,
1101
+ "data-right": t.right
1102
+ }, {
1103
+ default: V(() => [k(L(e.$core.state.isMobile ? t.title : ""), 1)]),
1104
+ _: 2
1105
+ }, 1032, [
1106
+ "href",
1107
+ "title",
1108
+ "data-top-icon",
1109
+ "data-right"
1110
+ ]))), 256)), A(R(v), {
1111
+ href: t.projectItem.externalLink,
1112
+ title: t.projectItem.externalLink,
1113
+ class: "top-ellipsis",
1114
+ "data-top-icon": "",
1115
+ target: "_blank"
1116
+ }, {
1117
+ default: V(() => [O("span", vt, L(e.$core.state.isMobile ? t.projectItem.externalLink : ""), 1)]),
1118
+ _: 2
1119
+ }, 1032, ["href", "title"])], 64)) : E("", !0)]),
1120
+ _: 1
1121
+ }, 8, ["id"]));
1108
1122
  }
1109
- }), St = 1440 * 60 * 1e3, q = fe(), Ct = P(0), J = P(null), wt = (e) => {
1110
- localStorage.setItem("ui_project_selector_total:" + t.state.user.id, JSON.stringify({
1123
+ }), bt = 1440 * 60 * 1e3, J = F(null), Y = fe(), xt = (e) => {
1124
+ localStorage.setItem("ui_project_selector_total:" + t.state.userId, JSON.stringify({
1111
1125
  projectsTotal: e,
1112
- expiresAt: Date.now() + St
1126
+ expiresAt: Date.now() + bt
1113
1127
  }));
1114
- }, Tt = () => {
1115
- let e = localStorage.getItem("ui_project_selector_total:" + t.state.user.id);
1128
+ }, St = () => {
1129
+ let e = localStorage.getItem("ui_project_selector_total:" + t.state.userId);
1116
1130
  if (!e) return;
1117
1131
  let { projectsTotal: n, expiresAt: r } = JSON.parse(e);
1118
1132
  if (Date.now() > r) {
1119
- localStorage.removeItem("ui_project_selector_total:" + t.state.user.id);
1133
+ localStorage.removeItem("ui_project_selector_total:" + t.state.userId);
1120
1134
  return;
1121
1135
  }
1122
1136
  return n;
1123
- }, Et = (e = !0) => {
1124
- q.value = void 0, J.value = null, localStorage.removeItem("ui_project_selector_total:" + t.state.user.id), e && Ct.value++;
1125
- }, Dt = { class: "top-projectSelector_item" }, Ot = { class: "top-projectSelector_itemText" }, kt = { class: "top-comment" }, At = {
1137
+ }, Ct = () => {
1138
+ J.value = null, Y.value = void 0, localStorage.removeItem("ui_project_selector_total:" + t.state.userId), b("/get/projects_2/projects/");
1139
+ }, wt = { class: "top-projectSelector_itemText" }, Tt = { class: "top-comment" }, Et = {
1126
1140
  key: 0,
1127
1141
  class: "top-comment"
1128
- }, jt = ["href", "onClick"], Mt = 1e3, Nt = /* @__PURE__ */ A({
1142
+ }, Dt = ["href"], Ot = 1e3, kt = /* @__PURE__ */ j({
1129
1143
  __name: "projectSelector",
1130
- props: /*@__PURE__*/ j({
1144
+ props: /*@__PURE__*/ M({
1131
1145
  modelValue: {},
1132
1146
  client: {},
1133
- addLinksToProjects: {
1134
- type: Boolean,
1135
- default: !0
1136
- },
1147
+ menuMode: { type: Boolean },
1137
1148
  excludeProjectId: {},
1149
+ openerShortcut: {},
1138
1150
  modificator: {},
1139
1151
  placeholder: {},
1140
- buttonProps: {},
1141
- openerShortcut: {}
1152
+ buttonProps: {}
1142
1153
  }, {
1143
- modelValue: { default: {
1154
+ modelValue: { default: () => ({
1144
1155
  id: null,
1145
1156
  name: ""
1146
- } },
1157
+ }) },
1147
1158
  modelModifiers: {}
1148
1159
  }),
1149
1160
  emits: ["update:modelValue"],
1150
1161
  setup(n) {
1151
- let r = e(), i = n, a = R(n, "modelValue"), o = ht(i.client), s = ht(i.client);
1152
- s.changeParams({ limit: Mt });
1153
- let c = gt(i.client), l = P(Tt()), f = P(null), p = C(() => i.placeholder ?? r.Projects.Select_project), m = C(() => !q.value || !i.excludeProjectId ? q.value : q.value.filter((e) => e.id !== i.excludeProjectId)), h = C(() => {
1154
- if (!(!l.value && l.value !== 0)) return l.value < Mt ? "static" : "api";
1155
- });
1156
- z(Ct, () => {
1157
- ee();
1158
- }), z(a, () => {
1159
- !a.value.id || !i.addLinksToProjects || ut(dt(a.value.id));
1160
- });
1161
- let g = async () => {
1162
- J.value ||= s.call();
1162
+ let r = e(), i = n, a = z(n, "modelValue"), o = gt(i.client), s = _t(i.client), c = F(St()), l = F(null), f = me(), p = w(() => i.placeholder ?? r.Projects.Select_project), m = w(() => !Y.value || !i.excludeProjectId ? Y.value : Y.value.filter((e) => e.id !== i.excludeProjectId)), h = w(() => {
1163
+ if (!(!c.value && c.value !== 0)) return c.value < Ot ? "static" : "api";
1164
+ }), _ = async () => {
1165
+ J.value ||= o.call();
1163
1166
  let e = await J.value;
1164
- if (e.errors) {
1165
- J.value = null;
1166
- return;
1167
- }
1168
1167
  return J.value = null, e;
1169
- }, _ = async () => {
1170
- if (l.value) return;
1171
- let e = await g();
1172
- e && (l.value = e.total, h.value === "static" && !q.value && (q.value = e.result), l.value && wt(l.value));
1173
1168
  }, v = async (e) => {
1174
- let n = await c.changeParams({
1169
+ let n = await s.changeParams({
1175
1170
  url: e.name,
1176
1171
  name: e.name
1177
1172
  }).call();
1178
1173
  if (!n.errors) {
1179
- if (q.value && h.value === "static") {
1180
- let r = {
1181
- id: Number(n.result),
1182
- user_id: t.state.user.id,
1174
+ if (Y.value && h.value === "static") {
1175
+ let r = ct({
1176
+ id: n.result,
1177
+ user_id: t.state.userId,
1183
1178
  name: e.name,
1184
1179
  url: e.name,
1185
1180
  on: 0,
1186
- right: "11111111111111111111",
1187
- listItemProps: { attrs: { title: e.name } }
1188
- }, i = q.value.findIndex((e) => e.on === 0);
1189
- q.value = [
1190
- ...q.value.slice(0, i),
1181
+ right: "11111111111111111111"
1182
+ }), i = Y.value.findIndex((e) => e.on === 0);
1183
+ Y.value = [
1184
+ ...Y.value.slice(0, i),
1191
1185
  r,
1192
- ...q.value.slice(i)
1193
- ], l.value && (l.value += 1, wt(l.value));
1186
+ ...Y.value.slice(i)
1187
+ ], c.value && (c.value += 1, xt(c.value));
1194
1188
  }
1195
- h.value === "api" && Et();
1189
+ h.value === "api" && l.value?.resetCache(!0);
1196
1190
  }
1197
- }, ee = () => {
1198
- h.value === "api" && f.value?.resetCache(!0);
1191
+ }, ee = async () => {
1192
+ if (Y.value || h.value === "api") return;
1193
+ let e = await _();
1194
+ e.errors || (Y.value = e.result);
1199
1195
  }, y = async () => {
1200
- if (q.value || h.value === "api") return;
1201
- let e = await g();
1202
- e && (q.value = e.result);
1196
+ if (c.value) return;
1197
+ let e = await _();
1198
+ e.errors || (c.value = e.total ?? void 0, h.value === "static" && !Y.value && (Y.value = e.result), c.value && xt(c.value));
1203
1199
  };
1204
1200
  return oe(async () => {
1205
- await _();
1201
+ await y();
1206
1202
  }), (e, t) => {
1207
1203
  let r = le("TopButton");
1208
- return N(), w(x, {
1204
+ return P(), D(C, null, [h.value ? (P(), T(S, {
1205
+ key: 0,
1209
1206
  ref_key: "refSelector",
1210
- ref: f,
1207
+ ref: l,
1211
1208
  class: "top-projectSelector",
1212
1209
  modelValue: a.value,
1213
- "onUpdate:modelValue": t[1] ||= (e) => a.value = e,
1210
+ "onUpdate:modelValue": t[1] ||= (e) => n.menuMode ? R(dt)(e.id) : a.value = e,
1214
1211
  items: m.value,
1212
+ itemsIsLoading: h.value === "static" && R(Y) === void 0,
1215
1213
  title: e.$i18n.Projects.Search_projects,
1216
1214
  modificator: n.modificator,
1217
1215
  searchFields: [
@@ -1221,48 +1219,51 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1221
1219
  ],
1222
1220
  placeholder: p.value,
1223
1221
  hasCloserBtn: "",
1224
- api: h.value === "api" ? L(o) : void 0,
1225
- apiSetSearchParams: h.value === "api" ? (...e) => L(mt)(...e) : void 0,
1222
+ api: h.value === "api" ? R(o) : void 0,
1223
+ apiSetSearchParams: h.value === "api" ? (...e) => R(ht)(...e) : void 0,
1226
1224
  useCache: "",
1227
1225
  appendSearchToResult: "",
1228
1226
  appendSearchAllowDuplicate: "",
1229
- appendSearchToResultCond: L(u),
1227
+ appendSearchToResultCond: R(u),
1230
1228
  appendWithoutSelect: "",
1231
1229
  buttonProps: n.buttonProps,
1232
1230
  openerShortcut: n.openerShortcut,
1233
1231
  onAppendItem: v,
1234
- onOpen: y
1232
+ onOpen: ee
1235
1233
  }, {
1236
- item: B(({ item: i }) => [D("div", Dt, [D("div", Ot, [i.id ? (N(), E(S, { key: 0 }, [O(I(L(d)(i.name, 20)) + " ", 1), D("span", kt, " id " + I(i.id), 1)], 64)) : (N(), E(S, { key: 1 }, [i.listItemProps?.type ? T("", !0) : (N(), E("div", At, I(e.$i18n.Projects.Add_project) + ": ", 1)), O(" " + I(i.name), 1)], 64))]), i.id ? (N(), E(S, { key: 0 }, [
1237
- n.addLinksToProjects ? (N(), E("a", {
1234
+ item: V(({ item: i }) => [O("div", wt, [i.id ? (P(), D(C, { key: 0 }, [k(L(R(d)(i.name, 20)) + " ", 1), O("span", Tt, " id " + L(i.id), 1)], 64)) : (P(), D(C, { key: 1 }, [i.listItemProps?.type ? E("", !0) : (P(), D("div", Et, L(e.$i18n.Projects.Add_project) + ": ", 1)), k(" " + L(i.name), 1)], 64))]), i.id ? (P(), D(C, { key: 0 }, [
1235
+ n.menuMode ? (P(), D("a", {
1238
1236
  key: 0,
1239
1237
  class: "top-projectSelector_itemLink",
1240
- href: L(dt)(i.id),
1241
- onClick: V((e) => L(ut)(L(dt)(i.id), e), ["prevent", "stop"])
1242
- }, null, 8, jt)) : T("", !0),
1243
- e.$core.state.isMobile ? T("", !0) : (N(), w(r, {
1238
+ href: R(ft)(i.id)
1239
+ }, null, 8, Dt)) : E("", !0),
1240
+ e.$core.state.isMobile ? E("", !0) : (P(), T(r, {
1244
1241
  key: 1,
1245
- class: "top-projectSelector_itemExtLink",
1246
- href: L(pt)(i.url),
1242
+ href: i.externalLink,
1247
1243
  "data-top-icon": "",
1248
1244
  color: "theme",
1249
1245
  target: "_blank",
1250
- onClick: t[0] ||= V(() => {}, ["stop"])
1246
+ onClick: t[0] ||= H(() => {}, ["stop"])
1251
1247
  }, null, 8, ["href"])),
1252
- k(xt, {
1253
- id: i.id,
1254
- right: i.right ?? void 0,
1255
- url: L(pt)(i.url)
1256
- }, null, 8, [
1257
- "id",
1258
- "right",
1259
- "url"
1260
- ])
1261
- ], 64)) : T("", !0)])]),
1248
+ A(g, {
1249
+ id: R(f),
1250
+ pos: "2",
1251
+ notch: !1,
1252
+ data: { projectItem: i }
1253
+ }, {
1254
+ default: V(() => [A(r, {
1255
+ class: "top-popup_listMore",
1256
+ "data-top-icon": "",
1257
+ color: "theme"
1258
+ })]),
1259
+ _: 1
1260
+ }, 8, ["id", "data"])
1261
+ ], 64)) : E("", !0)]),
1262
1262
  _: 1
1263
1263
  }, 8, [
1264
1264
  "modelValue",
1265
1265
  "items",
1266
+ "itemsIsLoading",
1266
1267
  "title",
1267
1268
  "modificator",
1268
1269
  "placeholder",
@@ -1271,43 +1272,43 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1271
1272
  "appendSearchToResultCond",
1272
1273
  "buttonProps",
1273
1274
  "openerShortcut"
1274
- ]);
1275
+ ])) : E("", !0), A(yt, { id: R(f) }, null, 8, ["id"])], 64);
1275
1276
  };
1276
1277
  }
1277
- }), Pt = (e) => "-" + e, Y = (e) => e[0] === "-" ? e.substring(1) : e, X = (e, t) => {
1278
- e = Y(e);
1278
+ }), At = (e) => "-" + e, X = (e) => e[0] === "-" ? e.substring(1) : e, Z = (e, t) => {
1279
+ e = X(e);
1279
1280
  let n = t.find((t) => t.id === e);
1280
1281
  if (n) return n;
1281
- }, Ft = (e, t, n) => {
1282
+ }, jt = (e, t, n) => {
1282
1283
  t ||= { id: e.id }, t.id = e.id, t.pos ??= "3", t.notch ??= !0, t.posBy ??= "fixed";
1283
1284
  let r = c.genElPopupOpener("div", t);
1284
1285
  return r.classList.add("top-tagSelector"), e.useTopButton && r.classList.add("top-tagSelector-useTopButton", "top-button", "top-color_theme", "top-as-selector"), e.useTopButton || r.classList.add("top-tagSelector-custom"), e.mode === "filter" && r.classList.add("top-tagSelector-filter"), e.mode === "setter" && !e.filters && r.classList.add("top-tagSelector-setter_single"), e.mode === "setter" && e.filters && r.classList.add("top-tagSelector-setter_several"), r.onclick = (t) => {
1285
1286
  t.preventDefault(), t.stopPropagation(), r.onclick = null;
1286
- let i = P(e.modelValue);
1287
- s(r, "topTagSelectorTarget", {
1287
+ let i = F(e.modelValue), a = {
1288
1288
  model: i,
1289
1289
  mode: e.mode,
1290
1290
  targetId: e.targetId,
1291
1291
  filters: e.filters,
1292
1292
  payload: e.payload
1293
- }), delete r.dataset.topPopupDisabled, re(e.modelValue) || z(i, () => {
1294
- e.modelValue = i.value, Z(r, e, n);
1293
+ };
1294
+ s(r, "topTagSelectorTarget", a), delete r.dataset.topPopupDisabled, re(e.modelValue) || B(i, () => {
1295
+ e.modelValue = i.value, Q(r, e, n);
1295
1296
  }), r.click();
1296
- }, re(e.modelValue) ? z(e.modelValue, () => Z(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1297
+ }, re(e.modelValue) ? B(e.modelValue, () => Q(r, e, n)) : s(r, "topTagSelectorRender", (t) => {
1297
1298
  e.modelValue = t;
1298
1299
  let i = s(r, "topTagSelectorTarget");
1299
- i && (i.model.value = t), Z(r, e, n);
1300
- }), Z(r, e, n), r;
1301
- }, It = (e, t) => {
1300
+ i && (i.model.value = t), Q(r, e, n);
1301
+ }), Q(r, e, n), r;
1302
+ }, Mt = (e, t) => {
1302
1303
  s(e, "topTagSelectorRender")?.(t);
1303
- }, Z = (t, n, r) => {
1304
- let i = L(n.modelValue);
1304
+ }, Q = (t, n, r) => {
1305
+ let i = R(n.modelValue);
1305
1306
  if (t.classList.toggle("top-tagSelector-selectedOne", !i.length || i.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", i.length > 5), n.mode === "setter" && n.filters) {
1306
1307
  t.innerHTML = `<div>${r}</div>`;
1307
1308
  return;
1308
1309
  }
1309
1310
  if (t.innerHTML = "", !i.length && n.mode === "filter") {
1310
- let n = Lt({
1311
+ let n = Nt({
1311
1312
  id: "all",
1312
1313
  colorId: "",
1313
1314
  name: e().Common?.All_tags ?? "",
@@ -1316,18 +1317,18 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1316
1317
  t.append(n);
1317
1318
  }
1318
1319
  i.forEach((e) => {
1319
- let r = Lt({
1320
- id: Y(e),
1321
- colorId: X(e, n.tags)?.color_id ?? "",
1322
- name: X(e, n.tags)?.name ?? "",
1323
- state: Y(e) === e ? "selected" : "excluded"
1320
+ let r = Nt({
1321
+ id: X(e),
1322
+ colorId: Z(e, n.tags)?.color_id ?? "",
1323
+ name: Z(e, n.tags)?.name ?? "",
1324
+ state: X(e) === e ? "selected" : "excluded"
1324
1325
  });
1325
1326
  t.append(r);
1326
1327
  });
1327
- }, Lt = (e) => {
1328
+ }, Nt = (e) => {
1328
1329
  let t = document.createElement("div");
1329
1330
  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;
1330
- }, Rt = [
1331
+ }, Pt = [
1331
1332
  {
1332
1333
  id: "1",
1333
1334
  name: "Without Tag",
@@ -1378,11 +1379,11 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1378
1379
  name: "Turquoise",
1379
1380
  color_id: "10"
1380
1381
  }
1381
- ], zt = [
1382
+ ], Ft = [
1382
1383
  "data-tag_id",
1383
1384
  "data-tag_color_id",
1384
1385
  "title"
1385
- ], Q = /* @__PURE__ */ A({
1386
+ ], It = /* @__PURE__ */ j({
1386
1387
  __name: "tagIcon",
1387
1388
  props: {
1388
1389
  id: {},
@@ -1391,8 +1392,8 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1391
1392
  state: {}
1392
1393
  },
1393
1394
  setup(e) {
1394
- return (t, n) => (N(), E("div", {
1395
- class: M({
1395
+ return (t, n) => (P(), D("div", {
1396
+ class: N({
1396
1397
  "top-tagSelector_tagIcon": !0,
1397
1398
  "top-tagSelector-active": !!e.state,
1398
1399
  "top-tagSelector-excluded": e.state === "excluded"
@@ -1400,11 +1401,11 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1400
1401
  "data-tag_id": e.id,
1401
1402
  "data-tag_color_id": e.colorId,
1402
1403
  title: e.name
1403
- }, null, 10, zt));
1404
+ }, null, 10, Ft));
1404
1405
  }
1405
- }), Bt = ["contenteditable", "onKeydown"], Vt = /* @__PURE__ */ A({
1406
+ }), Lt = ["contenteditable", "onKeydown"], Rt = /* @__PURE__ */ j({
1406
1407
  __name: "tagPopupListItem",
1407
- props: /*@__PURE__*/ j({
1408
+ props: /*@__PURE__*/ M({
1408
1409
  editable: { type: Boolean },
1409
1410
  disabled: { type: Boolean },
1410
1411
  canExclude: { type: Boolean },
@@ -1416,17 +1417,17 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1416
1417
  name: { required: !0 },
1417
1418
  nameModifiers: {}
1418
1419
  }),
1419
- emits: /*@__PURE__*/ j([
1420
+ emits: /*@__PURE__*/ M([
1420
1421
  "update:name",
1421
1422
  "unselect",
1422
1423
  "exclude",
1423
1424
  "select"
1424
1425
  ], ["update:name"]),
1425
1426
  setup(e, { emit: t }) {
1426
- let n = e, r = t, i = R(e, "name"), a = P(null), o = C(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1427
+ let n = e, r = t, i = z(e, "name"), a = F(null), o = w(() => navigator.userAgent.indexOf("Firefox") == -1 ? {} : {
1427
1428
  contenteditable: s.value,
1428
1429
  onpaste: (e) => e.preventDefault()
1429
- }), s = P(!1), c = async () => {
1430
+ }), s = F(!1), c = async () => {
1430
1431
  s.value = !0, await ae(), a.value?.focus();
1431
1432
  }, l = () => {
1432
1433
  let e = a.value?.innerText;
@@ -1439,8 +1440,8 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1439
1440
  let t = "selected";
1440
1441
  n.canExclude && (e.ctrlKey || e.metaKey) && (t = "excluded"), n.state == t && (t = ""), t === "" && r("unselect"), t === "selected" && r("select"), t === "excluded" && r("exclude");
1441
1442
  };
1442
- return (t, n) => (N(), w(v, {
1443
- class: M({
1443
+ return (t, n) => (P(), T(v, {
1444
+ class: N({
1444
1445
  "top-tagSelector_tagListItem": !0,
1445
1446
  "top-tagSelector_tagListItem-inEdit": s.value,
1446
1447
  "top-tagSelector_tagListItem-disabled": e.disabled,
@@ -1448,10 +1449,10 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1448
1449
  "top-tagSelector-active": !!e.state,
1449
1450
  "top-tagSelector-excluded": e.state === "excluded"
1450
1451
  }),
1451
- onClick: V(d, ["stop"])
1452
+ onClick: H(d, ["stop"])
1452
1453
  }, {
1453
- default: B(() => [
1454
- k(Q, {
1454
+ default: V(() => [
1455
+ A(It, {
1455
1456
  id: e.id,
1456
1457
  name: i.value,
1457
1458
  colorId: e.colorId,
@@ -1462,31 +1463,31 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1462
1463
  "colorId",
1463
1464
  "state"
1464
1465
  ]),
1465
- D("span", ie({
1466
+ O("span", ie({
1466
1467
  ref_key: "elName",
1467
1468
  ref: a,
1468
1469
  class: "top-tagSelector_tagListItemName",
1469
1470
  contenteditable: s.value ? "plaintext-only" : !1
1470
- }, o.value, { onKeydown: [he(V(l, ["stop"]), ["enter"]), he(V(u, ["stop"]), ["esc"])] }), I(i.value), 17, Bt),
1471
- e.editable ? (N(), E(S, { key: 0 }, [s.value ? (N(), E("span", {
1471
+ }, o.value, { onKeydown: [ge(H(l, ["stop"]), ["enter"]), ge(H(u, ["stop"]), ["esc"])] }), L(i.value), 17, Lt),
1472
+ e.editable ? (P(), D(C, { key: 0 }, [s.value ? (P(), D("span", {
1472
1473
  key: 1,
1473
1474
  "data-top-icon": "",
1474
1475
  class: "top-tagSelector_edit",
1475
- onClick: V(l, ["stop"])
1476
- })) : (N(), E("span", {
1476
+ onClick: H(l, ["stop"])
1477
+ })) : (P(), D("span", {
1477
1478
  key: 0,
1478
1479
  "data-top-icon": "",
1479
1480
  class: "top-tagSelector_edit",
1480
1481
  onClick: c
1481
- }))], 64)) : T("", !0)
1482
+ }))], 64)) : E("", !0)
1482
1483
  ]),
1483
1484
  _: 1
1484
1485
  }, 8, ["class"]));
1485
1486
  }
1486
- }), Ht = { key: 1 }, Ut = /* @__PURE__ */ A({
1487
+ }), zt = { key: 1 }, Bt = /* @__PURE__ */ j({
1487
1488
  inheritAttrs: !1,
1488
1489
  __name: "popupOpener",
1489
- props: /*@__PURE__*/ j({
1490
+ props: /*@__PURE__*/ M({
1490
1491
  modelValue: {},
1491
1492
  id: {},
1492
1493
  tags: {},
@@ -1502,7 +1503,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1502
1503
  }),
1503
1504
  emits: ["update:modelValue"],
1504
1505
  setup(e) {
1505
- let t = e, n = R(e, "modelValue"), i = t.useTopButton ? r : "div", a = t.useTopButton ? "html" : "default", o = {
1506
+ let t = e, n = z(e, "modelValue"), i = t.useTopButton ? r : "div", a = t.useTopButton ? "html" : "default", o = {
1506
1507
  model: n,
1507
1508
  mode: t.mode,
1508
1509
  targetId: t.targetId,
@@ -1511,8 +1512,8 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1511
1512
  };
1512
1513
  return (r, s) => {
1513
1514
  let c = ue("top-data");
1514
- return N(), w(g, { id: e.id }, {
1515
- default: B(() => [me((N(), w(de(L(i)), ie({
1515
+ return P(), T(g, { id: e.id }, {
1516
+ default: V(() => [he((P(), T(de(R(i)), ie({
1516
1517
  class: {
1517
1518
  "top-tagSelector": !0,
1518
1519
  "top-tagSelector-useTopButton": t.useTopButton,
@@ -1527,17 +1528,17 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1527
1528
  color: "theme",
1528
1529
  styling: e.styling
1529
1530
  }, r.$attrs), {
1530
- [L(a)]: B(() => [!n.value.length && e.mode === "filter" ? (N(), w(Q, {
1531
+ [R(a)]: V(() => [!n.value.length && e.mode === "filter" ? (P(), T(It, {
1531
1532
  key: 0,
1532
1533
  id: "all",
1533
1534
  colorId: "",
1534
1535
  name: r.$i18n.Common.All_tags ?? "",
1535
1536
  state: ""
1536
- }, null, 8, ["name"])) : T("", !0), e.mode === "setter" && e.filters ? (N(), E("div", Ht, [ce(r.$slots, "default")])) : (N(!0), E(S, { key: 2 }, F(n.value, (t) => (N(), w(Q, {
1537
- id: L(Y)(t),
1538
- colorId: L(X)(t, e.tags)?.color_id ?? "",
1539
- name: L(X)(t, e.tags)?.name ?? "",
1540
- state: L(Y)(t) === t ? "selected" : "excluded"
1537
+ }, null, 8, ["name"])) : E("", !0), e.mode === "setter" && e.filters ? (P(), D("div", zt, [ce(r.$slots, "default")])) : (P(!0), D(C, { key: 2 }, I(n.value, (t) => (P(), T(It, {
1538
+ id: R(X)(t),
1539
+ colorId: R(Z)(t, e.tags)?.color_id ?? "",
1540
+ name: R(Z)(t, e.tags)?.name ?? "",
1541
+ state: R(X)(t) === t ? "selected" : "excluded"
1541
1542
  }, null, 8, [
1542
1543
  "id",
1543
1544
  "colorId",
@@ -1554,9 +1555,9 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1554
1555
  }, 8, ["id"]);
1555
1556
  };
1556
1557
  }
1557
- }), Wt = /* @__PURE__ */ A({
1558
+ }), Vt = /* @__PURE__ */ j({
1558
1559
  __name: "tagSelector",
1559
- props: /*@__PURE__*/ j({
1560
+ props: /*@__PURE__*/ M({
1560
1561
  modelValue: {},
1561
1562
  tags: {},
1562
1563
  tagsEditable: { type: Boolean },
@@ -1577,20 +1578,20 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1577
1578
  }, {
1578
1579
  modelValue: { required: !0 },
1579
1580
  modelModifiers: {},
1580
- tags: { default: se(Rt) },
1581
+ tags: { default: se(Pt) },
1581
1582
  tagsModifiers: {}
1582
1583
  }),
1583
- emits: /*@__PURE__*/ j([
1584
+ emits: /*@__PURE__*/ M([
1584
1585
  "selector",
1585
1586
  "setter",
1586
1587
  "tagsChanged"
1587
1588
  ], ["update:modelValue", "update:tags"]),
1588
1589
  setup(a, { emit: o }) {
1589
- let c = e(), l = a, u = R(a, "modelValue"), d = R(a, "tags"), f = o, p = n((e, t) => {
1590
+ let c = e(), l = a, u = z(a, "modelValue"), d = z(a, "tags"), f = o, p = n((e, t) => {
1590
1591
  f(e, t);
1591
1592
  }, l.emitDelay);
1592
1593
  l.singleMode && !u.value.length && (u.value = [d.value[0].id]);
1593
- let m = l.id ?? "top-popup-id-" + Math.random(), h = P("add"), g = () => {
1594
+ let m = l.id ?? "top-popup-id-" + Math.random(), h = F("add"), g = () => {
1594
1595
  let e = " " + c.Common.Tags?.toLowerCase(), t = /* @__PURE__ */ new Map();
1595
1596
  return t.set("add", {
1596
1597
  value: "add",
@@ -1609,28 +1610,28 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1609
1610
  filters: void 0,
1610
1611
  payload: void 0
1611
1612
  });
1612
- z(u, () => {
1613
+ B(u, () => {
1613
1614
  p("selector", u.value);
1614
1615
  });
1615
- let ee = C(() => {
1616
+ let ee = w(() => {
1616
1617
  if (_.value.mode === "setter" && l.maxTagsForSetter && !_.value.filters) return _.value.model.value.length >= l.maxTagsForSetter;
1617
1618
  }), b = (e) => {
1618
1619
  if (e !== "all") {
1619
1620
  if (_.value.model.value.includes(e)) return "selected";
1620
- if (_.value.model.value.includes(Pt(e))) return "excluded";
1621
+ if (_.value.model.value.includes(At(e))) return "excluded";
1621
1622
  }
1622
1623
  return e === "all" && !_.value.model.value.length ? "selected" : "";
1623
1624
  }, x = (e, t) => {
1624
- let n = Pt(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1625
+ let n = At(e), r = _.value.model.value.filter((t) => t !== e && t !== n);
1625
1626
  t === "select" && r.push(e), t === "exclude" && r.push(n), _.value.mode === "setter" && _.value.targetId !== void 0 && l.requiredForSetter && (r.length || r.push("1"), r.length === 2 && _.value.model.value.length === 1 && _.value.model.value[0] === "1" && (r = r.filter((e) => e !== "1"))), l.singleMode && !_.value.filters && (r.length || (r = _.value.model.value), r.length > 1 && (r = [r[r.length - 1]])), r.sort((e, t) => l.tags ? l.tags.findIndex((t) => t.id === e) - l.tags.findIndex((e) => e.id === t) : 0), _.value.model.value = r, _.value.mode === "setter" && _.value.targetId !== void 0 && p("setter", {
1626
1627
  tagsIds: r,
1627
1628
  targetId: _.value.targetId,
1628
1629
  payload: _.value.payload
1629
1630
  });
1630
- }, te = C(() => {
1631
+ }, S = w(() => {
1631
1632
  let e = "top-tagSelector_popup";
1632
1633
  return _.value.mode === "filter" && (e += " top-tagSelector_popup-filter"), _.value.mode === "setter" && (e += " top-tagSelector_popup-setter"), e;
1633
- }), D = () => {
1634
+ }), te = () => {
1634
1635
  let e = prompt("", "New tag");
1635
1636
  if (!e || e === "New tag") return;
1636
1637
  let t = d.value.length + 1;
@@ -1639,7 +1640,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1639
1640
  name: e,
1640
1641
  color_id: String((t - 1) % 10 + 1)
1641
1642
  }), f("tagsChanged", d.value);
1642
- }, A = (e) => {
1643
+ }, O = (e) => {
1643
1644
  if (_.value = s(e.elPopupOpener, "topTagSelectorTarget"), !_.value) throw Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
1644
1645
  if (_.value.filters && (h.value = "add", _.value.model.value = []), !t.$?.ui.sortable) {
1645
1646
  console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
@@ -1659,13 +1660,13 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1659
1660
  }), d.value.sort((e, t) => r.findIndex((t) => t === e.id) - r.findIndex((e) => e === t.id)), p("tagsChanged", d.value);
1660
1661
  }
1661
1662
  });
1662
- }, re = (e) => {
1663
+ }, j = (e) => {
1663
1664
  t.$?.ui.sortable && $(e.elPopup).data("ui-sortable") && $(e.elPopup).sortable("destroy");
1664
1665
  };
1665
- return (e, t) => (N(), E(S, null, [k(Ut, {
1666
+ return (e, t) => (P(), D(C, null, [A(Bt, {
1666
1667
  modelValue: u.value,
1667
1668
  "onUpdate:modelValue": t[0] ||= (e) => u.value = e,
1668
- id: L(m),
1669
+ id: R(m),
1669
1670
  tags: d.value,
1670
1671
  styling: a.styling,
1671
1672
  mode: "filter",
@@ -1676,23 +1677,23 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1676
1677
  "tags",
1677
1678
  "styling",
1678
1679
  "useTopButton"
1679
- ]), k(y, {
1680
- id: L(m),
1681
- class: M(te.value),
1682
- onOpen: t[4] ||= (e) => A(e),
1683
- onClose: t[5] ||= (e) => re(e),
1680
+ ]), A(y, {
1681
+ id: R(m),
1682
+ class: N(S.value),
1683
+ onOpen: t[4] ||= (e) => O(e),
1684
+ onClose: t[5] ||= (e) => j(e),
1684
1685
  "transition-duration": 50
1685
1686
  }, ne({
1686
- contentList: B(() => [
1687
- _.value.mode === "filter" && !a.singleMode ? (N(), w(Vt, {
1687
+ contentList: V(() => [
1688
+ _.value.mode === "filter" && !a.singleMode ? (P(), T(Rt, {
1688
1689
  key: 0,
1689
1690
  id: "all",
1690
1691
  colorId: "",
1691
1692
  name: e.$i18n.Common.All_tags ?? "",
1692
1693
  state: _.value.model.value.length ? "" : "selected",
1693
1694
  onSelect: t[3] ||= (e) => _.value.model.value = []
1694
- }, null, 8, ["name", "state"])) : T("", !0),
1695
- (N(!0), E(S, null, F(d.value, (e) => (N(), w(Vt, {
1695
+ }, null, 8, ["name", "state"])) : E("", !0),
1696
+ (P(!0), D(C, null, I(d.value, (e) => (P(), T(Rt, {
1696
1697
  key: e.id,
1697
1698
  id: e.id,
1698
1699
  colorId: e.color_id,
@@ -1705,7 +1706,7 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1705
1706
  onSelect: (t) => x(e.id, "select"),
1706
1707
  onExclude: (t) => x(e.id, "exclude"),
1707
1708
  "onUpdate:name": (t) => {
1708
- e.name = t, L(p)("tagsChanged", d.value);
1709
+ e.name = t, R(p)("tagsChanged", d.value);
1709
1710
  }
1710
1711
  }, null, 8, [
1711
1712
  "id",
@@ -1720,19 +1721,19 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1720
1721
  "onExclude",
1721
1722
  "onUpdate:name"
1722
1723
  ]))), 128)),
1723
- a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (N(), w(v, {
1724
+ a.tagsEditable && d.value.length < a.tagsMax && d.value.length < 20 ? (P(), T(v, {
1724
1725
  key: 1,
1725
1726
  "data-top-icon": "",
1726
- onClick: V(D, ["stop"])
1727
+ onClick: H(te, ["stop"])
1727
1728
  }, {
1728
- default: B(() => [O(I(e.$i18n.Common.Add), 1)]),
1729
+ default: V(() => [k(L(e.$i18n.Common.Add), 1)]),
1729
1730
  _: 1
1730
- })) : T("", !0)
1731
+ })) : E("", !0)
1731
1732
  ]),
1732
1733
  _: 2
1733
1734
  }, [_.value.mode === "setter" && _.value.filters ? {
1734
1735
  name: "header",
1735
- fn: B(() => [k(i, {
1736
+ fn: V(() => [A(i, {
1736
1737
  modelValue: h.value,
1737
1738
  "onUpdate:modelValue": t[1] ||= (e) => h.value = e,
1738
1739
  options: g()
@@ -1740,16 +1741,16 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1740
1741
  key: "0"
1741
1742
  } : void 0, _.value.mode === "setter" && _.value.filters ? {
1742
1743
  name: "footer",
1743
- fn: B(() => [k(r, { color: "theme" }, {
1744
- default: B(() => [O(I(e.$i18n.Common.Cancel), 1)]),
1744
+ fn: V(() => [A(r, { color: "theme" }, {
1745
+ default: V(() => [k(L(e.$i18n.Common.Cancel), 1)]),
1745
1746
  _: 1
1746
- }), k(r, { onClick: t[2] ||= (e) => L(p)("setter", {
1747
+ }), A(r, { onClick: t[2] ||= (e) => R(p)("setter", {
1747
1748
  tagsIds: _.value.model.value,
1748
1749
  filters: _.value.filters,
1749
1750
  filtersAction: h.value,
1750
1751
  payload: _.value.payload
1751
1752
  }) }, {
1752
- default: B(() => [O(I(h.value === "add" ? e.$i18n.Common.Add : "") + " " + I(h.value === "replace" ? e.$i18n.Common.Replace : "") + " " + I(h.value === "delete" ? e.$i18n.Common.Delete : ""), 1)]),
1753
+ default: V(() => [k(L(h.value === "add" ? e.$i18n.Common.Add : "") + " " + L(h.value === "replace" ? e.$i18n.Common.Replace : "") + " " + L(h.value === "delete" ? e.$i18n.Common.Delete : ""), 1)]),
1753
1754
  _: 1
1754
1755
  })]),
1755
1756
  key: "1"
@@ -1757,6 +1758,6 @@ var He = ["innerHTML"], Ue = /* @__PURE__ */ A({
1757
1758
  }
1758
1759
  });
1759
1760
  //#endregion
1760
- export { ve as TopCompetitorSelector, rt as TopGroupSelector, Nt as TopProjectSelector, Le as TopRegionSelector, Wt as TopTagSelector, Ut as TopTagSelectorPopupOpener, Q as TopTagSelectorTagIcon, Et as clearCache, Me as dialogRegionSelector, je as findRegion, Ft as genElTopTagSelectorPopupOpener, Oe as genSearcherByKey, It as renderElTopTagSelectorPopupOpener, ye as useItemsFromCompetitors };
1761
+ export { ye as TopCompetitorSelector, it as TopGroupSelector, kt as TopProjectSelector, Re as TopRegionSelector, Vt as TopTagSelector, Bt as TopTagSelectorPopupOpener, It as TopTagSelectorTagIcon, Ne as dialogRegionSelector, Me as findRegion, jt as genElTopTagSelectorPopupOpener, ke as genSearcherByKey, Mt as renderElTopTagSelectorPopupOpener, Ct as topProjectSelectorClearCache, be as useItemsFromCompetitors };
1761
1762
 
1762
1763
  //# sourceMappingURL=project.js.map