@webitel/ui-sdk 26.6.13 → 26.6.15
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/dist/{contacts-BaxyRLLM.js → contacts-oS58PXpK.js} +2 -2
- package/dist/{index-CigyElUb.js → index-C3ItekO6.js} +1 -1
- package/dist/{index-DApIkp62.js → index-Czgxzv9m.js} +1 -1
- package/dist/{install-DawOaJvS.js → install-qEvz8pVq.js} +14004 -12926
- package/dist/{isObject-CYCEPn3N.js → isObject-CvgheaHc.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +565 -279
- package/dist/{useVidstackSrc-DyrOa4mk.js → useVidstackSrc-C0vc-L1z.js} +1 -1
- package/dist/{vidstack-Bq6c3Bam-CAY97-jZ.js → vidstack-Bq6c3Bam-Ze750VW0.js} +3 -3
- package/dist/{vidstack-D2pY00kU-CueRPheM.js → vidstack-D2pY00kU-CDaXMTw5.js} +3 -3
- package/dist/{vidstack-DDXt6fpN-BRLi6AkS.js → vidstack-DDXt6fpN-DNCajufz.js} +2 -2
- package/dist/{vidstack-D_-9AA6_-Dc5WN-OL.js → vidstack-D_-9AA6_-D09MYruC.js} +2 -2
- package/dist/{vidstack-DqAw8m9J-D32aS290.js → vidstack-DqAw8m9J-DsRS893u.js} +1 -1
- package/dist/{vidstack-audio-BbddnRPa.js → vidstack-audio-B8GlmuzS.js} +2 -2
- package/dist/{vidstack-dash-BNYPf-SD.js → vidstack-dash--8wxCJio.js} +4 -4
- package/dist/{vidstack-google-cast-f5Q76VEc.js → vidstack-google-cast-B3xceEdo.js} +4 -4
- package/dist/{vidstack-hls-hJ9GD_pP.js → vidstack-hls-DcFfhCue.js} +4 -4
- package/dist/{vidstack-video-qY9NJ4Rl.js → vidstack-video-CG-QwOFZ.js} +3 -3
- package/dist/{vidstack-vimeo-Dcb0hTaj.js → vidstack-vimeo-CagJI0ya.js} +4 -4
- package/dist/{vidstack-youtube-B29lleYJ.js → vidstack-youtube-CCHBE-Sp.js} +3 -3
- package/dist/{wt-action-bar-ChN3mio6.js → wt-action-bar-Bnajcqto.js} +1 -1
- package/dist/{wt-button-select-KD0cPK4H.js → wt-button-select-BrnWJgWv.js} +1 -1
- package/dist/{wt-call-media-action-BvM04q4r.js → wt-call-media-action-Blm2az9B.js} +1 -1
- package/dist/wt-chat-emoji-B70MyRhI.js +2909 -0
- package/dist/{wt-confirm-dialog-DMquYnrJ.js → wt-confirm-dialog-B_Z7GV0j.js} +1 -1
- package/dist/{wt-context-menu-ToE9-ffe.js → wt-context-menu-DqxmN9B9.js} +1 -1
- package/dist/{wt-copy-action-Bylf142B.js → wt-copy-action-B4HqE4gI.js} +1 -1
- package/dist/{wt-datepicker-BV7rf6Wk.js → wt-datepicker-BbQUZwb_.js} +1 -1
- package/dist/{wt-display-chip-items-CXv8kX5b.js → wt-display-chip-items-BukWclN5.js} +11 -11
- package/dist/{wt-dual-panel-Jmj4ip6N.js → wt-dual-panel-ROg8CZeg.js} +1 -1
- package/dist/{wt-dummy-BxEArso4.js → wt-dummy-DsRV4jMt.js} +1 -1
- package/dist/{wt-error-page-rcqO8ZX0.js → wt-error-page-CRLQgNyV.js} +1 -1
- package/dist/{wt-expansion-card-By036A5Q.js → wt-expansion-card-BBm1E1RZ.js} +5 -5
- package/dist/{wt-expansion-panel-BFYozFsJ.js → wt-expansion-panel-DXSMT1Re.js} +9 -9
- package/dist/{wt-filters-panel-wrapper-C49nxd6Z.js → wt-filters-panel-wrapper-CBefqkhd.js} +1 -1
- package/dist/{wt-galleria-72LEmzfX.js → wt-galleria-DSw5JiyE.js} +1 -1
- package/dist/{wt-inline-add-panel-CL0aM32a.js → wt-inline-add-panel-BNzx4b-H.js} +1 -1
- package/dist/{wt-navigation-menu-B87j3Gxu.js → wt-navigation-menu-CUMpfJ6a.js} +1 -1
- package/dist/{wt-notifications-bar-DJ7zMmH9.js → wt-notifications-bar-Cn-IuNBf.js} +2 -2
- package/dist/{wt-pagination-D1kszR59.js → wt-pagination-BMUjALdw.js} +1 -1
- package/dist/{wt-player-1VkST0ny.js → wt-player-YeN1f-0f.js} +2 -2
- package/dist/{wt-screen-recordings-action-Boy3xJvB.js → wt-screen-recordings-action-GEBYO2iQ.js} +1 -1
- package/dist/{wt-search-bar-D1qU-jDZ.js → wt-search-bar-Yqr1THNr.js} +1 -1
- package/dist/{wt-selection-popup-Bwa7CJym.js → wt-selection-popup-BMCV1EVS.js} +1 -1
- package/dist/{wt-send-message-popup-1NrObXfW.js → wt-send-message-popup-Bf7M8jnJ.js} +18 -18
- package/dist/{wt-start-page-D3XXOoLT.js → wt-start-page-CrKuWVUn.js} +1 -1
- package/dist/{wt-status-select-BOPkG0nj.js → wt-status-select-B0h3iI1x.js} +1 -1
- package/dist/{wt-stepper-2TcrBla0.js → wt-stepper-BQ-7waVk.js} +1 -1
- package/dist/{wt-table-DpasMSII.js → wt-table-DJBJWPVy.js} +2 -2
- package/dist/{wt-table-actions-CQ67TwoU.js → wt-table-actions-t-AYLfok.js} +1 -1
- package/dist/{wt-table-column-select-BZH5aqRk.js → wt-table-column-select-CSjzsSG7.js} +2 -2
- package/dist/{wt-tabs-DOiZ6vld.js → wt-tabs-Bk-dsWwO.js} +1 -1
- package/dist/{wt-tags-input-DrP4EVai.js → wt-tags-input-mTx26n9T.js} +2 -2
- package/dist/{wt-timepicker-CenAtHJ9.js → wt-timepicker-BlYv7ZOT.js} +1 -1
- package/dist/{wt-tree-vAsblHJz.js → wt-tree-fHKex32H.js} +2 -2
- package/dist/{wt-tree-table-Bu35HIvM.js → wt-tree-table-CiWnJc5t.js} +2 -2
- package/dist/{wt-type-extension-value-input-B6k7nGgn.js → wt-type-extension-value-input-CmADsZV9.js} +3 -3
- package/dist/{wt-vidstack-player-NmB4VBNR.js → wt-vidstack-player-CZkuHOOX.js} +10 -10
- package/package.json +1 -1
- package/src/components/_internals/composables/index.ts +7 -0
- package/src/components/_internals/composables/useSelect/useSelect.ts +101 -0
- package/src/components/_internals/composables/useSelect/useSelectCustomValues.ts +94 -0
- package/src/components/_internals/composables/useSelect/useSelectDropdown.ts +93 -0
- package/src/components/_internals/composables/useSelect/useSelectOptions.ts +198 -0
- package/src/components/_internals/composables/useSelect/useSelectUtils.ts +32 -0
- package/src/{composables → components/_internals/composables}/useWtTable/useWtTable.ts +1 -1
- package/src/components/index.js +6 -0
- package/src/components/wt-chip/wt-chip.vue +11 -2
- package/src/components/wt-expansion-card/wt-expansion-card.vue +1 -1
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +1 -1
- package/src/components/wt-galleria/wt-galleria.vue +4 -2
- package/src/components/wt-input-number/wt-input-number.vue +1 -2
- package/src/components/wt-input-text/wt-input-text.vue +3 -2
- package/src/components/wt-multi-select/wt-multi-select.vue +254 -0
- package/src/components/wt-password/wt-password.vue +1 -2
- package/src/components/wt-single-select/wt-single-select.vue +229 -0
- package/src/components/wt-table/wt-table.vue +1 -2
- package/src/components/wt-tree-table/wt-tree-table.vue +1 -2
- package/src/composables/index.ts +0 -6
- package/src/locale/en/en.js +3 -0
- package/src/locale/es/es.js +3 -0
- package/src/locale/kz/kz.js +3 -0
- package/src/locale/pl/pl.js +3 -0
- package/src/locale/ro/ro.js +3 -0
- package/src/locale/ru/ru.js +3 -0
- package/src/locale/uk/uk.js +3 -0
- package/src/locale/uz/uz.js +3 -0
- package/src/locale/vi/vi.js +3 -0
- package/src/plugins/primevue/primevue.plugin.js +4 -0
- package/src/plugins/primevue/theme/components/checkbox/checkbox.js +1 -1
- package/src/plugins/primevue/theme/components/components.js +4 -0
- package/src/plugins/primevue/theme/components/multi-select/multi-select.js +32 -0
- package/src/plugins/primevue/theme/components/single-select/single-select.js +24 -0
- package/types/components/_internals/composables/index.d.ts +7 -0
- package/types/components/_internals/composables/useSelect/useSelect.d.ts +29 -0
- package/types/components/_internals/composables/useSelect/useSelectCustomValues.d.ts +16 -0
- package/types/components/_internals/composables/useSelect/useSelectDropdown.d.ts +20 -0
- package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +20 -0
- package/types/components/_internals/composables/useSelect/useSelectUtils.d.ts +3 -0
- package/types/{composables → components/_internals/composables}/useWtTable/useWtTable.d.ts +0 -1
- package/types/components/wt-chip/wt-chip.vue.d.ts +5 -1
- package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +82 -0
- package/types/components/wt-select/wt-select.vue.d.ts +1 -1
- package/types/components/wt-single-select/wt-single-select.vue.d.ts +83 -0
- package/types/components/wt-table/wt-table.vue.d.ts +1 -1
- package/types/components/wt-tree-table/wt-tree-table.vue.d.ts +1 -1
- package/types/composables/index.d.ts +0 -6
- package/types/locale/en/en.d.ts +3 -0
- package/types/locale/es/es.d.ts +3 -0
- package/types/locale/i18n.d.ts +27 -0
- package/types/locale/index.d.ts +27 -0
- package/types/locale/kz/kz.d.ts +3 -0
- package/types/locale/pl/pl.d.ts +3 -0
- package/types/locale/ro/ro.d.ts +3 -0
- package/types/locale/ru/ru.d.ts +3 -0
- package/types/locale/uk/uk.d.ts +3 -0
- package/types/locale/uz/uz.d.ts +3 -0
- package/types/locale/vi/vi.d.ts +3 -0
- package/types/plugins/primevue/theme/components/components.d.ts +4 -0
- package/types/plugins/primevue/theme/components/multi-select/multi-select.d.ts +151 -0
- package/types/plugins/primevue/theme/components/single-select/single-select.d.ts +157 -0
- package/dist/wt-chat-emoji-0UBEtnmy.js +0 -2429
- package/src/components/wt-select/wt-select-v2.vue +0 -244
- package/types/components/wt-select/wt-select-v2.vue.d.ts +0 -77
- /package/src/{composables → components/_internals/composables}/useExpansion/useExpansion.ts +0 -0
- /package/src/{composables → components/_internals/composables}/useGalleriaFullscreen/useGalleriaFullscreen.ts +0 -0
- /package/src/{composables → components/_internals/composables}/useGalleriaMaskClick/useGalleriaMaskClick.ts +0 -0
- /package/src/{composables → components/_internals/composables}/useInputControl/useInputControl.ts +0 -0
- /package/src/{composables → components/_internals/composables}/useTableColumnDrag/useTableColumnDrag.ts +0 -0
- /package/types/{composables → components/_internals/composables}/useExpansion/useExpansion.d.ts +0 -0
- /package/types/{composables → components/_internals/composables}/useGalleriaFullscreen/useGalleriaFullscreen.d.ts +0 -0
- /package/types/{composables → components/_internals/composables}/useGalleriaMaskClick/useGalleriaMaskClick.d.ts +0 -0
- /package/types/{composables → components/_internals/composables}/useInputControl/useInputControl.d.ts +0 -0
- /package/types/{composables → components/_internals/composables}/useTableColumnDrag/useTableColumnDrag.d.ts +0 -0
|
@@ -0,0 +1,2909 @@
|
|
|
1
|
+
import { ref as ze, computed as In, onBeforeUnmount as Oo, resolveDirective as Mo, withDirectives as Do, createElementBlock as qn, openBlock as Ge, createVNode as Lo, createBlock as Po, unref as Bo, Teleport as Fo, createCommentVNode as No, nextTick as Uo } from "vue";
|
|
2
|
+
import { $ as ge, a0 as je, T as te, a1 as P, a2 as le, a3 as $o, a4 as Vi, a5 as cn, _ as Ko, C as zo, E as Go } from "./install-qEvz8pVq.js";
|
|
3
|
+
import { e as Ho } from "./isObject-CvgheaHc.js";
|
|
4
|
+
function me(t) {
|
|
5
|
+
if (typeof t != "string" || !t)
|
|
6
|
+
throw new Error("expected a non-empty string, got: " + t);
|
|
7
|
+
}
|
|
8
|
+
function He(t) {
|
|
9
|
+
if (typeof t != "number")
|
|
10
|
+
throw new Error("expected a number, got: " + t);
|
|
11
|
+
}
|
|
12
|
+
const Vo = 1, Wo = 1, V = "emoji", ee = "keyvalue", un = "favorites", Xo = "tokens", Wi = "tokens", Yo = "unicode", Xi = "count", Zo = "group", Jo = "order", Yi = "group-order", tn = "eTag", ke = "url", xn = "skinTone", re = "readonly", ln = "readwrite", Zi = "skinUnicodes", Qo = "skinUnicodes", es = "https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json", ts = "en";
|
|
13
|
+
function rs(t, e) {
|
|
14
|
+
const r = /* @__PURE__ */ new Set(), n = [];
|
|
15
|
+
for (const i of t) {
|
|
16
|
+
const a = e(i);
|
|
17
|
+
r.has(a) || (r.add(a), n.push(i));
|
|
18
|
+
}
|
|
19
|
+
return n;
|
|
20
|
+
}
|
|
21
|
+
function Rn(t) {
|
|
22
|
+
return rs(t, (e) => e.unicode);
|
|
23
|
+
}
|
|
24
|
+
function ns(t) {
|
|
25
|
+
function e(r, n, i) {
|
|
26
|
+
const a = n ? t.createObjectStore(r, { keyPath: n }) : t.createObjectStore(r);
|
|
27
|
+
if (i)
|
|
28
|
+
for (const [o, [s, l]] of Object.entries(i))
|
|
29
|
+
a.createIndex(o, s, { multiEntry: l });
|
|
30
|
+
return a;
|
|
31
|
+
}
|
|
32
|
+
e(ee), e(
|
|
33
|
+
V,
|
|
34
|
+
/* keyPath */
|
|
35
|
+
Yo,
|
|
36
|
+
{
|
|
37
|
+
[Wi]: [
|
|
38
|
+
Xo,
|
|
39
|
+
/* multiEntry */
|
|
40
|
+
!0
|
|
41
|
+
],
|
|
42
|
+
[Yi]: [[Zo, Jo]],
|
|
43
|
+
[Zi]: [
|
|
44
|
+
Qo,
|
|
45
|
+
/* multiEntry */
|
|
46
|
+
!0
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
), e(un, void 0, {
|
|
50
|
+
[Xi]: [""]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const rn = {}, Te = {}, we = {};
|
|
54
|
+
function Ji(t, e, r) {
|
|
55
|
+
r.onerror = () => e(r.error), r.onblocked = () => e(new Error("IDB blocked")), r.onsuccess = () => t(r.result);
|
|
56
|
+
}
|
|
57
|
+
async function as(t) {
|
|
58
|
+
const e = await new Promise((r, n) => {
|
|
59
|
+
const i = indexedDB.open(t, Vo);
|
|
60
|
+
rn[t] = i, i.onupgradeneeded = (a) => {
|
|
61
|
+
a.oldVersion < Wo && ns(i.result);
|
|
62
|
+
}, Ji(r, n, i);
|
|
63
|
+
});
|
|
64
|
+
return e.onclose = () => dn(t), e;
|
|
65
|
+
}
|
|
66
|
+
function is(t) {
|
|
67
|
+
return Te[t] || (Te[t] = as(t)), Te[t];
|
|
68
|
+
}
|
|
69
|
+
function B(t, e, r, n) {
|
|
70
|
+
return new Promise((i, a) => {
|
|
71
|
+
const o = t.transaction(e, r, { durability: "relaxed" }), s = typeof e == "string" ? o.objectStore(e) : e.map((c) => o.objectStore(c));
|
|
72
|
+
let l;
|
|
73
|
+
n(s, o, (c) => {
|
|
74
|
+
l = c;
|
|
75
|
+
}), o.oncomplete = () => i(l), o.onerror = () => a(o.error);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function dn(t) {
|
|
79
|
+
const e = rn[t], r = e && e.result;
|
|
80
|
+
if (r) {
|
|
81
|
+
r.close();
|
|
82
|
+
const n = we[t];
|
|
83
|
+
if (n)
|
|
84
|
+
for (const i of n)
|
|
85
|
+
i();
|
|
86
|
+
}
|
|
87
|
+
delete rn[t], delete Te[t], delete we[t];
|
|
88
|
+
}
|
|
89
|
+
function os(t) {
|
|
90
|
+
return new Promise((e, r) => {
|
|
91
|
+
dn(t);
|
|
92
|
+
const n = indexedDB.deleteDatabase(t);
|
|
93
|
+
Ji(e, r, n);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function ss(t, e) {
|
|
97
|
+
let r = we[t];
|
|
98
|
+
r || (r = we[t] = []), r.push(e);
|
|
99
|
+
}
|
|
100
|
+
const cs = /* @__PURE__ */ new Set([
|
|
101
|
+
":D",
|
|
102
|
+
"XD",
|
|
103
|
+
":'D",
|
|
104
|
+
"O:)",
|
|
105
|
+
":X",
|
|
106
|
+
":P",
|
|
107
|
+
";P",
|
|
108
|
+
"XP",
|
|
109
|
+
":L",
|
|
110
|
+
":Z",
|
|
111
|
+
":j",
|
|
112
|
+
"8D",
|
|
113
|
+
"XO",
|
|
114
|
+
"8)",
|
|
115
|
+
":B",
|
|
116
|
+
":O",
|
|
117
|
+
":S",
|
|
118
|
+
":'o",
|
|
119
|
+
"Dx",
|
|
120
|
+
"X(",
|
|
121
|
+
"D:",
|
|
122
|
+
":C",
|
|
123
|
+
">0)",
|
|
124
|
+
":3",
|
|
125
|
+
"</3",
|
|
126
|
+
"<3",
|
|
127
|
+
"\\M/",
|
|
128
|
+
":E",
|
|
129
|
+
"8#"
|
|
130
|
+
]);
|
|
131
|
+
function Q(t) {
|
|
132
|
+
return t.split(/[\s_]+/).map((e) => !e.match(/\w/) || cs.has(e) ? e.toLowerCase() : e.replace(/[)(:,]/g, "").replace(/’/g, "'").toLowerCase()).filter(Boolean);
|
|
133
|
+
}
|
|
134
|
+
const us = 2;
|
|
135
|
+
function Qi(t) {
|
|
136
|
+
return t.filter(Boolean).map((e) => e.toLowerCase()).filter((e) => e.length >= us);
|
|
137
|
+
}
|
|
138
|
+
function ls(t) {
|
|
139
|
+
return t.map(({ annotation: r, emoticon: n, group: i, order: a, shortcodes: o, skins: s, tags: l, emoji: c, version: d }) => {
|
|
140
|
+
const h = [...new Set(
|
|
141
|
+
Qi([
|
|
142
|
+
...(o || []).map(Q).flat(),
|
|
143
|
+
...(l || []).map(Q).flat(),
|
|
144
|
+
...Q(r),
|
|
145
|
+
n
|
|
146
|
+
])
|
|
147
|
+
)].sort(), f = {
|
|
148
|
+
annotation: r,
|
|
149
|
+
group: i,
|
|
150
|
+
order: a,
|
|
151
|
+
tags: l,
|
|
152
|
+
tokens: h,
|
|
153
|
+
unicode: c,
|
|
154
|
+
version: d
|
|
155
|
+
};
|
|
156
|
+
if (n && (f.emoticon = n), o && (f.shortcodes = o), s) {
|
|
157
|
+
f.skinTones = [], f.skinUnicodes = [], f.skinVersions = [];
|
|
158
|
+
for (const { tone: g, emoji: T, version: S } of s)
|
|
159
|
+
f.skinTones.push(g), f.skinUnicodes.push(T), f.skinVersions.push(S);
|
|
160
|
+
}
|
|
161
|
+
return f;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function eo(t, e, r, n) {
|
|
165
|
+
t[e](r).onsuccess = (i) => n && n(i.target.result);
|
|
166
|
+
}
|
|
167
|
+
function H(t, e, r) {
|
|
168
|
+
eo(t, "get", e, r);
|
|
169
|
+
}
|
|
170
|
+
function to(t, e, r) {
|
|
171
|
+
eo(t, "getAll", e, r);
|
|
172
|
+
}
|
|
173
|
+
function fn(t) {
|
|
174
|
+
t.commit && t.commit();
|
|
175
|
+
}
|
|
176
|
+
function ds(t, e) {
|
|
177
|
+
let r = t[0];
|
|
178
|
+
for (let n = 1; n < t.length; n++) {
|
|
179
|
+
const i = t[n];
|
|
180
|
+
e(r) > e(i) && (r = i);
|
|
181
|
+
}
|
|
182
|
+
return r;
|
|
183
|
+
}
|
|
184
|
+
function ro(t, e) {
|
|
185
|
+
const r = ds(t, (i) => i.length), n = [];
|
|
186
|
+
for (const i of r)
|
|
187
|
+
t.some((a) => a.findIndex((o) => e(o) === e(i)) === -1) || n.push(i);
|
|
188
|
+
return n;
|
|
189
|
+
}
|
|
190
|
+
async function fs(t) {
|
|
191
|
+
return !await hn(t, ee, ke);
|
|
192
|
+
}
|
|
193
|
+
async function hs(t, e, r) {
|
|
194
|
+
const [n, i] = await Promise.all([tn, ke].map((a) => hn(t, ee, a)));
|
|
195
|
+
return n === r && i === e;
|
|
196
|
+
}
|
|
197
|
+
async function ps(t, e) {
|
|
198
|
+
return B(t, V, re, (n, i, a) => {
|
|
199
|
+
let o;
|
|
200
|
+
const s = () => {
|
|
201
|
+
n.getAll(o && IDBKeyRange.lowerBound(o, !0), 50).onsuccess = (l) => {
|
|
202
|
+
const c = l.target.result;
|
|
203
|
+
for (const d of c)
|
|
204
|
+
if (o = d.unicode, e(d))
|
|
205
|
+
return a(d);
|
|
206
|
+
if (c.length < 50)
|
|
207
|
+
return a();
|
|
208
|
+
s();
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
s();
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
async function no(t, e, r, n) {
|
|
215
|
+
{
|
|
216
|
+
const i = ls(e);
|
|
217
|
+
await B(t, [V, ee], ln, ([a, o], s) => {
|
|
218
|
+
let l, c, d = 0;
|
|
219
|
+
function h() {
|
|
220
|
+
++d === 2 && f();
|
|
221
|
+
}
|
|
222
|
+
function f() {
|
|
223
|
+
if (!(l === n && c === r)) {
|
|
224
|
+
a.clear();
|
|
225
|
+
for (const g of i)
|
|
226
|
+
a.put(g);
|
|
227
|
+
o.put(n, tn), o.put(r, ke), fn(s);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
H(o, tn, (g) => {
|
|
231
|
+
l = g, h();
|
|
232
|
+
}), H(o, ke, (g) => {
|
|
233
|
+
c = g, h();
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
async function vs(t, e) {
|
|
239
|
+
return B(t, V, re, (r, n, i) => {
|
|
240
|
+
const a = IDBKeyRange.bound([e, 0], [e + 1, 0], !1, !0);
|
|
241
|
+
to(r.index(Yi), a, i);
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
async function ao(t, e) {
|
|
245
|
+
const r = Qi(Q(e));
|
|
246
|
+
return r.length ? B(t, V, re, (n, i, a) => {
|
|
247
|
+
const o = [], s = () => {
|
|
248
|
+
o.length === r.length && l();
|
|
249
|
+
}, l = () => {
|
|
250
|
+
const c = ro(o, (d) => d.unicode);
|
|
251
|
+
a(c.sort((d, h) => d.order < h.order ? -1 : 1));
|
|
252
|
+
};
|
|
253
|
+
for (let c = 0; c < r.length; c++) {
|
|
254
|
+
const d = r[c], h = c === r.length - 1 ? IDBKeyRange.bound(d, d + "", !1, !0) : IDBKeyRange.only(d);
|
|
255
|
+
to(n.index(Wi), h, (f) => {
|
|
256
|
+
o.push(f), s();
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}) : [];
|
|
260
|
+
}
|
|
261
|
+
async function gs(t, e) {
|
|
262
|
+
const r = await ao(t, e);
|
|
263
|
+
return r.length ? r.filter((n) => (n.shortcodes || []).map((a) => a.toLowerCase()).includes(e.toLowerCase()))[0] || null : await ps(t, (i) => (i.shortcodes || []).includes(e.toLowerCase())) || null;
|
|
264
|
+
}
|
|
265
|
+
async function ms(t, e) {
|
|
266
|
+
return B(t, V, re, (r, n, i) => H(r, e, (a) => {
|
|
267
|
+
if (a)
|
|
268
|
+
return i(a);
|
|
269
|
+
H(r.index(Zi), e, (o) => i(o || null));
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
function hn(t, e, r) {
|
|
273
|
+
return B(t, e, re, (n, i, a) => H(n, r, a));
|
|
274
|
+
}
|
|
275
|
+
function ys(t, e, r, n) {
|
|
276
|
+
return B(t, e, ln, (i, a) => {
|
|
277
|
+
i.put(n, r), fn(a);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
function bs(t, e) {
|
|
281
|
+
return B(t, un, ln, (r, n) => H(r, e, (i) => {
|
|
282
|
+
r.put((i || 0) + 1, e), fn(n);
|
|
283
|
+
}));
|
|
284
|
+
}
|
|
285
|
+
function _s(t, e, r) {
|
|
286
|
+
return r === 0 ? [] : B(t, [un, V], re, ([n, i], a, o) => {
|
|
287
|
+
const s = [];
|
|
288
|
+
n.index(Xi).openCursor(void 0, "prev").onsuccess = (l) => {
|
|
289
|
+
const c = l.target.result;
|
|
290
|
+
if (!c)
|
|
291
|
+
return o(s);
|
|
292
|
+
function d(g) {
|
|
293
|
+
if (s.push(g), s.length === r)
|
|
294
|
+
return o(s);
|
|
295
|
+
c.continue();
|
|
296
|
+
}
|
|
297
|
+
const h = c.primaryKey, f = e.byName(h);
|
|
298
|
+
if (f)
|
|
299
|
+
return d(f);
|
|
300
|
+
H(i, h, (g) => {
|
|
301
|
+
if (g)
|
|
302
|
+
return d(g);
|
|
303
|
+
c.continue();
|
|
304
|
+
});
|
|
305
|
+
};
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
const ye = "";
|
|
309
|
+
function Ts(t, e) {
|
|
310
|
+
const r = /* @__PURE__ */ new Map();
|
|
311
|
+
for (const i of t) {
|
|
312
|
+
const a = e(i);
|
|
313
|
+
for (const o of a) {
|
|
314
|
+
let s = r;
|
|
315
|
+
for (let c = 0; c < o.length; c++) {
|
|
316
|
+
const d = o.charAt(c);
|
|
317
|
+
let h = s.get(d);
|
|
318
|
+
h || (h = /* @__PURE__ */ new Map(), s.set(d, h)), s = h;
|
|
319
|
+
}
|
|
320
|
+
let l = s.get(ye);
|
|
321
|
+
l || (l = [], s.set(ye, l)), l.push(i);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return (i, a) => {
|
|
325
|
+
let o = r;
|
|
326
|
+
for (let c = 0; c < i.length; c++) {
|
|
327
|
+
const d = i.charAt(c), h = o.get(d);
|
|
328
|
+
if (h)
|
|
329
|
+
o = h;
|
|
330
|
+
else
|
|
331
|
+
return [];
|
|
332
|
+
}
|
|
333
|
+
if (a)
|
|
334
|
+
return o.get(ye) || [];
|
|
335
|
+
const s = [], l = [o];
|
|
336
|
+
for (; l.length; ) {
|
|
337
|
+
const d = [...l.shift().entries()].sort((h, f) => h[0] < f[0] ? -1 : 1);
|
|
338
|
+
for (const [h, f] of d)
|
|
339
|
+
h === ye ? s.push(...f) : l.push(f);
|
|
340
|
+
}
|
|
341
|
+
return s;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
const Es = [
|
|
345
|
+
"name",
|
|
346
|
+
"url"
|
|
347
|
+
];
|
|
348
|
+
function ks(t) {
|
|
349
|
+
const e = t && Array.isArray(t), r = e && t.length && (!t[0] || Es.some((n) => !(n in t[0])));
|
|
350
|
+
if (!e || r)
|
|
351
|
+
throw new Error("Custom emojis are in the wrong format");
|
|
352
|
+
}
|
|
353
|
+
function On(t) {
|
|
354
|
+
ks(t);
|
|
355
|
+
const e = (f, g) => f.name.toLowerCase() < g.name.toLowerCase() ? -1 : 1, r = t.sort(e), i = Ts(t, (f) => {
|
|
356
|
+
const g = /* @__PURE__ */ new Set();
|
|
357
|
+
if (f.shortcodes)
|
|
358
|
+
for (const T of f.shortcodes)
|
|
359
|
+
for (const S of Q(T))
|
|
360
|
+
g.add(S);
|
|
361
|
+
return g;
|
|
362
|
+
}), a = (f) => i(f, !0), o = (f) => i(f, !1), s = (f) => {
|
|
363
|
+
const g = Q(f), T = g.map((S, k) => (k < g.length - 1 ? a : o)(S));
|
|
364
|
+
return ro(T, (S) => S.name).sort(e);
|
|
365
|
+
}, l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
366
|
+
for (const f of t) {
|
|
367
|
+
c.set(f.name.toLowerCase(), f);
|
|
368
|
+
for (const g of f.shortcodes || [])
|
|
369
|
+
l.set(g.toLowerCase(), f);
|
|
370
|
+
}
|
|
371
|
+
return {
|
|
372
|
+
all: r,
|
|
373
|
+
search: s,
|
|
374
|
+
byShortcode: (f) => l.get(f.toLowerCase()),
|
|
375
|
+
byName: (f) => c.get(f.toLowerCase())
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
const ws = typeof wrappedJSObject < "u";
|
|
379
|
+
function ie(t) {
|
|
380
|
+
if (!t)
|
|
381
|
+
return t;
|
|
382
|
+
if (ws && (t = structuredClone(t)), delete t.tokens, t.skinTones) {
|
|
383
|
+
const e = t.skinTones.length;
|
|
384
|
+
t.skins = Array(e);
|
|
385
|
+
for (let r = 0; r < e; r++)
|
|
386
|
+
t.skins[r] = {
|
|
387
|
+
tone: t.skinTones[r],
|
|
388
|
+
unicode: t.skinUnicodes[r],
|
|
389
|
+
version: t.skinVersions[r]
|
|
390
|
+
};
|
|
391
|
+
delete t.skinTones, delete t.skinUnicodes, delete t.skinVersions;
|
|
392
|
+
}
|
|
393
|
+
return t;
|
|
394
|
+
}
|
|
395
|
+
function io(t) {
|
|
396
|
+
t || console.warn("emoji-picker-element is more efficient if the dataSource server exposes an ETag header.");
|
|
397
|
+
}
|
|
398
|
+
const Ss = [
|
|
399
|
+
"annotation",
|
|
400
|
+
"emoji",
|
|
401
|
+
"group",
|
|
402
|
+
"order",
|
|
403
|
+
"version"
|
|
404
|
+
];
|
|
405
|
+
function js(t) {
|
|
406
|
+
if (!t || !Array.isArray(t) || !t[0] || typeof t[0] != "object" || Ss.some((e) => !(e in t[0])))
|
|
407
|
+
throw new Error("Emoji data is in the wrong format");
|
|
408
|
+
}
|
|
409
|
+
function oo(t, e) {
|
|
410
|
+
if (Math.floor(t.status / 100) !== 2)
|
|
411
|
+
throw new Error("Failed to fetch: " + e + ": " + t.status);
|
|
412
|
+
}
|
|
413
|
+
async function Cs(t) {
|
|
414
|
+
const e = await fetch(t, { method: "HEAD" });
|
|
415
|
+
oo(e, t);
|
|
416
|
+
const r = e.headers.get("etag");
|
|
417
|
+
return io(r), r;
|
|
418
|
+
}
|
|
419
|
+
async function nn(t) {
|
|
420
|
+
const e = await fetch(t);
|
|
421
|
+
oo(e, t);
|
|
422
|
+
const r = e.headers.get("etag");
|
|
423
|
+
io(r);
|
|
424
|
+
const n = await e.json();
|
|
425
|
+
return js(n), [r, n];
|
|
426
|
+
}
|
|
427
|
+
function As(t) {
|
|
428
|
+
for (var e = "", r = new Uint8Array(t), n = r.byteLength, i = -1; ++i < n; )
|
|
429
|
+
e += String.fromCharCode(r[i]);
|
|
430
|
+
return e;
|
|
431
|
+
}
|
|
432
|
+
function Is(t) {
|
|
433
|
+
for (var e = t.length, r = new ArrayBuffer(e), n = new Uint8Array(r), i = -1; ++i < e; )
|
|
434
|
+
n[i] = t.charCodeAt(i);
|
|
435
|
+
return r;
|
|
436
|
+
}
|
|
437
|
+
async function so(t) {
|
|
438
|
+
const e = JSON.stringify(t);
|
|
439
|
+
let r = Is(e);
|
|
440
|
+
const n = await crypto.subtle.digest("SHA-1", r), i = As(n);
|
|
441
|
+
return btoa(i);
|
|
442
|
+
}
|
|
443
|
+
async function qs(t, e) {
|
|
444
|
+
let r, n = await Cs(e);
|
|
445
|
+
if (!n) {
|
|
446
|
+
const i = await nn(e);
|
|
447
|
+
n = i[0], r = i[1], n || (n = await so(r));
|
|
448
|
+
}
|
|
449
|
+
await hs(t, e, n) || (r || (r = (await nn(e))[1]), await no(t, r, e, n));
|
|
450
|
+
}
|
|
451
|
+
async function xs(t, e) {
|
|
452
|
+
let [r, n] = await nn(e);
|
|
453
|
+
r || (r = await so(n)), await no(t, n, e, r);
|
|
454
|
+
}
|
|
455
|
+
async function Rs(t, e) {
|
|
456
|
+
try {
|
|
457
|
+
await qs(t, e);
|
|
458
|
+
} catch (r) {
|
|
459
|
+
if (r.name !== "InvalidStateError")
|
|
460
|
+
throw r;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
class Os {
|
|
464
|
+
constructor({ dataSource: e = es, locale: r = ts, customEmoji: n = [] } = {}) {
|
|
465
|
+
this.dataSource = e, this.locale = r, this._dbName = `emoji-picker-element-${this.locale}`, this._db = void 0, this._lazyUpdate = void 0, this._custom = On(n), this._clear = this._clear.bind(this), this._ready = this._init();
|
|
466
|
+
}
|
|
467
|
+
async _init() {
|
|
468
|
+
const e = this._db = await is(this._dbName);
|
|
469
|
+
ss(this._dbName, this._clear);
|
|
470
|
+
const r = this.dataSource;
|
|
471
|
+
await fs(e) ? await xs(e, r) : this._lazyUpdate = Rs(e, r);
|
|
472
|
+
}
|
|
473
|
+
async ready() {
|
|
474
|
+
const e = async () => (this._ready || (this._ready = this._init()), this._ready);
|
|
475
|
+
await e(), this._db || await e();
|
|
476
|
+
}
|
|
477
|
+
async getEmojiByGroup(e) {
|
|
478
|
+
return He(e), await this.ready(), Rn(await vs(this._db, e)).map(ie);
|
|
479
|
+
}
|
|
480
|
+
async getEmojiBySearchQuery(e) {
|
|
481
|
+
me(e), await this.ready();
|
|
482
|
+
const r = this._custom.search(e), n = Rn(await ao(this._db, e)).map(ie);
|
|
483
|
+
return [
|
|
484
|
+
...r,
|
|
485
|
+
...n
|
|
486
|
+
];
|
|
487
|
+
}
|
|
488
|
+
async getEmojiByShortcode(e) {
|
|
489
|
+
me(e), await this.ready();
|
|
490
|
+
const r = this._custom.byShortcode(e);
|
|
491
|
+
return r || ie(await gs(this._db, e));
|
|
492
|
+
}
|
|
493
|
+
async getEmojiByUnicodeOrName(e) {
|
|
494
|
+
me(e), await this.ready();
|
|
495
|
+
const r = this._custom.byName(e);
|
|
496
|
+
return r || ie(await ms(this._db, e));
|
|
497
|
+
}
|
|
498
|
+
async getPreferredSkinTone() {
|
|
499
|
+
return await this.ready(), await hn(this._db, ee, xn) || 0;
|
|
500
|
+
}
|
|
501
|
+
async setPreferredSkinTone(e) {
|
|
502
|
+
return He(e), await this.ready(), ys(this._db, ee, xn, e);
|
|
503
|
+
}
|
|
504
|
+
async incrementFavoriteEmojiCount(e) {
|
|
505
|
+
return me(e), await this.ready(), bs(this._db, e);
|
|
506
|
+
}
|
|
507
|
+
async getTopFavoriteEmoji(e) {
|
|
508
|
+
return He(e), await this.ready(), (await _s(this._db, this._custom, e)).map(ie);
|
|
509
|
+
}
|
|
510
|
+
set customEmoji(e) {
|
|
511
|
+
this._custom = On(e);
|
|
512
|
+
}
|
|
513
|
+
get customEmoji() {
|
|
514
|
+
return this._custom.all;
|
|
515
|
+
}
|
|
516
|
+
async _shutdown() {
|
|
517
|
+
await this.ready();
|
|
518
|
+
try {
|
|
519
|
+
await this._lazyUpdate;
|
|
520
|
+
} catch {
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
// clear references to IDB, e.g. during a close event
|
|
524
|
+
_clear() {
|
|
525
|
+
this._db = this._ready = this._lazyUpdate = void 0;
|
|
526
|
+
}
|
|
527
|
+
async close() {
|
|
528
|
+
await this._shutdown(), await dn(this._dbName);
|
|
529
|
+
}
|
|
530
|
+
async delete() {
|
|
531
|
+
await this._shutdown(), await os(this._dbName);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
const an = [
|
|
535
|
+
[-1, "✨", "custom"],
|
|
536
|
+
[0, "😀", "smileys-emotion"],
|
|
537
|
+
[1, "👋", "people-body"],
|
|
538
|
+
[3, "🐱", "animals-nature"],
|
|
539
|
+
[4, "🍎", "food-drink"],
|
|
540
|
+
[5, "🏠️", "travel-places"],
|
|
541
|
+
[6, "⚽", "activities"],
|
|
542
|
+
[7, "📝", "objects"],
|
|
543
|
+
[8, "⛔️", "symbols"],
|
|
544
|
+
[9, "🏁", "flags"]
|
|
545
|
+
].map(([t, e, r]) => ({ id: t, emoji: e, name: r })), Ve = an.slice(1), Ms = 2, Mn = 6, co = typeof requestIdleCallback == "function" ? requestIdleCallback : setTimeout;
|
|
546
|
+
function Dn(t) {
|
|
547
|
+
return t.unicode.includes("");
|
|
548
|
+
}
|
|
549
|
+
const Ds = {
|
|
550
|
+
"": 17,
|
|
551
|
+
// distorted face
|
|
552
|
+
"": 16,
|
|
553
|
+
// face with bags under eyes
|
|
554
|
+
"🫨": 15.1,
|
|
555
|
+
// shaking head, technically from v15 but see note above
|
|
556
|
+
"🫠": 14,
|
|
557
|
+
"🥲": 13.1,
|
|
558
|
+
// smiling face with tear, technically from v13 but see note above
|
|
559
|
+
"🥻": 12.1,
|
|
560
|
+
// sari, technically from v12 but see note above
|
|
561
|
+
"🥰": 11,
|
|
562
|
+
"🤩": 5,
|
|
563
|
+
"👱♀️": 4,
|
|
564
|
+
"🤣": 3,
|
|
565
|
+
"👁️🗨️": 2,
|
|
566
|
+
"😀": 1,
|
|
567
|
+
"😐️": 0.7,
|
|
568
|
+
"😃": 0.6
|
|
569
|
+
}, Ls = 1e3, Ps = "🖐️", Bs = 8, Fs = [
|
|
570
|
+
"😊",
|
|
571
|
+
"😒",
|
|
572
|
+
"❤️",
|
|
573
|
+
"👍️",
|
|
574
|
+
"😍",
|
|
575
|
+
"😂",
|
|
576
|
+
"😭",
|
|
577
|
+
"☺️",
|
|
578
|
+
"😔",
|
|
579
|
+
"😩",
|
|
580
|
+
"😏",
|
|
581
|
+
"💕",
|
|
582
|
+
"🙌",
|
|
583
|
+
"😘"
|
|
584
|
+
], uo = '"Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif', Ns = (t, e) => t < e ? -1 : t > e ? 1 : 0, Ln = (t, e) => {
|
|
585
|
+
const r = document.createElement("canvas");
|
|
586
|
+
r.width = r.height = 1;
|
|
587
|
+
const n = r.getContext("2d", {
|
|
588
|
+
// Improves the performance of `getImageData()`
|
|
589
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getContextAttributes#willreadfrequently
|
|
590
|
+
willReadFrequently: !0
|
|
591
|
+
});
|
|
592
|
+
return n.textBaseline = "top", n.font = `100px ${uo}`, n.fillStyle = e, n.scale(0.01, 0.01), n.fillText(t, 0, 0), n.getImageData(0, 0, 1, 1).data;
|
|
593
|
+
}, Us = (t, e) => {
|
|
594
|
+
const r = [...t].join(","), n = [...e].join(",");
|
|
595
|
+
return r === n && !r.startsWith("0,0,0,");
|
|
596
|
+
};
|
|
597
|
+
function $s(t) {
|
|
598
|
+
const e = Ln(t, "#000"), r = Ln(t, "#fff");
|
|
599
|
+
return e && r && Us(e, r);
|
|
600
|
+
}
|
|
601
|
+
function Ks() {
|
|
602
|
+
const t = Object.entries(Ds);
|
|
603
|
+
try {
|
|
604
|
+
for (const [e, r] of t)
|
|
605
|
+
if ($s(e))
|
|
606
|
+
return r;
|
|
607
|
+
} catch {
|
|
608
|
+
}
|
|
609
|
+
return t[0][1];
|
|
610
|
+
}
|
|
611
|
+
let We;
|
|
612
|
+
const Xe = () => (We || (We = new Promise((t) => co(() => t(Ks())))), We), on = /* @__PURE__ */ new Map(), zs = "️", Gs = "\uD83C", Hs = "", Vs = 127995, Ws = 57339;
|
|
613
|
+
function Xs(t, e) {
|
|
614
|
+
if (e === 0)
|
|
615
|
+
return t;
|
|
616
|
+
const r = t.indexOf(Hs);
|
|
617
|
+
return r !== -1 ? t.substring(0, r) + String.fromCodePoint(Vs + e - 1) + t.substring(r) : (t.endsWith(zs) && (t = t.substring(0, t.length - 1)), t + Gs + String.fromCodePoint(Ws + e - 1));
|
|
618
|
+
}
|
|
619
|
+
function D(t) {
|
|
620
|
+
t.preventDefault(), t.stopPropagation();
|
|
621
|
+
}
|
|
622
|
+
function Ye(t, e, r) {
|
|
623
|
+
return e += t ? -1 : 1, e < 0 ? e = r.length - 1 : e >= r.length && (e = 0), e;
|
|
624
|
+
}
|
|
625
|
+
function lo(t, e) {
|
|
626
|
+
const r = /* @__PURE__ */ new Set(), n = [];
|
|
627
|
+
for (const i of t) {
|
|
628
|
+
const a = e(i);
|
|
629
|
+
r.has(a) || (r.add(a), n.push(i));
|
|
630
|
+
}
|
|
631
|
+
return n;
|
|
632
|
+
}
|
|
633
|
+
function Ys(t, e) {
|
|
634
|
+
const r = (n) => {
|
|
635
|
+
const i = {};
|
|
636
|
+
for (const a of n)
|
|
637
|
+
typeof a.tone == "number" && a.version <= e && (i[a.tone] = a.unicode);
|
|
638
|
+
return i;
|
|
639
|
+
};
|
|
640
|
+
return t.map(({ unicode: n, skins: i, shortcodes: a, url: o, name: s, category: l, annotation: c }) => ({
|
|
641
|
+
unicode: n,
|
|
642
|
+
name: s,
|
|
643
|
+
shortcodes: a,
|
|
644
|
+
url: o,
|
|
645
|
+
category: l,
|
|
646
|
+
annotation: c,
|
|
647
|
+
id: n || s,
|
|
648
|
+
skins: i && r(i)
|
|
649
|
+
}));
|
|
650
|
+
}
|
|
651
|
+
const Ee = requestAnimationFrame;
|
|
652
|
+
let Zs = typeof ResizeObserver == "function";
|
|
653
|
+
function Js(t, e, r) {
|
|
654
|
+
let n;
|
|
655
|
+
Zs ? (n = new ResizeObserver(r), n.observe(t)) : Ee(r), e.addEventListener("abort", () => {
|
|
656
|
+
n && n.disconnect();
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
function Pn(t) {
|
|
660
|
+
{
|
|
661
|
+
const e = document.createRange();
|
|
662
|
+
return e.selectNode(t.firstChild), e.getBoundingClientRect().width;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
let Ze;
|
|
666
|
+
function Qs(t, e, r) {
|
|
667
|
+
let n = !0;
|
|
668
|
+
for (const i of t) {
|
|
669
|
+
const a = r(i);
|
|
670
|
+
if (!a)
|
|
671
|
+
continue;
|
|
672
|
+
const o = Pn(a);
|
|
673
|
+
typeof Ze > "u" && (Ze = Pn(e));
|
|
674
|
+
const s = o / 1.8 < Ze;
|
|
675
|
+
on.set(i.unicode, s), s || (n = !1);
|
|
676
|
+
}
|
|
677
|
+
return n;
|
|
678
|
+
}
|
|
679
|
+
function ec(t) {
|
|
680
|
+
return lo(t, (e) => e);
|
|
681
|
+
}
|
|
682
|
+
function tc(t) {
|
|
683
|
+
t && (t.scrollTop = 0);
|
|
684
|
+
}
|
|
685
|
+
function ue(t, e, r) {
|
|
686
|
+
let n = t.get(e);
|
|
687
|
+
return n || (n = r(), t.set(e, n)), n;
|
|
688
|
+
}
|
|
689
|
+
function Bn(t) {
|
|
690
|
+
return "" + t;
|
|
691
|
+
}
|
|
692
|
+
function rc(t) {
|
|
693
|
+
const e = document.createElement("template");
|
|
694
|
+
return e.innerHTML = t, e;
|
|
695
|
+
}
|
|
696
|
+
const nc = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakMap(), ic = /* @__PURE__ */ Symbol("un-keyed"), oc = "replaceChildren" in Element.prototype;
|
|
697
|
+
function sc(t, e) {
|
|
698
|
+
oc ? t.replaceChildren(...e) : (t.innerHTML = "", t.append(...e));
|
|
699
|
+
}
|
|
700
|
+
function cc(t, e) {
|
|
701
|
+
let r = t.firstChild, n = 0;
|
|
702
|
+
for (; r; ) {
|
|
703
|
+
if (e[n] !== r)
|
|
704
|
+
return !0;
|
|
705
|
+
r = r.nextSibling, n++;
|
|
706
|
+
}
|
|
707
|
+
return n !== e.length;
|
|
708
|
+
}
|
|
709
|
+
function uc(t, e) {
|
|
710
|
+
const { targetNode: r } = e;
|
|
711
|
+
let { targetParentNode: n } = e, i = !1;
|
|
712
|
+
n ? i = cc(n, t) : (i = !0, e.targetNode = void 0, e.targetParentNode = n = r.parentNode), i && sc(n, t);
|
|
713
|
+
}
|
|
714
|
+
function lc(t, e) {
|
|
715
|
+
for (const r of e) {
|
|
716
|
+
const {
|
|
717
|
+
targetNode: n,
|
|
718
|
+
currentExpression: i,
|
|
719
|
+
binding: {
|
|
720
|
+
expressionIndex: a,
|
|
721
|
+
attributeName: o,
|
|
722
|
+
attributeValuePre: s,
|
|
723
|
+
attributeValuePost: l
|
|
724
|
+
}
|
|
725
|
+
} = r, c = t[a];
|
|
726
|
+
if (i !== c)
|
|
727
|
+
if (r.currentExpression = c, o)
|
|
728
|
+
if (c === null)
|
|
729
|
+
n.removeAttribute(o);
|
|
730
|
+
else {
|
|
731
|
+
const d = s + Bn(c) + l;
|
|
732
|
+
n.setAttribute(o, d);
|
|
733
|
+
}
|
|
734
|
+
else {
|
|
735
|
+
let d;
|
|
736
|
+
Array.isArray(c) ? uc(c, r) : c instanceof Element ? (d = c, n.replaceWith(d)) : n.nodeValue = Bn(c), d && (r.targetNode = d);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
function dc(t) {
|
|
741
|
+
let e = "", r = !1, n = !1, i = -1;
|
|
742
|
+
const a = /* @__PURE__ */ new Map(), o = [];
|
|
743
|
+
let s = 0;
|
|
744
|
+
for (let c = 0, d = t.length; c < d; c++) {
|
|
745
|
+
const h = t[c];
|
|
746
|
+
if (e += h.slice(s), c === d - 1)
|
|
747
|
+
break;
|
|
748
|
+
for (let v = 0; v < h.length; v++)
|
|
749
|
+
switch (h.charAt(v)) {
|
|
750
|
+
case "<": {
|
|
751
|
+
h.charAt(v + 1) === "/" ? o.pop() : (r = !0, o.push(++i));
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
case ">": {
|
|
755
|
+
r = !1, n = !1;
|
|
756
|
+
break;
|
|
757
|
+
}
|
|
758
|
+
case "=": {
|
|
759
|
+
n = !0;
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
const f = o[o.length - 1], g = ue(a, f, () => []);
|
|
764
|
+
let T, S, k;
|
|
765
|
+
if (n) {
|
|
766
|
+
const v = /(\S+)="?([^"=]*)$/.exec(h);
|
|
767
|
+
T = v[1], S = v[2];
|
|
768
|
+
const b = /^([^">]*)("?)/.exec(t[c + 1]);
|
|
769
|
+
k = b[1], e = e.slice(0, -1 * v[0].length), s = b[0].length;
|
|
770
|
+
} else
|
|
771
|
+
s = 0;
|
|
772
|
+
const A = {
|
|
773
|
+
attributeName: T,
|
|
774
|
+
attributeValuePre: S,
|
|
775
|
+
attributeValuePost: k,
|
|
776
|
+
expressionIndex: c
|
|
777
|
+
};
|
|
778
|
+
g.push(A), !r && !n && (e += " ");
|
|
779
|
+
}
|
|
780
|
+
return {
|
|
781
|
+
template: rc(e),
|
|
782
|
+
elementsToBindings: a
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
function Fn(t, e, r) {
|
|
786
|
+
for (let n = 0; n < t.length; n++) {
|
|
787
|
+
const i = t[n], a = i.attributeName ? e : e.firstChild, o = {
|
|
788
|
+
binding: i,
|
|
789
|
+
targetNode: a,
|
|
790
|
+
targetParentNode: void 0,
|
|
791
|
+
currentExpression: void 0
|
|
792
|
+
};
|
|
793
|
+
r.push(o);
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
function fc(t, e) {
|
|
797
|
+
const r = [];
|
|
798
|
+
let n;
|
|
799
|
+
if (e.size === 1 && (n = e.get(0)))
|
|
800
|
+
Fn(n, t, r);
|
|
801
|
+
else {
|
|
802
|
+
const i = document.createTreeWalker(t, NodeFilter.SHOW_ELEMENT);
|
|
803
|
+
let a = t, o = -1;
|
|
804
|
+
do {
|
|
805
|
+
const s = e.get(++o);
|
|
806
|
+
s && Fn(s, a, r);
|
|
807
|
+
} while (a = i.nextNode());
|
|
808
|
+
}
|
|
809
|
+
return r;
|
|
810
|
+
}
|
|
811
|
+
function hc(t) {
|
|
812
|
+
const { template: e, elementsToBindings: r } = ue(nc, t, () => dc(t)), n = e.cloneNode(!0).content.firstElementChild, i = fc(n, r);
|
|
813
|
+
return function(o) {
|
|
814
|
+
return lc(o, i), n;
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
function pc(t) {
|
|
818
|
+
const e = ue(ac, t, () => /* @__PURE__ */ new Map());
|
|
819
|
+
let r = ic;
|
|
820
|
+
function n(a, ...o) {
|
|
821
|
+
const s = ue(e, a, () => /* @__PURE__ */ new Map());
|
|
822
|
+
return ue(s, r, () => hc(a))(o);
|
|
823
|
+
}
|
|
824
|
+
function i(a, o, s) {
|
|
825
|
+
return a.map((l, c) => {
|
|
826
|
+
const d = r;
|
|
827
|
+
r = s(l);
|
|
828
|
+
try {
|
|
829
|
+
return o(l, c);
|
|
830
|
+
} finally {
|
|
831
|
+
r = d;
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
return { map: i, html: n };
|
|
836
|
+
}
|
|
837
|
+
function vc(t, e, r, n, i, a, o, s, l) {
|
|
838
|
+
const { labelWithSkin: c, titleForEmoji: d, unicodeWithSkin: h } = r, { html: f, map: g } = pc(e);
|
|
839
|
+
function T(v, b, j) {
|
|
840
|
+
return g(v, (C, R) => f`<button role="${b ? "option" : "menuitem"}" aria-selected="${b ? R === e.activeSearchItem : null}" aria-label="${c(C, e.currentSkinTone)}" title="${d(C)}" class="${"emoji" + (b && R === e.activeSearchItem ? " active" : "") + (C.unicode ? "" : " custom-emoji")}" id="${`${j}-${C.id}`}" style="${C.unicode ? null : `--custom-emoji-background: url(${JSON.stringify(C.url)})`}">${C.unicode ? h(C, e.currentSkinTone) : ""}</button>`, (C) => `${j}-${C.id}`);
|
|
841
|
+
}
|
|
842
|
+
const k = f`<section data-ref="rootElement" class="picker" aria-label="${e.i18n.regionLabel}" style="${e.pickerStyle || ""}"><div class="pad-top"></div><div class="search-row"><div class="search-wrapper"><input id="search" class="search" type="search" role="combobox" enterkeyhint="search" placeholder="${e.i18n.searchLabel}" autocapitalize="none" autocomplete="off" spellcheck="true" aria-expanded="${!!(e.searchMode && e.currentEmojis.length)}" aria-controls="search-results" aria-describedby="search-description" aria-autocomplete="list" aria-activedescendant="${e.activeSearchItemId ? `emo-${e.activeSearchItemId}` : null}" data-ref="searchElement" data-on-input="onSearchInput" data-on-keydown="onSearchKeydown"><label class="sr-only" for="search">${e.i18n.searchLabel}</label> <span id="search-description" class="sr-only">${e.i18n.searchDescription}</span></div><div class="skintone-button-wrapper ${e.skinTonePickerExpandedAfterAnimation ? "expanded" : ""}"><button id="skintone-button" class="emoji ${e.skinTonePickerExpanded ? "hide-focus" : ""}" aria-label="${e.skinToneButtonLabel}" title="${e.skinToneButtonLabel}" aria-describedby="skintone-description" aria-haspopup="listbox" aria-expanded="${e.skinTonePickerExpanded}" aria-controls="skintone-list" data-on-click="onClickSkinToneButton">${e.skinToneButtonText || ""}</button></div><span id="skintone-description" class="sr-only">${e.i18n.skinToneDescription}</span><div data-ref="skinToneDropdown" id="skintone-list" class="skintone-list hide-focus ${e.skinTonePickerExpanded ? "" : "hidden no-animate"}" style="transform:translateY(${e.skinTonePickerExpanded ? 0 : "calc(-1 * var(--num-skintones) * var(--total-emoji-size))"})" role="listbox" aria-label="${e.i18n.skinTonesLabel}" aria-activedescendant="skintone-${e.activeSkinTone}" aria-hidden="${!e.skinTonePickerExpanded}" tabIndex="-1" data-on-focusout="onSkinToneOptionsFocusOut" data-on-click="onSkinToneOptionsClick" data-on-keydown="onSkinToneOptionsKeydown" data-on-keyup="onSkinToneOptionsKeyup">${g(e.skinTones, (v, b) => f`<div id="skintone-${b}" class="emoji ${b === e.activeSkinTone ? "active" : ""}" aria-selected="${b === e.activeSkinTone}" role="option" title="${e.i18n.skinTones[b]}" aria-label="${e.i18n.skinTones[b]}">${v}</div>`, (v) => v)}</div></div><div class="nav" role="tablist" style="grid-template-columns:repeat(${e.groups.length},1fr)" aria-label="${e.i18n.categoriesLabel}" data-on-keydown="onNavKeydown" data-on-click="onNavClick">${g(e.groups, (v) => f`<button role="tab" class="nav-button" aria-controls="tab-${v.id}" aria-label="${e.i18n.categories[v.name]}" aria-selected="${!e.searchMode && e.currentGroup.id === v.id}" title="${e.i18n.categories[v.name]}" data-group-id="${v.id}"><div class="nav-emoji emoji">${v.emoji}</div></button>`, (v) => v.id)}</div><div class="indicator-wrapper"><div class="indicator" style="transform:translateX(${/* istanbul ignore next */
|
|
843
|
+
(e.isRtl ? -1 : 1) * e.currentGroupIndex * 100}%)"></div></div><div class="message ${e.message ? "" : "gone"}" role="alert" aria-live="polite">${e.message || ""}</div><div data-ref="tabpanelElement" class="tabpanel ${!e.databaseLoaded || e.message ? "gone" : ""}" role="${e.searchMode ? "region" : "tabpanel"}" aria-label="${e.searchMode ? e.i18n.searchResultsLabel : e.i18n.categories[e.currentGroup.name]}" id="${e.searchMode ? null : `tab-${e.currentGroup.id}`}" tabIndex="0" data-on-click="onEmojiClick"><div data-action="calculateEmojiGridStyle">${g(e.currentEmojisWithCategories, (v, b) => f`<div><div id="menu-label-${b}" class="category ${e.currentEmojisWithCategories.length === 1 && e.currentEmojisWithCategories[0].category === "" ? "gone" : ""}" aria-hidden="true">${e.searchMode ? e.i18n.searchResultsLabel : v.category ? v.category : e.currentEmojisWithCategories.length > 1 ? e.i18n.categories.custom : e.i18n.categories[e.currentGroup.name]}</div><div class="emoji-menu ${b !== 0 && !e.searchMode && e.currentGroup.id === -1 ? "visibility-auto" : ""}" style="${`--num-rows: ${Math.ceil(v.emojis.length / e.numColumns)}`}" data-action="updateOnIntersection" role="${e.searchMode ? "listbox" : "menu"}" aria-labelledby="menu-label-${b}" id="${e.searchMode ? "search-results" : null}">${T(
|
|
844
|
+
v.emojis,
|
|
845
|
+
e.searchMode,
|
|
846
|
+
/* prefix */
|
|
847
|
+
"emo"
|
|
848
|
+
)}</div></div>`, (v) => v.category)}</div></div><div class="favorites onscreen emoji-menu ${e.message ? "gone" : ""}" role="menu" aria-label="${e.i18n.favoritesLabel}" data-on-click="onEmojiClick">${T(
|
|
849
|
+
e.currentFavorites,
|
|
850
|
+
/* searchMode */
|
|
851
|
+
!1,
|
|
852
|
+
/* prefix */
|
|
853
|
+
"fav"
|
|
854
|
+
)}</div><button data-ref="baselineEmoji" aria-hidden="true" tabindex="-1" class="abs-pos hidden emoji baseline-emoji">😀</button></section>`, A = (v, b) => {
|
|
855
|
+
for (const j of t.querySelectorAll(`[${v}]`))
|
|
856
|
+
b(j, j.getAttribute(v));
|
|
857
|
+
};
|
|
858
|
+
if (l) {
|
|
859
|
+
t.appendChild(k);
|
|
860
|
+
for (const v of ["click", "focusout", "input", "keydown", "keyup"])
|
|
861
|
+
A(`data-on-${v}`, (b, j) => {
|
|
862
|
+
b.addEventListener(v, n[j]);
|
|
863
|
+
});
|
|
864
|
+
A("data-ref", (v, b) => {
|
|
865
|
+
a[b] = v;
|
|
866
|
+
}), o.addEventListener("abort", () => {
|
|
867
|
+
t.removeChild(k);
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
A("data-action", (v, b) => {
|
|
871
|
+
let j = s.get(b);
|
|
872
|
+
j || s.set(b, j = /* @__PURE__ */ new WeakSet()), j.has(v) || (j.add(v), i[b](v));
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
const Se = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
876
|
+
function gc(t) {
|
|
877
|
+
let e = !1, r;
|
|
878
|
+
const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
|
|
879
|
+
let a;
|
|
880
|
+
const o = () => {
|
|
881
|
+
if (e)
|
|
882
|
+
return;
|
|
883
|
+
const c = [...i];
|
|
884
|
+
i.clear();
|
|
885
|
+
try {
|
|
886
|
+
for (const d of c)
|
|
887
|
+
d();
|
|
888
|
+
} finally {
|
|
889
|
+
a = !1, i.size && (a = !0, Se(o));
|
|
890
|
+
}
|
|
891
|
+
}, s = new Proxy({}, {
|
|
892
|
+
get(c, d) {
|
|
893
|
+
if (r) {
|
|
894
|
+
let h = n.get(d);
|
|
895
|
+
h || (h = /* @__PURE__ */ new Set(), n.set(d, h)), h.add(r);
|
|
896
|
+
}
|
|
897
|
+
return c[d];
|
|
898
|
+
},
|
|
899
|
+
set(c, d, h) {
|
|
900
|
+
if (c[d] !== h) {
|
|
901
|
+
c[d] = h;
|
|
902
|
+
const f = n.get(d);
|
|
903
|
+
if (f) {
|
|
904
|
+
for (const g of f)
|
|
905
|
+
i.add(g);
|
|
906
|
+
a || (a = !0, Se(o));
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
return !0;
|
|
910
|
+
}
|
|
911
|
+
}), l = (c) => {
|
|
912
|
+
const d = () => {
|
|
913
|
+
const h = r;
|
|
914
|
+
r = d;
|
|
915
|
+
try {
|
|
916
|
+
return c();
|
|
917
|
+
} finally {
|
|
918
|
+
r = h;
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
return d();
|
|
922
|
+
};
|
|
923
|
+
return t.addEventListener("abort", () => {
|
|
924
|
+
e = !0;
|
|
925
|
+
}), {
|
|
926
|
+
state: s,
|
|
927
|
+
createEffect: l
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
function Je(t, e, r) {
|
|
931
|
+
if (t.length !== e.length)
|
|
932
|
+
return !1;
|
|
933
|
+
for (let n = 0; n < t.length; n++)
|
|
934
|
+
if (!r(t[n], e[n]))
|
|
935
|
+
return !1;
|
|
936
|
+
return !0;
|
|
937
|
+
}
|
|
938
|
+
const Nn = /* @__PURE__ */ new WeakMap();
|
|
939
|
+
function mc(t, e, r) {
|
|
940
|
+
{
|
|
941
|
+
const n = t.closest(".tabpanel");
|
|
942
|
+
let i = Nn.get(n);
|
|
943
|
+
i || (i = new IntersectionObserver(r, {
|
|
944
|
+
root: n,
|
|
945
|
+
// trigger if we are 1/2 scroll container height away so that the images load a bit quicker while scrolling
|
|
946
|
+
rootMargin: "50% 0px 50% 0px",
|
|
947
|
+
// trigger if any part of the emoji grid is intersecting
|
|
948
|
+
threshold: 0
|
|
949
|
+
}), Nn.set(n, i), e.addEventListener("abort", () => {
|
|
950
|
+
i.disconnect();
|
|
951
|
+
})), i.observe(t);
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
const Qe = [], { assign: be } = Object;
|
|
955
|
+
function yc(t, e) {
|
|
956
|
+
const r = {}, n = new AbortController(), i = n.signal, { state: a, createEffect: o } = gc(i), s = /* @__PURE__ */ new Map();
|
|
957
|
+
be(a, {
|
|
958
|
+
skinToneEmoji: void 0,
|
|
959
|
+
i18n: void 0,
|
|
960
|
+
database: void 0,
|
|
961
|
+
customEmoji: void 0,
|
|
962
|
+
customCategorySorting: void 0,
|
|
963
|
+
emojiVersion: void 0
|
|
964
|
+
}), be(a, e), be(a, {
|
|
965
|
+
initialLoad: !0,
|
|
966
|
+
currentEmojis: [],
|
|
967
|
+
currentEmojisWithCategories: [],
|
|
968
|
+
rawSearchText: "",
|
|
969
|
+
searchText: "",
|
|
970
|
+
searchMode: !1,
|
|
971
|
+
activeSearchItem: -1,
|
|
972
|
+
message: void 0,
|
|
973
|
+
skinTonePickerExpanded: !1,
|
|
974
|
+
skinTonePickerExpandedAfterAnimation: !1,
|
|
975
|
+
currentSkinTone: 0,
|
|
976
|
+
activeSkinTone: 0,
|
|
977
|
+
skinToneButtonText: void 0,
|
|
978
|
+
pickerStyle: void 0,
|
|
979
|
+
skinToneButtonLabel: "",
|
|
980
|
+
skinTones: [],
|
|
981
|
+
currentFavorites: [],
|
|
982
|
+
defaultFavoriteEmojis: void 0,
|
|
983
|
+
numColumns: Bs,
|
|
984
|
+
isRtl: !1,
|
|
985
|
+
currentGroupIndex: 0,
|
|
986
|
+
groups: Ve,
|
|
987
|
+
databaseLoaded: !1,
|
|
988
|
+
activeSearchItemId: void 0
|
|
989
|
+
}), o(() => {
|
|
990
|
+
a.currentGroup !== a.groups[a.currentGroupIndex] && (a.currentGroup = a.groups[a.currentGroupIndex]);
|
|
991
|
+
});
|
|
992
|
+
const l = (u) => {
|
|
993
|
+
t.getElementById(u).focus();
|
|
994
|
+
}, c = (u) => t.getElementById(`emo-${u.id}`), d = (u, p) => {
|
|
995
|
+
r.rootElement.dispatchEvent(new CustomEvent(u, {
|
|
996
|
+
detail: p,
|
|
997
|
+
bubbles: !0,
|
|
998
|
+
composed: !0
|
|
999
|
+
}));
|
|
1000
|
+
}, h = (u, p) => u.id === p.id, f = (u, p) => {
|
|
1001
|
+
const { category: m, emojis: _ } = u, { category: I, emojis: y } = p;
|
|
1002
|
+
return m !== I ? !1 : Je(_, y, h);
|
|
1003
|
+
}, g = (u) => {
|
|
1004
|
+
Je(a.currentEmojis, u, h) || (a.currentEmojis = u);
|
|
1005
|
+
}, T = (u) => {
|
|
1006
|
+
a.searchMode !== u && (a.searchMode = u);
|
|
1007
|
+
}, S = (u) => {
|
|
1008
|
+
Je(a.currentEmojisWithCategories, u, f) || (a.currentEmojisWithCategories = u);
|
|
1009
|
+
}, k = (u, p) => p && u.skins && u.skins[p] || u.unicode, b = {
|
|
1010
|
+
labelWithSkin: (u, p) => ec([
|
|
1011
|
+
u.name || k(u, p),
|
|
1012
|
+
u.annotation,
|
|
1013
|
+
...u.shortcodes || Qe
|
|
1014
|
+
].filter(Boolean)).join(", "),
|
|
1015
|
+
titleForEmoji: (u) => u.annotation || (u.shortcodes || Qe).join(", "),
|
|
1016
|
+
unicodeWithSkin: k
|
|
1017
|
+
}, j = {
|
|
1018
|
+
onClickSkinToneButton: Fe,
|
|
1019
|
+
onEmojiClick: Pe,
|
|
1020
|
+
onNavClick: de,
|
|
1021
|
+
onNavKeydown: De,
|
|
1022
|
+
onSearchKeydown: Me,
|
|
1023
|
+
onSkinToneOptionsClick: Be,
|
|
1024
|
+
onSkinToneOptionsFocusOut: $e,
|
|
1025
|
+
onSkinToneOptionsKeydown: Ne,
|
|
1026
|
+
onSkinToneOptionsKeyup: Ue,
|
|
1027
|
+
onSearchInput: Ke
|
|
1028
|
+
}, C = {
|
|
1029
|
+
calculateEmojiGridStyle: z,
|
|
1030
|
+
updateOnIntersection: x
|
|
1031
|
+
};
|
|
1032
|
+
let R = !0;
|
|
1033
|
+
o(() => {
|
|
1034
|
+
vc(t, a, b, j, C, r, i, s, R), R = !1;
|
|
1035
|
+
}), a.emojiVersion || Xe().then((u) => {
|
|
1036
|
+
u || (a.message = a.i18n.emojiUnsupportedMessage);
|
|
1037
|
+
}), o(() => {
|
|
1038
|
+
async function u() {
|
|
1039
|
+
let p = !1;
|
|
1040
|
+
const m = setTimeout(() => {
|
|
1041
|
+
p = !0, a.message = a.i18n.loadingMessage;
|
|
1042
|
+
}, Ls);
|
|
1043
|
+
try {
|
|
1044
|
+
await a.database.ready(), a.databaseLoaded = !0;
|
|
1045
|
+
} catch (_) {
|
|
1046
|
+
console.error(_), a.message = a.i18n.networkErrorMessage;
|
|
1047
|
+
} finally {
|
|
1048
|
+
clearTimeout(m), p && (p = !1, a.message = "");
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
a.database && u();
|
|
1052
|
+
}), o(() => {
|
|
1053
|
+
a.pickerStyle = `
|
|
1054
|
+
--num-groups: ${a.groups.length};
|
|
1055
|
+
--indicator-opacity: ${a.searchMode ? 0 : 1};
|
|
1056
|
+
--num-skintones: ${Mn};`;
|
|
1057
|
+
}), o(() => {
|
|
1058
|
+
a.customEmoji && a.database && F();
|
|
1059
|
+
}), o(() => {
|
|
1060
|
+
a.customEmoji && a.customEmoji.length ? a.groups !== an && (a.groups = an) : a.groups !== Ve && (a.currentGroupIndex && a.currentGroupIndex--, a.groups = Ve);
|
|
1061
|
+
}), o(() => {
|
|
1062
|
+
async function u() {
|
|
1063
|
+
a.databaseLoaded && (a.currentSkinTone = await a.database.getPreferredSkinTone());
|
|
1064
|
+
}
|
|
1065
|
+
u();
|
|
1066
|
+
}), o(() => {
|
|
1067
|
+
a.skinTones = Array(Mn).fill().map((u, p) => Xs(a.skinToneEmoji, p));
|
|
1068
|
+
}), o(() => {
|
|
1069
|
+
a.skinToneButtonText = a.skinTones[a.currentSkinTone];
|
|
1070
|
+
}), o(() => {
|
|
1071
|
+
a.skinToneButtonLabel = a.i18n.skinToneLabel.replace("{skinTone}", a.i18n.skinTones[a.currentSkinTone]);
|
|
1072
|
+
}), o(() => {
|
|
1073
|
+
async function u() {
|
|
1074
|
+
const { database: p } = a, m = (await Promise.all(Fs.map((_) => p.getEmojiByUnicodeOrName(_)))).filter(Boolean);
|
|
1075
|
+
a.defaultFavoriteEmojis = m;
|
|
1076
|
+
}
|
|
1077
|
+
a.databaseLoaded && u();
|
|
1078
|
+
});
|
|
1079
|
+
function F() {
|
|
1080
|
+
const { customEmoji: u, database: p } = a, m = u || Qe;
|
|
1081
|
+
p.customEmoji !== m && (p.customEmoji = m);
|
|
1082
|
+
}
|
|
1083
|
+
o(() => {
|
|
1084
|
+
async function u() {
|
|
1085
|
+
F();
|
|
1086
|
+
const { database: p, defaultFavoriteEmojis: m, numColumns: _ } = a, I = await p.getTopFavoriteEmoji(_), y = await X(lo([
|
|
1087
|
+
...I,
|
|
1088
|
+
...m
|
|
1089
|
+
], (q) => q.unicode || q.name).slice(0, _));
|
|
1090
|
+
a.currentFavorites = y;
|
|
1091
|
+
}
|
|
1092
|
+
a.databaseLoaded && a.defaultFavoriteEmojis && u();
|
|
1093
|
+
});
|
|
1094
|
+
function z(u) {
|
|
1095
|
+
Js(u, i, () => {
|
|
1096
|
+
{
|
|
1097
|
+
const p = getComputedStyle(r.rootElement), m = parseInt(p.getPropertyValue("--num-columns"), 10), _ = p.getPropertyValue("direction") === "rtl";
|
|
1098
|
+
a.numColumns = m, a.isRtl = _;
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
}
|
|
1102
|
+
function x(u) {
|
|
1103
|
+
mc(u, i, (p) => {
|
|
1104
|
+
for (const { target: m, isIntersecting: _ } of p)
|
|
1105
|
+
m.classList.toggle("onscreen", _);
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
o(() => {
|
|
1109
|
+
async function u() {
|
|
1110
|
+
const { searchText: p, currentGroup: m, databaseLoaded: _, customEmoji: I } = a;
|
|
1111
|
+
if (!_)
|
|
1112
|
+
a.currentEmojis = [], a.searchMode = !1;
|
|
1113
|
+
else if (p.length >= Ms) {
|
|
1114
|
+
const y = await Oe(p);
|
|
1115
|
+
a.searchText === p && (g(y), T(!0));
|
|
1116
|
+
} else {
|
|
1117
|
+
const { id: y } = m;
|
|
1118
|
+
if (y !== -1 || I && I.length) {
|
|
1119
|
+
const q = await Re(y);
|
|
1120
|
+
a.currentGroup.id === y && (g(q), T(!1));
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
u();
|
|
1125
|
+
});
|
|
1126
|
+
const N = () => {
|
|
1127
|
+
Ee(() => tc(r.tabpanelElement));
|
|
1128
|
+
};
|
|
1129
|
+
o(() => {
|
|
1130
|
+
const { currentEmojis: u, emojiVersion: p } = a, m = u.filter((_) => _.unicode).filter((_) => Dn(_) && !on.has(_.unicode));
|
|
1131
|
+
if (!p && m.length)
|
|
1132
|
+
g(u), Ee(() => w(m));
|
|
1133
|
+
else {
|
|
1134
|
+
const _ = p ? u : u.filter(M);
|
|
1135
|
+
g(_), N();
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
function w(u) {
|
|
1139
|
+
Qs(u, r.baselineEmoji, c) ? N() : a.currentEmojis = [...a.currentEmojis];
|
|
1140
|
+
}
|
|
1141
|
+
function M(u) {
|
|
1142
|
+
return !u.unicode || !Dn(u) || on.get(u.unicode);
|
|
1143
|
+
}
|
|
1144
|
+
async function U(u) {
|
|
1145
|
+
const p = a.emojiVersion || await Xe();
|
|
1146
|
+
return u.filter(({ version: m }) => !m || m <= p);
|
|
1147
|
+
}
|
|
1148
|
+
async function X(u) {
|
|
1149
|
+
return Ys(u, a.emojiVersion || await Xe());
|
|
1150
|
+
}
|
|
1151
|
+
async function Re(u) {
|
|
1152
|
+
const p = u === -1 ? a.customEmoji : await a.database.getEmojiByGroup(u);
|
|
1153
|
+
return X(await U(p));
|
|
1154
|
+
}
|
|
1155
|
+
async function Oe(u) {
|
|
1156
|
+
return X(await U(await a.database.getEmojiBySearchQuery(u)));
|
|
1157
|
+
}
|
|
1158
|
+
o(() => {
|
|
1159
|
+
}), o(() => {
|
|
1160
|
+
function u() {
|
|
1161
|
+
const { searchMode: m, currentEmojis: _ } = a;
|
|
1162
|
+
if (m)
|
|
1163
|
+
return [
|
|
1164
|
+
{
|
|
1165
|
+
category: "",
|
|
1166
|
+
emojis: _
|
|
1167
|
+
}
|
|
1168
|
+
];
|
|
1169
|
+
const I = /* @__PURE__ */ new Map();
|
|
1170
|
+
for (const y of _) {
|
|
1171
|
+
const q = y.category || "";
|
|
1172
|
+
let E = I.get(q);
|
|
1173
|
+
E || (E = [], I.set(q, E)), E.push(y);
|
|
1174
|
+
}
|
|
1175
|
+
return [...I.entries()].map(([y, q]) => ({ category: y, emojis: q })).sort((y, q) => a.customCategorySorting(y.category, q.category));
|
|
1176
|
+
}
|
|
1177
|
+
const p = u();
|
|
1178
|
+
S(p);
|
|
1179
|
+
}), o(() => {
|
|
1180
|
+
a.activeSearchItemId = a.activeSearchItem !== -1 && a.currentEmojis[a.activeSearchItem].id;
|
|
1181
|
+
}), o(() => {
|
|
1182
|
+
const { rawSearchText: u } = a;
|
|
1183
|
+
co(() => {
|
|
1184
|
+
a.searchText = (u || "").trim(), a.activeSearchItem = -1;
|
|
1185
|
+
});
|
|
1186
|
+
});
|
|
1187
|
+
function Me(u) {
|
|
1188
|
+
if (!a.searchMode || !a.currentEmojis.length)
|
|
1189
|
+
return;
|
|
1190
|
+
const p = (m) => {
|
|
1191
|
+
D(u), a.activeSearchItem = Ye(m, a.activeSearchItem, a.currentEmojis);
|
|
1192
|
+
};
|
|
1193
|
+
switch (u.key) {
|
|
1194
|
+
case "ArrowDown":
|
|
1195
|
+
return p(!1);
|
|
1196
|
+
case "ArrowUp":
|
|
1197
|
+
return p(!0);
|
|
1198
|
+
case "Enter":
|
|
1199
|
+
if (a.activeSearchItem === -1)
|
|
1200
|
+
a.activeSearchItem = 0;
|
|
1201
|
+
else
|
|
1202
|
+
return D(u), fe(a.currentEmojis[a.activeSearchItem].id);
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
function de(u) {
|
|
1206
|
+
const { target: p } = u, m = p.closest(".nav-button");
|
|
1207
|
+
if (!m)
|
|
1208
|
+
return;
|
|
1209
|
+
const _ = parseInt(m.dataset.groupId, 10);
|
|
1210
|
+
r.searchElement.value = "", a.rawSearchText = "", a.searchText = "", a.activeSearchItem = -1, a.currentGroupIndex = a.groups.findIndex((I) => I.id === _);
|
|
1211
|
+
}
|
|
1212
|
+
function De(u) {
|
|
1213
|
+
const { target: p, key: m } = u, _ = (I) => {
|
|
1214
|
+
I && (D(u), I.focus());
|
|
1215
|
+
};
|
|
1216
|
+
switch (m) {
|
|
1217
|
+
case "ArrowLeft":
|
|
1218
|
+
return _(p.previousElementSibling);
|
|
1219
|
+
case "ArrowRight":
|
|
1220
|
+
return _(p.nextElementSibling);
|
|
1221
|
+
case "Home":
|
|
1222
|
+
return _(p.parentElement.firstElementChild);
|
|
1223
|
+
case "End":
|
|
1224
|
+
return _(p.parentElement.lastElementChild);
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
async function Le(u) {
|
|
1228
|
+
const p = await a.database.getEmojiByUnicodeOrName(u), m = [...a.currentEmojis, ...a.currentFavorites].find((I) => I.id === u), _ = m.unicode && k(m, a.currentSkinTone);
|
|
1229
|
+
return await a.database.incrementFavoriteEmojiCount(u), {
|
|
1230
|
+
emoji: p,
|
|
1231
|
+
skinTone: a.currentSkinTone,
|
|
1232
|
+
..._ && { unicode: _ },
|
|
1233
|
+
...m.name && { name: m.name }
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
async function fe(u) {
|
|
1237
|
+
const p = Le(u);
|
|
1238
|
+
d("emoji-click-sync", p), d("emoji-click", await p);
|
|
1239
|
+
}
|
|
1240
|
+
function Pe(u) {
|
|
1241
|
+
const { target: p } = u;
|
|
1242
|
+
if (!p.classList.contains("emoji"))
|
|
1243
|
+
return;
|
|
1244
|
+
D(u);
|
|
1245
|
+
const m = p.id.substring(4);
|
|
1246
|
+
fe(m);
|
|
1247
|
+
}
|
|
1248
|
+
function ae(u) {
|
|
1249
|
+
a.currentSkinTone = u, a.skinTonePickerExpanded = !1, l("skintone-button"), d("skin-tone-change", { skinTone: u }), a.database.setPreferredSkinTone(u);
|
|
1250
|
+
}
|
|
1251
|
+
function Be(u) {
|
|
1252
|
+
const { target: { id: p } } = u, m = p && p.match(/^skintone-(\d)/);
|
|
1253
|
+
if (!m)
|
|
1254
|
+
return;
|
|
1255
|
+
D(u);
|
|
1256
|
+
const _ = parseInt(m[1], 10);
|
|
1257
|
+
ae(_);
|
|
1258
|
+
}
|
|
1259
|
+
function Fe(u) {
|
|
1260
|
+
a.skinTonePickerExpanded = !a.skinTonePickerExpanded, a.activeSkinTone = a.currentSkinTone, a.skinTonePickerExpanded && (D(u), Ee(() => l("skintone-list")));
|
|
1261
|
+
}
|
|
1262
|
+
o(() => {
|
|
1263
|
+
a.skinTonePickerExpanded ? r.skinToneDropdown.addEventListener("transitionend", () => {
|
|
1264
|
+
a.skinTonePickerExpandedAfterAnimation = !0;
|
|
1265
|
+
}, { once: !0 }) : a.skinTonePickerExpandedAfterAnimation = !1;
|
|
1266
|
+
});
|
|
1267
|
+
function Ne(u) {
|
|
1268
|
+
if (!a.skinTonePickerExpanded)
|
|
1269
|
+
return;
|
|
1270
|
+
const p = async (m) => {
|
|
1271
|
+
D(u), a.activeSkinTone = m;
|
|
1272
|
+
};
|
|
1273
|
+
switch (u.key) {
|
|
1274
|
+
case "ArrowUp":
|
|
1275
|
+
return p(Ye(!0, a.activeSkinTone, a.skinTones));
|
|
1276
|
+
case "ArrowDown":
|
|
1277
|
+
return p(Ye(!1, a.activeSkinTone, a.skinTones));
|
|
1278
|
+
case "Home":
|
|
1279
|
+
return p(0);
|
|
1280
|
+
case "End":
|
|
1281
|
+
return p(a.skinTones.length - 1);
|
|
1282
|
+
case "Enter":
|
|
1283
|
+
return D(u), ae(a.activeSkinTone);
|
|
1284
|
+
case "Escape":
|
|
1285
|
+
return D(u), a.skinTonePickerExpanded = !1, l("skintone-button");
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
function Ue(u) {
|
|
1289
|
+
if (a.skinTonePickerExpanded && u.key === " ")
|
|
1290
|
+
return D(u), ae(a.activeSkinTone);
|
|
1291
|
+
}
|
|
1292
|
+
async function $e(u) {
|
|
1293
|
+
const { relatedTarget: p } = u;
|
|
1294
|
+
(!p || p.id !== "skintone-list") && (a.skinTonePickerExpanded = !1);
|
|
1295
|
+
}
|
|
1296
|
+
function Ke(u) {
|
|
1297
|
+
a.rawSearchText = u.target.value;
|
|
1298
|
+
}
|
|
1299
|
+
return {
|
|
1300
|
+
$set(u) {
|
|
1301
|
+
be(a, u);
|
|
1302
|
+
},
|
|
1303
|
+
$destroy() {
|
|
1304
|
+
n.abort();
|
|
1305
|
+
}
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
const bc = "https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json", _c = "en";
|
|
1309
|
+
var Tc = {
|
|
1310
|
+
categoriesLabel: "Categories",
|
|
1311
|
+
emojiUnsupportedMessage: "Your browser does not support color emoji.",
|
|
1312
|
+
favoritesLabel: "Favorites",
|
|
1313
|
+
loadingMessage: "Loading…",
|
|
1314
|
+
networkErrorMessage: "Could not load emoji.",
|
|
1315
|
+
regionLabel: "Emoji picker",
|
|
1316
|
+
searchDescription: "When search results are available, press up or down to select and enter to choose.",
|
|
1317
|
+
searchLabel: "Search",
|
|
1318
|
+
searchResultsLabel: "Search results",
|
|
1319
|
+
skinToneDescription: "When expanded, press up or down to select and enter to choose.",
|
|
1320
|
+
skinToneLabel: "Choose a skin tone (currently {skinTone})",
|
|
1321
|
+
skinTonesLabel: "Skin tones",
|
|
1322
|
+
skinTones: [
|
|
1323
|
+
"Default",
|
|
1324
|
+
"Light",
|
|
1325
|
+
"Medium-Light",
|
|
1326
|
+
"Medium",
|
|
1327
|
+
"Medium-Dark",
|
|
1328
|
+
"Dark"
|
|
1329
|
+
],
|
|
1330
|
+
categories: {
|
|
1331
|
+
custom: "Custom",
|
|
1332
|
+
"smileys-emotion": "Smileys and emoticons",
|
|
1333
|
+
"people-body": "People and body",
|
|
1334
|
+
"animals-nature": "Animals and nature",
|
|
1335
|
+
"food-drink": "Food and drink",
|
|
1336
|
+
"travel-places": "Travel and places",
|
|
1337
|
+
activities: "Activities",
|
|
1338
|
+
objects: "Objects",
|
|
1339
|
+
symbols: "Symbols",
|
|
1340
|
+
flags: "Flags"
|
|
1341
|
+
}
|
|
1342
|
+
}, Ec = ':host{--emoji-size:1.375rem;--emoji-padding:0.5rem;--category-emoji-size:var(--emoji-size);--category-emoji-padding:var(--emoji-padding);--indicator-height:3px;--input-border-radius:0.5rem;--input-border-size:1px;--input-font-size:1rem;--input-line-height:1.5;--input-padding:0.25rem;--num-columns:8;--outline-size:2px;--border-size:1px;--border-radius:0;--skintone-border-radius:1rem;--category-font-size:1rem;display:flex;width:min-content;height:400px}:host,:host(.light){color-scheme:light;--background:#fff;--border-color:#e0e0e0;--indicator-color:#385ac1;--input-border-color:#999;--input-font-color:#111;--input-placeholder-color:#999;--outline-color:#999;--category-font-color:#111;--button-active-background:#e6e6e6;--button-hover-background:#d9d9d9}:host(.dark){color-scheme:dark;--background:#222;--border-color:#444;--indicator-color:#5373ec;--input-border-color:#ccc;--input-font-color:#efefef;--input-placeholder-color:#ccc;--outline-color:#fff;--category-font-color:#efefef;--button-active-background:#555555;--button-hover-background:#484848}@media (prefers-color-scheme:dark){:host{color-scheme:dark;--background:#222;--border-color:#444;--indicator-color:#5373ec;--input-border-color:#ccc;--input-font-color:#efefef;--input-placeholder-color:#ccc;--outline-color:#fff;--category-font-color:#efefef;--button-active-background:#555555;--button-hover-background:#484848}}:host([hidden]){display:none}button{margin:0;padding:0;border:0;background:0 0;box-shadow:none;-webkit-tap-highlight-color:transparent}button::-moz-focus-inner{border:0}input{padding:0;margin:0;line-height:1.15;font-family:inherit}input[type=search]{-webkit-appearance:none}:focus{outline:var(--outline-color) solid var(--outline-size);outline-offset:calc(-1*var(--outline-size))}:host([data-js-focus-visible]) :focus:not([data-focus-visible-added]){outline:0}:focus:not(:focus-visible){outline:0}.hide-focus{outline:0}*{box-sizing:border-box}.picker{contain:content;display:flex;flex-direction:column;background:var(--background);border:var(--border-size) solid var(--border-color);border-radius:var(--border-radius);width:100%;height:100%;overflow:hidden;--total-emoji-size:calc(var(--emoji-size) + (2 * var(--emoji-padding)));--total-category-emoji-size:calc(var(--category-emoji-size) + (2 * var(--category-emoji-padding)))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.hidden{opacity:0;pointer-events:none}.abs-pos{position:absolute;left:0;top:0}.gone{display:none!important}.skintone-button-wrapper,.skintone-list{background:var(--background);z-index:3}.skintone-button-wrapper.expanded{z-index:1}.skintone-list{position:absolute;inset-inline-end:0;top:0;z-index:2;overflow:visible;border-bottom:var(--border-size) solid var(--border-color);border-radius:0 0 var(--skintone-border-radius) var(--skintone-border-radius);will-change:transform;transition:transform .2s ease-in-out;transform-origin:center 0}@media (prefers-reduced-motion:reduce){.skintone-list{transition-duration:.001s}}@supports not (inset-inline-end:0){.skintone-list{right:0}}.skintone-list.no-animate{transition:none}.tabpanel{overflow-y:auto;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch;will-change:transform;min-height:0;flex:1;contain:content}.emoji-menu{display:grid;grid-template-columns:repeat(var(--num-columns),var(--total-emoji-size));justify-content:space-around;align-items:flex-start;width:100%}.emoji-menu.visibility-auto{content-visibility:auto;contain-intrinsic-size:calc(var(--num-columns)*var(--total-emoji-size)) calc(var(--num-rows)*var(--total-emoji-size))}.category{padding:var(--emoji-padding);font-size:var(--category-font-size);color:var(--category-font-color)}.emoji,button.emoji{font-size:var(--emoji-size);display:flex;align-items:center;justify-content:center;border-radius:100%;height:var(--total-emoji-size);width:var(--total-emoji-size);line-height:1;overflow:hidden;font-family:var(--emoji-font-family);cursor:pointer}@media (hover:hover) and (pointer:fine){.emoji:hover,button.emoji:hover{background:var(--button-hover-background)}}.emoji.active,.emoji:active,button.emoji.active,button.emoji:active{background:var(--button-active-background)}.onscreen .custom-emoji::after{content:"";width:var(--emoji-size);height:var(--emoji-size);background-repeat:no-repeat;background-position:center center;background-size:contain;background-image:var(--custom-emoji-background)}.nav,.nav-button{align-items:center}.nav{display:grid;justify-content:space-between;contain:content}.nav-button{display:flex;justify-content:center}.nav-emoji{font-size:var(--category-emoji-size);width:var(--total-category-emoji-size);height:var(--total-category-emoji-size)}.indicator-wrapper{display:flex;border-bottom:1px solid var(--border-color)}.indicator{width:calc(100%/var(--num-groups));height:var(--indicator-height);opacity:var(--indicator-opacity);background-color:var(--indicator-color);will-change:transform,opacity;transition:opacity .1s linear,transform .25s ease-in-out}@media (prefers-reduced-motion:reduce){.indicator{will-change:opacity;transition:opacity .1s linear}}.pad-top,input.search{background:var(--background);width:100%}.pad-top{height:var(--emoji-padding);z-index:3}.search-row{display:flex;align-items:center;position:relative;padding-inline-start:var(--emoji-padding);padding-bottom:var(--emoji-padding)}.search-wrapper{flex:1;min-width:0}input.search{padding:var(--input-padding);border-radius:var(--input-border-radius);border:var(--input-border-size) solid var(--input-border-color);color:var(--input-font-color);font-size:var(--input-font-size);line-height:var(--input-line-height)}input.search::placeholder{color:var(--input-placeholder-color)}.favorites{overflow-y:auto;scrollbar-gutter:stable;display:flex;flex-direction:row;border-top:var(--border-size) solid var(--border-color);contain:content}.message{padding:var(--emoji-padding)}';
|
|
1343
|
+
const fo = [
|
|
1344
|
+
"customEmoji",
|
|
1345
|
+
"customCategorySorting",
|
|
1346
|
+
"database",
|
|
1347
|
+
"dataSource",
|
|
1348
|
+
"i18n",
|
|
1349
|
+
"locale",
|
|
1350
|
+
"skinToneEmoji",
|
|
1351
|
+
"emojiVersion"
|
|
1352
|
+
], kc = `:host{--emoji-font-family:${uo}}`;
|
|
1353
|
+
class pn extends HTMLElement {
|
|
1354
|
+
constructor(e) {
|
|
1355
|
+
super(), this.attachShadow({ mode: "open" });
|
|
1356
|
+
const r = document.createElement("style");
|
|
1357
|
+
r.textContent = Ec + kc, this.shadowRoot.appendChild(r), this._ctx = {
|
|
1358
|
+
// Set defaults
|
|
1359
|
+
locale: _c,
|
|
1360
|
+
dataSource: bc,
|
|
1361
|
+
skinToneEmoji: Ps,
|
|
1362
|
+
customCategorySorting: Ns,
|
|
1363
|
+
customEmoji: null,
|
|
1364
|
+
i18n: Tc,
|
|
1365
|
+
emojiVersion: null,
|
|
1366
|
+
...e
|
|
1367
|
+
};
|
|
1368
|
+
for (const n of fo)
|
|
1369
|
+
n !== "database" && Object.prototype.hasOwnProperty.call(this, n) && (this._ctx[n] = this[n], delete this[n]);
|
|
1370
|
+
this._dbFlush();
|
|
1371
|
+
}
|
|
1372
|
+
connectedCallback() {
|
|
1373
|
+
Un(this), this._cmp || (this._cmp = yc(this.shadowRoot, this._ctx));
|
|
1374
|
+
}
|
|
1375
|
+
disconnectedCallback() {
|
|
1376
|
+
Un(this), Se(() => {
|
|
1377
|
+
if (!this.isConnected && this._cmp) {
|
|
1378
|
+
this._cmp.$destroy(), this._cmp = void 0;
|
|
1379
|
+
const { database: e } = this._ctx;
|
|
1380
|
+
e.close().catch((r) => console.error(r));
|
|
1381
|
+
}
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
static get observedAttributes() {
|
|
1385
|
+
return ["locale", "data-source", "skin-tone-emoji", "emoji-version"];
|
|
1386
|
+
}
|
|
1387
|
+
attributeChangedCallback(e, r, n) {
|
|
1388
|
+
this._set(
|
|
1389
|
+
// convert from kebab-case to camelcase
|
|
1390
|
+
// see https://github.com/sveltejs/svelte/issues/3852#issuecomment-665037015
|
|
1391
|
+
e.replace(/-([a-z])/g, (i, a) => a.toUpperCase()),
|
|
1392
|
+
// convert string attribute to float if necessary
|
|
1393
|
+
e === "emoji-version" ? parseFloat(n) : n
|
|
1394
|
+
);
|
|
1395
|
+
}
|
|
1396
|
+
_set(e, r) {
|
|
1397
|
+
this._ctx[e] = r, this._cmp && this._cmp.$set({ [e]: r }), ["locale", "dataSource"].includes(e) && this._dbFlush();
|
|
1398
|
+
}
|
|
1399
|
+
_dbCreate() {
|
|
1400
|
+
const { locale: e, dataSource: r, database: n } = this._ctx;
|
|
1401
|
+
(!n || n.locale !== e || n.dataSource !== r) && this._set("database", new Os({ locale: e, dataSource: r }));
|
|
1402
|
+
}
|
|
1403
|
+
// Update the Database in one microtask if the locale/dataSource change. We do one microtask
|
|
1404
|
+
// so we don't create two Databases if e.g. both the locale and the dataSource change
|
|
1405
|
+
_dbFlush() {
|
|
1406
|
+
Se(() => this._dbCreate());
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
const ho = {};
|
|
1410
|
+
for (const t of fo)
|
|
1411
|
+
ho[t] = {
|
|
1412
|
+
get() {
|
|
1413
|
+
return t === "database" && this._dbCreate(), this._ctx[t];
|
|
1414
|
+
},
|
|
1415
|
+
set(e) {
|
|
1416
|
+
if (t === "database")
|
|
1417
|
+
throw new Error("database is read-only");
|
|
1418
|
+
this._set(t, e);
|
|
1419
|
+
}
|
|
1420
|
+
};
|
|
1421
|
+
Object.defineProperties(pn.prototype, ho);
|
|
1422
|
+
function Un(t) {
|
|
1423
|
+
t instanceof pn || Object.setPrototypeOf(t, customElements.get(t.tagName.toLowerCase()).prototype);
|
|
1424
|
+
}
|
|
1425
|
+
customElements.get("emoji-picker") || customElements.define("emoji-picker", pn);
|
|
1426
|
+
var L = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof ge == "object" && ge.global === ge ? ge : void 0;
|
|
1427
|
+
function wc(t, e) {
|
|
1428
|
+
return typeof e > "u" ? e = { autoBom: !1 } : typeof e != "object" && (console.warn("Deprecated: Expected third argument to be a object"), e = { autoBom: !e }), e.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob(["\uFEFF", t], { type: t.type }) : t;
|
|
1429
|
+
}
|
|
1430
|
+
function et(t, e, r) {
|
|
1431
|
+
var n = new XMLHttpRequest();
|
|
1432
|
+
n.open("GET", t), n.responseType = "blob", n.onload = function() {
|
|
1433
|
+
sn(n.response, e, r);
|
|
1434
|
+
}, n.onerror = function() {
|
|
1435
|
+
console.error("could not download file");
|
|
1436
|
+
}, n.send();
|
|
1437
|
+
}
|
|
1438
|
+
function $n(t) {
|
|
1439
|
+
var e = new XMLHttpRequest();
|
|
1440
|
+
e.open("HEAD", t, !1);
|
|
1441
|
+
try {
|
|
1442
|
+
e.send();
|
|
1443
|
+
} catch {
|
|
1444
|
+
}
|
|
1445
|
+
return e.status >= 200 && e.status <= 299;
|
|
1446
|
+
}
|
|
1447
|
+
function _e(t) {
|
|
1448
|
+
try {
|
|
1449
|
+
t.dispatchEvent(new MouseEvent("click"));
|
|
1450
|
+
} catch {
|
|
1451
|
+
var e = document.createEvent("MouseEvents");
|
|
1452
|
+
e.initMouseEvent(
|
|
1453
|
+
"click",
|
|
1454
|
+
!0,
|
|
1455
|
+
!0,
|
|
1456
|
+
window,
|
|
1457
|
+
0,
|
|
1458
|
+
0,
|
|
1459
|
+
0,
|
|
1460
|
+
80,
|
|
1461
|
+
20,
|
|
1462
|
+
!1,
|
|
1463
|
+
!1,
|
|
1464
|
+
!1,
|
|
1465
|
+
!1,
|
|
1466
|
+
0,
|
|
1467
|
+
null
|
|
1468
|
+
), t.dispatchEvent(e);
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
var Kn = L.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), sn = L.saveAs || // probably in some web worker
|
|
1472
|
+
(typeof window != "object" || window !== L ? function() {
|
|
1473
|
+
} : "download" in HTMLAnchorElement.prototype && !Kn ? function(e, r, n) {
|
|
1474
|
+
var i = L.URL || L.webkitURL, a = document.createElement("a");
|
|
1475
|
+
r = r || e.name || "download", a.download = r, a.rel = "noopener", typeof e == "string" ? (a.href = e, a.origin !== location.origin ? $n(a.href) ? et(e, r, n) : _e(a, a.target = "_blank") : _e(a)) : (a.href = i.createObjectURL(e), setTimeout(function() {
|
|
1476
|
+
i.revokeObjectURL(a.href);
|
|
1477
|
+
}, 4e4), setTimeout(function() {
|
|
1478
|
+
_e(a);
|
|
1479
|
+
}, 0));
|
|
1480
|
+
} : "msSaveOrOpenBlob" in navigator ? function(e, r, n) {
|
|
1481
|
+
if (r = r || e.name || "download", typeof e == "string")
|
|
1482
|
+
if ($n(e))
|
|
1483
|
+
et(e, r, n);
|
|
1484
|
+
else {
|
|
1485
|
+
var i = document.createElement("a");
|
|
1486
|
+
i.href = e, i.target = "_blank", setTimeout(function() {
|
|
1487
|
+
_e(i);
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
else
|
|
1491
|
+
navigator.msSaveOrOpenBlob(wc(e, n), r);
|
|
1492
|
+
} : function(e, r, n, i) {
|
|
1493
|
+
if (i = i || open("", "_blank"), i && (i.document.title = i.document.body.innerText = "downloading..."), typeof e == "string") return et(e, r, n);
|
|
1494
|
+
var a = e.type === "application/octet-stream", o = /constructor/i.test(L.HTMLElement) || L.safari, s = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1495
|
+
if ((s || a && o || Kn) && typeof FileReader < "u") {
|
|
1496
|
+
var l = new FileReader();
|
|
1497
|
+
l.onloadend = function() {
|
|
1498
|
+
var h = l.result;
|
|
1499
|
+
h = s ? h : h.replace(/^data:[^;]*;/, "data:attachment/file;"), i ? i.location.href = h : location = h, i = null;
|
|
1500
|
+
}, l.readAsDataURL(e);
|
|
1501
|
+
} else {
|
|
1502
|
+
var c = L.URL || L.webkitURL, d = c.createObjectURL(e);
|
|
1503
|
+
i ? i.location = d : location.href = d, i = null, setTimeout(function() {
|
|
1504
|
+
c.revokeObjectURL(d);
|
|
1505
|
+
}, 4e4);
|
|
1506
|
+
}
|
|
1507
|
+
});
|
|
1508
|
+
L.saveAs = sn.saveAs = sn;
|
|
1509
|
+
var tt, zn;
|
|
1510
|
+
function Sc() {
|
|
1511
|
+
if (zn) return tt;
|
|
1512
|
+
zn = 1;
|
|
1513
|
+
function t() {
|
|
1514
|
+
this.__data__ = [], this.size = 0;
|
|
1515
|
+
}
|
|
1516
|
+
return tt = t, tt;
|
|
1517
|
+
}
|
|
1518
|
+
var rt, Gn;
|
|
1519
|
+
function po() {
|
|
1520
|
+
if (Gn) return rt;
|
|
1521
|
+
Gn = 1;
|
|
1522
|
+
function t(e, r) {
|
|
1523
|
+
return e === r || e !== e && r !== r;
|
|
1524
|
+
}
|
|
1525
|
+
return rt = t, rt;
|
|
1526
|
+
}
|
|
1527
|
+
var nt, Hn;
|
|
1528
|
+
function Ce() {
|
|
1529
|
+
if (Hn) return nt;
|
|
1530
|
+
Hn = 1;
|
|
1531
|
+
var t = po();
|
|
1532
|
+
function e(r, n) {
|
|
1533
|
+
for (var i = r.length; i--; )
|
|
1534
|
+
if (t(r[i][0], n))
|
|
1535
|
+
return i;
|
|
1536
|
+
return -1;
|
|
1537
|
+
}
|
|
1538
|
+
return nt = e, nt;
|
|
1539
|
+
}
|
|
1540
|
+
var at, Vn;
|
|
1541
|
+
function jc() {
|
|
1542
|
+
if (Vn) return at;
|
|
1543
|
+
Vn = 1;
|
|
1544
|
+
var t = Ce(), e = Array.prototype, r = e.splice;
|
|
1545
|
+
function n(i) {
|
|
1546
|
+
var a = this.__data__, o = t(a, i);
|
|
1547
|
+
if (o < 0)
|
|
1548
|
+
return !1;
|
|
1549
|
+
var s = a.length - 1;
|
|
1550
|
+
return o == s ? a.pop() : r.call(a, o, 1), --this.size, !0;
|
|
1551
|
+
}
|
|
1552
|
+
return at = n, at;
|
|
1553
|
+
}
|
|
1554
|
+
var it, Wn;
|
|
1555
|
+
function Cc() {
|
|
1556
|
+
if (Wn) return it;
|
|
1557
|
+
Wn = 1;
|
|
1558
|
+
var t = Ce();
|
|
1559
|
+
function e(r) {
|
|
1560
|
+
var n = this.__data__, i = t(n, r);
|
|
1561
|
+
return i < 0 ? void 0 : n[i][1];
|
|
1562
|
+
}
|
|
1563
|
+
return it = e, it;
|
|
1564
|
+
}
|
|
1565
|
+
var ot, Xn;
|
|
1566
|
+
function Ac() {
|
|
1567
|
+
if (Xn) return ot;
|
|
1568
|
+
Xn = 1;
|
|
1569
|
+
var t = Ce();
|
|
1570
|
+
function e(r) {
|
|
1571
|
+
return t(this.__data__, r) > -1;
|
|
1572
|
+
}
|
|
1573
|
+
return ot = e, ot;
|
|
1574
|
+
}
|
|
1575
|
+
var st, Yn;
|
|
1576
|
+
function Ic() {
|
|
1577
|
+
if (Yn) return st;
|
|
1578
|
+
Yn = 1;
|
|
1579
|
+
var t = Ce();
|
|
1580
|
+
function e(r, n) {
|
|
1581
|
+
var i = this.__data__, a = t(i, r);
|
|
1582
|
+
return a < 0 ? (++this.size, i.push([r, n])) : i[a][1] = n, this;
|
|
1583
|
+
}
|
|
1584
|
+
return st = e, st;
|
|
1585
|
+
}
|
|
1586
|
+
var ct, Zn;
|
|
1587
|
+
function Ae() {
|
|
1588
|
+
if (Zn) return ct;
|
|
1589
|
+
Zn = 1;
|
|
1590
|
+
var t = Sc(), e = jc(), r = Cc(), n = Ac(), i = Ic();
|
|
1591
|
+
function a(o) {
|
|
1592
|
+
var s = -1, l = o == null ? 0 : o.length;
|
|
1593
|
+
for (this.clear(); ++s < l; ) {
|
|
1594
|
+
var c = o[s];
|
|
1595
|
+
this.set(c[0], c[1]);
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
return a.prototype.clear = t, a.prototype.delete = e, a.prototype.get = r, a.prototype.has = n, a.prototype.set = i, ct = a, ct;
|
|
1599
|
+
}
|
|
1600
|
+
var ut, Jn;
|
|
1601
|
+
function qc() {
|
|
1602
|
+
if (Jn) return ut;
|
|
1603
|
+
Jn = 1;
|
|
1604
|
+
var t = Ae();
|
|
1605
|
+
function e() {
|
|
1606
|
+
this.__data__ = new t(), this.size = 0;
|
|
1607
|
+
}
|
|
1608
|
+
return ut = e, ut;
|
|
1609
|
+
}
|
|
1610
|
+
var lt, Qn;
|
|
1611
|
+
function xc() {
|
|
1612
|
+
if (Qn) return lt;
|
|
1613
|
+
Qn = 1;
|
|
1614
|
+
function t(e) {
|
|
1615
|
+
var r = this.__data__, n = r.delete(e);
|
|
1616
|
+
return this.size = r.size, n;
|
|
1617
|
+
}
|
|
1618
|
+
return lt = t, lt;
|
|
1619
|
+
}
|
|
1620
|
+
var dt, ea;
|
|
1621
|
+
function Rc() {
|
|
1622
|
+
if (ea) return dt;
|
|
1623
|
+
ea = 1;
|
|
1624
|
+
function t(e) {
|
|
1625
|
+
return this.__data__.get(e);
|
|
1626
|
+
}
|
|
1627
|
+
return dt = t, dt;
|
|
1628
|
+
}
|
|
1629
|
+
var ft, ta;
|
|
1630
|
+
function Oc() {
|
|
1631
|
+
if (ta) return ft;
|
|
1632
|
+
ta = 1;
|
|
1633
|
+
function t(e) {
|
|
1634
|
+
return this.__data__.has(e);
|
|
1635
|
+
}
|
|
1636
|
+
return ft = t, ft;
|
|
1637
|
+
}
|
|
1638
|
+
var ht, ra;
|
|
1639
|
+
function vo() {
|
|
1640
|
+
if (ra) return ht;
|
|
1641
|
+
ra = 1;
|
|
1642
|
+
var t = je(), e = te(), r = "[object AsyncFunction]", n = "[object Function]", i = "[object GeneratorFunction]", a = "[object Proxy]";
|
|
1643
|
+
function o(s) {
|
|
1644
|
+
if (!e(s))
|
|
1645
|
+
return !1;
|
|
1646
|
+
var l = t(s);
|
|
1647
|
+
return l == n || l == i || l == r || l == a;
|
|
1648
|
+
}
|
|
1649
|
+
return ht = o, ht;
|
|
1650
|
+
}
|
|
1651
|
+
var pt, na;
|
|
1652
|
+
function Mc() {
|
|
1653
|
+
if (na) return pt;
|
|
1654
|
+
na = 1;
|
|
1655
|
+
var t = P(), e = t["__core-js_shared__"];
|
|
1656
|
+
return pt = e, pt;
|
|
1657
|
+
}
|
|
1658
|
+
var vt, aa;
|
|
1659
|
+
function Dc() {
|
|
1660
|
+
if (aa) return vt;
|
|
1661
|
+
aa = 1;
|
|
1662
|
+
var t = Mc(), e = (function() {
|
|
1663
|
+
var n = /[^.]+$/.exec(t && t.keys && t.keys.IE_PROTO || "");
|
|
1664
|
+
return n ? "Symbol(src)_1." + n : "";
|
|
1665
|
+
})();
|
|
1666
|
+
function r(n) {
|
|
1667
|
+
return !!e && e in n;
|
|
1668
|
+
}
|
|
1669
|
+
return vt = r, vt;
|
|
1670
|
+
}
|
|
1671
|
+
var gt, ia;
|
|
1672
|
+
function go() {
|
|
1673
|
+
if (ia) return gt;
|
|
1674
|
+
ia = 1;
|
|
1675
|
+
var t = Function.prototype, e = t.toString;
|
|
1676
|
+
function r(n) {
|
|
1677
|
+
if (n != null) {
|
|
1678
|
+
try {
|
|
1679
|
+
return e.call(n);
|
|
1680
|
+
} catch {
|
|
1681
|
+
}
|
|
1682
|
+
try {
|
|
1683
|
+
return n + "";
|
|
1684
|
+
} catch {
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
return "";
|
|
1688
|
+
}
|
|
1689
|
+
return gt = r, gt;
|
|
1690
|
+
}
|
|
1691
|
+
var mt, oa;
|
|
1692
|
+
function Lc() {
|
|
1693
|
+
if (oa) return mt;
|
|
1694
|
+
oa = 1;
|
|
1695
|
+
var t = vo(), e = Dc(), r = te(), n = go(), i = /[\\^$.*+?()[\]{}|]/g, a = /^\[object .+?Constructor\]$/, o = Function.prototype, s = Object.prototype, l = o.toString, c = s.hasOwnProperty, d = RegExp(
|
|
1696
|
+
"^" + l.call(c).replace(i, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1697
|
+
);
|
|
1698
|
+
function h(f) {
|
|
1699
|
+
if (!r(f) || e(f))
|
|
1700
|
+
return !1;
|
|
1701
|
+
var g = t(f) ? d : a;
|
|
1702
|
+
return g.test(n(f));
|
|
1703
|
+
}
|
|
1704
|
+
return mt = h, mt;
|
|
1705
|
+
}
|
|
1706
|
+
var yt, sa;
|
|
1707
|
+
function Pc() {
|
|
1708
|
+
if (sa) return yt;
|
|
1709
|
+
sa = 1;
|
|
1710
|
+
function t(e, r) {
|
|
1711
|
+
return e?.[r];
|
|
1712
|
+
}
|
|
1713
|
+
return yt = t, yt;
|
|
1714
|
+
}
|
|
1715
|
+
var bt, ca;
|
|
1716
|
+
function W() {
|
|
1717
|
+
if (ca) return bt;
|
|
1718
|
+
ca = 1;
|
|
1719
|
+
var t = Lc(), e = Pc();
|
|
1720
|
+
function r(n, i) {
|
|
1721
|
+
var a = e(n, i);
|
|
1722
|
+
return t(a) ? a : void 0;
|
|
1723
|
+
}
|
|
1724
|
+
return bt = r, bt;
|
|
1725
|
+
}
|
|
1726
|
+
var _t, ua;
|
|
1727
|
+
function vn() {
|
|
1728
|
+
if (ua) return _t;
|
|
1729
|
+
ua = 1;
|
|
1730
|
+
var t = W(), e = P(), r = t(e, "Map");
|
|
1731
|
+
return _t = r, _t;
|
|
1732
|
+
}
|
|
1733
|
+
var Tt, la;
|
|
1734
|
+
function Ie() {
|
|
1735
|
+
if (la) return Tt;
|
|
1736
|
+
la = 1;
|
|
1737
|
+
var t = W(), e = t(Object, "create");
|
|
1738
|
+
return Tt = e, Tt;
|
|
1739
|
+
}
|
|
1740
|
+
var Et, da;
|
|
1741
|
+
function Bc() {
|
|
1742
|
+
if (da) return Et;
|
|
1743
|
+
da = 1;
|
|
1744
|
+
var t = Ie();
|
|
1745
|
+
function e() {
|
|
1746
|
+
this.__data__ = t ? t(null) : {}, this.size = 0;
|
|
1747
|
+
}
|
|
1748
|
+
return Et = e, Et;
|
|
1749
|
+
}
|
|
1750
|
+
var kt, fa;
|
|
1751
|
+
function Fc() {
|
|
1752
|
+
if (fa) return kt;
|
|
1753
|
+
fa = 1;
|
|
1754
|
+
function t(e) {
|
|
1755
|
+
var r = this.has(e) && delete this.__data__[e];
|
|
1756
|
+
return this.size -= r ? 1 : 0, r;
|
|
1757
|
+
}
|
|
1758
|
+
return kt = t, kt;
|
|
1759
|
+
}
|
|
1760
|
+
var wt, ha;
|
|
1761
|
+
function Nc() {
|
|
1762
|
+
if (ha) return wt;
|
|
1763
|
+
ha = 1;
|
|
1764
|
+
var t = Ie(), e = "__lodash_hash_undefined__", r = Object.prototype, n = r.hasOwnProperty;
|
|
1765
|
+
function i(a) {
|
|
1766
|
+
var o = this.__data__;
|
|
1767
|
+
if (t) {
|
|
1768
|
+
var s = o[a];
|
|
1769
|
+
return s === e ? void 0 : s;
|
|
1770
|
+
}
|
|
1771
|
+
return n.call(o, a) ? o[a] : void 0;
|
|
1772
|
+
}
|
|
1773
|
+
return wt = i, wt;
|
|
1774
|
+
}
|
|
1775
|
+
var St, pa;
|
|
1776
|
+
function Uc() {
|
|
1777
|
+
if (pa) return St;
|
|
1778
|
+
pa = 1;
|
|
1779
|
+
var t = Ie(), e = Object.prototype, r = e.hasOwnProperty;
|
|
1780
|
+
function n(i) {
|
|
1781
|
+
var a = this.__data__;
|
|
1782
|
+
return t ? a[i] !== void 0 : r.call(a, i);
|
|
1783
|
+
}
|
|
1784
|
+
return St = n, St;
|
|
1785
|
+
}
|
|
1786
|
+
var jt, va;
|
|
1787
|
+
function $c() {
|
|
1788
|
+
if (va) return jt;
|
|
1789
|
+
va = 1;
|
|
1790
|
+
var t = Ie(), e = "__lodash_hash_undefined__";
|
|
1791
|
+
function r(n, i) {
|
|
1792
|
+
var a = this.__data__;
|
|
1793
|
+
return this.size += this.has(n) ? 0 : 1, a[n] = t && i === void 0 ? e : i, this;
|
|
1794
|
+
}
|
|
1795
|
+
return jt = r, jt;
|
|
1796
|
+
}
|
|
1797
|
+
var Ct, ga;
|
|
1798
|
+
function Kc() {
|
|
1799
|
+
if (ga) return Ct;
|
|
1800
|
+
ga = 1;
|
|
1801
|
+
var t = Bc(), e = Fc(), r = Nc(), n = Uc(), i = $c();
|
|
1802
|
+
function a(o) {
|
|
1803
|
+
var s = -1, l = o == null ? 0 : o.length;
|
|
1804
|
+
for (this.clear(); ++s < l; ) {
|
|
1805
|
+
var c = o[s];
|
|
1806
|
+
this.set(c[0], c[1]);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
return a.prototype.clear = t, a.prototype.delete = e, a.prototype.get = r, a.prototype.has = n, a.prototype.set = i, Ct = a, Ct;
|
|
1810
|
+
}
|
|
1811
|
+
var At, ma;
|
|
1812
|
+
function zc() {
|
|
1813
|
+
if (ma) return At;
|
|
1814
|
+
ma = 1;
|
|
1815
|
+
var t = Kc(), e = Ae(), r = vn();
|
|
1816
|
+
function n() {
|
|
1817
|
+
this.size = 0, this.__data__ = {
|
|
1818
|
+
hash: new t(),
|
|
1819
|
+
map: new (r || e)(),
|
|
1820
|
+
string: new t()
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
return At = n, At;
|
|
1824
|
+
}
|
|
1825
|
+
var It, ya;
|
|
1826
|
+
function Gc() {
|
|
1827
|
+
if (ya) return It;
|
|
1828
|
+
ya = 1;
|
|
1829
|
+
function t(e) {
|
|
1830
|
+
var r = typeof e;
|
|
1831
|
+
return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? e !== "__proto__" : e === null;
|
|
1832
|
+
}
|
|
1833
|
+
return It = t, It;
|
|
1834
|
+
}
|
|
1835
|
+
var qt, ba;
|
|
1836
|
+
function qe() {
|
|
1837
|
+
if (ba) return qt;
|
|
1838
|
+
ba = 1;
|
|
1839
|
+
var t = Gc();
|
|
1840
|
+
function e(r, n) {
|
|
1841
|
+
var i = r.__data__;
|
|
1842
|
+
return t(n) ? i[typeof n == "string" ? "string" : "hash"] : i.map;
|
|
1843
|
+
}
|
|
1844
|
+
return qt = e, qt;
|
|
1845
|
+
}
|
|
1846
|
+
var xt, _a;
|
|
1847
|
+
function Hc() {
|
|
1848
|
+
if (_a) return xt;
|
|
1849
|
+
_a = 1;
|
|
1850
|
+
var t = qe();
|
|
1851
|
+
function e(r) {
|
|
1852
|
+
var n = t(this, r).delete(r);
|
|
1853
|
+
return this.size -= n ? 1 : 0, n;
|
|
1854
|
+
}
|
|
1855
|
+
return xt = e, xt;
|
|
1856
|
+
}
|
|
1857
|
+
var Rt, Ta;
|
|
1858
|
+
function Vc() {
|
|
1859
|
+
if (Ta) return Rt;
|
|
1860
|
+
Ta = 1;
|
|
1861
|
+
var t = qe();
|
|
1862
|
+
function e(r) {
|
|
1863
|
+
return t(this, r).get(r);
|
|
1864
|
+
}
|
|
1865
|
+
return Rt = e, Rt;
|
|
1866
|
+
}
|
|
1867
|
+
var Ot, Ea;
|
|
1868
|
+
function Wc() {
|
|
1869
|
+
if (Ea) return Ot;
|
|
1870
|
+
Ea = 1;
|
|
1871
|
+
var t = qe();
|
|
1872
|
+
function e(r) {
|
|
1873
|
+
return t(this, r).has(r);
|
|
1874
|
+
}
|
|
1875
|
+
return Ot = e, Ot;
|
|
1876
|
+
}
|
|
1877
|
+
var Mt, ka;
|
|
1878
|
+
function Xc() {
|
|
1879
|
+
if (ka) return Mt;
|
|
1880
|
+
ka = 1;
|
|
1881
|
+
var t = qe();
|
|
1882
|
+
function e(r, n) {
|
|
1883
|
+
var i = t(this, r), a = i.size;
|
|
1884
|
+
return i.set(r, n), this.size += i.size == a ? 0 : 1, this;
|
|
1885
|
+
}
|
|
1886
|
+
return Mt = e, Mt;
|
|
1887
|
+
}
|
|
1888
|
+
var Dt, wa;
|
|
1889
|
+
function mo() {
|
|
1890
|
+
if (wa) return Dt;
|
|
1891
|
+
wa = 1;
|
|
1892
|
+
var t = zc(), e = Hc(), r = Vc(), n = Wc(), i = Xc();
|
|
1893
|
+
function a(o) {
|
|
1894
|
+
var s = -1, l = o == null ? 0 : o.length;
|
|
1895
|
+
for (this.clear(); ++s < l; ) {
|
|
1896
|
+
var c = o[s];
|
|
1897
|
+
this.set(c[0], c[1]);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
return a.prototype.clear = t, a.prototype.delete = e, a.prototype.get = r, a.prototype.has = n, a.prototype.set = i, Dt = a, Dt;
|
|
1901
|
+
}
|
|
1902
|
+
var Lt, Sa;
|
|
1903
|
+
function Yc() {
|
|
1904
|
+
if (Sa) return Lt;
|
|
1905
|
+
Sa = 1;
|
|
1906
|
+
var t = Ae(), e = vn(), r = mo(), n = 200;
|
|
1907
|
+
function i(a, o) {
|
|
1908
|
+
var s = this.__data__;
|
|
1909
|
+
if (s instanceof t) {
|
|
1910
|
+
var l = s.__data__;
|
|
1911
|
+
if (!e || l.length < n - 1)
|
|
1912
|
+
return l.push([a, o]), this.size = ++s.size, this;
|
|
1913
|
+
s = this.__data__ = new r(l);
|
|
1914
|
+
}
|
|
1915
|
+
return s.set(a, o), this.size = s.size, this;
|
|
1916
|
+
}
|
|
1917
|
+
return Lt = i, Lt;
|
|
1918
|
+
}
|
|
1919
|
+
var Pt, ja;
|
|
1920
|
+
function Zc() {
|
|
1921
|
+
if (ja) return Pt;
|
|
1922
|
+
ja = 1;
|
|
1923
|
+
var t = Ae(), e = qc(), r = xc(), n = Rc(), i = Oc(), a = Yc();
|
|
1924
|
+
function o(s) {
|
|
1925
|
+
var l = this.__data__ = new t(s);
|
|
1926
|
+
this.size = l.size;
|
|
1927
|
+
}
|
|
1928
|
+
return o.prototype.clear = e, o.prototype.delete = r, o.prototype.get = n, o.prototype.has = i, o.prototype.set = a, Pt = o, Pt;
|
|
1929
|
+
}
|
|
1930
|
+
var Bt, Ca;
|
|
1931
|
+
function Jc() {
|
|
1932
|
+
if (Ca) return Bt;
|
|
1933
|
+
Ca = 1;
|
|
1934
|
+
function t(e, r) {
|
|
1935
|
+
for (var n = -1, i = e == null ? 0 : e.length; ++n < i && r(e[n], n, e) !== !1; )
|
|
1936
|
+
;
|
|
1937
|
+
return e;
|
|
1938
|
+
}
|
|
1939
|
+
return Bt = t, Bt;
|
|
1940
|
+
}
|
|
1941
|
+
var Ft, Aa;
|
|
1942
|
+
function Qc() {
|
|
1943
|
+
if (Aa) return Ft;
|
|
1944
|
+
Aa = 1;
|
|
1945
|
+
var t = W(), e = (function() {
|
|
1946
|
+
try {
|
|
1947
|
+
var r = t(Object, "defineProperty");
|
|
1948
|
+
return r({}, "", {}), r;
|
|
1949
|
+
} catch {
|
|
1950
|
+
}
|
|
1951
|
+
})();
|
|
1952
|
+
return Ft = e, Ft;
|
|
1953
|
+
}
|
|
1954
|
+
var Nt, Ia;
|
|
1955
|
+
function yo() {
|
|
1956
|
+
if (Ia) return Nt;
|
|
1957
|
+
Ia = 1;
|
|
1958
|
+
var t = Qc();
|
|
1959
|
+
function e(r, n, i) {
|
|
1960
|
+
n == "__proto__" && t ? t(r, n, {
|
|
1961
|
+
configurable: !0,
|
|
1962
|
+
enumerable: !0,
|
|
1963
|
+
value: i,
|
|
1964
|
+
writable: !0
|
|
1965
|
+
}) : r[n] = i;
|
|
1966
|
+
}
|
|
1967
|
+
return Nt = e, Nt;
|
|
1968
|
+
}
|
|
1969
|
+
var Ut, qa;
|
|
1970
|
+
function gn() {
|
|
1971
|
+
if (qa) return Ut;
|
|
1972
|
+
qa = 1;
|
|
1973
|
+
var t = yo(), e = po(), r = Object.prototype, n = r.hasOwnProperty;
|
|
1974
|
+
function i(a, o, s) {
|
|
1975
|
+
var l = a[o];
|
|
1976
|
+
(!(n.call(a, o) && e(l, s)) || s === void 0 && !(o in a)) && t(a, o, s);
|
|
1977
|
+
}
|
|
1978
|
+
return Ut = i, Ut;
|
|
1979
|
+
}
|
|
1980
|
+
var $t, xa;
|
|
1981
|
+
function xe() {
|
|
1982
|
+
if (xa) return $t;
|
|
1983
|
+
xa = 1;
|
|
1984
|
+
var t = gn(), e = yo();
|
|
1985
|
+
function r(n, i, a, o) {
|
|
1986
|
+
var s = !a;
|
|
1987
|
+
a || (a = {});
|
|
1988
|
+
for (var l = -1, c = i.length; ++l < c; ) {
|
|
1989
|
+
var d = i[l], h = o ? o(a[d], n[d], d, a, n) : void 0;
|
|
1990
|
+
h === void 0 && (h = n[d]), s ? e(a, d, h) : t(a, d, h);
|
|
1991
|
+
}
|
|
1992
|
+
return a;
|
|
1993
|
+
}
|
|
1994
|
+
return $t = r, $t;
|
|
1995
|
+
}
|
|
1996
|
+
var Kt, Ra;
|
|
1997
|
+
function eu() {
|
|
1998
|
+
if (Ra) return Kt;
|
|
1999
|
+
Ra = 1;
|
|
2000
|
+
function t(e, r) {
|
|
2001
|
+
for (var n = -1, i = Array(e); ++n < e; )
|
|
2002
|
+
i[n] = r(n);
|
|
2003
|
+
return i;
|
|
2004
|
+
}
|
|
2005
|
+
return Kt = t, Kt;
|
|
2006
|
+
}
|
|
2007
|
+
var zt, Oa;
|
|
2008
|
+
function tu() {
|
|
2009
|
+
if (Oa) return zt;
|
|
2010
|
+
Oa = 1;
|
|
2011
|
+
var t = je(), e = le(), r = "[object Arguments]";
|
|
2012
|
+
function n(i) {
|
|
2013
|
+
return e(i) && t(i) == r;
|
|
2014
|
+
}
|
|
2015
|
+
return zt = n, zt;
|
|
2016
|
+
}
|
|
2017
|
+
var Gt, Ma;
|
|
2018
|
+
function ru() {
|
|
2019
|
+
if (Ma) return Gt;
|
|
2020
|
+
Ma = 1;
|
|
2021
|
+
var t = tu(), e = le(), r = Object.prototype, n = r.hasOwnProperty, i = r.propertyIsEnumerable, a = t(/* @__PURE__ */ (function() {
|
|
2022
|
+
return arguments;
|
|
2023
|
+
})()) ? t : function(o) {
|
|
2024
|
+
return e(o) && n.call(o, "callee") && !i.call(o, "callee");
|
|
2025
|
+
};
|
|
2026
|
+
return Gt = a, Gt;
|
|
2027
|
+
}
|
|
2028
|
+
var Ht, Da;
|
|
2029
|
+
function ne() {
|
|
2030
|
+
if (Da) return Ht;
|
|
2031
|
+
Da = 1;
|
|
2032
|
+
var t = Array.isArray;
|
|
2033
|
+
return Ht = t, Ht;
|
|
2034
|
+
}
|
|
2035
|
+
var oe = { exports: {} }, Vt, La;
|
|
2036
|
+
function nu() {
|
|
2037
|
+
if (La) return Vt;
|
|
2038
|
+
La = 1;
|
|
2039
|
+
function t() {
|
|
2040
|
+
return !1;
|
|
2041
|
+
}
|
|
2042
|
+
return Vt = t, Vt;
|
|
2043
|
+
}
|
|
2044
|
+
oe.exports;
|
|
2045
|
+
var Pa;
|
|
2046
|
+
function bo() {
|
|
2047
|
+
return Pa || (Pa = 1, (function(t, e) {
|
|
2048
|
+
var r = P(), n = nu(), i = e && !e.nodeType && e, a = i && !0 && t && !t.nodeType && t, o = a && a.exports === i, s = o ? r.Buffer : void 0, l = s ? s.isBuffer : void 0, c = l || n;
|
|
2049
|
+
t.exports = c;
|
|
2050
|
+
})(oe, oe.exports)), oe.exports;
|
|
2051
|
+
}
|
|
2052
|
+
var Wt, Ba;
|
|
2053
|
+
function _o() {
|
|
2054
|
+
if (Ba) return Wt;
|
|
2055
|
+
Ba = 1;
|
|
2056
|
+
var t = 9007199254740991, e = /^(?:0|[1-9]\d*)$/;
|
|
2057
|
+
function r(n, i) {
|
|
2058
|
+
var a = typeof n;
|
|
2059
|
+
return i = i ?? t, !!i && (a == "number" || a != "symbol" && e.test(n)) && n > -1 && n % 1 == 0 && n < i;
|
|
2060
|
+
}
|
|
2061
|
+
return Wt = r, Wt;
|
|
2062
|
+
}
|
|
2063
|
+
var Xt, Fa;
|
|
2064
|
+
function To() {
|
|
2065
|
+
if (Fa) return Xt;
|
|
2066
|
+
Fa = 1;
|
|
2067
|
+
var t = 9007199254740991;
|
|
2068
|
+
function e(r) {
|
|
2069
|
+
return typeof r == "number" && r > -1 && r % 1 == 0 && r <= t;
|
|
2070
|
+
}
|
|
2071
|
+
return Xt = e, Xt;
|
|
2072
|
+
}
|
|
2073
|
+
var Yt, Na;
|
|
2074
|
+
function au() {
|
|
2075
|
+
if (Na) return Yt;
|
|
2076
|
+
Na = 1;
|
|
2077
|
+
var t = je(), e = To(), r = le(), n = "[object Arguments]", i = "[object Array]", a = "[object Boolean]", o = "[object Date]", s = "[object Error]", l = "[object Function]", c = "[object Map]", d = "[object Number]", h = "[object Object]", f = "[object RegExp]", g = "[object Set]", T = "[object String]", S = "[object WeakMap]", k = "[object ArrayBuffer]", A = "[object DataView]", v = "[object Float32Array]", b = "[object Float64Array]", j = "[object Int8Array]", C = "[object Int16Array]", R = "[object Int32Array]", F = "[object Uint8Array]", z = "[object Uint8ClampedArray]", x = "[object Uint16Array]", N = "[object Uint32Array]", w = {};
|
|
2078
|
+
w[v] = w[b] = w[j] = w[C] = w[R] = w[F] = w[z] = w[x] = w[N] = !0, w[n] = w[i] = w[k] = w[a] = w[A] = w[o] = w[s] = w[l] = w[c] = w[d] = w[h] = w[f] = w[g] = w[T] = w[S] = !1;
|
|
2079
|
+
function M(U) {
|
|
2080
|
+
return r(U) && e(U.length) && !!w[t(U)];
|
|
2081
|
+
}
|
|
2082
|
+
return Yt = M, Yt;
|
|
2083
|
+
}
|
|
2084
|
+
var Zt, Ua;
|
|
2085
|
+
function mn() {
|
|
2086
|
+
if (Ua) return Zt;
|
|
2087
|
+
Ua = 1;
|
|
2088
|
+
function t(e) {
|
|
2089
|
+
return function(r) {
|
|
2090
|
+
return e(r);
|
|
2091
|
+
};
|
|
2092
|
+
}
|
|
2093
|
+
return Zt = t, Zt;
|
|
2094
|
+
}
|
|
2095
|
+
var se = { exports: {} };
|
|
2096
|
+
se.exports;
|
|
2097
|
+
var $a;
|
|
2098
|
+
function yn() {
|
|
2099
|
+
return $a || ($a = 1, (function(t, e) {
|
|
2100
|
+
var r = $o(), n = e && !e.nodeType && e, i = n && !0 && t && !t.nodeType && t, a = i && i.exports === n, o = a && r.process, s = (function() {
|
|
2101
|
+
try {
|
|
2102
|
+
var l = i && i.require && i.require("util").types;
|
|
2103
|
+
return l || o && o.binding && o.binding("util");
|
|
2104
|
+
} catch {
|
|
2105
|
+
}
|
|
2106
|
+
})();
|
|
2107
|
+
t.exports = s;
|
|
2108
|
+
})(se, se.exports)), se.exports;
|
|
2109
|
+
}
|
|
2110
|
+
var Jt, Ka;
|
|
2111
|
+
function iu() {
|
|
2112
|
+
if (Ka) return Jt;
|
|
2113
|
+
Ka = 1;
|
|
2114
|
+
var t = au(), e = mn(), r = yn(), n = r && r.isTypedArray, i = n ? e(n) : t;
|
|
2115
|
+
return Jt = i, Jt;
|
|
2116
|
+
}
|
|
2117
|
+
var Qt, za;
|
|
2118
|
+
function Eo() {
|
|
2119
|
+
if (za) return Qt;
|
|
2120
|
+
za = 1;
|
|
2121
|
+
var t = eu(), e = ru(), r = ne(), n = bo(), i = _o(), a = iu(), o = Object.prototype, s = o.hasOwnProperty;
|
|
2122
|
+
function l(c, d) {
|
|
2123
|
+
var h = r(c), f = !h && e(c), g = !h && !f && n(c), T = !h && !f && !g && a(c), S = h || f || g || T, k = S ? t(c.length, String) : [], A = k.length;
|
|
2124
|
+
for (var v in c)
|
|
2125
|
+
(d || s.call(c, v)) && !(S && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2126
|
+
(v == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
2127
|
+
g && (v == "offset" || v == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
2128
|
+
T && (v == "buffer" || v == "byteLength" || v == "byteOffset") || // Skip index properties.
|
|
2129
|
+
i(v, A))) && k.push(v);
|
|
2130
|
+
return k;
|
|
2131
|
+
}
|
|
2132
|
+
return Qt = l, Qt;
|
|
2133
|
+
}
|
|
2134
|
+
var er, Ga;
|
|
2135
|
+
function bn() {
|
|
2136
|
+
if (Ga) return er;
|
|
2137
|
+
Ga = 1;
|
|
2138
|
+
var t = Object.prototype;
|
|
2139
|
+
function e(r) {
|
|
2140
|
+
var n = r && r.constructor, i = typeof n == "function" && n.prototype || t;
|
|
2141
|
+
return r === i;
|
|
2142
|
+
}
|
|
2143
|
+
return er = e, er;
|
|
2144
|
+
}
|
|
2145
|
+
var tr, Ha;
|
|
2146
|
+
function ko() {
|
|
2147
|
+
if (Ha) return tr;
|
|
2148
|
+
Ha = 1;
|
|
2149
|
+
function t(e, r) {
|
|
2150
|
+
return function(n) {
|
|
2151
|
+
return e(r(n));
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
return tr = t, tr;
|
|
2155
|
+
}
|
|
2156
|
+
var rr, Va;
|
|
2157
|
+
function ou() {
|
|
2158
|
+
if (Va) return rr;
|
|
2159
|
+
Va = 1;
|
|
2160
|
+
var t = ko(), e = t(Object.keys, Object);
|
|
2161
|
+
return rr = e, rr;
|
|
2162
|
+
}
|
|
2163
|
+
var nr, Wa;
|
|
2164
|
+
function su() {
|
|
2165
|
+
if (Wa) return nr;
|
|
2166
|
+
Wa = 1;
|
|
2167
|
+
var t = bn(), e = ou(), r = Object.prototype, n = r.hasOwnProperty;
|
|
2168
|
+
function i(a) {
|
|
2169
|
+
if (!t(a))
|
|
2170
|
+
return e(a);
|
|
2171
|
+
var o = [];
|
|
2172
|
+
for (var s in Object(a))
|
|
2173
|
+
n.call(a, s) && s != "constructor" && o.push(s);
|
|
2174
|
+
return o;
|
|
2175
|
+
}
|
|
2176
|
+
return nr = i, nr;
|
|
2177
|
+
}
|
|
2178
|
+
var ar, Xa;
|
|
2179
|
+
function wo() {
|
|
2180
|
+
if (Xa) return ar;
|
|
2181
|
+
Xa = 1;
|
|
2182
|
+
var t = vo(), e = To();
|
|
2183
|
+
function r(n) {
|
|
2184
|
+
return n != null && e(n.length) && !t(n);
|
|
2185
|
+
}
|
|
2186
|
+
return ar = r, ar;
|
|
2187
|
+
}
|
|
2188
|
+
var ir, Ya;
|
|
2189
|
+
function _n() {
|
|
2190
|
+
if (Ya) return ir;
|
|
2191
|
+
Ya = 1;
|
|
2192
|
+
var t = Eo(), e = su(), r = wo();
|
|
2193
|
+
function n(i) {
|
|
2194
|
+
return r(i) ? t(i) : e(i);
|
|
2195
|
+
}
|
|
2196
|
+
return ir = n, ir;
|
|
2197
|
+
}
|
|
2198
|
+
var or, Za;
|
|
2199
|
+
function cu() {
|
|
2200
|
+
if (Za) return or;
|
|
2201
|
+
Za = 1;
|
|
2202
|
+
var t = xe(), e = _n();
|
|
2203
|
+
function r(n, i) {
|
|
2204
|
+
return n && t(i, e(i), n);
|
|
2205
|
+
}
|
|
2206
|
+
return or = r, or;
|
|
2207
|
+
}
|
|
2208
|
+
var sr, Ja;
|
|
2209
|
+
function uu() {
|
|
2210
|
+
if (Ja) return sr;
|
|
2211
|
+
Ja = 1;
|
|
2212
|
+
function t(e) {
|
|
2213
|
+
var r = [];
|
|
2214
|
+
if (e != null)
|
|
2215
|
+
for (var n in Object(e))
|
|
2216
|
+
r.push(n);
|
|
2217
|
+
return r;
|
|
2218
|
+
}
|
|
2219
|
+
return sr = t, sr;
|
|
2220
|
+
}
|
|
2221
|
+
var cr, Qa;
|
|
2222
|
+
function lu() {
|
|
2223
|
+
if (Qa) return cr;
|
|
2224
|
+
Qa = 1;
|
|
2225
|
+
var t = te(), e = bn(), r = uu(), n = Object.prototype, i = n.hasOwnProperty;
|
|
2226
|
+
function a(o) {
|
|
2227
|
+
if (!t(o))
|
|
2228
|
+
return r(o);
|
|
2229
|
+
var s = e(o), l = [];
|
|
2230
|
+
for (var c in o)
|
|
2231
|
+
c == "constructor" && (s || !i.call(o, c)) || l.push(c);
|
|
2232
|
+
return l;
|
|
2233
|
+
}
|
|
2234
|
+
return cr = a, cr;
|
|
2235
|
+
}
|
|
2236
|
+
var ur, ei;
|
|
2237
|
+
function Tn() {
|
|
2238
|
+
if (ei) return ur;
|
|
2239
|
+
ei = 1;
|
|
2240
|
+
var t = Eo(), e = lu(), r = wo();
|
|
2241
|
+
function n(i) {
|
|
2242
|
+
return r(i) ? t(i, !0) : e(i);
|
|
2243
|
+
}
|
|
2244
|
+
return ur = n, ur;
|
|
2245
|
+
}
|
|
2246
|
+
var lr, ti;
|
|
2247
|
+
function du() {
|
|
2248
|
+
if (ti) return lr;
|
|
2249
|
+
ti = 1;
|
|
2250
|
+
var t = xe(), e = Tn();
|
|
2251
|
+
function r(n, i) {
|
|
2252
|
+
return n && t(i, e(i), n);
|
|
2253
|
+
}
|
|
2254
|
+
return lr = r, lr;
|
|
2255
|
+
}
|
|
2256
|
+
var ce = { exports: {} };
|
|
2257
|
+
ce.exports;
|
|
2258
|
+
var ri;
|
|
2259
|
+
function fu() {
|
|
2260
|
+
return ri || (ri = 1, (function(t, e) {
|
|
2261
|
+
var r = P(), n = e && !e.nodeType && e, i = n && !0 && t && !t.nodeType && t, a = i && i.exports === n, o = a ? r.Buffer : void 0, s = o ? o.allocUnsafe : void 0;
|
|
2262
|
+
function l(c, d) {
|
|
2263
|
+
if (d)
|
|
2264
|
+
return c.slice();
|
|
2265
|
+
var h = c.length, f = s ? s(h) : new c.constructor(h);
|
|
2266
|
+
return c.copy(f), f;
|
|
2267
|
+
}
|
|
2268
|
+
t.exports = l;
|
|
2269
|
+
})(ce, ce.exports)), ce.exports;
|
|
2270
|
+
}
|
|
2271
|
+
var dr, ni;
|
|
2272
|
+
function hu() {
|
|
2273
|
+
if (ni) return dr;
|
|
2274
|
+
ni = 1;
|
|
2275
|
+
function t(e, r) {
|
|
2276
|
+
var n = -1, i = e.length;
|
|
2277
|
+
for (r || (r = Array(i)); ++n < i; )
|
|
2278
|
+
r[n] = e[n];
|
|
2279
|
+
return r;
|
|
2280
|
+
}
|
|
2281
|
+
return dr = t, dr;
|
|
2282
|
+
}
|
|
2283
|
+
var fr, ai;
|
|
2284
|
+
function pu() {
|
|
2285
|
+
if (ai) return fr;
|
|
2286
|
+
ai = 1;
|
|
2287
|
+
function t(e, r) {
|
|
2288
|
+
for (var n = -1, i = e == null ? 0 : e.length, a = 0, o = []; ++n < i; ) {
|
|
2289
|
+
var s = e[n];
|
|
2290
|
+
r(s, n, e) && (o[a++] = s);
|
|
2291
|
+
}
|
|
2292
|
+
return o;
|
|
2293
|
+
}
|
|
2294
|
+
return fr = t, fr;
|
|
2295
|
+
}
|
|
2296
|
+
var hr, ii;
|
|
2297
|
+
function So() {
|
|
2298
|
+
if (ii) return hr;
|
|
2299
|
+
ii = 1;
|
|
2300
|
+
function t() {
|
|
2301
|
+
return [];
|
|
2302
|
+
}
|
|
2303
|
+
return hr = t, hr;
|
|
2304
|
+
}
|
|
2305
|
+
var pr, oi;
|
|
2306
|
+
function En() {
|
|
2307
|
+
if (oi) return pr;
|
|
2308
|
+
oi = 1;
|
|
2309
|
+
var t = pu(), e = So(), r = Object.prototype, n = r.propertyIsEnumerable, i = Object.getOwnPropertySymbols, a = i ? function(o) {
|
|
2310
|
+
return o == null ? [] : (o = Object(o), t(i(o), function(s) {
|
|
2311
|
+
return n.call(o, s);
|
|
2312
|
+
}));
|
|
2313
|
+
} : e;
|
|
2314
|
+
return pr = a, pr;
|
|
2315
|
+
}
|
|
2316
|
+
var vr, si;
|
|
2317
|
+
function vu() {
|
|
2318
|
+
if (si) return vr;
|
|
2319
|
+
si = 1;
|
|
2320
|
+
var t = xe(), e = En();
|
|
2321
|
+
function r(n, i) {
|
|
2322
|
+
return t(n, e(n), i);
|
|
2323
|
+
}
|
|
2324
|
+
return vr = r, vr;
|
|
2325
|
+
}
|
|
2326
|
+
var gr, ci;
|
|
2327
|
+
function jo() {
|
|
2328
|
+
if (ci) return gr;
|
|
2329
|
+
ci = 1;
|
|
2330
|
+
function t(e, r) {
|
|
2331
|
+
for (var n = -1, i = r.length, a = e.length; ++n < i; )
|
|
2332
|
+
e[a + n] = r[n];
|
|
2333
|
+
return e;
|
|
2334
|
+
}
|
|
2335
|
+
return gr = t, gr;
|
|
2336
|
+
}
|
|
2337
|
+
var mr, ui;
|
|
2338
|
+
function Co() {
|
|
2339
|
+
if (ui) return mr;
|
|
2340
|
+
ui = 1;
|
|
2341
|
+
var t = ko(), e = t(Object.getPrototypeOf, Object);
|
|
2342
|
+
return mr = e, mr;
|
|
2343
|
+
}
|
|
2344
|
+
var yr, li;
|
|
2345
|
+
function Ao() {
|
|
2346
|
+
if (li) return yr;
|
|
2347
|
+
li = 1;
|
|
2348
|
+
var t = jo(), e = Co(), r = En(), n = So(), i = Object.getOwnPropertySymbols, a = i ? function(o) {
|
|
2349
|
+
for (var s = []; o; )
|
|
2350
|
+
t(s, r(o)), o = e(o);
|
|
2351
|
+
return s;
|
|
2352
|
+
} : n;
|
|
2353
|
+
return yr = a, yr;
|
|
2354
|
+
}
|
|
2355
|
+
var br, di;
|
|
2356
|
+
function gu() {
|
|
2357
|
+
if (di) return br;
|
|
2358
|
+
di = 1;
|
|
2359
|
+
var t = xe(), e = Ao();
|
|
2360
|
+
function r(n, i) {
|
|
2361
|
+
return t(n, e(n), i);
|
|
2362
|
+
}
|
|
2363
|
+
return br = r, br;
|
|
2364
|
+
}
|
|
2365
|
+
var _r, fi;
|
|
2366
|
+
function Io() {
|
|
2367
|
+
if (fi) return _r;
|
|
2368
|
+
fi = 1;
|
|
2369
|
+
var t = jo(), e = ne();
|
|
2370
|
+
function r(n, i, a) {
|
|
2371
|
+
var o = i(n);
|
|
2372
|
+
return e(n) ? o : t(o, a(n));
|
|
2373
|
+
}
|
|
2374
|
+
return _r = r, _r;
|
|
2375
|
+
}
|
|
2376
|
+
var Tr, hi;
|
|
2377
|
+
function mu() {
|
|
2378
|
+
if (hi) return Tr;
|
|
2379
|
+
hi = 1;
|
|
2380
|
+
var t = Io(), e = En(), r = _n();
|
|
2381
|
+
function n(i) {
|
|
2382
|
+
return t(i, r, e);
|
|
2383
|
+
}
|
|
2384
|
+
return Tr = n, Tr;
|
|
2385
|
+
}
|
|
2386
|
+
var Er, pi;
|
|
2387
|
+
function yu() {
|
|
2388
|
+
if (pi) return Er;
|
|
2389
|
+
pi = 1;
|
|
2390
|
+
var t = Io(), e = Ao(), r = Tn();
|
|
2391
|
+
function n(i) {
|
|
2392
|
+
return t(i, r, e);
|
|
2393
|
+
}
|
|
2394
|
+
return Er = n, Er;
|
|
2395
|
+
}
|
|
2396
|
+
var kr, vi;
|
|
2397
|
+
function bu() {
|
|
2398
|
+
if (vi) return kr;
|
|
2399
|
+
vi = 1;
|
|
2400
|
+
var t = W(), e = P(), r = t(e, "DataView");
|
|
2401
|
+
return kr = r, kr;
|
|
2402
|
+
}
|
|
2403
|
+
var wr, gi;
|
|
2404
|
+
function _u() {
|
|
2405
|
+
if (gi) return wr;
|
|
2406
|
+
gi = 1;
|
|
2407
|
+
var t = W(), e = P(), r = t(e, "Promise");
|
|
2408
|
+
return wr = r, wr;
|
|
2409
|
+
}
|
|
2410
|
+
var Sr, mi;
|
|
2411
|
+
function Tu() {
|
|
2412
|
+
if (mi) return Sr;
|
|
2413
|
+
mi = 1;
|
|
2414
|
+
var t = W(), e = P(), r = t(e, "Set");
|
|
2415
|
+
return Sr = r, Sr;
|
|
2416
|
+
}
|
|
2417
|
+
var jr, yi;
|
|
2418
|
+
function Eu() {
|
|
2419
|
+
if (yi) return jr;
|
|
2420
|
+
yi = 1;
|
|
2421
|
+
var t = W(), e = P(), r = t(e, "WeakMap");
|
|
2422
|
+
return jr = r, jr;
|
|
2423
|
+
}
|
|
2424
|
+
var Cr, bi;
|
|
2425
|
+
function kn() {
|
|
2426
|
+
if (bi) return Cr;
|
|
2427
|
+
bi = 1;
|
|
2428
|
+
var t = bu(), e = vn(), r = _u(), n = Tu(), i = Eu(), a = je(), o = go(), s = "[object Map]", l = "[object Object]", c = "[object Promise]", d = "[object Set]", h = "[object WeakMap]", f = "[object DataView]", g = o(t), T = o(e), S = o(r), k = o(n), A = o(i), v = a;
|
|
2429
|
+
return (t && v(new t(new ArrayBuffer(1))) != f || e && v(new e()) != s || r && v(r.resolve()) != c || n && v(new n()) != d || i && v(new i()) != h) && (v = function(b) {
|
|
2430
|
+
var j = a(b), C = j == l ? b.constructor : void 0, R = C ? o(C) : "";
|
|
2431
|
+
if (R)
|
|
2432
|
+
switch (R) {
|
|
2433
|
+
case g:
|
|
2434
|
+
return f;
|
|
2435
|
+
case T:
|
|
2436
|
+
return s;
|
|
2437
|
+
case S:
|
|
2438
|
+
return c;
|
|
2439
|
+
case k:
|
|
2440
|
+
return d;
|
|
2441
|
+
case A:
|
|
2442
|
+
return h;
|
|
2443
|
+
}
|
|
2444
|
+
return j;
|
|
2445
|
+
}), Cr = v, Cr;
|
|
2446
|
+
}
|
|
2447
|
+
var Ar, _i;
|
|
2448
|
+
function ku() {
|
|
2449
|
+
if (_i) return Ar;
|
|
2450
|
+
_i = 1;
|
|
2451
|
+
var t = Object.prototype, e = t.hasOwnProperty;
|
|
2452
|
+
function r(n) {
|
|
2453
|
+
var i = n.length, a = new n.constructor(i);
|
|
2454
|
+
return i && typeof n[0] == "string" && e.call(n, "index") && (a.index = n.index, a.input = n.input), a;
|
|
2455
|
+
}
|
|
2456
|
+
return Ar = r, Ar;
|
|
2457
|
+
}
|
|
2458
|
+
var Ir, Ti;
|
|
2459
|
+
function wu() {
|
|
2460
|
+
if (Ti) return Ir;
|
|
2461
|
+
Ti = 1;
|
|
2462
|
+
var t = P(), e = t.Uint8Array;
|
|
2463
|
+
return Ir = e, Ir;
|
|
2464
|
+
}
|
|
2465
|
+
var qr, Ei;
|
|
2466
|
+
function wn() {
|
|
2467
|
+
if (Ei) return qr;
|
|
2468
|
+
Ei = 1;
|
|
2469
|
+
var t = wu();
|
|
2470
|
+
function e(r) {
|
|
2471
|
+
var n = new r.constructor(r.byteLength);
|
|
2472
|
+
return new t(n).set(new t(r)), n;
|
|
2473
|
+
}
|
|
2474
|
+
return qr = e, qr;
|
|
2475
|
+
}
|
|
2476
|
+
var xr, ki;
|
|
2477
|
+
function Su() {
|
|
2478
|
+
if (ki) return xr;
|
|
2479
|
+
ki = 1;
|
|
2480
|
+
var t = wn();
|
|
2481
|
+
function e(r, n) {
|
|
2482
|
+
var i = n ? t(r.buffer) : r.buffer;
|
|
2483
|
+
return new r.constructor(i, r.byteOffset, r.byteLength);
|
|
2484
|
+
}
|
|
2485
|
+
return xr = e, xr;
|
|
2486
|
+
}
|
|
2487
|
+
var Rr, wi;
|
|
2488
|
+
function ju() {
|
|
2489
|
+
if (wi) return Rr;
|
|
2490
|
+
wi = 1;
|
|
2491
|
+
var t = /\w*$/;
|
|
2492
|
+
function e(r) {
|
|
2493
|
+
var n = new r.constructor(r.source, t.exec(r));
|
|
2494
|
+
return n.lastIndex = r.lastIndex, n;
|
|
2495
|
+
}
|
|
2496
|
+
return Rr = e, Rr;
|
|
2497
|
+
}
|
|
2498
|
+
var Or, Si;
|
|
2499
|
+
function Cu() {
|
|
2500
|
+
if (Si) return Or;
|
|
2501
|
+
Si = 1;
|
|
2502
|
+
var t = Vi(), e = t ? t.prototype : void 0, r = e ? e.valueOf : void 0;
|
|
2503
|
+
function n(i) {
|
|
2504
|
+
return r ? Object(r.call(i)) : {};
|
|
2505
|
+
}
|
|
2506
|
+
return Or = n, Or;
|
|
2507
|
+
}
|
|
2508
|
+
var Mr, ji;
|
|
2509
|
+
function Au() {
|
|
2510
|
+
if (ji) return Mr;
|
|
2511
|
+
ji = 1;
|
|
2512
|
+
var t = wn();
|
|
2513
|
+
function e(r, n) {
|
|
2514
|
+
var i = n ? t(r.buffer) : r.buffer;
|
|
2515
|
+
return new r.constructor(i, r.byteOffset, r.length);
|
|
2516
|
+
}
|
|
2517
|
+
return Mr = e, Mr;
|
|
2518
|
+
}
|
|
2519
|
+
var Dr, Ci;
|
|
2520
|
+
function Iu() {
|
|
2521
|
+
if (Ci) return Dr;
|
|
2522
|
+
Ci = 1;
|
|
2523
|
+
var t = wn(), e = Su(), r = ju(), n = Cu(), i = Au(), a = "[object Boolean]", o = "[object Date]", s = "[object Map]", l = "[object Number]", c = "[object RegExp]", d = "[object Set]", h = "[object String]", f = "[object Symbol]", g = "[object ArrayBuffer]", T = "[object DataView]", S = "[object Float32Array]", k = "[object Float64Array]", A = "[object Int8Array]", v = "[object Int16Array]", b = "[object Int32Array]", j = "[object Uint8Array]", C = "[object Uint8ClampedArray]", R = "[object Uint16Array]", F = "[object Uint32Array]";
|
|
2524
|
+
function z(x, N, w) {
|
|
2525
|
+
var M = x.constructor;
|
|
2526
|
+
switch (N) {
|
|
2527
|
+
case g:
|
|
2528
|
+
return t(x);
|
|
2529
|
+
case a:
|
|
2530
|
+
case o:
|
|
2531
|
+
return new M(+x);
|
|
2532
|
+
case T:
|
|
2533
|
+
return e(x, w);
|
|
2534
|
+
case S:
|
|
2535
|
+
case k:
|
|
2536
|
+
case A:
|
|
2537
|
+
case v:
|
|
2538
|
+
case b:
|
|
2539
|
+
case j:
|
|
2540
|
+
case C:
|
|
2541
|
+
case R:
|
|
2542
|
+
case F:
|
|
2543
|
+
return i(x, w);
|
|
2544
|
+
case s:
|
|
2545
|
+
return new M();
|
|
2546
|
+
case l:
|
|
2547
|
+
case h:
|
|
2548
|
+
return new M(x);
|
|
2549
|
+
case c:
|
|
2550
|
+
return r(x);
|
|
2551
|
+
case d:
|
|
2552
|
+
return new M();
|
|
2553
|
+
case f:
|
|
2554
|
+
return n(x);
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
return Dr = z, Dr;
|
|
2558
|
+
}
|
|
2559
|
+
var Lr, Ai;
|
|
2560
|
+
function qu() {
|
|
2561
|
+
if (Ai) return Lr;
|
|
2562
|
+
Ai = 1;
|
|
2563
|
+
var t = te(), e = Object.create, r = /* @__PURE__ */ (function() {
|
|
2564
|
+
function n() {
|
|
2565
|
+
}
|
|
2566
|
+
return function(i) {
|
|
2567
|
+
if (!t(i))
|
|
2568
|
+
return {};
|
|
2569
|
+
if (e)
|
|
2570
|
+
return e(i);
|
|
2571
|
+
n.prototype = i;
|
|
2572
|
+
var a = new n();
|
|
2573
|
+
return n.prototype = void 0, a;
|
|
2574
|
+
};
|
|
2575
|
+
})();
|
|
2576
|
+
return Lr = r, Lr;
|
|
2577
|
+
}
|
|
2578
|
+
var Pr, Ii;
|
|
2579
|
+
function xu() {
|
|
2580
|
+
if (Ii) return Pr;
|
|
2581
|
+
Ii = 1;
|
|
2582
|
+
var t = qu(), e = Co(), r = bn();
|
|
2583
|
+
function n(i) {
|
|
2584
|
+
return typeof i.constructor == "function" && !r(i) ? t(e(i)) : {};
|
|
2585
|
+
}
|
|
2586
|
+
return Pr = n, Pr;
|
|
2587
|
+
}
|
|
2588
|
+
var Br, qi;
|
|
2589
|
+
function Ru() {
|
|
2590
|
+
if (qi) return Br;
|
|
2591
|
+
qi = 1;
|
|
2592
|
+
var t = kn(), e = le(), r = "[object Map]";
|
|
2593
|
+
function n(i) {
|
|
2594
|
+
return e(i) && t(i) == r;
|
|
2595
|
+
}
|
|
2596
|
+
return Br = n, Br;
|
|
2597
|
+
}
|
|
2598
|
+
var Fr, xi;
|
|
2599
|
+
function Ou() {
|
|
2600
|
+
if (xi) return Fr;
|
|
2601
|
+
xi = 1;
|
|
2602
|
+
var t = Ru(), e = mn(), r = yn(), n = r && r.isMap, i = n ? e(n) : t;
|
|
2603
|
+
return Fr = i, Fr;
|
|
2604
|
+
}
|
|
2605
|
+
var Nr, Ri;
|
|
2606
|
+
function Mu() {
|
|
2607
|
+
if (Ri) return Nr;
|
|
2608
|
+
Ri = 1;
|
|
2609
|
+
var t = kn(), e = le(), r = "[object Set]";
|
|
2610
|
+
function n(i) {
|
|
2611
|
+
return e(i) && t(i) == r;
|
|
2612
|
+
}
|
|
2613
|
+
return Nr = n, Nr;
|
|
2614
|
+
}
|
|
2615
|
+
var Ur, Oi;
|
|
2616
|
+
function Du() {
|
|
2617
|
+
if (Oi) return Ur;
|
|
2618
|
+
Oi = 1;
|
|
2619
|
+
var t = Mu(), e = mn(), r = yn(), n = r && r.isSet, i = n ? e(n) : t;
|
|
2620
|
+
return Ur = i, Ur;
|
|
2621
|
+
}
|
|
2622
|
+
var $r, Mi;
|
|
2623
|
+
function Lu() {
|
|
2624
|
+
if (Mi) return $r;
|
|
2625
|
+
Mi = 1;
|
|
2626
|
+
var t = Zc(), e = Jc(), r = gn(), n = cu(), i = du(), a = fu(), o = hu(), s = vu(), l = gu(), c = mu(), d = yu(), h = kn(), f = ku(), g = Iu(), T = xu(), S = ne(), k = bo(), A = Ou(), v = te(), b = Du(), j = _n(), C = Tn(), R = 1, F = 2, z = 4, x = "[object Arguments]", N = "[object Array]", w = "[object Boolean]", M = "[object Date]", U = "[object Error]", X = "[object Function]", Re = "[object GeneratorFunction]", Oe = "[object Map]", Me = "[object Number]", de = "[object Object]", De = "[object RegExp]", Le = "[object Set]", fe = "[object String]", Pe = "[object Symbol]", ae = "[object WeakMap]", Be = "[object ArrayBuffer]", Fe = "[object DataView]", Ne = "[object Float32Array]", Ue = "[object Float64Array]", $e = "[object Int8Array]", Ke = "[object Int16Array]", u = "[object Int32Array]", p = "[object Uint8Array]", m = "[object Uint8ClampedArray]", _ = "[object Uint16Array]", I = "[object Uint32Array]", y = {};
|
|
2627
|
+
y[x] = y[N] = y[Be] = y[Fe] = y[w] = y[M] = y[Ne] = y[Ue] = y[$e] = y[Ke] = y[u] = y[Oe] = y[Me] = y[de] = y[De] = y[Le] = y[fe] = y[Pe] = y[p] = y[m] = y[_] = y[I] = !0, y[U] = y[X] = y[ae] = !1;
|
|
2628
|
+
function q(E, Y, Z, qo, he, $) {
|
|
2629
|
+
var O, pe = Y & R, ve = Y & F, xo = Y & z;
|
|
2630
|
+
if (Z && (O = he ? Z(E, qo, he, $) : Z(E)), O !== void 0)
|
|
2631
|
+
return O;
|
|
2632
|
+
if (!v(E))
|
|
2633
|
+
return E;
|
|
2634
|
+
var Sn = S(E);
|
|
2635
|
+
if (Sn) {
|
|
2636
|
+
if (O = f(E), !pe)
|
|
2637
|
+
return o(E, O);
|
|
2638
|
+
} else {
|
|
2639
|
+
var J = h(E), jn = J == X || J == Re;
|
|
2640
|
+
if (k(E))
|
|
2641
|
+
return a(E, pe);
|
|
2642
|
+
if (J == de || J == x || jn && !he) {
|
|
2643
|
+
if (O = ve || jn ? {} : T(E), !pe)
|
|
2644
|
+
return ve ? l(E, i(O, E)) : s(E, n(O, E));
|
|
2645
|
+
} else {
|
|
2646
|
+
if (!y[J])
|
|
2647
|
+
return he ? E : {};
|
|
2648
|
+
O = g(E, J, pe);
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
$ || ($ = new t());
|
|
2652
|
+
var Cn = $.get(E);
|
|
2653
|
+
if (Cn)
|
|
2654
|
+
return Cn;
|
|
2655
|
+
$.set(E, O), b(E) ? E.forEach(function(K) {
|
|
2656
|
+
O.add(q(K, Y, Z, K, E, $));
|
|
2657
|
+
}) : A(E) && E.forEach(function(K, G) {
|
|
2658
|
+
O.set(G, q(K, Y, Z, G, E, $));
|
|
2659
|
+
});
|
|
2660
|
+
var Ro = xo ? ve ? d : c : ve ? C : j, An = Sn ? void 0 : Ro(E);
|
|
2661
|
+
return e(An || E, function(K, G) {
|
|
2662
|
+
An && (G = K, K = E[G]), r(O, G, q(K, Y, Z, G, E, $));
|
|
2663
|
+
}), O;
|
|
2664
|
+
}
|
|
2665
|
+
return $r = q, $r;
|
|
2666
|
+
}
|
|
2667
|
+
var Kr, Di;
|
|
2668
|
+
function Pu() {
|
|
2669
|
+
if (Di) return Kr;
|
|
2670
|
+
Di = 1;
|
|
2671
|
+
var t = Lu(), e = 1, r = 4;
|
|
2672
|
+
function n(i) {
|
|
2673
|
+
return t(i, e | r);
|
|
2674
|
+
}
|
|
2675
|
+
return Kr = n, Kr;
|
|
2676
|
+
}
|
|
2677
|
+
Pu();
|
|
2678
|
+
var zr, Li;
|
|
2679
|
+
function Bu() {
|
|
2680
|
+
if (Li) return zr;
|
|
2681
|
+
Li = 1;
|
|
2682
|
+
var t = ne(), e = cn(), r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, n = /^\w*$/;
|
|
2683
|
+
function i(a, o) {
|
|
2684
|
+
if (t(a))
|
|
2685
|
+
return !1;
|
|
2686
|
+
var s = typeof a;
|
|
2687
|
+
return s == "number" || s == "symbol" || s == "boolean" || a == null || e(a) ? !0 : n.test(a) || !r.test(a) || o != null && a in Object(o);
|
|
2688
|
+
}
|
|
2689
|
+
return zr = i, zr;
|
|
2690
|
+
}
|
|
2691
|
+
var Gr, Pi;
|
|
2692
|
+
function Fu() {
|
|
2693
|
+
if (Pi) return Gr;
|
|
2694
|
+
Pi = 1;
|
|
2695
|
+
var t = mo(), e = "Expected a function";
|
|
2696
|
+
function r(n, i) {
|
|
2697
|
+
if (typeof n != "function" || i != null && typeof i != "function")
|
|
2698
|
+
throw new TypeError(e);
|
|
2699
|
+
var a = function() {
|
|
2700
|
+
var o = arguments, s = i ? i.apply(this, o) : o[0], l = a.cache;
|
|
2701
|
+
if (l.has(s))
|
|
2702
|
+
return l.get(s);
|
|
2703
|
+
var c = n.apply(this, o);
|
|
2704
|
+
return a.cache = l.set(s, c) || l, c;
|
|
2705
|
+
};
|
|
2706
|
+
return a.cache = new (r.Cache || t)(), a;
|
|
2707
|
+
}
|
|
2708
|
+
return r.Cache = t, Gr = r, Gr;
|
|
2709
|
+
}
|
|
2710
|
+
var Hr, Bi;
|
|
2711
|
+
function Nu() {
|
|
2712
|
+
if (Bi) return Hr;
|
|
2713
|
+
Bi = 1;
|
|
2714
|
+
var t = Fu(), e = 500;
|
|
2715
|
+
function r(n) {
|
|
2716
|
+
var i = t(n, function(o) {
|
|
2717
|
+
return a.size === e && a.clear(), o;
|
|
2718
|
+
}), a = i.cache;
|
|
2719
|
+
return i;
|
|
2720
|
+
}
|
|
2721
|
+
return Hr = r, Hr;
|
|
2722
|
+
}
|
|
2723
|
+
var Vr, Fi;
|
|
2724
|
+
function Uu() {
|
|
2725
|
+
if (Fi) return Vr;
|
|
2726
|
+
Fi = 1;
|
|
2727
|
+
var t = Nu(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, r = /\\(\\)?/g, n = t(function(i) {
|
|
2728
|
+
var a = [];
|
|
2729
|
+
return i.charCodeAt(0) === 46 && a.push(""), i.replace(e, function(o, s, l, c) {
|
|
2730
|
+
a.push(l ? c.replace(r, "$1") : s || o);
|
|
2731
|
+
}), a;
|
|
2732
|
+
});
|
|
2733
|
+
return Vr = n, Vr;
|
|
2734
|
+
}
|
|
2735
|
+
var Wr, Ni;
|
|
2736
|
+
function $u() {
|
|
2737
|
+
if (Ni) return Wr;
|
|
2738
|
+
Ni = 1;
|
|
2739
|
+
function t(e, r) {
|
|
2740
|
+
for (var n = -1, i = e == null ? 0 : e.length, a = Array(i); ++n < i; )
|
|
2741
|
+
a[n] = r(e[n], n, e);
|
|
2742
|
+
return a;
|
|
2743
|
+
}
|
|
2744
|
+
return Wr = t, Wr;
|
|
2745
|
+
}
|
|
2746
|
+
var Xr, Ui;
|
|
2747
|
+
function Ku() {
|
|
2748
|
+
if (Ui) return Xr;
|
|
2749
|
+
Ui = 1;
|
|
2750
|
+
var t = Vi(), e = $u(), r = ne(), n = cn(), i = t ? t.prototype : void 0, a = i ? i.toString : void 0;
|
|
2751
|
+
function o(s) {
|
|
2752
|
+
if (typeof s == "string")
|
|
2753
|
+
return s;
|
|
2754
|
+
if (r(s))
|
|
2755
|
+
return e(s, o) + "";
|
|
2756
|
+
if (n(s))
|
|
2757
|
+
return a ? a.call(s) : "";
|
|
2758
|
+
var l = s + "";
|
|
2759
|
+
return l == "0" && 1 / s == -1 / 0 ? "-0" : l;
|
|
2760
|
+
}
|
|
2761
|
+
return Xr = o, Xr;
|
|
2762
|
+
}
|
|
2763
|
+
var Yr, $i;
|
|
2764
|
+
function zu() {
|
|
2765
|
+
if ($i) return Yr;
|
|
2766
|
+
$i = 1;
|
|
2767
|
+
var t = Ku();
|
|
2768
|
+
function e(r) {
|
|
2769
|
+
return r == null ? "" : t(r);
|
|
2770
|
+
}
|
|
2771
|
+
return Yr = e, Yr;
|
|
2772
|
+
}
|
|
2773
|
+
var Zr, Ki;
|
|
2774
|
+
function Gu() {
|
|
2775
|
+
if (Ki) return Zr;
|
|
2776
|
+
Ki = 1;
|
|
2777
|
+
var t = ne(), e = Bu(), r = Uu(), n = zu();
|
|
2778
|
+
function i(a, o) {
|
|
2779
|
+
return t(a) ? a : e(a, o) ? [a] : r(n(a));
|
|
2780
|
+
}
|
|
2781
|
+
return Zr = i, Zr;
|
|
2782
|
+
}
|
|
2783
|
+
var Jr, zi;
|
|
2784
|
+
function Hu() {
|
|
2785
|
+
if (zi) return Jr;
|
|
2786
|
+
zi = 1;
|
|
2787
|
+
var t = cn();
|
|
2788
|
+
function e(r) {
|
|
2789
|
+
if (typeof r == "string" || t(r))
|
|
2790
|
+
return r;
|
|
2791
|
+
var n = r + "";
|
|
2792
|
+
return n == "0" && 1 / r == -1 / 0 ? "-0" : n;
|
|
2793
|
+
}
|
|
2794
|
+
return Jr = e, Jr;
|
|
2795
|
+
}
|
|
2796
|
+
var Qr, Gi;
|
|
2797
|
+
function Vu() {
|
|
2798
|
+
if (Gi) return Qr;
|
|
2799
|
+
Gi = 1;
|
|
2800
|
+
var t = gn(), e = Gu(), r = _o(), n = te(), i = Hu();
|
|
2801
|
+
function a(o, s, l, c) {
|
|
2802
|
+
if (!n(o))
|
|
2803
|
+
return o;
|
|
2804
|
+
s = e(s, o);
|
|
2805
|
+
for (var d = -1, h = s.length, f = h - 1, g = o; g != null && ++d < h; ) {
|
|
2806
|
+
var T = i(s[d]), S = l;
|
|
2807
|
+
if (T === "__proto__" || T === "constructor" || T === "prototype")
|
|
2808
|
+
return o;
|
|
2809
|
+
if (d != f) {
|
|
2810
|
+
var k = g[T];
|
|
2811
|
+
S = c ? c(k, T, g) : void 0, S === void 0 && (S = n(k) ? k : r(s[d + 1]) ? [] : {});
|
|
2812
|
+
}
|
|
2813
|
+
t(g, T, S), g = g[T];
|
|
2814
|
+
}
|
|
2815
|
+
return o;
|
|
2816
|
+
}
|
|
2817
|
+
return Qr = a, Qr;
|
|
2818
|
+
}
|
|
2819
|
+
var en, Hi;
|
|
2820
|
+
function Wu() {
|
|
2821
|
+
if (Hi) return en;
|
|
2822
|
+
Hi = 1;
|
|
2823
|
+
var t = Vu();
|
|
2824
|
+
function e(r, n, i) {
|
|
2825
|
+
return r == null ? r : t(r, n, i);
|
|
2826
|
+
}
|
|
2827
|
+
return en = e, en;
|
|
2828
|
+
}
|
|
2829
|
+
Wu();
|
|
2830
|
+
const Xu = { class: "wt-chat-emoji" }, Yu = {
|
|
2831
|
+
__name: "wt-chat-emoji",
|
|
2832
|
+
props: {
|
|
2833
|
+
size: {
|
|
2834
|
+
type: String,
|
|
2835
|
+
default: zo.MD
|
|
2836
|
+
},
|
|
2837
|
+
/**
|
|
2838
|
+
* @author HlukhovYe
|
|
2839
|
+
* teleport popup to specific element, pass selector
|
|
2840
|
+
* https://webitel.atlassian.net/browse/WTEL-8731
|
|
2841
|
+
*/
|
|
2842
|
+
popupTeleportTo: {
|
|
2843
|
+
type: String,
|
|
2844
|
+
default: ""
|
|
2845
|
+
},
|
|
2846
|
+
filled: {
|
|
2847
|
+
type: Boolean,
|
|
2848
|
+
default: !1
|
|
2849
|
+
},
|
|
2850
|
+
rounded: {
|
|
2851
|
+
type: Boolean,
|
|
2852
|
+
default: !0
|
|
2853
|
+
}
|
|
2854
|
+
},
|
|
2855
|
+
emits: [
|
|
2856
|
+
"insert-emoji"
|
|
2857
|
+
],
|
|
2858
|
+
setup(t, { emit: e }) {
|
|
2859
|
+
const r = t, n = e, i = ze(null), a = ze(!1), o = ze(null), s = In(() => r.popupTeleportTo || "body"), l = In(
|
|
2860
|
+
() => r.filled || a.value ? "active" : "outlined"
|
|
2861
|
+
), c = async () => {
|
|
2862
|
+
o.value || (o.value = document.createElement("emoji-picker"), d(), o.value.addEventListener("emoji-click", h));
|
|
2863
|
+
}, d = () => {
|
|
2864
|
+
i.value && o.value && i.value.appendChild(o.value);
|
|
2865
|
+
}, h = (k) => {
|
|
2866
|
+
const { unicode: A } = k.detail;
|
|
2867
|
+
n("insert-emoji", A), f();
|
|
2868
|
+
}, f = () => {
|
|
2869
|
+
a.value = !1, o.value && i.value && (o.value.removeEventListener("emoji-click", h), i.value.removeChild(o.value), o.value = null);
|
|
2870
|
+
}, g = (k) => {
|
|
2871
|
+
i.value?.contains(k.target) || f();
|
|
2872
|
+
}, T = async () => {
|
|
2873
|
+
S(), a.value = !a.value, a.value ? (await Uo(), await c()) : f();
|
|
2874
|
+
}, S = () => Ho.$emit("chat-input-focus");
|
|
2875
|
+
return Oo(() => {
|
|
2876
|
+
f();
|
|
2877
|
+
}), (k, A) => {
|
|
2878
|
+
const v = Mo("clickaway");
|
|
2879
|
+
return Do((Ge(), qn("div", Xu, [
|
|
2880
|
+
Lo(Bo(Go), {
|
|
2881
|
+
size: t.size,
|
|
2882
|
+
variant: l.value,
|
|
2883
|
+
color: "secondary",
|
|
2884
|
+
icon: "chat-emoji",
|
|
2885
|
+
rounded: t.rounded,
|
|
2886
|
+
wide: "",
|
|
2887
|
+
onClick: T
|
|
2888
|
+
}, null, 8, ["size", "variant", "rounded"]),
|
|
2889
|
+
(Ge(), Po(Fo, {
|
|
2890
|
+
defer: "",
|
|
2891
|
+
disabled: !t.popupTeleportTo,
|
|
2892
|
+
to: s.value
|
|
2893
|
+
}, [
|
|
2894
|
+
a.value ? (Ge(), qn("div", {
|
|
2895
|
+
key: 0,
|
|
2896
|
+
ref_key: "emojiPickerWrapper",
|
|
2897
|
+
ref: i,
|
|
2898
|
+
class: "wt-chat-emoji__wrapper"
|
|
2899
|
+
}, null, 512)) : No("", !0)
|
|
2900
|
+
], 8, ["disabled", "to"]))
|
|
2901
|
+
])), [
|
|
2902
|
+
[v, g]
|
|
2903
|
+
]);
|
|
2904
|
+
};
|
|
2905
|
+
}
|
|
2906
|
+
}, el = /* @__PURE__ */ Ko(Yu, [["__scopeId", "data-v-d6ce560a"]]);
|
|
2907
|
+
export {
|
|
2908
|
+
el as default
|
|
2909
|
+
};
|