@vuetify/one 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -0
- package/dist/index.js +1779 -0
- package/package.json +2 -2
- package/dist/assets/VoAppBar-DXQS1RTs.css +0 -1
- package/dist/assets/VoAppBar.vue_vue_type_script_setup_true_lang-DCjfH1xn.js +0 -1
- package/dist/assets/dashboard-C_OkgCMv.js +0 -1
- package/dist/assets/index-DHd7WFrg.js +0 -34
- package/dist/assets/index-Dj7LxU_e.js +0 -1
- package/dist/assets/index-Xen0SnRc.css +0 -5
- package/dist/assets/login-BI9sCnOT.js +0 -1
- package/dist/index.html +0 -17
package/dist/index.js
ADDED
|
@@ -0,0 +1,1779 @@
|
|
|
1
|
+
import { defineComponent as T, computed as v, resolveComponent as x, createBlock as w, openBlock as _, unref as n, createSlots as ue, withCtx as g, renderSlot as R, createCommentVNode as $, createVNode as h, ref as k, onBeforeMount as le, onMounted as pe, onBeforeUnmount as Se, createElementBlock as O, createElementVNode as I, Fragment as G, renderList as we, createTextVNode as E, toDisplayString as j, mergeProps as re, shallowRef as U, watch as B, withModifiers as he, useCssVars as ke, nextTick as Ve, onServerPrefetch as Le, reactive as xe, toRefs as $e } from "vue";
|
|
2
|
+
import { useTheme as te, useDisplay as ie } from "vuetify";
|
|
3
|
+
import { VAppBar as ve } from "vuetify/components/VAppBar";
|
|
4
|
+
import { VDivider as ge } from "vuetify/components/VDivider";
|
|
5
|
+
import { VImg as oe } from "vuetify/components/VImg";
|
|
6
|
+
import { mdiShieldStarOutline as Ae, mdiAtomVariant as Fe, mdiLogin as me, mdiSync as Ie, mdiSyncOff as Te, mdiOpenInNew as Me } from "@mdi/js";
|
|
7
|
+
import { VIcon as se } from "vuetify/components/VIcon";
|
|
8
|
+
import { VBtn as W } from "vuetify/components/VBtn";
|
|
9
|
+
import { VCard as de, VCardActions as Ue, VCardTitle as He, VCardSubtitle as Pe } from "vuetify/components/VCard";
|
|
10
|
+
import { VDialog as ye } from "vuetify/components/VDialog";
|
|
11
|
+
import { VSpacer as Be } from "vuetify/components/VGrid";
|
|
12
|
+
import { VAvatar as Z } from "vuetify/components/VAvatar";
|
|
13
|
+
import { VList as be, VListItem as _e, VListItemTitle as De, VListItemSubtitle as Oe } from "vuetify/components/VList";
|
|
14
|
+
import { VSheet as je } from "vuetify/components/VSheet";
|
|
15
|
+
import { VSwitch as Ee } from "vuetify/components/VSwitch";
|
|
16
|
+
import { VFadeTransition as Ne, VExpandTransition as Re } from "vuetify/components/transitions";
|
|
17
|
+
import { useRouter as fe } from "vue-router";
|
|
18
|
+
import { VHover as Ze } from "vuetify/components/VHover";
|
|
19
|
+
import { VSkeletonLoader as ce } from "vuetify/components/VSkeletonLoader";
|
|
20
|
+
import { VChip as qe } from "vuetify/components/VChip";
|
|
21
|
+
import { defineStore as A } from "pinia";
|
|
22
|
+
import { merge as ae } from "lodash-es";
|
|
23
|
+
const ze = /* @__PURE__ */ T({
|
|
24
|
+
__name: "VoAppBar",
|
|
25
|
+
props: {
|
|
26
|
+
logo: {}
|
|
27
|
+
},
|
|
28
|
+
setup(r) {
|
|
29
|
+
const e = r, s = te(), a = useSettingsStore(), i = v(() => `https://cdn.vuetifyjs.com/docs/images/one/logos/${e.logo}-logo-${s.current.value.dark ? "dark" : "light"}.png`);
|
|
30
|
+
return (t, o) => {
|
|
31
|
+
const c = x("router-link"), m = x("VoAuthBtn");
|
|
32
|
+
return _(), w(ve, {
|
|
33
|
+
class: "border-b",
|
|
34
|
+
image: n(a).suit["app-bar"],
|
|
35
|
+
name: "vo-app-bar"
|
|
36
|
+
}, ue({
|
|
37
|
+
prepend: g(() => [
|
|
38
|
+
h(c, {
|
|
39
|
+
class: "ps-2",
|
|
40
|
+
to: "/"
|
|
41
|
+
}, {
|
|
42
|
+
default: g(() => [
|
|
43
|
+
h(oe, {
|
|
44
|
+
src: n(i),
|
|
45
|
+
width: "128"
|
|
46
|
+
}, null, 8, ["src"])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}),
|
|
50
|
+
R(t.$slots, "prepend")
|
|
51
|
+
]),
|
|
52
|
+
append: g(() => [
|
|
53
|
+
R(t.$slots, "append"),
|
|
54
|
+
t.$slots.append ? (_(), w(ge, {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "align-self-center h-100 mx-2 mx-sm-4",
|
|
57
|
+
length: "20",
|
|
58
|
+
vertical: ""
|
|
59
|
+
})) : $("", !0),
|
|
60
|
+
h(m)
|
|
61
|
+
]),
|
|
62
|
+
default: g(() => [
|
|
63
|
+
R(t.$slots, "default")
|
|
64
|
+
]),
|
|
65
|
+
_: 2
|
|
66
|
+
}, [
|
|
67
|
+
t.$slots.title ? {
|
|
68
|
+
name: "title",
|
|
69
|
+
fn: g(() => [
|
|
70
|
+
R(t.$slots, "title")
|
|
71
|
+
]),
|
|
72
|
+
key: "0"
|
|
73
|
+
} : void 0,
|
|
74
|
+
t.$slots.extension ? {
|
|
75
|
+
name: "extension",
|
|
76
|
+
fn: g(() => [
|
|
77
|
+
R(t.$slots, "extension")
|
|
78
|
+
]),
|
|
79
|
+
key: "1"
|
|
80
|
+
} : void 0
|
|
81
|
+
]), 1032, ["image"]);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}), Qe = ["id"], We = /* @__PURE__ */ T({
|
|
85
|
+
__name: "VoScript",
|
|
86
|
+
props: {
|
|
87
|
+
id: {
|
|
88
|
+
type: String,
|
|
89
|
+
required: !0
|
|
90
|
+
},
|
|
91
|
+
scriptId: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: !0
|
|
94
|
+
},
|
|
95
|
+
src: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: !0
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
emits: ["script:error", "script:load"],
|
|
101
|
+
setup(r, { emit: e }) {
|
|
102
|
+
const s = r, a = e, i = k(), t = k();
|
|
103
|
+
return le(async () => {
|
|
104
|
+
const o = document.createElement("script"), c = () => a("script:error");
|
|
105
|
+
o.type = "text/javascript", o.id = s.scriptId, o.src = s.src, o.addEventListener("load", () => a("script:load")), o.onerror = c, t.value = o;
|
|
106
|
+
}), pe(() => {
|
|
107
|
+
t.value && i.value && i.value.append(t.value);
|
|
108
|
+
}), Se(() => {
|
|
109
|
+
t.value && i.value && t.value.remove();
|
|
110
|
+
}), (o, c) => (_(), O("div", {
|
|
111
|
+
id: r.id,
|
|
112
|
+
ref_key: "rootEl",
|
|
113
|
+
ref: i
|
|
114
|
+
}, null, 8, Qe));
|
|
115
|
+
}
|
|
116
|
+
}), Ge = ["href", "title"], Je = {
|
|
117
|
+
class: "text-caption text-disabled",
|
|
118
|
+
style: { position: "absolute", right: "16px" }
|
|
119
|
+
}, Ye = /* @__PURE__ */ T({
|
|
120
|
+
__name: "VoSocialFooter",
|
|
121
|
+
setup(r) {
|
|
122
|
+
const e = useSettingsStore(), s = [
|
|
123
|
+
{
|
|
124
|
+
title: "Vuetify Documentation",
|
|
125
|
+
icon: "$vuetify",
|
|
126
|
+
href: "https://vuetifyjs.com/"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
title: "Vuetify Support",
|
|
130
|
+
icon: `svg:${Ae}`,
|
|
131
|
+
href: "https://support.vuetifyjs.com/"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: "Vuetify X",
|
|
135
|
+
icon: "$x",
|
|
136
|
+
href: "https://x.com/vuetifyjs"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
title: "Vuetify GitHub",
|
|
140
|
+
icon: "$github",
|
|
141
|
+
href: "https://github.com/vuetifyjs/vuetify"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
title: "Vuetify Discord",
|
|
145
|
+
icon: "$discord",
|
|
146
|
+
href: "https://community.vuetifyjs.com/"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
title: "Vuetify Reddit",
|
|
150
|
+
icon: "$reddit",
|
|
151
|
+
href: "https://reddit.com/r/vuetifyjs"
|
|
152
|
+
}
|
|
153
|
+
];
|
|
154
|
+
return (a, i) => {
|
|
155
|
+
const t = x("VoFooter");
|
|
156
|
+
return _(), w(t, {
|
|
157
|
+
class: "vo-footer",
|
|
158
|
+
height: "40",
|
|
159
|
+
image: n(e).suit.footer
|
|
160
|
+
}, ue({
|
|
161
|
+
default: g(() => [
|
|
162
|
+
(_(), O(G, null, we(s, (o) => I("a", {
|
|
163
|
+
key: o.title,
|
|
164
|
+
class: "d-inline-block mx-2 social-link",
|
|
165
|
+
href: o.href,
|
|
166
|
+
rel: "noopener noreferrer",
|
|
167
|
+
target: "_blank",
|
|
168
|
+
title: o.title
|
|
169
|
+
}, [
|
|
170
|
+
h(se, {
|
|
171
|
+
icon: o.icon,
|
|
172
|
+
size: o.icon === "$vuetify" ? 24 : 16
|
|
173
|
+
}, null, 8, ["icon", "size"])
|
|
174
|
+
], 8, Ge)), 64)),
|
|
175
|
+
I("div", Je, [
|
|
176
|
+
E(" © 2016-" + j((/* @__PURE__ */ new Date()).getFullYear()) + " ", 1),
|
|
177
|
+
i[0] || (i[0] = I("span", { class: "d-none d-sm-inline-block" }, "Vuetify, LLC", -1))
|
|
178
|
+
])
|
|
179
|
+
]),
|
|
180
|
+
_: 2
|
|
181
|
+
}, [
|
|
182
|
+
a.$slots.image ? {
|
|
183
|
+
name: "image",
|
|
184
|
+
fn: g(() => [
|
|
185
|
+
R(a.$slots, "image", {}, void 0, !0)
|
|
186
|
+
]),
|
|
187
|
+
key: "0"
|
|
188
|
+
} : void 0
|
|
189
|
+
]), 1032, ["image"]);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
}), Ce = (r, e) => {
|
|
193
|
+
const s = r.__vccOpts || r;
|
|
194
|
+
for (const [a, i] of e)
|
|
195
|
+
s[a] = i;
|
|
196
|
+
return s;
|
|
197
|
+
}, Xe = /* @__PURE__ */ Ce(Ye, [["__scopeId", "data-v-7a9688b8"]]), Ke = { class: "me-n3" }, et = /* @__PURE__ */ T({
|
|
198
|
+
__name: "VoTeamInvite",
|
|
199
|
+
setup(r) {
|
|
200
|
+
const e = useTeamStore(), s = v(() => {
|
|
201
|
+
var i, t;
|
|
202
|
+
return ((i = e.team) == null ? void 0 : i.name) ?? `${(t = e.team) == null ? void 0 : t.owner.name}'s team`;
|
|
203
|
+
});
|
|
204
|
+
function a(i) {
|
|
205
|
+
e.clearTeamQuery(), i.value = !1;
|
|
206
|
+
}
|
|
207
|
+
return (i, t) => n(e).teamInviteDialog ? (_(), w(ye, {
|
|
208
|
+
key: 0,
|
|
209
|
+
modelValue: n(e).teamInviteDialog,
|
|
210
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => n(e).teamInviteDialog = o),
|
|
211
|
+
"max-width": "500"
|
|
212
|
+
}, {
|
|
213
|
+
default: g(({ isActive: o }) => [
|
|
214
|
+
h(de, {
|
|
215
|
+
"prepend-icon": `svg:${n(Fe)}`,
|
|
216
|
+
rounded: "lg",
|
|
217
|
+
title: "Join a Team"
|
|
218
|
+
}, {
|
|
219
|
+
append: g(() => [
|
|
220
|
+
I("div", Ke, [
|
|
221
|
+
h(W, {
|
|
222
|
+
icon: "$close",
|
|
223
|
+
size: "x-small",
|
|
224
|
+
variant: "text",
|
|
225
|
+
onClick: (c) => a(o)
|
|
226
|
+
}, null, 8, ["onClick"])
|
|
227
|
+
])
|
|
228
|
+
]),
|
|
229
|
+
text: g(() => [
|
|
230
|
+
t[2] || (t[2] = E(" You have been invited to join ")),
|
|
231
|
+
I("strong", null, j(n(s)), 1),
|
|
232
|
+
t[3] || (t[3] = E("! "))
|
|
233
|
+
]),
|
|
234
|
+
default: g(() => [
|
|
235
|
+
h(ge, { opacity: ".2" }),
|
|
236
|
+
h(Ue, { class: "bg-surface-light" }, {
|
|
237
|
+
default: g(() => [
|
|
238
|
+
h(W, {
|
|
239
|
+
disabled: n(e).isLoading,
|
|
240
|
+
rounded: "lg",
|
|
241
|
+
text: "Cancel",
|
|
242
|
+
variant: "plain",
|
|
243
|
+
onClick: (c) => a(o)
|
|
244
|
+
}, null, 8, ["disabled", "onClick"]),
|
|
245
|
+
h(Be),
|
|
246
|
+
h(W, {
|
|
247
|
+
"append-icon": "$success",
|
|
248
|
+
color: "success",
|
|
249
|
+
disabled: n(e).isLoading,
|
|
250
|
+
rounded: "lg",
|
|
251
|
+
text: "Accept",
|
|
252
|
+
variant: "flat",
|
|
253
|
+
onClick: t[0] || (t[0] = (c) => n(e).joinTeam())
|
|
254
|
+
}, null, 8, ["disabled"])
|
|
255
|
+
]),
|
|
256
|
+
_: 2
|
|
257
|
+
}, 1024)
|
|
258
|
+
]),
|
|
259
|
+
_: 2
|
|
260
|
+
}, 1032, ["prepend-icon"])
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
}, 8, ["modelValue"])) : $("", !0);
|
|
264
|
+
}
|
|
265
|
+
}), tt = { key: 0 }, ot = /* @__PURE__ */ T({
|
|
266
|
+
__name: "VoAuthBtn",
|
|
267
|
+
props: {
|
|
268
|
+
external: Boolean
|
|
269
|
+
},
|
|
270
|
+
setup(r) {
|
|
271
|
+
const e = useAuthStore(), s = useOneStore(), a = useUserStore(), { lgAndUp: i } = ie(), t = v(() => s.isOpen || !e.user ? a.colors.one === "surface-light" ? "primary" : a.colors.one : "surface-light"), { smAndUp: o } = ie();
|
|
272
|
+
return (c, m) => {
|
|
273
|
+
const d = x("VoUserMenu"), p = x("VoBtn"), C = x("VoNotificationsTotalBadge"), V = x("VoAuthDialog"), f = x("VoSnackbarQueue");
|
|
274
|
+
return _(), O(G, null, [
|
|
275
|
+
h(C, {
|
|
276
|
+
"offset-y": n(e).user ? 5 : 0
|
|
277
|
+
}, {
|
|
278
|
+
default: g(() => [
|
|
279
|
+
h(p, re({
|
|
280
|
+
[`${n(i) ? "append-" : ""}icon`]: n(e).user ? void 0 : `svg:${n(me)}`
|
|
281
|
+
}, {
|
|
282
|
+
active: "",
|
|
283
|
+
border: !!n(e).user,
|
|
284
|
+
class: "vo-auth-btn",
|
|
285
|
+
color: n(t),
|
|
286
|
+
icon: n(e).user || n(e).isLoading || !n(o),
|
|
287
|
+
loading: n(e).isLoading,
|
|
288
|
+
size: n(o) ? "default" : "small",
|
|
289
|
+
style: { transition: ".2s ease" },
|
|
290
|
+
variant: n(e).user ? n(s).isOpen ? "outlined" : "text" : "flat"
|
|
291
|
+
}), {
|
|
292
|
+
default: g(() => [
|
|
293
|
+
n(e).user ? (_(), w(Z, {
|
|
294
|
+
key: 0,
|
|
295
|
+
image: n(a).avatar || n(e).user.picture || ""
|
|
296
|
+
}, null, 8, ["image"])) : (_(), O(G, { key: 1 }, [
|
|
297
|
+
n(o) ? (_(), O("span", tt, "Login")) : (_(), w(se, {
|
|
298
|
+
key: 1,
|
|
299
|
+
icon: `svg:${n(me)}`
|
|
300
|
+
}, null, 8, ["icon"]))
|
|
301
|
+
], 64)),
|
|
302
|
+
h(d)
|
|
303
|
+
]),
|
|
304
|
+
_: 1
|
|
305
|
+
}, 16, ["border", "color", "icon", "loading", "size", "variant"])
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
}, 8, ["offset-y"]),
|
|
309
|
+
h(V),
|
|
310
|
+
h(et),
|
|
311
|
+
h(f)
|
|
312
|
+
], 64);
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
}), st = { class: "text-center" }, at = { class: "text-center mb-6" }, nt = { class: "text-h6 font-weight-light" }, rt = /* @__PURE__ */ T({
|
|
316
|
+
__name: "VoAuthCard",
|
|
317
|
+
setup(r) {
|
|
318
|
+
const e = useAuthStore();
|
|
319
|
+
return (s, a) => {
|
|
320
|
+
const i = x("VoAuthGithub"), t = x("VoAuthDiscord"), o = x("VoAuthShopify");
|
|
321
|
+
return _(), w(de, {
|
|
322
|
+
class: "pt-6 pb-8 px-4 px-sm-8 mx-auto",
|
|
323
|
+
"max-width": "480"
|
|
324
|
+
}, {
|
|
325
|
+
default: g(() => [
|
|
326
|
+
I("div", st, [
|
|
327
|
+
h(Z, {
|
|
328
|
+
class: "mx-auto",
|
|
329
|
+
image: "https://vuetifyjs.b-cdn.net/docs/images/avatars/one.png",
|
|
330
|
+
size: "64"
|
|
331
|
+
})
|
|
332
|
+
]),
|
|
333
|
+
I("div", at, [
|
|
334
|
+
h(He, { class: "text-h5 mb-1 text-md-h4" }, {
|
|
335
|
+
default: g(() => [
|
|
336
|
+
I("div", nt, j(n(e).lastLoginProvider() ? "Welcome back to" : "Login to"), 1),
|
|
337
|
+
a[0] || (a[0] = I("span", { class: "text-h3 font-weight-bold" }, "Vuetify One", -1))
|
|
338
|
+
]),
|
|
339
|
+
_: 1
|
|
340
|
+
}),
|
|
341
|
+
h(Pe, { class: "text-wrap" }, {
|
|
342
|
+
default: g(() => a[1] || (a[1] = [
|
|
343
|
+
E(" Login to save your settings and gain access to exclusive subscriber perks. ")
|
|
344
|
+
])),
|
|
345
|
+
_: 1
|
|
346
|
+
})
|
|
347
|
+
]),
|
|
348
|
+
h(be, {
|
|
349
|
+
class: "mx-auto",
|
|
350
|
+
"max-width": "300",
|
|
351
|
+
width: "100%"
|
|
352
|
+
}, {
|
|
353
|
+
default: g(() => [
|
|
354
|
+
h(i, { class: "mb-3" }),
|
|
355
|
+
h(t, { class: "mb-3" }),
|
|
356
|
+
h(o)
|
|
357
|
+
]),
|
|
358
|
+
_: 1
|
|
359
|
+
})
|
|
360
|
+
]),
|
|
361
|
+
_: 1
|
|
362
|
+
});
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}), it = /* @__PURE__ */ T({
|
|
366
|
+
__name: "VoAuthDialog",
|
|
367
|
+
setup(r) {
|
|
368
|
+
const e = useAuthStore();
|
|
369
|
+
return (s, a) => {
|
|
370
|
+
const i = x("VoAuthCard");
|
|
371
|
+
return _(), w(ye, {
|
|
372
|
+
modelValue: n(e).dialog,
|
|
373
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => n(e).dialog = t),
|
|
374
|
+
"max-width": "480"
|
|
375
|
+
}, {
|
|
376
|
+
default: g(() => [
|
|
377
|
+
h(i)
|
|
378
|
+
]),
|
|
379
|
+
_: 1
|
|
380
|
+
}, 8, ["modelValue"]);
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
}), ct = { class: "pa-4 d-flex flex-column ga-4" }, ut = /* @__PURE__ */ T({
|
|
384
|
+
__name: "VoAuthListItem",
|
|
385
|
+
setup(r) {
|
|
386
|
+
const e = useAuthStore(), s = useUserStore(), a = U(!e.user && !e.isLoading);
|
|
387
|
+
B(() => e.user, (t) => {
|
|
388
|
+
a.value = !t;
|
|
389
|
+
});
|
|
390
|
+
function i() {
|
|
391
|
+
e.user && (a.value = !a.value);
|
|
392
|
+
}
|
|
393
|
+
return (t, o) => {
|
|
394
|
+
const c = x("VoAuthGithub"), m = x("VoAuthDiscord"), d = x("VoAuthShopify");
|
|
395
|
+
return _(), w(de, {
|
|
396
|
+
class: "ma-2",
|
|
397
|
+
rounded: "lg",
|
|
398
|
+
variant: n(a) ? "tonal" : "text"
|
|
399
|
+
}, {
|
|
400
|
+
default: g(() => [
|
|
401
|
+
h(be, { class: "py-0" }, {
|
|
402
|
+
default: g(() => [
|
|
403
|
+
h(_e, {
|
|
404
|
+
class: "mb-0",
|
|
405
|
+
link: !!n(e).user,
|
|
406
|
+
nav: "",
|
|
407
|
+
"prepend-icon": `svg:${n(e).user && n(s).syncSettings ? n(Ie) : n(Te)}`,
|
|
408
|
+
rounded: "b-0",
|
|
409
|
+
slim: "",
|
|
410
|
+
title: n(e).user && n(s).syncSettings ? "Sync is on" : "Sync is paused",
|
|
411
|
+
onClick: i
|
|
412
|
+
}, {
|
|
413
|
+
append: g(() => [
|
|
414
|
+
h(Ne, null, {
|
|
415
|
+
default: g(() => [
|
|
416
|
+
n(e).user && (n(a) || !n(s).syncSettings) ? (_(), w(Ee, {
|
|
417
|
+
key: 0,
|
|
418
|
+
modelValue: n(s).syncSettings,
|
|
419
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => n(s).syncSettings = p),
|
|
420
|
+
color: n(s).syncSettings ? "success" : void 0,
|
|
421
|
+
density: "compact",
|
|
422
|
+
"hide-details": "",
|
|
423
|
+
inset: "",
|
|
424
|
+
onClick: o[1] || (o[1] = he(() => {
|
|
425
|
+
}, ["stop"]))
|
|
426
|
+
}, {
|
|
427
|
+
thumb: g(() => [
|
|
428
|
+
h(Z, {
|
|
429
|
+
color: n(s).syncSettings ? "success" : void 0
|
|
430
|
+
}, null, 8, ["color"])
|
|
431
|
+
]),
|
|
432
|
+
_: 1
|
|
433
|
+
}, 8, ["modelValue", "color"])) : $("", !0)
|
|
434
|
+
]),
|
|
435
|
+
_: 1
|
|
436
|
+
})
|
|
437
|
+
]),
|
|
438
|
+
_: 1
|
|
439
|
+
}, 8, ["link", "prepend-icon", "title"]),
|
|
440
|
+
h(Re, null, {
|
|
441
|
+
default: g(() => [
|
|
442
|
+
!n(e).user && !n(e).isLoading || n(a) ? (_(), w(je, {
|
|
443
|
+
key: 0,
|
|
444
|
+
border: "t",
|
|
445
|
+
color: "transparent"
|
|
446
|
+
}, {
|
|
447
|
+
default: g(() => [
|
|
448
|
+
I("div", ct, [
|
|
449
|
+
h(c, {
|
|
450
|
+
onClick: o[2] || (o[2] = (p) => a.value = !1)
|
|
451
|
+
}),
|
|
452
|
+
h(m, {
|
|
453
|
+
onClick: o[3] || (o[3] = (p) => a.value = !1)
|
|
454
|
+
}),
|
|
455
|
+
h(d, {
|
|
456
|
+
onClick: o[4] || (o[4] = (p) => a.value = !1)
|
|
457
|
+
})
|
|
458
|
+
])
|
|
459
|
+
]),
|
|
460
|
+
_: 1
|
|
461
|
+
})) : $("", !0)
|
|
462
|
+
]),
|
|
463
|
+
_: 1
|
|
464
|
+
})
|
|
465
|
+
]),
|
|
466
|
+
_: 1
|
|
467
|
+
})
|
|
468
|
+
]),
|
|
469
|
+
_: 1
|
|
470
|
+
}, 8, ["variant"]);
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
}), lt = /* @__PURE__ */ T({
|
|
474
|
+
__name: "VoIconBin",
|
|
475
|
+
setup(r) {
|
|
476
|
+
return (e, s) => (_(), w(se, { icon: "$vuetify-bin" }));
|
|
477
|
+
}
|
|
478
|
+
}), dt = /* @__PURE__ */ T({
|
|
479
|
+
__name: "VoIconIssues",
|
|
480
|
+
setup(r) {
|
|
481
|
+
const e = [
|
|
482
|
+
["M21.57 19.41L18.36 16.41C19.7242 14.5916 20.3549 12.3267 20.127 10.065C19.8991 7.80316 18.8293 5.70969 17.1298 4.19992C15.4303 2.69016 13.2254 1.87444 10.9525 1.91463C8.67959 1.95481 6.50486 2.84796 4.8598 4.41685C3.21475 5.98575 2.21959 8.11573 2.07179 10.3842C1.924 12.6526 2.63436 14.8937 4.06193 16.6628C5.4895 18.4319 7.52995 19.5997 9.77841 19.9344C12.0269 20.2692 14.319 19.7465 16.2 18.47L19.5 21.6C19.7743 21.8507 20.1287 21.996 20.5 22.01C20.7053 22.0117 20.9087 21.9698 21.0966 21.8871C21.2845 21.8043 21.4527 21.6826 21.59 21.53C21.729 21.3901 21.8389 21.224 21.9132 21.0413C21.9875 20.8586 22.0248 20.663 22.0229 20.4658C22.0211 20.2686 21.9801 20.0737 21.9023 19.8925C21.8246 19.7113 21.7116 19.5473 21.57 19.41ZM11.1 17.33C9.83508 17.328 8.59909 16.9512 7.54815 16.2472C6.49721 15.5432 5.67846 14.5436 5.1953 13.3746C4.71214 12.2055 4.58624 10.9195 4.8335 9.67898C5.08077 8.43843 5.6901 7.29898 6.58455 6.40453C7.47901 5.51007 8.61846 4.90074 9.85901 4.65347C11.0996 4.40621 12.3856 4.53211 13.5546 5.01527C14.7236 5.49843 15.7233 6.31718 16.4273 7.36812C17.1313 8.41906 17.5081 9.65506 17.51 10.92C17.51 11.7618 17.3442 12.5953 17.0221 13.373C16.7 14.1507 16.2278 14.8573 15.6326 15.4526C15.0374 16.0478 14.3307 16.5199 13.553 16.8421C12.7753 17.1642 11.9418 17.33 11.1 17.33Z", 0.8],
|
|
483
|
+
"M8.63152 12.7367L8.50057 12.5L6 8H11.263L8.63152 12.7367Z",
|
|
484
|
+
["M9.11205 13.6004L11 17L16 8H12.223L9.11205 13.6004Z", 0.6]
|
|
485
|
+
];
|
|
486
|
+
return (s, a) => (_(), w(se, { icon: e }));
|
|
487
|
+
}
|
|
488
|
+
}), ft = /* @__PURE__ */ T({
|
|
489
|
+
__name: "VoNotificationsBanner",
|
|
490
|
+
props: {
|
|
491
|
+
demo: { type: Boolean }
|
|
492
|
+
},
|
|
493
|
+
setup(r) {
|
|
494
|
+
ke((f) => {
|
|
495
|
+
var S;
|
|
496
|
+
return {
|
|
497
|
+
"4bc57505": (S = n(o)) == null ? void 0 : S.metadata.bg_blur
|
|
498
|
+
};
|
|
499
|
+
});
|
|
500
|
+
const e = r, { mdAndUp: s } = ie(), a = fe(), i = useUserStore(), t = useBannersStore(), o = v(() => t.banner), c = v(() => {
|
|
501
|
+
var f, S;
|
|
502
|
+
return ((f = o.value) == null ? void 0 : f.metadata.height) || ((S = o.value) != null && S.metadata.subtext ? 88 : 48);
|
|
503
|
+
}), m = v(() => e.demo ? !0 : !o.value || !i.notifications.last.banner.includes(o.value.slug));
|
|
504
|
+
function d() {
|
|
505
|
+
e.demo || o.value && i.notifications.last.banner.push(o.value.slug);
|
|
506
|
+
}
|
|
507
|
+
async function p(f) {
|
|
508
|
+
var b;
|
|
509
|
+
if (!o.value) return;
|
|
510
|
+
d(), await Ve();
|
|
511
|
+
const S = ((b = o.value) == null ? void 0 : b.metadata) ?? { link: "" };
|
|
512
|
+
if (!S.link.includes("?one=")) return;
|
|
513
|
+
f.preventDefault(), f.stopPropagation();
|
|
514
|
+
const u = S.link.split("?one=")[1];
|
|
515
|
+
a.push({ query: { one: u } });
|
|
516
|
+
}
|
|
517
|
+
const C = v(() => {
|
|
518
|
+
var S, u;
|
|
519
|
+
const f = ((S = o.value) == null ? void 0 : S.metadata) ?? { link: "" };
|
|
520
|
+
return {
|
|
521
|
+
href: f.link.startsWith("http") ? f.link : void 0,
|
|
522
|
+
target: f.link.startsWith("http") ? "_blank" : void 0,
|
|
523
|
+
to: f.link.startsWith("http") ? void 0 : f.link,
|
|
524
|
+
...(u = o.value) == null ? void 0 : u.metadata.attributes,
|
|
525
|
+
onClick: p
|
|
526
|
+
};
|
|
527
|
+
}), V = v(() => {
|
|
528
|
+
var u, b;
|
|
529
|
+
const f = (b = (u = o.value) == null ? void 0 : u.metadata.images.bg) == null ? void 0 : b.url;
|
|
530
|
+
if (!(f != null && f.startsWith("https://cdn.cosmicjs.com/"))) return f;
|
|
531
|
+
const S = new URL(f);
|
|
532
|
+
return S.host = "imgix.cosmicjs.com", S.search = new URLSearchParams({
|
|
533
|
+
auto: "format,compress",
|
|
534
|
+
q: "10",
|
|
535
|
+
fit: "crop",
|
|
536
|
+
w: "4096",
|
|
537
|
+
h: "256"
|
|
538
|
+
}).toString(), S.toString();
|
|
539
|
+
});
|
|
540
|
+
return (f, S) => n(o) ? (_(), w(ve, {
|
|
541
|
+
key: 0,
|
|
542
|
+
color: n(o).metadata.color,
|
|
543
|
+
flat: "",
|
|
544
|
+
height: n(c),
|
|
545
|
+
image: n(V),
|
|
546
|
+
location: f.demo ? "bottom" : void 0,
|
|
547
|
+
"model-value": n(m),
|
|
548
|
+
order: "-1"
|
|
549
|
+
}, {
|
|
550
|
+
default: g(() => [
|
|
551
|
+
h(_e, re(n(C), {
|
|
552
|
+
active: !1,
|
|
553
|
+
class: "flex-grow-1 py-6",
|
|
554
|
+
lines: "two",
|
|
555
|
+
onClick: p
|
|
556
|
+
}), {
|
|
557
|
+
prepend: g(() => [
|
|
558
|
+
n(o).metadata.images.logo ? (_(), w(Z, {
|
|
559
|
+
key: 0,
|
|
560
|
+
icon: "$vuetify",
|
|
561
|
+
image: n(o).metadata.images.logo.url,
|
|
562
|
+
size: "x-large",
|
|
563
|
+
tile: ""
|
|
564
|
+
}, null, 8, ["image"])) : $("", !0)
|
|
565
|
+
]),
|
|
566
|
+
append: g(() => [
|
|
567
|
+
n(s) && n(o).metadata.link && n(o).metadata.link_text ? (_(), w(Ze, { key: 0 }, {
|
|
568
|
+
default: g(({ isHovering: u, props: b }) => [
|
|
569
|
+
h(W, re({
|
|
570
|
+
...b,
|
|
571
|
+
...n(C)
|
|
572
|
+
}, {
|
|
573
|
+
"append-icon": `svg:${n(Me)}`,
|
|
574
|
+
class: "text-none me-2",
|
|
575
|
+
color: n(o).metadata.link_color,
|
|
576
|
+
elevation: u ? 8 : 0,
|
|
577
|
+
title: n(o).metadata.link_text,
|
|
578
|
+
variant: "elevated",
|
|
579
|
+
onClick: p
|
|
580
|
+
}), {
|
|
581
|
+
default: g(() => [
|
|
582
|
+
E(j(n(o).metadata.link_text), 1)
|
|
583
|
+
]),
|
|
584
|
+
_: 2
|
|
585
|
+
}, 1040, ["append-icon", "color", "elevation", "title"])
|
|
586
|
+
]),
|
|
587
|
+
_: 1
|
|
588
|
+
})) : $("", !0),
|
|
589
|
+
n(o).metadata.closable ? (_(), w(W, {
|
|
590
|
+
key: 1,
|
|
591
|
+
class: "ms-6 me-2",
|
|
592
|
+
density: "comfortable",
|
|
593
|
+
icon: "$clear",
|
|
594
|
+
size: "small",
|
|
595
|
+
variant: "plain",
|
|
596
|
+
onClick: he(d, ["prevent", "stop"])
|
|
597
|
+
})) : $("", !0)
|
|
598
|
+
]),
|
|
599
|
+
default: g(() => [
|
|
600
|
+
n(o).metadata.text ? (_(), w(De, {
|
|
601
|
+
key: 0,
|
|
602
|
+
class: "text-subtitle-2 text-md-subtitle-1 font-weight-medium"
|
|
603
|
+
}, {
|
|
604
|
+
default: g(() => [
|
|
605
|
+
E(j(n(o).metadata.text), 1)
|
|
606
|
+
]),
|
|
607
|
+
_: 1
|
|
608
|
+
})) : $("", !0),
|
|
609
|
+
n(o).metadata.subtext ? (_(), w(Oe, { key: 1 }, {
|
|
610
|
+
default: g(() => [
|
|
611
|
+
E(j(n(o).metadata.subtext), 1)
|
|
612
|
+
]),
|
|
613
|
+
_: 1
|
|
614
|
+
})) : $("", !0)
|
|
615
|
+
]),
|
|
616
|
+
_: 1
|
|
617
|
+
}, 16)
|
|
618
|
+
]),
|
|
619
|
+
_: 1
|
|
620
|
+
}, 8, ["color", "height", "image", "location", "model-value"])) : $("", !0);
|
|
621
|
+
}
|
|
622
|
+
}), mt = /* @__PURE__ */ Ce(ft, [["__scopeId", "data-v-55bdb145"]]), pt = /* @__PURE__ */ T({
|
|
623
|
+
__name: "VoPromotionsCardHighlight",
|
|
624
|
+
props: {
|
|
625
|
+
slug: {}
|
|
626
|
+
},
|
|
627
|
+
setup(r) {
|
|
628
|
+
const e = r, s = useAuthStore(), a = usePromotionsStore(), i = te(), t = useUserStore(), o = v(() => {
|
|
629
|
+
if (!(s.user && t.disableAds))
|
|
630
|
+
return e.slug ? a.all.find((d) => d.slug === e.slug) : a.random(a.all);
|
|
631
|
+
}), c = v(() => {
|
|
632
|
+
var p, C;
|
|
633
|
+
const d = i.current.value.dark ? "logodark" : "logolight";
|
|
634
|
+
return (C = (p = o.value) == null ? void 0 : p.metadata.images[d]) == null ? void 0 : C.url;
|
|
635
|
+
}), m = v(() => {
|
|
636
|
+
var p, C;
|
|
637
|
+
const d = i.current.value.dark ? "bgdark" : "bglight";
|
|
638
|
+
return (C = (p = o.value) == null ? void 0 : p.metadata.images[d]) == null ? void 0 : C.url;
|
|
639
|
+
});
|
|
640
|
+
return (d, p) => {
|
|
641
|
+
var V, f, S;
|
|
642
|
+
const C = x("VoPromotionsCard");
|
|
643
|
+
return n(o) || !n(a).hasLoaded ? (_(), w(C, {
|
|
644
|
+
key: 0,
|
|
645
|
+
class: "vo-promotions-card-highlight",
|
|
646
|
+
color: ((V = n(o)) == null ? void 0 : V.metadata.color) ?? "surface",
|
|
647
|
+
height: "60",
|
|
648
|
+
href: (f = n(o)) == null ? void 0 : f.metadata.url,
|
|
649
|
+
image: n(m),
|
|
650
|
+
"max-width": "720",
|
|
651
|
+
"prepend-avatar": n(c),
|
|
652
|
+
title: (S = n(o)) == null ? void 0 : S.metadata.short_text,
|
|
653
|
+
width: "100%"
|
|
654
|
+
}, ue({
|
|
655
|
+
default: g(() => [
|
|
656
|
+
n(a).hasLoaded ? $("", !0) : (_(), w(ce, {
|
|
657
|
+
key: 0,
|
|
658
|
+
class: "flex-1-0 overflow-hidden",
|
|
659
|
+
color: "transparent",
|
|
660
|
+
height: "60",
|
|
661
|
+
loading: "",
|
|
662
|
+
type: "image"
|
|
663
|
+
}))
|
|
664
|
+
]),
|
|
665
|
+
_: 2
|
|
666
|
+
}, [
|
|
667
|
+
n(o) ? {
|
|
668
|
+
name: "prepend",
|
|
669
|
+
fn: g(() => [
|
|
670
|
+
h(Z, {
|
|
671
|
+
class: "my-n4 me-4",
|
|
672
|
+
icon: "$vuetify",
|
|
673
|
+
size: "36"
|
|
674
|
+
})
|
|
675
|
+
]),
|
|
676
|
+
key: "0"
|
|
677
|
+
} : void 0,
|
|
678
|
+
n(o) ? {
|
|
679
|
+
name: "image",
|
|
680
|
+
fn: g(() => [
|
|
681
|
+
h(oe, { position: "right" })
|
|
682
|
+
]),
|
|
683
|
+
key: "1"
|
|
684
|
+
} : void 0
|
|
685
|
+
]), 1032, ["color", "href", "image", "prepend-avatar", "title"])) : $("", !0);
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
}), ht = { class: "d-flex ga-4" }, vt = { class: "d-flex align-start ga-4" }, gt = { class: "text-caption on-surface-light" }, yt = /* @__PURE__ */ T({
|
|
689
|
+
__name: "VoPromotionsCardVuetify",
|
|
690
|
+
props: {
|
|
691
|
+
slug: {}
|
|
692
|
+
},
|
|
693
|
+
setup(r) {
|
|
694
|
+
const e = r, s = useAuthStore(), a = usePromotionsStore(), i = useUserStore(), t = v(() => {
|
|
695
|
+
if (!(s.user && i.disableAds && !i.showHouseAds))
|
|
696
|
+
return e.slug ? a.all.find((o) => o.slug === e.slug) : a.random(i.disableAds && i.showHouseAds ? a.discoverable : a.all);
|
|
697
|
+
});
|
|
698
|
+
return (o, c) => {
|
|
699
|
+
var d, p;
|
|
700
|
+
const m = x("VoPromotionsCard");
|
|
701
|
+
return n(t) || !n(a).hasLoaded ? (_(), w(m, {
|
|
702
|
+
key: 0,
|
|
703
|
+
border: "",
|
|
704
|
+
caption: "ads via vuetify",
|
|
705
|
+
class: "vo-promotions-card-vuetify pa-2",
|
|
706
|
+
href: (p = (d = n(t)) == null ? void 0 : d.metadata) == null ? void 0 : p.url,
|
|
707
|
+
width: "360"
|
|
708
|
+
}, {
|
|
709
|
+
default: g(() => {
|
|
710
|
+
var C, V, f;
|
|
711
|
+
return [
|
|
712
|
+
I("div", ht, [
|
|
713
|
+
n(a).hasLoaded ? n(t) ? (_(), O(G, { key: 1 }, [
|
|
714
|
+
h(oe, {
|
|
715
|
+
cover: "",
|
|
716
|
+
height: "100",
|
|
717
|
+
"max-width": "130",
|
|
718
|
+
position: "right",
|
|
719
|
+
rounded: "s",
|
|
720
|
+
src: (V = (C = n(t).metadata) == null ? void 0 : C.images.default) == null ? void 0 : V.url,
|
|
721
|
+
width: "100%"
|
|
722
|
+
}, null, 8, ["src"]),
|
|
723
|
+
I("div", vt, [
|
|
724
|
+
I("div", gt, j((f = n(t).metadata) == null ? void 0 : f.text), 1)
|
|
725
|
+
])
|
|
726
|
+
], 64)) : $("", !0) : (_(), O(G, { key: 0 }, [
|
|
727
|
+
h(ce, {
|
|
728
|
+
class: "flex-1-0 overflow-hidden",
|
|
729
|
+
color: "transparent",
|
|
730
|
+
loading: "",
|
|
731
|
+
"max-height": "100",
|
|
732
|
+
"min-width": "130",
|
|
733
|
+
type: "image"
|
|
734
|
+
}),
|
|
735
|
+
h(ce, {
|
|
736
|
+
class: "flex-1-0 ms-n3 mt-n3",
|
|
737
|
+
color: "transparent",
|
|
738
|
+
loading: "",
|
|
739
|
+
"max-height": "100",
|
|
740
|
+
type: "text@3"
|
|
741
|
+
})
|
|
742
|
+
], 64))
|
|
743
|
+
])
|
|
744
|
+
];
|
|
745
|
+
}),
|
|
746
|
+
_: 1
|
|
747
|
+
}, 8, ["href"])) : $("", !0);
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
}), bt = ["href"], _t = /* @__PURE__ */ T({
|
|
751
|
+
__name: "VoPromotionsFooter",
|
|
752
|
+
props: {
|
|
753
|
+
slug: {}
|
|
754
|
+
},
|
|
755
|
+
setup(r) {
|
|
756
|
+
const e = r, s = useAuthStore(), a = usePromotionsStore(), i = useUserStore(), t = te(), o = v(() => {
|
|
757
|
+
if (!(s.user && i.disableAds))
|
|
758
|
+
return e.slug ? a.all.find((d) => d.slug === e.slug) : a.random(a.all);
|
|
759
|
+
}), c = v(() => {
|
|
760
|
+
var p, C;
|
|
761
|
+
const d = t.current.value.dark ? "logodark" : "logolight";
|
|
762
|
+
return (C = (p = o.value) == null ? void 0 : p.metadata.images[d]) == null ? void 0 : C.url;
|
|
763
|
+
}), m = v(() => {
|
|
764
|
+
var p, C;
|
|
765
|
+
const d = t.current.value.dark ? "bgdark" : "bglight";
|
|
766
|
+
return (C = (p = o.value) == null ? void 0 : p.metadata.images[d]) == null ? void 0 : C.url;
|
|
767
|
+
});
|
|
768
|
+
return (d, p) => {
|
|
769
|
+
var V;
|
|
770
|
+
const C = x("VoFooter");
|
|
771
|
+
return _(), w(C, {
|
|
772
|
+
color: ((V = n(o)) == null ? void 0 : V.metadata.color) ?? "surface",
|
|
773
|
+
image: n(m),
|
|
774
|
+
style: { transform: "translateY(0)" }
|
|
775
|
+
}, {
|
|
776
|
+
default: g(() => {
|
|
777
|
+
var f, S, u;
|
|
778
|
+
return [
|
|
779
|
+
I("a", {
|
|
780
|
+
class: "d-flex align-center text-decoration-none py-2 px-4 ms-n4 flex-1-0 me-n4 position-relative",
|
|
781
|
+
href: (f = n(o)) == null ? void 0 : f.metadata.url,
|
|
782
|
+
rel: "noopener noreferrer",
|
|
783
|
+
style: { color: "inherit" },
|
|
784
|
+
target: "_blank"
|
|
785
|
+
}, [
|
|
786
|
+
h(Z, {
|
|
787
|
+
class: "me-4",
|
|
788
|
+
icon: "$vuetify",
|
|
789
|
+
image: n(c),
|
|
790
|
+
size: "24"
|
|
791
|
+
}, null, 8, ["image"]),
|
|
792
|
+
I("div", null, j((S = n(o)) == null ? void 0 : S.metadata.text), 1),
|
|
793
|
+
(u = n(o)) != null && u.metadata.advertisement ? (_(), w(qe, {
|
|
794
|
+
key: 0,
|
|
795
|
+
class: "ms-auto me-n4 align-self-end mb-n2 py-1 ps-3",
|
|
796
|
+
rounded: "0 ts-lg",
|
|
797
|
+
size: "x-small",
|
|
798
|
+
text: "SPONSORED",
|
|
799
|
+
variant: "flat"
|
|
800
|
+
})) : $("", !0)
|
|
801
|
+
], 8, bt)
|
|
802
|
+
];
|
|
803
|
+
}),
|
|
804
|
+
_: 1
|
|
805
|
+
}, 8, ["color", "image"]);
|
|
806
|
+
};
|
|
807
|
+
}
|
|
808
|
+
}), Ct = ["href"], St = /* @__PURE__ */ T({
|
|
809
|
+
__name: "VoSpot",
|
|
810
|
+
setup(r) {
|
|
811
|
+
const e = useSpotsStore();
|
|
812
|
+
return (s, a) => {
|
|
813
|
+
var i;
|
|
814
|
+
return n(e).spot ? (_(), O("a", {
|
|
815
|
+
key: 0,
|
|
816
|
+
href: n(e).spot.metadata.href,
|
|
817
|
+
rel: "noopener noreferrer sponsored",
|
|
818
|
+
target: "_blank"
|
|
819
|
+
}, [
|
|
820
|
+
h(oe, {
|
|
821
|
+
class: "mx-auto",
|
|
822
|
+
color: n(e).spot.metadata.image ? void 0 : "surface",
|
|
823
|
+
rounded: "",
|
|
824
|
+
src: (i = n(e).spot.metadata.image) == null ? void 0 : i.url,
|
|
825
|
+
width: "225"
|
|
826
|
+
}, null, 8, ["color", "src"])
|
|
827
|
+
], 8, Ct)) : $("", !0);
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
}), zt = {
|
|
831
|
+
discord: ["M22,24L16.75,19L17.38,21H4.5A2.5,2.5 0 0,1 2,18.5V3.5A2.5,2.5 0 0,1 4.5,1H19.5A2.5,2.5 0 0,1 22,3.5V24M12,6.8C9.32,6.8 7.44,7.95 7.44,7.95C8.47,7.03 10.27,6.5 10.27,6.5L10.1,6.33C8.41,6.36 6.88,7.53 6.88,7.53C5.16,11.12 5.27,14.22 5.27,14.22C6.67,16.03 8.75,15.9 8.75,15.9L9.46,15C8.21,14.73 7.42,13.62 7.42,13.62C7.42,13.62 9.3,14.9 12,14.9C14.7,14.9 16.58,13.62 16.58,13.62C16.58,13.62 15.79,14.73 14.54,15L15.25,15.9C15.25,15.9 17.33,16.03 18.73,14.22C18.73,14.22 18.84,11.12 17.12,7.53C17.12,7.53 15.59,6.36 13.9,6.33L13.73,6.5C13.73,6.5 15.53,7.03 16.56,7.95C16.56,7.95 14.68,6.8 12,6.8M9.93,10.59C10.58,10.59 11.11,11.16 11.1,11.86C11.1,12.55 10.58,13.13 9.93,13.13C9.29,13.13 8.77,12.55 8.77,11.86C8.77,11.16 9.28,10.59 9.93,10.59M14.1,10.59C14.75,10.59 15.27,11.16 15.27,11.86C15.27,12.55 14.75,13.13 14.1,13.13C13.46,13.13 12.94,12.55 12.94,11.86C12.94,11.16 13.45,10.59 14.1,10.59Z"],
|
|
832
|
+
github: ["M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z"],
|
|
833
|
+
reddit: "M14.5 15.41C14.58 15.5 14.58 15.69 14.5 15.8C13.77 16.5 12.41 16.56 12 16.56C11.61 16.56 10.25 16.5 9.54 15.8C9.44 15.69 9.44 15.5 9.54 15.41C9.65 15.31 9.82 15.31 9.92 15.41C10.38 15.87 11.33 16 12 16C12.69 16 13.66 15.87 14.1 15.41C14.21 15.31 14.38 15.31 14.5 15.41M10.75 13.04C10.75 12.47 10.28 12 9.71 12C9.14 12 8.67 12.47 8.67 13.04C8.67 13.61 9.14 14.09 9.71 14.08C10.28 14.08 10.75 13.61 10.75 13.04M14.29 12C13.72 12 13.25 12.5 13.25 13.05S13.72 14.09 14.29 14.09C14.86 14.09 15.33 13.61 15.33 13.05C15.33 12.5 14.86 12 14.29 12M22 12C22 17.5 17.5 22 12 22S2 17.5 2 12C2 6.5 6.5 2 12 2S22 6.5 22 12M18.67 12C18.67 11.19 18 10.54 17.22 10.54C16.82 10.54 16.46 10.7 16.2 10.95C15.2 10.23 13.83 9.77 12.3 9.71L12.97 6.58L15.14 7.05C15.16 7.6 15.62 8.04 16.18 8.04C16.75 8.04 17.22 7.57 17.22 7C17.22 6.43 16.75 5.96 16.18 5.96C15.77 5.96 15.41 6.2 15.25 6.55L12.82 6.03C12.75 6 12.68 6.03 12.63 6.07C12.57 6.11 12.54 6.17 12.53 6.24L11.79 9.72C10.24 9.77 8.84 10.23 7.82 10.96C7.56 10.71 7.2 10.56 6.81 10.56C6 10.56 5.35 11.21 5.35 12C5.35 12.61 5.71 13.11 6.21 13.34C6.19 13.5 6.18 13.62 6.18 13.78C6.18 16 8.79 17.85 12 17.85C15.23 17.85 17.85 16.03 17.85 13.78C17.85 13.64 17.84 13.5 17.81 13.34C18.31 13.11 18.67 12.6 18.67 12Z",
|
|
834
|
+
x: ["M2.04875 3.00002L9.77052 13.3248L1.99998 21.7192H3.74882L10.5519 14.3697L16.0486 21.7192H22L13.8437 10.8137L21.0765 3.00002H19.3277L13.0624 9.76874L8.0001 3.00002H2.04875ZM4.62054 4.28821H7.35461L19.4278 20.4308H16.6937L4.62054 4.28821Z"],
|
|
835
|
+
"vuetify-bin": [
|
|
836
|
+
["M18.9112 5.03206L3.68692 8.88953C3.68692 8.88953 2.00252 6.21666 2 6.21428C2.02517 6.20794 18.6159 2.00476 18.6394 2L18.8944 4.8489L18.9095 5.01937L18.9112 5.03285V5.03206Z", 0.6],
|
|
837
|
+
["M19.4556 10.9994C19.4556 10.9994 7.06082 14.1417 7.05915 14.1386L5.3739 11.4641C5.41836 11.453 18.4582 8.14817 18.4993 8.13945L19.1838 7.9658L19.4556 10.9994Z", 1],
|
|
838
|
+
"M20 17.0652C19.9916 17.0675 14.6826 18.4123 14.6742 18.4147C14.6994 17.3633 14.3353 16.3579 13.712 15.5563L19.7274 14.0331L20 17.066V17.0652Z",
|
|
839
|
+
["M12.353 16.0368C9.07567 12.843 3.90082 17.0493 6.66818 20.5975C9.94136 24.3844 15.773 19.6984 12.353 16.0368ZM11.1267 19.4129C10.2224 20.7664 7.79139 20.1099 7.82746 18.4686C8.04976 15.4897 12.7112 16.8495 11.1267 19.4129Z", 0.6]
|
|
840
|
+
],
|
|
841
|
+
"vuetify-play": [
|
|
842
|
+
"m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z",
|
|
843
|
+
["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z", 0.6]
|
|
844
|
+
],
|
|
845
|
+
"vuetify-studio": [
|
|
846
|
+
["M12.435 14.3194L12 21L6.87046 12.2799L12.435 14.3194Z", 1],
|
|
847
|
+
["M22 4L12.435 14.3194L6.87046 12.2799L9.26479 7.61064L12.435 14.3194L12 21L22 4Z", 0.5],
|
|
848
|
+
["M12.435 14.3194L22 4L9.26479 7.61064L12.435 14.3194Z", 1],
|
|
849
|
+
["M2 4L6.87046 12.2799L9.26479 7.61064L2 4Z", 1]
|
|
850
|
+
]
|
|
851
|
+
}, Qt = A("auth", () => {
|
|
852
|
+
const r = k(!1), e = k(null), s = useHttpStore(), a = useUserStore(), i = fe(), t = U(!1), o = useOneStore(), c = useTeamStore();
|
|
853
|
+
let m = !!S();
|
|
854
|
+
B(e, (u) => {
|
|
855
|
+
if (!(u != null && u.settings))
|
|
856
|
+
return;
|
|
857
|
+
const b = localStorage.getItem("vuetify@user") || "{}";
|
|
858
|
+
JSON.stringify(u.settings, null, 2) !== b && (m = !0, Object.assign(a, u.settings));
|
|
859
|
+
}), a.$subscribe(() => {
|
|
860
|
+
m || d(), m = !1;
|
|
861
|
+
});
|
|
862
|
+
async function d() {
|
|
863
|
+
if (!(!e.value || !a.syncSettings))
|
|
864
|
+
try {
|
|
865
|
+
await s.post("/user/settings", { settings: a.$state });
|
|
866
|
+
} catch (u) {
|
|
867
|
+
console.error(u);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
async function p(u = !1) {
|
|
871
|
+
var b, F;
|
|
872
|
+
if (p.promise)
|
|
873
|
+
return p.promise;
|
|
874
|
+
if (!u && !document.cookie.includes("sx=1") && ((b = location.hostname.match(/([^.]+\.[^.]+)$/)) == null ? void 0 : b[1]) === ((F = new URL(s.url).hostname.match(/([^.]+\.[^.]+)$/)) == null ? void 0 : F[1])) {
|
|
875
|
+
e.value = null;
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
t.value = !0, p.promise = fetch(`${s.url}/auth/verify`, {
|
|
879
|
+
credentials: "include",
|
|
880
|
+
cache: u ? "reload" : void 0
|
|
881
|
+
}).then(
|
|
882
|
+
async (P) => {
|
|
883
|
+
var N;
|
|
884
|
+
if (P.ok || P.status === 401) {
|
|
885
|
+
const D = await P.json();
|
|
886
|
+
e.value = D.user, o.access = D.access, c.team = (N = D.user) == null ? void 0 : N.team;
|
|
887
|
+
} else
|
|
888
|
+
console.error(P.statusText);
|
|
889
|
+
},
|
|
890
|
+
() => {
|
|
891
|
+
}
|
|
892
|
+
).finally(() => {
|
|
893
|
+
t.value = !1, p.promise = null;
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
p.promise = null;
|
|
897
|
+
async function C(u = "github") {
|
|
898
|
+
t.value = !0;
|
|
899
|
+
const b = `${s.url}/auth/${u}/redirect`;
|
|
900
|
+
if (u === "shopify") {
|
|
901
|
+
window.location.assign(b + "?next=" + encodeURIComponent(window.location.href));
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
const F = 400, P = 600, N = window.screenX + (window.innerWidth - F) / 2, D = window.screenY + (window.innerHeight - P) / 2, M = window.open(
|
|
905
|
+
"",
|
|
906
|
+
"vuetify:authorize:popup",
|
|
907
|
+
`popup,left=${N},top=${D},width=${F},height=${P},resizable`
|
|
908
|
+
);
|
|
909
|
+
if (!M) {
|
|
910
|
+
console.error("Failed to open popup");
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
M.location.href = b;
|
|
914
|
+
let J = -1, Y = -1;
|
|
915
|
+
function X(H) {
|
|
916
|
+
var z, Q;
|
|
917
|
+
H.origin === s.url && ((z = H.data) == null ? void 0 : z.type) === "auth-response" && (H.data.status === "success" ? (e.value || localStorage.setItem("vuetify@lastLoginProvider", u), e.value = H.data.body.user, o.access = H.data.body.access, c.team = (Q = H.data.body.user) == null ? void 0 : Q.team, d()) : console.error(H.data.message), q());
|
|
918
|
+
}
|
|
919
|
+
function q() {
|
|
920
|
+
window.removeEventListener("message", X), window.clearInterval(J), window.clearTimeout(Y), M == null || M.close(), t.value = !1;
|
|
921
|
+
}
|
|
922
|
+
window.addEventListener("message", X), J = window.setInterval(() => {
|
|
923
|
+
!M || M.closed ? (console.error("Auth popup closed"), q()) : M.postMessage({ type: "auth-request" }, "*");
|
|
924
|
+
}, 1e3), Y = window.setTimeout(() => {
|
|
925
|
+
q(), console.error("Auth timed out");
|
|
926
|
+
}, 120 * 1e3);
|
|
927
|
+
}
|
|
928
|
+
async function V(u) {
|
|
929
|
+
t.value = !0;
|
|
930
|
+
const b = u ? `/auth/${u}/logout` : "/auth/logout";
|
|
931
|
+
try {
|
|
932
|
+
await s.post(b), await p(!0), e.value = null;
|
|
933
|
+
} catch (F) {
|
|
934
|
+
console.error(F);
|
|
935
|
+
} finally {
|
|
936
|
+
i.push({
|
|
937
|
+
path: "/",
|
|
938
|
+
query: i.currentRoute.value.query
|
|
939
|
+
}), t.value = !1;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
function f(u) {
|
|
943
|
+
var b;
|
|
944
|
+
return (b = e.value) == null ? void 0 : b.identities.find((F) => F.provider === u);
|
|
945
|
+
}
|
|
946
|
+
function S() {
|
|
947
|
+
return localStorage.getItem("vuetify@lastLoginProvider");
|
|
948
|
+
}
|
|
949
|
+
return p(), {
|
|
950
|
+
user: e,
|
|
951
|
+
url: s.url,
|
|
952
|
+
dialog: r,
|
|
953
|
+
isLoading: t,
|
|
954
|
+
verify: p,
|
|
955
|
+
findIdentity: f,
|
|
956
|
+
login: C,
|
|
957
|
+
logout: V,
|
|
958
|
+
lastLoginProvider: S,
|
|
959
|
+
sync: d
|
|
960
|
+
};
|
|
961
|
+
}), Wt = A("banners", () => {
|
|
962
|
+
const r = useHttpStore(), e = useSiteStore(), s = useUserStore(), a = k([]), i = U(!1), t = v(() => {
|
|
963
|
+
if (o.value)
|
|
964
|
+
return o.value;
|
|
965
|
+
if (s.notifications.banners)
|
|
966
|
+
return a.value.find(({
|
|
967
|
+
slug: m,
|
|
968
|
+
metadata: {
|
|
969
|
+
site: d,
|
|
970
|
+
active: p
|
|
971
|
+
}
|
|
972
|
+
}) => !p || s.notifications.last.banner.includes(m) ? !1 : d.includes("dev") && !1 || d.includes("*") ? !0 : d.some((C) => e.id.includes(C)));
|
|
973
|
+
}), o = v(() => a.value.find(({
|
|
974
|
+
metadata: {
|
|
975
|
+
site: m,
|
|
976
|
+
active: d
|
|
977
|
+
}
|
|
978
|
+
}) => d ? m.includes("server") : !1));
|
|
979
|
+
async function c() {
|
|
980
|
+
try {
|
|
981
|
+
i.value = !0;
|
|
982
|
+
const m = await r.get("/one/banners");
|
|
983
|
+
a.value = m.banners;
|
|
984
|
+
} catch {
|
|
985
|
+
} finally {
|
|
986
|
+
i.value = !1;
|
|
987
|
+
}
|
|
988
|
+
return a.value;
|
|
989
|
+
}
|
|
990
|
+
return {
|
|
991
|
+
all: a,
|
|
992
|
+
isLoading: i,
|
|
993
|
+
server: o,
|
|
994
|
+
banner: t,
|
|
995
|
+
index: c
|
|
996
|
+
};
|
|
997
|
+
}), Gt = A("bins", () => {
|
|
998
|
+
const r = useHttpStore(), e = k([]), s = U(!1), a = v(() => e.value.filter((o) => o.favorite)), i = v(() => e.value.filter((o) => o.pinned));
|
|
999
|
+
async function t() {
|
|
1000
|
+
try {
|
|
1001
|
+
s.value = !0;
|
|
1002
|
+
const o = await r.get("/one/bins");
|
|
1003
|
+
e.value = o.bins;
|
|
1004
|
+
} catch {
|
|
1005
|
+
} finally {
|
|
1006
|
+
s.value = !1;
|
|
1007
|
+
}
|
|
1008
|
+
return e.value;
|
|
1009
|
+
}
|
|
1010
|
+
return {
|
|
1011
|
+
isLoading: s,
|
|
1012
|
+
pinned: i,
|
|
1013
|
+
favorites: a,
|
|
1014
|
+
all: e,
|
|
1015
|
+
index: t
|
|
1016
|
+
};
|
|
1017
|
+
}), Jt = A("downloads", () => {
|
|
1018
|
+
const r = useHttpStore(), e = k([]), s = U(!1);
|
|
1019
|
+
async function a() {
|
|
1020
|
+
if (e.value.length > 0)
|
|
1021
|
+
return e.value;
|
|
1022
|
+
s.value = !0;
|
|
1023
|
+
try {
|
|
1024
|
+
const i = await r.get("/one/sendowl/downloads");
|
|
1025
|
+
e.value = i.downloads;
|
|
1026
|
+
} catch {
|
|
1027
|
+
} finally {
|
|
1028
|
+
s.value = !1;
|
|
1029
|
+
}
|
|
1030
|
+
return e.value;
|
|
1031
|
+
}
|
|
1032
|
+
return {
|
|
1033
|
+
all: e,
|
|
1034
|
+
isLoading: s,
|
|
1035
|
+
index: a
|
|
1036
|
+
};
|
|
1037
|
+
}), Yt = A("http", {
|
|
1038
|
+
state: () => ({
|
|
1039
|
+
url: ""
|
|
1040
|
+
}),
|
|
1041
|
+
actions: {
|
|
1042
|
+
async fetch(r, e = {}) {
|
|
1043
|
+
const s = await fetch(`${this.url}${r}`, {
|
|
1044
|
+
credentials: "include",
|
|
1045
|
+
...e
|
|
1046
|
+
});
|
|
1047
|
+
if (!s.ok)
|
|
1048
|
+
throw new Error(await s.text());
|
|
1049
|
+
return s.status === 204 ? {} : s.json();
|
|
1050
|
+
},
|
|
1051
|
+
async post(r, e, s = {}) {
|
|
1052
|
+
return this.fetch(r, {
|
|
1053
|
+
method: "POST",
|
|
1054
|
+
headers: {
|
|
1055
|
+
"Content-Type": "application/json"
|
|
1056
|
+
},
|
|
1057
|
+
body: JSON.stringify(e),
|
|
1058
|
+
...s
|
|
1059
|
+
});
|
|
1060
|
+
},
|
|
1061
|
+
async form(r, e, s = {}) {
|
|
1062
|
+
return this.fetch(r, {
|
|
1063
|
+
method: "POST",
|
|
1064
|
+
body: e,
|
|
1065
|
+
...s
|
|
1066
|
+
});
|
|
1067
|
+
},
|
|
1068
|
+
async get(r, e = {}) {
|
|
1069
|
+
return this.fetch(r, e);
|
|
1070
|
+
},
|
|
1071
|
+
async delete(r, e = {}) {
|
|
1072
|
+
return this.fetch(r, {
|
|
1073
|
+
method: "DELETE",
|
|
1074
|
+
...e
|
|
1075
|
+
});
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
}), Xt = A("notifications", () => {
|
|
1079
|
+
const r = useHttpStore(), e = useUserStore(), s = k([]), a = U(!1), i = v(() => s.value.filter((c) => !e.notifications.read.includes(c.slug))), t = v(() => s.value.filter((c) => e.notifications.read.includes(c.slug)));
|
|
1080
|
+
async function o() {
|
|
1081
|
+
try {
|
|
1082
|
+
a.value = !0;
|
|
1083
|
+
const c = await r.get("/one/notifications");
|
|
1084
|
+
s.value = c.notifications;
|
|
1085
|
+
} catch {
|
|
1086
|
+
} finally {
|
|
1087
|
+
a.value = !1;
|
|
1088
|
+
}
|
|
1089
|
+
return s.value;
|
|
1090
|
+
}
|
|
1091
|
+
return {
|
|
1092
|
+
isLoading: a,
|
|
1093
|
+
all: s,
|
|
1094
|
+
read: t,
|
|
1095
|
+
unread: i,
|
|
1096
|
+
index: o
|
|
1097
|
+
};
|
|
1098
|
+
}), Kt = A("one", () => {
|
|
1099
|
+
const r = useQuery(), e = fe(), s = useAuthStore(), a = useHttpStore(), i = useTeamStore(), t = U(!1), o = U(!1), c = k(), m = k([]), d = v(() => r.value.session_id), p = v(() => {
|
|
1100
|
+
var l;
|
|
1101
|
+
return (l = c.value) == null ? void 0 : l.items[0].plan.interval;
|
|
1102
|
+
}), C = v(() => {
|
|
1103
|
+
var l;
|
|
1104
|
+
return (l = c.value) == null ? void 0 : l.items[0].plan.type;
|
|
1105
|
+
}), V = k([]), f = v(() => {
|
|
1106
|
+
var l;
|
|
1107
|
+
return (l = s.user) == null ? void 0 : l.sponsorships.find((y) => y.platform === "stripe" && y.tierName.startsWith("sub_"));
|
|
1108
|
+
}), S = v(() => {
|
|
1109
|
+
var l;
|
|
1110
|
+
return !!((l = f.value) != null && l.tierName);
|
|
1111
|
+
}), u = v(() => {
|
|
1112
|
+
var l;
|
|
1113
|
+
return ((l = s.user) == null ? void 0 : l.sponsorships.reduce((y, L) => {
|
|
1114
|
+
if (!L.isActive || L.interval === "once" || L.platform === "stripe")
|
|
1115
|
+
return y;
|
|
1116
|
+
const K = ["teamMonth", "soloMonth"].includes(L.interval) ? L.amount : L.amount / 12;
|
|
1117
|
+
return y + K / 100;
|
|
1118
|
+
}, 0)) ?? 0;
|
|
1119
|
+
}), b = v(() => {
|
|
1120
|
+
var l;
|
|
1121
|
+
return (l = s.user) == null ? void 0 : l.sponsorships.find((y) => y.tierName.startsWith("sub_") && y.isActive);
|
|
1122
|
+
}), F = v(() => {
|
|
1123
|
+
var l;
|
|
1124
|
+
return (l = s.user) == null ? void 0 : l.sponsorships.find((y) => y.platform === "github" && y.isActive);
|
|
1125
|
+
}), P = v(() => {
|
|
1126
|
+
var l;
|
|
1127
|
+
return (l = s.user) == null ? void 0 : l.sponsorships.find((y) => y.platform === "discord" && y.isActive);
|
|
1128
|
+
}), N = v(() => {
|
|
1129
|
+
var l;
|
|
1130
|
+
return (l = s.user) == null ? void 0 : l.identities.find((y) => y.provider === "shopify");
|
|
1131
|
+
}), D = v(() => {
|
|
1132
|
+
var l, y, L, K;
|
|
1133
|
+
return !a.url || ((l = s.user) == null ? void 0 : l.isAdmin) || ((y = f.value) == null ? void 0 : y.isActive) || ((L = F.value) == null ? void 0 : L.isActive) || ((K = P.value) == null ? void 0 : K.isActive) || u.value >= 2.99;
|
|
1134
|
+
});
|
|
1135
|
+
pe(async () => {
|
|
1136
|
+
d.value && await M();
|
|
1137
|
+
}), B(o, Q), B(d, async (l) => {
|
|
1138
|
+
l && await M();
|
|
1139
|
+
}, { immediate: !0 }), B(r, (l) => {
|
|
1140
|
+
if (l.one !== "subscribe" || s.user)
|
|
1141
|
+
return;
|
|
1142
|
+
s.dialog = !0;
|
|
1143
|
+
const y = B(() => s.user, (L) => {
|
|
1144
|
+
L && (s.dialog = !1, y());
|
|
1145
|
+
});
|
|
1146
|
+
}, { immediate: !0 }), B(D, (l, y) => {
|
|
1147
|
+
l === !1 && y !== !0 || H();
|
|
1148
|
+
});
|
|
1149
|
+
async function M() {
|
|
1150
|
+
try {
|
|
1151
|
+
t.value = !0, await a.post("/one/activate", { sessionId: d.value }), await s.verify(!0), await z();
|
|
1152
|
+
const l = new URL(window.location.href), y = l.searchParams;
|
|
1153
|
+
y.delete("session_id"), y.delete("team"), history.pushState(null, "", l.toString());
|
|
1154
|
+
} catch {
|
|
1155
|
+
} finally {
|
|
1156
|
+
t.value = !1;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
async function J() {
|
|
1160
|
+
window.open(`${a.url}/one/manage`, "_blank");
|
|
1161
|
+
}
|
|
1162
|
+
async function Y(l, y) {
|
|
1163
|
+
t.value = !0;
|
|
1164
|
+
const L = new URL("/one/subscribe", a.url);
|
|
1165
|
+
L.searchParams.set("interval", l), L.searchParams.set("type", y), window.location.href = L.toString();
|
|
1166
|
+
}
|
|
1167
|
+
async function X() {
|
|
1168
|
+
var l;
|
|
1169
|
+
if (f.value)
|
|
1170
|
+
try {
|
|
1171
|
+
t.value = !0;
|
|
1172
|
+
const y = await a.post(
|
|
1173
|
+
`/one/cancel?subscriptionId=${(l = f.value) == null ? void 0 : l.tierName}`
|
|
1174
|
+
);
|
|
1175
|
+
s.user = y.user;
|
|
1176
|
+
} catch {
|
|
1177
|
+
} finally {
|
|
1178
|
+
t.value = !1;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
async function q(l, y) {
|
|
1182
|
+
if (f.value)
|
|
1183
|
+
try {
|
|
1184
|
+
t.value = !0, await a.post("/one/modify", {
|
|
1185
|
+
subscriptionId: f.value.tierName,
|
|
1186
|
+
interval: l,
|
|
1187
|
+
type: y
|
|
1188
|
+
}), await H();
|
|
1189
|
+
} catch {
|
|
1190
|
+
} finally {
|
|
1191
|
+
t.value = !1;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
async function H() {
|
|
1195
|
+
var l, y;
|
|
1196
|
+
if (f.value)
|
|
1197
|
+
try {
|
|
1198
|
+
t.value = !0;
|
|
1199
|
+
const L = await a.post(
|
|
1200
|
+
`/one/verify?subscriptionId=${(l = f.value) == null ? void 0 : l.tierName}`
|
|
1201
|
+
);
|
|
1202
|
+
s.user = L.user, V.value = L.access, i.team = ((y = s.user) == null ? void 0 : y.team) ?? null;
|
|
1203
|
+
} catch {
|
|
1204
|
+
} finally {
|
|
1205
|
+
t.value = !1;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
async function z() {
|
|
1209
|
+
try {
|
|
1210
|
+
t.value = !0;
|
|
1211
|
+
const l = await a.get("/one/info");
|
|
1212
|
+
return c.value = l.subscription, m.value = l.invoices, l;
|
|
1213
|
+
} catch {
|
|
1214
|
+
} finally {
|
|
1215
|
+
t.value = !1;
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
function Q() {
|
|
1219
|
+
e.push({
|
|
1220
|
+
query: {
|
|
1221
|
+
...r.value,
|
|
1222
|
+
one: void 0
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
return {
|
|
1227
|
+
info: c,
|
|
1228
|
+
interval: p,
|
|
1229
|
+
subscriptionType: C,
|
|
1230
|
+
access: V,
|
|
1231
|
+
invoices: m,
|
|
1232
|
+
sessionId: d,
|
|
1233
|
+
subscription: f,
|
|
1234
|
+
monthlyTotal: u,
|
|
1235
|
+
hasBilling: S,
|
|
1236
|
+
isLoading: t,
|
|
1237
|
+
isOpen: o,
|
|
1238
|
+
isSubscriber: D,
|
|
1239
|
+
github: F,
|
|
1240
|
+
discord: P,
|
|
1241
|
+
shopify: N,
|
|
1242
|
+
one: b,
|
|
1243
|
+
activate: M,
|
|
1244
|
+
cancel: X,
|
|
1245
|
+
manage: J,
|
|
1246
|
+
modify: q,
|
|
1247
|
+
resetQuery: Q,
|
|
1248
|
+
subscribe: Y,
|
|
1249
|
+
subscriptionInfo: z,
|
|
1250
|
+
verify: H
|
|
1251
|
+
};
|
|
1252
|
+
}), eo = A("products", () => {
|
|
1253
|
+
const r = useHttpStore(), e = k([]), s = v(() => e.value.filter((t) => t.product_type === "Themes"));
|
|
1254
|
+
async function a() {
|
|
1255
|
+
if (e.value.length > 0)
|
|
1256
|
+
return e.value;
|
|
1257
|
+
try {
|
|
1258
|
+
const t = await r.get("/one/shopify/products");
|
|
1259
|
+
e.value = t.products;
|
|
1260
|
+
} catch {
|
|
1261
|
+
}
|
|
1262
|
+
return e.value;
|
|
1263
|
+
}
|
|
1264
|
+
function i(t) {
|
|
1265
|
+
return t.slice().sort(() => Math.random() - 0.5);
|
|
1266
|
+
}
|
|
1267
|
+
return {
|
|
1268
|
+
all: e,
|
|
1269
|
+
themes: s,
|
|
1270
|
+
index: a,
|
|
1271
|
+
randomize: i
|
|
1272
|
+
};
|
|
1273
|
+
}), to = A("promotions", () => {
|
|
1274
|
+
const r = useHttpStore(), e = k([]), s = U(!1), a = U(!1), i = v(() => e.value.filter((c) => c.metadata.discoverable));
|
|
1275
|
+
le(o);
|
|
1276
|
+
function t(c) {
|
|
1277
|
+
const m = c.filter((d) => d.metadata.active);
|
|
1278
|
+
return m[Math.floor(Math.random() * m.length)];
|
|
1279
|
+
}
|
|
1280
|
+
async function o() {
|
|
1281
|
+
try {
|
|
1282
|
+
s.value = !0;
|
|
1283
|
+
const c = await r.get("/one/promotions");
|
|
1284
|
+
e.value = c.promotions;
|
|
1285
|
+
} catch {
|
|
1286
|
+
} finally {
|
|
1287
|
+
s.value = !1, a.value = !0;
|
|
1288
|
+
}
|
|
1289
|
+
return e.value;
|
|
1290
|
+
}
|
|
1291
|
+
return {
|
|
1292
|
+
all: e,
|
|
1293
|
+
isLoading: s,
|
|
1294
|
+
hasLoaded: a,
|
|
1295
|
+
discoverable: i,
|
|
1296
|
+
index: o,
|
|
1297
|
+
random: t
|
|
1298
|
+
};
|
|
1299
|
+
}), oo = A("Queue", () => {
|
|
1300
|
+
const r = k([]);
|
|
1301
|
+
function e(a) {
|
|
1302
|
+
const i = typeof a == "string" ? { text: a } : a;
|
|
1303
|
+
r.value.push(i);
|
|
1304
|
+
}
|
|
1305
|
+
function s(a) {
|
|
1306
|
+
e({
|
|
1307
|
+
color: "error",
|
|
1308
|
+
text: a,
|
|
1309
|
+
location: "top end",
|
|
1310
|
+
timeout: -1
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
return {
|
|
1314
|
+
queue: r,
|
|
1315
|
+
show: e,
|
|
1316
|
+
showError: s
|
|
1317
|
+
};
|
|
1318
|
+
});
|
|
1319
|
+
function wt() {
|
|
1320
|
+
return {
|
|
1321
|
+
blackguard: {
|
|
1322
|
+
dark: !0,
|
|
1323
|
+
colors: {
|
|
1324
|
+
background: "#0f0c24",
|
|
1325
|
+
primary: "#e7810d",
|
|
1326
|
+
surface: "#1e184a",
|
|
1327
|
+
info: "#9c27b0",
|
|
1328
|
+
accent: "#FF4081",
|
|
1329
|
+
success: "#84b38a",
|
|
1330
|
+
"surface-light": "#362b89",
|
|
1331
|
+
"surface-bright": "#564f8a",
|
|
1332
|
+
"surface-variant": "#6458b4",
|
|
1333
|
+
"on-surface-variant": "#FFFFFF",
|
|
1334
|
+
"primary-darken-1": "#c56e0b",
|
|
1335
|
+
secondary: "#8A2BE2",
|
|
1336
|
+
"secondary-darken-1": "#7919cb",
|
|
1337
|
+
error: "#FF5555",
|
|
1338
|
+
warning: "#ffa726"
|
|
1339
|
+
},
|
|
1340
|
+
variables: {
|
|
1341
|
+
"border-color": "#FFFFFF",
|
|
1342
|
+
"border-opacity": 0.12,
|
|
1343
|
+
"high-emphasis-opacity": 0.87,
|
|
1344
|
+
"medium-emphasis-opacity": 0.6,
|
|
1345
|
+
"disabled-opacity": 0.38,
|
|
1346
|
+
"idle-opacity": 0.1,
|
|
1347
|
+
"hover-opacity": 0.08,
|
|
1348
|
+
"focus-opacity": 0.12,
|
|
1349
|
+
"selected-opacity": 0.12,
|
|
1350
|
+
"activated-opacity": 0.12,
|
|
1351
|
+
"pressed-opacity": 0.16,
|
|
1352
|
+
"dragged-opacity": 0.08,
|
|
1353
|
+
"theme-kbd": "#212529",
|
|
1354
|
+
"theme-on-kbd": "#FFFFFF",
|
|
1355
|
+
"theme-code": "#343434",
|
|
1356
|
+
"theme-on-code": "#CCCCCC"
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
polaris: {
|
|
1360
|
+
dark: !0,
|
|
1361
|
+
colors: {
|
|
1362
|
+
background: "#1f0a0d",
|
|
1363
|
+
primary: "#972800",
|
|
1364
|
+
surface: "#29110e",
|
|
1365
|
+
info: "#e7810d",
|
|
1366
|
+
accent: "#b35000",
|
|
1367
|
+
success: "#486a2b",
|
|
1368
|
+
"surface-light": "#773421",
|
|
1369
|
+
"surface-bright": "#ffa752",
|
|
1370
|
+
"surface-variant": "#924d2c",
|
|
1371
|
+
"on-surface-variant": "#FFFFFF",
|
|
1372
|
+
"primary-darken-1": "#c33100",
|
|
1373
|
+
secondary: "#ac1900",
|
|
1374
|
+
"secondary-darken-1": "#8a1600",
|
|
1375
|
+
error: "#ff5555",
|
|
1376
|
+
warning: "#ffa726"
|
|
1377
|
+
},
|
|
1378
|
+
variables: {
|
|
1379
|
+
"border-color": "#ffffff",
|
|
1380
|
+
"border-opacity": 0.12,
|
|
1381
|
+
"high-emphasis-opacity": 0.87,
|
|
1382
|
+
"medium-emphasis-opacity": 0.6,
|
|
1383
|
+
"disabled-opacity": 0.38,
|
|
1384
|
+
"idle-opacity": 0.1,
|
|
1385
|
+
"hover-opacity": 0.08,
|
|
1386
|
+
"focus-opacity": 0.12,
|
|
1387
|
+
"selected-opacity": 0.12,
|
|
1388
|
+
"activated-opacity": 0.12,
|
|
1389
|
+
"pressed-opacity": 0.16,
|
|
1390
|
+
"dragged-opacity": 0.08,
|
|
1391
|
+
"theme-kbd": "#212529",
|
|
1392
|
+
"theme-on-kbd": "#ffffff",
|
|
1393
|
+
"theme-code": "#343434",
|
|
1394
|
+
"theme-on-code": "#cccccc"
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1397
|
+
nebula: {
|
|
1398
|
+
dark: !0,
|
|
1399
|
+
colors: {
|
|
1400
|
+
background: "#0f172a",
|
|
1401
|
+
primary: "#3462e3",
|
|
1402
|
+
surface: "#1e293b",
|
|
1403
|
+
info: "#64748b",
|
|
1404
|
+
accent: "#0ea5e9",
|
|
1405
|
+
success: "#14b8a6",
|
|
1406
|
+
"surface-light": "#2e3d59",
|
|
1407
|
+
"surface-bright": "#87a7ff",
|
|
1408
|
+
"surface-variant": "#334155",
|
|
1409
|
+
"on-surface-variant": "#FFFFFF",
|
|
1410
|
+
"primary-darken-1": "#1c2d60",
|
|
1411
|
+
secondary: "#0284c7",
|
|
1412
|
+
"secondary-darken-1": "#0369a1",
|
|
1413
|
+
error: "#ef4444",
|
|
1414
|
+
warning: "#f97316"
|
|
1415
|
+
},
|
|
1416
|
+
variables: {
|
|
1417
|
+
"border-color": "#ffffff",
|
|
1418
|
+
"border-opacity": 0.2,
|
|
1419
|
+
"high-emphasis-opacity": 0.87,
|
|
1420
|
+
"medium-emphasis-opacity": 0.6,
|
|
1421
|
+
"disabled-opacity": 0.38,
|
|
1422
|
+
"idle-opacity": 0.1,
|
|
1423
|
+
"hover-opacity": 0.08,
|
|
1424
|
+
"focus-opacity": 0.12,
|
|
1425
|
+
"selected-opacity": 0.12,
|
|
1426
|
+
"activated-opacity": 0.12,
|
|
1427
|
+
"pressed-opacity": 0.16,
|
|
1428
|
+
"dragged-opacity": 0.08,
|
|
1429
|
+
"theme-kbd": "#1e40af",
|
|
1430
|
+
"theme-on-kbd": "#dbeafe",
|
|
1431
|
+
"theme-code": "#0f172a",
|
|
1432
|
+
"theme-on-code": "#93c5fd"
|
|
1433
|
+
}
|
|
1434
|
+
},
|
|
1435
|
+
odyssey: {
|
|
1436
|
+
dark: !1,
|
|
1437
|
+
colors: {
|
|
1438
|
+
background: "#fffbe6",
|
|
1439
|
+
primary: "#356859",
|
|
1440
|
+
surface: "#fffbe6",
|
|
1441
|
+
info: "#37966f",
|
|
1442
|
+
accent: "#b9e4c9",
|
|
1443
|
+
success: "#5bb49a",
|
|
1444
|
+
"surface-light": "#95b3a0",
|
|
1445
|
+
"surface-bright": "#ffffff",
|
|
1446
|
+
"surface-variant": "#37966f",
|
|
1447
|
+
"primary-darken-1": "#00CC00",
|
|
1448
|
+
secondary: "#FD5523",
|
|
1449
|
+
"secondary-darken-1": "#CC3700",
|
|
1450
|
+
error: "#FF5555",
|
|
1451
|
+
warning: "#ecb85b"
|
|
1452
|
+
},
|
|
1453
|
+
variables: {
|
|
1454
|
+
"border-color": "#000000",
|
|
1455
|
+
"border-opacity": 0.24,
|
|
1456
|
+
"high-emphasis-opacity": 1,
|
|
1457
|
+
"medium-emphasis-opacity": 0.87,
|
|
1458
|
+
"disabled-opacity": 0.5,
|
|
1459
|
+
"idle-opacity": 0.1,
|
|
1460
|
+
"hover-opacity": 0.2,
|
|
1461
|
+
"focus-opacity": 0.3,
|
|
1462
|
+
"selected-opacity": 0.3,
|
|
1463
|
+
"activated-opacity": 0.3,
|
|
1464
|
+
"pressed-opacity": 0.4,
|
|
1465
|
+
"dragged-opacity": 0.2,
|
|
1466
|
+
"theme-kbd": "#000000",
|
|
1467
|
+
"theme-on-kbd": "#ffffff",
|
|
1468
|
+
"theme-code": "#000000",
|
|
1469
|
+
"theme-on-code": "#ffffff"
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
highContrast: {
|
|
1473
|
+
dark: !0,
|
|
1474
|
+
colors: {
|
|
1475
|
+
background: "#000000",
|
|
1476
|
+
surface: "#121212",
|
|
1477
|
+
primary: "#ffD700",
|
|
1478
|
+
"primary-darken-1": "#e6c300",
|
|
1479
|
+
secondary: "#00ccdd",
|
|
1480
|
+
"secondary-darken-1": "#00e600",
|
|
1481
|
+
accent: "#ff00ff",
|
|
1482
|
+
info: "#31aaff",
|
|
1483
|
+
warning: "#ffaa00",
|
|
1484
|
+
error: "#ff0000",
|
|
1485
|
+
success: "#00ff00",
|
|
1486
|
+
"on-surface-variant": "#ffffff",
|
|
1487
|
+
"surface-light": "#222222",
|
|
1488
|
+
"surface-bright": "#000000",
|
|
1489
|
+
"surface-variant": "#333333"
|
|
1490
|
+
},
|
|
1491
|
+
variables: {
|
|
1492
|
+
"border-color": "#ffffff",
|
|
1493
|
+
"border-opacity": 0.87,
|
|
1494
|
+
"high-emphasis-opacity": 1,
|
|
1495
|
+
"medium-emphasis-opacity": 0.87,
|
|
1496
|
+
"disabled-opacity": 0.5,
|
|
1497
|
+
"idle-opacity": 0.1,
|
|
1498
|
+
"hover-opacity": 0.2,
|
|
1499
|
+
"focus-opacity": 0.3,
|
|
1500
|
+
"selected-opacity": 0.3,
|
|
1501
|
+
"activated-opacity": 0.3,
|
|
1502
|
+
"pressed-opacity": 0.4,
|
|
1503
|
+
"dragged-opacity": 0.2,
|
|
1504
|
+
"theme-kbd": "#000000",
|
|
1505
|
+
"theme-on-kbd": "#ffffff",
|
|
1506
|
+
"theme-code": "#000000",
|
|
1507
|
+
"theme-on-code": "#ffffff"
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
const so = A("settings", () => {
|
|
1513
|
+
const r = "https://cdn.vuetifyjs.com/docs/images/one/", e = useOneStore(), s = useUserStore(), a = te(), i = wt(), t = {
|
|
1514
|
+
blackguard: {
|
|
1515
|
+
"app-bar": r + "suits/blackguard/blackguard-app-bar.png",
|
|
1516
|
+
drawer: r + "suits/blackguard/blackguard-app-drawer.png",
|
|
1517
|
+
footer: r + "suits/blackguard/blackguard-app-footer.png"
|
|
1518
|
+
},
|
|
1519
|
+
polaris: {
|
|
1520
|
+
"app-bar": r + "suits/polaris/polaris-app-bar.png",
|
|
1521
|
+
drawer: r + "suits/polaris/polaris-app-drawer.png",
|
|
1522
|
+
footer: r + "suits/polaris/polaris-app-footer.png"
|
|
1523
|
+
},
|
|
1524
|
+
nebula: {
|
|
1525
|
+
"app-bar": r + "suits/nebula/nebula-app-bar.png",
|
|
1526
|
+
drawer: r + "suits/nebula/nebula-app-drawer.png",
|
|
1527
|
+
footer: r + "suits/nebula/nebula-app-footer.png"
|
|
1528
|
+
},
|
|
1529
|
+
odyssey: {
|
|
1530
|
+
"app-bar": r + "suits/odyssey/odyssey-app-bar.png",
|
|
1531
|
+
drawer: r + "suits/odyssey/odyssey-app-drawer.png",
|
|
1532
|
+
footer: r + "suits/odyssey/odyssey-app-footer.png"
|
|
1533
|
+
}
|
|
1534
|
+
}, o = v(() => {
|
|
1535
|
+
if (!s.suits.suit || !s.suits.show || !e.isSubscriber)
|
|
1536
|
+
return {};
|
|
1537
|
+
const c = t[s.suits.suit.toLowerCase()], m = {};
|
|
1538
|
+
for (const d of s.suits.elements)
|
|
1539
|
+
m[d] = c[d];
|
|
1540
|
+
return m;
|
|
1541
|
+
});
|
|
1542
|
+
return a.themes.value = {
|
|
1543
|
+
...a.themes.value,
|
|
1544
|
+
...i
|
|
1545
|
+
}, B(() => s.theme, (c) => {
|
|
1546
|
+
c === "system" ? a.global.name.value = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : (a.global.name.value = c, s.suits.suit = t[c] ? c : ""), s.theme = c;
|
|
1547
|
+
}, { immediate: !0 }), {
|
|
1548
|
+
suit: o,
|
|
1549
|
+
CDN_URL: r
|
|
1550
|
+
};
|
|
1551
|
+
}), ao = A("site", () => {
|
|
1552
|
+
const r = k([]), e = k();
|
|
1553
|
+
return {
|
|
1554
|
+
id: r,
|
|
1555
|
+
url: e
|
|
1556
|
+
};
|
|
1557
|
+
}), no = A("sponsors", () => {
|
|
1558
|
+
const r = useHttpStore(), e = k([]), s = k([]), a = k(!1), i = v(() => {
|
|
1559
|
+
const c = {};
|
|
1560
|
+
for (const m of e.value) {
|
|
1561
|
+
const d = m.metadata.tier;
|
|
1562
|
+
c[d] || (c[d] = []), c[d].push(m);
|
|
1563
|
+
}
|
|
1564
|
+
return c;
|
|
1565
|
+
});
|
|
1566
|
+
Le(t), le(t);
|
|
1567
|
+
async function t() {
|
|
1568
|
+
try {
|
|
1569
|
+
a.value = !0;
|
|
1570
|
+
const c = await r.get("/one/sponsors");
|
|
1571
|
+
s.value = c.sponsors;
|
|
1572
|
+
} catch {
|
|
1573
|
+
} finally {
|
|
1574
|
+
a.value = !1;
|
|
1575
|
+
}
|
|
1576
|
+
return s.value;
|
|
1577
|
+
}
|
|
1578
|
+
function o(c) {
|
|
1579
|
+
return e.value.find((m) => m.slug === c);
|
|
1580
|
+
}
|
|
1581
|
+
return {
|
|
1582
|
+
isLoading: a,
|
|
1583
|
+
all: s,
|
|
1584
|
+
sponsors: e,
|
|
1585
|
+
byTier: i,
|
|
1586
|
+
bySlug: o,
|
|
1587
|
+
index: t
|
|
1588
|
+
};
|
|
1589
|
+
}), ro = A("spots", () => {
|
|
1590
|
+
const r = useHttpStore(), e = useSiteStore(), s = k([]), a = U(!1), i = v(() => s.value.find(({
|
|
1591
|
+
metadata: {
|
|
1592
|
+
site: o,
|
|
1593
|
+
active: c
|
|
1594
|
+
}
|
|
1595
|
+
}) => c ? o.includes("dev") && !1 || o.includes("*") ? !0 : o.some((m) => e.id.includes(m)) : !1));
|
|
1596
|
+
async function t() {
|
|
1597
|
+
try {
|
|
1598
|
+
a.value = !0;
|
|
1599
|
+
const o = await r.get("/one/spots");
|
|
1600
|
+
s.value = o.spots;
|
|
1601
|
+
} catch {
|
|
1602
|
+
} finally {
|
|
1603
|
+
a.value = !1;
|
|
1604
|
+
}
|
|
1605
|
+
return s.value;
|
|
1606
|
+
}
|
|
1607
|
+
return {
|
|
1608
|
+
all: s,
|
|
1609
|
+
isLoading: a,
|
|
1610
|
+
spot: i,
|
|
1611
|
+
index: t
|
|
1612
|
+
};
|
|
1613
|
+
}), io = A("team", () => {
|
|
1614
|
+
const r = useQuery(), e = useAuthStore(), s = useOneStore(), a = useHttpStore(), i = useQueueStore(), t = U(!1), o = k(null), c = k(!1), m = v(() => r.value.invite), d = v(
|
|
1615
|
+
() => {
|
|
1616
|
+
var u;
|
|
1617
|
+
return o.value ? (u = s.access) == null ? void 0 : u.some((b) => ["one/team", "snips/team"].includes(b)) : !1;
|
|
1618
|
+
}
|
|
1619
|
+
);
|
|
1620
|
+
B(m, async () => {
|
|
1621
|
+
if (m.value) {
|
|
1622
|
+
e.user || (e.dialog = !0);
|
|
1623
|
+
try {
|
|
1624
|
+
t.value = !0;
|
|
1625
|
+
const u = await a.get(`/one/team/${m.value}`);
|
|
1626
|
+
o.value = u.team, c.value = !0;
|
|
1627
|
+
} catch (u) {
|
|
1628
|
+
f(), i.showError(u.message);
|
|
1629
|
+
} finally {
|
|
1630
|
+
t.value = !1;
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}, { immediate: !0 });
|
|
1634
|
+
async function p(u) {
|
|
1635
|
+
try {
|
|
1636
|
+
if (t.value = !0, !o.value)
|
|
1637
|
+
return;
|
|
1638
|
+
await a.post("/one/team/remove", { userId: u }), o.value.members = o.value.members.filter((b) => b.id !== u);
|
|
1639
|
+
} catch (b) {
|
|
1640
|
+
i.showError(b.message);
|
|
1641
|
+
} finally {
|
|
1642
|
+
t.value = !1;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
async function C() {
|
|
1646
|
+
var u;
|
|
1647
|
+
try {
|
|
1648
|
+
t.value = !0, await a.post("/one/team/leave", { teamId: (u = o.value) == null ? void 0 : u.id }), await e.verify(!0);
|
|
1649
|
+
} catch (b) {
|
|
1650
|
+
i.showError(b.message);
|
|
1651
|
+
} finally {
|
|
1652
|
+
t.value = !1;
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
async function V() {
|
|
1656
|
+
try {
|
|
1657
|
+
t.value = !0, await a.post("/one/team/join", { inviteCode: m.value }), await e.verify(!0), f();
|
|
1658
|
+
} catch (u) {
|
|
1659
|
+
i.showError(u.message);
|
|
1660
|
+
} finally {
|
|
1661
|
+
t.value = !1;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
function f() {
|
|
1665
|
+
c.value = !1;
|
|
1666
|
+
const u = new URL(window.location.href);
|
|
1667
|
+
u.searchParams.delete("invite"), window.history.replaceState({}, "", u.toString());
|
|
1668
|
+
}
|
|
1669
|
+
const S = v(() => {
|
|
1670
|
+
var u, b, F;
|
|
1671
|
+
return ((u = e.user) == null ? void 0 : u.id) === ((F = (b = e.user) == null ? void 0 : b.team) == null ? void 0 : F.owner.id);
|
|
1672
|
+
});
|
|
1673
|
+
return {
|
|
1674
|
+
team: o,
|
|
1675
|
+
teamInviteDialog: c,
|
|
1676
|
+
teamInviteCode: m,
|
|
1677
|
+
hasTeamAccess: d,
|
|
1678
|
+
isTeamOwner: S,
|
|
1679
|
+
isLoading: t,
|
|
1680
|
+
removeFromTeam: p,
|
|
1681
|
+
leaveTeam: C,
|
|
1682
|
+
joinTeam: V,
|
|
1683
|
+
clearTeamQuery: f
|
|
1684
|
+
};
|
|
1685
|
+
}), ne = typeof window < "u", ee = {
|
|
1686
|
+
v: 5,
|
|
1687
|
+
api: "link-only",
|
|
1688
|
+
avatar: "",
|
|
1689
|
+
dev: !1,
|
|
1690
|
+
disableAds: !1,
|
|
1691
|
+
composition: "composition",
|
|
1692
|
+
pwaRefresh: !0,
|
|
1693
|
+
theme: "system",
|
|
1694
|
+
mixedTheme: !0,
|
|
1695
|
+
direction: "ltr",
|
|
1696
|
+
pins: !1,
|
|
1697
|
+
pinned: [],
|
|
1698
|
+
slashSearch: !1,
|
|
1699
|
+
syncSettings: !0,
|
|
1700
|
+
showHouseAds: !1,
|
|
1701
|
+
quickbar: !1,
|
|
1702
|
+
railDrawer: !1,
|
|
1703
|
+
suits: {
|
|
1704
|
+
show: !1,
|
|
1705
|
+
elements: ["app-bar"],
|
|
1706
|
+
suit: ""
|
|
1707
|
+
},
|
|
1708
|
+
colors: {
|
|
1709
|
+
one: "surface-light"
|
|
1710
|
+
},
|
|
1711
|
+
notifications: {
|
|
1712
|
+
show: !0,
|
|
1713
|
+
banners: !0,
|
|
1714
|
+
read: [],
|
|
1715
|
+
last: {
|
|
1716
|
+
banner: [],
|
|
1717
|
+
v2banner: null,
|
|
1718
|
+
install: null,
|
|
1719
|
+
notification: null,
|
|
1720
|
+
promotion: null,
|
|
1721
|
+
jobs: null
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
}, co = A("user", () => {
|
|
1725
|
+
const r = xe(ae({}, ee));
|
|
1726
|
+
B(r, s);
|
|
1727
|
+
function e() {
|
|
1728
|
+
if (!ne)
|
|
1729
|
+
return;
|
|
1730
|
+
const i = localStorage.getItem("vuetify@user"), t = i ? JSON.parse(i) : {};
|
|
1731
|
+
let o = t.v === r.v;
|
|
1732
|
+
t.v || (t.pwaRefresh = !0, typeof t.api == "boolean" && (t.api = t.api ? "inline" : "link-only"), typeof t.rtl == "boolean" && (t.direction = t.rtl ? "rtl" : "ltr", delete t.rtl), typeof t.theme == "object" && (t.mixedTheme = t.theme.mixed, t.theme = t.theme.system ? "system" : t.theme.dark ? "dark" : "light"), Array.isArray(t.notifications) && (t.notifications = { read: t.notifications }), typeof t.last == "object" && (t.notifications.last = t.last, delete t.last)), t.v === 1 && (Array.isArray(t.composition) && (t.composition = "composition"), Array.isArray(t.notifications.last.banner) || (t.notifications = t.notifications || {}, t.notifications.last = t.notifications.last || {}, t.notifications.last.banner = [])), t.v === 2 && (t.syncSettings = !0, t.disableAds = !1, t.v = 3), t.v === 3 && (t.quickbar = !1), t.v === 4 && (t.suits = ee.suits, t.notifications.banners = ee.notifications.banners, o = !0), t.v = r.v, Object.assign(r, ae(r, t)), o && s();
|
|
1733
|
+
}
|
|
1734
|
+
function s() {
|
|
1735
|
+
ne && localStorage.setItem("vuetify@user", JSON.stringify(r, null, 2));
|
|
1736
|
+
}
|
|
1737
|
+
function a() {
|
|
1738
|
+
ne && (Object.assign(r, ae({}, ee)), s());
|
|
1739
|
+
}
|
|
1740
|
+
return e(), {
|
|
1741
|
+
...$e(r),
|
|
1742
|
+
load: e,
|
|
1743
|
+
save: s,
|
|
1744
|
+
reset: a
|
|
1745
|
+
};
|
|
1746
|
+
});
|
|
1747
|
+
function uo() {
|
|
1748
|
+
function r(e) {
|
|
1749
|
+
e.component("VoAppBar", ze), e.component("VoAuthBtn", ot), e.component("VoAuthCard", rt), e.component("VoAuthDialog", it), e.component("VoAuthListItem", ut), e.component("VoIconBin", lt), e.component("VoIconIssues", dt), e.component("VoNotificationsBanner", mt), e.component("VoPromotionsCardHighlight", pt), e.component("VoPromotionsCardVuetify", yt), e.component("VoPromotionsFooter", _t), e.component("VoScript", We), e.component("VoSocialFooter", Xe), e.component("VoSpot", St);
|
|
1750
|
+
}
|
|
1751
|
+
return { install: r };
|
|
1752
|
+
}
|
|
1753
|
+
function lo(r, e) {
|
|
1754
|
+
return function(s) {
|
|
1755
|
+
const a = s.store;
|
|
1756
|
+
a.url = e, a.$id === "site" && (a.id = r);
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
1759
|
+
export {
|
|
1760
|
+
zt as aliases,
|
|
1761
|
+
uo as createOne,
|
|
1762
|
+
lo as one,
|
|
1763
|
+
Qt as useAuthStore,
|
|
1764
|
+
Wt as useBannersStore,
|
|
1765
|
+
Gt as useBinsStore,
|
|
1766
|
+
Jt as useDownloadsStore,
|
|
1767
|
+
Yt as useHttpStore,
|
|
1768
|
+
Xt as useNotificationsStore,
|
|
1769
|
+
Kt as useOneStore,
|
|
1770
|
+
eo as useProductsStore,
|
|
1771
|
+
to as usePromotionsStore,
|
|
1772
|
+
oo as useQueueStore,
|
|
1773
|
+
so as useSettingsStore,
|
|
1774
|
+
ao as useSiteStore,
|
|
1775
|
+
no as useSponsorsStore,
|
|
1776
|
+
ro as useSpotsStore,
|
|
1777
|
+
io as useTeamStore,
|
|
1778
|
+
co as useUserStore
|
|
1779
|
+
};
|