@oneb/ui-vue 0.4.3 → 0.4.6
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/OneDropdownAuto.vue_vue_type_script_setup_true_lang-06aedc97.cjs +1 -0
- package/dist/{OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js → OneDropdownAuto.vue_vue_type_script_setup_true_lang-89baa790.js} +13 -14
- package/dist/OneHelpMenu-457f1517.cjs +1 -0
- package/dist/{OneHelpMenu-2a2051d7.js → OneHelpMenu-fb4ee252.js} +65 -48
- package/dist/buttonGroup/index.cjs +1 -1
- package/dist/buttonGroup/index.js +6 -5
- package/dist/dataTable/index.cjs +1 -1
- package/dist/dataTable/index.js +7 -1
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +93 -77
- package/dist/errorsPage/index.cjs +1 -1
- package/dist/errorsPage/index.js +49 -46
- package/dist/index.cjs +1 -1
- package/dist/index.js +232 -233
- package/dist/infobox/index.cjs +1 -1
- package/dist/infobox/index.js +6 -4
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +15 -15
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +22 -18
- package/dist/style.css +1 -1
- package/dist/toast/index.cjs +1 -1
- package/dist/toast/index.js +1 -0
- package/dist/userList/index.cjs +1 -1
- package/dist/userList/index.js +5 -6
- package/package.json +1 -2
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +0 -1
- package/dist/OneHelpMenu-78d9348a.cjs +0 -1
package/dist/dropdown/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { openBlock as l, createElementBlock as s, defineComponent as ae, computed as I, ref as A, createBlock as G, withCtx as S, createElementVNode as t, normalizeClass as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { d as
|
|
4
|
-
import { O as
|
|
5
|
-
import { _ as
|
|
1
|
+
import { openBlock as l, createElementBlock as s, defineComponent as ae, computed as I, ref as A, createBlock as G, withCtx as S, createElementVNode as t, normalizeClass as y, createVNode as U, unref as v, normalizeStyle as H, toDisplayString as u, Fragment as x, renderList as B, createCommentVNode as p, onMounted as ce, onUnmounted as ve, watch as me, renderSlot as K, normalizeProps as ee, guardReactiveProps as te, withDirectives as oe, vModelText as le, mergeProps as P, createTextVNode as se, nextTick as N } from "vue";
|
|
2
|
+
import { _ as ye } from "../_plugin-vue_export-helper-dad06003.js";
|
|
3
|
+
import { d as he, _ as fe, r as we } from "../OneHelpMenu-fb4ee252.js";
|
|
4
|
+
import { O as Tt, a as Xt, c as Yt, b as Zt } from "../OneHelpMenu-fb4ee252.js";
|
|
5
|
+
import { _ as be } from "../OneDropdownAuto.vue_vue_type_script_setup_true_lang-89baa790.js";
|
|
6
6
|
import { _ as re } from "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
|
|
7
7
|
import { useOnebI18n as ie } from "../i18n/index.js";
|
|
8
|
-
import { b as
|
|
9
|
-
import { O as
|
|
8
|
+
import { b as ke } from "../dropdown-c81fb945.js";
|
|
9
|
+
import { O as ge } from "../OneModal-02a9a173.js";
|
|
10
10
|
import { u as xe } from "../useModal-6a5d870b.js";
|
|
11
11
|
import "@floating-ui/dom";
|
|
12
|
-
import "@floating-ui/vue";
|
|
13
12
|
import "../XMarkIcon-51ef0691.js";
|
|
14
13
|
import "../ChevronDownIcon-6805ce6c.js";
|
|
15
14
|
import "../ChevronUpIcon-c43f27a9.js";
|
|
@@ -19,31 +18,32 @@ import "../SpinnerIcon-516264ba.js";
|
|
|
19
18
|
import "../useIsMobile-98fc0cf9.js";
|
|
20
19
|
import "../useMediaQuery-77a19b18.js";
|
|
21
20
|
const Ce = {}, _e = { class: "border-t border-secondary-stroke my-1" };
|
|
22
|
-
function $e(D,
|
|
21
|
+
function $e(D, b) {
|
|
23
22
|
return l(), s("div", _e);
|
|
24
23
|
}
|
|
25
|
-
const
|
|
24
|
+
const Nt = /* @__PURE__ */ ye(Ce, [["render", $e]]), Me = ["onClick"], Ve = { class: "grid" }, Ke = { class: "font-semibold px-3" }, Ae = { class: "rounded-lg m-3 border" }, Ie = {
|
|
26
25
|
class: "space-x-2 flex items-center px-3 py-2",
|
|
27
26
|
style: { width: "300px" }
|
|
28
27
|
}, je = { class: "flex-shrink-0" }, Oe = { class: "w-full text-left" }, Be = { class: "flex-shrink-0" }, Le = { class: "px-3 py-2" }, Se = { class: "text-secondary-content text-left pb-1 text-sm uppercase" }, De = {
|
|
29
28
|
key: 0,
|
|
30
29
|
class: "space-y-2"
|
|
31
|
-
}, ze = ["onClick"], Ee = { class: "pl-2" }, Fe = { class: "text-sm mt-1" }, Re = { class: "text-xs mt-1" }, ne = 3,
|
|
30
|
+
}, ze = ["onClick"], Ee = { class: "pl-2" }, Fe = { class: "text-sm mt-1" }, Re = { class: "text-xs mt-1" }, ne = 3, Gt = /* @__PURE__ */ ae({
|
|
32
31
|
__name: "OneBrowserMenuGrid",
|
|
33
|
-
props:
|
|
32
|
+
props: he,
|
|
34
33
|
setup(D) {
|
|
35
|
-
const
|
|
36
|
-
typeof
|
|
37
|
-
}, $ = A(!1), M = I(() =>
|
|
34
|
+
const b = D, n = ie(), h = I(() => b.t ?? n), C = () => {
|
|
35
|
+
typeof b.onChange == "function" && b.onChange();
|
|
36
|
+
}, $ = A(!1), M = I(() => b.apps ? $.value ? b.apps : b.apps.slice(0, ne) : []), k = () => {
|
|
38
37
|
$.value = !$.value;
|
|
39
38
|
}, z = (m) => {
|
|
40
|
-
typeof
|
|
39
|
+
typeof b.onApp == "function" && b.onApp(m);
|
|
41
40
|
};
|
|
42
41
|
return (m, c) => (l(), G(fe, { stick: "right" }, {
|
|
43
42
|
button: S(({ onToggle: i, isExpanded: j }) => [
|
|
44
43
|
t("button", {
|
|
44
|
+
type: "button",
|
|
45
45
|
onClick: i,
|
|
46
|
-
class:
|
|
46
|
+
class: y(["p-1 rounded-md hover:bg-secondary-10", [j ? "bg-secondary-25" : ""]])
|
|
47
47
|
}, [
|
|
48
48
|
U(v(we), {
|
|
49
49
|
class: "text-secondary-base",
|
|
@@ -55,7 +55,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
55
55
|
var i, j, E;
|
|
56
56
|
return [
|
|
57
57
|
t("div", Ve, [
|
|
58
|
-
t("div", Ke, u(
|
|
58
|
+
t("div", Ke, u(h.value("ui.layout.workspaces")), 1),
|
|
59
59
|
t("div", Ae, [
|
|
60
60
|
t("div", Ie, [
|
|
61
61
|
t("div", je, [
|
|
@@ -70,16 +70,17 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
70
70
|
t("div", Oe, u((E = m.workspace) == null ? void 0 : E.name), 1),
|
|
71
71
|
t("div", Be, [
|
|
72
72
|
t("button", {
|
|
73
|
+
type: "button",
|
|
73
74
|
class: "text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",
|
|
74
75
|
onClick: C
|
|
75
|
-
}, u(
|
|
76
|
+
}, u(h.value("ui.layout.change_workspace")), 1)
|
|
76
77
|
])
|
|
77
78
|
]),
|
|
78
79
|
c[0] || (c[0] = t("hr", null, null, -1))
|
|
79
80
|
])
|
|
80
81
|
]),
|
|
81
82
|
t("div", Le, [
|
|
82
|
-
t("div", Se, u(
|
|
83
|
+
t("div", Se, u(h.value("ui.layout.apps")), 1),
|
|
83
84
|
t("div", null, [
|
|
84
85
|
m.apps && m.apps.length ? (l(), s("div", De, [
|
|
85
86
|
(l(!0), s(x, null, B(M.value, (_) => (l(), s("div", {
|
|
@@ -101,9 +102,10 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
101
102
|
])) : p("", !0),
|
|
102
103
|
m.apps && m.apps.length > ne ? (l(), s("button", {
|
|
103
104
|
key: 1,
|
|
104
|
-
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: k,
|
|
105
107
|
class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"
|
|
106
|
-
}, u($.value ?
|
|
108
|
+
}, u($.value ? h.value("ui.layout.hide") : h.value("ui.layout.view_all")), 1)) : p("", !0)
|
|
107
109
|
])
|
|
108
110
|
])
|
|
109
111
|
];
|
|
@@ -178,7 +180,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
178
180
|
key: 4,
|
|
179
181
|
class: "overflow-auto h-[60dvh] divide-y",
|
|
180
182
|
role: "listbox"
|
|
181
|
-
},
|
|
183
|
+
}, yt = ["aria-selected"], ht = {
|
|
182
184
|
key: 0,
|
|
183
185
|
xmlns: "http://www.w3.org/2000/svg",
|
|
184
186
|
fill: "none",
|
|
@@ -192,7 +194,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
192
194
|
}, wt = {
|
|
193
195
|
key: 0,
|
|
194
196
|
class: "px-3 pt-3 pb-2 text-xs font-semibold text-gray-400 uppercase tracking-wide"
|
|
195
|
-
},
|
|
197
|
+
}, bt = ["aria-selected", "onClick"], kt = {
|
|
196
198
|
key: 0,
|
|
197
199
|
xmlns: "http://www.w3.org/2000/svg",
|
|
198
200
|
fill: "none",
|
|
@@ -200,7 +202,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
200
202
|
"stroke-width": "1.5",
|
|
201
203
|
stroke: "currentColor",
|
|
202
204
|
class: "w-5 h-5 text-blue-600 shrink-0"
|
|
203
|
-
},
|
|
205
|
+
}, gt = {
|
|
204
206
|
key: 1,
|
|
205
207
|
class: "w-5 h-5 shrink-0"
|
|
206
208
|
}, xt = ["aria-selected", "onClick"], Ct = {
|
|
@@ -217,12 +219,12 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
217
219
|
}, $t = {
|
|
218
220
|
key: 3,
|
|
219
221
|
class: "px-3 py-8 text-sm text-gray-500 text-center"
|
|
220
|
-
},
|
|
222
|
+
}, Ht = /* @__PURE__ */ ae({
|
|
221
223
|
__name: "OneDropdownSelect",
|
|
222
|
-
props:
|
|
224
|
+
props: ke,
|
|
223
225
|
emits: ["update:modelValue", "search", "create"],
|
|
224
|
-
setup(D, { emit:
|
|
225
|
-
const n = D,
|
|
226
|
+
setup(D, { emit: b }) {
|
|
227
|
+
const n = D, h = ie(), C = b, $ = A(!1);
|
|
226
228
|
let M = null;
|
|
227
229
|
ce(() => {
|
|
228
230
|
M = window.matchMedia("(max-width: 767px)"), $.value = M.matches;
|
|
@@ -233,8 +235,8 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
233
235
|
M == null || M.removeEventListener("change", e);
|
|
234
236
|
});
|
|
235
237
|
});
|
|
236
|
-
const
|
|
237
|
-
c.value = "", i.value = -1,
|
|
238
|
+
const k = xe(), z = A(null), m = () => {
|
|
239
|
+
c.value = "", i.value = -1, k.open(), N(() => {
|
|
238
240
|
var e;
|
|
239
241
|
(e = z.value) == null || e.focus();
|
|
240
242
|
});
|
|
@@ -258,7 +260,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
258
260
|
d || (d = { label: w, entries: [] }, o.set(w, d), e.push(d)), d.entries.push({ item: r, flatIndex: a }), a++;
|
|
259
261
|
}
|
|
260
262
|
return e;
|
|
261
|
-
}),
|
|
263
|
+
}), g = I(() => n.multiple ? (n.modelValue ?? []).length > 0 : n.modelValue !== null && n.modelValue !== void 0), R = I(() => {
|
|
262
264
|
if (n.multiple) {
|
|
263
265
|
const e = n.modelValue ?? [];
|
|
264
266
|
return e.length === 0 ? n.placeholder : e.length === 1 ? e[0][n.labelKey] ?? n.placeholder : `${e[0][n.labelKey]} +${e.length - 1}`;
|
|
@@ -321,16 +323,17 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
321
323
|
return me(c, () => {
|
|
322
324
|
i.value = 0;
|
|
323
325
|
}), (e, o) => $.value ? (l(), s(x, { key: 1 }, [
|
|
324
|
-
K(e.$slots, "button", ee(te({ onToggle: m, isExpanded: v(
|
|
326
|
+
K(e.$slots, "button", ee(te({ onToggle: m, isExpanded: v(k).isOpened.value, selectedLabel: R.value })), () => [
|
|
325
327
|
t("button", {
|
|
326
|
-
|
|
328
|
+
type: "button",
|
|
329
|
+
class: y(["inline-flex items-center justify-between gap-2 text-sm transition-colors", [
|
|
327
330
|
e.view === "pill" ? "rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700" : "rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]"
|
|
328
331
|
]]),
|
|
329
332
|
style: H(e.maxWidth ? { maxWidth: e.maxWidth } : void 0),
|
|
330
333
|
onClick: m
|
|
331
334
|
}, [
|
|
332
335
|
t("span", {
|
|
333
|
-
class:
|
|
336
|
+
class: y(["truncate", e.view === "pill" ? "" : g.value ? "text-gray-900" : "text-gray-500"])
|
|
334
337
|
}, u(R.value), 3),
|
|
335
338
|
o[12] || (o[12] = t("svg", {
|
|
336
339
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -348,9 +351,9 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
348
351
|
], -1))
|
|
349
352
|
], 6)
|
|
350
353
|
]),
|
|
351
|
-
v(
|
|
354
|
+
v(k).isOpened.value ? (l(), G(v(ge), {
|
|
352
355
|
key: 0,
|
|
353
|
-
useModal: v(
|
|
356
|
+
useModal: v(k),
|
|
354
357
|
title: e.title || e.placeholder,
|
|
355
358
|
size: "sm",
|
|
356
359
|
classModal: !0,
|
|
@@ -389,8 +392,9 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
389
392
|
])) : p("", !0),
|
|
390
393
|
e.createLabel ? (l(), s("div", pt, [
|
|
391
394
|
t("button", {
|
|
395
|
+
type: "button",
|
|
392
396
|
class: "w-full flex items-center justify-center gap-2 py-2 text-sm text-blue-700 hover:text-blue-500",
|
|
393
|
-
onClick: o[3] || (o[3] = (a) => Y(() => v(
|
|
397
|
+
onClick: o[3] || (o[3] = (a) => Y(() => v(k).close()))
|
|
394
398
|
}, [
|
|
395
399
|
o[14] || (o[14] = t("svg", {
|
|
396
400
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -411,26 +415,29 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
411
415
|
])) : p("", !0),
|
|
412
416
|
e.multiple ? (l(), s("div", ct, [
|
|
413
417
|
t("button", {
|
|
418
|
+
type: "button",
|
|
414
419
|
class: "text-sm text-blue-600 hover:text-blue-800 transition-colors",
|
|
415
420
|
onClick: T
|
|
416
|
-
}, u(v(
|
|
417
|
-
|
|
421
|
+
}, u(v(h)("ui.dropdown.selectAll")), 1),
|
|
422
|
+
g.value ? (l(), s("button", {
|
|
418
423
|
key: 0,
|
|
424
|
+
type: "button",
|
|
419
425
|
class: "text-sm text-gray-500 hover:text-gray-700 transition-colors",
|
|
420
426
|
onClick: X
|
|
421
|
-
}, u(v(
|
|
427
|
+
}, u(v(h)("ui.dropdown.clear")), 1)) : p("", !0)
|
|
422
428
|
])) : p("", !0),
|
|
423
429
|
e.isLoading ? (l(), s("div", vt, [...o[15] || (o[15] = [
|
|
424
430
|
t("div", { class: "animate-spin w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full" }, null, -1)
|
|
425
431
|
])])) : (l(), s("div", mt, [
|
|
426
432
|
e.allowEmpty ? (l(), s("button", {
|
|
427
433
|
key: 0,
|
|
428
|
-
|
|
434
|
+
type: "button",
|
|
435
|
+
class: y(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors", g.value ? "" : "bg-gray-50 font-medium"]),
|
|
429
436
|
role: "option",
|
|
430
|
-
"aria-selected": !
|
|
431
|
-
onClick: o[4] || (o[4] = (a) => V(null, () => v(
|
|
437
|
+
"aria-selected": !g.value,
|
|
438
|
+
onClick: o[4] || (o[4] = (a) => V(null, () => v(k).close()))
|
|
432
439
|
}, [
|
|
433
|
-
|
|
440
|
+
g.value ? (l(), s("span", ft)) : (l(), s("svg", ht, [...o[16] || (o[16] = [
|
|
434
441
|
t("path", {
|
|
435
442
|
"stroke-linecap": "round",
|
|
436
443
|
"stroke-linejoin": "round",
|
|
@@ -438,35 +445,37 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
438
445
|
}, null, -1)
|
|
439
446
|
])])),
|
|
440
447
|
t("span", null, u(e.emptyLabel ?? e.placeholder), 1)
|
|
441
|
-
], 10,
|
|
448
|
+
], 10, yt)) : p("", !0),
|
|
442
449
|
e.groupKey ? (l(!0), s(x, { key: 1 }, B(q.value, (a) => (l(), s(x, {
|
|
443
450
|
key: a.label
|
|
444
451
|
}, [
|
|
445
452
|
a.label ? (l(), s("div", wt, u(a.label), 1)) : p("", !0),
|
|
446
453
|
(l(!0), s(x, null, B(a.entries, (r) => (l(), s("button", {
|
|
454
|
+
type: "button",
|
|
447
455
|
key: r.item[e.valueKey],
|
|
448
|
-
class:
|
|
456
|
+
class: y(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", f(r.item) ? "bg-gray-50 font-medium" : ""]),
|
|
449
457
|
role: "option",
|
|
450
458
|
"aria-selected": f(r.item),
|
|
451
|
-
onClick: (w) => V(r.item, () => v(
|
|
459
|
+
onClick: (w) => V(r.item, () => v(k).close())
|
|
452
460
|
}, [
|
|
453
|
-
f(r.item) ? (l(), s("svg",
|
|
461
|
+
f(r.item) ? (l(), s("svg", kt, [...o[17] || (o[17] = [
|
|
454
462
|
t("path", {
|
|
455
463
|
"stroke-linecap": "round",
|
|
456
464
|
"stroke-linejoin": "round",
|
|
457
465
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
458
466
|
}, null, -1)
|
|
459
|
-
])])) : (l(), s("span",
|
|
467
|
+
])])) : (l(), s("span", gt)),
|
|
460
468
|
K(e.$slots, "item", P({ ref_for: !0 }, { item: r.item }), () => [
|
|
461
469
|
t("span", null, u(r.item[e.labelKey]), 1)
|
|
462
470
|
])
|
|
463
|
-
], 10,
|
|
471
|
+
], 10, bt))), 128))
|
|
464
472
|
], 64))), 128)) : (l(!0), s(x, { key: 2 }, B(O.value, (a) => (l(), s("button", {
|
|
473
|
+
type: "button",
|
|
465
474
|
key: a[e.valueKey],
|
|
466
|
-
class:
|
|
475
|
+
class: y(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", f(a) ? "bg-gray-50 font-medium" : ""]),
|
|
467
476
|
role: "option",
|
|
468
477
|
"aria-selected": f(a),
|
|
469
|
-
onClick: (r) => V(a, () => v(
|
|
478
|
+
onClick: (r) => V(a, () => v(k).close())
|
|
470
479
|
}, [
|
|
471
480
|
f(a) ? (l(), s("svg", Ct, [...o[18] || (o[18] = [
|
|
472
481
|
t("path", {
|
|
@@ -481,7 +490,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
481
490
|
], 10, xt))), 128)),
|
|
482
491
|
O.value.length === 0 && !e.allowEmpty ? (l(), s("div", $t, [
|
|
483
492
|
K(e.$slots, "empty", {}, () => [
|
|
484
|
-
se(u(v(
|
|
493
|
+
se(u(v(h)("ui.dropdown.nothingFound")), 1)
|
|
485
494
|
])
|
|
486
495
|
])) : p("", !0)
|
|
487
496
|
]))
|
|
@@ -489,7 +498,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
489
498
|
]),
|
|
490
499
|
_: 3
|
|
491
500
|
}, 8, ["useModal", "title"])) : p("", !0)
|
|
492
|
-
], 64)) : (l(), G(
|
|
501
|
+
], 64)) : (l(), G(be, {
|
|
493
502
|
key: 0,
|
|
494
503
|
stick: e.stick,
|
|
495
504
|
onOpen: ue,
|
|
@@ -498,7 +507,8 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
498
507
|
button: S(({ onToggle: a, isExpanded: r }) => [
|
|
499
508
|
K(e.$slots, "button", ee(te({ onToggle: a, isExpanded: r, selectedLabel: R.value })), () => [
|
|
500
509
|
t("button", {
|
|
501
|
-
|
|
510
|
+
type: "button",
|
|
511
|
+
class: y(["inline-flex items-center justify-between gap-2 text-sm transition-colors", [
|
|
502
512
|
e.view === "pill" ? "rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700" : "rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]",
|
|
503
513
|
e.view === "default" && r ? "ring-1 ring-blue-500 border-blue-500" : ""
|
|
504
514
|
]]),
|
|
@@ -506,7 +516,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
506
516
|
onClick: a
|
|
507
517
|
}, [
|
|
508
518
|
t("span", {
|
|
509
|
-
class:
|
|
519
|
+
class: y(["truncate", e.view === "pill" ? "" : g.value ? "text-gray-900" : "text-gray-500"])
|
|
510
520
|
}, u(R.value), 3),
|
|
511
521
|
(l(), s("svg", {
|
|
512
522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -514,7 +524,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
514
524
|
viewBox: "0 0 24 24",
|
|
515
525
|
"stroke-width": "1.5",
|
|
516
526
|
stroke: "currentColor",
|
|
517
|
-
class:
|
|
527
|
+
class: y(["w-4 h-4 text-gray-400 transition-transform shrink-0", r ? "rotate-180" : ""])
|
|
518
528
|
}, [...o[5] || (o[5] = [
|
|
519
529
|
t("path", {
|
|
520
530
|
"stroke-linecap": "round",
|
|
@@ -562,6 +572,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
562
572
|
])) : p("", !0),
|
|
563
573
|
e.createLabel ? (l(), s("div", qe, [
|
|
564
574
|
t("button", {
|
|
575
|
+
type: "button",
|
|
565
576
|
class: "flex items-center gap-2 w-full px-3 py-2 text-sm text-blue-700 hover:bg-gray-50 transition-colors",
|
|
566
577
|
onClick: (r) => Y(a)
|
|
567
578
|
}, [
|
|
@@ -584,14 +595,16 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
584
595
|
])) : p("", !0),
|
|
585
596
|
e.multiple ? (l(), s("div", Te, [
|
|
586
597
|
t("button", {
|
|
598
|
+
type: "button",
|
|
587
599
|
class: "text-xs text-blue-600 hover:text-blue-800 transition-colors",
|
|
588
600
|
onClick: T
|
|
589
|
-
}, u(v(
|
|
590
|
-
|
|
601
|
+
}, u(v(h)("ui.dropdown.selectAll")), 1),
|
|
602
|
+
g.value ? (l(), s("button", {
|
|
591
603
|
key: 0,
|
|
604
|
+
type: "button",
|
|
592
605
|
class: "text-xs text-gray-500 hover:text-gray-700 transition-colors",
|
|
593
606
|
onClick: X
|
|
594
|
-
}, u(v(
|
|
607
|
+
}, u(v(h)("ui.dropdown.clear")), 1)) : p("", !0)
|
|
595
608
|
])) : p("", !0),
|
|
596
609
|
e.isLoading ? (l(), s("div", Xe, [...o[8] || (o[8] = [
|
|
597
610
|
t("svg", {
|
|
@@ -623,17 +636,18 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
623
636
|
}, [
|
|
624
637
|
e.allowEmpty ? (l(), s("button", {
|
|
625
638
|
key: 0,
|
|
639
|
+
type: "button",
|
|
626
640
|
ref: (r) => F(r, 0),
|
|
627
|
-
class:
|
|
628
|
-
|
|
641
|
+
class: y(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors", [
|
|
642
|
+
g.value ? "hover:bg-gray-50" : "bg-gray-100 font-medium",
|
|
629
643
|
i.value === 0 ? "bg-gray-50" : ""
|
|
630
644
|
]]),
|
|
631
645
|
role: "option",
|
|
632
|
-
"aria-selected": !
|
|
646
|
+
"aria-selected": !g.value,
|
|
633
647
|
onClick: (r) => V(null, a),
|
|
634
648
|
onMouseenter: o[1] || (o[1] = (r) => i.value = 0)
|
|
635
649
|
}, [
|
|
636
|
-
|
|
650
|
+
g.value ? (l(), s("span", Qe)) : (l(), s("svg", Ze, [...o[9] || (o[9] = [
|
|
637
651
|
t("path", {
|
|
638
652
|
"stroke-linecap": "round",
|
|
639
653
|
"stroke-linejoin": "round",
|
|
@@ -647,13 +661,14 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
647
661
|
}, [
|
|
648
662
|
r.label ? (l(), s("div", {
|
|
649
663
|
key: 0,
|
|
650
|
-
class:
|
|
664
|
+
class: y(["px-3 pt-2 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide", w > 0 ? "border-t border-gray-100 mt-1" : ""])
|
|
651
665
|
}, u(r.label), 3)) : p("", !0),
|
|
652
666
|
(l(!0), s(x, null, B(r.entries, (d) => (l(), s("button", {
|
|
667
|
+
type: "button",
|
|
653
668
|
key: d.item[e.valueKey],
|
|
654
669
|
ref_for: !0,
|
|
655
670
|
ref: (W) => F(W, d.flatIndex),
|
|
656
|
-
class:
|
|
671
|
+
class: y(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words", [
|
|
657
672
|
f(d.item) ? "bg-gray-100 font-medium" : "hover:bg-gray-50",
|
|
658
673
|
i.value === d.flatIndex ? "bg-gray-50" : ""
|
|
659
674
|
]]),
|
|
@@ -674,10 +689,11 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
674
689
|
])
|
|
675
690
|
], 42, et))), 128))
|
|
676
691
|
], 64))), 128)) : (l(!0), s(x, { key: 2 }, B(O.value, (r, w) => (l(), s("button", {
|
|
692
|
+
type: "button",
|
|
677
693
|
key: r[e.valueKey],
|
|
678
694
|
ref_for: !0,
|
|
679
695
|
ref: (d) => F(d, L.value + w),
|
|
680
|
-
class:
|
|
696
|
+
class: y(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words", [
|
|
681
697
|
f(r) ? "bg-gray-100 font-medium" : "hover:bg-gray-50",
|
|
682
698
|
i.value === L.value + w ? "bg-gray-50" : ""
|
|
683
699
|
]]),
|
|
@@ -699,7 +715,7 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
699
715
|
], 42, lt))), 128)),
|
|
700
716
|
O.value.length === 0 && !e.allowEmpty ? (l(), s("div", nt, [
|
|
701
717
|
K(e.$slots, "empty", {}, () => [
|
|
702
|
-
se(u(v(
|
|
718
|
+
se(u(v(h)("ui.dropdown.nothingFound")), 1)
|
|
703
719
|
])
|
|
704
720
|
])) : p("", !0)
|
|
705
721
|
], 512))
|
|
@@ -710,13 +726,13 @@ const Gt = /* @__PURE__ */ he(Ce, [["render", $e]]), Me = ["onClick"], Ve = { cl
|
|
|
710
726
|
}
|
|
711
727
|
});
|
|
712
728
|
export {
|
|
713
|
-
|
|
714
|
-
|
|
729
|
+
Tt as OneBrowserMenu,
|
|
730
|
+
Gt as OneBrowserMenuGrid,
|
|
715
731
|
fe as OneDropdown,
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
732
|
+
be as OneDropdownAuto,
|
|
733
|
+
Nt as OneDropdownDivider,
|
|
734
|
+
Xt as OneDropdownItem,
|
|
735
|
+
Ht as OneDropdownSelect,
|
|
736
|
+
Yt as OneHelpMenu,
|
|
737
|
+
Zt as OneUserMenu
|
|
722
738
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("../i18n/index.cjs"),L=require("../_plugin-vue_export-helper-f246444f.cjs"),P=require("vue-router"),G=require("../LogoOneb-b6ac382e.cjs"),U=require("../clipboard-494e1513.cjs"),A={statusMessage:{type:String,required:!1},statusText:{type:String,required:!1},requestId:{type:String,required:!1},statusCode:{type:String,default:"403"},t:{type:Function,default:void 0}},K=e.defineComponent({name:"ErrorPage",props:A,setup(t){const r=b.useOnebI18n();return{t:e.computed(()=>t.t??r)}}});const J={class:"error-container"},Q={class:"text-8xl text-secondary-content"},W={key:0},X={key:1,class:"pt-5"},Y={class:"request-info hidden"};function Z(t,r,m,o,u,d){const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("h1",Q,e.toDisplayString(t.statusCode),1),t.statusMessage?(e.openBlock(),e.createElementBlock("p",W,e.toDisplayString(t.statusMessage),1)):e.createCommentVNode("",!0),r[3]||(r[3]=e.createElementVNode("div",{class:"border-b border-secondary-stroke w-full pt-10"},null,-1)),t.statusText?(e.openBlock(),e.createElementBlock("p",X,e.toDisplayString(t.statusText),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createElementVNode("p",null,[r[0]||(r[0]=e.createElementVNode("strong",null,"Request ID:",-1)),e.createTextVNode(" "+e.toDisplayString(t.requestId),1)]),r[1]||(r[1]=e.createElementVNode("button",{class:"copy-btn"},"Скопіювати",-1)),r[2]||(r[2]=e.createElementVNode("p",null,[e.createTextVNode(" Передайте цю інформацію розробнику або напишіть в "),e.createElementVNode("a",{href:"https://t.me/telegram_bot",target:"_blank"},"Telegram-бот")],-1))]),e.createVNode(a,{to:"/",class:"home-link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("ui.errors.go_home")),1)]),_:1})])}const ee=L._export_sfc(K,[["render",Z],["__scopeId","data-v-4ac01274"]]),te={class:"flex items-center justify-center gap-2 sm:gap-4"},oe={class:"relative"},re={class:"one-error-logo-bounce"},ne=["src"],se={key:0,class:"absolute inset-0 animate-ping opacity-20","aria-hidden":"true"},ae=["src"],z="text-[100px] sm:text-[160px] font-bold text-slate-200 leading-none select-none",le=e.defineComponent({__name:"OneErrorHero",props:{left:{type:String,required:!0},right:{type:String,required:!0},logoSrc:{type:String,default:void 0}},setup(t){const r=e.useSlots(),m=e.computed(()=>!!r.default);return(o,u)=>(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("span",{class:e.normalizeClass(z)},e.toDisplayString(t.left),1),e.createElementVNode("div",oe,[e.createElementVNode("div",re,[e.renderSlot(o.$slots,"default",{},()=>[t.logoSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.logoSrc,class:"w-24 h-24 sm:w-36 sm:h-36",alt:"Logo"},null,8,ne)):(e.openBlock(),e.createBlock(G.LogoOneb,{key:1,class:"w-24 h-24 sm:w-36 sm:h-36"}))],!0)]),t.logoSrc&&!m.value?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("img",{src:t.logoSrc,class:"w-24 h-24 sm:w-36 sm:h-36",alt:""},null,8,ae)])):e.createCommentVNode("",!0)]),e.createElementVNode("span",{class:e.normalizeClass(z)},e.toDisplayString(t.right),1)]))}});const j=L._export_sfc(le,[["__scopeId","data-v-957a8a83"]]),ce={class:"w-full"},ie={class:"flex items-center justify-between mb-4"},ue={class:"flex items-center gap-4"},de={class:"text-sm text-slate-600"},me={class:"text-emerald-700","data-test":"snake-score"},pe={key:0,class:"text-sm text-rose-600 font-medium","data-test":"snake-status"},ge={key:1,class:"text-sm text-emerald-700","data-test":"snake-status"},ye={key:2,class:"text-sm text-slate-500","data-test":"snake-status"},fe={class:"flex gap-2"},ve={class:"bg-slate-50 border border-slate-200 rounded-2xl p-4 shadow-sm"},xe=["data-snake"],he={key:0,class:"absolute inset-1 rounded-md border border-emerald-800/40"},_e={key:1,class:"absolute inset-2 rounded-sm bg-rose-600"},ke={class:"text-xs text-slate-500 text-center mt-3"},F=e.defineComponent({__name:"OneSnakeGame",props:{gridSize:{type:Number,default:15},tickMs:{type:Number,default:170},t:{type:Function,default:void 0}},emits:["score","game-over"],setup(t,{expose:r,emit:m}){const o=t,u=m,d=b.useOnebI18n(),a=e.computed(()=>o.t??d),i=e.ref([]),p=e.ref({x:1,y:0}),f=e.ref({x:1,y:0}),g=e.ref({x:0,y:0}),v=e.ref(0),y=e.ref(!1),c=e.ref(!1);let _=null;const R=e.computed(()=>Array.from({length:o.gridSize*o.gridSize},(s,n)=>({x:n%o.gridSize,y:Math.floor(n/o.gridSize)}))),w=s=>{var n,l;return((n=i.value[0])==null?void 0:n.x)===s.x&&((l=i.value[0])==null?void 0:l.y)===s.y},C=s=>i.value.some((n,l)=>l!==0&&n.x===s.x&&n.y===s.y),N=s=>g.value.x===s.x&&g.value.y===s.y,$=s=>{const n=[];for(let x=0;x<o.gridSize;x+=1)for(let h=0;h<o.gridSize;h+=1)s.some(I=>I.x===h&&I.y===x)||n.push({x:h,y:x});if(n.length===0)return{x:0,y:0};const l=Math.floor(Math.random()*n.length);return n[l]},S=()=>{_!=null&&(clearInterval(_),_=null),y.value=!1},D=()=>{S(),c.value=!0,u("game-over",v.value)},k=()=>{S(),i.value=[{x:Math.floor(o.gridSize/2),y:Math.floor(o.gridSize/2)}],p.value={x:1,y:0},f.value={x:1,y:0},g.value=$(i.value),v.value=0,c.value=!1},M=s=>{p.value.x+s.x===0&&p.value.y+s.y===0||(f.value=s)},H=()=>{p.value=f.value;const s=i.value[0],n={x:s.x+p.value.x,y:s.y+p.value.y};if(n.x<0||n.x>=o.gridSize||n.y<0||n.y>=o.gridSize){D();return}if(i.value.some(h=>h.x===n.x&&h.y===n.y)){D();return}const x=[n,...i.value];n.x===g.value.x&&n.y===g.value.y?(v.value+=1,u("score",v.value),g.value=$(x)):x.pop(),i.value=x},T=()=>{_!=null||c.value||(y.value=!0,_=setInterval(H,o.tickMs))},O=()=>{if(c.value){k();return}y.value?S():T()},q=s=>{const n=s.key.toLowerCase(),l={arrowup:{x:0,y:-1},w:{x:0,y:-1},arrowdown:{x:0,y:1},s:{x:0,y:1},arrowleft:{x:-1,y:0},a:{x:-1,y:0},arrowright:{x:1,y:0},d:{x:1,y:0}};l[n]?(M(l[n]),!y.value&&!c.value&&T()):n===" "?(s.preventDefault(),c.value||O()):n==="enter"&&c.value&&k()};return e.onMounted(()=>{k(),window.addEventListener("keydown",q)}),e.onUnmounted(()=>{S(),window.removeEventListener("keydown",q)}),r({score:v,isRunning:y,isGameOver:c,resetGame:k}),(s,n)=>(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",ie,[e.createElementVNode("div",ue,[e.createElementVNode("span",de,[e.createTextVNode(e.toDisplayString(a.value("ui.errors.snake_score"))+": ",1),e.createElementVNode("strong",me,e.toDisplayString(v.value),1)]),c.value?(e.openBlock(),e.createElementBlock("span",pe,e.toDisplayString(a.value("ui.errors.snake_game_over")),1)):y.value?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(a.value("ui.errors.snake_running")),1)):(e.openBlock(),e.createElementBlock("span",ye,e.toDisplayString(a.value("ui.errors.snake_paused")),1))]),e.createElementVNode("div",fe,[e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm text-white bg-emerald-600 hover:bg-emerald-700 transition","data-test":"snake-toggle",onClick:O},e.toDisplayString(c.value?a.value("ui.errors.snake_restart"):y.value?a.value("ui.errors.snake_pause"):a.value("ui.errors.snake_start")),1),e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm border border-slate-300 text-slate-700 hover:bg-slate-50 transition","data-test":"snake-reset",onClick:k},e.toDisplayString(a.value("ui.errors.snake_reset")),1)])]),e.createElementVNode("div",ve,[e.createElementVNode("div",{class:"w-full mx-auto",style:e.normalizeStyle({display:"grid",gridTemplateColumns:`repeat(${t.gridSize}, minmax(0, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createElementBlock("div",{key:`${l.x}-${l.y}`,class:e.normalizeClass(["relative aspect-square border border-slate-200/60",[w(l)?"bg-emerald-600 shadow-inner":C(l)?"bg-emerald-300":N(l)?"bg-rose-400":"bg-white"]]),"data-test":"snake-cell","data-snake":w(l)?"head":C(l)?"body":N(l)?"food":void 0},[w(l)?(e.openBlock(),e.createElementBlock("div",he)):N(l)?(e.openBlock(),e.createElementBlock("div",_e)):e.createCommentVNode("",!0)],10,xe))),128))],4)]),e.createElementVNode("p",ke,e.toDisplayString(a.value("ui.errors.snake_instructions")),1)]))}}),be={class:"min-h-screen flex flex-col items-center justify-center bg-gray-100 p-4"},Se={class:"text-center mb-8"},Ee={class:"text-xl text-gray-600 mt-2"},we={class:"flex gap-4 mt-4"},Ne=e.defineComponent({__name:"OneNotFoundPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},withGame:{type:Boolean,default:!0},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),u=P.useRouter(),d=e.ref(!1),a=()=>{u?u.back():typeof window<"u"&&window.history.back()};return(i,p)=>{const f=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Se,[e.createVNode(j,{left:"4",right:"4","logo-src":t.logoSrc},e.createSlots({_:2},[i.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ee,e.toDisplayString(o.value("ui.errors.page_not_found")),1)]),t.withGame&&!d.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-6 py-2.5 rounded-xl text-white bg-emerald-600 hover:bg-emerald-700 transition font-medium shadow-lg","data-test":"nf-play",onClick:p[0]||(p[0]=g=>d.value=!0)},e.toDisplayString(o.value("ui.errors.play_snake")),1)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createBlock(F,{key:1,class:"max-w-2xl",t:o.value},null,8,["t"])):e.createCommentVNode("",!0),e.createElementVNode("div",we,[e.createVNode(f,{to:t.homeTo,class:"text-blue-600 hover:text-blue-700 underline text-sm","data-test":"nf-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"]),e.createElementVNode("button",{type:"button",class:"text-gray-600 hover:text-gray-700 underline text-sm","data-test":"nf-back",onClick:a},e.toDisplayString(o.value("ui.errors.go_back")),1)])])}}}),Ve={class:"min-h-screen flex flex-col items-center justify-center bg-gray-100 p-4"},Be={class:"text-center mb-8"},Ce={class:"text-xl text-gray-600 mt-2"},$e={class:"text-sm text-gray-500 mt-2 max-w-md mx-auto"},De={key:0,class:"mb-6 text-sm text-gray-600 text-center","data-test":"se-request"},Te={class:"flex flex-col items-center gap-4"},Oe=e.defineComponent({__name:"OneServerErrorPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},requestId:{type:String,default:void 0},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),u=e.ref(!1);let d=null;const a=async()=>{!r.requestId||!await U.copyToClipboard(r.requestId)||(u.value=!0,d!=null&&clearTimeout(d),d=setTimeout(()=>{u.value=!1,d=null},2e3))},i=()=>{window.location.reload()};return e.onBeforeUnmount(()=>{d!=null&&clearTimeout(d)}),(p,f)=>{const g=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Be,[e.createVNode(j,{left:"5",right:"0","logo-src":t.logoSrc},e.createSlots({_:2},[p.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ce,e.toDisplayString(o.value("ui.errors.server_error")),1),e.createElementVNode("p",$e,e.toDisplayString(o.value("ui.errors.server_error_hint")),1)]),t.requestId?(e.openBlock(),e.createElementBlock("div",De,[e.createTextVNode(e.toDisplayString(o.value("ui.errors.request_id"))+": ",1),e.createElementVNode("strong",null,e.toDisplayString(t.requestId),1),e.createElementVNode("button",{type:"button",class:"ml-2 text-blue-600 hover:text-blue-700 underline","data-test":"se-copy",onClick:a},e.toDisplayString(u.value?o.value("ui.errors.copied"):o.value("ui.errors.copy")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Te,[e.createElementVNode("button",{type:"button",class:"px-6 py-3 rounded-xl text-white bg-emerald-600 hover:bg-emerald-700 transition text-lg font-medium shadow-lg","data-test":"se-reload",onClick:i},e.toDisplayString(o.value("ui.errors.reload_page")),1),e.renderSlot(p.$slots,"support"),e.createVNode(g,{to:t.homeTo,class:"text-blue-600 hover:text-blue-700 underline text-sm","data-test":"se-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"])])])}}}),E=e.ref(!1),V=e.ref(null);function B(){return{show:E,error:V,trigger:m=>{E.value||(V.value=m,E.value=!0)},dismiss:()=>{E.value=!1,V.value=null}}}const qe={key:0,class:"fixed inset-0 z-[10000] flex items-center justify-center bg-[#f5f7fb] p-6",role:"alert","aria-live":"assertive","data-test":"crash-screen"},Ie={class:"flex w-full max-w-[480px] flex-col items-center text-center"},ze={key:0,class:"mb-6"},Le=["src"],je={class:"mb-3 text-2xl font-semibold text-gray-900"},Fe={class:"mb-8 text-base text-gray-600","data-test":"crash-message"},Re={key:2,"data-test":"crash-details",class:"mt-6 text-xs text-gray-400"},Me=e.defineComponent({__name:"OneCrashScreen",props:{logoSrc:{type:String,default:void 0},accountUrl:{type:String,default:void 0},autoReloadSeconds:{type:Number,default:10},persistent:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),{show:u,error:d}=B(),a=e.ref(r.autoReloadSeconds);let i=null;const p=e.computed(()=>{const c=d.value;return c instanceof Error?`${c.name}: ${c.message}`:String(c??"Unknown error")}),f=e.computed(()=>r.persistent?o.value("ui.crash.persistent"):a.value>0?o.value("ui.crash.countdown",{n:a.value}):o.value("ui.crash.reloading")),g=()=>{i!=null&&(clearInterval(i),i=null)},v=()=>{g(),window.location.reload()},y=()=>{r.accountUrl&&(g(),window.location.href=r.accountUrl)};return e.watch(u,c=>{g(),c&&(a.value=r.autoReloadSeconds,!r.persistent&&(i=setInterval(()=>{a.value-=1,a.value<=0&&(g(),window.location.reload())},1e3)))},{immediate:!0}),e.onBeforeUnmount(()=>{g()}),(c,_)=>e.unref(u)?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Ie,[t.logoSrc||c.$slots.logo?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(c.$slots,"logo",{},()=>[e.createElementVNode("img",{src:t.logoSrc,alt:"",class:"h-20 w-20"},null,8,Le)])])):e.createCommentVNode("",!0),e.createElementVNode("h1",je,e.toDisplayString(o.value("ui.crash.title")),1),e.createElementVNode("p",Fe,e.toDisplayString(f.value),1),e.createElementVNode("button",{type:"button",class:"mb-3 w-full rounded-lg bg-gradient-to-r from-[#E1A508] to-[#E04040] px-6 py-3 text-base font-medium text-white transition hover:opacity-90","data-test":"crash-reload",onClick:v},e.toDisplayString(o.value("ui.crash.reload_now")),1),t.accountUrl?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"w-full rounded-lg border border-gray-300 bg-white px-6 py-3 text-base font-medium text-gray-700 transition hover:bg-gray-50","data-test":"crash-account",onClick:y},e.toDisplayString(o.value("ui.crash.open_account")),1)):e.createCommentVNode("",!0),t.showDetails?(e.openBlock(),e.createElementBlock("p",Re,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}});function He(t={}){const r=t.criticalInfos??["setup function","render function"];return(m,o,u)=>{var d;try{(d=t.onError)==null||d.call(t,m,u)}catch{}console.error("[Vue Error]",m,u),r.includes(u)&&(t.onCritical??B().trigger)(m)}}exports.OneCrashScreen=Me;exports.OneErrorPage=ee;exports.OneNotFoundPage=Ne;exports.OneServerErrorPage=Oe;exports.OneSnakeGame=F;exports.createAppErrorHandler=He;exports.useCrashState=B;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("../i18n/index.cjs"),L=require("../_plugin-vue_export-helper-f246444f.cjs"),P=require("vue-router"),G=require("../LogoOneb-b6ac382e.cjs"),U=require("../clipboard-494e1513.cjs"),A={statusMessage:{type:String,required:!1},statusText:{type:String,required:!1},requestId:{type:String,required:!1},statusCode:{type:String,default:"403"},t:{type:Function,default:void 0}},K=e.defineComponent({name:"ErrorPage",props:A,setup(t){const r=b.useOnebI18n();return{t:e.computed(()=>t.t??r)}}});const J={class:"error-container"},Q={class:"text-8xl text-secondary-content"},W={key:0},X={key:1,class:"pt-5"},Y={class:"request-info hidden"};function Z(t,r,m,o,u,d){const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("h1",Q,e.toDisplayString(t.statusCode),1),t.statusMessage?(e.openBlock(),e.createElementBlock("p",W,e.toDisplayString(t.statusMessage),1)):e.createCommentVNode("",!0),r[3]||(r[3]=e.createElementVNode("div",{class:"border-b border-secondary-stroke w-full pt-10"},null,-1)),t.statusText?(e.openBlock(),e.createElementBlock("p",X,e.toDisplayString(t.statusText),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createElementVNode("p",null,[r[0]||(r[0]=e.createElementVNode("strong",null,"Request ID:",-1)),e.createTextVNode(" "+e.toDisplayString(t.requestId),1)]),r[1]||(r[1]=e.createElementVNode("button",{type:"button",class:"copy-btn"},"Скопіювати",-1)),r[2]||(r[2]=e.createElementVNode("p",null,[e.createTextVNode(" Передайте цю інформацію розробнику або напишіть в "),e.createElementVNode("a",{href:"https://t.me/telegram_bot",target:"_blank"},"Telegram-бот")],-1))]),e.createVNode(a,{to:"/",class:"home-link"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("ui.errors.go_home")),1)]),_:1})])}const ee=L._export_sfc(K,[["render",Z],["__scopeId","data-v-e59dc5d9"]]),te={class:"flex items-center justify-center gap-2 sm:gap-4"},oe={class:"relative"},re={class:"one-error-logo-bounce"},ne=["src"],se={key:0,class:"absolute inset-0 animate-ping opacity-20","aria-hidden":"true"},ae=["src"],z="text-[100px] sm:text-[160px] font-bold text-slate-200 leading-none select-none",le=e.defineComponent({__name:"OneErrorHero",props:{left:{type:String,required:!0},right:{type:String,required:!0},logoSrc:{type:String,default:void 0}},setup(t){const r=e.useSlots(),m=e.computed(()=>!!r.default);return(o,u)=>(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("span",{class:e.normalizeClass(z)},e.toDisplayString(t.left),1),e.createElementVNode("div",oe,[e.createElementVNode("div",re,[e.renderSlot(o.$slots,"default",{},()=>[t.logoSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.logoSrc,class:"w-24 h-24 sm:w-36 sm:h-36",alt:"Logo"},null,8,ne)):(e.openBlock(),e.createBlock(G.LogoOneb,{key:1,class:"w-24 h-24 sm:w-36 sm:h-36"}))],!0)]),t.logoSrc&&!m.value?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("img",{src:t.logoSrc,class:"w-24 h-24 sm:w-36 sm:h-36",alt:""},null,8,ae)])):e.createCommentVNode("",!0)]),e.createElementVNode("span",{class:e.normalizeClass(z)},e.toDisplayString(t.right),1)]))}});const j=L._export_sfc(le,[["__scopeId","data-v-957a8a83"]]),ce={class:"w-full"},ie={class:"flex items-center justify-between mb-4"},ue={class:"flex items-center gap-4"},de={class:"text-sm text-slate-600"},me={class:"text-emerald-700","data-test":"snake-score"},pe={key:0,class:"text-sm text-rose-600 font-medium","data-test":"snake-status"},ge={key:1,class:"text-sm text-emerald-700","data-test":"snake-status"},ye={key:2,class:"text-sm text-slate-500","data-test":"snake-status"},fe={class:"flex gap-2"},ve={class:"bg-slate-50 border border-slate-200 rounded-2xl p-4 shadow-sm"},xe=["data-snake"],he={key:0,class:"absolute inset-1 rounded-md border border-emerald-800/40"},_e={key:1,class:"absolute inset-2 rounded-sm bg-rose-600"},ke={class:"text-xs text-slate-500 text-center mt-3"},F=e.defineComponent({__name:"OneSnakeGame",props:{gridSize:{type:Number,default:15},tickMs:{type:Number,default:170},t:{type:Function,default:void 0}},emits:["score","game-over"],setup(t,{expose:r,emit:m}){const o=t,u=m,d=b.useOnebI18n(),a=e.computed(()=>o.t??d),i=e.ref([]),p=e.ref({x:1,y:0}),f=e.ref({x:1,y:0}),g=e.ref({x:0,y:0}),v=e.ref(0),y=e.ref(!1),c=e.ref(!1);let _=null;const R=e.computed(()=>Array.from({length:o.gridSize*o.gridSize},(s,n)=>({x:n%o.gridSize,y:Math.floor(n/o.gridSize)}))),w=s=>{var n,l;return((n=i.value[0])==null?void 0:n.x)===s.x&&((l=i.value[0])==null?void 0:l.y)===s.y},C=s=>i.value.some((n,l)=>l!==0&&n.x===s.x&&n.y===s.y),N=s=>g.value.x===s.x&&g.value.y===s.y,$=s=>{const n=[];for(let x=0;x<o.gridSize;x+=1)for(let h=0;h<o.gridSize;h+=1)s.some(I=>I.x===h&&I.y===x)||n.push({x:h,y:x});if(n.length===0)return{x:0,y:0};const l=Math.floor(Math.random()*n.length);return n[l]},S=()=>{_!=null&&(clearInterval(_),_=null),y.value=!1},D=()=>{S(),c.value=!0,u("game-over",v.value)},k=()=>{S(),i.value=[{x:Math.floor(o.gridSize/2),y:Math.floor(o.gridSize/2)}],p.value={x:1,y:0},f.value={x:1,y:0},g.value=$(i.value),v.value=0,c.value=!1},M=s=>{p.value.x+s.x===0&&p.value.y+s.y===0||(f.value=s)},H=()=>{p.value=f.value;const s=i.value[0],n={x:s.x+p.value.x,y:s.y+p.value.y};if(n.x<0||n.x>=o.gridSize||n.y<0||n.y>=o.gridSize){D();return}if(i.value.some(h=>h.x===n.x&&h.y===n.y)){D();return}const x=[n,...i.value];n.x===g.value.x&&n.y===g.value.y?(v.value+=1,u("score",v.value),g.value=$(x)):x.pop(),i.value=x},T=()=>{_!=null||c.value||(y.value=!0,_=setInterval(H,o.tickMs))},O=()=>{if(c.value){k();return}y.value?S():T()},q=s=>{const n=s.key.toLowerCase(),l={arrowup:{x:0,y:-1},w:{x:0,y:-1},arrowdown:{x:0,y:1},s:{x:0,y:1},arrowleft:{x:-1,y:0},a:{x:-1,y:0},arrowright:{x:1,y:0},d:{x:1,y:0}};l[n]?(M(l[n]),!y.value&&!c.value&&T()):n===" "?(s.preventDefault(),c.value||O()):n==="enter"&&c.value&&k()};return e.onMounted(()=>{k(),window.addEventListener("keydown",q)}),e.onUnmounted(()=>{S(),window.removeEventListener("keydown",q)}),r({score:v,isRunning:y,isGameOver:c,resetGame:k}),(s,n)=>(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",ie,[e.createElementVNode("div",ue,[e.createElementVNode("span",de,[e.createTextVNode(e.toDisplayString(a.value("ui.errors.snake_score"))+": ",1),e.createElementVNode("strong",me,e.toDisplayString(v.value),1)]),c.value?(e.openBlock(),e.createElementBlock("span",pe,e.toDisplayString(a.value("ui.errors.snake_game_over")),1)):y.value?(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(a.value("ui.errors.snake_running")),1)):(e.openBlock(),e.createElementBlock("span",ye,e.toDisplayString(a.value("ui.errors.snake_paused")),1))]),e.createElementVNode("div",fe,[e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm text-white bg-emerald-600 hover:bg-emerald-700 transition","data-test":"snake-toggle",onClick:O},e.toDisplayString(c.value?a.value("ui.errors.snake_restart"):y.value?a.value("ui.errors.snake_pause"):a.value("ui.errors.snake_start")),1),e.createElementVNode("button",{type:"button",class:"px-3 py-1.5 rounded-lg text-sm border border-slate-300 text-slate-700 hover:bg-slate-50 transition","data-test":"snake-reset",onClick:k},e.toDisplayString(a.value("ui.errors.snake_reset")),1)])]),e.createElementVNode("div",ve,[e.createElementVNode("div",{class:"w-full mx-auto",style:e.normalizeStyle({display:"grid",gridTemplateColumns:`repeat(${t.gridSize}, minmax(0, 1fr))`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createElementBlock("div",{key:`${l.x}-${l.y}`,class:e.normalizeClass(["relative aspect-square border border-slate-200/60",[w(l)?"bg-emerald-600 shadow-inner":C(l)?"bg-emerald-300":N(l)?"bg-rose-400":"bg-white"]]),"data-test":"snake-cell","data-snake":w(l)?"head":C(l)?"body":N(l)?"food":void 0},[w(l)?(e.openBlock(),e.createElementBlock("div",he)):N(l)?(e.openBlock(),e.createElementBlock("div",_e)):e.createCommentVNode("",!0)],10,xe))),128))],4)]),e.createElementVNode("p",ke,e.toDisplayString(a.value("ui.errors.snake_instructions")),1)]))}}),be={class:"min-h-screen flex flex-col items-center justify-center bg-gray-100 p-4"},Se={class:"text-center mb-8"},Ee={class:"text-xl text-gray-600 mt-2"},we={class:"flex gap-4 mt-4"},Ne=e.defineComponent({__name:"OneNotFoundPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},withGame:{type:Boolean,default:!0},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),u=P.useRouter(),d=e.ref(!1),a=()=>{u?u.back():typeof window<"u"&&window.history.back()};return(i,p)=>{const f=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",Se,[e.createVNode(j,{left:"4",right:"4","logo-src":t.logoSrc},e.createSlots({_:2},[i.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ee,e.toDisplayString(o.value("ui.errors.page_not_found")),1)]),t.withGame&&!d.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"px-6 py-2.5 rounded-xl text-white bg-emerald-600 hover:bg-emerald-700 transition font-medium shadow-lg","data-test":"nf-play",onClick:p[0]||(p[0]=g=>d.value=!0)},e.toDisplayString(o.value("ui.errors.play_snake")),1)):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createBlock(F,{key:1,class:"max-w-2xl",t:o.value},null,8,["t"])):e.createCommentVNode("",!0),e.createElementVNode("div",we,[e.createVNode(f,{to:t.homeTo,class:"text-blue-600 hover:text-blue-700 underline text-sm","data-test":"nf-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"]),e.createElementVNode("button",{type:"button",class:"text-gray-600 hover:text-gray-700 underline text-sm","data-test":"nf-back",onClick:a},e.toDisplayString(o.value("ui.errors.go_back")),1)])])}}}),Ve={class:"min-h-screen flex flex-col items-center justify-center bg-gray-100 p-4"},Be={class:"text-center mb-8"},Ce={class:"text-xl text-gray-600 mt-2"},$e={class:"text-sm text-gray-500 mt-2 max-w-md mx-auto"},De={key:0,class:"mb-6 text-sm text-gray-600 text-center","data-test":"se-request"},Te={class:"flex flex-col items-center gap-4"},Oe=e.defineComponent({__name:"OneServerErrorPage",props:{logoSrc:{type:String,default:void 0},homeTo:{type:[String,Object],default:"/"},requestId:{type:String,default:void 0},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),u=e.ref(!1);let d=null;const a=async()=>{!r.requestId||!await U.copyToClipboard(r.requestId)||(u.value=!0,d!=null&&clearTimeout(d),d=setTimeout(()=>{u.value=!1,d=null},2e3))},i=()=>{window.location.reload()};return e.onBeforeUnmount(()=>{d!=null&&clearTimeout(d)}),(p,f)=>{const g=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Be,[e.createVNode(j,{left:"5",right:"0","logo-src":t.logoSrc},e.createSlots({_:2},[p.$slots.logo?{name:"default",fn:e.withCtx(()=>[e.renderSlot(p.$slots,"logo")]),key:"0"}:void 0]),1032,["logo-src"]),e.createElementVNode("p",Ce,e.toDisplayString(o.value("ui.errors.server_error")),1),e.createElementVNode("p",$e,e.toDisplayString(o.value("ui.errors.server_error_hint")),1)]),t.requestId?(e.openBlock(),e.createElementBlock("div",De,[e.createTextVNode(e.toDisplayString(o.value("ui.errors.request_id"))+": ",1),e.createElementVNode("strong",null,e.toDisplayString(t.requestId),1),e.createElementVNode("button",{type:"button",class:"ml-2 text-blue-600 hover:text-blue-700 underline","data-test":"se-copy",onClick:a},e.toDisplayString(u.value?o.value("ui.errors.copied"):o.value("ui.errors.copy")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Te,[e.createElementVNode("button",{type:"button",class:"px-6 py-3 rounded-xl text-white bg-emerald-600 hover:bg-emerald-700 transition text-lg font-medium shadow-lg","data-test":"se-reload",onClick:i},e.toDisplayString(o.value("ui.errors.reload_page")),1),e.renderSlot(p.$slots,"support"),e.createVNode(g,{to:t.homeTo,class:"text-blue-600 hover:text-blue-700 underline text-sm","data-test":"se-home"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value("ui.errors.go_home")),1)]),_:1},8,["to"])])])}}}),E=e.ref(!1),V=e.ref(null);function B(){return{show:E,error:V,trigger:m=>{E.value||(V.value=m,E.value=!0)},dismiss:()=>{E.value=!1,V.value=null}}}const qe={key:0,class:"fixed inset-0 z-[10000] flex items-center justify-center bg-[#f5f7fb] p-6",role:"alert","aria-live":"assertive","data-test":"crash-screen"},Ie={class:"flex w-full max-w-[480px] flex-col items-center text-center"},ze={key:0,class:"mb-6"},Le=["src"],je={class:"mb-3 text-2xl font-semibold text-gray-900"},Fe={class:"mb-8 text-base text-gray-600","data-test":"crash-message"},Re={key:2,"data-test":"crash-details",class:"mt-6 text-xs text-gray-400"},Me=e.defineComponent({__name:"OneCrashScreen",props:{logoSrc:{type:String,default:void 0},accountUrl:{type:String,default:void 0},autoReloadSeconds:{type:Number,default:10},persistent:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1},t:{type:Function,default:void 0}},setup(t){const r=t,m=b.useOnebI18n(),o=e.computed(()=>r.t??m),{show:u,error:d}=B(),a=e.ref(r.autoReloadSeconds);let i=null;const p=e.computed(()=>{const c=d.value;return c instanceof Error?`${c.name}: ${c.message}`:String(c??"Unknown error")}),f=e.computed(()=>r.persistent?o.value("ui.crash.persistent"):a.value>0?o.value("ui.crash.countdown",{n:a.value}):o.value("ui.crash.reloading")),g=()=>{i!=null&&(clearInterval(i),i=null)},v=()=>{g(),window.location.reload()},y=()=>{r.accountUrl&&(g(),window.location.href=r.accountUrl)};return e.watch(u,c=>{g(),c&&(a.value=r.autoReloadSeconds,!r.persistent&&(i=setInterval(()=>{a.value-=1,a.value<=0&&(g(),window.location.reload())},1e3)))},{immediate:!0}),e.onBeforeUnmount(()=>{g()}),(c,_)=>e.unref(u)?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Ie,[t.logoSrc||c.$slots.logo?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(c.$slots,"logo",{},()=>[e.createElementVNode("img",{src:t.logoSrc,alt:"",class:"h-20 w-20"},null,8,Le)])])):e.createCommentVNode("",!0),e.createElementVNode("h1",je,e.toDisplayString(o.value("ui.crash.title")),1),e.createElementVNode("p",Fe,e.toDisplayString(f.value),1),e.createElementVNode("button",{type:"button",class:"mb-3 w-full rounded-lg bg-gradient-to-r from-[#E1A508] to-[#E04040] px-6 py-3 text-base font-medium text-white transition hover:opacity-90","data-test":"crash-reload",onClick:v},e.toDisplayString(o.value("ui.crash.reload_now")),1),t.accountUrl?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"w-full rounded-lg border border-gray-300 bg-white px-6 py-3 text-base font-medium text-gray-700 transition hover:bg-gray-50","data-test":"crash-account",onClick:y},e.toDisplayString(o.value("ui.crash.open_account")),1)):e.createCommentVNode("",!0),t.showDetails?(e.openBlock(),e.createElementBlock("p",Re,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}});function He(t={}){const r=t.criticalInfos??["setup function","render function"];return(m,o,u)=>{var d;try{(d=t.onError)==null||d.call(t,m,u)}catch{}console.error("[Vue Error]",m,u),r.includes(u)&&(t.onCritical??B().trigger)(m)}}exports.OneCrashScreen=Me;exports.OneErrorPage=ee;exports.OneNotFoundPage=Ne;exports.OneServerErrorPage=Oe;exports.OneSnakeGame=F;exports.createAppErrorHandler=He;exports.useCrashState=B;
|