@fluid-app/fluid-cli-theme-dev 0.1.380 → 0.1.382
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/dist-cli-preview/.vite/manifest.json +17 -17
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{ContactsScreen-DWAUWpQz.js → ContactsScreen-WtiSee_0.js} +479 -468
- package/dist/dist-cli-preview/chunks/{MediaScreen-C92E79Zh.js → MediaScreen-BrXBj1vu.js} +1 -1
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-BQzqXufu.js → MemberShareablesScreen-Dr5DqOiP.js} +1 -1
- package/dist/dist-cli-preview/chunks/{PlaylistsScreen-Bc1OIy0T.js → PlaylistsScreen-CZ5z17eG.js} +1 -1
- package/dist/dist-cli-preview/chunks/{cli-preview-a9LJIBPB.js → cli-preview-BjJ894jd.js} +4 -4
- package/dist/dist-cli-preview/chunks/{mount-account-screen-sYSZ4PXX.js → mount-account-screen-BqeRLrjR.js} +2 -2
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-u4g9_Hmm.js → navigate-account-screen-4U9KF3-b.js} +1 -1
- package/package.json +2 -2
package/dist/dist-cli-preview/chunks/{ContactsScreen-DWAUWpQz.js → ContactsScreen-WtiSee_0.js}
RENAMED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { c as ze, l as i, ac as
|
|
2
|
-
import { c as
|
|
3
|
-
import { u as mn, a as
|
|
1
|
+
import { c as ze, l as i, ac as dr, j as t, aa as ur, ab as mr, am as Ie, az as pr, a9 as rn, a8 as wt, X as Ge, M as D, U as pt, aw as fr, Z as gr, K as q, N as hr, G as ve, R as an, J as W, E as O, aM as _r, ap as xr, $ as ue, a0 as me, a1 as pe, a2 as fe, a3 as ge, aN as br, at as sn, au as on, aO as ln, av as cn, C as yr, aP as yt, O as dn, H, Y as vr, aQ as jr, B as Nr, ag as un, z as Cr } from "./account-screen-runtime-CVtcJ0Fb.js";
|
|
2
|
+
import { c as kr, a as wr, u as Sr } from "./client.gen-CTq48a_5.js";
|
|
3
|
+
import { u as mn, a as Mr, c as Tr, C as Er } from "./countries-api-adapter-39yd7wyu.js";
|
|
4
4
|
import { T as tt, u as pn } from "./trash-2-f4dJpepX.js";
|
|
5
|
-
import { E as
|
|
6
|
-
import { u as
|
|
7
|
-
import { a as
|
|
8
|
-
import { B as
|
|
9
|
-
import { o as hn, p as
|
|
10
|
-
import { u as
|
|
5
|
+
import { E as Dr, Z as Ar, P as _e, M as nt, u as re, o as Pr, r as Rt, s as ie, q as zr, c as It, C as fn, R as De, j as Ae, k as gn } from "./schemas-CK5ZjT20.js";
|
|
6
|
+
import { u as Fr } from "./use-mobile-C4O5e0kh.js";
|
|
7
|
+
import { a as Rr, c as Ir, b as Or, u as Lr, I as ae, S as Ee } from "./sheet-haptics-context-N2vLfwOc.js";
|
|
8
|
+
import { B as qr, a as $r, b as Ot, d as Kr, e as Br, c as Ur } from "./Breadcrumb-DLYQ2Vr1.js";
|
|
9
|
+
import { o as hn, p as Gr, q as Hr, r as Qr, s as Yr, S as Vr, t as Wr, u as Xr, I as Zr, v as Jr, G as ea, L as ta, w as na, x as ra, y as aa, z as sa, B as oa, P as _n, g as xn, h as bn, M as He, D as rt, a as at, b as st, c as $e, E as Ze } from "./MobileActionSheet-k67c8wJk.js";
|
|
10
|
+
import { u as ia, S as yn } from "./useInfiniteQuery-pbRaLvNe.js";
|
|
11
11
|
import { U as ke } from "./users-BMdwEKKP.js";
|
|
12
|
-
import { E as Je, S as
|
|
13
|
-
import { S as
|
|
14
|
-
import { c as
|
|
12
|
+
import { E as Je, S as la, a as ca, b as da, c as ua, d as ma } from "./Select-97UR3puI.js";
|
|
13
|
+
import { S as pa, b as fa, I as Ke, a as Oe, s as vn, d as ga, e as ha } from "./screen-route-slug-utils-MtfouJSS.js";
|
|
14
|
+
import { c as _a, U as xa, d as ba, e as ya, f as va, S as ja, T as Na, a as Ca, b as Lt, g as qt } from "./index-twP43mON.js";
|
|
15
15
|
import { u as he } from "./sidebar-D8LwwiTr.js";
|
|
16
|
-
import { g as Se, h as
|
|
17
|
-
import { M as jn, c as Nn, S as
|
|
18
|
-
import { M as
|
|
19
|
-
import { C as
|
|
16
|
+
import { g as Se, h as ka, C as wa } from "./Combobox-I60LziKt.js";
|
|
17
|
+
import { M as jn, c as Nn, S as Sa, H as Ma, P as Ta, u as Ea, T as Da, L as Aa, b as Pa, E as za, a as Fa } from "./index-oaLlxtXm.js";
|
|
18
|
+
import { M as Ra } from "./map-pin-FwB95jm4.js";
|
|
19
|
+
import { C as Ia } from "./copy-Cb0EF4FY.js";
|
|
20
20
|
/**
|
|
21
21
|
* @license lucide-react v0.575.0 - ISC
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the ISC license.
|
|
24
24
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
|
-
const
|
|
26
|
+
const Oa = [
|
|
27
27
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
28
28
|
["path", { d: "M8.35 2.69A10 10 0 0 1 21.3 15.65", key: "1pfsoa" }],
|
|
29
29
|
["path", { d: "M19.08 19.08A10 10 0 1 1 4.92 4.92", key: "1ablyi" }]
|
|
30
|
-
],
|
|
30
|
+
], La = ze("circle-off", Oa);
|
|
31
31
|
/**
|
|
32
32
|
* @license lucide-react v0.575.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
36
|
*/
|
|
37
|
-
const
|
|
37
|
+
const qa = [
|
|
38
38
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
39
39
|
["path", { d: "M12 6v6l4 2", key: "mmk7yg" }]
|
|
40
|
-
], $t = ze("clock",
|
|
40
|
+
], $t = ze("clock", qa);
|
|
41
41
|
/**
|
|
42
42
|
* @license lucide-react v0.575.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const
|
|
47
|
+
const $a = [
|
|
48
48
|
["path", { d: "M13 5h8", key: "a7qcls" }],
|
|
49
49
|
["path", { d: "M13 12h8", key: "h98zly" }],
|
|
50
50
|
["path", { d: "M13 19h8", key: "c3s6r1" }],
|
|
51
51
|
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
52
52
|
["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1", key: "cif1o7" }]
|
|
53
|
-
],
|
|
53
|
+
], Ka = ze("list-todo", $a);
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-react v0.575.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/
|
|
60
|
-
const
|
|
60
|
+
const Ba = [
|
|
61
61
|
[
|
|
62
62
|
"path",
|
|
63
63
|
{
|
|
@@ -65,14 +65,14 @@ const Ka = [
|
|
|
65
65
|
key: "1miecu"
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
|
-
],
|
|
68
|
+
], Ua = ze("paperclip", Ba);
|
|
69
69
|
/**
|
|
70
70
|
* @license lucide-react v0.575.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
74
|
*/
|
|
75
|
-
const
|
|
75
|
+
const Ga = [
|
|
76
76
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
77
77
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
78
78
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -82,14 +82,14 @@ const Ua = [
|
|
|
82
82
|
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
83
83
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
84
84
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
85
|
-
],
|
|
85
|
+
], Ha = ze("sun", Ga);
|
|
86
86
|
/**
|
|
87
87
|
* @license lucide-react v0.575.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
91
|
*/
|
|
92
|
-
const
|
|
92
|
+
const Qa = [
|
|
93
93
|
["path", { d: "M12 2v8", key: "1q4o3n" }],
|
|
94
94
|
["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
|
|
95
95
|
["path", { d: "M2 18h2", key: "j10viu" }],
|
|
@@ -98,25 +98,25 @@ const Ha = [
|
|
|
98
98
|
["path", { d: "M22 22H2", key: "19qnx5" }],
|
|
99
99
|
["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }],
|
|
100
100
|
["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
|
|
101
|
-
],
|
|
102
|
-
var St = "ContextMenu", [
|
|
101
|
+
], Ya = ze("sunrise", Qa);
|
|
102
|
+
var St = "ContextMenu", [Va] = ur(St, [
|
|
103
103
|
hn
|
|
104
|
-
]), ee = hn(), [
|
|
105
|
-
const { __scopeContextMenu: n, children: r, onOpenChange: a, dir: s, modal: o = !0 } = e, [l, c] = i.useState(!1), d = ee(n), u =
|
|
104
|
+
]), ee = hn(), [Wa, Cn] = Va(St), kn = (e) => {
|
|
105
|
+
const { __scopeContextMenu: n, children: r, onOpenChange: a, dir: s, modal: o = !0 } = e, [l, c] = i.useState(!1), d = ee(n), u = dr(a), m = i.useCallback(
|
|
106
106
|
(g) => {
|
|
107
107
|
c(g), u(g);
|
|
108
108
|
},
|
|
109
109
|
[u]
|
|
110
110
|
);
|
|
111
111
|
return /* @__PURE__ */ t.jsx(
|
|
112
|
-
|
|
112
|
+
Wa,
|
|
113
113
|
{
|
|
114
114
|
scope: n,
|
|
115
115
|
open: l,
|
|
116
116
|
onOpenChange: m,
|
|
117
117
|
modal: o,
|
|
118
118
|
children: /* @__PURE__ */ t.jsx(
|
|
119
|
-
|
|
119
|
+
Gr,
|
|
120
120
|
{
|
|
121
121
|
...d,
|
|
122
122
|
dir: s,
|
|
@@ -141,9 +141,9 @@ var wn = "ContextMenuTrigger", Sn = i.forwardRef(
|
|
|
141
141
|
c.current = { x: f.clientX, y: f.clientY }, o.onOpenChange(!0);
|
|
142
142
|
};
|
|
143
143
|
return i.useEffect(() => m, [m]), i.useEffect(() => void (a && m()), [a, m]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
144
|
-
/* @__PURE__ */ t.jsx(
|
|
144
|
+
/* @__PURE__ */ t.jsx(Hr, { ...l, virtualRef: d }),
|
|
145
145
|
/* @__PURE__ */ t.jsx(
|
|
146
|
-
|
|
146
|
+
mr.span,
|
|
147
147
|
{
|
|
148
148
|
"data-state": o.open ? "open" : "closed",
|
|
149
149
|
"data-disabled": a ? "" : void 0,
|
|
@@ -168,16 +168,16 @@ var wn = "ContextMenuTrigger", Sn = i.forwardRef(
|
|
|
168
168
|
}
|
|
169
169
|
);
|
|
170
170
|
Sn.displayName = wn;
|
|
171
|
-
var
|
|
171
|
+
var Xa = "ContextMenuPortal", Mn = (e) => {
|
|
172
172
|
const { __scopeContextMenu: n, ...r } = e, a = ee(n);
|
|
173
|
-
return /* @__PURE__ */ t.jsx(
|
|
173
|
+
return /* @__PURE__ */ t.jsx(Qr, { ...a, ...r });
|
|
174
174
|
};
|
|
175
|
-
Mn.displayName =
|
|
175
|
+
Mn.displayName = Xa;
|
|
176
176
|
var Tn = "ContextMenuContent", En = i.forwardRef(
|
|
177
177
|
(e, n) => {
|
|
178
178
|
const { __scopeContextMenu: r, ...a } = e, s = Cn(Tn, r), o = ee(r), l = i.useRef(!1);
|
|
179
179
|
return /* @__PURE__ */ t.jsx(
|
|
180
|
-
|
|
180
|
+
Yr,
|
|
181
181
|
{
|
|
182
182
|
...o,
|
|
183
183
|
...a,
|
|
@@ -204,78 +204,78 @@ var Tn = "ContextMenuContent", En = i.forwardRef(
|
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
En.displayName = Tn;
|
|
207
|
-
var
|
|
207
|
+
var Za = "ContextMenuGroup", Ja = i.forwardRef(
|
|
208
208
|
(e, n) => {
|
|
209
209
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
210
|
-
return /* @__PURE__ */ t.jsx(
|
|
210
|
+
return /* @__PURE__ */ t.jsx(ea, { ...s, ...a, ref: n });
|
|
211
211
|
}
|
|
212
212
|
);
|
|
213
|
-
|
|
214
|
-
var
|
|
213
|
+
Ja.displayName = Za;
|
|
214
|
+
var es = "ContextMenuLabel", ts = i.forwardRef(
|
|
215
215
|
(e, n) => {
|
|
216
216
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
217
|
-
return /* @__PURE__ */ t.jsx(
|
|
217
|
+
return /* @__PURE__ */ t.jsx(ta, { ...s, ...a, ref: n });
|
|
218
218
|
}
|
|
219
219
|
);
|
|
220
|
-
|
|
221
|
-
var
|
|
220
|
+
ts.displayName = es;
|
|
221
|
+
var ns = "ContextMenuItem", Dn = i.forwardRef(
|
|
222
222
|
(e, n) => {
|
|
223
223
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
224
|
-
return /* @__PURE__ */ t.jsx(
|
|
224
|
+
return /* @__PURE__ */ t.jsx(Zr, { ...s, ...a, ref: n });
|
|
225
225
|
}
|
|
226
226
|
);
|
|
227
|
-
Dn.displayName =
|
|
228
|
-
var
|
|
229
|
-
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
230
|
-
return /* @__PURE__ */ t.jsx(ta, { ...s, ...a, ref: n });
|
|
231
|
-
});
|
|
232
|
-
rs.displayName = ns;
|
|
233
|
-
var as = "ContextMenuRadioGroup", ss = i.forwardRef((e, n) => {
|
|
227
|
+
Dn.displayName = ns;
|
|
228
|
+
var rs = "ContextMenuCheckboxItem", as = i.forwardRef((e, n) => {
|
|
234
229
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
235
230
|
return /* @__PURE__ */ t.jsx(na, { ...s, ...a, ref: n });
|
|
236
231
|
});
|
|
237
|
-
|
|
238
|
-
var
|
|
232
|
+
as.displayName = rs;
|
|
233
|
+
var ss = "ContextMenuRadioGroup", os = i.forwardRef((e, n) => {
|
|
239
234
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
240
235
|
return /* @__PURE__ */ t.jsx(ra, { ...s, ...a, ref: n });
|
|
241
236
|
});
|
|
242
|
-
|
|
243
|
-
var
|
|
237
|
+
os.displayName = ss;
|
|
238
|
+
var is = "ContextMenuRadioItem", ls = i.forwardRef((e, n) => {
|
|
244
239
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
245
240
|
return /* @__PURE__ */ t.jsx(aa, { ...s, ...a, ref: n });
|
|
246
241
|
});
|
|
247
|
-
|
|
248
|
-
var
|
|
242
|
+
ls.displayName = is;
|
|
243
|
+
var cs = "ContextMenuItemIndicator", ds = i.forwardRef((e, n) => {
|
|
249
244
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
250
|
-
return /* @__PURE__ */ t.jsx(
|
|
245
|
+
return /* @__PURE__ */ t.jsx(sa, { ...s, ...a, ref: n });
|
|
251
246
|
});
|
|
252
|
-
|
|
253
|
-
var us = "
|
|
247
|
+
ds.displayName = cs;
|
|
248
|
+
var us = "ContextMenuSeparator", An = i.forwardRef((e, n) => {
|
|
249
|
+
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
250
|
+
return /* @__PURE__ */ t.jsx(Jr, { ...s, ...a, ref: n });
|
|
251
|
+
});
|
|
252
|
+
An.displayName = us;
|
|
253
|
+
var ms = "ContextMenuArrow", ps = i.forwardRef(
|
|
254
254
|
(e, n) => {
|
|
255
255
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
256
|
-
return /* @__PURE__ */ t.jsx(
|
|
256
|
+
return /* @__PURE__ */ t.jsx(oa, { ...s, ...a, ref: n });
|
|
257
257
|
}
|
|
258
258
|
);
|
|
259
|
-
|
|
259
|
+
ps.displayName = ms;
|
|
260
260
|
var Pn = "ContextMenuSub", zn = (e) => {
|
|
261
|
-
const { __scopeContextMenu: n, children: r, onOpenChange: a, open: s, defaultOpen: o } = e, l = ee(n), [c, d] =
|
|
261
|
+
const { __scopeContextMenu: n, children: r, onOpenChange: a, open: s, defaultOpen: o } = e, l = ee(n), [c, d] = pr({
|
|
262
262
|
prop: s,
|
|
263
263
|
defaultProp: o ?? !1,
|
|
264
264
|
onChange: a,
|
|
265
265
|
caller: Pn
|
|
266
266
|
});
|
|
267
|
-
return /* @__PURE__ */ t.jsx(
|
|
267
|
+
return /* @__PURE__ */ t.jsx(Vr, { ...l, open: c, onOpenChange: d, children: r });
|
|
268
268
|
};
|
|
269
269
|
zn.displayName = Pn;
|
|
270
|
-
var
|
|
270
|
+
var fs = "ContextMenuSubTrigger", Fn = i.forwardRef((e, n) => {
|
|
271
271
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
272
|
-
return /* @__PURE__ */ t.jsx(
|
|
272
|
+
return /* @__PURE__ */ t.jsx(Wr, { ...s, ...a, ref: n });
|
|
273
273
|
});
|
|
274
|
-
Fn.displayName =
|
|
275
|
-
var
|
|
274
|
+
Fn.displayName = fs;
|
|
275
|
+
var gs = "ContextMenuSubContent", Rn = i.forwardRef((e, n) => {
|
|
276
276
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
277
277
|
return /* @__PURE__ */ t.jsx(
|
|
278
|
-
|
|
278
|
+
Xr,
|
|
279
279
|
{
|
|
280
280
|
...s,
|
|
281
281
|
...a,
|
|
@@ -291,15 +291,15 @@ var fs = "ContextMenuSubContent", Rn = i.forwardRef((e, n) => {
|
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
});
|
|
294
|
-
Rn.displayName =
|
|
294
|
+
Rn.displayName = gs;
|
|
295
295
|
function Ve(e) {
|
|
296
296
|
return (n) => n.pointerType !== "mouse" ? e(n) : void 0;
|
|
297
297
|
}
|
|
298
|
-
var
|
|
298
|
+
var hs = kn, _s = Sn, In = Mn, xs = En, bs = Dn, ys = An, vs = zn, js = Fn, Ns = Rn;
|
|
299
299
|
function ft(e) {
|
|
300
300
|
return e.replace(/_/g, " ").replace(/([A-Z])/g, " $1").split(" ").map((n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join(" ").trim();
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const Cs = "Request ID: ";
|
|
303
303
|
function Ce(e) {
|
|
304
304
|
if (typeof e != "string")
|
|
305
305
|
return;
|
|
@@ -324,7 +324,7 @@ function we(e) {
|
|
|
324
324
|
function Ln(e, n) {
|
|
325
325
|
return (e === "message" || e === "error_message" || e === "error") && we(n) !== void 0;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function ks(e) {
|
|
328
328
|
if (typeof e == "string")
|
|
329
329
|
return e;
|
|
330
330
|
try {
|
|
@@ -341,7 +341,7 @@ function Le(e, n) {
|
|
|
341
341
|
function Mt(e) {
|
|
342
342
|
return we(e.message) ?? we(e.error_message) ?? we(e.error);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function ws(e, n) {
|
|
345
345
|
return we(n) === e;
|
|
346
346
|
}
|
|
347
347
|
function qn(e) {
|
|
@@ -357,12 +357,12 @@ function qn(e) {
|
|
|
357
357
|
}
|
|
358
358
|
return !1;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Ss(e) {
|
|
361
361
|
return et(e) !== void 0 || Le(e, "errors") || Le(e, "details") || Le(e, "detail") || Le(e, "status") || Le(e, "code");
|
|
362
362
|
}
|
|
363
363
|
function $n(e, n) {
|
|
364
364
|
const r = Mt(e);
|
|
365
|
-
return r !== void 0 && (
|
|
365
|
+
return r !== void 0 && (Ss(e) || qn(e) || ws(r, n));
|
|
366
366
|
}
|
|
367
367
|
function Kn(e) {
|
|
368
368
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
@@ -370,24 +370,24 @@ function Kn(e) {
|
|
|
370
370
|
const n = e;
|
|
371
371
|
return we(n.message) ?? we(n.error_message);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Ms(e, n) {
|
|
374
374
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
375
375
|
return;
|
|
376
376
|
const r = e;
|
|
377
377
|
return $n(r, n) ? Mt(r) : Kn(r.error);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Ts(e) {
|
|
380
380
|
return Kn(e) !== void 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Es(e, n) {
|
|
383
383
|
if (!n)
|
|
384
384
|
return e;
|
|
385
|
-
const r = `${
|
|
385
|
+
const r = `${Cs}${n}`;
|
|
386
386
|
return !e || e.trim().length === 0 ? r : e.split(`
|
|
387
387
|
`).includes(r) ? e : `${e}
|
|
388
388
|
${r}`;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function Ds(e) {
|
|
391
391
|
if (!e || typeof e != "object")
|
|
392
392
|
return !1;
|
|
393
393
|
const n = e;
|
|
@@ -401,12 +401,12 @@ function Bn(e, { skipScalarEnvelopeKeys: n }) {
|
|
|
401
401
|
for (const [s, o] of Object.entries(a))
|
|
402
402
|
On(s, o) || n && Ln(s, o) || (Array.isArray(o) && o.length > 0 ? r.push({
|
|
403
403
|
field: ft(s),
|
|
404
|
-
messages: o.map(
|
|
404
|
+
messages: o.map(ks)
|
|
405
405
|
}) : typeof o == "string" && o.length > 0 ? r.push({
|
|
406
406
|
field: ft(s),
|
|
407
407
|
messages: [o]
|
|
408
408
|
}) : o && typeof o == "object" && !Array.isArray(o) && Bn(o, {
|
|
409
|
-
skipScalarEnvelopeKeys: s === "error" &&
|
|
409
|
+
skipScalarEnvelopeKeys: s === "error" && Ts(o)
|
|
410
410
|
}).forEach((c) => {
|
|
411
411
|
r.push({
|
|
412
412
|
field: `${ft(s)} → ${c.field}`,
|
|
@@ -415,7 +415,7 @@ function Bn(e, { skipScalarEnvelopeKeys: n }) {
|
|
|
415
415
|
}));
|
|
416
416
|
return r;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function As(e) {
|
|
419
419
|
if (e.length === 0)
|
|
420
420
|
return "";
|
|
421
421
|
if (e.length === 1) {
|
|
@@ -432,20 +432,20 @@ function Ds(e) {
|
|
|
432
432
|
return `${n}
|
|
433
433
|
...and ${r} more ${r === 1 ? "error" : "errors"}`;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Ps(e, n) {
|
|
436
436
|
const r = e && typeof e == "object" && !Array.isArray(e) && $n(
|
|
437
437
|
e,
|
|
438
438
|
n
|
|
439
439
|
) ? Mt(e) : void 0, a = Bn(e, {
|
|
440
440
|
skipScalarEnvelopeKeys: r !== void 0
|
|
441
|
-
}), s = a.length > 0 ?
|
|
441
|
+
}), s = a.length > 0 ? As(a) : void 0, o = Ms(
|
|
442
442
|
e,
|
|
443
443
|
n
|
|
444
444
|
);
|
|
445
445
|
return r && s ? s : o && s && s !== o ? `${o}
|
|
446
446
|
${s}` : s ?? o;
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function zs(e) {
|
|
449
449
|
if (!e || typeof e != "object")
|
|
450
450
|
return;
|
|
451
451
|
const n = e;
|
|
@@ -454,14 +454,14 @@ function Ps(e) {
|
|
|
454
454
|
et(n.body) ?? et(n.data);
|
|
455
455
|
}
|
|
456
456
|
function V(e, n) {
|
|
457
|
-
const r =
|
|
457
|
+
const r = zs(e);
|
|
458
458
|
let a;
|
|
459
|
-
return
|
|
459
|
+
return Ds(e) ? (e.data && (a = Ps(e.data, e.message)), !a && e.message && (a = e.message)) : e instanceof Error && (a = e.message), Es(a ?? n, r);
|
|
460
460
|
}
|
|
461
461
|
function Kt(e) {
|
|
462
|
-
return
|
|
462
|
+
return Dr(Ar, e);
|
|
463
463
|
}
|
|
464
|
-
const Un = i.createContext(null),
|
|
464
|
+
const Un = i.createContext(null), Fs = Un.Provider;
|
|
465
465
|
function ot() {
|
|
466
466
|
const e = i.use(Un);
|
|
467
467
|
if (!e)
|
|
@@ -482,16 +482,16 @@ function Qe() {
|
|
|
482
482
|
function lt() {
|
|
483
483
|
return ot().groups ?? null;
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Rs(e) {
|
|
486
486
|
return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && e.name === "AbortError";
|
|
487
487
|
}
|
|
488
488
|
function Gn(e) {
|
|
489
|
-
const n =
|
|
489
|
+
const n = kr({
|
|
490
490
|
baseUrl: e.baseUrl,
|
|
491
491
|
credentials: e.credentials,
|
|
492
492
|
fetch: e.fetch,
|
|
493
493
|
// Rack requires bracketed keys to parse one or more tags as an array.
|
|
494
|
-
querySerializer: ({ tags: r, ...a }) =>
|
|
494
|
+
querySerializer: ({ tags: r, ...a }) => Sr.bodySerializer({
|
|
495
495
|
...a,
|
|
496
496
|
"tags[]": r
|
|
497
497
|
}),
|
|
@@ -502,15 +502,15 @@ function Gn(e) {
|
|
|
502
502
|
throwOnError: !0
|
|
503
503
|
});
|
|
504
504
|
return n.interceptors.error.use(
|
|
505
|
-
|
|
505
|
+
wr({
|
|
506
506
|
onResponseError: (r) => {
|
|
507
507
|
r.status === 401 && e.onAuthError?.();
|
|
508
508
|
},
|
|
509
|
-
shouldPassThroughTransportError:
|
|
509
|
+
shouldPassThroughTransportError: Rs
|
|
510
510
|
})
|
|
511
511
|
), n;
|
|
512
512
|
}
|
|
513
|
-
const
|
|
513
|
+
const Is = (e) => e.client.get({
|
|
514
514
|
responseStyle: "data",
|
|
515
515
|
security: [
|
|
516
516
|
{
|
|
@@ -521,7 +521,7 @@ const Rs = (e) => e.client.get({
|
|
|
521
521
|
],
|
|
522
522
|
url: "/api/contacts",
|
|
523
523
|
...e
|
|
524
|
-
}),
|
|
524
|
+
}), Os = (e) => e.client.post({
|
|
525
525
|
responseStyle: "data",
|
|
526
526
|
security: [
|
|
527
527
|
{
|
|
@@ -536,7 +536,7 @@ const Rs = (e) => e.client.get({
|
|
|
536
536
|
"Content-Type": "application/json",
|
|
537
537
|
...e.headers
|
|
538
538
|
}
|
|
539
|
-
}),
|
|
539
|
+
}), Ls = (e) => e.client.delete({
|
|
540
540
|
responseStyle: "data",
|
|
541
541
|
security: [
|
|
542
542
|
{
|
|
@@ -547,7 +547,7 @@ const Rs = (e) => e.client.get({
|
|
|
547
547
|
],
|
|
548
548
|
url: "/api/contacts/{id}",
|
|
549
549
|
...e
|
|
550
|
-
}),
|
|
550
|
+
}), qs = (e) => e.client.get({
|
|
551
551
|
responseStyle: "data",
|
|
552
552
|
security: [
|
|
553
553
|
{
|
|
@@ -558,7 +558,7 @@ const Rs = (e) => e.client.get({
|
|
|
558
558
|
],
|
|
559
559
|
url: "/api/contacts/{id}",
|
|
560
560
|
...e
|
|
561
|
-
}),
|
|
561
|
+
}), $s = (e) => e.client.patch({
|
|
562
562
|
responseStyle: "data",
|
|
563
563
|
security: [
|
|
564
564
|
{
|
|
@@ -573,7 +573,7 @@ const Rs = (e) => e.client.get({
|
|
|
573
573
|
"Content-Type": "application/json",
|
|
574
574
|
...e.headers
|
|
575
575
|
}
|
|
576
|
-
}),
|
|
576
|
+
}), Ks = (e) => e.client.delete({
|
|
577
577
|
responseStyle: "data",
|
|
578
578
|
security: [
|
|
579
579
|
{
|
|
@@ -588,7 +588,7 @@ const Rs = (e) => e.client.get({
|
|
|
588
588
|
"Content-Type": "application/json",
|
|
589
589
|
...e.headers
|
|
590
590
|
}
|
|
591
|
-
}),
|
|
591
|
+
}), Bs = (e) => e.client.get({
|
|
592
592
|
responseStyle: "data",
|
|
593
593
|
security: [
|
|
594
594
|
{
|
|
@@ -599,7 +599,7 @@ const Rs = (e) => e.client.get({
|
|
|
599
599
|
],
|
|
600
600
|
url: "/api/contacts/groups",
|
|
601
601
|
...e
|
|
602
|
-
}),
|
|
602
|
+
}), Us = (e) => e.client.post({
|
|
603
603
|
responseStyle: "data",
|
|
604
604
|
security: [
|
|
605
605
|
{
|
|
@@ -614,7 +614,7 @@ const Rs = (e) => e.client.get({
|
|
|
614
614
|
"Content-Type": "application/json",
|
|
615
615
|
...e.headers
|
|
616
616
|
}
|
|
617
|
-
}),
|
|
617
|
+
}), Gs = (e) => e.client.delete({
|
|
618
618
|
responseStyle: "data",
|
|
619
619
|
security: [
|
|
620
620
|
{
|
|
@@ -625,7 +625,7 @@ const Rs = (e) => e.client.get({
|
|
|
625
625
|
],
|
|
626
626
|
url: "/api/contacts/groups/{id}",
|
|
627
627
|
...e
|
|
628
|
-
}),
|
|
628
|
+
}), Hs = (e) => e.client.patch({
|
|
629
629
|
responseStyle: "data",
|
|
630
630
|
security: [
|
|
631
631
|
{
|
|
@@ -640,7 +640,7 @@ const Rs = (e) => e.client.get({
|
|
|
640
640
|
"Content-Type": "application/json",
|
|
641
641
|
...e.headers
|
|
642
642
|
}
|
|
643
|
-
}),
|
|
643
|
+
}), Qs = (e) => e.client.get({
|
|
644
644
|
responseStyle: "data",
|
|
645
645
|
security: [
|
|
646
646
|
{
|
|
@@ -651,7 +651,7 @@ const Rs = (e) => e.client.get({
|
|
|
651
651
|
],
|
|
652
652
|
url: "/api/contacts/{contact_id}/notes",
|
|
653
653
|
...e
|
|
654
|
-
}),
|
|
654
|
+
}), Ys = (e) => e.client.post({
|
|
655
655
|
responseStyle: "data",
|
|
656
656
|
security: [
|
|
657
657
|
{
|
|
@@ -666,7 +666,7 @@ const Rs = (e) => e.client.get({
|
|
|
666
666
|
"Content-Type": "application/json",
|
|
667
667
|
...e.headers
|
|
668
668
|
}
|
|
669
|
-
}),
|
|
669
|
+
}), Vs = (e) => e.client.get({
|
|
670
670
|
responseStyle: "data",
|
|
671
671
|
security: [
|
|
672
672
|
{
|
|
@@ -677,7 +677,7 @@ const Rs = (e) => e.client.get({
|
|
|
677
677
|
],
|
|
678
678
|
url: "/api/contacts/{contact_id}/tasks",
|
|
679
679
|
...e
|
|
680
|
-
}),
|
|
680
|
+
}), Ws = (e) => e.client.post({
|
|
681
681
|
responseStyle: "data",
|
|
682
682
|
security: [
|
|
683
683
|
{
|
|
@@ -692,7 +692,7 @@ const Rs = (e) => e.client.get({
|
|
|
692
692
|
"Content-Type": "application/json",
|
|
693
693
|
...e.headers
|
|
694
694
|
}
|
|
695
|
-
}),
|
|
695
|
+
}), Xs = (e) => e.client.delete({
|
|
696
696
|
responseStyle: "data",
|
|
697
697
|
security: [
|
|
698
698
|
{
|
|
@@ -703,7 +703,7 @@ const Rs = (e) => e.client.get({
|
|
|
703
703
|
],
|
|
704
704
|
url: "/api/contacts/{contact_id}/notes/{id}",
|
|
705
705
|
...e
|
|
706
|
-
}),
|
|
706
|
+
}), Zs = (e) => e.client.patch({
|
|
707
707
|
responseStyle: "data",
|
|
708
708
|
security: [
|
|
709
709
|
{
|
|
@@ -718,7 +718,7 @@ const Rs = (e) => e.client.get({
|
|
|
718
718
|
"Content-Type": "application/json",
|
|
719
719
|
...e.headers
|
|
720
720
|
}
|
|
721
|
-
}),
|
|
721
|
+
}), Js = (e) => e.client.delete({
|
|
722
722
|
responseStyle: "data",
|
|
723
723
|
security: [
|
|
724
724
|
{
|
|
@@ -729,7 +729,7 @@ const Rs = (e) => e.client.get({
|
|
|
729
729
|
],
|
|
730
730
|
url: "/api/contacts/{contact_id}/tasks/{id}",
|
|
731
731
|
...e
|
|
732
|
-
}),
|
|
732
|
+
}), eo = (e) => e.client.patch({
|
|
733
733
|
responseStyle: "data",
|
|
734
734
|
security: [
|
|
735
735
|
{
|
|
@@ -744,7 +744,7 @@ const Rs = (e) => e.client.get({
|
|
|
744
744
|
"Content-Type": "application/json",
|
|
745
745
|
...e.headers
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), to = {
|
|
748
748
|
total_count: 0,
|
|
749
749
|
total_pages: 0,
|
|
750
750
|
current_page: 1,
|
|
@@ -754,7 +754,7 @@ function ce(e) {
|
|
|
754
754
|
return Number(e);
|
|
755
755
|
}
|
|
756
756
|
function Bt(e, n, r, a) {
|
|
757
|
-
if (!e) return
|
|
757
|
+
if (!e) return to;
|
|
758
758
|
const s = e.pagination?.next_cursor ?? null, o = e.total_count ?? (s ? (r + 1) * a : (r - 1) * a + n);
|
|
759
759
|
return {
|
|
760
760
|
total_count: o,
|
|
@@ -787,7 +787,7 @@ function Ut(e) {
|
|
|
787
787
|
updated_at: e.updated_at ?? ""
|
|
788
788
|
};
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function no(e) {
|
|
791
791
|
return {
|
|
792
792
|
id: e.id ?? 0,
|
|
793
793
|
title: e.title ?? "",
|
|
@@ -802,7 +802,7 @@ function to(e) {
|
|
|
802
802
|
assets: []
|
|
803
803
|
};
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function ro(e) {
|
|
806
806
|
const n = e;
|
|
807
807
|
return {
|
|
808
808
|
id: e.id ?? 0,
|
|
@@ -825,22 +825,22 @@ function gt(e) {
|
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
827
|
const Gt = /* @__PURE__ */ new WeakMap();
|
|
828
|
-
function
|
|
828
|
+
function ao(e) {
|
|
829
829
|
return JSON.stringify({
|
|
830
830
|
limit: e?.per_page ?? e?.limit ?? null,
|
|
831
831
|
search: e?.search_query ?? e?.search ?? e?.query ?? null,
|
|
832
832
|
tags: e?.tags ?? null
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function so(e, n) {
|
|
836
836
|
let r = Gt.get(e);
|
|
837
837
|
r || (r = /* @__PURE__ */ new Map(), Gt.set(e, r));
|
|
838
|
-
const a =
|
|
838
|
+
const a = ao(n), s = r.get(a);
|
|
839
839
|
if (s) return s;
|
|
840
840
|
const o = /* @__PURE__ */ new Map();
|
|
841
841
|
return r.set(a, o), o;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function oo(e, n) {
|
|
844
844
|
if (!e) return;
|
|
845
845
|
const r = typeof e.page == "number" ? e.page : 1, a = e.per_page ?? e.limit, s = e.search_query ?? e.search ?? e.query, o = Array.isArray(e.tags) ? e.tags.filter((c) => typeof c == "string") : void 0, l = r > 1 ? n.get(r) : void 0;
|
|
846
846
|
return r > 1 && l === void 0 ? null : {
|
|
@@ -850,23 +850,23 @@ function so(e, n) {
|
|
|
850
850
|
...o ? { tags: o } : {}
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function io(e) {
|
|
854
854
|
return {
|
|
855
855
|
getContact: async (n) => {
|
|
856
|
-
const r = await
|
|
856
|
+
const r = await qs({
|
|
857
857
|
client: e,
|
|
858
858
|
path: { id: ce(n) }
|
|
859
859
|
});
|
|
860
860
|
return { contact: Ut(r.contact ?? {}) };
|
|
861
861
|
},
|
|
862
862
|
listContacts: async (n) => {
|
|
863
|
-
const r = typeof n?.page == "number" ? n.page : 1, a = typeof n?.per_page == "number" ? n.per_page : 25, s =
|
|
863
|
+
const r = typeof n?.page == "number" ? n.page : 1, a = typeof n?.per_page == "number" ? n.per_page : 25, s = so(e, n), o = oo(n, s);
|
|
864
864
|
if (o === null)
|
|
865
865
|
return {
|
|
866
866
|
contacts: [],
|
|
867
867
|
meta: Bt(void 0, 0, r, a)
|
|
868
868
|
};
|
|
869
|
-
const l = await
|
|
869
|
+
const l = await Is({
|
|
870
870
|
client: e,
|
|
871
871
|
...o ? { query: o } : {}
|
|
872
872
|
}), c = l.meta?.pagination?.next_cursor;
|
|
@@ -877,53 +877,53 @@ function oo(e) {
|
|
|
877
877
|
meta: Bt(l.meta, d.length, r, a)
|
|
878
878
|
};
|
|
879
879
|
},
|
|
880
|
-
createContact: (n) =>
|
|
880
|
+
createContact: (n) => Os({
|
|
881
881
|
client: e,
|
|
882
882
|
body: { contact: n }
|
|
883
883
|
}),
|
|
884
|
-
updateContact: (n, r) =>
|
|
884
|
+
updateContact: (n, r) => $s({
|
|
885
885
|
client: e,
|
|
886
886
|
path: { id: ce(n) },
|
|
887
887
|
body: { contact: r }
|
|
888
888
|
}),
|
|
889
|
-
deleteContact: (n) =>
|
|
890
|
-
bulkDeleteContacts: (n) =>
|
|
889
|
+
deleteContact: (n) => Ls({ client: e, path: { id: ce(n) } }),
|
|
890
|
+
bulkDeleteContacts: (n) => Ks({ client: e, body: { ids: n } })
|
|
891
891
|
};
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function lo(e) {
|
|
894
894
|
return {
|
|
895
|
-
listNotes: async (n) => ({ notes: ((await
|
|
895
|
+
listNotes: async (n) => ({ notes: ((await Qs({
|
|
896
896
|
client: e,
|
|
897
897
|
path: { contact_id: ce(n) }
|
|
898
|
-
})).notes ?? []).map(
|
|
899
|
-
createNote: (n, r) =>
|
|
898
|
+
})).notes ?? []).map(no) }),
|
|
899
|
+
createNote: (n, r) => Ys({
|
|
900
900
|
client: e,
|
|
901
901
|
path: { contact_id: ce(n) },
|
|
902
902
|
body: { note: { title: r.title, body: r.body } }
|
|
903
903
|
}),
|
|
904
|
-
updateNote: (n, r, a) =>
|
|
904
|
+
updateNote: (n, r, a) => Zs({
|
|
905
905
|
client: e,
|
|
906
906
|
path: { contact_id: ce(r), id: n },
|
|
907
907
|
body: { note: { title: a.title, body: a.body } }
|
|
908
908
|
}),
|
|
909
|
-
deleteNote: (n, r) =>
|
|
909
|
+
deleteNote: (n, r) => Xs({
|
|
910
910
|
client: e,
|
|
911
911
|
path: { contact_id: ce(r), id: n }
|
|
912
912
|
})
|
|
913
913
|
};
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function co(e) {
|
|
916
916
|
return {
|
|
917
|
-
listTasks: async (n) => ({ tasks: ((await
|
|
917
|
+
listTasks: async (n) => ({ tasks: ((await Vs({
|
|
918
918
|
client: e,
|
|
919
919
|
path: { contact_id: ce(n) }
|
|
920
|
-
})).tasks ?? []).map(
|
|
921
|
-
createTask: (n, r) =>
|
|
920
|
+
})).tasks ?? []).map(ro) }),
|
|
921
|
+
createTask: (n, r) => Ws({
|
|
922
922
|
client: e,
|
|
923
923
|
path: { contact_id: ce(n) },
|
|
924
924
|
body: { task: { title: r.body, due_date: r.due_at } }
|
|
925
925
|
}),
|
|
926
|
-
updateTask: (n, r, a) =>
|
|
926
|
+
updateTask: (n, r, a) => eo({
|
|
927
927
|
client: e,
|
|
928
928
|
path: { contact_id: ce(r), id: n },
|
|
929
929
|
body: {
|
|
@@ -934,42 +934,42 @@ function lo(e) {
|
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
}),
|
|
937
|
-
deleteTask: (n, r) =>
|
|
937
|
+
deleteTask: (n, r) => Js({
|
|
938
938
|
client: e,
|
|
939
939
|
path: { contact_id: ce(r), id: n }
|
|
940
940
|
})
|
|
941
941
|
};
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function uo(e) {
|
|
944
944
|
return {
|
|
945
|
-
listGroups: async () => ({ groups: ((await
|
|
945
|
+
listGroups: async () => ({ groups: ((await Bs({ client: e })).groups ?? []).map(gt) }),
|
|
946
946
|
createGroup: async (n) => {
|
|
947
|
-
const r = await
|
|
947
|
+
const r = await Us({
|
|
948
948
|
client: e,
|
|
949
949
|
body: { group: n }
|
|
950
950
|
});
|
|
951
951
|
return { group: gt(r.group ?? {}) };
|
|
952
952
|
},
|
|
953
953
|
updateGroup: async (n, r) => {
|
|
954
|
-
const a = await
|
|
954
|
+
const a = await Hs({
|
|
955
955
|
client: e,
|
|
956
956
|
path: { id: n },
|
|
957
957
|
body: { group: r }
|
|
958
958
|
});
|
|
959
959
|
return { group: gt(a.group ?? {}) };
|
|
960
960
|
},
|
|
961
|
-
deleteGroup: (n) =>
|
|
961
|
+
deleteGroup: (n) => Gs({ client: e, path: { id: n } })
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
964
|
function Hn(e) {
|
|
965
965
|
return {
|
|
966
|
-
contacts:
|
|
967
|
-
notes:
|
|
968
|
-
tasks:
|
|
969
|
-
groups:
|
|
966
|
+
contacts: io(e),
|
|
967
|
+
notes: lo(e),
|
|
968
|
+
tasks: co(e),
|
|
969
|
+
groups: uo(e)
|
|
970
970
|
};
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function mo({
|
|
973
973
|
children: e,
|
|
974
974
|
api: n
|
|
975
975
|
}) {
|
|
@@ -990,9 +990,9 @@ function uo({
|
|
|
990
990
|
() => Hn(l),
|
|
991
991
|
[l]
|
|
992
992
|
);
|
|
993
|
-
return /* @__PURE__ */ t.jsx(
|
|
993
|
+
return /* @__PURE__ */ t.jsx(Fs, { value: n ?? c, children: e });
|
|
994
994
|
}
|
|
995
|
-
const
|
|
995
|
+
const po = {
|
|
996
996
|
breadcrumb: "Contacts",
|
|
997
997
|
breadcrumb_new: "New Contact",
|
|
998
998
|
contact_label: "Contact",
|
|
@@ -1371,8 +1371,8 @@ const mo = {
|
|
|
1371
1371
|
assign_rep_search_placeholder: "Search by name or email...",
|
|
1372
1372
|
assign_rep_loading: "Loading…",
|
|
1373
1373
|
assign_rep_no_results: 'No reps found matching "{{term}}"'
|
|
1374
|
-
},
|
|
1375
|
-
fallback:
|
|
1374
|
+
}, fo = Ir({
|
|
1375
|
+
fallback: po,
|
|
1376
1376
|
loaders: {
|
|
1377
1377
|
ar: () => import("./ar-DT9j-dOi.js").then(
|
|
1378
1378
|
(e) => e.default
|
|
@@ -1478,25 +1478,25 @@ const mo = {
|
|
|
1478
1478
|
)
|
|
1479
1479
|
}
|
|
1480
1480
|
});
|
|
1481
|
-
function
|
|
1482
|
-
return
|
|
1481
|
+
function go(e, n) {
|
|
1482
|
+
return Rr(e, n);
|
|
1483
1483
|
}
|
|
1484
1484
|
const {
|
|
1485
|
-
Context:
|
|
1486
|
-
Provider:
|
|
1487
|
-
useTranslation:
|
|
1488
|
-
} =
|
|
1485
|
+
Context: ho,
|
|
1486
|
+
Provider: _o,
|
|
1487
|
+
useTranslation: xo
|
|
1488
|
+
} = Or("Contacts"), bo = _o, z = xo;
|
|
1489
1489
|
function Ye() {
|
|
1490
|
-
return i.use(
|
|
1490
|
+
return i.use(ho);
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1492
|
+
function yo({
|
|
1493
1493
|
children: e
|
|
1494
1494
|
}) {
|
|
1495
|
-
const { locale: n } = wt(), r =
|
|
1496
|
-
() =>
|
|
1495
|
+
const { locale: n } = wt(), r = Lr(fo, n), a = i.useMemo(
|
|
1496
|
+
() => go(n, r),
|
|
1497
1497
|
[n, r]
|
|
1498
1498
|
);
|
|
1499
|
-
return /* @__PURE__ */ t.jsx(
|
|
1499
|
+
return /* @__PURE__ */ t.jsx(bo, { value: a, children: e });
|
|
1500
1500
|
}
|
|
1501
1501
|
function Qn(e) {
|
|
1502
1502
|
const n = e.indexOf(`
|
|
@@ -1522,9 +1522,9 @@ function le(e) {
|
|
|
1522
1522
|
const n = typeof e == "string" ? new Date(e) : e;
|
|
1523
1523
|
return new Date(n.getFullYear(), n.getMonth(), n.getDate());
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1525
|
+
const vo = /^\d{4}-\d{2}-\d{2}(?:$|T00:00(?::00(?:\.\d+)?)?(?:[+-]\d{2}:\d{2}|Z)?)$/, Yn = /^\d{4}-\d{2}-\d{2}T(\d{2}):(\d{2})(?::\d{2}(?:\.\d+)?)?(?:[+-]\d{2}:\d{2})?$/;
|
|
1526
1526
|
function ct(e) {
|
|
1527
|
-
return
|
|
1527
|
+
return vo.test(e);
|
|
1528
1528
|
}
|
|
1529
1529
|
function Vn(e) {
|
|
1530
1530
|
if (!e) return "";
|
|
@@ -1537,7 +1537,7 @@ function Vn(e) {
|
|
|
1537
1537
|
const n = new Date(e);
|
|
1538
1538
|
return Number.isNaN(n.getTime()) ? "" : Te(0, n);
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function jo(e, n = /* @__PURE__ */ new Date()) {
|
|
1541
1541
|
const r = le(e);
|
|
1542
1542
|
if (Number.isNaN(r.getTime())) return null;
|
|
1543
1543
|
const a = le(n), s = Date.UTC(r.getFullYear(), r.getMonth(), r.getDate()), o = Date.UTC(
|
|
@@ -1569,9 +1569,9 @@ const de = {
|
|
|
1569
1569
|
groupMembers: (e) => ["portal-contacts", "group-members", e],
|
|
1570
1570
|
groupAddSearch: (e, n) => ["portal-contacts", "group-add-search", e, n]
|
|
1571
1571
|
};
|
|
1572
|
-
function
|
|
1572
|
+
function No(e) {
|
|
1573
1573
|
const n = xe();
|
|
1574
|
-
return
|
|
1574
|
+
return ia({
|
|
1575
1575
|
queryKey: [...de.list("contacts"), e],
|
|
1576
1576
|
queryFn: ({ pageParam: r }) => n.listContacts({
|
|
1577
1577
|
...e,
|
|
@@ -1585,7 +1585,7 @@ function jo(e) {
|
|
|
1585
1585
|
initialPageParam: 1
|
|
1586
1586
|
});
|
|
1587
1587
|
}
|
|
1588
|
-
const
|
|
1588
|
+
const Co = 30, ht = "12:00", Tt = /^(\d{2}):(\d{2})$/;
|
|
1589
1589
|
function Et(e) {
|
|
1590
1590
|
const n = Tt.exec(e), r = n?.[1] ? Number(n[1]) : Number.NaN, a = n?.[2] ? Number(n[2]) : Number.NaN;
|
|
1591
1591
|
return Number.isInteger(r) && Number.isInteger(a) && r >= 0 && r <= 23 && a >= 0 && a <= 59;
|
|
@@ -1603,7 +1603,7 @@ function Ht(e) {
|
|
|
1603
1603
|
r.getMinutes()
|
|
1604
1604
|
).padStart(2, "0")}`;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function ko(e, n) {
|
|
1607
1607
|
const r = Tt.exec(e), a = r?.[1] ? Number(r[1]) : Number.NaN, s = r?.[2] ? Number(r[2]) : Number.NaN;
|
|
1608
1608
|
if (!Et(e)) return e;
|
|
1609
1609
|
const o = /* @__PURE__ */ new Date();
|
|
@@ -1612,11 +1612,11 @@ function Co(e, n) {
|
|
|
1612
1612
|
minute: "2-digit"
|
|
1613
1613
|
}).format(o);
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function wo(e) {
|
|
1616
1616
|
const n = -e.getTimezoneOffset(), r = n >= 0 ? "+" : "-", a = Math.abs(n), s = String(Math.floor(a / 60)).padStart(2, "0"), o = String(a % 60).padStart(2, "0");
|
|
1617
1617
|
return `${r}${s}:${o}`;
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function So(e, n) {
|
|
1620
1620
|
if (!e) return null;
|
|
1621
1621
|
if (Et(n)) {
|
|
1622
1622
|
const r = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e), a = Tt.exec(n);
|
|
@@ -1630,7 +1630,7 @@ function wo(e, n) {
|
|
|
1630
1630
|
0,
|
|
1631
1631
|
0
|
|
1632
1632
|
);
|
|
1633
|
-
return `${e}T${n}:00${
|
|
1633
|
+
return `${e}T${n}:00${wo(s)}`;
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
1636
|
return e;
|
|
@@ -1655,7 +1655,7 @@ function We({
|
|
|
1655
1655
|
}
|
|
1656
1656
|
);
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function Mo({
|
|
1659
1659
|
onSubmit: e,
|
|
1660
1660
|
isSubmitting: n = !1,
|
|
1661
1661
|
submitLabel: r,
|
|
@@ -1752,16 +1752,16 @@ function So({
|
|
|
1752
1752
|
};
|
|
1753
1753
|
}, [M, u]), oe = i.useMemo(() => {
|
|
1754
1754
|
if (!S) return u("task_select_date");
|
|
1755
|
-
const w =
|
|
1756
|
-
return w === 0 ? u("quick_today") : w === 1 ? u("quick_tomorrow") : w != null && w >= 2 && w <=
|
|
1755
|
+
const w = jo(I, x);
|
|
1756
|
+
return w === 0 ? u("quick_today") : w === 1 ? u("quick_tomorrow") : w != null && w >= 2 && w <= Co ? u("task_due_in_days", { count: w }) : dt(I, M);
|
|
1757
1757
|
}, [I, S, x, M, u]), Me = i.useMemo(
|
|
1758
|
-
() => $ ?
|
|
1758
|
+
() => $ ? ko(p, M) : "",
|
|
1759
1759
|
[p, $, M]
|
|
1760
1760
|
), je = $ ? `${oe}, ${Me}` : oe, se = () => {
|
|
1761
1761
|
const w = g.trim();
|
|
1762
1762
|
!w || n || e({
|
|
1763
1763
|
body: w,
|
|
1764
|
-
due_at: v ?
|
|
1764
|
+
due_at: v ? So(I, p) : o ?? null
|
|
1765
1765
|
});
|
|
1766
1766
|
}, Ne = g.trim().length > 0 && !n, E = (w) => {
|
|
1767
1767
|
C(!0), y(w), h((U) => U || ht);
|
|
@@ -1839,7 +1839,7 @@ function So({
|
|
|
1839
1839
|
/* @__PURE__ */ t.jsx(
|
|
1840
1840
|
We,
|
|
1841
1841
|
{
|
|
1842
|
-
icon:
|
|
1842
|
+
icon: Ha,
|
|
1843
1843
|
label: u("quick_today"),
|
|
1844
1844
|
onSelect: () => E(Te(0, x))
|
|
1845
1845
|
}
|
|
@@ -1847,7 +1847,7 @@ function So({
|
|
|
1847
1847
|
/* @__PURE__ */ t.jsx(
|
|
1848
1848
|
We,
|
|
1849
1849
|
{
|
|
1850
|
-
icon:
|
|
1850
|
+
icon: Ya,
|
|
1851
1851
|
label: u("quick_tomorrow"),
|
|
1852
1852
|
rightLabel: T.tomorrowLabel,
|
|
1853
1853
|
onSelect: () => E(T.tomorrow)
|
|
@@ -1856,7 +1856,7 @@ function So({
|
|
|
1856
1856
|
/* @__PURE__ */ t.jsx(
|
|
1857
1857
|
We,
|
|
1858
1858
|
{
|
|
1859
|
-
icon:
|
|
1859
|
+
icon: ka,
|
|
1860
1860
|
label: u("task_next_week"),
|
|
1861
1861
|
rightLabel: T.nextWeekLabel,
|
|
1862
1862
|
onSelect: () => E(T.nextWeek)
|
|
@@ -1865,7 +1865,7 @@ function So({
|
|
|
1865
1865
|
/* @__PURE__ */ t.jsx(
|
|
1866
1866
|
We,
|
|
1867
1867
|
{
|
|
1868
|
-
icon:
|
|
1868
|
+
icon: La,
|
|
1869
1869
|
label: u("task_no_date"),
|
|
1870
1870
|
onSelect: K
|
|
1871
1871
|
}
|
|
@@ -1875,7 +1875,7 @@ function So({
|
|
|
1875
1875
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1876
1876
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground px-1 text-xs font-semibold", children: u("task_custom_calendar") }),
|
|
1877
1877
|
/* @__PURE__ */ t.jsx(
|
|
1878
|
-
|
|
1878
|
+
fr,
|
|
1879
1879
|
{
|
|
1880
1880
|
mode: "single",
|
|
1881
1881
|
formatters: X,
|
|
@@ -1957,7 +1957,7 @@ function Pe(e) {
|
|
|
1957
1957
|
queryKey: ["portal-contacts"]
|
|
1958
1958
|
});
|
|
1959
1959
|
}
|
|
1960
|
-
function
|
|
1960
|
+
function To({
|
|
1961
1961
|
onNavigateToList: e,
|
|
1962
1962
|
onSubmit: n,
|
|
1963
1963
|
isPending: r,
|
|
@@ -1965,7 +1965,7 @@ function Mo({
|
|
|
1965
1965
|
}) {
|
|
1966
1966
|
const { t: s } = z();
|
|
1967
1967
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1968
|
-
/* @__PURE__ */ t.jsxs(
|
|
1968
|
+
/* @__PURE__ */ t.jsxs(gr, { children: [
|
|
1969
1969
|
/* @__PURE__ */ t.jsx(
|
|
1970
1970
|
q,
|
|
1971
1971
|
{
|
|
@@ -1977,9 +1977,9 @@ function Mo({
|
|
|
1977
1977
|
),
|
|
1978
1978
|
/* @__PURE__ */ t.jsx(q, { onClick: n, disabled: r, children: s(r ? "adding" : "add_contact") })
|
|
1979
1979
|
] }),
|
|
1980
|
-
/* @__PURE__ */ t.jsx(
|
|
1980
|
+
/* @__PURE__ */ t.jsx(hr, { children: /* @__PURE__ */ t.jsx(qr, { children: /* @__PURE__ */ t.jsxs($r, { className: "text-lg", children: [
|
|
1981
1981
|
/* @__PURE__ */ t.jsx(Ot, { children: /* @__PURE__ */ t.jsx(
|
|
1982
|
-
|
|
1982
|
+
Kr,
|
|
1983
1983
|
{
|
|
1984
1984
|
href: "#",
|
|
1985
1985
|
onClick: (o) => {
|
|
@@ -1988,8 +1988,8 @@ function Mo({
|
|
|
1988
1988
|
children: s("breadcrumb")
|
|
1989
1989
|
}
|
|
1990
1990
|
) }),
|
|
1991
|
-
/* @__PURE__ */ t.jsx(
|
|
1992
|
-
/* @__PURE__ */ t.jsx(Ot, { children: /* @__PURE__ */ t.jsx(
|
|
1991
|
+
/* @__PURE__ */ t.jsx(Br, {}),
|
|
1992
|
+
/* @__PURE__ */ t.jsx(Ot, { children: /* @__PURE__ */ t.jsx(Ur, { className: "font-semibold", children: s("breadcrumb_new") }) })
|
|
1993
1993
|
] }) }) }),
|
|
1994
1994
|
a
|
|
1995
1995
|
] });
|
|
@@ -2013,7 +2013,7 @@ function Wn(e) {
|
|
|
2013
2013
|
const n = e.trim().split(/\s+/), r = n[0]?.[0] ?? "", a = n.length > 1 ? n[n.length - 1]?.[0] ?? "" : "";
|
|
2014
2014
|
return (r + a).toUpperCase() || "?";
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2016
|
+
function Eo(e, n) {
|
|
2017
2017
|
const r = typeof e.updated_at == "string" ? e.updated_at : null;
|
|
2018
2018
|
if (!r) return null;
|
|
2019
2019
|
const a = new Date(r);
|
|
@@ -2034,7 +2034,7 @@ function To(e, n) {
|
|
|
2034
2034
|
const c = Math.floor(l / 365);
|
|
2035
2035
|
return c === 1 ? n?.("relative_years_ago_one") ?? "1 year ago" : n?.("relative_years_ago_other", { count: String(c) }) ?? `${c} years ago`;
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function Do({
|
|
2038
2038
|
contact: e,
|
|
2039
2039
|
isSelected: n,
|
|
2040
2040
|
highlight: r,
|
|
@@ -2238,22 +2238,22 @@ function Eo({
|
|
|
2238
2238
|
)
|
|
2239
2239
|
] });
|
|
2240
2240
|
}
|
|
2241
|
-
function
|
|
2241
|
+
function Ao({
|
|
2242
2242
|
...e
|
|
2243
2243
|
}) {
|
|
2244
|
-
return /* @__PURE__ */ t.jsx(
|
|
2244
|
+
return /* @__PURE__ */ t.jsx(hs, { "data-slot": "context-menu", ...e });
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function Po({
|
|
2247
2247
|
...e
|
|
2248
2248
|
}) {
|
|
2249
|
-
return /* @__PURE__ */ t.jsx(
|
|
2249
|
+
return /* @__PURE__ */ t.jsx(_s, { "data-slot": "context-menu-trigger", ...e });
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function zo({
|
|
2252
2252
|
className: e,
|
|
2253
2253
|
...n
|
|
2254
2254
|
}) {
|
|
2255
2255
|
return /* @__PURE__ */ t.jsx(In, { children: /* @__PURE__ */ t.jsx(
|
|
2256
|
-
|
|
2256
|
+
xs,
|
|
2257
2257
|
{
|
|
2258
2258
|
"data-slot": "context-menu-content",
|
|
2259
2259
|
className: D(
|
|
@@ -2271,7 +2271,7 @@ function _t({
|
|
|
2271
2271
|
...a
|
|
2272
2272
|
}) {
|
|
2273
2273
|
return /* @__PURE__ */ t.jsx(
|
|
2274
|
-
|
|
2274
|
+
bs,
|
|
2275
2275
|
{
|
|
2276
2276
|
"data-slot": "context-menu-item",
|
|
2277
2277
|
"data-inset": n,
|
|
@@ -2284,12 +2284,12 @@ function _t({
|
|
|
2284
2284
|
}
|
|
2285
2285
|
);
|
|
2286
2286
|
}
|
|
2287
|
-
function
|
|
2287
|
+
function Fo({
|
|
2288
2288
|
className: e,
|
|
2289
2289
|
...n
|
|
2290
2290
|
}) {
|
|
2291
2291
|
return /* @__PURE__ */ t.jsx(
|
|
2292
|
-
|
|
2292
|
+
ys,
|
|
2293
2293
|
{
|
|
2294
2294
|
"data-slot": "context-menu-separator",
|
|
2295
2295
|
className: D("bg-border -mx-1 my-1 h-px", e),
|
|
@@ -2297,19 +2297,19 @@ function zo({
|
|
|
2297
2297
|
}
|
|
2298
2298
|
);
|
|
2299
2299
|
}
|
|
2300
|
-
function
|
|
2300
|
+
function Ro({
|
|
2301
2301
|
...e
|
|
2302
2302
|
}) {
|
|
2303
|
-
return /* @__PURE__ */ t.jsx(
|
|
2303
|
+
return /* @__PURE__ */ t.jsx(vs, { "data-slot": "context-menu-sub", ...e });
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2305
|
+
function Io({
|
|
2306
2306
|
className: e,
|
|
2307
2307
|
inset: n,
|
|
2308
2308
|
children: r,
|
|
2309
2309
|
...a
|
|
2310
2310
|
}) {
|
|
2311
2311
|
return /* @__PURE__ */ t.jsxs(
|
|
2312
|
-
|
|
2312
|
+
js,
|
|
2313
2313
|
{
|
|
2314
2314
|
"data-slot": "context-menu-sub-trigger",
|
|
2315
2315
|
"data-inset": n,
|
|
@@ -2325,12 +2325,12 @@ function Ro({
|
|
|
2325
2325
|
}
|
|
2326
2326
|
);
|
|
2327
2327
|
}
|
|
2328
|
-
function
|
|
2328
|
+
function Oo({
|
|
2329
2329
|
className: e,
|
|
2330
2330
|
...n
|
|
2331
2331
|
}) {
|
|
2332
2332
|
return /* @__PURE__ */ t.jsx(In, { children: /* @__PURE__ */ t.jsx(
|
|
2333
|
-
|
|
2333
|
+
Ns,
|
|
2334
2334
|
{
|
|
2335
2335
|
"data-slot": "context-menu-sub-content",
|
|
2336
2336
|
className: D(
|
|
@@ -2349,8 +2349,8 @@ function Xn() {
|
|
|
2349
2349
|
return r.addEventListener("change", a), a(), () => r.removeEventListener("change", a);
|
|
2350
2350
|
}, []), e;
|
|
2351
2351
|
}
|
|
2352
|
-
const
|
|
2353
|
-
function
|
|
2352
|
+
const Lo = 200;
|
|
2353
|
+
function qo() {
|
|
2354
2354
|
const { t: e } = z();
|
|
2355
2355
|
return i.useMemo(
|
|
2356
2356
|
() => [
|
|
@@ -2369,10 +2369,10 @@ function Lo() {
|
|
|
2369
2369
|
[e]
|
|
2370
2370
|
);
|
|
2371
2371
|
}
|
|
2372
|
-
function
|
|
2372
|
+
function $o(e) {
|
|
2373
2373
|
return e.kind === "all" ? "all" : e.kind === "status" ? `status:${e.status}` : `group:${e.tag}`;
|
|
2374
2374
|
}
|
|
2375
|
-
function
|
|
2375
|
+
function Ko({
|
|
2376
2376
|
selectedContactId: e,
|
|
2377
2377
|
highlightContactId: n,
|
|
2378
2378
|
onSelect: r,
|
|
@@ -2382,7 +2382,7 @@ function $o({
|
|
|
2382
2382
|
highlightGroupName: l,
|
|
2383
2383
|
onDeleteContact: c
|
|
2384
2384
|
}) {
|
|
2385
|
-
const { t: d } = z(), u =
|
|
2385
|
+
const { t: d } = z(), u = qo(), [m, g] = i.useState(""), [f, _] = i.useState(""), [y, p] = i.useState(
|
|
2386
2386
|
null
|
|
2387
2387
|
), h = i.useCallback(
|
|
2388
2388
|
(N, J) => p(J ? N : null),
|
|
@@ -2394,7 +2394,7 @@ function $o({
|
|
|
2394
2394
|
i.useEffect(() => {
|
|
2395
2395
|
const N = window.setTimeout(() => {
|
|
2396
2396
|
_(m.trim());
|
|
2397
|
-
},
|
|
2397
|
+
}, Lo);
|
|
2398
2398
|
return () => window.clearTimeout(N);
|
|
2399
2399
|
}, [m]);
|
|
2400
2400
|
const { data: A = [] } = Dt(), M = i.useMemo(
|
|
@@ -2413,7 +2413,7 @@ function $o({
|
|
|
2413
2413
|
hasNextPage: be,
|
|
2414
2414
|
fetchNextPage: oe,
|
|
2415
2415
|
isError: Me
|
|
2416
|
-
} =
|
|
2416
|
+
} = No(M), je = i.useMemo(
|
|
2417
2417
|
() => B?.pages.flatMap((N) => N.contacts ?? []) ?? [],
|
|
2418
2418
|
[B]
|
|
2419
2419
|
), se = i.useMemo(() => C.kind === "status" ? je.filter((N) => N.status === C.status) : je, [je, C]), Ne = i.useRef(null), E = i.useRef(!1);
|
|
@@ -2438,7 +2438,7 @@ function $o({
|
|
|
2438
2438
|
});
|
|
2439
2439
|
return J.observe(N), () => J.disconnect();
|
|
2440
2440
|
}, [be, X, oe]);
|
|
2441
|
-
const K =
|
|
2441
|
+
const K = $o(C), Z = i.useCallback(
|
|
2442
2442
|
(N, J) => {
|
|
2443
2443
|
x(String(J.id)), L && (N.preventDefault(), R(!0));
|
|
2444
2444
|
},
|
|
@@ -2473,7 +2473,7 @@ function $o({
|
|
|
2473
2473
|
});
|
|
2474
2474
|
Promise.allSettled(Ft).then((ye) => {
|
|
2475
2475
|
Pe(b);
|
|
2476
|
-
const Re = ye.filter((
|
|
2476
|
+
const Re = ye.filter((cr) => cr.status === "rejected").length, mt = G.length - Re;
|
|
2477
2477
|
Re === 0 ? O({
|
|
2478
2478
|
title: mt === 1 ? d("contacts_added_to_group_one", {
|
|
2479
2479
|
count: mt,
|
|
@@ -2519,7 +2519,7 @@ function $o({
|
|
|
2519
2519
|
] })
|
|
2520
2520
|
] }) }),
|
|
2521
2521
|
/* @__PURE__ */ t.jsx(
|
|
2522
|
-
|
|
2522
|
+
Bo,
|
|
2523
2523
|
{
|
|
2524
2524
|
activeId: K,
|
|
2525
2525
|
builtInFilters: u,
|
|
@@ -2531,7 +2531,7 @@ function $o({
|
|
|
2531
2531
|
}
|
|
2532
2532
|
),
|
|
2533
2533
|
/* @__PURE__ */ t.jsxs("div", { className: "flex-1 overflow-y-auto px-3 pb-8", children: [
|
|
2534
|
-
Me ? /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground px-4 py-8 text-center text-sm", children: d("error_loading_list") }) : T ? /* @__PURE__ */ t.jsx(
|
|
2534
|
+
Me ? /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground px-4 py-8 text-center text-sm", children: d("error_loading_list") }) : T ? /* @__PURE__ */ t.jsx(Uo, {}) : se.length === 0 ? (
|
|
2535
2535
|
// Status filters apply client-side, so an empty visible list with
|
|
2536
2536
|
// more pages still pending means matching contacts may be on later
|
|
2537
2537
|
// pages. Keep the sentinel mounted so the IntersectionObserver can
|
|
@@ -2541,7 +2541,7 @@ function $o({
|
|
|
2541
2541
|
be && /* @__PURE__ */ t.jsx("div", { ref: Ne, "aria-hidden": "true", className: "h-4" })
|
|
2542
2542
|
] })
|
|
2543
2543
|
) : /* @__PURE__ */ t.jsxs(
|
|
2544
|
-
|
|
2544
|
+
Ao,
|
|
2545
2545
|
{
|
|
2546
2546
|
onOpenChange: (N) => {
|
|
2547
2547
|
if (N) {
|
|
@@ -2555,9 +2555,9 @@ function $o({
|
|
|
2555
2555
|
x(null);
|
|
2556
2556
|
},
|
|
2557
2557
|
children: [
|
|
2558
|
-
/* @__PURE__ */ t.jsx(
|
|
2558
|
+
/* @__PURE__ */ t.jsx(Po, { asChild: !0, children: /* @__PURE__ */ t.jsxs("div", { className: "space-y-1", children: [
|
|
2559
2559
|
se.map((N) => /* @__PURE__ */ t.jsx(
|
|
2560
|
-
|
|
2560
|
+
Do,
|
|
2561
2561
|
{
|
|
2562
2562
|
contact: N,
|
|
2563
2563
|
isSelected: String(N.id) === e,
|
|
@@ -2575,13 +2575,13 @@ function $o({
|
|
|
2575
2575
|
/* @__PURE__ */ t.jsx("div", { ref: Ne, "aria-hidden": "true", className: "h-4" }),
|
|
2576
2576
|
X && /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground py-3 text-center text-xs", children: d("loading_more") })
|
|
2577
2577
|
] }) }),
|
|
2578
|
-
!L && /* @__PURE__ */ t.jsxs(
|
|
2579
|
-
/* @__PURE__ */ t.jsxs(
|
|
2580
|
-
/* @__PURE__ */ t.jsxs(
|
|
2578
|
+
!L && /* @__PURE__ */ t.jsxs(zo, { className: "min-w-48", children: [
|
|
2579
|
+
/* @__PURE__ */ t.jsxs(Ro, { children: [
|
|
2580
|
+
/* @__PURE__ */ t.jsxs(Io, { children: [
|
|
2581
2581
|
/* @__PURE__ */ t.jsx(ke, { className: "size-4", "aria-hidden": "true" }),
|
|
2582
2582
|
d("groups_add_to_group")
|
|
2583
2583
|
] }),
|
|
2584
|
-
/* @__PURE__ */ t.jsx(
|
|
2584
|
+
/* @__PURE__ */ t.jsx(Oo, { children: A.length === 0 ? /* @__PURE__ */ t.jsx(_t, { disabled: !0, children: d("groups_no_groups_yet") }) : A.map((N) => /* @__PURE__ */ t.jsxs(
|
|
2585
2585
|
_t,
|
|
2586
2586
|
{
|
|
2587
2587
|
onSelect: () => te(N.name),
|
|
@@ -2604,7 +2604,7 @@ function $o({
|
|
|
2604
2604
|
)) })
|
|
2605
2605
|
] }),
|
|
2606
2606
|
c && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2607
|
-
/* @__PURE__ */ t.jsx(
|
|
2607
|
+
/* @__PURE__ */ t.jsx(Fo, {}),
|
|
2608
2608
|
/* @__PURE__ */ t.jsxs(
|
|
2609
2609
|
_t,
|
|
2610
2610
|
{
|
|
@@ -2686,7 +2686,7 @@ function $o({
|
|
|
2686
2686
|
] })
|
|
2687
2687
|
] });
|
|
2688
2688
|
}
|
|
2689
|
-
function
|
|
2689
|
+
function Bo({
|
|
2690
2690
|
activeId: e,
|
|
2691
2691
|
builtInFilters: n,
|
|
2692
2692
|
groups: r,
|
|
@@ -2774,7 +2774,7 @@ function Ko({
|
|
|
2774
2774
|
) }),
|
|
2775
2775
|
/* @__PURE__ */ t.jsxs(st, { align: "end", children: [
|
|
2776
2776
|
s && /* @__PURE__ */ t.jsxs($e, { onClick: s, children: [
|
|
2777
|
-
/* @__PURE__ */ t.jsx(
|
|
2777
|
+
/* @__PURE__ */ t.jsx(pa, { className: "size-4", "aria-hidden": "true" }),
|
|
2778
2778
|
c("groups_manage_title")
|
|
2779
2779
|
] }),
|
|
2780
2780
|
o && /* @__PURE__ */ t.jsxs($e, { onClick: o, children: [
|
|
@@ -2786,7 +2786,7 @@ function Ko({
|
|
|
2786
2786
|
] })
|
|
2787
2787
|
] });
|
|
2788
2788
|
}
|
|
2789
|
-
function
|
|
2789
|
+
function Uo() {
|
|
2790
2790
|
return /* @__PURE__ */ t.jsx("div", { className: "space-y-1.5 px-1", children: [0, 1, 2, 3, 4].map((e) => /* @__PURE__ */ t.jsxs(
|
|
2791
2791
|
"div",
|
|
2792
2792
|
{
|
|
@@ -2803,7 +2803,7 @@ function Bo() {
|
|
|
2803
2803
|
e
|
|
2804
2804
|
)) });
|
|
2805
2805
|
}
|
|
2806
|
-
const
|
|
2806
|
+
const Go = {
|
|
2807
2807
|
label_first_name: "First Name",
|
|
2808
2808
|
label_last_name: "Last Name",
|
|
2809
2809
|
label_email: "Email",
|
|
@@ -2830,14 +2830,14 @@ const Uo = {
|
|
|
2830
2830
|
status_cold: "Cold",
|
|
2831
2831
|
status_lead: "Lead",
|
|
2832
2832
|
status_customer: "Customer"
|
|
2833
|
-
},
|
|
2833
|
+
}, Ho = [], Qo = [
|
|
2834
2834
|
"new",
|
|
2835
2835
|
"active",
|
|
2836
2836
|
"inactive",
|
|
2837
2837
|
"cold",
|
|
2838
2838
|
"lead",
|
|
2839
2839
|
"customer"
|
|
2840
|
-
],
|
|
2840
|
+
], Yo = {
|
|
2841
2841
|
new: "status_new",
|
|
2842
2842
|
active: "status_active",
|
|
2843
2843
|
inactive: "status_inactive",
|
|
@@ -2846,26 +2846,26 @@ const Uo = {
|
|
|
2846
2846
|
customer: "status_customer"
|
|
2847
2847
|
}, vt = ({
|
|
2848
2848
|
className: e,
|
|
2849
|
-
countries: n =
|
|
2849
|
+
countries: n = Ho,
|
|
2850
2850
|
renderAvatarPicker: r
|
|
2851
2851
|
}) => {
|
|
2852
|
-
const { control: a, watch: s, setValue: o } =
|
|
2852
|
+
const { control: a, watch: s, setValue: o } = _r(), l = Ye(), c = i.useCallback(
|
|
2853
2853
|
(p, h) => {
|
|
2854
2854
|
if (l)
|
|
2855
2855
|
return l.t(
|
|
2856
2856
|
p,
|
|
2857
2857
|
h
|
|
2858
2858
|
);
|
|
2859
|
-
let v =
|
|
2859
|
+
let v = Go[p] ?? p;
|
|
2860
2860
|
if (h)
|
|
2861
2861
|
for (const [C, k] of Object.entries(h))
|
|
2862
2862
|
v = v.replaceAll(`{{${C}}}`, k);
|
|
2863
2863
|
return v;
|
|
2864
2864
|
},
|
|
2865
2865
|
[l]
|
|
2866
|
-
), d =
|
|
2867
|
-
() =>
|
|
2868
|
-
name: c(
|
|
2866
|
+
), d = xr({ control: a, name: "status" }), u = s("avatar_url") ?? null, m = i.useMemo(
|
|
2867
|
+
() => Qo.map((p) => ({
|
|
2868
|
+
name: c(Yo[p]),
|
|
2869
2869
|
value: p
|
|
2870
2870
|
})),
|
|
2871
2871
|
[c]
|
|
@@ -2980,15 +2980,15 @@ const Uo = {
|
|
|
2980
2980
|
name: "status",
|
|
2981
2981
|
render: ({ field: p }) => /* @__PURE__ */ t.jsxs(me, { children: [
|
|
2982
2982
|
/* @__PURE__ */ t.jsx(pe, { className: "font-inter text-foreground font-medium", children: c("label_status") }),
|
|
2983
|
-
/* @__PURE__ */ t.jsxs(
|
|
2984
|
-
/* @__PURE__ */ t.jsx(fe, { children: /* @__PURE__ */ t.jsx(
|
|
2983
|
+
/* @__PURE__ */ t.jsxs(la, { value: p.value ?? "", onValueChange: p.onChange, children: [
|
|
2984
|
+
/* @__PURE__ */ t.jsx(fe, { children: /* @__PURE__ */ t.jsx(ca, { className: "w-full", children: /* @__PURE__ */ t.jsx(da, { placeholder: c("placeholder_status") }) }) }),
|
|
2985
2985
|
/* @__PURE__ */ t.jsx(
|
|
2986
|
-
|
|
2986
|
+
ua,
|
|
2987
2987
|
{
|
|
2988
2988
|
position: "popper",
|
|
2989
2989
|
sideOffset: 4,
|
|
2990
2990
|
className: "z-[1060]",
|
|
2991
|
-
children: g.map((h) => /* @__PURE__ */ t.jsx(
|
|
2991
|
+
children: g.map((h) => /* @__PURE__ */ t.jsx(ma, { value: h.value, children: h.name }, h.value))
|
|
2992
2992
|
}
|
|
2993
2993
|
)
|
|
2994
2994
|
] }),
|
|
@@ -3084,7 +3084,7 @@ const Uo = {
|
|
|
3084
3084
|
render: ({ field: p }) => /* @__PURE__ */ t.jsxs(me, { children: [
|
|
3085
3085
|
/* @__PURE__ */ t.jsx(pe, { className: "font-inter text-foreground font-medium", children: c("label_country") }),
|
|
3086
3086
|
/* @__PURE__ */ t.jsx(fe, { children: /* @__PURE__ */ t.jsx(
|
|
3087
|
-
|
|
3087
|
+
wa,
|
|
3088
3088
|
{
|
|
3089
3089
|
options: n.map((h) => ({
|
|
3090
3090
|
label: h.name,
|
|
@@ -3103,7 +3103,7 @@ const Uo = {
|
|
|
3103
3103
|
] })
|
|
3104
3104
|
] });
|
|
3105
3105
|
};
|
|
3106
|
-
function
|
|
3106
|
+
function Vo(e, n = "contacts") {
|
|
3107
3107
|
const r = xe();
|
|
3108
3108
|
return ve({
|
|
3109
3109
|
queryKey: de.detail(n, e),
|
|
@@ -3111,7 +3111,7 @@ function Yo(e, n = "contacts") {
|
|
|
3111
3111
|
enabled: !!e
|
|
3112
3112
|
});
|
|
3113
3113
|
}
|
|
3114
|
-
function
|
|
3114
|
+
function Wo(e = "contacts", n) {
|
|
3115
3115
|
const r = W(), a = xe();
|
|
3116
3116
|
return re({
|
|
3117
3117
|
mutationFn: ({ id: s, data: o }) => a.updateContact(s, o),
|
|
@@ -3125,9 +3125,9 @@ function Vo(e = "contacts", n) {
|
|
|
3125
3125
|
}
|
|
3126
3126
|
});
|
|
3127
3127
|
}
|
|
3128
|
-
function
|
|
3128
|
+
function Xo(e, n = "contacts", r) {
|
|
3129
3129
|
const a = Ye();
|
|
3130
|
-
return
|
|
3130
|
+
return Wo(n, {
|
|
3131
3131
|
onSuccess: () => {
|
|
3132
3132
|
O({
|
|
3133
3133
|
title: a?.t("contact_updated") ?? "Contact updated successfully",
|
|
@@ -3143,7 +3143,7 @@ function Wo(e, n = "contacts", r) {
|
|
|
3143
3143
|
}
|
|
3144
3144
|
});
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3146
|
+
function Zo(e = "contacts", n) {
|
|
3147
3147
|
const r = W(), a = xe();
|
|
3148
3148
|
return re({
|
|
3149
3149
|
mutationFn: (s) => a.deleteContact(s),
|
|
@@ -3157,9 +3157,9 @@ function Xo(e = "contacts", n) {
|
|
|
3157
3157
|
}
|
|
3158
3158
|
});
|
|
3159
3159
|
}
|
|
3160
|
-
function
|
|
3160
|
+
function Jo(e = "contacts", n) {
|
|
3161
3161
|
const r = Ye();
|
|
3162
|
-
return
|
|
3162
|
+
return Zo(e, {
|
|
3163
3163
|
onSuccess: () => {
|
|
3164
3164
|
O({
|
|
3165
3165
|
title: r?.t("contact_deleted") ?? "Contact deleted successfully",
|
|
@@ -3176,7 +3176,7 @@ function Zo(e = "contacts", n) {
|
|
|
3176
3176
|
});
|
|
3177
3177
|
}
|
|
3178
3178
|
function Zn(e) {
|
|
3179
|
-
return
|
|
3179
|
+
return Pr({
|
|
3180
3180
|
first_name: ie().min(1, {
|
|
3181
3181
|
message: e?.first_name_required ?? "First name is required"
|
|
3182
3182
|
}),
|
|
@@ -3184,7 +3184,7 @@ function Zn(e) {
|
|
|
3184
3184
|
message: e?.last_name_required ?? "Last name is required"
|
|
3185
3185
|
}),
|
|
3186
3186
|
status: ie().nullable().optional(),
|
|
3187
|
-
email: ie().email().or(
|
|
3187
|
+
email: ie().email().or(zr("")).nullable().optional(),
|
|
3188
3188
|
phone: ie().nullable().optional(),
|
|
3189
3189
|
address: ie().nullable().optional(),
|
|
3190
3190
|
city: ie().nullable().optional(),
|
|
@@ -3197,15 +3197,23 @@ function Zn(e) {
|
|
|
3197
3197
|
});
|
|
3198
3198
|
}
|
|
3199
3199
|
const Pt = Zn();
|
|
3200
|
-
function
|
|
3200
|
+
function ei(e) {
|
|
3201
3201
|
return Zn(e).passthrough();
|
|
3202
3202
|
}
|
|
3203
3203
|
Pt.passthrough();
|
|
3204
|
-
const
|
|
3204
|
+
const ti = Object.keys(
|
|
3205
3205
|
Pt.shape
|
|
3206
3206
|
);
|
|
3207
|
-
function
|
|
3208
|
-
|
|
3207
|
+
function Jn(e, n) {
|
|
3208
|
+
if (Object.is(e, n)) return !0;
|
|
3209
|
+
if (typeof e != "object" || e === null || typeof n != "object" || n === null) return !1;
|
|
3210
|
+
const r = Object.entries(e), a = Object.entries(n);
|
|
3211
|
+
return r.length === a.length && r.every(
|
|
3212
|
+
([s, o]) => Object.hasOwn(n, s) && Jn(o, n[s])
|
|
3213
|
+
);
|
|
3214
|
+
}
|
|
3215
|
+
function ni(e, n) {
|
|
3216
|
+
const r = Ye(), a = n?.queryKeyPrefix ?? "contacts", { data: s, isLoading: o } = Vo(e, a), { data: l } = ve({
|
|
3209
3217
|
queryKey: n?.countriesQueryKey ?? ["countries"],
|
|
3210
3218
|
queryFn: n?.getCountries ?? (() => Promise.resolve([])),
|
|
3211
3219
|
enabled: !!n?.getCountries
|
|
@@ -3224,7 +3232,7 @@ function ti(e, n) {
|
|
|
3224
3232
|
country_code: d.country?.iso ?? d.country_id?.toString() ?? null
|
|
3225
3233
|
};
|
|
3226
3234
|
}, [d]), m = i.useMemo(
|
|
3227
|
-
() =>
|
|
3235
|
+
() => ei(
|
|
3228
3236
|
r ? {
|
|
3229
3237
|
first_name_required: r.t("validation_first_name_required"),
|
|
3230
3238
|
last_name_required: r.t("validation_last_name_required")
|
|
@@ -3234,11 +3242,11 @@ function ti(e, n) {
|
|
|
3234
3242
|
), g = pn(m, {
|
|
3235
3243
|
values: u,
|
|
3236
3244
|
mode: "onBlur"
|
|
3237
|
-
}), f =
|
|
3245
|
+
}), f = Xo(e, a, {
|
|
3238
3246
|
onSuccess: () => {
|
|
3239
3247
|
g.reset(g.getValues()), n?.onSaveSuccess?.();
|
|
3240
3248
|
}
|
|
3241
|
-
}), _ =
|
|
3249
|
+
}), _ = Jo(a, {
|
|
3242
3250
|
onSuccess: () => {
|
|
3243
3251
|
n?.onDeleteSuccess?.();
|
|
3244
3252
|
}
|
|
@@ -3246,8 +3254,11 @@ function ti(e, n) {
|
|
|
3246
3254
|
g.handleSubmit(
|
|
3247
3255
|
(h) => {
|
|
3248
3256
|
const v = {};
|
|
3249
|
-
for (const C of
|
|
3250
|
-
C
|
|
3257
|
+
for (const C of ti)
|
|
3258
|
+
C === "affiliate" && Jn(
|
|
3259
|
+
h.affiliate,
|
|
3260
|
+
g.formState.defaultValues?.affiliate
|
|
3261
|
+
) || C in h && (v[C] = h[C]);
|
|
3251
3262
|
f.mutate({
|
|
3252
3263
|
id: e,
|
|
3253
3264
|
data: v
|
|
@@ -3280,7 +3291,7 @@ function ti(e, n) {
|
|
|
3280
3291
|
onDelete: p
|
|
3281
3292
|
};
|
|
3282
3293
|
}
|
|
3283
|
-
function
|
|
3294
|
+
function ri(e) {
|
|
3284
3295
|
const n = Qe();
|
|
3285
3296
|
return ve({
|
|
3286
3297
|
queryKey: Q.tasks(e),
|
|
@@ -3289,7 +3300,7 @@ function ni(e) {
|
|
|
3289
3300
|
select: (r) => r.tasks
|
|
3290
3301
|
});
|
|
3291
3302
|
}
|
|
3292
|
-
function
|
|
3303
|
+
function ai(e) {
|
|
3293
3304
|
const n = it();
|
|
3294
3305
|
return ve({
|
|
3295
3306
|
queryKey: Q.notes(e),
|
|
@@ -3298,7 +3309,7 @@ function ri(e) {
|
|
|
3298
3309
|
select: (r) => r.notes
|
|
3299
3310
|
});
|
|
3300
3311
|
}
|
|
3301
|
-
function
|
|
3312
|
+
function er() {
|
|
3302
3313
|
const e = lt(), n = W(), { t: r } = z();
|
|
3303
3314
|
return re({
|
|
3304
3315
|
mutationFn: (a) => {
|
|
@@ -3317,7 +3328,7 @@ function Jn() {
|
|
|
3317
3328
|
}
|
|
3318
3329
|
});
|
|
3319
3330
|
}
|
|
3320
|
-
function
|
|
3331
|
+
function si(e, n = "sdk-contacts", r) {
|
|
3321
3332
|
const a = xe(), s = W();
|
|
3322
3333
|
return re({
|
|
3323
3334
|
mutationFn: (o) => a.updateContact(e, { tags: o }),
|
|
@@ -3331,7 +3342,7 @@ function ai(e, n = "sdk-contacts", r) {
|
|
|
3331
3342
|
onError: r?.onError
|
|
3332
3343
|
});
|
|
3333
3344
|
}
|
|
3334
|
-
const
|
|
3345
|
+
const oi = {
|
|
3335
3346
|
// Contact statuses
|
|
3336
3347
|
new: "border-[var(--status-new-border)] bg-[var(--status-new)] text-[var(--status-new-foreground)]",
|
|
3337
3348
|
active: "border-[var(--status-active-border)] bg-[var(--status-active)] text-[var(--status-active-foreground)]",
|
|
@@ -3346,11 +3357,11 @@ const si = {
|
|
|
3346
3357
|
neutral: "border-border bg-muted text-muted-foreground",
|
|
3347
3358
|
notice: "border-[var(--badge-notice-border)] bg-[var(--badge-notice)] text-[var(--badge-notice-foreground)]",
|
|
3348
3359
|
accent: "border-[var(--badge-accent-border)] bg-[var(--badge-accent)] text-[var(--badge-accent-foreground)]"
|
|
3349
|
-
},
|
|
3350
|
-
function
|
|
3351
|
-
return
|
|
3360
|
+
}, ii = "border-border bg-muted text-muted-foreground";
|
|
3361
|
+
function li(e) {
|
|
3362
|
+
return oi[e] ?? ii;
|
|
3352
3363
|
}
|
|
3353
|
-
function
|
|
3364
|
+
function ci({
|
|
3354
3365
|
status: e,
|
|
3355
3366
|
label: n,
|
|
3356
3367
|
className: r
|
|
@@ -3360,14 +3371,14 @@ function li({
|
|
|
3360
3371
|
{
|
|
3361
3372
|
className: D(
|
|
3362
3373
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold capitalize",
|
|
3363
|
-
|
|
3374
|
+
li(e),
|
|
3364
3375
|
r
|
|
3365
3376
|
),
|
|
3366
3377
|
children: n ?? e
|
|
3367
3378
|
}
|
|
3368
3379
|
);
|
|
3369
3380
|
}
|
|
3370
|
-
const
|
|
3381
|
+
const di = [
|
|
3371
3382
|
"Customer",
|
|
3372
3383
|
"Cold",
|
|
3373
3384
|
"Hot",
|
|
@@ -3375,7 +3386,7 @@ const ci = [
|
|
|
3375
3386
|
"Leaders",
|
|
3376
3387
|
"Pros"
|
|
3377
3388
|
];
|
|
3378
|
-
function
|
|
3389
|
+
function ui({
|
|
3379
3390
|
contactTags: e,
|
|
3380
3391
|
availableGroups: n,
|
|
3381
3392
|
onSave: r,
|
|
@@ -3414,7 +3425,7 @@ function di({
|
|
|
3414
3425
|
return b;
|
|
3415
3426
|
}, [n]), S = i.useMemo(() => {
|
|
3416
3427
|
const b = n.map((A) => A.name);
|
|
3417
|
-
return Array.from(/* @__PURE__ */ new Set([...b, ...
|
|
3428
|
+
return Array.from(/* @__PURE__ */ new Set([...b, ...di]));
|
|
3418
3429
|
}, [n]), L = i.useMemo(() => {
|
|
3419
3430
|
const b = m.toLowerCase();
|
|
3420
3431
|
return b ? S.filter((A) => A.toLowerCase().includes(b)) : S;
|
|
@@ -3536,7 +3547,7 @@ function di({
|
|
|
3536
3547
|
)
|
|
3537
3548
|
] });
|
|
3538
3549
|
}
|
|
3539
|
-
function
|
|
3550
|
+
function mi({
|
|
3540
3551
|
contact: e,
|
|
3541
3552
|
tasksCount: n,
|
|
3542
3553
|
notesCount: r,
|
|
@@ -3546,7 +3557,7 @@ function ui({
|
|
|
3546
3557
|
onCreateGroup: l,
|
|
3547
3558
|
isTagsSaving: c
|
|
3548
3559
|
}) {
|
|
3549
|
-
const { t: d } = z(), u = At(e, d), m = e.status?.trim(), g =
|
|
3560
|
+
const { t: d } = z(), u = At(e, d), m = e.status?.trim(), g = Eo(e, d);
|
|
3550
3561
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-6 md:flex-row md:items-center md:justify-between md:gap-8", children: [
|
|
3551
3562
|
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-start gap-4 md:flex-row md:items-center md:gap-5", children: [
|
|
3552
3563
|
/* @__PURE__ */ t.jsx("div", { className: "bg-muted relative flex size-20 shrink-0 items-center justify-center overflow-hidden rounded-2xl md:size-24", children: e.avatar_url ? /* @__PURE__ */ t.jsx(
|
|
@@ -3567,9 +3578,9 @@ function ui({
|
|
|
3567
3578
|
/* @__PURE__ */ t.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3568
3579
|
/* @__PURE__ */ t.jsx("h2", { className: "text-foreground text-2xl leading-tight font-bold tracking-tight md:text-3xl", children: u }),
|
|
3569
3580
|
/* @__PURE__ */ t.jsxs("div", { className: "mt-2.5 flex flex-wrap items-center gap-2", children: [
|
|
3570
|
-
m && /* @__PURE__ */ t.jsx(
|
|
3581
|
+
m && /* @__PURE__ */ t.jsx(ci, { status: m }),
|
|
3571
3582
|
/* @__PURE__ */ t.jsx(
|
|
3572
|
-
|
|
3583
|
+
ui,
|
|
3573
3584
|
{
|
|
3574
3585
|
contactTags: a,
|
|
3575
3586
|
availableGroups: s,
|
|
@@ -3583,9 +3594,9 @@ function ui({
|
|
|
3583
3594
|
] })
|
|
3584
3595
|
] }),
|
|
3585
3596
|
/* @__PURE__ */ t.jsxs("div", { className: "flex shrink-0 items-center gap-6 md:gap-8", children: [
|
|
3586
|
-
/* @__PURE__ */ t.jsx(Yt, { label: d("tab_tasks"), value: n, icon:
|
|
3597
|
+
/* @__PURE__ */ t.jsx(Yt, { label: d("tab_tasks"), value: n, icon: Ka }),
|
|
3587
3598
|
/* @__PURE__ */ t.jsx("div", { className: "bg-border h-10 w-px", "aria-hidden": "true" }),
|
|
3588
|
-
/* @__PURE__ */ t.jsx(Yt, { label: d("tab_notes"), value: r, icon:
|
|
3599
|
+
/* @__PURE__ */ t.jsx(Yt, { label: d("tab_notes"), value: r, icon: fa })
|
|
3589
3600
|
] })
|
|
3590
3601
|
] });
|
|
3591
3602
|
}
|
|
@@ -3598,7 +3609,7 @@ function Yt({ label: e, value: n, icon: r }) {
|
|
|
3598
3609
|
/* @__PURE__ */ t.jsx("span", { className: "text-foreground text-2xl font-bold tracking-tight tabular-nums", children: n })
|
|
3599
3610
|
] });
|
|
3600
3611
|
}
|
|
3601
|
-
function
|
|
3612
|
+
function pi(e) {
|
|
3602
3613
|
const n = [
|
|
3603
3614
|
e.address,
|
|
3604
3615
|
e.city,
|
|
@@ -3607,11 +3618,11 @@ function mi(e) {
|
|
|
3607
3618
|
].filter((r) => !!r?.trim());
|
|
3608
3619
|
return n.length === 0 ? null : n.join(", ");
|
|
3609
3620
|
}
|
|
3610
|
-
function
|
|
3621
|
+
function fi({
|
|
3611
3622
|
contact: e,
|
|
3612
3623
|
onEditEmpty: n
|
|
3613
3624
|
}) {
|
|
3614
|
-
const { t: r } = z(), a =
|
|
3625
|
+
const { t: r } = z(), a = pi(e);
|
|
3615
3626
|
return /* @__PURE__ */ t.jsxs("div", { className: "border-border/50 divide-border/50 mt-6 divide-y overflow-hidden rounded-2xl border", children: [
|
|
3616
3627
|
/* @__PURE__ */ t.jsx(
|
|
3617
3628
|
xt,
|
|
@@ -3636,7 +3647,7 @@ function pi({
|
|
|
3636
3647
|
/* @__PURE__ */ t.jsx(
|
|
3637
3648
|
xt,
|
|
3638
3649
|
{
|
|
3639
|
-
icon:
|
|
3650
|
+
icon: Ra,
|
|
3640
3651
|
label: r("label_address"),
|
|
3641
3652
|
value: a,
|
|
3642
3653
|
href: a ? `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(a)}` : void 0,
|
|
@@ -3722,12 +3733,12 @@ function xt({
|
|
|
3722
3733
|
onClick: g,
|
|
3723
3734
|
"aria-label": u ? l("copied_field", { field: n }) : l("copy_field", { field: n }),
|
|
3724
3735
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground mr-3 flex size-8 shrink-0 items-center justify-center rounded-md transition-colors",
|
|
3725
|
-
children: u ? /* @__PURE__ */ t.jsx(fn, { className: "text-primary size-3.5", "aria-hidden": !0 }) : /* @__PURE__ */ t.jsx(
|
|
3736
|
+
children: u ? /* @__PURE__ */ t.jsx(fn, { className: "text-primary size-3.5", "aria-hidden": !0 }) : /* @__PURE__ */ t.jsx(Ia, { className: "size-3.5", "aria-hidden": !0 })
|
|
3726
3737
|
}
|
|
3727
3738
|
)
|
|
3728
3739
|
] });
|
|
3729
3740
|
}
|
|
3730
|
-
function
|
|
3741
|
+
function gi(e) {
|
|
3731
3742
|
const n = W(), r = Qe(), { t: a } = z();
|
|
3732
3743
|
return re({
|
|
3733
3744
|
mutationFn: ({
|
|
@@ -3750,7 +3761,7 @@ function fi(e) {
|
|
|
3750
3761
|
}
|
|
3751
3762
|
});
|
|
3752
3763
|
}
|
|
3753
|
-
function
|
|
3764
|
+
function hi(e, n) {
|
|
3754
3765
|
const r = W(), a = Qe(), { t: s } = z();
|
|
3755
3766
|
return re({
|
|
3756
3767
|
mutationFn: (o) => a.deleteTask(o, e),
|
|
@@ -3768,7 +3779,7 @@ function gi(e, n) {
|
|
|
3768
3779
|
}
|
|
3769
3780
|
});
|
|
3770
3781
|
}
|
|
3771
|
-
function
|
|
3782
|
+
function _i(e, n) {
|
|
3772
3783
|
const r = W(), a = Qe(), { t: s } = z();
|
|
3773
3784
|
return re({
|
|
3774
3785
|
mutationFn: ({
|
|
@@ -3813,7 +3824,7 @@ function Wt(e) {
|
|
|
3813
3824
|
}), n.join(`
|
|
3814
3825
|
`);
|
|
3815
3826
|
}
|
|
3816
|
-
function
|
|
3827
|
+
function xi({
|
|
3817
3828
|
titlePlaceholder: e,
|
|
3818
3829
|
bodyPlaceholder: n,
|
|
3819
3830
|
onChange: r,
|
|
@@ -3830,7 +3841,7 @@ function _i({
|
|
|
3830
3841
|
p.current = _;
|
|
3831
3842
|
}, [_]);
|
|
3832
3843
|
const v = d ? s || o ? `<h1>${s ?? ""}</h1>${o ?? ""}` : void 0 : o || void 0, C = [
|
|
3833
|
-
|
|
3844
|
+
Sa.configure({
|
|
3834
3845
|
heading: d ? !1 : { levels: [] },
|
|
3835
3846
|
bulletList: {
|
|
3836
3847
|
keepMarks: !0,
|
|
@@ -3841,16 +3852,16 @@ function _i({
|
|
|
3841
3852
|
keepAttributes: !1
|
|
3842
3853
|
}
|
|
3843
3854
|
}),
|
|
3844
|
-
...d ? [
|
|
3845
|
-
|
|
3855
|
+
...d ? [Ma.configure({ levels: [1] })] : [],
|
|
3856
|
+
Ta.configure({
|
|
3846
3857
|
placeholder: ({ node: S }) => S.type.name === "heading" ? g : f
|
|
3847
3858
|
}),
|
|
3848
|
-
|
|
3859
|
+
_a.configure({
|
|
3849
3860
|
types: d ? ["heading", "paragraph"] : ["paragraph"],
|
|
3850
3861
|
alignments: ["left", "center", "right", "justify"]
|
|
3851
3862
|
}),
|
|
3852
|
-
|
|
3853
|
-
], j =
|
|
3863
|
+
xa
|
|
3864
|
+
], j = Ea({
|
|
3854
3865
|
extensions: C,
|
|
3855
3866
|
content: v ?? (d ? {
|
|
3856
3867
|
type: "doc",
|
|
@@ -3946,7 +3957,7 @@ function _i({
|
|
|
3946
3957
|
j?.isActive({ textAlign: "left" }) ? R : F
|
|
3947
3958
|
),
|
|
3948
3959
|
title: m("toolbar_align_left"),
|
|
3949
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3960
|
+
children: /* @__PURE__ */ t.jsx(Da, { className: "size-3.5" })
|
|
3950
3961
|
}
|
|
3951
3962
|
),
|
|
3952
3963
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3959,7 +3970,7 @@ function _i({
|
|
|
3959
3970
|
j?.isActive({ textAlign: "center" }) ? R : F
|
|
3960
3971
|
),
|
|
3961
3972
|
title: m("toolbar_align_center"),
|
|
3962
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3973
|
+
children: /* @__PURE__ */ t.jsx(ba, { className: "size-3.5" })
|
|
3963
3974
|
}
|
|
3964
3975
|
),
|
|
3965
3976
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3972,7 +3983,7 @@ function _i({
|
|
|
3972
3983
|
j?.isActive({ textAlign: "right" }) ? R : F
|
|
3973
3984
|
),
|
|
3974
3985
|
title: m("toolbar_align_right"),
|
|
3975
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3986
|
+
children: /* @__PURE__ */ t.jsx(ya, { className: "size-3.5" })
|
|
3976
3987
|
}
|
|
3977
3988
|
),
|
|
3978
3989
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3985,7 +3996,7 @@ function _i({
|
|
|
3985
3996
|
j?.isActive({ textAlign: "justify" }) ? R : F
|
|
3986
3997
|
),
|
|
3987
3998
|
title: m("toolbar_justify"),
|
|
3988
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3999
|
+
children: /* @__PURE__ */ t.jsx(va, { className: "size-3.5" })
|
|
3989
4000
|
}
|
|
3990
4001
|
),
|
|
3991
4002
|
I,
|
|
@@ -3999,7 +4010,7 @@ function _i({
|
|
|
3999
4010
|
j?.isActive("bulletList") ? R : F
|
|
4000
4011
|
),
|
|
4001
4012
|
title: m("toolbar_bullet_list"),
|
|
4002
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4013
|
+
children: /* @__PURE__ */ t.jsx(Aa, { className: "size-3.5" })
|
|
4003
4014
|
}
|
|
4004
4015
|
),
|
|
4005
4016
|
/* @__PURE__ */ t.jsx(
|
|
@@ -4012,7 +4023,7 @@ function _i({
|
|
|
4012
4023
|
j?.isActive("orderedList") ? R : F
|
|
4013
4024
|
),
|
|
4014
4025
|
title: m("toolbar_ordered_list"),
|
|
4015
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4026
|
+
children: /* @__PURE__ */ t.jsx(Pa, { className: "size-3.5" })
|
|
4016
4027
|
}
|
|
4017
4028
|
),
|
|
4018
4029
|
l && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -4061,7 +4072,7 @@ function _i({
|
|
|
4061
4072
|
] })
|
|
4062
4073
|
] }),
|
|
4063
4074
|
/* @__PURE__ */ t.jsx(
|
|
4064
|
-
|
|
4075
|
+
za,
|
|
4065
4076
|
{
|
|
4066
4077
|
editor: j,
|
|
4067
4078
|
className: u ?? "min-h-[60vh] flex-1 overflow-y-auto p-4"
|
|
@@ -4113,7 +4124,7 @@ function _i({
|
|
|
4113
4124
|
}
|
|
4114
4125
|
);
|
|
4115
4126
|
}
|
|
4116
|
-
function
|
|
4127
|
+
function tr({
|
|
4117
4128
|
open: e,
|
|
4118
4129
|
onOpenChange: n,
|
|
4119
4130
|
mode: r,
|
|
@@ -4145,7 +4156,7 @@ function er({
|
|
|
4145
4156
|
}
|
|
4146
4157
|
),
|
|
4147
4158
|
/* @__PURE__ */ t.jsx(
|
|
4148
|
-
|
|
4159
|
+
xi,
|
|
4149
4160
|
{
|
|
4150
4161
|
showTitle: !1,
|
|
4151
4162
|
bodyPlaceholder: _("editor_start_writing"),
|
|
@@ -4219,7 +4230,7 @@ function er({
|
|
|
4219
4230
|
)
|
|
4220
4231
|
] }) })
|
|
4221
4232
|
] }),
|
|
4222
|
-
/* @__PURE__ */ t.jsxs(
|
|
4233
|
+
/* @__PURE__ */ t.jsxs(br, { className: "flex-row justify-end gap-2 border-t pt-4", children: [
|
|
4223
4234
|
r === "edit" && g && /* @__PURE__ */ t.jsx(
|
|
4224
4235
|
q,
|
|
4225
4236
|
{
|
|
@@ -4250,14 +4261,14 @@ function er({
|
|
|
4250
4261
|
function bt(e, n) {
|
|
4251
4262
|
return dt(e, n);
|
|
4252
4263
|
}
|
|
4253
|
-
function
|
|
4264
|
+
function bi(e, n) {
|
|
4254
4265
|
const r = new Date(e), s = (/* @__PURE__ */ new Date()).getTime() - r.getTime(), o = Math.floor(s / (1e3 * 60 * 60 * 24));
|
|
4255
4266
|
return o === 0 ? r.toLocaleTimeString("en-US", {
|
|
4256
4267
|
hour: "numeric",
|
|
4257
4268
|
minute: "2-digit"
|
|
4258
4269
|
}) : o === 1 ? n("task_yesterday") : o === 1 ? n("task_days_ago_one") : n("task_days_ago_other", { count: o });
|
|
4259
4270
|
}
|
|
4260
|
-
function
|
|
4271
|
+
function yi(e, n, r, a) {
|
|
4261
4272
|
if (n)
|
|
4262
4273
|
return {
|
|
4263
4274
|
label: r("task_due", { date: bt(e, a) }),
|
|
@@ -4271,20 +4282,20 @@ function bi(e, n, r, a) {
|
|
|
4271
4282
|
tone: "overdue"
|
|
4272
4283
|
} : c === o.getTime() ? { label: r("quick_today"), tone: "today" } : c === l.getTime() ? { label: r("quick_tomorrow"), tone: "tomorrow" } : { label: bt(e, a), tone: "future" };
|
|
4273
4284
|
}
|
|
4274
|
-
const
|
|
4285
|
+
const vi = {
|
|
4275
4286
|
overdue: "bg-destructive/10 text-destructive",
|
|
4276
4287
|
today: "bg-primary/10 text-primary",
|
|
4277
4288
|
tomorrow: "bg-primary/10 text-primary",
|
|
4278
4289
|
future: "bg-muted text-muted-foreground",
|
|
4279
4290
|
done: "bg-muted text-muted-foreground"
|
|
4280
4291
|
};
|
|
4281
|
-
function
|
|
4292
|
+
function ji({
|
|
4282
4293
|
task: e,
|
|
4283
4294
|
toggleCompletion: n,
|
|
4284
4295
|
onEdit: r,
|
|
4285
4296
|
onDeleteClick: a
|
|
4286
4297
|
}) {
|
|
4287
|
-
const { t: s, locale: o } = z(), { isMobile: l } = he(), [c, d] = i.useState(!1), u = !!e.completed_at, { title: m, body: g } = Qn(e.body ?? ""), f = e.created_at ?
|
|
4298
|
+
const { t: s, locale: o } = z(), { isMobile: l } = he(), [c, d] = i.useState(!1), u = !!e.completed_at, { title: m, body: g } = Qn(e.body ?? ""), f = e.created_at ? bi(e.created_at, s) : "", _ = e.due_at ? yi(e.due_at, u, s, o) : null;
|
|
4288
4299
|
return /* @__PURE__ */ t.jsxs(
|
|
4289
4300
|
"div",
|
|
4290
4301
|
{
|
|
@@ -4310,7 +4321,7 @@ function vi({
|
|
|
4310
4321
|
disabled: n.isPending,
|
|
4311
4322
|
className: "mt-0.5 shrink-0 transition-transform hover:scale-110 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4312
4323
|
"aria-label": s(u ? "mark_as_open" : "mark_as_completed"),
|
|
4313
|
-
children: u ? /* @__PURE__ */ t.jsx(
|
|
4324
|
+
children: u ? /* @__PURE__ */ t.jsx(yr, { className: "text-primary size-5", "aria-hidden": "true" }) : /* @__PURE__ */ t.jsx("div", { className: "border-muted-foreground/40 group-hover:border-primary size-5 rounded-full border-2 transition-colors" })
|
|
4314
4325
|
}
|
|
4315
4326
|
),
|
|
4316
4327
|
/* @__PURE__ */ t.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -4340,7 +4351,7 @@ function vi({
|
|
|
4340
4351
|
{
|
|
4341
4352
|
className: D(
|
|
4342
4353
|
"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",
|
|
4343
|
-
|
|
4354
|
+
vi[_.tone]
|
|
4344
4355
|
),
|
|
4345
4356
|
children: [
|
|
4346
4357
|
/* @__PURE__ */ t.jsx(Se, { className: "size-3", "aria-hidden": "true" }),
|
|
@@ -4416,14 +4427,14 @@ function vi({
|
|
|
4416
4427
|
}
|
|
4417
4428
|
);
|
|
4418
4429
|
}
|
|
4419
|
-
function
|
|
4430
|
+
function Ni({
|
|
4420
4431
|
tasks: e,
|
|
4421
4432
|
isLoading: n,
|
|
4422
4433
|
contactId: r
|
|
4423
4434
|
}) {
|
|
4424
|
-
const { t: a } = z(), { isMobile: s } = he(), [o, l] = i.useState(null), [c, d] = i.useState(null), u =
|
|
4435
|
+
const { t: a } = z(), { isMobile: s } = he(), [o, l] = i.useState(null), [c, d] = i.useState(null), u = gi(r), m = hi(r, {
|
|
4425
4436
|
onSuccess: () => l(null)
|
|
4426
|
-
}), g =
|
|
4437
|
+
}), g = _i(r, {
|
|
4427
4438
|
onSuccess: () => d(null)
|
|
4428
4439
|
}), f = (p) => {
|
|
4429
4440
|
if (!c) return;
|
|
@@ -4445,7 +4456,7 @@ ${p.body}` : p.title;
|
|
|
4445
4456
|
p
|
|
4446
4457
|
)) }) : e.length === 0 ? /* @__PURE__ */ t.jsx(t.Fragment, {}) : /* @__PURE__ */ t.jsxs("div", { className: "space-y-4", children: [
|
|
4447
4458
|
/* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: e.map((p) => /* @__PURE__ */ t.jsx(
|
|
4448
|
-
|
|
4459
|
+
ji,
|
|
4449
4460
|
{
|
|
4450
4461
|
task: p,
|
|
4451
4462
|
toggleCompletion: u,
|
|
@@ -4455,7 +4466,7 @@ ${p.body}` : p.title;
|
|
|
4455
4466
|
p.id
|
|
4456
4467
|
)) }),
|
|
4457
4468
|
/* @__PURE__ */ t.jsx(
|
|
4458
|
-
|
|
4469
|
+
tr,
|
|
4459
4470
|
{
|
|
4460
4471
|
open: c !== null,
|
|
4461
4472
|
onOpenChange: y,
|
|
@@ -4508,7 +4519,7 @@ ${p.body}` : p.title;
|
|
|
4508
4519
|
)
|
|
4509
4520
|
] });
|
|
4510
4521
|
}
|
|
4511
|
-
function
|
|
4522
|
+
function Ci(e, n) {
|
|
4512
4523
|
const r = W(), a = Qe(), { t: s } = z();
|
|
4513
4524
|
return re({
|
|
4514
4525
|
mutationFn: (o) => a.createTask(e, o),
|
|
@@ -4527,12 +4538,12 @@ function Ni(e, n) {
|
|
|
4527
4538
|
}
|
|
4528
4539
|
});
|
|
4529
4540
|
}
|
|
4530
|
-
function
|
|
4541
|
+
function ki({
|
|
4531
4542
|
contactId: e
|
|
4532
4543
|
}) {
|
|
4533
|
-
const { t: n } = z(), [r, a] = i.useState(!1), s = () => a(!1), o =
|
|
4544
|
+
const { t: n } = z(), [r, a] = i.useState(!1), s = () => a(!1), o = Ci(e, { onSuccess: s });
|
|
4534
4545
|
return r ? /* @__PURE__ */ t.jsx(
|
|
4535
|
-
|
|
4546
|
+
Mo,
|
|
4536
4547
|
{
|
|
4537
4548
|
onSubmit: (l) => o.mutate(l),
|
|
4538
4549
|
isSubmitting: o.isPending,
|
|
@@ -4551,7 +4562,7 @@ function Ci({
|
|
|
4551
4562
|
}
|
|
4552
4563
|
);
|
|
4553
4564
|
}
|
|
4554
|
-
function
|
|
4565
|
+
function wi(e, n) {
|
|
4555
4566
|
const r = W(), a = it(), { t: s } = z();
|
|
4556
4567
|
return re({
|
|
4557
4568
|
mutationFn: (o) => a.deleteNote(o, e),
|
|
@@ -4569,7 +4580,7 @@ function ki(e, n) {
|
|
|
4569
4580
|
}
|
|
4570
4581
|
});
|
|
4571
4582
|
}
|
|
4572
|
-
function
|
|
4583
|
+
function Si(e, n) {
|
|
4573
4584
|
const r = W(), a = it(), { t: s } = z();
|
|
4574
4585
|
return re({
|
|
4575
4586
|
mutationFn: ({
|
|
@@ -4590,7 +4601,7 @@ function wi(e, n) {
|
|
|
4590
4601
|
}
|
|
4591
4602
|
});
|
|
4592
4603
|
}
|
|
4593
|
-
function
|
|
4604
|
+
function Mi(e, n) {
|
|
4594
4605
|
const r = W(), a = it(), { t: s } = z();
|
|
4595
4606
|
return re({
|
|
4596
4607
|
mutationFn: (o) => a.createNote(e, o),
|
|
@@ -4608,19 +4619,19 @@ function Si(e, n) {
|
|
|
4608
4619
|
}
|
|
4609
4620
|
});
|
|
4610
4621
|
}
|
|
4611
|
-
function
|
|
4622
|
+
function Ti() {
|
|
4612
4623
|
if (typeof navigator > "u") return !1;
|
|
4613
4624
|
const n = navigator.userAgentData?.platform ?? navigator.userAgent ?? "";
|
|
4614
4625
|
return /Mac|iPhone|iPad/i.test(n);
|
|
4615
4626
|
}
|
|
4616
|
-
function
|
|
4627
|
+
function Ei({
|
|
4617
4628
|
contactId: e
|
|
4618
4629
|
}) {
|
|
4619
4630
|
const { t: n } = z(), [r, a] = i.useState(""), [s, o] = i.useState(!1), [l, c] = i.useState(!1), d = i.useRef(null);
|
|
4620
4631
|
i.useEffect(() => {
|
|
4621
|
-
c(
|
|
4632
|
+
c(Ti());
|
|
4622
4633
|
}, []);
|
|
4623
|
-
const u =
|
|
4634
|
+
const u = Mi(e, {
|
|
4624
4635
|
onSuccess: () => {
|
|
4625
4636
|
a(""), d.current?.blur();
|
|
4626
4637
|
}
|
|
@@ -4673,26 +4684,26 @@ function Ti({
|
|
|
4673
4684
|
}
|
|
4674
4685
|
);
|
|
4675
4686
|
}
|
|
4676
|
-
function
|
|
4687
|
+
function nr(e) {
|
|
4677
4688
|
return new Date(e).toLocaleDateString("en-US", {
|
|
4678
4689
|
month: "short",
|
|
4679
4690
|
day: "numeric",
|
|
4680
4691
|
year: "numeric"
|
|
4681
4692
|
});
|
|
4682
4693
|
}
|
|
4683
|
-
function
|
|
4694
|
+
function Di(e, n) {
|
|
4684
4695
|
const r = new Date(e), s = (/* @__PURE__ */ new Date()).getTime() - r.getTime(), o = Math.floor(s / (1e3 * 60 * 60 * 24));
|
|
4685
4696
|
return o === 0 ? r.toLocaleTimeString("en-US", {
|
|
4686
4697
|
hour: "numeric",
|
|
4687
4698
|
minute: "2-digit"
|
|
4688
|
-
}) : o === 1 ? n("task_yesterday") : o < 7 ? n("task_days_ago_other", { count: o }) :
|
|
4699
|
+
}) : o === 1 ? n("task_yesterday") : o < 7 ? n("task_days_ago_other", { count: o }) : nr(e);
|
|
4689
4700
|
}
|
|
4690
|
-
function
|
|
4701
|
+
function Ai({
|
|
4691
4702
|
note: e,
|
|
4692
4703
|
onEdit: n,
|
|
4693
4704
|
onDelete: r
|
|
4694
4705
|
}) {
|
|
4695
|
-
const { t: a } = z(), { isMobile: s } = he(), [o, l] = i.useState(!1), c = e.assets?.length ?? 0, d = !!e.title?.trim() && e.title.trim() !== e.body?.trim(), u = e.due_at ?? e.due_date ?? null, m = e.created_at ?
|
|
4706
|
+
const { t: a } = z(), { isMobile: s } = he(), [o, l] = i.useState(!1), c = e.assets?.length ?? 0, d = !!e.title?.trim() && e.title.trim() !== e.body?.trim(), u = e.due_at ?? e.due_date ?? null, m = e.created_at ? Di(e.created_at, a) : null;
|
|
4696
4707
|
return /* @__PURE__ */ t.jsxs(
|
|
4697
4708
|
"div",
|
|
4698
4709
|
{
|
|
@@ -4719,10 +4730,10 @@ function Di({
|
|
|
4719
4730
|
m && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/70 text-xs", children: m }),
|
|
4720
4731
|
u && /* @__PURE__ */ t.jsxs("span", { className: "bg-primary/10 text-primary inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", children: [
|
|
4721
4732
|
/* @__PURE__ */ t.jsx(Se, { className: "size-3", "aria-hidden": "true" }),
|
|
4722
|
-
a("task_due", { date:
|
|
4733
|
+
a("task_due", { date: nr(u) })
|
|
4723
4734
|
] }),
|
|
4724
4735
|
c > 0 && /* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1 text-xs", children: [
|
|
4725
|
-
/* @__PURE__ */ t.jsx(
|
|
4736
|
+
/* @__PURE__ */ t.jsx(Ua, { className: "size-3", "aria-hidden": "true" }),
|
|
4726
4737
|
c === 1 ? a("attachment_one") : a("attachment_other", { count: c })
|
|
4727
4738
|
] })
|
|
4728
4739
|
] }),
|
|
@@ -4790,14 +4801,14 @@ function Di({
|
|
|
4790
4801
|
}
|
|
4791
4802
|
);
|
|
4792
4803
|
}
|
|
4793
|
-
function
|
|
4804
|
+
function Pi({
|
|
4794
4805
|
notes: e,
|
|
4795
4806
|
isLoading: n,
|
|
4796
4807
|
contactId: r
|
|
4797
4808
|
}) {
|
|
4798
|
-
const { t: a } = z(), { isMobile: s } = he(), [o, l] = i.useState(null), [c, d] = i.useState(null), u =
|
|
4809
|
+
const { t: a } = z(), { isMobile: s } = he(), [o, l] = i.useState(null), [c, d] = i.useState(null), u = wi(r, {
|
|
4799
4810
|
onSuccess: () => l(null)
|
|
4800
|
-
}), m =
|
|
4811
|
+
}), m = Si(r, {
|
|
4801
4812
|
onSuccess: () => d(null)
|
|
4802
4813
|
}), g = (f) => {
|
|
4803
4814
|
c && m.mutate({
|
|
@@ -4806,7 +4817,7 @@ function Ai({
|
|
|
4806
4817
|
});
|
|
4807
4818
|
};
|
|
4808
4819
|
return /* @__PURE__ */ t.jsxs("div", { className: "space-y-4", children: [
|
|
4809
|
-
/* @__PURE__ */ t.jsx(
|
|
4820
|
+
/* @__PURE__ */ t.jsx(Ei, { contactId: r }),
|
|
4810
4821
|
n ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: [1, 2, 3].map((f) => /* @__PURE__ */ t.jsx(
|
|
4811
4822
|
"div",
|
|
4812
4823
|
{
|
|
@@ -4814,7 +4825,7 @@ function Ai({
|
|
|
4814
4825
|
},
|
|
4815
4826
|
f
|
|
4816
4827
|
)) }) : e.length === 0 ? null : /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: e.map((f) => /* @__PURE__ */ t.jsx(
|
|
4817
|
-
|
|
4828
|
+
Ai,
|
|
4818
4829
|
{
|
|
4819
4830
|
note: f,
|
|
4820
4831
|
onEdit: d,
|
|
@@ -4823,7 +4834,7 @@ function Ai({
|
|
|
4823
4834
|
f.id
|
|
4824
4835
|
)) }),
|
|
4825
4836
|
/* @__PURE__ */ t.jsx(
|
|
4826
|
-
|
|
4837
|
+
tr,
|
|
4827
4838
|
{
|
|
4828
4839
|
open: c !== null,
|
|
4829
4840
|
onOpenChange: (f) => {
|
|
@@ -4867,8 +4878,8 @@ function Ai({
|
|
|
4867
4878
|
)
|
|
4868
4879
|
] });
|
|
4869
4880
|
}
|
|
4870
|
-
const
|
|
4871
|
-
function
|
|
4881
|
+
const zi = ["Tasks", "Notes"];
|
|
4882
|
+
function Fi({
|
|
4872
4883
|
contactId: e,
|
|
4873
4884
|
tasks: n,
|
|
4874
4885
|
isLoadingTasks: r,
|
|
@@ -4882,7 +4893,7 @@ function zi({
|
|
|
4882
4893
|
Notes: c("tab_notes")
|
|
4883
4894
|
};
|
|
4884
4895
|
return /* @__PURE__ */ t.jsxs("div", { className: "mt-8", children: [
|
|
4885
|
-
/* @__PURE__ */ t.jsx("div", { className: "border-border/50 flex items-center gap-1 border-b", children:
|
|
4896
|
+
/* @__PURE__ */ t.jsx("div", { className: "border-border/50 flex items-center gap-1 border-b", children: zi.map((u) => {
|
|
4886
4897
|
const m = u === "Tasks" ? n.length : a.length, g = o === u;
|
|
4887
4898
|
return /* @__PURE__ */ t.jsxs(
|
|
4888
4899
|
"button",
|
|
@@ -4919,9 +4930,9 @@ function zi({
|
|
|
4919
4930
|
}) }),
|
|
4920
4931
|
/* @__PURE__ */ t.jsxs("div", { className: "pt-6", children: [
|
|
4921
4932
|
o === "Tasks" && /* @__PURE__ */ t.jsxs("div", { className: "space-y-4", children: [
|
|
4922
|
-
/* @__PURE__ */ t.jsx(
|
|
4933
|
+
/* @__PURE__ */ t.jsx(ki, { contactId: e }),
|
|
4923
4934
|
/* @__PURE__ */ t.jsx(
|
|
4924
|
-
|
|
4935
|
+
Ni,
|
|
4925
4936
|
{
|
|
4926
4937
|
tasks: n,
|
|
4927
4938
|
isLoading: r,
|
|
@@ -4931,7 +4942,7 @@ function zi({
|
|
|
4931
4942
|
)
|
|
4932
4943
|
] }),
|
|
4933
4944
|
o === "Notes" && /* @__PURE__ */ t.jsx(
|
|
4934
|
-
|
|
4945
|
+
Pi,
|
|
4935
4946
|
{
|
|
4936
4947
|
notes: a,
|
|
4937
4948
|
isLoading: s,
|
|
@@ -4941,7 +4952,7 @@ function zi({
|
|
|
4941
4952
|
] })
|
|
4942
4953
|
] });
|
|
4943
4954
|
}
|
|
4944
|
-
function
|
|
4955
|
+
function Ri({
|
|
4945
4956
|
contactId: e,
|
|
4946
4957
|
queryKeyPrefix: n,
|
|
4947
4958
|
countriesQueryKey: r,
|
|
@@ -4959,13 +4970,13 @@ function Fi({
|
|
|
4959
4970
|
isDeleting: y,
|
|
4960
4971
|
onSave: p,
|
|
4961
4972
|
onDelete: h
|
|
4962
|
-
} =
|
|
4973
|
+
} = ni(e, {
|
|
4963
4974
|
queryKeyPrefix: n,
|
|
4964
4975
|
countriesQueryKey: r,
|
|
4965
4976
|
getCountries: a,
|
|
4966
4977
|
onDeleteSuccess: s,
|
|
4967
4978
|
onSaveSuccess: () => b(!1)
|
|
4968
|
-
}), { data: v = [], isLoading: C } =
|
|
4979
|
+
}), { data: v = [], isLoading: C } = ri(e), { data: k = [], isLoading: j } = ai(e), { data: x = [] } = Dt(), P = si(e, n, {
|
|
4969
4980
|
onError: (B) => {
|
|
4970
4981
|
O({
|
|
4971
4982
|
title: l("groups_tags_save_failed"),
|
|
@@ -4973,12 +4984,12 @@ function Fi({
|
|
|
4973
4984
|
type: "error"
|
|
4974
4985
|
});
|
|
4975
4986
|
}
|
|
4976
|
-
}), R =
|
|
4987
|
+
}), R = er(), [F, I] = i.useState(!1), [S, L] = i.useState("Tasks"), [$, b] = i.useState(!1), A = i.useCallback(() => {
|
|
4977
4988
|
I(!1), h();
|
|
4978
4989
|
}, [h]);
|
|
4979
4990
|
if (u)
|
|
4980
4991
|
return /* @__PURE__ */ t.jsx(
|
|
4981
|
-
|
|
4992
|
+
Ii,
|
|
4982
4993
|
{
|
|
4983
4994
|
onBack: s,
|
|
4984
4995
|
showMobileBackButton: o
|
|
@@ -5017,7 +5028,7 @@ function Fi({
|
|
|
5017
5028
|
),
|
|
5018
5029
|
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ t.jsxs("div", { className: "mx-auto w-full max-w-[900px] px-6 pt-8 pb-16 md:px-8 md:pt-10", children: [
|
|
5019
5030
|
/* @__PURE__ */ t.jsx(
|
|
5020
|
-
|
|
5031
|
+
mi,
|
|
5021
5032
|
{
|
|
5022
5033
|
contact: d,
|
|
5023
5034
|
tasksCount: v.length,
|
|
@@ -5032,14 +5043,14 @@ function Fi({
|
|
|
5032
5043
|
}
|
|
5033
5044
|
),
|
|
5034
5045
|
/* @__PURE__ */ t.jsx(
|
|
5035
|
-
|
|
5046
|
+
fi,
|
|
5036
5047
|
{
|
|
5037
5048
|
contact: d,
|
|
5038
5049
|
onEditEmpty: () => b(!0)
|
|
5039
5050
|
}
|
|
5040
5051
|
),
|
|
5041
5052
|
/* @__PURE__ */ t.jsx(
|
|
5042
|
-
|
|
5053
|
+
Fi,
|
|
5043
5054
|
{
|
|
5044
5055
|
contactId: e,
|
|
5045
5056
|
tasks: v,
|
|
@@ -5082,7 +5093,7 @@ function Fi({
|
|
|
5082
5093
|
disabled: !f || _,
|
|
5083
5094
|
"aria-busy": _,
|
|
5084
5095
|
children: [
|
|
5085
|
-
_ && /* @__PURE__ */ t.jsx(
|
|
5096
|
+
_ && /* @__PURE__ */ t.jsx(ja, { className: "size-4" }),
|
|
5086
5097
|
l(_ ? "saving" : "save_changes")
|
|
5087
5098
|
]
|
|
5088
5099
|
}
|
|
@@ -5252,7 +5263,7 @@ function Xt({ href: e, label: n, icon: r }) {
|
|
|
5252
5263
|
}
|
|
5253
5264
|
);
|
|
5254
5265
|
}
|
|
5255
|
-
function
|
|
5266
|
+
function Ii({
|
|
5256
5267
|
onBack: e,
|
|
5257
5268
|
showMobileBackButton: n = !0
|
|
5258
5269
|
}) {
|
|
@@ -5281,7 +5292,7 @@ function Ri({
|
|
|
5281
5292
|
] })
|
|
5282
5293
|
] });
|
|
5283
5294
|
}
|
|
5284
|
-
function
|
|
5295
|
+
function Oi() {
|
|
5285
5296
|
const { t: e } = z();
|
|
5286
5297
|
return /* @__PURE__ */ t.jsxs("div", { className: "hidden h-full flex-1 flex-col items-center justify-center px-8 text-center md:flex", children: [
|
|
5287
5298
|
/* @__PURE__ */ t.jsx("div", { className: "bg-muted text-muted-foreground flex size-16 items-center justify-center rounded-xl", children: /* @__PURE__ */ t.jsx(ke, { className: "size-7", "aria-hidden": "true" }) }),
|
|
@@ -5289,7 +5300,7 @@ function Ii() {
|
|
|
5289
5300
|
/* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground mt-1 max-w-xs text-sm", children: e("empty_select_description") })
|
|
5290
5301
|
] });
|
|
5291
5302
|
}
|
|
5292
|
-
function
|
|
5303
|
+
function Li({
|
|
5293
5304
|
selectedContactId: e,
|
|
5294
5305
|
highlightContactId: n,
|
|
5295
5306
|
onSelect: r,
|
|
@@ -5312,7 +5323,7 @@ function Oi({
|
|
|
5312
5323
|
e ? "hidden" : "flex flex-col"
|
|
5313
5324
|
),
|
|
5314
5325
|
children: /* @__PURE__ */ t.jsx(
|
|
5315
|
-
|
|
5326
|
+
Ko,
|
|
5316
5327
|
{
|
|
5317
5328
|
selectedContactId: e,
|
|
5318
5329
|
highlightContactId: n,
|
|
@@ -5334,7 +5345,7 @@ function Oi({
|
|
|
5334
5345
|
e ? "flex flex-col" : "hidden md:flex"
|
|
5335
5346
|
),
|
|
5336
5347
|
children: e ? /* @__PURE__ */ t.jsx(
|
|
5337
|
-
|
|
5348
|
+
Ri,
|
|
5338
5349
|
{
|
|
5339
5350
|
contactId: e,
|
|
5340
5351
|
queryKeyPrefix: d,
|
|
@@ -5344,7 +5355,7 @@ function Oi({
|
|
|
5344
5355
|
showMobileBackButton: g
|
|
5345
5356
|
},
|
|
5346
5357
|
e
|
|
5347
|
-
) : /* @__PURE__ */ t.jsx(
|
|
5358
|
+
) : /* @__PURE__ */ t.jsx(Oi, {})
|
|
5348
5359
|
}
|
|
5349
5360
|
)
|
|
5350
5361
|
] });
|
|
@@ -5384,7 +5395,7 @@ var Ue = function(e, n, r) {
|
|
|
5384
5395
|
return { left: Ue((s.pageX - (a.left + Nt(e).pageXOffset)) / a.width), top: Ue((s.pageY - (a.top + Nt(e).pageYOffset)) / a.height) };
|
|
5385
5396
|
}, Jt = function(e) {
|
|
5386
5397
|
!qe(e) && e.preventDefault();
|
|
5387
|
-
},
|
|
5398
|
+
}, rr = H.memo(function(e) {
|
|
5388
5399
|
var n = e.onMove, r = e.onKey, a = ut(e, ["onMove", "onKey"]), s = i.useRef(null), o = Be(n), l = Be(r), c = i.useRef(null), d = i.useRef(!1), u = i.useMemo(function() {
|
|
5389
5400
|
var _ = function(h) {
|
|
5390
5401
|
Jt(h), (qe(h) ? h.touches.length > 0 : h.buttons > 0) && s.current ? o(Zt(s.current, h, c.current)) : p(!1);
|
|
@@ -5417,24 +5428,24 @@ var Ue = function(e, n, r) {
|
|
|
5417
5428
|
}, [f]), H.createElement("div", Fe({}, a, { onTouchStart: m, onMouseDown: m, className: "react-colorful__interactive", ref: s, onKeyDown: g, tabIndex: 0, role: "slider" }));
|
|
5418
5429
|
}), zt = function(e) {
|
|
5419
5430
|
return e.filter(Boolean).join(" ");
|
|
5420
|
-
},
|
|
5431
|
+
}, ar = function(e) {
|
|
5421
5432
|
var n = e.color, r = e.left, a = e.top, s = a === void 0 ? 0.5 : a, o = zt(["react-colorful__pointer", e.className]);
|
|
5422
5433
|
return H.createElement("div", { className: o, style: { top: 100 * s + "%", left: 100 * r + "%" } }, H.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: n } }));
|
|
5423
5434
|
}, Y = function(e, n, r) {
|
|
5424
5435
|
return n === void 0 && (n = 0), r === void 0 && (r = Math.pow(10, n)), Math.round(r * e) / r;
|
|
5425
|
-
},
|
|
5426
|
-
return
|
|
5436
|
+
}, qi = function(e) {
|
|
5437
|
+
return Gi(Ct(e));
|
|
5427
5438
|
}, Ct = function(e) {
|
|
5428
5439
|
return e[0] === "#" && (e = e.substring(1)), e.length < 6 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? Y(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : { r: parseInt(e.substring(0, 2), 16), g: parseInt(e.substring(2, 4), 16), b: parseInt(e.substring(4, 6), 16), a: e.length === 8 ? Y(parseInt(e.substring(6, 8), 16) / 255, 2) : 1 };
|
|
5429
|
-
}, qi = function(e) {
|
|
5430
|
-
return Bi(Ki(e));
|
|
5431
5440
|
}, $i = function(e) {
|
|
5441
|
+
return Ui(Bi(e));
|
|
5442
|
+
}, Ki = function(e) {
|
|
5432
5443
|
var n = e.s, r = e.v, a = e.a, s = (200 - n) * r / 100;
|
|
5433
5444
|
return { h: Y(e.h), s: Y(s > 0 && s < 200 ? n * r / 100 / (s <= 100 ? s : 200 - s) * 100 : 0), l: Y(s / 2), a: Y(a, 2) };
|
|
5434
5445
|
}, kt = function(e) {
|
|
5435
|
-
var n =
|
|
5446
|
+
var n = Ki(e);
|
|
5436
5447
|
return "hsl(" + n.h + ", " + n.s + "%, " + n.l + "%)";
|
|
5437
|
-
},
|
|
5448
|
+
}, Bi = function(e) {
|
|
5438
5449
|
var n = e.h, r = e.s, a = e.v, s = e.a;
|
|
5439
5450
|
n = n / 360 * 6, r /= 100, a /= 100;
|
|
5440
5451
|
var o = Math.floor(n), l = a * (1 - r), c = a * (1 - (n - o) * r), d = a * (1 - (1 - n + o) * r), u = o % 6;
|
|
@@ -5442,34 +5453,34 @@ var Ue = function(e, n, r) {
|
|
|
5442
5453
|
}, Xe = function(e) {
|
|
5443
5454
|
var n = e.toString(16);
|
|
5444
5455
|
return n.length < 2 ? "0" + n : n;
|
|
5445
|
-
},
|
|
5456
|
+
}, Ui = function(e) {
|
|
5446
5457
|
var n = e.r, r = e.g, a = e.b, s = e.a, o = s < 1 ? Xe(Y(255 * s)) : "";
|
|
5447
5458
|
return "#" + Xe(n) + Xe(r) + Xe(a) + o;
|
|
5448
|
-
},
|
|
5459
|
+
}, Gi = function(e) {
|
|
5449
5460
|
var n = e.r, r = e.g, a = e.b, s = e.a, o = Math.max(n, r, a), l = o - Math.min(n, r, a), c = l ? o === n ? (r - a) / l : o === r ? 2 + (a - n) / l : 4 + (n - r) / l : 0;
|
|
5450
5461
|
return { h: Y(60 * (c < 0 ? c + 6 : c)), s: Y(o ? l / o * 100 : 0), v: Y(o / 255 * 100), a: s };
|
|
5451
|
-
},
|
|
5462
|
+
}, Hi = H.memo(function(e) {
|
|
5452
5463
|
var n = e.hue, r = e.onChange, a = zt(["react-colorful__hue", e.className]);
|
|
5453
|
-
return H.createElement("div", { className: a }, H.createElement(
|
|
5464
|
+
return H.createElement("div", { className: a }, H.createElement(rr, { onMove: function(s) {
|
|
5454
5465
|
r({ h: 360 * s.left });
|
|
5455
5466
|
}, onKey: function(s) {
|
|
5456
5467
|
r({ h: Ue(n + 360 * s.left, 0, 360) });
|
|
5457
|
-
}, "aria-label": "Hue", "aria-valuenow": Y(n), "aria-valuemax": "360", "aria-valuemin": "0" }, H.createElement(
|
|
5458
|
-
}),
|
|
5468
|
+
}, "aria-label": "Hue", "aria-valuenow": Y(n), "aria-valuemax": "360", "aria-valuemin": "0" }, H.createElement(ar, { className: "react-colorful__hue-pointer", left: n / 360, color: kt({ h: n, s: 100, v: 100, a: 1 }) })));
|
|
5469
|
+
}), Qi = H.memo(function(e) {
|
|
5459
5470
|
var n = e.hsva, r = e.onChange, a = { backgroundColor: kt({ h: n.h, s: 100, v: 100, a: 1 }) };
|
|
5460
|
-
return H.createElement("div", { className: "react-colorful__saturation", style: a }, H.createElement(
|
|
5471
|
+
return H.createElement("div", { className: "react-colorful__saturation", style: a }, H.createElement(rr, { onMove: function(s) {
|
|
5461
5472
|
r({ s: 100 * s.left, v: 100 - 100 * s.top });
|
|
5462
5473
|
}, onKey: function(s) {
|
|
5463
5474
|
r({ s: Ue(n.s + 100 * s.left, 0, 100), v: Ue(n.v - 100 * s.top, 0, 100) });
|
|
5464
|
-
}, "aria-label": "Color", "aria-valuetext": "Saturation " + Y(n.s) + "%, Brightness " + Y(n.v) + "%" }, H.createElement(
|
|
5465
|
-
}),
|
|
5475
|
+
}, "aria-label": "Color", "aria-valuetext": "Saturation " + Y(n.s) + "%, Brightness " + Y(n.v) + "%" }, H.createElement(ar, { className: "react-colorful__saturation-pointer", top: 1 - n.v / 100, left: n.s / 100, color: kt(n) })));
|
|
5476
|
+
}), sr = function(e, n) {
|
|
5466
5477
|
if (e === n) return !0;
|
|
5467
5478
|
for (var r in e) if (e[r] !== n[r]) return !1;
|
|
5468
5479
|
return !0;
|
|
5469
|
-
},
|
|
5470
|
-
return e.toLowerCase() === n.toLowerCase() ||
|
|
5480
|
+
}, Yi = function(e, n) {
|
|
5481
|
+
return e.toLowerCase() === n.toLowerCase() || sr(Ct(e), Ct(n));
|
|
5471
5482
|
};
|
|
5472
|
-
function
|
|
5483
|
+
function Vi(e, n, r) {
|
|
5473
5484
|
var a = Be(r), s = i.useState(function() {
|
|
5474
5485
|
return e.toHsva(n);
|
|
5475
5486
|
}), o = s[0], l = s[1], c = i.useRef({ color: n, hsva: o });
|
|
@@ -5480,7 +5491,7 @@ function Yi(e, n, r) {
|
|
|
5480
5491
|
}
|
|
5481
5492
|
}, [n, e]), i.useEffect(function() {
|
|
5482
5493
|
var u;
|
|
5483
|
-
|
|
5494
|
+
sr(o, c.current.hsva) || e.equal(u = e.fromHsva(o), c.current.color) || (c.current = { hsva: o, color: u }, a(u));
|
|
5484
5495
|
}, [o, e, a]);
|
|
5485
5496
|
var d = i.useCallback(function(u) {
|
|
5486
5497
|
l(function(m) {
|
|
@@ -5489,28 +5500,28 @@ function Yi(e, n, r) {
|
|
|
5489
5500
|
}, []);
|
|
5490
5501
|
return [o, d];
|
|
5491
5502
|
}
|
|
5492
|
-
var
|
|
5503
|
+
var Wi = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Xi = function() {
|
|
5493
5504
|
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
|
|
5494
|
-
}, en = /* @__PURE__ */ new Map(),
|
|
5495
|
-
|
|
5505
|
+
}, en = /* @__PURE__ */ new Map(), Zi = function(e) {
|
|
5506
|
+
Wi(function() {
|
|
5496
5507
|
var n = e.current ? e.current.ownerDocument : document;
|
|
5497
5508
|
if (n !== void 0 && !en.has(n)) {
|
|
5498
5509
|
var r = n.createElement("style");
|
|
5499
5510
|
r.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, en.set(n, r);
|
|
5500
|
-
var a =
|
|
5511
|
+
var a = Xi();
|
|
5501
5512
|
a && r.setAttribute("nonce", a), n.head.appendChild(r);
|
|
5502
5513
|
}
|
|
5503
5514
|
}, []);
|
|
5504
|
-
},
|
|
5515
|
+
}, Ji = function(e) {
|
|
5505
5516
|
var n = e.className, r = e.colorModel, a = e.color, s = a === void 0 ? r.defaultColor : a, o = e.onChange, l = ut(e, ["className", "colorModel", "color", "onChange"]), c = i.useRef(null);
|
|
5506
|
-
|
|
5507
|
-
var d =
|
|
5508
|
-
return H.createElement("div", Fe({}, l, { ref: c, className: g }), H.createElement(
|
|
5509
|
-
},
|
|
5510
|
-
return
|
|
5511
|
-
}, equal:
|
|
5512
|
-
return H.createElement(
|
|
5513
|
-
},
|
|
5517
|
+
Zi(c);
|
|
5518
|
+
var d = Vi(r, s, o), u = d[0], m = d[1], g = zt(["react-colorful", n]);
|
|
5519
|
+
return H.createElement("div", Fe({}, l, { ref: c, className: g }), H.createElement(Qi, { hsva: u, onChange: m }), H.createElement(Hi, { hue: u.h, onChange: m, className: "react-colorful__last-control" }));
|
|
5520
|
+
}, el = { defaultColor: "000", toHsva: qi, fromHsva: function(e) {
|
|
5521
|
+
return $i({ h: e.h, s: e.s, v: e.v, a: 1 });
|
|
5522
|
+
}, equal: Yi }, tl = function(e) {
|
|
5523
|
+
return H.createElement(Ji, Fe({}, e, { colorModel: el }));
|
|
5524
|
+
}, nl = /^#?([0-9A-F]{3,8})$/i, rl = function(e) {
|
|
5514
5525
|
var n = e.color, r = n === void 0 ? "" : n, a = e.onChange, s = e.onBlur, o = e.escape, l = e.validate, c = e.format, d = e.process, u = ut(e, ["color", "onChange", "onBlur", "escape", "validate", "format", "process"]), m = i.useState(function() {
|
|
5515
5526
|
return o(r);
|
|
5516
5527
|
}), g = m[0], f = m[1], _ = Be(a), y = Be(s), p = i.useCallback(function(v) {
|
|
@@ -5524,18 +5535,18 @@ var Vi = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Wi = function()
|
|
|
5524
5535
|
}, [r, o]), H.createElement("input", Fe({}, u, { value: c ? c(g) : g, spellCheck: "false", onChange: p, onBlur: h }));
|
|
5525
5536
|
}, tn = function(e) {
|
|
5526
5537
|
return "#" + e;
|
|
5527
|
-
},
|
|
5538
|
+
}, al = function(e) {
|
|
5528
5539
|
var n = e.prefixed, r = e.alpha, a = ut(e, ["prefixed", "alpha"]), s = i.useCallback(function(l) {
|
|
5529
5540
|
return l.replace(/([^0-9A-F]+)/gi, "").substring(0, r ? 8 : 6);
|
|
5530
5541
|
}, [r]), o = i.useCallback(function(l) {
|
|
5531
5542
|
return (function(c, d) {
|
|
5532
|
-
var u =
|
|
5543
|
+
var u = nl.exec(c), m = u ? u[1].length : 0;
|
|
5533
5544
|
return m === 3 || m === 6 || !!d && m === 4 || !!d && m === 8;
|
|
5534
5545
|
})(l, r);
|
|
5535
5546
|
}, [r]);
|
|
5536
|
-
return H.createElement(
|
|
5547
|
+
return H.createElement(rl, Fe({}, a, { escape: s, format: n ? tn : void 0, process: tn, validate: o }));
|
|
5537
5548
|
};
|
|
5538
|
-
function
|
|
5549
|
+
function sl() {
|
|
5539
5550
|
const e = lt(), n = W(), { t: r } = z();
|
|
5540
5551
|
return re({
|
|
5541
5552
|
mutationFn: (a) => {
|
|
@@ -5554,7 +5565,7 @@ function al() {
|
|
|
5554
5565
|
}
|
|
5555
5566
|
});
|
|
5556
5567
|
}
|
|
5557
|
-
function
|
|
5568
|
+
function ol() {
|
|
5558
5569
|
const e = lt(), n = W(), { t: r } = z();
|
|
5559
5570
|
return re({
|
|
5560
5571
|
mutationFn: ({
|
|
@@ -5576,7 +5587,7 @@ function sl() {
|
|
|
5576
5587
|
}
|
|
5577
5588
|
});
|
|
5578
5589
|
}
|
|
5579
|
-
const
|
|
5590
|
+
const il = [
|
|
5580
5591
|
"#ef4444",
|
|
5581
5592
|
"#f97316",
|
|
5582
5593
|
"#eab308",
|
|
@@ -5587,7 +5598,7 @@ const ol = [
|
|
|
5587
5598
|
"#6366f1",
|
|
5588
5599
|
"#8b5cf6",
|
|
5589
5600
|
"#ec4899"
|
|
5590
|
-
],
|
|
5601
|
+
], ll = {
|
|
5591
5602
|
"#ef4444": "groups_color_red",
|
|
5592
5603
|
"#f97316": "groups_color_orange",
|
|
5593
5604
|
"#eab308": "groups_color_yellow",
|
|
@@ -5599,13 +5610,13 @@ const ol = [
|
|
|
5599
5610
|
"#8b5cf6": "groups_color_purple",
|
|
5600
5611
|
"#ec4899": "groups_color_pink"
|
|
5601
5612
|
};
|
|
5602
|
-
function
|
|
5613
|
+
function cl({
|
|
5603
5614
|
onBack: e,
|
|
5604
5615
|
onSelectContact: n,
|
|
5605
5616
|
initialCreateOpen: r,
|
|
5606
5617
|
showMobileBackButton: a = !0
|
|
5607
5618
|
}) {
|
|
5608
|
-
const { t: s } = z(), { isMobile: o } = he(), { data: l = [], isLoading: c } = Dt(), d =
|
|
5619
|
+
const { t: s } = z(), { isMobile: o } = he(), { data: l = [], isLoading: c } = Dt(), d = sl(), [u, m] = i.useState(r ? { mode: "create" } : null), [g, f] = i.useState(null), [_, y] = i.useState(null);
|
|
5609
5620
|
i.useEffect(() => {
|
|
5610
5621
|
if (_ == null) return;
|
|
5611
5622
|
const h = setTimeout(() => y(null), 2e3);
|
|
@@ -5646,8 +5657,8 @@ function ll({
|
|
|
5646
5657
|
s("groups_new_group")
|
|
5647
5658
|
] })
|
|
5648
5659
|
] }),
|
|
5649
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto px-6 py-6", children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto max-w-[857px]", children: c ? /* @__PURE__ */ t.jsx(
|
|
5650
|
-
|
|
5660
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto px-6 py-6", children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto max-w-[857px]", children: c ? /* @__PURE__ */ t.jsx(gl, {}) : l.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground py-16 text-center text-sm", children: s("groups_empty") }) : /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: l.map((h) => /* @__PURE__ */ t.jsx(
|
|
5661
|
+
pl,
|
|
5651
5662
|
{
|
|
5652
5663
|
group: h,
|
|
5653
5664
|
highlight: _ === h.id,
|
|
@@ -5658,7 +5669,7 @@ function ll({
|
|
|
5658
5669
|
h.id
|
|
5659
5670
|
)) }) }) }),
|
|
5660
5671
|
u && /* @__PURE__ */ t.jsx(
|
|
5661
|
-
|
|
5672
|
+
or,
|
|
5662
5673
|
{
|
|
5663
5674
|
mode: u.mode,
|
|
5664
5675
|
group: u.mode === "edit" ? u.group : void 0,
|
|
@@ -5706,7 +5717,7 @@ function ll({
|
|
|
5706
5717
|
)
|
|
5707
5718
|
] });
|
|
5708
5719
|
}
|
|
5709
|
-
function
|
|
5720
|
+
function or({
|
|
5710
5721
|
mode: e,
|
|
5711
5722
|
group: n,
|
|
5712
5723
|
open: r,
|
|
@@ -5714,7 +5725,7 @@ function sr({
|
|
|
5714
5725
|
onGroupCreated: s,
|
|
5715
5726
|
onGroupCreatedWithName: o
|
|
5716
5727
|
}) {
|
|
5717
|
-
const { t: l } = z(), { isMobile: c } = he(), d =
|
|
5728
|
+
const { t: l } = z(), { isMobile: c } = he(), d = er(), u = ol(), m = e === "create" ? d.isPending : u.isPending, [g, f] = i.useState(n?.name ?? ""), [_, y] = i.useState(n?.avatar ?? ""), [p, h] = i.useState(
|
|
5718
5729
|
n?.avatar_background ?? "#6366f1"
|
|
5719
5730
|
), v = i.useCallback(() => {
|
|
5720
5731
|
const k = g.trim();
|
|
@@ -5793,7 +5804,7 @@ function sr({
|
|
|
5793
5804
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-xs", children: l("groups_avatar") })
|
|
5794
5805
|
] }),
|
|
5795
5806
|
/* @__PURE__ */ t.jsxs("div", { className: "flex-1 space-y-1.5", children: [
|
|
5796
|
-
/* @__PURE__ */ t.jsx(
|
|
5807
|
+
/* @__PURE__ */ t.jsx(vr, { className: "text-foreground", children: l("groups_name_label") }),
|
|
5797
5808
|
/* @__PURE__ */ t.jsx(
|
|
5798
5809
|
ae,
|
|
5799
5810
|
{
|
|
@@ -5804,8 +5815,8 @@ function sr({
|
|
|
5804
5815
|
)
|
|
5805
5816
|
] })
|
|
5806
5817
|
] }),
|
|
5807
|
-
/* @__PURE__ */ t.jsxs(
|
|
5808
|
-
/* @__PURE__ */ t.jsxs(
|
|
5818
|
+
/* @__PURE__ */ t.jsxs(Na, { defaultValue: "emoji", children: [
|
|
5819
|
+
/* @__PURE__ */ t.jsxs(Ca, { className: "border-border h-auto w-full justify-center gap-6 rounded-none border-b bg-transparent p-0", children: [
|
|
5809
5820
|
/* @__PURE__ */ t.jsx(
|
|
5810
5821
|
Lt,
|
|
5811
5822
|
{
|
|
@@ -5829,16 +5840,16 @@ function sr({
|
|
|
5829
5840
|
className: "bg-popover flex h-64 w-full flex-col overflow-hidden rounded-lg",
|
|
5830
5841
|
onEmojiSelect: (k) => y(k.emoji),
|
|
5831
5842
|
children: /* @__PURE__ */ t.jsxs(Oe.Viewport, { className: "relative flex-1 outline-hidden", children: [
|
|
5832
|
-
/* @__PURE__ */ t.jsx(Oe.Loading, { className: "text-muted-foreground absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t.jsx(
|
|
5843
|
+
/* @__PURE__ */ t.jsx(Oe.Loading, { className: "text-muted-foreground absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Fa, { className: "size-4 animate-spin" }) }),
|
|
5833
5844
|
/* @__PURE__ */ t.jsx(Oe.Empty, { className: "text-muted-foreground absolute inset-0 flex items-center justify-center text-sm", children: l("groups_no_emoji_found") }),
|
|
5834
5845
|
/* @__PURE__ */ t.jsx(
|
|
5835
5846
|
Oe.List,
|
|
5836
5847
|
{
|
|
5837
5848
|
className: "pb-1 select-none",
|
|
5838
5849
|
components: {
|
|
5839
|
-
Row:
|
|
5840
|
-
Emoji:
|
|
5841
|
-
CategoryHeader:
|
|
5850
|
+
Row: dl,
|
|
5851
|
+
Emoji: ul,
|
|
5852
|
+
CategoryHeader: ml
|
|
5842
5853
|
}
|
|
5843
5854
|
}
|
|
5844
5855
|
)
|
|
@@ -5847,7 +5858,7 @@ function sr({
|
|
|
5847
5858
|
) }),
|
|
5848
5859
|
/* @__PURE__ */ t.jsx(qt, { value: "color", className: "pt-4", children: /* @__PURE__ */ t.jsxs("div", { className: "space-y-4", children: [
|
|
5849
5860
|
/* @__PURE__ */ t.jsx(
|
|
5850
|
-
|
|
5861
|
+
tl,
|
|
5851
5862
|
{
|
|
5852
5863
|
color: p || "#6366f1",
|
|
5853
5864
|
onChange: h,
|
|
@@ -5857,7 +5868,7 @@ function sr({
|
|
|
5857
5868
|
/* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ t.jsxs("div", { className: "border-input flex items-center gap-1 rounded-md border px-3 py-1.5", children: [
|
|
5858
5869
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground text-sm", children: "#" }),
|
|
5859
5870
|
/* @__PURE__ */ t.jsx(
|
|
5860
|
-
|
|
5871
|
+
al,
|
|
5861
5872
|
{
|
|
5862
5873
|
color: p || "6366f1",
|
|
5863
5874
|
onChange: h,
|
|
@@ -5865,7 +5876,7 @@ function sr({
|
|
|
5865
5876
|
}
|
|
5866
5877
|
)
|
|
5867
5878
|
] }) }),
|
|
5868
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex justify-between", children:
|
|
5879
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex justify-between", children: il.map((k) => /* @__PURE__ */ t.jsx(
|
|
5869
5880
|
"button",
|
|
5870
5881
|
{
|
|
5871
5882
|
type: "button",
|
|
@@ -5875,7 +5886,7 @@ function sr({
|
|
|
5875
5886
|
p === k ? "ring-primary ring-2 ring-offset-2" : "hover:scale-110"
|
|
5876
5887
|
),
|
|
5877
5888
|
style: { backgroundColor: k },
|
|
5878
|
-
"aria-label": l(
|
|
5889
|
+
"aria-label": l(ll[k])
|
|
5879
5890
|
},
|
|
5880
5891
|
k
|
|
5881
5892
|
)) })
|
|
@@ -5898,14 +5909,14 @@ function sr({
|
|
|
5898
5909
|
}
|
|
5899
5910
|
);
|
|
5900
5911
|
}
|
|
5901
|
-
function
|
|
5912
|
+
function dl({
|
|
5902
5913
|
children: e,
|
|
5903
5914
|
ref: n,
|
|
5904
5915
|
...r
|
|
5905
5916
|
}) {
|
|
5906
5917
|
return /* @__PURE__ */ t.jsx("div", { ...r, className: "flex scroll-my-1 justify-center px-1", children: e });
|
|
5907
5918
|
}
|
|
5908
|
-
function
|
|
5919
|
+
function ul({
|
|
5909
5920
|
emoji: e,
|
|
5910
5921
|
className: n,
|
|
5911
5922
|
ref: r,
|
|
@@ -5923,7 +5934,7 @@ function dl({
|
|
|
5923
5934
|
}
|
|
5924
5935
|
);
|
|
5925
5936
|
}
|
|
5926
|
-
function
|
|
5937
|
+
function ml({
|
|
5927
5938
|
category: e,
|
|
5928
5939
|
ref: n,
|
|
5929
5940
|
...r
|
|
@@ -5937,7 +5948,7 @@ function ul({
|
|
|
5937
5948
|
}
|
|
5938
5949
|
);
|
|
5939
5950
|
}
|
|
5940
|
-
function
|
|
5951
|
+
function pl({
|
|
5941
5952
|
group: e,
|
|
5942
5953
|
highlight: n,
|
|
5943
5954
|
onEdit: r,
|
|
@@ -6000,7 +6011,7 @@ function ml({
|
|
|
6000
6011
|
}
|
|
6001
6012
|
),
|
|
6002
6013
|
/* @__PURE__ */ t.jsx(
|
|
6003
|
-
|
|
6014
|
+
fl,
|
|
6004
6015
|
{
|
|
6005
6016
|
group: e,
|
|
6006
6017
|
open: c,
|
|
@@ -6011,7 +6022,7 @@ function ml({
|
|
|
6011
6022
|
)
|
|
6012
6023
|
] });
|
|
6013
6024
|
}
|
|
6014
|
-
function
|
|
6025
|
+
function fl({
|
|
6015
6026
|
group: e,
|
|
6016
6027
|
open: n,
|
|
6017
6028
|
onOpenChange: r,
|
|
@@ -6104,7 +6115,7 @@ function pl({
|
|
|
6104
6115
|
),
|
|
6105
6116
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
6106
6117
|
/* @__PURE__ */ t.jsx(cn, { children: e.name }),
|
|
6107
|
-
/* @__PURE__ */ t.jsx(
|
|
6118
|
+
/* @__PURE__ */ t.jsx(jr, { children: a === 1 ? o("groups_member_one", { count: a }) : o("groups_member_other", { count: a }) })
|
|
6108
6119
|
] })
|
|
6109
6120
|
] }) }),
|
|
6110
6121
|
/* @__PURE__ */ t.jsxs("div", { className: "relative border-b px-6 py-3", children: [
|
|
@@ -6195,7 +6206,7 @@ function pl({
|
|
|
6195
6206
|
}
|
|
6196
6207
|
) : /* @__PURE__ */ t.jsx(sn, { open: n, onOpenChange: r, children: /* @__PURE__ */ t.jsx(on, { side: "right", className: "flex flex-col overflow-hidden p-0", children: j }) });
|
|
6197
6208
|
}
|
|
6198
|
-
function
|
|
6209
|
+
function gl() {
|
|
6199
6210
|
return /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: [0, 1, 2, 3].map((e) => /* @__PURE__ */ t.jsxs(
|
|
6200
6211
|
"div",
|
|
6201
6212
|
{
|
|
@@ -6212,7 +6223,7 @@ function fl() {
|
|
|
6212
6223
|
e
|
|
6213
6224
|
)) });
|
|
6214
6225
|
}
|
|
6215
|
-
function
|
|
6226
|
+
function hl(e = "contacts", n) {
|
|
6216
6227
|
const r = W(), a = xe();
|
|
6217
6228
|
return re({
|
|
6218
6229
|
mutationFn: (s) => a.createContact(s),
|
|
@@ -6228,9 +6239,9 @@ function gl(e = "contacts", n) {
|
|
|
6228
6239
|
}
|
|
6229
6240
|
});
|
|
6230
6241
|
}
|
|
6231
|
-
function
|
|
6242
|
+
function _l(e = "contacts", n) {
|
|
6232
6243
|
const r = Ye();
|
|
6233
|
-
return
|
|
6244
|
+
return hl(e, {
|
|
6234
6245
|
onSuccess: (a) => {
|
|
6235
6246
|
O({
|
|
6236
6247
|
title: r?.t("contact_created") ?? "Contact created successfully",
|
|
@@ -6246,11 +6257,11 @@ function hl(e = "contacts", n) {
|
|
|
6246
6257
|
}
|
|
6247
6258
|
});
|
|
6248
6259
|
}
|
|
6249
|
-
function
|
|
6260
|
+
function ir(e) {
|
|
6250
6261
|
return vn(e)[0] ?? "contacts";
|
|
6251
6262
|
}
|
|
6252
|
-
function
|
|
6253
|
-
const [, n] = vn(e), r = n ?
|
|
6263
|
+
function xl(e) {
|
|
6264
|
+
const [, n] = vn(e), r = n ? ga(n) : void 0;
|
|
6254
6265
|
return r === "manage-groups" ? {
|
|
6255
6266
|
nav: { view: "browse", selectedContactId: null },
|
|
6256
6267
|
subPage: "manage-groups"
|
|
@@ -6266,11 +6277,11 @@ function _l(e) {
|
|
|
6266
6277
|
};
|
|
6267
6278
|
}
|
|
6268
6279
|
function nn(e, n) {
|
|
6269
|
-
const r =
|
|
6270
|
-
return n.view === "new" ? `${r}/new` : n.selectedContactId ? `${r}/${
|
|
6280
|
+
const r = ir(e);
|
|
6281
|
+
return n.view === "new" ? `${r}/new` : n.selectedContactId ? `${r}/${ha(n.selectedContactId)}` : r;
|
|
6271
6282
|
}
|
|
6272
|
-
const
|
|
6273
|
-
function
|
|
6283
|
+
const lr = "sdk-contacts";
|
|
6284
|
+
function bl({
|
|
6274
6285
|
selectedContactId: e,
|
|
6275
6286
|
highlightContactId: n,
|
|
6276
6287
|
onSelect: r,
|
|
@@ -6304,7 +6315,7 @@ function xl({
|
|
|
6304
6315
|
[g, f, e, r, d]
|
|
6305
6316
|
);
|
|
6306
6317
|
return /* @__PURE__ */ t.jsx(
|
|
6307
|
-
|
|
6318
|
+
Li,
|
|
6308
6319
|
{
|
|
6309
6320
|
selectedContactId: e,
|
|
6310
6321
|
highlightContactId: n,
|
|
@@ -6314,14 +6325,14 @@ function xl({
|
|
|
6314
6325
|
onCreateGroup: o,
|
|
6315
6326
|
highlightGroupName: l,
|
|
6316
6327
|
onDeleteContact: p,
|
|
6317
|
-
queryKeyPrefix:
|
|
6328
|
+
queryKeyPrefix: lr,
|
|
6318
6329
|
countriesQueryKey: _,
|
|
6319
6330
|
getCountries: y,
|
|
6320
6331
|
showMobileDetailBackButton: c
|
|
6321
6332
|
}
|
|
6322
6333
|
);
|
|
6323
6334
|
}
|
|
6324
|
-
const
|
|
6335
|
+
const yl = {
|
|
6325
6336
|
first_name: "",
|
|
6326
6337
|
last_name: "",
|
|
6327
6338
|
email: "",
|
|
@@ -6336,7 +6347,7 @@ const bl = {
|
|
|
6336
6347
|
metadata: {},
|
|
6337
6348
|
affiliate: {}
|
|
6338
6349
|
};
|
|
6339
|
-
function
|
|
6350
|
+
function vl({
|
|
6340
6351
|
onNavigate: e,
|
|
6341
6352
|
onCreateContact: n,
|
|
6342
6353
|
asSheet: r = !1
|
|
@@ -6348,8 +6359,8 @@ function yl({
|
|
|
6348
6359
|
() => (c?.countries ?? []).map((y) => ({ name: y.name, value: y.code })).sort((y, p) => y.name.localeCompare(p.name)),
|
|
6349
6360
|
[c]
|
|
6350
6361
|
), u = pn(Pt, {
|
|
6351
|
-
defaultValues:
|
|
6352
|
-
}), m =
|
|
6362
|
+
defaultValues: yl
|
|
6363
|
+
}), m = _l(lr, {
|
|
6353
6364
|
onSuccess: (y) => {
|
|
6354
6365
|
n?.();
|
|
6355
6366
|
const p = y?.contact?.id;
|
|
@@ -6406,7 +6417,7 @@ function yl({
|
|
|
6406
6417
|
) })
|
|
6407
6418
|
}
|
|
6408
6419
|
) : /* @__PURE__ */ t.jsx(
|
|
6409
|
-
|
|
6420
|
+
To,
|
|
6410
6421
|
{
|
|
6411
6422
|
onNavigateToList: _,
|
|
6412
6423
|
onSubmit: () => s.current?.requestSubmit(),
|
|
@@ -6423,7 +6434,7 @@ function yl({
|
|
|
6423
6434
|
}
|
|
6424
6435
|
);
|
|
6425
6436
|
}
|
|
6426
|
-
function
|
|
6437
|
+
function jl({
|
|
6427
6438
|
api: e,
|
|
6428
6439
|
onContactSelect: n,
|
|
6429
6440
|
onCreateContact: r,
|
|
@@ -6437,13 +6448,13 @@ function vl({
|
|
|
6437
6448
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
6438
6449
|
...u
|
|
6439
6450
|
}) {
|
|
6440
|
-
const { currentSlug: m, navigate: g } =
|
|
6441
|
-
() =>
|
|
6451
|
+
const { currentSlug: m, navigate: g } = Nr(), f = i.useMemo(
|
|
6452
|
+
() => ir(m),
|
|
6442
6453
|
[m]
|
|
6443
6454
|
), { nav: _, subPage: y } = i.useMemo(
|
|
6444
|
-
() =>
|
|
6455
|
+
() => xl(m),
|
|
6445
6456
|
[m]
|
|
6446
|
-
), p =
|
|
6457
|
+
), p = Fr(), [h, v] = i.useState(!1), [C, k] = i.useState(
|
|
6447
6458
|
null
|
|
6448
6459
|
);
|
|
6449
6460
|
i.useEffect(() => {
|
|
@@ -6490,9 +6501,9 @@ function vl({
|
|
|
6490
6501
|
const A = i.useCallback(() => {
|
|
6491
6502
|
L(!0);
|
|
6492
6503
|
}, []), M = h || _.view === "new", B = p || !M;
|
|
6493
|
-
return /* @__PURE__ */ t.jsx(
|
|
6504
|
+
return /* @__PURE__ */ t.jsx(yo, { children: /* @__PURE__ */ t.jsx(mo, { api: e, children: /* @__PURE__ */ t.jsxs("div", { ...u, className: D("h-full", u.className), children: [
|
|
6494
6505
|
y === "manage-groups" ? /* @__PURE__ */ t.jsx(
|
|
6495
|
-
|
|
6506
|
+
cl,
|
|
6496
6507
|
{
|
|
6497
6508
|
onBack: () => g(f),
|
|
6498
6509
|
onSelectContact: (T) => {
|
|
@@ -6507,7 +6518,7 @@ function vl({
|
|
|
6507
6518
|
}
|
|
6508
6519
|
) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
6509
6520
|
B ? /* @__PURE__ */ t.jsx(
|
|
6510
|
-
|
|
6521
|
+
bl,
|
|
6511
6522
|
{
|
|
6512
6523
|
selectedContactId: _.view === "browse" ? _.selectedContactId : null,
|
|
6513
6524
|
highlightContactId: C,
|
|
@@ -6520,7 +6531,7 @@ function vl({
|
|
|
6520
6531
|
}
|
|
6521
6532
|
) : null,
|
|
6522
6533
|
M ? /* @__PURE__ */ t.jsx(
|
|
6523
|
-
|
|
6534
|
+
vl,
|
|
6524
6535
|
{
|
|
6525
6536
|
asSheet: p,
|
|
6526
6537
|
onNavigate: I,
|
|
@@ -6529,7 +6540,7 @@ function vl({
|
|
|
6529
6540
|
) : null
|
|
6530
6541
|
] }),
|
|
6531
6542
|
/* @__PURE__ */ t.jsx(
|
|
6532
|
-
|
|
6543
|
+
or,
|
|
6533
6544
|
{
|
|
6534
6545
|
mode: "create",
|
|
6535
6546
|
open: S,
|
|
@@ -6542,10 +6553,10 @@ function vl({
|
|
|
6542
6553
|
)
|
|
6543
6554
|
] }) }) });
|
|
6544
6555
|
}
|
|
6545
|
-
function
|
|
6546
|
-
const { config: e } = rn(), { fetch: n } =
|
|
6547
|
-
() =>
|
|
6548
|
-
|
|
6556
|
+
function Kl() {
|
|
6557
|
+
const { config: e } = rn(), { fetch: n } = Cr(), { baseUrl: r, defaultHeaders: a, onAuthError: s } = e, o = i.useMemo(
|
|
6558
|
+
() => Mr(
|
|
6559
|
+
Tr({
|
|
6549
6560
|
baseUrl: r,
|
|
6550
6561
|
fetch: n,
|
|
6551
6562
|
credentials: "include",
|
|
@@ -6566,8 +6577,8 @@ function $l() {
|
|
|
6566
6577
|
),
|
|
6567
6578
|
[r, a, s, n]
|
|
6568
6579
|
);
|
|
6569
|
-
return /* @__PURE__ */ t.jsx(
|
|
6580
|
+
return /* @__PURE__ */ t.jsx(Er, { value: o, children: /* @__PURE__ */ t.jsx(jl, { api: l }) });
|
|
6570
6581
|
}
|
|
6571
6582
|
export {
|
|
6572
|
-
|
|
6583
|
+
Kl as default
|
|
6573
6584
|
};
|