@crmchatreactcomponent/quick-messages 0.0.6 → 0.0.8

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/index.es.js CHANGED
@@ -1,54 +1,55 @@
1
- import { jsx as t, jsxs as m, Fragment as w } from "react/jsx-runtime";
2
- import { useContext as F, useMemo as S, useState as v, useEffect as D, createContext as j, useRef as _ } from "react";
3
- import { ConfigProvider as Me, theme as Ee, Popover as T, Space as C, message as Ge, Modal as I, Table as E, Empty as P, Button as b, Flex as G, Input as $, Popconfirm as $e, Menu as we, Alert as Le, ColorPicker as Ae, Tooltip as Ne } from "antd";
4
- import Oe, { EmojiStyle as Fe, Theme as L } from "emoji-picker-react";
5
- import { useTranslation as z, I18nextProvider as je } from "react-i18next";
6
- import y from "styled-components";
7
- import { DeleteOutlined as _e, EditOutlined as Te, PlusOutlined as Ie, SettingOutlined as Pe } from "@ant-design/icons";
8
- import { useLocalStorage as We } from "react-use";
9
- import Be from "color";
10
- import He from "i18next";
11
- function W() {
12
- const { theme: e } = F(Me.ConfigContext);
13
- return S(() => (e == null ? void 0 : e.algorithm) === Ee.darkAlgorithm, [e]);
14
- }
15
- const Ke = Fe.FACEBOOK, St = ({
1
+ import { jsx as o, jsxs as h, Fragment as ee } from "react/jsx-runtime";
2
+ import { useContext as me, useMemo as D, useState as $, useEffect as E, createContext as ve, useRef as xe } from "react";
3
+ import { ConfigProvider as St, theme as jt, Popover as Ce, Space as C, message as $t, Modal as Te, Table as _, Button as T, Flex as z, Empty as Se, Input as U, Popconfirm as kt, Menu as At, Alert as wt, ColorPicker as Pt, Tooltip as Dt } from "antd";
4
+ import Ot, { EmojiStyle as Mt, Theme as te } from "emoji-picker-react";
5
+ import { useTranslation as I, I18nextProvider as Et } from "react-i18next";
6
+ import { uniqBy as It } from "lodash-es";
7
+ import k from "styled-components";
8
+ import { DeleteOutlined as Nt, EditOutlined as Lt, PlusOutlined as Gt, SettingOutlined as Ht } from "@ant-design/icons";
9
+ import { useLocalStorage as _t } from "react-use";
10
+ import zt from "color";
11
+ import Ft from "i18next";
12
+ function je() {
13
+ const { theme: e } = me(St.ConfigContext);
14
+ return D(() => (e == null ? void 0 : e.algorithm) === jt.darkAlgorithm, [e]);
15
+ }
16
+ const Rt = Mt.FACEBOOK, Oo = ({
16
17
  children: e,
17
- disabled: n = !1,
18
- onSelect: a = () => {
18
+ disabled: t = !1,
19
+ onSelect: r = () => {
19
20
  },
20
- onOpenChange: r = () => {
21
+ onOpenChange: n = () => {
21
22
  }
22
23
  }) => {
23
- const [i, l] = v(!1), u = W();
24
- D(() => {
25
- r(i);
26
- }, [i]);
27
- function f(d) {
28
- a(d.emoji), l(!1);
29
- }
30
- function c(d) {
31
- n || l(d);
32
- }
33
- return /* @__PURE__ */ t(
34
- T,
24
+ const [a, i] = $(!1), u = je();
25
+ E(() => {
26
+ n(a);
27
+ }, [a]);
28
+ function p(s) {
29
+ r(s.emoji), i(!1);
30
+ }
31
+ function c(s) {
32
+ t || i(s);
33
+ }
34
+ return /* @__PURE__ */ o(
35
+ Ce,
35
36
  {
36
37
  title: "",
37
- open: i,
38
+ open: a,
38
39
  onOpenChange: c,
39
40
  overlayInnerStyle: {
40
41
  backgroundColor: "transparent",
41
42
  padding: 0
42
43
  },
43
44
  trigger: ["click"],
44
- content: /* @__PURE__ */ t(C, { direction: "vertical", size: 12, children: /* @__PURE__ */ t(
45
- Oe,
45
+ content: /* @__PURE__ */ o(C, { direction: "vertical", size: 12, children: /* @__PURE__ */ o(
46
+ Ot,
46
47
  {
47
48
  skinTonesDisabled: !0,
48
- onEmojiClick: f,
49
- emojiStyle: Ke,
49
+ onEmojiClick: p,
50
+ emojiStyle: Rt,
50
51
  lazyLoadEmojis: !1,
51
- theme: u ? L.DARK : L.LIGHT
52
+ theme: u ? te.DARK : te.LIGHT
52
53
  }
53
54
  ) }),
54
55
  destroyTooltipOnHide: !0,
@@ -56,61 +57,635 @@ const Ke = Fe.FACEBOOK, St = ({
56
57
  }
57
58
  );
58
59
  };
59
- function Re() {
60
+ function Bt() {
60
61
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
61
- const n = Math.random() * 16 | 0;
62
- return (e == "x" ? n : n & 3 | 8).toString(16);
62
+ const t = Math.random() * 16 | 0;
63
+ return (e == "x" ? t : t & 3 | 8).toString(16);
63
64
  });
64
65
  }
65
- function B(e, n) {
66
- return e.length > n ? e.substring(0, n) + "…" : e;
66
+ function $e(e, t) {
67
+ return e.length > t ? e.substring(0, t) + "…" : e;
67
68
  }
68
- const H = j(null);
69
- function Dt(e) {
70
- const [n, a] = Ge.useMessage(), [r, i] = I.useModal();
71
- return /* @__PURE__ */ m(
72
- H.Provider,
69
+ const ke = ve(null);
70
+ function Mo(e) {
71
+ const [t, r] = $t.useMessage(), [n, a] = Te.useModal();
72
+ return /* @__PURE__ */ h(
73
+ ke.Provider,
73
74
  {
74
75
  value: {
75
- messageApi: n,
76
- modalApi: r
76
+ messageApi: t,
77
+ modalApi: n
77
78
  },
78
79
  children: [
80
+ r,
79
81
  a,
80
- i,
81
82
  e.children
82
83
  ]
83
84
  }
84
85
  );
85
86
  }
86
- const qe = ({
87
+ class Kt {
88
+ constructor() {
89
+ this.type = y.PLAIN;
90
+ }
91
+ toText(t) {
92
+ return t;
93
+ }
94
+ toHtml(t) {
95
+ return t;
96
+ }
97
+ parse(t) {
98
+ return t;
99
+ }
100
+ }
101
+ var Vt = typeof global == "object" && global && global.Object === Object && global, Ae = Vt, qt = typeof self == "object" && self && self.Object === Object && self, Ut = Ae || qt || Function("return this")(), w = Ut, Wt = w.Symbol, F = Wt, we = Object.prototype, Yt = we.hasOwnProperty, Jt = we.toString, N = F ? F.toStringTag : void 0;
102
+ function Xt(e) {
103
+ var t = Yt.call(e, N), r = e[N];
104
+ try {
105
+ e[N] = void 0;
106
+ var n = !0;
107
+ } catch {
108
+ }
109
+ var a = Jt.call(e);
110
+ return n && (t ? e[N] = r : delete e[N]), a;
111
+ }
112
+ var Qt = Object.prototype, Zt = Qt.toString;
113
+ function er(e) {
114
+ return Zt.call(e);
115
+ }
116
+ var tr = "[object Null]", rr = "[object Undefined]", re = F ? F.toStringTag : void 0;
117
+ function O(e) {
118
+ return e == null ? e === void 0 ? rr : tr : re && re in Object(e) ? Xt(e) : er(e);
119
+ }
120
+ function G(e) {
121
+ return e != null && typeof e == "object";
122
+ }
123
+ var nr = Array.isArray, S = nr;
124
+ function Pe(e) {
125
+ var t = typeof e;
126
+ return e != null && (t == "object" || t == "function");
127
+ }
128
+ var or = "[object AsyncFunction]", ar = "[object Function]", ir = "[object GeneratorFunction]", sr = "[object Proxy]";
129
+ function De(e) {
130
+ if (!Pe(e))
131
+ return !1;
132
+ var t = O(e);
133
+ return t == ar || t == ir || t == or || t == sr;
134
+ }
135
+ var lr = w["__core-js_shared__"], B = lr, ne = function() {
136
+ var e = /[^.]+$/.exec(B && B.keys && B.keys.IE_PROTO || "");
137
+ return e ? "Symbol(src)_1." + e : "";
138
+ }();
139
+ function cr(e) {
140
+ return !!ne && ne in e;
141
+ }
142
+ var ur = Function.prototype, dr = ur.toString;
143
+ function M(e) {
144
+ if (e != null) {
145
+ try {
146
+ return dr.call(e);
147
+ } catch {
148
+ }
149
+ try {
150
+ return e + "";
151
+ } catch {
152
+ }
153
+ }
154
+ return "";
155
+ }
156
+ var pr = /[\\^$.*+?()[\]{}|]/g, fr = /^\[object .+?Constructor\]$/, gr = Function.prototype, hr = Object.prototype, br = gr.toString, yr = hr.hasOwnProperty, mr = RegExp(
157
+ "^" + br.call(yr).replace(pr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
158
+ );
159
+ function vr(e) {
160
+ if (!Pe(e) || cr(e))
161
+ return !1;
162
+ var t = De(e) ? mr : fr;
163
+ return t.test(M(e));
164
+ }
165
+ function xr(e, t) {
166
+ return e == null ? void 0 : e[t];
167
+ }
168
+ function H(e, t) {
169
+ var r = xr(e, t);
170
+ return vr(r) ? r : void 0;
171
+ }
172
+ var Cr = H(w, "WeakMap"), W = Cr, Tr = 9007199254740991;
173
+ function Oe(e) {
174
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Tr;
175
+ }
176
+ function Sr(e) {
177
+ return e != null && Oe(e.length) && !De(e);
178
+ }
179
+ var jr = Object.prototype;
180
+ function Me(e) {
181
+ var t = e && e.constructor, r = typeof t == "function" && t.prototype || jr;
182
+ return e === r;
183
+ }
184
+ var $r = "[object Arguments]";
185
+ function oe(e) {
186
+ return G(e) && O(e) == $r;
187
+ }
188
+ var Ee = Object.prototype, kr = Ee.hasOwnProperty, Ar = Ee.propertyIsEnumerable, wr = oe(/* @__PURE__ */ function() {
189
+ return arguments;
190
+ }()) ? oe : function(e) {
191
+ return G(e) && kr.call(e, "callee") && !Ar.call(e, "callee");
192
+ }, Pr = wr;
193
+ function Dr() {
194
+ return !1;
195
+ }
196
+ var Ie = typeof exports == "object" && exports && !exports.nodeType && exports, ae = Ie && typeof module == "object" && module && !module.nodeType && module, Or = ae && ae.exports === Ie, ie = Or ? w.Buffer : void 0, Mr = ie ? ie.isBuffer : void 0, Er = Mr || Dr, Ir = Er, Nr = "[object Arguments]", Lr = "[object Array]", Gr = "[object Boolean]", Hr = "[object Date]", _r = "[object Error]", zr = "[object Function]", Fr = "[object Map]", Rr = "[object Number]", Br = "[object Object]", Kr = "[object RegExp]", Vr = "[object Set]", qr = "[object String]", Ur = "[object WeakMap]", Wr = "[object ArrayBuffer]", Yr = "[object DataView]", Jr = "[object Float32Array]", Xr = "[object Float64Array]", Qr = "[object Int8Array]", Zr = "[object Int16Array]", en = "[object Int32Array]", tn = "[object Uint8Array]", rn = "[object Uint8ClampedArray]", nn = "[object Uint16Array]", on = "[object Uint32Array]", g = {};
197
+ g[Jr] = g[Xr] = g[Qr] = g[Zr] = g[en] = g[tn] = g[rn] = g[nn] = g[on] = !0;
198
+ g[Nr] = g[Lr] = g[Wr] = g[Gr] = g[Yr] = g[Hr] = g[_r] = g[zr] = g[Fr] = g[Rr] = g[Br] = g[Kr] = g[Vr] = g[qr] = g[Ur] = !1;
199
+ function an(e) {
200
+ return G(e) && Oe(e.length) && !!g[O(e)];
201
+ }
202
+ function sn(e) {
203
+ return function(t) {
204
+ return e(t);
205
+ };
206
+ }
207
+ var Ne = typeof exports == "object" && exports && !exports.nodeType && exports, L = Ne && typeof module == "object" && module && !module.nodeType && module, ln = L && L.exports === Ne, K = ln && Ae.process, cn = function() {
208
+ try {
209
+ var e = L && L.require && L.require("util").types;
210
+ return e || K && K.binding && K.binding("util");
211
+ } catch {
212
+ }
213
+ }(), se = cn, le = se && se.isTypedArray, un = le ? sn(le) : an, dn = un;
214
+ function Le(e, t) {
215
+ return function(r) {
216
+ return e(t(r));
217
+ };
218
+ }
219
+ var pn = Le(Object.keys, Object), fn = pn, gn = Object.prototype, hn = gn.hasOwnProperty;
220
+ function bn(e) {
221
+ if (!Me(e))
222
+ return fn(e);
223
+ var t = [];
224
+ for (var r in Object(e))
225
+ hn.call(e, r) && r != "constructor" && t.push(r);
226
+ return t;
227
+ }
228
+ var yn = H(w, "Map"), Y = yn, mn = Le(Object.getPrototypeOf, Object), vn = mn, xn = "[object Object]", Cn = Function.prototype, Tn = Object.prototype, Ge = Cn.toString, Sn = Tn.hasOwnProperty, jn = Ge.call(Object);
229
+ function J(e) {
230
+ if (!G(e) || O(e) != xn)
231
+ return !1;
232
+ var t = vn(e);
233
+ if (t === null)
234
+ return !0;
235
+ var r = Sn.call(t, "constructor") && t.constructor;
236
+ return typeof r == "function" && r instanceof r && Ge.call(r) == jn;
237
+ }
238
+ var $n = H(w, "DataView"), X = $n, kn = H(w, "Promise"), Q = kn, An = H(w, "Set"), Z = An, ce = "[object Map]", wn = "[object Object]", ue = "[object Promise]", de = "[object Set]", pe = "[object WeakMap]", fe = "[object DataView]", Pn = M(X), Dn = M(Y), On = M(Q), Mn = M(Z), En = M(W), P = O;
239
+ (X && P(new X(new ArrayBuffer(1))) != fe || Y && P(new Y()) != ce || Q && P(Q.resolve()) != ue || Z && P(new Z()) != de || W && P(new W()) != pe) && (P = function(e) {
240
+ var t = O(e), r = t == wn ? e.constructor : void 0, n = r ? M(r) : "";
241
+ if (n)
242
+ switch (n) {
243
+ case Pn:
244
+ return fe;
245
+ case Dn:
246
+ return ce;
247
+ case On:
248
+ return ue;
249
+ case Mn:
250
+ return de;
251
+ case En:
252
+ return pe;
253
+ }
254
+ return t;
255
+ });
256
+ var In = P, Nn = "[object String]";
257
+ function V(e) {
258
+ return typeof e == "string" || !S(e) && G(e) && O(e) == Nn;
259
+ }
260
+ var Ln = "[object Map]", Gn = "[object Set]", Hn = Object.prototype, _n = Hn.hasOwnProperty;
261
+ function zn(e) {
262
+ if (e == null)
263
+ return !0;
264
+ if (Sr(e) && (S(e) || typeof e == "string" || typeof e.splice == "function" || Ir(e) || dn(e) || Pr(e)))
265
+ return !e.length;
266
+ var t = In(e);
267
+ if (t == Ln || t == Gn)
268
+ return !e.size;
269
+ if (Me(e))
270
+ return !bn(e).length;
271
+ for (var r in e)
272
+ if (_n.call(e, r))
273
+ return !1;
274
+ return !0;
275
+ }
276
+ function ge(e) {
277
+ return e.every((t) => S(t));
278
+ }
279
+ function R(e) {
280
+ return !!(!S(e) || e.length === 0 || S(e[0]) && e[0].length === 0);
281
+ }
282
+ function He(e) {
283
+ let t = "";
284
+ return Object.keys(e).map((r) => {
285
+ t += ` ${r}="${e[r].replace(/"/g, '\\"')}"`;
286
+ }), t;
287
+ }
288
+ class Fn {
289
+ constructor() {
290
+ this.type = y.IMAGE;
291
+ }
292
+ toText(t) {
293
+ var r;
294
+ return (r = t.title) != null ? r : "";
295
+ }
296
+ toHtml(t) {
297
+ var r;
298
+ return `<img src="${t.src}" alt="${t.title}" ${He(
299
+ (r = t.attrs) != null ? r : {}
300
+ )}>`;
301
+ }
302
+ parse(t) {
303
+ var r, n;
304
+ return t.title = (r = t.title) != null ? r : "", t.attrs = (n = t.attrs) != null ? n : {}, t;
305
+ }
306
+ }
307
+ class Rn {
308
+ constructor() {
309
+ this.type = y.HYPERLINK;
310
+ }
311
+ toText(t) {
312
+ var r;
313
+ return (r = t.title) != null ? r : "";
314
+ }
315
+ toHtml(t) {
316
+ return `<a href="${t.link}" target="_blank" ${He(
317
+ t.attrs
318
+ )}>${t.title}</a>`;
319
+ }
320
+ parse(t) {
321
+ var r, n;
322
+ return t.title = (r = t.title) != null ? r : "", t.attrs = (n = t.attrs) != null ? n : {}, t;
323
+ }
324
+ }
325
+ class Bn {
326
+ constructor() {
327
+ this.type = y.RICH_TEXT;
328
+ }
329
+ toText(t) {
330
+ return t.plain;
331
+ }
332
+ toHtml(t) {
333
+ return t.value;
334
+ }
335
+ parse(t) {
336
+ return t;
337
+ }
338
+ }
339
+ var y = /* @__PURE__ */ ((e) => (e.PLAIN = "gs-plain-text", e.IMAGE = "gs-image", e.HYPERLINK = "gs-hyperlink", e.RICH_TEXT = "gs-rich-text", e))(y || {});
340
+ const Kn = [
341
+ new Kt(),
342
+ new Fn(),
343
+ new Rn(),
344
+ new Bn()
345
+ ];
346
+ var j = /* @__PURE__ */ ((e) => (e.PLAIN = "text/plain", e.HTML = "text/html", e))(j || {});
347
+ class Vn {
348
+ detectRule(t) {
349
+ return !!~t.indexOf("google-sheets-html-origin");
350
+ }
351
+ parser(t) {
352
+ const r = document.createElement("div");
353
+ return r.innerHTML = t, [...r.querySelector("table").querySelector("tbody").childNodes].map((a) => [...a.childNodes].map((i) => this.parseTd(i)));
354
+ }
355
+ getSheetsValue(t) {
356
+ try {
357
+ const r = JSON.parse(t);
358
+ return r[r[1]] ? r[r[1]].replaceAll("&nbsp;", " ") : "";
359
+ } catch {
360
+ return "";
361
+ }
362
+ }
363
+ parseTd(t) {
364
+ var r;
365
+ if (t.dataset.sheetsHyperlink)
366
+ return {
367
+ value: {
368
+ title: this.getSheetsValue(t.dataset.sheetsValue),
369
+ link: t.dataset.sheetsHyperlink
370
+ },
371
+ type: y.HYPERLINK
372
+ };
373
+ if (t.dataset.sheetsTextstyleruns)
374
+ return {
375
+ value: {
376
+ plain: this.getSheetsValue(t.dataset.sheetsValue),
377
+ value: t.innerHTML
378
+ },
379
+ type: y.RICH_TEXT
380
+ };
381
+ if (t.dataset.sheetsValue)
382
+ return {
383
+ value: t.innerHTML.replace(/\<br\>/g, `
384
+ `).trim(),
385
+ type: y.PLAIN
386
+ };
387
+ if (t.querySelector("img")) {
388
+ const n = t.querySelector("img");
389
+ return {
390
+ value: {
391
+ src: n.src,
392
+ title: (r = n.title) != null ? r : ""
393
+ },
394
+ type: y.IMAGE
395
+ };
396
+ }
397
+ return {
398
+ value: t.innerText,
399
+ type: y.PLAIN
400
+ };
401
+ }
402
+ }
403
+ const q = [new Vn()];
404
+ function qn(e) {
405
+ for (let t = 0; t < q.length; t++)
406
+ if (q[t].detectRule(e)) {
407
+ const r = q[t].parser(e);
408
+ if (!R(r))
409
+ return r;
410
+ }
411
+ return [];
412
+ }
413
+ class Un {
414
+ static parse(t) {
415
+ const r = document.createElement("div");
416
+ r.innerHTML = t;
417
+ const n = r.childNodes[0];
418
+ if (!n)
419
+ return !1;
420
+ if (n.dataset.sheetsHyperlink)
421
+ return {
422
+ value: {
423
+ link: n.dataset.sheetsHyperlink,
424
+ title: n.innerText
425
+ },
426
+ type: y.HYPERLINK
427
+ };
428
+ if (n.tagName === "A")
429
+ return {
430
+ value: {
431
+ link: n.getAttribute("href"),
432
+ title: n.innerText
433
+ },
434
+ type: y.HYPERLINK
435
+ };
436
+ const a = n.childNodes[0];
437
+ return a && n.childNodes.length === 1 && a.tagName === "IMG" ? {
438
+ value: {
439
+ link: a.getAttribute("src"),
440
+ title: a.title
441
+ },
442
+ type: y.IMAGE
443
+ } : n.tagName === "IMG" ? {
444
+ value: {
445
+ link: n.getAttribute("src"),
446
+ title: n.title
447
+ },
448
+ type: y.IMAGE
449
+ } : !1;
450
+ }
451
+ }
452
+ class Wn {
453
+ constructor() {
454
+ this.handles = {}, this.props = {}, this.evenHandles = {};
455
+ }
456
+ destroy() {
457
+ this.handles = {};
458
+ }
459
+ registerHandler(t) {
460
+ [...t, ...Kn].map((r) => {
461
+ this.handles[r.type] = r;
462
+ });
463
+ }
464
+ formatSetCopyData(t) {
465
+ return V(t) ? [
466
+ [
467
+ {
468
+ value: t,
469
+ payload: void 0,
470
+ type: this.handles[y.PLAIN].type
471
+ }
472
+ ]
473
+ ] : J(t) ? [[t]] : S(t) ? (ge(t) || (t = [
474
+ t.map((r) => V(r) ? {
475
+ value: r,
476
+ payload: "",
477
+ type: this.handles[y.PLAIN].type
478
+ } : r)
479
+ ]), t = t.map(
480
+ (r) => r.map((n) => V(n) ? {
481
+ value: n,
482
+ type: this.handles[y.PLAIN].type,
483
+ payload: ""
484
+ } : n)
485
+ ), t) : (console.error("unknown data type", t), []);
486
+ }
487
+ getTextData(t) {
488
+ let r = "";
489
+ return t.map((n, a) => {
490
+ n.map((i, u) => {
491
+ var p;
492
+ const { value: c, type: s, payload: b } = i;
493
+ r += ((p = this.handles[s]) != null ? p : this.handles[y.PLAIN]).toText(c, b), r += u < n.length - 1 ? " " : "";
494
+ }), r += a < t.length - 1 ? `
495
+ ` : "";
496
+ }), r;
497
+ }
498
+ getHtmlData(t) {
499
+ var r;
500
+ let n = "";
501
+ if (t.length === 1 && t[0].length === 1) {
502
+ const { type: a, value: i, payload: u } = t[0][0];
503
+ return ((r = this.handles[a]) != null ? r : this.handles[y.PLAIN]).toHtml(i, u);
504
+ }
505
+ return t.map((a, i) => {
506
+ n += "<tr>", a.map((u, p) => {
507
+ var c;
508
+ const { value: s, type: b, payload: x } = u;
509
+ n += `<td>${((c = this.handles[b]) != null ? c : this.handles[y.PLAIN]).toHtml(s, x)}</td>`;
510
+ }), n += "</tr>";
511
+ }), `<table id="gs-clipboard-table"><tbody>${n}</tbody></table>`;
512
+ }
513
+ async formatClipboardData(t) {
514
+ const r = {
515
+ text: "",
516
+ html: "",
517
+ clipboardType: []
518
+ };
519
+ if (!t.types.includes(j.HTML)) {
520
+ const b = await (await t.getType(j.PLAIN)).text();
521
+ return r.text = b, r.html = b, r.clipboardType = [
522
+ [
523
+ {
524
+ value: b,
525
+ type: this.handles[y.PLAIN].type
526
+ }
527
+ ]
528
+ ], r;
529
+ }
530
+ const n = await t.getType(j.HTML), a = await t.getType(j.PLAIN), i = await n.text(), u = await a.text(), p = document.createElement("div");
531
+ p.innerHTML = i;
532
+ const c = p.querySelector(
533
+ "#original-data"
534
+ );
535
+ if (p.querySelector("#gs-clipboard-table") || c)
536
+ r.text = u, r.html = i, r.clipboardType = JSON.parse(
537
+ decodeURIComponent(c.dataset.data)
538
+ );
539
+ else if (p.querySelector("table")) {
540
+ r.text = u, r.html = i;
541
+ let s = [];
542
+ if (this.props.tableParsers.length > 0) {
543
+ for (let b = 0; b < this.props.tableParsers.length; b++)
544
+ if (this.props.tableParsers[b].detectRule(i)) {
545
+ const x = this.props.tableParsers[b].parser(i);
546
+ if (!R(x)) {
547
+ s = x;
548
+ break;
549
+ }
550
+ }
551
+ }
552
+ (zn(s) || R(s)) && (s = qn(i)), r.clipboardType = s;
553
+ } else {
554
+ let s = null;
555
+ this.props.unknownHtmlParser && (s = this.props.unknownHtmlParser(i)), s = s || Un.parse(i), s || (s = {
556
+ value: u,
557
+ type: this.handles[y.PLAIN].type
558
+ }), r.text = u, r.html = i, J(s) && (r.clipboardType = [[s]]), S(s) && (ge(s) ? r.clipboardType = s : r.clipboardType = [s]);
559
+ }
560
+ return r;
561
+ }
562
+ getClipboardTypeData(t) {
563
+ return t;
564
+ }
565
+ on(t, r) {
566
+ return S(this.evenHandles[t]) || (this.evenHandles[t] = []), this.evenHandles[t].push(r), () => {
567
+ this.evenHandles[t].splice(
568
+ this.evenHandles[t].indexOf(r),
569
+ 1
570
+ );
571
+ };
572
+ }
573
+ trigger(t, ...r) {
574
+ if (S(this.evenHandles[t]))
575
+ for (let n = 0; n < this.evenHandles[t].length; n++) {
576
+ const a = this.evenHandles[t][n];
577
+ a(...r);
578
+ }
579
+ }
580
+ }
581
+ const Yn = {
582
+ handlers: [],
583
+ tableParsers: []
584
+ };
585
+ class Jn extends Wn {
586
+ constructor(t = {}) {
587
+ var r, n;
588
+ if (super(), (n = (r = window.navigator) == null ? void 0 : r.clipboard) != null && n.read)
589
+ this.props = Object.assign(Yn, t), this.registerHandler(this.props.handlers);
590
+ else
591
+ throw new Error("You browser didn't support clipboard api!");
592
+ }
593
+ async getDataFromClipboard() {
594
+ return new Promise((t, r) => {
595
+ window.navigator.clipboard.read().then(
596
+ async (n) => {
597
+ const a = n[0];
598
+ t(
599
+ this.transformClipboardData(await this.formatClipboardData(a))
600
+ );
601
+ },
602
+ (n) => r(n)
603
+ );
604
+ });
605
+ }
606
+ setCopy(t) {
607
+ return this.setCopyData(this.formatSetCopyData(t), !1);
608
+ }
609
+ formatCopyData(t) {
610
+ return this.setCopyData(this.formatSetCopyData(t), !0);
611
+ }
612
+ transformClipboardData(t) {
613
+ return R(t.clipboardType) || t.clipboardType.map((r) => {
614
+ S(r) ? r.map((n) => {
615
+ n.value = this.handles[n.type] ? this.handles[n.type].parse(n.value) : n.value;
616
+ }) : J(r) && (r.value = this.handles[r.type] ? this.handles[r.type].parse(r.value) : r.value);
617
+ }), t;
618
+ }
619
+ setCopyData(t, r = !1) {
620
+ const n = {
621
+ text: this.getTextData(t),
622
+ html: this.getHtmlData(t),
623
+ clipboardType: this.getClipboardTypeData(t)
624
+ };
625
+ if (r)
626
+ return n;
627
+ this.trigger("beforeCopy", n);
628
+ const a = [
629
+ new ClipboardItem({
630
+ [j.PLAIN]: new Blob([n.text], {
631
+ type: j.PLAIN
632
+ }),
633
+ [j.HTML]: new Blob(
634
+ [
635
+ n.html + `<div id="original-data" data-data="${encodeURIComponent(
636
+ JSON.stringify(n.clipboardType)
637
+ )}"></div>`
638
+ ],
639
+ {
640
+ type: j.HTML
641
+ }
642
+ )
643
+ })
644
+ ];
645
+ return window.navigator.clipboard.write(a).then(
646
+ () => this.trigger("copySucceeded", a),
647
+ (i) => this.trigger("copyFailed", i)
648
+ ), n;
649
+ }
650
+ }
651
+ const Xn = new Jn(), Qn = ({
87
652
  data: e = [],
88
- onChange: n = () => {
653
+ onChange: t = () => {
89
654
  },
90
- tableHeight: a = "460px",
91
- limitation: r = {}
655
+ tableHeight: r = "460px",
656
+ limitation: n = {}
92
657
  }) => {
93
- const { messageApi: i } = F(H), { title: l = 15, content: u = 2e3 } = r, { t: f } = z();
94
- function c(g) {
95
- const o = e.findIndex((s) => s.label === g.label);
96
- e[o] = g, n([...e]);
658
+ const { messageApi: a } = me(ke), { title: i = 15, content: u = 2e3 } = n, { t: p } = I();
659
+ function c(l) {
660
+ const f = e.findIndex((d) => d.label === l.label);
661
+ e[f] = l, t([...e]);
97
662
  }
98
- function d() {
99
- const g = [
663
+ function s() {
664
+ const l = [
100
665
  {
101
666
  label: `#${e.length + 1}`,
102
667
  content: ""
103
668
  },
104
669
  ...e
105
670
  ];
106
- n(g), i.success(f("createSuccessfully"));
671
+ t(l), a.success(p("createSuccessfully"));
672
+ }
673
+ function b(l) {
674
+ const f = e.filter((d) => d.label !== l);
675
+ t(f);
107
676
  }
108
- function x(g) {
109
- const o = e.filter((s) => s.label !== g);
110
- n(o);
677
+ async function x() {
678
+ const d = [...(await Xn.getDataFromClipboard()).clipboardType.map((m) => {
679
+ var A, v;
680
+ return {
681
+ label: ((A = m == null ? void 0 : m[0]) == null ? void 0 : A.value) ?? "",
682
+ content: ((v = m == null ? void 0 : m[1]) == null ? void 0 : v.value) ?? ""
683
+ };
684
+ }).filter((m) => m.label && m.content), ...e];
685
+ t(It(d, "label"));
111
686
  }
112
- return /* @__PURE__ */ m(
113
- E,
687
+ return /* @__PURE__ */ h(
688
+ _,
114
689
  {
115
690
  bordered: !0,
116
691
  dataSource: e,
@@ -118,11 +693,11 @@ const qe = ({
118
693
  rowKey: "label",
119
694
  size: "small",
120
695
  scroll: {
121
- y: a,
696
+ y: r,
122
697
  x: !0
123
698
  },
124
699
  locale: {
125
- emptyText: () => /* @__PURE__ */ m(
700
+ emptyText: () => /* @__PURE__ */ h(
126
701
  C,
127
702
  {
128
703
  direction: "vertical",
@@ -133,40 +708,51 @@ const qe = ({
133
708
  padding: "62px 0px"
134
709
  },
135
710
  children: [
136
- /* @__PURE__ */ t(P, {}),
137
- /* @__PURE__ */ t(b, { type: "primary", onClick: d, children: f("create") })
711
+ /* @__PURE__ */ o(Se, {}),
712
+ /* @__PURE__ */ o(T, { type: "primary", onClick: s, children: p("create") })
138
713
  ]
139
714
  }
140
715
  )
141
716
  },
142
- footer: () => /* @__PURE__ */ m(G, { style: { width: "100%" }, justify: "space-between", children: [
143
- /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t("div", {}) }),
144
- /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(b, { type: "primary", onClick: d, children: f("create") }) })
717
+ footer: () => /* @__PURE__ */ h(z, { style: { width: "100%" }, justify: "space-between", children: [
718
+ /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o("div", {}) }),
719
+ /* @__PURE__ */ h(C, { size: 12, children: [
720
+ /* @__PURE__ */ o(
721
+ T,
722
+ {
723
+ block: !0,
724
+ type: "text",
725
+ onClick: x,
726
+ children: p("importFromClipboard")
727
+ }
728
+ ),
729
+ /* @__PURE__ */ o(T, { type: "primary", onClick: s, children: p("create") })
730
+ ] })
145
731
  ] }),
146
732
  children: [
147
- /* @__PURE__ */ t(
148
- E.Column,
733
+ /* @__PURE__ */ o(
734
+ _.Column,
149
735
  {
150
- title: f("titleFieldName"),
736
+ title: p("titleFieldName"),
151
737
  dataIndex: "label",
152
738
  width: 400,
153
- render: (g, o) => /* @__PURE__ */ t(
154
- A,
739
+ render: (l, f) => /* @__PURE__ */ o(
740
+ he,
155
741
  {
156
- maxLength: l,
742
+ maxLength: i,
157
743
  type: "input",
158
- value: g,
159
- onChange: (s) => {
160
- if (o.label !== s) {
161
- if (e.find((h) => h.label === s)) {
162
- i.error(f("cannotSavedMessageCuzLabelExisted"));
744
+ value: l,
745
+ onChange: (d) => {
746
+ if (f.label !== d) {
747
+ if (e.find((m) => m.label === d)) {
748
+ a.error(p("cannotSavedMessageCuzLabelExisted"));
163
749
  return;
164
750
  }
165
- if (s.trim() === "") {
166
- i.error(f("cannotSavedMessageCuzLabelEmpty"));
751
+ if (d.trim() === "") {
752
+ a.error(p("cannotSavedMessageCuzLabelEmpty"));
167
753
  return;
168
754
  }
169
- o.label = s, c(o);
755
+ f.label = d, c(f);
170
756
  }
171
757
  }
172
758
  }
@@ -174,44 +760,44 @@ const qe = ({
174
760
  },
175
761
  "label"
176
762
  ),
177
- /* @__PURE__ */ t(
178
- E.Column,
763
+ /* @__PURE__ */ o(
764
+ _.Column,
179
765
  {
180
- title: f("content"),
766
+ title: p("content"),
181
767
  dataIndex: "content",
182
768
  width: 400,
183
- render: (g, o) => /* @__PURE__ */ t(
184
- A,
769
+ render: (l, f) => /* @__PURE__ */ o(
770
+ he,
185
771
  {
186
772
  maxLength: u,
187
773
  type: "textarea",
188
- value: g,
189
- onChange: (s) => {
190
- if (s.trim() === "") {
191
- i.error(f("cannotSavedMessageCuzContentEmpty"));
774
+ value: l,
775
+ onChange: (d) => {
776
+ if (d.trim() === "") {
777
+ a.error(p("cannotSavedMessageCuzContentEmpty"));
192
778
  return;
193
779
  }
194
- o.content = s, c(o);
780
+ f.content = d, c(f);
195
781
  }
196
782
  }
197
783
  )
198
784
  },
199
785
  "content"
200
786
  ),
201
- /* @__PURE__ */ t(
202
- E.Column,
787
+ /* @__PURE__ */ o(
788
+ _.Column,
203
789
  {
204
790
  title: "操作",
205
791
  dataIndex: "id",
206
792
  width: 120,
207
- render: (g, o) => /* @__PURE__ */ t(C, { size: 4, children: /* @__PURE__ */ t(
208
- b,
793
+ render: (l, f) => /* @__PURE__ */ o(C, { size: 4, children: /* @__PURE__ */ o(
794
+ T,
209
795
  {
210
796
  size: "small",
211
797
  type: "text",
212
798
  danger: !0,
213
- onClick: () => x(o.label),
214
- children: f("delete")
799
+ onClick: () => b(f.label),
800
+ children: p("delete")
215
801
  }
216
802
  ) })
217
803
  },
@@ -220,7 +806,7 @@ const qe = ({
220
806
  ]
221
807
  }
222
808
  );
223
- }, Ue = y.div`
809
+ }, Zn = k.div`
224
810
  border: 1px solid transparent;
225
811
  padding: 0 4px;
226
812
  margin: 0 -4px;
@@ -231,29 +817,29 @@ const qe = ({
231
817
  border-color: ${(e) => e.$isDark ? "#4d4848" : "#c0bbbb"};
232
818
  }
233
819
  `;
234
- function A(e) {
235
- const [n, a] = v(!1), r = _(null), i = W();
236
- D(() => {
237
- n && r.current && (e.type === "input" ? r.current.select() : r.current.focus());
238
- }, [n, e.type]);
239
- function l() {
240
- a(!0);
820
+ function he(e) {
821
+ const [t, r] = $(!1), n = xe(null), a = je();
822
+ E(() => {
823
+ t && n.current && (e.type === "input" ? n.current.select() : n.current.focus());
824
+ }, [t, e.type]);
825
+ function i() {
826
+ r(!0);
241
827
  }
242
828
  function u(c) {
243
- a(!1), e.onChange(c);
829
+ r(!1), e.onChange(c);
244
830
  }
245
- function f(c) {
246
- e.onChange(c), r.current.blur();
831
+ function p(c) {
832
+ e.onChange(c), n.current.blur();
247
833
  }
248
- if (n) {
834
+ if (t) {
249
835
  if (e.type === "textarea")
250
- return /* @__PURE__ */ t("div", { style: { paddingBottom: 18 }, children: /* @__PURE__ */ t(
251
- $.TextArea,
836
+ return /* @__PURE__ */ o("div", { style: { paddingBottom: 18 }, children: /* @__PURE__ */ o(
837
+ U.TextArea,
252
838
  {
253
839
  showCount: !0,
254
840
  maxLength: e.maxLength,
255
841
  defaultValue: e.value,
256
- ref: r,
842
+ ref: n,
257
843
  size: "small",
258
844
  style: { width: "100%" },
259
845
  autoSize: { minRows: 4, maxRows: 4 },
@@ -264,32 +850,32 @@ function A(e) {
264
850
  return;
265
851
  {
266
852
  c.preventDefault();
267
- const d = c.target;
268
- return f(d.value), !1;
853
+ const s = c.target;
854
+ return p(s.value), !1;
269
855
  }
270
856
  }
271
857
  }
272
858
  }
273
859
  ) });
274
860
  if (e.type === "input")
275
- return /* @__PURE__ */ t(
276
- $,
861
+ return /* @__PURE__ */ o(
862
+ U,
277
863
  {
278
864
  showCount: !0,
279
865
  maxLength: e.maxLength,
280
866
  defaultValue: e.value,
281
- ref: r,
867
+ ref: n,
282
868
  size: "small",
283
869
  style: { width: "100%" },
284
870
  onBlur: (c) => u(c.target.value),
285
871
  onPressEnter: (c) => {
286
- const d = c.target;
287
- f(d.value);
872
+ const s = c.target;
873
+ p(s.value);
288
874
  }
289
875
  }
290
876
  );
291
877
  }
292
- return /* @__PURE__ */ t(Ue, { onClick: l, $isDark: i, children: /* @__PURE__ */ t(
878
+ return /* @__PURE__ */ o(Zn, { onClick: i, $isDark: a, children: /* @__PURE__ */ o(
293
879
  "div",
294
880
  {
295
881
  style: { minHeight: 22 },
@@ -301,11 +887,11 @@ function A(e) {
301
887
  }
302
888
  ) });
303
889
  }
304
- const Qe = y.div``, Ve = y.div`
890
+ const eo = k.div``, to = k.div`
305
891
  min-height: 380px;
306
- `, Ze = y.span`
892
+ `, ro = k.span`
307
893
  font-size: 12px;
308
- `, Je = y.div`
894
+ `, no = k.div`
309
895
  &:hover {
310
896
  .ant-btn {
311
897
  display: block;
@@ -314,53 +900,53 @@ const Qe = y.div``, Ve = y.div`
314
900
  .ant-btn {
315
901
  display: none;
316
902
  }
317
- `, Xe = y.div`
903
+ `, oo = k.div`
318
904
  background-color: ${(e) => e.$color};
319
905
  width: 12px;
320
906
  height: 12px;
321
907
  border: 1px solid #fff;
322
908
  border-radius: 4px;
323
- `, Ye = ({
909
+ `, ao = ({
324
910
  data: e = [],
325
- onChange: n = () => {
911
+ onChange: t = () => {
326
912
  },
327
- ...a
913
+ ...r
328
914
  }) => {
329
- const [r, i] = v([]), { t: l } = z();
330
- D(() => {
331
- e.length > 0 && i([e[0].id]);
915
+ const [n, a] = $([]), { t: i } = I();
916
+ E(() => {
917
+ e.length > 0 && a([e[0].id]);
332
918
  }, []);
333
- const u = S(() => e.map((o) => ({
334
- key: o.id,
335
- label: /* @__PURE__ */ t(Je, { children: /* @__PURE__ */ m(G, { justify: "space-between", align: "center", children: [
336
- /* @__PURE__ */ m(C, { children: [
337
- /* @__PURE__ */ t("span", { children: o.title }),
338
- o.data.length ? /* @__PURE__ */ m(Ze, { children: [
919
+ const u = D(() => e.map((l) => ({
920
+ key: l.id,
921
+ label: /* @__PURE__ */ o(no, { children: /* @__PURE__ */ h(z, { justify: "space-between", align: "center", children: [
922
+ /* @__PURE__ */ h(C, { children: [
923
+ /* @__PURE__ */ o("span", { children: l.title }),
924
+ l.data.length ? /* @__PURE__ */ h(ro, { children: [
339
925
  "(",
340
- o.data.length,
926
+ l.data.length,
341
927
  ")"
342
928
  ] }) : null
343
929
  ] }),
344
- /* @__PURE__ */ m(C, { size: 8, children: [
345
- /* @__PURE__ */ t(Xe, { $color: o.color }),
346
- /* @__PURE__ */ t(
347
- et,
930
+ /* @__PURE__ */ h(C, { size: 8, children: [
931
+ /* @__PURE__ */ o(oo, { $color: l.color }),
932
+ /* @__PURE__ */ o(
933
+ io,
348
934
  {
349
- data: o,
350
- onSaved: (s) => c(o.id, s)
935
+ data: l,
936
+ onSaved: (f) => c(l.id, f)
351
937
  }
352
938
  ),
353
- /* @__PURE__ */ t(
354
- $e,
939
+ /* @__PURE__ */ o(
940
+ kt,
355
941
  {
356
- title: l("confirmDelete"),
357
- onConfirm: () => d(o.id),
358
- children: /* @__PURE__ */ t(
359
- b,
942
+ title: i("confirmDelete"),
943
+ onConfirm: () => s(l.id),
944
+ children: /* @__PURE__ */ o(
945
+ T,
360
946
  {
361
947
  danger: !0,
362
948
  size: "small",
363
- icon: /* @__PURE__ */ t(_e, {}),
949
+ icon: /* @__PURE__ */ o(Nt, {}),
364
950
  type: "text"
365
951
  }
366
952
  )
@@ -368,216 +954,216 @@ const Qe = y.div``, Ve = y.div`
368
954
  )
369
955
  ] })
370
956
  ] }) })
371
- })), [e]), f = S(() => {
372
- const o = r[0];
373
- if (o) {
374
- const s = e.find((h) => h.id === o);
375
- if (s)
376
- return s.data;
957
+ })), [e]), p = D(() => {
958
+ const l = n[0];
959
+ if (l) {
960
+ const f = e.find((d) => d.id === l);
961
+ if (f)
962
+ return f.data;
377
963
  }
378
964
  return !1;
379
- }, [r, e]);
380
- function c(o, s) {
381
- const h = [...e], k = h.findIndex((M) => M.id === o);
382
- ~k && (h[k] = {
383
- ...h[k],
384
- ...s
385
- }), n(h);
386
- }
387
- function d(o) {
388
- const s = [...e].filter((h) => h.id !== o);
389
- n(s);
390
- }
391
- function x(o) {
392
- const s = [...e], h = r[0];
393
- if (h) {
394
- const k = s.find((M) => M.id === h);
395
- k && (k.data = o);
965
+ }, [n, e]);
966
+ function c(l, f) {
967
+ const d = [...e], m = d.findIndex((A) => A.id === l);
968
+ ~m && (d[m] = {
969
+ ...d[m],
970
+ ...f
971
+ }), t(d);
972
+ }
973
+ function s(l) {
974
+ const f = [...e].filter((d) => d.id !== l);
975
+ t(f);
976
+ }
977
+ function b(l) {
978
+ const f = [...e], d = n[0];
979
+ if (d) {
980
+ const m = f.find((A) => A.id === d);
981
+ m && (m.data = l);
396
982
  }
397
- n(s);
398
- }
399
- function g(o) {
400
- const s = Re(), h = [...e];
401
- h.push({
402
- id: s,
403
- color: o.color,
404
- title: o.title,
983
+ t(f);
984
+ }
985
+ function x(l) {
986
+ const f = Bt(), d = [...e];
987
+ d.push({
988
+ id: f,
989
+ color: l.color,
990
+ title: l.title,
405
991
  data: []
406
- }), n(h), i([s]);
407
- }
408
- return u.length === 0 ? /* @__PURE__ */ m(G, { vertical: !0, align: "center", gap: 8, children: [
409
- /* @__PURE__ */ t(P, { description: l("noData") }),
410
- /* @__PURE__ */ t(N, { onCreate: g })
411
- ] }) : /* @__PURE__ */ t(Qe, { children: /* @__PURE__ */ m(G, { gap: 16, children: [
412
- /* @__PURE__ */ m(C, { direction: "vertical", children: [
413
- /* @__PURE__ */ t(Ve, { children: /* @__PURE__ */ t(
414
- we,
992
+ }), t(d), a([f]);
993
+ }
994
+ return u.length === 0 ? /* @__PURE__ */ h(z, { vertical: !0, align: "center", gap: 8, children: [
995
+ /* @__PURE__ */ o(Se, { description: i("noData") }),
996
+ /* @__PURE__ */ o(be, { onCreate: x })
997
+ ] }) : /* @__PURE__ */ o(eo, { children: /* @__PURE__ */ h(z, { gap: 16, children: [
998
+ /* @__PURE__ */ h(C, { direction: "vertical", children: [
999
+ /* @__PURE__ */ o(to, { children: /* @__PURE__ */ o(
1000
+ At,
415
1001
  {
416
1002
  items: u,
417
1003
  style: { width: 300 },
418
- selectedKeys: r,
419
- onSelect: ({ key: o }) => {
420
- i([o]);
1004
+ selectedKeys: n,
1005
+ onSelect: ({ key: l }) => {
1006
+ a([l]);
421
1007
  }
422
1008
  }
423
1009
  ) }),
424
- /* @__PURE__ */ t(N, { onCreate: g, block: !0 })
1010
+ /* @__PURE__ */ o(be, { onCreate: x, block: !0 })
425
1011
  ] }),
426
- f ? /* @__PURE__ */ t(
427
- qe,
1012
+ p ? /* @__PURE__ */ o(
1013
+ Qn,
428
1014
  {
429
- data: f,
430
- onChange: x,
431
- ...a
1015
+ data: p,
1016
+ onChange: b,
1017
+ ...r
432
1018
  }
433
- ) : /* @__PURE__ */ t(
434
- Le,
1019
+ ) : /* @__PURE__ */ o(
1020
+ wt,
435
1021
  {
436
1022
  type: "info",
437
- message: l("selectAGroupFirst"),
1023
+ message: i("selectAGroupFirst"),
438
1024
  style: { height: 60, minWidth: 400 }
439
1025
  }
440
1026
  )
441
1027
  ] }) });
442
1028
  };
443
- function et(e) {
444
- const [n, a] = v({ title: "", color: "" });
445
- return /* @__PURE__ */ t(
446
- K,
1029
+ function io(e) {
1030
+ const [t, r] = $({ title: "", color: "" });
1031
+ return /* @__PURE__ */ o(
1032
+ _e,
447
1033
  {
448
1034
  isEdit: !1,
449
1035
  onCompleteChange: e.onSaved,
450
- data: n,
451
- onOpenChange: (r) => {
452
- r && a(e.data);
1036
+ data: t,
1037
+ onOpenChange: (n) => {
1038
+ n && r(e.data);
453
1039
  },
454
- onDataChange: (r) => a(r),
455
- children: /* @__PURE__ */ t(b, { size: "small", icon: /* @__PURE__ */ t(Te, {}), type: "text" })
1040
+ onDataChange: (n) => r(n),
1041
+ children: /* @__PURE__ */ o(T, { size: "small", icon: /* @__PURE__ */ o(Lt, {}), type: "text" })
456
1042
  }
457
1043
  );
458
1044
  }
459
- function N(e) {
460
- const { t: n } = z(), a = {
1045
+ function be(e) {
1046
+ const { t } = I(), r = {
461
1047
  title: "",
462
1048
  color: "#1677FF"
463
- }, [r, i] = v({
464
- ...a
1049
+ }, [n, a] = $({
1050
+ ...r
465
1051
  });
466
- return /* @__PURE__ */ t(
467
- K,
1052
+ return /* @__PURE__ */ o(
1053
+ _e,
468
1054
  {
469
1055
  isEdit: !1,
470
1056
  onCompleteChange: e.onCreate,
471
- data: r,
472
- onOpenChange: (l) => {
473
- l && i({
474
- ...a
1057
+ data: n,
1058
+ onOpenChange: (i) => {
1059
+ i && a({
1060
+ ...r
475
1061
  });
476
1062
  },
477
- onDataChange: (l) => i(l),
478
- children: /* @__PURE__ */ t(b, { block: !!e.block, icon: /* @__PURE__ */ t(Ie, {}), children: n("addNewGroup") })
1063
+ onDataChange: (i) => a(i),
1064
+ children: /* @__PURE__ */ o(T, { block: !!e.block, icon: /* @__PURE__ */ o(Gt, {}), children: t("addNewGroup") })
479
1065
  }
480
1066
  );
481
1067
  }
482
- function K(e) {
483
- const [n, a] = v(!1), [r, i] = v(""), l = _(null), { t: u } = z();
484
- D(() => {
485
- e.onOpenChange(n);
486
- }, [n]), D(() => {
487
- n ? (i(e.data.color), setTimeout(() => {
488
- var d;
489
- (d = l.current) == null || d.focus();
490
- }, 300)) : i("");
1068
+ function _e(e) {
1069
+ const [t, r] = $(!1), [n, a] = $(""), i = xe(null), { t: u } = I();
1070
+ E(() => {
1071
+ e.onOpenChange(t);
1072
+ }, [t]), E(() => {
1073
+ t ? (a(e.data.color), setTimeout(() => {
1074
+ var s;
1075
+ (s = i.current) == null || s.focus();
1076
+ }, 300)) : a("");
491
1077
  }, [e.data]);
492
- function f() {
1078
+ function p() {
493
1079
  e.data.title.trim().length !== 0 && (e.onCompleteChange({
494
1080
  title: e.data.title.trim(),
495
1081
  color: e.data.color
496
- }), a(!1));
1082
+ }), r(!1));
497
1083
  }
498
- function c(d, x) {
1084
+ function c(s, b) {
499
1085
  e.onDataChange({
500
1086
  ...e.data,
501
- [d]: x
1087
+ [s]: b
502
1088
  });
503
1089
  }
504
- return /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(
505
- T,
1090
+ return /* @__PURE__ */ o(ee, { children: /* @__PURE__ */ o(
1091
+ Ce,
506
1092
  {
507
1093
  title: e.isEdit ? u("editGroup") : u("createGroup"),
508
- open: n,
509
- onOpenChange: a,
1094
+ open: t,
1095
+ onOpenChange: r,
510
1096
  trigger: ["click"],
511
- content: /* @__PURE__ */ m(C, { direction: "vertical", size: 16, children: [
512
- /* @__PURE__ */ m(C, { size: 16, children: [
513
- /* @__PURE__ */ m("span", { children: [
1097
+ content: /* @__PURE__ */ h(C, { direction: "vertical", size: 16, children: [
1098
+ /* @__PURE__ */ h(C, { size: 16, children: [
1099
+ /* @__PURE__ */ h("span", { children: [
514
1100
  u("titleFieldName"),
515
1101
  ":"
516
1102
  ] }),
517
- /* @__PURE__ */ t(
518
- $,
1103
+ /* @__PURE__ */ o(
1104
+ U,
519
1105
  {
520
- ref: l,
1106
+ ref: i,
521
1107
  showCount: !0,
522
1108
  maxLength: 20,
523
1109
  value: e.data.title,
524
- onChange: (d) => c("title", d.target.value)
1110
+ onChange: (s) => c("title", s.target.value)
525
1111
  }
526
1112
  )
527
1113
  ] }),
528
- /* @__PURE__ */ m(C, { size: 16, children: [
529
- /* @__PURE__ */ m("span", { children: [
1114
+ /* @__PURE__ */ h(C, { size: 16, children: [
1115
+ /* @__PURE__ */ h("span", { children: [
530
1116
  u("colorFieldName"),
531
1117
  ":"
532
1118
  ] }),
533
- r && /* @__PURE__ */ t(
534
- Ae,
1119
+ n && /* @__PURE__ */ o(
1120
+ Pt,
535
1121
  {
536
- value: r,
537
- onChange: (d) => i(`#${d.toHex()}`),
1122
+ value: n,
1123
+ onChange: (s) => a(`#${s.toHex()}`),
538
1124
  showText: !0,
539
- onChangeComplete: (d) => {
540
- c("color", `#${d.toHex()}`);
1125
+ onChangeComplete: (s) => {
1126
+ c("color", `#${s.toHex()}`);
541
1127
  }
542
1128
  }
543
1129
  )
544
1130
  ] }),
545
- /* @__PURE__ */ t(b, { block: !0, type: "primary", onClick: f, children: e.isEdit ? u("create") : u("save") })
1131
+ /* @__PURE__ */ o(T, { block: !0, type: "primary", onClick: p, children: e.isEdit ? u("create") : u("save") })
546
1132
  ] }),
547
1133
  children: e.children
548
1134
  }
549
1135
  ) });
550
1136
  }
551
- const tt = ({ open: e, onOpenChange: n = () => {
552
- }, children: a, ...r }) => {
553
- const [i, l] = v(e), { t: u } = z();
554
- return D(() => {
555
- l(!!e);
556
- }, [e]), /* @__PURE__ */ m(w, { children: [
557
- /* @__PURE__ */ t(
558
- I,
1137
+ const so = ({ open: e, onOpenChange: t = () => {
1138
+ }, children: r, ...n }) => {
1139
+ const [a, i] = $(e), { t: u } = I();
1140
+ return E(() => {
1141
+ i(!!e);
1142
+ }, [e]), /* @__PURE__ */ h(ee, { children: [
1143
+ /* @__PURE__ */ o(
1144
+ Te,
559
1145
  {
560
1146
  title: u("quickMessageConfigs"),
561
- open: i,
1147
+ open: a,
562
1148
  onCancel: () => {
563
- l(!1), n(!1);
1149
+ i(!1), t(!1);
564
1150
  },
565
1151
  width: 980,
566
1152
  footer: null,
567
- children: /* @__PURE__ */ t(Ye, { ...r })
1153
+ children: /* @__PURE__ */ o(ao, { ...n })
568
1154
  }
569
1155
  ),
570
- /* @__PURE__ */ t(
1156
+ /* @__PURE__ */ o(
571
1157
  "span",
572
1158
  {
573
1159
  onClick: () => {
574
- l(!0), n(!0);
1160
+ i(!0), t(!0);
575
1161
  },
576
- children: a
1162
+ children: r
577
1163
  }
578
1164
  )
579
1165
  ] });
580
- }, nt = y.div`
1166
+ }, lo = k.div`
581
1167
  font-size: 14px;
582
1168
  background: #dae5f8;
583
1169
  padding: 0 4px;
@@ -595,60 +1181,60 @@ const tt = ({ open: e, onOpenChange: n = () => {
595
1181
  &:active {
596
1182
  background-color: #9dbcf3;
597
1183
  }
598
- `, ot = y.div`
1184
+ `, co = k.div`
599
1185
  min-height: 18px;
600
- `, zt = ({
1186
+ `, Eo = ({
601
1187
  data: e = [],
602
- onChange: n,
603
- tableHeight: a,
604
- limitation: r,
605
- displayTitleMaxLength: i = 10,
606
- displayMaxLength: l = 99,
1188
+ onChange: t,
1189
+ tableHeight: r,
1190
+ limitation: n,
1191
+ displayTitleMaxLength: a = 10,
1192
+ displayMaxLength: i = 99,
607
1193
  SlotContentPrefixSlot: u,
608
- SlotContentSuffixSlot: f,
1194
+ SlotContentSuffixSlot: p,
609
1195
  onSelect: c = () => {
610
1196
  }
611
1197
  }) => {
612
- const [d, x] = v(!1), [g, o] = We(
1198
+ const [s, b] = $(!1), [x, l] = _t(
613
1199
  "__activeGroupId",
614
1200
  ""
615
- ), { t: s } = z(), h = S(() => e.find((p) => p.id === g), [g, e]), k = S(() => h ? h.data : [], [h, e]), M = S(() => e.length === 0, [e]);
616
- return /* @__PURE__ */ m(w, { children: [
617
- M ? /* @__PURE__ */ t(
618
- b,
1201
+ ), { t: f } = I(), d = D(() => e.find((v) => v.id === x), [x, e]), m = D(() => d ? d.data : [], [d, e]), A = D(() => e.length === 0, [e]);
1202
+ return /* @__PURE__ */ h(ee, { children: [
1203
+ A ? /* @__PURE__ */ o(
1204
+ T,
619
1205
  {
620
1206
  size: "small",
621
1207
  type: "primary",
622
- onClick: () => x(!0),
623
- children: s("create")
1208
+ onClick: () => b(!0),
1209
+ children: f("create")
624
1210
  }
625
- ) : /* @__PURE__ */ m(C, { size: 2, direction: "vertical", children: [
626
- /* @__PURE__ */ t(ot, { children: /* @__PURE__ */ t(C, { size: 8, children: k.slice(0, l).map((p) => /* @__PURE__ */ t(
627
- Ne,
1211
+ ) : /* @__PURE__ */ h(C, { size: 2, direction: "vertical", children: [
1212
+ /* @__PURE__ */ o(co, { children: /* @__PURE__ */ o(C, { size: 8, children: m.slice(0, i).map((v) => /* @__PURE__ */ o(
1213
+ Dt,
628
1214
  {
629
- title: p.label,
1215
+ title: /* @__PURE__ */ o("span", { style: { fontSize: 12 }, children: v.label }),
630
1216
  destroyTooltipOnHide: !0,
631
- children: /* @__PURE__ */ m(
632
- nt,
1217
+ children: /* @__PURE__ */ h(
1218
+ lo,
633
1219
  {
634
- onClick: (ze) => {
635
- ze.target.closest("bdi") || c(p);
1220
+ onClick: (Tt) => {
1221
+ Tt.target.closest("bdi") || c(v);
636
1222
  },
637
1223
  children: [
638
- u && /* @__PURE__ */ t("bdi", { children: /* @__PURE__ */ t(
1224
+ u && /* @__PURE__ */ o("bdi", { children: /* @__PURE__ */ o(
639
1225
  u,
640
1226
  {
641
- group: h,
642
- message: p
1227
+ group: d,
1228
+ message: v
643
1229
  }
644
1230
  ) }),
645
- B(p.label, i),
646
- f && /* @__PURE__ */ m("bdi", { children: [
647
- /* @__PURE__ */ t(
648
- f,
1231
+ $e(v.label, a),
1232
+ p && /* @__PURE__ */ h("bdi", { children: [
1233
+ /* @__PURE__ */ o(
1234
+ p,
649
1235
  {
650
- group: h,
651
- message: p
1236
+ group: d,
1237
+ message: v
652
1238
  }
653
1239
  ),
654
1240
  " "
@@ -657,47 +1243,47 @@ const tt = ({ open: e, onOpenChange: n = () => {
657
1243
  }
658
1244
  )
659
1245
  },
660
- p.label
1246
+ v.label
661
1247
  )) }) }),
662
- /* @__PURE__ */ m(C, { size: 8, children: [
663
- e.slice(0, l).map((p) => /* @__PURE__ */ t(
664
- it,
1248
+ /* @__PURE__ */ h(C, { size: 8, children: [
1249
+ e.slice(0, i).map((v) => /* @__PURE__ */ o(
1250
+ po,
665
1251
  {
666
- data: p,
667
- active: g === p.id,
668
- displayTitleMaxLength: i,
1252
+ data: v,
1253
+ active: x === v.id,
1254
+ displayTitleMaxLength: a,
669
1255
  onClick: () => {
670
- o(
671
- g === p.id ? "" : p.id
1256
+ l(
1257
+ x === v.id ? "" : v.id
672
1258
  );
673
1259
  }
674
1260
  },
675
- p.id
1261
+ v.id
676
1262
  )),
677
- /* @__PURE__ */ t(
678
- b,
1263
+ /* @__PURE__ */ o(
1264
+ T,
679
1265
  {
680
1266
  size: "small",
681
1267
  type: "text",
682
- onClick: () => x(!0),
683
- children: /* @__PURE__ */ t(Pe, {})
1268
+ onClick: () => b(!0),
1269
+ children: /* @__PURE__ */ o(Ht, {})
684
1270
  }
685
1271
  )
686
1272
  ] })
687
1273
  ] }),
688
- /* @__PURE__ */ t(
689
- tt,
1274
+ /* @__PURE__ */ o(
1275
+ so,
690
1276
  {
691
- open: d,
692
- onOpenChange: x,
1277
+ open: s,
1278
+ onOpenChange: b,
693
1279
  data: e,
694
- onChange: n,
695
- tableHeight: a,
696
- limitation: r
1280
+ onChange: t,
1281
+ tableHeight: r,
1282
+ limitation: n
697
1283
  }
698
1284
  )
699
1285
  ] });
700
- }, rt = y.div`
1286
+ }, uo = k.div`
701
1287
  background-color: ${(e) => e.$backgroundColor};
702
1288
  color: ${(e) => e.$textColor};
703
1289
  border: 1px solid transparent;
@@ -715,132 +1301,136 @@ const tt = ({ open: e, onOpenChange: n = () => {
715
1301
  opacity: 0.6;
716
1302
  }
717
1303
  `;
718
- function it(e) {
719
- const n = S(() => {
720
- var l, u;
721
- const a = Be(e.data.color), r = a.isDark(), i = r ? (l = a.lighten(0.2)) == null ? void 0 : l.hex() : (u = a.darken(0.15)) == null ? void 0 : u.hex();
1304
+ function po(e) {
1305
+ const t = D(() => {
1306
+ var i, u;
1307
+ const r = zt(e.data.color), n = r.isDark(), a = n ? (i = r.lighten(0.2)) == null ? void 0 : i.hex() : (u = r.darken(0.15)) == null ? void 0 : u.hex();
722
1308
  return {
723
- $textColor: r ? "#fff" : "#333",
1309
+ $textColor: n ? "#fff" : "#333",
724
1310
  $backgroundColor: e.data.color,
725
- $hoverColor: i
1311
+ $hoverColor: a
726
1312
  };
727
1313
  }, [e.data.color]);
728
- return /* @__PURE__ */ t(
729
- rt,
1314
+ return /* @__PURE__ */ o(
1315
+ uo,
730
1316
  {
731
- ...n,
1317
+ ...t,
732
1318
  $active: e.active,
733
1319
  "data-id": e.data.id,
734
1320
  onClick: e.onClick,
735
1321
  title: e.data.title,
736
- children: B(e.data.title, e.displayTitleMaxLength)
1322
+ children: $e(e.data.title, e.displayTitleMaxLength)
737
1323
  }
738
1324
  );
739
1325
  }
740
1326
  /*! This file was generated by vite-i18n-gen-resources-type check https://github.com/CRMChatReactComponent/vite-i18n-gen-resources-type. Please do not modify. */
741
- var R = /* @__PURE__ */ ((e) => (e.ZH_CN = "zh-CN", e.EN_US = "en-US", e))(R || {});
742
- const q = "Are you sure to delete it?", U = "No data available", Q = "Select a Group first", V = "Create a Group", Z = "Edit Group", J = "Create Group", X = "Title", Y = "Color", ee = "Save", te = "Create", ne = "Quick Messages Configs", oe = "Created Successfully", re = "Cannot be saved: title already existing", ie = "Cannot be saved: title is empty", ae = "Cannot be saved: content is empty", le = "Content", at = {
743
- confirmDelete: q,
744
- noData: U,
745
- selectAGroupFirst: Q,
746
- addNewGroup: V,
747
- editGroup: Z,
748
- createGroup: J,
749
- titleFieldName: X,
750
- colorFieldName: Y,
751
- save: ee,
752
- create: te,
753
- quickMessageConfigs: ne,
754
- createSuccessfully: oe,
755
- cannotSavedMessageCuzLabelExisted: re,
756
- cannotSavedMessageCuzLabelEmpty: ie,
757
- cannotSavedMessageCuzContentEmpty: ae,
758
- content: le,
759
- delete: "Delete"
760
- }, lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1327
+ var ze = /* @__PURE__ */ ((e) => (e.ZH_CN = "zh-CN", e.EN_US = "en-US", e))(ze || {});
1328
+ const Fe = "Are you sure to delete it?", Re = "No data available", Be = "Select a Group first", Ke = "Create a Group", Ve = "Edit Group", qe = "Create Group", Ue = "Title", We = "Color", Ye = "Save", Je = "Create", Xe = "Quick Messages Configs", Qe = "Created Successfully", Ze = "Cannot be saved: title already existing", et = "Cannot be saved: title is empty", tt = "Cannot be saved: content is empty", rt = "Content", nt = "Import from Clipboard", fo = {
1329
+ confirmDelete: Fe,
1330
+ noData: Re,
1331
+ selectAGroupFirst: Be,
1332
+ addNewGroup: Ke,
1333
+ editGroup: Ve,
1334
+ createGroup: qe,
1335
+ titleFieldName: Ue,
1336
+ colorFieldName: We,
1337
+ save: Ye,
1338
+ create: Je,
1339
+ quickMessageConfigs: Xe,
1340
+ createSuccessfully: Qe,
1341
+ cannotSavedMessageCuzLabelExisted: Ze,
1342
+ cannotSavedMessageCuzLabelEmpty: et,
1343
+ cannotSavedMessageCuzContentEmpty: tt,
1344
+ content: rt,
1345
+ delete: "Delete",
1346
+ importFromClipboard: nt
1347
+ }, go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
761
1348
  __proto__: null,
762
- addNewGroup: V,
763
- cannotSavedMessageCuzContentEmpty: ae,
764
- cannotSavedMessageCuzLabelEmpty: ie,
765
- cannotSavedMessageCuzLabelExisted: re,
766
- colorFieldName: Y,
767
- confirmDelete: q,
768
- content: le,
769
- create: te,
770
- createGroup: J,
771
- createSuccessfully: oe,
772
- default: at,
773
- editGroup: Z,
774
- noData: U,
775
- quickMessageConfigs: ne,
776
- save: ee,
777
- selectAGroupFirst: Q,
778
- titleFieldName: X
779
- }, Symbol.toStringTag, { value: "Module" })), ce = "确定删除吗?", se = "没有数据", de = "请在左侧选择一个分组", ue = "添加一个分组", fe = "编辑分组", he = "新建分组", me = "标题", ge = "颜色", pe = "保存", Ce = "创建", xe = "快捷消息配置", be = "创建成功", ve = "无法保存: 标题重复", ye = "无法保存: 标题不能为空", ke = "无法保存: 内容不能为空", Se = "内容", ct = {
780
- confirmDelete: ce,
781
- noData: se,
782
- selectAGroupFirst: de,
783
- addNewGroup: ue,
784
- editGroup: fe,
785
- createGroup: he,
786
- titleFieldName: me,
787
- colorFieldName: ge,
788
- save: pe,
789
- create: Ce,
790
- quickMessageConfigs: xe,
791
- createSuccessfully: be,
792
- cannotSavedMessageCuzLabelExisted: ve,
793
- cannotSavedMessageCuzLabelEmpty: ye,
794
- cannotSavedMessageCuzContentEmpty: ke,
795
- content: Se,
796
- delete: "删除"
797
- }, st = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1349
+ addNewGroup: Ke,
1350
+ cannotSavedMessageCuzContentEmpty: tt,
1351
+ cannotSavedMessageCuzLabelEmpty: et,
1352
+ cannotSavedMessageCuzLabelExisted: Ze,
1353
+ colorFieldName: We,
1354
+ confirmDelete: Fe,
1355
+ content: rt,
1356
+ create: Je,
1357
+ createGroup: qe,
1358
+ createSuccessfully: Qe,
1359
+ default: fo,
1360
+ editGroup: Ve,
1361
+ importFromClipboard: nt,
1362
+ noData: Re,
1363
+ quickMessageConfigs: Xe,
1364
+ save: Ye,
1365
+ selectAGroupFirst: Be,
1366
+ titleFieldName: Ue
1367
+ }, Symbol.toStringTag, { value: "Module" })), ot = "确定删除吗?", at = "没有数据", it = "请在左侧选择一个分组", st = "添加一个分组", lt = "编辑分组", ct = "新建分组", ut = "标题", dt = "颜色", pt = "保存", ft = "创建", gt = "快捷消息配置", ht = "创建成功", bt = "无法保存: 标题重复", yt = "无法保存: 标题不能为空", mt = "无法保存: 内容不能为空", vt = "内容", xt = "从剪切板导入", ho = {
1368
+ confirmDelete: ot,
1369
+ noData: at,
1370
+ selectAGroupFirst: it,
1371
+ addNewGroup: st,
1372
+ editGroup: lt,
1373
+ createGroup: ct,
1374
+ titleFieldName: ut,
1375
+ colorFieldName: dt,
1376
+ save: pt,
1377
+ create: ft,
1378
+ quickMessageConfigs: gt,
1379
+ createSuccessfully: ht,
1380
+ cannotSavedMessageCuzLabelExisted: bt,
1381
+ cannotSavedMessageCuzLabelEmpty: yt,
1382
+ cannotSavedMessageCuzContentEmpty: mt,
1383
+ content: vt,
1384
+ delete: "删除",
1385
+ importFromClipboard: xt
1386
+ }, bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
798
1387
  __proto__: null,
799
- addNewGroup: ue,
800
- cannotSavedMessageCuzContentEmpty: ke,
801
- cannotSavedMessageCuzLabelEmpty: ye,
802
- cannotSavedMessageCuzLabelExisted: ve,
803
- colorFieldName: ge,
804
- confirmDelete: ce,
805
- content: Se,
806
- create: Ce,
807
- createGroup: he,
808
- createSuccessfully: be,
809
- default: ct,
810
- editGroup: fe,
811
- noData: se,
812
- quickMessageConfigs: xe,
813
- save: pe,
814
- selectAGroupFirst: de,
815
- titleFieldName: me
816
- }, Symbol.toStringTag, { value: "Module" })), dt = /* @__PURE__ */ Object.assign({
817
- "./locales/en-US/common.json": lt,
818
- "./locales/zh-CN/common.json": st
819
- }), O = Object.entries(dt).reduce(
820
- (e, n) => {
821
- const [a, r] = n, i = a.match(/\/locales\/([\w-]+)\//), l = a.match(/\/([\w-_]+)\.json$/);
822
- return l && i ? (e[i[1]] = e[i[1]] || {}, e[i[1]][l[1]] = r.default) : console.error(`无法解析文件名称 path:${a}`), e;
1388
+ addNewGroup: st,
1389
+ cannotSavedMessageCuzContentEmpty: mt,
1390
+ cannotSavedMessageCuzLabelEmpty: yt,
1391
+ cannotSavedMessageCuzLabelExisted: bt,
1392
+ colorFieldName: dt,
1393
+ confirmDelete: ot,
1394
+ content: vt,
1395
+ create: ft,
1396
+ createGroup: ct,
1397
+ createSuccessfully: ht,
1398
+ default: ho,
1399
+ editGroup: lt,
1400
+ importFromClipboard: xt,
1401
+ noData: at,
1402
+ quickMessageConfigs: gt,
1403
+ save: pt,
1404
+ selectAGroupFirst: it,
1405
+ titleFieldName: ut
1406
+ }, Symbol.toStringTag, { value: "Module" })), yo = /* @__PURE__ */ Object.assign({
1407
+ "./locales/en-US/common.json": go,
1408
+ "./locales/zh-CN/common.json": bo
1409
+ }), ye = Object.entries(yo).reduce(
1410
+ (e, t) => {
1411
+ const [r, n] = t, a = r.match(/\/locales\/([\w-]+)\//), i = r.match(/\/([\w-_]+)\.json$/);
1412
+ return i && a ? (e[a[1]] = e[a[1]] || {}, e[a[1]][i[1]] = n.default) : console.error(`无法解析文件名称 path:${r}`), e;
823
1413
  },
824
1414
  {}
825
- ), De = He.createInstance();
826
- De.init({
827
- lng: R.ZH_CN,
1415
+ ), Ct = Ft.createInstance();
1416
+ Ct.init({
1417
+ lng: ze.ZH_CN,
828
1418
  debug: !1,
829
- ns: Object.keys(O),
830
- resources: O
1419
+ ns: Object.keys(ye),
1420
+ resources: ye
831
1421
  });
832
- const ut = j(null);
833
- function Mt(e) {
834
- return /* @__PURE__ */ t(je, { i18n: De, defaultNS: "common", children: /* @__PURE__ */ t(ut.Provider, { value: {}, children: e.children }) });
1422
+ const mo = ve(null);
1423
+ function Io(e) {
1424
+ return /* @__PURE__ */ o(Et, { i18n: e.i18n || Ct, defaultNS: "common", children: /* @__PURE__ */ o(mo.Provider, { value: {}, children: e.children }) });
835
1425
  }
836
1426
  export {
837
- H as AntdApiContext,
838
- Dt as AntdApiContextProviderCmp,
839
- St as EmojiPickerWrapper,
840
- ut as I18nContext,
841
- Mt as I18nContextCmp,
842
- Ye as MessageConfigsPanel,
843
- tt as MessageConfigsPanelModalWrapper,
844
- qe as MessagesEditTable,
845
- zt as QuickMessages
1427
+ ke as AntdApiContext,
1428
+ Mo as AntdApiContextProviderCmp,
1429
+ Oo as EmojiPickerWrapper,
1430
+ mo as I18nContext,
1431
+ Io as I18nContextCmp,
1432
+ ao as MessageConfigsPanel,
1433
+ so as MessageConfigsPanelModalWrapper,
1434
+ Qn as MessagesEditTable,
1435
+ Eo as QuickMessages
846
1436
  };