@topvisor/ui 1.0.22-selectorRegion-pr → 1.0.22-test.0
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.
- package/.chunks/{core-Cb1K4rks.es.js → core-Dxu5q2pq.es.js} +4 -4
- package/.chunks/{core-Cb1K4rks.es.js.map → core-Dxu5q2pq.es.js.map} +1 -1
- package/.chunks/{core-DOD2Zduv.amd.js → core-VAPdmxul.amd.js} +2 -2
- package/.chunks/{core-DOD2Zduv.amd.js.map → core-VAPdmxul.amd.js.map} +1 -1
- package/.chunks/{datepicker-BbLOzQtp.es.js → datepicker-B8BEVYYv.es.js} +2 -2
- package/.chunks/{datepicker-BbLOzQtp.es.js.map → datepicker-B8BEVYYv.es.js.map} +1 -1
- package/.chunks/{datepicker-DNOnzVIz.amd.js → datepicker-np32OBIB.amd.js} +2 -2
- package/.chunks/{datepicker-DNOnzVIz.amd.js.map → datepicker-np32OBIB.amd.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-BYAZLdbp.es.js → dialog_selectorRegions-eupaC53Q.es.js} +3 -3
- package/.chunks/{dialog_selectorRegions-BYAZLdbp.es.js.map → dialog_selectorRegions-eupaC53Q.es.js.map} +1 -1
- package/.chunks/{dialog_selectorRegions-D1YE2mYS.amd.js → dialog_selectorRegions-vtydbe7k.amd.js} +2 -2
- package/.chunks/{dialog_selectorRegions-D1YE2mYS.amd.js.map → dialog_selectorRegions-vtydbe7k.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js → dialogs.vue_vue_type_script_setup_true_lang-BEjw0nsH.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DtLpQTwi.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-BEjw0nsH.es.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js → dialogs.vue_vue_type_script_setup_true_lang-CKz2r_HQ.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-xoE5yB6b.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-CKz2r_HQ.amd.js.map} +1 -1
- package/.chunks/{forms-Dv9L8-AZ.amd.js → forms-B4wnA2qg.amd.js} +3 -3
- package/.chunks/{forms-Dv9L8-AZ.amd.js.map → forms-B4wnA2qg.amd.js.map} +1 -1
- package/.chunks/{forms-LTK63Ugt.es.js → forms-BEOYaG5x.es.js} +6 -6
- package/.chunks/{forms-LTK63Ugt.es.js.map → forms-BEOYaG5x.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js → listItem.vue_vue_type_script_setup_true_lang-BzHSHzgd.es.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-UC3o5oK5.es.js.map → listItem.vue_vue_type_script_setup_true_lang-BzHSHzgd.es.js.map} +1 -1
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js → listItem.vue_vue_type_script_setup_true_lang-Yoht7Zz1.amd.js} +2 -2
- package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-COGiIcDO.amd.js.map → listItem.vue_vue_type_script_setup_true_lang-Yoht7Zz1.amd.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js → menu.vue_vue_type_style_index_0_lang-D38vuK6Z.es.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-hQu5BJPe.es.js.map → menu.vue_vue_type_style_index_0_lang-D38vuK6Z.es.js.map} +1 -1
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js → menu.vue_vue_type_style_index_0_lang-DpQWqw0S.amd.js} +2 -2
- package/.chunks/{menu.vue_vue_type_style_index_0_lang-BFmZ4tvs.amd.js.map → menu.vue_vue_type_style_index_0_lang-DpQWqw0S.amd.js.map} +1 -1
- package/.chunks/{notice-CYutIom0.es.js → notice-BFubg4q7.es.js} +2 -2
- package/.chunks/{notice-CYutIom0.es.js.map → notice-BFubg4q7.es.js.map} +1 -1
- package/.chunks/{notice-BoZG4Mg1.amd.js → notice-BMEqHHl7.amd.js} +2 -2
- package/.chunks/{notice-BoZG4Mg1.amd.js.map → notice-BMEqHHl7.amd.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js → page.vue_vue_type_script_setup_true_lang-DOfSX4G2.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CffDh-th.amd.js.map → page.vue_vue_type_script_setup_true_lang-DOfSX4G2.amd.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js → page.vue_vue_type_script_setup_true_lang-DkVrf3fD.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-B2wjrf5z.es.js.map → page.vue_vue_type_script_setup_true_lang-DkVrf3fD.es.js.map} +1 -1
- package/.chunks/{popup-ec_xLrTA.es.js → popup-KzrqppGt.es.js} +2 -2
- package/.chunks/{popup-ec_xLrTA.es.js.map → popup-KzrqppGt.es.js.map} +1 -1
- package/.chunks/{popup-Cg9w4Vy-.amd.js → popup-RsYK2WNs.amd.js} +2 -2
- package/.chunks/{popup-Cg9w4Vy-.amd.js.map → popup-RsYK2WNs.amd.js.map} +1 -1
- package/.chunks/{utils-z5wL437D.amd.js → utils-C-3nlmxS.amd.js} +2 -2
- package/.chunks/{utils-z5wL437D.amd.js.map → utils-C-3nlmxS.amd.js.map} +1 -1
- package/.chunks/{utils-GpKurv7L.amd.js → utils-CwjZqLi4.amd.js} +2 -2
- package/.chunks/{utils-GpKurv7L.amd.js.map → utils-CwjZqLi4.amd.js.map} +1 -1
- package/.chunks/{utils-BRLYX_ZC.es.js → utils-DkTeAU_D.es.js} +3 -3
- package/.chunks/{utils-BRLYX_ZC.es.js.map → utils-DkTeAU_D.es.js.map} +1 -1
- package/.chunks/{utils-COoE8KP7.es.js → utils-Lh80NiyA.es.js} +2 -2
- package/.chunks/{utils-COoE8KP7.es.js.map → utils-Lh80NiyA.es.js.map} +1 -1
- package/assets/forms.css +1 -1
- package/assets/formsExt.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.js +1 -1
- package/components/project/selectorRegion/selectorRegion.d.ts +2 -0
- package/components/project/selectorRegion/utils/consts.d.ts +13 -0
- package/core/app.amd.js +1 -1
- package/core/app.js +5 -5
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +220 -213
- package/formsExt/formsExt.js.map +1 -1
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +2 -2
- package/popup/worker.amd.js +1 -1
- package/popup/worker.js +2 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +419 -420
- package/project/project.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +1 -1
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.js +3 -3
- package/utils/string.amd.js +1 -1
- package/utils/string.js +1 -1
package/project/project.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Core as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as
|
|
7
|
-
import { getSearcherGIcon as
|
|
8
|
-
import { storage as
|
|
9
|
-
import { TopPopupWorker as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
1
|
+
import { Core as be } from "../core/app.js";
|
|
2
|
+
import { defineComponent as P, mergeModels as N, useModel as D, computed as E, createElementBlock as B, openBlock as k, createBlock as b, unref as y, withCtx as _, Fragment as Y, renderList as de, normalizeClass as X, createElementVNode as he, toDisplayString as M, createVNode as A, createTextVNode as G, ref as F, watch as w, createCommentVNode as q, withModifiers as J, mergeProps as Se, withKeys as ce, nextTick as Ve, resolveDirective as Ee, withDirectives as Ke, resolveDynamicComponent as Me, renderSlot as $e, shallowRef as we, createSlots as Le, reactive as Ae, toValue as ge, isRef as me } from "vue";
|
|
3
|
+
import { u as R, C as z, _ as H, x as se, d as Re } from "../.chunks/forms-BEOYaG5x.es.js";
|
|
4
|
+
import { _ as Ie, a as ue, b as Oe } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-BzHSHzgd.es.js";
|
|
5
|
+
import { _ as Ne } from "../.chunks/menu.vue_vue_type_style_index_0_lang-D38vuK6Z.es.js";
|
|
6
|
+
import { u as De } from "../.chunks/utils-Lh80NiyA.es.js";
|
|
7
|
+
import { getSearcherGIcon as Fe, getLangLabel as qe, getDeviceGIcon as Pe } from "../utils/searchers.js";
|
|
8
|
+
import { storage as W } from "../utils/dom.js";
|
|
9
|
+
import { TopPopupWorker as Ue } from "../popup/worker.js";
|
|
10
|
+
const Be = ["../assets/project.css"].map((t) => import.meta.resolve(t));
|
|
11
|
+
be.insertCSSLinkToPage(Be, !0);
|
|
12
|
+
const je = { class: "top-selectorCompetitors" }, Je = { class: "top-ellipsis1" }, ze = /* @__PURE__ */ P({
|
|
13
13
|
__name: "selectorCompetitors",
|
|
14
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ N({
|
|
15
15
|
modelValue: {},
|
|
16
16
|
items: {},
|
|
17
17
|
showSelectAllItem: { type: Boolean, default: !0 }
|
|
@@ -21,59 +21,59 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
21
21
|
}),
|
|
22
22
|
emits: ["update:modelValue"],
|
|
23
23
|
setup(t) {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
24
|
+
const o = t, n = D(t, "modelValue"), e = E(() => {
|
|
25
|
+
if (o.showSelectAllItem)
|
|
26
26
|
return {
|
|
27
27
|
icon: "",
|
|
28
|
-
title:
|
|
28
|
+
title: R().Common.Select_all,
|
|
29
29
|
value: "all",
|
|
30
30
|
content: ""
|
|
31
31
|
};
|
|
32
32
|
});
|
|
33
|
-
return (i, a) => (k(), B("div",
|
|
34
|
-
y(
|
|
33
|
+
return (i, a) => (k(), B("div", je, [
|
|
34
|
+
y(z).state.isMobile ? (k(), b(Ie, { key: 0 }, {
|
|
35
35
|
opener: _(() => [
|
|
36
|
-
|
|
36
|
+
A(H, {
|
|
37
37
|
class: "top-selectorCompetitors_opener",
|
|
38
38
|
color: "theme",
|
|
39
39
|
icon: "",
|
|
40
40
|
icon2: ""
|
|
41
41
|
}, {
|
|
42
42
|
default: _(() => {
|
|
43
|
-
var
|
|
43
|
+
var l;
|
|
44
44
|
return [
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
return d.value === ((
|
|
48
|
-
})) == null ? void 0 :
|
|
45
|
+
G(M((l = i.items.find((d) => {
|
|
46
|
+
var f;
|
|
47
|
+
return d.value === ((f = n.value) == null ? void 0 : f[0]);
|
|
48
|
+
})) == null ? void 0 : l.content), 1)
|
|
49
49
|
];
|
|
50
50
|
}),
|
|
51
51
|
_: 1
|
|
52
52
|
})
|
|
53
53
|
]),
|
|
54
54
|
contentList: _(() => [
|
|
55
|
-
(k(!0), B(
|
|
56
|
-
var
|
|
57
|
-
return k(), b(
|
|
58
|
-
class:
|
|
59
|
-
"top-active": (
|
|
55
|
+
(k(!0), B(Y, null, de(i.items, (l, d) => {
|
|
56
|
+
var f;
|
|
57
|
+
return k(), b(ue, {
|
|
58
|
+
class: X({
|
|
59
|
+
"top-active": (f = n.value) == null ? void 0 : f.includes(l.value)
|
|
60
60
|
}),
|
|
61
|
-
"data-top-icon":
|
|
62
|
-
title:
|
|
63
|
-
onClick: () =>
|
|
61
|
+
"data-top-icon": l.icon,
|
|
62
|
+
title: l.title,
|
|
63
|
+
onClick: () => n.value = [l.value]
|
|
64
64
|
}, {
|
|
65
65
|
default: _(() => [
|
|
66
|
-
|
|
66
|
+
he("span", Je, M(l.content), 1)
|
|
67
67
|
]),
|
|
68
68
|
_: 2
|
|
69
69
|
}, 1032, ["class", "data-top-icon", "title", "onClick"]);
|
|
70
70
|
}), 256))
|
|
71
71
|
]),
|
|
72
72
|
_: 1
|
|
73
|
-
})) : (k(), b(
|
|
73
|
+
})) : (k(), b(Ne, {
|
|
74
74
|
key: 1,
|
|
75
|
-
modelValue:
|
|
76
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
75
|
+
modelValue: n.value,
|
|
76
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => n.value = l),
|
|
77
77
|
items: i.items,
|
|
78
78
|
isMultiple: !0,
|
|
79
79
|
styling: "bar",
|
|
@@ -82,7 +82,7 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
82
82
|
}, null, 8, ["modelValue", "items", "selectAllItem"]))
|
|
83
83
|
]));
|
|
84
84
|
}
|
|
85
|
-
}),
|
|
85
|
+
}), K = -1, p = -2, te = -1, Ge = {
|
|
86
86
|
0: "Yandex",
|
|
87
87
|
1: "Google",
|
|
88
88
|
4: "YouTube",
|
|
@@ -92,96 +92,95 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
92
92
|
9: "GoogleStore",
|
|
93
93
|
20: "Yandex.com",
|
|
94
94
|
21: "Yandex.com.tr"
|
|
95
|
-
},
|
|
96
|
-
key:
|
|
95
|
+
}, ae = {
|
|
96
|
+
key: p,
|
|
97
97
|
name: "--",
|
|
98
|
-
index:
|
|
99
|
-
},
|
|
100
|
-
key:
|
|
98
|
+
index: p
|
|
99
|
+
}, xe = {
|
|
100
|
+
key: p,
|
|
101
101
|
name: "--",
|
|
102
|
-
regions: [
|
|
103
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
104
|
-
}, te = {
|
|
105
|
-
key: x,
|
|
106
|
-
name: "Autoselect",
|
|
107
|
-
index: x
|
|
102
|
+
regions: [ae],
|
|
103
|
+
regionByIndex: /* @__PURE__ */ new Map([[p, ae]])
|
|
108
104
|
}, oe = {
|
|
109
|
-
key:
|
|
105
|
+
key: p,
|
|
106
|
+
name: "Autoselect",
|
|
107
|
+
index: p
|
|
108
|
+
}, ie = {
|
|
109
|
+
key: p,
|
|
110
110
|
name: "Autoselect",
|
|
111
|
-
regions: [
|
|
112
|
-
regionByIndex: /* @__PURE__ */ new Map([[
|
|
113
|
-
},
|
|
111
|
+
regions: [oe],
|
|
112
|
+
regionByIndex: /* @__PURE__ */ new Map([[p, oe]])
|
|
113
|
+
}, fe = {
|
|
114
114
|
countryCode: "00",
|
|
115
115
|
depth: 1,
|
|
116
116
|
device: 0,
|
|
117
|
-
key:
|
|
118
|
-
index:
|
|
117
|
+
key: te,
|
|
118
|
+
index: te,
|
|
119
119
|
lang: "ru",
|
|
120
120
|
name: "Without region"
|
|
121
|
-
},
|
|
121
|
+
}, We = () => (oe.name = R().Common.Autoselect, oe), Ye = () => (We(), ie.name = R().Common.Autoselect, console.log(ie), ie), He = () => (fe.name = R().Keywords.Without_region, fe), ke = (t = !1, o = !1, n = []) => {
|
|
122
122
|
let e;
|
|
123
|
-
return t ? e =
|
|
124
|
-
},
|
|
123
|
+
return t ? e = Qe(n) : e = Ce(n), o && e.set(p, Ye()), e.size || e.set(p, xe), e;
|
|
124
|
+
}, Ce = (t, o = !0, n = [], e = !1) => {
|
|
125
125
|
const i = /* @__PURE__ */ new Map();
|
|
126
126
|
return t.forEach((a) => {
|
|
127
127
|
if (!a.enabled || e && typeof a.key == "number" && a.key > 1) return;
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}), o.forEach((a) => {
|
|
128
|
+
const l = { ...a };
|
|
129
|
+
l.regionByIndex = /* @__PURE__ */ new Map(), a.regions && a.regions.forEach((d) => {
|
|
130
|
+
if (o && !d.enabled) return;
|
|
131
|
+
const f = { ...d };
|
|
132
|
+
l.regionByIndex.set(f.index, f);
|
|
133
|
+
}), !l.regionByIndex.size && !n.length && l.regionByIndex.set(ae.index, ae), typeof l.key == "number" && i.set(l.key, l);
|
|
134
|
+
}), n.forEach((a) => {
|
|
136
135
|
if (i.has(a)) return;
|
|
137
|
-
const
|
|
136
|
+
const l = {
|
|
138
137
|
key: a,
|
|
139
|
-
name:
|
|
138
|
+
name: Ge[a],
|
|
140
139
|
regions: [],
|
|
141
140
|
regionByIndex: /* @__PURE__ */ new Map()
|
|
142
141
|
};
|
|
143
|
-
i.set(
|
|
142
|
+
i.set(l.key, l);
|
|
144
143
|
}), i;
|
|
145
|
-
},
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
|
|
144
|
+
}, Qe = (t) => {
|
|
145
|
+
const o = Ce(t, !1, [0, 1], !0);
|
|
146
|
+
if (o.has(2)) {
|
|
147
|
+
const n = o.get(2);
|
|
148
|
+
n && (n.regionByIndex = /* @__PURE__ */ new Map());
|
|
150
149
|
}
|
|
151
|
-
return
|
|
152
|
-
if (!
|
|
153
|
-
const e = { ...
|
|
154
|
-
|
|
155
|
-
}),
|
|
156
|
-
},
|
|
157
|
-
const e =
|
|
150
|
+
return o.forEach((n) => {
|
|
151
|
+
if (!n.regionByIndex) return;
|
|
152
|
+
const e = { ...He() };
|
|
153
|
+
n.regionByIndex.set(e.index, e);
|
|
154
|
+
}), o;
|
|
155
|
+
}, Xe = (t, o, n = []) => {
|
|
156
|
+
const e = ke(t, !1, n);
|
|
158
157
|
let i;
|
|
159
158
|
return e.forEach((a) => {
|
|
160
|
-
if (!(
|
|
161
|
-
if (!i && !(
|
|
162
|
-
return
|
|
159
|
+
if (!(o.searcher_key !== void 0 && o.searcher_key != a.key) && a.regions && (a.regions.forEach((l) => {
|
|
160
|
+
if (!i && !(o.key !== void 0 && o.key != l.key) && !(o.index !== void 0 && o.index != l.index) && !(!t && (o.lang !== void 0 && o.lang != l.lang || o.device !== void 0 && o.device != l.device)))
|
|
161
|
+
return l.searcher_key = a.key, i = l, !1;
|
|
163
162
|
}), i))
|
|
164
163
|
return !1;
|
|
165
164
|
}), i;
|
|
166
|
-
},
|
|
167
|
-
const
|
|
165
|
+
}, Ze = De(() => import("../.chunks/dialog_selectorRegions-eupaC53Q.es.js")), et = (t, o) => {
|
|
166
|
+
const n = R(), e = F(o.value.keys().next().value ?? p), i = E(() => {
|
|
168
167
|
const a = /* @__PURE__ */ new Map();
|
|
169
|
-
if (
|
|
168
|
+
if (o.value.forEach((l) => {
|
|
170
169
|
let d = {
|
|
171
|
-
value:
|
|
172
|
-
title:
|
|
170
|
+
value: l.key,
|
|
171
|
+
title: l.name
|
|
173
172
|
};
|
|
174
|
-
t.addSearcherIcon && (d.icon =
|
|
175
|
-
}), t.addCompare && !a.has(
|
|
176
|
-
const
|
|
173
|
+
t.addSearcherIcon && (d.icon = Fe(l.key)), a.set(l.key, d);
|
|
174
|
+
}), t.addCompare && !a.has(p)) {
|
|
175
|
+
const l = {
|
|
177
176
|
value: "",
|
|
178
177
|
title: "--------------------",
|
|
179
178
|
disabled: !0
|
|
180
179
|
};
|
|
181
|
-
a.set(
|
|
180
|
+
a.set(l.value, l);
|
|
182
181
|
const d = {
|
|
183
|
-
value:
|
|
184
|
-
title:
|
|
182
|
+
value: K,
|
|
183
|
+
title: n.Common.Compare
|
|
185
184
|
};
|
|
186
185
|
a.set(d.value, d);
|
|
187
186
|
}
|
|
@@ -191,146 +190,146 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
191
190
|
searcherKey: e,
|
|
192
191
|
optionBySearcherKey: i
|
|
193
192
|
};
|
|
194
|
-
},
|
|
195
|
-
var a,
|
|
196
|
-
const
|
|
197
|
-
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value ===
|
|
193
|
+
}, tt = (t, o) => {
|
|
194
|
+
var a, l, d;
|
|
195
|
+
const n = R(), e = F(p);
|
|
196
|
+
t.modelValue.length === 1 && (e.value = t.modelValue[0]), e.value === p && (t.forFrequency ? e.value = ((l = (a = o.value) == null ? void 0 : a.regionByIndex.values().next().value) == null ? void 0 : l.key) ?? p : e.value = ((d = o.value) == null ? void 0 : d.regionByIndex.keys().next().value) ?? p);
|
|
198
197
|
const i = E(() => {
|
|
199
|
-
var
|
|
200
|
-
const
|
|
201
|
-
return (
|
|
202
|
-
let r =
|
|
198
|
+
var h;
|
|
199
|
+
const f = /* @__PURE__ */ new Map();
|
|
200
|
+
return (h = o.value.regionByIndex) == null || h.forEach((S) => {
|
|
201
|
+
let r = S.name;
|
|
203
202
|
if (t.forFrequency) {
|
|
204
|
-
const
|
|
205
|
-
value:
|
|
203
|
+
const x = {
|
|
204
|
+
value: S.key,
|
|
206
205
|
title: r
|
|
207
206
|
};
|
|
208
|
-
|
|
207
|
+
f.has(S.key) || f.set(S.key, x);
|
|
209
208
|
return;
|
|
210
209
|
}
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
|
|
210
|
+
S.device && (r += " (" + n.Common["Device_" + S.device] + ")");
|
|
211
|
+
const g = qe(o.value.key || 0, S.lang ?? "");
|
|
212
|
+
g && (r += " / " + g);
|
|
214
213
|
const u = {
|
|
215
|
-
value:
|
|
214
|
+
value: S.index,
|
|
216
215
|
title: r,
|
|
217
|
-
icon:
|
|
216
|
+
icon: S.device ? Pe(S.device) : void 0
|
|
218
217
|
};
|
|
219
|
-
|
|
220
|
-
}),
|
|
218
|
+
f.set(S.index, u);
|
|
219
|
+
}), f;
|
|
221
220
|
});
|
|
222
|
-
return
|
|
221
|
+
return w(i, (f, h) => {
|
|
223
222
|
var u;
|
|
224
|
-
if (t.onlySearcher || e.value !== void 0 &&
|
|
223
|
+
if (t.onlySearcher || e.value !== void 0 && f.get(e.value))
|
|
225
224
|
return;
|
|
226
|
-
let
|
|
227
|
-
if (e.value ===
|
|
228
|
-
e.value =
|
|
225
|
+
let S = f.keys().next().value;
|
|
226
|
+
if (e.value === p || S === p) {
|
|
227
|
+
e.value = S;
|
|
229
228
|
return;
|
|
230
229
|
}
|
|
231
|
-
let r = ((u =
|
|
232
|
-
for (const [
|
|
230
|
+
let r = ((u = h == null ? void 0 : h.get(e.value)) == null ? void 0 : u.title) || "", g = -1;
|
|
231
|
+
for (const [x, T] of f.entries()) {
|
|
233
232
|
const C = T.title;
|
|
234
|
-
if (typeof C != "string" || typeof
|
|
233
|
+
if (typeof C != "string" || typeof x == "string")
|
|
235
234
|
break;
|
|
236
235
|
if (C === r) {
|
|
237
|
-
|
|
236
|
+
S = x;
|
|
238
237
|
break;
|
|
239
238
|
}
|
|
240
|
-
const V = new RegExp(` \\((${
|
|
241
|
-
let
|
|
242
|
-
C.indexOf(
|
|
239
|
+
const V = new RegExp(` \\((${n.Common.Device_1}|${n.Common.Device_2})\\)`);
|
|
240
|
+
let m = r, s = 3;
|
|
241
|
+
C.indexOf(m) === -1 && (m = r.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), s--), C.indexOf(m) === -1 && (m = r.replace(/ \/.*/, ""), m = m.replace(/^[^a-zа-я]/i, "").replace(V, ""), s--), C.indexOf(m) !== -1 && (s <= g || (g = s, S = x));
|
|
243
242
|
}
|
|
244
|
-
e.value =
|
|
243
|
+
e.value = S;
|
|
245
244
|
}), {
|
|
246
245
|
regionIndex: e,
|
|
247
246
|
optionByRegionIndex: i
|
|
248
247
|
};
|
|
249
|
-
},
|
|
250
|
-
const e =
|
|
251
|
-
if (t.onlySearcher &&
|
|
252
|
-
e.value = Array.from(
|
|
248
|
+
}, at = (t, o, n) => {
|
|
249
|
+
const e = F([]), i = () => {
|
|
250
|
+
if (t.onlySearcher && o.value) {
|
|
251
|
+
e.value = Array.from(o.value.keys());
|
|
253
252
|
return;
|
|
254
253
|
}
|
|
255
|
-
let
|
|
254
|
+
let l = [];
|
|
256
255
|
if (t.modelValue.length > 1)
|
|
257
|
-
|
|
256
|
+
l = [...t.modelValue];
|
|
258
257
|
else
|
|
259
258
|
try {
|
|
260
|
-
|
|
259
|
+
l = JSON.parse(
|
|
261
260
|
localStorage.getItem("ui:project:regionSelector" + t.projectId + ":regionsIndexes")
|
|
262
261
|
) ?? [];
|
|
263
262
|
} catch {
|
|
264
263
|
}
|
|
265
|
-
|
|
264
|
+
l.length && (l = l.filter((d) => n.value.has(d))), l.length || (l = Array.from(n.value)), e.value = [...l];
|
|
266
265
|
}, a = () => {
|
|
267
266
|
e.value.length ? localStorage.setItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes", JSON.stringify(e.value)) : localStorage.removeItem("ui:project:regionSelector:" + t.projectId + ":regionsIndexes");
|
|
268
267
|
};
|
|
269
|
-
return
|
|
268
|
+
return w(e, () => {
|
|
270
269
|
a();
|
|
271
270
|
}), t.addCompare && i(), {
|
|
272
271
|
regionsIndexes: e
|
|
273
272
|
};
|
|
274
|
-
},
|
|
275
|
-
const
|
|
273
|
+
}, ot = (t) => {
|
|
274
|
+
const o = E(() => ke(t.forFrequency, t.autoRegion, t.searchers)), n = E(() => o.value.get(i.searcherKey.value) || xe), e = E(() => {
|
|
276
275
|
const r = /* @__PURE__ */ new Set();
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
u.index !==
|
|
276
|
+
return o.value.forEach((g) => {
|
|
277
|
+
g.regionByIndex.forEach((u) => {
|
|
278
|
+
u.index !== te && u.index !== p && r.add(u.index);
|
|
280
279
|
});
|
|
281
280
|
}), r;
|
|
282
|
-
}), i =
|
|
283
|
-
|
|
284
|
-
var
|
|
285
|
-
if (t.onlySearcher ?
|
|
286
|
-
let r =
|
|
287
|
-
|
|
288
|
-
var V,
|
|
281
|
+
}), i = et(t, o), a = tt(t, n), l = at(t, o, e);
|
|
282
|
+
w(o, () => {
|
|
283
|
+
var g, u, x, T;
|
|
284
|
+
if (t.onlySearcher ? l.regionsIndexes.value = Array.from(o.value.keys()) : l.regionsIndexes.value = l.regionsIndexes.value.filter((C) => e.value.has(C)), i.searcherKey.value === K) return;
|
|
285
|
+
let r = o.value.keys().next().value;
|
|
286
|
+
o.value.forEach((C) => {
|
|
287
|
+
var V, m, s;
|
|
289
288
|
if (t.onlySearcher && C.key === i.searcherKey.value) {
|
|
290
289
|
r = i.searcherKey.value;
|
|
291
290
|
return;
|
|
292
291
|
}
|
|
293
292
|
if (a.regionIndex.value && ((V = C.regionByIndex) != null && V.has(a.regionIndex.value)) && (r = C.key), !t.onlySearcher) {
|
|
294
293
|
let c;
|
|
295
|
-
r !== void 0 && (c = (
|
|
296
|
-
const v = (s =
|
|
297
|
-
c != null && c.has(
|
|
294
|
+
r !== void 0 && (c = (m = o.value.get(r)) == null ? void 0 : m.regionByIndex);
|
|
295
|
+
const v = (s = o.value.get(C.key)) == null ? void 0 : s.regionByIndex;
|
|
296
|
+
c != null && c.has(p) && !(v != null && v.has(p)) && (r = C.key);
|
|
298
297
|
}
|
|
299
|
-
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((u = (
|
|
298
|
+
}), r !== void 0 && (i.searcherKey.value = r), a.regionIndex.value !== void 0 && !((u = (g = n.value) == null ? void 0 : g.regionByIndex) != null && u.has(a.regionIndex.value)) && (a.regionIndex.value = (T = (x = n.value) == null ? void 0 : x.regions) == null ? void 0 : T.keys().next().value);
|
|
300
299
|
}, { immediate: !0 });
|
|
301
300
|
const d = () => {
|
|
302
|
-
if (!(i.searcherKey.value ===
|
|
301
|
+
if (!(i.searcherKey.value === K || i.searcherKey.value === p))
|
|
303
302
|
return i.searcherKey.value;
|
|
304
|
-
},
|
|
305
|
-
if (t.onlySearcher || a.regionIndex.value ===
|
|
303
|
+
}, f = () => {
|
|
304
|
+
if (t.onlySearcher || a.regionIndex.value === p) return;
|
|
306
305
|
let r = a.regionIndex.value;
|
|
307
306
|
if (t.forFrequency) {
|
|
308
|
-
const
|
|
307
|
+
const g = a.regionIndex.value, u = Xe(t.forFrequency, { searcher_key: d(), key: g }, t.searchers);
|
|
309
308
|
r = u == null ? void 0 : u.index;
|
|
310
309
|
}
|
|
311
310
|
return r;
|
|
312
|
-
},
|
|
311
|
+
}, h = () => {
|
|
313
312
|
const r = d();
|
|
314
313
|
if (r !== void 0)
|
|
315
|
-
return
|
|
314
|
+
return o.value.get(r);
|
|
316
315
|
};
|
|
317
316
|
return {
|
|
318
317
|
selectSearcher: i,
|
|
319
318
|
selectRegion: a,
|
|
320
|
-
compare:
|
|
321
|
-
searcherByKey:
|
|
319
|
+
compare: l,
|
|
320
|
+
searcherByKey: o,
|
|
322
321
|
allRegionsIndexes: e,
|
|
323
|
-
getSearcher:
|
|
322
|
+
getSearcher: h,
|
|
324
323
|
getRegion: () => {
|
|
325
|
-
var
|
|
326
|
-
const r =
|
|
324
|
+
var g, u;
|
|
325
|
+
const r = f();
|
|
327
326
|
if (r !== void 0)
|
|
328
|
-
return (u = (
|
|
327
|
+
return (u = (g = h()) == null ? void 0 : g.regionByIndex) == null ? void 0 : u.get(r);
|
|
329
328
|
}
|
|
330
329
|
};
|
|
331
|
-
},
|
|
330
|
+
}, lt = /* @__PURE__ */ P({
|
|
332
331
|
__name: "selectorRegion",
|
|
333
|
-
props: /* @__PURE__ */
|
|
332
|
+
props: /* @__PURE__ */ N({
|
|
334
333
|
projectId: {},
|
|
335
334
|
searchers: { default: () => [] },
|
|
336
335
|
modelValue: {},
|
|
@@ -349,43 +348,43 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
349
348
|
modelValueSingleModifiers: {}
|
|
350
349
|
}),
|
|
351
350
|
emits: ["update:modelValue", "update:modelValueSingle"],
|
|
352
|
-
setup(t, { expose:
|
|
353
|
-
const
|
|
351
|
+
setup(t, { expose: o }) {
|
|
352
|
+
const n = t, e = D(t, "modelValue"), i = D(t, "modelValueSingle"), {
|
|
354
353
|
selectSearcher: a,
|
|
355
|
-
selectRegion:
|
|
354
|
+
selectRegion: l,
|
|
356
355
|
compare: d,
|
|
357
|
-
searcherByKey:
|
|
358
|
-
allRegionsIndexes:
|
|
359
|
-
getSearcher:
|
|
356
|
+
searcherByKey: f,
|
|
357
|
+
allRegionsIndexes: h,
|
|
358
|
+
getSearcher: S,
|
|
360
359
|
getRegion: r
|
|
361
|
-
} =
|
|
360
|
+
} = ot(n), g = () => {
|
|
362
361
|
const u = [];
|
|
363
|
-
|
|
364
|
-
|
|
362
|
+
f.value.forEach((x) => {
|
|
363
|
+
x.enabled && x.regions.forEach((T) => {
|
|
365
364
|
T.enabled && u.push(T);
|
|
366
365
|
});
|
|
367
|
-
}),
|
|
366
|
+
}), Ze.open("selectorRegions", {
|
|
368
367
|
regions: u,
|
|
369
368
|
regionsIndexes: d.regionsIndexes.value,
|
|
370
|
-
"@update:regionsIndexes": (
|
|
369
|
+
"@update:regionsIndexes": (x) => d.regionsIndexes.value = x
|
|
371
370
|
});
|
|
372
371
|
};
|
|
373
|
-
return
|
|
374
|
-
if (a.searcherKey.value ===
|
|
372
|
+
return w([l.regionIndex, a.searcherKey, d.regionsIndexes], () => {
|
|
373
|
+
if (a.searcherKey.value === K && d.regionsIndexes.value.length) {
|
|
375
374
|
if (JSON.stringify(e.value) === JSON.stringify(d.regionsIndexes.value))
|
|
376
375
|
return;
|
|
377
376
|
e.value = [...d.regionsIndexes.value];
|
|
378
377
|
} else
|
|
379
|
-
e.value = [
|
|
380
|
-
!
|
|
381
|
-
}), i.value &&
|
|
382
|
-
e.value = [i.value];
|
|
383
|
-
}, { immediate: !0 }),
|
|
384
|
-
var u,
|
|
385
|
-
if (e.value[0] && (i.value = e.value[0]),
|
|
386
|
-
if (!e.value.length || e.value.length === 1 && !
|
|
387
|
-
let
|
|
388
|
-
|
|
378
|
+
n.onlySearcher ? (e.value = [a.searcherKey.value], a.searcherKey.value === p && !n.autoRegion && (e.value = [])) : (e.value = [l.regionIndex.value], l.regionIndex.value === p && !n.autoRegion && (e.value = []));
|
|
379
|
+
!n.onlySearcher && !h.value.size && (a.searcherKey.value = p);
|
|
380
|
+
}), i.value && w(i, () => {
|
|
381
|
+
i.value && (e.value = [i.value]);
|
|
382
|
+
}, { immediate: !0 }), w(e, () => {
|
|
383
|
+
var u, x, T, C, V;
|
|
384
|
+
if (e.value[0] && (i.value = e.value[0]), n.onlySearcher) {
|
|
385
|
+
if (!e.value.length || e.value.length === 1 && !f.value.has(e.value[0])) {
|
|
386
|
+
let m = f.value.keys().next().value;
|
|
387
|
+
m === p && !n.autoRegion && (m = void 0, i.value = p), m !== void 0 && (e.value = [m]);
|
|
389
388
|
return;
|
|
390
389
|
}
|
|
391
390
|
if (e.value.length > 1 && JSON.stringify(e.value) !== JSON.stringify(d.regionsIndexes.value)) {
|
|
@@ -393,86 +392,86 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
393
392
|
return;
|
|
394
393
|
}
|
|
395
394
|
} else {
|
|
396
|
-
let
|
|
397
|
-
if (
|
|
398
|
-
s !== void 0 &&
|
|
399
|
-
else if (
|
|
400
|
-
let c =
|
|
401
|
-
|
|
402
|
-
v.regionByIndex.forEach((
|
|
403
|
-
|
|
395
|
+
let m = [...new Set(e.value)], s = (x = (u = f.value.values().next().value) == null ? void 0 : u.regionByIndex) == null ? void 0 : x.keys().next().value;
|
|
396
|
+
if (n.forFrequency && (s = (V = (C = (T = f.value.values().next().value) == null ? void 0 : T.regionByIndex) == null ? void 0 : C.values().next().value) == null ? void 0 : V.key), s === p && !n.autoRegion && (s = void 0, i.value = p), !m.length)
|
|
397
|
+
s !== void 0 && m.push(s);
|
|
398
|
+
else if (m.length === 1) {
|
|
399
|
+
let c = h.value;
|
|
400
|
+
n.forFrequency && (c = /* @__PURE__ */ new Set(), f.value.forEach((v) => {
|
|
401
|
+
v.regionByIndex.forEach((I) => {
|
|
402
|
+
I.index !== te && I.index !== p && c.add(I.key);
|
|
404
403
|
});
|
|
405
|
-
})), !c.has(
|
|
404
|
+
})), !c.has(m[0]) && m[0] !== p && (m = [], s !== void 0 && m.push(s));
|
|
406
405
|
} else
|
|
407
|
-
|
|
408
|
-
if (JSON.stringify(e.value) !== JSON.stringify(
|
|
409
|
-
e.value =
|
|
406
|
+
m = m.filter((c) => h.value.has(c)), !m.length && s !== void 0 && m.push(s);
|
|
407
|
+
if (JSON.stringify(e.value) !== JSON.stringify(m)) {
|
|
408
|
+
e.value = m;
|
|
410
409
|
return;
|
|
411
410
|
}
|
|
412
411
|
}
|
|
413
|
-
if (!(e.value.length === 1 && e.value[0] === (
|
|
414
|
-
if (
|
|
412
|
+
if (!(e.value.length === 1 && e.value[0] === (n.onlySearcher ? a.searcherKey.value : l.regionIndex.value)))
|
|
413
|
+
if (n.onlySearcher) {
|
|
415
414
|
if (e.value.length === 1) {
|
|
416
415
|
a.searcherKey.value = e.value[0];
|
|
417
416
|
return;
|
|
418
417
|
}
|
|
419
|
-
a.searcherKey.value =
|
|
418
|
+
a.searcherKey.value = K;
|
|
420
419
|
return;
|
|
421
|
-
} else if (e.value.length === 1 && a.searcherKey.value !==
|
|
422
|
-
|
|
423
|
-
let
|
|
424
|
-
for (const s of
|
|
420
|
+
} else if (e.value.length === 1 && a.searcherKey.value !== K) {
|
|
421
|
+
l.regionIndex.value = e.value[0];
|
|
422
|
+
let m;
|
|
423
|
+
for (const s of f.value.values()) {
|
|
425
424
|
for (const c of s.regionByIndex.values())
|
|
426
|
-
if ((
|
|
427
|
-
|
|
425
|
+
if ((n.forFrequency ? c.key : c.index) === l.regionIndex.value) {
|
|
426
|
+
m = s.key;
|
|
428
427
|
break;
|
|
429
428
|
}
|
|
430
|
-
if (
|
|
429
|
+
if (m !== void 0)
|
|
431
430
|
break;
|
|
432
431
|
}
|
|
433
|
-
|
|
432
|
+
m !== void 0 && (a.searcherKey.value = m);
|
|
434
433
|
} else
|
|
435
|
-
a.searcherKey.value =
|
|
436
|
-
}, { immediate: !0 }),
|
|
437
|
-
getSearcher:
|
|
434
|
+
a.searcherKey.value = K, d.regionsIndexes.value = [...e.value];
|
|
435
|
+
}, { immediate: !0 }), o({
|
|
436
|
+
getSearcher: S,
|
|
438
437
|
getRegion: r
|
|
439
|
-
}), (u,
|
|
440
|
-
class:
|
|
438
|
+
}), (u, x) => (k(), B("div", {
|
|
439
|
+
class: X({
|
|
441
440
|
"top-selectorRegion": !0,
|
|
442
441
|
"top-selectorRegion-onlySearcher": u.onlySearcher
|
|
443
442
|
})
|
|
444
443
|
}, [
|
|
445
|
-
|
|
444
|
+
A(se, {
|
|
446
445
|
options: y(a).optionBySearcherKey.value,
|
|
447
446
|
modelValue: y(a).searcherKey.value,
|
|
448
|
-
"onUpdate:modelValue":
|
|
447
|
+
"onUpdate:modelValue": x[0] || (x[0] = (T) => y(a).searcherKey.value = T),
|
|
449
448
|
name: "searcher_key",
|
|
450
449
|
addChanger: u.addChanger
|
|
451
450
|
}, null, 8, ["options", "modelValue", "addChanger"]),
|
|
452
|
-
!u.onlySearcher && y(a).searcherKey.value !==
|
|
451
|
+
!u.onlySearcher && y(a).searcherKey.value !== y(K) ? (k(), b(se, {
|
|
453
452
|
key: 0,
|
|
454
453
|
class: "top-select-region",
|
|
455
|
-
options: y(
|
|
456
|
-
modelValue: y(
|
|
457
|
-
"onUpdate:modelValue":
|
|
454
|
+
options: y(l).optionByRegionIndex.value,
|
|
455
|
+
modelValue: y(l).regionIndex.value,
|
|
456
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => y(l).regionIndex.value = T),
|
|
458
457
|
name: u.forFrequency ? "region_key" : "region_index",
|
|
459
458
|
addChanger: u.addChanger,
|
|
460
459
|
"data-top-icon": u.addRegionIcon ? "" : void 0
|
|
461
|
-
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) :
|
|
462
|
-
u.addCompare && !u.onlySearcher && y(a).searcherKey.value ===
|
|
460
|
+
}, null, 8, ["options", "modelValue", "name", "addChanger", "data-top-icon"])) : q("", !0),
|
|
461
|
+
u.addCompare && !u.onlySearcher && y(a).searcherKey.value === y(K) ? (k(), b(H, {
|
|
463
462
|
key: 1,
|
|
464
463
|
name: "compare",
|
|
465
|
-
onClick:
|
|
464
|
+
onClick: g,
|
|
466
465
|
"data-count-compare-regions-indexes": y(d).regionsIndexes.value.length
|
|
467
466
|
}, {
|
|
468
467
|
default: _(() => [
|
|
469
|
-
|
|
468
|
+
G(M(u.$i18n.Common.Selected_regions), 1)
|
|
470
469
|
]),
|
|
471
470
|
_: 1
|
|
472
|
-
}, 8, ["data-count-compare-regions-indexes"])) :
|
|
471
|
+
}, 8, ["data-count-compare-regions-indexes"])) : q("", !0)
|
|
473
472
|
], 2));
|
|
474
473
|
}
|
|
475
|
-
}),
|
|
474
|
+
}), nt = [
|
|
476
475
|
{
|
|
477
476
|
id: "1",
|
|
478
477
|
name: "Without Tag",
|
|
@@ -523,12 +522,12 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
523
522
|
name: "Turquoise",
|
|
524
523
|
color_id: "10"
|
|
525
524
|
}
|
|
526
|
-
],
|
|
527
|
-
t =
|
|
528
|
-
const
|
|
529
|
-
if (
|
|
530
|
-
return
|
|
531
|
-
},
|
|
525
|
+
], ve = (t) => "-" + t, Q = (t) => t[0] === "-" ? t.substring(1) : t, le = (t, o) => {
|
|
526
|
+
t = Q(t);
|
|
527
|
+
const n = o.find((e) => e.id === t);
|
|
528
|
+
if (n)
|
|
529
|
+
return n;
|
|
530
|
+
}, rt = ["data-tag_id", "data-tag_color_id", "title"], ne = /* @__PURE__ */ P({
|
|
532
531
|
__name: "tagIcon",
|
|
533
532
|
props: {
|
|
534
533
|
id: {},
|
|
@@ -537,20 +536,20 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
537
536
|
state: {}
|
|
538
537
|
},
|
|
539
538
|
setup(t) {
|
|
540
|
-
return (
|
|
541
|
-
class:
|
|
539
|
+
return (o, n) => (k(), B("div", {
|
|
540
|
+
class: X({
|
|
542
541
|
"top-tagSelector_tagIcon": !0,
|
|
543
|
-
"top-tagSelector-active": !!
|
|
544
|
-
"top-tagSelector-excluded":
|
|
542
|
+
"top-tagSelector-active": !!o.state,
|
|
543
|
+
"top-tagSelector-excluded": o.state === "excluded"
|
|
545
544
|
}),
|
|
546
|
-
"data-tag_id":
|
|
547
|
-
"data-tag_color_id":
|
|
548
|
-
title:
|
|
549
|
-
}, null, 10,
|
|
545
|
+
"data-tag_id": o.id,
|
|
546
|
+
"data-tag_color_id": o.colorId,
|
|
547
|
+
title: o.name
|
|
548
|
+
}, null, 10, rt));
|
|
550
549
|
}
|
|
551
|
-
}),
|
|
550
|
+
}), it = ["contenteditable", "onKeydown"], ye = /* @__PURE__ */ P({
|
|
552
551
|
__name: "tagPopupListItem",
|
|
553
|
-
props: /* @__PURE__ */
|
|
552
|
+
props: /* @__PURE__ */ N({
|
|
554
553
|
editable: { type: Boolean },
|
|
555
554
|
disabled: { type: Boolean },
|
|
556
555
|
canExclude: { type: Boolean },
|
|
@@ -564,76 +563,76 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
564
563
|
},
|
|
565
564
|
nameModifiers: {}
|
|
566
565
|
}),
|
|
567
|
-
emits: /* @__PURE__ */
|
|
568
|
-
setup(t, { emit:
|
|
569
|
-
const
|
|
566
|
+
emits: /* @__PURE__ */ N(["update:name", "unselect", "exclude", "select"], ["update:name"]),
|
|
567
|
+
setup(t, { emit: o }) {
|
|
568
|
+
const n = t, e = o, i = D(t, "name"), a = F(null), l = E(() => navigator.userAgent.indexOf("Firefox") != -1 ? {
|
|
570
569
|
contenteditable: d.value,
|
|
571
|
-
onpaste: (
|
|
572
|
-
} : {}), d =
|
|
573
|
-
var
|
|
574
|
-
d.value = !0, await
|
|
575
|
-
},
|
|
570
|
+
onpaste: (g) => g.preventDefault()
|
|
571
|
+
} : {}), d = F(!1), f = async () => {
|
|
572
|
+
var g;
|
|
573
|
+
d.value = !0, await Ve(), (g = a.value) == null || g.focus();
|
|
574
|
+
}, h = () => {
|
|
576
575
|
var u;
|
|
577
|
-
const
|
|
578
|
-
if (!
|
|
579
|
-
a.value && (a.value.innerText =
|
|
580
|
-
},
|
|
581
|
-
a.value && (a.value.innerText =
|
|
582
|
-
}, r = (
|
|
583
|
-
if (d.value ||
|
|
576
|
+
const g = (u = a.value) == null ? void 0 : u.innerText;
|
|
577
|
+
if (!g) return S();
|
|
578
|
+
a.value && (a.value.innerText = g), d.value = !1, e("update:name", g);
|
|
579
|
+
}, S = async () => {
|
|
580
|
+
a.value && (a.value.innerText = n.name), d.value = !1;
|
|
581
|
+
}, r = (g) => {
|
|
582
|
+
if (d.value || n.disabled) return;
|
|
584
583
|
let u = "selected";
|
|
585
|
-
|
|
584
|
+
n.canExclude && (g.ctrlKey || g.metaKey) && (u = "excluded"), n.state == u && (u = ""), u === "" && e("unselect"), u === "selected" && e("select"), u === "excluded" && e("exclude");
|
|
586
585
|
};
|
|
587
|
-
return (
|
|
588
|
-
class:
|
|
586
|
+
return (g, u) => (k(), b(ue, {
|
|
587
|
+
class: X({
|
|
589
588
|
"top-tagSelector_tagListItem": !0,
|
|
590
589
|
"top-tagSelector_tagListItem-inEdit": d.value,
|
|
591
|
-
"top-tagSelector_tagListItem-disabled":
|
|
592
|
-
"top-tagSelector_tagListItem-canExclude":
|
|
593
|
-
"top-tagSelector-active": !!
|
|
594
|
-
"top-tagSelector-excluded":
|
|
590
|
+
"top-tagSelector_tagListItem-disabled": g.disabled,
|
|
591
|
+
"top-tagSelector_tagListItem-canExclude": g.canExclude,
|
|
592
|
+
"top-tagSelector-active": !!g.state,
|
|
593
|
+
"top-tagSelector-excluded": g.state === "excluded"
|
|
595
594
|
}),
|
|
596
|
-
onClick:
|
|
595
|
+
onClick: J(r, ["stop"])
|
|
597
596
|
}, {
|
|
598
597
|
default: _(() => [
|
|
599
|
-
|
|
600
|
-
id:
|
|
598
|
+
A(ne, {
|
|
599
|
+
id: g.id,
|
|
601
600
|
name: i.value,
|
|
602
|
-
colorId:
|
|
603
|
-
state:
|
|
601
|
+
colorId: g.colorId,
|
|
602
|
+
state: g.state
|
|
604
603
|
}, null, 8, ["id", "name", "colorId", "state"]),
|
|
605
|
-
|
|
604
|
+
he("span", Se({
|
|
606
605
|
ref_key: "elName",
|
|
607
606
|
ref: a,
|
|
608
607
|
class: "top-tagSelector_tagListItemName",
|
|
609
608
|
contenteditable: d.value ? "plaintext-only" : !1
|
|
610
|
-
},
|
|
609
|
+
}, l.value, {
|
|
611
610
|
onKeydown: [
|
|
612
|
-
|
|
613
|
-
|
|
611
|
+
ce(J(h, ["stop"]), ["enter"]),
|
|
612
|
+
ce(J(S, ["stop"]), ["esc"])
|
|
614
613
|
]
|
|
615
|
-
}), M(i.value), 17,
|
|
616
|
-
|
|
614
|
+
}), M(i.value), 17, it),
|
|
615
|
+
g.editable ? (k(), B(Y, { key: 0 }, [
|
|
617
616
|
d.value ? (k(), B("span", {
|
|
618
617
|
key: 1,
|
|
619
618
|
"data-top-icon": "",
|
|
620
619
|
class: "top-tagSelector_edit",
|
|
621
|
-
onClick:
|
|
620
|
+
onClick: J(h, ["stop"])
|
|
622
621
|
})) : (k(), B("span", {
|
|
623
622
|
key: 0,
|
|
624
623
|
"data-top-icon": "",
|
|
625
624
|
class: "top-tagSelector_edit",
|
|
626
|
-
onClick:
|
|
625
|
+
onClick: f
|
|
627
626
|
}))
|
|
628
|
-
], 64)) :
|
|
627
|
+
], 64)) : q("", !0)
|
|
629
628
|
]),
|
|
630
629
|
_: 1
|
|
631
630
|
}, 8, ["class"]));
|
|
632
631
|
}
|
|
633
|
-
}),
|
|
632
|
+
}), st = { key: 1 }, Te = /* @__PURE__ */ P({
|
|
634
633
|
inheritAttrs: !1,
|
|
635
634
|
__name: "popupOpener",
|
|
636
|
-
props: /* @__PURE__ */
|
|
635
|
+
props: /* @__PURE__ */ N({
|
|
637
636
|
modelValue: {},
|
|
638
637
|
id: {},
|
|
639
638
|
tags: {},
|
|
@@ -650,61 +649,61 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
650
649
|
}),
|
|
651
650
|
emits: ["update:modelValue"],
|
|
652
651
|
setup(t) {
|
|
653
|
-
const
|
|
654
|
-
model:
|
|
655
|
-
mode:
|
|
656
|
-
targetId:
|
|
657
|
-
filters:
|
|
658
|
-
payload:
|
|
652
|
+
const o = t, n = D(t, "modelValue"), e = o.useTopButton ? H : "div", i = o.useTopButton ? "html" : "default", a = {
|
|
653
|
+
model: n,
|
|
654
|
+
mode: o.mode,
|
|
655
|
+
targetId: o.targetId,
|
|
656
|
+
filters: o.filters,
|
|
657
|
+
payload: o.payload
|
|
659
658
|
};
|
|
660
|
-
return (
|
|
661
|
-
const
|
|
662
|
-
return k(), b(
|
|
659
|
+
return (l, d) => {
|
|
660
|
+
const f = Ee("top-data");
|
|
661
|
+
return k(), b(Oe, { id: l.id }, {
|
|
663
662
|
default: _(() => [
|
|
664
|
-
|
|
663
|
+
Ke((k(), b(Me(y(e)), Se({
|
|
665
664
|
class: {
|
|
666
665
|
"top-tagSelector": !0,
|
|
667
|
-
"top-tagSelector-filter":
|
|
668
|
-
"top-tagSelector-setter_single":
|
|
669
|
-
"top-tagSelector-setter_several":
|
|
670
|
-
"top-tagSelector-selectedOne": !
|
|
671
|
-
"top-tagSelector-toTwoLine":
|
|
666
|
+
"top-tagSelector-filter": o.mode === "filter",
|
|
667
|
+
"top-tagSelector-setter_single": o.mode === "setter" && !l.filters,
|
|
668
|
+
"top-tagSelector-setter_several": o.mode === "setter" && l.filters,
|
|
669
|
+
"top-tagSelector-selectedOne": !n.value.length || n.value.length === 1,
|
|
670
|
+
"top-tagSelector-toTwoLine": n.value.length > 5
|
|
672
671
|
},
|
|
673
672
|
color: "theme",
|
|
674
673
|
styling: ""
|
|
675
|
-
},
|
|
674
|
+
}, l.$attrs), {
|
|
676
675
|
[y(i)]: _(() => [
|
|
677
|
-
!
|
|
676
|
+
!n.value.length && l.mode === "filter" ? (k(), b(ne, {
|
|
678
677
|
key: 0,
|
|
679
678
|
id: "all",
|
|
680
679
|
colorId: "",
|
|
681
|
-
name:
|
|
680
|
+
name: l.$i18n.Common.All_tags ?? "",
|
|
682
681
|
state: ""
|
|
683
|
-
}, null, 8, ["name"])) :
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
])) : (k(!0), B(
|
|
687
|
-
var
|
|
688
|
-
return k(), b(
|
|
689
|
-
id: y(
|
|
690
|
-
colorId: ((
|
|
691
|
-
name: ((r = y(
|
|
692
|
-
state: y(
|
|
682
|
+
}, null, 8, ["name"])) : q("", !0),
|
|
683
|
+
l.mode === "setter" && l.filters ? (k(), B("div", st, [
|
|
684
|
+
$e(l.$slots, "default")
|
|
685
|
+
])) : (k(!0), B(Y, { key: 2 }, de(n.value, (h) => {
|
|
686
|
+
var S, r;
|
|
687
|
+
return k(), b(ne, {
|
|
688
|
+
id: y(Q)(h),
|
|
689
|
+
colorId: ((S = y(le)(h, l.tags)) == null ? void 0 : S.color_id) ?? "",
|
|
690
|
+
name: ((r = y(le)(h, l.tags)) == null ? void 0 : r.name) ?? "",
|
|
691
|
+
state: y(Q)(h) === h ? "selected" : "excluded"
|
|
693
692
|
}, null, 8, ["id", "colorId", "name", "state"]);
|
|
694
693
|
}), 256))
|
|
695
694
|
]),
|
|
696
695
|
_: 2
|
|
697
696
|
}, 1040, ["class"])), [
|
|
698
|
-
[
|
|
697
|
+
[f, a, "topTagSelectorTarget"]
|
|
699
698
|
])
|
|
700
699
|
]),
|
|
701
700
|
_: 3
|
|
702
701
|
}, 8, ["id"]);
|
|
703
702
|
};
|
|
704
703
|
}
|
|
705
|
-
}),
|
|
704
|
+
}), dt = /* @__PURE__ */ P({
|
|
706
705
|
__name: "tagSelector",
|
|
707
|
-
props: /* @__PURE__ */
|
|
706
|
+
props: /* @__PURE__ */ N({
|
|
708
707
|
modelValue: {},
|
|
709
708
|
tags: {},
|
|
710
709
|
tagsEditable: { type: Boolean },
|
|
@@ -720,49 +719,49 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
720
719
|
},
|
|
721
720
|
modelModifiers: {},
|
|
722
721
|
tags: {
|
|
723
|
-
default:
|
|
722
|
+
default: Ae(nt)
|
|
724
723
|
},
|
|
725
724
|
tagsModifiers: {}
|
|
726
725
|
}),
|
|
727
|
-
emits: /* @__PURE__ */
|
|
728
|
-
setup(t, { emit:
|
|
729
|
-
const
|
|
730
|
-
|
|
726
|
+
emits: /* @__PURE__ */ N(["selector", "setter", "tagsChanged"], ["update:modelValue", "update:tags"]),
|
|
727
|
+
setup(t, { emit: o }) {
|
|
728
|
+
const n = R(), e = t, i = D(t, "modelValue"), a = D(t, "tags"), l = o, d = Re((s, c) => {
|
|
729
|
+
l(s, c);
|
|
731
730
|
}, e.emitDelay);
|
|
732
731
|
e.singleMode && !i.value.length && (i.value = [a.value[0].id]);
|
|
733
|
-
const
|
|
732
|
+
const f = e.id ?? "top-popup-id-" + Math.random(), h = F("add"), S = () => {
|
|
734
733
|
var v;
|
|
735
|
-
const s = " " + ((v =
|
|
736
|
-
return c.set("add", { value: "add", title:
|
|
734
|
+
const s = " " + ((v = n.Common.Tags) == null ? void 0 : v.toLowerCase()), c = /* @__PURE__ */ new Map();
|
|
735
|
+
return c.set("add", { value: "add", title: n.Common.Add + s }), c.set("replace", { value: "replace", title: n.Common.Replace + s }), c.set("delete", { value: "delete", title: n.Common.Delete + s }), c;
|
|
737
736
|
};
|
|
738
|
-
let r =
|
|
737
|
+
let r = we({
|
|
739
738
|
model: i,
|
|
740
739
|
mode: "filter",
|
|
741
740
|
targetId: void 0,
|
|
742
741
|
filters: void 0,
|
|
743
742
|
payload: void 0
|
|
744
743
|
});
|
|
745
|
-
|
|
744
|
+
w(i, () => {
|
|
746
745
|
d("selector", i.value);
|
|
747
746
|
});
|
|
748
|
-
const
|
|
747
|
+
const g = E(() => {
|
|
749
748
|
if (r.value.mode === "setter" && e.maxTagsForSetter && !r.value.filters)
|
|
750
749
|
return r.value.model.value.length >= e.maxTagsForSetter;
|
|
751
750
|
}), u = (s) => {
|
|
752
751
|
if (s !== "all") {
|
|
753
752
|
if (r.value.model.value.includes(s)) return "selected";
|
|
754
|
-
if (r.value.model.value.includes(
|
|
753
|
+
if (r.value.model.value.includes(ve(s))) return "excluded";
|
|
755
754
|
}
|
|
756
755
|
return s === "all" && !r.value.model.value.length ? "selected" : "";
|
|
757
|
-
},
|
|
758
|
-
const v =
|
|
759
|
-
let
|
|
760
|
-
c === "select" &&
|
|
756
|
+
}, x = (s, c) => {
|
|
757
|
+
const v = ve(s);
|
|
758
|
+
let I = r.value.model.value.filter((L) => L !== s && L !== v);
|
|
759
|
+
c === "select" && I.push(s), c === "exclude" && I.push(v), r.value.mode === "setter" && r.value.targetId !== void 0 && e.requiredForSetter && (I.length || I.push("1"), I.length === 2 && r.value.model.value.length === 1 && r.value.model.value[0] === "1" && (I = I.filter((L) => L !== "1"))), e.singleMode && !r.value.filters && (I.length || (I = r.value.model.value), I.length > 1 && (I = [I[I.length - 1]])), I.sort((L, U) => {
|
|
761
760
|
if (!e.tags) return 0;
|
|
762
|
-
const
|
|
763
|
-
return
|
|
764
|
-
}), r.value.model.value =
|
|
765
|
-
tagsIds:
|
|
761
|
+
const Z = e.tags.findIndex((O) => O.id === L), j = e.tags.findIndex((O) => O.id === U);
|
|
762
|
+
return Z - j;
|
|
763
|
+
}), r.value.model.value = I, r.value.mode === "setter" && r.value.targetId !== void 0 && d("setter", {
|
|
764
|
+
tagsIds: I,
|
|
766
765
|
targetId: r.value.targetId,
|
|
767
766
|
payload: r.value.payload
|
|
768
767
|
});
|
|
@@ -777,65 +776,65 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
777
776
|
id: String(c),
|
|
778
777
|
name: s,
|
|
779
778
|
color_id: String((c - 1) % 10 + 1)
|
|
780
|
-
}),
|
|
779
|
+
}), l("tagsChanged", a.value);
|
|
781
780
|
}, V = (s) => {
|
|
782
781
|
var c;
|
|
783
|
-
if (r.value =
|
|
784
|
-
if (r.value.filters && (
|
|
782
|
+
if (r.value = W(s.elPopupOpener, "topTagSelectorTarget"), !r.value) throw new Error("Open popup TopTagSelector required v-data:topTagSelectorTarget");
|
|
783
|
+
if (r.value.filters && (h.value = "add", r.value.model.value = []), !((c = z.$) != null && c.ui.sortable)) {
|
|
785
784
|
console.info("Для работы сортировки требуется глобальная загрузка jQuery UI Sortable");
|
|
786
785
|
return;
|
|
787
786
|
}
|
|
788
|
-
!
|
|
787
|
+
!z.state.isMobile && !z.state.isMobileUA && a.value && $(s.elPopup).sortable({
|
|
789
788
|
items: 'li:has([data-tag_id]:not([data-tag_id="all"]))',
|
|
790
789
|
/**
|
|
791
790
|
* @todo Удалить `[contenteditable="true"]` через пол года после выхода версии firefox с поддержкой contenteditable plaintext-only, включая бета версии
|
|
792
791
|
*/
|
|
793
792
|
cancel: '[contenteditable="plaintext-only"], [contenteditable="true"]',
|
|
794
793
|
distance: 10,
|
|
795
|
-
stop: function(v,
|
|
794
|
+
stop: function(v, I) {
|
|
796
795
|
if (!a.value) return;
|
|
797
|
-
const
|
|
798
|
-
|
|
796
|
+
const L = $(I.item).parent().find("[data-tag_id]"), U = [];
|
|
797
|
+
L.each((Z, j) => {
|
|
799
798
|
if (!a.value) return;
|
|
800
|
-
const O = $(
|
|
801
|
-
|
|
802
|
-
}), a.value.sort((
|
|
803
|
-
const O =
|
|
804
|
-
return O -
|
|
799
|
+
const O = $(j).attr("data-tag_id");
|
|
800
|
+
U.push(O);
|
|
801
|
+
}), a.value.sort((Z, j) => {
|
|
802
|
+
const O = U.findIndex((re) => re === Z.id), _e = U.findIndex((re) => re === j.id);
|
|
803
|
+
return O - _e;
|
|
805
804
|
}), d("tagsChanged", a.value);
|
|
806
805
|
}
|
|
807
806
|
});
|
|
808
|
-
},
|
|
807
|
+
}, m = (s) => {
|
|
809
808
|
var c;
|
|
810
|
-
(c =
|
|
809
|
+
(c = z.$) != null && c.ui.sortable && $(s.elPopup).data("ui-sortable") && $(s.elPopup).sortable("destroy");
|
|
811
810
|
};
|
|
812
|
-
return (s, c) => (k(), B(
|
|
813
|
-
|
|
811
|
+
return (s, c) => (k(), B(Y, null, [
|
|
812
|
+
A(Te, {
|
|
814
813
|
class: "top-select_arrow",
|
|
815
814
|
modelValue: i.value,
|
|
816
815
|
"onUpdate:modelValue": c[0] || (c[0] = (v) => i.value = v),
|
|
817
|
-
id: y(
|
|
816
|
+
id: y(f),
|
|
818
817
|
tags: a.value,
|
|
819
818
|
mode: "filter",
|
|
820
819
|
useTopButton: ""
|
|
821
820
|
}, null, 8, ["modelValue", "id", "tags"]),
|
|
822
|
-
|
|
823
|
-
id: y(
|
|
824
|
-
class:
|
|
821
|
+
A(Ie, {
|
|
822
|
+
id: y(f),
|
|
823
|
+
class: X(T.value),
|
|
825
824
|
onOpen: c[4] || (c[4] = (v) => V(v)),
|
|
826
|
-
onClose: c[5] || (c[5] = (v) =>
|
|
825
|
+
onClose: c[5] || (c[5] = (v) => m(v)),
|
|
827
826
|
"transition-duration": 50
|
|
828
|
-
},
|
|
827
|
+
}, Le({
|
|
829
828
|
contentList: _(() => [
|
|
830
|
-
y(r).mode === "filter" && !s.singleMode ? (k(), b(
|
|
829
|
+
y(r).mode === "filter" && !s.singleMode ? (k(), b(ye, {
|
|
831
830
|
key: 0,
|
|
832
831
|
id: "all",
|
|
833
832
|
colorId: "",
|
|
834
833
|
name: s.$i18n.Common.All_tags ?? "",
|
|
835
834
|
state: y(r).model.value.length ? "" : "selected",
|
|
836
835
|
onSelect: c[3] || (c[3] = (v) => y(r).model.value = [])
|
|
837
|
-
}, null, 8, ["name", "state"])) :
|
|
838
|
-
(k(!0), B(
|
|
836
|
+
}, null, 8, ["name", "state"])) : q("", !0),
|
|
837
|
+
(k(!0), B(Y, null, de(a.value, (v) => (k(), b(ye, {
|
|
839
838
|
key: v.id,
|
|
840
839
|
id: v.id,
|
|
841
840
|
colorId: v.color_id,
|
|
@@ -843,34 +842,34 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
843
842
|
state: u(v.id),
|
|
844
843
|
canExclude: y(r).mode === "filter" && !s.singleMode,
|
|
845
844
|
editable: s.tagsEditable,
|
|
846
|
-
disabled:
|
|
847
|
-
onUnselect: (
|
|
848
|
-
onSelect: (
|
|
849
|
-
onExclude: (
|
|
850
|
-
"onUpdate:name": (
|
|
851
|
-
v.name =
|
|
845
|
+
disabled: g.value && u(v.id) === "",
|
|
846
|
+
onUnselect: (I) => x(v.id, "unselect"),
|
|
847
|
+
onSelect: (I) => x(v.id, "select"),
|
|
848
|
+
onExclude: (I) => x(v.id, "exclude"),
|
|
849
|
+
"onUpdate:name": (I) => {
|
|
850
|
+
v.name = I, y(d)("tagsChanged", a.value);
|
|
852
851
|
}
|
|
853
852
|
}, null, 8, ["id", "colorId", "name", "state", "canExclude", "editable", "disabled", "onUnselect", "onSelect", "onExclude", "onUpdate:name"]))), 128)),
|
|
854
|
-
s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), b(
|
|
853
|
+
s.tagsEditable && a.value.length < s.tagsMax && a.value.length < 20 ? (k(), b(ue, {
|
|
855
854
|
key: 1,
|
|
856
855
|
"data-top-icon": "",
|
|
857
|
-
onClick:
|
|
856
|
+
onClick: J(C, ["stop"])
|
|
858
857
|
}, {
|
|
859
858
|
default: _(() => [
|
|
860
|
-
|
|
859
|
+
G(M(s.$i18n.Common.Add), 1)
|
|
861
860
|
]),
|
|
862
861
|
_: 1
|
|
863
|
-
})) :
|
|
862
|
+
})) : q("", !0)
|
|
864
863
|
]),
|
|
865
864
|
_: 2
|
|
866
865
|
}, [
|
|
867
866
|
y(r).mode === "setter" && y(r).filters ? {
|
|
868
867
|
name: "header",
|
|
869
868
|
fn: _(() => [
|
|
870
|
-
|
|
871
|
-
modelValue:
|
|
872
|
-
"onUpdate:modelValue": c[1] || (c[1] = (v) =>
|
|
873
|
-
options:
|
|
869
|
+
A(se, {
|
|
870
|
+
modelValue: h.value,
|
|
871
|
+
"onUpdate:modelValue": c[1] || (c[1] = (v) => h.value = v),
|
|
872
|
+
options: S()
|
|
874
873
|
}, null, 8, ["modelValue", "options"])
|
|
875
874
|
]),
|
|
876
875
|
key: "0"
|
|
@@ -878,22 +877,22 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
878
877
|
y(r).mode === "setter" && y(r).filters ? {
|
|
879
878
|
name: "footer",
|
|
880
879
|
fn: _(() => [
|
|
881
|
-
|
|
880
|
+
A(H, { color: "theme" }, {
|
|
882
881
|
default: _(() => [
|
|
883
|
-
|
|
882
|
+
G(M(s.$i18n.Common.Cancel), 1)
|
|
884
883
|
]),
|
|
885
884
|
_: 1
|
|
886
885
|
}),
|
|
887
|
-
|
|
886
|
+
A(H, {
|
|
888
887
|
onClick: c[2] || (c[2] = (v) => y(d)("setter", {
|
|
889
888
|
tagsIds: y(r).model.value,
|
|
890
889
|
filters: y(r).filters,
|
|
891
|
-
filtersAction:
|
|
890
|
+
filtersAction: h.value,
|
|
892
891
|
payload: y(r).payload
|
|
893
892
|
}))
|
|
894
893
|
}, {
|
|
895
894
|
default: _(() => [
|
|
896
|
-
|
|
895
|
+
G(M(h.value === "add" ? s.$i18n.Common.Add : "") + " " + M(h.value === "replace" ? s.$i18n.Common.Replace : "") + " " + M(h.value === "delete" ? s.$i18n.Common.Remove : ""), 1)
|
|
897
896
|
]),
|
|
898
897
|
_: 1
|
|
899
898
|
})
|
|
@@ -903,75 +902,75 @@ const Pe = { class: "top-selectorCompetitors" }, Ue = { class: "top-ellipsis1" }
|
|
|
903
902
|
]), 1032, ["id", "class"])
|
|
904
903
|
], 64));
|
|
905
904
|
}
|
|
906
|
-
}),
|
|
905
|
+
}), St = (t, o) => E(() => ge(t).filter((i) => i.on >= 0 || i.id === o).map((i) => ({
|
|
907
906
|
value: i.id,
|
|
908
907
|
title: i.url + ` [${i.id}]`,
|
|
909
|
-
icon: i.id ===
|
|
908
|
+
icon: i.id === ge(o) ? "" : "",
|
|
910
909
|
content: i.name
|
|
911
|
-
}))),
|
|
912
|
-
|
|
913
|
-
const e =
|
|
910
|
+
}))), It = (t, o, n) => {
|
|
911
|
+
o || (o = { id: t.id }), o.id = t.id;
|
|
912
|
+
const e = Ue.genElPopupOpener("div", o);
|
|
914
913
|
return e.classList.add("top-tagSelector"), t.useTopButton && e.classList.add("top-button", "top-color_theme"), t.mode === "filter" && e.classList.add("top-tagSelector-filter"), t.mode === "setter" && !t.filters && e.classList.add("top-tagSelector-setter_single"), t.mode === "setter" && t.filters && e.classList.add("top-tagSelector-setter_several"), e.onclick = (i) => {
|
|
915
914
|
i.preventDefault(), i.stopPropagation(), e.onclick = null;
|
|
916
|
-
const a =
|
|
915
|
+
const a = F(t.modelValue), l = {
|
|
917
916
|
model: a,
|
|
918
917
|
mode: t.mode,
|
|
919
918
|
targetId: t.targetId,
|
|
920
919
|
filters: t.filters,
|
|
921
920
|
payload: t.payload
|
|
922
921
|
};
|
|
923
|
-
|
|
924
|
-
t.modelValue = a.value,
|
|
922
|
+
W(e, "topTagSelectorTarget", l), delete e.dataset.topPopupDisabled, me(t.modelValue) || w(a, () => {
|
|
923
|
+
t.modelValue = a.value, ee(e, t, n);
|
|
925
924
|
}), e.click();
|
|
926
|
-
},
|
|
925
|
+
}, me(t.modelValue) ? w(t.modelValue, () => ee(e, t, n)) : W(e, "topTagSelectorRender", (i) => {
|
|
927
926
|
t.modelValue = i;
|
|
928
|
-
const a =
|
|
929
|
-
a && (a.model.value = i),
|
|
930
|
-
}),
|
|
931
|
-
},
|
|
932
|
-
var
|
|
933
|
-
(
|
|
934
|
-
},
|
|
927
|
+
const a = W(e, "topTagSelectorTarget");
|
|
928
|
+
a && (a.model.value = i), ee(e, t, n);
|
|
929
|
+
}), ee(e, t, n), e;
|
|
930
|
+
}, xt = (t, o) => {
|
|
931
|
+
var n;
|
|
932
|
+
(n = W(t, "topTagSelectorRender")) == null || n(o);
|
|
933
|
+
}, ee = (t, o, n) => {
|
|
935
934
|
var i;
|
|
936
|
-
const e = y(
|
|
937
|
-
if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5),
|
|
938
|
-
t.innerHTML = `<div>${
|
|
935
|
+
const e = y(o.modelValue);
|
|
936
|
+
if (t.classList.toggle("top-tagSelector-selectedOne", !e.length || e.length === 1), t.classList.toggle("top-tagSelector-toTwoLine", e.length > 5), o.mode === "setter" && o.filters) {
|
|
937
|
+
t.innerHTML = `<div>${n}</div>`;
|
|
939
938
|
return;
|
|
940
939
|
}
|
|
941
|
-
if (t.innerHTML = "", !e.length &&
|
|
942
|
-
const a =
|
|
940
|
+
if (t.innerHTML = "", !e.length && o.mode === "filter") {
|
|
941
|
+
const a = pe({
|
|
943
942
|
id: "all",
|
|
944
943
|
colorId: "",
|
|
945
|
-
name: ((i =
|
|
944
|
+
name: ((i = R().Common) == null ? void 0 : i.All_tags) ?? "",
|
|
946
945
|
state: ""
|
|
947
946
|
});
|
|
948
947
|
t.append(a);
|
|
949
948
|
}
|
|
950
949
|
e.forEach((a) => {
|
|
951
|
-
var d,
|
|
952
|
-
const
|
|
953
|
-
id:
|
|
954
|
-
colorId: ((d =
|
|
955
|
-
name: ((
|
|
956
|
-
state:
|
|
950
|
+
var d, f;
|
|
951
|
+
const l = pe({
|
|
952
|
+
id: Q(a),
|
|
953
|
+
colorId: ((d = le(a, o.tags)) == null ? void 0 : d.color_id) ?? "",
|
|
954
|
+
name: ((f = le(a, o.tags)) == null ? void 0 : f.name) ?? "",
|
|
955
|
+
state: Q(a) === a ? "selected" : "excluded"
|
|
957
956
|
});
|
|
958
|
-
t.append(
|
|
957
|
+
t.append(l);
|
|
959
958
|
});
|
|
960
|
-
},
|
|
961
|
-
const
|
|
962
|
-
return
|
|
963
|
-
},
|
|
959
|
+
}, pe = (t) => {
|
|
960
|
+
const o = document.createElement("div");
|
|
961
|
+
return o.classList.add("top-tagSelector_tagIcon"), o.classList.toggle("top-tagSelector-active", !!t.state), o.classList.toggle("top-tagSelector-excluded", t.state === "excluded"), o.dataset.tag_id = t.id, o.dataset.tag_color_id = t.colorId, o.title = t.name, o;
|
|
962
|
+
}, kt = ze, Ct = lt, Tt = dt, _t = Te, bt = ne;
|
|
964
963
|
export {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
964
|
+
kt as TopSelectorCompetitors,
|
|
965
|
+
Ct as TopSelectorRegion,
|
|
966
|
+
Tt as TopTagSelector,
|
|
967
|
+
_t as TopTagSelectorPopupOpener,
|
|
968
|
+
bt as TopTagSelectorTagIcon,
|
|
969
|
+
Ze as dialogSelectorRegions,
|
|
970
|
+
Xe as findRegion,
|
|
971
|
+
It as genElTopTagSelectorPopupOpener,
|
|
972
|
+
ke as genSearcherByKey,
|
|
973
|
+
xt as renderElTopTagSelectorPopupOpener,
|
|
974
|
+
St as useItemsFromCompetitors
|
|
976
975
|
};
|
|
977
976
|
//# sourceMappingURL=project.js.map
|