@huyooo/ui 0.5.8 → 0.5.10
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/{AuthkitAuthModal-DOB2R0lE.js → AuthkitAuthModal-DEVS8XfG.js} +4 -4
- package/dist/{AuthkitAuthorize-BLKbcsyH.js → AuthkitAuthorize-cnC-Hl0X.js} +2 -2
- package/dist/Contact-ppttdnNW.js +204 -0
- package/dist/{FeedbackItem-TRyk9rcU.js → FeedbackItem-44CGbXN_.js} +3 -3
- package/dist/{FeedbackModal-BJx5Bzas.js → FeedbackModal-DdTqdVlw.js} +2 -2
- package/dist/{MessageHandle-DP9rvOy4.js → MessageHandle-Cagv57D0.js} +2 -2
- package/dist/{PaySubscriptions-DyHMXC_2.js → PaySubscriptions-Bva3INxJ.js} +1 -1
- package/dist/{ReferrerReferees-CxmerF3X.js → ReferrerReferees-D3qUZ62t.js} +2 -2
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-CZ8Z-NG6.js → Upload.vue_vue_type_script_setup_true_lang-9HB-tLZd.js} +2 -2
- package/dist/{UserAccountMenu-BEFQWt3O.js → UserAccountMenu-50CxuyL3.js} +1 -1
- package/dist/{UserPanel-DgSdGhj5.js → UserPanel-DHXkFUTF.js} +7 -7
- package/dist/{WidthContainer-3fyX6xI4.js → WidthContainer-D_dX_G8P.js} +87 -71
- package/dist/authkit.js +4 -4
- package/dist/common/globalConfig.d.ts +12 -0
- package/dist/common.js +1 -1
- package/dist/composables/useSEO.d.ts +46 -0
- package/dist/composables.d.ts +2 -1
- package/dist/composables.js +24 -20
- package/dist/feedback.js +2 -2
- package/dist/globalConfig-C1YOJcxa.js +22 -0
- package/dist/index.js +920 -471
- package/dist/main.d.ts +1 -0
- package/dist/message.js +2 -2
- package/dist/pay.js +1 -1
- package/dist/privateCom.d.ts +0 -1
- package/dist/privateCom.js +4 -6
- package/dist/referrer.js +1 -1
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAppsAuthPageInfo-qWOtNCda.js → useAuthkitAppsAuthPageInfo-Dfj4byB5.js} +1 -1
- package/dist/{useAuthkitUsersProfile-a-kA3R2Y.js → useAuthkitUsersProfile-Bi_zM2qG.js} +1 -1
- package/dist/useDownloads-DnMYa52H.js +73 -0
- package/dist/{useMessageNotifications-B5pXqPNh.js → useMessageNotifications-DSRanuRe.js} +1 -1
- package/dist/useSEO-CREH71xC.js +589 -0
- package/dist/{useUploadCos-yeMY5Xn0.js → useUploadCos-D5k1YLb7.js} +1 -1
- package/dist/user.js +2 -2
- package/package.json +1 -1
- package/dist/Contact-BLWzIAS4.js +0 -418
- package/dist/components/PrivateCom/useSEO.d.ts +0 -71
- package/dist/globalConfig-DKn-cF9c.js +0 -17
- package/dist/useDownloads-CHe228Vf.js +0 -87
- package/dist/useRoutePermission-BKg7oQTj.js +0 -120
package/dist/upload.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { u as s } from "./useUploadCos-
|
|
1
|
+
import { _ as p } from "./Upload.vue_vue_type_script_setup_true_lang-9HB-tLZd.js";
|
|
2
|
+
import { u as s } from "./useUploadCos-D5k1YLb7.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Upload,
|
|
5
5
|
s as useUploadCos
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as u, readonly as S, computed as A } from "vue";
|
|
2
2
|
import { api as a } from "@huyooo/api";
|
|
3
|
-
import { g as n } from "./globalConfig-
|
|
3
|
+
import { g as n } from "./globalConfig-C1YOJcxa.js";
|
|
4
4
|
function b(e) {
|
|
5
5
|
return a({
|
|
6
6
|
url: `${n.authPrefixUrl}/restfulApi/auth/signIn`,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Message as v } from "@arco-design/web-vue";
|
|
4
|
+
import { ref as n } from "vue";
|
|
5
|
+
function g(l) {
|
|
6
|
+
const s = n(!1), r = n(), a = n(!1), d = n(""), f = n("");
|
|
7
|
+
function e(o) {
|
|
8
|
+
v.success(o), a.value = !1, s.value = !1, l("confirm");
|
|
9
|
+
}
|
|
10
|
+
function c() {
|
|
11
|
+
a.value = !1, console.log("handleClose"), l("cancel");
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
loading: s,
|
|
15
|
+
formRef: r,
|
|
16
|
+
submitSuccess: e,
|
|
17
|
+
modelType: d,
|
|
18
|
+
changeType: f,
|
|
19
|
+
show: a,
|
|
20
|
+
handleCancel: c
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
let u = null, i = "", t = null;
|
|
24
|
+
function D() {
|
|
25
|
+
const l = n([]), s = n(!1), r = n(""), a = n("");
|
|
26
|
+
async function d({
|
|
27
|
+
versionApi: f
|
|
28
|
+
}) {
|
|
29
|
+
if (u) {
|
|
30
|
+
l.value = u, a.value = i;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (t) {
|
|
34
|
+
await t, l.value = u || [], a.value = i;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
s.value = !0, r.value = "", t = fetch(f).then((e) => {
|
|
38
|
+
if (!e.ok)
|
|
39
|
+
throw new Error(`HTTP error! status: ${e.status}`);
|
|
40
|
+
return e.json();
|
|
41
|
+
}).then((e) => {
|
|
42
|
+
const c = e.downloads.map((o) => ({
|
|
43
|
+
id: o.id,
|
|
44
|
+
name: o.name,
|
|
45
|
+
description: o.description,
|
|
46
|
+
version: o.version,
|
|
47
|
+
updateDate: o.updateDate,
|
|
48
|
+
icon: "",
|
|
49
|
+
// 将在组件中动态设置
|
|
50
|
+
downloadUrl: o.downloadUrl,
|
|
51
|
+
platform: o.platform,
|
|
52
|
+
requirements: o.requirements,
|
|
53
|
+
badge: o.badge
|
|
54
|
+
}));
|
|
55
|
+
u = c, i = e.version, l.value = c, a.value = e.version;
|
|
56
|
+
}).catch((e) => {
|
|
57
|
+
r.value = e.message || "获取版本信息失败", console.error("Failed to fetch downloads:", e);
|
|
58
|
+
}).finally(() => {
|
|
59
|
+
s.value = !1, t = null;
|
|
60
|
+
}), await t;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
downloads: l,
|
|
64
|
+
loading: s,
|
|
65
|
+
error: r,
|
|
66
|
+
version: a,
|
|
67
|
+
fetchDownloads: d
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
D as a,
|
|
72
|
+
g as u
|
|
73
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as a, computed as x } from "vue";
|
|
2
2
|
import { api as c } from "@huyooo/api";
|
|
3
|
-
import { g } from "./globalConfig-
|
|
3
|
+
import { g } from "./globalConfig-C1YOJcxa.js";
|
|
4
4
|
function z(t) {
|
|
5
5
|
return c({
|
|
6
6
|
url: `${g.prefixUrl}/restfulApi/messageCenter/messageNotifications/find`,
|
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
import { ref as $, computed as f, watch as H, toValue as D, isRef as K, hasInjectionContext as k, inject as L, watchEffect as R, getCurrentInstance as q, onBeforeUnmount as z, onDeactivated as N, onActivated as G } from "vue";
|
|
2
|
+
import { useRouter as j, useRoute as M } from "vue-router";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
import "@arco-design/web-vue";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import "./useUploadCos-D5k1YLb7.js";
|
|
10
|
+
import "@huyooo/api";
|
|
11
|
+
import "./AuthkitAuthModal.vue_vue_type_style_index_1_lang-BpOmabWi.js";
|
|
12
|
+
import { a as E } from "./useAuthkitUsersProfile-Bi_zM2qG.js";
|
|
13
|
+
import "@iconify/vue";
|
|
14
|
+
/* empty css */
|
|
15
|
+
import { u as O } from "./useAuthkitAppsAuthPageInfo-Dfj4byB5.js";
|
|
16
|
+
/* empty css */
|
|
17
|
+
/* empty css */
|
|
18
|
+
/* empty css */
|
|
19
|
+
/* empty css */
|
|
20
|
+
const b = $({
|
|
21
|
+
key: "",
|
|
22
|
+
name: ""
|
|
23
|
+
});
|
|
24
|
+
function Me() {
|
|
25
|
+
function e(t, r) {
|
|
26
|
+
b.value.key = t, b.value.name = r;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
activeDoc: b,
|
|
30
|
+
setActiveDoc: e
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function Ee(e, t = "default") {
|
|
34
|
+
const r = document;
|
|
35
|
+
if (r && typeof r.startViewTransition == "function") {
|
|
36
|
+
const n = document.body;
|
|
37
|
+
n.classList.add(`vt-${t}`), r.startViewTransition(() => {
|
|
38
|
+
try {
|
|
39
|
+
e();
|
|
40
|
+
} catch {
|
|
41
|
+
}
|
|
42
|
+
}).finished.finally(() => {
|
|
43
|
+
n.classList.remove(`vt-${t}`);
|
|
44
|
+
});
|
|
45
|
+
} else
|
|
46
|
+
e();
|
|
47
|
+
}
|
|
48
|
+
function Oe(e, t, r) {
|
|
49
|
+
const n = e.find((o) => {
|
|
50
|
+
var i;
|
|
51
|
+
return ((i = o.meta) == null ? void 0 : i.menuType) === t;
|
|
52
|
+
});
|
|
53
|
+
return (n == null ? void 0 : n.path) || r;
|
|
54
|
+
}
|
|
55
|
+
function ve(e) {
|
|
56
|
+
const t = j(), {
|
|
57
|
+
appsData: r
|
|
58
|
+
} = O(), {
|
|
59
|
+
isLoggedIn: n,
|
|
60
|
+
userProfile: o
|
|
61
|
+
} = E(), i = f(() => {
|
|
62
|
+
var c;
|
|
63
|
+
return !n.value || !o.value ? [] : ((c = o.value.permissions) == null ? void 0 : c.map((l) => l.permissionKey)) || [];
|
|
64
|
+
});
|
|
65
|
+
function s(c) {
|
|
66
|
+
return (r.value.publicRoutes || []).some((p) => p.permissionKey === c);
|
|
67
|
+
}
|
|
68
|
+
function a(c) {
|
|
69
|
+
return n.value ? i.value.includes(c) : !1;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
menus: f(() => t.getRoutes().filter((l) => {
|
|
73
|
+
const p = l.meta;
|
|
74
|
+
return e ? p.menuType === e : !!p.menuType;
|
|
75
|
+
}).filter((l) => {
|
|
76
|
+
const p = l.path;
|
|
77
|
+
return s(p) ? !0 : a(p);
|
|
78
|
+
}).map((l) => {
|
|
79
|
+
const p = l.meta;
|
|
80
|
+
return {
|
|
81
|
+
name: p.title || l.path,
|
|
82
|
+
path: l.path,
|
|
83
|
+
key: l.path,
|
|
84
|
+
icon: p.menuIcon || p.icon || "Header/Help"
|
|
85
|
+
};
|
|
86
|
+
})),
|
|
87
|
+
isRoutePublic: s,
|
|
88
|
+
hasPermission: (c) => s(c) ? !0 : a(c),
|
|
89
|
+
isLoggedIn: n
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function Ie() {
|
|
93
|
+
const e = j(), t = M(), {
|
|
94
|
+
appsAuthPageInfoApi: r,
|
|
95
|
+
appsData: n
|
|
96
|
+
} = O(), {
|
|
97
|
+
isLoggedIn: o,
|
|
98
|
+
userProfile: i
|
|
99
|
+
} = E(), s = $(!1);
|
|
100
|
+
function a(l) {
|
|
101
|
+
return (n.value.publicRoutes || []).some((d) => d.permissionKey === l);
|
|
102
|
+
}
|
|
103
|
+
function u(l) {
|
|
104
|
+
var d;
|
|
105
|
+
return !o.value || !i.value ? !1 : (((d = i.value.permissions) == null ? void 0 : d.map((U) => U.permissionKey)) || []).includes(l);
|
|
106
|
+
}
|
|
107
|
+
function c(l) {
|
|
108
|
+
if (s.value = !0, a(l)) {
|
|
109
|
+
s.value = !1;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (!o.value) {
|
|
113
|
+
e.replace("/"), s.value = !1;
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
u(l) || e.replace("/"), s.value = !1;
|
|
117
|
+
}
|
|
118
|
+
return r(() => {
|
|
119
|
+
c(t.path), H(() => t.path, (l) => {
|
|
120
|
+
c(l);
|
|
121
|
+
});
|
|
122
|
+
}), {
|
|
123
|
+
isChecking: s,
|
|
124
|
+
isRoutePublic: a,
|
|
125
|
+
hasPermission: u
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
const W = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]), B = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]), Ve = /* @__PURE__ */ new Set([
|
|
129
|
+
"base",
|
|
130
|
+
"meta",
|
|
131
|
+
"link",
|
|
132
|
+
"style",
|
|
133
|
+
"script",
|
|
134
|
+
"noscript"
|
|
135
|
+
]), Ce = /* @__PURE__ */ new Set([
|
|
136
|
+
"title",
|
|
137
|
+
"base",
|
|
138
|
+
"htmlAttrs",
|
|
139
|
+
"bodyAttrs",
|
|
140
|
+
"meta",
|
|
141
|
+
"link",
|
|
142
|
+
"style",
|
|
143
|
+
"script",
|
|
144
|
+
"noscript"
|
|
145
|
+
]), F = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]), J = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]), _e = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]), T = /* @__PURE__ */ new Set([
|
|
146
|
+
"theme-color",
|
|
147
|
+
"google-site-verification",
|
|
148
|
+
"og",
|
|
149
|
+
"article",
|
|
150
|
+
"book",
|
|
151
|
+
"profile",
|
|
152
|
+
"twitter",
|
|
153
|
+
"author"
|
|
154
|
+
]), h = {
|
|
155
|
+
META: /* @__PURE__ */ new Set(["twitter"]),
|
|
156
|
+
OG: /* @__PURE__ */ new Set(["og", "book", "article", "profile", "fb"]),
|
|
157
|
+
MEDIA: /* @__PURE__ */ new Set(["ogImage", "ogVideo", "ogAudio", "twitterImage"]),
|
|
158
|
+
HTTP_EQUIV: /* @__PURE__ */ new Set(["contentType", "defaultStyle", "xUaCompatible"])
|
|
159
|
+
}, Q = {
|
|
160
|
+
articleExpirationTime: "article:expiration_time",
|
|
161
|
+
articleModifiedTime: "article:modified_time",
|
|
162
|
+
articlePublishedTime: "article:published_time",
|
|
163
|
+
bookReleaseDate: "book:release_date",
|
|
164
|
+
fbAppId: "fb:app_id",
|
|
165
|
+
ogAudioSecureUrl: "og:audio:secure_url",
|
|
166
|
+
ogAudioUrl: "og:audio",
|
|
167
|
+
ogImageSecureUrl: "og:image:secure_url",
|
|
168
|
+
ogImageUrl: "og:image",
|
|
169
|
+
ogSiteName: "og:site_name",
|
|
170
|
+
ogVideoSecureUrl: "og:video:secure_url",
|
|
171
|
+
ogVideoUrl: "og:video",
|
|
172
|
+
profileFirstName: "profile:first_name",
|
|
173
|
+
profileLastName: "profile:last_name",
|
|
174
|
+
profileUsername: "profile:username",
|
|
175
|
+
msapplicationConfig: "msapplication-Config",
|
|
176
|
+
msapplicationTileColor: "msapplication-TileColor",
|
|
177
|
+
msapplicationTileImage: "msapplication-TileImage"
|
|
178
|
+
}, v = {
|
|
179
|
+
appleItunesApp: {
|
|
180
|
+
unpack: {
|
|
181
|
+
entrySeparator: ", ",
|
|
182
|
+
// @ts-expect-error untyped
|
|
183
|
+
resolve: ({ key: e, value: t }) => `${m(e)}=${t}`
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
refresh: {
|
|
187
|
+
metaKey: "http-equiv",
|
|
188
|
+
unpack: {
|
|
189
|
+
entrySeparator: ";",
|
|
190
|
+
// @ts-expect-error untyped
|
|
191
|
+
resolve: ({ key: e, value: t }) => e === "seconds" ? `${t}` : void 0
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
robots: {
|
|
195
|
+
unpack: {
|
|
196
|
+
entrySeparator: ", ",
|
|
197
|
+
// @ts-expect-error untyped
|
|
198
|
+
resolve: ({ key: e, value: t }) => typeof t == "boolean" ? m(e) : `${m(e)}:${t}`
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
contentSecurityPolicy: {
|
|
202
|
+
metaKey: "http-equiv",
|
|
203
|
+
unpack: {
|
|
204
|
+
entrySeparator: "; ",
|
|
205
|
+
// @ts-expect-error untyped
|
|
206
|
+
resolve: ({ key: e, value: t }) => `${m(e)} ${t}`
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
charset: {}
|
|
210
|
+
};
|
|
211
|
+
function m(e) {
|
|
212
|
+
const t = e.replace(/([A-Z])/g, "-$1").toLowerCase(), r = t.indexOf("-");
|
|
213
|
+
return r === -1 ? t : h.META.has(t.slice(0, r)) || h.OG.has(t.slice(0, r)) ? e.replace(/([A-Z])/g, ":$1").toLowerCase() : t;
|
|
214
|
+
}
|
|
215
|
+
function I(e) {
|
|
216
|
+
return Object.fromEntries(Object.entries(e).filter(([t, r]) => String(r) !== "false" && t));
|
|
217
|
+
}
|
|
218
|
+
function w(e) {
|
|
219
|
+
return Array.isArray(e) ? e.map(w) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).map(([t, r]) => [m(t), w(r)]));
|
|
220
|
+
}
|
|
221
|
+
function V(e, t = {}) {
|
|
222
|
+
const { entrySeparator: r = "", keyValueSeparator: n = "", wrapValue: o, resolve: i } = t;
|
|
223
|
+
return Object.entries(e).map(([s, a]) => {
|
|
224
|
+
if (i) {
|
|
225
|
+
const c = i({ key: s, value: a });
|
|
226
|
+
if (c !== void 0)
|
|
227
|
+
return c;
|
|
228
|
+
}
|
|
229
|
+
const u = typeof a == "object" ? V(a, t) : typeof a == "number" ? a.toString() : typeof a == "string" && o ? `${o}${a.replace(new RegExp(o, "g"), `\\${o}`)}${o}` : a;
|
|
230
|
+
return `${s}${n}${u}`;
|
|
231
|
+
}).join(r);
|
|
232
|
+
}
|
|
233
|
+
function P(e, t) {
|
|
234
|
+
const r = I(t), n = m(e), o = C(n);
|
|
235
|
+
if (!T.has(n))
|
|
236
|
+
return [{ [o]: n, ...r }];
|
|
237
|
+
const i = Object.fromEntries(
|
|
238
|
+
Object.entries(r).map(([s, a]) => [`${e}${s === "url" ? "" : `${s[0].toUpperCase()}${s.slice(1)}`}`, a])
|
|
239
|
+
);
|
|
240
|
+
return g(i || {}).sort((s, a) => {
|
|
241
|
+
var u, c;
|
|
242
|
+
return (((u = s[o]) == null ? void 0 : u.length) || 0) - (((c = a[o]) == null ? void 0 : c.length) || 0);
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
function C(e) {
|
|
246
|
+
var n;
|
|
247
|
+
if (((n = v[e]) == null ? void 0 : n.metaKey) === "http-equiv" || h.HTTP_EQUIV.has(e))
|
|
248
|
+
return "http-equiv";
|
|
249
|
+
const t = m(e), r = t.indexOf(":");
|
|
250
|
+
return r === -1 ? "name" : h.OG.has(t.slice(0, r)) ? "property" : "name";
|
|
251
|
+
}
|
|
252
|
+
function Z(e) {
|
|
253
|
+
return Q[e] || m(e);
|
|
254
|
+
}
|
|
255
|
+
function X(e, t) {
|
|
256
|
+
var r;
|
|
257
|
+
return t === "refresh" ? `${e.seconds};url=${e.url}` : V(w(e), {
|
|
258
|
+
keyValueSeparator: "=",
|
|
259
|
+
entrySeparator: ", ",
|
|
260
|
+
resolve: ({ value: n, key: o }) => n === null ? "" : typeof n == "boolean" ? o : void 0,
|
|
261
|
+
// @ts-expect-error untyped
|
|
262
|
+
...(r = v[t]) == null ? void 0 : r.unpack
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
function g(e) {
|
|
266
|
+
const t = [], r = {};
|
|
267
|
+
for (const [o, i] of Object.entries(e)) {
|
|
268
|
+
if (Array.isArray(i)) {
|
|
269
|
+
if (o === "themeColor") {
|
|
270
|
+
i.forEach((s) => {
|
|
271
|
+
typeof s == "object" && s !== null && t.push({ name: "theme-color", ...s });
|
|
272
|
+
});
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
for (const s of i)
|
|
276
|
+
if (typeof s == "object" && s !== null) {
|
|
277
|
+
const a = [], u = [];
|
|
278
|
+
for (const [c, l] of Object.entries(s)) {
|
|
279
|
+
const p = `${o}${c === "url" ? "" : `:${c}`}`, d = g({ [p]: l });
|
|
280
|
+
(c === "url" ? a : u).push(...d);
|
|
281
|
+
}
|
|
282
|
+
t.push(...a, ...u);
|
|
283
|
+
} else
|
|
284
|
+
t.push(...typeof s == "string" ? g({ [o]: s }) : P(o, s));
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (typeof i == "object" && i)
|
|
288
|
+
if (h.MEDIA.has(o)) {
|
|
289
|
+
const s = o.startsWith("twitter") ? "twitter" : "og", a = o.replace(/^(og|twitter)/, "").toLowerCase(), u = s === "twitter" ? "name" : "property";
|
|
290
|
+
i.url && t.push({
|
|
291
|
+
[u]: `${s}:${a}`,
|
|
292
|
+
content: i.url
|
|
293
|
+
}), i.secureUrl && t.push({
|
|
294
|
+
[u]: `${s}:${a}:secure_url`,
|
|
295
|
+
content: i.secureUrl
|
|
296
|
+
});
|
|
297
|
+
for (const [c, l] of Object.entries(i))
|
|
298
|
+
c !== "url" && c !== "secureUrl" && t.push({
|
|
299
|
+
[u]: `${s}:${a}:${c}`,
|
|
300
|
+
// @ts-expect-error untyped
|
|
301
|
+
content: l
|
|
302
|
+
});
|
|
303
|
+
} else T.has(m(o)) ? t.push(...P(o, i)) : r[o] = I(i);
|
|
304
|
+
else
|
|
305
|
+
r[o] = i;
|
|
306
|
+
}
|
|
307
|
+
const n = Object.entries(r).map(([o, i]) => {
|
|
308
|
+
if (o === "charset")
|
|
309
|
+
return { charset: i === null ? "_null" : i };
|
|
310
|
+
const s = C(o), a = Z(o), u = i === null ? "_null" : typeof i == "object" ? X(i, o) : typeof i == "number" ? i.toString() : i;
|
|
311
|
+
return s === "http-equiv" ? { "http-equiv": a, content: u } : { [s]: a, content: u };
|
|
312
|
+
});
|
|
313
|
+
return [...t, ...n].map(
|
|
314
|
+
(o) => "content" in o && o.content === "_null" ? { ...o, content: null } : o
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
const Y = {
|
|
318
|
+
key: "flatMeta",
|
|
319
|
+
hooks: {
|
|
320
|
+
"entries:normalize": (e) => {
|
|
321
|
+
const t = [];
|
|
322
|
+
e.tags = e.tags.map((r) => r.tag !== "_flatMeta" ? r : (t.push(g(r.props).map((n) => ({
|
|
323
|
+
...r,
|
|
324
|
+
tag: "meta",
|
|
325
|
+
props: n
|
|
326
|
+
}))), !1)).filter(Boolean).concat(...t);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}, ee = ["name", "property", "http-equiv"], te = /* @__PURE__ */ new Set([
|
|
330
|
+
"viewport",
|
|
331
|
+
"description",
|
|
332
|
+
"keywords",
|
|
333
|
+
"robots"
|
|
334
|
+
]);
|
|
335
|
+
function xe(e) {
|
|
336
|
+
const t = e.split(":");
|
|
337
|
+
return t.length ? T.has(t[1]) : !1;
|
|
338
|
+
}
|
|
339
|
+
function Ue(e) {
|
|
340
|
+
const { props: t, tag: r } = e;
|
|
341
|
+
if (F.has(r))
|
|
342
|
+
return r;
|
|
343
|
+
if (r === "link" && t.rel === "canonical")
|
|
344
|
+
return "canonical";
|
|
345
|
+
if (t.charset)
|
|
346
|
+
return "charset";
|
|
347
|
+
if (e.tag === "meta") {
|
|
348
|
+
for (const n of ee)
|
|
349
|
+
if (t[n] !== void 0) {
|
|
350
|
+
const o = t[n], i = o.includes(":"), s = te.has(o), u = !(i || s) && e.key ? `:key:${e.key}` : "";
|
|
351
|
+
return `${r}:${o}${u}`;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
if (e.key)
|
|
355
|
+
return `${r}:key:${e.key}`;
|
|
356
|
+
if (t.id)
|
|
357
|
+
return `${r}:id:${t.id}`;
|
|
358
|
+
if (B.has(r)) {
|
|
359
|
+
const n = e.textContent || e.innerHTML;
|
|
360
|
+
if (n)
|
|
361
|
+
return `${r}:content:${n}`;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
function He(e) {
|
|
365
|
+
const t = e._h || e._d;
|
|
366
|
+
if (t)
|
|
367
|
+
return t;
|
|
368
|
+
const r = e.textContent || e.innerHTML;
|
|
369
|
+
return r || `${e.tag}:${Object.entries(e.props).map(([n, o]) => `${n}:${String(o)}`).join(",")}`;
|
|
370
|
+
}
|
|
371
|
+
function y(e, t, r) {
|
|
372
|
+
typeof e === "function" && (!r || r !== "titleTemplate" && !(r[0] === "o" && r[1] === "n")) && (e = e());
|
|
373
|
+
let o;
|
|
374
|
+
if (t && (o = t(r, e)), Array.isArray(o))
|
|
375
|
+
return o.map((i) => y(i, t));
|
|
376
|
+
if ((o == null ? void 0 : o.constructor) === Object) {
|
|
377
|
+
const i = {};
|
|
378
|
+
for (const s of Object.keys(o))
|
|
379
|
+
i[s] = y(o[s], t, s);
|
|
380
|
+
return i;
|
|
381
|
+
}
|
|
382
|
+
return o;
|
|
383
|
+
}
|
|
384
|
+
function re(e, t) {
|
|
385
|
+
const r = e === "style" ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set();
|
|
386
|
+
function n(o) {
|
|
387
|
+
const i = o.trim();
|
|
388
|
+
if (i)
|
|
389
|
+
if (e === "style") {
|
|
390
|
+
const [s, ...a] = i.split(":").map((u) => u.trim());
|
|
391
|
+
s && a.length && r.set(s, a.join(":"));
|
|
392
|
+
} else
|
|
393
|
+
i.split(" ").filter(Boolean).forEach((s) => r.add(s));
|
|
394
|
+
}
|
|
395
|
+
return typeof t == "string" ? e === "style" ? t.split(";").forEach(n) : n(t) : Array.isArray(t) ? t.forEach((o) => n(o)) : t && typeof t == "object" && Object.entries(t).forEach(([o, i]) => {
|
|
396
|
+
i && i !== "false" && (e === "style" ? r.set(o.trim(), i) : n(o));
|
|
397
|
+
}), r;
|
|
398
|
+
}
|
|
399
|
+
function ne(e, t) {
|
|
400
|
+
return e.props = e.props || {}, t ? e.tag === "templateParams" ? (e.props = t, e) : (Object.entries(t).forEach(([r, n]) => {
|
|
401
|
+
if (n === null) {
|
|
402
|
+
e.props[r] = null;
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
if (r === "class" || r === "style") {
|
|
406
|
+
e.props[r] = re(r, n);
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
if (J.has(r)) {
|
|
410
|
+
if (["textContent", "innerHTML"].includes(r) && typeof n == "object") {
|
|
411
|
+
let s = t.type;
|
|
412
|
+
if (t.type || (s = "application/json"), !(s != null && s.endsWith("json")) && s !== "speculationrules")
|
|
413
|
+
return;
|
|
414
|
+
t.type = s, e.props.type = s, e[r] = JSON.stringify(n);
|
|
415
|
+
} else
|
|
416
|
+
e[r] = n;
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const o = String(n), i = r.startsWith("data-");
|
|
420
|
+
o === "true" || o === "" ? e.props[r] = i ? o : !0 : !n && i && o === "false" ? e.props[r] = "false" : n !== void 0 && (e.props[r] = n);
|
|
421
|
+
}), e) : e;
|
|
422
|
+
}
|
|
423
|
+
function oe(e, t) {
|
|
424
|
+
const r = typeof t == "object" && typeof t != "function" ? t : { [e === "script" || e === "noscript" || e === "style" ? "innerHTML" : "textContent"]: t }, n = ne({ tag: e, props: {} }, r);
|
|
425
|
+
return n.key && W.has(n.tag) && (n.props["data-hid"] = n._h = n.key), n.tag === "script" && typeof n.innerHTML == "object" && (n.innerHTML = JSON.stringify(n.innerHTML), n.props.type = n.props.type || "application/json"), Array.isArray(n.props.content) ? n.props.content.map((o) => ({ ...n, props: { ...n.props, content: o } })) : n;
|
|
426
|
+
}
|
|
427
|
+
function De(e, t) {
|
|
428
|
+
if (!e)
|
|
429
|
+
return [];
|
|
430
|
+
typeof e == "function" && (e = e());
|
|
431
|
+
const r = (o, i) => {
|
|
432
|
+
for (let s = 0; s < t.length; s++)
|
|
433
|
+
i = t[s](o, i);
|
|
434
|
+
return i;
|
|
435
|
+
};
|
|
436
|
+
e = r(void 0, e);
|
|
437
|
+
const n = [];
|
|
438
|
+
return e = y(e, r), Object.entries(e || {}).forEach(([o, i]) => {
|
|
439
|
+
if (i !== void 0)
|
|
440
|
+
for (const s of Array.isArray(i) ? i : [i])
|
|
441
|
+
n.push(oe(o, s));
|
|
442
|
+
}), n.flat();
|
|
443
|
+
}
|
|
444
|
+
const se = (e, t) => K(t) ? D(t) : t, _ = "usehead";
|
|
445
|
+
// @__NO_SIDE_EFFECTS__
|
|
446
|
+
function Ke(e) {
|
|
447
|
+
return {
|
|
448
|
+
install(r) {
|
|
449
|
+
r.config.globalProperties.$unhead = e, r.config.globalProperties.$head = e, r.provide(_, e);
|
|
450
|
+
}
|
|
451
|
+
}.install;
|
|
452
|
+
}
|
|
453
|
+
// @__NO_SIDE_EFFECTS__
|
|
454
|
+
function x() {
|
|
455
|
+
if (k()) {
|
|
456
|
+
const e = L(_);
|
|
457
|
+
if (!e)
|
|
458
|
+
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
459
|
+
return e;
|
|
460
|
+
}
|
|
461
|
+
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
462
|
+
}
|
|
463
|
+
function A(e, t = {}) {
|
|
464
|
+
const r = t.head || /* @__PURE__ */ x();
|
|
465
|
+
return r.ssr ? r.push(e || {}, t) : ie(r, e, t);
|
|
466
|
+
}
|
|
467
|
+
function ie(e, t, r = {}) {
|
|
468
|
+
const n = $(!1);
|
|
469
|
+
let o;
|
|
470
|
+
return R(() => {
|
|
471
|
+
const s = n.value ? {} : y(t, se);
|
|
472
|
+
o ? o.patch(s) : o = e.push(s, r);
|
|
473
|
+
}), q() && (z(() => {
|
|
474
|
+
o.dispose();
|
|
475
|
+
}), N(() => {
|
|
476
|
+
n.value = !0;
|
|
477
|
+
}), G(() => {
|
|
478
|
+
n.value = !1;
|
|
479
|
+
})), o;
|
|
480
|
+
}
|
|
481
|
+
function S(e = {}, t = {}) {
|
|
482
|
+
(t.head || /* @__PURE__ */ x()).use(Y);
|
|
483
|
+
const { title: n, titleTemplate: o, ...i } = e;
|
|
484
|
+
return A({
|
|
485
|
+
title: n,
|
|
486
|
+
titleTemplate: o,
|
|
487
|
+
_flatMeta: i
|
|
488
|
+
}, t);
|
|
489
|
+
}
|
|
490
|
+
function ke() {
|
|
491
|
+
function e(r) {
|
|
492
|
+
S({
|
|
493
|
+
ogSiteName: r.siteName,
|
|
494
|
+
ogLocale: r.locale
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
function t(r) {
|
|
498
|
+
const {
|
|
499
|
+
title: n,
|
|
500
|
+
description: o,
|
|
501
|
+
keywords: i,
|
|
502
|
+
image: s,
|
|
503
|
+
url: a,
|
|
504
|
+
type: u = "website"
|
|
505
|
+
} = r, c = o && o.length > 155 ? `${o.substring(0, 152)}...` : o;
|
|
506
|
+
A({
|
|
507
|
+
title: n,
|
|
508
|
+
link: a ? [{
|
|
509
|
+
rel: "canonical",
|
|
510
|
+
href: a
|
|
511
|
+
}] : []
|
|
512
|
+
}), S({
|
|
513
|
+
description: c || o,
|
|
514
|
+
keywords: i,
|
|
515
|
+
ogTitle: n,
|
|
516
|
+
ogDescription: c || o,
|
|
517
|
+
ogType: u === "product" ? void 0 : u,
|
|
518
|
+
// product 类型不被支持,跳过
|
|
519
|
+
ogUrl: a,
|
|
520
|
+
ogImage: s,
|
|
521
|
+
twitterCard: "summary_large_image",
|
|
522
|
+
twitterTitle: n,
|
|
523
|
+
twitterDescription: c || o,
|
|
524
|
+
twitterImage: s
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
return {
|
|
528
|
+
setGlobalSEO: e,
|
|
529
|
+
setPageSEO: t
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
function Le() {
|
|
533
|
+
const e = M(), t = () => e.meta;
|
|
534
|
+
A({
|
|
535
|
+
title: f(() => t().title || ""),
|
|
536
|
+
link: f(() => {
|
|
537
|
+
const r = t();
|
|
538
|
+
return r.url ? [{
|
|
539
|
+
rel: "canonical",
|
|
540
|
+
href: r.url
|
|
541
|
+
}] : [];
|
|
542
|
+
})
|
|
543
|
+
}), S({
|
|
544
|
+
description: f(() => {
|
|
545
|
+
const n = t().description;
|
|
546
|
+
if (n)
|
|
547
|
+
return n.length > 155 ? `${n.substring(0, 152)}...` : n;
|
|
548
|
+
}),
|
|
549
|
+
keywords: f(() => t().keywords),
|
|
550
|
+
ogTitle: f(() => t().title),
|
|
551
|
+
ogDescription: f(() => {
|
|
552
|
+
const n = t().description;
|
|
553
|
+
if (n)
|
|
554
|
+
return n.length > 155 ? `${n.substring(0, 152)}...` : n;
|
|
555
|
+
}),
|
|
556
|
+
ogType: f(() => {
|
|
557
|
+
const n = t().type || "website";
|
|
558
|
+
return n === "product" ? void 0 : n;
|
|
559
|
+
}),
|
|
560
|
+
ogUrl: f(() => t().url),
|
|
561
|
+
ogImage: f(() => t().image),
|
|
562
|
+
twitterCard: "summary_large_image",
|
|
563
|
+
twitterTitle: f(() => t().title),
|
|
564
|
+
twitterDescription: f(() => {
|
|
565
|
+
const n = t().description;
|
|
566
|
+
if (n)
|
|
567
|
+
return n.length > 155 ? `${n.substring(0, 152)}...` : n;
|
|
568
|
+
}),
|
|
569
|
+
twitterImage: f(() => t().image)
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
export {
|
|
573
|
+
Ve as H,
|
|
574
|
+
_e as U,
|
|
575
|
+
Ce as V,
|
|
576
|
+
ve as a,
|
|
577
|
+
Ie as b,
|
|
578
|
+
ke as c,
|
|
579
|
+
Le as d,
|
|
580
|
+
Ue as e,
|
|
581
|
+
Oe as f,
|
|
582
|
+
ne as g,
|
|
583
|
+
He as h,
|
|
584
|
+
xe as i,
|
|
585
|
+
De as n,
|
|
586
|
+
Me as u,
|
|
587
|
+
Ke as v,
|
|
588
|
+
Ee as w
|
|
589
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _t, g as Ht } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
2
|
import { api as bt } from "@huyooo/api";
|
|
3
|
-
import { g as it } from "./globalConfig-
|
|
3
|
+
import { g as it } from "./globalConfig-C1YOJcxa.js";
|
|
4
4
|
var Nt = { exports: {} };
|
|
5
5
|
(function(_, fe) {
|
|
6
6
|
(function(Y, A) {
|