@huyooo/ui 2.0.7 → 2.0.9
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/{AuthkitAppSetting-CX4WTwNd.js → AuthkitAppSetting-DoC2RJh7.js} +787 -752
- package/dist/{Contact-CBGSJC2q.js → Contact-Ck3LVLx-.js} +3 -3
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-BNBzOqrv.js → FeedbackModal.vue_vue_type_script_setup_true_lang-hveEkBb4.js} +2 -2
- package/dist/{LandingPageLinkGroup-BZJ48Yss.js → LandingPageLinkGroup-DTFhrYK1.js} +1 -1
- package/dist/{LandingPageSectionTabs-jRjkWlM-.js → LandingPageSectionTabs-Bm_zZrfT.js} +1 -1
- package/dist/LegalDocViewer-DBr0x1ZE.js +2497 -0
- package/dist/{Logo-D7fyXyB-.js → Logo-B9DFBxDU.js} +1 -1
- package/dist/{PaySubscriptions-BSkcUqHk.js → PaySubscriptions-Bv6LQ_Pf.js} +1 -1
- package/dist/{PricingPlans-CyFvgf18.js → PricingPlans-CQaXgOIR.js} +3 -3
- package/dist/{ReferrerReferees-Mvv6oiqe.js → ReferrerReferees-CGrH-gYJ.js} +1 -1
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js → Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-V5EzZMCL.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QE1ARaXY.js} +195 -211
- package/dist/WidthContainer-Clc_WxY_.js +706 -0
- package/dist/authkit.d.ts +1 -0
- package/dist/authkit.js +51 -50
- package/dist/common/globalConfig.d.ts +0 -5
- package/dist/common.js +2 -2
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +1 -3
- package/dist/components/Gradientbackground.vue.d.ts +1 -1
- package/dist/components/UserMenu/UserMenu.vue.d.ts +2 -2
- package/dist/composables/Authkit/oauthCallback.d.ts +14 -0
- package/dist/composables/Authkit/useAppBrand.d.ts +7 -0
- package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +2 -0
- package/dist/composables/Authkit/useOAuthCallbackHandler.d.ts +11 -0
- package/dist/composables/Authkit/useOauth.d.ts +3 -3
- package/dist/composables.d.ts +1 -0
- package/dist/composables.js +39 -38
- package/dist/feedback.js +1 -1
- package/dist/{fetchAuthPageAboutUs-CP5a7jIo.js → fetchAuthPageAboutUs-DV7ArpNZ.js} +1 -1
- package/dist/landingPage.js +3 -3
- package/dist/main.js +239 -237
- package/dist/pay.js +3 -3
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{runtime-qs4IasEB.js → runtime-Dp7MgwhI.js} +115 -116
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAuth-BPTZUSkM.js → useAuthkitAuth-cHrJMM8E.js} +48 -47
- package/dist/useAuthkitUsersProfile-8FzLTfUJ.js +55 -0
- package/dist/{useEnsureAuthenticated-CncOvj2H.js → useEnsureAuthenticated-C8qS8DLL.js} +1 -1
- package/dist/{useLegalDocs-BZlntAI7.js → useLegalDocs-C4qk5CTb.js} +1 -1
- package/dist/{usePageSEO-DwhbUUjW.js → usePageSEO-Dl6_kBWP.js} +1 -1
- package/dist/useRoutePermission-DYPZgvYv.js +247 -0
- package/dist/{useSubscriptionCheckout-BDDCRxSs.js → useSubscriptionCheckout-CYU2Ke0y.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/LegalDocViewer-DPUiWxcR.js +0 -2492
- package/dist/WidthContainer-Dts5qV1W.js +0 -717
- package/dist/components/UserMenu/parts/UserMenuAuthPlaceholder.vue.d.ts +0 -7
- package/dist/useAuthkitUsersProfile-BclJWOvR.js +0 -45
- package/dist/useRoutePermission-CePjXomb.js +0 -218
package/dist/upload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { b as s, d as p } from "./runtime-
|
|
1
|
+
import { _ as o } from "./Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js";
|
|
2
|
+
import { b as s, d as p } from "./runtime-Dp7MgwhI.js";
|
|
3
3
|
export {
|
|
4
4
|
o as Upload,
|
|
5
5
|
s as createBrowserCosTransport,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ref as u, computed as
|
|
2
|
-
import { o as M, g as m, r as $, s as
|
|
1
|
+
import { ref as u, computed as h, nextTick as _, readonly as x } from "vue";
|
|
2
|
+
import { o as M, g as m, r as $, s as F } from "./apiClients-Ctcq8NZs.js";
|
|
3
3
|
import { u as D } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
4
4
|
const g = u(!1), w = u(!1);
|
|
5
5
|
let I;
|
|
@@ -33,15 +33,15 @@ function N(e) {
|
|
|
33
33
|
function Y() {
|
|
34
34
|
const {
|
|
35
35
|
appsData: e
|
|
36
|
-
} = D(), r =
|
|
36
|
+
} = D(), r = h(() => e.value.registrationTerms ?? K), t = h(() => {
|
|
37
37
|
var n;
|
|
38
38
|
return ((n = e.value.signUpAuth) == null ? void 0 : n.enabled) !== !1;
|
|
39
|
-
}), l =
|
|
40
|
-
function
|
|
39
|
+
}), l = h(() => t.value && !r.value.required);
|
|
40
|
+
function s() {
|
|
41
41
|
return t.value && r.value.required;
|
|
42
42
|
}
|
|
43
43
|
function i() {
|
|
44
|
-
return
|
|
44
|
+
return s();
|
|
45
45
|
}
|
|
46
46
|
function f() {
|
|
47
47
|
g.value = !1;
|
|
@@ -53,10 +53,10 @@ function Y() {
|
|
|
53
53
|
g.value = n;
|
|
54
54
|
}
|
|
55
55
|
function S(n) {
|
|
56
|
-
const
|
|
56
|
+
const o = h(() => n === "signUp" ? s() : i()), p = h(() => N(() => o.value));
|
|
57
57
|
return {
|
|
58
|
-
showTermsField:
|
|
59
|
-
termsRules:
|
|
58
|
+
showTermsField: o,
|
|
59
|
+
termsRules: p
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
return {
|
|
@@ -65,7 +65,7 @@ function Y() {
|
|
|
65
65
|
registrationTerms: r,
|
|
66
66
|
signUpAuthEnabled: t,
|
|
67
67
|
registrationBlocked: l,
|
|
68
|
-
requiresAcceptanceForSignUp:
|
|
68
|
+
requiresAcceptanceForSignUp: s,
|
|
69
69
|
requiresAcceptanceForOAuth: i,
|
|
70
70
|
resetAcceptedTerms: f,
|
|
71
71
|
shakeTerms: A,
|
|
@@ -74,10 +74,10 @@ function Y() {
|
|
|
74
74
|
useTermsFormField: S
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
const c = u("signIn"),
|
|
78
|
-
function
|
|
77
|
+
const c = u("signIn"), O = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Set(), a = u(null), b = "jwtToken";
|
|
78
|
+
function U() {
|
|
79
79
|
try {
|
|
80
|
-
const e = localStorage.getItem(
|
|
80
|
+
const e = localStorage.getItem(b);
|
|
81
81
|
if (e)
|
|
82
82
|
return a.value = e, !0;
|
|
83
83
|
} catch (e) {
|
|
@@ -85,20 +85,21 @@ function b() {
|
|
|
85
85
|
}
|
|
86
86
|
return !1;
|
|
87
87
|
}
|
|
88
|
+
typeof window < "u" && U();
|
|
88
89
|
function z() {
|
|
89
90
|
try {
|
|
90
91
|
const e = new URL(window.location.href), r = e.searchParams.get("token");
|
|
91
92
|
if (!r) return !1;
|
|
92
|
-
const t = e.searchParams.get("refreshToken"), l = e.searchParams.get("userId"),
|
|
93
|
-
t ?
|
|
93
|
+
const t = e.searchParams.get("refreshToken"), l = e.searchParams.get("userId"), s = e.searchParams.get("appId"), i = e.searchParams.get("needBindIdentity") === "true";
|
|
94
|
+
t ? F({
|
|
94
95
|
jwtToken: r,
|
|
95
96
|
refreshToken: t
|
|
96
|
-
}) :
|
|
97
|
+
}) : P(r), ["token", "refreshToken", "userId", "appId", "needBindIdentity", "expiresIn"].forEach((d) => e.searchParams.delete(d));
|
|
97
98
|
const f = `${e.pathname}${e.search}${e.hash}`;
|
|
98
99
|
return window.history.replaceState({}, "", f), C({
|
|
99
100
|
jwtToken: r,
|
|
100
101
|
userId: l,
|
|
101
|
-
appId:
|
|
102
|
+
appId: s,
|
|
102
103
|
needBindIdentity: i
|
|
103
104
|
}), !0;
|
|
104
105
|
} catch (e) {
|
|
@@ -106,24 +107,24 @@ function z() {
|
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
function H() {
|
|
109
|
-
return z() ? !0 :
|
|
110
|
+
return z() ? !0 : U();
|
|
110
111
|
}
|
|
111
112
|
function q() {
|
|
112
|
-
return a.value ||
|
|
113
|
+
return a.value || U() ? a.value : null;
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function P(e) {
|
|
115
116
|
a.value = e;
|
|
116
117
|
try {
|
|
117
|
-
localStorage.setItem(
|
|
118
|
+
localStorage.setItem(b, e);
|
|
118
119
|
} catch (r) {
|
|
119
120
|
console.warn("Failed to save token to localStorage:", r);
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
function k(e) {
|
|
123
|
-
e.refreshToken ?
|
|
124
|
+
e.refreshToken ? F({
|
|
124
125
|
jwtToken: e.jwtToken,
|
|
125
126
|
refreshToken: e.refreshToken
|
|
126
|
-
}) :
|
|
127
|
+
}) : P(e.jwtToken), C(e);
|
|
127
128
|
}
|
|
128
129
|
function J() {
|
|
129
130
|
a.value = null, Z();
|
|
@@ -146,38 +147,38 @@ function T(e, r) {
|
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
149
|
function C(e) {
|
|
149
|
-
|
|
150
|
+
O.forEach((r) => {
|
|
150
151
|
r(e);
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
154
|
function W() {
|
|
154
|
-
|
|
155
|
+
L.forEach((e) => void e());
|
|
155
156
|
}
|
|
156
157
|
function X() {
|
|
157
|
-
|
|
158
|
+
j.forEach((e) => void e());
|
|
158
159
|
}
|
|
159
160
|
function Z() {
|
|
160
|
-
|
|
161
|
+
V.forEach((e) => void e());
|
|
161
162
|
}
|
|
162
163
|
function ee(e) {
|
|
163
|
-
return T(
|
|
164
|
+
return T(O, e);
|
|
164
165
|
}
|
|
165
166
|
function ne(e) {
|
|
166
|
-
return T(
|
|
167
|
+
return T(L, e);
|
|
167
168
|
}
|
|
168
169
|
function re(e) {
|
|
169
|
-
return T(
|
|
170
|
+
return T(j, e);
|
|
170
171
|
}
|
|
171
172
|
function te(e) {
|
|
172
|
-
return T(
|
|
173
|
+
return T(V, e);
|
|
173
174
|
}
|
|
174
175
|
function ue() {
|
|
175
176
|
const e = u(!1), r = u(!1), t = u(!1);
|
|
176
177
|
async function l(n) {
|
|
177
178
|
e.value = !0;
|
|
178
179
|
const {
|
|
179
|
-
data:
|
|
180
|
-
error:
|
|
180
|
+
data: o,
|
|
181
|
+
error: p
|
|
181
182
|
} = await m().auth.auth.signIn.unified.post({
|
|
182
183
|
identifier: n.identifier || n.email || "",
|
|
183
184
|
password: n.password,
|
|
@@ -185,42 +186,42 @@ function ue() {
|
|
|
185
186
|
emailVerifyId: n.emailVerifyId,
|
|
186
187
|
method: n.method || "password"
|
|
187
188
|
});
|
|
188
|
-
if (e.value = !1,
|
|
189
|
+
if (e.value = !1, p || !o)
|
|
189
190
|
return;
|
|
190
|
-
k(
|
|
191
|
+
k(o);
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
+
function s(n) {
|
|
193
194
|
k(n);
|
|
194
195
|
}
|
|
195
196
|
async function i(n) {
|
|
196
197
|
const {
|
|
197
|
-
resetAcceptedTerms:
|
|
198
|
-
acceptedTerms:
|
|
199
|
-
requiresAcceptanceForSignUp:
|
|
198
|
+
resetAcceptedTerms: o,
|
|
199
|
+
acceptedTerms: p,
|
|
200
|
+
requiresAcceptanceForSignUp: R
|
|
200
201
|
} = Y();
|
|
201
202
|
r.value = !0;
|
|
202
|
-
const
|
|
203
|
+
const E = R() ? p.value : void 0, {
|
|
203
204
|
error: B
|
|
204
205
|
} = n.type === "phone" ? await m().auth.auth.signUp.phone.post({
|
|
205
206
|
phone: n.phone || "",
|
|
206
207
|
code: n.code || "",
|
|
207
208
|
password: n.password,
|
|
208
209
|
inviteCode: n.inviteCode,
|
|
209
|
-
acceptedTerms:
|
|
210
|
+
acceptedTerms: E === !0
|
|
210
211
|
}) : await m().auth.auth.signUp.post({
|
|
211
212
|
email: n.email || "",
|
|
212
213
|
userToken: n.userToken || "",
|
|
213
214
|
emailVerifyId: n.emailVerifyId || "",
|
|
214
215
|
password: n.password || "",
|
|
215
216
|
inviteCode: n.inviteCode,
|
|
216
|
-
acceptedTerms:
|
|
217
|
+
acceptedTerms: E === !0
|
|
217
218
|
});
|
|
218
|
-
r.value = !1, !B && (
|
|
219
|
+
r.value = !1, !B && (o(), c.value = "signIn", W());
|
|
219
220
|
}
|
|
220
221
|
async function f(n) {
|
|
221
222
|
t.value = !0;
|
|
222
223
|
const {
|
|
223
|
-
error:
|
|
224
|
+
error: o
|
|
224
225
|
} = await m().auth.auth.resetPassword.post({
|
|
225
226
|
method: n.method || "email",
|
|
226
227
|
email: n.email,
|
|
@@ -230,7 +231,7 @@ function ue() {
|
|
|
230
231
|
emailVerifyId: n.emailVerifyId,
|
|
231
232
|
password: n.password
|
|
232
233
|
});
|
|
233
|
-
t.value = !1, !
|
|
234
|
+
t.value = !1, !o && (c.value = "signIn", X());
|
|
234
235
|
}
|
|
235
236
|
function d() {
|
|
236
237
|
c.value = "signUp";
|
|
@@ -243,7 +244,7 @@ function ue() {
|
|
|
243
244
|
}
|
|
244
245
|
return {
|
|
245
246
|
signInSubmit: l,
|
|
246
|
-
passkeySignInSubmit:
|
|
247
|
+
passkeySignInSubmit: s,
|
|
247
248
|
signUpSubmit: i,
|
|
248
249
|
resetPasswordSubmit: f,
|
|
249
250
|
currentView: c,
|
|
@@ -259,7 +260,7 @@ function ue() {
|
|
|
259
260
|
onSignOut: te,
|
|
260
261
|
jwtToken: x(a),
|
|
261
262
|
getToken: q,
|
|
262
|
-
setToken:
|
|
263
|
+
setToken: P,
|
|
263
264
|
completeSignIn: k,
|
|
264
265
|
restoreSession: H,
|
|
265
266
|
clearAuth: y,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ref as a, computed as l } from "vue";
|
|
2
|
+
import { g as c } from "./apiClients-Ctcq8NZs.js";
|
|
3
|
+
import { u as i } from "./useAuthkitAuth-cHrJMM8E.js";
|
|
4
|
+
const e = a(null), n = a(!1), u = a(!1), o = a(!1);
|
|
5
|
+
function v() {
|
|
6
|
+
o.value = !0;
|
|
7
|
+
}
|
|
8
|
+
function p(t) {
|
|
9
|
+
return t === 401 || t === 40101;
|
|
10
|
+
}
|
|
11
|
+
const d = l(() => !!e.value), h = l(() => {
|
|
12
|
+
if (!o.value || !u.value)
|
|
13
|
+
return "pending";
|
|
14
|
+
if (e.value)
|
|
15
|
+
return "authenticated";
|
|
16
|
+
const {
|
|
17
|
+
getToken: t
|
|
18
|
+
} = i();
|
|
19
|
+
return t() ? "authenticated" : "unauthenticated";
|
|
20
|
+
});
|
|
21
|
+
async function g() {
|
|
22
|
+
const {
|
|
23
|
+
getToken: t,
|
|
24
|
+
clearAuth: f
|
|
25
|
+
} = i();
|
|
26
|
+
if (!t()) {
|
|
27
|
+
e.value = null, u.value = !0;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
n.value = !0, u.value = !1;
|
|
31
|
+
const {
|
|
32
|
+
data: s,
|
|
33
|
+
error: r
|
|
34
|
+
} = await c().auth.users.profile.post({});
|
|
35
|
+
n.value = !1, s ? e.value = s : p(r == null ? void 0 : r.code) && (e.value = null, console.warn("认证已过期,清除认证状态"), f()), u.value = !0;
|
|
36
|
+
}
|
|
37
|
+
function m() {
|
|
38
|
+
e.value = null, n.value = !1, u.value = !0;
|
|
39
|
+
}
|
|
40
|
+
function U() {
|
|
41
|
+
return {
|
|
42
|
+
userProfile: e,
|
|
43
|
+
loading: n,
|
|
44
|
+
usersProfileReady: u,
|
|
45
|
+
authSessionBootstrapped: o,
|
|
46
|
+
isLoggedIn: d,
|
|
47
|
+
authSessionState: h,
|
|
48
|
+
fetchUserProfile: g,
|
|
49
|
+
clearUserProfile: m,
|
|
50
|
+
markAuthSessionBootstrapped: v
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
U as u
|
|
55
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as f } from "vue";
|
|
2
2
|
import { u as d } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
3
|
-
import { g as L } from "./runtime-
|
|
3
|
+
import { g as L } from "./runtime-Dp7MgwhI.js";
|
|
4
4
|
const c = {
|
|
5
5
|
userServiceAgreement: "用户服务协议",
|
|
6
6
|
privacyPolicy: "隐私协议",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./apiClients-Ctcq8NZs.js";
|
|
3
3
|
import { Message as y } from "@arco-design/web-vue";
|
|
4
4
|
import { ref as a, computed as s, toValue as A } from "vue";
|
|
5
|
-
import { u as N } from "./runtime-
|
|
5
|
+
import { u as N } from "./runtime-Dp7MgwhI.js";
|
|
6
6
|
import { useHead as g, useSeoMeta as w } from "@unhead/vue";
|
|
7
7
|
import { useRoute as E } from "vue-router";
|
|
8
8
|
function M(t) {
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { computed as g, ref as L, watch as S } from "vue";
|
|
2
|
+
import { useRouter as w, useRoute as C } from "vue-router";
|
|
3
|
+
import { u as k } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
4
|
+
import { u as M } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
|
|
5
|
+
import { u as K } from "./useAuthkitAuth-cHrJMM8E.js";
|
|
6
|
+
function O(e, s = "default") {
|
|
7
|
+
const n = document;
|
|
8
|
+
if (n && typeof n.startViewTransition == "function") {
|
|
9
|
+
const t = document.body;
|
|
10
|
+
t.classList.add(`vt-${s}`), n.startViewTransition(() => {
|
|
11
|
+
try {
|
|
12
|
+
e();
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
15
|
+
}).finished.finally(() => {
|
|
16
|
+
t.classList.remove(`vt-${s}`);
|
|
17
|
+
});
|
|
18
|
+
} else
|
|
19
|
+
e();
|
|
20
|
+
}
|
|
21
|
+
function N() {
|
|
22
|
+
const {
|
|
23
|
+
appsData: e,
|
|
24
|
+
appsAuthPageInfoSuccess: s
|
|
25
|
+
} = k(), n = w(), t = g(() => s.value), f = g(() => t.value && e.value.applicationLogoUrl || ""), d = g(() => t.value && e.value.name || "");
|
|
26
|
+
function m() {
|
|
27
|
+
O(() => {
|
|
28
|
+
n.push("/"), window.scrollTo({
|
|
29
|
+
top: 0,
|
|
30
|
+
behavior: "smooth"
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
brandReady: t,
|
|
36
|
+
brandLogoUrl: f,
|
|
37
|
+
brandName: d,
|
|
38
|
+
navigateToAppHome: m
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const y = L({
|
|
42
|
+
key: "",
|
|
43
|
+
name: ""
|
|
44
|
+
});
|
|
45
|
+
function j() {
|
|
46
|
+
function e(s, n) {
|
|
47
|
+
y.value.key = s, y.value.name = n;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
activeDoc: y,
|
|
51
|
+
setActiveDoc: e
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function W(e) {
|
|
55
|
+
const s = /* @__PURE__ */ new Set();
|
|
56
|
+
s.add(e);
|
|
57
|
+
const n = e.split("/").filter(Boolean);
|
|
58
|
+
for (let t = n.length - 1; t > 0; t--)
|
|
59
|
+
s.add(`/${n.slice(0, t).join("/")}`);
|
|
60
|
+
return [...s];
|
|
61
|
+
}
|
|
62
|
+
function A(e, s) {
|
|
63
|
+
const n = new Set(s);
|
|
64
|
+
return n.has("*") ? !0 : W(e).some((t) => n.has(t));
|
|
65
|
+
}
|
|
66
|
+
function $(e, s) {
|
|
67
|
+
const n = e.endsWith("/") ? e.slice(0, -1) : e;
|
|
68
|
+
return n === "" ? !1 : A(n, s) || s.some((t) => t === n ? !0 : t.startsWith(`${n}/`));
|
|
69
|
+
}
|
|
70
|
+
function T(e, s) {
|
|
71
|
+
return Array.isArray(e == null ? void 0 : e.menuTypes) ? e.menuTypes.includes(s) : !1;
|
|
72
|
+
}
|
|
73
|
+
function F(e, s, n) {
|
|
74
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
75
|
+
const f = e[t];
|
|
76
|
+
if (T(f.meta, s))
|
|
77
|
+
return f.path;
|
|
78
|
+
}
|
|
79
|
+
return n;
|
|
80
|
+
}
|
|
81
|
+
function R(e) {
|
|
82
|
+
return e.split("?")[0].split("#")[0];
|
|
83
|
+
}
|
|
84
|
+
function H(e, s, n) {
|
|
85
|
+
const t = R(s), f = (n == null ? void 0 : n.returnParentOnChildMatch) ?? !1;
|
|
86
|
+
function d(o, p) {
|
|
87
|
+
for (const c of o) {
|
|
88
|
+
if (R(c.path) === p)
|
|
89
|
+
return c.path;
|
|
90
|
+
if (c.children && c.children.length > 0) {
|
|
91
|
+
const r = d(c.children, p);
|
|
92
|
+
if (r)
|
|
93
|
+
return f ? c.path : r;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const m = d(e, t);
|
|
99
|
+
if (m)
|
|
100
|
+
return m;
|
|
101
|
+
for (const o of e) {
|
|
102
|
+
const p = R(o.path);
|
|
103
|
+
if (t.startsWith(p + "/") || t === p) {
|
|
104
|
+
if (o.children && o.children.length > 0)
|
|
105
|
+
for (const c of o.children) {
|
|
106
|
+
const v = R(c.path);
|
|
107
|
+
if (t.startsWith(v + "/") || t === v)
|
|
108
|
+
return f ? o.path : c.path;
|
|
109
|
+
}
|
|
110
|
+
return o.path;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return n != null && n.fallback ? n.fallback(t) : t;
|
|
114
|
+
}
|
|
115
|
+
function q(e) {
|
|
116
|
+
const s = w(), {
|
|
117
|
+
appsData: n
|
|
118
|
+
} = k(), {
|
|
119
|
+
isLoggedIn: t,
|
|
120
|
+
userProfile: f
|
|
121
|
+
} = M(), d = g(() => {
|
|
122
|
+
var r;
|
|
123
|
+
return !t.value || !f.value ? [] : ((r = f.value.permissions) == null ? void 0 : r.map((u) => u.permissionKey)) || [];
|
|
124
|
+
});
|
|
125
|
+
function m(r) {
|
|
126
|
+
const u = (n.value.publicRoutes || []).map((l) => l.permissionKey);
|
|
127
|
+
return A(r, u);
|
|
128
|
+
}
|
|
129
|
+
function o(r) {
|
|
130
|
+
return t.value ? A(r, d.value) : !1;
|
|
131
|
+
}
|
|
132
|
+
function p(r) {
|
|
133
|
+
var u;
|
|
134
|
+
return {
|
|
135
|
+
path: r.path,
|
|
136
|
+
name: r.name,
|
|
137
|
+
meta: r.meta,
|
|
138
|
+
children: (u = r.children) == null ? void 0 : u.map((l) => p(l))
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function c(r, u) {
|
|
142
|
+
const l = [];
|
|
143
|
+
for (const a of r) {
|
|
144
|
+
if (a.path === "/" || a.path === "/:catchAll(.*)")
|
|
145
|
+
continue;
|
|
146
|
+
const i = a.meta;
|
|
147
|
+
if (T(i, u)) {
|
|
148
|
+
const P = a.path;
|
|
149
|
+
if (m(P) || $(P, d.value)) {
|
|
150
|
+
const h = {
|
|
151
|
+
name: (i == null ? void 0 : i.menuName) || (i == null ? void 0 : i.title) || (typeof a.name == "string" ? a.name : a.path),
|
|
152
|
+
path: a.path,
|
|
153
|
+
icon: (i == null ? void 0 : i.menuIcon) || (i == null ? void 0 : i.icon),
|
|
154
|
+
description: (i == null ? void 0 : i.menuDescription) || (i == null ? void 0 : i.description),
|
|
155
|
+
hidden: i == null ? void 0 : i.hidden
|
|
156
|
+
};
|
|
157
|
+
if (a.children && a.children.length > 0) {
|
|
158
|
+
const b = c(a.children, u);
|
|
159
|
+
b.length > 0 && (h.children = b);
|
|
160
|
+
}
|
|
161
|
+
l.push(h);
|
|
162
|
+
}
|
|
163
|
+
} else if (a.children && a.children.length > 0) {
|
|
164
|
+
const P = c(a.children, u);
|
|
165
|
+
l.push(...P);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return l;
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
menus: g(() => {
|
|
172
|
+
if (!e)
|
|
173
|
+
return [];
|
|
174
|
+
const r = s.getRoutes(), u = r.find((h) => h.path === "/"), l = u != null && u.children ? u.children.map((h) => p(h)) : [], a = new Set(l.map((h) => h.path)), P = r.filter((h) => h.path === "/" || h.path === "/:catchAll(.*)" || a.has(h.path) ? !1 : h.path.split("/").filter((D) => D).length === 1).map(p), I = [...l, ...P];
|
|
175
|
+
return c(I, e);
|
|
176
|
+
}),
|
|
177
|
+
isRoutePublic: m,
|
|
178
|
+
hasPermission: (r) => m(r) ? !0 : o(r),
|
|
179
|
+
isLoggedIn: t
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function E() {
|
|
183
|
+
const e = w(), s = C(), {
|
|
184
|
+
appsData: n,
|
|
185
|
+
appsAuthPageInfoSuccess: t
|
|
186
|
+
} = k(), {
|
|
187
|
+
userProfile: f,
|
|
188
|
+
isLoggedIn: d,
|
|
189
|
+
usersProfileReady: m
|
|
190
|
+
} = M(), o = L(!1);
|
|
191
|
+
function p(r) {
|
|
192
|
+
const u = n.value.publicRoutes || [];
|
|
193
|
+
return A(r, u.map((l) => l.permissionKey));
|
|
194
|
+
}
|
|
195
|
+
function c(r) {
|
|
196
|
+
var l;
|
|
197
|
+
if (!d.value || !f.value)
|
|
198
|
+
return !1;
|
|
199
|
+
const u = ((l = f.value.permissions) == null ? void 0 : l.map((a) => a.permissionKey)) || [];
|
|
200
|
+
return A(r, u);
|
|
201
|
+
}
|
|
202
|
+
function v(r) {
|
|
203
|
+
if (!t.value) {
|
|
204
|
+
o.value = !0;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (o.value = !0, p(r)) {
|
|
208
|
+
o.value = !1;
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (!m.value) {
|
|
212
|
+
o.value = !0;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (!d.value) {
|
|
216
|
+
const {
|
|
217
|
+
getToken: u
|
|
218
|
+
} = K();
|
|
219
|
+
if (u()) {
|
|
220
|
+
o.value = !0;
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
e.replace("/"), o.value = !1;
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
c(r) || e.replace("/"), o.value = !1;
|
|
227
|
+
}
|
|
228
|
+
return S([() => s.path, t, m, d], () => {
|
|
229
|
+
v(s.path);
|
|
230
|
+
}, {
|
|
231
|
+
immediate: !0
|
|
232
|
+
}), {
|
|
233
|
+
isChecking: o,
|
|
234
|
+
isRoutePublic: p,
|
|
235
|
+
hasPermission: c
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
export {
|
|
239
|
+
F as a,
|
|
240
|
+
N as b,
|
|
241
|
+
q as c,
|
|
242
|
+
E as d,
|
|
243
|
+
H as f,
|
|
244
|
+
R as g,
|
|
245
|
+
j as u,
|
|
246
|
+
O as w
|
|
247
|
+
};
|
|
@@ -3,7 +3,7 @@ import { d as z } from "./useBillingStatusOptions-Br-iL77Z.js";
|
|
|
3
3
|
import { g as $ } from "./apiClients-Ctcq8NZs.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { Message as h } from "@arco-design/web-vue";
|
|
6
|
-
import { u as H } from "./useEnsureAuthenticated-
|
|
6
|
+
import { u as H } from "./useEnsureAuthenticated-C8qS8DLL.js";
|
|
7
7
|
function D(e) {
|
|
8
8
|
var i;
|
|
9
9
|
const r = (i = e == null ? void 0 : e.metadata) == null ? void 0 : i.originalPrice;
|
package/dist/user.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-QE1ARaXY.js";
|
|
2
2
|
export {
|
|
3
3
|
a as UserAccountMenu,
|
|
4
4
|
n as UserAvatar,
|