@opendesign-plus/components 0.0.1-rc.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.
Files changed (60) hide show
  1. package/dist/components/OBanner.vue.d.ts +2 -0
  2. package/dist/components/OCookieNotice.vue.d.ts +16 -0
  3. package/dist/components/OCookieNoticeEl.vue.d.ts +29 -0
  4. package/dist/components/OHeaderSearch.vue.d.ts +692 -0
  5. package/dist/components/OPlusConfigProvider.vue.d.ts +23 -0
  6. package/dist/components/OSection.vue.d.ts +37 -0
  7. package/dist/components/OThemeSwitcher.vue.d.ts +28 -0
  8. package/dist/components.cjs.js +1 -0
  9. package/dist/components.css +1 -0
  10. package/dist/components.es.js +1206 -0
  11. package/dist/components.umd.js +1 -0
  12. package/dist/index.d.ts +12 -0
  13. package/docs/design.md +27 -0
  14. package/docs/design_banner.md +41 -0
  15. package/docs/design_section.md +27 -0
  16. package/package.json +47 -0
  17. package/scripts/generate-components-index.js +81 -0
  18. package/src/assets/svg-icons/icon-chevron-right.svg +3 -0
  19. package/src/assets/svg-icons/icon-close.svg +3 -0
  20. package/src/assets/svg-icons/icon-delete.svg +3 -0
  21. package/src/assets/svg-icons/icon-header-back.svg +3 -0
  22. package/src/assets/svg-icons/icon-header-delete.svg +3 -0
  23. package/src/assets/svg-icons/icon-header-search.svg +4 -0
  24. package/src/assets/svg-icons/icon-moon.svg +3 -0
  25. package/src/assets/svg-icons/icon-sun.svg +3 -0
  26. package/src/components/OBanner.vue +390 -0
  27. package/src/components/OCookieNotice.vue +424 -0
  28. package/src/components/OCookieNoticeEl.vue +404 -0
  29. package/src/components/OHeaderSearch.vue +601 -0
  30. package/src/components/OPlusConfigProvider.vue +32 -0
  31. package/src/components/OSection.vue +178 -0
  32. package/src/components/OThemeSwitcher.vue +108 -0
  33. package/src/components/common/ClientOnlyWrapper.ts +21 -0
  34. package/src/components/common/ContentWrapper.vue +85 -0
  35. package/src/draft/Banner.vue +265 -0
  36. package/src/draft/ButtonCards.vue +106 -0
  37. package/src/draft/Feature.vue +134 -0
  38. package/src/draft/Footer.vue +512 -0
  39. package/src/draft/HorizontalAnchor.vue +165 -0
  40. package/src/draft/ItemSwiper.vue +133 -0
  41. package/src/draft/Logo.vue +141 -0
  42. package/src/draft/LogoCard.vue +75 -0
  43. package/src/draft/LogoV2.vue +19 -0
  44. package/src/draft/MainCard.vue +38 -0
  45. package/src/draft/MultiCard.vue +95 -0
  46. package/src/draft/MultiIconCard.vue +74 -0
  47. package/src/draft/OInfoCard.vue +176 -0
  48. package/src/draft/Process.vue +81 -0
  49. package/src/draft/Section.vue +167 -0
  50. package/src/draft/SingleTabCard.vue +85 -0
  51. package/src/draft/SliderCard.vue +110 -0
  52. package/src/env.d.ts +1 -0
  53. package/src/i18n/en.ts +20 -0
  54. package/src/i18n/index.ts +42 -0
  55. package/src/i18n/zh.ts +9 -0
  56. package/src/index.ts +34 -0
  57. package/src/shared/provide.ts +6 -0
  58. package/src/vue.d.ts +10 -0
  59. package/tsconfig.json +33 -0
  60. package/vite.config.ts +94 -0
@@ -0,0 +1,1206 @@
1
+ import { defineComponent as R, computed as z, createElementBlock as i, openBlock as l, normalizeStyle as oe, unref as e, renderSlot as I, ref as E, normalizeClass as T, createBlock as S, toDisplayString as u, withCtx as v, Fragment as L, renderList as J, createVNode as m, createElementVNode as a, createCommentVNode as b, createTextVNode as O, resolveComponent as we, h as $e, onMounted as X, getCurrentInstance as Ce, inject as Ie, watch as Y, Teleport as ve, nextTick as me, withDirectives as Oe, withKeys as xe, withModifiers as Se, vShow as Ae, reactive as ze, provide as Pe } from "vue";
2
+ import { isBoolean as ae, isString as le, isUndefined as pe, OCarousel as ne, OCarouselItem as ie, OFigure as ce, OButton as Q, OIcon as M, OIconClose as Ve, ODialog as Ee, OSwitch as fe, OInput as Be, ODivider as De, OConfigProvider as Me, isArray as Te, OLink as Ne } from "@opensig/opendesign";
3
+ import { useTheme as Ue, useScreen as Z } from "@opendesign-plus/composables";
4
+ import { useVModel as ge, onClickOutside as He } from "@vueuse/core";
5
+ import { ElButton as W, ElIcon as Re, ElDialog as Ke, ElSwitch as Ge } from "element-plus";
6
+ import "element-plus/es/components/button/style/index";
7
+ import "element-plus/es/components/dialog/style/index";
8
+ import "element-plus/es/components/switch/style/index";
9
+ import "element-plus/es/components/icon/style/index";
10
+ const Le = /* @__PURE__ */ R({
11
+ __name: "ContentWrapper",
12
+ props: {
13
+ verticalPadding: { type: [Boolean, String, Array], default: void 0 }
14
+ },
15
+ setup(t) {
16
+ const o = Symbol("default"), s = t, k = z(() => s.verticalPadding ? ae(s.verticalPadding) ? o : le(s.verticalPadding) ? s.verticalPadding : s.verticalPadding[0] : 0), d = z(() => s.verticalPadding ? ae(s.verticalPadding) ? o : le(s.verticalPadding) ? s.verticalPadding : pe(s.verticalPadding[1]) ? s.verticalPadding[0] : s.verticalPadding[1] : 0);
17
+ return (f, p) => (l(), i("div", {
18
+ class: "content-wrapper",
19
+ style: oe({
20
+ "--content-wrapper-vertical-paddingTop": k.value === e(o) ? void 0 : k.value,
21
+ "--content-wrapper-vertical-paddingBottom": d.value === e(o) ? void 0 : d.value
22
+ })
23
+ }, [
24
+ I(f.$slots, "default", {}, void 0, !0)
25
+ ], 4));
26
+ }
27
+ }), j = (t, o) => {
28
+ const s = t.__vccOpts || t;
29
+ for (const [k, d] of o)
30
+ s[k] = d;
31
+ return s;
32
+ }, re = /* @__PURE__ */ j(Le, [["__scopeId", "data-v-a0f91aed"]]), je = { key: 0 }, Ye = { class: "banner-content" }, Je = ["src"], We = {
33
+ key: 1,
34
+ class: "banner-title"
35
+ }, Ze = {
36
+ key: 2,
37
+ class: "banner-subtitle"
38
+ }, Fe = {
39
+ key: 4,
40
+ class: "banner-opts"
41
+ }, qe = /* @__PURE__ */ R({
42
+ __name: "OBanner",
43
+ props: {
44
+ options: void 0,
45
+ size: "large",
46
+ contentJustifyCenter: !1
47
+ },
48
+ setup(t) {
49
+ const o = t, { isLight: s } = Ue("opendesignplus", document.domain || "localhost"), { isPhone: k } = Z(), d = z(() => o.options), f = E(""), p = (n) => {
50
+ setTimeout(() => {
51
+ f.value = d.value[n].bg_theme ?? "light";
52
+ }, 100);
53
+ }, r = (n, y) => {
54
+ n && !y && window.open(n);
55
+ };
56
+ return (n, y) => (l(), i("div", {
57
+ class: T(["home-banner", t.size])
58
+ }, [
59
+ t.size === "tiny" ? (l(), i("div", je, u(d.value[1].title), 1)) : e(k) ? (l(), S(e(ne), {
60
+ key: 2,
61
+ class: "banner-carousel",
62
+ effect: "gallery",
63
+ "indicator-click": "",
64
+ "data-o-theme": f.value,
65
+ arrow: "never",
66
+ "auto-play": !0,
67
+ onBeforeChange: p
68
+ }, {
69
+ default: v(() => [
70
+ (l(!0), i(L, null, J(d.value, (c, _) => (l(), S(e(ie), {
71
+ class: T(["banner-item", `banner-item${_}`])
72
+ }, {
73
+ default: v(() => [
74
+ m(re, { class: "banner-wrapper" }, {
75
+ default: v(() => [
76
+ m(e(ce), {
77
+ class: "banner-bg",
78
+ src: c.bg,
79
+ onClick: (x) => r(c.href)
80
+ }, null, 8, ["src", "onClick"])
81
+ ]),
82
+ _: 2
83
+ }, 1024)
84
+ ]),
85
+ _: 2
86
+ }, 1032, ["class"]))), 256))
87
+ ]),
88
+ _: 1
89
+ }, 8, ["data-o-theme"])) : (l(), S(e(ne), {
90
+ key: 1,
91
+ class: "banner-carousel",
92
+ effect: "toggle",
93
+ "active-class": "current-slide",
94
+ "indicator-click": "",
95
+ "auto-play": !0,
96
+ "data-o-theme": f.value,
97
+ onBeforeChange: p
98
+ }, {
99
+ default: v(() => [
100
+ (l(!0), i(L, null, J(d.value, (c, _) => (l(), S(e(ie), {
101
+ key: _,
102
+ class: T(["banner-item", `banner-item${_}`])
103
+ }, {
104
+ default: v(() => [
105
+ m(e(ce), {
106
+ class: T(["banner-bg", {
107
+ "with-sticky-bg": c.withStickyBg,
108
+ "in-dark": !e(s),
109
+ "cursor-pointer": c.href && !c.btn
110
+ }]),
111
+ src: c.bg,
112
+ style: oe({
113
+ "--pad-offset": c.pad_offset
114
+ }),
115
+ onClick: (x) => r(c.href, c.btn)
116
+ }, {
117
+ default: v(() => [
118
+ m(re, {
119
+ class: T(["banner-wrapper", ["banner-wrapper", t.contentJustifyCenter ? "content-center" : ""]])
120
+ }, {
121
+ default: v(() => [
122
+ a("div", Ye, [
123
+ !e(k) && c.attach ? (l(), i("img", {
124
+ key: 0,
125
+ src: c.attach,
126
+ class: "banner-attach"
127
+ }, null, 8, Je)) : b("", !0),
128
+ c.title ? (l(), i("div", We, u(c.title), 1)) : b("", !0),
129
+ c.subtitle ? (l(), i("div", Ze, u(c.subtitle), 1)) : b("", !0),
130
+ c.bg_text ? (l(), i("div", {
131
+ key: 3,
132
+ class: "banner-text",
133
+ style: oe({
134
+ backgroundImage: `url(${c.bg_text})`,
135
+ "--pc-width": c.pc_text_width,
136
+ "--pc-height": c.pc_text_height,
137
+ "--pad-width": c.pad_text_width,
138
+ "--pad-height": c.pad_text_height
139
+ })
140
+ }, null, 4)) : b("", !0),
141
+ c.btn ? (l(), i("div", Fe, [
142
+ m(e(Q), {
143
+ href: c.href,
144
+ target: "_blank",
145
+ variant: "solid",
146
+ color: "primary",
147
+ size: t.size
148
+ }, {
149
+ default: v(() => [
150
+ O(u(c.btn), 1)
151
+ ]),
152
+ _: 2
153
+ }, 1032, ["href", "size"])
154
+ ])) : b("", !0)
155
+ ])
156
+ ]),
157
+ _: 2
158
+ }, 1032, ["class"])
159
+ ]),
160
+ _: 2
161
+ }, 1032, ["src", "class", "style", "onClick"])
162
+ ]),
163
+ _: 2
164
+ }, 1032, ["class"]))), 128))
165
+ ]),
166
+ _: 1
167
+ }, 8, ["data-o-theme"]))
168
+ ], 2));
169
+ }
170
+ }), Qe = /* @__PURE__ */ j(qe, [["__scopeId", "data-v-38a33983"]]), Xe = (t) => {
171
+ const o = E(!1);
172
+ return X(() => {
173
+ o.value = !0;
174
+ }), () => o.value && t.default ? t.default() : null;
175
+ }, ke = R({
176
+ setup(t, { slots: o }) {
177
+ const s = we("ClientOnly");
178
+ return s && typeof s != "string" ? () => $e(s, null, { default: () => o.default ? o.default() : null }) : Xe(o);
179
+ }
180
+ }), et = {
181
+ search: "搜索",
182
+ "search.hot": "热门搜索",
183
+ "search.placeholder": "搜索",
184
+ "search.expandedPlaceholder": "请输入搜索内容",
185
+ "search.history": "历史搜索",
186
+ "cookie.desc": "我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。",
187
+ "cookie.about": "查看详情"
188
+ }, tt = {
189
+ search: "Search",
190
+ "search.hot": "Top search",
191
+ "search.placeholder": "Please enter the content",
192
+ "search.expandedPlaceholder": "Please enter the content",
193
+ "search.history": "History",
194
+ "cookie.title": "{0} Community Respects Your Privacy",
195
+ "cookie.desc": 'This site uses cookies from us and our partners to improve your browsing experience and make the site work properly. By clicking "Accept All", you consent to the use of cookies. By clicking "Reject All", you disable the use of unnecessary cookies. You can manage your cookie settings by clicking "Manage Cookies". For more information or to change your cookie settings, please refer to our ',
196
+ "cookie.about": "About Cookies",
197
+ "cookie.acceptAll": "Accept All",
198
+ "cookie.rejectAll": "Reject All",
199
+ "cookie.manage": "Manage Cookies",
200
+ "cookie.necessaryCookie": "Strictly Necessary Cookies",
201
+ "cookie.alwaysOn": "Always active",
202
+ "cookie.necessaryCookieDetail": "These cookies are necessary for the site to work properly and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as logging in or filling in forms. You can set the browser to block these cookies, but that can make parts of the site not work. These cookies do not store any personally identifiable information.",
203
+ "cookie.analyticalCookie": "Analytics Cookies",
204
+ "cookie.analyticalCookieDetail": "We will use these cookies only with your consent. These cookies help us make improvements by collecting statistics such as the number of visits and traffic sources.",
205
+ "cookie.saveSetting": "Save Settings",
206
+ "cookie.setting": "Cookie settings"
207
+ }, ye = Symbol("provide-config-provider"), ot = E({
208
+ zh: et,
209
+ en: tt
210
+ });
211
+ function se() {
212
+ const o = Ce() ? Ie(ye) : null, s = z(() => (o == null ? void 0 : o.locale) || "zh");
213
+ return {
214
+ locale: s,
215
+ t: (d, ...f) => {
216
+ const r = ot.value[s.value][d];
217
+ return f.length > 0 && le(r) ? r.replace(/{(\d+)}/g, (n, y) => f[y] ?? n) : (pe(r) && console.warn(`Cannot translate the value of keypath '${d}'`), r);
218
+ }
219
+ };
220
+ }
221
+ const lt = {
222
+ key: 0,
223
+ class: "cookie-notice"
224
+ }, st = { class: "cookie-notice-content" }, at = ["type"], nt = { class: "cookie-notice-left" }, it = {
225
+ key: 0,
226
+ class: "cookie-desc",
227
+ style: { "margin-top": "0" }
228
+ }, ct = ["href"], rt = { class: "cookie-title" }, dt = { class: "cookie-desc" }, ut = ["href"], ht = {
229
+ key: 0,
230
+ class: "cookie-notice-right"
231
+ }, vt = { class: "cookie-dlg-title" }, mt = { class: "cookie-dlg-content" }, pt = { class: "content-item" }, ft = { class: "item-header" }, gt = { class: "item-title" }, kt = { class: "item-extra" }, yt = { class: "item-detail" }, _t = { class: "content-item" }, bt = { class: "item-header" }, wt = { class: "item-title" }, $t = { class: "item-extra" }, Ct = { class: "item-detail" }, It = "0", de = "1", Ot = "2", F = "3", xt = "agreed-cookiepolicy-zh", St = "agreed-cookiepolicy-en", At = /* @__PURE__ */ R({
232
+ __name: "OCookieNotice",
233
+ props: {
234
+ visible: { type: Boolean },
235
+ enableGrid: { type: Boolean },
236
+ community: {},
237
+ aboutPathZh: {},
238
+ aboutPathEn: {},
239
+ teleportTarget: {}
240
+ },
241
+ emits: ["update:visible"],
242
+ setup(t, { expose: o, emit: s }) {
243
+ const k = t, d = s, { lePadV: f, leLaptop: p } = Z(), { locale: r, t: n } = se(), y = z(() => r.value === "zh"), c = z(() => y.value ? xt : St), _ = E(!1), x = ge(k, "visible", d, { defaultValue: !1 }), A = (g) => {
244
+ const C = document.cookie.split(";").find((D) => D.split("=")[0].trim() === encodeURIComponent(g));
245
+ return C ? decodeURIComponent(C.split("=")[1]) : null;
246
+ }, B = (g, C, D, _e) => {
247
+ const be = `; max-age=${D * 24 * 60 * 60}`;
248
+ document.cookie = `${encodeURIComponent(g)}=${encodeURIComponent(C)}${be}; path=/; domain=${_e}`;
249
+ }, K = (g, C) => {
250
+ document.cookie = `${encodeURIComponent(g)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${C}`;
251
+ }, P = (g) => {
252
+ typeof g == "boolean" ? x.value = g : x.value = !x.value, me(() => {
253
+ !x.value && y.value && A(c.value) !== F && B(c.value, F, 180, location.hostname);
254
+ });
255
+ }, U = E(!1), N = (g) => {
256
+ typeof g == "boolean" ? U.value = g : U.value = !U.value;
257
+ }, h = () => y.value ? A(c.value) !== F : (A(c.value) ?? "0") === It, H = () => y.value ? A(c.value) === F : A(c.value) === de;
258
+ X(() => {
259
+ h() && P(!0);
260
+ }), Y(r, () => {
261
+ P(h());
262
+ });
263
+ const w = () => {
264
+ _.value = !0, K(c.value, location.hostname), B(c.value, de, 180, location.hostname), P(!1);
265
+ }, G = () => {
266
+ _.value = !1, K(c.value, location.hostname), B(c.value, Ot, 180, location.hostname), P(!1);
267
+ }, V = z(() => [
268
+ {
269
+ id: "save",
270
+ color: "primary",
271
+ label: n("cookie.saveSetting"),
272
+ variant: "outline",
273
+ size: "large",
274
+ round: "pill",
275
+ onClick: () => {
276
+ _.value ? w() : G(), N(!1);
277
+ }
278
+ },
279
+ {
280
+ id: "allowAll",
281
+ color: "primary",
282
+ label: n("cookie.acceptAll"),
283
+ variant: "outline",
284
+ size: "large",
285
+ round: "pill",
286
+ onClick: () => {
287
+ _.value = !0, w(), N(!1);
288
+ }
289
+ }
290
+ ]), $ = (g) => {
291
+ g && (_.value = H());
292
+ };
293
+ return o({
294
+ check() {
295
+ H() === x.value && P();
296
+ }
297
+ }), (g, C) => (l(), S(e(ke), null, {
298
+ default: v(() => [
299
+ (l(), S(ve, {
300
+ to: t.teleportTarget || "#app"
301
+ }, [
302
+ e(x) ? (l(), i("div", lt, [
303
+ a("div", st, [
304
+ a("div", {
305
+ type: e(r),
306
+ class: T({ "cookie-notice-wrap-grid": t.enableGrid, "cookie-notice-wrap": !t.enableGrid })
307
+ }, [
308
+ a("div", nt, [
309
+ y.value ? (l(), i("p", it, [
310
+ O(u(e(n)("cookie.desc")) + " ", 1),
311
+ a("a", {
312
+ href: t.aboutPathZh,
313
+ target: "_blank",
314
+ rel: "noopener noreferrer"
315
+ }, u(e(n)("cookie.about")), 9, ct)
316
+ ])) : (l(), i(L, { key: 1 }, [
317
+ a("p", rt, u(e(n)("cookie.title", [t.community])), 1),
318
+ a("p", dt, [
319
+ O(u(e(n)("cookie.desc")) + " ", 1),
320
+ a("a", {
321
+ href: t.aboutPathEn,
322
+ target: "_blank",
323
+ rel: "noopener noreferrer"
324
+ }, u(e(n)("cookie.about")), 9, ut),
325
+ C[4] || (C[4] = O(". ", -1))
326
+ ])
327
+ ], 64))
328
+ ]),
329
+ y.value ? b("", !0) : (l(), i("div", ht, [
330
+ m(e(Q), {
331
+ round: "pill",
332
+ variant: "outline",
333
+ color: "primary",
334
+ onClick: w
335
+ }, {
336
+ default: v(() => [
337
+ O(u(e(n)("cookie.acceptAll")), 1)
338
+ ]),
339
+ _: 1
340
+ }),
341
+ m(e(Q), {
342
+ round: "pill",
343
+ variant: "outline",
344
+ color: "primary",
345
+ onClick: G
346
+ }, {
347
+ default: v(() => [
348
+ O(u(e(n)("cookie.rejectAll")), 1)
349
+ ]),
350
+ _: 1
351
+ }),
352
+ m(e(Q), {
353
+ round: "pill",
354
+ variant: "outline",
355
+ color: "primary",
356
+ onClick: C[0] || (C[0] = (D) => N(!0))
357
+ }, {
358
+ default: v(() => [
359
+ O(u(e(n)("cookie.manage")), 1)
360
+ ]),
361
+ _: 1
362
+ })
363
+ ])),
364
+ m(e(M), {
365
+ class: "cookie-notice-close",
366
+ type: e(r),
367
+ onClick: C[1] || (C[1] = (D) => P(!1))
368
+ }, {
369
+ default: v(() => [
370
+ m(e(Ve))
371
+ ]),
372
+ _: 1
373
+ }, 8, ["type"])
374
+ ], 10, at)
375
+ ]),
376
+ m(e(Ee), {
377
+ visible: U.value,
378
+ "onUpdate:visible": C[3] || (C[3] = (D) => U.value = D),
379
+ size: e(p) ? "medium" : "large",
380
+ "phone-half-full": e(f),
381
+ class: "cookie-dlg",
382
+ actions: V.value,
383
+ onChange: $
384
+ }, {
385
+ header: v(() => [
386
+ a("span", vt, u(e(n)("cookie.manage")), 1)
387
+ ]),
388
+ default: v(() => [
389
+ a("div", mt, [
390
+ a("div", pt, [
391
+ a("div", ft, [
392
+ a("span", gt, u(e(n)("cookie.necessaryCookie")), 1),
393
+ a("span", kt, u(e(n)("cookie.alwaysOn")), 1)
394
+ ]),
395
+ a("div", yt, u(e(n)("cookie.necessaryCookieDetail")), 1)
396
+ ]),
397
+ a("div", _t, [
398
+ a("div", bt, [
399
+ a("span", wt, u(e(n)("cookie.analyticalCookie")), 1),
400
+ a("span", $t, [
401
+ m(e(fe), {
402
+ modelValue: _.value,
403
+ "onUpdate:modelValue": C[2] || (C[2] = (D) => _.value = D)
404
+ }, null, 8, ["modelValue"])
405
+ ])
406
+ ]),
407
+ a("div", Ct, u(e(n)("cookie.analyticalCookieDetail")), 1)
408
+ ])
409
+ ])
410
+ ]),
411
+ _: 1
412
+ }, 8, ["visible", "size", "phone-half-full", "actions"])
413
+ ])) : b("", !0)
414
+ ], 8, ["to"]))
415
+ ]),
416
+ _: 1
417
+ }));
418
+ }
419
+ }), zt = /* @__PURE__ */ j(At, [["__scopeId", "data-v-5ba95c2f"]]), Pt = {
420
+ key: 0,
421
+ class: "cookie-notice"
422
+ }, Vt = { class: "cookie-notice-content" }, Et = ["type"], Bt = { class: "cookie-notice-left" }, Dt = {
423
+ key: 0,
424
+ class: "cookie-desc",
425
+ style: { "margin-top": "0" }
426
+ }, Mt = ["href"], Tt = { class: "cookie-title" }, Nt = { class: "cookie-desc" }, Ut = ["href"], Ht = {
427
+ key: 0,
428
+ class: "cookie-notice-right"
429
+ }, Rt = { class: "cookie-dlg-content" }, Kt = { class: "content-item" }, Gt = { class: "item-header" }, Lt = { class: "item-title" }, jt = { class: "item-extra" }, Yt = { class: "item-detail" }, Jt = { class: "content-item" }, Wt = { class: "item-header" }, Zt = { class: "item-title" }, Ft = { class: "item-extra" }, qt = { class: "item-detail" }, Qt = "0", ue = "1", Xt = "2", q = "3", eo = "agreed-cookiepolicy-zh", to = "agreed-cookiepolicy-en", oo = /* @__PURE__ */ R({
430
+ __name: "OCookieNoticeEl",
431
+ props: {
432
+ visible: { type: Boolean },
433
+ enableGrid: { type: Boolean },
434
+ community: {},
435
+ aboutPathZh: {},
436
+ aboutPathEn: {},
437
+ teleportTarget: {}
438
+ },
439
+ emits: ["update:visible"],
440
+ setup(t, { emit: o }) {
441
+ const s = t, k = o, { lePadV: d } = Z(), { locale: f, t: p } = se(), r = z(() => f.value === "zh"), n = z(() => r.value ? eo : to), y = E(!1), c = ge(s, "visible", k, { defaultValue: !1 }), _ = (V) => {
442
+ const $ = document.cookie.split(";").find((g) => g.split("=")[0].trim() === encodeURIComponent(V));
443
+ return $ ? decodeURIComponent($.split("=")[1]) : null;
444
+ }, x = (V, $, g, C) => {
445
+ const D = `; max-age=${g * 24 * 60 * 60}`;
446
+ document.cookie = `${encodeURIComponent(V)}=${encodeURIComponent($)}${D}; path=/; domain=${C}`;
447
+ }, A = (V) => {
448
+ typeof V == "boolean" ? c.value = V : c.value = !c.value, me(() => {
449
+ !c.value && r.value && _(n.value) !== q && x(n.value, q, 180, location.hostname);
450
+ });
451
+ }, B = E(!1), K = (V) => {
452
+ typeof V == "boolean" ? B.value = V : B.value = !B.value;
453
+ }, P = () => r.value ? _(n.value) !== q : (_(n.value) ?? "0") === Qt, U = () => r.value ? _(n.value) === q : _(n.value) === ue;
454
+ X(() => {
455
+ P() && A(!0);
456
+ }), Y(f, () => {
457
+ A(P());
458
+ });
459
+ const N = () => {
460
+ y.value = !0, x(n.value, ue, 180, location.hostname), A(!1);
461
+ }, h = () => {
462
+ y.value = !1, x(n.value, Xt, 180, location.hostname), A(!1);
463
+ }, H = () => {
464
+ y.value ? N() : h(), K(!1);
465
+ }, w = () => {
466
+ y.value = !0, N(), K(!1);
467
+ }, G = () => {
468
+ y.value = U();
469
+ };
470
+ return (V, $) => (l(), S(e(ke), null, {
471
+ default: v(() => [
472
+ (l(), S(ve, {
473
+ to: t.teleportTarget || "#app"
474
+ }, [
475
+ e(c) ? (l(), i("div", Pt, [
476
+ a("div", Vt, [
477
+ a("div", {
478
+ type: e(f),
479
+ class: T({ "cookie-notice-wrap-grid": t.enableGrid, "cookie-notice-wrap": !t.enableGrid })
480
+ }, [
481
+ a("div", Bt, [
482
+ r.value ? (l(), i("p", Dt, [
483
+ O(u(e(p)("cookie.desc")) + " ", 1),
484
+ a("a", {
485
+ href: t.aboutPathZh,
486
+ target: "_blank",
487
+ rel: "noopener noreferrer"
488
+ }, u(e(p)("cookie.about")), 9, Mt)
489
+ ])) : (l(), i(L, { key: 1 }, [
490
+ a("p", Tt, u(e(p)("cookie.title", [t.community])), 1),
491
+ a("p", Nt, [
492
+ O(u(e(p)("cookie.desc")) + " ", 1),
493
+ a("a", {
494
+ href: t.aboutPathEn,
495
+ target: "_blank",
496
+ rel: "noopener noreferrer"
497
+ }, u(e(p)("cookie.about")), 9, Ut),
498
+ $[4] || ($[4] = O(". ", -1))
499
+ ])
500
+ ], 64))
501
+ ]),
502
+ r.value ? b("", !0) : (l(), i("div", Ht, [
503
+ m(e(W), {
504
+ round: "",
505
+ type: "primary",
506
+ onClick: N
507
+ }, {
508
+ default: v(() => [
509
+ O(u(e(p)("cookie.acceptAll")), 1)
510
+ ]),
511
+ _: 1
512
+ }),
513
+ m(e(W), {
514
+ round: "",
515
+ type: "primary",
516
+ onClick: h
517
+ }, {
518
+ default: v(() => [
519
+ O(u(e(p)("cookie.rejectAll")), 1)
520
+ ]),
521
+ _: 1
522
+ }),
523
+ m(e(W), {
524
+ round: "",
525
+ type: "primary",
526
+ onClick: $[0] || ($[0] = (g) => K(!0))
527
+ }, {
528
+ default: v(() => [
529
+ O(u(e(p)("cookie.manage")), 1)
530
+ ]),
531
+ _: 1
532
+ })
533
+ ])),
534
+ m(e(Re), {
535
+ class: "cookie-notice-close",
536
+ type: e(f),
537
+ onClick: $[1] || ($[1] = (g) => A(!1))
538
+ }, {
539
+ default: v(() => [
540
+ I(V.$slots, "close-icon", {}, () => [
541
+ $[5] || ($[5] = a("svg", {
542
+ xmlns: "http://www.w3.org/2000/svg",
543
+ viewBox: "0 0 1024 1024"
544
+ }, [
545
+ a("path", {
546
+ fill: "currentColor",
547
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
548
+ })
549
+ ], -1))
550
+ ], !0)
551
+ ]),
552
+ _: 3
553
+ }, 8, ["type"])
554
+ ], 10, Et)
555
+ ]),
556
+ m(e(Ke), {
557
+ modelValue: B.value,
558
+ "onUpdate:modelValue": $[3] || ($[3] = (g) => B.value = g),
559
+ width: e(d) ? "90%" : "50%",
560
+ title: e(p)("cookie.manage"),
561
+ "destroy-on-close": "",
562
+ onOpen: G
563
+ }, {
564
+ footer: v(() => [
565
+ m(e(W), {
566
+ round: "",
567
+ type: "primary",
568
+ onClick: H,
569
+ style: { "margin-right": "16px" }
570
+ }, {
571
+ default: v(() => [
572
+ O(u(e(p)("cookie.saveSetting")), 1)
573
+ ]),
574
+ _: 1
575
+ }),
576
+ m(e(W), {
577
+ round: "",
578
+ type: "primary",
579
+ onClick: w
580
+ }, {
581
+ default: v(() => [
582
+ O(u(e(p)("cookie.acceptAll")), 1)
583
+ ]),
584
+ _: 1
585
+ })
586
+ ]),
587
+ default: v(() => [
588
+ a("div", Rt, [
589
+ a("div", Kt, [
590
+ a("div", Gt, [
591
+ a("span", Lt, u(e(p)("cookie.necessaryCookie")), 1),
592
+ a("span", jt, u(e(p)("cookie.alwaysOn")), 1)
593
+ ]),
594
+ a("div", Yt, u(e(p)("cookie.necessaryCookieDetail")), 1)
595
+ ]),
596
+ a("div", Jt, [
597
+ a("div", Wt, [
598
+ a("span", Zt, u(e(p)("cookie.analyticalCookie")), 1),
599
+ a("span", Ft, [
600
+ m(e(Ge), {
601
+ modelValue: y.value,
602
+ "onUpdate:modelValue": $[2] || ($[2] = (g) => y.value = g)
603
+ }, null, 8, ["modelValue"])
604
+ ])
605
+ ]),
606
+ a("div", qt, u(e(p)("cookie.analyticalCookieDetail")), 1)
607
+ ])
608
+ ])
609
+ ]),
610
+ _: 1
611
+ }, 8, ["modelValue", "width", "title"])
612
+ ])) : b("", !0)
613
+ ], 8, ["to"]))
614
+ ]),
615
+ _: 3
616
+ }));
617
+ }
618
+ }), lo = /* @__PURE__ */ j(oo, [["__scopeId", "data-v-72bd84ae"]]), so = {
619
+ version: "1.1",
620
+ xmlns: "http://www.w3.org/2000/svg",
621
+ width: "24",
622
+ height: "24",
623
+ viewBox: "0 0 24 24"
624
+ };
625
+ function ao(t, o) {
626
+ return l(), i("svg", so, [...o[0] || (o[0] = [
627
+ a("path", {
628
+ fill: "currentColor",
629
+ d: "M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"
630
+ }, null, -1)
631
+ ])]);
632
+ }
633
+ const no = { name: "components-icon-close", render: ao }, io = {
634
+ version: "1.1",
635
+ xmlns: "http://www.w3.org/2000/svg",
636
+ width: "32",
637
+ height: "32",
638
+ viewBox: "0 0 32 32"
639
+ };
640
+ function co(t, o) {
641
+ return l(), i("svg", io, [...o[0] || (o[0] = [
642
+ a("path", {
643
+ opacity: "0.8",
644
+ fill: "currentColor",
645
+ d: "M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"
646
+ }, null, -1),
647
+ a("path", {
648
+ opacity: "0.8",
649
+ fill: "currentColor",
650
+ d: "M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"
651
+ }, null, -1)
652
+ ])]);
653
+ }
654
+ const he = { name: "components-icon-header-search", render: co }, ro = {
655
+ version: "1.1",
656
+ xmlns: "http://www.w3.org/2000/svg",
657
+ width: "32",
658
+ height: "32",
659
+ viewBox: "0 0 32 32"
660
+ };
661
+ function uo(t, o) {
662
+ return l(), i("svg", ro, [...o[0] || (o[0] = [
663
+ a("path", {
664
+ fill: "currentColor",
665
+ d: "M10.858 22.41c-0.349 0.349-0.915 0.349-1.263 0-0.314-0.314-0.345-0.804-0.094-1.153l0.094-0.111 5.146-5.15-5.177-5.178c-0.274-0.305-0.3-0.755-0.077-1.087l0.111-0.135c0.347-0.347 0.91-0.347 1.257 0l5.142 5.143 5.15-5.146c0.349-0.349 0.915-0.349 1.263 0 0.314 0.314 0.345 0.804 0.094 1.153l-0.094 0.111-11.552 11.552zM17.89 16.634l4.551 4.552c0.313 0.349 0.302 0.886-0.034 1.222-0.347 0.347-0.91 0.347-1.257 0l-4.516-4.518 1.256-1.256z"
666
+ }, null, -1)
667
+ ])]);
668
+ }
669
+ const ho = { name: "components-icon-header-delete", render: uo }, vo = {
670
+ version: "1.1",
671
+ xmlns: "http://www.w3.org/2000/svg",
672
+ width: "24",
673
+ height: "24",
674
+ viewBox: "0 0 24 24"
675
+ };
676
+ function mo(t, o) {
677
+ return l(), i("svg", vo, [...o[0] || (o[0] = [
678
+ a("path", {
679
+ fill: "currentColor",
680
+ d: "M19.154 5.295c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006-12.201-0.001 0.001 12.413c0 0.17 0.12 0.311 0.28 0.344l0.071 0.007h9.39c0.17 0 0.311-0.12 0.344-0.28l0.007-0.071v-10.47c0-0.387 0.313-0.7 0.7-0.7 0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v10.47c0 0.919-0.708 1.672-1.608 1.745l-0.144 0.006h-9.39c-0.919 0-1.672-0.708-1.745-1.608l-0.006-0.144-0.001-12.413-0.707 0.001c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h14.308zM10.011 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.953 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.652 3.189c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006h-3.972c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h3.972z"
681
+ }, null, -1)
682
+ ])]);
683
+ }
684
+ const po = { name: "components-icon-delete", render: mo }, fo = {
685
+ version: "1.1",
686
+ xmlns: "http://www.w3.org/2000/svg",
687
+ width: "36",
688
+ height: "32",
689
+ viewBox: "0 0 36 32"
690
+ };
691
+ function go(t, o) {
692
+ return l(), i("svg", fo, [...o[0] || (o[0] = [
693
+ a("path", {
694
+ fill: "currentColor",
695
+ d: "M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"
696
+ }, null, -1)
697
+ ])]);
698
+ }
699
+ const ko = { name: "components-icon-header-back", render: go }, yo = { class: "o-header-search" }, _o = { class: "o-header-search-drawer" }, bo = {
700
+ key: 0,
701
+ class: "o-header-search-recommend-container"
702
+ }, wo = ["onClick"], $o = {
703
+ key: 1,
704
+ class: "o-header-search-history-container"
705
+ }, Co = { class: "o-header-search-history-header" }, Io = { class: "o-header-search-history-header-title" }, Oo = { class: "o-header-search-history-item-container" }, xo = ["onClick"], So = { class: "o-header-search-history-item-text" }, Ao = {
706
+ key: 3,
707
+ class: "o-header-search-hot-container"
708
+ }, zo = { class: "o-header-search-hot-header" }, Po = { class: "o-header-search-hot-item-container" }, Vo = ["onClick"], Eo = /* @__PURE__ */ R({
709
+ __name: "OHeaderSearch",
710
+ props: {
711
+ modelValue: { default: "" },
712
+ placeholder: {},
713
+ expandedPlaceholder: {},
714
+ expandDirection: { default: "left" },
715
+ clearable: { type: Boolean, default: !0 },
716
+ historyItems: { default: () => [] },
717
+ maxHistoryCount: { default: 6 },
718
+ storeHistory: { type: Boolean, default: !1 },
719
+ historyTitle: {},
720
+ storageKey: { default: "search-history" },
721
+ hotItems: { default: () => [] },
722
+ hotTitle: {},
723
+ recommendItems: { default: () => [] },
724
+ searchUrl: {},
725
+ searchUrlOpenBlank: { type: Boolean, default: !0 },
726
+ searchTextMobile: {}
727
+ },
728
+ emits: ["update:modelValue", "update:historyItems", "clear", "search", "delete-history", "delete-history-item"],
729
+ setup(t, { emit: o }) {
730
+ const { lePadV: s } = Z(), { t: k } = se(), d = t, f = o, p = E(d.modelValue), r = E(d.historyItems), n = E(!1), y = E(), c = z(() => !s.value && n.value || s.value && p.value);
731
+ Y(
732
+ () => d.modelValue,
733
+ (h) => {
734
+ p.value !== h && (p.value = h);
735
+ }
736
+ ), Y(
737
+ () => p.value,
738
+ (h) => {
739
+ f("update:modelValue", h);
740
+ }
741
+ ), Y(
742
+ () => d.historyItems,
743
+ (h) => {
744
+ r.value !== h && (r.value = h);
745
+ }
746
+ ), Y(
747
+ () => r.value,
748
+ (h) => {
749
+ f("update:historyItems", h);
750
+ }
751
+ ), X(() => {
752
+ if (d.storeHistory && d.storageKey)
753
+ try {
754
+ const h = JSON.parse(localStorage.getItem(d.storageKey) || "[]");
755
+ Array.isArray(h) && h.length && (r.value = Array.from(/* @__PURE__ */ new Set([...r.value, ...h])));
756
+ } catch {
757
+ }
758
+ });
759
+ const _ = () => {
760
+ n.value = !0;
761
+ }, x = () => {
762
+ const h = p.value.trim();
763
+ h && (n.value = !1, r.value.unshift(h), r.value = Array.from(new Set(r.value)), r.value.length > d.maxHistoryCount && r.value.pop(), d.storeHistory && d.storeHistory && localStorage.setItem(d.storageKey, JSON.stringify(r.value)), f("search", h), d.searchUrl && window.open(d.searchUrl + h, d.searchUrlOpenBlank ? "_blank" : "_self", "noopener noreferrer"));
764
+ }, A = () => {
765
+ p.value = "", f("clear"), s.value || (n.value = !1);
766
+ }, B = () => {
767
+ const h = [...r.value];
768
+ r.value = [], d.storeHistory && d.storeHistory && localStorage.removeItem(d.storageKey), f("delete-history", h);
769
+ }, K = (h) => {
770
+ r.value = r.value.filter((H) => H !== h), d.storeHistory && d.storeHistory && (r.value.length ? localStorage.setItem(d.storageKey, JSON.stringify(r.value)) : localStorage.removeItem(d.storageKey)), f("delete-history-item", h);
771
+ }, P = (h) => {
772
+ p.value = h, x();
773
+ }, U = () => {
774
+ p.value = "", n.value = !1;
775
+ }, N = E();
776
+ return He(N, A), (h, H) => (l(), i("div", yo, [
777
+ a("div", {
778
+ ref_key: "posWrapper",
779
+ ref: N,
780
+ class: T({
781
+ "o-header-search-input-pc-wrapper": !e(s),
782
+ "o-header-search-input-pc-wrapper-left": !e(s) && t.expandDirection === "left",
783
+ "o-header-search-input-pc-wrapper-right": !e(s) && t.expandDirection === "right",
784
+ "o-header-search-input-mobile-wrapper": e(s),
785
+ focus: n.value
786
+ })
787
+ }, [
788
+ a("div", {
789
+ class: T(["o-header-search-input-wrapper", { focus: n.value }])
790
+ }, [
791
+ e(s) && n.value ? (l(), S(e(M), {
792
+ key: 0,
793
+ class: "o-header-search-icon",
794
+ onClick: U
795
+ }, {
796
+ default: v(() => [
797
+ m(e(ko))
798
+ ]),
799
+ _: 1
800
+ })) : b("", !0),
801
+ m(e(Be), {
802
+ ref_key: "inputRef",
803
+ ref: y,
804
+ modelValue: p.value,
805
+ "onUpdate:modelValue": H[0] || (H[0] = (w) => p.value = w),
806
+ class: "o-header-search-input",
807
+ placeholder: n.value ? t.expandedPlaceholder ?? e(k)("search.expandedPlaceholder") : t.placeholder ?? e(k)("search.placeholder"),
808
+ onFocus: _,
809
+ onKeyup: xe(x, ["enter"])
810
+ }, {
811
+ prefix: v(() => [
812
+ I(h.$slots, "input-prefix", {}, () => [
813
+ m(e(M), { class: "o-header-search-icon" }, {
814
+ default: v(() => [
815
+ m(e(he))
816
+ ]),
817
+ _: 1
818
+ })
819
+ ], !0)
820
+ ]),
821
+ suffix: v(() => [
822
+ I(h.$slots, "input-suffix", {}, () => [
823
+ t.clearable && c.value ? (l(), S(e(M), {
824
+ key: 0,
825
+ class: "o-header-search-icon close",
826
+ onClick: A
827
+ }, {
828
+ default: v(() => [
829
+ m(e(no))
830
+ ]),
831
+ _: 1
832
+ })) : b("", !0)
833
+ ], !0)
834
+ ]),
835
+ _: 3
836
+ }, 8, ["modelValue", "placeholder"]),
837
+ e(s) && n.value ? (l(), i("span", {
838
+ key: 1,
839
+ class: "o-header-search-text",
840
+ onClick: x
841
+ }, u(t.searchTextMobile ?? e(k)("search")), 1)) : b("", !0)
842
+ ], 2),
843
+ Oe(a("div", _o, [
844
+ I(h.$slots, "drawer", {
845
+ recommendItems: t.recommendItems,
846
+ historyItems: r.value,
847
+ hotItems: t.hotItems
848
+ }, () => [
849
+ t.recommendItems.length ? (l(), i("div", bo, [
850
+ I(h.$slots, "recommend-header", { recommend: t.recommendItems }, void 0, !0),
851
+ I(h.$slots, "recommend-content", { recommend: t.recommendItems }, () => [
852
+ (l(!0), i(L, null, J(t.recommendItems, (w) => (l(), i("div", {
853
+ class: "o-header-search-recommend-item",
854
+ key: w,
855
+ onClick: (G) => P(w)
856
+ }, u(w), 9, wo))), 128))
857
+ ], !0)
858
+ ])) : r.value.length ? (l(), i("div", $o, [
859
+ I(h.$slots, "history-header", { history: r.value }, () => [
860
+ a("div", Co, [
861
+ a("span", Io, u(t.historyTitle ?? e(k)("search.history")), 1),
862
+ m(e(M), {
863
+ class: "o-header-search-icon",
864
+ onClick: B
865
+ }, {
866
+ default: v(() => [
867
+ m(e(po))
868
+ ]),
869
+ _: 1
870
+ })
871
+ ])
872
+ ], !0),
873
+ I(h.$slots, "history-content", { history: r.value }, () => [
874
+ a("div", Oo, [
875
+ (l(!0), i(L, null, J(r.value, (w) => (l(), i("div", {
876
+ key: w,
877
+ class: "o-header-search-history-item",
878
+ onClick: (G) => P(w)
879
+ }, [
880
+ a("span", So, u(w), 1),
881
+ m(e(M), {
882
+ class: "o-header-search-history-item-icon",
883
+ onClick: Se((G) => K(w), ["stop"])
884
+ }, {
885
+ default: v(() => [
886
+ m(e(ho), { class: "icon-delete" })
887
+ ]),
888
+ _: 1
889
+ }, 8, ["onClick"])
890
+ ], 8, xo))), 128))
891
+ ])
892
+ ], !0)
893
+ ])) : b("", !0),
894
+ (t.recommendItems.length || r.value.length) && t.hotItems.length ? (l(), S(e(De), {
895
+ key: 2,
896
+ class: "o-header-search-drawer-divider"
897
+ })) : b("", !0),
898
+ t.hotItems.length ? (l(), i("div", Ao, [
899
+ I(h.$slots, "hot-header", { hot: t.hotItems }, () => [
900
+ a("div", zo, u(t.hotTitle ?? e(k)("search.hot")), 1)
901
+ ], !0),
902
+ I(h.$slots, "hot-content", { hot: t.hotItems }, () => [
903
+ a("div", Po, [
904
+ (l(!0), i(L, null, J(t.hotItems, (w) => (l(), i("div", {
905
+ key: w,
906
+ class: "o-header-search-hot-item",
907
+ onClick: (G) => P(w)
908
+ }, u(w), 9, Vo))), 128))
909
+ ])
910
+ ], !0)
911
+ ])) : b("", !0)
912
+ ], !0)
913
+ ], 512), [
914
+ [Ae, n.value]
915
+ ])
916
+ ], 2),
917
+ e(s) ? (l(), S(e(M), {
918
+ key: 0,
919
+ class: "o-header-search-icon-mobile",
920
+ onClick: _
921
+ }, {
922
+ default: v(() => [
923
+ m(e(he))
924
+ ]),
925
+ _: 1
926
+ })) : b("", !0)
927
+ ]));
928
+ }
929
+ }), Bo = /* @__PURE__ */ j(Eo, [["__scopeId", "data-v-cce80de4"]]), Do = {
930
+ locale: "zh-CN",
931
+ // common
932
+ "common.empty": "暂无数据",
933
+ "common.loading": "加载中...",
934
+ // pagination
935
+ "pagination.goto": "前往",
936
+ "pagination.page": "页",
937
+ "pagination.countPerPage": "条/页",
938
+ "pagination.total": "共 {0} 条",
939
+ // upload
940
+ "upload.buttonLabel": "点击上传",
941
+ "upload.drag": "点击或拖拽文件到此处上传",
942
+ "upload.dragHover": "释放文件并开始上传",
943
+ "upload.retry": "点击重试",
944
+ "upload.delete": "删除",
945
+ "upload.preview": "预览",
946
+ "upload.edit": "编辑",
947
+ // select
948
+ "select.cancel": "取消",
949
+ "select.confirm": "确定",
950
+ // input
951
+ "input.limit": "<b>{0}</b>/{1}"
952
+ }, Mo = {
953
+ locale: "en-US",
954
+ // common
955
+ "common.empty": "No Data",
956
+ "common.loading": "Loading...",
957
+ // pagination
958
+ "pagination.goto": "Go to",
959
+ "pagination.page": "Page",
960
+ "pagination.countPerPage": "/page",
961
+ "pagination.total": "Total: {0}",
962
+ // upload
963
+ "upload.buttonLabel": "Upload",
964
+ "upload.drag": "Click or drag file to this area to upload",
965
+ "upload.dragHover": "Release to upload",
966
+ "upload.retry": "Click to retry",
967
+ "upload.delete": "Delete",
968
+ "upload.preview": "Preview",
969
+ "upload.edit": "Edit",
970
+ // select
971
+ "select.cancel": "Cancel",
972
+ "select.confirm": "Ok",
973
+ // input
974
+ "input.limit": "<b>{0}</b>/{1}"
975
+ }, To = /* @__PURE__ */ R({
976
+ __name: "OPlusConfigProvider",
977
+ props: {
978
+ locale: {},
979
+ theme: { default: "light" }
980
+ },
981
+ setup(t) {
982
+ const o = t, s = ze({
983
+ locale: z(() => o.locale),
984
+ theme: z(() => o.theme)
985
+ });
986
+ return Pe(ye, s), (k, d) => (l(), S(e(Me), {
987
+ locale: t.locale === "zh" ? e(Do) : e(Mo)
988
+ }, {
989
+ default: v(() => [
990
+ I(k.$slots, "default")
991
+ ]),
992
+ _: 3
993
+ }, 8, ["locale"]));
994
+ }
995
+ }), No = {
996
+ version: "1.1",
997
+ xmlns: "http://www.w3.org/2000/svg",
998
+ width: "24",
999
+ height: "24",
1000
+ viewBox: "0 0 24 24"
1001
+ };
1002
+ function Uo(t, o) {
1003
+ return l(), i("svg", No, [...o[0] || (o[0] = [
1004
+ a("path", { d: "M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z" }, null, -1)
1005
+ ])]);
1006
+ }
1007
+ const Ho = { name: "components-icon-chevron-right", render: Uo }, Ro = { class: "section-wrapper" }, Ko = {
1008
+ key: 1,
1009
+ class: "section-title"
1010
+ }, Go = {
1011
+ key: 2,
1012
+ class: "section-subtitle"
1013
+ }, Lo = {
1014
+ key: 1,
1015
+ class: "section-body"
1016
+ }, jo = {
1017
+ key: 2,
1018
+ class: "section-footer"
1019
+ }, Yo = /* @__PURE__ */ R({
1020
+ __name: "OSection",
1021
+ props: {
1022
+ title: { default: void 0 },
1023
+ subtitle: { default: void 0 },
1024
+ full: { type: Boolean, default: !1 },
1025
+ headerJustifyCenter: { type: Boolean, default: !0 },
1026
+ footer: { default: void 0 },
1027
+ footerHref: { default: void 0 }
1028
+ },
1029
+ setup(t) {
1030
+ const o = t;
1031
+ return (s, k) => (l(), i("div", {
1032
+ class: T(["app-section", { "is-full": o.full }])
1033
+ }, [
1034
+ a("div", Ro, [
1035
+ I(s.$slots, "main", {}, () => [
1036
+ s.$slots.header || o.title || o.subtitle ? (l(), i("div", {
1037
+ key: 0,
1038
+ class: T(["section-header", { "is-left": !o.headerJustifyCenter }])
1039
+ }, [
1040
+ I(s.$slots, "header", {}, () => [
1041
+ e(Te)(o.title) ? (l(!0), i(L, { key: 0 }, J(o.title, (d) => (l(), i("h2", {
1042
+ key: d,
1043
+ class: "section-title"
1044
+ }, u(d), 1))), 128)) : s.$slots.title || o.title ? (l(), i("h2", Ko, [
1045
+ I(s.$slots, "title", {}, () => [
1046
+ O(u(o.title), 1)
1047
+ ], !0)
1048
+ ])) : b("", !0),
1049
+ s.$slots.subtitle || o.subtitle ? (l(), i("p", Go, [
1050
+ I(s.$slots, "subtitle", {}, () => [
1051
+ O(u(o.subtitle), 1)
1052
+ ], !0)
1053
+ ])) : b("", !0)
1054
+ ], !0)
1055
+ ], 2)) : b("", !0),
1056
+ s.$slots.default ? (l(), i("div", Lo, [
1057
+ I(s.$slots, "default", {}, void 0, !0)
1058
+ ])) : b("", !0),
1059
+ s.$slots.footer || o.footer ? (l(), i("div", jo, [
1060
+ I(s.$slots, "footer", {}, () => [
1061
+ m(e(Ne), {
1062
+ href: o.footerHref,
1063
+ target: "_blank"
1064
+ }, {
1065
+ suffix: v(() => [
1066
+ m(e(M), { class: "footer-icon" }, {
1067
+ default: v(() => [
1068
+ m(e(Ho))
1069
+ ]),
1070
+ _: 1
1071
+ })
1072
+ ]),
1073
+ default: v(() => [
1074
+ O(u(o.footer) + " ", 1)
1075
+ ]),
1076
+ _: 1
1077
+ }, 8, ["href"])
1078
+ ], !0)
1079
+ ])) : b("", !0)
1080
+ ], !0)
1081
+ ])
1082
+ ], 2));
1083
+ }
1084
+ }), Jo = /* @__PURE__ */ j(Yo, [["__scopeId", "data-v-57b81782"]]), Wo = {
1085
+ version: "1.1",
1086
+ xmlns: "http://www.w3.org/2000/svg",
1087
+ width: "24",
1088
+ height: "24",
1089
+ viewBox: "0 0 24 24"
1090
+ };
1091
+ function Zo(t, o) {
1092
+ return l(), i("svg", Wo, [...o[0] || (o[0] = [
1093
+ a("path", {
1094
+ opacity: "0.8",
1095
+ fill: "currentColor",
1096
+ d: "M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"
1097
+ }, null, -1)
1098
+ ])]);
1099
+ }
1100
+ const ee = { name: "components-icon-sun", render: Zo }, Fo = {
1101
+ version: "1.1",
1102
+ xmlns: "http://www.w3.org/2000/svg",
1103
+ width: "24",
1104
+ height: "24",
1105
+ viewBox: "0 0 24 24"
1106
+ };
1107
+ function qo(t, o) {
1108
+ return l(), i("svg", Fo, [...o[0] || (o[0] = [
1109
+ a("path", {
1110
+ opacity: "0.8",
1111
+ fill: "currentColor",
1112
+ d: "M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"
1113
+ }, null, -1)
1114
+ ])]);
1115
+ }
1116
+ const te = { name: "components-icon-moon", render: qo }, Qo = { class: "o-theme-switcher" }, Xo = {
1117
+ key: 1,
1118
+ class: "o-theme-switcher-mobile"
1119
+ }, el = /* @__PURE__ */ R({
1120
+ __name: "OThemeSwitcher",
1121
+ props: {
1122
+ theme: { default: "light" },
1123
+ type: { default: "auto" },
1124
+ lightValue: { default: "light" },
1125
+ darkValue: { default: "dark" },
1126
+ lightIcon: { default: ee },
1127
+ darkIcon: { default: te }
1128
+ },
1129
+ emits: ["update:theme", "change"],
1130
+ setup(t, { emit: o }) {
1131
+ const s = t, k = o, { gtPhone: d } = Z(), f = z({
1132
+ get() {
1133
+ return s.theme;
1134
+ },
1135
+ set(n) {
1136
+ k("update:theme", n), k("change", n);
1137
+ }
1138
+ }), p = z(() => s.type === "common" || s.type === "auto" && d.value), r = () => {
1139
+ f.value = f.value === s.lightValue ? s.darkValue : s.lightValue;
1140
+ };
1141
+ return (n, y) => (l(), i("div", Qo, [
1142
+ p.value ? (l(), i("div", {
1143
+ key: 0,
1144
+ class: "o-theme-switcher-common",
1145
+ onClick: r
1146
+ }, [
1147
+ m(e(M), { class: "o-theme-icon" }, {
1148
+ default: v(() => [
1149
+ f.value === t.lightValue ? (l(), S(e(te), { key: 0 })) : (l(), S(e(ee), { key: 1 }))
1150
+ ]),
1151
+ _: 1
1152
+ })
1153
+ ])) : (l(), i("div", Xo, [
1154
+ m(e(fe), {
1155
+ modelValue: f.value,
1156
+ "onUpdate:modelValue": y[0] || (y[0] = (c) => f.value = c),
1157
+ class: "o-theme-switch",
1158
+ "checked-value": t.darkValue,
1159
+ "unchecked-value": t.lightValue
1160
+ }, {
1161
+ on: v(() => [
1162
+ m(e(M), { class: "o-theme-icon" }, {
1163
+ default: v(() => [
1164
+ m(e(ee))
1165
+ ]),
1166
+ _: 1
1167
+ })
1168
+ ]),
1169
+ off: v(() => [
1170
+ m(e(M), { class: "o-theme-icon" }, {
1171
+ default: v(() => [
1172
+ m(e(te))
1173
+ ]),
1174
+ _: 1
1175
+ })
1176
+ ]),
1177
+ _: 1
1178
+ }, 8, ["modelValue", "checked-value", "unchecked-value"])
1179
+ ]))
1180
+ ]));
1181
+ }
1182
+ }), tl = /* @__PURE__ */ j(el, [["__scopeId", "data-v-837e14fb"]]), ol = {
1183
+ OBanner: Qe,
1184
+ OCookieNotice: zt,
1185
+ OCookieNoticeEl: lo,
1186
+ OHeaderSearch: Bo,
1187
+ OPlusConfigProvider: To,
1188
+ OSection: Jo,
1189
+ OThemeSwitcher: tl
1190
+ }, hl = {
1191
+ install: (t) => {
1192
+ Object.entries(ol).forEach(([o, s]) => {
1193
+ t.component(o, s);
1194
+ });
1195
+ }
1196
+ };
1197
+ export {
1198
+ Qe as OBanner,
1199
+ zt as OCookieNotice,
1200
+ lo as OCookieNoticeEl,
1201
+ Bo as OHeaderSearch,
1202
+ To as OPlusConfigProvider,
1203
+ Jo as OSection,
1204
+ tl as OThemeSwitcher,
1205
+ hl as default
1206
+ };