@oneb/ui-vue 0.1.21 → 0.1.23

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.
@@ -0,0 +1,764 @@
1
+ import { defineComponent as B, ref as j, provide as Y, computed as F, openBlock as t, createElementBlock as o, renderSlot as N, normalizeProps as W, guardReactiveProps as U, createCommentVNode as h, createVNode as g, Transition as Z, withCtx as I, normalizeClass as z, toDisplayString as c, inject as ee, withModifiers as te, createBlock as L, resolveDynamicComponent as P, createElementVNode as e, Fragment as $, renderList as A, mergeProps as oe, unref as C } from "vue";
2
+ import { OneAvatar as M } from "./common/index.js";
3
+ import { r as J } from "./XMarkIcon-51ef0691.js";
4
+ import { _ as ne } from "./index-f8afb6b6.js";
5
+ import { _ as K } from "./_plugin-vue_export-helper-dad06003.js";
6
+ const se = {
7
+ title: {
8
+ type: String
9
+ },
10
+ stick: {
11
+ type: String,
12
+ default: "right"
13
+ }
14
+ }, re = {
15
+ variant: {
16
+ type: String,
17
+ default: "primary"
18
+ },
19
+ label: {
20
+ type: String
21
+ },
22
+ icon: {
23
+ type: [Function, Object]
24
+ }
25
+ }, le = ["data-opened"], ie = {
26
+ key: 0,
27
+ class: "text-sm text-secondary-content px-3 py-2 text-left"
28
+ }, ce = /* @__PURE__ */ B({
29
+ __name: "OneDropdown",
30
+ props: se,
31
+ emits: ["open", "close"],
32
+ setup(f, { emit: u }) {
33
+ const v = j(!1), d = j(null), a = u, l = f, p = () => {
34
+ v.value = !v.value, v.value ? a("open") : a("close");
35
+ };
36
+ Y("OneDropdown", {
37
+ onToggle: p
38
+ });
39
+ const s = F(() => {
40
+ const n = d.value != null && d.value.getBoundingClientRect.x < 270;
41
+ return d.value != null && d.value.getBoundingClientRect().top + 270 > window.innerHeight ? "up" + (n ? "-right" : "-left") : "down" + (n ? "-right" : "-left");
42
+ }), x = F(() => {
43
+ const n = [
44
+ "absolute z-10 w-fit rounded-md bg-white",
45
+ "py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
46
+ "overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
47
+ ];
48
+ return s.value.startsWith("up") ? n.push("bottom-1 mb-10") : s.value.startsWith("down") && n.push("top-1 mt-10"), l.stick === "right" ? n.push("right-0") : l.stick === "left" && n.push("left-0"), n;
49
+ });
50
+ return (n, w) => (t(), o("div", {
51
+ class: "relative inline-block",
52
+ ref_key: "menuRef",
53
+ ref: d,
54
+ "data-opened": v.value
55
+ }, [
56
+ N(n.$slots, "button", W(U({ onToggle: p, isExpanded: v.value }))),
57
+ v.value ? (t(), o("div", {
58
+ key: 0,
59
+ class: "fixed top-0 left-0 w-screen h-screen z-10",
60
+ onClick: p
61
+ })) : h("", !0),
62
+ g(Z, {
63
+ "enter-active-class": "transition ease-out duration-100",
64
+ "enter-from-class": "transform opacity-0 scale-95",
65
+ "enter-to-class": "transform opacity-100 scale-100",
66
+ "leave-active-class": "transition ease-in duration-75",
67
+ "leave-from-class": "transform opacity-100 scale-100",
68
+ "leave-to-class": "transform opacity-0 scale-95"
69
+ }, {
70
+ default: I(() => [
71
+ v.value ? (t(), o("div", {
72
+ key: 0,
73
+ class: z(["menu", x.value]),
74
+ role: "menu",
75
+ "aria-orientation": "vertical",
76
+ tabindex: "-1"
77
+ }, [
78
+ n.title ? (t(), o("div", ie, c(n.title), 1)) : h("", !0),
79
+ N(n.$slots, "menu", W(U({ onToggle: p })))
80
+ ], 2)) : h("", !0)
81
+ ]),
82
+ _: 3
83
+ })
84
+ ], 8, le));
85
+ }
86
+ }), G = /* @__PURE__ */ B({
87
+ __name: "OneDropdownItem",
88
+ props: re,
89
+ emits: ["click"],
90
+ setup(f, { emit: u }) {
91
+ const v = u, d = f, a = ee("OneDropdown"), l = () => {
92
+ a !== void 0 && a.onToggle(), v("click");
93
+ }, p = F(() => {
94
+ const s = [];
95
+ return d.variant === "secondary" ? s.push("text-secondary-content hover:bg-secondary-body-hover") : d.variant === "danger" ? s.push("text-danger-content hover:bg-danger-10") : d.variant === "warning" ? s.push("text-warning-content hover:bg-warning-10") : d.variant === "info" ? s.push("text-info-content hover:bg-info-10") : s.push("hover:bg-secondary-body-hover"), s;
96
+ });
97
+ return (s, x) => (t(), o("button", {
98
+ class: z(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", p.value]),
99
+ onClick: te(l, ["prevent"])
100
+ }, [
101
+ s.icon ? (t(), L(P(s.icon), {
102
+ key: 0,
103
+ class: "w-4 h-4"
104
+ })) : h("", !0),
105
+ e("span", null, c(s.label), 1)
106
+ ], 2));
107
+ }
108
+ });
109
+ function ae(f, u) {
110
+ return t(), o("svg", {
111
+ xmlns: "http://www.w3.org/2000/svg",
112
+ fill: "none",
113
+ viewBox: "0 0 24 24",
114
+ "stroke-width": "1.8",
115
+ stroke: "currentColor",
116
+ "aria-hidden": "true"
117
+ }, [
118
+ e("path", {
119
+ "stroke-linecap": "round",
120
+ "stroke-linejoin": "round",
121
+ d: "M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"
122
+ })
123
+ ]);
124
+ }
125
+ const ue = {
126
+ user: {
127
+ type: Object,
128
+ required: !0
129
+ },
130
+ menu: {
131
+ type: Array,
132
+ default: () => []
133
+ },
134
+ iconSize: {
135
+ type: String,
136
+ default: "34"
137
+ },
138
+ app: {
139
+ type: Object
140
+ },
141
+ accountLabel: {
142
+ type: String,
143
+ default: "Account"
144
+ },
145
+ logoutLabel: {
146
+ type: String,
147
+ default: "Logout"
148
+ },
149
+ versionLabel: {
150
+ type: String,
151
+ default: ""
152
+ },
153
+ onAccount: {
154
+ type: Function
155
+ },
156
+ onLogout: {
157
+ type: Function
158
+ }
159
+ }, de = {
160
+ workspace: {
161
+ type: Object,
162
+ required: !0
163
+ },
164
+ workspaces: {
165
+ type: Array
166
+ },
167
+ apps: {
168
+ type: Array,
169
+ required: !0
170
+ },
171
+ iconSize: {
172
+ type: String,
173
+ default: "24"
174
+ },
175
+ appsTitle: {
176
+ type: String,
177
+ default: "Ваші додатки"
178
+ },
179
+ changeLabel: {
180
+ type: String,
181
+ default: "Керувати робочими просторами"
182
+ },
183
+ onChange: {
184
+ type: Function
185
+ },
186
+ onApp: {
187
+ type: Function
188
+ }
189
+ }, pe = {
190
+ help: {
191
+ type: Object,
192
+ required: !0
193
+ }
194
+ }, he = ["onClick"], fe = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, ve = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, me = { class: "self-center text-base font-medium tracking-wide text-black" }, xe = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, ge = { class: "text-left w-full mt-5 px-3" }, _e = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Lt = /* @__PURE__ */ B({
195
+ __name: "OneUserMenu",
196
+ props: ue,
197
+ setup(f) {
198
+ const u = f, v = F(() => {
199
+ var l;
200
+ return (l = u.menu) == null ? void 0 : l.map((p) => {
201
+ let s = { label: p.label };
202
+ p.icon != null && (s = { ...s, icon: p.icon });
203
+ const x = typeof p.click == "function" ? p.click : () => {
204
+ };
205
+ return {
206
+ key: p.label,
207
+ args: s,
208
+ click: x
209
+ };
210
+ });
211
+ }), d = () => {
212
+ typeof u.onAccount == "function" && u.onAccount();
213
+ }, a = () => {
214
+ typeof u.onLogout == "function" && u.onLogout();
215
+ };
216
+ return (l, p) => (t(), L(ce, { stick: "right" }, {
217
+ button: I(({ onToggle: s, isExpanded: x }) => {
218
+ var n, w;
219
+ return [
220
+ e("button", {
221
+ onClick: s,
222
+ class: z(["p-1 rounded-full hover:bg-secondary-10", [x ? "bg-secondary-25" : ""]])
223
+ }, [
224
+ g(M, {
225
+ text: ((n = l.user) == null ? void 0 : n.name) || "",
226
+ size: l.iconSize,
227
+ src: (w = l.user) == null ? void 0 : w.photo_url,
228
+ rounded: !0
229
+ }, null, 8, ["text", "size", "src"])
230
+ ], 10, he)
231
+ ];
232
+ }),
233
+ menu: I(() => {
234
+ var s, x, n, w, b;
235
+ return [
236
+ e("div", fe, [
237
+ g(M, {
238
+ text: ((s = l.user) == null ? void 0 : s.name) || "",
239
+ size: 80,
240
+ src: (x = l.user) == null ? void 0 : x.photo_url,
241
+ rounded: !0,
242
+ class: "mx-auto"
243
+ }, null, 8, ["text", "src"]),
244
+ e("div", ve, [
245
+ e("div", me, c((n = l.user) == null ? void 0 : n.name), 1),
246
+ e("div", xe, c((w = l.user) == null ? void 0 : w.email), 1)
247
+ ]),
248
+ typeof u.onAccount == "function" ? (t(), o("a", {
249
+ key: 0,
250
+ onClick: d,
251
+ class: "cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"
252
+ }, c(l.accountLabel), 1)) : h("", !0),
253
+ e("div", ge, [
254
+ (t(!0), o($, null, A(v.value, (k) => (t(), L(G, oe({
255
+ key: k.key,
256
+ ref_for: !0
257
+ }, k.args, {
258
+ onClick: k.click
259
+ }), null, 16, ["onClick"]))), 128)),
260
+ typeof l.onLogout == "function" ? (t(), L(G, {
261
+ key: 0,
262
+ icon: C(ae),
263
+ label: l.logoutLabel,
264
+ class: "rounded py-3",
265
+ onClick: a
266
+ }, null, 8, ["icon", "label"])) : h("", !0)
267
+ ]),
268
+ p[0] || (p[0] = e("div", {
269
+ class: "space-y-2 text-center",
270
+ style: { width: "240px" }
271
+ }, null, -1)),
272
+ e("div", _e, c((b = l.app) == null ? void 0 : b.version), 1)
273
+ ])
274
+ ];
275
+ }),
276
+ _: 1
277
+ }));
278
+ }
279
+ });
280
+ function we(f, u) {
281
+ return t(), o("svg", {
282
+ xmlns: "http://www.w3.org/2000/svg",
283
+ fill: "none",
284
+ viewBox: "0 0 24 24",
285
+ "stroke-width": "1.8",
286
+ stroke: "currentColor",
287
+ "aria-hidden": "true"
288
+ }, [
289
+ e("rect", {
290
+ width: "2.94",
291
+ height: "2.94",
292
+ x: "17.16",
293
+ y: "3.9",
294
+ fill: "currentColor",
295
+ "stroke-width": "1.8",
296
+ rx: "1.1"
297
+ }),
298
+ e("rect", {
299
+ width: "2.94",
300
+ height: "2.94",
301
+ x: "10.53",
302
+ y: "3.9",
303
+ fill: "currentColor",
304
+ "stroke-width": "1.8",
305
+ rx: "1.1"
306
+ }),
307
+ e("rect", {
308
+ width: "2.94",
309
+ height: "2.94",
310
+ x: "3.9",
311
+ y: "3.9",
312
+ fill: "currentColor",
313
+ "stroke-width": "1.8",
314
+ rx: "1.1"
315
+ }),
316
+ e("rect", {
317
+ width: "2.94",
318
+ height: "2.94",
319
+ x: "17.16",
320
+ y: "10.53",
321
+ fill: "currentColor",
322
+ "stroke-width": "1.8",
323
+ rx: "1.1"
324
+ }),
325
+ e("rect", {
326
+ width: "2.94",
327
+ height: "2.94",
328
+ x: "10.53",
329
+ y: "10.53",
330
+ fill: "currentColor",
331
+ "stroke-width": "1.8",
332
+ rx: "1.1"
333
+ }),
334
+ e("rect", {
335
+ width: "2.94",
336
+ height: "2.94",
337
+ x: "3.9",
338
+ y: "10.53",
339
+ fill: "currentColor",
340
+ "stroke-width": "1.8",
341
+ rx: "1.1"
342
+ }),
343
+ e("rect", {
344
+ width: "2.94",
345
+ height: "2.94",
346
+ x: "17.16",
347
+ y: "17.16",
348
+ fill: "currentColor",
349
+ "stroke-width": "1.8",
350
+ rx: "1.1"
351
+ }),
352
+ e("rect", {
353
+ width: "2.94",
354
+ height: "2.94",
355
+ x: "10.53",
356
+ y: "17.16",
357
+ fill: "currentColor",
358
+ "stroke-width": "1.8",
359
+ rx: "1.1"
360
+ }),
361
+ e("rect", {
362
+ width: "2.94",
363
+ height: "2.94",
364
+ x: "3.9",
365
+ y: "17.16",
366
+ fill: "currentColor",
367
+ "stroke-width": "1.8",
368
+ rx: "1.1"
369
+ })
370
+ ]);
371
+ }
372
+ function Q(f, u) {
373
+ return t(), o("svg", {
374
+ xmlns: "http://www.w3.org/2000/svg",
375
+ fill: "none",
376
+ viewBox: "0 0 24 24",
377
+ "stroke-width": "1.8",
378
+ stroke: "currentColor",
379
+ "aria-hidden": "true"
380
+ }, [
381
+ e("path", {
382
+ "stroke-linecap": "round",
383
+ "stroke-linejoin": "round",
384
+ d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
385
+ })
386
+ ]);
387
+ }
388
+ function X(f, u) {
389
+ return t(), o("svg", {
390
+ xmlns: "http://www.w3.org/2000/svg",
391
+ fill: "none",
392
+ viewBox: "0 0 24 24",
393
+ "stroke-width": "1.8",
394
+ stroke: "currentColor",
395
+ "aria-hidden": "true"
396
+ }, [
397
+ e("path", {
398
+ "stroke-linecap": "round",
399
+ "stroke-linejoin": "round",
400
+ d: "M4.5 15.75l7.5-7.5 7.5 7.5"
401
+ })
402
+ ]);
403
+ }
404
+ function ke(f, u) {
405
+ return t(), o("svg", {
406
+ xmlns: "http://www.w3.org/2000/svg",
407
+ fill: "none",
408
+ viewBox: "0 0 24 24",
409
+ "stroke-width": "1.8",
410
+ stroke: "currentColor",
411
+ "aria-hidden": "true"
412
+ }, [
413
+ e("path", {
414
+ "stroke-linecap": "round",
415
+ "stroke-linejoin": "round",
416
+ d: "M8.25 4.5l7.5 7.5-7.5 7.5"
417
+ })
418
+ ]);
419
+ }
420
+ const ye = ["data-opened"], be = {
421
+ key: 1,
422
+ class: "absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"
423
+ }, Ce = { class: "flex justify-between items-center pt-3 mb-3" }, $e = { class: "font-semibold text-xl px-3" }, Ae = { class: "grid" }, Fe = { class: "rounded-lg m-3 border" }, je = {
424
+ class: "space-x-2 flex items-center px-3 py-2",
425
+ style: { width: "300px" }
426
+ }, Le = { class: "flex justify-between relative" }, Me = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, Be = { key: 0 }, ze = { class: "text-xs font-semibold" }, Oe = { class: "px-3 py-2" }, Se = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, Ee = { class: "overflow-auto max-h-full" }, Ie = {
427
+ key: 0,
428
+ class: "space-y-2"
429
+ }, Pe = ["onClick"], He = { class: "flex" }, Te = { class: "border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center" }, Ve = { class: "pl-2" }, De = { class: "text-sm mt-1 font-semibold" }, Re = { class: "text9 mt-1" }, qe = {
430
+ key: 1,
431
+ class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"
432
+ }, Ne = /* @__PURE__ */ B({
433
+ __name: "OneBrowserMenu",
434
+ props: de,
435
+ emits: ["open", "close"],
436
+ setup(f, { emit: u }) {
437
+ const v = u, d = f, a = j(!1), l = () => {
438
+ a.value = !a.value, a.value ? v("open") : v("close");
439
+ }, p = j(!1);
440
+ F(() => p.value ? X : Q);
441
+ const s = () => {
442
+ typeof d.onChange == "function" && d.onChange();
443
+ }, x = (n) => {
444
+ typeof d.onApp == "function" && d.onApp(n);
445
+ };
446
+ return (n, w) => {
447
+ var b, k, O, i, _, y;
448
+ return t(), o("div", { "data-opened": a.value }, [
449
+ e("button", {
450
+ onClick: l,
451
+ class: z(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10", { "bg-secondary-10": a.value }])
452
+ }, [
453
+ g(C(we), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
454
+ ], 2),
455
+ a.value ? (t(), o("div", {
456
+ key: 0,
457
+ class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",
458
+ onClick: l
459
+ })) : h("", !0),
460
+ a.value ? (t(), o("div", be, [
461
+ e("div", Ce, [
462
+ e("div", $e, c((b = n.workspace) == null ? void 0 : b.title), 1),
463
+ g(C(J), {
464
+ class: "w-6 cursor-pointer",
465
+ onClick: l
466
+ })
467
+ ]),
468
+ e("div", Ae, [
469
+ e("div", Fe, [
470
+ e("div", je, [
471
+ e("div", Le, [
472
+ g(M, {
473
+ text: ((k = n.workspace) == null ? void 0 : k.name) || "",
474
+ src: (O = n.workspace) == null ? void 0 : O.photo_url,
475
+ size: 44,
476
+ rounded: !1,
477
+ class: "mx-auto"
478
+ }, null, 8, ["text", "src"])
479
+ ]),
480
+ e("div", Me, c((i = n.workspace) == null ? void 0 : i.name), 1)
481
+ ]),
482
+ p.value ? (t(), o("div", Be, [
483
+ (t(!0), o($, null, A(n.workspaces, (m) => (t(), o("div", {
484
+ key: m.name,
485
+ class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
486
+ }, [
487
+ g(M, {
488
+ text: m.name,
489
+ src: m.photo_url,
490
+ size: 30,
491
+ rounded: !1
492
+ }, null, 8, ["text", "src"]),
493
+ e("span", ze, c(m.name), 1)
494
+ ]))), 128))
495
+ ])) : h("", !0),
496
+ w[0] || (w[0] = e("hr", null, null, -1)),
497
+ e("div", {
498
+ onClick: s,
499
+ class: "text-center py-2 cursor-pointer",
500
+ style: { "font-size": "10px" }
501
+ }, c((_ = n.workspace) == null ? void 0 : _.changeLabel), 1)
502
+ ])
503
+ ]),
504
+ e("div", Oe, [
505
+ e("div", Se, c((y = n.workspace) == null ? void 0 : y.appsLabel), 1),
506
+ e("div", Ee, [
507
+ n.apps && n.apps.length ? (t(), o("div", Ie, [
508
+ (t(!0), o($, null, A(n.apps, (m) => (t(), o("div", {
509
+ key: m.id,
510
+ onClick: (S) => x(m),
511
+ class: "flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"
512
+ }, [
513
+ e("div", He, [
514
+ e("div", Te, [
515
+ g(M, {
516
+ text: m.name,
517
+ src: m.photo_url,
518
+ size: 44,
519
+ rounded: !1
520
+ }, null, 8, ["text", "src"])
521
+ ]),
522
+ e("div", Ve, [
523
+ e("p", De, c(m.name), 1),
524
+ e("p", Re, c(m == null ? void 0 : m.short), 1)
525
+ ])
526
+ ]),
527
+ e("div", null, [
528
+ g(ne, {
529
+ variant: "touch",
530
+ icon: C(ke),
531
+ onClick: (S) => x(m)
532
+ }, null, 8, ["icon", "onClick"])
533
+ ])
534
+ ], 8, Pe))), 128))
535
+ ])) : h("", !0),
536
+ n.apps && n.apps.length ? (t(), o("button", qe, c("Дивитися всі"))) : h("", !0)
537
+ ])
538
+ ])
539
+ ])) : h("", !0)
540
+ ], 8, ye);
541
+ };
542
+ }
543
+ });
544
+ const Mt = /* @__PURE__ */ K(Ne, [["__scopeId", "data-v-4936d4e4"]]);
545
+ function We(f, u) {
546
+ return t(), o("svg", {
547
+ xmlns: "http://www.w3.org/2000/svg",
548
+ fill: "none",
549
+ viewBox: "0 0 24 24",
550
+ "stroke-width": "1.8",
551
+ stroke: "currentColor",
552
+ "aria-hidden": "true"
553
+ }, [
554
+ e("path", {
555
+ "stroke-linecap": "round",
556
+ "stroke-linejoin": "round",
557
+ d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"
558
+ })
559
+ ]);
560
+ }
561
+ function Ue(f, u) {
562
+ return t(), o("svg", {
563
+ xmlns: "http://www.w3.org/2000/svg",
564
+ fill: "none",
565
+ viewBox: "0 0 24 24",
566
+ "stroke-width": "1.8",
567
+ stroke: "currentColor",
568
+ "aria-hidden": "true"
569
+ }, [
570
+ e("path", {
571
+ "stroke-linecap": "round",
572
+ "stroke-linejoin": "round",
573
+ d: "M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
574
+ }),
575
+ e("path", {
576
+ "stroke-linecap": "round",
577
+ "stroke-linejoin": "round",
578
+ d: "M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"
579
+ })
580
+ ]);
581
+ }
582
+ function Ge(f, u) {
583
+ return t(), o("svg", {
584
+ xmlns: "http://www.w3.org/2000/svg",
585
+ fill: "none",
586
+ viewBox: "0 0 24 24",
587
+ "stroke-width": "1.8",
588
+ stroke: "currentColor",
589
+ "aria-hidden": "true"
590
+ }, [
591
+ e("path", {
592
+ "stroke-linecap": "round",
593
+ "stroke-linejoin": "round",
594
+ d: "M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"
595
+ })
596
+ ]);
597
+ }
598
+ const Je = ["data-opened"], Ke = {
599
+ key: 1,
600
+ class: "absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"
601
+ }, Qe = { class: "flex justify-between items-center pt-3 mb-3" }, Xe = { class: "font-semibold text-xl px-3" }, Ye = {
602
+ key: 0,
603
+ class: "grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"
604
+ }, Ze = ["onClick"], et = { class: "uppercase text-[8px]" }, tt = { class: "overflow-y-auto grid rounded-tl-xl" }, ot = { class: "max-h-full bg-[#FAFAFA] rounded-t-xl" }, nt = {
605
+ key: 0,
606
+ class: "space-y-2"
607
+ }, st = ["onClick"], rt = { class: "flex" }, lt = { class: "pl-2" }, it = { class: "text-sm mt-1 font-semibold" }, ct = { class: "text-[10px] mt-1 text-[#979CA9]" }, at = { class: "mt-auto" }, ut = { key: 0 }, dt = ["onClick"], pt = { class: "flex items-center space-x-3" }, ht = { class: "h-16" }, ft = {
608
+ key: 0,
609
+ class: "bg-[#FAFAFA] rounded-lg p-3"
610
+ }, vt = { class: "flex justify-between" }, mt = ["onClick"], xt = {
611
+ key: 0,
612
+ class: "tooltip-text min-w-[70px]"
613
+ }, gt = { class: "flex justify-between mb-4" }, _t = ["href"], wt = { class: "flex flex-nowrap items-center w-max h-[24px]" }, kt = { class: "whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]" }, yt = { class: "py-[8px] pl-0 pr-[8px]" }, bt = /* @__PURE__ */ B({
614
+ __name: "OneHelpMenu",
615
+ props: pe,
616
+ emits: ["open", "close"],
617
+ setup(f, { emit: u }) {
618
+ const v = u, d = f, a = j(!1), l = () => {
619
+ a.value = !a.value, a.value ? v("open") : v("close");
620
+ }, p = F(() => k.value ? X : Q), s = j(3), x = F(() => {
621
+ var _, y;
622
+ const i = ((y = (_ = d.help) == null ? void 0 : _.helpList) == null ? void 0 : y.length) || 0;
623
+ return s.value === i;
624
+ }), n = F(() => {
625
+ var _;
626
+ return (((_ = d.help) == null ? void 0 : _.helpList) || []).slice(0, s.value);
627
+ }), w = () => {
628
+ var _, y;
629
+ const i = ((y = (_ = d.help) == null ? void 0 : _.helpList) == null ? void 0 : y.length) || 0;
630
+ s.value = x.value ? 3 : i;
631
+ }, b = (i) => {
632
+ i && window.open(i, "_blank");
633
+ }, k = j(!1), O = () => {
634
+ k.value = !k.value;
635
+ };
636
+ return (i, _) => {
637
+ var y, m, S, H, T, V, D, R, q;
638
+ return t(), o("div", { "data-opened": a.value }, [
639
+ e("button", {
640
+ onClick: l,
641
+ class: z(["p-1 w-[44px] h-[44px] rounded-md hover:bg-secondary-10", { "bg-secondary-10": a.value }])
642
+ }, [
643
+ g(C(We), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
644
+ ], 2),
645
+ a.value ? (t(), o("div", {
646
+ key: 0,
647
+ class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",
648
+ onClick: l
649
+ })) : h("", !0),
650
+ a.value ? (t(), o("div", Ke, [
651
+ e("div", Qe, [
652
+ e("div", Xe, c((y = i.help) == null ? void 0 : y.label), 1),
653
+ g(C(J), {
654
+ class: "w-6 cursor-pointer",
655
+ onClick: l
656
+ })
657
+ ]),
658
+ (m = i.help) != null && m.helpButton ? (t(), o("div", Ye, [
659
+ (t(!0), o($, null, A((S = i.help) == null ? void 0 : S.helpButton, (r) => (t(), o("button", {
660
+ key: r.name,
661
+ onClick: (E) => b(r.link),
662
+ class: "grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"
663
+ }, [
664
+ e("div", null, [
665
+ (t(), L(P(r == null ? void 0 : r.icon), { class: "w-[16px] h-[16px] mx-auto" }))
666
+ ]),
667
+ e("span", et, c(r.name), 1)
668
+ ], 8, Ze))), 128))
669
+ ])) : h("", !0),
670
+ e("div", tt, [
671
+ e("div", ot, [
672
+ (H = i.help) != null && H.helpList && i.help.helpList.length ? (t(), o("div", nt, [
673
+ (t(!0), o($, null, A(n.value, (r) => (t(), o("div", {
674
+ key: r.id,
675
+ onClick: (E) => b(r.link),
676
+ class: "flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"
677
+ }, [
678
+ e("div", rt, [
679
+ e("div", lt, [
680
+ e("p", it, c(r.name), 1),
681
+ e("p", ct, c(r.inf) + "/" + c(r.name), 1)
682
+ ])
683
+ ])
684
+ ], 8, st))), 128))
685
+ ])) : h("", !0)
686
+ ])
687
+ ]),
688
+ (T = i.help) != null && T.helpList && i.help.helpList.length > 3 ? (t(), o("button", {
689
+ key: 1,
690
+ onClick: w,
691
+ class: "h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"
692
+ }, c(x.value ? i.help.buttNoMore : i.help.buttMore), 1)) : h("", !0),
693
+ e("div", at, [
694
+ (V = i.help) != null && V.video ? (t(), o("div", ut, [
695
+ (t(!0), o($, null, A(i.help.video, (r) => (t(), o("button", {
696
+ key: r.id,
697
+ onClick: (E) => b(r.link),
698
+ class: "flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"
699
+ }, [
700
+ g(C(Ue), { class: "w-6 h-6" }),
701
+ e("span", null, c(r.name), 1)
702
+ ], 8, dt))), 128))
703
+ ])) : h("", !0),
704
+ (D = i.help) != null && D.socialList ? (t(), o("button", {
705
+ key: 1,
706
+ onClick: O,
707
+ class: "flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"
708
+ }, [
709
+ e("div", pt, [
710
+ g(C(Ge), { class: "w-6 h-6" }),
711
+ e("span", null, c(i.help.socialButt), 1)
712
+ ]),
713
+ g(C(p), { class: "w-4 h-4" })
714
+ ])) : h("", !0),
715
+ e("div", ht, [
716
+ k.value ? (t(), o("div", ft, [
717
+ e("div", vt, [
718
+ (t(!0), o($, null, A((R = i.help) == null ? void 0 : R.socialList, (r) => (t(), o("button", {
719
+ key: r.id,
720
+ onClick: (E) => b(r.link),
721
+ class: "flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"
722
+ }, [
723
+ e("div", null, [
724
+ r.name ? (t(), o("div", xt, c(r.name), 1)) : h("", !0),
725
+ (t(), L(P(r == null ? void 0 : r.icon), { class: "w-[24px] h-[24px] mx-auto" }))
726
+ ])
727
+ ], 8, mt))), 128))
728
+ ])
729
+ ])) : h("", !0)
730
+ ]),
731
+ e("div", gt, [
732
+ (t(!0), o($, null, A((q = i.help) == null ? void 0 : q.termsOffer, (r) => (t(), o("a", {
733
+ key: r.name,
734
+ target: "_blank",
735
+ href: r.link,
736
+ class: "ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"
737
+ }, [
738
+ e("div", wt, [
739
+ e("div", kt, [
740
+ e("span", yt, c(r.name), 1)
741
+ ])
742
+ ])
743
+ ], 8, _t))), 128))
744
+ ])
745
+ ])
746
+ ])) : h("", !0)
747
+ ], 8, Je);
748
+ };
749
+ }
750
+ });
751
+ const Bt = /* @__PURE__ */ K(bt, [["__scopeId", "data-v-94a995fe"]]);
752
+ export {
753
+ Mt as O,
754
+ ce as _,
755
+ G as a,
756
+ Lt as b,
757
+ Bt as c,
758
+ Q as d,
759
+ ke as e,
760
+ Ge as f,
761
+ de as g,
762
+ we as h,
763
+ X as r
764
+ };