vue-layout-gitcode 1.8.14 → 1.8.16

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.
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, inject, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString, createVNode, unref, renderList, withDirectives, createBlock, ref, watch, onMounted, createCommentVNode } from "vue";
2
2
  import "vue-devui-lal/icon";
3
3
  import "vue-devui-lal/icon/style.css";
4
- import { h as headRequest, R as REPO_MODULE, a as i18n, G as GIcon, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-q-9Kzz6q.js";
4
+ import { h as headRequest, R as REPO_MODULE, a as i18n, G as GIcon, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-qGsEG9PB.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-D8Sa-nqE.js";
7
- import "./transWebUrl-DM2u0vwf.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-C0q0FNWm.js";
7
+ import "./transWebUrl-D_uP_hL5.js";
8
8
  import "vue-devui-lal/tooltip";
9
9
  import "vue-devui-lal/tooltip/style.css";
10
10
  import "vue-router";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, useSlots, ref, computed, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, createTextVNode, createCommentVNode, toDisplayString, renderSlot } from "vue";
2
- import { x as useLayoutConfig, y as ThemeType, z as currentTheme, j as LANG_ZH, A as LANG_EN, w as getLocaleLang, G as GIcon, B as emitEvent, C as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { x as useLayoutConfig, y as ThemeType, z as currentTheme, j as LANG_ZH, A as LANG_EN, w as getLocaleLang, G as GIcon, B as emitEvent, C as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-qGsEG9PB.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Popover } from "vue-devui-lal/popover";
5
5
  import "vue-devui-lal/popover/style.css";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, watch, computed, createElementBlock, openBlock, createCommentVNode, createBlock, withDirectives, Fragment, createElementVNode, createVNode, toDisplayString, unref, withModifiers, normalizeClass, withCtx, renderList, createTextVNode, vShow } from "vue";
2
- import { a as i18n, x as useLayoutConfig, G as GIcon, t as transformUrl, D as _sfc_main$1, F as loadAsideData, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, H as asideRequest, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { a as i18n, x as useLayoutConfig, G as GIcon, t as transformUrl, D as _sfc_main$1, F as loadAsideData, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, H as asideRequest, _ as _export_sfc } from "./index-qGsEG9PB.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DM2u0vwf.js";
4
+ import { t as transWebUrl } from "./transWebUrl-D_uP_hL5.js";
5
5
  import { Select, Option } from "vue-devui-lal/select";
6
6
  import { Input } from "vue-devui-lal/input";
7
7
  import { Skeleton } from "vue-devui-lal/skeleton";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, computed, watch, createElementBlock, openBlock, createElementVNode, createVNode, createBlock, createCommentVNode, withDirectives, toDisplayString, unref, withModifiers, normalizeClass, withCtx, Fragment, renderList, createTextVNode, vShow } from "vue";
2
- import { a as i18n, x as useLayoutConfig, G as GIcon, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { a as i18n, x as useLayoutConfig, G as GIcon, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-qGsEG9PB.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DM2u0vwf.js";
4
+ import { t as transWebUrl } from "./transWebUrl-D_uP_hL5.js";
5
5
  import { Input } from "vue-devui-lal/input";
6
6
  import { Skeleton } from "vue-devui-lal/skeleton";
7
7
  import { MenuItem } from "vue-devui-lal/menu";
@@ -1,5 +1,5 @@
1
1
  import { ref, inject, computed, withDirectives, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-q-9Kzz6q.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-qGsEG9PB.js";
3
3
  import { useRoute, useRouter } from "vue-router";
4
4
  import "vue-devui-lal/icon";
5
5
  import "vue-devui-lal/icon/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, createCommentVNode, Fragment, renderList, normalizeClass, createElementVNode, createVNode, toDisplayString, withModifiers } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-qGsEG9PB.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "history-list" };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createElementBlock, openBlock, createElementVNode, withDirectives, toDisplayString, withModifiers, createVNode, vShow } from "vue";
2
- import { G as GIcon, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-qGsEG9PB.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "ellipsis" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, onMounted, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, renderSlot, createBlock, createVNode, withCtx } from "vue";
2
- import { u as useReportRepo, S as SearchRepoCard } from "./index-D8Sa-nqE.js";
3
- import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-C0q0FNWm.js";
3
+ import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-qGsEG9PB.js";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { SkeletonItem } from "vue-devui-lal/skeleton";
6
6
  import "vue-devui-lal/grid/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, createCommentVNode, toDisplayString, unref } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-qGsEG9PB.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = ["onClick"];
@@ -1,5 +1,5 @@
1
1
  import { inject, ref, watch, withDirectives, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-q-9Kzz6q.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-qGsEG9PB.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "px-[8px] history-list-project pl-[8px]" };
@@ -8,7 +8,7 @@ import { Message } from "vue-devui-lal/message";
8
8
  import "vue-devui-lal/message/style.css";
9
9
  import { FixedOverlay } from "vue-devui-lal/overlay";
10
10
  import "vue-devui-lal/overlay/style.css";
11
- import { a as i18n, k as usePageResize, w as getLocaleLang, j as LANG_ZH, _ as _export_sfc } from "./index-q-9Kzz6q.js";
11
+ import { a as i18n, k as usePageResize, w as getLocaleLang, j as LANG_ZH, _ as _export_sfc } from "./index-qGsEG9PB.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  constructor() {
14
14
  __publicField(this, "ypRiddlerInstance", null);
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onMounted, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { w as getLocaleLang, j as LANG_ZH, x as useLayoutConfig, _ as _export_sfc } from "./index-q-9Kzz6q.js";
2
+ import { w as getLocaleLang, j as LANG_ZH, x as useLayoutConfig, _ as _export_sfc } from "./index-qGsEG9PB.js";
3
3
  import { FixedOverlay } from "vue-devui-lal/overlay";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const TARGET_TEXT = "Click in order:";
@@ -1,7 +1,7 @@
1
1
  import { ref, watchEffect, defineComponent, toDisplayString, unref, mergeModels, useModel, watch, createElementBlock, openBlock, createVNode, withDirectives, normalizeClass, createElementVNode, vShow, inject, withModifiers, createBlock, Fragment, computed, createCommentVNode, normalizeStyle, createTextVNode, onMounted, onUnmounted, renderList, withCtx, reactive } from "vue";
2
2
  import debounce from "lodash/debounce";
3
- import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-q-9Kzz6q.js";
4
- import { t as transWebUrl } from "./transWebUrl-DM2u0vwf.js";
3
+ import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-qGsEG9PB.js";
4
+ import { t as transWebUrl } from "./transWebUrl-D_uP_hL5.js";
5
5
  import { useRouter } from "vue-router";
6
6
  import { Row, Col } from "vue-devui-lal/grid";
7
7
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -105,51 +105,6 @@ const _export_sfc = (sfc, props) => {
105
105
  return target;
106
106
  };
107
107
  const GIcon = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-vue-layout-gitcode"]]);
108
- const transformUrl = (url) => {
109
- if (!url || typeof url !== "string") {
110
- return url;
111
- }
112
- if (url.startsWith("/") && !url.startsWith("//") || url.startsWith("./") || url.startsWith("../")) {
113
- return url;
114
- }
115
- if (url.startsWith("https://cdn-") || url.startsWith("http://cdn-") || url.startsWith("//cdn-")) {
116
- return url;
117
- }
118
- if (typeof window === "undefined" || typeof location === "undefined") {
119
- return url;
120
- }
121
- const targetHost = location.host;
122
- if (!targetHost) {
123
- return url;
124
- }
125
- try {
126
- const urlObj = new URL(url);
127
- const originalHostname = urlObj.hostname;
128
- const parseHostname = (hostname, isLocationHost = false) => {
129
- const parts = hostname.split(".");
130
- const baseDomain = parts.length >= 2 ? parts.slice(-2).join(".") : hostname;
131
- let subdomainPrefix = parts.length > 2 ? parts[0] : "";
132
- if (isLocationHost && subdomainPrefix && subdomainPrefix.includes("-")) {
133
- subdomainPrefix = subdomainPrefix.split("-")[0];
134
- }
135
- return { baseDomain, subdomainPrefix };
136
- };
137
- const { subdomainPrefix: urlSubdomain } = parseHostname(originalHostname, false);
138
- const { baseDomain: targetBaseDomain, subdomainPrefix: targetEnvPrefix } = parseHostname(targetHost, true);
139
- let finalHostname = targetBaseDomain;
140
- if (targetEnvPrefix) {
141
- finalHostname = `${targetEnvPrefix}.${finalHostname}`;
142
- }
143
- if (urlSubdomain && urlSubdomain !== targetEnvPrefix) {
144
- finalHostname = `${urlSubdomain}.${finalHostname}`;
145
- }
146
- const transformed = url.replace(originalHostname, finalHostname);
147
- return transformed;
148
- } catch (error) {
149
- console.warn("URL解析失败:", url, error);
150
- return url;
151
- }
152
- };
153
108
  const defaultConfig = {
154
109
  VITE_ENV: "production",
155
110
  VITE_HOST: "https://gitcode.com",
@@ -165,12 +120,12 @@ const defaultConfig = {
165
120
  VITE_SECRET_KEY: "SA!nUNPZ5o!OSV&B",
166
121
  VITE_SECRET_IV: "SA!nwwwZ5o!OSV&B"
167
122
  };
168
- const layoutConfig$5 = reactive({ ...defaultConfig, VITE_HOST_TIANQI: transformUrl(defaultConfig.VITE_HOST_TIANQI) });
123
+ const layoutConfig$6 = reactive({ ...defaultConfig });
169
124
  function setLayoutConfig(customConfig) {
170
- Object.assign(layoutConfig$5, customConfig);
125
+ Object.assign(layoutConfig$6, customConfig);
171
126
  }
172
127
  function useLayoutConfig() {
173
- return readonly(layoutConfig$5);
128
+ return readonly(layoutConfig$6);
174
129
  }
175
130
  async function reqCatch(req, params) {
176
131
  try {
@@ -8270,7 +8225,7 @@ const $i18n = setupI18n({
8270
8225
  }
8271
8226
  });
8272
8227
  const i18n = $i18n;
8273
- const layoutConfig$4 = useLayoutConfig();
8228
+ const layoutConfig$5 = useLayoutConfig();
8274
8229
  function scrollToTop() {
8275
8230
  if (typeof window !== "undefined" && window.pageYOffset) {
8276
8231
  const c = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
@@ -8299,7 +8254,7 @@ function extractRepoInfoWithURL(repoUrl) {
8299
8254
  return parts.join("/");
8300
8255
  }
8301
8256
  const isGstarRepo = (topics) => {
8302
- const gstarTopicIds = layoutConfig$4.VITE_GSTAR_TOPIC.split(",");
8257
+ const gstarTopicIds = layoutConfig$5.VITE_GSTAR_TOPIC.split(",");
8303
8258
  let isGstar = false;
8304
8259
  topics && topics.forEach((item) => {
8305
8260
  if (gstarTopicIds.includes(item.topic_id || item.id)) {
@@ -8309,7 +8264,7 @@ const isGstarRepo = (topics) => {
8309
8264
  return isGstar;
8310
8265
  };
8311
8266
  const isTrustedRepo = (topics) => {
8312
- const trustedTopicIds = layoutConfig$4.VITE_TRUSTED_TOPIC.split(",");
8267
+ const trustedTopicIds = layoutConfig$5.VITE_TRUSTED_TOPIC.split(",");
8313
8268
  let isTrusted = false;
8314
8269
  topics && topics.forEach((item) => {
8315
8270
  if (trustedTopicIds.includes(item.topic_id || item.id)) {
@@ -8318,7 +8273,7 @@ const isTrustedRepo = (topics) => {
8318
8273
  });
8319
8274
  return isTrusted;
8320
8275
  };
8321
- const INCUBATION_TOPICS = layoutConfig$4.VITE_INCUBATION_TOPIC || "";
8276
+ const INCUBATION_TOPICS = layoutConfig$5.VITE_INCUBATION_TOPIC || "";
8322
8277
  const isIncubationRepo = (topics = []) => {
8323
8278
  if (!topics) return false;
8324
8279
  const incubationIds = INCUBATION_TOPICS.split(",");
@@ -8361,7 +8316,7 @@ const getLastTimeRepoId = () => {
8361
8316
  };
8362
8317
  const setUtmSourceSign = (utm_source) => {
8363
8318
  const time = new Date((/* @__PURE__ */ new Date()).getTime() + 60 * 60 * 1e3);
8364
- return api.set("utm_source_sign", utm_source, { expires: time, domain: layoutConfig$4.VITE_COOKIE_DOMAIN });
8319
+ return api.set("utm_source_sign", utm_source, { expires: time, domain: layoutConfig$5.VITE_COOKIE_DOMAIN });
8365
8320
  };
8366
8321
  const getUtmSourceSign = () => {
8367
8322
  return api.get("utm_source_sign") || "";
@@ -10921,7 +10876,7 @@ const getCommonHeadInfo = (isAiHub) => {
10921
10876
  "X-Device-ID": "unknown"
10922
10877
  };
10923
10878
  };
10924
- const layoutConfig$3 = useLayoutConfig();
10879
+ const layoutConfig$4 = useLayoutConfig();
10925
10880
  const setPassportPrefix = (url, method) => {
10926
10881
  const prefix = "/uc";
10927
10882
  {
@@ -10945,7 +10900,7 @@ const setPassportPrefix = (url, method) => {
10945
10900
  };
10946
10901
  const proxyService = (params, customConfigs) => {
10947
10902
  const service = axios.create({
10948
- baseURL: layoutConfig$3.VITE_API_HOST,
10903
+ baseURL: layoutConfig$4.VITE_API_HOST,
10949
10904
  timeout: (customConfigs == null ? void 0 : customConfigs.customTimeout) || 3e4,
10950
10905
  withCredentials: true
10951
10906
  });
@@ -11649,7 +11604,7 @@ var REPO_TYPE = /* @__PURE__ */ ((REPO_TYPE2) => {
11649
11604
  REPO_TYPE2[REPO_TYPE2["HUGGINGFACE_MIRRORS"] = 2] = "HUGGINGFACE_MIRRORS";
11650
11605
  return REPO_TYPE2;
11651
11606
  })(REPO_TYPE || {});
11652
- const layoutConfig$2 = useLayoutConfig();
11607
+ const layoutConfig$3 = useLayoutConfig();
11653
11608
  const registerLoginMethodMap = {
11654
11609
  [LoginMethodEnum.PHONE]: "短信",
11655
11610
  [LoginMethodEnum.PASSWORD]: "密码",
@@ -11683,7 +11638,7 @@ const collectRegisterLoginEvent = ({ isRegister, registerLoginMethod, success, e
11683
11638
  userid_fast_application: searchParams["uuid_tt_dd"] || "",
11684
11639
  gitcode_utm_source: searchParams["utm_source"] || "",
11685
11640
  page_url: location.href || "",
11686
- env: layoutConfig$2.VITE_ENV,
11641
+ env: layoutConfig$3.VITE_ENV,
11687
11642
  namespace: extraData.namespace || "",
11688
11643
  ...extraData,
11689
11644
  ...searchParams
@@ -12277,6 +12232,67 @@ if (isBrowser) {
12277
12232
  }
12278
12233
  const sessionStorage$1 = sessionStorage;
12279
12234
  const _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAmsSURBVHgB7VpdbxxnFT7nfccmRam6/gXZXIBy1y3qRe8YR6kUoUpdbhACJNtShFJUSCyBBFd2I1ClAoklVAE32BYXRAJqIwEyUOrNL4h70dtm+wvqNG7deGbe03PO+7Gzlr27/kpzsSeazO5kZvZ95jnnOR8TgLGNbWxjG9vYDjWEp8zyNjUg22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w8w7kfhAXrc0uLWC/HQicuSokQSi8VFE0DNpRk1gNX0BO4DqdgZhRwnAZakhZ4LfnVq70OnCdfW8aZeY0pCnNLrSf9GyDjAjBhTjvx0BHYmkpmQWgyVKDqnpnQX440kjg2wDo4yYVZSuDY14G/8+65JSbjlk/aRgXEhpFEHL2r+5rohqjllzKVEZhYivETUbCBwZ/9YaIDZwkQYIcHtk7BCQvowhgdcLZ9ld8K1ezuu88sctjMsQt/JC6JFAe0Rl2Vi2Sf2zxbJHspx2RLzPnc5/OhwQ6ckh0K0Mo7uirlLazFklQvy9+9utusn//n9yZXVt+bvIhEcxnRvfSiJDSrPgWI/OsGsQyzNbeMdSczuwVnDfD//3x2+vxXqqmswhdSJ06hM+BRAlRm8wdXuOvYZ3/qTK78sZNNy1CWF7uqOU3Z8e6X1DMd90OkkOxD/JmRBkonAigmM0t+yg27r8XxsQVNbjs2Zy/vLV87AKgMZTNrHphepRJryyQq3j1DUpcyLdNOovvjpdNR0KEAxfg3W2mkUJuraCog7Q1moMLNH+buw+t5P1BTYybLVDUpxCKpm6ZeT87V7kEGSieuXo4EkJ/zq71SLPV2aHsvJH1sAl3k5JD33TxUK6FhpSyopWctdQuh7lT3nH/t9mjTslFtaKKX/+Vgomv29pReK8euHczK2x1c7Lv5pNOXzCE1qFJpM5tRck3f97FqUjn/o99Mnpq4jASwnX/cCFVJlxN6B8m9n7lJjo9ShrGbCSgquLn91xumS1XReLc0me/5bOr54GNm+dbrS2YJzsgGAlzvTG2323Txr+v9b3Gu57vgaBJC4bx6EDi9eVZ9pNWo1pYI/eCwU1mc+8nSyevNQXbsfvC13K2xi24fBk5scZYaWUUfcgxOxZqT43Cbg3d+/nenG2uH2Zn/T6e3ZvdarCJrIjA8w181k9nS/NLw93pjG9vYxja2p8G+ADz7MtW/3lU1AAAAAElFTkSuQmCC";
12235
+ const transformUrl = (url) => {
12236
+ var _a;
12237
+ if (!url) return url;
12238
+ if (typeof window !== "undefined" && typeof location !== "undefined") {
12239
+ if (url == null ? void 0 : url.startsWith("https://cdn-")) {
12240
+ return url;
12241
+ }
12242
+ if (url == null ? void 0 : url.includes("myhuaweicloud.com")) {
12243
+ return url;
12244
+ }
12245
+ const host = (_a = location.host) == null ? void 0 : _a.replace(/^ai\./, "");
12246
+ if (host.includes("gitcode.host")) {
12247
+ return url == null ? void 0 : url.replace(/gitcode\.com/g, host);
12248
+ }
12249
+ if (url == null ? void 0 : url.includes("test.gitcode.net")) {
12250
+ return url == null ? void 0 : url.replace(/test\.gitcode\.net/g, host);
12251
+ }
12252
+ return transformUrlWithSpecialPrefix({ url, host });
12253
+ }
12254
+ return url;
12255
+ };
12256
+ const transformUrlWithSpecialPrefix = ({ url, host }) => {
12257
+ const specialPrefix = ["-tianqi", "-ai", "-news", "-competition"];
12258
+ const isTestEnv = /^(test|local)\./i.test(host);
12259
+ const isPreEnv = /^(pre|loc-pre)\./i.test(host);
12260
+ const isNonProdEnv = isTestEnv || isPreEnv;
12261
+ if (!isNonProdEnv) {
12262
+ return url == null ? void 0 : url.replace(/gitcode\.com/g, host);
12263
+ }
12264
+ if (specialPrefix.some((prefix) => url == null ? void 0 : url.includes(prefix))) {
12265
+ try {
12266
+ const urlObj = new URL(url);
12267
+ const urlHost = urlObj.host;
12268
+ const specialPrefixMatch = specialPrefix.find((prefix) => urlHost.includes(prefix));
12269
+ if (specialPrefixMatch) {
12270
+ const prefixPart = urlHost.split(".gitcode.")[0];
12271
+ const mainDomain = host.replace(/^(test|pre|local|loc-pre)\./, "");
12272
+ urlObj.host = `${prefixPart}.${mainDomain}`;
12273
+ return urlObj.toString();
12274
+ }
12275
+ } catch (error) {
12276
+ return url == null ? void 0 : url.replace(/gitcode\.net/g, host);
12277
+ }
12278
+ }
12279
+ return url;
12280
+ };
12281
+ const replaceHost = ({ url, customHost }) => {
12282
+ if (!url || !customHost) return url;
12283
+ try {
12284
+ const urlObj = new URL(url);
12285
+ let pureHost = customHost;
12286
+ if (customHost.includes("://")) {
12287
+ const customUrlObj = new URL(customHost);
12288
+ pureHost = customUrlObj.host;
12289
+ }
12290
+ urlObj.host = pureHost;
12291
+ return urlObj.toString();
12292
+ } catch (error) {
12293
+ return url;
12294
+ }
12295
+ };
12280
12296
  const _sfc_main$z = /* @__PURE__ */ defineComponent({
12281
12297
  ...{
12282
12298
  name: "GAvatar"
@@ -13650,7 +13666,12 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
13650
13666
  };
13651
13667
  });
13652
13668
  function goPage() {
13653
- const url = transformUrl(tianqiButtonConfig.value.url || layoutConfig2.VITE_HOST_TIANQI + "?utm_source=toolbar");
13669
+ let url = "";
13670
+ if (!tianqiButtonConfig.value.url) {
13671
+ url = transformUrlWithSpecialPrefix({ url: layoutConfig2.VITE_HOST_TIANQI, host: window.location.host }) + "?utm_source=toolbar";
13672
+ } else {
13673
+ url = transformUrl(tianqiButtonConfig.value.url) + "?utm_source=toolbar";
13674
+ }
13654
13675
  useReport2(REPO_EVENT.CLICK, { module_name: ASIDE_MENU_REPO.CHATBOTCLICK });
13655
13676
  window.open(url);
13656
13677
  }
@@ -15706,7 +15727,7 @@ var encUtf8 = { exports: {} };
15706
15727
  })(encUtf8);
15707
15728
  var encUtf8Exports = encUtf8.exports;
15708
15729
  const Utf8 = /* @__PURE__ */ getDefaultExportFromCjs(encUtf8Exports);
15709
- const layoutConfig$1 = useLayoutConfig();
15730
+ const layoutConfig$2 = useLayoutConfig();
15710
15731
  function headRequest(request) {
15711
15732
  return {
15712
15733
  getSearchHot() {
@@ -15946,8 +15967,8 @@ function headRequest(request) {
15946
15967
  },
15947
15968
  // 密码登录
15948
15969
  toLogin(data) {
15949
- const key = Utf8.parse(layoutConfig$1.VITE_SECRET_KEY);
15950
- const iv = Utf8.parse(layoutConfig$1.VITE_SECRET_IV);
15970
+ const key = Utf8.parse(layoutConfig$2.VITE_SECRET_KEY);
15971
+ const iv = Utf8.parse(layoutConfig$2.VITE_SECRET_IV);
15951
15972
  const cryptoCode = AES.encrypt(data.password, key, {
15952
15973
  iv,
15953
15974
  padding: Pkcs7
@@ -16846,13 +16867,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
16846
16867
  var _a;
16847
16868
  const layoutConfig2 = useLayoutConfig();
16848
16869
  const { t: $t } = i18n.global;
16849
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-B7pxc4qP.js"));
16850
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-D4cQjX3p.js"));
16851
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-BqWjxPvE.js"));
16852
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-CybBEjmV.js"));
16853
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-Bg1x_3XP.js"));
16854
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-BulAtSfT.js"));
16855
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-RE5DrekR.js"));
16870
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-Dy5juUra.js"));
16871
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-CFJ6J59F.js"));
16872
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CMO6j_Zi.js"));
16873
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-B_4tgYKg.js"));
16874
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-Dlt8QZuF.js"));
16875
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-CcD-4iZz.js"));
16876
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-CMMJRn4n.js"));
16856
16877
  const props = __props;
16857
16878
  const repoInfo = inject("repoInfo");
16858
16879
  const orgInfo = inject("orgInfo");
@@ -17506,7 +17527,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
17506
17527
  loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
17507
17528
  }
17508
17529
  };
17509
- const NoticeModal = defineAsyncComponent(() => import("./notice-BXL1Z7zj.js"));
17530
+ const NoticeModal = defineAsyncComponent(() => import("./notice-COzAZwma.js"));
17510
17531
  function clearNotice() {
17511
17532
  if (localStorage$2.getItem("validator_email")) {
17512
17533
  localStorage$2.removeItem("validator_email");
@@ -18072,6 +18093,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18072
18093
  }
18073
18094
  });
18074
18095
  const GitCodeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-vue-layout-gitcode"]]);
18096
+ const layoutConfig$1 = useLayoutConfig();
18075
18097
  const useConfigSide = (request, sceneValue) => {
18076
18098
  const API = asideRequest(request);
18077
18099
  const route = useRoute();
@@ -18132,9 +18154,17 @@ const useConfigSide = (request, sceneValue) => {
18132
18154
  sideLoading.value = true;
18133
18155
  const res = await API.getAsideConfig();
18134
18156
  let asideList = (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || []).map((item) => {
18157
+ let processedUrl = item.left_menu_url;
18158
+ if (processedUrl == null ? void 0 : processedUrl.startsWith("https://competition.")) {
18159
+ processedUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_COMPETITION_HOST) });
18160
+ } else if (processedUrl == null ? void 0 : processedUrl.startsWith("https://ai.")) {
18161
+ processedUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_AI_HOST) });
18162
+ } else {
18163
+ processedUrl = transformUrl(processedUrl);
18164
+ }
18135
18165
  return {
18136
18166
  ...item,
18137
- left_menu_url: transformUrl(item.left_menu_url),
18167
+ left_menu_url: processedUrl,
18138
18168
  left_menu_logo: transformUrl(item.left_menu_logo),
18139
18169
  left_menu_logo_black: transformUrl(item.left_menu_logo_black),
18140
18170
  left_menu_logo_hover: transformUrl(item.left_menu_logo_hover),
@@ -18265,9 +18295,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18265
18295
  const layoutConfig2 = useLayoutConfig();
18266
18296
  const { t: t2 } = i18n.global;
18267
18297
  const route = useRoute();
18268
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-DXirKqa1.js"));
18269
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-DiBj1Iy8.js"));
18270
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-DvkoGbdP.js"));
18298
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-kmd_ryIz.js"));
18299
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-Bu60-I4F.js"));
18300
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-vTH15HYB.js"));
18271
18301
  const props = __props;
18272
18302
  console.log("slotKeys", props.slotKeys);
18273
18303
  console.log("props", props);
@@ -18635,6 +18665,7 @@ const FEEDBACK_CENTER_URL = "https://gitcode.com/Gitcode-offical-team/GitCode-Do
18635
18665
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
18636
18666
  __name: "SubMenuList",
18637
18667
  setup(__props) {
18668
+ const layoutConfig2 = useLayoutConfig();
18638
18669
  const { t: t2 } = i18n.global;
18639
18670
  const isEn = computed(() => {
18640
18671
  return getLocaleLang() === LANG_EN;
@@ -18644,13 +18675,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18644
18675
  {
18645
18676
  name: t2("gitCodeLayout.header.helpDocument"),
18646
18677
  icon: "gt-line-file",
18647
- url: HELP_DOCS_URL,
18678
+ url: transformUrl(HELP_DOCS_URL),
18648
18679
  target: "_blank"
18649
18680
  },
18650
18681
  {
18651
18682
  name: t2("gitCodeLayout.home.feedbackCenter"),
18652
18683
  icon: "gt-line-Checks",
18653
- url: transformUrl(FEEDBACK_CENTER_URL),
18684
+ url: replaceHost({ url: FEEDBACK_CENTER_URL, customHost: layoutConfig2.VITE_HOST }),
18654
18685
  target: "_self"
18655
18686
  }
18656
18687
  ];
@@ -23979,7 +24010,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
23979
24010
  }
23980
24011
  });
23981
24012
  const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-vue-layout-gitcode"]]);
23982
- const SlidCaptcha = defineAsyncComponent(() => import("./index-MXMcsrP8.js"));
24013
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-BuVk4m7Z.js"));
23983
24014
  const useSlidCaptcha = () => {
23984
24015
  const { mount, unMount } = usePopup("slid-captcha-popup");
23985
24016
  const open = (config) => {
@@ -23998,7 +24029,7 @@ const useSlidCaptcha = () => {
23998
24029
  close: unMount
23999
24030
  };
24000
24031
  };
24001
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-CdUPr9DX.js"));
24032
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-B8QyODaD.js"));
24002
24033
  const useYunpianCaptcha = () => {
24003
24034
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
24004
24035
  const open = (config) => {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K, M, P, J, S, I, z, U, O, Q, N } from "./index-q-9Kzz6q.js";
1
+ import { K, M, P, J, S, I, z, U, O, Q, N } from "./index-qGsEG9PB.js";
2
2
  export {
3
3
  K as GitCodeAside,
4
4
  M as GitCodeHeader,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
- import { i as isPhone, u as useModel } from "./index-q-9Kzz6q.js";
2
+ import { i as isPhone, u as useModel } from "./index-qGsEG9PB.js";
3
3
  import { Notification } from "vue-devui-lal/notification";
4
4
  import { Button } from "vue-devui-lal/button";
5
5
  import "vue-devui-lal/notification/style.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-layout-gitcode",
3
- "version": "1.8.14",
3
+ "version": "1.8.16",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -1,4 +1,4 @@
1
- import { x as useLayoutConfig } from "./index-q-9Kzz6q.js";
1
+ import { x as useLayoutConfig } from "./index-qGsEG9PB.js";
2
2
  const layoutConfig = useLayoutConfig();
3
3
  const transWebUrl = (url, params) => {
4
4
  if (!url) return url;